Rename emit_insn to aarch64_emit_insn
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
e1c587c3
YQ
12015-10-12 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c: Update all callers of function renaming
4 from emit_insn to aarch64_emit_insn.
5
b6542f81
YQ
62015-10-12 Yao Qi <yao.qi@linaro.org>
7
8 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9 arch/aarch64-insn.h.
10 (struct aarch64_memory_operand): Likewise.
11 (ENCODE): Likewise.
12 (emit_insn): Move to arch/aarch64-insn.c.
13 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
14 (emit_load_store): Move to arch/aarch64-insn.c.
15 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
16 (can_encode_int32): Remove.
17
246994ce
YQ
182015-10-12 Yao Qi <yao.qi@linaro.org>
19
20 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
21 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
22 (aarch64_relocate_instruction): Likewise.
23 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
24 (struct aarch64_insn_visitor): Likewise.
25
0badd99f
YQ
262015-10-12 Yao Qi <yao.qi@linaro.org>
27
28 * linux-aarch64-low.c (struct aarch64_insn_data): New.
29 (struct aarch64_insn_visitor): New.
30 (struct aarch64_insn_relocation_data): New.
31 (aarch64_ftrace_insn_reloc_b): New function.
32 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
33 (aarch64_ftrace_insn_reloc_cb): Likewise.
34 (aarch64_ftrace_insn_reloc_tb): Likewise.
35 (aarch64_ftrace_insn_reloc_adr): Likewise.
36 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
37 (aarch64_ftrace_insn_reloc_others): Likewise.
38 (visitor): New.
39 (aarch64_relocate_instruction): Use visitor.
40
dfaffe9d
YQ
412015-10-12 Yao Qi <yao.qi@linaro.org>
42
43 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
44 int. Add argument buf.
45 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
46 aarch64_relocate_instruction.
47
70b439f0
YQ
482015-10-12 Yao Qi <yao.qi@linaro.org>
49
50 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
51 argument insn. Remove local variable insn. Don't call
52 target_read_uint32.
53 (aarch64_install_fast_tracepoint_jump_pad): Call
54 target_read_uint32.
55
7781c06f
YQ
562015-09-30 Yao Qi <yao.qi@linaro.org>
57
58 * linux-aarch64-low.c (emit_movk): Shorten a long line.
59 (emit_load_store_pair): Likewise.
60
9a3c8263
SM
612015-09-25 Simon Marchi <simon.marchi@ericsson.com>
62
63 * dll.c (match_dll): Add cast(s).
64 (unloaded_dll): Likewise.
65 * linux-low.c (second_thread_of_pid_p): Likewise.
66 (delete_lwp_callback): Likewise.
67 (count_events_callback): Likewise.
68 (select_event_lwp_callback): Likewise.
69 (linux_set_resume_request): Likewise.
70 * server.c (accumulate_file_name_length): Likewise.
71 (emit_dll_description): Likewise.
72 (handle_qxfer_threads_worker): Likewise.
73 (visit_actioned_threads): Likewise.
74 * thread-db.c (any_thread_of): Likewise.
75 * tracepoint.c (same_process_p): Likewise.
76 (match_blocktype): Likewise.
77 (build_traceframe_info_xml): Likewise.
78
224c3ddb
SM
792015-09-25 Simon Marchi <simon.marchi@ericsson.com>
80
81 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
82 assignment.
83 (gdb_unparse_agent_expr): Likewise.
84 * hostio.c (require_data): Likewise.
85 (handle_pread): Likewise.
86 * linux-low.c (disable_regset): Likewise.
87 (fetch_register): Likewise.
88 (store_register): Likewise.
89 (get_dynamic): Likewise.
90 (linux_qxfer_libraries_svr4): Likewise.
91 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
92 (set_fast_tracepoint_jump): Likewise.
93 (uninsert_fast_tracepoint_jumps_at): Likewise.
94 (reinsert_fast_tracepoint_jumps_at): Likewise.
95 (validate_inserted_breakpoint): Likewise.
96 (clone_agent_expr): Likewise.
97 * regcache.c (init_register_cache): Likewise.
98 * remote-utils.c (putpkt_binary_1): Likewise.
99 (decode_M_packet): Likewise.
100 (decode_X_packet): Likewise.
101 (look_up_one_symbol): Likewise.
102 (relocate_instruction): Likewise.
103 (monitor_output): Likewise.
104 * server.c (handle_search_memory): Likewise.
105 (handle_qxfer_exec_file): Likewise.
106 (handle_qxfer_libraries): Likewise.
107 (handle_qxfer): Likewise.
108 (handle_query): Likewise.
109 (handle_v_cont): Likewise.
110 (handle_v_run): Likewise.
111 (captured_main): Likewise.
112 * target.c (write_inferior_memory): Likewise.
113 * thread-db.c (try_thread_db_load_from_dir): Likewise.
114 * tracepoint.c (init_trace_buffer): Likewise.
115 (add_tracepoint_action): Likewise.
116 (add_traceframe): Likewise.
117 (add_traceframe_block): Likewise.
118 (cmd_qtdpsrc): Likewise.
119 (cmd_qtdv): Likewise.
120 (cmd_qtstatus): Likewise.
121 (response_source): Likewise.
122 (response_tsv): Likewise.
123 (cmd_qtnotes): Likewise.
124 (gdb_collect): Likewise.
125 (initialize_tracepoint): Likewise.
126
afbe19f8
PL
1272015-09-21 Pierre Langlois <pierre.langlois@arm.com>
128
129 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
130 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
131 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
132 <NOP>: New.
133 (enum aarch64_condition_codes): New enum.
134 (w0): New static global.
135 (fp): Likewise.
136 (lr): Likewise.
137 (struct aarch64_memory_operand) <type>: New
138 MEMORY_OPERAND_POSTINDEX type.
139 (postindex_memory_operand): New helper function.
140 (emit_ret): New function.
141 (emit_load_store_pair): New function, factored out of emit_stp
142 with support for MEMORY_OPERAND_POSTINDEX.
143 (emit_stp): Rewrite using emit_load_store_pair.
144 (emit_ldp): New function.
145 (emit_load_store): Likewise.
146 (emit_ldr): Mention post-index instruction in comment.
147 (emit_ldrh): New function.
148 (emit_ldrb): New function.
149 (emit_ldrsw): Mention post-index instruction in comment.
150 (emit_str): Likewise.
151 (emit_subs): New function.
152 (emit_cmp): Likewise.
153 (emit_and): Likewise.
154 (emit_orr): Likewise.
155 (emit_orn): Likewise.
156 (emit_eor): Likewise.
157 (emit_mvn): Likewise.
158 (emit_lslv): Likewise.
159 (emit_lsrv): Likewise.
160 (emit_asrv): Likewise.
161 (emit_mul): Likewise.
162 (emit_sbfm): Likewise.
163 (emit_sbfx): Likewise.
164 (emit_ubfm): Likewise.
165 (emit_ubfx): Likewise.
166 (emit_csinc): Likewise.
167 (emit_cset): Likewise.
168 (emit_nop): Likewise.
169 (emit_ops_insns): New helper function.
170 (emit_pop): Likewise.
171 (emit_push): Likewise.
172 (aarch64_emit_prologue): New function.
173 (aarch64_emit_epilogue): Likewise.
174 (aarch64_emit_add): Likewise.
175 (aarch64_emit_sub): Likewise.
176 (aarch64_emit_mul): Likewise.
177 (aarch64_emit_lsh): Likewise.
178 (aarch64_emit_rsh_signed): Likewise.
179 (aarch64_emit_rsh_unsigned): Likewise.
180 (aarch64_emit_ext): Likewise.
181 (aarch64_emit_log_not): Likewise.
182 (aarch64_emit_bit_and): Likewise.
183 (aarch64_emit_bit_or): Likewise.
184 (aarch64_emit_bit_xor): Likewise.
185 (aarch64_emit_bit_not): Likewise.
186 (aarch64_emit_equal): Likewise.
187 (aarch64_emit_less_signed): Likewise.
188 (aarch64_emit_less_unsigned): Likewise.
189 (aarch64_emit_ref): Likewise.
190 (aarch64_emit_if_goto): Likewise.
191 (aarch64_emit_goto): Likewise.
192 (aarch64_write_goto_address): Likewise.
193 (aarch64_emit_const): Likewise.
194 (aarch64_emit_call): Likewise.
195 (aarch64_emit_reg): Likewise.
196 (aarch64_emit_pop): Likewise.
197 (aarch64_emit_stack_flush): Likewise.
198 (aarch64_emit_zero_ext): Likewise.
199 (aarch64_emit_swap): Likewise.
200 (aarch64_emit_stack_adjust): Likewise.
201 (aarch64_emit_int_call_1): Likewise.
202 (aarch64_emit_void_call_2): Likewise.
203 (aarch64_emit_eq_goto): Likewise.
204 (aarch64_emit_ne_goto): Likewise.
205 (aarch64_emit_lt_goto): Likewise.
206 (aarch64_emit_le_goto): Likewise.
207 (aarch64_emit_gt_goto): Likewise.
208 (aarch64_emit_ge_got): Likewise.
209 (aarch64_emit_ops_impl): New static global variable.
210 (aarch64_emit_ops): New target function, return
211 &aarch64_emit_ops_impl.
212 (struct linux_target_ops): Install it.
213
bb903df0
PL
2142015-09-21 Pierre Langlois <pierre.langlois@arm.com>
215
216 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
217 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
218 aarch64-ipa.o.
219 * linux-aarch64-ipa.c: New file.
220 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
221 and endian.h.
222 (aarch64_get_thread_area): New target method.
223 (extract_signed_bitfield): New helper function.
224 (aarch64_decode_ldr_literal): New function.
225 (enum aarch64_opcodes): New enum.
226 (struct aarch64_register): New struct.
227 (struct aarch64_operand): New struct.
228 (x0): New static global.
229 (x1): Likewise.
230 (x2): Likewise.
231 (x3): Likewise.
232 (x4): Likewise.
233 (w2): Likewise.
234 (ip0): Likewise.
235 (sp): Likewise.
236 (xzr): Likewise.
237 (aarch64_register): New helper function.
238 (register_operand): Likewise.
239 (immediate_operand): Likewise.
240 (struct aarch64_memory_operand): New struct.
241 (offset_memory_operand): New helper function.
242 (preindex_memory_operand): Likewise.
243 (enum aarch64_system_control_registers): New enum.
244 (ENCODE): New macro.
245 (emit_insn): New helper function.
246 (emit_b): New function.
247 (emit_bcond): Likewise.
248 (emit_cb): Likewise.
249 (emit_tb): Likewise.
250 (emit_blr): Likewise.
251 (emit_stp): Likewise.
252 (emit_ldp_q_offset): Likewise.
253 (emit_stp_q_offset): Likewise.
254 (emit_load_store): Likewise.
255 (emit_ldr): Likewise.
256 (emit_ldrsw): Likewise.
257 (emit_str): Likewise.
258 (emit_ldaxr): Likewise.
259 (emit_stxr): Likewise.
260 (emit_stlr): Likewise.
261 (emit_data_processing_reg): Likewise.
262 (emit_data_processing): Likewise.
263 (emit_add): Likewise.
264 (emit_sub): Likewise.
265 (emit_mov): Likewise.
266 (emit_movk): Likewise.
267 (emit_mov_addr): Likewise.
268 (emit_mrs): Likewise.
269 (emit_msr): Likewise.
270 (emit_sevl): Likewise.
271 (emit_wfe): Likewise.
272 (append_insns): Likewise.
273 (can_encode_int32_in): New helper function.
274 (aarch64_relocate_instruction): New function.
275 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
276 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
277 (struct linux_target_ops): Install aarch64_get_thread_area,
278 aarch64_install_fast_tracepoint_jump_pad and
279 aarch64_get_min_fast_tracepoint_insn_len.
280
787749ea
PL
2812015-09-21 Pierre Langlois <pierre.langlois@arm.com>
282
283 * Makefile.in (aarch64-insn.o): New rule.
284 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
285
9812b2e6
YQ
2862015-09-21 Yao Qi <yao.qi@linaro.org>
287
288 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
289
18fe412b
YQ
2902015-09-21 Yao Qi <yao.qi@linaro.org>
291
292 * tracepoint.c (max_jump_pad_size): Remove.
293
a0cc84cd
YQ
2942015-09-18 Yao Qi <yao.qi@linaro.org>
295
296 * linux-aarch64-low.c: Don't include sys/uio.h.
297 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
298
d78908cf
WW
2992015-09-16 Wei-cheng Wang <cole945@gmail.com>
300
301 * tracepoint.c (eval_result_type): Change prototype.
302 (condition_true_at_tracepoint): Fix argument to compiled_cond.
303
d57e0d50
PA
3042015-09-15 Pedro Alves <palves@redhat.com>
305
306 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
307 Check whether to report exec events instead of checking whether
308 multiprocess is enabled.
309
5a676acc
PA
3102015-09-15 Pedro Alves <palves@redhat.com>
311
312 PR remote/18965
313 * remote-utils.c (prepare_resume_reply): Merge
314 TARGET_WAITKIND_VFORK_DONE switch case with the
315 TARGET_WAITKIND_FORKED case.
316
7c5d0fad
YQ
3172015-09-15 Yao Qi <yao.qi@linaro.org>
318
319 * server.c (handle_query): Check string comparison using
320 "else if" instead of "if".
321
750ce8d1
YQ
3222015-09-15 Yao Qi <yao.qi@linaro.org>
323
324 * server.c (vCont_supported): New global variable.
325 (handle_query): Set vCont_supported to 1 if "vContSupported+"
326 matches. Append ";vContSupported+" to own_buf.
327 (handle_v_requests): Append ";s;S" to own_buf if target supports
328 hardware single step or vCont_supported is false.
329 (capture_main): Set vCont_supported to zero.
330
70b90b91
YQ
3312015-09-15 Yao Qi <yao.qi@linaro.org>
332
333 * linux-low.c (linux_supports_conditional_breakpoints): Rename
334 it to ...
335 (linux_supports_hardware_single_step): ... New function.
336 (linux_target_ops): Update.
337 * lynx-low.c (lynx_target_ops): Set field
338 supports_hardware_single_step to target_can_do_hardware_single_step.
339 * nto-low.c (nto_target_ops): Likewise.
340 * spu-low.c (spu_target_ops): Likewise.
341 * win32-low.c (win32_target_ops): Likewise.
342 * target.c (target_can_do_hardware_single_step): New function.
343 * target.h (struct target_ops) <supports_conditional_breakpoints>:
344 Remove. <supports_hardware_single_step>: New field.
345 (target_supports_conditional_breakpoints): Remove.
346 (target_supports_hardware_single_step): New macro.
347 (target_can_do_hardware_single_step): Declare.
348 * server.c (handle_query): Use target_supports_hardware_single_step
349 instead of target_supports_conditional_breakpoints.
350
ade90bde
YQ
3512015-09-15 Yao Qi <yao.qi@linaro.org>
352
353 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
354 function.
355 (struct linux_target_ops the_low_target): Install
356 aarch64_linux_siginfo_fixup.
357
94585166
DB
3582015-09-11 Don Breazeal <donb@codesourcery.com>
359 Luis Machado <lgustavo@codesourcery.com>
360
361 * linux-low.c (linux_mourn): Static declaration.
362 (linux_arch_setup): Move in front of
363 handle_extended_wait.
364 (linux_arch_setup_thread): New function.
365 (handle_extended_wait): Handle exec events. Call
366 linux_arch_setup_thread. Make event_lwp argument a
367 pointer-to-a-pointer.
368 (check_zombie_leaders): Do not check stopped threads.
369 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
370 (linux_low_filter_event): Add lwp and thread for exec'ing
371 non-leader thread if leader thread has been deleted.
372 Refactor code into linux_arch_setup_thread and call it.
373 Pass child lwp pointer by reference to handle_extended_wait.
374 (linux_wait_for_event_filtered): Update comment.
375 (linux_wait_1): Prevent clobbering exec event status.
376 (linux_supports_exec_events): New function.
377 (linux_target_ops) <supports_exec_events>: Initialize new member.
378 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
379 new member.
380 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
381 * server.c (report_exec_events): New global variable.
382 (handle_query): Handle qSupported query for exec-events feature.
383 (captured_main): Initialize report_exec_events.
384 * server.h (report_exec_events): Declare new global variable.
385 * target.h (struct target_ops) <supports_exec_events>: New
386 member.
387 (target_supports_exec_events): New macro.
388 * win32-low.c (win32_target_ops) <supports_exec_events>:
389 Initialize new member.
390
0568462b
MM
3912015-09-09 Markus Metzger <markus.t.metzger@intel.com>
392
393 * linux-low.c (linux_low_enable_btrace): Remove.
394 (linux_target_ops): Replace linux_low_enable_btrace with
395 linux_enable_btrace.
396
39edd165
YQ
3972015-09-03 Yao Qi <yao.qi@linaro.org>
398
399 * linux-aarch64-low.c (aarch64_insert_point): Call
400 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
401 returns true.
402
1db33b5a
UW
4032015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
404
405 * linux-low.c (check_stopped_by_breakpoint): Use
406 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
407
ab290430
PA
4082015-08-27 Pedro Alves <palves@redhat.com>
409
410 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
411
8d749320
SM
4122015-08-26 Simon Marchi <simon.marchi@ericsson.com>
413
6711b7f8
SM
414 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
415 the XNEW-family equivalent.
8d749320
SM
416 (compile_bytecodes): Likewise.
417 * dll.c (loaded_dll): Likewise.
418 * event-loop.c (append_callback_event): Likewise.
419 (create_file_handler): Likewise.
420 (create_file_event): Likewise.
421 * hostio.c (handle_open): Likewise.
422 * inferiors.c (add_thread): Likewise.
423 (add_process): Likewise.
424 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
425 * linux-arm-low.c (arm_new_process): Likewise.
426 (arm_new_thread): Likewise.
427 * linux-low.c (add_to_pid_list): Likewise.
428 (linux_add_process): Likewise.
429 (handle_extended_wait): Likewise.
430 (add_lwp): Likewise.
431 (enqueue_one_deferred_signal): Likewise.
432 (enqueue_pending_signal): Likewise.
433 (linux_resume_one_lwp_throw): Likewise.
434 (linux_resume_one_thread): Likewise.
435 (linux_read_memory): Likewise.
436 (linux_write_memory): Likewise.
437 * linux-mips-low.c (mips_linux_new_process): Likewise.
438 (mips_linux_new_thread): Likewise.
439 (mips_add_watchpoint): Likewise.
440 * linux-x86-low.c (initialize_low_arch): Likewise.
441 * lynx-low.c (lynx_add_process): Likewise.
442 * mem-break.c (set_raw_breakpoint_at): Likewise.
443 (set_breakpoint): Likewise.
444 (add_condition_to_breakpoint): Likewise.
445 (add_commands_to_breakpoint): Likewise.
446 (clone_agent_expr): Likewise.
447 (clone_one_breakpoint): Likewise.
448 * regcache.c (new_register_cache): Likewise.
449 * remote-utils.c (look_up_one_symbol): Likewise.
450 * server.c (queue_stop_reply): Likewise.
451 (start_inferior): Likewise.
452 (queue_stop_reply_callback): Likewise.
453 (handle_target_event): Likewise.
454 * spu-low.c (fetch_ppc_memory): Likewise.
455 (store_ppc_memory): Likewise.
456 * target.c (set_target_ops): Likewise.
457 * thread-db.c (thread_db_load_search): Likewise.
458 (try_thread_db_load_1): Likewise.
459 * tracepoint.c (add_tracepoint): Likewise.
460 (add_tracepoint_action): Likewise.
461 (create_trace_state_variable): Likewise.
462 (cmd_qtdpsrc): Likewise.
463 (cmd_qtro): Likewise.
464 (add_while_stepping_state): Likewise.
465 * win32-low.c (child_add_thread): Likewise.
466 (get_image_name): Likewise.
467
ed8b7b42
YQ
4682015-08-25 Yao Qi <yao.qi@linaro.org>
469
470 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
471
db3cb7cb
YQ
4722015-08-25 Yao Qi <yao.qi@linaro.org>
473
474 * Makefile.in (aarch64-linux.o): New rule.
475 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
476 srv_tgtobj.
477 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
478 (aarch64_init_debug_reg_state): Make it extern.
479 (aarch64_linux_prepare_to_resume): Remove.
480
f6011a1c
YQ
4812015-08-25 Yao Qi <yao.qi@linaro.org>
482
483 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
484 lwp_arch_private_info and ptid_of_lwp.
485
88e2cf7e
YQ
4862015-08-25 Yao Qi <yao.qi@linaro.org>
487
488 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
489 Find proc_info by find_process_pid. All callers updated.
490
5e35436e
YQ
4912015-08-25 Yao Qi <yao.qi@linaro.org>
492
493 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
494 Remove.
495 (debug_reg_change_callback): Remove.
496 (aarch64_notify_debug_reg_change): Remove.
497
4a8a7965
YQ
4982015-08-25 Yao Qi <yao.qi@linaro.org>
499
500 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
501 Call current_lwp_ptid.
502
32a271ee
YQ
5032015-08-25 Yao Qi <yao.qi@linaro.org>
504
505 * linux-aarch64-low.c (debug_reg_change_callback): Use
506 debug_printf.
507
0d51c8d7
YQ
5082015-08-25 Yao Qi <yao.qi@linaro.org>
509
510 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
511
31a43dd5
YQ
5122015-08-25 Yao Qi <yao.qi@linaro.org>
513
514 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
515
8ee52567
YQ
5162015-08-25 Yao Qi <yao.qi@linaro.org>
517
518 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
519 the code.
520
ff3f0f45
YQ
5212015-08-25 Yao Qi <yao.qi@linaro.org>
522
523 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
524 Remove.
525 (debug_reg_change_callback): Remove argument entry and add argument
526 lwp. Remove local variable thread. Don't print thread id in the
527 debugging output. Don't check whether pid of thread equals to pid.
528 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
529 iterate_over_lwps instead find_inferior.
530
3d40fbb5
PA
5312015-08-24 Pedro Alves <palves@redhat.com>
532
533 * inferiors.c (get_first_process): New function.
534 * inferiors.h (get_first_process): New declaration.
535 * remote-utils.c (read_ptid): Default to the first process in the
536 list, instead of to the current thread's process.
537
438e1e42
PA
5382015-08-24 Pedro Alves <palves@redhat.com>
539
540 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
541 * event-loop.c: Likewise.
542 * remote-utils.c: Likewise.
543 * tracepoint.c: Likewise.
544
a8c6d4fc
PA
5452015-08-24 Pedro Alves <palves@redhat.com>
546
547 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
548 ptid_get_lwp.
549
99b0bb12
PA
5502015-08-21 Pedro Alves <palves@redhat.com>
551
552 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
553 instead of literal 1.
554
f8904751
PA
5552015-08-21 Pedro Alves <palves@redhat.com>
556
557 * tdesc.c (default_description): Explicitly zero-initialize.
558
465a859e
PA
5592015-08-21 Pedro Alves <palves@redhat.com>
560
561 PR gdb/18749
562 * inferiors.c (remove_thread): Discard any pending stop reply for
563 this thread.
564 * server.c (remove_all_on_match_pid): Rename to ...
565 (remove_all_on_match_ptid): ... this. Work with a filter ptid
566 instead of a pid.
567 (discard_queued_stop_replies): Change parameter to a ptid. Now
568 extern.
569 (handle_v_kill, kill_inferior_callback, captured_main)
570 (process_serial_event): Adjust.
571 * server.h (discard_queued_stop_replies): Declare.
572
f0db101d
PA
5732015-08-21 Pedro Alves <palves@redhat.com>
574
575 * linux-low.c (wait_for_sigstop): Always switch to no thread
576 selected if the previously current thread dies.
577 * lynx-low.c (lynx_request_interrupt): Use the first thread's
578 process instead of the current thread's.
579 * remote-utils.c (input_interrupt): Don't check if there's no
580 current thread.
581 * server.c (gdb_read_memory, gdb_write_memory): If setting the
582 current thread to the general thread fails, error out.
583 (handle_qxfer_auxv, handle_qxfer_libraries)
584 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
585 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
586 (handle_query): Check if there's a thread selected instead of
587 checking whether there's any thread in the thread list.
588 (handle_qxfer_threads, handle_qxfer_btrace)
589 (handle_qxfer_btrace_conf): Don't error out early if there's no
590 thread in the thread list.
591 (handle_v_cont, myresume): Don't set the current thread to the
592 continue thread.
593 (process_serial_event) <Hg handling>: Also set thread_id if the
594 previous general thread is still alive.
595 (process_serial_event) <g/G handling>: If setting the current
596 thread to the general thread fails, error out.
597 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
598 thread's lwp instead of the current thread's.
599 * target.c (set_desired_thread): If the desired thread was not
600 found, leave the current thread pointing to NULL. Return an int
601 (boolean) indicating success.
602 * target.h (set_desired_thread): Change return type to int.
603
40045d91
MF
6042015-08-20 Max Filippov <jcmvbkbc@gmail.com>
605
606 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
607 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
608 #includes.
609 (ps_get_thread_area): New function.
610
45face3b
GB
6112015-08-19 Gary Benson <gbenson@redhat.com>
612
613 * hostio.c (handle_pread): Do not attempt to read more data
614 than hostio_reply_with_data can fit in a packet.
615
16d5f642
JB
6162015-08-18 Joel Brobecker <brobecker@adacore.com>
617
618 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
619
a738da3a
MF
6202015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
621
622 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
623
33ebda9d
PA
6242015-08-06 Pedro Alves <palves@redhat.com>
625
626 * tracepoint.c (expr_eval_result): Now an int.
627
a44892be
PA
6282015-08-06 Pedro Alves <palves@redhat.com>
629
630 * gdbthread.h (struct regcache): Forward declare.
631 (struct thread_info) <regcache_data>: Now a struct regcache
632 pointer.
633 * inferiors.c (inferior_regcache_data)
634 (set_inferior_regcache_data): Now work with struct regcache
635 pointers.
636 * inferiors.h (struct regcache): Forward declare.
637 (inferior_regcache_data, set_inferior_regcache_data): Now work
638 with struct regcache pointers.
639 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
640 (free_register_cache_thread): Remove struct regcache pointer
641 casts.
642
608a1e46
PA
6432015-08-06 Pedro Alves <palves@redhat.com>
644
645 * server.c (captured_main): On error, print the exception message
646 to stderr, and if run_once is set, throw a quit.
647
f0ce0d3a
PA
6482015-08-06 Pedro Alves <palves@redhat.com>
649
650 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
651 the current thread.
652
bf47e248
PA
6532015-08-06 Pedro Alves <palves@redhat.com>
654
655 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
656 reading beyond the passed in buffer length.
657
b6b9ffcc
PL
6582015-08-06 Pierre Langlois <pierre.langlois@arm.com>
659
660 * tracepoint.c (symbol_list) <required>: Remove.
661
863d01bd
PA
6622015-08-06 Pedro Alves <palves@redhat.com>
663
664 * linux-low.c (handle_extended_wait): Set the fork child's suspend
665 count if stopping and suspending threads.
666 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
667 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
668 (linux_detach): Complete an ongoing step-over.
669 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
670 throughout.
671 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
672 (linux_wait_1): If passing a signal to the inferior after
673 finishing a step-over, unsuspend and re-resume all lwps. If we
674 see a single-step event but the thread should be continuing, don't
675 pass the trap to gdb.
676 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
677 internal_error instead of gdb_assert.
678 (enqueue_pending_signal): New function.
679 (check_ptrace_stopped_lwp_gone): Add debug output.
680 (start_step_over): Use internal_error instead of gdb_assert.
681 (complete_ongoing_step_over): New function.
682 (linux_resume_one_thread): Don't resume a suspended thread.
683 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
684 it stepping.
685
00db26fa
PA
6862015-08-06 Pedro Alves <palves@redhat.com>
687
688 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
689 (linux_thread_alive): Use lwp_is_marked_dead.
690 (extended_event_reported): Delete.
691 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
692 instead of extended_event_reported.
693 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
694 as well.
695 (lwp_is_marked_dead): New function.
696 (lwp_running): Use lwp_is_marked_dead.
697 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
698 comment.
699
ad071a30
PA
7002015-08-06 Pedro Alves <palves@redhat.com>
701
702 * linux-low.c (linux_wait_1): Move fork event output out of the
703 !report_to_gdb check. Pass event_child->waitstatus to
704 target_waitstatus_to_string instead of ourstatus.
705
524b57e6
YQ
7062015-08-04 Yao Qi <yao.qi@linaro.org>
707
708 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
709 if current_thread is 32 bit.
710
6085d6f6
YQ
7112015-08-04 Yao Qi <yao.qi@linaro.org>
712
713 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
714 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
715 * server.c (extended_protocol): Remove "static".
716 * server.h (extended_protocol): Declare it.
717
8a7e4587
YQ
7182015-08-04 Yao Qi <yao.qi@linaro.org>
719
720 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
721 both aarch64 and aarch32.
722 (aarch64_set_pc): Likewise.
723
3b53ae99
YQ
7242015-08-04 Yao Qi <yao.qi@linaro.org>
725
726 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
727 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
728 arm-with-neon.xml to srv_xmlfiles.
729 * linux-aarch64-low.c: Include linux-aarch32-low.h.
730 (is_64bit_tdesc): New function.
731 (aarch64_linux_read_description): New function.
732 (aarch64_arch_setup): Call aarch64_linux_read_description.
733 (regs_info): Rename to regs_info_aarch64.
734 (aarch64_regs_info): Return right regs_info.
735 (initialize_low_arch): Call initialize_low_arch_aarch32.
736
bd9e6534
YQ
7372015-08-04 Yao Qi <yao.qi@linaro.org>
738
739 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
740 * linux-aarch32-low.c: New file.
741 * linux-aarch32-low.h: New file.
742 * linux-arm-low.c (arm_fill_gregset): Move it to
743 linux-aarch32-low.c.
744 (arm_store_gregset): Likewise.
745 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
746 (arm_store_vfpregset): Call arm_store_vfpregset_num.
747 (arm_arch_setup): Check if PTRACE_GETREGSET works.
748 (regs_info): Rename to regs_info_arm.
749 (arm_regs_info): Return regs_info_aarch32 if
750 have_ptrace_getregset is 1 and target description is
751 arm_with_neon or arm_with_vfpv3.
752 (initialize_low_arch): Don't call init_registers_arm_with_neon.
753 Call initialize_low_arch_aarch32 instead.
754
ded48a5e
YQ
7552015-08-04 Yao Qi <yao.qi@linaro.org>
756
757 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
758 * linux-low.c: ... here.
759 * linux-low.h (have_ptrace_getregset): Declare it.
760
96e9210f
PA
7612015-08-04 Pedro Alves <palves@redhat.com>
762
763 * thread-db.c (struct thread_db): Use new typedefs.
764 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
765 CHK calls.
766 (disable_thread_event_reporting): Cast result of dlsym to
767 destination function pointer type.
768 (thread_db_mourn): Use td_ta_delete_ftype.
769
af60a1ef
SL
7702015-08-03 Sandra Loosemore <sandra@codesourcery.com>
771
772 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
773 arch variant.
774 (CDX_BREAKPOINT): Define for R2.
775 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
776 (the_low_target): Add comments.
777
e8b41681
YQ
7782015-07-30 Yao Qi <yao.qi@linaro.org>
779
780 * linux-arm-low.c (arm_hwcap): Remove it.
781 (arm_read_description): New local variable arm_hwcap. Don't
782 set arm_hwcap to zero.
783
89abb039
YQ
7842015-07-30 Yao Qi <yao.qi@linaro.org>
785
786 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
787 Use regcache->tdesc instead.
788 (arm_store_wmmxregset): Likewise.
789 (arm_fill_vfpregset): Likewise.
790 (arm_store_vfpregset): Likewise.
791
deca266c
YQ
7922015-07-30 Yao Qi <yao.qi@linaro.org>
793
794 * linux-arm-low.c: Include arch/arm.h.
795 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
796 (arm_store_gregset): Likewise.
797
aa58a496
SM
7982015-07-29 Simon Marchi <simon.marchi@ericsson.com>
799
800 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
801 ptrace's 4th parameter.
802
50904b25
YQ
8032015-07-27 Yao Qi <yao.qi@linaro.org>
804
805 * configure.srv (case aarch64*-*-linux*): Don't set
806 srv_linux_usrregs.
807
5826e159
PA
8082015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
809
810 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
811 sys/ptrace.h.
812 * linux-arm-low.c: Likewise.
813 * linux-cris-low.c: Likewise.
814 * linux-crisv32-low.c: Likewise.
815 * linux-low.c: Likewise.
816 * linux-m68k-low.c: Likewise.
817 * linux-mips-low.c: Likewise.
818 * linux-nios2-low.c: Likewise.
819 * linux-s390-low.c: Likewise.
820 * linux-sparc-low.c: Likewise.
821 * linux-tic6x-low.c: Likewise.
822 * linux-tile-low.c: Likewise.
823 * linux-x86-low.c: Likewise.
824
54019719
PA
8252015-07-24 Pedro Alves <palves@redhat.com>
826
827 * config.in: Regenerate.
828 * configure: Regenerate.
829
eb7aa561
PA
8302015-07-24 Pedro Alves <palves@redhat.com>
831
832 * acinclude.m4: Include ../ptrace.m4.
833 * configure.ac: Call GDB_AC_PTRACE.
834 * config.in, configure: Regenerate.
835
55d7b841
YQ
8362015-07-24 Yao Qi <yao.qi@linaro.org>
837
838 * linux-low.c (linux_create_inferior): Remove setting to
839 proc->priv->new_inferior.
840 (linux_attach): Likewise.
841 (linux_low_filter_event): Likewise.
842 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
843
c06cbd92
YQ
8442015-07-24 Yao Qi <yao.qi@linaro.org>
845
846 * linux-low.c (linux_arch_setup): New function.
847 (linux_low_filter_event): If proc->tdesc is NULL and
848 proc->attached is true, call the_low_target.arch_setup.
849 Otherwise, keep status pending, and return.
850 (linux_resume_one_lwp_throw): Don't call get_pc if
851 thread->while_stepping isn't NULL. Don't call
852 get_thread_regcache if proc->tdesc is NULL.
853 (need_step_over_p): Return 0 if proc->tdesc is NULL.
854 (linux_target_ops): Install arch_setup.
855 * server.c (start_inferior): Call the_target->arch_setup.
856 * target.h (struct target_ops) <arch_setup>: New field.
857 (target_arch_setup): New marco.
858 * lynx-low.c (lynx_target_ops): Update.
859 * nto-low.c (nto_target_ops): Update.
860 * spu-low.c (spu_target_ops): Update.
861 * win32-low.c (win32_target_ops): Update.
862
5ae3ebba
YQ
8632015-07-24 Yao Qi <yao.qi@linaro.org>
864
865 * linux-low.c (linux_add_process): Don't set
866 proc->priv->new_inferior.
867 (linux_create_inferior): Set proc->priv->new_inferior to 1.
868 (linux_attach): Likewise.
869
eb97750b
YQ
8702015-07-24 Yao Qi <yao.qi@linaro.org>
871
872 * server.c (start_inferior): Code refactor.
873
51aee833
YQ
8742015-07-24 Yao Qi <yao.qi@linaro.org>
875
876 * server.c (process_serial_event): Set general_thread.
877
af1b22f3
YQ
8782015-07-21 Yao Qi <yao.qi@linaro.org>
879
880 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
881 aarch64_linux_get_debug_reg_capacity.
882
554717a3
YQ
8832015-07-17 Yao Qi <yao.qi@linaro.org>
884
885 * Makefile.in (aarch64-linux-hw-point.o): New rule.
886 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
887 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
888 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
889 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
890 (AARCH64_HWP_ALIGNMENT): Likewise.
891 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
892 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
893 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
894 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
895 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
896 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
897 (struct aarch64_debug_reg_state): Likewise.
898 (struct arch_lwp_info): Likewise.
899 (aarch64_align_watchpoint): Likewise.
900 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
901 (aarch64_watchpoint_length): Likewise.
902 (aarch64_point_encode_ctrl_reg): Likewise
903 (aarch64_point_is_aligned): Likewise.
904 (aarch64_align_watchpoint): Likewise.
905 (aarch64_linux_set_debug_regs):
906 (aarch64_dr_state_insert_one_point): Likewise.
907 (aarch64_dr_state_remove_one_point): Likewise.
908 (aarch64_handle_breakpoint): Likewise.
909 (aarch64_handle_aligned_watchpoint): Likewise.
910 (aarch64_handle_unaligned_watchpoint): Likewise.
911 (aarch64_handle_watchpoint): Likewise.
912
c67ca4de
YQ
9132015-07-17 Yao Qi <yao.qi@linaro.org>
914
915 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
916 and don't aarch64_get_debug_reg_state. All callers update.
917 (aarch64_handle_aligned_watchpoint): Likewise.
918 (aarch64_handle_unaligned_watchpoint): Likewise.
919 (aarch64_handle_watchpoint): Likewise.
920 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
921 (aarch64_remove_point): Likewise.
922
25abf979
YQ
9232015-07-17 Yao Qi <yao.qi@linaro.org>
924
925 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
926 debug_printf.
927 (aarch64_handle_unaligned_watchpoint): Likewise.
928
db1ff28b
JK
9292015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
930
931 Revert the previous 3 commits:
932 Move gdb_regex* to common/
933 Move linux_find_memory_regions_full & co.
934 gdbserver build-id attribute generator
935
700ca40f
JK
9362015-07-15 Aleksandar Ristovski <aristovski@qnx.com
937 Jan Kratochvil <jan.kratochvil@redhat.com>
938
939 gdbserver build-id attribute generator.
940 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
941 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
942 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
943 (find_phdr): New.
944 (get_dynamic): Use find_pdhr to traverse program headers.
945 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
946 (compare_mapping_entry_range, struct find_memory_region_callback_data)
947 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
948 (get_hex_build_id): New.
949 (linux_qxfer_libraries_svr4): Add optional build-id attribute
950 to reply XML document.
951
9904185c
JK
9522015-07-15 Aleksandar Ristovski <aristovski@qnx.com
953 Jan Kratochvil <jan.kratochvil@redhat.com>
954
955 * target.c: Include target/target-utils.h and fcntl.h.
956 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
957 (target_fileio_read_stralloc): New functions.
958
6e5b4429
JK
9592015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
960
961 * Makefile.in (OBS): Add gdb_regex.o.
962 (gdb_regex.o): New.
963 * config.in: Rebuilt.
964 * configure: Rebuilt.
965
ddc98fbf
JK
9662015-07-15 Aleksandar Ristovski <aristovski@qnx.com
967 Jan Kratochvil <jan.kratochvil@redhat.com>
968
969 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
970 * Makefile.in (OBS): Add target-utils.o.
971 (linux-maps.o, target-utils.o): New.
972 * configure.srv (srv_linux_obj): Add linux-maps.o.
973
e57bb7a0
PL
9742015-07-15 Pierre Langlois <pierre.langlois@arm.com>
975
976 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
977 function, return 1.
978 (the_low_target): Install it.
979
586b02a9
PA
9802015-07-14 Pedro Alves <palves@redhat.com>
981
982 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
983 Instead, ignore ECHILD, and throw an error for other errnos.
984
58c1b36c
PA
9852015-07-10 Pedro Alves <palves@redhat.com>
986
987 * event-loop.c (struct callback_event) <data>: Change type to
988 gdb_client_data instance instead of gdb_client_data pointer.
989 (append_callback_event): Adjust.
990
421530db
PL
9912015-07-10 Pierre Langlois <pierre.langlois@arm.com>
992
993 * linux-aarch64-low.c: Add comments for each linux_target_ops
994 method. Remove comments already covered in target_ops and
995 linux_target_ops definitions.
996 (the_low_target): Add comments for each unimplemented method.
997
c2d65f38
YQ
9982015-07-09 Yao Qi <yao.qi@linaro.org>
999
1000 * linux-aarch64-low.c (aarch64_regmap): Remove.
1001 (aarch64_usrregs_info): Remove.
1002 (regs_info): Set field usrregs to NULL.
1003
b20a6524
MM
10042015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1005
1006 * linux-low.c: Include "rsp-low.h"
1007 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1008 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1009 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1010 (handle_btrace_enable_pt): New.
1011 (handle_btrace_general_set): Support "pt".
1012 (handle_btrace_conf_general_set): Support "pt:size".
1013
96c97461
PL
10142015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1015
1016 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1017 Z_PACKET_SW_BP.
1018
37d66942
PL
10192015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1020
1021 * linux-aarch64-low.c: Remove comment about endianness.
1022 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1023 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1024 memcmp.
1025
dc06243f
GB
10262015-06-24 Gary Benson <gbenson@redhat.com>
1027
1028 * linux-i386-ipa.c (stdint.h): Do not include.
1029 * lynx-i386-low.c (stdint.h): Likewise.
1030 * lynx-ppc-low.c (stdint.h): Likewise.
1031 * mem-break.c (stdint.h): Likewise.
1032 * thread-db.c (stdint.h): Likewise.
1033 * tracepoint.c (stdint.h): Likewise.
1034 * win32-low.c (stdint.h): Likewise.
1035
124e13d9
SM
10362015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1037
1038 * server.c (write_qxfer_response): Update call to
1039 remote_escape_output.
1040
909c2cda
JK
10412015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1042 Jan Kratochvil <jan.kratochvil@redhat.com>
1043
1044 Merge multiple hex conversions.
1045 * gdbreplay.c (tohex): Rename to 'fromhex'.
1046 (logchar): Use fromhex.
1047
24c05f46
JK
10482015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1049
1050 * server.c (handle_qxfer_libraries): Set `version' attribute for
1051 <library-list>.
1052
14d2069a
GB
10532015-06-10 Gary Benson <gbenson@redhat.com>
1054
1055 * target.h (struct target_ops) <multifs_open>: New field.
1056 <multifs_unlink>: Likewise.
1057 <multifs_readlink>: Likewise.
1058 * linux-low.c (nat/linux-namespaces.h): New include.
1059 (linux_target_ops): Initialize the_target->multifs_open,
1060 the_target->multifs_unlink and the_target->multifs_readlink.
1061 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1062 * hostio.c (hostio_fs_pid): New static variable.
1063 (hostio_handle_new_gdb_connection): New function.
1064 (handle_setfs): Likewise.
1065 (handle_open): Use the_target->multifs_open as appropriate.
1066 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1067 (handle_readlink): Use the_target->multifs_readlink as
1068 appropriate.
1069 (handle_vFile): Handle vFile:setfs packets.
1070 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1071 after target_handle_new_gdb_connection.
1072
4b8b5e72
GB
10732015-06-10 Gary Benson <gbenson@redhat.com>
1074
1075 * configure.ac (AC_CHECK_FUNCS): Add setns.
1076 * config.in: Regenerate.
1077 * configure: Likewise.
1078 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1079 (linux-namespaces.o): New rule.
1080 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1081
3ac2e371
GB
10822015-06-09 Gary Benson <gbenson@redhat.com>
1083
1084 * hostio.c (handle_open): Process mode argument with
1085 fileio_to_host_mode.
1086
ca9b78ce
YQ
10872015-06-01 Yao Qi <yao.qi@linaro.org>
1088
1089 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1090 * linux-x86-low.c: Likewise.
1091
bfacd19d
DB
10922015-05-28 Don Breazeal <donb@codesourcery.com>
1093
1094 * linux-low.c (handle_extended_wait): Initialize
1095 thread_info.last_resume_kind for new fork children.
1096
452003ef
PA
10972015-05-15 Pedro Alves <palves@redhat.com>
1098
1099 * target.h (target_handle_new_gdb_connection): Rewrite using if
1100 wrapped in do/while.
1101
1041a03c
JB
11022015-05-14 Joel Brobecker <brobecker@adacore.com>
1103
1104 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1105 * configure, config.in: Regenerate.
1106 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1107 Declare typedef.
1108
c269dbdb
DB
11092015-05-12 Don Breazeal <donb@codesourcery.com>
1110
1111 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1112 PTRACE_EVENT_VFORK_DONE.
1113 (linux_low_ptrace_options, extended_event_reported): Add vfork
1114 events.
1115 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1116 and "vforkdone" for RSP 'T' Stop Reply Packet.
1117 * server.h (report_vfork_events): Declare
1118 global variable.
1119
3a8a0396
DB
11202015-05-12 Don Breazeal <donb@codesourcery.com>
1121
1122 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1123 (the_low_target) <new_fork>: Initialize new member.
1124 * linux-arm-low.c (arm_new_fork): New function.
1125 (the_low_target) <new_fork>: Initialize new member.
1126 * linux-low.c (handle_extended_wait): Call new target function
1127 new_fork.
1128 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1129 * linux-mips-low.c (mips_add_watchpoint): New function
1130 extracted from mips_insert_point.
1131 (the_low_target) <new_fork>: Initialize new member.
1132 (mips_linux_new_fork): New function.
1133 (mips_insert_point): Call mips_add_watchpoint.
1134 * linux-x86-low.c (x86_linux_new_fork): New function.
1135 (the_low_target) <new_fork>: Initialize new member.
1136
de0d863e
DB
11372015-05-12 Don Breazeal <donb@codesourcery.com>
1138
1139 * linux-low.c (handle_extended_wait): Implement return value,
1140 rename argument 'event_child' to 'event_lwp', handle
1141 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1142 (linux_low_ptrace_options): New function.
1143 (linux_low_filter_event): Call linux_low_ptrace_options,
1144 use different argument fo linux_enable_event_reporting,
1145 use return value from handle_extended_wait.
1146 (extended_event_reported): New function.
1147 (linux_wait_1): Call extended_event_reported and set
1148 status to report fork events.
1149 (linux_write_memory): Add pid to debug message.
1150 (reset_lwp_ptrace_options_callback): New function.
1151 (linux_handle_new_gdb_connection): New function.
1152 (linux_target_ops): Initialize new structure member.
1153 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1154 * lynx-low.c: Initialize new structure member.
1155 * remote-utils.c (prepare_resume_reply): Implement stop reason
1156 "fork" for "T" stop message.
1157 * server.c (handle_query): Call handle_new_gdb_connection.
1158 * server.h (report_fork_events): Declare global flag.
1159 * target.h (struct target_ops) <handle_new_gdb_connection>:
1160 New member.
1161 (target_handle_new_gdb_connection): New macro.
1162 * win32-low.c: Initialize new structure member.
1163
ddcbc397
DB
11642015-05-12 Don Breazeal <donb@codesourcery.com>
1165
1166 * mem-break.c (APPEND_TO_LIST): Define macro.
1167 (clone_agent_expr): New function.
1168 (clone_one_breakpoint): New function.
1169 (clone_all_breakpoints): New function.
1170 * mem-break.h: Declare new functions.
1171
89245bc0
DB
11722015-05-12 Don Breazeal <donb@codesourcery.com>
1173
1174 * linux-low.c (linux_supports_fork_events): New function.
1175 (linux_supports_vfork_events): New function.
1176 (linux_target_ops): Initialize new structure members.
1177 (initialize_low): Call linux_check_ptrace_features.
1178 * lynx-low.c (lynx_target_ops): Initialize new structure
1179 members.
1180 * server.c (report_fork_events, report_vfork_events):
1181 New global flags.
1182 (handle_query): Add new features to qSupported packet and
1183 response.
1184 (captured_main): Initialize new global variables.
1185 * target.h (struct target_ops) <supports_fork_events>:
1186 New member.
1187 <supports_vfork_events>: New member.
1188 (target_supports_fork_events): New macro.
1189 (target_supports_vfork_events): New macro.
1190 * win32-low.c (win32_target_ops): Initialize new structure
1191 members.
1192
835205d0
GB
11932015-05-12 Gary Benson <gbenson@redhat.com>
1194
1195 * server.c (handle_qxfer_exec_file): Use current process
1196 if annex is empty.
1197
21e94bd9
SL
11982015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1199
1200 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1201 Remove HAVE_PTRACE_GETREGS conditionals.
1202 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1203 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1204
45614f15
YQ
12052015-05-08 Yao Qi <yao.qi@linaro.org>
1206
1207 * linux-low.c (linux_supports_conditional_breakpoints): New
1208 function.
1209 (linux_target_ops): Install new target method.
1210 * lynx-low.c (lynx_target_ops): Install NULL hook for
1211 supports_conditional_breakpoints.
1212 * nto-low.c (nto_target_ops): Likewise.
1213 * spu-low.c (spu_target_ops): Likewise.
1214 * win32-low.c (win32_target_ops): Likewise.
1215 * server.c (handle_query): Check
1216 target_supports_conditional_breakpoints.
1217 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1218 New field.
1219 (target_supports_conditional_breakpoints): New macro.
1220
80ad801e
PA
12212015-05-06 Pedro Alves <palves@redhat.com>
1222
1223 PR server/18081
1224 * server.c (start_inferior): If the process exits, mourn it.
1225
819843c7
GB
12262015-04-21 Gary Benson <gbenson@redhat.com>
1227
1228 * hostio.c (fileio_open_flags_to_host): Factored out to
1229 fileio_to_host_openflags in common/fileio.c. Single use
1230 updated.
1231
a2d5a9d7
MF
12322015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1233
1234 * linux-xtensa-low.c (xtensa_fill_gregset)
1235 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1236 XCHAL_HAVE_LOOP.
1237
deb44829
MF
12382015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1239
1240 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1241 (regs_info): Replace usrregs pointer with NULL.
1242
e57f1de3
GB
12432015-04-17 Gary Benson <gbenson@redhat.com>
1244
1245 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1246 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1247 * server.c (handle_qxfer_exec_file): New function.
1248 (qxfer_packets): Add exec-file entry.
1249 (handle_query): Report qXfer:exec-file:read as supported packet.
1250
62828379
RN
12512015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1252
1253 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1254
b88bb450
GB
12552015-04-09 Gary Benson <gbenson@redhat.com>
1256
1257 * hostio-errno.c (errno_to_fileio_error): Remove function.
1258 Update caller to use remote_fileio_to_fio_error.
1259
c8f4bfdd
YQ
12602015-04-09 Yao Qi <yao.qi@linaro.org>
1261
1262 * linux-low.c (linux_insert_point): Call
1263 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1264 (linux_remove_point): Call remove_memory_breakpoint if type is
1265 raw_bkpt_type_sw.
1266 * linux-x86-low.c (x86_insert_point): Don't call
1267 insert_memory_breakpoint.
1268 (x86_remove_point): Don't call remove_memory_breakpoint.
1269
41f98f02
PA
12702015-04-01 Pedro Alves <palves@redhat.com>
1271 Cleber Rosa <crosa@redhat.com>
1272
1273 * server.c (gdbserver_usage): Reorganize and extend the usage
1274 message.
1275
2bf6fb9d
PA
12762015-03-24 Pedro Alves <palves@redhat.com>
1277
1278 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1279 output. Also dump TRAP_TRACE.
1280 (linux_low_filter_event): In debug output, distinguish a
1281 resume_stop SIGSTOP from a delayed SIGSTOP.
1282
369f6daa
GB
12832015-03-24 Gary Benson <gbenson@redhat.com>
1284
1285 * linux-x86-low.c (x86_linux_new_thread): Moved to
1286 nat/x86-linux.c.
1287 (x86_linux_prepare_to_resume): Likewise.
1288
8e5d4070
GB
12892015-03-24 Gary Benson <gbenson@redhat.com>
1290
1291 * Makefile.in (x86-linux-dregs.o): New rule.
1292 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1293 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1294 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1295 (x86_linux_dr_get): Likewise.
1296 (x86_linux_dr_set): Likewise.
1297 (update_debug_registers_callback): Likewise.
1298 (x86_linux_dr_set_addr): Likewise.
1299 (x86_linux_dr_get_addr): Likewise.
1300 (x86_linux_dr_set_control): Likewise.
1301 (x86_linux_dr_get_control): Likewise.
1302 (x86_linux_dr_get_status): Likewise.
1303 (x86_linux_update_debug_registers): Likewise.
1304
2b95d440
GB
13052015-03-24 Gary Benson <gbenson@redhat.com>
1306
1307 * linux-x86-low.c (x86_linux_update_debug_registers):
1308 New function, factored out from...
1309 (x86_linux_prepare_to_resume): ...this.
1310
14b0bc68
GB
13112015-03-24 Gary Benson <gbenson@redhat.com>
1312
1313 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1314 (x86_linux_dr_set): Likewise.
1315 (update_debug_registers_callback): Likewise.
1316 (x86_linux_dr_set_addr): Likewise.
1317 (x86_linux_dr_get_addr): Likewise.
1318 (x86_linux_dr_set_control): Likewise.
1319 (x86_linux_dr_get_control): Likewise.
1320 (x86_linux_dr_get_status): Likewise.
1321 (x86_linux_prepare_to_resume): Likewise.
1322
5dfe6ca8
GB
13232015-03-24 Gary Benson <gbenson@redhat.com>
1324
1325 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1326 Use perror_with_name. Pass string through gettext.
1327 (x86_linux_dr_set): Likewise.
1328
d33472ad
GB
13292015-03-24 Gary Benson <gbenson@redhat.com>
1330
1331 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1332 (x86_linux_dr_set_addr): ...this.
1333 (x86_dr_low_get_addr): Rename to...
1334 (x86_linux_dr_get_addr): ...this.
1335 (x86_dr_low_set_control): Rename to...
1336 (x86_linux_dr_set_control): ...this.
1337 (x86_dr_low_get_control): Rename to...
1338 (x86_linux_dr_get_control): ...this.
1339 (x86_dr_low_get_status): Rename to...
1340 (x86_linux_dr_get_status): ...this.
1341 (x86_dr_low): Update with new function names.
1342
4b134ca1
GB
13432015-03-24 Gary Benson <gbenson@redhat.com>
1344
1345 * Makefile.in (x86-linux.o): New rule.
1346 * configure.srv: Add x86-linux.o to relevant targets.
1347 * linux-low.c (lwp_set_arch_private_info): New function.
1348 (lwp_arch_private_info): Likewise.
1349 * linux-x86-low.c: Include nat/x86-linux.h.
1350 (arch_lwp_info): Removed structure.
1351 (update_debug_registers_callback):
1352 Use lwp_set_debug_registers_changed.
1353 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1354 and lwp_set_debug_registers_changed.
1355 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1356
34c703da
GB
13572015-03-24 Gary Benson <gbenson@redhat.com>
1358
1359 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1360 * linux-arm-low.c (arm_new_thread): Likewise.
1361 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1362 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1363 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1364 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1365
cff068da
GB
13662015-03-24 Gary Benson <gbenson@redhat.com>
1367
1368 * linux-low.c (ptid_of_lwp): New function.
1369 (lwp_is_stopped): Likewise.
1370 (lwp_stop_reason): Likewise.
1371 * linux-x86-low.c (update_debug_registers_callback):
1372 Use lwp_is_stopped.
1373 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1374 lwp_stop_reason.
1375
b2f7c7e8
GB
13762015-03-24 Gary Benson <gbenson@redhat.com>
1377
1378 * linux-low.h (linux_stop_lwp): Remove declaration.
1379
6d4ee8c6
GB
13802015-03-24 Gary Benson <gbenson@redhat.com>
1381
1382 * linux-low.h: Include nat/linux-nat.h.
1383 * linux-low.c (iterate_over_lwps_args): New structure.
1384 (iterate_over_lwps_filter): New function.
1385 (iterate_over_lwps): Likewise.
1386 * linux-x86-low.c (update_debug_registers_callback):
1387 Update signature to what iterate_over_lwps expects.
1388 Remove PID check that iterate_over_lwps now performs.
1389 (x86_dr_low_set_addr): Use iterate_over_lwps.
1390 (x86_dr_low_set_control): Likewise.
1391
70a0bb6b
GB
13922015-03-24 Gary Benson <gbenson@redhat.com>
1393
1394 * linux-x86-low.c (x86_debug_reg_state): New function.
1395 (x86_linux_prepare_to_resume): Use the above.
1396
7b669087
GB
13972015-03-24 Gary Benson <gbenson@redhat.com>
1398
1399 * linux-low.c (current_lwp_ptid): New function.
1400 * linux-x86-low.c: Include nat/linux-nat.h.
1401 (x86_dr_low_get_addr): Use current_lwp_ptid.
1402 (x86_dr_low_get_control): Likewise.
1403 (x86_dr_low_get_status): Likewise.
1404
eef49a3d
PA
14052015-03-20 Pedro Alves <palves@redhat.com>
1406
1407 * tracepoint.c (cmd_qtstatus): Make "str" const.
1408
b2333d22
PA
14092015-03-20 Pedro Alves <palves@redhat.com>
1410
1411 * server.c (handle_general_set): Make "req_str" const.
1412
23f238d3
PA
14132015-03-19 Pedro Alves <palves@redhat.com>
1414
1415 * linux-low.c (linux_resume_one_lwp): Rename to ...
1416 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1417 instead call perror_with_name.
1418 (check_ptrace_stopped_lwp_gone): New function.
1419 (linux_resume_one_lwp): Reimplement as wrapper around
1420 linux_resume_one_lwp_throw that swallows errors if the LWP is
1421 gone.
1422
91baf43f
PA
14232015-03-19 Pedro Alves <palves@redhat.com>
1424
1425 * linux-low.c (count_events_callback, select_event_lwp_callback):
1426 No longer check whether the thread has resume_stop as last resume
1427 kind.
1428
8bf3b159
PA
14292015-03-19 Pedro Alves <palves@redhat.com>
1430
1431 * linux-low.c (count_events_callback, select_event_lwp_callback):
1432 Use the lwp's status_pending_p field, not the thread's.
1433
b90fc188
PA
14342015-03-19 Pedro Alves <palves@redhat.com>
1435
1436 * linux-low.c (select_event_lwp_callback): Update comments to
1437 no longer mention SIGTRAP.
1438
464b0089
GB
14392015-03-18 Gary Benson <gbenson@redhat.com>
1440
1441 * server.c (handle_query): Do not report vFile:fstat as supported.
1442
aa9e327f
GB
14432015-03-11 Gary Benson <gbenson@redhat.com>
1444
1445 * hostio.c (sys/types.h): New include.
1446 (sys/stat.h): Likewise.
1447 (common-remote-fileio.h): Likewise.
1448 (handle_fstat): New function.
1449 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1450
791c0056
GB
14512015-03-11 Gary Benson <gbenson@redhat.com>
1452
1453 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1454 struct stat.st_blocks and struct stat.st_blksize.
1455 * configure: Regenerate.
1456 * config.in: Likewise.
1457 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1458 (OBS): Add common-remote-fileio.o.
1459 (common-remote-fileio.o): New rule.
1460
9a9df970
PA
14612015-03-09 Pedro Alves <palves@redhat.com>
1462
1463 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1464 'struct sockaddr' pointer in 'accept' call.
1465
9eb1356e
PA
14662015-03-09 Pedro Alves <palves@redhat.com>
1467
1468 Revert:
1469 2015-03-07 Pedro Alves <palves@redhat.com>
1470 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1471 or <winsock2.h> here. Instead include "gdb_socket.h".
1472 (remote_open): Use union gdb_sockaddr_u.
1473 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1474 or <winsock2.h> here. Instead include "gdb_socket.h".
1475 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1476 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1477 or <sys/un.h>.
1478 (init_named_socket, gdb_agent_helper_thread): Use union
1479 gdb_sockaddr_u.
1480
aac331e4
PA
14812015-03-07 Pedro Alves <palves@redhat.com>
1482
1483 * configure.ac (build_warnings): Move
1484 -Wdeclaration-after-statement to the C-specific set.
1485 * configure: Regenerate.
1486
366c75fc
PA
14872015-03-07 Pedro Alves <palves@redhat.com>
1488
1489 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1490 or <winsock2.h> here. Instead include "gdb_socket.h".
1491 (remote_open): Use union gdb_sockaddr_u.
1492 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1493 or <winsock2.h> here. Instead include "gdb_socket.h".
1494 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1495 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1496 or <sys/un.h>.
1497 (init_named_socket, gdb_agent_helper_thread): Use union
1498 gdb_sockaddr_u.
1499
492d29ea
PA
15002015-03-07 Pedro Alves <palves@redhat.com>
1501
1502 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1503 instead.
1504
60a191ed
YQ
15052015-03-06 Yao Qi <yao.qi@linaro.org>
1506
1507 * linux-aarch64-low.c (aarch64_insert_point): Use
1508 show_debug_regs as a boolean.
1509 (aarch64_remove_point): Likewise.
1510
f5771b1d
PA
15112015-03-05 Pedro Alves <palves@redhat.com>
1512
1513 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1514 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1515 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1516 * nto-low.c (nto_target_ops): Likewise.
1517 * spu-low.c (spu_target_ops): Likewise.
1518 * win32-low.c (win32_target_ops): Likewise.
1519
3e572f71
PA
15202015-03-04 Pedro Alves <palves@redhat.com>
1521
72f4393d 1522 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1523 Decide whether a breakpoint triggered based on the SIGTRAP's
1524 siginfo.si_code.
72f4393d
L
1525 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1526 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1527 (linux_low_filter_event): Check for breakpoints before checking
1528 watchpoints.
1529 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1530 siginfo.si_code.
72f4393d
L
1531 (linux_stopped_by_sw_breakpoint)
1532 (linux_supports_stopped_by_sw_breakpoint)
1533 (linux_stopped_by_hw_breakpoint)
1534 (linux_supports_stopped_by_hw_breakpoint): New functions.
1535 (linux_target_ops): Install new target methods.
3e572f71 1536
1ec68e26
PA
15372015-03-04 Pedro Alves <palves@redhat.com>
1538
1539 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1540 * server.c (swbreak_feature, hwbreak_feature): New globals.
1541 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1542 (captured_main): Clear swbreak_feature and hwbreak_feature.
1543 * server.h (swbreak_feature, hwbreak_feature): Declare.
1544 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1545 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1546 supports_stopped_by_hw_breakpoint>: New fields.
1547 (target_supports_stopped_by_sw_breakpoint)
1548 (target_stopped_by_sw_breakpoint)
1549 (target_supports_stopped_by_hw_breakpoint)
1550 (target_stopped_by_hw_breakpoint): Declare.
1551
15c66dd6
PA
15522015-03-04 Pedro Alves <palves@redhat.com>
1553
1554 enum lwp_stop_reason -> enum target_stop_reason
1555 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1556 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1557 (linux_wait_1, stuck_in_jump_pad_callback)
1558 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1559 (linux_stopped_by_watchpoint):
1560 * linux-low.h (enum lwp_stop_reason): Delete.
1561 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1562 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1563
98fc70d6
YQ
15642015-03-04 Yao Qi <yao.qi@linaro.org>
1565
1566 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1567
dd2ac174
GB
15682015-03-03 Gary Benson <gbenson@redhat.com>
1569
1570 * hostio.c (handle_vFile): Fix prefix lengths.
1571
d68e53f4
MM
15722015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1573
1574 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1575 ptr_bits.
1576
bf2d68ab
AA
15772015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1578
1579 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1580 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1581 (clean): Add "rm -f" for above C files.
1582 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1583 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1584 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1585 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1586 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1587 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1588 (init_registers_s390x_vx_linux64)
1589 (init_registers_s390x_tevx_linux64)
1590 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1591 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1592 declarations.
1593 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1594 (s390_store_vxrs_high): New functions.
1595 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1596 NT_S390_VXRS_HIGH.
1597 (s390_arch_setup): Add logic for selecting one of the new target
1598 descriptions. Activate the new vector regsets if applicable.
1599 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1600 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1601 and init_registers_s390x_tevx_linux64.
1602
c966a859
PA
16032015-03-01 Pedro Alves <palves@redhat.com>
1604
1605 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1606 parameter.
1607
4180215b
PA
16082015-02-27 Pedro Alves <palves@redhat.com>
1609
1610 * linux-x86-low.c (u_debugreg_offset): New function.
1611 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1612
749bab01
PA
16132015-02-27 Pedro Alves <palves@redhat.com>
1614
1615 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1616 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1617 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1618 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1619 (ps_lsetfpregs, ps_getpid)
1620 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1621 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1622 (ps_lsetxregs, ps_plog): Declare.
1623
3c14e5a3
PA
16242015-02-27 Pedro Alves <palves@redhat.com>
1625
1626 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1627 IP_AGENT_EXPORT_FUNC.
1628 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1629 IP_AGENT_EXPORT_FUNC.
1630 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1631 (IP_AGENT_EXPORT): Delete.
1632 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1633 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1634 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1635 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1636 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1637 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1638 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1639 (traceframe_read_count, traceframe_write_count)
1640 (traceframes_created, trace_state_variables, get_raw_reg)
1641 (get_trace_state_variable_value, set_trace_state_variable_value)
1642 (ust_loaded, helper_thread_id, cmd_buf): Use
1643 IPA_SYM_EXPORTED_NAME.
1644 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1645 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1646 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1647 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1648 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1649 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1650 EXTERN_C_PUSH/EXTERN_C_POP.
1651 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1652 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1653 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1654 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1655 (traceframe_write_count, traceframe_read_count)
1656 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1657 (about_to_request_buffer_space, get_trace_state_variable_value)
1658 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1659 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1660 EXTERN_C_PUSH/EXTERN_C_POP.
1661 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1662 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1663 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1664 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1665 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1666 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1667 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1668 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1669 Define.
1670 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1671 (IP_AGENT_EXPORT_VAR_DECL): Define.
1672 (tracing): Declare.
1673 (gdb_agent_get_raw_reg): Declare.
1674
fe978cb0
PA
16752015-02-27 Tom Tromey <tromey@redhat.com>
1676 Pedro Alves <palves@redhat.com>
1677
1678 Rename symbols whose names are reserved C++ keywords throughout.
1679
3bc3d82a
PA
16802015-02-27 Pedro Alves <palves@redhat.com>
1681
1682 * Makefile.in (COMPILER): New, get it from autoconf.
1683 (CXX): Get from autoconf instead.
1684 (COMPILE.pre): Use COMPILER.
1685 (CC-LD): Rename to ...
1686 (CC_LD): ... this. Use COMPILER.
1687 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1688 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1689 * acinclude.m4: Include build-with-cxx.m4.
1690 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1691 Disable -Werror by default if building in C++ mode.
1692 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1693 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1694 the C++ compiler. Save/restore CXXFLAGS too.
1695 * configure: Regenerate.
1696
07697489
PA
16972015-02-27 Pedro Alves <palves@redhat.com>
1698
1699 * acinclude.m4: Include libiberty.m4.
1700 * configure.ac: Call libiberty_INIT.
1701 * config.in, configure: Regenerate.
1702
9beb7c4e
PA
17032015-02-26 Pedro Alves <palves@redhat.com>
1704
1705 * linux-low.c (linux_wait_1): When incrementing the PC past a
1706 program breakpoint always use the_low_target.breakpoint_len as
1707 increment, rather than the maximum between that and
1708 the_low_target.decr_pc_after_break.
1709
8090aef2
PA
17102015-02-23 Pedro Alves <palves@redhat.com>
1711
1712 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1713 thread was doing a step-over; always adjust the PC if
1714 we stepped over a permanent breakpoint.
1715 (linux_wait_1): If we stepped over breakpoint that was on top of a
1716 permanent breakpoint, manually advance the PC past it.
1717
bc9540e8
PA
17182015-02-23 Pedro Alves <palves@redhat.com>
1719
1720 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1721 modes.
1722 (x86_fill_gregset, x86_store_gregset): Use it when handling
1723 $orig_eax.
1724
2db9a427
PA
17252015-02-20 Pedro Alves <palves@redhat.com>
1726
1727 * thread-db.c: Include "nat/linux-procfs.h".
1728 (thread_db_init): Skip listing new threads if the kernel supports
1729 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1730
afa8d396
PA
17312015-02-20 Pedro Alves <palves@redhat.com>
1732
1733 * linux-low.c (status_pending_p_callback): Use ptid_match.
1734
c9587f88
AT
17352015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1736
1737 PR breakpoints/16812
1738 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1739 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1740 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1741
b05ec7a5
AT
17422015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1743
1744 PR breakpoints/15956
1745 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1746
d33501a5
MM
17472015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1748
1749 * linux-low.c (linux_low_btrace_conf): Print size.
1750 * server.c (handle_btrace_conf_general_set): New.
1751 (hanle_general_set): Call handle_btrace_conf_general_set.
1752 (handle_query): Report Qbtrace-conf:bts:size as supported.
1753
f4abbc16
MM
17542015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1755
1756 * linux-low.c (linux_low_enable_btrace): Update parameters.
1757 (linux_low_btrace_conf): New.
1758 (linux_target_ops)<to_btrace_conf>: Initialize.
1759 * server.c (current_btrace_conf): New.
1760 (handle_btrace_enable): Rename to ...
1761 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1762 to target_enable_btrace. Update comment. Update users.
1763 (handle_qxfer_btrace_conf): New.
1764 (qxfer_packets): Add btrace-conf entry.
1765 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1766 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1767 (target_ops)<read_btrace_conf>: New.
1768 (target_enable_btrace): Update parameters.
1769 (target_read_btrace_conf): New.
1770
043c3577
MM
17712015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1772
1773 * server.c (handle_btrace_general_set): Remove call to
1774 target_supports_btrace.
1775 (supported_btrace_packets): New.
1776 (handle_query): Call supported_btrace_packets.
1777 * target.h: include btrace-common.h.
1778 (btrace_target_info): Removed.
1779 (supports_btrace, target_supports_btrace): Update parameters.
1780
734b0e4b
MM
17812015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1782
1783 * Makefile.in (SFILES): Add common/btrace-common.c.
1784 (OBS): Add common/btrace-common.o.
1785 (btrace-common.o): Add build rules.
1786 * linux-low: Include btrace-common.h.
1787 (linux_low_read_btrace): Use struct btrace_data. Call
1788 btrace_data_init and btrace_data_fini.
1789
d6c146e9
PA
17902015-02-06 Pedro Alves <palves@redhat.com>
1791
1792 * thread-db.c (find_new_threads_callback): Add debug output.
1793
20ba1ce6
PA
17942015-02-04 Pedro Alves <palves@redhat.com>
1795
1796 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1797 (resume_stopped_resumed_lwps): New function.
1798 (linux_wait_for_event_filtered): Use it.
1799
8cc73a39
SDJ
18002015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1801
1802 * Makefile.in (SFILES): Add linux-personality.c.
1803 (linux-personality.o): New rule.
1804 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1805 list of objects to be built.
1806 * linux-low.c: Include nat/linux-personality.h.
1807 (linux_create_inferior): Remove code to disable address space
1808 randomization (moved to ../nat/linux-personality.c). Create
1809 cleanup to disable address space randomization.
1810
fb23d554
SDJ
18112015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1812
1813 * Makefile.in (posix-strerror.o): New rule.
1814 (mingw-strerror.o): Likewise.
1815 * configure: Regenerated.
1816 * configure.ac: Source file ../common/common.host. Initialize new
1817 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1818
cdf43629
YQ
18192015-01-14 Yao Qi <yao@codesourcery.com>
1820
1821 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1822 (ppc-linux.o): New rule.
1823 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1824 * configure.ac: AC_CHECK_FUNCS(getauxval).
1825 * config.in: Re-generated.
1826 * configure: Re-generated.
1827 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1828 ppc64_64bit_inferior_p
1829
514c5338
YQ
18302015-01-14 Yao Qi <yao@codesourcery.com>
1831
1832 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1833 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1834 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1835 (PT_ORIG_R3, PT_TRAP): Likewise.
1836 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1837 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1838 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1839
3368c1e5
JB
18402015-01-10 Joel Brobecker <brobecker@adacore.com>
1841
1842 * i387-fp.c (i387_cache_to_xsave): In look over
1843 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1844 zmmh_low_space field by use of zmmh_high_space.
1845
582511be
PA
18462015-01-09 Pedro Alves <palves@redhat.com>
1847
1848 * linux-low.c (step_over_bkpt): Move higher up in the file.
1849 (handle_extended_wait): Don't store the stop_pc here.
1850 (get_stop_pc): Adjust comments and rename to ...
1851 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1852 stopped for a software breakpoint or hardware breakpoint.
1853 (thread_still_has_status_pending_p): New function.
1854 (status_pending_p_callback): Use
1855 thread_still_has_status_pending_p. If the event is no longer
1856 interesting, resume the LWP.
1857 (handle_tracepoints): Add assert.
1858 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1859 (wstatus_maybe_breakpoint): New function.
1860 (cancel_breakpoint): Delete function.
1861 (check_stopped_by_watchpoint): New function, factored out from
1862 linux_low_filter_event.
1863 (lp_status_maybe_breakpoint): Delete function.
1864 (linux_low_filter_event): Remove filter_ptid argument.
1865 Leave thread group exits pending here. Store the LWP's stop PC.
1866 Always leave events pending.
1867 (linux_wait_for_event_filtered): Pull all events out of the
1868 kernel, and leave them all pending.
1869 (count_events_callback, select_event_lwp_callback): Consider all
1870 events.
1871 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1872 (select_event_lwp): Only give preference to the stepping LWP in
1873 all-stop mode. Adjust comments.
1874 (ignore_event): New function.
1875 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1876 references to cancel_breakpoints. Adjust to renames. Also give
1877 equal priority to all LWPs that have had events in non-stop mode.
1878 If reporting a software breakpoint event, unadjust the LWP's PC.
1879 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1880 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1881 Adjust.
1882 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1883 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1884 (linux_stopped_by_watchpoint): Adjust.
1885 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1886 * linux-low.h (enum lwp_stop_reason): New.
1887 (struct lwp_info) <stop_pc>: Adjust comment.
1888 <stopped_by_watchpoint>: Delete field.
1889 <stop_reason>: New field.
1890 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1891 * mem-break.c (software_breakpoint_inserted_here)
1892 (hardware_breakpoint_inserted_here): New function.
1893 * mem-break.h (software_breakpoint_inserted_here)
1894 (hardware_breakpoint_inserted_here): Declare.
1895 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1896 (cancel_breakpoints): Delete.
1897 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1898 (upload_fast_traceframes): Remove references to
1899 cancel_breakpoints.
1900
a33e3959
PA
19012015-01-09 Pedro Alves <palves@redhat.com>
1902
1903 * thread-db.c (find_new_threads_callback): Ignore thread if the
1904 kernel thread ID is -1.
1905
8784d563
PA
19062015-01-09 Pedro Alves <palves@redhat.com>
1907
1908 * linux-low.c (linux_attach_fail_reason_string): Move to
1909 nat/linux-ptrace.c, and rename.
1910 (linux_attach_lwp): Update comment.
1911 (attach_proc_task_lwp_callback): New function.
1912 (linux_attach): Adjust to rename and use
1913 linux_proc_attach_tgid_threads.
1914 (linux_attach_fail_reason_string): Delete declaration.
1915
76f2b779
JB
19162015-01-01 Joel Brobecker <brobecker@adacore.com>
1917
1918 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1919 * server.c (gdbserver_version): Likewise.
1920
fafcc06a
SDJ
19212014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1922
1923 * remote-utils.c: Include ctype.h.
1924 (input_interrupt): Explicitly handle the case when the char
1925 received is the NUL byte. Improve the printing of non-ASCII
1926 characters.
1927
beed38b8
JB
19282014-12-16 Joel Brobecker <brobecker@adacore.com>
1929
1930 * linux-low.c (linux_low_filter_event): Update call to
1931 linux_enable_event_reporting following the addition of
1932 a new parameter to that function.
1933
bf330350
CU
19342014-12-16 Catalin Udma <catalin.udma@freescale.com>
1935
1936 PR server/17457
1937 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1938 (AARCH64_FPCR_REGNO): Likewise.
1939 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1940 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1941 (aarch64_store_fpregset): Likewise.
1942
5227d625
JB
19432014-12-15 Joel Brobecker <brobecker@adacore.com>
1944
1945 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1946 Remove FIXME comment about assumption about N.
1947
f93b65a0
JB
19482014-12-13 Joel Brobecker <brobecker@adacore.com>
1949
1950 * configure.ac: If large-file support is disabled in GDBserver,
1951 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1952 * configure: Regenerate.
1953
e5a9158d
AA
19542014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1955
1956 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1957 warning upon ENODATA from ptrace.
1958 * linux-s390-low.c (s390_store_tdb): New.
1959 (s390_regsets): Add regset for NT_S390_TDB.
1960
feea5f36
AA
19612014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1962
1963 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1964 without a fill_function.
1965 * linux-s390-low.c (s390_fill_last_break): Remove.
1966 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1967 (s390_arch_setup): Use regset's size instead of fill_function for
1968 loop end condition.
1969
098dbe61
AA
19702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1971
1972 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1973 the regset's store function when ptrace returned an error.
1974 * regcache.c (get_thread_regcache): Invalidate register cache
1975 before fetching inferior's registers.
1976
28eef672
AA
19772014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1978
1979 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1980 while-loop as for-loop.
1981 (regsets_store_inferior_registers): Likewise.
1982
bdca27a2
YQ
19832014-11-28 Yao Qi <yao@codesourcery.com>
1984
1985 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1986 * config.in, configure: Re-generate.
1987 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1988 is defined.
1989
9c232dda
YQ
19902014-11-21 Yao Qi <yao@codesourcery.com>
1991
1992 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1993 (AC_CHECK_HEADERS): Remove malloc.h.
1994 * configure: Re-generated.
1995 * config.in: Re-generated.
1996 * server.h: Don't include alloca.h and malloc.h.
1997 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1998 Don't include malloc.h.
1999
43968415
JB
20002014-11-17 Joel Brobecker <brobecker@adacore.com>
2001
2002 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2003 corresponding ERRNO check in same block.
2004
40e91bc7
PA
20052014-11-12 Pedro Alves <palves@redhat.com>
2006
2007 * server.c (cont_thread): Update comment.
2008 (start_inferior, attach_inferior): No longer clear cont_thread.
2009 (handle_v_cont): No longer set cont_thread.
2010 (captured_main): Clear cont_thread each time a GDB connects.
2011
c2c118cf
PA
20122014-11-12 Pedro Alves <palves@redhat.com>
2013
2014 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2015 thread, and don't resume all threads if the Hc thread has exited.
2016
78708b7c
PA
20172014-11-12 Pedro Alves <palves@redhat.com>
2018
2019 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2020 the process group instead of to a specific LWP.
2021
a2abc7de
PA
20222014-10-15 Pedro Alves <palves@redhat.com>
2023
2024 PR server/17487
2025 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2026 parameter.
2027 (arm_set_thread_context): Delete.
2028 (the_low_target): Adjust.
2029 * win32-i386-low.c (debug_registers_changed)
2030 (debug_registers_used): Delete.
2031 (update_debug_registers_callback): New function.
2032 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2033 needing to update their debug registers.
2034 (win32_get_current_dr): New function.
2035 (x86_dr_low_get_addr, x86_dr_low_get_control)
2036 (x86_dr_low_get_status): Fetch the debug register from the thread
2037 record's context.
2038 (i386_initial_stuff): Adjust.
2039 (i386_get_thread_context): Remove current_event parameter. Don't
2040 clear debug_registers_changed nor copy DR values to
2041 debug_reg_state.
2042 (i386_set_thread_context): Delete.
2043 (i386_prepare_to_resume): New function.
2044 (i386_thread_added): Mark the thread as needing to update irs
2045 debug registers.
2046 (the_low_target): Remove i386_set_thread_context and install
2047 i386_prepare_to_resume.
2048 * win32-low.c (win32_get_thread_context): Adjust.
2049 (win32_set_thread_context): Use SetThreadContext
2050 directly.
2051 (win32_prepare_to_resume): New function.
2052 (win32_require_context): New function, factored out from ...
2053 (thread_rec): ... this.
2054 (continue_one_thread): Call win32_prepare_to_resume on each thread
2055 we're about to continue.
2056 (win32_resume): Call win32_prepare_to_resume on the event thread.
2057 * win32-low.h (struct win32_thread_info)
2058 <debug_registers_changed>: New field.
2059 (struct win32_target_ops): Change prototype of set_thread_context,
2060 delete set_thread_context and add prepare_to_resume.
2061 (win32_require_context): New declaration.
2062
a442d071
GB
20632014-10-08 Gary Benson <gbenson@redhat.com>
2064
2065 * server.h: Do not include common-exceptions.h.
2066
6f1947e8
GB
20672014-10-08 Gary Benson <gbenson@redhat.com>
2068
2069 * server.h: Do not include cleanups.h.
2070
63b434a4
JH
20712014-09-30 James Hogan <james.hogan@imgtec.com>
2072
2073 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2074 mips64-dsp-linux.c.
2075
c4d9ceb6
YQ
20762014-09-23 Yao Qi <yao@codesourcery.com>
2077
2078 * linux-low.c (lp_status_maybe_breakpoint): New function.
2079 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2080 (count_events_callback): Likewise.
2081 (select_event_lwp_callback): Likewise.
2082 (cancel_breakpoints_callback): Likewise.
2083
89a5711c
DB
20842014-09-19 Don Breazeal <donb@codesourcery.com>
2085
2086 * linux-low.c (handle_extended_wait): Call
2087 linux_ptrace_get_extended_event.
2088 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2089 linux_is_extended_waitstatus.
2090
bffc0964
JB
20912014-09-16 Joel Brobecker <brobecker@adacore.com>
2092
2093 * Makefile.in (CPPFLAGS): Define.
2094 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2095 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2096
0bfdf32f
GB
20972014-09-16 Gary Benson <gbenson@redhat.com>
2098
2099 * inferiors.h (current_inferior): Renamed as...
2100 (current_thread): New variable. All uses updated.
2101 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2102 (maybe_move_out_of_jump_pad): Likewise.
2103 (cancel_breakpoint): Likewise.
2104 (linux_low_filter_event): Likewise.
2105 (wait_for_sigstop): Likewise.
2106 (linux_resume_one_lwp): Likewise.
2107 (need_step_over_p): Likewise.
2108 (start_step_over): Likewise.
2109 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2110 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2111 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2112 and save_inferior as saved_thread.
2113 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2114 saved_thread.
2115 (regcache_invalidate_thread): Likewise.
2116 * remote-utils.c (prepare_resume_reply): Likewise.
2117 * thread-db.c (thread_db_get_tls_address): Likewise.
2118 (disable_thread_event_reporting): Likewise.
2119 (remove_thread_event_breakpoints): Likewise.
2120 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2121 as saved_thread.
2122 * target.h (set_desired_inferior): Renamed as...
2123 (set_desired_thread): New declaration. All uses updated.
2124 * server.c (myresume): Updated comment to reference thread instead
2125 of inferior.
2126 (handle_serial_event): Likewise.
2127 (handle_target_event): Likewise.
2128
361c8ade
GB
21292014-09-12 Tom Tromey <tromey@redhat.com>
2130 Gary Benson <gbenson@redhat.com>
2131
2132 * regcache.h: Include common-regcache.h.
2133 (regcache_read_pc): Don't declare.
2134 * regcache.c (get_thread_regcache_for_ptid): New function.
2135
bd9269f7
GB
21362014-09-11 Tom Tromey <tromey@redhat.com>
2137 Gary Benson <gbenson@redhat.com>
2138
2139 * symbol.c: New file.
2140 * Makefile.in (SFILES): Add symbol.c.
2141 (OBS): Add symbol.o.
2142
f8c1d06b
GB
21432014-09-11 Gary Benson <gbenson@redhat.com>
2144
2145 * target.c (target_stop_ptid, target_continue_ptid): New
2146 functions.
2147
721ec300
GB
21482014-09-11 Tom Tromey <tromey@redhat.com>
2149 Gary Benson <gbenson@redhat.com>
2150
2151 * target.h: Include target/target.h.
2152 * target.c (target_read_memory, target_read_uint32)
2153 (target_write_memory): New functions.
2154
c5e92cca
GB
21552014-09-11 Gary Benson <gbenson@redhat.com>
2156
2157 * server.h (debug_hw_points): Don't declare.
2158 * server.c (debug_hw_points): Don't define. Replace all uses
2159 with show_debug_regs.
2160 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2161 all uses with show_debug_regs.
2162
2e4bb98a
EBM
21632014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2164
2165 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2166 endianness into account.
2167 (ppc_supply_ptrace_register): Likewise.
2168
ac740bc7
JH
21692014-09-03 James Hogan <james.hogan@imgtec.com>
2170
2171 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2172 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2173
97ea6506
GB
21742014-09-03 Gary Benson <gbenson@redhat.com>
2175
2176 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2177 ALL_DEBUG_ADDRESS_REGISTERS.
2178
df7e5265
GB
21792014-09-02 Gary Benson <gbenson@redhat.com>
2180
2181 * i386-low.h: Renamed as...
2182 * x86-low.h: New file. All type, function and variable name
2183 prefixes changed from "i386_" to "x86_". All references updated.
2184 * i386-low.c: Renamed as...
2185 * x86-low.c: New file. All type, function and variable name
2186 prefixes changed from "i386_" to "x86_". All references updated.
2187
ed859da7
GB
21882014-09-02 Gary Benson <gbenson@redhat.com>
2189
2190 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2191 (x86_linux_new_thread): Likewise.
2192
860789c7
GB
21932014-08-29 Gary Benson <gbenson@redhat.com>
2194
2195 * server.h (setjmp.h): Do not include.
2196 (toplevel): Do not declare.
2197 (common-exceptions.h): Include.
2198 (cleanups.h): Likewise.
2199 * server.c (toplevel): Do not define.
2200 (exit_code): New static global.
2201 (detach_or_kill_for_exit_cleanup): New function.
2202 (main): New function. Original main renamed to...
2203 (captured_main): New function.
2204 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2205
ff55e1b5
GB
22062014-08-29 Gary Benson <gbenson@redhat.com>
2207
2208 * Makefile.in (SFILES): Add common/common-exceptions.c.
2209 (OBS): Add common-exceptions.o.
2210 (common-exceptions.o): New rule.
2211 * utils.c (prepare_to_throw_exception): New function.
2212
e9bcb658
GB
22132014-08-29 Gary Benson <gbenson@redhat.com>
2214
2215 * config.in: Regenerate.
2216 * configure: Likewise.
2217
e3180625
GB
22182014-08-29 Gary Benson <gbenson@redhat.com>
2219
2220 * Makefile.in (SFILES): Add common/cleanups.c.
2221 (OBS): cleanups.o.
2222 (cleanups.o): New rule.
2223
e3d6ba5d
GB
22242014-08-29 Gary Benson <gbenson@redhat.com>
2225
2226 * utils.c (internal_vwarning): New function.
2227
7096e886
GB
22282014-08-28 Gary Benson <gbenson@redhat.com>
2229
2230 * utils.h (fatal): Remove declaration.
2231 * utils.c (fatal): Remove function.
2232
14ce3192
GB
22332014-08-28 Gary Benson <gbenson@redhat.com>
2234
2235 * tracepoint.c (gdb_agent_init): Replace fatal with
2236 perror_with_name.
2237 (initialize_tracepoint): Likewise.
2238
50278d59
GB
22392014-08-28 Gary Benson <gbenson@redhat.com>
2240
2241 * remote-utils.c (remote_prepare): Replace fatal with error.
2242
aa96c426
GB
22432014-08-28 Gary Benson <gbenson@redhat.com>
2244
2245 * linux-low.c (linux_async): Replace fatal with warning.
2246 Tidy up and return.
2247 (linux_start_non_stop): Return -1 if linux_async failed.
2248
f7160e97
GB
22492014-08-28 Gary Benson <gbenson@redhat.com>
2250
2251 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2252 gdb_assert.
2253 (i386_dr_low_get_addr): Remove vague comment.
2254 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2255 gdb_assert.
2256
38e08fca
GB
22572014-08-28 Gary Benson <gbenson@redhat.com>
2258
2259 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2260 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2261 internal_error.
2262 (linux_resume_one_lwp): Likewise.
2263 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2264 gdb_assert.
2265 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2266 with internal_error.
2267 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2268 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2269 (find_register_by_name): Replace fatal with internal_error.
2270 (find_regno): Likewise.
2271 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2272 * thread-db.c (thread_db_create_event): Likewise.
2273 (thread_db_load_search): Likewise.
2274 (try_thread_db_load_1): Likewise.
2275 * tracepoint.c (get_jump_space_head): Replace fatal with
2276 internal_error.
2277 (claim_trampoline_space): Likewise.
2278 (have_fast_tracepoint_trampoline_buffer): Likewise.
2279 (cmd_qtstart): Likewise.
2280 (stop_tracing): Likewise.
2281 (fast_tracepoint_collecting): Likewise.
2282 (target_malloc): Likewise.
2283 (download_tracepoint): Likewise.
2284 (download_trace_state_variables): Replace check with gdb_assert.
2285 (upload_fast_traceframes): Replace fatal with internal_error.
2286
34abf635
GB
22872014-08-19 Tom Tromey <tromey@redhat.com>
2288 Gary Benson <gbenson@redhat.com>
2289
2290 * Makefile.in (SFILES): Add common/common-debug.c.
2291 (OBS): Add common-debug.o.
2292 (common-debug.o): New rule.
2293 * debug.h (debug_printf): Don't declare.
2294 * debug.c (debug_printf): Renamed and rewritten as...
2295 (debug_vprintf): New function.
2296
f6e94d78
GB
22972014-08-19 Gary Benson <gbenson@redhat.com>
2298
2299 * utils.h: Do not include print-utils.h.
2300
9239eeab
GB
23012014-08-19 Tom Tromey <tromey@redhat.com>
2302 Gary Benson <gbenson@redhat.com>
2303
2304 * server.h: Add static assertion.
2305 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2306
ef87c8bb
GB
23072014-08-19 Tom Tromey <tromey@redhat.com>
2308 Gary Benson <gbenson@redhat.com>
2309
2310 * Makefile.in (SFILES): Add common/errors.c.
2311 (OBS): Add errors.o.
2312 (IPA_OBS): Add errors-ipa.o.
2313 (errors.o): New rule.
2314 (errors-ipa.o): Likewise.
2315 * utils.h (perror_with_name, error, warning): Don't declare.
2316 * utils.c (warning): Renamed and rewritten as...
2317 (vwarning): New function.
2318 (error): Renamed and rewritten as...
2319 (verror): New function.
2320 (internal_error): Renamed and rewritten as...
2321 (internal_verror): New function.
2322
bb974a24
GB
23232014-08-07 Gary Benson <gbenson@redhat.com>
2324
2325 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2326 * configure: Regenerate.
2327 * config.in: Likewise.
2328 * server.h: Do not include errno.h.
2329 * event-loop.c: Likewise.
2330 * hostio-errno.c: Likewise.
2331 * linux-low.c: Likewise.
2332 * remote-utils.c: Likewise.
2333 * spu-low.c: Likewise.
2334 * utils.c: Likewise.
2335 * gdbreplay.c: Unconditionally include errno.h.
2336
6d3d12eb
GB
23372014-08-07 Gary Benson <gbenson@redhat.com>
2338
2339 * server.h: Do not include string.h.
2340 * event-loop.c: Likewise.
2341 * linux-low.c: Likewise.
2342 * regcache.c: Likewise.
2343 * remote-utils.c: Likewise.
2344 * spu-low.c: Likewise.
2345 * utils.c: Likewise.
2346
dccbb609
GB
23472014-08-07 Gary Benson <gbenson@redhat.com>
2348
2349 * server.h: Do not include gdb_assert.h.
2350
e76df0d0
GB
23512014-08-07 Gary Benson <gbenson@redhat.com>
2352
2353 * server.h: Do not include common-utils.h.
2354
4cb9c816
GB
23552014-08-07 Gary Benson <gbenson@redhat.com>
2356
2357 * server.h: Do not include ptid.h.
2358 * notif.h: Likewise.
2359
3995eeee
GB
23602014-08-07 Gary Benson <gbenson@redhat.com>
2361
2362 * server.h: Do not include gdb_locale.h.
2363
cb9f1a9b
GB
23642014-08-07 Gary Benson <gbenson@redhat.com>
2365
2366 * server.h: Do not include gdb/signals.h.
2367 * win32-low.c: Likewise.
2368
a5fceff8
GB
23692014-08-07 Gary Benson <gbenson@redhat.com>
2370
2371 * server.h: Do not include pathmax.h.
2372
b9391142
GB
23732014-08-07 Gary Benson <gbenson@redhat.com>
2374
2375 * server.h: Do not include libiberty.h.
2376 * linux-bfin-low.c: Likewise.
2377
0e443c87
GB
23782014-08-07 Gary Benson <gbenson@redhat.com>
2379
2380 * server.h: Do not include ansidecl.h.
2381
8ebb3f56
GB
23822014-08-07 Gary Benson <gbenson@redhat.com>
2383
2384 * linux-x86-low.c: Do not include stddef.h.
2385 * lynx-ppc-low.c: Likewise.
2386 * tracepoint.c: Likewise.
2387
8980bdf6
GB
23882014-08-07 Gary Benson <gbenson@redhat.com>
2389
2390 * server.h: Do not include stdarg.h.
2391 * nto-low.c: Likewise.
2392
d7096f71
GB
23932014-08-07 Gary Benson <gbenson@redhat.com>
2394
2395 * server.h: Do not include stdlib.h.
2396 * inferiors.c: Likewise.
2397 * linux-low.c: Likewise.
2398 * regcache.c: Likewise.
2399 * spu-low.c: Likewise.
2400 * tracepoint.c: Likewise.
2401 * utils.c: Likewise.
2402
d02f550d
GB
24032014-08-07 Gary Benson <gbenson@redhat.com>
2404
2405 * server.h: Do not include stdio.h.
2406 * linux-low.c: Likewise.
2407 * remote-utils.c: Likewise.
2408 * spu-low.c: Likewise.
2409 * utils.c: Likewise.
2410 * wincecompat.c: Likewise.
2411
87f6c4e3
GB
24122014-08-06 Gary Benson <gbenson@redhat.com>
2413
2414 * regcache.c (init_register_cache): Move conditionals inside if.
2415
7089dca4
GB
24162014-08-06 Gary Benson <gbenson@redhat.com>
2417
2418 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2419
462f517e
GB
24202014-07-31 Gary Benson <gbenson@redhat.com>
2421
2422 * ax.h: Do not include server.h.
2423 * gdbthread.h: Likewise.
2424 * lynx-low.h: Likewise.
2425 * notif.h: Likewise.
2426
976411d6
GB
24272014-07-30 Gary Benson <gbenson@redhat.com>
2428
2429 * server.h: Include common-defs.h.
2430 Do not include config.h or build-gnulib-gdbserver/config.h.
2431
d41f6d8e
GB
24322014-07-30 Gary Benson <gbenson@redhat.com>
2433
2434 * hostio-errno.c: Move server.h to top of includes list.
2435 * inferiors.c: Likewise.
2436 * linux-x86-low.c: Likewise.
2437 * notif.c: Include server.h.
2438
314c6a35
TT
24392014-07-24 Tom Tromey <tromey@redhat.com>
2440 Gary Benson <gbenson@redhat.com>
2441
2442 * server.h (CORE_ADDR): Now unsigned.
2443
69ff6be5
PA
24442014-07-16 Pedro Alves <palves@redhat.com>
2445
2446 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2447
ce9e3fe7
PA
24482014-07-15 Pedro Alves <palves@redhat.com>
2449
2450 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2451 copy.
2452
e76126e8
PA
24532014-07-11 Pedro Alves <palves@redhat.com>
2454
2455 * linux-low.c (kill_wait_lwp): New function, based on
2456 kill_one_lwp_callback, but use my_waitpid directly.
2457 (kill_one_lwp_callback, linux_kill): Use it.
2458
8e9db26e
PA
24592014-06-23 Pedro Alves <palves@redhat.com>
2460
2461 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2462 before setting DR0..DR3.
2463
698b3e08
GB
24642014-06-20 Gary Benson <gbenson@redhat.com>
2465
2466 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2467 * configure: Regenerated.
2468 * config.in: Likewise.
2469
125f8a3d
GB
24702014-06-20 Gary Benson <gbenson@redhat.com>
2471
2472 * Makefile.in (SFILES): Update locations for files moved
2473 from common to nat.
2474 (object file files): Reordered.
2475
42995dbd
GB
24762014-06-20 Gary Benson <gbenson@redhat.com>
2477
2478 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2479 (i386_dr_low_set_addr): Likewise.
2480 (i386_dr_low_get_addr): Likewise.
2481 (i386_dr_low_can_set_control): Likewise.
2482 (i386_dr_low_set_control): Likewise.
2483 (i386_dr_low_get_control): Likewise.
2484 (i386_dr_low_get_status): Likewise.
2485 (i386_get_debug_register_length): Likewise.
2486 * linux-x86-low.c (i386_dr_low_set_addr):
2487 Changed signature. Made static.
2488 (i386_dr_low_get_addr): Likewise.
2489 (i386_dr_low_set_control): Likewise.
2490 (i386_dr_low_get_control): Likewise.
2491 (i386_dr_low_get_status): Likewise.
2492 (i386_dr_low): New global variable.
2493 * win32-i386-low.c (i386_dr_low_set_addr):
2494 Changed signature. Made static.
2495 (i386_dr_low_get_addr): Likewise.
2496 (i386_dr_low_set_control): Likewise.
2497 (i386_dr_low_get_control): Likewise.
2498 (i386_dr_low_get_status): Likewise.
2499 (i386_dr_low): New global variable.
2500
e1d2394b
MS
25012014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2502
2503 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2504 * Makefile.in (AR, AR_FLAGS): Define.
2505 * configure: Regenerate.
2506
3a8ee006
GB
25072014-06-19 Gary Benson <gbenson@redhat.com>
2508
2509 * Makefile.in (i386-dregs.o): New rule.
2510 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2511 * i386-low.c (target.h): Remove include.
2512 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2513 (DR_CONTROL_SHIFT): Likewise.
2514 (DR_CONTROL_SIZE): Likewise.
2515 (DR_RW_EXECUTE): Likewise.
2516 (DR_RW_WRITE): Likewise.
2517 (DR_RW_READ): Likewise.
2518 (DR_RW_IORW): Likewise.
2519 (DR_LEN_1): Likewise.
2520 (DR_LEN_2): Likewise.
2521 (DR_LEN_4): Likewise.
2522 (DR_LEN_8): Likewise.
2523 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2524 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2525 (DR_ENABLE_SIZE): Likewise.
2526 (DR_LOCAL_SLOWDOWN): Likewise.
2527 (DR_GLOBAL_SLOWDOWN): Likewise.
2528 (DR_CONTROL_RESERVED): Likewise.
2529 (I386_DR_CONTROL_MASK): Likewise.
2530 (I386_DR_VACANT): Likewise.
2531 (I386_DR_LOCAL_ENABLE): Likewise.
2532 (I386_DR_GLOBAL_ENABLE): Likewise.
2533 (I386_DR_DISABLE): Likewise.
2534 (I386_DR_SET_RW_LEN): Likewise.
2535 (I386_DR_GET_RW_LEN): Likewise.
2536 (I386_DR_WATCH_HIT): Likewise.
2537 (i386_wp_op_t): Likewise.
2538 (i386_show_dr): Likewise.
2539 (i386_length_and_rw_bits): Likewise.
2540 (i386_insert_aligned_watchpoint): Likewise.
2541 (i386_remove_aligned_watchpoint): Likewise.
2542 (i386_handle_nonaligned_watchpoint): Likewise.
2543 i386_update_inferior_debug_regs(): Likewise.
2544 (i386_dr_insert_watchpoint): Likewise.
2545 (i386_dr_remove_watchpoint): Likewise.
2546 (i386_dr_region_ok_for_watchpoint): Likewise.
2547 (i386_dr_stopped_data_address): Likewise.
2548 (i386_dr_stopped_by_watchpoint): Likewise.
2549
8f26655c
GB
25502014-06-19 Gary Benson <gbenson@redhat.com>
2551
2552 * i386-low.c (i386_dr_show): Renamed to
2553 i386_show_dr and made static. All uses updated.
2554 (i386_dr_length_and_rw_bits): Renamed to
2555 i386_length_and_rw_bits and made static.
2556 All uses updated.
2557 (i386_dr_insert_aligned_watchpoint): Renamed to
2558 i386_insert_aligned_watchpoint and made static.
2559 All uses updated.
2560 (i386_dr_remove_aligned_watchpoint): Renamed to
2561 i386_remove_aligned_watchpoint and made static.
2562 All uses updated.
2563 (i386_dr_update_inferior_debug_regs): Renamed to
2564 i386_update_inferior_debug_regs and made static.
2565 All uses updated.
2566
b9228891
GB
25672014-06-18 Gary Benson <gbenson@redhat.com>
2568
5171def3
GB
2569 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2570 (i386_dr_low_can_set_control): Likewise.
2571 (i386_get_debug_register_length): Likewise.
2572 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2573 (i386_dr_low_can_set_control): Likewise.
2574 (i386_get_debug_register_length): Likewise.
2575
25762014-06-17 Gary Benson <gbenson@redhat.com>
2577
b9228891
GB
2578 * i386-low.h (i386-dregs.h): New include.
2579 (DR_FIRSTADDR): Now in i386-dregs.h.
2580 (DR_LASTADDR): Likewise.
2581 (DR_NADDR): Likewise.
2582 (DR_STATUS): Likewise.
2583 (DR_CONTROL): Likewise.
2584 (i386_debug_reg_state): Likewise.
2585 (i386_dr_insert_watchpoint): Likewise.
2586 (i386_dr_remove_watchpoint): Likewise.
2587 (i386_dr_region_ok_for_watchpoint): Likewise.
2588 (i386_dr_stopped_data_address): Likewise.
2589 (i386_dr_stopped_by_watchpoint): Likewise.
2590 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2591
4be83cc2
GB
25922014-06-18 Gary Benson <gbenson@redhat.com>
2593
2594 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2595 i386_dr_insert_watchpoint.
2596 (i386_low_remove_watchpoint): Renamed to
2597 i386_dr_remove_watchpoint.
2598 (i386_low_region_ok_for_watchpoint): Renamed to
2599 i386_dr_region_ok_for_watchpoint.
2600 (i386_low_stopped_data_address): Renamed to
2601 i386_dr_stopped_data_address.
2602 (i386_low_stopped_by_watchpoint): Renamed to
2603 i386_dr_stopped_by_watchpoint.
2604 * i386-low.c (i386_show_dr): Renamed to
2605 i386_dr_show and made nonstatic. All uses updated.
2606 (i386_length_and_rw_bits): Renamed to
2607 i386_dr_length_and_rw_bits and made nonstatic.
2608 All uses updated.
2609 (i386_insert_aligned_watchpoint): Renamed to
2610 i386_dr_insert_aligned_watchpoint and made nonstatic.
2611 All uses updated.
2612 (i386_remove_aligned_watchpoint): Renamed to
2613 i386_dr_remove_aligned_watchpoint and made nonstatic.
2614 All uses updated.
2615 (i386_update_inferior_debug_regs): Renamed to
2616 i386_dr_update_inferior_debug_regs and made nonstatic.
2617 All uses updated.
2618 (i386_low_insert_watchpoint): Renamed to
2619 i386_dr_insert_watchpoint. All uses updated.
2620 (i386_low_remove_watchpoint): Renamed to
2621 i386_dr_remove_watchpoint. All uses updated.
2622 (i386_low_region_ok_for_watchpoint): Renamed to
2623 i386_dr_region_ok_for_watchpoint. All uses updated.
2624 (i386_low_stopped_data_address): Renamed to
2625 i386_dr_stopped_data_address. All uses updated.
2626 (i386_low_stopped_by_watchpoint): Renamed to
2627 i386_dr_stopped_by_watchpoint. All uses updated.
2628
131aa0d4
GB
26292014-06-18 Gary Benson <gbenson@redhat.com>
2630
2631 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2632 (i386_dr_low_can_set_control): Likewise.
2633 (i386_insert_aligned_watchpoint): New check.
2634
d9305f7f
GB
26352014-06-18 Gary Benson <gbenson@redhat.com>
2636
2637 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2638 Renamed to state.
2639
e927c9fc
GB
26402014-06-18 Gary Benson <gbenson@redhat.com>
2641
2642 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2643 instead of fatal and error.
2644 (i386_handle_nonaligned_watchpoint): Likewise.
2645
1b6d4134
GB
26462014-06-18 Gary Benson <gbenson@redhat.com>
2647
2648 * i386-low.c (i386_get_debug_register_length): New macro.
2649 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2650 (i386_show_dr): Use debug_printf instead of fprintf. Use
2651 phex to format values.
2652
6e62758f
GB
26532014-06-18 Gary Benson <gbenson@redhat.com>
2654
2655 * i386-low.h: Comment changes.
2656 * i386-low.c: Likewise.
2657
fc6e2f03
GB
26582014-06-18 Gary Benson <gbenson@redhat.com>
2659
2660 * i386-low.c: Whitespace changes.
2661
f9d1eeed
TT
26622014-06-12 Tom Tromey <tromey@redhat.com>
2663
2664 * utils.c (freeargv): Remove.
2665
0b04e523
TT
26662014-06-12 Tom Tromey <tromey@redhat.com>
2667
2668 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2669 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2670 (parse_debug_format_options): Likewise.
2671 (gdbserver_usage): Likewise.
2672 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2673 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2674 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2675 against libiberty.
2676 ($(LIBGNU)): Depend on libiberty.
2677 (all-lib): Recurse into all subdirs.
2678 (install-only): Invoke "install" target in subdirs.
2679 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2680 targets.
2681 * configure: Rebuild.
2682 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2683 for vasprintf, vsnprintf, or gettimeofday.
2684 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2685 srv_tgtobj.
2686
270c9937
JB
26872014-06-05 Joel Brobecker <brobecker@adacore.com>
2688
2689 * development.sh: Delete.
2690 * Makefile.in (config.status): Adjust dependency on development.sh.
2691 * configure.ac: Adjust development.sh source call.
2692 * configure: Regenerate.
2693
0a261ed8
PA
26942014-06-02 Pedro Alves <palves@redhat.com>
2695
2696 * ax.c (gdb_free_agent_expr): New function.
2697 * ax.h (gdb_free_agent_expr): New declaration.
2698 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2699 list.
2700 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2701 static.
2702 (clear_breakpoint_conditions_and_commands): New function.
2703 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2704 (clear_breakpoint_conditions_and_commands): New declaration.
2705
e9dae05e
RR
27062014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2707
2708 * linux-aarch64-low.c (asm/ptrace.h): Include.
2709
5876f503
JK
27102014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2711
2712 Fix TLS access for -static -pthread.
2713 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2714 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2715 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2716
802e8e6d
PA
27172014-05-20 Pedro Alves <palves@redhat.com>
2718
2719 * linux-aarch64-low.c (aarch64_insert_point)
2720 (aarch64_remove_point): No longer check whether the type is
2721 supported here. Adjust to new interface.
2722 (the_low_target): Install aarch64_supports_z_point_type as
2723 supports_z_point_type method.
2724 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2725 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2726 instead of a Z packet char. Adjust.
2727 (arm_supports_z_point_type): New function.
2728 (arm_insert_point, arm_remove_point): Adjust to new interface.
2729 (the_low_target): Install arm_supports_z_point_type.
2730 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2731 (cris_insert_point, cris_remove_point): Adjust to new interface.
2732 Don't check whether the type is supported here.
2733 (the_low_target): Install cris_supports_z_point_type.
2734 * linux-low.c (linux_supports_z_point_type): New function.
2735 (linux_insert_point, linux_remove_point): Adjust to new interface.
2736 * linux-low.h (struct linux_target_ops) <insert_point,
2737 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2738 raw_breakpoint pointer parameter.
2739 <supports_z_point_type>: New method.
2740 * linux-mips-low.c (mips_supports_z_point_type): New function.
2741 (mips_insert_point, mips_remove_point): Adjust to new interface.
2742 Use mips_supports_z_point_type.
2743 (the_low_target): Install mips_supports_z_point_type.
2744 * linux-ppc-low.c (the_low_target): Install NULL as
2745 supports_z_point_type method.
2746 * linux-s390-low.c (the_low_target): Install NULL as
2747 supports_z_point_type method.
2748 * linux-sparc-low.c (the_low_target): Install NULL as
2749 supports_z_point_type method.
2750 * linux-x86-low.c (x86_supports_z_point_type): New function.
2751 (x86_insert_point): Adjust to new insert_point interface. Use
2752 insert_memory_breakpoint. Adjust to new
2753 i386_low_insert_watchpoint interface.
2754 (x86_remove_point): Adjust to remove_point interface. Use
2755 remove_memory_breakpoint. Adjust to new
2756 i386_low_remove_watchpoint interface.
2757 (the_low_target): Install x86_supports_z_point_type.
2758 * lynx-low.c (lynx_target_ops): Install NULL as
2759 supports_z_point_type callback.
2760 * nto-low.c (nto_supports_z_point_type): New.
2761 (nto_insert_point, nto_remove_point): Adjust to new interface.
2762 (nto_target_ops): Install nto_supports_z_point_type.
2763 * mem-break.c: Adjust intro comment.
2764 (struct raw_breakpoint) <raw_type, size>: New fields.
2765 <inserted>: Update comment.
2766 <shlib_disabled>: Delete field.
2767 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2768 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2769 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2770 (raw_bkpt_type_to_target_hw_bp_type): New function.
2771 (find_enabled_raw_code_breakpoint_at): New function.
2772 (find_raw_breakpoint_at): New type and size parameters. Use them.
2773 (insert_memory_breakpoint): New function, based off
2774 set_raw_breakpoint_at.
2775 (remove_memory_breakpoint): New function.
2776 (set_raw_breakpoint_at): Reimplement.
2777 (set_breakpoint): New, based on set_breakpoint_at.
2778 (set_breakpoint_at): Reimplement.
2779 (delete_raw_breakpoint): Go through the_target->remove_point
2780 instead of assuming memory breakpoints.
2781 (find_gdb_breakpoint_at): Delete.
2782 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2783 (find_gdb_breakpoint): New function.
2784 (set_gdb_breakpoint_at): Delete.
2785 (z_type_supported): New function.
2786 (set_gdb_breakpoint_1): New function, loosely based off
2787 set_gdb_breakpoint_at.
2788 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2789 (delete_gdb_breakpoint_at): Delete.
2790 (delete_gdb_breakpoint_1): New function, loosely based off
2791 delete_gdb_breakpoint_at.
2792 (delete_gdb_breakpoint): New function.
2793 (clear_gdb_breakpoint_conditions): Rename to ...
2794 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2795 breakpoint.
2796 (add_condition_to_breakpoint): Make static.
2797 (add_breakpoint_condition): Take a struct breakpoint pointer
2798 instead of an address. Adjust.
2799 (gdb_condition_true_at_breakpoint): Rename to ...
2800 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2801 z_type parameter.
2802 (gdb_condition_true_at_breakpoint): Reimplement.
2803 (add_breakpoint_commands): Take a struct breakpoint pointer
2804 instead of an address. Adjust.
2805 (gdb_no_commands_at_breakpoint): Rename to ...
2806 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2807 parameter. Return true if no breakpoint was found. Change debug
2808 output.
2809 (gdb_no_commands_at_breakpoint): Reimplement.
2810 (run_breakpoint_commands): Rename to ...
2811 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2812 and change return type to boolean.
2813 (run_breakpoint_commands): New function.
2814 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2815 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2816 breakpoint. Go through the_target->remove_point instead of
2817 assuming memory breakpoint.
2818 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2819 software and hardware breakpoints.
2820 (reinsert_raw_breakpoint): Go through the_target->insert_point
2821 instead of assuming memory breakpoint.
2822 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2823 software and hardware breakpoints.
2824 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2825 Check both software and hardware breakpoints.
2826 (validate_inserted_breakpoint): Assert the breakpoint is a
2827 software breakpoint. Set the inserted flag to -1 instead of
2828 setting shlib_disabled.
2829 (delete_disabled_breakpoints): Adjust.
2830 (validate_breakpoints): Only validate software breakpoints.
2831 Adjust to inserted flag change.
2832 (check_mem_read, check_mem_write): Skip breakpoint types other
2833 than software breakpoints. Adjust to inserted flag change.
2834 * mem-break.h (enum raw_bkpt_type): New enum.
2835 (raw_breakpoint, struct process_info): Forward declare.
2836 (Z_packet_to_target_hw_bp_type): Delete declaration.
2837 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2838 (set_gdb_breakpoint, delete_gdb_breakpoint)
2839 (clear_breakpoint_conditions): New declarations.
2840 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2841 (breakpoint_inserted_here): Update comment.
2842 (add_breakpoint_condition, add_breakpoint_commands): Replace
2843 address parameter with a breakpoint pointer parameter.
2844 (gdb_breakpoint_here): Update comment.
2845 (delete_gdb_breakpoint_at): Delete.
2846 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2847 * server.c (process_point_options): Take a struct breakpoint
2848 pointer instead of an address. Adjust.
2849 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2850 delete_gdb_breakpoint.
2851 * spu-low.c (spu_target_ops): Install NULL as
2852 supports_z_point_type method.
2853 * target.h: Include mem-break.h.
2854 (struct target_ops) <prepare_to_access_memory>: Update comment.
2855 <supports_z_point_type>: New field.
2856 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2857 instead of a char. Also take a raw breakpoint pointer.
2858 * win32-arm-low.c (the_low_target): Install NULL as
2859 supports_z_point_type.
2860 * win32-i386-low.c (i386_supports_z_point_type): New function.
2861 (i386_insert_point, i386_remove_point): Adjust to new interface.
2862 (the_low_target): Install i386_supports_z_point_type.
2863 * win32-low.c (win32_supports_z_point_type): New function.
2864 (win32_insert_point, win32_remove_point): Adjust to new interface.
2865 (win32_target_ops): Install win32_supports_z_point_type.
2866 * win32-low.h (struct win32_target_ops):
2867 <supports_z_point_type>: New method.
2868 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2869 instead of a char. Also take a raw breakpoint pointer.
2870
932539e3
PA
28712014-05-20 Pedro Alves <palves@redhat.com>
2872
2873 * mem-break.h: Include break-common.h.
2874 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2875 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2876 (Z_packet_to_target_hw_bp_type): New declaration.
2877 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2878 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2879 (Z_PACKET_ACCESS_WP): Delete macros.
2880 (Z_packet_to_hw_type): Delete function.
2881 * i386-low.h: Don't include break-common.h here.
2882 (Z_packet_to_hw_type): Delete declaration.
2883 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2884 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2885 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2886 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2887 * linux-aarch64-low.c: Don't include break-common.h here.
2888 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2889 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2890 (Z_packet_to_target_hw_bp_type): Delete function.
2891 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2892 function.
2893 (mips_insert_point, mips_remove_point): Use
2894 Z_packet_to_target_hw_bp_type.
2895
4ff0d3d8
PA
28962014-05-20 Pedro Alves <palves@redhat.com>
2897
2898 * linux-aarch64-low.c: Include break-common.h.
2899 (enum target_point_type): Delete.
2900 (Z_packet_to_point_type): Rename to ...
2901 (Z_packet_to_target_hw_bp_type): ... this, and return a
2902 target_hw_bp_type instead.
2903 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2904 instead of an enum target_point_type.
2905 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2906 breakpoint type.
2907 (aarch64_dr_state_insert_one_point)
2908 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2909 (aarch64_handle_aligned_watchpoint)
2910 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2911 Take an enum target_hw_bp_type instead of an enum
2912 target_point_type.
2913 (aarch64_supports_z_point_type): New function.
2914 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2915 use Z_packet_to_target_hw_bp_type.
2916
786dc519
JB
29172014-05-20 Joel Brobecker <brobecker@adacore.com>
2918
2919 * configure.ac: Only use -Werror by default when DEVELOPMENT
2920 is true.
2921 * configure: Regenerate.
2922
9e0aa64f
JK
29232014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2924
2925 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2926 * linux-x86-low.c (X86_64_USER_REGS): New.
2927 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2928
2b577b92
YQ
29292014-04-28 Yao Qi <yao@codesourcery.com>
2930
2931 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2932 name.
2933
94611da2
PA
29342014-04-25 Pedro Alves <palves@redhat.com>
2935
2936 PR server/16255
2937 * linux-low.c (linux_attach_fail_reason_string): New function.
2938 (linux_attach_lwp): Delete.
2939 (linux_attach_lwp_1): Rename to ...
2940 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2941 argument. Remove "initial" parameter. Return int instead of
2942 void. Don't error or warn here.
2943 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2944 failure to attach to the tgid. Call warning when failing to
2945 attach to an lwp.
2946 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2947 argument. Remove "initial" parameter. Return int instead of
2948 void. Don't error or warn here.
2949 (linux_attach_fail_reason_string): New declaration.
2950 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2951 interface change. Use linux_attach_fail_reason_string.
2952
01f9f808
MS
29532014-04-24 Michael Sturm <michael.sturm@mintel.com>
2954 Walfred Tedeschi <walfred.tedeschi@intel.com>
2955
2956 * Makefile.in: Added rules to handle new files
2957 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2958 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2959 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2960 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2961 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2962 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2963 x32-avx512-linux.o.
2964 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2965 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2966 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2967 i386/x32-avx512.xml.
2968 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2969 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2970 i386/x32-avx512-linux.xml.
2971 * i387-fp.c (num_avx512_k_registers): New constant for number
2972 of K registers.
2973 (num_avx512_zmmh_low_registers): New constant for number of
2974 lower ZMM registers (0-15).
2975 (num_avx512_zmmh_high_registers): New constant for number of
2976 higher ZMM registers (16-31).
2977 (num_avx512_ymmh_registers): New contant for number of higher
2978 YMM registers (ymm16-31 added by avx521 on x86_64).
2979 (num_avx512_xmm_registers): New constant for number of higher
2980 XMM registers (xmm16-31 added by AVX512 on x86_64).
2981 (struct i387_xsave): Add space for AVX512 registers.
2982 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2983 Add code to handle AVX512 registers.
2984 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2985 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2986 prototypei from generated file.
2987 (tdesc_amd64_avx512_linux): Likewise.
2988 (init_registers_x32_avx512_linux): Likewise.
2989 (tdesc_x32_avx512_linux): Likewise.
2990 (init_registers_i386_avx512_linux): Likewise.
2991 (tdesc_i386_avx512_linux): Likewise.
2992 (x86_64_regmap): Add AVX512 registers.
2993 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2994 mask.
2995 (initialize_low_arch): Add code to initialize AVX512 registers.
2996
51aa91f9
PA
29972014-04-23 Pedro Alves <palves@redhat.com>
2998
2999 * mem-break.c (find_gdb_breakpoint_at): Make static.
3000 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3001
a4165e94
PA
30022014-04-23 Pedro Alves <palves@redhat.com>
3003
3004 * i386-low.c: Don't include break-common.h here.
3005 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3006 prototype to take target_hw_bp_type as argument instead of a Z
3007 packet char.
3008 * i386-low.h: Include break-common.h here.
3009 (Z_packet_to_hw_type): Declare.
3010 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3011 prototypes.
3012 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3013 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3014 (x86_remove_point): Convert the packet number to a
3015 target_hw_bp_type before calling i386_low_remove_watchpoint.
3016 * win32-i386-low.c (i386_insert_point): Convert the packet number
3017 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3018 (i386_remove_point): Convert the packet number to a
3019 target_hw_bp_type before calling i386_low_remove_watchpoint.
3020
b8acf843
PA
30212014-04-23 Pedro Alves <palves@redhat.com>
3022
3023 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3024
d708bcd1
PA
30252014-04-10 Pedro Alves <palves@redhat.com>
3026
3027 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3028 Check if the condition or command is NULL before checking if the
3029 breakpoint is known. On success, return true.
3030 * mem-break.h (add_breakpoint_condition): Document return.
3031 (add_breakpoint_commands): Add describing comment.
3032 * server.c (skip_to_semicolon): New function.
3033 (process_point_options): Use it.
3034
2eec7d5b
PA
30352014-04-09 Pedro Alves <palves@redhat.com>
3036
3037 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3038 to lwpid_of.
3039
fa96cb38
PA
30402014-02-27 Pedro Alves <palves@redhat.com>
3041
3042 PR 12702
3043 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3044 macros.
3045 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3046 output.
3047 (last_thread_of_process_p): Take a PID argument instead of a
3048 thread pointer.
3049 (linux_wait_for_lwp): Delete.
3050 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3051 functions.
3052 (linux_low_filter_event): New function, party factored out from
3053 linux_wait_for_event.
3054 (linux_wait_for_event): Rename to ...
3055 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3056 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3057 sigsuspend. Check for zombie leaders.
3058 (linux_wait_for_event): Reimplement as wrapper around
3059 linux_wait_for_event_filtered.
3060 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3061 a normal or signal exit is seen, it's the whole process exiting.
3062 (wait_for_sigstop): No longer a for_each_inferior callback.
3063 Rewrite on top of linux_wait_for_event_filtered.
3064 (stop_all_lwps): Call wait_for_sigstop directly.
3065 * server.c (resume, handle_target_event): Handle
3066 TARGET_WAITKIND_NO_RESUMED.
3067
d763de10
JB
30682014-02-26 Joel Brobecker <brobecker@adacore.com>
3069
3070 * win32-low.c (psapi_get_dll_name,
3071 * win32_CreateToolhelp32Snapshot): Delete.
3072 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3073 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3074 Delete.
3075 (handle_load_dll): Add function description.
3076 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3077
850a0f76
JB
30782014-02-26 Joel Brobecker <brobecker@adacore.com>
3079
3080 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3081 Add comment.
3082 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3083 base address when calling win32_add_one_solib.
3084 (handle_load_dll): Delete local variable load_addr.
3085 Remove 0x1000 offset applied to DLL base address when calling
3086 win32_add_one_solib.
3087 (handle_unload_dll): Add comment.
3088
f25b3fc3
JB
30892014-02-26 Joel Brobecker <brobecker@adacore.com>
3090
3091 * win32-low.c (win32_add_all_dlls): Renames
3092 win32_ensure_ntdll_loaded. Rewrite function documentation.
3093 Adjust implementation to always load all DLLs.
3094 Add 0x1000 offset to DLL base address when calling
3095 win32_add_one_solib.
3096 (child_initialization_done): New static global.
3097 (do_initial_child_stuff): Set child_initialization_done to
3098 zero during child initialization, and 1 after. Replace call
3099 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3100 Add comment.
3101 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3102 (handle_unload_dll): Add function documentation.
3103 (get_child_debug_event): Ignore load and unload DLL events
3104 during child initialization.
3105
d86d4aaf
DE
31062014-02-20 Doug Evans <dje@google.com>
3107
3bc32da3 3108 Remove global all_lwps.
d86d4aaf
DE
3109 * inferiors.h (ptid_of): Move here from linux-low.h.
3110 (pid_of, lwpid_of): Ditto.
3111 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3112 parameter is a struct thread_info * now.
3113 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3114 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3115 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3116 directly.
3117 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3118 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3119 * linux-arm-low.c (update_registers_callback): Update, "entry"
3120 parameter is a struct thread_info * now.
3121 Fetch lwpid from current_inferior directly.
3122 (arm_insert_point): Pass &all_threads to find_inferior instead of
3123 &all_lwps.
3124 (arm_remove_point): Ditto.
3125 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3126 (arm_prepare_to_resume): Fetch pid from thread.
3127 (arm_read_description): Fetch lwpid from current_inferior directly.
3128 * linux-low.c (all_lwps): Delete.
3129 (delete_lwp): Delete call to remove_inferior.
3130 (handle_extended_wait): Fetch lwpid from thread.
3131 (add_lwp): Don't set lwp->entry.id. Remove call to
3132 add_inferior_to_list.
3133 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3134 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3135 (kill_one_lwp_callback): Ditto.
3136 (linux_kill): Don't dereference NULL pointer.
3137 Fetch ptid,lwpid from thread.
3138 (get_detach_signal): Fetch ptid from thread.
3139 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3140 Simplify call to regcache_invalidate_thread.
3141 (delete_lwp_callback): Update, "entry" parameter is a
3142 struct thread_info * now. Fetch pid from thread.
3143 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3144 (status_pending_p_callback): Update, "entry" parameter is a
3145 struct thread_info * now. Fetch ptid from thread.
3146 (find_lwp_pid): Update, "entry" parameter is a
3147 struct thread_info * now.
3148 (linux_wait_for_lwp): Fetch pid from thread.
3149 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3150 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3151 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3152 (dequeue_one_deferred_signal): Ditto.
3153 (cancel_breakpoint): Fetch ptid from current_inferior.
3154 (linux_wait_for_event): Pass &all_threads to find_inferior,
3155 not &all_lwps. Fetch ptid, lwpid from thread.
3156 (count_events_callback): Update, "entry" parameter is a
3157 struct thread_info * now.
3158 (select_singlestep_lwp_callback): Ditto.
3159 (select_event_lwp_callback): Ditto.
3160 (cancel_breakpoints_callback): Ditto.
3161 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3162 not &all_lwps.
3163 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3164 (unsuspend_one_lwp): Update, "entry" parameter is a
3165 struct thread_info * now.
3166 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3167 not &all_lwps.
3168 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3169 Fetch lwpid from thread, not lwp.
3170 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3171 Pass &all_threads to find_inferior, not &all_lwps.
3172 (send_sigstop): Fetch lwpid from thread, not lwp.
3173 (send_sigstop_callback): Update, "entry" parameter is a
3174 struct thread_info * now.
3175 (suspend_and_send_sigstop_callback): Ditto.
3176 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3177 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3178 struct thread_info * now.
3179 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3180 from thread, lwp.
3181 (lwp_running): Update, "entry" parameter is a
3182 struct thread_info * now.
3183 (stop_all_lwps): Fetch ptid from thread.
3184 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3185 (linux_resume_one_lwp): Fetch lwpid from thread.
3186 (linux_set_resume_request): Update, "entry" parameter is a
3187 struct thread_info * now. Fetch pid, lwpid from thread.
3188 (resume_status_pending_p): Update, "entry" parameter is a
3189 struct thread_info * now.
3190 (need_step_over_p): Ditto. Fetch lwpid from thread.
3191 (start_step_over): Fetch lwpid from thread.
3192 (linux_resume_one_thread): Update, "entry" parameter is a
3193 struct thread_info * now. Fetch lwpid from thread.
3194 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3195 (proceed_one_lwp): Update, "entry" parameter is a
3196 struct thread_info * now. Fetch lwpid from thread.
3197 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3198 struct thread_info * now.
3199 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3200 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3201 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3202 directly.
3203 (regsets_store_inferior_registers): Ditto.
3204 (fetch_register, store_register): Ditto.
3205 (linux_read_memory, linux_write_memory): Ditto.
3206 (linux_request_interrupt): Ditto.
3207 (linux_read_auxv): Ditto.
3208 (linux_xfer_siginfo): Ditto.
3209 (linux_qxfer_spu): Ditto.
3210 (linux_qxfer_libraries_svr4): Ditto.
3211 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3212 moved to inferiors.h.
3213 (get_lwp): Delete.
3214 (get_thread_lwp): Update.
3215 (struct lwp_info): Delete member "entry". Simplify comment for
3216 member "thread".
3217 (all_lwps): Delete.
3218 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3219 current_inferior directly.
3220 (update_watch_registers_callback): Update, "entry" parameter is a
3221 struct thread_info * now. Fetch pid from thread.
3222 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3223 (mips_insert_point): Fetch lwpid from current_inferior.
3224 Pass &all_threads to find_inferior, not &all_lwps.
3225 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3226 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3227 directly.
3228 (mips_stopped_data_address): Ditto.
3229 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3230 directly.
3231 * linux-tile-low.c (tile_arch_setup): Ditto.
3232 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3233 (update_debug_registers_callback): Update, "entry" parameter is a
3234 struct thread_info * now. Fetch pid from thread.
3235 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3236 Pass &all_threads to find_inferior, not &all_lwps.
3237 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3238 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3239 Pass &all_threads to find_inferior, not &all_lwps.
3240 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3241 (i386_dr_low_get_status): Ditto.
3242 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3243 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3244 (x86_linux_read_description): Ditto.
3245 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3246
3b8361aa
DE
32472014-02-20 Doug Evans <dje@google.com>
3248
3249 * inferiors.c (get_first_inferior): Fix buglet.
3250
f7667f0d
DE
32512014-02-19 Doug Evans <dje@google.com>
3252
3253 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3254 * inferiors.c (add_thread): Change result type to struct thread_info *.
3255 All callers updated.
3256 (add_lwp): Call add_thread here instead of in callers.
3257 All callers updated.
3258 * linux-low.h (get_lwp_thread): Rewrite.
3259 (struct lwp_info): New member "thread".
3260
b3312d80
DE
32612014-02-19 Doug Evans <dje@google.com>
3262
3263 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3264 All callers updated.
3265
ecc6f45c
DE
32662014-02-19 Doug Evans <dje@google.com>
3267
3268 * inferiors.c (add_thread): Fix whitespace.
3269
649ebbca
DE
32702014-02-19 Doug Evans <dje@google.com>
3271
3272 * dll.c (clear_dlls): Replace accessing list implemention details
3273 with API function.
3274 * gdbthread.h (get_first_thread): Declare.
3275 * inferiors.c (for_each_inferior_with_data): New function.
3276 (get_first_thread): New function.
3277 (find_thread_ptid): Simplify.
3278 (get_first_inferior): New function.
3279 (clear_list): Delete.
3280 (one_inferior_p): New function.
3281 (clear_inferior_list): New function.
3282 (clear_inferiors): Update.
3283 * inferiors.h (for_each_inferior_with_data): Declare.
3284 (clear_inferior_list): Declare.
3285 (one_inferior_p): Declare.
3286 (get_first_inferior): Declare.
3287 * linux-low.c (linux_wait_for_event): Replace accessing list
3288 implemention details with API function.
3289 * server.c (target_running): Ditto.
3290 (accumulate_file_name_length): New function.
3291 (emit_dll_description): New function.
3292 (handle_qxfer_libraries): Replace accessing list implemention
3293 details with API function.
3294 (handle_qxfer_threads_worker): New function.
3295 (handle_qxfer_threads_proper): Replace accessing list implemention
3296 details with API function.
3297 (handle_query): Ditto.
3298 (visit_actioned_threads_callback_ftype): New typedef.
3299 (visit_actioned_threads_data): New struct.
3300 (visit_actioned_threads): Rewrite to be find_inferior callback.
3301 (resume): Call find_inferior.
3302 (handle_status): Replace accessing list implemention
3303 details with API function.
3304 (process_serial_event): Replace accessing list implemention details
3305 with API function.
3306 * target.c (set_desired_inferior): Replace accessing list implemention
3307 details with API function.
3308 * tracepoint.c (same_process_p): New function.
3309 (gdb_agent_about_to_close): Replace accessing list implemention
3310 details with API function.
3311 * win32-low.c (child_delete_thread): Replace accessing list
3312 implemention details with API function.
3313 (match_dll_by_basename): New function.
3314 (dll_is_loaded_by_basename): New function.
3315 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3316 details call to dll_is_loaded_by_basename.
3317
80894984
DE
33182014-02-19 Doug Evans <dje@google.com>
3319
3320 * dll.h (struct dll_info): Add comment.
3321 * gdbthread.h (struct thread_info): Add comment.
3322 (current_ptid): Simplify.
3323 * inferiors.c (add_process): Update.
3324 (remove_process): Update.
3325 * inferiors.h (struct process_info): Rename member "head" to "entry".
3326 * linux-low.c (delete_lwp): Update.
3327 (add_lwp): Update.
3328 (last_thread_of_process_p): Update.
3329 (kill_one_lwp_callback, linux_kill): Update.
3330 (status_pending_p_callback): Update.
3331 (wait_for_sigstop): Update. Simplify read of ptid.
3332 (start_step_over): Update.
3333 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3334 (get_lwp_thread): Update.
3335 (struct lwp_info): Rename member "head" to "entry".
3336 * regcache.h (inferior_list_entry): Delete.
3337 * server.c (kill_inferior_callback): Update.
3338 (detach_or_kill_inferior_callback): Update.
3339 (print_started_pid): Update.
3340 (print_attached_pid): Update.
3341 (process_serial_event): Simplify read of ptid.
3342 * thread-db.c (thread_db_create_event): Update.
3343 (thread_db_get_tls_address): Update.
3344 * win32-low.c (current_inferior_ptid): Simplify.
3345
46917d26
TT
33462014-02-19 Tom Tromey <tromey@redhat.com>
3347
3348 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3349 argument.
3350 (target_supports_btrace): Update.
3351
0759a81e
YQ
33522014-02-14 Yao Qi <yao@codesourcery.com>
3353
3354 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3355 (rsp-low-ipa.o): New target.
3356
a7191e8b
TT
33572014-02-12 Tom Tromey <tromey@redhat.com>
3358
3359 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3360 convert_ascii_to_int.
3361 * regcache.c (registers_to_string): Likewise.
3362 * remote-utils.c (decode_M_packet): Likewise.
3363 * server.c (process_serial_event): Likewise.
3364
ff0e980e
TT
33652014-02-12 Tom Tromey <tromey@redhat.com>
3366
3367 * server.c (handle_query, handle_v_run): Use hex2bin, not
3368 unhexify.
3369 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3370
e9371aff
TT
33712014-02-12 Tom Tromey <tromey@redhat.com>
3372
3373 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3374 convert_int_to_ascii.
3375 * regcache.c (registers_to_string, collect_register_as_string):
3376 Likewise.
3377 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3378 Likewise.
3379 * server.c (process_serial_event): Likewise.
3380 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3381 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3382
971dc0b8
TT
33832014-02-12 Tom Tromey <tromey@redhat.com>
3384
3385 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3386 bin2hex, not hexify.
3387 * tracepoint.c (cmd_qtstatus): Likewise.
3388
0a822afb
TT
33892014-02-12 Tom Tromey <tromey@redhat.com>
3390
3391 * remote-utils.c (monitor_output): Pass explicit length to
3392 hexify.
3393
9c3d6531
TT
33942014-02-12 Tom Tromey <tromey@redhat.com>
3395
3396 * tracepoint.c: Include rsp-low.h.
3397 * server.c: Include rsp-low.h.
3398 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3399 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3400 declare.
3401 * remote-utils.c: Include rsp-low.h.
3402 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3403 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3404 (convert_int_to_ascii, convert_ascii_to_int): Move to
3405 common/rsp-low.c.
3406 * regcache.c: Include rsp-low.h.
3407 * ax.c: Include rsp-low.h.
3408 * Makefile.in (SFILES): Add common/rsp-low.c.
3409 (OBS): Add rsp-low.o.
3410 (rsp-low.o): New target.
3411
01fd3ea5
TT
34122014-02-12 Tom Tromey <tromey@redhat.com>
3413
3414 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3415 Include print-utils.h.
3416 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3417 (plongest, thirty_two, phex_nz): Remove.
3418 * Makefile.in (SFILES): Add common/print-utils.c.
3419 (OBS): Add print-utils.o.
3420 (print-utils-ipa.o): New target.
3421 (print-utils.o): New target.
3422 (IPA_OBJS): Add print-utils-ipa.o.
3423
e99dc820
TT
34242014-02-06 Tom Tromey <tromey@redhat.com>
3425
3426 * Makefile.in (SFILES): Fix indentation.
3427
ee1e2d4f
DE
34282014-02-05 Doug Evans <dje@google.com>
3429
3430 * linux-low.c (linux_wait_for_event): Improve comment.
3431 (linux_wait_1): Keep current_inferior in sync with event_child.
3432
f5a02773
DE
34332014-01-22 Doug Evans <dje@google.com>
3434
3435 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3436
87ce2a04
DE
34372014-01-22 Doug Evans <dje@google.com>
3438
3439 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3440 * configure: Regenerate.
3441 * config.in: Regenerate.
3442 * Makefile.in (SFILES): Add debug.c.
3443 (OBS): Add debug.o.
3444 * debug.c: New file.
3445 * debug.h: New file.
3446 * linux-aarch64-low.c (*): Update all debugging printfs to use
3447 debug_printf instead of fprintf.
3448 * linux-arm-low.c (*): Ditto.
3449 * linux-cris-low.c (*): Ditto.
3450 * linux-crisv32-low.c (*): Ditto.
3451 * linux-m32r-low.c (*): Ditto.
3452 * linux-sparc-low.c (*): Ditto.
3453 * linux-x86.c (*): Ditto.
3454 * linux-low.c (*): Ditto.
3455 (linux_wait_1): Add calls to debug_enter, debug_exit.
3456 (linux_wait): Remove redundant debugging printf.
3457 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3458 (linux_resume, unstop_all_lwps): Ditto.
3459 * mem-break.c (*): Update all debugging printfs to use
3460 debug_printf instead of fprintf.
3461 * remote-utils.c (*): Ditto.
3462 * thread-db.c (*): Ditto.
3463 * server.c #include <ctype.h>, "gdb_vecs.h".
3464 (debug_threads): Moved to debug.c.
3465 (*): Update all debugging printfs to use debug_printf instead of
3466 fprintf.
3467 (start_inferior): Replace call to fflush with call to debug_flush.
3468 (monitor_show_help): Mention set debug-format.
3469 (parse_debug_format_options): New function.
3470 (handle_monitor_command): Handle "monitor set debug-format".
3471 (gdbserver_usage): Mention --debug-format.
3472 (main): Parse --debug-format.
3473 * server.h (debug_threads): Declaration moved to debug.h.
3474 #include "debug.h".
3475 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3476 trace_debug_1 that uses debug_printf.
3477 (tracepoint_look_up_symbols): Update all debugging printfs to use
3478 debug_printf instead of fprintf.
3479
e671835b
BS
34802014-01-20 Baruch Siach <baruch@tkos.co.il>
3481
3482 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3483 sys/ptrace.h.
3484
b5737fa9
PA
34852014-01-17 Pedro Alves <palves@redhat.com>
3486
ea38d2a9 3487 PR build/16445
c7faa97a
PA
3488 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3489 defined after including gdb_proc_service.h.
b5737fa9 3490
40ed484e
DE
34912014-01-16 Doug Evans <dje@google.com>
3492
3493 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3494 (match_dll): Use it.
3495
969c39fb
MM
34962014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3497
3498 * target.h (target_ops) <read_btrace>: Change parameters and
3499 return type to allow error reporting.
3500 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3501 trace reading errors on.
3502 * linux-low.c (linux_low_read_btrace): Pass trace reading
3503 errors on.
3504 (linux_low_disable_btrace): New.
3505
ab7f45ba
DE
35062014-01-15 Doug Evans <dje@google.com>
3507
3508 * inferiors.c (thread_id_to_gdb_id): Delete.
3509 * inferiors.h (thread_id_to_gdb_id): Delete.
3510
66af0f44
EZ
35112014-01-13 Eli Zaretskii <eliz@gnu.org>
3512
3513 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3514 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3515 versions.
3516
9939e131
PA
35172014-01-08 Pedro Alves <palves@redhat.com>
3518
3519 * server.c (handle_status): Don't discard previous queued stop
3520 replies or thread's pending status here.
3521 (main) <disconnection>: Do it here instead.
3522
b7ea362b
PA
35232014-01-08 Pedro Alves <palves@redhat.com>
3524
3525 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3526 * server.c (visit_actioned_threads, handle_pending_status): New
3527 function.
3528 (handle_v_cont): Factor out parts to ...
3529 (resume): ... this new function. If in all-stop, and a thread
3530 being resumed has a pending status, report it without actually
3531 resuming.
3532 (myresume): Adjust to use the new 'resume' function.
3533 (clear_pending_status_callback, set_pending_status_callback)
3534 (find_status_pending_thread_callback): New functions.
3535 (handle_status): Handle the case of multiple threads having
3536 interesting statuses to report. Report threads' real last signal
3537 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3538 with an interesting thread to report the status for, instead of
3539 always reporting the status of the first thread.
3540
28498c42
JB
35412014-01-01 Joel Brobecker <brobecker@adacore.com>
3542
3543 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3544 * gdbreplay.c (gdbreplay_version): Likewise.
3545
f45c82da
YZ
35462013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3547
3548 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3549 iov.iov_len with the real length in use.
3550
379a5e2d
JB
35512013-12-13 Joel Brobecker <brobecker@adacore.com>
3552
3553 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3554 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3555 for all targets that use win32-low.c.
3556 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3557 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3558
4210d83e
PA
35592013-12-13 Pedro Alves <palves@redhat.com>
3560
3561 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3562 if equal to TARGET_WAITKIND_LOADED.
3563 * win32-low.c (cached_status): New static global.
3564 (win32_wait): Add declaration.
3565 (do_initial_child_stuff): Flush all initial pending debug events
3566 up to the initial breakpoint.
3567 (win32_wait): If CACHED_STATUS was set, return that instead
3568 of doing a real wait. Remove the code resuming the execution
3569 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3570 during the initial phase. Also remove the code changing
3571 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3572 TARGET_WAITKIND_STOPPED.
3573
e7f0d979
YQ
35742013-12-11 Yao Qi <yao@codesourcery.com>
3575
3576 * notif.c (handle_notif_ack): Return 0 if no notification
3577 matches.
3578
ebcf782c
DE
35792013-11-20 Doug Evans <dje@google.com>
3580
3581 * linux-low.c (linux_set_resume_request): Fix comment.
3582
20ad9378
DE
35832013-11-20 Doug Evans <dje@google.com>
3584
3585 * linux-low.c (resume_status_pending_p): Tweak comment.
3586
a196ebeb
WT
35872013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3588
3589 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3590 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3591 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3592 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3593 (srv_amd64_regobj): Add amd64-mpx.o.
3594 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3595 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3596 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3597 * i387-fp.c (num_pl_bnd_register) Added constant.
3598 (num_pl_bnd_cfg_registers) Added constant.
3599 (struct i387_xsave) Added reserved area and MPX fields.
3600 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3601 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3602 function.
3603 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3604 (init_registers_amd64_mpx_linux): Declare new function.
3605 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3606 (x86_64_regmap): Add MPX registers.
3607 (x86_linux_read_description): Add MPX case.
3608 (initialize_low_arch): Initialize MPX targets.
3609
0080a2f6
TT
36102013-11-18 Tom Tromey <tromey@redhat.com>
3611
3612 * configure: Rebuild.
3613 * configure.ac: Don't check for stdlib.h.
3614 * gdbreplay.c: Unconditionally include stdlib.h.
3615
2978b111
TT
36162013-11-18 Tom Tromey <tromey@redhat.com>
3617
3618 * config.in: Rebuild.
3619 * configure: Rebuild.
3620 * configure.ac: Don't use AC_HEADER_DIRENT.
3621
a3d08894
TT
36222013-11-18 Tom Tromey <tromey@redhat.com>
3623
3624 * server.h: Don't check HAVE_STRING_H.
3625 * gdbreplay.c: Don't check HAVE_STRING_H.
3626 * configure: Rebuild.
3627
0a5dd17d
TT
36282013-11-18 Tom Tromey <tromey@redhat.com>
3629
3630 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3631 LIBGNU.
3632
1bd2f0ba
TT
36332013-11-08 Tom Tromey <tromey@redhat.com>
3634
3635 * configure, config.in: Rebuild.
3636 * configure.ac: Remove unused configury.
3637
3266f10b
TT
36382013-11-08 Tom Tromey <tromey@redhat.com>
3639
3640 * acinclude.m4: Include common.m4, codeset.m4.
3641 * configure, config.in: Rebuild.
3642 * configure.ac: Use GDB_AC_COMMON.
3643
6682d959
AA
36442013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3645
3646 * linux-s390-low.c (HWCAP_S390_TE): New define.
3647 (s390_arch_setup): Consider the TE field in the HWCAP for
3648 determining 'have_regset_tdb'.
3649
fd0a4d76
SDJ
36502013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3651
3652 PR gdb/16014
3653 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3654 call to sizeof.
3655
1a3d890b
PA
36562013-10-02 Pedro Alves <palves@redhat.com>
3657
3658 * server.c (process_serial_event): Don't output "GDBserver
3659 exiting" if GDB is connected through stdio.
3660 * target.c (mywait): Likewise, be silent if GDB is connected
3661 through stdio.
3662
97ad4581
JB
36632013-10-01 Joel Brobecker <brobecker@adacore.com>
3664
3665 * lynx-low.c (lynx_add_threads_after_attach): New function.
3666 (lynx_attach): Remove call to add_thread. Add call to
3667 lynx_add_threads_after_attach instead.
3668
5b4e221c
MF
36692013-09-28 Mike Frysinger <vapier@gentoo.org>
3670
3671 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3672 * config.in, configure: Regenerated.
3673
ee47b2f8
YQ
36742013-09-18 Yao Qi <yao@codesourcery.com>
3675
3676 PR server/15959
3677 * server.c (start_inferior): Clear 'resume_info'.
3678
d6707650 36792013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3680
d6707650
JW
3681 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3682 for each register.
3683
9243dd0e 36842013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3685
9243dd0e
JW
3686 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3687 linux-tile-low.o to srv_tgtobj.
3688
c623a6ef
WN
36892013-09-16 Will Newton <will.newton@linaro.org>
3690
3691 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3692 out regs.
3693
fb71d39e
PA
36942013-09-06 Pedro Alves <palves@redhat.com>
3695
3696 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3697 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3698 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3699 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3700 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3701 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3702
8e7e9910
PA
37032013-09-06 Pedro Alves <palves@redhat.com>
3704
3705 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3706 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3707
7c3a12ca
PA
37082013-09-06 Pedro Alves <palves@redhat.com>
3709
3710 * linux-amd64-ipa.c: Include tracepoint.h.
3711 * linux-i386-ipa.c: Include tracepoint.h.
3712
8eb3d7b6
RW
37132013-09-06 Ricard Wanderlof <ricardw@axis.com>
3714
3715 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3716 (ps_get_thread_area): New function.
3717
eddddb9d
RW
37182013-09-06 Ricard Wanderlof <ricardw@axis.com>
3719
3720 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3721 (initialize_low_arch): Call init_registers_crisv32 rather than
3722 init_register_crisv32.
3723
533b0600
PA
37242013-09-05 Pedro Alves <palves@redhat.com>
3725
3726 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3727 to ...
3728 * hostio.h: ... this new file.
3729 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3730 win32-low.c: Include hostio.h.
3731
0ce3d3b5
PA
37322013-09-05 Pedro Alves <palves@redhat.com>
3733
3734 * server.h (gdb_client_data, handler_func, callback_handler_func)
3735 (delete_file_handler, add_file_handler, append_callback_event)
3736 (delete_callback_event, start_event_loop, initialize_event_loop):
3737 Move to event-loop.h and include it.
3738 * event-loop.h: New file.
3739
799cdc37
PA
37402013-09-05 Pedro Alves <palves@redhat.com>
3741
3742 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3743 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3744 (loaded_dll, unloaded_dll): Move to ...
3745 * dll.h: ... this new file.
3746 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3747
6a6bbd9d
PA
37482013-09-05 Pedro Alves <palves@redhat.com>
3749
3750 * server.h (current_process, get_thread_process, all_processes)
3751 (add_inferior_to_list, for_each_inferior, current_inferior)
3752 (remove_inferior, add_process, remove_process, find_process_pid)
3753 (have_started_inferiors_p, have_attached_inferiors_p)
3754 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3755 (clear_inferiors, find_inferior, find_inferior_id)
3756 (inferior_target_data, set_inferior_target_data)
3757 (inferior_regcache_data, set_inferior_regcache_data): Move to
3758 inferiors.h, and include it.
3759 * inferiors.h: New file.
3760
f699aaba
PA
37612013-09-05 Pedro Alves <palves@redhat.com>
3762
3763 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3764 Move ...
72f4393d 3765 * ax.h: ... here.
f699aaba 3766
c144c7a0
PA
37672013-09-05 Pedro Alves <palves@redhat.com>
3768
3769 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3770 tracepoint.h.
3771 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3772 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3773 (handle_tracepoint_general_set, handle_tracepoint_query)
3774 (tracepoint_finished_step, tracepoint_was_hit)
3775 (release_while_stepping_state_list, current_traceframe)
3776 (in_readonly_region, traceframe_read_mem)
3777 (fetch_traceframe_registers, traceframe_read_sdata)
3778 (traceframe_read_info, struct fast_tpoint_collect_status)
3779 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3780 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3781 (supply_fast_tracepoint_registers)
3782 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3783 (ipa_tdesc, claim_trampoline_space)
3784 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3785 (agent_mem_read, agent_get_trace_state_variable_value)
3786 (agent_set_trace_state_variable_value, agent_tsv_read)
3787 (agent_mem_read_string, get_raw_reg_func_addr)
3788 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3789 * tracepoint.h: ... this new file.
3790
ff42e6ab
PA
37912013-09-05 Pedro Alves <palves@redhat.com>
3792
3793 * server.h (perror_with_name, error, fatal, warning, paddress)
3794 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3795 include it.
3796 * utils.h: New file.
3797
541af0f4
PA
37982013-09-05 Pedro Alves <palves@redhat.com>
3799
3800 * server.h (remote_debug, noack_mode, transport_is_reliable)
3801 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3802 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3803 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3804 (write_enn, initialize_async_io, enable_async_io)
3805 (disable_async_io, check_remote_input_interrupt_request)
3806 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3807 (dead_thread_notify, prepare_resume_reply)
3808 (decode_address_to_semicolon, decode_address, decode_m_packet)
3809 (decode_M_packet, decode_X_packet, decode_xfer_write)
3810 (decode_search_memory_packet, unhexify, hexify)
3811 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3812 (look_up_one_symbol, relocate_instruction)
3813 (monitor_output): Move to remote-utils.h, and include it.
3814 * remote-utils.h: New file.
3815
eebdf26b
PA
38162013-09-05 Pedro Alves <palves@redhat.com>
3817
3818 * server.h (_): Delete.
3819
3aafd2ff
PA
38202013-09-02 Pedro Alves <palves@redhat.com>
3821
3822 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3823 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3824 allocated.
3825 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3826
cee83bcb
PM
38272013-09-02 Pierre Muller <muller@sourceware.org>
3828
3829 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3830 or WriteProcessMemory complete successfully and handle
3831 ERROR_PARTIAL_COPY error.
3832
9a13b2fa
PA
38332013-09-02 Pedro Alves <palves@redhat.com>
3834
3835 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3836 error instead of EIO.
3837
602e3198
JK
38382013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3839
3840 PR server/15604
3841 * linux-low.c: Include filestuff.h.
3842 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3843 * lynx-low.c: Include filestuff.h.
3844 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3845 * server.c: Include filestuff.h.
3846 (main): Call notice_open_fds.
3847 * spu-low.c: Include filestuff.h.
3848 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3849
96d7229d
LM
38502013-08-22 Luis Machado <lgustavo@codesourcery.com>
3851
3852 * Makefile.in: Explain why ../target and ../nat are not
3853 listed as include file search paths.
3854 (linux-waitpid.o): New object file rule.
3855 * configure.srv (srv_native_linux_obj): New variable.
3856 Replace all occurrences of linux native object files with
3857 $srv_native_linux_obj.
3858 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3859 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3860 (linux_enable_event_reporting): Remove declaration.
3861 (my_waitpid): Moved to common/linux-waitpid.c.
3862 (linux_wait_for_event): Pass ptid when calling
3863 linux_enable_event_reporting.
3864 (linux_supports_tracefork_flag): Remove.
3865 (linux_enable_event_reporting): Likewise.
3866 (linux_tracefork_grandchild): Remove.
3867 (STACK_SIZE): Moved to common/linux-ptrace.c.
3868 (linux_tracefork_child): Remove.
3869 (linux_test_for_tracefork): Remove.
3870 (linux_look_up_symbols): Call linux_supports_traceclone.
3871 (initialize_low): Remove call to linux_test_for_tracefork.
3872 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3873 common/linux-ptrace.h.
3874 (PTRACE_TYPE_ARG4): Likewise.
3875 Include linux-ptrace.h.
3876
32940073
PA
38772013-08-21 Pedro Alves <palves@redhat.com>
3878
3879 * config.in: Renegerate.
3880
33b60d58 38812013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3882
33b60d58
LM
3883 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3884 (SFILES): Remove $(srcdir)/common/target-common.c and
3885 add $(srcdir)/target/waitstatus.c.
3886 (OBS): Remove target-common.o and add waitstatus.o.
3887 (server_h): Remove $(srcdir)/../common/target-common.h and
3888 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3889 and $(srcdir)/../target/waitstatus.h.
3890 (target-common.o): Remove.
3891 (waitstatus.o): New target object file.
3892 * target.h: Do not include target-common.h and
3893 include target/resume.h, target/wait.h and
3894 target/waitstatus.h.
3895
b8e1b30e
LM
38962013-08-13 Luis Machado <lgustavo@codesourcery.com>
3897
3898 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3899 to PTRACE_TYPE_ARG3.
3900 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3901 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3902 PTRACE_TYPE_ARG4.
3903 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3904 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3905
7a60ad40
YQ
39062013-07-27 Jie Zhang <jie@codesourcery.com>
3907 Daniel Jacobowitz <dan@codesourcery.com>
3908 Yao Qi <yao@codesourcery.com>
3909
3910 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3911 (mips-linux-watch.o): New rule.
3912 (mips_linux_watch_h): New variable.
3913 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3914 srv_tgtobj.
3915 * linux-mips-low.c: Include mips-linux-watch.h.
3916 (struct arch_process_info, struct arch_lwp_info): New.
3917 (update_watch_registers_callback): New function.
3918 (mips_linux_new_process, mips_linux_new_thread) New functions.
3919 (mips_linux_prepare_to_resume, mips_insert_point): New
3920 functions.
3921 (mips_remove_point, mips_stopped_by_watchpoint): New
3922 functions.
3923 (rsp_bp_type_to_target_hw_bp_type): New function.
3924 (mips_stopped_data_address): New function.
3925 (the_low_target): Add watchpoint support functions.
3926
de6f69ad
YQ
39272013-07-27 Yao Qi <yao@codesourcery.com>
3928
3929 * i386-low.c: Include break-common.h.
3930 (enum target_hw_bp_type): Remove.
3931
3360c0bf
LM
39322013-07-24 Luis Machado <lgustavo@codesourcery.com>
3933
3934 * Makefile.in (SFILES): /common/target-common.c.
3935 (OBS): Add target-common.o.
3936 (server_h): Add $(srcdir)/../common/target-common.h.
3937 (target-common.o): New target.
3938 * server.c (queue_stop_reply_callback): Free
3939 status string after use.
3940 * target.c (target_waitstatus_to_string): Remove.
3941 * target.h: Include target-common.h.
3942 (resume_kind): Likewise.
3943 (target_waitkind): Likewise.
3944 (target_waitstatus): Likewise.
3945 (TARGET_WNOHANG): Likewise.
3946
bd885420
YQ
39472013-07-04 Yao Qi <yao@codesourcery.com>
3948
3949 * Makefile.in (host_alias): Use @host_noncanonical@.
3950 (target_alias): Use @target_noncanonical@.
3951 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3952 ACX_NONCANONICAL_HOST.
3953 * configure: Regenerated.
3954
3955 Revert:
3956 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3957
3958 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3959 * configure: Rebuild.
3960 * Makefile.in (version_host, version_target): Get from configure.
3961 (version.c): Use $(version_host) and $(version_target).
3962
17ef446e
PA
39632013-07-03 Pedro Alves <palves@redhat.com>
3964
3965 * Makefile.in (config.status): Depend on development.sh.
3966 * acinclude.m4: Include libmcheck.m4.
3967 * configure: Regenerate.
3968
7a9a7487
MG
39692013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3970
3971 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3972 attribute inside the parentheses.
3973 (winapi_DebugSetProcessKillOnExit): Ditto.
3974 (winapi_DebugBreakProcess): Ditto.
3975 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3976
49b64de6
MG
39772013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3978
3979 * notif.h (notif_event): Add a dummy member to avoid compiler
3980 errors.
3981
d5749ee7
PA
39822013-07-01 Pedro Alves <palves@redhat.com>
3983
3984 * hostio.c (HOSTIO_PATH_MAX): Define.
3985 (require_filename, handle_open, handle_unlink, handle_readlink):
3986 Use it.
3987
d8d2a3ee
PA
39882013-07-01 Pedro Alves <palves@redhat.com>
3989
3990 * server.h: Include "pathmax.h".
3991 * linux-low.c: Don't include sys/param.h.
3992 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3993 MAXPATHLEN.
3994 * win32-low.c: Don't include sys/param.h.
3995 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3996
bc7dea8d
PA
39972013-07-01 Pedro Alves <palves@redhat.com>
3998
3999 * event-loop.c: Don't check HAVE_UNISTD_H before including
4000 <unistd.h>.
4001 * gdbreplay.c: Likewise.
4002 * remote-utils.c: Likewise.
4003 * server.c: Likewise.
4004 * configure.ac: Don't check for unistd.h.
4005 * configure: Regenerate.
4006
d6c2da54
TT
40072013-06-28 Tom Tromey <tromey@redhat.com>
4008
4009 * Makefile.in (version.c): Use version.in, not
4010 common/version.in.
4011
257b6bec
MG
40122013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4013
4014 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4015 * configure: Rebuild.
4016 * Makefile.in (version_host, version_target): Get from configure.
4017 (version.c): Use $(version_host) and $(version_target).
4018
86ebe149
DK
40192013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4020
4021 Fix trace-status to output user name without trailing colon.
4022 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4023
f30aa5af
DK
40242013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4025
4026 Fix trace-status to output proper start-time and stop-time.
4027 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4028 output start time and stop time in hex as gdb expects.
4029
28a93511
YQ
40302013-06-26 Pedro Alves <pedro@codesourcery.com>
4031
4032 * tracepoint.c (build_traceframe_info_xml): Output trace state
4033 variables present in the trace buffer.
4034
01208463
TT
40352013-06-24 Tom Tromey <tromey@redhat.com>
4036
4037 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4038 create-version.sh.
4039 (version.o): Remove.
4040 * gdbreplay.c: Include version.h.
4041 (version, host_name): Don't declare.
4042 * server.h: Include version.h.
4043 (version, host_name): Don't declare.
4044
760256f9
PA
40452013-06-12 Pedro Alves <palves@redhat.com>
4046
4047 * linux-x86-low.c (linux_is_elf64): Delete global.
4048 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4049 with local linux_pid_exe_is_elf_64_file use.
4050
030031ee
PA
40512013-06-11 Pedro Alves <palves@redhat.com>
4052
4053 * linux-low.c (regset_disabled, disable_regset): New functions.
4054 (regsets_fetch_inferior_registers)
4055 (regsets_store_inferior_registers): Use them.
4056 (initialize_regsets_info); Don't allocate the disabled_regsets
4057 array here.
4058 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4059 comment.
4060
5da6eb0a
PA
40612013-06-11 Pedro Alves <palves@redhat.com>
4062
4063 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4064 xmalloc.
4065
7e5aaa09
PA
40662013-06-11 Pedro Alves <palves@redhat.com>
4067
4068 * linux-x86-low.c (initialize_low_arch): Call
4069 init_registers_x32_avx_linux.
4070
d878444c
JK
40712013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4072
4073 Fix compatibility with Android Bionic.
4074 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4075 it is not empty.
4076
3aee8918
PA
40772013-06-07 Pedro Alves <palves@redhat.com>
4078
5f2b57b5 4079 PR server/14823
3aee8918
PA
4080 * Makefile.in (OBS): Add tdesc.o.
4081 (IPA_OBJS): Add tdesc-ipa.o.
4082 (tdesc-ipa.o): New rule.
4083 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4084 interface.
4085 * linux-low.c (new_inferior): Delete.
4086 (disabled_regsets, num_regsets): Delete.
4087 (linux_add_process): Adjust to set the new per-process
4088 new_inferior flag.
4089 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4090 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4091 was a stop. When calling arch_setup, switch the current inferior
4092 to the thread that got an event.
4093 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4094 (regsets_fetch_inferior_registers)
4095 (regsets_store_inferior_registers): New regsets_info parameter.
4096 Adjust to use it.
4097 (linux_register_in_regsets): New regs_info parameter. Adjust to
4098 use it.
4099 (register_addr, fetch_register, store_register): New usrregs_info
4100 parameter. Adjust to use it.
4101 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4102 parameter regs_info. Adjust to use it.
4103 (linux_fetch_registers): Get the current inferior's regs_info, and
4104 adjust to use it.
4105 (linux_store_registers): Ditto.
4106 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4107 (initialize_low): Don't initialize the target_regsets here. Call
4108 initialize_low_arch.
4109 * linux-low.h (target_regsets): Delete declaration.
4110 (struct regsets_info): New.
4111 (struct usrregs_info): New.
4112 (struct regs_info): New.
4113 (struct process_info_private) <new_inferior>: New field.
4114 (struct linux_target_ops): Delete the num_regs, regmap, and
4115 regset_bitmap fields. New field regs_info.
4116 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4117 * i387-fp.c (num_xmm_registers): Delete.
4118 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4119 calls to new interface.
4120 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4121 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4122 Infer the number of xmm registers from the regcache's target
4123 description.
4124 * i387-fp.h (num_xmm_registers): Delete.
4125 * inferiors.c (add_thread): Don't install the thread's regcache
4126 here.
4127 * proc-service.c (gregset_info): Fetch the current inferior's
4128 regs_info. Adjust to use it.
4129 * regcache.c: Include tdesc.h.
4130 (register_bytes, reg_defs, num_registers)
4131 (gdbserver_expedite_regs): Delete.
4132 (get_thread_regcache): If the thread doesn't have a regcache yet,
4133 create one, instead of aborting gdbserver.
4134 (regcache_invalidate_one): Rename to ...
4135 (regcache_invalidate_thread): ... this.
4136 (regcache_invalidate_one): New.
4137 (regcache_invalidate): Only invalidate registers of the current
4138 process.
4139 (init_register_cache): Add target_desc parameter, and use it.
4140 (new_register_cache): Ditto. Assert the target description has a
4141 non zero registers_size.
4142 (regcache_cpy): Add assertions. Adjust.
4143 (realloc_register_cache, set_register_cache): Delete.
4144 (registers_to_string, registers_from_string): Adjust.
4145 (find_register_by_name, find_regno, find_register_by_number)
4146 (register_cache_size): Add target_desc parameter, and use it.
4147 (free_register_cache_thread, free_register_cache_thread_one)
4148 (regcache_release, register_cache_size): New.
4149 (register_size): Add target_desc parameter, and use it.
4150 (register_data, supply_register, supply_register_zeroed)
4151 (supply_regblock, supply_register_by_name, collect_register)
4152 (collect_register_as_string, collect_register_by_name): Adjust.
4153 * regcache.h (struct target_desc): Forward declare.
4154 (struct regcache) <tdesc>: New field.
4155 (init_register_cache, new_register_cache): Add target_desc
4156 parameter.
4157 (regcache_invalidate_thread): Declare.
4158 (regcache_invalidate_one): Delete declaration.
4159 (regcache_release): Declare.
4160 (find_register_by_number, register_cache_size, register_size)
4161 (find_regno): Add target_desc parameter.
4162 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4163 declarations.
4164 * remote-utils.c: Include tdesc.h.
4165 (outreg, prepare_resume_reply): Adjust.
4166 * server.c: Include tdesc.h.
4167 (gdbserver_xmltarget): Delete declaration.
4168 (get_features_xml, process_serial_event): Adjust.
4169 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4170 declare.
4171 (struct process_info) <tdesc>: New field.
4172 (ipa_tdesc): Declare.
4173 * tdesc.c: New file.
4174 * tdesc.h: New file.
4175 * tracepoint.c: Include tdesc.h.
4176 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4177 (get_context_regcache): Adjust to pass ipa_tdesc down.
4178 (do_action_at_tracepoint): Adjust to get the register cache size
4179 from the context regcache's description.
4180 (traceframe_walk_blocks): Adjust to get the register cache size
4181 from the current trace frame's description.
4182 (traceframe_get_pc): Adjust to get current trace frame's
4183 description and pass it down.
4184 (gdb_collect): Adjust to get the register cache size from the
4185 IPA's description.
4186 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4187 (gdbserver_xmltarget): Delete.
4188 (initialize_low_tracepoint): Set the ipa's target description.
4189 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4190 (initialize_low_tracepoint): Set the ipa's target description.
4191 * linux-x86-low.c: Include tdesc.h.
4192 [__x86_64__] (is_64bit_tdesc): New.
4193 (ps_get_thread_area, x86_get_thread_area): Use it.
4194 (i386_cannot_store_register): Rename to ...
4195 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4196 (i386_cannot_fetch_register): Rename to ...
4197 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4198 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4199 to new interface.
4200 (target_regsets): Rename to ...
4201 (x86_regsets): ... this.
4202 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4203 interface.
4204 (x86_siginfo_fixup): Use is_64bit_tdesc.
4205 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4206 (tdesc_x32_avx_linux, tdesc_x32_linux)
4207 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4208 Declare.
4209 (x86_linux_update_xmltarget): Delete.
4210 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4211 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4212 (AMD64_LINUX_USER64_CS): New.
4213 (x86_linux_read_description): New, based on
4214 x86_linux_update_xmltarget.
4215 (same_process_callback): New.
4216 (x86_arch_setup_process_callback): New.
4217 (x86_linux_update_xmltarget): New.
4218 (x86_regsets_info): New.
4219 (amd64_linux_regs_info): New.
4220 (i386_linux_usrregs_info): New.
4221 (i386_linux_regs_info): New.
4222 (x86_linux_regs_info): New.
4223 (x86_arch_setup): Reimplement.
4224 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4225 (x86_emit_ops): Ditto.
4226 (the_low_target): Adjust. Install x86_linux_regs_info,
4227 x86_cannot_fetch_register, and x86_cannot_store_register.
4228 (initialize_low_arch): New.
4229 * linux-ia64-low.c (tdesc_ia64): Declare.
4230 (ia64_fetch_register): Adjust.
4231 (ia64_usrregs_info, regs_info): New globals.
4232 (ia64_regs_info): New function.
4233 (the_low_target): Adjust.
4234 (initialize_low_arch): New function.
4235 * linux-sparc-low.c (tdesc_sparc64): Declare.
4236 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4237 Adjust.
4238 (sparc_arch_setup): New function.
4239 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4240 (the_low_target): Adjust.
4241 (initialize_low_arch): New function.
4242 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4243 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4244 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4245 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4246 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4247 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4248 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4249 (tdesc_powerpc_isa205_vsx64l): Declare.
4250 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4251 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4252 (ppc_set_pc, ppc_get_hwcap): Adjust.
4253 (ppc_usrregs_info): Forward declare.
4254 (!__powerpc64__) ppc_regmap_adjusted: New global.
4255 (ppc_arch_setup): Adjust to the current process'es target
4256 description.
4257 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4258 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4259 (ppc_store_evrregset): Adjust.
4260 (target_regsets): Rename to ...
4261 (ppc_regsets): ... this, and make static.
4262 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4263 (ppc_regs_info): New function.
4264 (the_low_target): Adjust.
4265 (initialize_low_arch): New function.
4266 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4267 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4268 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4269 (tdesc_s390x_linux64v2): Declare.
4270 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4271 (s390_fill_gregset, s390_store_last_break): Adjust.
4272 (target_regsets): Rename to ...
4273 (s390_regsets): ... this, and make static.
4274 (s390_get_pc, s390_set_pc): Adjust.
4275 (s390_get_hwcap): New target_desc parameter, and use it.
4276 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4277 (s390_arch_setup): Adjust to set the current process'es target
4278 description. Don't adjust the regmap.
4279 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4280 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4281 (regs_info_3264): New globals.
4282 (s390_regs_info): New function.
4283 (the_low_target): Adjust.
4284 (initialize_low_arch): New function.
4285 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4286 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4287 [__mips64] (init_registers_mips_linux)
4288 (init_registers_mips_dsp_linux): Delete defines.
4289 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4290 (have_dsp): New global.
4291 (mips_read_description): New, based on mips_arch_setup.
4292 (mips_arch_setup): Reimplement.
4293 (get_usrregs_info): New function.
4294 (mips_cannot_fetch_register, mips_cannot_store_register)
4295 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4296 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4297 (target_regsets): Rename to ...
4298 (mips_regsets): ... this, and make static.
4299 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4300 (dsp_regs_info, regs_info): New globals.
4301 (mips_regs_info): New function.
4302 (the_low_target): Adjust.
4303 (initialize_low_arch): New function.
4304 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4305 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4306 Declare.
4307 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4308 (arm_read_description): New, with bits factored from
4309 arm_arch_setup.
4310 (arm_arch_setup): Reimplement.
4311 (target_regsets): Rename to ...
4312 (arm_regsets): ... this, and make static.
4313 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4314 (arm_regs_info): New function.
4315 (the_low_target): Adjust.
4316 (initialize_low_arch): New function.
4317 * linux-m68k-low.c (tdesc_m68k): Declare.
4318 (target_regsets): Rename to ...
4319 (m68k_regsets): ... this, and make static.
4320 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4321 (m68k_regs_info): New function.
4322 (m68k_arch_setup): New function.
4323 (the_low_target): Adjust.
4324 (initialize_low_arch): New function.
4325 * linux-sh-low.c (tdesc_sharch): Declare.
4326 (target_regsets): Rename to ...
4327 (sh_regsets): ... this, and make static.
4328 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4329 (sh_regs_info, sh_arch_setup): New functions.
4330 (the_low_target): Adjust.
4331 (initialize_low_arch): New function.
4332 * linux-bfin-low.c (tdesc_bfin): Declare.
4333 (bfin_arch_setup): New function.
4334 (bfin_usrregs_info, regs_info): New globals.
4335 (bfin_regs_info): New function.
4336 (the_low_target): Adjust.
4337 (initialize_low_arch): New function.
4338 * linux-cris-low.c (tdesc_cris): Declare.
4339 (cris_arch_setup): New function.
4340 (cris_usrregs_info, regs_info): New globals.
4341 (cris_regs_info): New function.
4342 (the_low_target): Adjust.
4343 (initialize_low_arch): New function.
4344 * linux-cris-low.c (tdesc_crisv32): Declare.
4345 (cris_arch_setup): New function.
4346 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4347 (cris_regs_info): New function.
4348 (the_low_target): Adjust.
4349 (initialize_low_arch): New function.
4350 * linux-m32r-low.c (tdesc_m32r): Declare.
4351 (m32r_arch_setup): New function.
4352 (m32r_usrregs_info, regs_info): New globals.
4353 (m32r_regs_info): Adjust.
4354 (initialize_low_arch): New function.
4355 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4356 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4357 (tic6x_usrregs_info): Forward declare.
4358 (tic6x_read_description): New function, based on ...
4359 (tic6x_arch_setup): ... this. Reimplement.
4360 (target_regsets): Rename to ...
4361 (tic6x_regsets): ... this, and make static.
4362 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4363 (tic6x_regs_info): New function.
4364 (the_low_target): Adjust.
4365 (initialize_low_arch): New function.
4366 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4367 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4368 (target_regsets): Rename to ...
4369 (xtensa_regsets): ... this, and make static.
4370 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4371 globals.
4372 (xtensa_arch_setup, xtensa_regs_info): New functions.
4373 (the_low_target): Adjust.
4374 (initialize_low_arch): New function.
4375 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4376 (nios2_arch_setup): Set the current process'es tdesc.
4377 (target_regsets): Rename to ...
4378 (nios2_regsets): ... this.
4379 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4380 (nios2_regs_info): New function.
4381 (the_low_target): Adjust.
4382 (initialize_low_arch): New function.
a261b8f5
PA
4383 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4384 (aarch64_arch_setup): Set the current process'es tdesc.
4385 (target_regsets): Rename to ...
4386 (aarch64_regsets): ... this.
4387 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4388 (aarch64_regs_info): New function.
4389 (the_low_target): Adjust.
4390 (initialize_low_arch): New function.
3aee8918
PA
4391 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4392 globals.
4393 (target_regsets): Rename to ...
4394 (tile_regsets): ... this.
4395 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4396 (tile_regs_info): New function.
4397 (tile_arch_setup): Set the current process'es tdesc.
4398 (the_low_target): Adjust.
4399 (initialize_low_arch): New function.
4400 * spu-low.c (tdesc_spu): Declare.
4401 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4402 * win32-arm-low.c (tdesc_arm): Declare.
4403 (arm_arch_setup): New function.
4404 (the_low_target): Install arm_arch_setup instead of
4405 init_registers_arm.
4406 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4407 (init_windows_x86): Rename to ...
4408 (i386_arch_setup): ... this. Set `win32_tdesc'.
4409 (the_low_target): Adjust.
4410 * win32-low.c (win32_tdesc): New global.
4411 (child_add_thread): Don't create the thread cache here.
4412 (do_initial_child_stuff): Set the new process'es tdesc.
4413 * win32-low.h (struct target_desc): Forward declare.
4414 (win32_tdesc): Declare.
4415 * lynx-i386-low.c (tdesc_i386): Declare global.
4416 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4417 * lynx-low.c (lynx_tdesc): New global.
4418 (lynx_add_process): Set the new process'es tdesc.
4419 * lynx-low.h (struct target_desc): Forward declare.
4420 (lynx_tdesc): Declare global.
4421 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4422 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4423 * nto-low.c (nto_tdesc): New global.
4424 (do_attach): Set the new process'es tdesc.
4425 * nto-low.h (struct target_desc): Forward declare.
4426 (nto_tdesc): Declare.
4427 * nto-x86-low.c (tdesc_i386): Declare.
4428 (nto_x86_arch_setup): Set `nto_tdesc'.
4429
b1fbec62
GB
44302013-06-04 Gary Benson <gbenson@redhat.com>
4431
4432 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4433 to qSupported response when appropriate.
4434 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4435 with nonzero-length annex.
4436 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4437 arguments supplied in annex.
4438
d1ec4ce7
DE
44392013-05-31 Doug Evans <dje@google.com>
4440
ac44adcb 4441 PR server/15594
d1ec4ce7
DE
4442 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4443 64 bits in 64-cross-32 environment.
4444
9b25f2d3
PA
44452013-05-28 Pedro Alves <palves@redhat.com>
4446
4447 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4448 (aarch64-without-fpu.c): Delete rule.
4449 * configure.srv (aarch64*-*-linux*): Remove references to
4450 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4451 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4452 declaration.
4453
6740dc9c
PA
44542013-05-24 Pedro Alves <palves@redhat.com>
4455
4456 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4457 instead of strchr/decode_address. Error if the range isn't split
4458 with a ','. Don't assume there's be a ':' in the action.
4459
c2d6af84
PA
44602013-05-23 Yao Qi <yao@codesourcery.com>
4461 Pedro Alves <palves@redhat.com>
4462
4463 * linux-low.c (lwp_in_step_range): New function.
4464 (linux_wait_1): If the thread was range stepping and stopped
4465 outside the stepping range, report the stop to GDB. Otherwise,
4466 continue stepping. Add range stepping debug output.
4467 (linux_set_resume_request): Copy the step range from the resume
4468 request to the lwp.
4469 (linux_supports_range_stepping): New.
4470 (linux_target_ops) <supports_range_stepping>: Set to
4471 linux_supports_range_stepping.
4472 * linux-low.h (struct linux_target_ops)
4473 <supports_range_stepping>: New field.
4474 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4475 * linux-x86-low.c (x86_supports_range_stepping): New.
4476 (the_low_target) <supports_range_stepping>: Set to
4477 x86_supports_range_stepping.
4478 * server.c (handle_v_cont): Handle 'r' action.
4479 (handle_v_requests): Append ";r" if the target supports range
4480 stepping.
4481 * target.h (struct thread_resume) <step_range_start,
4482 step_range_end>: New fields.
4483 (struct target_ops) <supports_range_stepping>:
4484 New field.
4485 (target_supports_range_stepping): New macro.
4486
58794e1a
JB
44872013-05-17 Joel Brobecker <brobecker@adacore.com>
4488
4489 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4490 confusion in comment.
4491
d631c5a7
JB
44922013-05-17 Joel Brobecker <brobecker@adacore.com>
4493
4494 * lynx-low.c (struct process_info_private): New type.
4495 (lynx_add_process): New function.
4496 (lynx_create_inferior, lynx_attach): Replace calls to
4497 add_process by calls to lynx_add_process.
4498 (lynx_resume): If PTID is null, then try using
4499 current_process()->private->last_wait_event_ptid.
4500 Add comments.
4501 (lynx_clear_inferiors): Delete. The contents of that function
4502 has been inlined in lynx_mourn;
4503 (lynx_wait_1): Save the ptid in the process's private data.
4504 (lynx_mourn): Free the process' private data. Replace call
4505 to lynx_clear_inferiors by call to clear_inferiors.
4506
96f7a20f
YQ
45072013-05-17 Yao Qi <yao@codesourcery.com>
4508
4509 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4510 the right place.
4511
db0dfaa0
LM
45122013-05-16 Luis Machado <lgustavo@codesourcery.com>
4513
4514 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4515 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4516 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4517 PT_TEXT_END_ADDR guards. Update comments.
4518 (linux_target_op) <read_offsets>: Conditionally define to
4519 linux_read_offsets if the target is UCLIBC and if it defines
4520 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4521
68f5f838
SL
45222013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4523 Andrew Jenner <andrew@codesourcery.com>
4524
4525 * Makefile.in (SFILES): Add linux-nios2-low.c.
4526 (clean): Add action to delete nios2-linux.c.
4527 (nios2-linux.c): New rule.
4528 * configure.srv: Add nios2*-*-linux*.
4529 * linux-nios2-low.c: New.
4530
1ebff1fd
HAQ
45312013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4532
4533 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4534
f6150862
HZ
45352013-04-25 Hui Zhu <hui@codesourcery.com>
4536
4537 PR gdb/15186
f6150862
HZ
4538 * ax.c (ax_printf): Add fflush.
4539
614c279d
TT
45402013-04-22 Tom Tromey <tromey@redhat.com>
4541
4542 * Makefile.in (SFILES): Add filestuff.c.
4543 (OBS): Add filestuff.o.
4544 (filestuff.o): New target.
4545 * config.in, configure: Rebuild.
4546 * configure.ac: Check for fdwalk, pipe2.
4547
7d4e5717
PA
45482013-04-17 Pedro Alves <palves@redhat.com>
4549
4550 * configure.ac (USE_THREAD_DB): Delete variable.
4551 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4552 Don't AC_SUBST USE_THREAD_DB.
4553 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4554 * config.in, configure: Regenerate.
4555
d5c93e41
PA
45562013-04-16 Pedro Alves <palves@redhat.com>
4557
4558 * linux-low.h (struct lwp_info) <thread_known>: Move under
4559 the USE_THREAD_DB #ifdef.
4560
04f5fe89
PA
45612013-04-16 Pedro Alves <palves@redhat.com>
4562
4563 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4564 (linux-low.o): Delete rule.
4565 * linux-low.h: Always include "gdb_thread_db.h" instead of
4566 conditionally including thread_db.h.
4567 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4568 HAVE_THREAD_DB_H.
4569
480b27bf
JK
45702013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4571
4572 * Makefile.in (install-only): Fix make install regression.
4573
43662968
JK
45742013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4575
4576 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4577 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4578 installation.
4579 * gdbserver.1: Remove.
4580
3e74e146
PA
45812013-03-22 Pedro Alves <palves@redhat.com>
4582
4583 * linux-low.c (handle_extended_wait): Don't call
4584 linux_enable_event_reporting.
4585
a8347a2a
TT
45862013-03-15 Tony Theodore <tonyt@logyst.com>
4587
4588 PR build/9098:
4589 * Makefile.in (SHELL): Use @SHELL@.
4590
eeb56fa7
SDJ
45912013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4592
4593 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4594 compiler warning.
4595
4fa7e2ff
JB
45962013-03-13 Joel Brobecker <brobecker@adacore.com>
4597
4598 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4599 Remove extraneous NULL element.
4600
8ddb1965
YQ
46012013-03-13 Yao Qi <yao@codesourcery.com>
4602
4603 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4604 'V' block in trace frame.
4605
9accd112
MM
46062013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4607
4608 * target.h (struct target_ops): Add btrace ops.
4609 (target_supports_btrace): New macro.
4610 (target_enable_btrace): New macro.
4611 (target_disable_btrace): New macro.
4612 (target_read_btrace): New macro.
4613 * gdbthread.h (struct thread_info): Add btrace field.
4614 * server.c: Include btrace-common.h.
4615 (handle_btrace_general_set): New function.
4616 (handle_btrace_enable): New function.
4617 (handle_btrace_disable): New function.
4618 (handle_general_set): Call handle_btrace_general_set.
4619 (handle_qxfer_btrace): New function.
4620 (struct qxfer qxfer_packets[]): Add btrace entry.
4621 * inferiors.c (remove_thread): Disable btrace.
4622 * linux-low: Include linux-btrace.h.
4623 (linux_low_enable_btrace): New function.
4624 (linux_low_read_btrace): New function.
4625 (linux_target_ops): Add btrace ops.
4626 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4627 Add srv_linux_btrace=yes.
4628 (x86_64-*-linux*): Add linux-btrace.o.
4629 Add srv_linux_btrace=yes.
4630 * configure.ac: Define HAVE_LINUX_BTRACE.
4631 * config.in: Regenerated.
4632 * configure: Regenerated.
4633
5cc22e4c
MM
46342013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4635
4636 * server.c (handle_qxfer): Preserve error message if -3 is
4637 returned.
4638 (qxfer): Document the -3 return value.
4639
7c97f91e
MM
46402013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4641
4642 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4643 (linux_btrace_h): New variable.
4644 (linux-btrace.o): New rule.
4645
be9a119c 46462013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4647 Hafiz Abid Qadeer <abidh@codesourcery.com>
4648
4649 * tracepoint.c (trace_buffer_size): New global.
4650 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4651 (init_trace_buffer): Change to one-argument function. Allocate
4652 trace buffer memory.
4653 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4654 handle QTBuffer:size packet.
4655 (cmd_bigqtbuffer_size): New function.
4656 (initialize_tracepoint): Call init_trace_buffer with
4657 DEFAULT_TRACE_BUFFER_SIZE.
4658 * server.c (handle_query): Add QTBuffer:size in the
4659 supported packets.
4660
e64f7499
YQ
46612013-03-07 Yao Qi <yao@codesourcery.com>
4662
4663 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4664 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4665 of -1.
4666 (cmd_qtsp): Adjust condition. Do post increment.
4667 Set cur_action and cur_step_action back to 0.
4668
f0ae6fc3
PA
46692013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4670
4671 PR server/15236
4672 * linux-low.c (linux_write_memory): Return early success if LEN is
4673 zero.
4674
b5b0b0af
CV
46752013-03-05 Corinna Vinschen <vinschen@redhat.de>
4676
334ad4a8 4677 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4678
589bc927
TT
46792013-02-28 Tom Tromey <tromey@redhat.com>
4680
4681 * configure.ac: Invoke AC_SYS_LARGEFILE.
4682 * configure, config.in: Rebuild.
4683
dfe07582
CV
46842013-02-28 Corinna Vinschen <vinschen@redhat.com>
4685
4686 * win32-low.c: Throughout, fix format strings and casts of
4687 printf-like functions to avoid type related warnings on all
4688 platforms.
4689 (get_child_debug_event): Print dwDebugEventCode as hex since
4690 that's how it's usually documented.
4691
736cd585
YQ
46922013-02-28 Yao Qi <yao@codesourcery.com>
4693
4694 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4695 pulongest.
4696
e1f58301
JW
46972013-02-27 Jiong Wang <jiwang@tilera.com>
4698
4699 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4700 (reg-tilegx32.c): New rule.
4701 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4702 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4703 different register info initializer according to elf class.
4704 (init_registers_tilgx32): New function. The tilegx32 register info
4705 initializer.
4706 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4707 (tile_store_gregset): Likewise.
4708
d171ca78
YQ
47092013-02-27 Yao Qi <yao@codesourcery.com>
4710
4711 * server.c (process_point_options): Print debug message when
4712 debug_threads is true.
4713
282bbdf3
YQ
47142013-02-26 Yao Qi <yao@codesourcery.com>
4715
4716 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4717
aca22551
PA
47182013-02-19 Pedro Alves <palves@redhat.com>
4719 Kai Tietz <ktietz@redhat.com>
4720
4721 PR gdb/15161
4722
4723 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4724 instead of strtoul to extract address from packet.
4725 (process_serial_event) <'z'>: Likewise.
4726
4f3cee1c
YQ
47272013-02-18 Yao Qi <yao@codesourcery.com>
4728
4729 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4730
8e1d55a3
PA
47312013-02-14 Pedro Alves <palves@redhat.com>
4732
4733 Plug memory leak.
4734
4735 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4736 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4737
458820da
PA
47382013-02-14 Pedro Alves <palves@redhat.com>
4739
4740 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4741
baea0dae
PA
47422013-02-14 Pedro Alves <palves@redhat.com>
4743
4744 * tracepoint.c (save_string): Delete.
4745 (add_tracepoint_action): Use savestring instead of save_string.
4746
0b1afbb3
PA
47472013-02-12 Pedro Alves <palves@redhat.com>
4748
4749 * linux-xtensa-low.c: Ditto.
4750 * xtensa-xtregs.c: Ditto.
4751
8a4ac37e
PA
47522013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4753
4754 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4755 thread_db.
4756
148de6bb
MS
47572013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4758
4759 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4760 aarch64_num_wp_regs and aarch64_num_bp_regs to
4761 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4762
55fac6e0
MS
47632013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4764
4765 * linux-aarch64-low.c (ps_get_thread_area): Replace
4766 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4767
176eb98c
MS
47682013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4769 Marcus Shawcroft <marcus.shawcroft@arm.com>
4770 Nigel Stephens <nigel.stephens@arm.com>
4771 Yufeng Zhang <yufeng.zhang@arm.com>
4772
4773 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4774 (aarch64.c, aarch64-without-fpu.c): New targets.
4775 * configure.srv (aarch64*-*-linux*): New.
4776 * linux-aarch64-low.c: New file.
4777
56f7af9c
MS
47782013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4779
43aaf8b6 4780 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
4781 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4782 (dequeue_one_deferred_signal, linux_resume_one_thread)
4783 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4784 (linux_tracefork_grandchild, linux_test_for_tracefork)
4785 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4786 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4787 where the argument is 0.
4788
60f662b0
YQ
47892013-01-25 Yao Qi <yao@codesourcery.com>
4790
4791 * event-loop.c: Include "queue.h".
4792 (gdb_event_p): New typedef.
4793 (struct gdb_event) <next_event>: Remove.
4794 (event_queue): Change to QUEUE(gdb_event_p).
4795 (async_queue_event): Remove.
4796 (gdb_event_xfree): New.
4797 (initialize_event_loop): New.
4798 (process_event): Use API from QUEUE.
4799 (wait_for_event): Likewise.
4800 * server.c (main): Call initialize_event_loop.
4801 * server.h (initialize_event_loop): Declare.
4802
5ae4861a
YQ
48032013-01-18 Yao Qi <yao@codesourcery.com>
4804
4805 * ax.h (struct eval_agent_expr_context): New.
4806 (gdb_eval_agent_expr): Update declaration.
4807 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4808 TFRAME. Add new argument CTX.
4809 * server.h (struct eval_agent_expr_context): Declare.
4810 (agent_mem_read, agent_tsv_read): Update declaration.
4811 (agent_mem_read_string): Likewise.
4812 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4813 (add_traceframe_block): Add new argument TPOINT.
4814 Increase TPOINT->traceframe_usage.
4815 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4816 eval_tracepoint_agent_expr.
4817 (condition_true_at_tracepoint): Likewise.
4818 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4819 (agent_mem_read_string, agent_tsv_read): Likewise.
4820
85e00e85
YQ
48212013-01-16 Yao Qi <yao@codesourcery.com>
4822
4823 * linux-low.c (linux_resume_one_lwp): Don't check
4824 'lwp->bp_reinsert != 0'.
4825
4039cf45
JB
48262013-01-07 Joel Brobecker <brobecker@adacore.com>
4827 Pedro Alves <palves@redhat.com>
4828
4829 * lynx-low.c (ptrace_request_to_str): Define a temporary
4830 macro and use it to simplify this function's implementation.
4831
9044dee2
JB
48322013-01-07 Joel Brobecker <brobecker@adacore.com>
4833
4834 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4835 sets errno.
4836
e6352c8f
JB
48372013-01-07 Joel Brobecker <brobecker@adacore.com>
4838
4839 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4840
50681a27
JB
48412013-01-07 Joel Brobecker <brobecker@adacore.com>
4842
4843 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4844
3f6e77ef
JB
48452013-01-07 Joel Brobecker <brobecker@adacore.com>
4846
4847 * lynx-low.c (lynx_resume): Use the resume_info parameter
4848 to determine the ptid for the lynx_ptrace call, unless
4849 it is equal to minus_one_ptid, in which case we use the
4850 ptid of the current_inferior.
4851 (lynx_wait_1): After having received a thread create/exit
4852 event, resume the inferior's execution using the signaling
4853 thread's ptid, rather than the old ptid.
4854
7fda33ae
JB
48552013-01-07 Joel Brobecker <brobecker@adacore.com>
4856
4857 * lynx-low.c (lynx_resume): Delete variable ret.
4858
b9786c74
JB
48592013-01-01 Joel Brobecker <brobecker@adacore.com>
4860
4861 * gdbreplay.c (gdbreplay_version): Update copyright year.
4862 * server.c (gdbserver_version): Likewise.
4863
8b93d60f
JB
48642012-12-17 Joel Brobecker <brobecker@adacore.com>
4865
4866 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4867 new thread.
4868
037335a7
JB
48692012-12-17 Joel Brobecker <brobecker@adacore.com>
4870
4871 * lynx-low.c (ptrace_request_to_str): Add handling for
4872 PTRACE_GETTRACESIG.
4873
52d4cbd8
JB
48742012-12-17 Joel Brobecker <brobecker@adacore.com>
4875
4876 * lynx-low.c (lynx_attach): Delete variable new_process.
4877
ab8f6ca9
JB
48782012-12-17 Joel Brobecker <brobecker@adacore.com>
4879
4880 * lynx-low.c (lynx_create_inferior): Delete variable
4881 new_process.
4882
78cbc024
JB
48832012-12-17 Joel Brobecker <brobecker@adacore.com>
4884
4885 * lynx-low.c (ptrace_request_to_str): Do not handle
4886 PTRACE_GETTHREADLIST if this macro does not exist.
4887
14a00470
YQ
48882012-12-15 Yao Qi <yao@codesourcery.com>
4889
4890 * Makefile.in (OBS): Add notif.o.
4891 * notif.c, notif.h: New.
4892 * server.c: Include "notif.h".
4893 (struct vstop_notif) <next>: Remove.
4894 <base>: New field.
4895 (queue_stop_reply): Update.
4896 (push_event, send_next_stop_reply): Remove.
4897 (discard_queued_stop_replies): Update.
4898 (notif_stop): New variable.
4899 (handle_v_stopped): Remove.
4900 (handle_v_requests): Don't call handle_v_stopped. Call
4901 handle_ack_notif instead.
4902 (queue_stop_reply_callback): Call notif_event_enque instead
4903 of queue_stop_reply.
4904 (handle_status): Don't call send_next_stop_reply, call
4905 notif_write_event instead.
4906 (kill_inferior_callback): Likewise.
4907 (detach_or_kill_inferior_callback): Likewise.
4908 (main): Call initialize_notif.
4909 (process_serial_event): Call QUEUE_is_empty.
4910 (handle_target_event): Call notif_push instead of push event.
4911 * server.h (push_event): Remove declaration.
4912
61c125b9
TT
49132012-12-10 Tom Tromey <tromey@redhat.com>
4914
4915 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4916 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4917 macros.
4918 (.c.o): Rewrite.
4919 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4920 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4921 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4922 (amd64-linux-ipa.o, ax.o): Rewrite.
4923 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4924 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4925 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4926 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4927 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4928 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4929 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4930 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4931 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4932 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4933 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4934 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4935 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4936 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4937 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4938 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4939 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4940 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4941 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4942 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4943 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4944 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4945 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4946 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4947 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4948 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4949 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4950 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4951 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4952 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4953 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4954 (reg-tilegx.o): Remove.
4955 (all_object_files): New macro.
4956 Include .deps files.
4957 * aclocal.m4, configure: Rebuild.
4958 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4959 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4960 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4961
e90e9ad9
TT
49622012-12-05 Tom Tromey <tromey@redhat.com>
4963
4964 PR gdb/14917:
4965 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4966
02d403bf 49672012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4968
4969 * configure.ac: Check for linux/perf_event.h.
4970 * config.in: Regenerated.
4971 * configure: Regenerated.
4972
0270a750
PA
49732012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4974
4975 * hostio.c (handle_readlink): Decrease buffer size
4976 parameter passed to readlink by one byte.
4977
8c29b58e
YQ
49782012-11-26 Yao Qi <yao@codesourcery.com>
4979
4980 * configure.ac (build_warnings): Append '-Wempty-body'.
4981 * configure: Regenerated.
4982 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4983 body.
4984
8bdce1ff
PM
49852012-11-15 Pierre Muller <muller@sourceware.org>
4986
4987 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4988 * config.in: Regenerate.
4989 * configure: Regenerate.
4990 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4991 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4992 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4993 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4994 header.
4995 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4996 instead of <sys/wait.h> header.
4997 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4998
02d403bf 49992012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5000
5001 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5002 (various make rules): Remove -DGDBSERVER
5003
fbd5db48
YQ
50042012-11-09 Yao Qi <yao@codesourcery.com>
5005
5006 * spu-low.c (current_ptid): Move it to ..
5007 * gdbthread.h: ... here. New.
5008 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5009 * server.c (myresume, process_serial_event): Likewise.
5010 * thread-db.c (thread_db_find_new_threads): Likewise.
5011 * tracepoint.c (run_inferior_command): Likewise.
5012
b3dc46ff
AB
50132012-10-01 Andrew Burgess <aburgess@broadcom.com>
5014
5015 * server.c (handle_search_memory_1): Include access length in
5016 warning message.
5017
07c04788
HPN
50182012-09-05 Michael Brandt <michael.brandt@axis.com>
5019
5020 * linux-crisv32-low.c: Fix compile errors.
5021
918d227b
YQ
50222012-09-04 Yao Qi <yao@codesourcery.com>
5023
5024 * tracepoint.c (cmd_qtsv): Adjust debug message.
5025 Don't check CUR_TPOINT.
5026
18c1b81a
YQ
50272012-08-28 Yao Qi <yao@codesourcery.com>
5028
5029 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5030 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5031 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5032 Remove declarations of xmalloc, xreallloc, xstrdup and
5033 freeargv.
5034 * Makefile.in (libiberty_h): New.
5035 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5036 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5037
dc82f37b
YQ
50382012-08-23 Yao Qi <yao@codesourcery.com>
5039
5040 * server.h: Remove declaration of 'xsnprintf'.
5041
406b1477
KS
50422012-08-22 Keith Seitz <keiths@redhat.com>
5043
5044 * server.h: Include build-gnulib-gbserver/config.h.
5045 * gdbreplay.c: Likewise.
5046
e6712ff1
DE
50472012-08-08 Doug Evans <dje@google.com>
5048
5049 * Makefile.in (SFILES): Add gdb_vecs.c.
5050 (OBS): Add gdb_vecs.o.
5051 (gdb_vecs_h, host_defs_h): New variables.
5052 (thread-db.o): Add $(gdb_vecs_h) dependency.
5053 (gdb_vecs.o): New rule.
5054 * thread-db.c: #include "gdb_vecs.h".
5055 (thread_db_load_search): Use a vector to iterate over path elements.
5056 Handle text appearing after "$pdir".
5057
5058 * configure.ac: Add check for strstr.
5059 * config.in: Regenerate.
5060 * configure: Regenerate.
5061
7c3270ae
UW
50622012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5063
5064 * hostio.c (handle_pread): If pread fails, fall back to attempting
5065 lseek/read.
5066 (handle_pwrite): Likewise for pwrite.
5067
b62e2b27
UW
50682012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5069
5070 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5071 between unsupported TYPE and unimplementable ADDR/LEN combination.
5072 (arm_insert_point): Act on new return value.
5073
78a99e91
PA
50742012-07-31 Pedro Alves <palves@redhat.com>
5075
5076 * server.c (process_point_options): Only skip tokens if we find
5077 one that is unrecognized. Don't treat 'X' specially while
5078 skipping unrecognized tokens.
5079
fcf303ab
UW
50802012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5081
5082 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5083 to 4-byte-align HW breakpoint addresses for Thumb.
5084
7255706c
YQ
50852012-07-27 Yao Qi <yao@codesourcery.com>
5086
5087 PR remote/14161.
5088
5089 * server.h: Declare gdb_agent_about_to_close.
5090 * target.c (kill_inferior): Include "agent.h".
5091 New. Send command 'kill'.
5092 * target.h (kill_inferior): Removed macro.
5093 * tracepoint.c (gdb_agent_about_to_close): New.
5094 (gdb_agent_helper_thread): Handle command 'close'.
5095 Wait endlessly until the inferior stops.
5096 Install gdb_agent_remove_socket to atexit hook.
5097 (agent_socket_name): New static variable.
5098 (gdb_agent_socket_init): Replace local variable 'name' with
5099 'agent_socket_name'.
5100 (gdb_agent_remove_socket): New.
5101
5a3f286f
YQ
51022012-07-27 Yao Qi <yao@codesourcery.com>
5103
5104 * server.c (process_point_options): Stop at 'X' when parsing.
5105
961bd387
ME
51062012-07-19 Michael Eager <eager@eagercon.com>
5107
a261b8f5 5108 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5109 to hw_execute.
5110 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5111 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5112 hardware breakpoint.
5113
aa7c7447
JK
51142012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5115
5116 * gdbserver/linux-low.c (initialize_low): Call
5117 linux_ptrace_init_warnings.
5118
7f216e7c
DE
51192012-07-02 Doug Evans <dje@google.com>
5120
5121 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5122 pointer to int.
5123
d3ce09f5
SS
51242012-07-02 Stan Shebs <stan@codesourcery.com>
5125
5126 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5127 (ax.o): Add it to build rule.
5128 (ax-ipa.o): Ditto.
5129 (OBS): Add format.o.
5130 (IPA_OBS): Add format.o.
5131 * server.c (handle_query): Claim support for breakpoint commands.
5132 (process_point_options): Add command case.
5133 (process_serial_event): Leave running if there are printfs in
5134 effect.
5135 * mem-break.h (any_persistent_commands): Declare.
5136 (add_breakpoint_commands): Declare.
5137 (gdb_no_commands_at_breakpoint): Declare.
5138 (run_breakpoint_commands): Declare.
5139 * mem-break.c (struct point_command_list): New struct.
5140 (struct breakpoint): New field command_list.
5141 (any_persistent_commands): New function.
5142 (add_commands_to_breakpoint): New function.
5143 (add_breakpoint_commands): New function.
5144 (gdb_no_commands_at_breakpoint): New function.
5145 (run_breakpoint_commands): New function.
5146 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5147 locally.
5148 * ax.c: Include format.h.
5149 (ax_printf): New function.
5150 (gdb_eval_agent_expr): Add printf opcode.
5151
2f8f6aed
YQ
51522012-06-13 Yao Qi <yao@codesourcery.com>
5153
5154 * server.c (start_inferior): Remove duplicated writes to fields
5155 'last_resume_kind' and 'last_status' of 'current_inferior'.
5156
0c9070b3
YQ
51572012-06-12 Yao Qi <yao@codesourcery.com>
5158 Pedro Alves <palves@redhat.com>
5159
5160 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5161 comment.
5162 * server.c (handle_v_cont): Extend comment.
5163
c52daf70
YQ
51642012-06-11 Yao Qi <yao@codesourcery.com>
5165
5166 * linux-low.c (linux_attach): Add 'static'.
5167
d38bbb0a
YQ
51682012-06-06 Yao Qi <yao@codesourcery.com>
5169
5170 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5171
89dc0afd
JK
51722012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5173
5174 Fix gcc -flto compilation warning.
5175 * server.c (main): Make variable multi_mode and attach volatile.
5176
75f62ce7
TJB
51772012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5178
5179 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5180 if the platform doesn't know about it.
5181
65f479b6
PA
51822012-05-30 Jeff Kenton <jkenton@tilera.com>
5183
5184 * Makefile.in (SFILES): Add linux-tile-low.c.
5185 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5186 * configure.srv: Handle tilegx-*-linux*.
5187 * linux-tile-low.c: New file.
5188
0c5bf5a9
JK
51892012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5190
5191 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5192
a493e3e2
PA
51932012-05-24 Pedro Alves <palves@redhat.com>
5194
5195 PR gdb/7205
5196
43aaf8b6 5197 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5198
2ea28649
PA
51992012-05-24 Pedro Alves <palves@redhat.com>
5200
5201 PR gdb/7205
5202
5203 Replace target_signal with gdb_signal throughout.
5204
8d409d16
MR
52052012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5206
5207 * linux-low.c (linux_store_registers): Avoid the copying sequence
5208 when no data has been retrieved by ptrace.
5209
23512c01
MGD
52102012-05-22 Will Deacon <will.deacon@arm.com>
5211
5212 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5213 Include asm/ptrace.h.
5214 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5215 already defined.
5216
4934b29e
MR
52172012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5218
5219 * linux-low.c (linux_store_registers): Don't re-retrieve data
5220 with ptrace that has already been obtained from /proc. Always
5221 copy any data retrieved with ptrace to the buffer supplied.
5222
bde24c0a
PA
52232012-05-11 Yao Qi <yao@codesourcery.com>
5224 Pedro Alves <palves@redhat.com>
5225
5226 * linux-low.c (enum stopping_threads_kind): New.
5227 (stopping_threads): Change type to `enum stopping_threads_kind'.
5228 (handle_extended_wait): If stopping and suspending threads, leave
5229 the new_lwp suspended too.
5230 (linux_wait_for_event): Adjust.
5231 (stop_all_lwps): Set `stopping_threads' to
5232 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5233 whether we're suspending threads or just stopping them. Assert no
5234 recursion happens.
5235
623b6bdf
YQ
52362012-04-29 Yao Qi <yao@codesourcery.com>
5237
5238 * server.h: Move some code to ...
5239 * gdbthread.h: ... here. New.
5240 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5241 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5242 (nto-low.o, win32-low.o): Likewise.
5243 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5244 * regcache.c, remote-utils.c, server.c: Likewise.
5245 * target.c, tracepoint.c, win32-low.c: Likewise.
5246
f15f9948
TJB
52472012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5248
5249 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5250 (PTRACE_ARG4_TYPE): Likewise.
5251 (PTRACE_XFER_TYPE): Likewise.
5252 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5253 ptrace to PTRACE_ARG3_TYPE.
5254 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5255 (PTRACE_ARG4_TYPE): Likewise.
5256 (PTRACE_XFER_TYPE): Likewise.
5257 (linux_detach_one_lwp): Cast fourth argument of
5258 ptrace to long then PTRACE_ARG4_TYPE.
5259 (regsets_fetch_inferior_registers): Cast third argument of
5260 ptrace to long then PTRACE_ARG3_TYPE.
5261 (regsets_store_inferior_registers): Likewise.
5262
38ea300a
PA
52632012-04-20 Pedro Alves <palves@redhat.com>
5264
5265 * configure: Regenerate.
5266
c971b7fa
PA
52672012-04-19 Pedro Alves <palves@redhat.com>
5268
43aaf8b6 5269 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5270 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5271 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5272 (all, install-only, uninstall, clean-info, all-lib, clean): No
5273 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5274 (maintainer-clean realclean distclean): Use subdir_do.
5275 (subdir_do): New.
5276 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5277 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5278 * acinclude.m4: Include acx_configure_dir.m4.
5279 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5280 calls. Call AC_PROG_RANLIB. Configure gnulib using
5281 ACX_CONFIGURE_DIR.
5282 (GNULIB): New.
5283 (GNULIB_STDINT_H): Adjust.
5284 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5285 * gdbreplay.c: Include build-gnulib/config.h.
5286 * server.h: Likewise.
5287 * aclocal.m4: Regenerate.
5288 * config.in: Regenerate.
5289 * configure: Regenerate.
c971b7fa 5290
809277f8
PA
52912012-04-19 Pedro Alves <palves@redhat.com>
5292
5293 * Makefile.in (LIBGNU, INCGNU): Adjust.
5294 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5295 (all, install-only, uninstall, clean-info, all-lib, clean)
5296 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5297 * configure.ac: Adjust AC_OUTPUT output.
5298 * aclocal.m4: Regenerate.
5299 * configure: Regenerate.
5300
fd9bb8b8
PA
53012012-04-19 Pedro Alves <palves@redhat.com>
5302
5303 * Makefile.in (generated_files): New.
5304 (server_h): Remove the explicit dependency on config.h, and depend
5305 on $generated_files.
5306
1c298c66
PA
53072012-04-19 Pedro Alves <palves@redhat.com>
5308
5309 * Makefile.in (INCGNU): Add -Ignulib.
5310
57c4b50b
PA
53112012-04-19 Pedro Alves <palves@redhat.com>
5312
5313 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5314 (INCGNU): ... this, and spell out -I here.
5315 (GNULIB_LIB): Rename to ...
5316 (LIBGNU): ... this.
5317 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5318
1030e047
PA
53192012-04-19 Pedro Alves <palves@redhat.com>
5320
5321 * config.in: Regenerate.
5322
447d4319
PA
53232012-04-19 Pedro Alves <palves@redhat.com>
5324
5325 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5326 * server.h (memmem): Remove declaration.
5327 * config.in: Regenerate.
5328 * configure: Regenerate.
5329
aad9eab9
YQ
53302012-04-19 Yao Qi <yao@codesourcery.com>
5331
5332 * Makefile.in (SFILES): Add common/vec.c.
5333 (OBS): Add vec.o.
5334 (vec.o): New rule.
5335
3e10640f
YQ
53362012-04-19 Yao Qi <yao@codesourcery.com>
5337
5338 * remote-utils.c (prepare_resume_reply): Replace with macro
5339 target_core_of_thread.
5340 * server.c (handle_qxfer_threads_proper): Likewise.
5341 * target.h (traget_core_of_thread): New macro.
5342
71622373
PA
53432012-04-18 Pedro Alves <palves@redhat.com>
5344
5345 * aclocal.m4: Regenerate.
5346 * configure: Regenerate.
5347
80d26939
YQ
53482012-04-16 Yao Qi <yao@codesourcery.com>
5349
5350 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5351 duplicated on address.
5352
42476b70
YQ
53532012-04-16 Yao Qi <yao@codesourcery.com>
5354
5355 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5356 (struct tracepoint_action_ops) <send>: New field.
5357 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5358 (agent_expr_send, x_tracepoint_action_send): New.
5359 (l_tracepoint_action_send): New.
5360 (cmd_qtdp): Download and install tracepoint
5361 according to `use_agent'.
5362 (run_inferior_command): Add one more parameter `len'.
5363 Update callers.
5364 (tracepoint_send_agent): New.
5365 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5366
7bc83639
YQ
53672012-04-16 Yao Qi <yao@codesourcery.com>
5368
5369 * tracepoint.c (download_tracepoints): Moved to ...
5370 (cmd_qtstart): ... here.
5371
5f18041e
YQ
53722012-04-14 Yao Qi <yao@codesourcery.com>
5373
5374 * tracepoint.c: Include inttypes.h.
5375 (struct collect_memory_action): Use sized types.
5376 (struct tracepoint): Likewise.
5377 (cmd_qtdp, stop_tracing): Update print specifiers.
5378 (cmd_qtp, response_tracepoint): Likewise.
5379 (collect_data_at_tracepoint): Likewise.
5380 (collect_data_at_step): Likewise.
5381
55a8c076
YQ
53822012-04-14 Yao Qi <yao@codesourcery.com>
5383
5384 Import gnulib module inttypes.
5385 * aclocal.m4, config.in, configure: Regenerated.
5386
dc750257
YQ
53872012-04-14 Yao Qi <yao@codesourcery.com>
5388
5389 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5390 Makefile and config.status at last.
5391
0ab5faf9
YQ
53922012-04-13 Yao Qi <yao@codesourcery.com>
5393
5394 * tracepoint.c: Include stdint.h unconditionally.
5395
18f5fd81
TJB
53962012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5397
5398 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5399 on BFD_HAVE_SYS_PROCFS_TYPE.
5400 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5401 * configure: Regenerate.
5402 * config.in: Likewise.
5403
4d47af5c
L
54042012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5405
5406 * Makefile.in (clean): Also remove x32.c x32-linux.c
5407 x32-avx.c x32-avx-linux.c.
5408 (x32.o): New target.
5409 (x32.c): Likewise.
5410 (x32-linux.o): Likewise.
5411 (x32-linux.c): Likewise.
5412 (x32-avx.o): Likewise.
5413 (x32-avx.c): Likewise.
5414 (x32-avx-linux.o): Likewise.
5415 (x32-avx-linux.c): Likewise.
5416
5417 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5418 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5419 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5420 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5421 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5422 i386/x32-avx-linux.xml.
5423
5424 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5425 (init_registers_x32_avx_linux): Likwise.
5426 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5427 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5428
ecedbe58
PA
54292012-04-13 Pedro Alves <palves@redhat.com>
5430
5431 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5432 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5433 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5434 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5435 the sub-make.
5436
c92b5177
L
54372012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5438
5439 * linux-x86-low.c (compat_x32_clock_t): New.
5440 (compat_x32_siginfo_t): Likewise.
5441 (compat_x32_siginfo_from_siginfo): Likewise.
5442 (siginfo_from_compat_x32_siginfo): Likewise.
5443 (linux_is_elf64): Likewise.
5444 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5445 and siginfo_from_compat_x32_siginfo for x32.
5446 (x86_arch_setup): Set linux_is_elf64.
5447
214d508e
L
54482012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5449
5450 PR gdb/13969
5451 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5452 e_machine field.
5453 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5454 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5455 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5456 compatible with process.
5457
c9a1864a
YQ
54582012-04-12 Yao Qi <yao@codesourcery.com>
5459
5460 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5461 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5462 (install-only, install-info, clean): Handle sub dir gnulib.
5463 (all-lib, am--refresh): New targets.
5464 (memmem.o): Remove target.
5465 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5466 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5467 (AC_REPLACE_FUNCS): Remove memmem.
5468 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5469 (AC_OUTPUT): Generate Makefile in gnulib/.
5470 * aclocal.m4, config.in, configure: Regenerated.
5471
367ba2c2
MR
54722012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5473
5474 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5475
9d236627
PA
54762012-04-05 Pedro Alves <palves@redhat.com>
5477
5478 -Werror=strict-aliasing
5479
5480 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5481 pointer.
5482
111217b3
PA
54832012-04-04 Pedro Alves <palves@redhat.com>
5484
5485 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5486 (sparc_store_gregset_from_stack, sparc_store_gregset)
5487 (sparc_breakpoint_at): Fix formatting.
5488
8365dcf5
TJB
54892012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5490
5491 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5492 are available.
5493 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5494 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5495 * config.in: Regenerate.
5496 * configure: Likewise.
5497
689cc2ae
PA
54982012-03-29 Pedro Alves <palves@redhat.com>
5499
5500 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5501 Correct ptrace arguments.
5502
c14dfd32
PA
55032012-03-28 Pedro Alves <palves@redhat.com>
5504
5505 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5506 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5507 (IA64_FR1_REGNUM): New defines.
5508 (ia64_fetch_register): New.
5509 (the_low_target): Install it.
5510 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5511 field.
5512 * linux-low.c (linux_fetch_registers): Try the
5513 the_low_target.fetch_register hook first.
5514
5515 * linux-arm-low.c (the_low_target): Adjust.
5516 * linux-bfin-low.c (the_low_target): Adjust.
5517 * linux-cris-low.c (the_low_target): Adjust.
5518 * linux-crisv32-low.c (the_low_target): Adjust.
5519 * linux-m32r-low.c (the_low_target): Adjust.
5520 * linux-m68k-low.c (the_low_target): Adjust.
5521 * linux-mips-low.c (the_low_target): Adjust.
5522 * linux-ppc-low.c (the_low_target): Adjust.
5523 * linux-s390-low.c (the_low_target): Adjust.
5524 * linux-sh-low.c (the_low_target): Adjust.
5525 * linux-sparc-low.c (the_low_target): Adjust.
5526 * linux-tic6x-low.c (the_low_target): Adjust.
5527 * linux-x86-low.c (the_low_target): Adjust.
5528 * linux-xtensa-low.c (the_low_target): Adjust.
5529
63c88e13
PA
55302012-03-26 Pedro Alves <palves@redhat.com>
5531
5532 * server.c (handle_qxfer_libraries): Don't bail early if
5533 the_target->qxfer_libraries_svr4 is not NULL.
5534
fb723180
PA
55352012-03-26 Pedro Alves <palves@redhat.com>
5536
5537 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5538
0afae3cf
PA
55392012-03-23 Pedro Alves <palves@redhat.com>
5540
5541 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5542 "library-list-svr4" element's start tag when the the DSO list is
5543 empty.
5544
485f1ee4
PA
55452012-03-23 Pedro Alves <palves@redhat.com>
5546
5547 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5548 a variable whose type size is the same as the inferior's pointer
5549 size.
5550
a5362b9a
TS
55512012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5552
5553 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5554 struct siginfo.
5555 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5556 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5557 * linux-low.h: Include <signal.h>.
5558 (struct siginfo): Remove forward declaration.
5559 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5560 struct siginfo.
5561
d226c142
MF
55622012-03-21 Mike Frysinger <vapier@gentoo.org>
5563
5564 * .gitignore: Ignore more files.
5565
122f36ef
PA
55662012-03-19 Pedro Alves <palves@redhat.com>
5567 Jan Kratochvil <jan.kratochvil@redhat.com>
5568
5569 * server.c (cont_thread, general_thread): Add describing comments.
5570 (start_inferior): Clear `cont_thread'.
5571 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5572 of a process.
5573
fc3e5175
YQ
55742012-03-15 Yao Qi <yao@codesourcery.com>
5575
5576 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5577 handling to ...
5578 (cmd_qtdp): ... here.
5579
8d0d92cd
YQ
55802012-03-15 Yao Qi <yao@codesourcery.com>
5581
5582 * tracepoint.c (struct tracepoint_action_ops): New.
5583 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5584 (m_tracepoint_action_download): New.
5585 (r_tracepoint_action_download): New.
5586 (x_tracepoint_action_download): New.
5587 (l_tracepoint_action_download): New.
5588 (add_tracepoint_action): Install `action->ops' according type.
5589 (download_tracepoint_1): Move code `download' function pointer
5590 of various tracepoint_action_ops.
5591
87b0bb13
JK
55922012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5593
5594 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5595 linux_ptrace_attach_warnings.
5596
5f572dec
JK
55972012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5598
5599 * Makefile.in (linux-ptrace.o): New.
5600 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5601 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5602 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5603 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5604 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5605 of these targets.
5606 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5607
f4647387
YQ
56082012-03-08 Yao Qi <yao@codesourcery.com>
5609 Pedro Alves <palves@redhat.com>
5610
5611 Fix PR server/13392.
5612 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5613 offset of JMP insn.
5614 * tracepoint.c (remove_tracepoint): New.
5615 (cmd_qtdp): Call remove_tracepoint when failed to install.
5616
9b224c5e
PA
56172012-03-07 Pedro Alves <palves@redhat.com>
5618
5619 * linux-low.c (get_detach_signal): New.
5620 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5621 Pass on pending signals to PTRACE_DETACH. Check the result of the
5622 ptrace call.
5623 * server.c (program_signals, program_signals_p): New.
5624 (handle_general_set): Handle QProgramSignals.
5625 * server.h (program_signals, program_signals_p): Declare.
5626
e237a7e2
JK
56272012-03-05 Pedro Alves <palves@redhat.com>
5628 Jan Kratochvil <jan.kratochvil@redhat.com>
5629
5630 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5631 New comment why.
5632
5808517f
YQ
56332012-03-03 Yao Qi <yao@codesourcery.com>
5634
5635 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5636 agent_look_up_symbols.
5637
58b4daa5
YQ
56382012-03-03 Yao Qi <yao@codesourcery.com>
5639
5640 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5641 (linux-x86-low.o): Likewise.
5642 * server.h: Remove in_process_agent_loaded.
5643 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5644 common/agent.c.
5645 Update callers.
5646
8ffcbaaf
YQ
56472012-03-03 Yao Qi <yao@codesourcery.com>
5648
5649 * tracepoint.c (gdb_agent_capability): New global.
5650 (in_process_agent_loaded_ust): Renamed to
5651 `in_process_agent_supports_ust'.
5652 Update callers.
5653 (in_process_agent_supports_ust): Call agent_capability_check.
5654 (clear_installed_tracepoints): Assert that agent supports
5655 agent.
5656
d1feda86
YQ
56572012-03-03 Yao Qi <yao@codesourcery.com>
5658
5659 * linux-low.c (linux_supports_agent): New.
5660 (linux_target_ops): Initialize field `supports_agent' with
5661 linux_supports_agent.
5662 * target.h (struct target_ops) <supports_agent>: New.
5663 (target_supports_agent): New macro.
5664 * server.c (handle_general_set): Handle packet 'QAgent'.
5665 (handle_query): Send `QAgent+'.
5666 * Makefile.in (server.o): Depends on agent.h.
5667
2fa291ac
YQ
56682012-03-03 Yao Qi <yao@codesourcery.com>
5669
5670 * Makefile.in (OBS): Add agent.o.
5671 Add new rule for agent.o.
5672 Track dependence of tracepoint.c on agent.h.
5673 * tracepoint.c (run_inferior_command_1):
5674 (run_inferior_command): Call agent_run_command.
5675 (gdb_ust_connect_sync_socket): Deleted. Move it to
5676 common/agent.c.
5677 (resume_thread, stop_thread): Likewise.
5678 (gdb_ust_socket_init): Renamed to ...
5679 (gdb_agent_socket_init): ... New.
5680 (gdb_ust_thread): Renamed to ...
5681 (gdb_agent_helper_thread): ... New.
5682 (gdb_ust_init): Move some code to ...
5683 (gdb_agent_init): ... here. New.
5684 [HAVE_UST]: Call gdb_ust_init.
5685 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5686 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5687 * config.in, configure: Regenerated.
5688
05044653
PA
56892012-03-02 Pedro Alves <palves@redhat.com>
5690
5691 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5692 * linux-low.c (struct simple_pid_list): New.
5693 (stopped_pids): New a struct simple_pid_list pointer.
5694 (add_to_pid_list, pull_pid_from_list): New.
5695 (handle_extended_wait): Don't assume the first signal new children
5696 report is SIGSTOP. Adjust call to pull_pid_from_list.
5697 (linux_wait_for_lwp): Adjust.
5698
8d00225b
YQ
56992012-03-02 Yao Qi <yao@codesourcery.com>
5700
5701 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5702 debug log.
5703
19560ba5
YQ
57042012-03-02 Yao Qi <yao@codesourcery.com>
5705
5706 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5707 `stop_pc' and `tpoint'. Update caller.
5708
1faeff08
MR
57092012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5710
5711 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5712 * linux-low.c (use_linux_regsets): New macro.
5713 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5714 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5715 (linux_register_in_regsets): New function.
5716 (usr_fetch_inferior_registers): Skip registers covered by
5717 regsets.
5718 (usr_store_inferior_registers): Likewise.
5719 (usr_fetch_inferior_registers): New macro.
5720 (usr_store_inferior_registers): Likewise.
5721 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5722 (linux_store_registers): Likewise.
5723 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5724 prototype.
5725 (init_registers_mips64_dsp_linux): Likewise.
5726 (init_registers_mips_linux): New macro.
5727 (init_registers_mips_dsp_linux): Likewise.
5728 (mips_dsp_num_regs): Likewise.
5729 (DSP_BASE, DSP_CONTROL): New fallback macros.
5730 (mips_base_regs): New macro.
5731 (mips_regmap): Use it. Fix the size.
5732 (mips_dsp_regmap): New variable.
5733 (mips_dsp_regset_bitmap): Likewise.
5734 (mips_arch_setup): New function.
5735 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5736 than mips_regmap.
5737 (mips_cannot_store_register): Likewise.
5738 (the_low_target): Update .arch_setup, .num_regs and .regmap
5739 initializers. Add .regset_bitmap initializer.
5740 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5741 initializer.
5742 * linux-bfin-low.c (the_low_target): Likewise.
5743 * linux-cris-low.c (the_low_target): Likewise.
5744 * linux-crisv32-low.c (the_low_target): Likewise.
5745 * linux-ia64-low.c (the_low_target): Likewise.
5746 * linux-m32r-low.c (the_low_target): Likewise.
5747 * linux-m68k-low.c (the_low_target): Likewise.
5748 * linux-ppc-low.c (the_low_target): Likewise.
5749 * linux-s390-low.c (the_low_target): Likewise.
5750 * linux-sh-low.c (the_low_target): Likewise.
5751 * linux-sparc-low.c (the_low_target): Likewise.
5752 * linux-tic6x-low.c (the_low_target): Likewise.
5753 * linux-x86-low.c (the_low_target): Likewise.
5754 * linux-xtensa-low.c (the_low_target): Likewise.
5755 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5756 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5757 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5758 srv_xmlfiles.
5759 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5760 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5761
c03e6ccc
YQ
57622012-02-29 Yao Qi <yao@codesourcery.com>
5763 Pedro Alves <palves@redhat.com>
5764
5765 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5766 `step_over_finished' is true.
5767
644cebc9
PA
57682012-02-27 Pedro Alves <palves@redhat.com>
5769
5770 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5771 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5772
c14d7ab2
PA
57732012-02-27 Pedro Alves <palves@redhat.com>
5774
5775 PR server/9684
5776 * linux-low.c (pid_is_stopped): New.
5777 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5778
412c89dd
LM
57792012-02-25 Luis Machado <lgustavo@codesourcery.com>
5780
5781 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5782 of conditions.
5783
b745defe
MR
57842012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5785
5786 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5787
9f3a5c85
LM
57882012-02-24 Luis Machado <lgustavo@codesourcery>
5789
5790 * server.c (handle_query): Advertise support for target-side
5791 breakpoint condition evaluation.
5792 (process_point_options): New function.
5793 (process_serial_event): When inserting a breakpoint, check for
5794 a target-side condition that should be evaluated.
5795
5796 * mem-break.c: Include regcache.h and ax.h.
5797 (point_cond_list_t): New data structure.
5798 (breakpoint) <cond_list>: New field.
5799 (find_gdb_breakpoint_at): Make non-static.
5800 (delete_gdb_breakpoint_at): Clear any target-side
5801 conditions.
5802 (clear_gdb_breakpoint_conditions): New function.
5803 (add_condition_to_breakpoint): Likewise.
5804 (add_breakpoint_condition): Likewise.
5805 (gdb_condition_true_at_breakpoint): Likewise.
5806 (gdb_breakpoint_here): Return result directly instead
5807 of going through a local variable.
5808
5809 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5810 (clear_gdb_breakpoint_conditions): Likewise.
5811 (add_breakpoint_condition): Likewise.
5812 (gdb_condition_true_at_breakpoint): Likewise.
5813
5814 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5815 (need_step_over_p): Take target-side breakpoint condition into
5816 consideration.
5817
5e1dc496
LM
58182012-02-24 Luis Machado <lgustavo@codesourcery>
5819
5820 * server.h: Include tracepoint.h.
5821 (agent_mem_read, agent_get_trace_state_variable_value,
5822 agent_set_trace_state_variable_value,
5823 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5824 get_set_tsv_func_addr): New prototypes.
5825
5826 * ax.h: New include file.
5827 * ax.c: New source file.
5828
5829 * tracepoint.c: Include ax.h.
5830 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5831 agent_expr, eval_result_type): Move to ax.h.
5832 (parse_agent_expr): Rename to ...
5833 (gdb_parse_agent_expr): ... this, make it non-static and move
5834 to ax.h.
5835 (unparse_agent_expr) Rename to ...
5836 (gdb_unparse_agent_expr): ... this, make it non-static and move
5837 to ax.h.
5838 (eval_agent_expr): Rename to ...
5839 (eval_tracepoint_agent_expr): ... this.
5840 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5841 forward declarations.
5842 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5843 (agent_get_trace_state_variable_value): New function.
5844 (agent_set_trace_state_variable_value): New function.
5845 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5846 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5847 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5848 (condition_true_at_tracepoint): Likewise.
5849 (parse_agent_expr): Rename to ...
5850 (gdb_parse_agent_expr): ... this and move to ax.c.
5851 (unparse_agent_expr): Rename to ...
5852 (gdb_unparse_agent_expr): ... this and move to ax.c.
5853 (gdb_agent_op_name): Move to ax.c.
5854 (eval_agent_expr): Rename to ...
5855 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5856 and move to ax.c.
5857 (eval_tracepoint_agent_expr): New function.
5858 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5859 non-static.
5e1dc496
LM
5860 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5861 ax.c.
5862 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5863 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5864 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5865 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5866 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5867 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5868 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5869 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5870 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5871 (compile_bytecodes): Remove forward declaration.
5872 (is_goto_target): Move to ax.c.
5873 (compile_bytecodes): Move to ax.c and call
5874 agent_get_trace_state_variable_value (...) and
5875 agent_set_trace_state_variable_value (...).
5876
5877 * Makefile.in: Update ax.c and IPA dependencies.
5878
277e4e52
PA
58792012-02-24 Pedro Alves <palves@redhat.com>
5880
5881 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5882 (cmd_bigqtbuffer_circular): ... this. Only handle
5883 'QTBuffer:circular:'.
5884 (handle_tracepoint_general_set): Adjust.
5885
bf4c19f7
YQ
58862012-02-16 Yao Qi <yao@codesourcery.com>
5887
5888 * inferiors.c: Move code to ...
5889 * dll.c: .... here. New.
5890 * server.h: Declare clear_dlls.
5891 * Makefile.in (SFILES): Add dll.c.
5892 (OBS): Add dll.o
5893 (dll.o): New rule.
5894
d73f2619
YQ
58952012-02-11 Yao Qi <yao@codesourcery.com>
5896
5897 * server.c: (handle_monitor_command): Add a new parameter
5898 `own_buf'.
5899 (handle_query): Update caller.
5900
f8255c2a
JB
59012012-02-09 Joel Brobecker <brobecker@adacore.com>
5902
5903 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5904 * configure, config.in: Regenerate.
5905 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5906 is not defined.
5907
da84f473
PA
59082012-02-02 Pedro Alves <palves@redhat.com>
5909
5910 Try SIGKILL first, then PTRACE_KILL.
5911 * linux-low.c (linux_kill_one_lwp): New.
5912 (linux_kill_one_lwp): Rename to ...
5913 (kill_one_lwp_callback): ... this. Use the new
5914 linux_kill_one_lwp.
5915
e886a173
PA
59162012-02-02 Pedro Alves <palves@redhat.com>
5917
5918 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5919 inferior.
5920
be07f1a2
PA
59212012-01-27 Pedro Alves <palves@redhat.com>
5922
5923 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5924 (elf_64_file_p): Make static.
5925 (linux_pid_exe_is_elf_64_file): New.
5926 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5927 Delete declarations.
5928 (linux_pid_exe_is_elf_64_file): Declare.
5929 * linux-x86-low.c (x86_arch_setup): Use
5930 linux_pid_exe_is_elf_64_file.
5931
d8301ad1
JK
59322012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5933
5934 * linux-low.c (linux_wait_for_event_1): Rename to ...
5935 (linux_wait_for_event): ... here and merge it with former
5936 linux_wait_for_event - new variable wait_ptid, use it.
5937 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5938
01b17894
PA
59392012-01-23 Pedro Alves <palves@redhat.com>
5940
5941 * server.c (main): Avoid yet another case of infinite loop while
5942 detaching/killing after a longjmp.
5943
e825046f
JK
59442012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5945
5946 Code cleanup.
5947 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5948
b9e7b9c3
UW
59492012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5950
5951 * hostio.c (handle_readlink): New function.
5952 (handle_vFile): Call it to handle "vFile:readlink" packets.
5953
901f9912
UW
59542012-01-20 Pedro Alves <palves@redhat.com>
5955 Ulrich Weigand <ulrich.weigand@linaro.org>
5956
5957 * server.c (handle_v_requests): Only support vAttach and vRun to
5958 start multiple processes when in extended protocol mode.
5959
fc1ab1a0
PA
59602012-01-17 Pedro Alves <palves@redhat.com>
5961
5962 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5963 memalign plus mprotect to allocate the scratch buffer.
5964
7d5d4e98
PA
59652012-01-13 Pedro Alves <palves@redhat.com>
5966
5967 * server.c (attach_inferior): Clear `cont_thread'.
5968
f128d5e9
PA
59692012-01-13 Pedro Alves <palves@redhat.com>
5970
5971 * server.c (main): Avoid infinite loop while detaching/killing
5972 after a longjmp.
5973
06db92f0
DE
59742012-01-09 Doug Evans <dje@google.com>
5975
5976 * server.c (start_inferior): Set last_ptid in --wrapper case.
5977
32d92999
YQ
59782012-01-06 Yao Qi <yao@codesourcery.com>
5979
5980 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5981 defined.
5982 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5983
5e0a92a9
YQ
59842012-01-04 Yao Qi <yao@codesourcery.com>
5985
5986 * tracepoint.c (cmd_qtdp): Print debug message
5987 for static tracepoint.
5988
ae639e8c
YQ
59892012-01-04 Yao Qi <yao@codesourcery.com>
5990
5991 * tracepoint.c (trace_vdebug): Differentiate debug message
5992 between gdbserver and IPA.
5993
f72429c5
YQ
59942012-01-03 Yao Qi <yao@codesourcery.com>
5995
5996 * tracepoint.c (tracepoint_was_hit): Don't collect for
5997 static tracepoint.
5998
12c3e59c
JB
59992012-01-02 Joel Brobecker <brobecker@adacore.com>
6000
6001 * terminal.h: Reformat copyright header.
6002
67827812
JB
60032012-01-02 Joel Brobecker <brobecker@adacore.com>
6004
6005 * server.c (gdbserver_version): Update copyright year.
6006 * gdbreplay.c (gdbreplay_version): Likewise.
6007
3e52c33d
JK
60082011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6009
6010 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6011
6012 Revert:
6013 2011-12-18 Hui Zhu <teawater@gmail.com>
6014 * linux-low.c (linux_create_inferior): Save return value to ret.
6015
66f1260e
HZ
60162011-12-18 Hui Zhu <teawater@gmail.com>
6017
6018 * linux-low.c (linux_create_inferior): Save return value to ret.
6019
e77616d7
DE
60202011-12-16 Doug Evans <dje@google.com>
6021
e7b06c57
DE
6022 * linux-low.c (linux_create_inferior): If stdio connection,
6023 redirect stdin from /dev/null, stdout to stderr.
6024 * remote-utils.c (remote_is_stdio): New static global.
6025 (remote_connection_is_stdio): New function.
6026 (remote_prepare): Handle stdio connection.
6027 (remote_open): Ditto.
6028 (remote_close): Don't close stdin for stdio connections.
6029 (read_prim,write_prim): New functions. Replace all calls to
6030 read/write to these.
6031 * server.c (main): Watch for "-" argument. Move call to
6032 remote_prepare before start_inferior.
6033 * server.h (STDIO_CONNECTION_NAME): New macro.
6034 (remote_connection_is_stdio): Declare.
6035
e77616d7
DE
6036 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6037 in debugging output.
6038
82067193
YQ
60392011-12-15 Yao Qi <yao@codesourcery.com>
6040
6041 * tracepoint.c: Include sys/syscall.h.
6042 (gdb_ust_thread): Remove preprocessor conditional.
6043
82bfbe7e
PA
60442011-12-14 Pedro Alves <pedro@codesourcery.com>
6045
6046 * linux-low.c (linux_detach_one_lwp): Call
6047 the_low_target.prepare_to_resume before detaching.
6048
712c6575
YQ
60492011-12-14 Yao Qi <yao@codesourcery.com>
6050
6051 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6052 of write.
6053
d54d1edf
YQ
60542011-12-14 Yao Qi <yao@codesourcery.com>
6055
6056 * i386-low.c (i386_low_stopped_data_address): Initialize local
6057 variable `control'.
6058
6210a125
PA
60592011-12-13 Pedro Alves <pedro@codesourcery.com>
6060
6061 PR remote/13492
6062
6063 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6064 DR_CONTROL unless necessary. Extend comments.
6065 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6066 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6067
2ece8244
YQ
60682011-12-13 Yao Qi <yao@codesourcery.com>
6069
6070 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6071 macros.
6072 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6073
784867a5
JK
60742011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6075
6076 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6077 Print new debug message for such case.
6078
6bf36717
JK
60792011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6080
6081 Fix overlapping memcpy.
6082 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6083 the read_inferior_memory transfer.
6084 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6085 write_inferior_memory transfer.
6086 (set_fast_tracepoint_jump): New variable buf. Use it for the
6087 read_inferior_memory and write_inferior_memory transfers.
6088 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6089 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6090 Use it for the write_inferior_memory transfer.
6091 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6092 buffers.
6093
50275556
MR
60942011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6095
6096 * linux-low.c (fetch_register, store_register): Make code
6097 consistent, fix formatting.
6098
7325beb4
MR
60992011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6100
6101 * linux-low.c (usr_store_inferior_registers): Factor out code
6102 to handle individual registers into...
6103 (store_register): ... this new function.
6104
c642a434
UW
61052011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6106
6107 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6108 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6109 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6110 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6111 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6112 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6113 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6114 (srv_xmlfiles): Add new XML files.
6115
6116 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6117 and <sys/uio.h>.
6118 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6119 (init_registers_s390_linux32v1): Add prototype.
6120 (init_registers_s390_linux32v2): Likewise.
6121 (init_registers_s390_linux64v1): Likewise.
6122 (init_registers_s390_linux64v2): Likewise.
6123 (init_registers_s390x_linux64v1): Likewise.
6124 (init_registers_s390x_linux64v2): Likewise.
6125 (s390_num_regs): Increment to 52.
6126 (s390_regmap): Add orig_r2 register.
6127 (s390_num_regs_3264): Increment to 68.
6128 (s390_regmap_3264): Add orig_r2 register.
6129 (s390_collect_ptrace_register): Handle orig_r2 register.
6130 (s390_supply_ptrace_register): Likewise.
6131 (s390_fill_last_break): New function.
6132 (s390_store_last_break): Likewise.
6133 (s390_fill_system_call): New function.
6134 (s390_store_system_call): Likewise.
6135 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6136 register sets.
6137 (s390_check_regset): New function.
6138 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6139 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6140 Update target_regsets for available register sets.
6141
2268b414
JK
61422011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6143 Jan Kratochvil <jan.kratochvil@redhat.com>
6144
6145 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6146 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6147 New.
6148 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6149 * linux-low.h (struct process_info_private): New member r_debug.
6150 * server.c (handle_qxfer_libraries): Call
6151 the_target->qxfer_libraries_svr4.
6152 (handle_qxfer_libraries_svr4): New function.
6153 (qxfer_packets): New entry "libraries-svr4".
6154 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6155 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6156 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6157 PACKET_qXfer_libraries_svr4.
6158
d6db1fab
UW
61592011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6160
6161 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6162 PSW address/mask between 8-byte and 16-byte formats.
6163 (s390_supply_ptrace_register): Likewise.
6164 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6165 basic addressing mode bit.
6166
242f5f1c
SS
61672011-11-24 Stan Shebs <stan@codesourcery.com>
6168
6169 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6170
f196051f
SS
61712011-11-17 Stan Shebs <stan@codesourcery.com>
6172
6173 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6174 (tracing_start_time): New global.
6175 (tracing_stop_time): New global.
6176 (tracing_user_name): New global.
6177 (tracing_notes): New global.
6178 (tracing_stop_note): New global.
6179 (cmd_qtstart): Set traceframe_usage, start_time.
6180 (stop_tracing): Set stop_time.
6181 (cmd_qtstatus): Report additional status.
6182 (cmd_qtp): New function.
6183 (handle_tracepoint_query): Call it.
6184 (cmd_qtnotes): New function.
6185 (handle_tracepoint_general_set): Call it.
6186 (get_timestamp): Rename from tsv_get_timestamp.
6187
405f8e94
SS
61882011-11-14 Stan Shebs <stan@codesourcery.com>
6189 Kwok Cheung Yeung <kcy@codesourcery.com>
6190
6191 * linux-x86-low.c (small_jump_insn): New.
6192 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6193 trampoline and error message, build a trampoline and issue a small
6194 jump instruction to it.
6195 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6196 trampoline and error message.
6197 (x86_get_min_fast_tracepoint_insn_len): New.
6198 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6199 * linux-low.h (struct linux_target_ops): Add arguments to
6200 install_fast_tracepoint_jump_pad operation, add new operation.
6201 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6202 arguments.
6203 (linux_get_min_fast_tracepoint_insn_len): New function.
6204 (linux_target_op): Add new operation.
6205 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6206 (gdb_trampoline_buffer_end): Ditto.
6207 (gdb_trampoline_buffer_error): Ditto.
6208 (struct ipa_sym_addresses): Add fields for new IPA variables.
6209 (symbol_list): Add entries for new IPA variables.
6210 (struct tracepoint): Add fields to hold the address range of the
6211 trampoline used by the tracepoint.
6212 (trampoline_buffer_head): New static variable.
6213 (trampoline_buffer_tail): Ditto.
6214 (claim_trampoline_space): New function.
6215 (have_fast_tracepoint_trampoline_buffer): New function.
6216 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6217 structure.
6218 (install_fast_tracepoint): Ditto, also add error buffer argument.
6219 (cmd_qtminftpilen): New function.
6220 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6221 (fast_tracepoint_from_trampoline_address): New function.
6222 (fast_tracepoint_collecting): Handle trampoline as part of jump
6223 pad space.
6224 (set_trampoline_buffer_space): New function.
6225 (initialize_tracepoint): Initialize new IPA variables.
6226 * target.h (struct target_ops): Add arguments to
6227 install_fast_tracepoint_jump_pad operation, add new
6228 get_min_fast_tracepoint_insn_len operation.
6229 (target_get_min_fast_tracepoint_insn_len): New.
6230 (install_fast_tracepoint_jump_pad): Add arguments.
6231 * server.h (IPA_BUFSIZ): Define.
6232 * linux-i386-ipa.c: Include extra header files.
6233 (initialize_fast_tracepoint_trampoline_buffer): New function.
6234 (initialize_low_tracepoint): Call it.
6235 * server.h (set_trampoline_buffer_space): Declare.
6236 (claim_trampoline_space): Ditto.
6237 (have_fast_tracepoint_trampoline_buffer): Ditto.
6238
1e4d1764
YQ
62392011-11-14 Yao Qi <yao@codesourcery.com>
6240
6241 * server.c (handle_query): Handle InstallInTrace for qSupported.
6242 * tracepoint.c (add_tracepoint): Sort list.
6243 (install_tracepoint, download_tracepoint): New.
6244 (cmd_qtdp): Call them to install and download tracepoints.
6245 (sort_tracepoints): Removed.
6246 (cmd_qtstart): Update.
6247
5c73ff4e
YQ
62482011-11-14 Yao Qi <yao@codesourcery.com>
6249
6250 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6251 * mem-break.h: Declare.
6252 * tracepoint.c (cmd_qtstart): Move some code to ...
6253 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6254 New.
6255 (download_tracepoints): Move some code to ...
6256 (download_tracepoint_1): ... here. New.
6257
86a30030
YQ
62582011-11-08 Yao Qi <yao@codesourcery.com>
6259
6260 * remote-utils.c (relocate_instruction): A comment fix.
6261
8d26e50c
JB
62622011-11-07 Joel Brobecker <brobecker@adacore.com>
6263
6264 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6265 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6266 dr_status_mirror and dr_control_mirror from debug_reg_state.
6267 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6268 (i386_initial_stuff): Remove use of deleted globals.
6269 (i386_get_thread_context, i386_set_thread_context,
6270 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6271 from debug_reg_state.
6272
a59306a3
YQ
62732011-11-05 Yao Qi <yao@codesourcery.com>
6274
6275 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6276 address as TPOINT's.
6277
3065dfb6
SS
62782011-11-02 Stan Shebs <stan@codesourcery.com>
6279
6280 * tracepoint.c (agent_mem_read_string): New function.
6281 (eval_agent_expr): Call it for tracenz.
6282 * server.c (handle_query): Report support for tracenz.
6283
fd0d8c7c
YQ
62842011-11-02 Yao Qi <yao@codesourcery.com>
6285
6286 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6287
609086b1
YQ
62882011-11-02 Yao Qi <yao@codesourcery.com>
6289
6290 * target.h: Fix a typo in comment.
6291
b9fd1791
PA
62922011-10-31 Pedro Alves <pedro@codesourcery.com>
6293
6294 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6295 clobber the breakpoints' shadows with fast tracepoint jumps.
6296 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6297 * target.c (write_inferior_memory): Also pass MYADDR down to
6298 check_mem_write.
6299
03583c20
UW
63002011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6301
6302 * configure.ac: Check support for personality routine.
6303 * configure: Regenerate.
6304 * config.in: Likewise.
6305 * linux-low.c: Include <sys/personality.h>.
6306 Define ADDR_NO_RANDOMIZE if necessary.
6307 (linux_create_inferior): Disable address space randomization when
6308 forking inferior, if requested.
6309 (linux_supports_disable_randomization): New function.
6310 (linux_target_ops): Install it.
6311 * server.h (disable_randomization): Declare.
6312 * server.c (disable_randomization): New global variable.
6313 (handle_general_set): Handle QDisableRandomization.
6314 (handle_query): Likewise for qSupported.
6315 (main): Support --disable-randomization and --no-disable-randomization
6316 command line arguments.
6317 * target.h (struct target_ops): Add supports_disable_randomization.
6318 (target_supports_disable_randomization): New macro.
6319
723b724b
MF
63202011-09-29 Mike Frysinger <vapier@gentoo.org>
6321
6322 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6323 ifdef check.
6324 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6325 [!PT_GETDSBT] (target_loadmap): New definition.
6326 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6327 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6328 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6329 and PT_GETDSBT to LINUX_LOADMAP.
6330 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6331 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6332
55329a5c 63332011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6334
6335 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6336 (arm_linux_hwbp_cap): New static variable.
6337 (arm_linux_get_hwbp_cap): Replace by ...
6338 (arm_linux_init_hwbp_cap): ... this new function.
6339 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6340 (arm_linux_get_hw_watchpoint_count): Likewise.
6341 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6342 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6343 (arm_prepare_to_resume): Use perror_with_name instead of error.
6344
55329a5c 63452011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6346
6347 * linux-arm-low.c: Include <signal.h>.
6348 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6349 (struct arm_linux_hwbp_cap): New data type.
6350 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6351 (struct arm_linux_hw_breakpoint): New data type.
6352 (MAX_BPTS, MAX_WPTS): Define.
6353 (struct arch_process_info, struct arch_lwp_info): New data types.
6354 (arm_linux_get_hwbp_cap): New function.
6355 (arm_linux_get_hw_breakpoint_count): Likewise.
6356 (arm_linux_get_hw_watchpoint_count): Likewise.
6357 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6358 (arm_hwbp_control_initialize): Likewise.
6359 (arm_hwbp_control_is_enabled): Likewise.
6360 (arm_hwbp_control_is_initialized): Likewise.
6361 (arm_hwbp_control_disable): Likewise.
6362 (arm_linux_hw_breakpoint_equal): Likewise.
6363 (arm_linux_hw_point_initialize): Likewise.
6364 (struct update_registers_data): New data structure.
6365 (update_registers_callback: New function.
6366 (arm_insert_point): Likewise.
6367 (arm_remove_point): Likewise.
6368 (arm_stopped_by_watchpoint): Likewise.
6369 (arm_stopped_data_address): Likewise.
6370 (arm_new_process): Likewise.
6371 (arm_new_thread): Likewise.
6372 (arm_prepare_to_resume): Likewise.
6373 (the_low_target): Register arm_insert_point, arm_remove_point,
6374 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6375 arm_new_thread, and arm_prepare_to_resume.
6376
6b9801d4
SS
63772011-09-15 Stan Shebs <stan@codesourcery.com>
6378
6379 * server.h (struct emit_ops): Add compare-goto fields.
6380 * tracepoint.c (gdb_agent_op_sizes): New table.
6381 (emit_eq_goto): New function.
6382 (emit_ne_goto): New function.
6383 (emit_lt_goto): New function.
6384 (emit_le_goto): New function.
6385 (emit_gt_goto): New function.
6386 (emit_ge_goto): New function.
6387 (is_goto_target): New function.
6388 (compile_bytecodes): Recognize special cases of compare-goto
6389 combinations and call specialized emitters for them.
6390 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6391 (amd64_emit_ne_goto): New function.
6392 (amd64_emit_lt_goto): New function.
6393 (amd64_emit_le_goto): New function.
6394 (amd64_emit_gt_goto): New function.
6395 (amd64_emit_ge_goto): New function.
6396 (amd64_emit_ops): Add the new functions.
6397 (i386_emit_eq_goto): New function.
6398 (i386_emit_ne_goto): New function.
6399 (i386_emit_lt_goto): New function.
6400 (i386_emit_le_goto): New function.
6401 (i386_emit_gt_goto): New function.
6402 (i386_emit_ge_goto): New function.
6403 (i386_emit_ops): Add the new functions.
6404
bf15cbda
SS
64052011-09-08 Stan Shebs <stan@codesourcery.com>
6406
6407 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6408 (i386_emit_epilogue): Restore %ebx.
6409
943ca1dd
JZ
64102011-08-31 Jie Zhang <jzhang918@gmail.com>
6411
6412 * server.c (step_thread): Remove definition.
6413 (process_serial_event): Don't handle Hs.
6414 * server.h (step_thread): Remove declaration.
6415 * target.c (set_desired_inferior): Remove use of step_thread.
6416
e3deef73
LM
64172011-08-24 Luis Machado <lgustavo@codesourcery.com>
6418
6419 * linux-low.c: Include linux-procfs.h.
6420 (linux_attach_lwp_1): Update comments.
6421 (linux_attach): Scan for existing threads when attaching to a
6422 process that is the tgid.
6423 * Makefile.in: Update dependencies.
6424
13da1c97
LM
64252011-08-24 Luis Machado <lgustavo@codesourcery.com>
6426
6427 * configure.srv: Add linux-procfs.o dependencies.
6428
881127c9
YQ
64292011-08-14 Yao Qi <yao@codesourcery.com>
6430
6431 * target.h (struct target_ops): Fix indent.
6432 * win32-low.c (win32_target_ops): Fix comment.
6433
58dbd541
YQ
64342011-08-14 Andrew Jenner <andrew@codesourcery.com>
6435 Yao Qi <yao@codesourcery.com>
6436
6437 * Makefile.in (clean): Remove tic6x-*.c files.
6438 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6439 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6440 (tic6x-c64xp-linux.c): Likewise.
6441 * configure.srv: Add support for tic6x-*-uclinux.
6442 * linux-tic6x-low.c: New.
6443 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6444
78d85199
YQ
64452011-08-14 Andrew Stubbs <ams@codesourcery.com>
6446 Yao Qi <yao@codesourcery.com>
6447
6448 * target.h (struct target_ops): Add read_loadmap.
6449 * linux-low.c (struct target_loadseg): New type.
6450 (struct target_loadmap): New type.
6451 (linux_read_loadmap): New function.
6452 (linux_target_ops): Add linux_read_loadmap.
6453 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6454 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6455 to NULL.
78d85199 6456
a959a88d
EZ
64572011-08-05 Eli Zaretskii <eliz@gnu.org>
6458
6459 * win32-low.c: Include <stdint.h>.
6460
1ced966e
PA
64612011-07-22 Pedro Alves <pedro@codesourcery.com>
6462
6463 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6464 to the inferior here.
6465 (i386_remove_aligned_watchpoint): Ditto.
6466 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6467 fit part of the watchpoint in the debug registers.
6468 (i386_update_inferior_debug_regs): New.
6469 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6470 registers, and only update the inferior on success.
6471 (i386_low_remove_watchpoint): Ditto.
6472
d26e3629
KY
64732011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6474
6475 * linux-low.c (compare_ints, unique, list_threads, show_process,
6476 linux_core_of_thread): Delete.
6477 (linux_target_ops): Change linux_core_of_thread to
6478 linux_common_core_of_thread.
6479 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6480 * utils.c (malloc_failure): Change type of argument.
6481 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6482 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6483 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6484 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6485 (IPA_OBJS): Add common-utils-ipa.o.
6486 (ptid_h, linux_osdata_h): New macros.
6487 (server_h): Add common/common-utils.h, common/xml-utils.h,
6488 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6489 common/ptid.h.
6490 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6491 ptid.o, buffer.o): New rules.
6492 (linux-low.o): Add common/linux-osdata.h as a dependency.
6493 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6494 * configure.ac: Add AC_HEADER_DIRENT check.
6495 * config.in: Regenerate.
6496 * configure: Regenerate.
6497 * remote-utils.c (xml_escape_text): Delete.
6498 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6499 buffer_xml_printf): Move to common/buffer.c.
6500 * server.c (main): Remove call to initialize_inferiors.
6501 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6502 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6503 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6504 internal_error, gdb_assert, gdb_assert_fail): Delete.
6505 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6506 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6507 common/buffer.h.
6508 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6509 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6510 initialize_inferiors): Delete.
6511
2275a1a7
PA
65122011-07-20 Pedro Alves <pedro@codesourcery.com>
6513
6514 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6515 symbol error.
6516
0a5b1e09
PA
65172011-05-31 Pedro Alves <pedro@codesourcery.com>
6518
6519 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6520 assertion.
6521 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6522
6938fd34
YQ
65232011-05-26 Yao Qi <yao@codesourcery.com>
6524
6525 * Makefile.in (thread-db.o): Track dependence to
6526 common/gdb_thread_db.h.
6527 * thread-db.c: include gdb_thread_db.h from right place.
6528
b481f9e0
TT
65292011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6530
6531 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6532 __FILE__ and __LINE__ to internal_error.
6533
98a5dd13
DE
65342011-05-13 Doug Evans <dje@google.com>
6535
6536 * thread-db.c (try_thread_db_load_from_sdir): New function.
6537 (try_thread_db_load_from_dir): New function.
6538 (thread_db_load_search): Handle $sdir, ignore $pdir.
6539 Remove trying of system directories if search of
6540 libthread-db-search-path fails, that is now done via $sdir.
6541
d248b706
KY
65422011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6543
6544 * server.c (handle_query): Add EnableDisableTracepoints to the list
6545 of supported features.
43aaf8b6 6546 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6547 tracepoints.
43aaf8b6
PA
6548 (cmd_qtenable_disable): New.
6549 (cmd_qtstart): Install tracepoints even if disabled.
6550 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6551 receiving a QTEnable or QTDisable packet.
6552 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6553 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6554 tracepoints.
6555 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6556
84e578fb
DE
65572011-05-10 Doug Evans <dje@google.com>
6558
6559 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6560
71f55dd8
DE
65612011-05-04 Doug Evans <dje@google.com>
6562
6563 * linux-low.c (linux_join): Skip process lookup.
6564 * spu-low.c (spu_join): Ditto.
6565 * server.c (join_inferiors_callback): Delete.
6566 (process_serial_event): For 'D' packet (detach) call join_inferior
6567 directly.
6568
4d393d60
JM
65692011-05-04 Joseph Myers <joseph@codesourcery.com>
6570
6571 * README: Don't mention xscale*-*-linux*.
6572 * configure.srv (xscale*-*-linux*): Don't handle target.
6573
b00ad6ff
NF
65742011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6575
6576 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6577 casting pointers.
6578 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6579 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6580 (i386_emit_void_call_2): Likewise.
6581
af96c192
YQ
65822011-04-26 Yao Qi <yao@codesourcery.com>
6583
43aaf8b6
PA
6584 * linux-low.c: Move common macros to linux-ptrace.h.
6585 Include linux-ptrace.h.
af96c192
YQ
6586 * Makefile.in (linux_ptrace_h): New.
6587 (linux-low.o): Depends on linux-ptrace.h.
6588
03f2bd59
JK
65892011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6590
6591 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6592 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6593 (remote_prepare): New function with most of the TCP code from ...
6594 (remote_open): ... here. Detect PORT here unconditionally. Move also
6595 setting transport_is_reliable.
6596 * server.c (run_once): New variable.
6597 (gdbserver_usage): Document it.
6598 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6599 the first run if RUN_ONCE.
6600 * server.h (run_once, remote_prepare): New declarations.
6601
7a9dd1b2
TT
66022011-04-19 Tom Tromey <tromey@redhat.com>
6603
6604 * win32-low.c (handle_load_dll): Remove duplicate "the".
6605
81239425
PM
66062011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6607
6608 Remove support for old Cygwin 1.5 versions.
6609 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6610 function to avoid warning.
6611 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6612 warning.
6613
9e0627f1
PM
66142011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6615
6616 * gdbserver/server.h (Macro _): Define it if not available.
6617
588eebee
MS
66182011-03-14 Michael Snyder <msnyder@vmware.com>
6619
348af9f7 6620 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6621
43f70d4c
JB
66222011-03-10 Joel Brobecker <brobecker@adacore.com>
6623
6624 * Makefile.in (maintainer-clean realclean distclean): Remove
6625 "make ... subdir_do" command.
6626
348af9f7
MS
66272011-03-10 Michael Snyder <msnyder@vmware.com>
6628
6629 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6630
6631 * server.c (handle_v_run): Free alloced buffer on early return.
6632
e637a4f5
YQ
66332011-03-09 Yao Qi <yao@codesourcery.com>
6634
6635 Revert:
6636 2011-03-04 Yao Qi <yao@codesourcery.com>
6637
6638 * Makefile.in: Remove GNU make feature --directory.
6639
6640 2011-03-05 Yao Qi <yao@codesourcery.com>
6641
6642 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6643 (subdir_do): New make target. Copied from gdb/Makefile.
6644 (maintainer-clean, realclean, distclean, clean): Call corresponding
6645 make targets in common/Makefile.
6646
6647 2011-02-11 Yao Qi <yao@codesourcery.com>
6648
6649 * configure.ac: Call AC_PROG_RANLIB.
6650 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6651 * configure: Regenerate.
6652
e6edda56
JK
66532011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6654
6655 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6656
e5141119
JB
66572011-03-06 Yao Qi <yao@codesourcery.com>
6658
6659 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6660
64794aa4
JB
66612011-03-05 Yao Qi <yao@codesourcery.com>
6662
6663 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6664 (subdir_do): New make target. Copied from gdb/Makefile.
6665 (maintainer-clean, realclean, distclean, clean): Call corresponding
6666 make targets in common/Makefile.
6667
7a762829
YQ
66682011-03-04 Yao Qi <yao@codesourcery.com>
6669
6670 * Makefile.in: Remove GNU make feature --directory.
6671
348af9f7
MS
66722011-03-04 Michael Snyder <msnyder@vmware.com>
6673
6674 * server.c (queue_stop_reply): Call xmalloc not malloc.
6675
66762011-03-02 Michael Snyder <msnyder@vmware.com>
6677
6678 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6679
9f72fee2
MS
66802011-02-28 Michael Snyder <msnyder@vmware.com>
6681
588eebee
MS
6682 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6683 (cmd_qtframe): Ditto.
6684 (cmd_qtbuffer): Ditto.
6685 (cmd_bigqtbuffer): Ditto.
6686
9f72fee2
MS
6687 * utils.c (decimal2str): Initialize 'width' to nine, then
6688 don't mess with it.
6689
8040bd49
UW
66902011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6691
6692 * hostio.c (require_data): Free *data, not data.
6693
7e52cbd0
JK
66942011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6695
6696 * hostio.c (require_data): Use free, not xfree.
6697
9130f83e
MS
66982011-02-27 Michael Snyder <msnyder@vmware.com>
6699
4b812f4e
MS
6700 * server.c (handle_query): Discard unused value.
6701
9130f83e
MS
6702 * hostio.c (require_data): Free malloc memory before returning
6703 error.
6704
69d37113
MS
67052011-02-26 Michael Snyder <msnyder@vmware.com>
6706
6707 * linux-low.c (list_threads): Call closedir for dirent.
6708
35f5825a
MS
67092011-02-27 Michael Snyder <msnyder@vmware.com>
6710
2a589cef
MS
6711 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6712 a case statement falls through.
6713
0adea5f7
MS
6714 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6715
35f5825a
MS
6716 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6717 in comparison.
6718
238f1c74
MS
67192011-02-26 Michael Snyder <msnyder@vmware.com>
6720
6721 * utils.c (decimal2str): Eliminate dead code and dead param.
6722 (pulongest): Drop dead param from call to decimal2str.
6723 (plongest): Ditto.
6724
633ff500
JB
67252011-02-24 Joel Brobecker <brobecker@adacore.com>
6726
6727 Revert the following patch (not approved yet):
6728 2011-02-21 Hui Zhu <teawater@gmail.com>
6729 * tracepoint.c (tp_printf): New function.
6730 (eval_agent_expr): Handle gdb_agent_op_printf.
6731
f9c6ff72
HZ
67322011-02-21 Hui Zhu <teawater@gmail.com>
6733
6734 * tracepoint.c (tp_printf): New function.
6735 (eval_agent_expr): Handle gdb_agent_op_printf.
6736
94d5e490
TT
67372011-02-18 Tom Tromey <tromey@redhat.com>
6738
6739 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6740 (tracepoint.o): Likewise.
6741 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6742 (gdb_agent_op_names): Likewise.
6743
c7f96d2b
TT
67442011-02-18 Tom Tromey <tromey@redhat.com>
6745
6746 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6747 gdb_agent_op_rot>: New constants.
6748 (gdb_agent_op_names): Add pick and roll.
6749 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6750 cases.
6751
0feedb2c
JK
67522011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6753
6754 * aclocal.m4: Regenerated with aclocal-1.11.1.
6755
b3b9301e
PA
67562011-02-14 Pedro Alves <pedro@codesourcery.com>
6757
6758 * server.c (handle_qxfer_traceframe_info): New.
6759 (qxfer_packets): Register "traceframe-info".
6760 (handle_query): Report support for qXfer:traceframe-info:read+.
6761 * tracepoint.c (match_blocktype): New.
6762 (traceframe_find_block_type): Rename to ...
6763 (traceframe_walk_blocks): ... this. Add callback filter argument,
6764 and use it.
6765 (traceframe_find_block_type): New, reimplemented on top of
6766 traceframe_walk_blocks.
6767 (build_traceframe_info_xml): New.
6768 (traceframe_read_info): New.
6769 * server.h (traceframe_read_info): Declare.
6770
4f3e6fb7
YQ
67712011-02-11 Yao Qi <yao@codesourcery.com>
6772
6773 * configure.ac: Call AC_PROG_RANLIB.
6774 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6775 * configure: Regenerate.
6776
764880b7
PA
67772011-02-07 Pedro Alves <pedro@codesourcery.com>
6778
6779 * server.c (gdb_read_memory): Change return semantics to allow
6780 partial transfers.
6781 (handle_search_memory_1): Adjust.
6782 (process_serial_event) <'m' packet>: Handle partial transfers.
6783 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6784
1c79eb8a
PA
67852011-01-28 Pedro Alves <pedro@codesourcery.com>
6786
6787 * regcache.c (init_register_cache): Initialize
6788 regcache->register_status.
6789 (free_register_cache): Release regcache->register_status.
6790 (regcache_cpy): Copy register_status.
6791 (registers_to_string): Print 'x's for unavailable registers.
6792 (supply_register): Mark the register's status valid or
6793 unavailable, depending on whether a buffer was passed in or not.
6794 (supply_register_zeroed): New.
6795 (supply_regblock): Mark the registers' status valid or
6796 unavailable, depending on whether a buffer was passed in or not.
6797 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6798 (struct regcache): New `register_status' field.
6799 (supply_register_zeroed): Declare.
6800 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6801 supply_register_zeroed, rather than passing a NULL buffer to
6802 supply_register.
6803 * tracepoint.c (fetch_traceframe_registers): Update comment.
6804
85724a0e
PA
68052011-01-28 Pedro Alves <pedro@codesourcery.com>
6806
6807 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6808 buffer explicit.
6809
d08aafef
PA
68102011-01-25 Pedro Alves <pedro@codesourcery.com>
6811
6812 * server.h (decode_xfer_write): Change prototype.
6813 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6814 and don't extract the annex here.
6815 * server.c (decode_xfer_read): Remove `annex' parameter,
6816 and don't extract the annex here.
6817 (decode_xfer): New.
6818 (struct qxfer): New.
6819 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6820 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6821 (handle_qxfer_statictrace): New functions, abstracted out from
6822 handle_query, and made to use the struct qxfer interface.
6823 (handle_threads_qxfer_proper): Rename to ...
6824 (handle_qxfer_threads_proper): ... this.
6825 (handle_threads_qxfer): Rename to ...
6826 (handle_qxfer_threads): ... this. Adjust.
6827 (qxfer_packets): New array.
6828 (handle_qxfer): New function.
6829 (handle_query): Use handle_qxfer.
6830
493e2a69
MS
68312011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6832
6833 * gdbreplay.c: Shorten lines of >= 80 columns.
6834 * linux-low.c: Ditto.
6835 * linux-ppc-low.c: Ditto.
6836 * linux-s390-low.c: Ditto.
6837 * linux-sparc-low.c: Ditto.
6838 * linux-x86-low.c: Ditto.
6839 * linux-xtensa-low.c: Ditto.
6840 * mem-break.c: Ditto.
6841 * nto-low.c: Ditto.
6842 * regcache.h: Ditto.
6843 * remote-utils.c: Ditto.
6844 * server.c: Ditto.
6845 * server.h: Ditto.
6846 * thread-db.c: Ditto.
6847 * tracepoint.c: Ditto.
6848 * utils.c: Ditto.
6849 * win32-low.h: Ditto.
6850
44944448
JB
68512011-01-05 Joel Brobecker <brobecker@adacore.com>
6852
6853 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6854 update.
6855
71ce852c
JB
68562011-01-01 Joel Brobecker <brobecker@adacore.com>
6857
6858 * server.c (gdbserver_version): Update copyright year in version
6859 output.
6860 * gdbreplay.c (gdbreplay_version): Ditto.
6861
eb826dc6
MF
68622010-12-29 Jie Zhang <jie.zhang@analog.com>
6863
6864 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6865 * linux-bfin-low.c: New file.
6866 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6867 PT_DATA_ADDR for BFIN targets.
6868 * Makefile.in (SFILES): Add linux-bfin-low.c.
6869 (clean): Remove reg-bfin.c.
6870 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6871 * README: Mention supported Blackfin targets.
6872
39ab222a
MF
68732010-12-23 Mike Frysinger <vapier@gentoo.org>
6874
6875 * .gitignore: New file.
6876
a1f2ce7d
MF
68772010-11-16 Mike Frysinger <vapier@gentoo.org>
6878
6879 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6880
f474844c
JZ
68812010-10-22 Jie Zhang <jie@codesourcery.com>
6882
6883 * Makefile.in: Add FLAGS_TO_PASS variable.
6884 (install): Remove dependency of install-only and recursively
6885 invoke make for install-only.
6886
f1048712
DE
68872010-10-04 Doug Evans <dje@google.com>
6888
6889 * Makefile.in (uninstall): Use $(DESTDIR).
6890
b53a1623
PA
68912010-09-24 Pedro Alves <pedro@codesourcery.com>
6892
e6ee044d
PA
6893 PR gdb/11842
6894
b53a1623
PA
6895 * linux-x86-low.c (compat_siginfo_from_siginfo)
6896 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6897 si_code is < 0. Check for si_code == SI_TIMER before checking for
6898 si_code < 0.
6899
fa1bd1e4
JB
69002010-09-13 Joel Brobecker <brobecker@adacore.com>
6901
6902 * lynx-i386-low.c: New file.
6903 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6904
47fac8f8
JB
69052010-09-13 Joel Brobecker <brobecker@adacore.com>
6906
6907 * lynx-low.c (ptrace_request_to_str): Remove handling for
6908 request values that have been removed in LynxOS 5.x.
6909
1adfc54d
JB
69102010-09-13 Joel Brobecker <brobecker@adacore.com>
6911
6912 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6913 <ptrace.h>
6914
c2a66c29
NS
69152010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6916
6917 * configure.ac: Add --enable-inprocess-agent option.
6918 * configure: Rebuilt.
6919
32fcada3
YQ
69202010-09-06 Yao Qi <yao@codesourcery.com>
6921
6922 * linux-low.c (linux_kill): Remove unused variable.
6923 (linux_stabilize_threads): Likewise.
6924 * server.c (start_inferior): Likewise.
6925 (queue_stop_reply_callback): Likewise.
6926 * tracepoint.c (do_action_at_tracepoint): Likewise.
6927
0cccb683
YQ
69282010-09-06 Yao Qi <yao@codesourcery.com>
6929
6930 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6931 on return.
6932
423ec54c
JK
69332010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6934
6935 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6936
12ac6819
PA
69372010-09-06 Pedro Alves <pedro@codesourcery.com>
6938
6939 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6940 "$(IPA_DEPFILES)".
6941
8ed54b31
JB
69422010-09-01 Joel Brobecker <brobecker@adacore.com>
6943
6944 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6945 gdbserver/lynx-ppc-low.c: New files.
6946 * Makefile.in (lynx_low_h): New variable.
6947 (lynx-low.o, lynx-ppc-low.o): New rules.
6948 * configure.ac: On LynxOS, link with -lnetinet.
6949 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6950 * configure: regenerate.
6951
bb0116a4
JB
69522010-09-01 Joel Brobecker <brobecker@adacore.com>
6953
6954 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6955 * configure.ac: Add check for vasprintf and vsnprintf.
6956 * configure, config.in: Regenerate.
6957 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6958
a778ab81 69592010-09-01 Joel Brobecker <brobecker@adacore.com>
6960
6961 * gdbreplay.c: Move include of alloca.h up, next to include of
6962 malloc.h.
6963 * server.h: Add include of malloc.h.
6964 * mem-break.c: Remove include of malloc.h.
6965 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6966
8b034a19 69672010-09-01 Joel Brobecker <brobecker@adacore.com>
6968
6969 * Makefile.in (memmem.o): Build with -Wno-error.
6970
69712010-09-01 Joel Brobecker <brobecker@adacore.com>
6972
6973 * utils.c (xsnprintf): Make non-static.
6974 * server.h: Add xsnprintf declaration.
6975 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6976 replace calls to snprintf by calls to xsnprintf throughout.
6977
69782010-09-01 Joel Brobecker <brobecker@adacore.com>
6979
6980 * configure.ac: Add configure check for alloca.
6981 * configure, config.in: Regenerate.
6982 * server.h: Include alloca.h if it exists.
6983 * gdbreplay.c: Include alloca.h if it exists.
6984
1a981360
PA
69852010-08-28 Pedro Alves <pedro@codesourcery.com>
6986
6987 * linux-low.c (__SIGRTMIN): Define if not already defined.
6988 (linux_create_inferior): Check for __ANDROID__ rather than
6989 __SIGRTMIN.
6990 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6991 are already deferred.
6992 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6993 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6994 stopped and already has a pending signal to report.
6995 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6996 a pending signal to report or is moving out of a jump pad.
6997 (linux_init_signals): Check for __ANDROID__ rather than
6998 __SIGRTMIN.
6999
b4d51a55
PA
70002010-08-28 Pedro Alves <pedro@codesourcery.com>
7001
7002 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7003 debug_threads check. Avoid a linear search when not doing debug
7004 output.
7005
ec48365d
PA
70062010-08-27 Pedro Alves <pedro@codesourcery.com>
7007
7008 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7009 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7010 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7011 (process_event): Change local fd's type to gdb_fildes_t.
7012 (create_file_handler): Adjust prototype.
7013 (delete_file_handler): Adjust prototype.
7014 (handle_file_event): Adjust prototype. Use pfildes.
7015 (create_file_event): Adjsut prototype.
7016 * remote-utils.c (remote_desc, listen_desc): Change type to
7017 gdb_fildes_t.
7018 * server.h: New gdb_fildes_t typedef.
7019 [USE_WIN32API]: Include winsock2.h.
7020 (delete_file_handler, add_file_handler): Adjust prototypes.
7021 (pfildes): Declare.
7022 * utils.c (pfildes): New.
7023
854d88f0
PA
70242010-08-27 Pedro Alves <pedro@codesourcery.com>
7025
7026 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7027 * configure: Regenerate.
7028
0146f85b
PA
70292010-08-27 Pedro Alves <pedro@codesourcery.com>
7030
7031 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7032 (linux_done_accessing_memory): ... this.
7033 (linux_target_ops): Adjust.
7034 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7035 * nto-low.c (nto_target_ops): Adjust comment.
7036 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7037 * spu-low.c (spu_target_ops): Adjust comment.
7038 * target.h (target_ops): Rename unprepare_to_access_memory field
7039 to done_accessing_memory.
7040 (unprepare_to_access_memory): Rename to ...
7041 (done_accessing_memory): ... this.
7042
90d74c30
PA
70432010-08-26 Pedro Alves <pedro@codesourcery.com>
7044
7045 * linux-low.c (linux_prepare_to_access_memory): New.
7046 (linux_unprepare_to_access_memory): New.
7047 (linux_target_ops): Install them.
7048 * server.c (read_memory): Rename to ...
7049 (gdb_read_memory): ... this. Use
7050 prepare_to_access_memory/prepare_to_access_memory.
7051 (write_memory): Rename to ...
7052 (gdb_write_memory): ... this. Use
7053 prepare_to_access_memory/prepare_to_access_memory.
7054 (handle_search_memory_1): Adjust.
7055 (process_serial_event): Adjust.
7056 * target.h (struct target_ops): New fields
7057 prepare_to_access_memory and unprepare_to_access_memory.
7058 (prepare_to_access_memory, unprepare_to_access_memory): New.
7059 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7060 prepare_to_access_memory/prepare_to_access_memory.
7061 * nto-low.c (nto_target_ops): Adjust.
7062 * spu-low.c (spu_target_ops): Adjust.
7063 * win32-low.c (win32_target_ops): Adjust.
7064
fd467969
PA
70652010-08-26 Pedro Alves <pedro@codesourcery.com>
7066
7067 * Makefile.in (WARN_CFLAGS): Get it from configure.
7068 (WERROR_CFLAGS): New.
7069 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7070 * configure.ac: Introduce --enable-werror, which adds -Werror to
7071 the compiler command line. Enabled by default. Disable with
7072 --disable-werror. Add -Wdeclaration-after-statement
7073 Wpointer-arith and -Wformat-nonliteral to warning flags.
7074 * configure: Regenerate.
7075
331e2f5f
PA
70762010-08-26 Pedro Alves <pedro@codesourcery.com>
7077
7078 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7079
e581f2b4
PA
70802010-08-26 Pedro Alves <pedro@codesourcery.com>
7081
7082 * gdbreplay.c (remote_error): New.
7083 (gdbchar): New.
7084 (expect): Use gdbchar. Check for error reading from GDB.
7085 Clarify sync error output.
7086 (play): Check for errors writing to GDB.
7087 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7088 * remote-utils.c (getpkt): Check for errors writing to the remote
7089 descriptor.
7090
3c11dd79
PA
70912010-08-25 Pedro Alves <pedro@codesourcery.com>
7092
7093 * linux-low.c (linux_wait_1): Move non-debugging code out of
7094 `debug_threads' control.
7095
d20a8ad9
PA
70962010-08-25 Pedro Alves <pedro@codesourcery.com>
7097
7098 * linux-low.c (linux_wait_1): Don't set last_status here.
7099 * server.c (push_event, queue_stop_reply_callback): Assert we're
7100 not pushing a TARGET_WAITKIND_IGNORE event.
7101 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7102 (myresume, handle_target_event): Set the thread's last_resume_kind
7103 and last_status from the target returned status.
7104
964e4306
PA
71052010-08-25 Pedro Alves <pedro@codesourcery.com>
7106
7107 PR threads/10729
7108
7109 * linux-x86-low.c (update_debug_registers_callback): New.
7110 (i386_dr_low_set_addr): Use it.
7111 (i386_dr_low_get_addr): New.
7112 (i386_dr_low_set_control): Use update_debug_registers_callback.
7113 (i386_dr_low_get_control): New.
7114 (i386_dr_low_get_status): Adjust.
7115 * linux-low.c (linux_stop_lwp): New.
7116 * linux-low.h (linux_stop_lwp): Declare.
7117
7118 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7119 argument instead of a i386_debug_reg_state.
7120 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7121 a i386_debug_reg_state.
7122 (i386_insert_aligned_watchpoint): Adjust.
7123 (i386_remove_aligned_watchpoint): Adjust.
7124 (i386_low_stopped_data_address): Read the debug registers from the
7125 inferior instead of from the mirrors.
7126 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7127 (i386_dr_low_get_addr): Declare.
7128 (i386_dr_low_get_control): Declare.
7129 (i386_dr_low_get_status): Change prototype.
7130
7131 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7132 (i386_dr_low_get_addr): New.
7133 (i386_dr_low_get_control): New.
7134 (i386_dr_low_get_status): Adjust prototype. Return
7135 dr_status_mirror.
7136 (i386_initial_stuff): Clear dr_status_mirror and
7137 dr_control_mirror.
7138 (i386_get_thread_context): Adjust.
7139 (i386_set_thread_context): Adjust.
7140 (i386_thread_added): Adjust.
7141
5f21a75b
PA
71422010-08-24 Pedro Alves <pedro@codesourcery.com>
7143
7144 * linux-low.h (linux_thread_area): Delete declaration.
7145
3e4c1235
TS
71462010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7147
7148 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7149 after its termination.
7150
1971b033
PA
71512010-08-09 Pedro Alves <pedro@codesourcery.com>
7152
7153 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7154 (gdb_wants_all_stopped): Delete.
7155 (linux_wait_1): Don't call them.
7156 * server.c (handle_v_cont): Tag all threads as want-stopped.
7157 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7158 stopped as "client-wants-stopped".
7159
310444ac
PA
71602010-07-31 Pedro Alves <pedro@codesourcery.com>
7161
7162 * Makefile.in (signals_h): New.
7163 (server_h): Depend on it.
7164 (server.o): Don't depend on $(signals_def).
7165 (signals.o): Depend on $(signals_def).
7166
a19cae16
JK
71672010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7168
7169 * Makefile.in (signals_def): New.
7170 (server_h): Append include/gdb/signals.h and signals_def.
7171 (server.o): Append signals_def.
7172
30d50328
JK
71732010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7174
7175 * server.c (handle_target_event): Use target_signal_to_host for
7176 resume_info.sig initialization.
7177 * target.h (struct thread_resume) <sig>: New comment.
7178
5c3216e2
OS
71792010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7180
c6f46ca0
OS
7181 * server.c (handle_query): strcpy() the returned string from paddress()
7182 instead of sprintf().
5c3216e2
OS
7183 * utils.c (paddress): Return phex_nz().
7184
6bd31874
JB
71852010-07-07 Joel Brobecker <brobecker@adacore.com>
7186
7187 * server.c (handle_v_cont): Call mourn_inferior if process
7188 just exited.
7189 (myresume): Likewise.
7190
0fb4aa4b
PA
71912010-07-01 Pedro Alves <pedro@codesourcery.com>
7192
7193 Static tracepoints, and integration with UST.
7194
7195 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7196 * mem-break.c (uninsert_all_breakpoints)
7197 (reinsert_all_breakpoints): New.
7198 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7199 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7200 (gdb_agent_ust_loaded, helper_thread_id)
7201 (gdb_agent_helper_thread_id): New macros.
7202 (struct ipa_sym_addresses): Add addr_ust_loaded,
7203 addr_helper_thread_id, addr_cmd_buf.
7204 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7205 (in_process_agent_loaded_ust): New.
7206 (write_e_ust_not_loaded): New.
7207 (maybe_write_ipa_ust_not_loaded): New.
7208 (struct collect_static_trace_data_action): New.
7209 (enum tracepoint_type) <static_tracepoint>: New.
7210 (struct tracepoint) <handle>: Mention static tracepoints.
7211 (struct static_tracepoint_ctx): New.
7212 (CMD_BUF_SIZE): New.
7213 (add_tracepoint_action): Handle static tracepoint actions.
7214 (unprobe_marker_at): New.
7215 (clear_installed_tracepoints): Handle static tracepoints.
7216 (cmd_qtdp): Handle static tracepoints.
7217 (probe_marker_at): New.
7218 (cmd_qtstart): Handle static tracepoints.
7219 (response_tracepoint): Handle static tracepoints.
7220 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7221 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7222 (get_context_regcache): Handle static tracepoints.
7223 (do_action_at_tracepoint): Handle static tracepoint actions.
7224 (traceframe_find_block_type): Handle static trace data blocks.
7225 (traceframe_read_sdata): New.
7226 (download_tracepoints): Download static tracepoint actions.
7227 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7228 (GDB_PROBE_NAME): New.
7229 (ust_ops): New.
7230 (GET_UST_SYM): New.
7231 (USTF): New.
7232 (dlsym_ust): New.
7233 (ust_marker_to_static_tracepoint): New.
7234 (gdb_probe): New.
7235 (collect_ust_data_at_tracepoint): New.
7236 (gdb_ust_probe): New.
7237 (UNIX_PATH_MAX, SOCK_DIR): New.
7238 (gdb_ust_connect_sync_socket): New.
7239 (resume_thread, stop_thread): New.
7240 (run_inferior_command): New.
7241 (init_named_socket): New.
7242 (gdb_ust_socket_init): New.
7243 (cstr_to_hexstr): New.
7244 (next_st): New.
7245 (first_marker, next_marker): New.
7246 (response_ust_marker): New.
7247 (cmd_qtfstm, cmd_qtsstm): New.
7248 (unprobe_marker_at, probe_marker_at): New.
7249 (cmd_qtstmat, gdb_ust_thread): New.
7250 (gdb_ust_init): New.
7251 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7252 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7253 (ST_REGENTRY): New.
7254 (x86_64_st_collect_regmap): New.
7255 (X86_64_NUM_ST_COLLECT_GREGS): New.
7256 (AMD64_RIP_REGNUM): New.
7257 (supply_static_tracepoint_registers): New.
7258 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7259 (ST_REGENTRY): New.
7260 (i386_st_collect_regmap): New.
7261 (i386_NUM_ST_COLLECT_GREGS): New.
7262 (supply_static_tracepoint_registers): New.
7263 * server.c (handle_query): Handle qXfer:statictrace:read.
7264 <qSupported>: Report support for StaticTracepoints, and
7265 qXfer:statictrace:read features.
7266 * server.h (traceframe_read_sdata)
7267 (supply_static_tracepoint_registers): Declare.
7268 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7269 (unpack_varlen_hex): Include in IPA build.
7270 * Makefile.in (ustlibs, ustinc): New.
7271 (IPA_OBJS): Add remote-utils-ipa.o.
7272 ($(IPA_LIB)): Link -ldl and -lpthread.
7273 (UST_CFLAGS): New.
7274 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7275 * config.in, configure: Regenerate.
7276
9e4344e5
PA
72772010-06-20 Ian Lance Taylor <iant@google.com>
7278 Pedro Alves <pedro@codesourcery.com>
7279
7280 * linux-x86-low.c (always_true): Delete.
7281 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7282 trying to fool the compiler with always_true.
7283
c6beb2cb
PA
72842010-06-20 Pedro Alves <pedro@codesourcery.com>
7285
7286 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7287 conditions in gdbserver.
7288
d2ed6730
UW
72892010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7290
7291 * spu-low.c (spu_read_memory): Wrap around local store limit.
7292 (spu_write_memory): Likewise.
7293
4e29fb54
PA
72942010-06-15 Pedro Alves <pedro@codesourcery.com>
7295
7296 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7297 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7298 LONGEST uses.
7299 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7300 uses.
7301 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7302 uses with LONGEST uses.
7303
6a271cae
PA
73042010-06-14 Stan Shebs <stan@codesourcery.com>
7305 Pedro Alves <pedro@codesourcery.com>
7306
7307 Bytecode compiler.
7308
7309 * linux-x86-low.c: Include limits.h.
7310 (add_insns): New.
7311 (always_true): New.
7312 (EMIT_ASM): New.
7313 (EMIT_ASM32): New.
7314 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7315 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7316 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7317 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7318 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7319 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7320 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7321 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7322 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7323 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7324 (amd64_emit_void_call_2): New.
7325 (amd64_emit_ops): New.
7326 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7327 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7328 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7329 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7330 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7331 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7332 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7333 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7334 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7335 (i386_emit_stack_adjust, i386_emit_int_call_1)
7336 (i386_emit_void_call_2): New.
7337 (i386_emit_ops): New.
7338 (x86_emit_ops): New.
7339 (the_low_target): Install x86_emit_ops.
7340 * server.h (struct emit_ops): New.
7341 (get_raw_reg_func_addr): Declare.
7342 (current_insn_ptr, emit_error): Declare.
7343 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7344 (set_trace_state_variable_value): New defines.
7345 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7346 addr_get_trace_state_variable_value and
7347 addr_set_trace_state_variable_value.
7348 (symbol_list): New fields for get_raw_reg,
7349 get_trace_state_variable_value and set_trace_state_variable_value.
7350 (condfn): New typedef.
7351 (struct tracepoint): New field `compiled_cond'.
7352 (do_action_at_tracepoint): Clear compiled_cond.
7353 (get_trace_state_variable_value, set_trace_state_variable_value):
7354 Export in the IPA.
7355 (condition_true_at_tracepoint): If there's a compiled condition,
7356 run that.
7357 (current_insn_ptr, emit_error): New globals.
7358 (struct bytecode_address): New.
7359 (get_raw_reg_func_addr): New.
7360 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7361 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7362 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7363 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7364 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7365 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7366 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7367 (compile_tracepoint_condition, compile_bytecodes): New.
7368 * target.h (emit_ops): Forward declare.
7369 (struct target_ops): New field emit_ops.
7370 (target_emit_ops): New.
7371 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7372 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7373 * linux-low.c (linux_emit_ops): New.
7374 (linux_target_ops): Install it.
7375 * linux-low.h (struct linux_target_ops): New field emit_ops.
7376
92b72907
UW
73772010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7378
7379 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7380 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7381
fa593d66
PA
73822010-06-01 Pedro Alves <pedro@codesourcery.com>
7383 Stan Shebs <stan@codesourcery.com>
7384
7385 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7386 (all): Depend on $(extra_libraries).
7387 (install-only): Install the IPA.
7388 (IPA_OBJS, IPA_LIB): New.
7389 (clean): Remove the IPA lib.
7390 (IPAGENT_CFLAGS): New.
7391 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7392 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7393 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7394 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7395 * configure.ac: Check for atomic builtins support in the compiler.
7396 (IPA_DEPFILES, extra_libraries): Define.
7397 * configure.srv (ipa_obj): Add description.
7398 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7399 (i[34567]86-*-linux*): Set ipa_obj.
7400 (x86_64-*-linux*): Set ipa_obj.
7401 * linux-low.c (stabilizing_threads): New.
7402 (supports_fast_tracepoints): New.
7403 (linux_detach): Stabilize threads before detaching.
7404 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7405 the lwp is either not stabilizing, or is moving out of a jump pad.
7406 (linux_fast_tracepoint_collecting): New.
7407 (maybe_move_out_of_jump_pad): New.
7408 (enqueue_one_deferred_signal): New.
7409 (dequeue_one_deferred_signal): New.
7410 (linux_wait_for_event_1): If moving out of a jump pad, defer
7411 pending signals to later.
7412 (linux_stabilize_threads): New.
7413 (linux_wait_1): Check if threads need moving out of jump pads, and
7414 do it if so.
7415 (stuck_in_jump_pad_callback): New.
7416 (move_out_of_jump_pad_callback): New.
7417 (lwp_running): New.
7418 (linux_resume_one_lwp): Handle moving out of jump pads.
7419 (linux_set_resume_request): Dequeue deferred signals.
7420 (need_step_over_p): Also step over fast tracepoint jumps.
7421 (start_step_over): Also uninsert fast tracepoint jumps.
7422 (finish_step_over): Also reinsert fast tracepoint jumps.
7423 (linux_install_fast_tracepoint_jump): New.
7424 (linux_target_ops): Install linux_stabilize_threads and
7425 linux_install_fast_tracepoint_jump_pad.
7426 * linux-low.h (linux_target_ops) <get_thread_area,
7427 install_fast_tracepoint_jump_pad>: New fields.
7428 (struct lwp_info) <collecting_fast_tracepoint,
7429 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7430 (linux_get_thread_area): Declare.
7431 * linux-x86-low.c (jump_insn): New.
7432 (x86_get_thread_area): New.
7433 (append_insns): New.
7434 (push_opcode): New.
7435 (amd64_install_fast_tracepoint_jump_pad): New.
7436 (i386_install_fast_tracepoint_jump_pad): New.
7437 (x86_install_fast_tracepoint_jump_pad): New.
7438 (the_low_target): Install x86_get_thread_area and
7439 x86_install_fast_tracepoint_jump_pad.
7440 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7441 (struct fast_tracepoint_jump): New.
7442 (fast_tracepoint_jump_insn): New.
7443 (fast_tracepoint_jump_shadow): New.
7444 (find_fast_tracepoint_jump_at): New.
7445 (fast_tracepoint_jump_here): New.
7446 (delete_fast_tracepoint_jump): New.
7447 (set_fast_tracepoint_jump): New.
7448 (uninsert_fast_tracepoint_jumps_at): New.
7449 (reinsert_fast_tracepoint_jumps_at): New.
7450 (set_breakpoint_at): Use write_inferior_memory.
7451 (uninsert_raw_breakpoint): Use write_inferior_memory.
7452 (check_mem_read): Mask out fast tracepoint jumps.
7453 (check_mem_write): Mask out fast tracepoint jumps.
7454 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7455 (set_fast_tracepoint_jump): Declare.
7456 (delete_fast_tracepoint_jump)
7457 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7458 (reinsert_fast_tracepoint_jumps_at): Declare.
7459 * regcache.c: Don't compile many functions when building the
7460 in-process agent library.
7461 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7462 the register buffer in the heap.
7463 (free_register_cache): If the register buffer isn't owned by the
7464 regcache, don't free it.
7465 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7466 pre-existing register caches.
7467 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7468 type.
7469 (convert_ascii_to_int): : Constify `from' parameter type.
7470 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7471 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7472 the needed buffer in-place.
7473 (relocate_instruction): New.
7474 * server.c (handle_query) <qSymbols>: If the target supports
7475 tracepoints, give it a chance of looking up symbols. Report
7476 support for fast tracepoints.
7477 (handle_status): Stabilize threads.
7478 (process_serial_event): Adjust.
7479 * server.h (struct fast_tracepoint_jump): Forward declare.
7480 (struct process_info) <fast_tracepoint_jumps>: New field.
7481 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7482 (decode_X_packet, decode_M_packet): Adjust.
7483 (relocate_instruction): Declare.
7484 (in_process_agent_loaded): Declare.
7485 (tracepoint_look_up_symbols): Declare.
7486 (struct fast_tpoint_collect_status): Declare.
7487 (fast_tracepoint_collecting): Declare.
7488 (force_unlock_trace_buffer): Declare.
7489 (handle_tracepoint_bkpts): Declare.
7490 (initialize_low_tracepoint)
7491 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7492 * target.h (struct target_ops) <stabilize_threads,
7493 install_fast_tracepoint_jump_pad>: New fields.
7494 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7495 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7496 [HAVE_STDINT_H]: Include stdint.h.
7497 (trace_debug_1): Rename to ...
7498 (trace_vdebug): ... this.
7499 (trace_debug): Rename to ...
7500 (trace_debug_1): ... this. Add `level' parameter.
7501 (trace_debug): New.
7502 (ATTR_USED, ATTR_NOINLINE): New.
7503 (IP_AGENT_EXPORT): New.
7504 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7505 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7506 (about_to_request_buffer_space, trace_buffer_is_full)
7507 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7508 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7509 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7510 (traceframe_write_count, traceframes_created)
7511 (trace_state_variables)
7512 New renaming defines.
7513 (struct ipa_sym_addresses): New.
7514 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7515 (symbol_list): New.
7516 (ipa_sym_addrs): New.
7517 (all_tracepoint_symbols_looked_up): New.
7518 (in_process_agent_loaded): New.
7519 (write_e_ipa_not_loaded): New.
7520 (maybe_write_ipa_not_loaded): New.
7521 (tracepoint_look_up_symbols): New.
7522 (debug_threads) [IN_PROCESS_AGENT]: New.
7523 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7524 (UNKNOWN_SIDE_EFFECTS): New.
7525 (stop_tracing): New.
7526 (flush_trace_buffer): New.
7527 (stop_tracing_bkpt): New.
7528 (flush_trace_buffer_bkpt): New.
7529 (read_inferior_integer): New.
7530 (read_inferior_uinteger): New.
7531 (read_inferior_data_pointer): New.
7532 (write_inferior_data_pointer): New.
7533 (write_inferior_integer): New.
7534 (write_inferior_uinteger): New.
7535 (struct collect_static_trace_data_action): Delete.
7536 (enum tracepoint_type): New.
7537 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7538 <actions_str, step_actions, step_actions_str>: Only include in
7539 GDBserver.
fa593d66
PA
7540 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7541 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7542 (tracepoints): Use IP_AGENT_EXPORT.
7543 (last_tracepoint): Don't include in the IPA.
7544 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7545 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7546 (alloced_trace_state_variables): New.
7547 (trace_state_variables): Use IP_AGENT_EXPORT.
7548 (traceframe_t): Delete unused variable.
7549 (circular_trace_buffer): Don't include in the IPA.
7550 (trace_buffer_start): Delete.
7551 (struct trace_buffer_control): New.
7552 (trace_buffer_free): Delete.
7553 (struct ipa_trace_buffer_control): New.
7554 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7555 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7556 New.
7557 (trace_buffer_ctrl): New.
7558 (TRACE_BUFFER_CTRL_CURR): New.
7559 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7560 Reimplement as macros.
7561 (trace_buffer_wrap): Delete.
7562 (traceframe_write_count, traceframe_read_count)
7563 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7564 (struct tracepoint_hit_ctx) <type>: New field.
7565 (struct fast_tracepoint_ctx): New.
7566 (memory_barrier): New.
7567 (cmpxchg): New.
7568 (record_tracepoint_error): Update atomically in the IPA.
7569 (clear_inferior_trace_buffer): New.
7570 (about_to_request_buffer_space): New.
7571 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7572 updating the same buffer.
7573 (add_tracepoint): Default the tracepoint's type to trap
7574 tracepoint, and orig_size to -1.
7575 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7576 internal variables.
7577 (create_trace_state_variable): New parameter `gdb'. Handle it.
7578 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7579 (cmd_qtdp): Handle fast tracepoints.
7580 (cmd_qtdv): Adjust.
7581 (max_jump_pad_size): New.
7582 (gdb_jump_pad_head): New.
7583 (get_jump_space_head): New.
7584 (claim_jump_space): New.
7585 (sort_tracepoints): New.
7586 (MAX_JUMP_SIZE): New.
7587 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7588 IPA.
7589 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7590 support. Upload fast traceframes, and delete internal IPA
7591 breakpoints.
7592 (stop_tracing_handler): New.
7593 (flush_trace_buffer_handler): New.
7594 (cmd_qtstop): Upload fast tracepoints.
7595 (response_tracepoint): Handle fast tracepoints.
7596 (tracepoint_finished_step): Upload fast traceframes. Set the
7597 tracepoint hit context's tracepoint type.
7598 (handle_tracepoint_bkpts): New.
7599 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7600 type. Add comment about fast tracepoints.
7601 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7602 non-existing action_str field.
7603 (get_context_regcache): Handle fast tracepoints.
7604 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7605 to the regcache.
7606 (fast_tracepoint_from_jump_pad_address): New.
7607 (fast_tracepoint_from_ipa_tpoint_address): New.
7608 (collecting_t): New.
7609 (force_unlock_trace_buffer): New.
7610 (fast_tracepoint_collecting): New.
7611 (collecting): New.
7612 (gdb_collect): New.
7613 (write_inferior_data_ptr): New.
7614 (target_tp_heap): New.
7615 (target_malloc): New.
7616 (download_agent_expr): New.
7617 (UALIGN): New.
7618 (download_tracepoints): New.
7619 (download_trace_state_variables): New.
7620 (upload_fast_traceframes): New.
7621 (IPA_FIRST_TRACEFRAME): New.
7622 (IPA_NEXT_TRACEFRAME_1): New.
7623 (IPA_NEXT_TRACEFRAME): New.
7624 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7625 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7626 (gdb_jump_pad_buffer_end): New.
7627 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7628 (initialize_tracepoint): Adjust.
7629 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7630 buffer. Initialize the low module.
7631 * utils.c (PREFIX, TOOLNAME): New.
7632 (malloc_failure): Use PREFIX.
7633 (error): In the IPA, an error causes an exit.
7634 (fatal, warning): Use PREFIX.
7635 (internal_error): Use TOOLNAME.
7636 (NUMCELLS): Increase to 10.
7637 * configure, config.in: Regenerate.
7638
d149dd1d
PA
76392010-06-01 Pedro Alves <pedro@codesourcery.com>
7640
7641 * server.c (handle_query) <qSupported>: Do two passes over the
7642 qSupported string to avoid nesting strtok.
7643
f6528abd
JK
76442010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7645
7646 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7647 (CDEPS): New.
7648 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7649 -Wl,--dynamic-list.
7650 * configure: Regenerate.
7651 * proc-service.list: New.
7652
ca2a87a0
JK
76532010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7654
7655 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7656 New comment.
7657
363a6e9f
OS
76582010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7659
7660 * gdbreplay.c (remote_open): Check error return from socket() call by
7661 its equality to -1 not by it being negative.
7662 * remote-utils.c (remote_open): Likewise.
7663
d23b6cb1
PA
76642010-05-23 Pedro Alves <pedro@codesourcery.com>
7665
7666 * config.h: Regenerate.
7667
28d3cf85
MK
76682010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7669
7670 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7671 doesn't provide PTRACE_GET_THREAD_AREA.
7672
fea36a59
MK
76732010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7674
7675 * linux-m68k-low.c: Include <asm/ptrace.h>
7676 (ps_get_thread_area): Implement.
7677
24b066ba
DE
76782010-05-03 Doug Evans <dje@google.com>
7679
7680 * event-loop.c (struct callback_event): New struct.
7681 (callback_list): New global.
7682 (append_callback_event, delete_callback_event): New functions.
7683 (process_callback): New function.
7684 (start_event_loop): Call it.
7685 * remote-utils.c (NOT_SCHEDULED): Define.
7686 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7687 moved out of readchar.
7688 (readchar): Rewrite. Call reschedule before returning.
7689 (reset_readchar): New function.
7690 (remote_close): Call it.
7691 (process_remaining, reschedule): New functions.
7692 * server.h (callback_handler_func): New typedef.
7693 (append_callback_event, delete_callback_event): Declare.
7694
9836d6ea
PA
76952010-05-03 Pedro Alves <pedro@codesourcery.com>
7696
7697 * proc-service.c (ps_pglobal_lookup): Use
7698 thread_db_look_up_one_symbol.
7699 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7700 parameter. Use it instead of all_symbols_looked_up.
7701 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7702 field.
7703 (all_symbols_looked_up): Don't declare.
7704 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7705 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7706 field.
7707 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7708 Set all_symbols_looked_up here.
7709 (thread_db_look_up_one_symbol): New.
7710 (thread_db_get_tls_address): Adjust.
7711 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7712 thread_db object on the heap, and tentatively set it in the
7713 process structure.
7714 (thread_db_init): Don't set all_symbols_looked_up here.
7715 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7716
7984d532
PA
77172010-05-03 Pedro Alves <pedro@codesourcery.com>
7718
7719 * linux-low.c (linux_kill, linux_detach): Adjust.
7720 (status_pending_p_callback): Remove redundant statement. Check
7721 for !TARGET_WAITIKIND_IGNORE, instead of
7722 TARGET_WAITKIND_STOPPED.
7723 (handle_tracepoints): Make sure LWP is locked. Adjust.
7724 (linux_wait_for_event_1): Adjust.
7725 (linux_cancel_breakpoints): New.
7726 (unsuspend_one_lwp): New.
7727 (unsuspend_all_lwps): New.
7728 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7729 (send_sigstop_callback): Change return type to int, add new
7730 `except' parameter and handle it.
7731 (suspend_and_send_sigstop_callback): New.
7732 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7733 pass them down. If SUSPEND, also increment the lwp's suspend
7734 count.
7735 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7736 (need_step_over_p): Don't consider suspended LWPs.
7737 (start_step_over): Adjust.
7738 (proceed_one_lwp): Change return type to int, add new `except'
7739 parameter and handle it.
7740 (unsuspend_and_proceed_one_lwp): New.
7741 (proceed_all_lwps): Use find_inferior instead of
7742 for_each_inferior.
7743 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7744 also decrement the suspend count of LWPs. Pass `except' down,
7745 instead of hacking its suspend count.
7746 (linux_pause_all): Add `freeze' parameter. Adjust.
7747 (linux_unpause_all): New.
7748 (linux_target_ops): Install linux_unpause_all.
7749 * server.c (handle_status): Adjust.
7750 * target.h (struct target_ops): New fields `unpause_all' and
7751 `cancel_breakpoints'. Add new parameter to `pause_all'.
7752 (pause_all): Add new `freeze' parameter.
7753 (unpause_all): New.
7754 (cancel_breakpoints): New.
7755 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7756 cancel breakpoints.
7757 (cmd_qtstart): Pause threads.
7758 (stop_tracing): Pause threads, and cancel breakpoints.
7759 * win32-low.c (win32_target_ops): Adjust.
7760
e471f25b
PA
77612010-05-03 Pedro Alves <pedro@codesourcery.com>
7762
7763 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7764 the inferior right away from here...
7765 (linux_wait_1): ... to here, and adjust to check the thread's
7766 last_resume_kind instead of the lwp's step or stop_expected flags.
7767
1915ef4f
PA
77682010-05-02 Pedro Alves <pedro@codesourcery.com>
7769
7770 * README: Use consistent `GDB' and `GDBserver' spellings.
7771
f9e39928
PA
77722010-05-02 Pedro Alves <pedro@codesourcery.com>
7773
7774 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7775 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7776 (linux_detach_one_lwp): Assume the lwp is stopped.
7777 (any_thread_of): Delete.
7778 (linux_detach): Stop all lwps here. Don't blindly delete all
7779 breakpoints.
7780 (delete_lwp_callback): New.
7781 (linux_mourn): Delete all lwps of the process that is gone.
7782 (linux_wait_1): Don't delete the last lwp of the process here.
7783 * mem-break.h (mark_breakpoints_out): Declare.
7784 * mem-break.c (mark_breakpoints_out): New.
7785 (free_all_breakpoints): Use it.
7786 * server.c (handle_target_event): If the process is gone, mark
7787 breakpoints out.
7788 * thread-db.c (struct thread_db) <create_bp>: New field.
7789 (thread_db_enable_reporting): Fix prototype. Store a thread event
7790 breakpoint reference in the thread_db struct.
7791 (thread_db_load_search): Clear the thread_db object.
7792 (try_thread_db_load_1): Ditto.
7793 (switch_to_process): New.
7794 (disable_thread_event_reporting): Use it.
7795 (remove_thread_event_breakpoints): New.
7796 (thread_db_detach, thread_db_mourn): Use it.
7797
1e7fc18c
PA
77982010-05-01 Pedro Alves <pedro@codesourcery.com>
7799
7800 * linux-low.c (linux_enable_event_reporting): New.
7801 (linux_wait_for_event_1, handle_extended_wait): Use it.
7802
02fc4de7
PA
78032010-04-30 Pedro Alves <pedro@codesourcery.com>
7804
7805 * linux-low.c (linux_kill_one_lwp, linux_kill)
7806 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7807 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7808 SIGSTOP even if the LWP is stopped.
7809 (send_sigstop_callback): New.
7810 (stop_all_lwps): Use send_sigstop_callback instead.
7811 (linux_resume_one_thread): Adjust.
7812 (proceed_one_lwp): Still proceed an LWP that the client has
7813 requested to stop, if we haven't reported it as stopped yet. Make
7814 sure that LWPs the client want stopped, have a pending SIGSTOP.
7815
bc3b5632
DE
78162010-04-26 Doug Evans <dje@google.com>
7817
ae1ada35
DE
7818 * server.c (handle_general_set): Make static.
7819
bc3b5632
DE
7820 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7821 Print received char after testing for error/eof instead of before.
7822 (input_interrupt): Tweak comment.
7823
65730243
DE
78242010-04-23 Doug Evans <dje@google.com>
7825
7826 * server.c (start_inferior): Print inferior argv if --debug.
7827
a8ae7dc0
AR
78282010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7829
7830 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7831 * nto-x86-low.c: Include server.h
7832
1c07cc19
PM
78332010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7834
7835 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7836 be consistent with other sources of this directory.
7837 (init_registers_amd64): Correct name of source file of this function
7838 in the comment.
7839
e0a61e09
PM
78402010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7841
7842 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7843 64-bit executables.
7844
54709339
PM
78452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7846
7847 * win32-i386-low.c: Add 64-bit support.
7848 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7849 (init_registers_amd64): Declare.
7850 (mappings): Add 64-bit version of array.
7851 (init_windows_x86): New function.
7852 (the_low_target): Change init_arch field to init_windows_x86.
7853
e8f0053d
PM
78542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7855
7856 * win32-low.c: Adapt to support also 64-bit architecture.
7857 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7858 (get_image_name): Use SIZE_T type for local variable `done'.
7859 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7860 (toolhelp_get_dll_name): Idem.
7861 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7862 Use uintptr_t typecast to avoid warning.
7863 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7864 (handle_exception): Use phex_nz to avoid warning.
7865 (win32_wait): Remove unused local variable `process'.
7866
c481e77e
PM
78672010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7868
7869 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7870 `amd64-avx.o'.
7871
12ea4b69
PM
78722010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7873
7874 * configure.ac: Use `ws2_32' library for srv_mingw.
7875 * configure: Regenerate.
7876 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7877 * remote-utils.c: Likewise.
7878
f6d1620c
L
78792010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7880
7881 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7882 if __x86_64__ is defined.
7883
8e642873
PM
78842010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7885
7886 * configure: Regenerate.
7887
711e434b
PM
78882010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7889
7890 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7891 * target.h (target_ops): New get_tib_address field.
7892 * win32-low.h (win32_thread_info): Add thread_local_base field.
7893 * win32-low.c (child_add_thread): Add tlb argument.
7894 Set thread_local_base field to TLB.
7895 (get_child_debug_event): Adapt to child_add_thread change.
7896 (win32_get_tib_address): New function.
7897 (win32_target_ops): Set get_tib_address field to
7898 win32_get_tib_address.
7899 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7900
505106cd
PA
79012010-04-12 Pedro Alves <pedro@codesourcery.com>
7902
505106cd
PA
7903 * linux-low.c (linux_mourn): Also remove the process.
7904 * server.c (handle_target_event): Don't remove the process here.
7905 * nto-low.c (nto_mourn): New.
7906 (nto_target_ops): Install it.
7907 * spu-low.c (spu_mourn): New.
7908 (spu_target_ops): Install it.
7909 * win32-low.c (win32_mourn): New.
7910 (win32_target_ops): Install it.
7911
e8470a06
PA
79122010-04-12 Pedro Alves <pedro@codesourcery.com>
7913
7914 * server.h (buffer_xml_printf): Remove redundant `;'.
7915
45ba0d02
PA
79162010-04-12 Pedro Alves <pedro@codesourcery.com>
7917
7918 * regcache.c (set_register_cache): Invalidate regcaches before
7919 changing the register cache layout.
7920 (regcache_invalidate_one): Allow a NULL regcache.
7921 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7922 regcaches before changing the register cache layout or the target
7923 regsets.
7924
59e04013
L
79252010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7926
7927 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7928 variable warning on Linux/x86-64.
7929
8336d594
PA
79302010-04-11 Pedro Alves <pedro@codesourcery.com>
7931
7932 GDBserver disconnected tracing support.
7933
7934 * linux-low.c (linux_remove_process): Delete.
7935 (add_lwp): Don't set last_resume_kind here.
7936 (linux_kill): Use `mourn'.
7937 (linux_detach): Use `thread_db_detach', and `mourn'.
7938 (linux_mourn): New.
7939 (linux_attach_lwp_1): Adjust comment.
7940 (linux_attach): last_resume_kind moved the thread_info; adjust.
7941 (status_pending_p_callback): Adjust.
7942 (linux_wait_for_event_1): Adjust.
7943 (count_events_callback, select_singlestep_lwp_callback)
7944 (select_event_lwp_callback, cancel_breakpoints_callback)
7945 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7946 (proceed_one_lwp): Adjust.
7947 (linux_async): Add debug output.
7948 (linux_thread_stopped): New.
7949 (linux_pause_all): New.
7950 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7951 linux_pause_all.
7952 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7953 (thread_db_free): Delete declaration.
7954 (thread_db_detach, thread_db_mourn): Declare.
7955 * thread-db.c (thread_db_init): Use thread_db_mourn.
7956 (thread_db_free): Delete, split in two.
7957 (disable_thread_event_reporting): New.
7958 (thread_db_detach): New.
7959 (thread_db_mourn): New.
7960
7961 * server.h (struct thread_info) <last_resume_kind>: New field.
7962 <attached>: Add comment.
7963 <gdb_detached>: New field.
7964 (handler_func): Change return type to int.
7965 (handle_serial_event, handle_target_event): Ditto.
7966 (gdb_connected): Declare.
7967 (tracing): Delete.
7968 (disconnected_tracing): Declare.
7969 (stop_tracing): Declare.
7970
7971 * server.c (handle_query) <qSupported>: Report support for
7972 disconnected tracing.
7973 (queue_stop_reply_callback): Account for running threads.
7974 (gdb_wants_thread_stopped): New.
7975 (gdb_wants_all_threads_stopped): New.
7976 (gdb_reattached_process): New.
7977 (handle_status): Clear the `gdb_detached' flag of all processes.
7978 In all-stop, stop all threads.
7979 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7980 (process_serial_event): If the remote connection breaks, or if an
7981 exit was forced with "monitor exit", force an event loop exit.
7982 Handle disconnected tracing on detach.
7983 (handle_serial_event): Adjust.
7984 (handle_target_event): If GDB isn't connected, forward events back
7985 to the inferior, unless the last process exited, in which case,
7986 exit gdbserver. Adjust interface.
7987
7988 * remote-utils.c (remote_open): Don't block in accept. Instead
7989 register an event loop source on the listen socket file
7990 descriptor. Refactor bits into ...
7991 (listen_desc): ... this new global.
7992 (gdb_connected): ... this new function.
7993 (enable_async_notification): ... this new function.
7994 (handle_accept_event): ... this new function.
7995 (remote_close): Clear remote_desc.
7996
7997 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7998
7999 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8000 New fields.
8001 (mourn_inferior): Define.
8002 (target_process_qsupported): Avoid the dangling else problem.
8003 (thread_stopped): Define.
8004 (pause_all): Define.
8005 (target_waitstatus_to_string): Declare.
8006 * target.c (target_waitstatus_to_string): New.
8007
8008 * tracepoint.c (tracing): Make extern.
8009 (disconnected_tracing): New.
8010 (stop_tracing): Make extern. Handle tracing stops due to GDB
8011 disconnecting.
8012 (cmd_qtdisconnected): New.
8013 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8014 (handle_tracepoint_general_set): Handle QTDisconnected.
8015
8016 * event-loop.c (event_handler_func): Change return type to int.
8017 (process_event): Bail out if the event handler wants the event
8018 loop to stop.
8019 (handle_file_event): Ditto.
8020 (start_event_loop): Bail out if the event handler wants the event
8021 loop to stop.
8022
8023 * nto-low.c (nto_target_ops): Adjust.
8024 * spu-low.c (spu_wait): Don't remove the process here.
8025 (spu_target_ops): Adjust.
8026 * win32-low.c (win32_wait): Don't remove the process here.
8027 (win32_target_ops): Adjust.
8028
5d267c4c
PA
80292010-04-11 Pedro Alves <pedro@codesourcery.com>
8030
8031 * regcache.c (realloc_register_cache): Invalidate inferior's
8032 regcache before recreating it.
8033
623ccd72
PA
80342010-04-09 Pedro Alves <pedro@codesourcery.com>
8035
8036 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8037
219f2f23
PA
80382010-04-09 Stan Shebs <stan@codesourcery.com>
8039 Pedro Alves <pedro@codesourcery.com>
8040
8041 * server.h (LONGEST): New.
8042 (struct thread_info) <while_stepping>: New field.
8043 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8044 Declare.
8045 (initialize_tracepoint, handle_tracepoint_general_set)
8046 (handle_tracepoint_query, tracepoint_finished_step)
8047 (tracepoint_was_hit, release_while_stepping_state_list):
8048 (current_traceframe): Declare.
8049 * server.c (handle_general_set): Handle tracepoint packets.
8050 (read_memory): New.
8051 (write_memory): New.
8052 (handle_search_memory_1): Use read_memory.
8053 (handle_query): Report support for conditional tracepoints, trace
8054 state variables, and tracepoint sources. Handle tracepoint
8055 queries.
8056 (main): Initialize the tracepoints module.
8057 (process_serial_event): Handle traceframe reads/writes.
8058
8059 * linux-low.c (handle_tracepoints): New.
8060 (linux_wait_1): Call it.
8061 (linux_resume_one_lwp): Handle while-stepping.
8062 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8063 (linux_target_ops): Install them.
8064 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8065 New field.
8066 * linux-x86-low.c (x86_supports_tracepoints): New.
8067 (the_low_target). Install it.
8068
8069 * mem-break.h (delete_breakpoint): Declare.
8070 * mem-break.c (delete_breakpoint): Make external.
8071
8072 * target.h (struct target_ops): Add `supports_tracepoints',
8073 `read_pc', and `write_pc' fields.
8074 (target_supports_tracepoints): Define.
8075 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8076 (phex_nz): New.
8077
8078 * regcache.h (struct regcache) <registers_owned>: New field.
8079 (init_register_cache, regcache_cpy): Declare.
8080 (regcache_read_pc, regcache_write_pc): Declare.
8081 (register_cache_size): Declare.
8082 (supply_regblock): Declare.
8083 * regcache.c (init_register_cache): New.
8084 (new_register_cache): Use it.
8085 (regcache_cpy): New.
8086 (register_cache_size): New.
8087 (supply_regblock): New.
8088 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8089
219f2f23
PA
8090 * tracepoint.c: New.
8091
8092 * Makefile.in (OBS): Add tracepoint.o.
8093 (tracepoint.o): New rule.
8094
3a13a53b
L
80952010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8096
8097 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8098 (i386-mmx.o): New.
8099 (i386-mmx.c): Likewise.
8100 (i386-mmx-linux.o): Likewise.
8101 (i386-mmx-linux.c): Likewise.
8102
8103 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8104 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8105 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8106 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8107
8108 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8109 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8110 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8111
1570b33e
L
81122010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8113
8114 * Makefile.in (clean): Updated.
8115 (i386-avx.o): New.
8116 (i386-avx.c): Likewise.
8117 (i386-avx-linux.o): Likewise.
8118 (i386-avx-linux.c): Likewise.
8119 (amd64-avx.o): Likewise.
8120 (amd64-avx.c): Likewise.
8121 (amd64-avx-linux.o): Likewise.
8122 (amd64-avx-linux.c): Likewise.
8123
8124 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8125 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8126 (srv_amd64_regobj): Add amd64-avx.o.
8127 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8128 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8129 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8130 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8131 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8132 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8133 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8134
8135 * i387-fp.c: Include "i386-xstate.h".
8136 (i387_xsave): New.
8137 (i387_cache_to_xsave): Likewise.
8138 (i387_xsave_to_cache): Likewise.
8139 (x86_xcr0): Likewise.
8140
8141 * i387-fp.h (i387_cache_to_xsave): Likewise.
8142 (i387_xsave_to_cache): Likewise.
8143 (x86_xcr0): Likewise.
8144
8145 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8146 * linux-crisv32-low.c (target_regsets): Likewise.
8147 * linux-m68k-low.c (target_regsets): Likewise.
8148 * linux-mips-low.c (target_regsets): Likewise.
8149 * linux-ppc-low.c (target_regsets): Likewise.
8150 * linux-s390-low.c (target_regsets): Likewise.
8151 * linux-sh-low.c (target_regsets): Likewise.
8152 * linux-sparc-low.c (target_regsets): Likewise.
8153 * linux-xtensa-low.c (target_regsets): Likewise.
8154
8155 * linux-low.c: Include <sys/uio.h>.
8156 (regsets_fetch_inferior_registers): Support nt_type.
8157 (regsets_store_inferior_registers): Likewise.
8158 (linux_process_qsupported): New.
8159 (linux_target_ops): Add linux_process_qsupported.
8160
8161 * linux-low.h (regset_info): Add nt_type.
8162 (linux_target_ops): Add process_qsupported.
8163
8164 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8165 and <sys/uio.h>.
8166 (init_registers_i386_avx_linux): New.
8167 (init_registers_amd64_avx_linux): Likewise.
8168 (xmltarget_i386_linux_no_xml): Likewise.
8169 (xmltarget_amd64_linux_no_xml): Likewise.
8170 (PTRACE_GETREGSET): Likewise.
8171 (PTRACE_SETREGSET): Likewise.
8172 (x86_fill_xstateregset): Likewise.
8173 (x86_store_xstateregset): Likewise.
8174 (use_xml): Likewise.
8175 (x86_linux_update_xmltarget): Likewise.
8176 (x86_linux_process_qsupported): Likewise.
8177 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8178 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8179 init_registers_i386_linux here. Call
8180 x86_linux_update_xmltarget.
8181 (the_low_target): Add x86_linux_process_qsupported.
8182
8183 * server.c (handle_query): Call target_process_qsupported.
8184
8185 * target.h (target_ops): Add process_qsupported.
8186 (target_process_qsupported): New.
8187
fc7238bb
PA
81882010-04-03 Pedro Alves <pedro@codesourcery.com>
8189
8190 * inferiors.c (add_thread): Set last_status kind to
8191 TARGET_WAITKIND_IGNORE.
8192 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8193 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8194 (linux_wait_1): Move `thread' local definition to block that uses
8195 it. Don't NULL initialize `event_child'.
8196 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8197 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8198 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8199
bdabb078
PA
82002010-04-01 Pedro Alves <pedro@codesourcery.com>
8201
8202 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8203 an extended waitstatus, or by a watchpoint.
8204 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8205 thread was stepping or has been stopped by a watchpoint.
8206
d3bbe7a0
PA
82072010-04-01 Pedro Alves <pedro@codesourcery.com>
8208
8209 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8210 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8211 of another, then delete the previous, and validate all
8212 breakpoints.
8213 (validate_inserted_breakpoint): New.
8214 (delete_disabled_breakpoints): New.
8215 (validate_breakpoints): New.
8216 (check_mem_read): Validate breakpoints before trusting their
8217 shadow. Delete disabled breakpoints.
8218 (check_mem_write): Validate breakpoints before trusting they
8219 should be inserted. Delete disabled breakpoints.
8220 * mem-break.h (validate_breakpoints):
8221 * server.c (handle_query): Validate breakpoints when we see a
8222 qSymbol query.
8223
8b07ae33
PA
82242010-04-01 Pedro Alves <pedro@codesourcery.com>
8225
8226 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8227 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8228 if we could tell there's a GDB breakpoint at stop_pc.
8229 (need_step_over_p): Don't do a step over if we find a GDB
8230 breakpoint at the resume PC.
8231
8232 * mem-break.c (struct raw_breakpoint): New.
8233 (enum bkpt_type): New type `gdb_breakpoint'.
8234 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8235 fields. New field `raw'.
8236 (find_raw_breakpoint_at): New.
8237 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8238 breakpoint instead.
8239 (set_breakpoint_at): Adjust.
8240 (delete_raw_breakpoint): New.
8241 (release_breakpoint): New.
8242 (delete_breakpoint): Rename to...
8243 (delete_breakpoint_1): ... this. Add proc parameter. Use
8244 release_breakpoint. Return ENOENT.
8245 (delete_breakpoint): Reimplement.
8246 (find_breakpoint_at): Delete.
8247 (find_gdb_breakpoint_at): New.
8248 (delete_breakpoint_at): Delete.
8249 (set_gdb_breakpoint_at): New.
8250 (delete_gdb_breakpoint_at): New.
8251 (gdb_breakpoint_here): New.
8252 (set_reinsert_breakpoint): Use release_breakpoint.
8253 (uninsert_breakpoint): Rename to ...
8254 (uninsert_raw_breakpoint): ... this.
8255 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8256 (reinsert_raw_breakpoint): Change parameter type to
8257 raw_breakpoint.
8258 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8259 instead.
8260 (check_breakpoints): Adjust. Use release_breakpoint.
8261 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8262 (breakpoint_inserted_here): Ditto.
8263 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8264 Don't trust the breakpoint's shadow if it is not inserted.
8265 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8266 (delete_all_breakpoints): Adjust.
8267 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8268 use delete_breakpoint_1.
8269
8270 * mem-break.h (breakpoints_supported): Delete declaration.
8271 (set_gdb_breakpoint_at): Declare.
8272 (gdb_breakpoint_here): Declare.
8273 (delete_breakpoint_at): Delete.
8274 (delete_gdb_breakpoint_at): Declare.
8275
8276 * server.h (struct raw_breakpoint): Forward declare.
8277 (struct process_info): New field `raw_breakpoints'.
8278
8279 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8280 breakpoints.
8281
6bf5e0ba
PA
82822010-03-24 Pedro Alves <pedro@codesourcery.com>
8283
8284 * linux-low.c (status_pending_p_callback): Fix comment.
8285 (linux_wait_for_event_1): Move most of the internal breakpoint
8286 handling from here...
8287 (linux_wait_1): ... to here.
8288 (count_events_callback): New.
8289 (select_singlestep_lwp_callback): New.
8290 (select_event_lwp_callback): New.
8291 (cancel_breakpoints_callback): New.
8292 (select_event_lwp): New.
8293 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8294 priority to all LWPs that have had events that should be reported
8295 to the client. Cancel breakpoints when about to reporting the
8296 event to the client, not while stopping lwps. No longer cancel
8297 finished single-steps here.
8298 (cancel_finished_single_step): Delete.
8299 (cancel_finished_single_steps): Delete.
8300
414a389f
PA
83012010-03-24 Pedro Alves <pedro@codesourcery.com>
8302
8303 * mem-break.c (enum bkpt_type): New.
8304 (struct breakpoint): New field `type'.
8305 (set_breakpoint_at): Change return type to struct breakpoint
8306 pointer. Set type to `other_breakpoint' by default.
8307 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8308 in the breakpoint list.
8309 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8310 (reinsert_breakpoint): Rename to ...
8311 (reinsert_raw_breakpoint): ... this.
8312 (reinsert_breakpoints_at): Adjust.
8313 * mem-break.h (struct breakpoint): Declare.
8314 (set_breakpoint_at): Change return type to struct breakpoint
8315 pointer.
8316
2280c721
PA
83172010-03-24 Pedro Alves <pedro@codesourcery.com>
8318
8319 * server.c (handle_query): Assign, not compare.
8320
d50171e4
PA
83212010-03-24 Pedro Alves <pedro@codesourcery.com>
8322
8323 Teach linux gdbserver to step-over-breakpoints.
8324
8325 * linux-low.c (can_hardware_single_step): New.
8326 (supports_breakpoints): New.
8327 (handle_extended_wait): If stopping threads, read the stop pc of
8328 the new cloned LWP.
8329 (get_pc): New.
8330 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8331 low target doesn't support retrieving the PC.
8332 (add_lwp): Set last_resume_kind to resume_continue.
8333 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8334 (linux_attach): Don't clear stop_expected. Set the lwp's
8335 last_resume_kind to resume_stop.
8336 (linux_detach_one_lwp): Don't check for removed breakpoints.
8337 (check_removed_breakpoint): Delete.
8338 (status_pending_p): Rename to ...
8339 (status_pending_p_callback): ... this. Don't check for removed
8340 breakpoints. Don't consider threads that are stopped from GDB's
8341 perspective.
8342 (linux_wait_for_lwp): Always read the stop_pc here.
8343 (cancel_breakpoint): New.
8344 (step_over_bkpt): New global.
8345 (linux_wait_for_event_1): Implement stepping over breakpoints.
8346 (gdb_wants_lwp_stopped): New.
8347 (gdb_wants_all_stopped): New.
8348 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8349 single-step traps here. Store the thread's last reported target
8350 wait status.
8351 (send_sigstop): Don't clear stop_expected. Always set it,
8352 instead.
8353 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8354 (cancel_finished_single_step): New.
8355 (cancel_finished_single_steps): New.
8356 (wait_for_sigstop): Don't cancel finished single-step traps here.
8357 (linux_resume_one_lwp): Don't check for removed breakpoints.
8358 Don't set `step' on non-hardware step archs.
8359 (linux_set_resume_request): Ignore resume_stop requests if already
8360 stopping or stopped. Set the lwp's last_resume_kind.
8361 (resume_status_pending_p): Don't check for removed breakpoints.
8362 (need_step_over_p): New.
8363 (start_step_over): New.
8364 (finish_step_over): New.
8365 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8366 requests. Clear the thread's last reported target waitstatus.
8367 Don't use the `suspended' flag. Don't consider pending breakpoints.
8368 (linux_resume): Start a step-over if necessary.
8369 (proceed_one_lwp): New.
8370 (proceed_all_lwps): New.
8371 (unstop_all_lwps): New.
8372 * linux-low.h (struct lwp_info): Rewrite comment for the
8373 `suspended' flag. Add the `stop_pc' field. Delete the
8374 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8375 Add `'last_resume_kind' and `need_step_over' fields.
8376 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8377 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8378 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8379 (set_raw_breakpoint_at): New.
8380 (set_breakpoint_at): Rewrite to use it.
8381 (reinsert_breakpoint_handler): Delete.
8382 (set_reinsert_breakpoint): New.
8383 (reinsert_breakpoint_by_bp): Delete.
8384 (delete_reinsert_breakpoints): New.
8385 (uninsert_breakpoint): Rewrite.
8386 (uninsert_breakpoints_at): New.
8387 (reinsert_breakpoint): Rewrite.
8388 (reinsert_breakpoints_at): New.
8389 (check_breakpoints): Rewrite.
8390 (breakpoint_here): New.
8391 (breakpoint_inserted_here): New.
8392 (check_mem_read): Adjust.
8393 * mem-break.h (breakpoints_supported, breakpoint_here)
8394 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8395 (reinsert_breakpoint_by_bp): Delete declaration.
8396 (delete_reinsert_breakpoints): Declare.
8397 (reinsert_breakpoint): Delete declaration.
8398 (reinsert_breakpoints_at): Declare.
8399 (uninsert_breakpoint): Delete declaration.
8400 (uninsert_breakpoints_at): Declare.
8401 (check_breakpoints): Adjust prototype.
8402 * server.h: Adjust include order.
8403 (struct thread_info): Declare here. Add a `last_status' field.
8404
30ba68cb
MS
84052010-03-23 Michael Snyder <msnyder@vmware.com>
8406
8407 * server.c (crc32): New function.
8408 (handle_query): Add handling for 'qCRC:' request.
8409
b9a881c2
PA
84102010-03-23 Pedro Alves <pedro@codesourcery.com>
8411
8412 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8413 lwp had been stopped by a watchpoint.
8414
e92d13d5
PA
84152010-03-16 Pedro Alves <pedro@codesourcery.com>
8416
8417 * server.h (internal_error): Declare.
8418 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8419 * utils.c (internal_error): New function.
8420
64daa791
AS
84212010-03-15 Andreas Schwab <schwab@redhat.com>
8422
8423 * configure.srv: Fix typo setting srv_regobj.
8424
f52cd8cd
PA
84252010-03-15 Pedro Alves <pedro@codesourcery.com>
8426
8427 * linux-low.c (fetch_register): Avoid passing a non string literal
8428 format to `error'.
8429 (usr_store_inferior_registers): Ditto.
8430
93ae6fdc
PA
84312010-03-14 Pedro Alves <pedro@codesourcery.com>
8432
8433 * linux-low.c (linux_write_memory): Bail out early if peeking
8434 memory failed.
8435
c3adc08c
PA
84362010-03-14 Pedro Alves <pedro@codesourcery.com>
8437
8438 * linux-low.h (struct lwp_info): New fields
8439 `stopped_by_watchpoint' and `stopped_data_address'.
8440 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8441 here, and cache them in the lwp object.
8442 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8443 directly.
8444 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8445 field.
8446 (linux_stopped_by_watchpoint): Rewrite.
8447 (linux_stopped_data_address): Rewrite.
8448
bce522a2
PA
84492010-03-06 Simo Melenius <simo.melenius@iki.fi>
8450
8451 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8452 switching the current inferior, not before.
8453
90884b2b
L
84542010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8455
8456 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8457 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8458 i386-linux.c and amd64-linux.c.
8459 (reg-i386.o): Removed.
8460 (reg-i386.c): Likewise.
8461 (reg-i386-linux.o): Likewise.
8462 (reg-i386-linux.c): Likewise.
8463 (reg-x86-64.o): Likewise.
8464 (reg-x86-64.c): Likewise.
8465 (reg-x86-64-linux.o): Likewise.
8466 (reg-x86-64-linux.c): Likewise.
8467 (i386.o): New.
8468 (i386.c): Likewise.
8469 (i386-linux.o): Likewise.
8470 (i386-linux.c): Likewise.
8471 (amd64.o): Likewise.
8472 (amd64.c): Likewise.
8473 (amd64-linux.o): Likewise.
8474 (amd64-linux.c): Likewise.
8475
8476 * configure.srv (srv_i386_regobj): New.
8477 (srv_i386_linux_regobj): Likewise.
8478 (srv_amd64_regobj): Likewise.
8479 (srv_amd64_linux_regobj): Likewise.
8480 (srv_i386_32bit_xmlfiles): Likewise.
8481 (srv_i386_64bit_xmlfiles): Likewise.
8482 (srv_i386_xmlfiles): Likewise.
8483 (srv_amd64_xmlfiles): Likewise.
8484 (srv_i386_linux_xmlfiles): Likewise.
8485 (srv_amd64_linux_xmlfiles): Likewise.
8486 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8487 srv_xmlfiles to $srv_i386_xmlfiles.
8488 (i[34567]86-*-mingw32ce*): Likewise.
8489 (i[34567]86-*-mingw*): Likewise.
8490 (i[34567]86-*-nto*): Likewise.
8491 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8492 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8493 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8494 (x86_64-*-linux*): Likewise.
8495
8496 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8497 (init_registers_amd64_linux): New.
8498 (x86_arch_setup): Replace init_registers_x86_64_linux with
8499 init_registers_amd64_linux.
8500
193f13e6
MK
85012010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8502
8503 * configure.ac: Check for libdl. If it is not available link against
8504 static libthread_db.
8505 * configure: Regenerate.
8506
85d721b8
PA
85072010-02-22 Pedro Alves <pedro@codesourcery.com>
8508
8509 PR9605
8510
8511 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8512 handing a read watchpoint.
8513 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8514
6076632b
DE
85152010-02-12 Doug Evans <dje@google.com>
8516
8517 * linux-low.c (linux_supports_tracefork_flag): Document.
8518 (linux_look_up_symbols): Add comment.
8519
3327ccf7
L
85202010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8521
8522 * regcache.c (supply_register): Clear regcache if buf is NULL.
8523
0718675c 85242010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8525 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8526
8527 * inferiors.c (find_inferior): Add function documentation.
8528 (unloaded_dll): Handle the case where the unloaded dll has not
8529 been previously registered in the dll list.
8530
177321bd
DJ
85312010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8532
8533 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8534 (thumb2_breakpoint): New.
8535 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8536
2b009048
DJ
85372010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8538
8539 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8540 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8541 breakpoints.
8542
3be029c7
PA
85432010-01-21 Pedro Alves <pedro@codesourcery.com>
8544
8545 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8546
18f5de3b
JK
85472010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8548
8549 * linux-s390-low.c (s390_collect_ptrace_register)
8550 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8551
3743bb4f
DE
85522010-01-21 Doug Evans <dje@google.com>
8553
14ce3065
DE
8554 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8555 (PTRACE_ARG4_TYPE): New macro.
8556 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8557 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8558 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8559 (usr_store_inferior_registers): Ditto.
8560 (linux_read_memory, linux_write_memory): Ditto.
8561 (linux_test_for_tracefork): Ditto.
8562
3743bb4f
DE
8563 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8564 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8565
8b315be5
PA
85662010-01-21 Pedro Alves <pedro@codesourcery.com>
8567
8568 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8569 target.
8570
85492558
PA
85712010-01-21 Pedro Alves <pedro@codesourcery.com>
8572
8573 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8574 prototype to take a regcache. Adjust.
8575
442ea881
PA
85762010-01-20 Pedro Alves <pedro@codesourcery.com>
8577
8578 * regcache.h (struct thread_info): Forward declare.
8579 (struct regcache): New.
8580 (new_register_cache): Adjust prototype.
8581 (get_thread_regcache): Declare.
8582 (free_register_cache): Adjust prototype.
8583 (registers_to_string, registers_from_string): Ditto.
8584 (supply_register, supply_register_by_name, collect_register)
8585 (collect_register_as_string, collect_register_by_name): Ditto.
8586 * regcache.c (struct inferior_regcache_data): Delete.
8587 (get_regcache): Rename to ...
8588 (get_thread_regcache): ... this. Adjust. Switch inferior before
8589 fetching registers.
8590 (regcache_invalidate_one): Adjust.
8591 (regcache_invalidate): Fix prototype.
8592 (new_register_cache): Return the new register cache.
8593 (free_register_cache): Change prototype.
8594 (realloc_register_cache): Adjust.
8595 (registers_to_string): Change prototype to take a regcache. Adjust.
8596 (registers_from_string): Ditto.
8597 (register_data): Ditto.
8598 (supply_register): Ditto.
8599 (supply_register_by_name): Ditto.
8600 (collect_register): Ditto.
8601 (collect_register_as_string): Ditto.
8602 (collect_register_by_name): Ditto.
8603 * server.c (process_serial_event): Adjust.
8604 * linux-low.h (regset_fill_func, regset_store_func): Change
8605 prototype.
8606 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8607 Change prototype.
8608 * linux-low.c (get_stop_pc): Adjust.
8609 (check_removed_breakpoint): Adjust.
8610 (linux_wait_for_event): Adjust.
8611 (linux_resume_one_lwp): Adjust.
8612 (fetch_register): Add regcache parameter. Adjust.
8613 (usr_store_inferior_registers): Ditto.
8614 (regsets_fetch_inferior_registers): Ditto.
8615 (regsets_store_inferior_registers): Ditto.
8616 (linux_fetch_registers, linux_store_registers): Ditto.
8617 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8618 regcache. Adjust.
43aaf8b6
PA
8619 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8620 Ditto.
442ea881
PA
8621 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8622 prototype to take a regcache.
8623 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8624 * remote-utils.c (convert_ascii_to_int, outreg)
8625 (prepare_resume_reply): Change prototype to take a regcache.
8626 Adjust.
8627 * target.h (struct target_ops) <fetch_registers, store_registers>:
8628 Change prototype to take a regcache.
8629 (fetch_inferior_registers, store_inferior_registers): Change
8630 prototype to take a regcache. Adjust.
8631 * proc-service.c (ps_lgetregs): Adjust.
8632 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8633 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8634 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8635 take a regcache. Adjust.
8636 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8637 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8638 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8639 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8640 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8641 (cris_cannot_fetch_register):
8642 (cris_breakpoint_at): Change prototype to take a regcache.
8643 Adjust.
8644 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8645 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8646 to take a regcache. Adjust.
8647 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8648 Adjust.
8649 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8650 take a regcache. Adjust.
8651 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8652 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8653 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8654 * linux-mips-low.c (mips_get_pc):
8655 (mips_set_pc): Change prototype to take a regcache. Adjust.
8656 (mips_reinsert_addr): Adjust.
8657 (mips_collect_register): Change prototype to take a regcache.
8658 Adjust.
8659 (mips_supply_register):
8660 (mips_collect_register_32bit, mips_supply_register_32bit)
8661 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8662 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8663 * linux-ppc-low.c (ppc_supply_ptrace_register)
8664 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8665 (parse_spufs_run): Adjust.
8666 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8667 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8668 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8669 take a regcache. Adjust.
8670 * linux-s390-low.c (s390_collect_ptrace_register)
8671 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8672 (s390_set_pc): Change prototype to take a regcache. Adjust.
8673 (s390_arch_setup): Adjust.
8674 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8675 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8676 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8677 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8678 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8679 regcache. Adjust.
8680 (sparc_breakpoint_at): Adjust.
8681 * linux-xtensa-low.c (xtensa_fill_gregset):
8682 (xtensa_store_gregset):
8683 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8684 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8685 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8686 prototype to take a regcache. Adjust.
8687 * win32-arm-low.c (arm_fetch_inferior_register)
8688 (arm_store_inferior_register): Change prototype to take a
8689 regcache. Adjust.
8690 * win32-i386-low.c (i386_fetch_inferior_register)
8691 (i386_store_inferior_register): Change prototype to take a
8692 regcache. Adjust.
8693 * win32-low.c (child_fetch_inferior_registers)
8694 (child_store_inferior_registers): Change prototype to take a
8695 regcache. Adjust.
8696 (win32_wait): Adjust.
8697 (win32_fetch_inferior_registers): Change prototype to take a
8698 regcache. Adjust.
8699 (win32_store_inferior_registers): Adjust.
8700 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8701 store_inferior_register>: Change prototype to take a regcache.
8702
60c3d7b0
DE
87032010-01-20 Doug Evans <dje@google.com>
8704
8705 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8706 #ifdef.
8707 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8708 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8709
dc146f7c
VP
87102010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8711
8712 * linux-low.c (linux_core_of_thread): New.
8713 (compare_ints, show_process, list_threads): New.
8714 (linux_qxfer_osdata): Report threads and cores.
8715 (linux_target_op): Register linux_core_of_thread.
8716 * remote-utils.c (prepare_resume_reply): Report the core.
8717 (buffer_xml_printf): Support %d specifier.
8718 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8719 New.
8720 (handle_query): Handle qXfer:threads. Announce availability
8721 thereof.
8722 * target.h (struct target_ops): New field core_of_thread.
8723
7803799a
UW
87242010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8725
8726 * Makefile.in (clean): Remove new generated files.
8727 (reg-s390.o, reg-s390.c): Remove rules.
8728 (reg-s390x.o, reg-s390x.c): Likewise.
8729 (s390-linux32.o, s390-linux32.c): Add rules.
8730 (s390-linux64.o, s390-linux64.c): Likewise.
8731 (s390x-linux64.o, s390x-linux64.c): Likewise.
8732 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8733 * linux-s390-low.c: Include <elf.h>.
8734 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8735 (init_registers_s390): Remove prototype.
8736 (init_registers_s390x): Likewise.
8737 (init_registers_s390_linux32): Add prototype.
8738 (init_registers_s390_linux64): Likewise.
8739 (init_registers_s390x_linux64): Likewise.
8740 (s390_num_regs_3264): New define.
8741 (s390_regmap_3264): New global variable.
8742 (s390_cannot_fetch_register): Remove obsolete check.
8743 (s390_cannot_store_register): Likewise.
8744 (s390_collect_ptrace_register): Handle upper/lower register halves.
8745 (s390_supply_ptrace_register): Likewise.
8746 (s390_fill_gregset): Update to register number changes.
8747 (s390_get_hwcap): New routine.
8748 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8749 Install appropriate regmap and register set.
8750
6e7ffa39
JB
87512010-01-01 Joel Brobecker <brobecker@adacore.com>
8752
8753 * server.c (gdbserver_version): Update copyright year to 2010.
8754 * gdbreplay.c (gdbreplay_version): Likewise.
8755
957f3f49
DE
87562009-12-28 Doug Evans <dje@google.com>
8757
8758 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8759 elf/external.h. Include <elf.h> instead but only if necessary.
8760
ca5c370d
PA
87612009-12-28 Pedro Alves <pedro@codesourcery.com>
8762
8763 * linux-low.c (linux_remove_process): Remove `detaching'
8764 parameter. Don't release/detach from thread_db here.
8765 (linux_kill): Release/detach from thread_db here, ...
8766 (linux_detach): ... and here, before actually detaching.
8767 (linux_wait_1): ... and here, when a process exits.
8768 * thread-db.c (any_thread_of): New.
8769 (thread_db_free): Switch the current inferior to a thread of the
8770 passed in process.
8771
4ee62156
DE
87722009-12-21 Doug Evans <dje@google.com>
8773
d90e6a88
DE
8774 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8775
c5f62d5f
DE
8776 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8777 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8778 warning ifndef __NR_tkill. Move setting of errno there too.
8779 Delete unnecessary resetting of errno after syscall.
8780 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8781
10e86dd7
DE
8782 * configure.ac: Check for dladdr.
8783 * config.in: Regenerate.
8784 * configure: Regenerate.
8785 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8786 (try_thread_db_load): Update.
8787
4ee62156
DE
8788 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8789
00f515da
DE
87902009-12-18 Doug Evans <dje@google.com>
8791
e9464885
DE
8792 * event-loop.c: Include unistd.h if it exists.
8793
07d4f67e
DE
8794 * linux-low.c (my_waitpid): Move definition away from being in
8795 between linux_tracefork_child/linux_test_for_tracefork.
8796
00f515da
DE
8797 * gdb_proc_service.h (psaddr_t): Fix type.
8798 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8799 signature to match glibc.
8800
1de1badb
DE
88012009-12-16 Doug Evans <dje@google.com>
8802
8803 * linux-low.c (linux_read_memory): Fix argument to read.
8804
aeeb81d1
PA
88052009-11-26 Pedro Alves <pedro@codesourcery.com>
8806
8807 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8808 events, don't leave current_inferior pointing at null.
8809
10357975
PA
88102009-11-26 Pedro Alves <pedro@codesourcery.com>
8811
8812 * win32-low.c (LOG): Delete.
8813 (OUTMSG): Output to stderr.
8814 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8815 on compile time LOG macro.
8816 (win32_wait): Fix debug output.
8817
cf6e3471
PA
88182009-11-26 Pedro Alves <pedro@codesourcery.com>
8819
8820 * win32-low.c (win32_add_one_solib): If the dll name is
8821 "ntdll.dll", prepend the system directory to the dll path.
8822
0c85e18e
MK
88232009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8824
8825 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8826
9ac544ce 88272009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8828 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8829
8830 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8831 * configure.ac: Check for __mcoldfire__ and set
8832 gdb_cv_m68k_is_coldfire.
8833 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8834 reg-cf.o and reg-m68k.o.
8835 * configure: Regenerated.
8836
fd7dd3e6
PA
88372009-11-16 Pedro Alves <pedro@codesourcery.com>
8838
8839 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8840 Pass it to thread_db_free.
8841 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8842 proper `detaching' argument to linux_remove_process.
8843 * linux-low.h (thread_db_free): Add `detaching' parameter.
8844 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8845 to thread_db_free.
8846 (thread_db_free): Add `detaching' parameter. Only
8847 call td_ta_clear_event if detaching from process.
8848
75aa492e
MK
88492009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8850
8851 * thread-db.c (thread_db_free): Fix typo.
8852
21e1bee4
PP
88532009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8854
8855 PR gdb/10838
8856 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8857
8838b45e
NS
88582009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8859
8860 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8861 with an i686 compiler.
8862 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8863 needed.
8864 * configure: Rebuilt.
8865
8a35fb51
SL
88662009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8867
8868 PR gdb/10783
8869
8870 * server.c (handle_search_memory_1): Correct read_addr initialization
8871 in loop for searching subsequent chunks.
8872
96f15937
PP
88732009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8874
8875 * configure.ac: New --with-libthread-db option.
8876 * thread-db.c: Allow direct dependence on libthread_db.
8877 (thread_db_free): Adjust.
8878 * config.in: Regenerate.
8879 * configure: Likewise.
889bf7c5 8880
5f7d1694
PP
88812009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8882
8883 PR gdb/10757
8884 * thread-db.c (attach_thread): New function.
8885 (maybe_attach_thread): Return success/failure.
8886 (find_new_threads_callback): Adjust.
889bf7c5
PA
8887 (thread_db_find_new_threads): Loop until no new threads.
8888
88e3b899
PA
88892009-10-13 Pedro Alves <pedro@codesourcery.com>
8890
8891 * proc-service.c (ps_lgetregs): Formatting.
8892
cdbfd419
PP
88932009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8894
8895 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8896 * configure.ac: Adjust.
8897 * linux-low.h (struct process_info_private): Move members to struct
8898 thread_db.
8899 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8900 * linux-low.c (linux_remove_process): Adjust.
8901 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8902 * server.c (handle_query): Move code ...
8903 (handle_monitor_command): ... here. New function.
8904 * target.h (struct target_ops): New member.
8905 * thread-db.c (struct thread_db): New.
8906 (libthread_db_search_path): New variable.
8907 (thread_db_create_event, thread_db_enable_reporting)
8908 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8909 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8910 (try_thread_db_load_1, dladdr_to_soname): New functions.
8911 (try_thread_db_load, thread_db_load_search): New functions.
8912 (thread_db_init): Search for libthread_db.
8913 (thread_db_free): New function.
8914 (thread_db_handle_monitor_command): Likewise.
8915 * config.in: Regenerate.
8916 * configure: Regenerate.
889bf7c5 8917
4168d2d6
UW
89182009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8919
8920 * spu-low.c (spu_kill): Wait for inferior to terminate.
8921 Call clear_inferiors.
8922 (spu_detach): Call clear_inferiors.
8923
81ecdfbb
RW
89242009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8925
8926 * aclocal.m4: Regenerate.
8927 * config.in: Likewise.
8928 * configure: Likewise.
8929
0b9ff2c0
UW
89302009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8931
8932 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8933 (parse_spufs_run): New function.
8934 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8935 (ppc_breakpoint_at): Handle SPU breakpoints.
8936
efcbbd14
UW
89372009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8938
8939 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8940 (SPUFS_MAGIC): Define.
8941 (spu_enumerate_spu_ids): New function.
8942 (linux_qxfer_spu): New function.
8943 (linux_target_ops): Install linux_qxfer_spu.
8944
f4d9bade
UW
89452009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8946
8947 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8948 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8949 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8950 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8951 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8952 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8953 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8954 (init_registers_powerpc_cell32l): Add prototype.
8955 (init_registers_powerpc_cell64l): Likewise.
8956 (ppc_arch_setup): Detect Cell/B.E. architecture.
8957
96e946ca
RW
89582009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8959
8960 * Makefile.in (datarootdir): New variable.
8961
58d6951d
DJ
89622009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8963
8964 * linux-low.c (linux_write_memory): Update debugging output.
8965 * Makefile.in (clean): Add new descriptions.
8966 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8967 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8968 * configure.srv: Add new files for arm*-*-linux*.
8969 * linux-arm-low.c: Add new declarations.
8970 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8971 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8972 (HWCAP_VFPv3D16): New.
8973 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8974 instead of __IWMMXT__.
8975 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8976 (arm_arch_setup): New.
8977 (target_regsets): Remove #ifdef. Add VFP regset.
8978 (the_low_target): Use arm_arch_setup.
8979
12b42a12
DJ
89802009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8981
8982 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8983 the main thread again.
8984
ac8c974e
AR
89852009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8986
8987 Adding Neutrino gdbserver.
8988 * configure: Regenerated.
8989 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8990 * configure.srv (i[34567]86-*-nto*): New target.
8991 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8992 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8993 (nto_comctrl) [__QNX__]: New function.
8994 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8995
4424e0c3 89962009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8997
8998 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8999 srv_tgtobj.
9000
912cf4ba
PA
90012009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9002 Pedro Alves <pedro@codesourcery.com>
9003
9004 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9005 don't support CONTEXT_EXTENDED_REGISTERS.
9006 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9007 (the_low_target): Install them.
9008 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9009 failing with ERROR_PIPE_NOT_CONNECTED.
9010
aa5ca48f
DE
90112009-06-30 Doug Evans <dje@google.com>
9012 Pierre Muller <muller@ics.u-strasbg.fr>
9013
9014 Add h/w watchpoint support to x86-linux, win32-i386.
9015 * Makefile.in (SFILES): Add i386-low.c
9016 (i386_low_h): Define.
9017 (i386-low.o): Add dependencies.
9018 (linux-x86-low.o): Add i386-low.h dependency.
9019 (win32-i386-low.o): Ditto.
9020 * i386-low.c: New file.
9021 * i386-low.h: New file.
9022 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9023 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9024 * linux-low.c (linux_add_process): Initialize arch_private.
9025 (linux_remove_process): Free arch_private.
9026 (add_lwp): Initialize arch_private.
9027 (delete_lwp): Free arch_private.
9028 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9029 provided.
9030 * linux-low.h (process_info_private): New member arch_private.
9031 (lwp_info): New member arch_private.
9032 (linux_target_ops): New members new_process, new_thread,
9033 prepare_to_resume.
9034 (ptid_of): New macro.
9035 * linux-x86-low.c: Include stddef.h, i386-low.h.
9036 (arch_process_info): New struct.
9037 (arch_lwp_info): New struct.
9038 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9039 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9040 (i386_dr_low_get_status): New function.
9041 (x86_insert_point, x86_remove_point): New functions.
9042 (x86_stopped_by_watchpoint): New function.
9043 (x86_stopped_data_address): New function.
9044 (x86_linux_new_process, x86_linux_new_thread): New functions.
9045 (x86_linux_prepare_to_resume): New function.
9046 (the_low_target): Add entries for insert_point, remove_point,
9047 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9048 prepare_to_resume.
9049 * server.c (debug_hw_points): New global.
9050 (monitor_show_help): Document set debug-hw-points.
9051 (handle_query): Process "set debug-hw-points".
9052 * server.h (debug_hw_points): Declare.
9053 (paddress): Declare.
9054 * utils.c (NUMCELLS, CELLSIZE): New macros.
9055 (get_sell, xsnprintf, paddress): New functions.
9056 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9057 remove_point, stopped_by_watchpoint, stopped_data_address.
9058 * win32-i386-low.c: Include i386-low.h.
9059 (debug_reg_state): Replaces dr.
9060 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9061 (i386_dr_low_get_status): New function.
9062 (i386_insert_point, i386_remove_point): New functions.
9063 (i386_stopped_by_watchpoint): New function.
9064 (i386_stopped_data_address): New function.
9065 (i386_initial_stuff): Update.
9066 (get_thread_context,set_thread_context,i386_thread_added): Update.
9067 (the_low_target): Add entries for insert_point,
9068 remove_point, stopped_by_watchpoint, stopped_data_address.
9069 * win32-low.c (win32_insert_watchpoint): New function.
9070 (win32_remove_watchpoint): New function.
9071 (win32_stopped_by_watchpoint): New function.
9072 (win32_stopped_data_address): New function.
9073 (win32_target_ops): Add entries for insert_watchpoint,
9074 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9075 * win32-low.h (win32_target_ops): New members insert_point,
9076 remove_point, stopped_by_watchpoint, stopped_data_address.
9077
d993e290
PA
90782009-06-25 Pedro Alves <pedro@codesourcery.com>
9079
9080 * server.c (process_serial_event): Re-return unsupported, not
9081 error, if the type isn't recognized. Re-allow supporting only
9082 insert or remove packets. Also call require_running for
9083 breakpoints. Add missing break statement to default case. Tidy.
9084 * target.h (struct target_ops): Rename insert_watchpoint to
9085 insert_point, and remove_watchpoint to remove_point.
9086
9087 * linux-low.h (struct linux_target_ops): Likewise.
9088 * linux-low.c (linux_insert_watchpoint): Rename to ...
9089 (linux_insert_point): ... this. Adjust.
9090 (linux_remove_watchpoint): Rename to ...
9091 (linux_remove_point): ... this. Adjust.
9092 (linux_target_ops): Adjust.
9093 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9094 (cris_insert_point): ... this.
9095 (cris_remove_watchpoint): Rename to ...
9096 (cris_remove_point): ... this.
9097 (the_low_target): Adjust.
9098
0f54c268
PM
90992009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9100
9101 * server.c (handle_v_kill): Pass signal_pid to
9102 kill_inferior if multi_process is zero.
9103
c6314022
AR
91042009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9105
9106 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9107 * target.h (target_ops): Comment for *_watchpoint to make it clear
9108 the functions can get types '0' and '1'.
9109
4463ce24
AR
91102009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9111
9112 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9113 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9114 * regcache.c (get_regcache): Likewise.
9115 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9116 * win32-low.c (child_fetch_inferior_registers): Remove check for
9117 regno 0.
9118
cf8fd78b
PA
91192009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9120 Pedro Alves <pedro@codesourcery.com>
9121
9122 * target.h (struct target_ops) <supports_multi_process>: New
9123 callback.
9124 (target_supports_multi_process): New.
9125 * server.c (handle_query): Even if GDB reports support, only
9126 enable multi-process if the target also supports it. Report
9127 multi-process support only if the target backend supports it.
9128 * linux-low.c (linux_supports_multi_process): New function.
9129 (linux_target_ops): Install it as target_supports_multi_process
9130 callback.
9131
47c0c975
DE
91322009-05-24 Doug Evans <dje@google.com>
9133
e09875d4
DE
9134 Global renaming of find_thread_pid to find_thread_ptid.
9135 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9136 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9137 All callers updated.
9138
e27d73f6
DE
9139 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9140 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9141 directly.
9142
47c0c975
DE
9143 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9144 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9145 (linux_resume_one_lwp): Ditto.
9146
2acc282a
DE
91472009-05-23 Doug Evans <dje@google.com>
9148
9149 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9150 from struct inferior_list_entry * to struct lwp_info *.
9151 All callers updated.
9152
9f1036c1
DE
91532009-05-13 Doug Evans <dje@google.com>
9154
9155 * linux-x86-low.c: Don't include assert.h.
9156 (x86_siginfo_fixup): Use fatal, not assert.
9157 (x86_arch_setup): Fix comment.
9158
d0722149
DE
91592009-05-12 Doug Evans <dje@google.com>
9160
9161 Biarch support for i386/amd64 gdbserver.
9162 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9163 Add linux-x86-low.c.
9164 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9165 (linux-x86-low.o): Add.
9166 * linux-x86-64-low.c: Delete.
9167 * linux-i386-low.c: Delete.
9168 * linux-x86-low.c: New file.
9169 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9170 linux-x86-low.o.
9171 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9172 linux-x86-low.o.
9173 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9174 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9175 (linux_child_pid_to_exec_file): New function.
9176 (elf_64_header_p, elf_64_file_p): New functions.
9177 (siginfo_fixup): New function.
9178 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9179 give target a chance to convert layout.
9180 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9181 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9182
fdeb2a12
DE
91832009-05-07 Doug Evans <dje@google.com>
9184
9185 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9186 (regsets_store_inferior_registers): Ditto.
9187
a6dbe5df
PA
91882009-05-06 Pedro Alves <pedro@codesourcery.com>
9189
9190 PR server/10048
9191
9192 * linux-low.c (must_set_ptrace_flags): Delete.
9193 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9194 of the global.
9195 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9196 `lwp->must_set_ptrace_flags' instead.
ba42693b 9197 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9198 (linux_wait_1): ... not here.
9199
5091eb23
DE
92002009-04-30 Doug Evans <dje@google.com>
9201
9f767825
DE
9202 * inferiors.c (started_inferior_callback): New function.
9203 (attached_inferior_callback): New function.
9204 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9205 * server.c (print_started_pid, print_attached_pid): New functions.
9206 (detach_or_kill_for_exit): New function.
9207 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9208 * server.h (have_started_inferiors_p): Declare.
9209 (have_attached_inferiors_p): Declare.
9210
5091eb23
DE
9211 * inferiors.c (remove_process): Fix memory leak, free process.
9212 * linux-low.c (linux_remove_process): New function.
9213 (linux_kill): Call it instead of remove_process.
9214 (linux_detach, linux_wait_1): Ditto.
9215
155c8968
PA
92162009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9217
9218 * configure.srv: Add x86 Windows CE target.
9219
7fe519cb
UW
92202009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9221
9222 * inferiors.c (get_thread_process): Make global.
9223 * server.h (get_thread_process): Add prototype.
9224 * thread-db.c (find_one_thread): Use get_thread_process
9225 instead of current_process.
9226 (thread_db_get_tls_address): Do not crash if called when
9227 thread layer is not yet initialized.
9228
5472f405
UW
92292009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9230
9231 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9232 * spu-low.c (current_tid): Rename to ...
9233 (current_ptid): ... this.
9234 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9235 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9236 ptid_get_lwp (current_ptid) instead of current_tid.
9237 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9238 instead of current_tid. Use find_process_pid to verify pid
9239 argument is valid. Pass proper argument to remove_process.
9240 (spu_thread_alive): Compare current_ptid instead of current_tid.
9241 (spu_resume): Likewise.
9242
55ac2b99
PA
92432009-04-02 Pedro Alves <pedro@codesourcery.com>
9244
9245 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9246 variable.
9247
95954743
PA
92482009-04-01 Pedro Alves <pedro@codesourcery.com>
9249
9250 Implement the multiprocess extensions, and add linux multiprocess
9251 support.
9252
9253 * server.h (ULONGEST): Declare.
9254 (struct ptid, ptid_t): New.
9255 (minus_one_ptid, null_ptid): Declare.
9256 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9257 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9258 (struct inferior_list_entry): Change `id' type from unsigned from
9259 to ptid_t.
9260 (struct sym_cache, struct breakpoint, struct
9261 process_info_private): Forward declare.
9262 (struct process_info): Declare.
9263 (current_process): Declare.
9264 (all_processes): Declare.
9265 (initialize_inferiors): Declare.
9266 (add_thread): Adjust to use ptid_t.
9267 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9268 (add_process, remove_process, find_thread_pid): Declare.
9269 (find_inferior_id): Adjust to use ptid_t.
9270 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9271 (multi_process): Declare.
9272 (push_event): Adjust to use ptid_t.
9273 (read_ptid, write_ptid): Declare.
9274 (prepare_resume_reply): Adjust to use ptid_t.
9275 (clear_symbol_cache): Declare.
9276 * inferiors.c (all_processes): New.
9277 (null_ptid, minus_one_ptid): New.
9278 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9279 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9280 (add_thread): Change unsigned long to ptid. Remove gdb_id
9281 parameter. Adjust.
9282 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9283 (gdb_id_to_thread): Rename to ...
9284 (find_thread_pid): ... this. Change unsigned long to ptid.
9285 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9286 (loaded_dll, pull_pid_from_list): Adjust.
9287 (add_process, remove_process, find_process_pid)
9288 (get_thread_process, current_process, initialize_inferiors): New.
9289 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9290 (struct target_waitstatus) <related_pid>: Ditto.
9291 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9292 return type to int.
9293 (struct target_ops) <join>: Add `pid' argument.
9294 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9295 (struct target_ops) <wait>: Add `ptid' field. Change return type
9296 to ptid.
9297 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9298 (mywait): Add `ptid' argument. Change return type to ptid_t.
9299 (target_pid_to_str): Declare.
9300 * target.c (set_desired_inferior): Adjust to use ptids.
9301 (mywait): Add new `ptid' argument. Adjust.
9302 (target_pid_to_str): New.
9303 * mem-break.h (free_all_breakpoints): Declare.
9304 * mem-break.c (breakpoints): Delelete.
9305 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9306 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9307 to use per-process breakpoint list.
9308 (free_all_breakpoints): New.
9309 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9310 (symbol_cache, all_symbols_looked_up): Delete.
9311 (hexchars): New.
9312 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9313 read_ptid): New.
9314 (prepare_resume_reply): Change ptid argument's type from unsigned
9315 long to ptid_t. Adjust. Implement W;process and X;process.
9316 (free_sym_cache, clear_symbol_cache): New.
9317 (look_up_one_symbol): Adjust to per-process symbol cache. *
9318 * server.c (cont_thread, general_thread, step_thread): Change type
9319 to ptid_t.
9320 (attached): Delete.
9321 (multi_process): New.
9322 (last_ptid): Change type to ptid_t.
9323 (struct vstop_notif) <ptid>: Change type to ptid_t.
9324 (queue_stop_reply, push_event): Change `ptid' argument's type to
9325 ptid_t.
9326 (discard_queued_stop_replies): Add `pid' argument.
9327 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9328 changes. Don't reference the `attached' global.
9329 (attach_inferior): Adjust to mywait interface changes.
9330 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9331 features. Handle and report "multiprocess+". Handle
9332 "qAttached:PID".
9333 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9334 changes.
9335 (handle_v_kill): New.
9336 (handle_v_stopped): Adjust to use target_pid_to_str.
9337 (handle_v_requests): Allow multiple attaches and runs when
9338 multiprocess extensions are in effect. Handle "vKill".
9339 (myresume): Adjust to use ptids.
9340 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9341 (handle_status): Adjust to discard_queued_stop_replies interface
9342 change.
9343 (first_thread_of, kill_inferior_callback)
9344 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9345 (main): Call initialize_inferiors. Adjust to use ptids, killing
9346 and detaching from all inferiors. Handle multiprocess packet
9347 variants.
9348 * linux-low.h: Include gdb_proc_service.h.
9349 (struct process_info_private): New.
9350 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9351 <lwpid_of>: Use ptid_get_lwp.
9352 (get_lwp_thread): Adjust.
9353 (struct lwp_info): Add `dead' member.
9354 (find_lwp_pid): Declare.
9355 * linux-low.c (thread_db_active): Delete.
9356 (new_inferior): Adjust comment.
9357 (inferior_pid): Delete.
9358 (linux_add_process): New.
9359 (handle_extended_wait): Adjust.
9360 (add_lwp): Change unsigned long to ptid.
9361 (linux_create_inferior): Add process to processes table. Adjust
9362 to use ptids. Don't set new_inferior here.
9363 (linux_attach_lwp): Rename to ...
9364 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9365 it. Adjust to use ptids.
9366 (linux_attach_lwp): New.
9367 (linux_attach): Add process to processes table. Don't set
9368 new_inferior here.
9369 (struct counter): New.
9370 (second_thread_of_pid_p, last_thread_of_process_p): New.
9371 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9372 multiple processes.
9373 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9374 processes. Remove process from process table.
9375 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9376 to multiple processes.
9377 (any_thread_of): New.
9378 (linux_detach): Add `pid' argument, and handle it. Remove process
9379 from processes table.
9380 (linux_join): Add `pid' argument. Handle it.
9381 (linux_thread_alive): Change unsighed long argument to ptid_t.
9382 Consider dead lwps as not being alive.
9383 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9384 threads we're not interested in.
9385 (same_lwp, find_lwp_pid): New.
9386 (linux_wait_for_lwp): Change `pid' argument's type from int to
9387 ptid_t. Adjust.
9388 (linux_wait_for_event): Rename to ...
9389 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9390 from int to ptid_t. Adjust.
9391 (linux_wait_for_event): New.
9392 (linux_wait_1): Add `ptid' argument. Change return type to
9393 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9394 that exit from the process table.
9395 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9396 Adjust.
9397 (mark_lwp_dead): New.
9398 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9399 stopping all threads, mark its main lwp as dead.
9400 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9401 ptids.
9402 (fetch_register, usr_store_inferior_registers)
9403 (regsets_fetch_inferior_registers)
9404 (regsets_store_inferior_registers, linux_read_memory)
9405 (linux_write_memory): Inline `inferior_pid'.
9406 (linux_look_up_symbols): Adjust to use per-process
9407 `thread_db_active'.
9408 (linux_request_interrupt): Adjust to use ptids.
9409 (linux_read_auxv): Inline `inferior_pid'.
9410 (initialize_low): Don't reference thread_db_active.
9411 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9412 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9413 (ps_getpid): Return the pid of the current inferior.
9414 * thread-db.c (proc_handle, thread_agent): Delete.
9415 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9416 per-process data.
9417 (find_one_thread): Change argument type to ptid_t. Adjust to
9418 per-process data.
9419 (maybe_attach_thread): Adjust to per-process data and ptids.
9420 (thread_db_find_new_threads): Ditto.
9421 (thread_db_init): Ditto.
9422 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9423 processes table. Adjust to use ptids.
9424 (spu_kill, spu_detach): Adjust interface. Remove process from
9425 processes table.
9426 (spu_join, spu_thread_alive): Adjust interface.
9427 (spu_wait): Adjust interface. Remove process from processes
9428 table. Adjust to use ptids.
9429 * win32-low.c (current_inferior_tid): Delete.
9430 (current_inferior_ptid): New.
9431 (debug_event_ptid): New.
9432 (thread_rec): Take a ptid. Adjust.
9433 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9434 (child_delete_thread): Ditto.
9435 (do_initial_child_stuff): Add `attached' argument. Add process to
9436 processes table.
9437 (child_fetch_inferior_registers, child_store_inferior_registers):
9438 Adjust.
9439 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9440 (win32_attach): Pass 1 to do_initial_child_stuff.
9441 (win32_kill): Adjust interface. Remove process from processes
9442 table.
9443 (win32_detach): Ditto.
9444 (win32_join): Adjust interface.
9445 (win32_thread_alive): Take a ptid.
9446 (win32_resume): Adjust to use ptids.
9447 (get_child_debug_event): Ditto.
9448 (win32_wait): Adjust interface. Remove exiting process from
9449 processes table.
9450
bd99dc85
PA
94512009-04-01 Pedro Alves <pedro@codesourcery.com>
9452
9453 Non-stop mode support.
9454
9455 * server.h (non_stop): Declare.
9456 (gdb_client_data, handler_func): Declare.
9457 (delete_file_handler, add_file_handler, start_event_loop):
9458 Declare.
9459 (handle_serial_event, handle_target_event, push_event)
9460 (putpkt_notif): Declare.
9461 * target.h (enum resume_kind): New.
9462 (struct thread_resume): Replace `step' field by `kind' field.
9463 (TARGET_WNOHANG): Define.
9464 (struct target_ops) <wait>: Add `options' argument.
9465 <supports_non_stop, async, start_non_stop>: New fields.
9466 (target_supports_non_stop, target_async): New.
9467 (start_non_stop): Declare.
9468 (mywait): Add `options' argument.
9469 * target.c (mywait): Add `options' argument. Print child exit
9470 notifications here.
9471 (start_non_stop): New.
9472 * server.c (non_stop, own_buf, mem_buf): New globals.
9473 (struct vstop_notif): New.
9474 (notif_queue): New global.
9475 (queue_stop_reply, push_event, discard_queued_stop_replies)
9476 (send_next_stop_reply): New.
9477 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9478 interface changes.
9479 (attach_inferior): In non-stop mode, don't wait for the target
9480 here.
9481 (handle_general_set): Handle QNonStop.
9482 (handle_query): When handling qC, return the current general
9483 thread, instead of the first thread of the list.
9484 (handle_query): If the backend supports non-stop mode, include
9485 QNonStop+ in the qSupported query response.
9486 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9487 and non-stop mode.
9488 (handle_v_attach, handle_v_run): Handle non-stop mode.
9489 (handle_v_stopped): New.
9490 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9491 (myresume): Adjust to use resume_kind. Handle non-stop.
9492 (queue_stop_reply_callback): New.
9493 (handle_status): Handle non-stop mode.
9494 (main): Clear non_stop flag on reconnection. Use the event-loop.
9495 Refactor serial protocol handling from here ...
9496 (process_serial_event): ... to this new function. When GDB
9497 selects any thread, select one here. In non-stop mode, wait until
9498 GDB acks all pending events before exiting.
9499 (handle_serial_event, handle_target_event): New.
9500 * remote-utils.c (remote_open): Install remote_desc in the event
9501 loop.
9502 (remote_close): Remove remote_desc from the event loop.
9503 (putpkt_binary): Rename to...
9504 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9505 (putpkt_binary): New as wrapper around putpkt_binary_1.
9506 (putpkt_notif): New.
9507 (prepare_resume_reply): In non-stop mode, don't change the
9508 general_thread.
9509 * event-loop.c: New.
9510 * Makefile.in (OBJ): Add event-loop.o.
9511 (event-loop.o): New rule.
9512
9513 * linux-low.h (pid_of): Moved here.
9514 (lwpid_of): New.
9515 (get_lwp_thread): Use lwpid_of.
9516 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9517 * linux-low.c (pid_of): Delete.
9518 (inferior_pid): Use lwpid_of.
9519 (linux_event_pipe): New.
9520 (target_is_async_p): New.
9521 (delete_lwp): New.
9522 (handle_extended_wait): Use lwpid_of.
9523 (add_lwp): Don't set lwpid field.
9524 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9525 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9526 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9527 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9528 first. Adjust to linux_wait_for_event interface changes. Use
9529 lwpid_of.
9530 (linux_detach): Don't delete the main lwp here.
9531 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9532 (status_pending_p): Don't consider explicitly suspended lwps.
9533 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9534 pointer. Add OPTIONS argument. Change return type to int. Use
9535 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9536 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9537 pointer. Add status pointer argument. Return a pid instead of a
9538 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9539 changes. In non-stop mode, don't switch to a random thread.
9540 (linux_wait): Rename to...
9541 (linux_wait_1): ... this. Add target_options argument, and handle
9542 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9543 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9544 clean exit and signal exit code. Don't stop all threads in
9545 non-stop mode. In all-stop mode, only stop all threads when
9546 reporting a stop to GDB. Handle explicit thread stop requests.
9547 (async_file_flush, async_file_mark): New.
9548 (linux_wait): New.
9549 (send_sigstop): Use lwpid_of.
9550 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9551 interface changes. In non-stop mode, don't switch to a random
9552 thread.
9553 (linux_resume_one_lwp): Use lwpid_of.
9554 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9555 (linux_resume_one_thread): ... this. Handle resume_stop. In
9556 non-stop mode, don't look for pending flag in all threads.
9557 (resume_status_pending_p): Don't consider explicitly suspended
9558 threads.
9559 (my_waitpid): Reimplement. Emulate __WALL.
9560 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9561 Use lwpid_of.
9562 (sigchld_handler, linux_supports_non_stop, linux_async)
9563 (linux_start_non_stop): New.
9564 (linux_target_ops): Register linux_supports_non_stop, linux_async
9565 and linux_start_non_stop.
9566 (initialize_low): Install SIGCHLD handler.
9567 * thread-db.c (thread_db_create_event, find_one_thread)
9568 (thread_db_get_tls_address): Use lwpid_of.
9569 * win32-low.c (win32_detach): Adjust to use resume_kind.
9570 (win32_wait): Add `options' argument.
9571 * spu-low.c (spu_resume): Adjust to use resume_kind.
9572 (spu_wait): Add `options' argument.
9573
5b1c542e
PA
95742009-04-01 Pedro Alves <pedro@codesourcery.com>
9575
9576 Decouple target code from remote protocol.
9577
9578 * target.h (enum target_waitkind): New.
9579 (struct target_waitstatus): New.
9580 (struct target_ops) <wait>: Return an unsigned long. Take a
9581 target_waitstatus pointer instead of a char pointer.
9582 (mywait): Likewise.
9583 * target.c (mywait): Change prototype to return an unsigned long.
9584 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9585 * server.h (thread_from_wait, old_thread_from_wait): Delete
9586 declarations.
9587 (prepare_resume_reply): Change prototype to take a
9588 target_waitstatus.
9589 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9590 (last_status, last_ptid): New.
9591 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9592 pid instead of a signal.
9593 (attach_inferior): Remove "status" and "signal" parameters.
9594 Adjust.
9595 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9596 not as an address.
9597 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9598 (handle_v_requests, myresume): Remove "status" and "signal"
9599 parameters. Adjust.
9600 (handle_status): New.
9601 (main): Delete local `status'. Adjust.
9602 * remote-utils.c: Include target.h.
9603 (prepare_resume_reply): Change prototype to take a
9604 target_waitstatus. Adjust.
9605
9606 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9607 interface.
9608 * spu-low.c (spu_wait): Adjust.
9609 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9610 Delete.
9611 (win32_wait): Adjust.
9612
2bd7c093
PA
96132009-04-01 Pedro Alves <pedro@codesourcery.com>
9614
9615 * target.h (struct thread_resume): Delete leave_stopped member.
9616 (struct target_ops): Add a `n' argument to the `resume' callback.
9617 * server.c (start_inferior): Adjust.
9618 (handle_v_cont, myresume): Adjust.
9619 * linux-low.c (check_removed_breakpoint): Adjust to resume
9620 interface change, and to removed leave_stopped field.
9621 (resume_ptr): Delete.
9622 (struct thread_resume_array): New.
9623 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9624 resume interface change.
9625 (linux_continue_one_thread, linux_queue_one_thread)
9626 (resume_status_pending_p): Check if the resume field is NULL
9627 instead of checking the leave_stopped member.
9628 (linux_resume): Adjust to the target resume interface change.
9629 * spu-low.c (spu_resume): Adjust to the target resume interface
9630 change.
9631 * win32-low.c (win32_detach, win32_resume): Ditto.
9632
c35fafde
PA
96332009-04-01 Pedro Alves <pedro@codesourcery.com>
9634
9635 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9636 flag.
9637 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9638 pending.
9639 (linux_continue_one_thread): Only preserve the stepping flag if
9640 there's a pending breakpoint.
9641
0a59d50b
PA
96422009-03-31 Pedro Alves <pedro@codesourcery.com>
9643
9644 * server.c (main): After the inferior having exited, call
9645 remote_close before exiting gdbserver.
9646
f04c6d38
TJB
96472009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9648
9649 Fix size of FPSCR in Power 7 processors.
9650 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9651 (PPC_FEATURE_HAS_DFP): New #define.
9652 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9653 size of the FPSCR.
9654
78e5cee6
PA
96552009-03-23 Pedro Alves <pedro@codesourcery.com>
9656
9657 * server.c (handle_query) Whitespace and formatting.
9658
1b3f6016
PA
96592009-03-22 Pedro Alves <pedro@codesourcery.com>
9660
9661 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9662 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9663 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9664 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9665 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9666 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9667 Makefile.in, configure.ac: Fix whitespace throughout.
9668 * configure: Regenerate.
9669
a07b2135
PA
96702009-03-22 Pedro Alves <pedro@codesourcery.com>
9671
9672 * inferiors.c (find_inferior): Make it safe for the callback
9673 function to delete the currently iterated inferior.
9674
67cc2626
PA
96752009-03-22 Pedro Alves <pedro@codesourcery.com>
9676
9677 * Makefile.in (linuw_low_h): Move higher.
9678 (thread-db.o): Depend on $(linux_low_h).
9679
54a0b537
PA
96802009-03-17 Pedro Alves <pedro@codesourcery.com>
9681
9682 Rename "process" to "lwp" throughout.
9683
9684 * linux-low.c (all_processes): Rename to...
9685 (all_lwps): ... this.
9686 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9687 (add_process): Rename to ...
9688 (add_lwp): ... this. Adjust.
9689 (linux_create_inferior): Adjust.
9690 (linux_attach_lwp): Adjust.
9691 (linux_attach): Adjust.
9692 (linux_kill_one_process): Rename to ...
9693 (linux_kill_one_lwp): ... this. Adjust.
9694 (linux_kill): Adjust.
9695 (linux_detach_one_process): Rename to ...
9696 (linux_detach_one_lwp): ... this. Adjust.
9697 (linux_detach): Adjust.
9698 (check_removed_breakpoint): Adjust.
9699 (status_pending_p): Adjust.
9700 (linux_wait_for_process): Rename to ...
9701 (linux_wait_for_lwp): ... this. Adjust.
9702 (linux_wait_for_event): Adjust.
9703 (send_sigstop): Adjust.
9704 (wait_for_sigstop): Adjust.
9705 (stop_all_processes): Rename to ...
9706 (stop_all_lwps): ... this.
9707 (linux_resume_one_process): Rename to ...
9708 (linux_resume_one_lwp): ... this. Adjust.
9709 (linux_set_resume_request, linux_continue_one_thread)
9710 (linux_queue_one_thread, resume_status_pending_p)
9711 (usr_store_inferior_registers, regsets_store_inferior_registers)
9712 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9713 Adjust.
9714 * linux-low.h (get_process): Rename to ...
9715 (get_lwp): ... this. Adjust.
9716 (get_thread_process): Rename to ...
9717 (get_thread_lwp): ... this. Adjust.
9718 (get_process_thread): Rename to ...
9719 (get_lwp_thread): ... this. Adjust.
9720 (struct process_info): Rename to ...
9721 (struct lwp_info): ... this.
9722 (all_processes): Rename to ...
9723 (all_lwps): ... this.
9724 * proc-service.c (ps_lgetregs): Adjust.
9725 * thread-db.c (thread_db_create_event, find_one_thread)
9726 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9727
0b16c5cf
PA
97282009-03-14 Pedro Alves <pedro@codesourcery.com>
9729
9730 * server.c (handle_query): Handle "qAttached".
9731
32de4b9d
NS
97322009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9733
9734 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9735 GPLv3, update license URL.
9736
2aecd87f
DE
97372009-03-01 Doug Evans <dje@google.com>
9738
93efd302 9739 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
9740 (server_h): Add gdb_signals.h.
9741 (signals.o): Update.
9742 * server.h (target_signal_from_host,target_signal_to_host_p)
9743 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9744
86b1f9c5
PM
97452009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9746
9747 * remote-utils.c (getpkt): Also generate remote-debug
9748 information if noack_mode is set.
9749
4aa995e1
PA
97502009-02-06 Pedro Alves <pedro@codesourcery.com>
9751
9752 * server.c (handle_query): Report qXfer:siginfo:read and
9753 qXfer:siginfo:write as supported and handle them.
9754 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9755 * linux-low.c (linux_xfer_siginfo): New.
9756 (linux_target_ops): Set it.
9757
62709adf
PA
97582009-01-26 Pedro Alves <pedro@codesourcery.com>
9759
9760 * server.c (gdbserver_usage): Mention --remote-debug.
9761 (main): Accept '--remote-debug' switch.
9762
aef93bd7
DE
97632009-01-18 Doug Evans <dje@google.com>
9764
9765 * regcache.c (new_register_cache): No need to check result of xcalloc.
9766 * server.c (handle_search_memory): Back out calls to xmalloc,
9767 result is checked and error is returned to user upon failure.
9768 (handle_query): Ditto. Add more checks for result of malloc.
9769 (handle_v_cont): Check result of malloc, report error back to
9770 user upon failure.
9771 (handle_v_run): Ditto. Call freeargv.
9772 * server.h (freeargv): Declare.
9773 * utils.c (freeargv): New fn.
9774
54363045
DE
97752009-01-15 Doug Evans <dje@google.com>
9776
f626972c
DE
9777 * gdbreplay.c (perror_with_name): Make arg const char *.
9778 * server.h (target_signal_to_name): Make return type const char *.
0842e787 9779 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 9780 * utils.c (perror_with_name): Make arg const char *.
54363045 9781
18aae699
PA
97822009-01-14 Pedro Alves <pedro@codesourcery.com>
9783
9784 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9785 when handling a EXIT_PROCESS_DEBUG_EVENT.
9786
ff703abe
JB
97872009-01-06 Joel Brobecker <brobecker@adacore.com>
9788
9789 * gdbreplay.c (gdbreplay_version): Update copyright year.
9790 * server.c (gdbserver_version): Likewise.
9791
f21cc1a2 97922009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
9793
9794 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 9795 (handle_extended_wait): Improve comment.
0e21c1ec 9796
bca929d3
DE
97972008-12-13 Doug Evans <dje@google.com>
9798
9799 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9800 * server.h (ATTR_MALLOC): New macro.
9801 (xmalloc,xcalloc,xstrdup): Declare.
9802 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9803 * inferiors.c: Ditto.
9804 * linux-low.c: Ditto.
9805 * mem-break.c: Ditto.
9806 * regcache.c: Ditto.
9807 * remote-utils.c: Ditto.
9808 * server.c: Ditto.
9809 * target.c: Ditto.
9810 * win32-low.c: Ditto.
9811
97438e3f
DE
98122008-12-12 Doug Evans <dje@google.com>
9813
896c7fbb
DE
9814 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9815 in debugging printf.
9816
97438e3f
DE
9817 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9818
e3b886f8
DE
98192008-12-09 Doug Evans <dje@google.com>
9820
9821 * linux-low.h (struct process_info): Delete member tid, unused.
9822 * thread-db.c (find_one_thread): Update.
9823 (maybe_attach_thread): Update.
9824
07e059b5
VP
98252008-12-02 Pedro Alves <pedro@codesourcery.com>
9826
889bf7c5
PA
9827 * target.h (struct target_ops): Add qxfer_osdata member.
9828 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9829 and dirent.h.
9830 (linux_qxfer_osdata): New functions.
9831 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9832 callback.
9833 * server.c (handle_query): Handle "qXfer:osdata:read:".
9834 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9835 (buffer_xml_printf): New functions.
9836 * server.h (struct buffer): New.
9837 (buffer_grow_str, buffer_grow_str0): New macros.
9838 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9839 (buffer_xml_printf): Declare.
07e059b5 9840
4cab47ab
DE
98412008-11-24 Doug Evans <dje@google.com>
9842
9843 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9844
f142445f
DJ
98452008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9846
9847 * server.c (handle_v_run): Always use the supplied argument list.
9848
d0107bb6 98492008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9850
d0107bb6
BW
9851 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9852 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9853
2c4ad781
TJB
98542008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9855
9856 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9857 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9858 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9859 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9860 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9861 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9862 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9863 XML target descriptions.
9864 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9865 when inferior is running on an ISA 2.05 or later processor. Add
9866 special case to return offset for full 64-bit slot of FPSCR when
9867 in 32-bits.
9868
dfb64f85
DJ
98692008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9870
9871 * Makefile.in (SFILES, clean): Added sparc64 files.
9872 (reg-sparc64.o, reg-sparc64.c): New.
9873 * configure.srv (sparc*-*-linux*): New configuration.
9874 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9875 syscall arguments for SPARC.
9876 (regsets_store_inferior_registers): Likewise.
9877 * linux-sparc-low.c: New file.
9878
66b6e1dd
DE
98792008-10-21 Doug Evans <dje@google.com>
9880
9881 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9882 (READLINE_DIR,READLINE_DEP): Delete.
9883 (INTERNAL_CFLAGS): Update.
9884 (LINTFLAGS): Update.
9885
9b710a42
PA
98862008-10-10 Pedro Alves <pedro@codesourcery.com>
9887
9888 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9889 whole argv from the last run, not just argv[0].
9890
5822d809
PA
98912008-09-08 Pedro Alves <pedro@codesourcery.com>
9892
9893 * regcache.c (new_register_cache): Return NULL if the register
9894 cache size isn't known yet.
9895 (free_register_cache): Avoid dereferencing a NULL regcache.
9896
74aac56f
DJ
98972008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9898
9899 * configure.srv: Merge MIPS and MIPS64.
9900
400b20f5
MR
99012008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9902
9903 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9904
677c5bb1
LM
99052008-08-18 Luis Machado <luisgpm@br.ibm.com>
9906
9907 * Makefile.in: Add required vsx dependencies.
9908
9909 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9910 Declare init_registers_powerpc_vsx32l.
9911 Declare init_registers_powerpc_vsx64l.
9912 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9913 (ppc_arch_setup): Check for VSX in hwcap.
9914 (ppc_fill_vsxregset): New function.
9915 (ppc_store_vsxregset): New function.
9916 Add new VSX entry in regset_info target_regsets.
9917
9918 * configure.srv: Add new VSX dependencies.
9919
a6f3e723
SL
99202008-08-12 Pedro Alves <pedro@codesourcery.com>
9921
9922 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9923 (remote_open): Set or clear transport_is_reliable.
9924 (putpkt_binary): Don't expect acks in noack mode.
9925 (getpkt): Don't send ack/nac in noack mode.
9926 * server.c (handle_general_set): Handle QStartNoAckMode.
9927 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9928 qSupported.
9929 (main): Reset noack_mode on every connection.
9930 * server.h (noack_mode): Declare.
9931
a417dc56
RW
99322008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9933
9934 * Makefile.in (GDBREPLAY_OBS): New variable.
9935 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9936
3221518c
UW
99372008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9938 Daniel Jacobowitz <dan@codesourcery.com>
9939
9940 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9941 (usr_store_inferior_registers): Likewise.
9942 (regsets_store_inferior_registers): Likewise.
9943
ec56be1b
PA
99442008-07-31 Rolf Jansen <rj@surtec.com>
9945 Pedro Alves <pedro@codesourcery.com>
9946
9947 * configure.ac: Check for memmem declaration.
9948 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9949 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9950 (disable_packet_qfThreadInfo): Unconditionally compile.
9951 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9952 * configure, config.in: Regenerate.
9953
2fe5e3ff
DE
99542008-07-28 Doug Kwan <dougkwan@google.com>
9955
9956 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9957 (linux_write_memory): Remove declaration of errno.
9958
836acd6d
UW
99592008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9960
9961 * linux-low.c (handle_extended_wait): Do not use "status"
9962 variable uninitialized.
9963
aeba519e
PA
99642008-07-07 Pedro Alves <pedro@codesourcery.com>
9965
9966 * server.c (handle_v_attach): Inhibit reporting dll changes.
9967
db42f210
PA
99682008-06-27 Pedro Alves <pedro@codesourcery.com>
9969
9970 * remote-utils.c (prepare_resume_reply): If requested, don't
9971 output "thread:TID" in the T stop reply.
9972
9973 * server.c (disable_packet_vCont, disable_packet_Tthread)
9974 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9975 (handle_query): If requested, disable support for qC, qfThreadInfo
9976 and qsThreadInfo.
9977 (handle_v_requests): If requested, disable support for vCont.
9978 (gdbserver_show_disableable): New.
9979 (main): Handle --disable-packet and --disable-packet=LIST.
9980
9981 * server.h (disable_packet_vCont, disable_packet_Tthread)
9982 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9983
8e4c5421
CD
99842008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9985
9986 * server.c (gdbserver_usage): Mention --version.
9987
6e23a804
DJ
99882008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9989
9990 * Makefile.in (gdbreplay.o): New rule.
9991
90aa6a40
JM
99922008-06-06 Joseph Myers <joseph@codesourcery.com>
9993
9994 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9995 message, not gdbserver.
9996
c16158bc 99972008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9998 Nathan Sidwell <nathan@codesourcery.com>
9999 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10000
10001 * acinclude.m4: Include ../../config/acx.m4.
10002 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10003 * configure, config.in: Regenerate.
10004 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10005 * server.c (gdbserver_version): Print PKGVERSION.
10006 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10007 (main): Adjust gdbserver_usage calls.
10008 * gdbreplay.c (version, host_name): Add declarations.
10009 (gdbreplay_version, gdbreplay_usage): New.
10010 (main): Accept --version and --help options.
10011
aeb75bf5
DJ
100122008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10013
10014 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10015 (arm_breakpoint_at): Handle Thumb.
10016 (the_low_target): Add comment.
10017
76b233dd
UW
100182008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10019
10020 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10021
08388c79
DE
100222008-05-09 Doug Evans <dje@google.com>
10023
a3c83fae
DE
10024 * server.h (decode_search_memory_packet): Declare.
10025 * remote-utils.c (decode_search_memory_packet): New fn.
10026 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10027 (handle_search_memory): New fn.
10028 (handle_query): Process qSearch:memory packets.
10029
bb9c3d36
UW
100302008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10031
10032 * regcache.c (registers_length): Remove.
10033 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10034 full register packet.
10035 * regcache.h (registers_length): Remove prototype.
10036 * server.h (PBUFSIZ): Define to 16384.
10037
7284e1be
UW
100382008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10039
10040 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10041 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10042 powerpc-64l.o, and powerpc-altivec64l.o.
10043 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10044 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10045 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10046 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10047 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10048 to srv_xmlfiles.
10049
10050 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10051 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10052 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10053 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10054 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10055 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10056 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10057 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10058 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10059 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10060 (clean): Update.
10061
10062 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10063 (init_registers_powerpc_32l): ... this new prototype.
10064 (init_registers_powerpc_32): Remove, replace by ...
10065 (init_registers_powerpc_altivec32l): ... this new prototype.
10066 (init_registers_powerpc_e500): Remove, replace by ...
10067 (init_registers_powerpc_e500l): ... this new prototype.
10068 (init_registers_ppc64): Remove, replace by ...
10069 (init_registers_powerpc_64l): ... this new prototype.
10070 (init_registers_powerpc_64): Remove, replace by ...
10071 (init_registers_powerpc_altivec64l): ... this new prototype.
10072 (ppc_num_regs): Set to 73.
10073 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10074 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10075 (ppc_cannot_store_register): Handle orig_r3 and trap.
10076 (ppc_arch_setup): Update init_registers_... calls.
10077 (ppc_fill_gregset): Handle orig_r3 and trap.
10078
10079 * inferiors.c (clear_inferiors): Reset current_inferior.
10080
fdc59709
PB
100812008-04-23 Paolo Bonzini <bonzini@gnu.org>
10082
889bf7c5
PA
10083 * acinclude.m4: Add override.m4.
10084 * configure: Regenerate.
fdc59709 10085
c9b2f845
UW
100862008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10087
10088 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10089 initial call to init_register_ppc64.
10090
550512b8
UW
100912008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10092
43aaf8b6
PA
10093 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10094 single powerpc*-*-linux* case.
550512b8
UW
10095 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10096
b6430ec3
UW
100972008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10098
10099 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10100 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10101 from reg_xmlfiles.
10102 * linux-ppc-low.c: Include <elf.h>.
10103 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10104 (ppc_hwcap): New global variable.
10105 (ppc_regmap): Remove __SPE__ #ifdef sections.
10106 (ppc_regmap_e500): New global variable.
10107 (ppc_cannot_store_register): Update __SPE__ special case.
10108 (ppc_get_hwcap): New function.
10109 (ppc_arch_setup): Use it to determine whether inferior supports
10110 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10111 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10112 Do not access registers if target does not support AltiVec.
10113 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10114 Do not access registers if target does not support SPE.
10115 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10116
52fa2412
UW
101172008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10118
10119 * linux-low.c (disabled_regsets, num_regsets): New.
10120 (use_regsets_p): Delete.
10121 (linux_wait_for_process): Clear disabled_regsets.
10122 (regsets_fetch_inferior_registers): Check and set it.
10123 (regsets_store_inferior_registers): Likewise.
10124 (linux_fetch_registers, linux_store_registers): Do not use
10125 use_regsets_p.
10126 (initialize_low): Allocate disabled_regsets.
10127
e28b3332
DJ
101282008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10129
10130 * Makefile.in (LIBOBJS): New.
10131 (OBS): Use LIBOBJS.
10132 (memmem.o): New rule.
10133 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10134 * configure: Regenerated.
10135
4536995d
UW
101362008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10137
10138 * server.c (handle_query): Never return "unsupported" for
10139 qXfer:features:read queries.
10140
221c031f
UW
101412008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10142
10143 * server.c (get_features_xml): Fix inverted condition.
10144 (handle_query): Always support qXfer:feature:read.
10145
ccd213ac
DJ
101462008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10147
10148 * server.c (wrapper_argv): New.
10149 (start_inferior): Handle wrapper_argv. If set, expect an extra
10150 trap.
10151 (gdbserver_usage): Document --wrapper.
10152 (main): Parse --wrapper.
10153
6fe305f7
UW
101542008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10155
10156 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10157 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10158 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10159 (ppc_set_pc): Likewise.
10160 (ppc_arch_setup): New function.
10161 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10162 of collect_register.
889bf7c5 10163 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10164
5b0a002e
UW
101652008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10166
10167 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10168 instead of linux-ppc64-low.o.
10169 * linux-ppc64-low.c: Remove file.
10170 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10171 (linux-ppc64-low.o): Remove rule.
10172
10173 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10174 (init_registers_powerpc_64): Likewise.
10175 (ppc_regmap): Conditionally define depending on __powerpc64__.
10176 (ppc_cannot_store_register): Do not special-case "fpscr" when
10177 compiled on __powerpc64__.
10178 (ppc_collect_ptrace_register): New function.
10179 (ppc_supply_ptrace_register): New function.
10180 (ppc_breakpoint): Change type to "unsigned int".
10181 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10182 (the_low_target): Conditionally provide initializers for the
889bf7c5 10183 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10184 collect_ptrace_register and supply_ptrace_register members.
10185
9b4b61c8
UW
101862008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10187
10188 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10189 * server.c (gdbserver_xmltarget): Define.
10190 (get_features_xml): Use it to replace "target.xml" and arch_string.
10191
10192 * configure.srv: Remove srv_xmltarget. Add XML files that were
10193 mentioned there to srv_xmlfiles instead. Remove conditional tests
10194 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10195 srv_xmlfiles and srv_regobj to include all possible choices.
10196 * configure.ac (srv_xmltarget): Remove.
10197 (srv_xmlfiles): Do not add "target.xml".
10198 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10199 checks for supplementary target information.
10200 * configure: Regenerate.
10201 * Makefile.in (XML_TARGET): Remove.
10202 (target.xml): Remove rule.
10203 (clean): Do not clean up target.xml.
10204 (.PRECIOUS): Do not mention target.xml.
10205
10206 * target.h (struct target_ops): Remove arch_string member.
10207 * linux-low.c (linux_arch_string): Remove.
10208 (linux_target_ops): Remove arch_string initializer.
10209 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10210 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10211 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10212 * spu-low.c (spu_arch_string): Remove.
10213 (spu_target_ops): Remove arch_string initializer.
10214 * win32-low.c (win32_arch_string): Remove.
10215 (win32_target_ops): Remove arch_string initializer.
10216 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10217 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10218 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10219
ee1a7ae4
UW
102202008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10221
10222 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10223 by collect_ptrace_register and supply_ptrace_register hooks.
10224 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10225 instead of checking for the_low_target.left_pad_xfer.
10226 (usr_store_inferior_registers): Use collect_ptrace_register callback
10227 instead of checking for the_low_target.left_pad_xfer.
10228
10229 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10230 (s390_supply_ptrace_register): Likewise.
10231 (s390_fill_gregset): Call s390_collect_ptrace_register.
10232 (the_low_target): Update.
10233
10234 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10235 (ppc_supply_ptrace_register): Likewise.
10236 (the_low_target): Update.
10237
10238 * linux-i386-low.c (the_low_target): Update.
10239 * linux-x86-64-low.c (the_low_target): Update.
10240
d61ddec4
UW
102412008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10242
10243 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10244 reg-s390.o and reg-s390x.o.
10245
10246 * linux-low.c (new_inferior): New global variable.
10247 (linux_create_inferior, linux_attach): Set it.
10248 (linux_wait_for_process): Call the_low_target.arch_setup after the
10249 target has stopped for the first time.
10250 (initialize_low): Do not call the_low_target.arch_setup.
10251
10252 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10253 (s390_set_pc): Likewise.
10254 (s390_arch_setup): New function.
10255 (the_low_target): Use s390_arch_setup as arch_setup routine.
10256
10257 * regcache.c (realloc_register_cache): New function.
10258 (set_register_cache): Call it for each existing regcache.
10259
d05b4ac3
UW
102602008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10261
10262 * server.h (init_registers): Remove prototype.
10263
10264 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10265 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10266 instead of init_registers ().
10267 * linux-arm-low.c (init_registers_arm): Add prototype.
10268 (init_registers_arm_with_iwmmxt): Likewise.
10269 (the_low_target): Add initializer for arch_setup field.
10270 * linux-cris-low.c (init_registers_cris): Add prototype.
10271 (the_low_target): Add initializer for arch_setup field.
10272 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10273 (the_low_target): Add initializer for arch_setup field.
10274 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10275 (the_low_target): Add initializer for arch_setup field.
10276 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10277 (the_low_target): Add initializer for arch_setup field.
10278 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10279 (the_low_target): Add initializer for arch_setup field.
10280 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10281 (the_low_target): Add initializer for arch_setup field.
10282 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10283 (init_registers_mips64_linux): Likewise.
10284 (the_low_target): Add initializer for arch_setup field.
10285 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10286 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10287 (the_low_target): Add initializer for arch_setup field.
10288 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10289 (init_registers_powerpc_64): Likewise.
10290 (the_low_target): Add initializer for arch_setup field.
10291 * linux-s390-low.c (init_registers_s390): Add prototype.
10292 (init_registers_s390x): Likewise.
10293 (the_low_target): Add initializer for arch_setup field.
10294 * linux-sh-low.c (init_registers_sh): Add prototype.
10295 (the_low_target): Add initializer for arch_setup field.
10296 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10297 (the_low_target): Add initializer for arch_setup field.
10298 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10299 (the_low_target): Add initializer for arch_setup field.
10300
10301 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10302 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10303 instead of init_registers ().
10304 * win32-arm-low.c (init_registers_arm): Add prototype.
10305 (the_low_target): Add initializer for arch_setup field.
10306 * win32-i386-low.c (init_registers_i386): Add prototype.
10307 (the_low_target): Add initializer for arch_setup field.
10308
10309 * spu-low.c (init_registers_spu): Add prototype.
10310 (initialize_low): Call initialie_registers_spu () instead of
10311 initialize_registers ().
10312
fd96d250
PA
103132008-02-19 Pedro Alves <pedro@codesourcery.com>
10314
10315 * server.c (handle_v_requests): When handling the vRun and vAttach
10316 packets, if already debugging a process, don't kill it. Return an
10317 error instead.
10318
d41b6bb4
DJ
103192008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10320
10321 * server.c (handle_query): Correct length check.
10322
5ac588cf
PA
103232008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10324
10325 * win32-low.c (do_initial_child_stuff): Add process handle
10326 parameter. Set current_process_handle and current_process_id from the
10327 parameters. Clear globals.
10328 (win32_create_inferior): Don't set current_process_handle and
10329 current_process_id here. Instead pass them on the call to
10330 do_initial_child_stuff.
10331 (win32_attach): Likewise.
10332 (win32_clear_inferiors): New.
10333 (win32_kill): Don't close the current process handle or the
10334 current thread handle here. Instead call win32_clear_inferiors.
10335 (win32_detach): Don't open a new handle to the process. Call
10336 win32_clear_inferiors.
10337 (win32_join): Don't rely on current_process_handle; open a new
10338 handle using the process id.
10339 (win32_wait): Call win32_clear_inferiors when the inferior process
10340 has exited.
10341
ecd7ecbc
DJ
103422008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10343
10344 * server.c (monitor_show_help): Add "exit".
10345
1525d545
MG
103462008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10347
ecd7ecbc 10348 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10349 (clean): Add reg-xtensa.c.
10350 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10351 * configure.srv (xtensa*-*-linux*) New target.
10352 * linux-xtensa-low.c: New.
10353 * xtensa-xtregs.c: New.
1525d545 10354
59a016f0
PA
103552008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10356
10357 * hostio.c: Don't include errno.h.
10358 (errno_to_fileio_errno): Move to hostio-errno.
10359 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10360 error number outputting to the target->hostio_last_error callback.
10361 (hostio_packet_error): Use FILEIO_EINVAL directly.
10362 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10363 calls to hostio_error.
10364 * hostio-errno.c: New.
10365 * server.h (hostio_last_error_from_errno): Declare.
10366 * target.h (target_ops): Add hostio_last_error member.
10367 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10368 as hostio_last_error handler.
889bf7c5 10369 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10370 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10371 (wince_hostio_last_error): New functions.
10372 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10373 as hostio_last_error handler.
10374 (win32_target_ops) [!_WIN32_WCE]: Register
10375 hostio_last_error_from_errno as hostio_last_error handler.
10376 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10377 (hostio-errno.o): New rule.
10378 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10379 * configure.srv (srv_hostio_err_objs): New variable. Default to
10380 hostio-errno.o.
10381 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10382 * configure: Regenerate.
10383
2d717e4f
DJ
103842008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10385
10386 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10387 (linux_kill, linux_detach): Clean up the process list.
10388 * remote-utils.c (remote_open): Improve port number parsing.
10389 (putpkt_binary, input_interrupt): Only send interrupts if the target
10390 is running.
10391 * server.c (extended_protocol): Make static.
10392 (attached): Define earlier.
10393 (exit_requested, response_needed, program_argv): New variables.
10394 (target_running): New.
10395 (start_inferior): Clear attached here.
10396 (attach_inferior): Set attached here.
10397 (require_running): Define.
10398 (handle_query): Use require_running and target_running. Implement
10399 "monitor exit".
10400 (handle_v_attach, handle_v_run): New.
10401 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10402 (gdbserver_usage): Update.
10403 (main): Redo argument parsing. Handle --debug and --multi. Handle
10404 --attach along with other options or after the port. Save
10405 program_argv. Support no initial program. Resynchronize
10406 communication with GDB after an error. Handle "monitor exit".
10407 Use require_running and target_running. Always allow the extended
10408 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10409 restart in extended mode.
10410 * README: Refer to the GDB manual. Update --attach usage.
10411
7407e2de
AS
104122007-12-20 Andreas Schwab <schwab@suse.de>
10413
10414 * linux-low.c (STACK_SIZE): Define.
10415 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10416 (linux_test_for_tracefork): Likewise.
10417
b65d95c5
DJ
104182007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10419
10420 * linux-low.c (linux_wait_for_event): Update messages. Do not
10421 reinsert auto-delete breakpoints.
10422 * mem-break.c (struct breakpoint): Change return type of handler to
10423 int.
10424 (set_breakpoint_at): Update handler type.
10425 (reinsert_breakpoint_handler): Return 1 instead of calling
10426 delete_breakpoint.
10427 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10428 setting a new one.
10429 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10430 * mem-break.h (set_breakpoint_at): Update handler type.
10431 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10432 * win32-low.c (auto_delete_breakpoint): New.
10433 (get_child_debug_event): Use it.
10434
4e799345
DJ
104352007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10436
10437 * configure.ac: Check for pread and pwrite.
10438 * hostio.c (handle_pread): Fall back to lseek and read.
10439 (handle_pwrite): Fall back to lseek and write.
10440 * config.in, configure: Regenerated.
10441
27524b67
DJ
104422007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10443
10444 * server.c (myresume): Add own_buf argument.
10445 (main): Update calls.
10446
a20d5e98
DJ
104472007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10448
10449 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10450 * remote-utils.c (remote_open): Do not call disable_async_io.
10451 (block_async_io): Delete.
10452 (unblock_async_io): Make static.
10453 (initialize_async_io): New.
10454 * server.c (handle_v_cont): Handle async I/O here.
10455 (myresume): Likewise. Move other common resume tasks here...
10456 (main): ... from here. Call initialize_async_io. Disable async
10457 I/O before the main loop.
10458 * server.h (initialize_async_io): Declare.
10459 (block_async_io, unblock_async_io): Delete prototypes.
10460 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10461
b79d787e
DJ
104622007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10463
10464 * remote-utils.c (readchar): Allow binary data in received messages.
10465
d97903b2
PA
104662007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10467
10468 * win32-low.c (attaching): New global.
10469 (win32_create_inferior): Clear the `attaching' global.
10470 (win32_attach): Set the `attaching' global.
10471 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10472 attaching. Only set a breakpoint at the entry point if not
10473 attaching.
10474
311de423
PA
104752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10476
10477 * server.c (main): Don't report dll events on the initial
10478 connection on attaches.
10479
6c2d16d2
PA
104802007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10481
10482 * server.c (main): Relax numerical bases supported for the pid of
10483 the --attach command line argument.
10484
5ca906e6
PA
104852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10486
10487 * win32-low.c (win32_attach): Call OpenProcess before
10488 DebugActiveProcess, not after. Add last error output to error
10489 call.
10490
9c6c8194
PA
104912007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10492
10493 * win32-low.c (win32_get_thread_context)
10494 (win32_set_thread_context): New functions.
10495 (thread_rec): Use win32_get_thread_context.
10496 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10497 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10498 field.
10499
4d5d1aaa
PA
105002007-12-03 Leo Zayas
10501 Pedro Alves <pedro_alves@portugalmail.pt>
10502
10503 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10504 global variables.
10505 (child_add_thread): Minor cleanup.
10506 (child_continue): Resume artificially suspended threads before
10507 calling ContinueDebugEvent.
10508 (suspend_one_thread): New.
10509 (fake_breakpoint_event): New.
10510 (get_child_debug_event): Change return type to int. Check here if
10511 gdb sent an interrupt request. If a soft interrupt was requested,
10512 fake a breakpoint event. Return 0 if there is no event to handle,
10513 and 1 otherwise.
10514 (win32_wait): Don't check here if gdb sent an interrupt request.
10515 Ensure there is a valid event to handle.
10516 (win32_request_interrupt): Add soft interruption method as last
10517 resort.
10518
c436e841
PA
105192007-12-03 Leo Zayas
10520 Pedro Alves <pedro_alves@portugalmail.pt>
10521
10522 * win32-low.h (win32_thread_info): Add descriptions to the
10523 structure members. Replace `suspend_count' counter by a
10524 `suspended' flag.
10525 * win32-low.c (thread_rec): Update condition of when to get the
10526 context from the inferior. Rely on ContextFlags being set if it
10527 has already been retrieved. Only suspend the inferior thread if
10528 we haven't already. Warn if that fails.
10529 (continue_one_thread): s/suspend_count/suspended/. Only call
10530 ResumeThread once. Warn if that fails.
10531
e7b5fa67
PA
105322007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10533
10534 * win32-low.c (win32_wait): Don't read from the inferior when it
10535 has already exited.
10536
a385171d
PA
105372007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10538
10539 * Makefile.in (win32_low_h): New variable.
10540 (win32-low.o): Add dependency on $(win32_low_h).
10541 (win32-arm-low.o, win32-i386-low.o): New rules.
10542
f80c84b3
DJ
105432007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10544
10545 * hostio.c: Correct copyright year.
10546
a6b151f1
DJ
105472007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10548
10549 * Makefile.in (OBS): Add hostio.o.
10550 (hostio.o): New rule.
10551 * server.h (handle_vFile): Declare.
10552 * hostio.c: New file.
10553 * server.c (handle_v_requests): Take packet_len and new_packet_len
10554 for binary packets. Call handle_vFile.
10555 (main): Update call to handle_v_requests.
10556
f9387fc3
DJ
105572007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10558
10559 * linux-low.c: Include <sched.h>.
10560
51c2684e
DJ
105612007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10562
10563 * linux-low.c (linux_tracefork_grandchild): New.
10564 (linux_tracefork_child): Use clone.
10565 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10566
75f83163
JB
105672007-10-31 Joel Brobecker <brobecker@adacore.com>
10568
10569 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10570
da5898ce
DJ
105712007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10572
10573 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10574
24a09b5f
DJ
105752007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10576
10577 * inferiors.c (change_inferior_id): Delete.
10578 (add_pid_to_list, pull_pid_from_list): New.
10579 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10580 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10581 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10582 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10583 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10584 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10585 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10586 (using_threads): Always set to 1.
10587 (handle_extended_wait): New.
10588 (add_process): Do not set TID.
10589 (linux_create_inferior): Set must_set_ptrace_flags.
10590 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10591 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10592 (linux_thread_alive): Rename TID argument to LWPID.
10593 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10594 (linux_wait_for_event): Do not use TID or check using_threads. Update
10595 call to dead_thread_notify. Call handle_extended_wait.
10596 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10597 (send_sigstop): Delete sigstop_sent.
10598 (wait_for_sigstop): Avoid TID.
10599 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10600 (linux_test_for_tracefork): New.
10601 (linux_lookup_signals): Use thread_db_active and
10602 linux_supports_tracefork_flag.
10603 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10604 * linux-low.h (get_process_thread): Avoid TID.
10605 (struct process_ifo): Move thread_known and tid to the end. Remove
10606 sigstop_sent.
10607 (linux_attach_lwp, thread_db_init): Update prototypes.
10608 * server.h (change_inferior_id): Delete prototype.
10609 (add_pid_to_list, pull_pid_from_list): New prototypes.
10610 * thread-db.c (thread_db_use_events): New.
10611 (find_first_thread): Rename to...
10612 (find_one_thread): ...this. Update callers and messages. Do not
10613 call fatal. Check thread_db_use_events. Do not call
10614 change_inferior_id or new_thread_notify.
10615 (maybe_attach_thread): Update. Do not call new_thread_notify.
10616 (thread_db_init): Set thread_db_use_events. Check use_events.
10617 * utils.c (fatal, warning): Correct message prefix.
10618
30ed0a8f
DJ
106192007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10620
10621 * Makefile.in (clean): Remove new files.
10622 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10623 (powerpc-64.o, powerpc-64.c): New rules.
10624 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10625 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10626 with SPE.
10627 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10628 SPE targets.
10629 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10630 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10631 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10632 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10633 (target_regsets): Add AltiVec and SPE register sets.
10634 * configure.ac: Check for AltiVec and SPE.
10635 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10636 (ppc_fill_vrregset, ppc_store_vrregset): New.
10637 (target_regsets): Add AltiVec register set.
10638 * configure: Regenerated.
10639
fd462a61
DJ
106402007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10641
10642 * linux-low.c (O_LARGEFILE): Define.
10643 (linux_read_memory): Use /proc/PID/mem.
10644 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10645 * configure, config.in: Regenerated.
10646
69f223ed
DJ
106472007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10648
10649 * linux-low.c (linux_wait_for_event): Do not pass signals while
10650 single-stepping.
10651
aec18585
PA
106522007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10653
10654 * win32-low.c (create_process): New.
10655 (win32_create_inferior): Use create_process instead of
10656 CreateProcess. If create_process failed retry appending an ".exe"
10657 suffix. Store the GetLastError result immediatelly after
10658 create_process calls and use it on the call to error.
10659
34d86ddd
PA
106602007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10661
10662 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10663
5a0e3bd0
JB
106642007-08-23 Joel Brobecker <brobecker@adacore.com>
10665
10666 * configure.ac: Switch license to GPLv3.
10667
f88c79e6
MS
106682007-08-01 Michael Snyder <msnyder@access-company.com>
10669
10670 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10671
6b3d9b83
PA
106722007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10673
10674 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10675 typedef.
10676 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10677 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10678 CloseToolhelp32Snapshot.
10679 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10680 CloseToolhelp32Snapshot.
10681
c588c53c
MS
106822007-07-27 Michael Snyder <michael.snyder@access-company.com>
10683
10684 * server.c (main): Check for inferior exit before main loop.
10685
aa0403d9
PA
106862007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10687
10688 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10689 instead of on tmp_desc.
10690
255e7678
DJ
106912007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10692 Daniel Jacobowitz <dan@codesourcery.com>
10693
10694 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10695 (add_thread): Minor cleanups.
10696 (clear_inferiors): Move lower in the file. Clear the DLL
10697 list.
10698 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10699 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10700 (xml_escape_text): New.
10701 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10702 for qSupported.
10703 (handle_v_cont): Report errors.
10704 (gdbserver_version): Update.
10705 (main): Correct size of own_buf. Do not report initial DLL events.
10706 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10707 (unloaded_dll, xml_escape_text): New.
10708 * win32-low.c (enum target_waitkind): Update comments.
10709 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10710 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10711 (win32_EnumProcessModules, win32_GetModuleInformation)
10712 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10713 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10714 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10715 (win32_Module32First, win32_Module32Next, load_toolhelp)
10716 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10717 (get_child_debug_event): Handle DLL events.
10718 (win32_wait): Likewise.
10719
0d37add9
DJ
107202007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10721
10722 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10723 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10724
45e2715e
PA
107252007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10726
10727 * win32-low.c (handle_output_debug_string): Ignore event if not
10728 waiting.
10729
c5674cf1
PA
107302007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10731
10732 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10733
2bbe3cc1
DJ
107342007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10735
10736 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10737
ae13219e
DJ
107382007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10739
10740 * inferiors.c (change_inferior_id): Add comment.
10741 * linux-low.c (check_removed_breakpoint): Add an early
10742 prototype. Improve debug output.
10743 (linux_attach): Doc update.
10744 (linux_detach_one_process, linux_detach): Clean up before releasing
10745 each process.
10746 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10747 * linux-low.h (struct process_info): Doc improvement.
10748 * mem-break.c (delete_all_breakpoints): New.
10749 * mem-break.h (delete_all_breakpoints): New prototype.
10750 * thread-db.c (find_first_thread): New.
10751 (thread_db_create_event): Call it instead of
10752 thread_db_find_new_threads. Clean up unused variables.
10753 (maybe_attach_thread): Remove first thread handling.
10754 (thread_db_find_new_threads): Use find_first_thread.
10755 (thread_db_get_tls_address): Likewise.
10756
4105de34
DJ
107572007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10758
10759 * thread-db.c (thread_db_find_new_threads): Add prototype.
10760 (thread_db_create_event): Check for the main thread before adding
10761 a new thread.
10762 (maybe_attach_thread): Only enable event reporting if TID == 0.
10763 (thread_db_get_tls_address): Check for new threads.
10764
2b876972
DJ
107652007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10766
10767 * linux-low.c (linux_create_inferior): Try execv before execvp.
10768 * spu-low.c (spu_create_inferior): Likewise.
10769
7a245884
DJ
107702007-06-13 Mike Frysinger <vapier@gentoo.org>
10771
10772 * linux-low.c (linux_create_inferior): Change execv to execvp.
10773 * spu-low.c (spu_create_inferior): Likewies.
10774
117ce543
DJ
107752007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10776
10777 * Makefile.in (clean): Clean new files instead of deleted ones.
10778 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10779 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10780 rules.
10781 * configure.srv: Specify XML files and new regformats for MIPS and
10782 MIPS64 GNU/Linux.
10783 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10784 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10785 an entry for the restart register.
10786 (mips_cannot_fetch_register, mips_cannot_store_register)
10787 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10788 register names to match the XML descriptions.
10789 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10790 restart register instead of $0.
10791
0e7f50da
UW
107922007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10793 Markus Deuling <deuling@de.ibm.com>
10794
10795 * remote-utils.c (decode_xfer_write): New function.
10796 * server.h (decode_xfer_write): Add prototype.
10797 * server.c (handle_query): Add PACKET_LEN argument. Support
10798 qXfer:spu:read and qXfer:spu:write packets.
10799 (main): Pass packet_len to handle_query.
10800 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10801 * target.h (target_ops): Add qxfer_spu.
10802
374c1d38
UW
108032007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10804
10805 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10806 accessing non-seekable spufs files.
10807
bb63802a
UW
108082007-05-16 Markus Deuling <deuling@de.ibm.com>
10809
889bf7c5 10810 * server.c (handle_query): Add reply for qC packet.
bb63802a 10811
7390519e
PA
108122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10813 Leo Zayas <lerele@champenstudios@com>
10814
10815 * server.h (check_remote_input_interrupt_request): New function.
10816 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10817 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10818 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10819 (check_remote_input_interrupt_request): New function.
10820 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10821 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10822 winapi_GenerateConsoleCtrlEvent): New typedefs.
10823 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10824 to 250 ms.
10825 (win32_wait): Check for remote interrupt request
10826 with check_remote_input_interrupt_request.
10827 (win32_request_interrupt): New function.
10828 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10829
34b34921
PA
108302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10831
10832 * win32-low.c (debug_registers_changed,
10833 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10834 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10835 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10836 (thread_rec): Get context using the low target.
10837 (child_add_thread): Call thread_added on the low target,
10838 which does the same thing.
10839 (regptr): Delete.
10840 (do_initial_child_stuff): Remove debug registers references.
10841 Set context using the low target. Resume threads after
10842 setting the contexts.
10843 (child_continue): Remove dead variable. Remove debug
10844 registers references.
10845 (child_fetch_inferior_registers): Go through the low target.
10846 (do_child_store_inferior_registers): Remove.
10847 (child_store_inferior_registers): Go through the low target.
10848 (win32_resume): Remove debug registers references.
10849 Set context using the low target.
10850 (handle_exception): Change return type to void. Don't record
10851 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10852 first chance exception.
889bf7c5 10853 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10854 goto loop. Always return after waiting for debug event.
10855 (win32_wait): Convert to switch statement. Handle spurious
10856 events.
10857
10858 * win32-i386-low.c (debug_registers_changed,
10859 debug_registers_used): New.
10860 (initial_stuff): Rename to ...
10861 (i386_initial_stuff): ... this. Clear debug registers
10862 state variables.
10863 (store_debug_registers): Delete.
10864 (i386_get_thread_context): New.
10865 (load_debug_registers): Delete.
10866 (i386_set_thread_context): New.
10867 (i386_thread_added): New.
10868 (single_step): Rename to ...
10869 (i386_single_step): ... this.
10870 (do_fetch_inferior_registers): Rename to ...
10871 (i386_fetch_inferior_register): ... this.
10872 (i386_store_inferior_register): New.
10873 (the_low_target): Adapt to new interface.
10874
10875 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10876 (arm_get_thread_context): New.
10877 (arm_set_thread_context): New.
10878 (regptr): New.
10879 (do_fetch_inferior_registers): Rename to ...
10880 (arm_fetch_inferior_register): ... this.
10881 (arm_store_inferior_register): New.
10882 (arm_wince_breakpoint): Reimplement as unsigned long.
10883 (arm_wince_breakpoint_len): Define.
10884 (the_low_target): Adapt to new interface.
10885
10886 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10887 load_debug_registers. Add get_thread_context, set_thread_context,
10888 thread_added and store_inferior_register. Rename
10889 fetch_inferior_registers to fetch_inferior_register.
10890 (regptr): Remove declaration.
10891
dd6953e1
PA
108922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10893
10894 * linux-low.c (linux_detach): Change return type to int. Return 0.
10895 * spu-low.c (spu_detach): Likewise.
10896
444d6139
PA
108972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10898
10899 * target.h (target_ops): Change return type of detach to int.
10900 Add join.
10901 (join_inferior): New.
10902 * server.c (main): Don't skip detach support on mingw32.
10903 If the inferior doesn't support detaching return error.
10904 Call join_inferior instead of using waitpid.
10905 * linux-low.c (linux_join): New.
10906 (linux_target_op): Add linux_join.
10907 * spu-low.c (spu_join): New.
10908 (spu_target_ops): Add spu_join.
10909 * win32-low.c (win32_detach): Adapt to new interface.
10910 Reopen current_process_handle before detaching. Issue a child
10911 resume before detaching.
10912 (win32_join): New.
10913 (win32_target_op): Add win32_join.
10914
1d5315fe
PA
109152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10916
10917 * win32-low.c (win32-attach): Fix return value.
10918 * target.h (target_ops): Describe ATTACH return values.
10919
bf914831
PA
109202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10921
10922 * win32-low.c (GETPROCADDRESS): Define.
10923 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10924 (winapi_DebugSetProcessKillOnExit): Likewise.
10925 (win32_create_inferior): Force usage of ansi CreateProcessA.
10926 (win32_attach): Use GETPROCADDRESS.
10927 (win32_detach): Likewise.
10928
f72f3e60
PA
109292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10930
10931 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10932
ed50f18f
PA
109332007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10934
10935 * win32-low.c: Commit leftover changes from 2007-03-29.
10936
0c2ead7e
DJ
109372007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10938
10939 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10940 fields short instead of int. Add explicit padding.
10941 (i387_cache_to_fsave): Remove unnecessary casts.
10942 (i387_fsave_to_cache): Doc fix.
10943 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10944
73725ff3
DJ
109452007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10946
10947 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10948 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10949
d99f33d8
PA
109502007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10951
10952 * configure.srv (arm*-*-mingw32ce*): Move near the other
10953 arm targets.
10954
68070c10
PA
109552007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10956
2482afc6 10957 * configure.ac: Add errno checking.
68070c10
PA
10958 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10959 sys/file.h and malloc.h.
10960 (AC_CHECK_DECLS): Add perror.
10961 (srv_mingwce): Handle.
2482afc6 10962 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10963 win32-i386-low.o to srv_tgtobj.
10964 (i[34567]86-*-mingw*): Likewise.
10965 (arm*-*-mingw32ce*): Add case.
10966 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10967 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10968 [__MINGW32CE__] (strerror): New function.
10969 [__MINGW32CE__] (errno): Define to GetLastError.
10970 [__MINGW32CE__] (COUNTOF): New macro.
10971 (remote_open): Remove extra close call.
10972 * mem-break.c (delete_breakpoint_at): New function.
10973 * mem-break.h (delete_breakpoint_at): Declare.
10974 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10975 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10976 [USE_WIN32API] (read, write): Add char* casts.
10977 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10978 * server.h: Include wincecompat.h on Windows CE.
10979 [HAVE_ERRNO_H]: Check.
10980 (perror): Declare if not declared.
10981 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10982 (perror_with_name): Remove errno declaration.
10983 * wincecompat.h: New.
10984 * wincecompat.c: New.
10985 * win32-low.h: New.
10986 * win32-arm-low.c: New.
10987 * win32-i386-low.c: New.
10988 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10989 (OUTMSG2): Make it safe.
10990 (_T): New macro.
10991 (COUNTOF): New macro.
10992 (NUM_REGS): Get it from the low target.
10993 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10994 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10995 (thread_rec): Let low target handle debug registers.
10996 (child_add_thread): Likewise.
10997 (child_init_thread_list): Likewise.
10998 (continue_one_thread): Likewise.
10999 (regptr): New.
11000 (do_child_fetch_inferior_registers): Move to ...
11001 * win32-i386-low.c: ... here, and rename to ...
11002 (do_fetch_inferior_registers): ... this.
889bf7c5 11003 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11004 Go through the low target.
11005 (do_child_store_inferior_registers): Use regptr.
11006 (strwinerror): New function.
11007 (win32_create_inferior): Handle Windows CE.
11008 Use strwinerror instead of strerror on Windows error
11009 codes. Add program to the error output.
11010 Don't close the main thread handle on Windows CE.
11011 (win32_attach): Use coredll.dll on Windows CE.
11012 (win32_kill): Close current process and current
11013 thread handles.
11014 (win32_detach): Use coredll.dll on Windows CE.
11015 (win32_resume): Let low target handle debug registers, and
11016 step request.
11017 (handle_exception): Add/Remove initial breakpoint. Avoid
11018 non-existant WSTOPSIG on Windows CE.
11019 (win32_read_inferior_memory): Cast to remove warning.
11020 (win32_arch_string): Go through the low target.
11021 (initialize_low): Call set_breakpoint_data with the low
11022 target's breakpoint.
11023 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11024 FOP_REGNUM, mappings): Move to ...
11025 * win32-i386-low.c: ... here.
11026 * win32-low.c (win32_thread_info): Move to ...
11027 * win32-low.h: ... here.
11028 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11029 win32-arm-low.c and wincecompat.c.
11030 (all:): Add $EXEEXT.
11031 (install-only:): Likewise.
11032 (gdbserver:): Likewise.
11033 (gdbreplay:): Likewise.
11034 * config.in: Regenerate.
11035 * configure: Regenerate.
11036
41093d81
PA
110372007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11038
11039 * win32-low.c: Rename typedef thread_info to
11040 win32_thread_info throughout.
11041
544afa54
PA
110422007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11043
11044 * win32-i386-low.c: Rename to ...
11045 * win32-low.c: ... this.
11046 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11047 * Makefile.in: Likewise.
11048
bce7165d
PA
110492007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11050
11051 * remote-utils.c (monitor_output): Constify msg parameter.
11052 * server.h (monitor_output): Likewise.
11053 * win32-i386-low.c (handle_output_debug_string): New.
11054 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11055 handle_output_debug_string.
11056 (get_child_debug_event): Likewise.
11057
506c7aa0
DJ
110582007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11059
11060 * server.c (main): Correct strtoul check.
11061
42c81e2a
DJ
110622007-03-27 Jon Ringle <jon@ringle.org>
11063
11064 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11065
9453113a
DJ
110662007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11067
11068 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11069
64a69107
DJ
110702007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11071
11072 * terminal.h: Check HAVE_SGTTY_H.
11073
110742007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11075
11076 * remote-utils.c (remote_open): Print out the assigned port number.
11077
c74d0ad8
DJ
110782007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11079
11080 * remote-utils.c (monitor_output): New function.
11081 * server.c (debug_threads): Define here.
11082 (monitor_show_help): New function.
11083 (handle_query): Handle qRcmd.
11084 (main): Do not handle 'd' packet.
11085 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11086 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11087 of debug_threads.
11088
de7c3b4a
PA
110892007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11090
11091 * Makefile.in (EXEEXT): New.
11092 (clean): Use $(EXEEXT).
11093
ef57601b
PA
110942007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11095
11096 * target.h (target_ops): Rename send_signal to request_interrupt,
11097 and remove enum target_signal parameter.
11098 * linux-low.c (linux_request_interrupt): Rename from
11099 linux_send_signal, and always send SIGINT.
11100 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11101 and always send SIGINT.
11102 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11103 of send_signal.
11104 (input_interrupt): Likewise.
11105
820f2bda
PA
111062007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11107
11108 * server.c (get_features_xml): Check if target implemented
11109 arch_string.
11110 * win32-i386-low.c (win32_arch_string): New.
11111 (win32_target_ops): Add win32_arch_string as arch_string member.
11112
ab39bf24
UW
111132007-02-22 Markus Deuling <deuling@de.ibm.com>
11114
11115 * spu-low.c (spu_arch_string): New.
11116 (spu_target_ops): Add spu_arch_string.
11117
61ff6e04
DJ
111182007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11119
11120 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11121 * configure.ac: Do not check for terminal.h.
11122 * configure, config.in: Regenerated.
11123
fb1e4ffc
DJ
111242007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11125
11126 * Makefile.in (OBS): Add $(XML_BUILTIN).
11127 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11128 (clean): Update.
11129 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11130 (arm-with-iwmmxt.c): New.
11131 * config.in, configure: Regenerate.
11132 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11133 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11134 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11135 (arm*-*-linux*): Add iWMMXt and regset support.
11136 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11137 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11138 (arm_store_wmmxregset, target_regsets): New.
11139 * server.c (get_features_xml): Take annex argument. Check builtin
11140 XML documents.
11141 (handle_query): Handle multiple annexes.
11142
0f48aa01
DJ
111432007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11144
11145 * remote-utils.c [USE_WIN32API] (read, write): Define.
11146 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11147 write.
11148
23181151
DJ
111492007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11150
11151 * linux-i386-low.c (the_low_target): Set arch_string.
11152 * linux-x86-64-low.c (the_low_target): Likewise.
11153 * linux-low.c (linux_arch_string): New.
11154 (linux_target_ops): Add it.
11155 * linux-low.h (struct linux_target_ops): Add arch_string.
11156 * server.c (write_qxfer_response): Use const void * for DATA.
11157 (get_features_xml): New.
11158 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11159 * target.h (struct target_ops): Add arch_string method.
11160
9d606399
DJ
111612007-01-03 Denis Pilat <denis.pilat@st.com>
11162 Daniel Jacobowitz <dan@codesourcery.com>
11163
11164 * linux-low.c (linux_kill): Handle being called with no threads.
11165 * win32-i386-low.c (win32_kill): Likewise.
11166 (get_child_debug_event): Clear current_process_handle.
11167
111682006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11169 Daniel Jacobowitz <dan@codesourcery.com>
11170
11171 * remote-utils.c (remote_open): Check the type of specified
11172 serial port devices before opening them.
11173 * server.c (main): Kill the inferior if an error occurs during
11174 the first remote_open.
11175
a5e13d24
DJ
111762006-12-05 Markus Deuling <deuling@de.ibm.com>
11177
11178 * README: Update supported targets.
11179
186947f7
DJ
111802006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11181
11182 * Makefile.in (clean): Remove reg-mips64.c.
11183 (reg-mips64.c, reg-mips64.o): New rules.
11184 * configure.srv: Handle mips64. Include regset support for mips.
11185 * linux-mips-low.c (union mips_register): New.
11186 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11187 (mips_breakpoint, mips_breakpoint_at): Use int.
11188 (mips_collect_register, mips_supply_register)
11189 (mips_collect_register_32bit, mips_supply_register_32bit)
11190 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11191 (mips_store_fpregset, target_regsets): New.
11192 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11193
a13e2c95
UW
111942006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11195
11196 * configure.srv: Add target "spu*-*-*".
11197 * Makefile.in (clean): Remove reg-spu.c.
11198 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11199 * spu-low.c: New file.
11200
cb7283db
DJ
112012006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11202
11203 * configure.ac: Correct td_thr_tls_get_addr test.
11204 * configure: Regenerated.
11205
89be2091
DJ
112062006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11207
11208 * linux-low.c (linux_wait_for_event): Reformat. Use the
11209 pass_signals array.
11210 * remote-utils.c (decode_address_to_semicolon): New.
11211 * server.c (pass_signals, handle_general_set): New.
11212 (handle_query): Mention QPassSignals for qSupported.
11213 (main): Call handle_general_set.
11214 * server.h (pass_signals, decode_address_to_semicolon): New.
11215
000ef4f0
DJ
112162006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11217
11218 * server.c (handle_query): Correct error handling for read_auxv.
11219
b7149293
UW
112202005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11221
11222 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11223 and srv_linux_thread_db to yes.
11224 * linux-s390-low.c (s390_fill_gregset): New function.
11225 (target_regsets): Define data structure.
11226
dae5f5cf
DJ
112272006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11228
11229 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11230 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11231 * config.in, configure: Regenerated.
11232 * inferiors.c (gdb_id_to_thread): New function.
11233 (gdb_id_to_thread_id): Use it.
11234 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11235 * linux-low.h (struct process_info): Add th member.
11236 (thread_db_get_tls_address): New prototype.
11237 * remote-utils.c (decode_address): Make non-static.
11238 * server.c (handle_query): Handle qGetTLSAddr.
11239 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11240 * target.h (struct target_ops): Add get_tls_address.
11241 * thread-db.c (maybe_attach_thread): Save the thread handle.
11242 (thread_db_get_tls_address): New.
11243
32ca6d61
DJ
112442006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11245
11246 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11247 (linux_resume_one_process): Take a siginfo_t *. Update all
11248 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11249 (struct pending_signals): Add a siginfo_t.
11250 (linux_wait_for_process): Always set last_status.
11251 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11252 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11253 * linux-low.h (struct process_info): Add last_status.
11254
5ffff7c1
DJ
112552006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11256
11257 * remote-utils.c (try_rle): New function.
11258 (putpkt_binary): Use it.
11259
8695c747
DJ
112602006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11261
11262 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11263 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11264 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11265 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11266 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11267 point registers.
11268
290fadea
RS
112692006-08-08 Richard Sandiford <richard@codesourcery.com>
11270
11271 * server.c (terminal_fd): New variable.
11272 (old_foreground_pgrp): Likewise.
11273 (restore_old_foreground_pgrp): New function.
11274 (start_inferior): Record the terminal file descriptor in terminal_fd
11275 and its original foreground group in old_foreground_pgrp. Register
11276 restore_old_foreground_pgrp with atexit().
11277
9f2e1e63
DJ
112782006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11279
11280 * server.c (handle_query): Correct qPart to qXfer.
11281
b80864fb
DJ
112822006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11283
11284 * configure.ac: Check for more headers which are missing on
11285 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11286 * configure.srv: Add Cygwin and mingw32.
11287 * remote-utils.c: Don't include headers unconditionally which
11288 are missing on mingw32. Include <winsock.h> for mingw32.
11289 (remote_open): Adjust for mingw32 support. Flush
11290 standard error after writing to it.
11291 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11292 (unblock_async_io, enable_async_io, disable_async_io)
11293 (readchar, getpkt): Update for Winsock support.
11294 (prepare_resume_reply): Expect a protocol signal number.
11295 * server.c: Disable <sys/wait.h> on mingw32.
11296 (start_inferior): Adjust for mingw32 support. Flush
11297 standard error after writing to it.
11298 (attach_inferior): Likewise. Use protocol signal
11299 numbers.
11300 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11301 and names.
11302 * win32-i386-low.c: New file.
11303 * Makefile.in (XM_CLIBS): Set.
11304 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11305 (win32-i386-low.o): New dependency rule.
11306 * linux-low.c (linux_wait): Use target signal numbers.
11307 * target.h (struct target_ops): Doc fix.
11308 * server.h (target_signal_to_name): New prototype.
11309 * gdbreplay.c: Don't include headers unconditionally which
11310 are missing on mingw32. Include <winsock.h> for mingw32.
11311 (remote_close, remote_open): Adjust for Winsock support.
11312 * configure, config.in: Regenerated.
11313
0876f84a
DJ
113142006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11315
11316 * server.c (decode_xfer_read, write_qxfer_response): New.
11317 (handle_query): Take a packet length argument. Handle
11318 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11319 the qSupported response.
11320 (main): Update call to handle_query.
11321
01f9e8fa
DJ
113222006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11323
11324 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11325 (putpkt_binary): Renamed from putpkt and adjusted for binary
11326 data.
11327 (putpkt): New wrapper for putpkt_binary.
11328 (readchar): Don't mask off the high bit.
11329 (decode_X_packet): New function.
11330 * server.c (main): Call putpkt_binary if a handler sets the packet
11331 length. Save the length of the incoming packet. Handle 'X'.
11332 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11333
be2a5f71
DJ
113342006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11335
11336 * server.c (handle_query): Handle qSupported.
11337
ea025f5f
DJ
113382006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11339
11340 * remote-utils.c (all_symbols_looked_up): New variable.
11341 (look_up_one_symbol): Check it.
11342 * server.h (look_up_one_symbol): New declaration.
11343 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11344
9308fc88
DJ
113452006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11346
11347 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11348 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11349 (PTRACE_GET_THREAD_AREA): Define.
11350 (ps_get_thread_area): New function.
11351
52fb6437
NS
113522006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11353
11354 * configure.srv (m68k*-*-uclinux*): New target.
11355 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11356 (linux_resume_one_process): Remove extraneous cast.
11357 (linux_read_offsets): New.
11358 (linux_target_op): Add linux_read_offsets on mmuless systems.
11359 * server.c (handle_query): Add qOffsets logic.
11360 * target.h (struct target_ops): Add read_offsets.
11361
21b0f40c
DJ
113622006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11363
11364 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11365 (PTRACE_GET_THREAD_AREA): Define.
11366 (ps_get_thread_area): New function.
11367 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11368 (linux-x86-64-low.o): Update.
11369
0050a760
DJ
113702006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11371
11372 * configure.ac: Remove checks for prfpregset_t.
11373 * gdb_proc_service.h: New file.
11374 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11375 new "gdb_proc_service.h".
11376 * proc-service.c: Likewise.
11377 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11378 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11379 * Makefile.in (gdb_proc_service_h): Updated.
11380 * configure, config.in: Regenerated.
11381
b92a518e
DJ
113822006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11383
11384 * remote-utils.c (prepare_resume_reply): Move declaration
11385 of gdb_id_from_wait to the top of the block.
11386
545587ee
DJ
113872006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11388
11389 * linux-low.c (regsets_store_inferior_registers): Read the regset
11390 from the target before filling it.
11391
9db87ebd
DJ
113922006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11393
11394 * server.c (attach_inferior): Return SIGTRAP for a successful
11395 attach.
11396
dd24457d
DJ
113972006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11398
11399 * Makefile.in (OBS): Add version.o.
11400 (STAGESTUFF): Delete.
11401 (version.o): Add dependencies.
11402 (version.c): Replace rule.
11403 (clean): Remove version.c.
11404 * server.c (gdbserver_version): New.
11405 (gdbserver_usage): Use printf.
11406 (main): Handle --version and --help.
11407 * server.h (version, host_name): Add declarations.
11408
6f0f660e
EZ
114092005-12-23 Eli Zaretskii <eliz@gnu.org>
11410
889bf7c5
PA
11411 * linux-arm-low.c:
11412 * linux-arm-low.c:
11413 * inferiors.c:
11414 * i387-fp.h:
11415 * i387-fp.c:
11416 * gdbreplay.c:
11417 * regcache.c:
11418 * proc-service.c:
11419 * mem-break.h:
11420 * mem-break.c:
11421 * linux-x86-64-low.c:
11422 * linux-sh-low.c:
11423 * linux-s390-low.c:
11424 * linux-ppc64-low.c:
11425 * linux-ppc-low.c:
11426 * linux-mips-low.c:
11427 * linux-m68k-low.c:
11428 * linux-m32r-low.c:
11429 * linux-low.h:
11430 * linux-low.c:
11431 * linux-ia64-low.c:
11432 * linux-i386-low.c:
11433 * linux-crisv32-low.c:
11434 * thread-db.c:
11435 * terminal.h:
11436 * target.h:
11437 * target.c:
11438 * server.h:
11439 * server.c:
11440 * remote-utils.c:
11441 * regcache.h:
11442 * utils.c:
11443 * Makefile.in:
11444 * configure.ac:
6f0f660e
EZ
11445 * gdbserver.1: Add (C) after Copyright. Update the FSF
11446 address.
11447
9d1fb177
DJ
114482005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11449
11450 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11451 (arm_breakpoint_at): Recognize both breakpoints.
11452 (the_low_target): Use the correct breakpoint instruction.
11453
011a70c2
DJ
114542005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11455
11456 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11457 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11458 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11459 (the_low_target): Update.
11460
7fb85e41
AS
114612005-10-25 Andreas Schwab <schwab@suse.de>
11462
11463 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11464
11465 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11466 (ia64_num_regs): Reduce to 462.
11467
3db0444b
DJ
114682005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11469
11470 * acinclude.m4: Correct quoting.
11471 * aclocal.m4: Regenerated.
11472
11473 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11474 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11475 (thread_db_init): Call thread_db_err_str.
11476 * configure.ac: Check for TD_VERSION.
11477 * config.in, configure: Regenerated.
11478
bee0189a
DJ
114792005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11480
11481 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11482
e9d25b98
DJ
114832005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11484
11485 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11486 is not available. Define HAVE_PTRACE_GETREGS if it is.
11487 * config.in, configure: Regenerated.
11488 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11489 * linux-i386-low.c, linux-m68k-low.c: Update to use
11490 HAVE_PTRACE_GETREGS.
11491 * linux-low.c (regsets_fetch_inferior_registers)
11492 (regsets_store_inferior_registers): Only return 0 if we processed
11493 GENERAL_REGS.
11494 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11495 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11496
a06660f7
DJ
114972005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11498
11499 * inferiors.c (struct thread_info): Add gdb_id.
11500 (add_thread): Add gdb_id argument.
11501 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11502 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11503 calls to add_thread.
11504 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11505 * server.c (handle_query): Use thread_to_gdb_id.
11506 (handle_v_cont, main): Use gdb_id_to_thread_id.
11507 * server.h (add_thread): Update prototype.
11508 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11509 prototypes.
11510
5a1f5858
DJ
115112005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11512
11513 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11514 left-padded registers.
11515 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11516 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11517
e122f1f5
SE
115182005-07-01 Steve Ellcey <sje@cup.hp.com>
11519
11520 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11521 * configure: Regenerate.
11522 * config.in: Regenerate.
11523 * server.h (NEED_DECLARATION_STRERROR):
11524 Replace with !HAVE_DECL_STRERROR.
11525
d592fa2f
DJ
115262005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11527
11528 * linux-low.c (linux_wait, linux_send_signal): Don't test
11529 an unsigned long variable for > 0 if it could be MAX_ULONG.
11530 * server.c (myresume): Likewise.
11531 * target.c (set_desired_inferior): Likewise.
11532
ccbd4912
MK
115332005-06-13 Mark Kettenis <kettenis@gnu.org>
11534
11535 * configure.ac: Simplify and improve check for socklen_t.
11536 * configure, config.in: Regenerate.
11537
f450004a
DJ
115382005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11539
11540 * acconfig.h: Remove.
11541 * configure.ac: Add a test for socklen_t. Use three-argument
11542 AC_DEFINE throughout.
11543 * config.in: Regenerated using autoheader 2.59.
11544 * configure: Regenerated.
11545
11546 * gdbreplay.c (socklen_t): Provide a default.
11547 (remote_open): Use socklen_t.
11548 * remote-utils.c (socklen_t): Provide a default.
11549 (remote_open): Use socklen_t.
11550 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11551 unsigned char.
11552
11553 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11554 char for buffers.
11555 * linux-low.c (linux_read_memory, linux_write_memory)
11556 (linux_read_auxv): Likewise.
11557 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11558 (check_mem_write): Likewise.
11559 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11560 Likewise.
11561 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11562 (registers_from_string, register_data): Likewise.
11563 * server.c (handle_query, main): Likewise.
11564 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11565 (decode_M_packet): Likewise.
11566 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11567 * target.h (struct target_ops): Update read_memory, write_memory,
11568 and read_auxv.
11569 (read_inferior_memory, write_inferior_memory): Update.
11570 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11571 to unsigned char *.
11572 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11573 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11574 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11575 linux-s390-low.c, linux-sh-low.c: Update for changes in
11576 read_inferior_memory and the_low_target->breakpoint.
11577
eee84df1
DJ
115782005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11579
11580 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11581 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11582 * configure.srv: Add powerpc64-*-linux*.
11583 * linux-ppc64-low.c: New file.
11584
45b134e5
OF
115852005-05-23 Orjan Friberg <orjanf@axis.com>
11586
11587 * linux-cris-low.c: New file with support for CRIS.
11588 * linux-crisv32-low.c: Ditto for CRISv32.
11589 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11590 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11591 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11592 reg-crisv32.o, and reg-crisv32.c to make rules.
11593 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11594 recognized targets.
11595
48d93c75
UW
115962005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11597
11598 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11599 of sizeof (PTRACE_XFER_TYPE).
11600 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11601
e013ee27
OF
116022005-05-12 Orjan Friberg <orjanf@axis.com>
11603
889bf7c5 11604 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11605 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11606 pointers for hardware watchpoint support.
11607 * linux-low.h (struct linux_target_ops): Ditto.
11608 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11609 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11610 to linux_target_ops.
11611 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11612 reply packet.
11613 * server.c (main): Recognize 'Z' and 'z' packets.
11614
b0ded00b
UW
116152005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11616
11617 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11618 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11619 (the_low_target): Add new members.
11620
8643e2ad
DJ
116212005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11622
11623 * proc-service.c (ps_lgetregs): Search all_processes instead of
11624 all_threads.
11625
fc620387
DJ
116262005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11627
11628 * server.c (start_inferior): Change return type to int.
11629 (attach_inferior): Change sigptr to int *.
11630 (handle_v_cont, handle_v_requests): Change signal to int *.
11631 (main): Change signal to int.
11632
116332005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11634
11635 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11636 * configure.srv: Add m32r*-*-linux*.
11637 * linux-m32r-low.c: New file.
11638
e0e76420
DJ
116392005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11640
11641 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11642
a1928bad
DJ
116432005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11644
11645 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11646 Take unsigned long arguments for PIDs.
11647 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11648 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11649 (wait_for_sigstop, linux_resume_one_process)
11650 (regsets_fetch_inferior_registers, linux_send_signal)
11651 (linux_read_auxv): Likewise. Update the types of variables holding
11652 PIDs. Update format string specifiers.
11653 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11654 * remote-utils.c (prepare_resume_reply): Likewise.
11655 * server.c (cont_thread, general_thread, step_thread)
11656 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11657 unsigned long.
11658 (handle_query): Update format specifiers.
11659 (handle_v_cont, main): Use strtoul for thread IDs.
11660 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11661 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11662 (general_thread, step_thread, thread_from_wait)
11663 (old_thread_from_wait): Update.
11664 * target.h (struct thread_resume): Use unsigned long for THREAD.
11665 (struct target_ops): Use unsigned long for arguments to attach and
11666 thread_alive.
11667
dcdb98d2
DJ
116682005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11669
11670 * acinclude.m4: Include bfd/bfd.m4 directly.
11671 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11672 <agriffis@toolchain.org>.
11673 * aclocal.m4, configure: Regenerated.
11674
bec39cab
AC
116752005-01-07 Andrew Cagney <cagney@gnu.org>
11676
11677 * configure.ac: Rename configure.in, require autoconf 2.59.
11678 * configure: Re-generate.
11679
434c4c77
DJ
116802004-12-08 Daniel Jacobowitz <dan@debian.org>
11681
11682 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11683 LIBS when finished.
11684 * aclocal.m4: Regenerated.
11685 * configure: Regenerated.
11686
db1d3e1b
AS
116872004-11-21 Andreas Schwab <schwab@suse.de>
11688
11689 * linux-m68k-low.c (m68k_num_gregs): Define.
11690 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11691 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11692 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11693 (m68k_breakpoint_at): New. Add to the_low_target.
11694
11695 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11696 srv_linux_thread_db to yes.
11697
43360365
JB
116982004-10-20 Joel Brobecker <brobecker@gnat.com>
11699
11700 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11701 (ARCH_SET_FS): Likewise.
11702 (ARCH_GET_FS): Likewise.
11703 (ARCH_GET_GS): Likewise.
11704
fd500816
DJ
117052004-10-16 Daniel Jacobowitz <dan@debian.org>
11706
11707 * linux-i386-low.c (ps_get_thread_area): New.
11708 * linux-x86-64-low.c (ps_get_thread_area): New.
11709 * linux-low.c: Include <sys/syscall.h>.
11710 (linux_kill_one_process): Don't kill the first thread here.
11711 (linux_kill): Kill the first thread here.
11712 (kill_lwp): New function.
11713 (send_sigstop, linux_send_signal): Use it.
11714 * proc-service.c: Clean up #ifdefs.
11715 (fpregset_info): Delete.
11716 (ps_lgetregs): Update and enable implementation.
11717 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11718 implementations.
11719 * remote-utils.c (struct sym_cache, symbol_cache): New.
11720 (input_interrupt): Print a clearer message.
11721 (async_io_enabled): New variable.
11722 (enable_async_io, disable_async_io): Use it. Update comments.
11723 (look_up_one_symbol): Use the symbol cache.
11724 * thread-db.c (thread_db_look_up_symbols): New function.
11725 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11726
f6de3c42
DJ
117272004-10-16 Daniel Jacobowitz <dan@debian.org>
11728
11729 * configure.in: Test for -rdynamic.
11730 * configure: Regenerated.
11731 * Makefile (INTERNAL_LDFLAGS): New.
11732 (gdbserver, gdbreplay): Use it.
11733
2c0fc042
AC
117342004-09-02 Andrew Cagney <cagney@gnu.org>
11735
11736 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11737
075b3282
DJ
117382004-03-23 Daniel Jacobowitz <drow@mvista.com>
11739
11740 * linux-low.c (linux_wait): Clear all_processes list also.
11741
fa6a77dc
DJ
117422004-03-12 Daniel Jacobowitz <drow@mvista.com>
11743
11744 * linux-low.c: Include <errno.h>. Remove extern declaration of
11745 errno.
11746
6d782a97
DJ
117472004-03-12 Daniel Jacobowitz <drow@mvista.com>
11748
11749 * gdbreplay.c, server.h, utils.c: Update copyright years.
11750
3a7fb99b
DJ
117512004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11752
11753 * server.c (main): Print child status or termination signal from
11754 variable 'signal', not 'sig'.
11755
c3e735a6
DJ
117562004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11757
11758 * linux-low.c (linux_read_memory): Change return type to
11759 int. Check for and return error from ptrace().
11760 * target.c (read_inferior_memory): Change return type to int. Pass
11761 back return status from the_target->read_memory().
11762 * target.h (struct target_ops): Adapt *read_memory() prototype.
11763 Update comment.
11764 (read_inferior_memory): Adapt prototype.
11765 * server.c (main): Return an error packet if
11766 read_inferior_memory() returns an error.
11767
a59d1c82
DJ
117682004-03-04 Daniel Jacobowitz <drow@mvista.com>
11769
11770 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11771 Unify with other clean targets.
11772
dc3f8883
DJ
117732004-02-29 Daniel Jacobowitz <drow@mvista.com>
11774
11775 * server.c (handle_v_cont): Call set_desired_inferior.
11776
89a208da
DJ
117772004-02-29 Daniel Jacobowitz <drow@mvista.com>
11778
11779 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11780
62ea82f5
DJ
117812004-02-29 Daniel Jacobowitz <drow@mvista.com>
11782
11783 * linux-low.c (linux_wait): Unblock async I/O.
11784 (linux_resume): Block and enable async I/O.
11785 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11786 * server.h (block_async_io, unblock_async_io): Add prototypes.
11787
6910d122
DJ
117882004-02-29 Daniel Jacobowitz <drow@mvista.com>
11789
11790 * remote-utils.c (remote_open): Print a status notice after
11791 opening a TCP port.
11792 * server.c (attach_inferior): Print a status notice after
11793 attaching.
11794
117952004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
11796
11797 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11798
c89dc5d4
DJ
117992004-02-26 Daniel Jacobowitz <drow@mvista.com>
11800
11801 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11802 error packet.
11803 * server.c, target.h: Update copyright years.
11804
4b8dad4a
RM
118052004-02-25 Roland McGrath <roland@redhat.com>
11806
11807 * target.h (struct target_ops): New member `read_auxv'.
11808 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11809 * linux-low.c (linux_read_auxv): New function.
11810 (linux_target_ops): Initialize `read_auxv' member to that.
11811
d7446758
JB
118122004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11813
11814 Committed by Jim Blandy <jimb@redhat.com>.
11815
11816 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11817 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11818 instead of GPR_SIZE to distiguish s390 and s390x targets.
11819
5544ad89
DJ
118202004-01-31 Daniel Jacobowitz <drow@mvista.com>
11821
11822 * linux-low.c: Update copyright year.
11823 (check_removed_breakpoint): Clear pending_is_breakpoint.
11824 (linux_set_resume_request, linux_queue_one_thread)
11825 (resume_status_pending_p): New functions.
11826 (linux_continue_one_thread): Use process->resume.
11827 (linux_resume): Only resume threads if there are no pending events.
11828 * linux-low.h (struct process_info): Add resume request
11829 pointer.
11830
2a68b70e
DJ
118312004-01-30 Daniel Jacobowitz <drow@mvista.com>
11832
11833 * regcache.c (new_register_cache): Clear the allocated register
11834 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11835
64386c31
DJ
118362003-10-13 Daniel Jacobowitz <drow@mvista.com>
11837
11838 * linux-low.c (linux_resume): Take a struct thread_resume *
11839 argument.
11840 (linux_wait): Update call.
11841 (resume_ptr): New static variable.
11842 (linux_continue_one_thread): Renamed from
11843 linux_continue_one_process. Use resume_ptr.
11844 (linux_resume): Use linux_continue_one_thread.
11845 * server.c (handle_v_cont, handle_v_requests): New functions.
11846 (myresume): New function.
11847 (main): Handle 'v' case.
11848 * target.h (struct thread_resume): New type.
11849 (struct target_ops): Change argument of "resume" to struct
11850 thread_resume *.
11851 (myresume): Delete macro.
11852
c938e9b0
L
118532003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11854
11855 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11856 (uninstall): Support DESTDIR.
11857
7f313d07
BC
11858Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11859
11860 * configure.srv: Add xscale*linux copy of arm*linux entry.
11861
3b2fc2ea
DJ
118622003-07-24 Daniel Jacobowitz <drow@mvista.com>
11863
11864 * linux-arm-low.c (arm_reinsert_addr): New function.
11865 (the_low_target): Add arm_reinsert_addr.
11866
1c0a559e
MK
118672003-07-08 Mark Kettenis <kettenis@gnu.org>
11868
11869 * mem-break.c: Remove whitespace at end of file.
11870
43d5792c
DJ
118712003-06-28 Daniel Jacobowitz <drow@mvista.com>
11872
11873 * configure.in: Check whether we need to prototype strerror.
11874 * server.h: Optionally prototype strerror.
11875 * gdbreplay.c (perror_with_name): Use strerror.
11876 * linux-low.c (linux_attach_lwp): Use strerror.
11877 * utils.c (perror_with_name): Use strerror.
11878 * config.in, configure: Regenerated.
11879
c8a86edf
DJ
118802003-06-28 Daniel Jacobowitz <drow@mvista.com>
11881
11882 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11883 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11884
73d37363
DJ
118852003-06-20 Daniel Jacobowitz <drow@mvista.com>
11886
11887 * Makefile.in (SFILES): Update.
11888 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11889 low-sun3.c: Remove files.
11890
6ad8ae5c
DJ
118912003-06-17 Daniel Jacobowitz <drow@mvista.com>
11892
11893 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11894 (linux_detach_one_process, linux_detach): New functions.
11895 (linux_target_ops): Add linux_detach.
11896 * server.c (main): Handle 'D' packet.
11897 * target.h (struct target_ops): Add "detach" member.
11898 (detach_inferior): Define.
11899
1581182a
MK
119002003-06-13 Mark Kettenis <kettenis@gnu.org>
11901
11902 From Kelley Cook <kelleycook@wideopenwest.com>:
11903 * configure.srv: Accept i[34567]86 variants.
11904
e5379b03
DJ
119052003-06-05 Daniel Jacobowitz <drow@mvista.com>
11906
11907 * linux-low.c (linux_wait_for_event): Correct comment typos.
11908 (linux_resume_one_process): Call check_removed_breakpoint.
11909 (linux_send_signal): New function.
11910 (linux_target_ops): Add linux_send_signal.
11911 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11912 of kill.
11913 * target.h (struct target_ops): Add send_signal.
11914
2ff29de4
JB
119152003-05-29 Jim Blandy <jimb@redhat.com>
11916
11917 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11918 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11919 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11920 away part of the register's value.
11921
254787d4
DJ
119222003-03-26 Daniel Jacobowitz <drow@mvista.com>
11923
11924 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11925 (linux_wait_for_event, linux_init_signals): Likewise.
11926
94e10508
DJ
119272003-03-17 Daniel Jacobowitz <drow@mvista.com>
11928
11929 * configure.in: Check for stdlib.h.
11930 * configure: Regenerated.
11931 * config.in: Regenerated.
11932
4c0711e0
DJ
119332003-01-04 Andreas Schwab <schwab@suse.de>
11934
11935 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11936
ef66e766
AC
119372003-01-02 Andrew Cagney <ac131313@redhat.com>
11938
11939 * Makefile.in: Remove obsolete code.
11940
a1358604
DJ
119412002-11-20 Daniel Jacobowitz <drow@mvista.com>
11942
11943 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11944 defined(PT_FPR0_HI).
11945
23ce3b1c
DJ
119462002-11-17 Stuart Hughes <seh@zee2.com>
11947
11948 * linux-arm-low.c (arm_num_regs): Increase.
11949 (arm_regmap): Include status register.
11950
119512002-11-17 Daniel Jacobowitz <drow@mvista.com>
11952
11953 * linux-low.c (register_addr): Remove incorrect -1 check.
11954
a9fa9f7d
DJ
119552002-08-29 Daniel Jacobowitz <drow@mvista.com>
11956
11957 * linux-low.c (linux_create_inferior): Call setpgid. Return
11958 the new PID.
11959 (unstopped_p, linux_signal_pid): Remove.
11960 (linux_target_ops): Remove linux_signal_pid.
11961 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11962 global instead of target method.
11963 * target.h (struct target_ops): Remove signal_pid. Update comment
11964 for create_inferior.
11965 * server.c (signal_pid): New variable.
11966 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11967 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11968 (attach_inferior): Set signal_pid.
11969
17574093
DJ
119702002-08-23 Daniel Jacobowitz <drow@mvista.com>
11971
11972 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11973
119742002-08-20 Jim Blandy <jimb@redhat.com>
11975
11976 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11977 default for this.
11978
119792002-08-01 Andrew Cagney <cagney@redhat.com>
11980
11981 * Makefile.in: Make chill references obsolete.
11982
119832002-07-24 Kevin Buettner <kevinb@redhat.com>
11984
11985 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11986 * configure: Regenerate.
11987 * config.in: Regenerate.
11988
119892002-07-09 David O'Brien <obrien@FreeBSD.org>
11990
11991 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11992 (perror_with_name, remote_close, remote_open, expect, play): Static.
11993
119942002-07-04 Michal Ludvig <mludvig@suse.cz>
11995
4b8dad4a 11996 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11997 byte offsets instead of an array of indexes.
11998 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11999
120002002-06-13 Daniel Jacobowitz <drow@mvista.com>
12001
12002 * regcache.c: Add comment.
12003
120042002-06-11 Daniel Jacobowitz <drow@mvista.com>
12005
12006 * thread-db.c: New file.
12007 * proc-service.c: New file.
12008 * acinclude.m4: New file.
12009 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12010 proc-service.o, and thread-db.o.
12011 (linux-low.o): Add USE_THREAD_DB.
12012 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12013 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12014 * aclocal.m4: Regenerated.
12015 * config.in: Regenerated.
12016 * configure: Regenerated.
12017 * configure.in: Check for proc_service.h, sys/procfs.h,
12018 thread_db.h, and linux/elf.h headrs.
12019 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12020 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12021 Check for -lthread_db and thread support.
12022 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12023 PowerPC, and SuperH.
12024 * i387-fp.c: Constify arguments.
12025 * i387-fp.h: Likewise.
12026 * inferiors.c: (struct thread_info): Renamed from
12027 `struct inferior_info'. Remove PID member. Use generic inferior
12028 list header. All uses updated.
12029 (inferiors, signal_pid): Removed.
12030 (all_threads): New variable.
12031 (get_thread): Define.
12032 (add_inferior_to_list): New function.
12033 (for_each_inferior): New function.
12034 (change_inferior_id): New function.
12035 (add_inferior): Removed.
12036 (remove_inferior): New function.
12037 (add_thread): New function.
12038 (free_one_thread): New function.
12039 (remove_thread): New function.
12040 (clear_inferiors): Use for_each_inferior and free_one_thread.
12041 (find_inferior): New function.
12042 (find_inferior_id): New function.
12043 (inferior_target_data): Update argument type.
12044 (set_inferior_target_data): Likewise.
12045 (inferior_regcache_data): Likewise.
12046 (set_inferior_regcache_data): Likewise.
12047 * linux-low.c (linux_bp_reinsert): Remove.
12048 (all_processes, stopping_threads, using_thrads)
12049 (struct pending_signals, debug_threads, pid_of): New.
12050 (inferior_pid): Replace with macro.
12051 (struct inferior_linux_data): Remove.
12052 (get_stop_pc, add_process): New functions.
12053 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12054 Use add_process and add_thread.
12055 (linux_attach_lwp): New function, based on old linux_attach. Use
12056 add_process and add_thread. Set stop_expected for new threads.
12057 (linux_attach): New function.
12058 (linux_kill_one_process): New function.
12059 (linux_kill): Kill all LWPs.
12060 (linux_thread_alive): Use find_inferior_id.
12061 (check_removed_breakpoints, status_pending_p): New functions.
12062 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12063 Update. Use WNOHANG. Wait for cloned processes also. Update process
12064 struct for the found process.
12065 (linux_wait_for_event): New function.
12066 (linux_wait): Use it. Support LWPs.
12067 (send_sigstop, wait_for_sigstop, stop_all_processes)
12068 (linux_resume_one_process, linux_continue_one_process): New functions.
12069 (linux_resume): Support LWPs.
12070 (REGISTER_RAW_SIZE): Remove.
12071 (fetch_register): Use register_size instead. Call supply_register.
12072 (usr_store_inferior_registers): Likewise. Call collect_register.
12073 Fix recursive case.
12074 (regsets_fetch_inferior_registers): Improve error message.
12075 (regsets_store_inferior_registers): Add debugging.
12076 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12077 (unstopped_p, linux_signal_pid): New functions.
12078 (linux_target_ops): Add linux_signal_pid.
12079 (linux_init_signals): New function.
12080 (initialize_low): Call it. Initialize using_threads.
12081 * regcache.c (inferior_regcache_data): Add valid
12082 flag.
12083 (get_regcache): Fetch registers lazily. Add fetch argument
12084 and update all callers.
12085 (regcache_invalidate_one, regcache_invalidate): New
12086 functions.
12087 (new_register_cache): Renamed from create_register_cache.
12088 Return the new regcache.
12089 (free_register_cache): Change argument to a void *.
12090 (registers_to_string, registers_from_string): Call get_regcache
12091 with fetch flag set.
12092 (register_data): Make static. Pass fetch flag to get_regcache.
12093 (supply_register): Call get_regcache with fetch flag clear.
12094 (collect_register): Call get_regcache with fetch flag set.
12095 (collect_register_as_string): New function.
12096 * regcache.h: Update.
12097 * remote-utils.c (putpkt): Flush after debug output and use
12098 stderr.
12099 Handle input interrupts while waiting for an ACK.
12100 (input_interrupt): Use signal_pid method.
12101 (getpkt): Flush after debug output and use stderr.
12102 (outreg): Use collect_register_as_string.
12103 (new_thread_notify, dead_thread_notify): New functions.
12104 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12105 and general_thread.
12106 (look_up_one_symbol): Flush after debug output.
12107 * server.c (step_thread, server_waiting): New variables.
12108 (start_inferior): Don't use signal_pid. Update call to mywait.
12109 (attach_inferior): Update call to mywait.
12110 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12111 (main): Don't fetch/store registers explicitly. Use
12112 set_desired_inferior. Support proposed ``Hs'' packet. Update
12113 calls to mywait.
12114 * server.h: Update.
12115 (struct inferior_list, struct_inferior_list_entry): New.
12116 * target.c (set_desired_inferior): New.
12117 (write_inferior_memory): Constify.
12118 (mywait): New function.
12119 * target.h: Update.
12120 (struct target_ops): New signal_pid method.
12121 (mywait): Removed macro, added prototype.
12122
12123 * linux-low.h (regset_func): Removed.
12124 (regset_fill_func, regset_store_func): New.
12125 (enum regset_type): New.
12126 (struct regset_info): Add type field. Use new operation types.
12127 (struct linux_target_ops): stop_pc renamed to get_pc.
12128 Add decr_pc_after_break and breakpoint_at.
12129 (get_process, get_thread_proess, get_process_thread)
12130 (strut process_info, all_processes, linux_attach_lwp)
12131 (thread_db_init): New.
12132
12133 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12134 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12135 (the_low_target): Add new members.
12136 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12137 (i386_store_fpxregset): Constify.
12138 (target_regsets): Add new kind identifier.
12139 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12140 (i386_set_pc): Add debugging.
12141 (i386_breakpoint_at): New function.
12142 (the_low_target): Add new members.
12143 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12144 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12145 (mips_breakpoint_at): New.
12146 (the_low_target): Add new members.
12147 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12148 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12149 (the_low_target): Add new members.
12150 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12151 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12152 (the_low_target): Add new members.
12153 * linux-x86-64-low.c (target_regsets): Add new kind
12154 identifier.
12155
121562002-05-15 Daniel Jacobowitz <drow@mvista.com>
12157
12158 From Martin Pool <mbp@samba.org>:
12159 * server.c (gdbserver_usage): New function.
12160 (main): Call it.
12161
121622002-05-14 Daniel Jacobowitz <drow@mvista.com>
12163
12164 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12165 stop_at -> stop_pc.
12166
121672002-05-04 Andrew Cagney <ac131313@redhat.com>
12168
12169 * Makefile.in: Remove obsolete code.
12170
121712002-04-24 Michal Ludvig <mludvig@suse.cz>
12172
12173 * linux-low.c (regsets_fetch_inferior_registers),
12174 (regsets_store_inferior_registers): Removed cast to int from
12175 ptrace() calls.
12176 * regcache.h: Added declaration of struct inferior_info.
12177
121782002-04-20 Daniel Jacobowitz <drow@mvista.com>
12179
12180 * inferiors.c (struct inferior_info): Add regcache_data.
12181 (add_inferior): Call create_register_cache.
12182 (clear_inferiors): Call free_register_cache.
12183 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12184 * regcache.c (struct inferior_regcache_data): New.
12185 (registers): Remove.
12186 (get_regcache): New function.
12187 (create_register_cache, free_register_cache): New functions.
12188 (set_register_cache): Don't initialize the register cache here.
12189 (registers_to_string, registers_from_string, register_data): Call
12190 get_regcache.
12191 * regcache.h: Add prototypes.
12192 * server.h: Likewise.
12193
121942002-04-20 Daniel Jacobowitz <drow@mvista.com>
12195
12196 * mem-break.c: New file.
12197 * mem-break.h: New file.
12198 * Makefile.in: Add mem-break.o rule; update server.h
12199 dependencies.
12200 * inferiors.c (struct inferior_info): Add target_data
12201 member.
12202 (clear_inferiors): Free target_data member if set.
12203 (inferior_target_data, set_inferior_target_data): New functions.
12204 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12205 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12206 * linux-low.c (linux_bp_reinsert): New variable.
12207 (struct inferior_linux_data): New.
12208 (linux_create_inferior): Use set_inferior_target_data.
12209 (linux_attach): Likewise. Call add_inferior.
12210 (linux_wait_for_one_inferior): New function.
12211 (linux_wait): Call it.
12212 (linux_write_memory): Add const.
12213 (initialize_low): Call set_breakpoint_data.
12214 * linux-low.h (struct linux_target_ops): Add breakpoint
12215 handling members.
12216 * server.c (attach_inferior): Remove extra add_inferior
12217 call.
12218 * server.h: Include mem-break.h. Update inferior.c
12219 prototypes.
12220 * target.c (read_inferior_memory)
12221 (write_inferior_memory): New functions.
12222 * target.h (read_inferior_memory)
12223 (write_inferior_memory): Change macros to prototypes.
12224 (struct target_ops): Update comments. Add const to write_memory
12225 definition.
12226
122272002-04-11 Daniel Jacobowitz <drow@mvista.com>
12228
12229 * linux-low.c (usr_store_inferior_registers): Support
12230 registers which are allowed to fail to store.
12231 * linux-low.h (linux_target_ops): Likewise.
12232 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12233 (ppc_cannot_store_register): FPSCR may not be storable.
12234
122352002-04-09 Daniel Jacobowitz <drow@mvista.com>
12236
12237 * server.h: Include <string.h> if HAVE_STRING_H.
12238 * ChangeLog: Correct paths in last ChangeLog entry.
12239
122402002-04-09 Daniel Jacobowitz <drow@mvista.com>
12241
12242 * linux-low.h: Remove obsolete prototypes.
12243 (struct linux_target_ops): New.
12244 (extern the_low_target): New.
12245 * linux-low.c (num_regs, regmap): Remove declarations.
12246 (register_addr): Use the_low_target explicitly.
12247 (fetch_register): Likewise.
12248 (usr_fetch_inferior_registers): Likewise.
12249 (usr_store_inferior_registers): Likewise.
12250 * linux-arm-low.c (num_regs): Remove.
12251 (arm_num_regs): Define.
12252 (arm_regmap): Renamed from regmap, made static.
12253 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12254 made static.
12255 (arm_cannot_store_register): Renamed from cannot_store_register,
12256 made static.
12257 (the_low_target): New.
12258 * linux-i386-low.c (num_regs): Remove.
12259 (i386_num_regs): Define.
12260 (i386_regmap): Renamed from regmap, made static.
12261 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12262 made static.
12263 (i386_cannot_store_register): Renamed from cannot_store_register,
12264 made static.
12265 (the_low_target): New.
12266 * linux-ia64-low.c (num_regs): Remove.
12267 (ia64_num_regs): Define.
12268 (ia64_regmap): Renamed from regmap, made static.
12269 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12270 made static.
12271 (ia64_cannot_store_register): Renamed from cannot_store_register,
12272 made static.
12273 (the_low_target): New.
12274 * linux-m68k-low.c (num_regs): Remove.
12275 (m68k_num_regs): Define.
12276 (m68k_regmap): Renamed from regmap, made static.
12277 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12278 made static.
12279 (m68k_cannot_store_register): Renamed from cannot_store_register,
12280 made static.
12281 (the_low_target): New.
12282 * linux-mips-low.c (num_regs): Remove.
12283 (mips_num_regs): Define.
12284 (mips_regmap): Renamed from regmap, made static.
12285 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12286 made static.
12287 (mips_cannot_store_register): Renamed from cannot_store_register,
12288 made static.
12289 (the_low_target): New.
12290 * linux-ppc-low.c (num_regs): Remove.
12291 (ppc_num_regs): Define.
12292 (ppc_regmap): Renamed from regmap, made static.
12293 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12294 made static.
12295 (ppc_cannot_store_register): Renamed from cannot_store_register,
12296 made static.
12297 (the_low_target): New.
12298 * linux-s390-low.c (num_regs): Remove.
12299 (s390_num_regs): Define.
12300 (s390_regmap): Renamed from regmap, made static.
12301 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12302 made static.
12303 (s390_cannot_store_register): Renamed from cannot_store_register,
12304 made static.
12305 (the_low_target): New.
12306 * linux-sh-low.c (num_regs): Remove.
12307 (sh_num_regs): Define.
12308 (sh_regmap): Renamed from regmap, made static.
12309 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12310 made static.
12311 (sh_cannot_store_register): Renamed from cannot_store_register,
12312 made static.
12313 (the_low_target): New.
12314 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12315 (the_low_target): New.
12316
123172002-04-09 Daniel Jacobowitz <drow@mvista.com>
12318
12319 * Makefile.in: Add stamp-h target.
12320 * configure.in: Create stamp-h.
12321 * configure: Regenerated.
12322
123232002-04-09 Daniel Jacobowitz <drow@mvista.com>
12324
12325 * inferiors.c: New file.
12326 * target.c: New file.
12327 * target.h: New file.
12328 * Makefile.in: Add target.o and inferiors.o. Update
12329 dependencies.
12330 * linux-low.c (inferior_pid): New static variable,
12331 moved from server.c.
12332 (linux_create_inferior): Renamed from create_inferior.
12333 Call add_inferior. Return 0 on success instead of a PID.
12334 (linux_attach): Renamed from myattach.
12335 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12336 (linux_thread_alive): Renamed from mythread_alive.
12337 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12338 child dies.
12339 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12340 (regsets_store_inferior_registers): Correct error message.
12341 Add missing ``return 0''.
12342 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12343 (linux_store_registers): Renamed from store_inferior_registers.
12344 (linux_read_memory): Renamed from read_inferior_memory.
12345 (linux_write_memory): Renamed from write_inferior_memory.
12346 (linux_target_ops): New structure.
12347 (initialize_low): Call set_target_ops ().
12348 * remote-utils.c (unhexify): New function.
12349 (hexify): New function.
12350 (input_interrupt): Send signals to ``signal_pid''.
12351 * server.c (inferior_pid): Remove.
12352 (start_inferior): Update create_inferior call.
12353 (attach_inferior): Call add_inferior.
12354 (handle_query): New function.
12355 (main): Call handle_query for `q' packets.
12356 * server.h: Include "target.h". Remove obsolete prototypes.
12357 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12358
123592002-04-09 Daniel Jacobowitz <drow@mvista.com>
12360
12361 * Makefile.in: Add WARN_CFLAGS. Update configury
12362 dependencies.
12363 * configure.in: Check for <string.h>
12364 * configure: Regenerate.
12365 * config.in: Regenerate.
12366 * gdbreplay.c: Include needed system headers.
12367 (remote_open): Remove strchr prototype.
12368 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12369 * regcache.c (supply_register): Change buf argument to const void *.
12370 (supply_register_by_name): Likewise.
12371 (collect_register): Change buf argument to void *.
12372 (collect_register_by_name): Likewise.
12373 * regcache.h: Add missing prototypes.
12374 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12375 * server.c (handle_query): New function.
12376 (attached): New static variable, moved out of main.
12377 (main): Quiet longjmp clobber warnings.
12378 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12379 * utils.c (error): Remove NORETURN.
12380 (fatal): Likewise.
This page took 1.533831 seconds and 4 git commands to generate.