]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Move append_insns out of aarch64_relocate_instruction
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
dfaffe9d
YQ
12015-10-12 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4 int. Add argument buf.
5 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6 aarch64_relocate_instruction.
7
70b439f0
YQ
82015-10-12 Yao Qi <yao.qi@linaro.org>
9
10 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
11 argument insn. Remove local variable insn. Don't call
12 target_read_uint32.
13 (aarch64_install_fast_tracepoint_jump_pad): Call
14 target_read_uint32.
15
7781c06f
YQ
162015-09-30 Yao Qi <yao.qi@linaro.org>
17
18 * linux-aarch64-low.c (emit_movk): Shorten a long line.
19 (emit_load_store_pair): Likewise.
20
9a3c8263
SM
212015-09-25 Simon Marchi <simon.marchi@ericsson.com>
22
23 * dll.c (match_dll): Add cast(s).
24 (unloaded_dll): Likewise.
25 * linux-low.c (second_thread_of_pid_p): Likewise.
26 (delete_lwp_callback): Likewise.
27 (count_events_callback): Likewise.
28 (select_event_lwp_callback): Likewise.
29 (linux_set_resume_request): Likewise.
30 * server.c (accumulate_file_name_length): Likewise.
31 (emit_dll_description): Likewise.
32 (handle_qxfer_threads_worker): Likewise.
33 (visit_actioned_threads): Likewise.
34 * thread-db.c (any_thread_of): Likewise.
35 * tracepoint.c (same_process_p): Likewise.
36 (match_blocktype): Likewise.
37 (build_traceframe_info_xml): Likewise.
38
224c3ddb
SM
392015-09-25 Simon Marchi <simon.marchi@ericsson.com>
40
41 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
42 assignment.
43 (gdb_unparse_agent_expr): Likewise.
44 * hostio.c (require_data): Likewise.
45 (handle_pread): Likewise.
46 * linux-low.c (disable_regset): Likewise.
47 (fetch_register): Likewise.
48 (store_register): Likewise.
49 (get_dynamic): Likewise.
50 (linux_qxfer_libraries_svr4): Likewise.
51 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
52 (set_fast_tracepoint_jump): Likewise.
53 (uninsert_fast_tracepoint_jumps_at): Likewise.
54 (reinsert_fast_tracepoint_jumps_at): Likewise.
55 (validate_inserted_breakpoint): Likewise.
56 (clone_agent_expr): Likewise.
57 * regcache.c (init_register_cache): Likewise.
58 * remote-utils.c (putpkt_binary_1): Likewise.
59 (decode_M_packet): Likewise.
60 (decode_X_packet): Likewise.
61 (look_up_one_symbol): Likewise.
62 (relocate_instruction): Likewise.
63 (monitor_output): Likewise.
64 * server.c (handle_search_memory): Likewise.
65 (handle_qxfer_exec_file): Likewise.
66 (handle_qxfer_libraries): Likewise.
67 (handle_qxfer): Likewise.
68 (handle_query): Likewise.
69 (handle_v_cont): Likewise.
70 (handle_v_run): Likewise.
71 (captured_main): Likewise.
72 * target.c (write_inferior_memory): Likewise.
73 * thread-db.c (try_thread_db_load_from_dir): Likewise.
74 * tracepoint.c (init_trace_buffer): Likewise.
75 (add_tracepoint_action): Likewise.
76 (add_traceframe): Likewise.
77 (add_traceframe_block): Likewise.
78 (cmd_qtdpsrc): Likewise.
79 (cmd_qtdv): Likewise.
80 (cmd_qtstatus): Likewise.
81 (response_source): Likewise.
82 (response_tsv): Likewise.
83 (cmd_qtnotes): Likewise.
84 (gdb_collect): Likewise.
85 (initialize_tracepoint): Likewise.
86
afbe19f8
PL
872015-09-21 Pierre Langlois <pierre.langlois@arm.com>
88
89 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
90 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
91 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
92 <NOP>: New.
93 (enum aarch64_condition_codes): New enum.
94 (w0): New static global.
95 (fp): Likewise.
96 (lr): Likewise.
97 (struct aarch64_memory_operand) <type>: New
98 MEMORY_OPERAND_POSTINDEX type.
99 (postindex_memory_operand): New helper function.
100 (emit_ret): New function.
101 (emit_load_store_pair): New function, factored out of emit_stp
102 with support for MEMORY_OPERAND_POSTINDEX.
103 (emit_stp): Rewrite using emit_load_store_pair.
104 (emit_ldp): New function.
105 (emit_load_store): Likewise.
106 (emit_ldr): Mention post-index instruction in comment.
107 (emit_ldrh): New function.
108 (emit_ldrb): New function.
109 (emit_ldrsw): Mention post-index instruction in comment.
110 (emit_str): Likewise.
111 (emit_subs): New function.
112 (emit_cmp): Likewise.
113 (emit_and): Likewise.
114 (emit_orr): Likewise.
115 (emit_orn): Likewise.
116 (emit_eor): Likewise.
117 (emit_mvn): Likewise.
118 (emit_lslv): Likewise.
119 (emit_lsrv): Likewise.
120 (emit_asrv): Likewise.
121 (emit_mul): Likewise.
122 (emit_sbfm): Likewise.
123 (emit_sbfx): Likewise.
124 (emit_ubfm): Likewise.
125 (emit_ubfx): Likewise.
126 (emit_csinc): Likewise.
127 (emit_cset): Likewise.
128 (emit_nop): Likewise.
129 (emit_ops_insns): New helper function.
130 (emit_pop): Likewise.
131 (emit_push): Likewise.
132 (aarch64_emit_prologue): New function.
133 (aarch64_emit_epilogue): Likewise.
134 (aarch64_emit_add): Likewise.
135 (aarch64_emit_sub): Likewise.
136 (aarch64_emit_mul): Likewise.
137 (aarch64_emit_lsh): Likewise.
138 (aarch64_emit_rsh_signed): Likewise.
139 (aarch64_emit_rsh_unsigned): Likewise.
140 (aarch64_emit_ext): Likewise.
141 (aarch64_emit_log_not): Likewise.
142 (aarch64_emit_bit_and): Likewise.
143 (aarch64_emit_bit_or): Likewise.
144 (aarch64_emit_bit_xor): Likewise.
145 (aarch64_emit_bit_not): Likewise.
146 (aarch64_emit_equal): Likewise.
147 (aarch64_emit_less_signed): Likewise.
148 (aarch64_emit_less_unsigned): Likewise.
149 (aarch64_emit_ref): Likewise.
150 (aarch64_emit_if_goto): Likewise.
151 (aarch64_emit_goto): Likewise.
152 (aarch64_write_goto_address): Likewise.
153 (aarch64_emit_const): Likewise.
154 (aarch64_emit_call): Likewise.
155 (aarch64_emit_reg): Likewise.
156 (aarch64_emit_pop): Likewise.
157 (aarch64_emit_stack_flush): Likewise.
158 (aarch64_emit_zero_ext): Likewise.
159 (aarch64_emit_swap): Likewise.
160 (aarch64_emit_stack_adjust): Likewise.
161 (aarch64_emit_int_call_1): Likewise.
162 (aarch64_emit_void_call_2): Likewise.
163 (aarch64_emit_eq_goto): Likewise.
164 (aarch64_emit_ne_goto): Likewise.
165 (aarch64_emit_lt_goto): Likewise.
166 (aarch64_emit_le_goto): Likewise.
167 (aarch64_emit_gt_goto): Likewise.
168 (aarch64_emit_ge_got): Likewise.
169 (aarch64_emit_ops_impl): New static global variable.
170 (aarch64_emit_ops): New target function, return
171 &aarch64_emit_ops_impl.
172 (struct linux_target_ops): Install it.
173
bb903df0
PL
1742015-09-21 Pierre Langlois <pierre.langlois@arm.com>
175
176 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
177 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
178 aarch64-ipa.o.
179 * linux-aarch64-ipa.c: New file.
180 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
181 and endian.h.
182 (aarch64_get_thread_area): New target method.
183 (extract_signed_bitfield): New helper function.
184 (aarch64_decode_ldr_literal): New function.
185 (enum aarch64_opcodes): New enum.
186 (struct aarch64_register): New struct.
187 (struct aarch64_operand): New struct.
188 (x0): New static global.
189 (x1): Likewise.
190 (x2): Likewise.
191 (x3): Likewise.
192 (x4): Likewise.
193 (w2): Likewise.
194 (ip0): Likewise.
195 (sp): Likewise.
196 (xzr): Likewise.
197 (aarch64_register): New helper function.
198 (register_operand): Likewise.
199 (immediate_operand): Likewise.
200 (struct aarch64_memory_operand): New struct.
201 (offset_memory_operand): New helper function.
202 (preindex_memory_operand): Likewise.
203 (enum aarch64_system_control_registers): New enum.
204 (ENCODE): New macro.
205 (emit_insn): New helper function.
206 (emit_b): New function.
207 (emit_bcond): Likewise.
208 (emit_cb): Likewise.
209 (emit_tb): Likewise.
210 (emit_blr): Likewise.
211 (emit_stp): Likewise.
212 (emit_ldp_q_offset): Likewise.
213 (emit_stp_q_offset): Likewise.
214 (emit_load_store): Likewise.
215 (emit_ldr): Likewise.
216 (emit_ldrsw): Likewise.
217 (emit_str): Likewise.
218 (emit_ldaxr): Likewise.
219 (emit_stxr): Likewise.
220 (emit_stlr): Likewise.
221 (emit_data_processing_reg): Likewise.
222 (emit_data_processing): Likewise.
223 (emit_add): Likewise.
224 (emit_sub): Likewise.
225 (emit_mov): Likewise.
226 (emit_movk): Likewise.
227 (emit_mov_addr): Likewise.
228 (emit_mrs): Likewise.
229 (emit_msr): Likewise.
230 (emit_sevl): Likewise.
231 (emit_wfe): Likewise.
232 (append_insns): Likewise.
233 (can_encode_int32_in): New helper function.
234 (aarch64_relocate_instruction): New function.
235 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
236 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
237 (struct linux_target_ops): Install aarch64_get_thread_area,
238 aarch64_install_fast_tracepoint_jump_pad and
239 aarch64_get_min_fast_tracepoint_insn_len.
240
787749ea
PL
2412015-09-21 Pierre Langlois <pierre.langlois@arm.com>
242
243 * Makefile.in (aarch64-insn.o): New rule.
244 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
245
9812b2e6
YQ
2462015-09-21 Yao Qi <yao.qi@linaro.org>
247
248 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
249
18fe412b
YQ
2502015-09-21 Yao Qi <yao.qi@linaro.org>
251
252 * tracepoint.c (max_jump_pad_size): Remove.
253
a0cc84cd
YQ
2542015-09-18 Yao Qi <yao.qi@linaro.org>
255
256 * linux-aarch64-low.c: Don't include sys/uio.h.
257 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
258
d78908cf
WW
2592015-09-16 Wei-cheng Wang <cole945@gmail.com>
260
261 * tracepoint.c (eval_result_type): Change prototype.
262 (condition_true_at_tracepoint): Fix argument to compiled_cond.
263
d57e0d50
PA
2642015-09-15 Pedro Alves <palves@redhat.com>
265
266 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
267 Check whether to report exec events instead of checking whether
268 multiprocess is enabled.
269
5a676acc
PA
2702015-09-15 Pedro Alves <palves@redhat.com>
271
272 PR remote/18965
273 * remote-utils.c (prepare_resume_reply): Merge
274 TARGET_WAITKIND_VFORK_DONE switch case with the
275 TARGET_WAITKIND_FORKED case.
276
7c5d0fad
YQ
2772015-09-15 Yao Qi <yao.qi@linaro.org>
278
279 * server.c (handle_query): Check string comparison using
280 "else if" instead of "if".
281
750ce8d1
YQ
2822015-09-15 Yao Qi <yao.qi@linaro.org>
283
284 * server.c (vCont_supported): New global variable.
285 (handle_query): Set vCont_supported to 1 if "vContSupported+"
286 matches. Append ";vContSupported+" to own_buf.
287 (handle_v_requests): Append ";s;S" to own_buf if target supports
288 hardware single step or vCont_supported is false.
289 (capture_main): Set vCont_supported to zero.
290
70b90b91
YQ
2912015-09-15 Yao Qi <yao.qi@linaro.org>
292
293 * linux-low.c (linux_supports_conditional_breakpoints): Rename
294 it to ...
295 (linux_supports_hardware_single_step): ... New function.
296 (linux_target_ops): Update.
297 * lynx-low.c (lynx_target_ops): Set field
298 supports_hardware_single_step to target_can_do_hardware_single_step.
299 * nto-low.c (nto_target_ops): Likewise.
300 * spu-low.c (spu_target_ops): Likewise.
301 * win32-low.c (win32_target_ops): Likewise.
302 * target.c (target_can_do_hardware_single_step): New function.
303 * target.h (struct target_ops) <supports_conditional_breakpoints>:
304 Remove. <supports_hardware_single_step>: New field.
305 (target_supports_conditional_breakpoints): Remove.
306 (target_supports_hardware_single_step): New macro.
307 (target_can_do_hardware_single_step): Declare.
308 * server.c (handle_query): Use target_supports_hardware_single_step
309 instead of target_supports_conditional_breakpoints.
310
ade90bde
YQ
3112015-09-15 Yao Qi <yao.qi@linaro.org>
312
313 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
314 function.
315 (struct linux_target_ops the_low_target): Install
316 aarch64_linux_siginfo_fixup.
317
94585166
DB
3182015-09-11 Don Breazeal <donb@codesourcery.com>
319 Luis Machado <lgustavo@codesourcery.com>
320
321 * linux-low.c (linux_mourn): Static declaration.
322 (linux_arch_setup): Move in front of
323 handle_extended_wait.
324 (linux_arch_setup_thread): New function.
325 (handle_extended_wait): Handle exec events. Call
326 linux_arch_setup_thread. Make event_lwp argument a
327 pointer-to-a-pointer.
328 (check_zombie_leaders): Do not check stopped threads.
329 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
330 (linux_low_filter_event): Add lwp and thread for exec'ing
331 non-leader thread if leader thread has been deleted.
332 Refactor code into linux_arch_setup_thread and call it.
333 Pass child lwp pointer by reference to handle_extended_wait.
334 (linux_wait_for_event_filtered): Update comment.
335 (linux_wait_1): Prevent clobbering exec event status.
336 (linux_supports_exec_events): New function.
337 (linux_target_ops) <supports_exec_events>: Initialize new member.
338 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
339 new member.
340 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
341 * server.c (report_exec_events): New global variable.
342 (handle_query): Handle qSupported query for exec-events feature.
343 (captured_main): Initialize report_exec_events.
344 * server.h (report_exec_events): Declare new global variable.
345 * target.h (struct target_ops) <supports_exec_events>: New
346 member.
347 (target_supports_exec_events): New macro.
348 * win32-low.c (win32_target_ops) <supports_exec_events>:
349 Initialize new member.
350
0568462b
MM
3512015-09-09 Markus Metzger <markus.t.metzger@intel.com>
352
353 * linux-low.c (linux_low_enable_btrace): Remove.
354 (linux_target_ops): Replace linux_low_enable_btrace with
355 linux_enable_btrace.
356
39edd165
YQ
3572015-09-03 Yao Qi <yao.qi@linaro.org>
358
359 * linux-aarch64-low.c (aarch64_insert_point): Call
360 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
361 returns true.
362
1db33b5a
UW
3632015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
364
365 * linux-low.c (check_stopped_by_breakpoint): Use
366 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
367
ab290430
PA
3682015-08-27 Pedro Alves <palves@redhat.com>
369
370 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
371
8d749320
SM
3722015-08-26 Simon Marchi <simon.marchi@ericsson.com>
373
6711b7f8
SM
374 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
375 the XNEW-family equivalent.
8d749320
SM
376 (compile_bytecodes): Likewise.
377 * dll.c (loaded_dll): Likewise.
378 * event-loop.c (append_callback_event): Likewise.
379 (create_file_handler): Likewise.
380 (create_file_event): Likewise.
381 * hostio.c (handle_open): Likewise.
382 * inferiors.c (add_thread): Likewise.
383 (add_process): Likewise.
384 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
385 * linux-arm-low.c (arm_new_process): Likewise.
386 (arm_new_thread): Likewise.
387 * linux-low.c (add_to_pid_list): Likewise.
388 (linux_add_process): Likewise.
389 (handle_extended_wait): Likewise.
390 (add_lwp): Likewise.
391 (enqueue_one_deferred_signal): Likewise.
392 (enqueue_pending_signal): Likewise.
393 (linux_resume_one_lwp_throw): Likewise.
394 (linux_resume_one_thread): Likewise.
395 (linux_read_memory): Likewise.
396 (linux_write_memory): Likewise.
397 * linux-mips-low.c (mips_linux_new_process): Likewise.
398 (mips_linux_new_thread): Likewise.
399 (mips_add_watchpoint): Likewise.
400 * linux-x86-low.c (initialize_low_arch): Likewise.
401 * lynx-low.c (lynx_add_process): Likewise.
402 * mem-break.c (set_raw_breakpoint_at): Likewise.
403 (set_breakpoint): Likewise.
404 (add_condition_to_breakpoint): Likewise.
405 (add_commands_to_breakpoint): Likewise.
406 (clone_agent_expr): Likewise.
407 (clone_one_breakpoint): Likewise.
408 * regcache.c (new_register_cache): Likewise.
409 * remote-utils.c (look_up_one_symbol): Likewise.
410 * server.c (queue_stop_reply): Likewise.
411 (start_inferior): Likewise.
412 (queue_stop_reply_callback): Likewise.
413 (handle_target_event): Likewise.
414 * spu-low.c (fetch_ppc_memory): Likewise.
415 (store_ppc_memory): Likewise.
416 * target.c (set_target_ops): Likewise.
417 * thread-db.c (thread_db_load_search): Likewise.
418 (try_thread_db_load_1): Likewise.
419 * tracepoint.c (add_tracepoint): Likewise.
420 (add_tracepoint_action): Likewise.
421 (create_trace_state_variable): Likewise.
422 (cmd_qtdpsrc): Likewise.
423 (cmd_qtro): Likewise.
424 (add_while_stepping_state): Likewise.
425 * win32-low.c (child_add_thread): Likewise.
426 (get_image_name): Likewise.
427
ed8b7b42
YQ
4282015-08-25 Yao Qi <yao.qi@linaro.org>
429
430 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
431
db3cb7cb
YQ
4322015-08-25 Yao Qi <yao.qi@linaro.org>
433
434 * Makefile.in (aarch64-linux.o): New rule.
435 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
436 srv_tgtobj.
437 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
438 (aarch64_init_debug_reg_state): Make it extern.
439 (aarch64_linux_prepare_to_resume): Remove.
440
f6011a1c
YQ
4412015-08-25 Yao Qi <yao.qi@linaro.org>
442
443 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
444 lwp_arch_private_info and ptid_of_lwp.
445
88e2cf7e
YQ
4462015-08-25 Yao Qi <yao.qi@linaro.org>
447
448 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
449 Find proc_info by find_process_pid. All callers updated.
450
5e35436e
YQ
4512015-08-25 Yao Qi <yao.qi@linaro.org>
452
453 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
454 Remove.
455 (debug_reg_change_callback): Remove.
456 (aarch64_notify_debug_reg_change): Remove.
457
4a8a7965
YQ
4582015-08-25 Yao Qi <yao.qi@linaro.org>
459
460 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
461 Call current_lwp_ptid.
462
32a271ee
YQ
4632015-08-25 Yao Qi <yao.qi@linaro.org>
464
465 * linux-aarch64-low.c (debug_reg_change_callback): Use
466 debug_printf.
467
0d51c8d7
YQ
4682015-08-25 Yao Qi <yao.qi@linaro.org>
469
470 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
471
31a43dd5
YQ
4722015-08-25 Yao Qi <yao.qi@linaro.org>
473
474 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
475
8ee52567
YQ
4762015-08-25 Yao Qi <yao.qi@linaro.org>
477
478 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
479 the code.
480
ff3f0f45
YQ
4812015-08-25 Yao Qi <yao.qi@linaro.org>
482
483 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
484 Remove.
485 (debug_reg_change_callback): Remove argument entry and add argument
486 lwp. Remove local variable thread. Don't print thread id in the
487 debugging output. Don't check whether pid of thread equals to pid.
488 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
489 iterate_over_lwps instead find_inferior.
490
3d40fbb5
PA
4912015-08-24 Pedro Alves <palves@redhat.com>
492
493 * inferiors.c (get_first_process): New function.
494 * inferiors.h (get_first_process): New declaration.
495 * remote-utils.c (read_ptid): Default to the first process in the
496 list, instead of to the current thread's process.
497
438e1e42
PA
4982015-08-24 Pedro Alves <palves@redhat.com>
499
500 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
501 * event-loop.c: Likewise.
502 * remote-utils.c: Likewise.
503 * tracepoint.c: Likewise.
504
a8c6d4fc
PA
5052015-08-24 Pedro Alves <palves@redhat.com>
506
507 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
508 ptid_get_lwp.
509
99b0bb12
PA
5102015-08-21 Pedro Alves <palves@redhat.com>
511
512 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
513 instead of literal 1.
514
f8904751
PA
5152015-08-21 Pedro Alves <palves@redhat.com>
516
517 * tdesc.c (default_description): Explicitly zero-initialize.
518
465a859e
PA
5192015-08-21 Pedro Alves <palves@redhat.com>
520
521 PR gdb/18749
522 * inferiors.c (remove_thread): Discard any pending stop reply for
523 this thread.
524 * server.c (remove_all_on_match_pid): Rename to ...
525 (remove_all_on_match_ptid): ... this. Work with a filter ptid
526 instead of a pid.
527 (discard_queued_stop_replies): Change parameter to a ptid. Now
528 extern.
529 (handle_v_kill, kill_inferior_callback, captured_main)
530 (process_serial_event): Adjust.
531 * server.h (discard_queued_stop_replies): Declare.
532
f0db101d
PA
5332015-08-21 Pedro Alves <palves@redhat.com>
534
535 * linux-low.c (wait_for_sigstop): Always switch to no thread
536 selected if the previously current thread dies.
537 * lynx-low.c (lynx_request_interrupt): Use the first thread's
538 process instead of the current thread's.
539 * remote-utils.c (input_interrupt): Don't check if there's no
540 current thread.
541 * server.c (gdb_read_memory, gdb_write_memory): If setting the
542 current thread to the general thread fails, error out.
543 (handle_qxfer_auxv, handle_qxfer_libraries)
544 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
545 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
546 (handle_query): Check if there's a thread selected instead of
547 checking whether there's any thread in the thread list.
548 (handle_qxfer_threads, handle_qxfer_btrace)
549 (handle_qxfer_btrace_conf): Don't error out early if there's no
550 thread in the thread list.
551 (handle_v_cont, myresume): Don't set the current thread to the
552 continue thread.
553 (process_serial_event) <Hg handling>: Also set thread_id if the
554 previous general thread is still alive.
555 (process_serial_event) <g/G handling>: If setting the current
556 thread to the general thread fails, error out.
557 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
558 thread's lwp instead of the current thread's.
559 * target.c (set_desired_thread): If the desired thread was not
560 found, leave the current thread pointing to NULL. Return an int
561 (boolean) indicating success.
562 * target.h (set_desired_thread): Change return type to int.
563
40045d91
MF
5642015-08-20 Max Filippov <jcmvbkbc@gmail.com>
565
566 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
567 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
568 #includes.
569 (ps_get_thread_area): New function.
570
45face3b
GB
5712015-08-19 Gary Benson <gbenson@redhat.com>
572
573 * hostio.c (handle_pread): Do not attempt to read more data
574 than hostio_reply_with_data can fit in a packet.
575
16d5f642
JB
5762015-08-18 Joel Brobecker <brobecker@adacore.com>
577
578 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
579
a738da3a
MF
5802015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
581
582 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
583
33ebda9d
PA
5842015-08-06 Pedro Alves <palves@redhat.com>
585
586 * tracepoint.c (expr_eval_result): Now an int.
587
a44892be
PA
5882015-08-06 Pedro Alves <palves@redhat.com>
589
590 * gdbthread.h (struct regcache): Forward declare.
591 (struct thread_info) <regcache_data>: Now a struct regcache
592 pointer.
593 * inferiors.c (inferior_regcache_data)
594 (set_inferior_regcache_data): Now work with struct regcache
595 pointers.
596 * inferiors.h (struct regcache): Forward declare.
597 (inferior_regcache_data, set_inferior_regcache_data): Now work
598 with struct regcache pointers.
599 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
600 (free_register_cache_thread): Remove struct regcache pointer
601 casts.
602
608a1e46
PA
6032015-08-06 Pedro Alves <palves@redhat.com>
604
605 * server.c (captured_main): On error, print the exception message
606 to stderr, and if run_once is set, throw a quit.
607
f0ce0d3a
PA
6082015-08-06 Pedro Alves <palves@redhat.com>
609
610 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
611 the current thread.
612
bf47e248
PA
6132015-08-06 Pedro Alves <palves@redhat.com>
614
615 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
616 reading beyond the passed in buffer length.
617
b6b9ffcc
PL
6182015-08-06 Pierre Langlois <pierre.langlois@arm.com>
619
620 * tracepoint.c (symbol_list) <required>: Remove.
621
863d01bd
PA
6222015-08-06 Pedro Alves <palves@redhat.com>
623
624 * linux-low.c (handle_extended_wait): Set the fork child's suspend
625 count if stopping and suspending threads.
626 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
627 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
628 (linux_detach): Complete an ongoing step-over.
629 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
630 throughout.
631 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
632 (linux_wait_1): If passing a signal to the inferior after
633 finishing a step-over, unsuspend and re-resume all lwps. If we
634 see a single-step event but the thread should be continuing, don't
635 pass the trap to gdb.
636 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
637 internal_error instead of gdb_assert.
638 (enqueue_pending_signal): New function.
639 (check_ptrace_stopped_lwp_gone): Add debug output.
640 (start_step_over): Use internal_error instead of gdb_assert.
641 (complete_ongoing_step_over): New function.
642 (linux_resume_one_thread): Don't resume a suspended thread.
643 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
644 it stepping.
645
00db26fa
PA
6462015-08-06 Pedro Alves <palves@redhat.com>
647
648 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
649 (linux_thread_alive): Use lwp_is_marked_dead.
650 (extended_event_reported): Delete.
651 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
652 instead of extended_event_reported.
653 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
654 as well.
655 (lwp_is_marked_dead): New function.
656 (lwp_running): Use lwp_is_marked_dead.
657 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
658 comment.
659
ad071a30
PA
6602015-08-06 Pedro Alves <palves@redhat.com>
661
662 * linux-low.c (linux_wait_1): Move fork event output out of the
663 !report_to_gdb check. Pass event_child->waitstatus to
664 target_waitstatus_to_string instead of ourstatus.
665
524b57e6
YQ
6662015-08-04 Yao Qi <yao.qi@linaro.org>
667
668 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
669 if current_thread is 32 bit.
670
6085d6f6
YQ
6712015-08-04 Yao Qi <yao.qi@linaro.org>
672
673 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
674 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
675 * server.c (extended_protocol): Remove "static".
676 * server.h (extended_protocol): Declare it.
677
8a7e4587
YQ
6782015-08-04 Yao Qi <yao.qi@linaro.org>
679
680 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
681 both aarch64 and aarch32.
682 (aarch64_set_pc): Likewise.
683
3b53ae99
YQ
6842015-08-04 Yao Qi <yao.qi@linaro.org>
685
686 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
687 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
688 arm-with-neon.xml to srv_xmlfiles.
689 * linux-aarch64-low.c: Include linux-aarch32-low.h.
690 (is_64bit_tdesc): New function.
691 (aarch64_linux_read_description): New function.
692 (aarch64_arch_setup): Call aarch64_linux_read_description.
693 (regs_info): Rename to regs_info_aarch64.
694 (aarch64_regs_info): Return right regs_info.
695 (initialize_low_arch): Call initialize_low_arch_aarch32.
696
bd9e6534
YQ
6972015-08-04 Yao Qi <yao.qi@linaro.org>
698
699 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
700 * linux-aarch32-low.c: New file.
701 * linux-aarch32-low.h: New file.
702 * linux-arm-low.c (arm_fill_gregset): Move it to
703 linux-aarch32-low.c.
704 (arm_store_gregset): Likewise.
705 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
706 (arm_store_vfpregset): Call arm_store_vfpregset_num.
707 (arm_arch_setup): Check if PTRACE_GETREGSET works.
708 (regs_info): Rename to regs_info_arm.
709 (arm_regs_info): Return regs_info_aarch32 if
710 have_ptrace_getregset is 1 and target description is
711 arm_with_neon or arm_with_vfpv3.
712 (initialize_low_arch): Don't call init_registers_arm_with_neon.
713 Call initialize_low_arch_aarch32 instead.
714
ded48a5e
YQ
7152015-08-04 Yao Qi <yao.qi@linaro.org>
716
717 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
718 * linux-low.c: ... here.
719 * linux-low.h (have_ptrace_getregset): Declare it.
720
96e9210f
PA
7212015-08-04 Pedro Alves <palves@redhat.com>
722
723 * thread-db.c (struct thread_db): Use new typedefs.
724 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
725 CHK calls.
726 (disable_thread_event_reporting): Cast result of dlsym to
727 destination function pointer type.
728 (thread_db_mourn): Use td_ta_delete_ftype.
729
af60a1ef
SL
7302015-08-03 Sandra Loosemore <sandra@codesourcery.com>
731
732 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
733 arch variant.
734 (CDX_BREAKPOINT): Define for R2.
735 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
736 (the_low_target): Add comments.
737
e8b41681
YQ
7382015-07-30 Yao Qi <yao.qi@linaro.org>
739
740 * linux-arm-low.c (arm_hwcap): Remove it.
741 (arm_read_description): New local variable arm_hwcap. Don't
742 set arm_hwcap to zero.
743
89abb039
YQ
7442015-07-30 Yao Qi <yao.qi@linaro.org>
745
746 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
747 Use regcache->tdesc instead.
748 (arm_store_wmmxregset): Likewise.
749 (arm_fill_vfpregset): Likewise.
750 (arm_store_vfpregset): Likewise.
751
deca266c
YQ
7522015-07-30 Yao Qi <yao.qi@linaro.org>
753
754 * linux-arm-low.c: Include arch/arm.h.
755 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
756 (arm_store_gregset): Likewise.
757
aa58a496
SM
7582015-07-29 Simon Marchi <simon.marchi@ericsson.com>
759
760 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
761 ptrace's 4th parameter.
762
50904b25
YQ
7632015-07-27 Yao Qi <yao.qi@linaro.org>
764
765 * configure.srv (case aarch64*-*-linux*): Don't set
766 srv_linux_usrregs.
767
5826e159
PA
7682015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
769
770 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
771 sys/ptrace.h.
772 * linux-arm-low.c: Likewise.
773 * linux-cris-low.c: Likewise.
774 * linux-crisv32-low.c: Likewise.
775 * linux-low.c: Likewise.
776 * linux-m68k-low.c: Likewise.
777 * linux-mips-low.c: Likewise.
778 * linux-nios2-low.c: Likewise.
779 * linux-s390-low.c: Likewise.
780 * linux-sparc-low.c: Likewise.
781 * linux-tic6x-low.c: Likewise.
782 * linux-tile-low.c: Likewise.
783 * linux-x86-low.c: Likewise.
784
54019719
PA
7852015-07-24 Pedro Alves <palves@redhat.com>
786
787 * config.in: Regenerate.
788 * configure: Regenerate.
789
eb7aa561
PA
7902015-07-24 Pedro Alves <palves@redhat.com>
791
792 * acinclude.m4: Include ../ptrace.m4.
793 * configure.ac: Call GDB_AC_PTRACE.
794 * config.in, configure: Regenerate.
795
55d7b841
YQ
7962015-07-24 Yao Qi <yao.qi@linaro.org>
797
798 * linux-low.c (linux_create_inferior): Remove setting to
799 proc->priv->new_inferior.
800 (linux_attach): Likewise.
801 (linux_low_filter_event): Likewise.
802 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
803
c06cbd92
YQ
8042015-07-24 Yao Qi <yao.qi@linaro.org>
805
806 * linux-low.c (linux_arch_setup): New function.
807 (linux_low_filter_event): If proc->tdesc is NULL and
808 proc->attached is true, call the_low_target.arch_setup.
809 Otherwise, keep status pending, and return.
810 (linux_resume_one_lwp_throw): Don't call get_pc if
811 thread->while_stepping isn't NULL. Don't call
812 get_thread_regcache if proc->tdesc is NULL.
813 (need_step_over_p): Return 0 if proc->tdesc is NULL.
814 (linux_target_ops): Install arch_setup.
815 * server.c (start_inferior): Call the_target->arch_setup.
816 * target.h (struct target_ops) <arch_setup>: New field.
817 (target_arch_setup): New marco.
818 * lynx-low.c (lynx_target_ops): Update.
819 * nto-low.c (nto_target_ops): Update.
820 * spu-low.c (spu_target_ops): Update.
821 * win32-low.c (win32_target_ops): Update.
822
5ae3ebba
YQ
8232015-07-24 Yao Qi <yao.qi@linaro.org>
824
825 * linux-low.c (linux_add_process): Don't set
826 proc->priv->new_inferior.
827 (linux_create_inferior): Set proc->priv->new_inferior to 1.
828 (linux_attach): Likewise.
829
eb97750b
YQ
8302015-07-24 Yao Qi <yao.qi@linaro.org>
831
832 * server.c (start_inferior): Code refactor.
833
51aee833
YQ
8342015-07-24 Yao Qi <yao.qi@linaro.org>
835
836 * server.c (process_serial_event): Set general_thread.
837
af1b22f3
YQ
8382015-07-21 Yao Qi <yao.qi@linaro.org>
839
840 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
841 aarch64_linux_get_debug_reg_capacity.
842
554717a3
YQ
8432015-07-17 Yao Qi <yao.qi@linaro.org>
844
845 * Makefile.in (aarch64-linux-hw-point.o): New rule.
846 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
847 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
848 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
849 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
850 (AARCH64_HWP_ALIGNMENT): Likewise.
851 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
852 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
853 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
854 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
855 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
856 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
857 (struct aarch64_debug_reg_state): Likewise.
858 (struct arch_lwp_info): Likewise.
859 (aarch64_align_watchpoint): Likewise.
860 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
861 (aarch64_watchpoint_length): Likewise.
862 (aarch64_point_encode_ctrl_reg): Likewise
863 (aarch64_point_is_aligned): Likewise.
864 (aarch64_align_watchpoint): Likewise.
865 (aarch64_linux_set_debug_regs):
866 (aarch64_dr_state_insert_one_point): Likewise.
867 (aarch64_dr_state_remove_one_point): Likewise.
868 (aarch64_handle_breakpoint): Likewise.
869 (aarch64_handle_aligned_watchpoint): Likewise.
870 (aarch64_handle_unaligned_watchpoint): Likewise.
871 (aarch64_handle_watchpoint): Likewise.
872
c67ca4de
YQ
8732015-07-17 Yao Qi <yao.qi@linaro.org>
874
875 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
876 and don't aarch64_get_debug_reg_state. All callers update.
877 (aarch64_handle_aligned_watchpoint): Likewise.
878 (aarch64_handle_unaligned_watchpoint): Likewise.
879 (aarch64_handle_watchpoint): Likewise.
880 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
881 (aarch64_remove_point): Likewise.
882
25abf979
YQ
8832015-07-17 Yao Qi <yao.qi@linaro.org>
884
885 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
886 debug_printf.
887 (aarch64_handle_unaligned_watchpoint): Likewise.
888
db1ff28b
JK
8892015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
890
891 Revert the previous 3 commits:
892 Move gdb_regex* to common/
893 Move linux_find_memory_regions_full & co.
894 gdbserver build-id attribute generator
895
700ca40f
JK
8962015-07-15 Aleksandar Ristovski <aristovski@qnx.com
897 Jan Kratochvil <jan.kratochvil@redhat.com>
898
899 gdbserver build-id attribute generator.
900 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
901 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
902 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
903 (find_phdr): New.
904 (get_dynamic): Use find_pdhr to traverse program headers.
905 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
906 (compare_mapping_entry_range, struct find_memory_region_callback_data)
907 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
908 (get_hex_build_id): New.
909 (linux_qxfer_libraries_svr4): Add optional build-id attribute
910 to reply XML document.
911
9904185c
JK
9122015-07-15 Aleksandar Ristovski <aristovski@qnx.com
913 Jan Kratochvil <jan.kratochvil@redhat.com>
914
915 * target.c: Include target/target-utils.h and fcntl.h.
916 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
917 (target_fileio_read_stralloc): New functions.
918
6e5b4429
JK
9192015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
920
921 * Makefile.in (OBS): Add gdb_regex.o.
922 (gdb_regex.o): New.
923 * config.in: Rebuilt.
924 * configure: Rebuilt.
925
ddc98fbf
JK
9262015-07-15 Aleksandar Ristovski <aristovski@qnx.com
927 Jan Kratochvil <jan.kratochvil@redhat.com>
928
929 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
930 * Makefile.in (OBS): Add target-utils.o.
931 (linux-maps.o, target-utils.o): New.
932 * configure.srv (srv_linux_obj): Add linux-maps.o.
933
e57bb7a0
PL
9342015-07-15 Pierre Langlois <pierre.langlois@arm.com>
935
936 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
937 function, return 1.
938 (the_low_target): Install it.
939
586b02a9
PA
9402015-07-14 Pedro Alves <palves@redhat.com>
941
942 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
943 Instead, ignore ECHILD, and throw an error for other errnos.
944
58c1b36c
PA
9452015-07-10 Pedro Alves <palves@redhat.com>
946
947 * event-loop.c (struct callback_event) <data>: Change type to
948 gdb_client_data instance instead of gdb_client_data pointer.
949 (append_callback_event): Adjust.
950
421530db
PL
9512015-07-10 Pierre Langlois <pierre.langlois@arm.com>
952
953 * linux-aarch64-low.c: Add comments for each linux_target_ops
954 method. Remove comments already covered in target_ops and
955 linux_target_ops definitions.
956 (the_low_target): Add comments for each unimplemented method.
957
c2d65f38
YQ
9582015-07-09 Yao Qi <yao.qi@linaro.org>
959
960 * linux-aarch64-low.c (aarch64_regmap): Remove.
961 (aarch64_usrregs_info): Remove.
962 (regs_info): Set field usrregs to NULL.
963
b20a6524
MM
9642015-07-02 Markus Metzger <markus.t.metzger@intel.com>
965
966 * linux-low.c: Include "rsp-low.h"
967 (linux_low_encode_pt_config, linux_low_encode_raw): New.
968 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
969 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
970 (handle_btrace_enable_pt): New.
971 (handle_btrace_general_set): Support "pt".
972 (handle_btrace_conf_general_set): Support "pt:size".
973
96c97461
PL
9742015-06-29 Pierre Langlois <pierre.langlois@arm.com>
975
976 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
977 Z_PACKET_SW_BP.
978
37d66942
PL
9792015-06-29 Pierre Langlois <pierre.langlois@arm.com>
980
981 * linux-aarch64-low.c: Remove comment about endianness.
982 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
983 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
984 memcmp.
985
dc06243f
GB
9862015-06-24 Gary Benson <gbenson@redhat.com>
987
988 * linux-i386-ipa.c (stdint.h): Do not include.
989 * lynx-i386-low.c (stdint.h): Likewise.
990 * lynx-ppc-low.c (stdint.h): Likewise.
991 * mem-break.c (stdint.h): Likewise.
992 * thread-db.c (stdint.h): Likewise.
993 * tracepoint.c (stdint.h): Likewise.
994 * win32-low.c (stdint.h): Likewise.
995
124e13d9
SM
9962015-06-18 Simon Marchi <simon.marchi@ericsson.com>
997
998 * server.c (write_qxfer_response): Update call to
999 remote_escape_output.
1000
909c2cda
JK
10012015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1002 Jan Kratochvil <jan.kratochvil@redhat.com>
1003
1004 Merge multiple hex conversions.
1005 * gdbreplay.c (tohex): Rename to 'fromhex'.
1006 (logchar): Use fromhex.
1007
24c05f46
JK
10082015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1009
1010 * server.c (handle_qxfer_libraries): Set `version' attribute for
1011 <library-list>.
1012
14d2069a
GB
10132015-06-10 Gary Benson <gbenson@redhat.com>
1014
1015 * target.h (struct target_ops) <multifs_open>: New field.
1016 <multifs_unlink>: Likewise.
1017 <multifs_readlink>: Likewise.
1018 * linux-low.c (nat/linux-namespaces.h): New include.
1019 (linux_target_ops): Initialize the_target->multifs_open,
1020 the_target->multifs_unlink and the_target->multifs_readlink.
1021 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1022 * hostio.c (hostio_fs_pid): New static variable.
1023 (hostio_handle_new_gdb_connection): New function.
1024 (handle_setfs): Likewise.
1025 (handle_open): Use the_target->multifs_open as appropriate.
1026 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1027 (handle_readlink): Use the_target->multifs_readlink as
1028 appropriate.
1029 (handle_vFile): Handle vFile:setfs packets.
1030 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1031 after target_handle_new_gdb_connection.
1032
4b8b5e72
GB
10332015-06-10 Gary Benson <gbenson@redhat.com>
1034
1035 * configure.ac (AC_CHECK_FUNCS): Add setns.
1036 * config.in: Regenerate.
1037 * configure: Likewise.
1038 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1039 (linux-namespaces.o): New rule.
1040 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1041
3ac2e371
GB
10422015-06-09 Gary Benson <gbenson@redhat.com>
1043
1044 * hostio.c (handle_open): Process mode argument with
1045 fileio_to_host_mode.
1046
ca9b78ce
YQ
10472015-06-01 Yao Qi <yao.qi@linaro.org>
1048
1049 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1050 * linux-x86-low.c: Likewise.
1051
bfacd19d
DB
10522015-05-28 Don Breazeal <donb@codesourcery.com>
1053
1054 * linux-low.c (handle_extended_wait): Initialize
1055 thread_info.last_resume_kind for new fork children.
1056
452003ef
PA
10572015-05-15 Pedro Alves <palves@redhat.com>
1058
1059 * target.h (target_handle_new_gdb_connection): Rewrite using if
1060 wrapped in do/while.
1061
1041a03c
JB
10622015-05-14 Joel Brobecker <brobecker@adacore.com>
1063
1064 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1065 * configure, config.in: Regenerate.
1066 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1067 Declare typedef.
1068
c269dbdb
DB
10692015-05-12 Don Breazeal <donb@codesourcery.com>
1070
1071 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1072 PTRACE_EVENT_VFORK_DONE.
1073 (linux_low_ptrace_options, extended_event_reported): Add vfork
1074 events.
1075 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1076 and "vforkdone" for RSP 'T' Stop Reply Packet.
1077 * server.h (report_vfork_events): Declare
1078 global variable.
1079
3a8a0396
DB
10802015-05-12 Don Breazeal <donb@codesourcery.com>
1081
1082 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1083 (the_low_target) <new_fork>: Initialize new member.
1084 * linux-arm-low.c (arm_new_fork): New function.
1085 (the_low_target) <new_fork>: Initialize new member.
1086 * linux-low.c (handle_extended_wait): Call new target function
1087 new_fork.
1088 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1089 * linux-mips-low.c (mips_add_watchpoint): New function
1090 extracted from mips_insert_point.
1091 (the_low_target) <new_fork>: Initialize new member.
1092 (mips_linux_new_fork): New function.
1093 (mips_insert_point): Call mips_add_watchpoint.
1094 * linux-x86-low.c (x86_linux_new_fork): New function.
1095 (the_low_target) <new_fork>: Initialize new member.
1096
de0d863e
DB
10972015-05-12 Don Breazeal <donb@codesourcery.com>
1098
1099 * linux-low.c (handle_extended_wait): Implement return value,
1100 rename argument 'event_child' to 'event_lwp', handle
1101 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1102 (linux_low_ptrace_options): New function.
1103 (linux_low_filter_event): Call linux_low_ptrace_options,
1104 use different argument fo linux_enable_event_reporting,
1105 use return value from handle_extended_wait.
1106 (extended_event_reported): New function.
1107 (linux_wait_1): Call extended_event_reported and set
1108 status to report fork events.
1109 (linux_write_memory): Add pid to debug message.
1110 (reset_lwp_ptrace_options_callback): New function.
1111 (linux_handle_new_gdb_connection): New function.
1112 (linux_target_ops): Initialize new structure member.
1113 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1114 * lynx-low.c: Initialize new structure member.
1115 * remote-utils.c (prepare_resume_reply): Implement stop reason
1116 "fork" for "T" stop message.
1117 * server.c (handle_query): Call handle_new_gdb_connection.
1118 * server.h (report_fork_events): Declare global flag.
1119 * target.h (struct target_ops) <handle_new_gdb_connection>:
1120 New member.
1121 (target_handle_new_gdb_connection): New macro.
1122 * win32-low.c: Initialize new structure member.
1123
ddcbc397
DB
11242015-05-12 Don Breazeal <donb@codesourcery.com>
1125
1126 * mem-break.c (APPEND_TO_LIST): Define macro.
1127 (clone_agent_expr): New function.
1128 (clone_one_breakpoint): New function.
1129 (clone_all_breakpoints): New function.
1130 * mem-break.h: Declare new functions.
1131
89245bc0
DB
11322015-05-12 Don Breazeal <donb@codesourcery.com>
1133
1134 * linux-low.c (linux_supports_fork_events): New function.
1135 (linux_supports_vfork_events): New function.
1136 (linux_target_ops): Initialize new structure members.
1137 (initialize_low): Call linux_check_ptrace_features.
1138 * lynx-low.c (lynx_target_ops): Initialize new structure
1139 members.
1140 * server.c (report_fork_events, report_vfork_events):
1141 New global flags.
1142 (handle_query): Add new features to qSupported packet and
1143 response.
1144 (captured_main): Initialize new global variables.
1145 * target.h (struct target_ops) <supports_fork_events>:
1146 New member.
1147 <supports_vfork_events>: New member.
1148 (target_supports_fork_events): New macro.
1149 (target_supports_vfork_events): New macro.
1150 * win32-low.c (win32_target_ops): Initialize new structure
1151 members.
1152
835205d0
GB
11532015-05-12 Gary Benson <gbenson@redhat.com>
1154
1155 * server.c (handle_qxfer_exec_file): Use current process
1156 if annex is empty.
1157
21e94bd9
SL
11582015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1159
1160 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1161 Remove HAVE_PTRACE_GETREGS conditionals.
1162 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1163 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1164
45614f15
YQ
11652015-05-08 Yao Qi <yao.qi@linaro.org>
1166
1167 * linux-low.c (linux_supports_conditional_breakpoints): New
1168 function.
1169 (linux_target_ops): Install new target method.
1170 * lynx-low.c (lynx_target_ops): Install NULL hook for
1171 supports_conditional_breakpoints.
1172 * nto-low.c (nto_target_ops): Likewise.
1173 * spu-low.c (spu_target_ops): Likewise.
1174 * win32-low.c (win32_target_ops): Likewise.
1175 * server.c (handle_query): Check
1176 target_supports_conditional_breakpoints.
1177 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1178 New field.
1179 (target_supports_conditional_breakpoints): New macro.
1180
80ad801e
PA
11812015-05-06 Pedro Alves <palves@redhat.com>
1182
1183 PR server/18081
1184 * server.c (start_inferior): If the process exits, mourn it.
1185
819843c7
GB
11862015-04-21 Gary Benson <gbenson@redhat.com>
1187
1188 * hostio.c (fileio_open_flags_to_host): Factored out to
1189 fileio_to_host_openflags in common/fileio.c. Single use
1190 updated.
1191
a2d5a9d7
MF
11922015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1193
1194 * linux-xtensa-low.c (xtensa_fill_gregset)
1195 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1196 XCHAL_HAVE_LOOP.
1197
deb44829
MF
11982015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1199
1200 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1201 (regs_info): Replace usrregs pointer with NULL.
1202
e57f1de3
GB
12032015-04-17 Gary Benson <gbenson@redhat.com>
1204
1205 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1206 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1207 * server.c (handle_qxfer_exec_file): New function.
1208 (qxfer_packets): Add exec-file entry.
1209 (handle_query): Report qXfer:exec-file:read as supported packet.
1210
62828379
RN
12112015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1212
1213 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1214
b88bb450
GB
12152015-04-09 Gary Benson <gbenson@redhat.com>
1216
1217 * hostio-errno.c (errno_to_fileio_error): Remove function.
1218 Update caller to use remote_fileio_to_fio_error.
1219
c8f4bfdd
YQ
12202015-04-09 Yao Qi <yao.qi@linaro.org>
1221
1222 * linux-low.c (linux_insert_point): Call
1223 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1224 (linux_remove_point): Call remove_memory_breakpoint if type is
1225 raw_bkpt_type_sw.
1226 * linux-x86-low.c (x86_insert_point): Don't call
1227 insert_memory_breakpoint.
1228 (x86_remove_point): Don't call remove_memory_breakpoint.
1229
41f98f02
PA
12302015-04-01 Pedro Alves <palves@redhat.com>
1231 Cleber Rosa <crosa@redhat.com>
1232
1233 * server.c (gdbserver_usage): Reorganize and extend the usage
1234 message.
1235
2bf6fb9d
PA
12362015-03-24 Pedro Alves <palves@redhat.com>
1237
1238 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1239 output. Also dump TRAP_TRACE.
1240 (linux_low_filter_event): In debug output, distinguish a
1241 resume_stop SIGSTOP from a delayed SIGSTOP.
1242
369f6daa
GB
12432015-03-24 Gary Benson <gbenson@redhat.com>
1244
1245 * linux-x86-low.c (x86_linux_new_thread): Moved to
1246 nat/x86-linux.c.
1247 (x86_linux_prepare_to_resume): Likewise.
1248
8e5d4070
GB
12492015-03-24 Gary Benson <gbenson@redhat.com>
1250
1251 * Makefile.in (x86-linux-dregs.o): New rule.
1252 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1253 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1254 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1255 (x86_linux_dr_get): Likewise.
1256 (x86_linux_dr_set): Likewise.
1257 (update_debug_registers_callback): Likewise.
1258 (x86_linux_dr_set_addr): Likewise.
1259 (x86_linux_dr_get_addr): Likewise.
1260 (x86_linux_dr_set_control): Likewise.
1261 (x86_linux_dr_get_control): Likewise.
1262 (x86_linux_dr_get_status): Likewise.
1263 (x86_linux_update_debug_registers): Likewise.
1264
2b95d440
GB
12652015-03-24 Gary Benson <gbenson@redhat.com>
1266
1267 * linux-x86-low.c (x86_linux_update_debug_registers):
1268 New function, factored out from...
1269 (x86_linux_prepare_to_resume): ...this.
1270
14b0bc68
GB
12712015-03-24 Gary Benson <gbenson@redhat.com>
1272
1273 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1274 (x86_linux_dr_set): Likewise.
1275 (update_debug_registers_callback): Likewise.
1276 (x86_linux_dr_set_addr): Likewise.
1277 (x86_linux_dr_get_addr): Likewise.
1278 (x86_linux_dr_set_control): Likewise.
1279 (x86_linux_dr_get_control): Likewise.
1280 (x86_linux_dr_get_status): Likewise.
1281 (x86_linux_prepare_to_resume): Likewise.
1282
5dfe6ca8
GB
12832015-03-24 Gary Benson <gbenson@redhat.com>
1284
1285 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1286 Use perror_with_name. Pass string through gettext.
1287 (x86_linux_dr_set): Likewise.
1288
d33472ad
GB
12892015-03-24 Gary Benson <gbenson@redhat.com>
1290
1291 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1292 (x86_linux_dr_set_addr): ...this.
1293 (x86_dr_low_get_addr): Rename to...
1294 (x86_linux_dr_get_addr): ...this.
1295 (x86_dr_low_set_control): Rename to...
1296 (x86_linux_dr_set_control): ...this.
1297 (x86_dr_low_get_control): Rename to...
1298 (x86_linux_dr_get_control): ...this.
1299 (x86_dr_low_get_status): Rename to...
1300 (x86_linux_dr_get_status): ...this.
1301 (x86_dr_low): Update with new function names.
1302
4b134ca1
GB
13032015-03-24 Gary Benson <gbenson@redhat.com>
1304
1305 * Makefile.in (x86-linux.o): New rule.
1306 * configure.srv: Add x86-linux.o to relevant targets.
1307 * linux-low.c (lwp_set_arch_private_info): New function.
1308 (lwp_arch_private_info): Likewise.
1309 * linux-x86-low.c: Include nat/x86-linux.h.
1310 (arch_lwp_info): Removed structure.
1311 (update_debug_registers_callback):
1312 Use lwp_set_debug_registers_changed.
1313 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1314 and lwp_set_debug_registers_changed.
1315 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1316
34c703da
GB
13172015-03-24 Gary Benson <gbenson@redhat.com>
1318
1319 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1320 * linux-arm-low.c (arm_new_thread): Likewise.
1321 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1322 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1323 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1324 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1325
cff068da
GB
13262015-03-24 Gary Benson <gbenson@redhat.com>
1327
1328 * linux-low.c (ptid_of_lwp): New function.
1329 (lwp_is_stopped): Likewise.
1330 (lwp_stop_reason): Likewise.
1331 * linux-x86-low.c (update_debug_registers_callback):
1332 Use lwp_is_stopped.
1333 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1334 lwp_stop_reason.
1335
b2f7c7e8
GB
13362015-03-24 Gary Benson <gbenson@redhat.com>
1337
1338 * linux-low.h (linux_stop_lwp): Remove declaration.
1339
6d4ee8c6
GB
13402015-03-24 Gary Benson <gbenson@redhat.com>
1341
1342 * linux-low.h: Include nat/linux-nat.h.
1343 * linux-low.c (iterate_over_lwps_args): New structure.
1344 (iterate_over_lwps_filter): New function.
1345 (iterate_over_lwps): Likewise.
1346 * linux-x86-low.c (update_debug_registers_callback):
1347 Update signature to what iterate_over_lwps expects.
1348 Remove PID check that iterate_over_lwps now performs.
1349 (x86_dr_low_set_addr): Use iterate_over_lwps.
1350 (x86_dr_low_set_control): Likewise.
1351
70a0bb6b
GB
13522015-03-24 Gary Benson <gbenson@redhat.com>
1353
1354 * linux-x86-low.c (x86_debug_reg_state): New function.
1355 (x86_linux_prepare_to_resume): Use the above.
1356
7b669087
GB
13572015-03-24 Gary Benson <gbenson@redhat.com>
1358
1359 * linux-low.c (current_lwp_ptid): New function.
1360 * linux-x86-low.c: Include nat/linux-nat.h.
1361 (x86_dr_low_get_addr): Use current_lwp_ptid.
1362 (x86_dr_low_get_control): Likewise.
1363 (x86_dr_low_get_status): Likewise.
1364
eef49a3d
PA
13652015-03-20 Pedro Alves <palves@redhat.com>
1366
1367 * tracepoint.c (cmd_qtstatus): Make "str" const.
1368
b2333d22
PA
13692015-03-20 Pedro Alves <palves@redhat.com>
1370
1371 * server.c (handle_general_set): Make "req_str" const.
1372
23f238d3
PA
13732015-03-19 Pedro Alves <palves@redhat.com>
1374
1375 * linux-low.c (linux_resume_one_lwp): Rename to ...
1376 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1377 instead call perror_with_name.
1378 (check_ptrace_stopped_lwp_gone): New function.
1379 (linux_resume_one_lwp): Reimplement as wrapper around
1380 linux_resume_one_lwp_throw that swallows errors if the LWP is
1381 gone.
1382
91baf43f
PA
13832015-03-19 Pedro Alves <palves@redhat.com>
1384
1385 * linux-low.c (count_events_callback, select_event_lwp_callback):
1386 No longer check whether the thread has resume_stop as last resume
1387 kind.
1388
8bf3b159
PA
13892015-03-19 Pedro Alves <palves@redhat.com>
1390
1391 * linux-low.c (count_events_callback, select_event_lwp_callback):
1392 Use the lwp's status_pending_p field, not the thread's.
1393
b90fc188
PA
13942015-03-19 Pedro Alves <palves@redhat.com>
1395
1396 * linux-low.c (select_event_lwp_callback): Update comments to
1397 no longer mention SIGTRAP.
1398
464b0089
GB
13992015-03-18 Gary Benson <gbenson@redhat.com>
1400
1401 * server.c (handle_query): Do not report vFile:fstat as supported.
1402
aa9e327f
GB
14032015-03-11 Gary Benson <gbenson@redhat.com>
1404
1405 * hostio.c (sys/types.h): New include.
1406 (sys/stat.h): Likewise.
1407 (common-remote-fileio.h): Likewise.
1408 (handle_fstat): New function.
1409 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1410
791c0056
GB
14112015-03-11 Gary Benson <gbenson@redhat.com>
1412
1413 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1414 struct stat.st_blocks and struct stat.st_blksize.
1415 * configure: Regenerate.
1416 * config.in: Likewise.
1417 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1418 (OBS): Add common-remote-fileio.o.
1419 (common-remote-fileio.o): New rule.
1420
9a9df970
PA
14212015-03-09 Pedro Alves <palves@redhat.com>
1422
1423 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1424 'struct sockaddr' pointer in 'accept' call.
1425
9eb1356e
PA
14262015-03-09 Pedro Alves <palves@redhat.com>
1427
1428 Revert:
1429 2015-03-07 Pedro Alves <palves@redhat.com>
1430 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1431 or <winsock2.h> here. Instead include "gdb_socket.h".
1432 (remote_open): Use union gdb_sockaddr_u.
1433 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1434 or <winsock2.h> here. Instead include "gdb_socket.h".
1435 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1436 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1437 or <sys/un.h>.
1438 (init_named_socket, gdb_agent_helper_thread): Use union
1439 gdb_sockaddr_u.
1440
aac331e4
PA
14412015-03-07 Pedro Alves <palves@redhat.com>
1442
1443 * configure.ac (build_warnings): Move
1444 -Wdeclaration-after-statement to the C-specific set.
1445 * configure: Regenerate.
1446
366c75fc
PA
14472015-03-07 Pedro Alves <palves@redhat.com>
1448
1449 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1450 or <winsock2.h> here. Instead include "gdb_socket.h".
1451 (remote_open): Use union gdb_sockaddr_u.
1452 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1453 or <winsock2.h> here. Instead include "gdb_socket.h".
1454 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1455 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1456 or <sys/un.h>.
1457 (init_named_socket, gdb_agent_helper_thread): Use union
1458 gdb_sockaddr_u.
1459
492d29ea
PA
14602015-03-07 Pedro Alves <palves@redhat.com>
1461
1462 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1463 instead.
1464
60a191ed
YQ
14652015-03-06 Yao Qi <yao.qi@linaro.org>
1466
1467 * linux-aarch64-low.c (aarch64_insert_point): Use
1468 show_debug_regs as a boolean.
1469 (aarch64_remove_point): Likewise.
1470
f5771b1d
PA
14712015-03-05 Pedro Alves <palves@redhat.com>
1472
1473 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1474 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1475 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1476 * nto-low.c (nto_target_ops): Likewise.
1477 * spu-low.c (spu_target_ops): Likewise.
1478 * win32-low.c (win32_target_ops): Likewise.
1479
3e572f71
PA
14802015-03-04 Pedro Alves <palves@redhat.com>
1481
72f4393d 1482 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1483 Decide whether a breakpoint triggered based on the SIGTRAP's
1484 siginfo.si_code.
72f4393d
L
1485 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1486 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1487 (linux_low_filter_event): Check for breakpoints before checking
1488 watchpoints.
1489 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1490 siginfo.si_code.
72f4393d
L
1491 (linux_stopped_by_sw_breakpoint)
1492 (linux_supports_stopped_by_sw_breakpoint)
1493 (linux_stopped_by_hw_breakpoint)
1494 (linux_supports_stopped_by_hw_breakpoint): New functions.
1495 (linux_target_ops): Install new target methods.
3e572f71 1496
1ec68e26
PA
14972015-03-04 Pedro Alves <palves@redhat.com>
1498
1499 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1500 * server.c (swbreak_feature, hwbreak_feature): New globals.
1501 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1502 (captured_main): Clear swbreak_feature and hwbreak_feature.
1503 * server.h (swbreak_feature, hwbreak_feature): Declare.
1504 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1505 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1506 supports_stopped_by_hw_breakpoint>: New fields.
1507 (target_supports_stopped_by_sw_breakpoint)
1508 (target_stopped_by_sw_breakpoint)
1509 (target_supports_stopped_by_hw_breakpoint)
1510 (target_stopped_by_hw_breakpoint): Declare.
1511
15c66dd6
PA
15122015-03-04 Pedro Alves <palves@redhat.com>
1513
1514 enum lwp_stop_reason -> enum target_stop_reason
1515 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1516 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1517 (linux_wait_1, stuck_in_jump_pad_callback)
1518 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1519 (linux_stopped_by_watchpoint):
1520 * linux-low.h (enum lwp_stop_reason): Delete.
1521 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1522 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1523
98fc70d6
YQ
15242015-03-04 Yao Qi <yao.qi@linaro.org>
1525
1526 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1527
dd2ac174
GB
15282015-03-03 Gary Benson <gbenson@redhat.com>
1529
1530 * hostio.c (handle_vFile): Fix prefix lengths.
1531
d68e53f4
MM
15322015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1533
1534 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1535 ptr_bits.
1536
bf2d68ab
AA
15372015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1538
1539 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1540 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1541 (clean): Add "rm -f" for above C files.
1542 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1543 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1544 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1545 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1546 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1547 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1548 (init_registers_s390x_vx_linux64)
1549 (init_registers_s390x_tevx_linux64)
1550 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1551 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1552 declarations.
1553 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1554 (s390_store_vxrs_high): New functions.
1555 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1556 NT_S390_VXRS_HIGH.
1557 (s390_arch_setup): Add logic for selecting one of the new target
1558 descriptions. Activate the new vector regsets if applicable.
1559 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1560 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1561 and init_registers_s390x_tevx_linux64.
1562
c966a859
PA
15632015-03-01 Pedro Alves <palves@redhat.com>
1564
1565 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1566 parameter.
1567
4180215b
PA
15682015-02-27 Pedro Alves <palves@redhat.com>
1569
1570 * linux-x86-low.c (u_debugreg_offset): New function.
1571 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1572
749bab01
PA
15732015-02-27 Pedro Alves <palves@redhat.com>
1574
1575 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1576 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1577 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1578 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1579 (ps_lsetfpregs, ps_getpid)
1580 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1581 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1582 (ps_lsetxregs, ps_plog): Declare.
1583
3c14e5a3
PA
15842015-02-27 Pedro Alves <palves@redhat.com>
1585
1586 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1587 IP_AGENT_EXPORT_FUNC.
1588 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1589 IP_AGENT_EXPORT_FUNC.
1590 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1591 (IP_AGENT_EXPORT): Delete.
1592 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1593 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1594 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1595 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1596 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1597 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1598 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1599 (traceframe_read_count, traceframe_write_count)
1600 (traceframes_created, trace_state_variables, get_raw_reg)
1601 (get_trace_state_variable_value, set_trace_state_variable_value)
1602 (ust_loaded, helper_thread_id, cmd_buf): Use
1603 IPA_SYM_EXPORTED_NAME.
1604 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1605 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1606 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1607 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1608 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1609 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1610 EXTERN_C_PUSH/EXTERN_C_POP.
1611 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1612 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1613 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1614 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1615 (traceframe_write_count, traceframe_read_count)
1616 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1617 (about_to_request_buffer_space, get_trace_state_variable_value)
1618 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1619 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1620 EXTERN_C_PUSH/EXTERN_C_POP.
1621 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1622 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1623 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1624 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1625 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1626 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1627 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1628 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1629 Define.
1630 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1631 (IP_AGENT_EXPORT_VAR_DECL): Define.
1632 (tracing): Declare.
1633 (gdb_agent_get_raw_reg): Declare.
1634
fe978cb0
PA
16352015-02-27 Tom Tromey <tromey@redhat.com>
1636 Pedro Alves <palves@redhat.com>
1637
1638 Rename symbols whose names are reserved C++ keywords throughout.
1639
3bc3d82a
PA
16402015-02-27 Pedro Alves <palves@redhat.com>
1641
1642 * Makefile.in (COMPILER): New, get it from autoconf.
1643 (CXX): Get from autoconf instead.
1644 (COMPILE.pre): Use COMPILER.
1645 (CC-LD): Rename to ...
1646 (CC_LD): ... this. Use COMPILER.
1647 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1648 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1649 * acinclude.m4: Include build-with-cxx.m4.
1650 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1651 Disable -Werror by default if building in C++ mode.
1652 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1653 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1654 the C++ compiler. Save/restore CXXFLAGS too.
1655 * configure: Regenerate.
1656
07697489
PA
16572015-02-27 Pedro Alves <palves@redhat.com>
1658
1659 * acinclude.m4: Include libiberty.m4.
1660 * configure.ac: Call libiberty_INIT.
1661 * config.in, configure: Regenerate.
1662
9beb7c4e
PA
16632015-02-26 Pedro Alves <palves@redhat.com>
1664
1665 * linux-low.c (linux_wait_1): When incrementing the PC past a
1666 program breakpoint always use the_low_target.breakpoint_len as
1667 increment, rather than the maximum between that and
1668 the_low_target.decr_pc_after_break.
1669
8090aef2
PA
16702015-02-23 Pedro Alves <palves@redhat.com>
1671
1672 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1673 thread was doing a step-over; always adjust the PC if
1674 we stepped over a permanent breakpoint.
1675 (linux_wait_1): If we stepped over breakpoint that was on top of a
1676 permanent breakpoint, manually advance the PC past it.
1677
bc9540e8
PA
16782015-02-23 Pedro Alves <palves@redhat.com>
1679
1680 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1681 modes.
1682 (x86_fill_gregset, x86_store_gregset): Use it when handling
1683 $orig_eax.
1684
2db9a427
PA
16852015-02-20 Pedro Alves <palves@redhat.com>
1686
1687 * thread-db.c: Include "nat/linux-procfs.h".
1688 (thread_db_init): Skip listing new threads if the kernel supports
1689 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1690
afa8d396
PA
16912015-02-20 Pedro Alves <palves@redhat.com>
1692
1693 * linux-low.c (status_pending_p_callback): Use ptid_match.
1694
c9587f88
AT
16952015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1696
1697 PR breakpoints/16812
1698 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1699 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1700 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1701
b05ec7a5
AT
17022015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1703
1704 PR breakpoints/15956
1705 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1706
d33501a5
MM
17072015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1708
1709 * linux-low.c (linux_low_btrace_conf): Print size.
1710 * server.c (handle_btrace_conf_general_set): New.
1711 (hanle_general_set): Call handle_btrace_conf_general_set.
1712 (handle_query): Report Qbtrace-conf:bts:size as supported.
1713
f4abbc16
MM
17142015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1715
1716 * linux-low.c (linux_low_enable_btrace): Update parameters.
1717 (linux_low_btrace_conf): New.
1718 (linux_target_ops)<to_btrace_conf>: Initialize.
1719 * server.c (current_btrace_conf): New.
1720 (handle_btrace_enable): Rename to ...
1721 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1722 to target_enable_btrace. Update comment. Update users.
1723 (handle_qxfer_btrace_conf): New.
1724 (qxfer_packets): Add btrace-conf entry.
1725 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1726 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1727 (target_ops)<read_btrace_conf>: New.
1728 (target_enable_btrace): Update parameters.
1729 (target_read_btrace_conf): New.
1730
043c3577
MM
17312015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1732
1733 * server.c (handle_btrace_general_set): Remove call to
1734 target_supports_btrace.
1735 (supported_btrace_packets): New.
1736 (handle_query): Call supported_btrace_packets.
1737 * target.h: include btrace-common.h.
1738 (btrace_target_info): Removed.
1739 (supports_btrace, target_supports_btrace): Update parameters.
1740
734b0e4b
MM
17412015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1742
1743 * Makefile.in (SFILES): Add common/btrace-common.c.
1744 (OBS): Add common/btrace-common.o.
1745 (btrace-common.o): Add build rules.
1746 * linux-low: Include btrace-common.h.
1747 (linux_low_read_btrace): Use struct btrace_data. Call
1748 btrace_data_init and btrace_data_fini.
1749
d6c146e9
PA
17502015-02-06 Pedro Alves <palves@redhat.com>
1751
1752 * thread-db.c (find_new_threads_callback): Add debug output.
1753
20ba1ce6
PA
17542015-02-04 Pedro Alves <palves@redhat.com>
1755
1756 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1757 (resume_stopped_resumed_lwps): New function.
1758 (linux_wait_for_event_filtered): Use it.
1759
8cc73a39
SDJ
17602015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1761
1762 * Makefile.in (SFILES): Add linux-personality.c.
1763 (linux-personality.o): New rule.
1764 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1765 list of objects to be built.
1766 * linux-low.c: Include nat/linux-personality.h.
1767 (linux_create_inferior): Remove code to disable address space
1768 randomization (moved to ../nat/linux-personality.c). Create
1769 cleanup to disable address space randomization.
1770
fb23d554
SDJ
17712015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1772
1773 * Makefile.in (posix-strerror.o): New rule.
1774 (mingw-strerror.o): Likewise.
1775 * configure: Regenerated.
1776 * configure.ac: Source file ../common/common.host. Initialize new
1777 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1778
cdf43629
YQ
17792015-01-14 Yao Qi <yao@codesourcery.com>
1780
1781 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1782 (ppc-linux.o): New rule.
1783 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1784 * configure.ac: AC_CHECK_FUNCS(getauxval).
1785 * config.in: Re-generated.
1786 * configure: Re-generated.
1787 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1788 ppc64_64bit_inferior_p
1789
514c5338
YQ
17902015-01-14 Yao Qi <yao@codesourcery.com>
1791
1792 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1793 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1794 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1795 (PT_ORIG_R3, PT_TRAP): Likewise.
1796 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1797 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1798 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1799
3368c1e5
JB
18002015-01-10 Joel Brobecker <brobecker@adacore.com>
1801
1802 * i387-fp.c (i387_cache_to_xsave): In look over
1803 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1804 zmmh_low_space field by use of zmmh_high_space.
1805
582511be
PA
18062015-01-09 Pedro Alves <palves@redhat.com>
1807
1808 * linux-low.c (step_over_bkpt): Move higher up in the file.
1809 (handle_extended_wait): Don't store the stop_pc here.
1810 (get_stop_pc): Adjust comments and rename to ...
1811 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1812 stopped for a software breakpoint or hardware breakpoint.
1813 (thread_still_has_status_pending_p): New function.
1814 (status_pending_p_callback): Use
1815 thread_still_has_status_pending_p. If the event is no longer
1816 interesting, resume the LWP.
1817 (handle_tracepoints): Add assert.
1818 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1819 (wstatus_maybe_breakpoint): New function.
1820 (cancel_breakpoint): Delete function.
1821 (check_stopped_by_watchpoint): New function, factored out from
1822 linux_low_filter_event.
1823 (lp_status_maybe_breakpoint): Delete function.
1824 (linux_low_filter_event): Remove filter_ptid argument.
1825 Leave thread group exits pending here. Store the LWP's stop PC.
1826 Always leave events pending.
1827 (linux_wait_for_event_filtered): Pull all events out of the
1828 kernel, and leave them all pending.
1829 (count_events_callback, select_event_lwp_callback): Consider all
1830 events.
1831 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1832 (select_event_lwp): Only give preference to the stepping LWP in
1833 all-stop mode. Adjust comments.
1834 (ignore_event): New function.
1835 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1836 references to cancel_breakpoints. Adjust to renames. Also give
1837 equal priority to all LWPs that have had events in non-stop mode.
1838 If reporting a software breakpoint event, unadjust the LWP's PC.
1839 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1840 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1841 Adjust.
1842 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1843 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1844 (linux_stopped_by_watchpoint): Adjust.
1845 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1846 * linux-low.h (enum lwp_stop_reason): New.
1847 (struct lwp_info) <stop_pc>: Adjust comment.
1848 <stopped_by_watchpoint>: Delete field.
1849 <stop_reason>: New field.
1850 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1851 * mem-break.c (software_breakpoint_inserted_here)
1852 (hardware_breakpoint_inserted_here): New function.
1853 * mem-break.h (software_breakpoint_inserted_here)
1854 (hardware_breakpoint_inserted_here): Declare.
1855 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1856 (cancel_breakpoints): Delete.
1857 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1858 (upload_fast_traceframes): Remove references to
1859 cancel_breakpoints.
1860
a33e3959
PA
18612015-01-09 Pedro Alves <palves@redhat.com>
1862
1863 * thread-db.c (find_new_threads_callback): Ignore thread if the
1864 kernel thread ID is -1.
1865
8784d563
PA
18662015-01-09 Pedro Alves <palves@redhat.com>
1867
1868 * linux-low.c (linux_attach_fail_reason_string): Move to
1869 nat/linux-ptrace.c, and rename.
1870 (linux_attach_lwp): Update comment.
1871 (attach_proc_task_lwp_callback): New function.
1872 (linux_attach): Adjust to rename and use
1873 linux_proc_attach_tgid_threads.
1874 (linux_attach_fail_reason_string): Delete declaration.
1875
76f2b779
JB
18762015-01-01 Joel Brobecker <brobecker@adacore.com>
1877
1878 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1879 * server.c (gdbserver_version): Likewise.
1880
fafcc06a
SDJ
18812014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1882
1883 * remote-utils.c: Include ctype.h.
1884 (input_interrupt): Explicitly handle the case when the char
1885 received is the NUL byte. Improve the printing of non-ASCII
1886 characters.
1887
beed38b8
JB
18882014-12-16 Joel Brobecker <brobecker@adacore.com>
1889
1890 * linux-low.c (linux_low_filter_event): Update call to
1891 linux_enable_event_reporting following the addition of
1892 a new parameter to that function.
1893
bf330350
CU
18942014-12-16 Catalin Udma <catalin.udma@freescale.com>
1895
1896 PR server/17457
1897 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1898 (AARCH64_FPCR_REGNO): Likewise.
1899 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1900 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1901 (aarch64_store_fpregset): Likewise.
1902
5227d625
JB
19032014-12-15 Joel Brobecker <brobecker@adacore.com>
1904
1905 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1906 Remove FIXME comment about assumption about N.
1907
f93b65a0
JB
19082014-12-13 Joel Brobecker <brobecker@adacore.com>
1909
1910 * configure.ac: If large-file support is disabled in GDBserver,
1911 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1912 * configure: Regenerate.
1913
e5a9158d
AA
19142014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1915
1916 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1917 warning upon ENODATA from ptrace.
1918 * linux-s390-low.c (s390_store_tdb): New.
1919 (s390_regsets): Add regset for NT_S390_TDB.
1920
feea5f36
AA
19212014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1922
1923 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1924 without a fill_function.
1925 * linux-s390-low.c (s390_fill_last_break): Remove.
1926 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1927 (s390_arch_setup): Use regset's size instead of fill_function for
1928 loop end condition.
1929
098dbe61
AA
19302014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1931
1932 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1933 the regset's store function when ptrace returned an error.
1934 * regcache.c (get_thread_regcache): Invalidate register cache
1935 before fetching inferior's registers.
1936
28eef672
AA
19372014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1938
1939 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1940 while-loop as for-loop.
1941 (regsets_store_inferior_registers): Likewise.
1942
bdca27a2
YQ
19432014-11-28 Yao Qi <yao@codesourcery.com>
1944
1945 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1946 * config.in, configure: Re-generate.
1947 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1948 is defined.
1949
9c232dda
YQ
19502014-11-21 Yao Qi <yao@codesourcery.com>
1951
1952 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1953 (AC_CHECK_HEADERS): Remove malloc.h.
1954 * configure: Re-generated.
1955 * config.in: Re-generated.
1956 * server.h: Don't include alloca.h and malloc.h.
1957 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1958 Don't include malloc.h.
1959
43968415
JB
19602014-11-17 Joel Brobecker <brobecker@adacore.com>
1961
1962 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1963 corresponding ERRNO check in same block.
1964
40e91bc7
PA
19652014-11-12 Pedro Alves <palves@redhat.com>
1966
1967 * server.c (cont_thread): Update comment.
1968 (start_inferior, attach_inferior): No longer clear cont_thread.
1969 (handle_v_cont): No longer set cont_thread.
1970 (captured_main): Clear cont_thread each time a GDB connects.
1971
c2c118cf
PA
19722014-11-12 Pedro Alves <palves@redhat.com>
1973
1974 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1975 thread, and don't resume all threads if the Hc thread has exited.
1976
78708b7c
PA
19772014-11-12 Pedro Alves <palves@redhat.com>
1978
1979 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1980 the process group instead of to a specific LWP.
1981
a2abc7de
PA
19822014-10-15 Pedro Alves <palves@redhat.com>
1983
1984 PR server/17487
1985 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1986 parameter.
1987 (arm_set_thread_context): Delete.
1988 (the_low_target): Adjust.
1989 * win32-i386-low.c (debug_registers_changed)
1990 (debug_registers_used): Delete.
1991 (update_debug_registers_callback): New function.
1992 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1993 needing to update their debug registers.
1994 (win32_get_current_dr): New function.
1995 (x86_dr_low_get_addr, x86_dr_low_get_control)
1996 (x86_dr_low_get_status): Fetch the debug register from the thread
1997 record's context.
1998 (i386_initial_stuff): Adjust.
1999 (i386_get_thread_context): Remove current_event parameter. Don't
2000 clear debug_registers_changed nor copy DR values to
2001 debug_reg_state.
2002 (i386_set_thread_context): Delete.
2003 (i386_prepare_to_resume): New function.
2004 (i386_thread_added): Mark the thread as needing to update irs
2005 debug registers.
2006 (the_low_target): Remove i386_set_thread_context and install
2007 i386_prepare_to_resume.
2008 * win32-low.c (win32_get_thread_context): Adjust.
2009 (win32_set_thread_context): Use SetThreadContext
2010 directly.
2011 (win32_prepare_to_resume): New function.
2012 (win32_require_context): New function, factored out from ...
2013 (thread_rec): ... this.
2014 (continue_one_thread): Call win32_prepare_to_resume on each thread
2015 we're about to continue.
2016 (win32_resume): Call win32_prepare_to_resume on the event thread.
2017 * win32-low.h (struct win32_thread_info)
2018 <debug_registers_changed>: New field.
2019 (struct win32_target_ops): Change prototype of set_thread_context,
2020 delete set_thread_context and add prepare_to_resume.
2021 (win32_require_context): New declaration.
2022
a442d071
GB
20232014-10-08 Gary Benson <gbenson@redhat.com>
2024
2025 * server.h: Do not include common-exceptions.h.
2026
6f1947e8
GB
20272014-10-08 Gary Benson <gbenson@redhat.com>
2028
2029 * server.h: Do not include cleanups.h.
2030
63b434a4
JH
20312014-09-30 James Hogan <james.hogan@imgtec.com>
2032
2033 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2034 mips64-dsp-linux.c.
2035
c4d9ceb6
YQ
20362014-09-23 Yao Qi <yao@codesourcery.com>
2037
2038 * linux-low.c (lp_status_maybe_breakpoint): New function.
2039 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2040 (count_events_callback): Likewise.
2041 (select_event_lwp_callback): Likewise.
2042 (cancel_breakpoints_callback): Likewise.
2043
89a5711c
DB
20442014-09-19 Don Breazeal <donb@codesourcery.com>
2045
2046 * linux-low.c (handle_extended_wait): Call
2047 linux_ptrace_get_extended_event.
2048 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2049 linux_is_extended_waitstatus.
2050
bffc0964
JB
20512014-09-16 Joel Brobecker <brobecker@adacore.com>
2052
2053 * Makefile.in (CPPFLAGS): Define.
2054 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2055 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2056
0bfdf32f
GB
20572014-09-16 Gary Benson <gbenson@redhat.com>
2058
2059 * inferiors.h (current_inferior): Renamed as...
2060 (current_thread): New variable. All uses updated.
2061 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2062 (maybe_move_out_of_jump_pad): Likewise.
2063 (cancel_breakpoint): Likewise.
2064 (linux_low_filter_event): Likewise.
2065 (wait_for_sigstop): Likewise.
2066 (linux_resume_one_lwp): Likewise.
2067 (need_step_over_p): Likewise.
2068 (start_step_over): Likewise.
2069 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2070 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2071 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2072 and save_inferior as saved_thread.
2073 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2074 saved_thread.
2075 (regcache_invalidate_thread): Likewise.
2076 * remote-utils.c (prepare_resume_reply): Likewise.
2077 * thread-db.c (thread_db_get_tls_address): Likewise.
2078 (disable_thread_event_reporting): Likewise.
2079 (remove_thread_event_breakpoints): Likewise.
2080 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2081 as saved_thread.
2082 * target.h (set_desired_inferior): Renamed as...
2083 (set_desired_thread): New declaration. All uses updated.
2084 * server.c (myresume): Updated comment to reference thread instead
2085 of inferior.
2086 (handle_serial_event): Likewise.
2087 (handle_target_event): Likewise.
2088
361c8ade
GB
20892014-09-12 Tom Tromey <tromey@redhat.com>
2090 Gary Benson <gbenson@redhat.com>
2091
2092 * regcache.h: Include common-regcache.h.
2093 (regcache_read_pc): Don't declare.
2094 * regcache.c (get_thread_regcache_for_ptid): New function.
2095
bd9269f7
GB
20962014-09-11 Tom Tromey <tromey@redhat.com>
2097 Gary Benson <gbenson@redhat.com>
2098
2099 * symbol.c: New file.
2100 * Makefile.in (SFILES): Add symbol.c.
2101 (OBS): Add symbol.o.
2102
f8c1d06b
GB
21032014-09-11 Gary Benson <gbenson@redhat.com>
2104
2105 * target.c (target_stop_ptid, target_continue_ptid): New
2106 functions.
2107
721ec300
GB
21082014-09-11 Tom Tromey <tromey@redhat.com>
2109 Gary Benson <gbenson@redhat.com>
2110
2111 * target.h: Include target/target.h.
2112 * target.c (target_read_memory, target_read_uint32)
2113 (target_write_memory): New functions.
2114
c5e92cca
GB
21152014-09-11 Gary Benson <gbenson@redhat.com>
2116
2117 * server.h (debug_hw_points): Don't declare.
2118 * server.c (debug_hw_points): Don't define. Replace all uses
2119 with show_debug_regs.
2120 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2121 all uses with show_debug_regs.
2122
2e4bb98a
EBM
21232014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2124
2125 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2126 endianness into account.
2127 (ppc_supply_ptrace_register): Likewise.
2128
ac740bc7
JH
21292014-09-03 James Hogan <james.hogan@imgtec.com>
2130
2131 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2132 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2133
97ea6506
GB
21342014-09-03 Gary Benson <gbenson@redhat.com>
2135
2136 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2137 ALL_DEBUG_ADDRESS_REGISTERS.
2138
df7e5265
GB
21392014-09-02 Gary Benson <gbenson@redhat.com>
2140
2141 * i386-low.h: Renamed as...
2142 * x86-low.h: New file. All type, function and variable name
2143 prefixes changed from "i386_" to "x86_". All references updated.
2144 * i386-low.c: Renamed as...
2145 * x86-low.c: New file. All type, function and variable name
2146 prefixes changed from "i386_" to "x86_". All references updated.
2147
ed859da7
GB
21482014-09-02 Gary Benson <gbenson@redhat.com>
2149
2150 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2151 (x86_linux_new_thread): Likewise.
2152
860789c7
GB
21532014-08-29 Gary Benson <gbenson@redhat.com>
2154
2155 * server.h (setjmp.h): Do not include.
2156 (toplevel): Do not declare.
2157 (common-exceptions.h): Include.
2158 (cleanups.h): Likewise.
2159 * server.c (toplevel): Do not define.
2160 (exit_code): New static global.
2161 (detach_or_kill_for_exit_cleanup): New function.
2162 (main): New function. Original main renamed to...
2163 (captured_main): New function.
2164 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2165
ff55e1b5
GB
21662014-08-29 Gary Benson <gbenson@redhat.com>
2167
2168 * Makefile.in (SFILES): Add common/common-exceptions.c.
2169 (OBS): Add common-exceptions.o.
2170 (common-exceptions.o): New rule.
2171 * utils.c (prepare_to_throw_exception): New function.
2172
e9bcb658
GB
21732014-08-29 Gary Benson <gbenson@redhat.com>
2174
2175 * config.in: Regenerate.
2176 * configure: Likewise.
2177
e3180625
GB
21782014-08-29 Gary Benson <gbenson@redhat.com>
2179
2180 * Makefile.in (SFILES): Add common/cleanups.c.
2181 (OBS): cleanups.o.
2182 (cleanups.o): New rule.
2183
e3d6ba5d
GB
21842014-08-29 Gary Benson <gbenson@redhat.com>
2185
2186 * utils.c (internal_vwarning): New function.
2187
7096e886
GB
21882014-08-28 Gary Benson <gbenson@redhat.com>
2189
2190 * utils.h (fatal): Remove declaration.
2191 * utils.c (fatal): Remove function.
2192
14ce3192
GB
21932014-08-28 Gary Benson <gbenson@redhat.com>
2194
2195 * tracepoint.c (gdb_agent_init): Replace fatal with
2196 perror_with_name.
2197 (initialize_tracepoint): Likewise.
2198
50278d59
GB
21992014-08-28 Gary Benson <gbenson@redhat.com>
2200
2201 * remote-utils.c (remote_prepare): Replace fatal with error.
2202
aa96c426
GB
22032014-08-28 Gary Benson <gbenson@redhat.com>
2204
2205 * linux-low.c (linux_async): Replace fatal with warning.
2206 Tidy up and return.
2207 (linux_start_non_stop): Return -1 if linux_async failed.
2208
f7160e97
GB
22092014-08-28 Gary Benson <gbenson@redhat.com>
2210
2211 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2212 gdb_assert.
2213 (i386_dr_low_get_addr): Remove vague comment.
2214 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2215 gdb_assert.
2216
38e08fca
GB
22172014-08-28 Gary Benson <gbenson@redhat.com>
2218
2219 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2220 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2221 internal_error.
2222 (linux_resume_one_lwp): Likewise.
2223 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2224 gdb_assert.
2225 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2226 with internal_error.
2227 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2228 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2229 (find_register_by_name): Replace fatal with internal_error.
2230 (find_regno): Likewise.
2231 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2232 * thread-db.c (thread_db_create_event): Likewise.
2233 (thread_db_load_search): Likewise.
2234 (try_thread_db_load_1): Likewise.
2235 * tracepoint.c (get_jump_space_head): Replace fatal with
2236 internal_error.
2237 (claim_trampoline_space): Likewise.
2238 (have_fast_tracepoint_trampoline_buffer): Likewise.
2239 (cmd_qtstart): Likewise.
2240 (stop_tracing): Likewise.
2241 (fast_tracepoint_collecting): Likewise.
2242 (target_malloc): Likewise.
2243 (download_tracepoint): Likewise.
2244 (download_trace_state_variables): Replace check with gdb_assert.
2245 (upload_fast_traceframes): Replace fatal with internal_error.
2246
34abf635
GB
22472014-08-19 Tom Tromey <tromey@redhat.com>
2248 Gary Benson <gbenson@redhat.com>
2249
2250 * Makefile.in (SFILES): Add common/common-debug.c.
2251 (OBS): Add common-debug.o.
2252 (common-debug.o): New rule.
2253 * debug.h (debug_printf): Don't declare.
2254 * debug.c (debug_printf): Renamed and rewritten as...
2255 (debug_vprintf): New function.
2256
f6e94d78
GB
22572014-08-19 Gary Benson <gbenson@redhat.com>
2258
2259 * utils.h: Do not include print-utils.h.
2260
9239eeab
GB
22612014-08-19 Tom Tromey <tromey@redhat.com>
2262 Gary Benson <gbenson@redhat.com>
2263
2264 * server.h: Add static assertion.
2265 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2266
ef87c8bb
GB
22672014-08-19 Tom Tromey <tromey@redhat.com>
2268 Gary Benson <gbenson@redhat.com>
2269
2270 * Makefile.in (SFILES): Add common/errors.c.
2271 (OBS): Add errors.o.
2272 (IPA_OBS): Add errors-ipa.o.
2273 (errors.o): New rule.
2274 (errors-ipa.o): Likewise.
2275 * utils.h (perror_with_name, error, warning): Don't declare.
2276 * utils.c (warning): Renamed and rewritten as...
2277 (vwarning): New function.
2278 (error): Renamed and rewritten as...
2279 (verror): New function.
2280 (internal_error): Renamed and rewritten as...
2281 (internal_verror): New function.
2282
bb974a24
GB
22832014-08-07 Gary Benson <gbenson@redhat.com>
2284
2285 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2286 * configure: Regenerate.
2287 * config.in: Likewise.
2288 * server.h: Do not include errno.h.
2289 * event-loop.c: Likewise.
2290 * hostio-errno.c: Likewise.
2291 * linux-low.c: Likewise.
2292 * remote-utils.c: Likewise.
2293 * spu-low.c: Likewise.
2294 * utils.c: Likewise.
2295 * gdbreplay.c: Unconditionally include errno.h.
2296
6d3d12eb
GB
22972014-08-07 Gary Benson <gbenson@redhat.com>
2298
2299 * server.h: Do not include string.h.
2300 * event-loop.c: Likewise.
2301 * linux-low.c: Likewise.
2302 * regcache.c: Likewise.
2303 * remote-utils.c: Likewise.
2304 * spu-low.c: Likewise.
2305 * utils.c: Likewise.
2306
dccbb609
GB
23072014-08-07 Gary Benson <gbenson@redhat.com>
2308
2309 * server.h: Do not include gdb_assert.h.
2310
e76df0d0
GB
23112014-08-07 Gary Benson <gbenson@redhat.com>
2312
2313 * server.h: Do not include common-utils.h.
2314
4cb9c816
GB
23152014-08-07 Gary Benson <gbenson@redhat.com>
2316
2317 * server.h: Do not include ptid.h.
2318 * notif.h: Likewise.
2319
3995eeee
GB
23202014-08-07 Gary Benson <gbenson@redhat.com>
2321
2322 * server.h: Do not include gdb_locale.h.
2323
cb9f1a9b
GB
23242014-08-07 Gary Benson <gbenson@redhat.com>
2325
2326 * server.h: Do not include gdb/signals.h.
2327 * win32-low.c: Likewise.
2328
a5fceff8
GB
23292014-08-07 Gary Benson <gbenson@redhat.com>
2330
2331 * server.h: Do not include pathmax.h.
2332
b9391142
GB
23332014-08-07 Gary Benson <gbenson@redhat.com>
2334
2335 * server.h: Do not include libiberty.h.
2336 * linux-bfin-low.c: Likewise.
2337
0e443c87
GB
23382014-08-07 Gary Benson <gbenson@redhat.com>
2339
2340 * server.h: Do not include ansidecl.h.
2341
8ebb3f56
GB
23422014-08-07 Gary Benson <gbenson@redhat.com>
2343
2344 * linux-x86-low.c: Do not include stddef.h.
2345 * lynx-ppc-low.c: Likewise.
2346 * tracepoint.c: Likewise.
2347
8980bdf6
GB
23482014-08-07 Gary Benson <gbenson@redhat.com>
2349
2350 * server.h: Do not include stdarg.h.
2351 * nto-low.c: Likewise.
2352
d7096f71
GB
23532014-08-07 Gary Benson <gbenson@redhat.com>
2354
2355 * server.h: Do not include stdlib.h.
2356 * inferiors.c: Likewise.
2357 * linux-low.c: Likewise.
2358 * regcache.c: Likewise.
2359 * spu-low.c: Likewise.
2360 * tracepoint.c: Likewise.
2361 * utils.c: Likewise.
2362
d02f550d
GB
23632014-08-07 Gary Benson <gbenson@redhat.com>
2364
2365 * server.h: Do not include stdio.h.
2366 * linux-low.c: Likewise.
2367 * remote-utils.c: Likewise.
2368 * spu-low.c: Likewise.
2369 * utils.c: Likewise.
2370 * wincecompat.c: Likewise.
2371
87f6c4e3
GB
23722014-08-06 Gary Benson <gbenson@redhat.com>
2373
2374 * regcache.c (init_register_cache): Move conditionals inside if.
2375
7089dca4
GB
23762014-08-06 Gary Benson <gbenson@redhat.com>
2377
2378 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2379
462f517e
GB
23802014-07-31 Gary Benson <gbenson@redhat.com>
2381
2382 * ax.h: Do not include server.h.
2383 * gdbthread.h: Likewise.
2384 * lynx-low.h: Likewise.
2385 * notif.h: Likewise.
2386
976411d6
GB
23872014-07-30 Gary Benson <gbenson@redhat.com>
2388
2389 * server.h: Include common-defs.h.
2390 Do not include config.h or build-gnulib-gdbserver/config.h.
2391
d41f6d8e
GB
23922014-07-30 Gary Benson <gbenson@redhat.com>
2393
2394 * hostio-errno.c: Move server.h to top of includes list.
2395 * inferiors.c: Likewise.
2396 * linux-x86-low.c: Likewise.
2397 * notif.c: Include server.h.
2398
314c6a35
TT
23992014-07-24 Tom Tromey <tromey@redhat.com>
2400 Gary Benson <gbenson@redhat.com>
2401
2402 * server.h (CORE_ADDR): Now unsigned.
2403
69ff6be5
PA
24042014-07-16 Pedro Alves <palves@redhat.com>
2405
2406 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2407
ce9e3fe7
PA
24082014-07-15 Pedro Alves <palves@redhat.com>
2409
2410 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2411 copy.
2412
e76126e8
PA
24132014-07-11 Pedro Alves <palves@redhat.com>
2414
2415 * linux-low.c (kill_wait_lwp): New function, based on
2416 kill_one_lwp_callback, but use my_waitpid directly.
2417 (kill_one_lwp_callback, linux_kill): Use it.
2418
8e9db26e
PA
24192014-06-23 Pedro Alves <palves@redhat.com>
2420
2421 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2422 before setting DR0..DR3.
2423
698b3e08
GB
24242014-06-20 Gary Benson <gbenson@redhat.com>
2425
2426 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2427 * configure: Regenerated.
2428 * config.in: Likewise.
2429
125f8a3d
GB
24302014-06-20 Gary Benson <gbenson@redhat.com>
2431
2432 * Makefile.in (SFILES): Update locations for files moved
2433 from common to nat.
2434 (object file files): Reordered.
2435
42995dbd
GB
24362014-06-20 Gary Benson <gbenson@redhat.com>
2437
2438 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2439 (i386_dr_low_set_addr): Likewise.
2440 (i386_dr_low_get_addr): Likewise.
2441 (i386_dr_low_can_set_control): Likewise.
2442 (i386_dr_low_set_control): Likewise.
2443 (i386_dr_low_get_control): Likewise.
2444 (i386_dr_low_get_status): Likewise.
2445 (i386_get_debug_register_length): Likewise.
2446 * linux-x86-low.c (i386_dr_low_set_addr):
2447 Changed signature. Made static.
2448 (i386_dr_low_get_addr): Likewise.
2449 (i386_dr_low_set_control): Likewise.
2450 (i386_dr_low_get_control): Likewise.
2451 (i386_dr_low_get_status): Likewise.
2452 (i386_dr_low): New global variable.
2453 * win32-i386-low.c (i386_dr_low_set_addr):
2454 Changed signature. Made static.
2455 (i386_dr_low_get_addr): Likewise.
2456 (i386_dr_low_set_control): Likewise.
2457 (i386_dr_low_get_control): Likewise.
2458 (i386_dr_low_get_status): Likewise.
2459 (i386_dr_low): New global variable.
2460
e1d2394b
MS
24612014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2462
2463 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2464 * Makefile.in (AR, AR_FLAGS): Define.
2465 * configure: Regenerate.
2466
3a8ee006
GB
24672014-06-19 Gary Benson <gbenson@redhat.com>
2468
2469 * Makefile.in (i386-dregs.o): New rule.
2470 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2471 * i386-low.c (target.h): Remove include.
2472 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2473 (DR_CONTROL_SHIFT): Likewise.
2474 (DR_CONTROL_SIZE): Likewise.
2475 (DR_RW_EXECUTE): Likewise.
2476 (DR_RW_WRITE): Likewise.
2477 (DR_RW_READ): Likewise.
2478 (DR_RW_IORW): Likewise.
2479 (DR_LEN_1): Likewise.
2480 (DR_LEN_2): Likewise.
2481 (DR_LEN_4): Likewise.
2482 (DR_LEN_8): Likewise.
2483 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2484 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2485 (DR_ENABLE_SIZE): Likewise.
2486 (DR_LOCAL_SLOWDOWN): Likewise.
2487 (DR_GLOBAL_SLOWDOWN): Likewise.
2488 (DR_CONTROL_RESERVED): Likewise.
2489 (I386_DR_CONTROL_MASK): Likewise.
2490 (I386_DR_VACANT): Likewise.
2491 (I386_DR_LOCAL_ENABLE): Likewise.
2492 (I386_DR_GLOBAL_ENABLE): Likewise.
2493 (I386_DR_DISABLE): Likewise.
2494 (I386_DR_SET_RW_LEN): Likewise.
2495 (I386_DR_GET_RW_LEN): Likewise.
2496 (I386_DR_WATCH_HIT): Likewise.
2497 (i386_wp_op_t): Likewise.
2498 (i386_show_dr): Likewise.
2499 (i386_length_and_rw_bits): Likewise.
2500 (i386_insert_aligned_watchpoint): Likewise.
2501 (i386_remove_aligned_watchpoint): Likewise.
2502 (i386_handle_nonaligned_watchpoint): Likewise.
2503 i386_update_inferior_debug_regs(): Likewise.
2504 (i386_dr_insert_watchpoint): Likewise.
2505 (i386_dr_remove_watchpoint): Likewise.
2506 (i386_dr_region_ok_for_watchpoint): Likewise.
2507 (i386_dr_stopped_data_address): Likewise.
2508 (i386_dr_stopped_by_watchpoint): Likewise.
2509
8f26655c
GB
25102014-06-19 Gary Benson <gbenson@redhat.com>
2511
2512 * i386-low.c (i386_dr_show): Renamed to
2513 i386_show_dr and made static. All uses updated.
2514 (i386_dr_length_and_rw_bits): Renamed to
2515 i386_length_and_rw_bits and made static.
2516 All uses updated.
2517 (i386_dr_insert_aligned_watchpoint): Renamed to
2518 i386_insert_aligned_watchpoint and made static.
2519 All uses updated.
2520 (i386_dr_remove_aligned_watchpoint): Renamed to
2521 i386_remove_aligned_watchpoint and made static.
2522 All uses updated.
2523 (i386_dr_update_inferior_debug_regs): Renamed to
2524 i386_update_inferior_debug_regs and made static.
2525 All uses updated.
2526
b9228891
GB
25272014-06-18 Gary Benson <gbenson@redhat.com>
2528
5171def3
GB
2529 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2530 (i386_dr_low_can_set_control): Likewise.
2531 (i386_get_debug_register_length): Likewise.
2532 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2533 (i386_dr_low_can_set_control): Likewise.
2534 (i386_get_debug_register_length): Likewise.
2535
25362014-06-17 Gary Benson <gbenson@redhat.com>
2537
b9228891
GB
2538 * i386-low.h (i386-dregs.h): New include.
2539 (DR_FIRSTADDR): Now in i386-dregs.h.
2540 (DR_LASTADDR): Likewise.
2541 (DR_NADDR): Likewise.
2542 (DR_STATUS): Likewise.
2543 (DR_CONTROL): Likewise.
2544 (i386_debug_reg_state): Likewise.
2545 (i386_dr_insert_watchpoint): Likewise.
2546 (i386_dr_remove_watchpoint): Likewise.
2547 (i386_dr_region_ok_for_watchpoint): Likewise.
2548 (i386_dr_stopped_data_address): Likewise.
2549 (i386_dr_stopped_by_watchpoint): Likewise.
2550 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2551
4be83cc2
GB
25522014-06-18 Gary Benson <gbenson@redhat.com>
2553
2554 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2555 i386_dr_insert_watchpoint.
2556 (i386_low_remove_watchpoint): Renamed to
2557 i386_dr_remove_watchpoint.
2558 (i386_low_region_ok_for_watchpoint): Renamed to
2559 i386_dr_region_ok_for_watchpoint.
2560 (i386_low_stopped_data_address): Renamed to
2561 i386_dr_stopped_data_address.
2562 (i386_low_stopped_by_watchpoint): Renamed to
2563 i386_dr_stopped_by_watchpoint.
2564 * i386-low.c (i386_show_dr): Renamed to
2565 i386_dr_show and made nonstatic. All uses updated.
2566 (i386_length_and_rw_bits): Renamed to
2567 i386_dr_length_and_rw_bits and made nonstatic.
2568 All uses updated.
2569 (i386_insert_aligned_watchpoint): Renamed to
2570 i386_dr_insert_aligned_watchpoint and made nonstatic.
2571 All uses updated.
2572 (i386_remove_aligned_watchpoint): Renamed to
2573 i386_dr_remove_aligned_watchpoint and made nonstatic.
2574 All uses updated.
2575 (i386_update_inferior_debug_regs): Renamed to
2576 i386_dr_update_inferior_debug_regs and made nonstatic.
2577 All uses updated.
2578 (i386_low_insert_watchpoint): Renamed to
2579 i386_dr_insert_watchpoint. All uses updated.
2580 (i386_low_remove_watchpoint): Renamed to
2581 i386_dr_remove_watchpoint. All uses updated.
2582 (i386_low_region_ok_for_watchpoint): Renamed to
2583 i386_dr_region_ok_for_watchpoint. All uses updated.
2584 (i386_low_stopped_data_address): Renamed to
2585 i386_dr_stopped_data_address. All uses updated.
2586 (i386_low_stopped_by_watchpoint): Renamed to
2587 i386_dr_stopped_by_watchpoint. All uses updated.
2588
131aa0d4
GB
25892014-06-18 Gary Benson <gbenson@redhat.com>
2590
2591 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2592 (i386_dr_low_can_set_control): Likewise.
2593 (i386_insert_aligned_watchpoint): New check.
2594
d9305f7f
GB
25952014-06-18 Gary Benson <gbenson@redhat.com>
2596
2597 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2598 Renamed to state.
2599
e927c9fc
GB
26002014-06-18 Gary Benson <gbenson@redhat.com>
2601
2602 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2603 instead of fatal and error.
2604 (i386_handle_nonaligned_watchpoint): Likewise.
2605
1b6d4134
GB
26062014-06-18 Gary Benson <gbenson@redhat.com>
2607
2608 * i386-low.c (i386_get_debug_register_length): New macro.
2609 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2610 (i386_show_dr): Use debug_printf instead of fprintf. Use
2611 phex to format values.
2612
6e62758f
GB
26132014-06-18 Gary Benson <gbenson@redhat.com>
2614
2615 * i386-low.h: Comment changes.
2616 * i386-low.c: Likewise.
2617
fc6e2f03
GB
26182014-06-18 Gary Benson <gbenson@redhat.com>
2619
2620 * i386-low.c: Whitespace changes.
2621
f9d1eeed
TT
26222014-06-12 Tom Tromey <tromey@redhat.com>
2623
2624 * utils.c (freeargv): Remove.
2625
0b04e523
TT
26262014-06-12 Tom Tromey <tromey@redhat.com>
2627
2628 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2629 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2630 (parse_debug_format_options): Likewise.
2631 (gdbserver_usage): Likewise.
2632 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2633 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2634 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2635 against libiberty.
2636 ($(LIBGNU)): Depend on libiberty.
2637 (all-lib): Recurse into all subdirs.
2638 (install-only): Invoke "install" target in subdirs.
2639 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2640 targets.
2641 * configure: Rebuild.
2642 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2643 for vasprintf, vsnprintf, or gettimeofday.
2644 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2645 srv_tgtobj.
2646
270c9937
JB
26472014-06-05 Joel Brobecker <brobecker@adacore.com>
2648
2649 * development.sh: Delete.
2650 * Makefile.in (config.status): Adjust dependency on development.sh.
2651 * configure.ac: Adjust development.sh source call.
2652 * configure: Regenerate.
2653
0a261ed8
PA
26542014-06-02 Pedro Alves <palves@redhat.com>
2655
2656 * ax.c (gdb_free_agent_expr): New function.
2657 * ax.h (gdb_free_agent_expr): New declaration.
2658 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2659 list.
2660 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2661 static.
2662 (clear_breakpoint_conditions_and_commands): New function.
2663 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2664 (clear_breakpoint_conditions_and_commands): New declaration.
2665
e9dae05e
RR
26662014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2667
2668 * linux-aarch64-low.c (asm/ptrace.h): Include.
2669
5876f503
JK
26702014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2671
2672 Fix TLS access for -static -pthread.
2673 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2674 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2675 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2676
802e8e6d
PA
26772014-05-20 Pedro Alves <palves@redhat.com>
2678
2679 * linux-aarch64-low.c (aarch64_insert_point)
2680 (aarch64_remove_point): No longer check whether the type is
2681 supported here. Adjust to new interface.
2682 (the_low_target): Install aarch64_supports_z_point_type as
2683 supports_z_point_type method.
2684 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2685 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2686 instead of a Z packet char. Adjust.
2687 (arm_supports_z_point_type): New function.
2688 (arm_insert_point, arm_remove_point): Adjust to new interface.
2689 (the_low_target): Install arm_supports_z_point_type.
2690 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2691 (cris_insert_point, cris_remove_point): Adjust to new interface.
2692 Don't check whether the type is supported here.
2693 (the_low_target): Install cris_supports_z_point_type.
2694 * linux-low.c (linux_supports_z_point_type): New function.
2695 (linux_insert_point, linux_remove_point): Adjust to new interface.
2696 * linux-low.h (struct linux_target_ops) <insert_point,
2697 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2698 raw_breakpoint pointer parameter.
2699 <supports_z_point_type>: New method.
2700 * linux-mips-low.c (mips_supports_z_point_type): New function.
2701 (mips_insert_point, mips_remove_point): Adjust to new interface.
2702 Use mips_supports_z_point_type.
2703 (the_low_target): Install mips_supports_z_point_type.
2704 * linux-ppc-low.c (the_low_target): Install NULL as
2705 supports_z_point_type method.
2706 * linux-s390-low.c (the_low_target): Install NULL as
2707 supports_z_point_type method.
2708 * linux-sparc-low.c (the_low_target): Install NULL as
2709 supports_z_point_type method.
2710 * linux-x86-low.c (x86_supports_z_point_type): New function.
2711 (x86_insert_point): Adjust to new insert_point interface. Use
2712 insert_memory_breakpoint. Adjust to new
2713 i386_low_insert_watchpoint interface.
2714 (x86_remove_point): Adjust to remove_point interface. Use
2715 remove_memory_breakpoint. Adjust to new
2716 i386_low_remove_watchpoint interface.
2717 (the_low_target): Install x86_supports_z_point_type.
2718 * lynx-low.c (lynx_target_ops): Install NULL as
2719 supports_z_point_type callback.
2720 * nto-low.c (nto_supports_z_point_type): New.
2721 (nto_insert_point, nto_remove_point): Adjust to new interface.
2722 (nto_target_ops): Install nto_supports_z_point_type.
2723 * mem-break.c: Adjust intro comment.
2724 (struct raw_breakpoint) <raw_type, size>: New fields.
2725 <inserted>: Update comment.
2726 <shlib_disabled>: Delete field.
2727 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2728 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2729 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2730 (raw_bkpt_type_to_target_hw_bp_type): New function.
2731 (find_enabled_raw_code_breakpoint_at): New function.
2732 (find_raw_breakpoint_at): New type and size parameters. Use them.
2733 (insert_memory_breakpoint): New function, based off
2734 set_raw_breakpoint_at.
2735 (remove_memory_breakpoint): New function.
2736 (set_raw_breakpoint_at): Reimplement.
2737 (set_breakpoint): New, based on set_breakpoint_at.
2738 (set_breakpoint_at): Reimplement.
2739 (delete_raw_breakpoint): Go through the_target->remove_point
2740 instead of assuming memory breakpoints.
2741 (find_gdb_breakpoint_at): Delete.
2742 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2743 (find_gdb_breakpoint): New function.
2744 (set_gdb_breakpoint_at): Delete.
2745 (z_type_supported): New function.
2746 (set_gdb_breakpoint_1): New function, loosely based off
2747 set_gdb_breakpoint_at.
2748 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2749 (delete_gdb_breakpoint_at): Delete.
2750 (delete_gdb_breakpoint_1): New function, loosely based off
2751 delete_gdb_breakpoint_at.
2752 (delete_gdb_breakpoint): New function.
2753 (clear_gdb_breakpoint_conditions): Rename to ...
2754 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2755 breakpoint.
2756 (add_condition_to_breakpoint): Make static.
2757 (add_breakpoint_condition): Take a struct breakpoint pointer
2758 instead of an address. Adjust.
2759 (gdb_condition_true_at_breakpoint): Rename to ...
2760 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2761 z_type parameter.
2762 (gdb_condition_true_at_breakpoint): Reimplement.
2763 (add_breakpoint_commands): Take a struct breakpoint pointer
2764 instead of an address. Adjust.
2765 (gdb_no_commands_at_breakpoint): Rename to ...
2766 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2767 parameter. Return true if no breakpoint was found. Change debug
2768 output.
2769 (gdb_no_commands_at_breakpoint): Reimplement.
2770 (run_breakpoint_commands): Rename to ...
2771 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2772 and change return type to boolean.
2773 (run_breakpoint_commands): New function.
2774 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2775 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2776 breakpoint. Go through the_target->remove_point instead of
2777 assuming memory breakpoint.
2778 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2779 software and hardware breakpoints.
2780 (reinsert_raw_breakpoint): Go through the_target->insert_point
2781 instead of assuming memory breakpoint.
2782 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2783 software and hardware breakpoints.
2784 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2785 Check both software and hardware breakpoints.
2786 (validate_inserted_breakpoint): Assert the breakpoint is a
2787 software breakpoint. Set the inserted flag to -1 instead of
2788 setting shlib_disabled.
2789 (delete_disabled_breakpoints): Adjust.
2790 (validate_breakpoints): Only validate software breakpoints.
2791 Adjust to inserted flag change.
2792 (check_mem_read, check_mem_write): Skip breakpoint types other
2793 than software breakpoints. Adjust to inserted flag change.
2794 * mem-break.h (enum raw_bkpt_type): New enum.
2795 (raw_breakpoint, struct process_info): Forward declare.
2796 (Z_packet_to_target_hw_bp_type): Delete declaration.
2797 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2798 (set_gdb_breakpoint, delete_gdb_breakpoint)
2799 (clear_breakpoint_conditions): New declarations.
2800 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2801 (breakpoint_inserted_here): Update comment.
2802 (add_breakpoint_condition, add_breakpoint_commands): Replace
2803 address parameter with a breakpoint pointer parameter.
2804 (gdb_breakpoint_here): Update comment.
2805 (delete_gdb_breakpoint_at): Delete.
2806 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2807 * server.c (process_point_options): Take a struct breakpoint
2808 pointer instead of an address. Adjust.
2809 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2810 delete_gdb_breakpoint.
2811 * spu-low.c (spu_target_ops): Install NULL as
2812 supports_z_point_type method.
2813 * target.h: Include mem-break.h.
2814 (struct target_ops) <prepare_to_access_memory>: Update comment.
2815 <supports_z_point_type>: New field.
2816 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2817 instead of a char. Also take a raw breakpoint pointer.
2818 * win32-arm-low.c (the_low_target): Install NULL as
2819 supports_z_point_type.
2820 * win32-i386-low.c (i386_supports_z_point_type): New function.
2821 (i386_insert_point, i386_remove_point): Adjust to new interface.
2822 (the_low_target): Install i386_supports_z_point_type.
2823 * win32-low.c (win32_supports_z_point_type): New function.
2824 (win32_insert_point, win32_remove_point): Adjust to new interface.
2825 (win32_target_ops): Install win32_supports_z_point_type.
2826 * win32-low.h (struct win32_target_ops):
2827 <supports_z_point_type>: New method.
2828 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2829 instead of a char. Also take a raw breakpoint pointer.
2830
932539e3
PA
28312014-05-20 Pedro Alves <palves@redhat.com>
2832
2833 * mem-break.h: Include break-common.h.
2834 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2835 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2836 (Z_packet_to_target_hw_bp_type): New declaration.
2837 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2838 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2839 (Z_PACKET_ACCESS_WP): Delete macros.
2840 (Z_packet_to_hw_type): Delete function.
2841 * i386-low.h: Don't include break-common.h here.
2842 (Z_packet_to_hw_type): Delete declaration.
2843 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2844 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2845 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2846 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2847 * linux-aarch64-low.c: Don't include break-common.h here.
2848 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2849 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2850 (Z_packet_to_target_hw_bp_type): Delete function.
2851 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2852 function.
2853 (mips_insert_point, mips_remove_point): Use
2854 Z_packet_to_target_hw_bp_type.
2855
4ff0d3d8
PA
28562014-05-20 Pedro Alves <palves@redhat.com>
2857
2858 * linux-aarch64-low.c: Include break-common.h.
2859 (enum target_point_type): Delete.
2860 (Z_packet_to_point_type): Rename to ...
2861 (Z_packet_to_target_hw_bp_type): ... this, and return a
2862 target_hw_bp_type instead.
2863 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2864 instead of an enum target_point_type.
2865 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2866 breakpoint type.
2867 (aarch64_dr_state_insert_one_point)
2868 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2869 (aarch64_handle_aligned_watchpoint)
2870 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2871 Take an enum target_hw_bp_type instead of an enum
2872 target_point_type.
2873 (aarch64_supports_z_point_type): New function.
2874 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2875 use Z_packet_to_target_hw_bp_type.
2876
786dc519
JB
28772014-05-20 Joel Brobecker <brobecker@adacore.com>
2878
2879 * configure.ac: Only use -Werror by default when DEVELOPMENT
2880 is true.
2881 * configure: Regenerate.
2882
9e0aa64f
JK
28832014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2884
2885 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2886 * linux-x86-low.c (X86_64_USER_REGS): New.
2887 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2888
2b577b92
YQ
28892014-04-28 Yao Qi <yao@codesourcery.com>
2890
2891 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2892 name.
2893
94611da2
PA
28942014-04-25 Pedro Alves <palves@redhat.com>
2895
2896 PR server/16255
2897 * linux-low.c (linux_attach_fail_reason_string): New function.
2898 (linux_attach_lwp): Delete.
2899 (linux_attach_lwp_1): Rename to ...
2900 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2901 argument. Remove "initial" parameter. Return int instead of
2902 void. Don't error or warn here.
2903 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2904 failure to attach to the tgid. Call warning when failing to
2905 attach to an lwp.
2906 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2907 argument. Remove "initial" parameter. Return int instead of
2908 void. Don't error or warn here.
2909 (linux_attach_fail_reason_string): New declaration.
2910 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2911 interface change. Use linux_attach_fail_reason_string.
2912
01f9f808
MS
29132014-04-24 Michael Sturm <michael.sturm@mintel.com>
2914 Walfred Tedeschi <walfred.tedeschi@intel.com>
2915
2916 * Makefile.in: Added rules to handle new files
2917 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2918 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2919 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2920 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2921 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2922 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2923 x32-avx512-linux.o.
2924 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2925 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2926 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2927 i386/x32-avx512.xml.
2928 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2929 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2930 i386/x32-avx512-linux.xml.
2931 * i387-fp.c (num_avx512_k_registers): New constant for number
2932 of K registers.
2933 (num_avx512_zmmh_low_registers): New constant for number of
2934 lower ZMM registers (0-15).
2935 (num_avx512_zmmh_high_registers): New constant for number of
2936 higher ZMM registers (16-31).
2937 (num_avx512_ymmh_registers): New contant for number of higher
2938 YMM registers (ymm16-31 added by avx521 on x86_64).
2939 (num_avx512_xmm_registers): New constant for number of higher
2940 XMM registers (xmm16-31 added by AVX512 on x86_64).
2941 (struct i387_xsave): Add space for AVX512 registers.
2942 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2943 Add code to handle AVX512 registers.
2944 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2945 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2946 prototypei from generated file.
2947 (tdesc_amd64_avx512_linux): Likewise.
2948 (init_registers_x32_avx512_linux): Likewise.
2949 (tdesc_x32_avx512_linux): Likewise.
2950 (init_registers_i386_avx512_linux): Likewise.
2951 (tdesc_i386_avx512_linux): Likewise.
2952 (x86_64_regmap): Add AVX512 registers.
2953 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2954 mask.
2955 (initialize_low_arch): Add code to initialize AVX512 registers.
2956
51aa91f9
PA
29572014-04-23 Pedro Alves <palves@redhat.com>
2958
2959 * mem-break.c (find_gdb_breakpoint_at): Make static.
2960 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2961
a4165e94
PA
29622014-04-23 Pedro Alves <palves@redhat.com>
2963
2964 * i386-low.c: Don't include break-common.h here.
2965 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2966 prototype to take target_hw_bp_type as argument instead of a Z
2967 packet char.
2968 * i386-low.h: Include break-common.h here.
2969 (Z_packet_to_hw_type): Declare.
2970 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2971 prototypes.
2972 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2973 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2974 (x86_remove_point): Convert the packet number to a
2975 target_hw_bp_type before calling i386_low_remove_watchpoint.
2976 * win32-i386-low.c (i386_insert_point): Convert the packet number
2977 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2978 (i386_remove_point): Convert the packet number to a
2979 target_hw_bp_type before calling i386_low_remove_watchpoint.
2980
b8acf843
PA
29812014-04-23 Pedro Alves <palves@redhat.com>
2982
2983 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2984
d708bcd1
PA
29852014-04-10 Pedro Alves <palves@redhat.com>
2986
2987 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2988 Check if the condition or command is NULL before checking if the
2989 breakpoint is known. On success, return true.
2990 * mem-break.h (add_breakpoint_condition): Document return.
2991 (add_breakpoint_commands): Add describing comment.
2992 * server.c (skip_to_semicolon): New function.
2993 (process_point_options): Use it.
2994
2eec7d5b
PA
29952014-04-09 Pedro Alves <palves@redhat.com>
2996
2997 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2998 to lwpid_of.
2999
fa96cb38
PA
30002014-02-27 Pedro Alves <palves@redhat.com>
3001
3002 PR 12702
3003 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3004 macros.
3005 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3006 output.
3007 (last_thread_of_process_p): Take a PID argument instead of a
3008 thread pointer.
3009 (linux_wait_for_lwp): Delete.
3010 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3011 functions.
3012 (linux_low_filter_event): New function, party factored out from
3013 linux_wait_for_event.
3014 (linux_wait_for_event): Rename to ...
3015 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3016 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3017 sigsuspend. Check for zombie leaders.
3018 (linux_wait_for_event): Reimplement as wrapper around
3019 linux_wait_for_event_filtered.
3020 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3021 a normal or signal exit is seen, it's the whole process exiting.
3022 (wait_for_sigstop): No longer a for_each_inferior callback.
3023 Rewrite on top of linux_wait_for_event_filtered.
3024 (stop_all_lwps): Call wait_for_sigstop directly.
3025 * server.c (resume, handle_target_event): Handle
3026 TARGET_WAITKIND_NO_RESUMED.
3027
d763de10
JB
30282014-02-26 Joel Brobecker <brobecker@adacore.com>
3029
3030 * win32-low.c (psapi_get_dll_name,
3031 * win32_CreateToolhelp32Snapshot): Delete.
3032 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3033 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3034 Delete.
3035 (handle_load_dll): Add function description.
3036 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3037
850a0f76
JB
30382014-02-26 Joel Brobecker <brobecker@adacore.com>
3039
3040 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3041 Add comment.
3042 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3043 base address when calling win32_add_one_solib.
3044 (handle_load_dll): Delete local variable load_addr.
3045 Remove 0x1000 offset applied to DLL base address when calling
3046 win32_add_one_solib.
3047 (handle_unload_dll): Add comment.
3048
f25b3fc3
JB
30492014-02-26 Joel Brobecker <brobecker@adacore.com>
3050
3051 * win32-low.c (win32_add_all_dlls): Renames
3052 win32_ensure_ntdll_loaded. Rewrite function documentation.
3053 Adjust implementation to always load all DLLs.
3054 Add 0x1000 offset to DLL base address when calling
3055 win32_add_one_solib.
3056 (child_initialization_done): New static global.
3057 (do_initial_child_stuff): Set child_initialization_done to
3058 zero during child initialization, and 1 after. Replace call
3059 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3060 Add comment.
3061 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3062 (handle_unload_dll): Add function documentation.
3063 (get_child_debug_event): Ignore load and unload DLL events
3064 during child initialization.
3065
d86d4aaf
DE
30662014-02-20 Doug Evans <dje@google.com>
3067
3bc32da3 3068 Remove global all_lwps.
d86d4aaf
DE
3069 * inferiors.h (ptid_of): Move here from linux-low.h.
3070 (pid_of, lwpid_of): Ditto.
3071 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3072 parameter is a struct thread_info * now.
3073 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3074 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3075 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3076 directly.
3077 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3078 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3079 * linux-arm-low.c (update_registers_callback): Update, "entry"
3080 parameter is a struct thread_info * now.
3081 Fetch lwpid from current_inferior directly.
3082 (arm_insert_point): Pass &all_threads to find_inferior instead of
3083 &all_lwps.
3084 (arm_remove_point): Ditto.
3085 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3086 (arm_prepare_to_resume): Fetch pid from thread.
3087 (arm_read_description): Fetch lwpid from current_inferior directly.
3088 * linux-low.c (all_lwps): Delete.
3089 (delete_lwp): Delete call to remove_inferior.
3090 (handle_extended_wait): Fetch lwpid from thread.
3091 (add_lwp): Don't set lwp->entry.id. Remove call to
3092 add_inferior_to_list.
3093 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3094 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3095 (kill_one_lwp_callback): Ditto.
3096 (linux_kill): Don't dereference NULL pointer.
3097 Fetch ptid,lwpid from thread.
3098 (get_detach_signal): Fetch ptid from thread.
3099 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3100 Simplify call to regcache_invalidate_thread.
3101 (delete_lwp_callback): Update, "entry" parameter is a
3102 struct thread_info * now. Fetch pid from thread.
3103 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3104 (status_pending_p_callback): Update, "entry" parameter is a
3105 struct thread_info * now. Fetch ptid from thread.
3106 (find_lwp_pid): Update, "entry" parameter is a
3107 struct thread_info * now.
3108 (linux_wait_for_lwp): Fetch pid from thread.
3109 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3110 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3111 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3112 (dequeue_one_deferred_signal): Ditto.
3113 (cancel_breakpoint): Fetch ptid from current_inferior.
3114 (linux_wait_for_event): Pass &all_threads to find_inferior,
3115 not &all_lwps. Fetch ptid, lwpid from thread.
3116 (count_events_callback): Update, "entry" parameter is a
3117 struct thread_info * now.
3118 (select_singlestep_lwp_callback): Ditto.
3119 (select_event_lwp_callback): Ditto.
3120 (cancel_breakpoints_callback): Ditto.
3121 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3122 not &all_lwps.
3123 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3124 (unsuspend_one_lwp): Update, "entry" parameter is a
3125 struct thread_info * now.
3126 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3127 not &all_lwps.
3128 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3129 Fetch lwpid from thread, not lwp.
3130 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3131 Pass &all_threads to find_inferior, not &all_lwps.
3132 (send_sigstop): Fetch lwpid from thread, not lwp.
3133 (send_sigstop_callback): Update, "entry" parameter is a
3134 struct thread_info * now.
3135 (suspend_and_send_sigstop_callback): Ditto.
3136 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3137 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3138 struct thread_info * now.
3139 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3140 from thread, lwp.
3141 (lwp_running): Update, "entry" parameter is a
3142 struct thread_info * now.
3143 (stop_all_lwps): Fetch ptid from thread.
3144 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3145 (linux_resume_one_lwp): Fetch lwpid from thread.
3146 (linux_set_resume_request): Update, "entry" parameter is a
3147 struct thread_info * now. Fetch pid, lwpid from thread.
3148 (resume_status_pending_p): Update, "entry" parameter is a
3149 struct thread_info * now.
3150 (need_step_over_p): Ditto. Fetch lwpid from thread.
3151 (start_step_over): Fetch lwpid from thread.
3152 (linux_resume_one_thread): Update, "entry" parameter is a
3153 struct thread_info * now. Fetch lwpid from thread.
3154 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3155 (proceed_one_lwp): Update, "entry" parameter is a
3156 struct thread_info * now. Fetch lwpid from thread.
3157 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3158 struct thread_info * now.
3159 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3160 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3161 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3162 directly.
3163 (regsets_store_inferior_registers): Ditto.
3164 (fetch_register, store_register): Ditto.
3165 (linux_read_memory, linux_write_memory): Ditto.
3166 (linux_request_interrupt): Ditto.
3167 (linux_read_auxv): Ditto.
3168 (linux_xfer_siginfo): Ditto.
3169 (linux_qxfer_spu): Ditto.
3170 (linux_qxfer_libraries_svr4): Ditto.
3171 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3172 moved to inferiors.h.
3173 (get_lwp): Delete.
3174 (get_thread_lwp): Update.
3175 (struct lwp_info): Delete member "entry". Simplify comment for
3176 member "thread".
3177 (all_lwps): Delete.
3178 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3179 current_inferior directly.
3180 (update_watch_registers_callback): Update, "entry" parameter is a
3181 struct thread_info * now. Fetch pid from thread.
3182 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3183 (mips_insert_point): Fetch lwpid from current_inferior.
3184 Pass &all_threads to find_inferior, not &all_lwps.
3185 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3186 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3187 directly.
3188 (mips_stopped_data_address): Ditto.
3189 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3190 directly.
3191 * linux-tile-low.c (tile_arch_setup): Ditto.
3192 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3193 (update_debug_registers_callback): Update, "entry" parameter is a
3194 struct thread_info * now. Fetch pid from thread.
3195 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3196 Pass &all_threads to find_inferior, not &all_lwps.
3197 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3198 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3199 Pass &all_threads to find_inferior, not &all_lwps.
3200 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3201 (i386_dr_low_get_status): Ditto.
3202 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3203 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3204 (x86_linux_read_description): Ditto.
3205 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3206
3b8361aa
DE
32072014-02-20 Doug Evans <dje@google.com>
3208
3209 * inferiors.c (get_first_inferior): Fix buglet.
3210
f7667f0d
DE
32112014-02-19 Doug Evans <dje@google.com>
3212
3213 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3214 * inferiors.c (add_thread): Change result type to struct thread_info *.
3215 All callers updated.
3216 (add_lwp): Call add_thread here instead of in callers.
3217 All callers updated.
3218 * linux-low.h (get_lwp_thread): Rewrite.
3219 (struct lwp_info): New member "thread".
3220
b3312d80
DE
32212014-02-19 Doug Evans <dje@google.com>
3222
3223 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3224 All callers updated.
3225
ecc6f45c
DE
32262014-02-19 Doug Evans <dje@google.com>
3227
3228 * inferiors.c (add_thread): Fix whitespace.
3229
649ebbca
DE
32302014-02-19 Doug Evans <dje@google.com>
3231
3232 * dll.c (clear_dlls): Replace accessing list implemention details
3233 with API function.
3234 * gdbthread.h (get_first_thread): Declare.
3235 * inferiors.c (for_each_inferior_with_data): New function.
3236 (get_first_thread): New function.
3237 (find_thread_ptid): Simplify.
3238 (get_first_inferior): New function.
3239 (clear_list): Delete.
3240 (one_inferior_p): New function.
3241 (clear_inferior_list): New function.
3242 (clear_inferiors): Update.
3243 * inferiors.h (for_each_inferior_with_data): Declare.
3244 (clear_inferior_list): Declare.
3245 (one_inferior_p): Declare.
3246 (get_first_inferior): Declare.
3247 * linux-low.c (linux_wait_for_event): Replace accessing list
3248 implemention details with API function.
3249 * server.c (target_running): Ditto.
3250 (accumulate_file_name_length): New function.
3251 (emit_dll_description): New function.
3252 (handle_qxfer_libraries): Replace accessing list implemention
3253 details with API function.
3254 (handle_qxfer_threads_worker): New function.
3255 (handle_qxfer_threads_proper): Replace accessing list implemention
3256 details with API function.
3257 (handle_query): Ditto.
3258 (visit_actioned_threads_callback_ftype): New typedef.
3259 (visit_actioned_threads_data): New struct.
3260 (visit_actioned_threads): Rewrite to be find_inferior callback.
3261 (resume): Call find_inferior.
3262 (handle_status): Replace accessing list implemention
3263 details with API function.
3264 (process_serial_event): Replace accessing list implemention details
3265 with API function.
3266 * target.c (set_desired_inferior): Replace accessing list implemention
3267 details with API function.
3268 * tracepoint.c (same_process_p): New function.
3269 (gdb_agent_about_to_close): Replace accessing list implemention
3270 details with API function.
3271 * win32-low.c (child_delete_thread): Replace accessing list
3272 implemention details with API function.
3273 (match_dll_by_basename): New function.
3274 (dll_is_loaded_by_basename): New function.
3275 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3276 details call to dll_is_loaded_by_basename.
3277
80894984
DE
32782014-02-19 Doug Evans <dje@google.com>
3279
3280 * dll.h (struct dll_info): Add comment.
3281 * gdbthread.h (struct thread_info): Add comment.
3282 (current_ptid): Simplify.
3283 * inferiors.c (add_process): Update.
3284 (remove_process): Update.
3285 * inferiors.h (struct process_info): Rename member "head" to "entry".
3286 * linux-low.c (delete_lwp): Update.
3287 (add_lwp): Update.
3288 (last_thread_of_process_p): Update.
3289 (kill_one_lwp_callback, linux_kill): Update.
3290 (status_pending_p_callback): Update.
3291 (wait_for_sigstop): Update. Simplify read of ptid.
3292 (start_step_over): Update.
3293 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3294 (get_lwp_thread): Update.
3295 (struct lwp_info): Rename member "head" to "entry".
3296 * regcache.h (inferior_list_entry): Delete.
3297 * server.c (kill_inferior_callback): Update.
3298 (detach_or_kill_inferior_callback): Update.
3299 (print_started_pid): Update.
3300 (print_attached_pid): Update.
3301 (process_serial_event): Simplify read of ptid.
3302 * thread-db.c (thread_db_create_event): Update.
3303 (thread_db_get_tls_address): Update.
3304 * win32-low.c (current_inferior_ptid): Simplify.
3305
46917d26
TT
33062014-02-19 Tom Tromey <tromey@redhat.com>
3307
3308 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3309 argument.
3310 (target_supports_btrace): Update.
3311
0759a81e
YQ
33122014-02-14 Yao Qi <yao@codesourcery.com>
3313
3314 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3315 (rsp-low-ipa.o): New target.
3316
a7191e8b
TT
33172014-02-12 Tom Tromey <tromey@redhat.com>
3318
3319 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3320 convert_ascii_to_int.
3321 * regcache.c (registers_to_string): Likewise.
3322 * remote-utils.c (decode_M_packet): Likewise.
3323 * server.c (process_serial_event): Likewise.
3324
ff0e980e
TT
33252014-02-12 Tom Tromey <tromey@redhat.com>
3326
3327 * server.c (handle_query, handle_v_run): Use hex2bin, not
3328 unhexify.
3329 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3330
e9371aff
TT
33312014-02-12 Tom Tromey <tromey@redhat.com>
3332
3333 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3334 convert_int_to_ascii.
3335 * regcache.c (registers_to_string, collect_register_as_string):
3336 Likewise.
3337 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3338 Likewise.
3339 * server.c (process_serial_event): Likewise.
3340 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3341 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3342
971dc0b8
TT
33432014-02-12 Tom Tromey <tromey@redhat.com>
3344
3345 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3346 bin2hex, not hexify.
3347 * tracepoint.c (cmd_qtstatus): Likewise.
3348
0a822afb
TT
33492014-02-12 Tom Tromey <tromey@redhat.com>
3350
3351 * remote-utils.c (monitor_output): Pass explicit length to
3352 hexify.
3353
9c3d6531
TT
33542014-02-12 Tom Tromey <tromey@redhat.com>
3355
3356 * tracepoint.c: Include rsp-low.h.
3357 * server.c: Include rsp-low.h.
3358 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3359 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3360 declare.
3361 * remote-utils.c: Include rsp-low.h.
3362 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3363 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3364 (convert_int_to_ascii, convert_ascii_to_int): Move to
3365 common/rsp-low.c.
3366 * regcache.c: Include rsp-low.h.
3367 * ax.c: Include rsp-low.h.
3368 * Makefile.in (SFILES): Add common/rsp-low.c.
3369 (OBS): Add rsp-low.o.
3370 (rsp-low.o): New target.
3371
01fd3ea5
TT
33722014-02-12 Tom Tromey <tromey@redhat.com>
3373
3374 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3375 Include print-utils.h.
3376 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3377 (plongest, thirty_two, phex_nz): Remove.
3378 * Makefile.in (SFILES): Add common/print-utils.c.
3379 (OBS): Add print-utils.o.
3380 (print-utils-ipa.o): New target.
3381 (print-utils.o): New target.
3382 (IPA_OBJS): Add print-utils-ipa.o.
3383
e99dc820
TT
33842014-02-06 Tom Tromey <tromey@redhat.com>
3385
3386 * Makefile.in (SFILES): Fix indentation.
3387
ee1e2d4f
DE
33882014-02-05 Doug Evans <dje@google.com>
3389
3390 * linux-low.c (linux_wait_for_event): Improve comment.
3391 (linux_wait_1): Keep current_inferior in sync with event_child.
3392
f5a02773
DE
33932014-01-22 Doug Evans <dje@google.com>
3394
3395 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3396
87ce2a04
DE
33972014-01-22 Doug Evans <dje@google.com>
3398
3399 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3400 * configure: Regenerate.
3401 * config.in: Regenerate.
3402 * Makefile.in (SFILES): Add debug.c.
3403 (OBS): Add debug.o.
3404 * debug.c: New file.
3405 * debug.h: New file.
3406 * linux-aarch64-low.c (*): Update all debugging printfs to use
3407 debug_printf instead of fprintf.
3408 * linux-arm-low.c (*): Ditto.
3409 * linux-cris-low.c (*): Ditto.
3410 * linux-crisv32-low.c (*): Ditto.
3411 * linux-m32r-low.c (*): Ditto.
3412 * linux-sparc-low.c (*): Ditto.
3413 * linux-x86.c (*): Ditto.
3414 * linux-low.c (*): Ditto.
3415 (linux_wait_1): Add calls to debug_enter, debug_exit.
3416 (linux_wait): Remove redundant debugging printf.
3417 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3418 (linux_resume, unstop_all_lwps): Ditto.
3419 * mem-break.c (*): Update all debugging printfs to use
3420 debug_printf instead of fprintf.
3421 * remote-utils.c (*): Ditto.
3422 * thread-db.c (*): Ditto.
3423 * server.c #include <ctype.h>, "gdb_vecs.h".
3424 (debug_threads): Moved to debug.c.
3425 (*): Update all debugging printfs to use debug_printf instead of
3426 fprintf.
3427 (start_inferior): Replace call to fflush with call to debug_flush.
3428 (monitor_show_help): Mention set debug-format.
3429 (parse_debug_format_options): New function.
3430 (handle_monitor_command): Handle "monitor set debug-format".
3431 (gdbserver_usage): Mention --debug-format.
3432 (main): Parse --debug-format.
3433 * server.h (debug_threads): Declaration moved to debug.h.
3434 #include "debug.h".
3435 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3436 trace_debug_1 that uses debug_printf.
3437 (tracepoint_look_up_symbols): Update all debugging printfs to use
3438 debug_printf instead of fprintf.
3439
e671835b
BS
34402014-01-20 Baruch Siach <baruch@tkos.co.il>
3441
3442 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3443 sys/ptrace.h.
3444
b5737fa9
PA
34452014-01-17 Pedro Alves <palves@redhat.com>
3446
ea38d2a9 3447 PR build/16445
c7faa97a
PA
3448 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3449 defined after including gdb_proc_service.h.
b5737fa9 3450
40ed484e
DE
34512014-01-16 Doug Evans <dje@google.com>
3452
3453 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3454 (match_dll): Use it.
3455
969c39fb
MM
34562014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3457
3458 * target.h (target_ops) <read_btrace>: Change parameters and
3459 return type to allow error reporting.
3460 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3461 trace reading errors on.
3462 * linux-low.c (linux_low_read_btrace): Pass trace reading
3463 errors on.
3464 (linux_low_disable_btrace): New.
3465
ab7f45ba
DE
34662014-01-15 Doug Evans <dje@google.com>
3467
3468 * inferiors.c (thread_id_to_gdb_id): Delete.
3469 * inferiors.h (thread_id_to_gdb_id): Delete.
3470
66af0f44
EZ
34712014-01-13 Eli Zaretskii <eliz@gnu.org>
3472
3473 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3474 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3475 versions.
3476
9939e131
PA
34772014-01-08 Pedro Alves <palves@redhat.com>
3478
3479 * server.c (handle_status): Don't discard previous queued stop
3480 replies or thread's pending status here.
3481 (main) <disconnection>: Do it here instead.
3482
b7ea362b
PA
34832014-01-08 Pedro Alves <palves@redhat.com>
3484
3485 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3486 * server.c (visit_actioned_threads, handle_pending_status): New
3487 function.
3488 (handle_v_cont): Factor out parts to ...
3489 (resume): ... this new function. If in all-stop, and a thread
3490 being resumed has a pending status, report it without actually
3491 resuming.
3492 (myresume): Adjust to use the new 'resume' function.
3493 (clear_pending_status_callback, set_pending_status_callback)
3494 (find_status_pending_thread_callback): New functions.
3495 (handle_status): Handle the case of multiple threads having
3496 interesting statuses to report. Report threads' real last signal
3497 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3498 with an interesting thread to report the status for, instead of
3499 always reporting the status of the first thread.
3500
28498c42
JB
35012014-01-01 Joel Brobecker <brobecker@adacore.com>
3502
3503 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3504 * gdbreplay.c (gdbreplay_version): Likewise.
3505
f45c82da
YZ
35062013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3507
3508 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3509 iov.iov_len with the real length in use.
3510
379a5e2d
JB
35112013-12-13 Joel Brobecker <brobecker@adacore.com>
3512
3513 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3514 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3515 for all targets that use win32-low.c.
3516 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3517 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3518
4210d83e
PA
35192013-12-13 Pedro Alves <palves@redhat.com>
3520
3521 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3522 if equal to TARGET_WAITKIND_LOADED.
3523 * win32-low.c (cached_status): New static global.
3524 (win32_wait): Add declaration.
3525 (do_initial_child_stuff): Flush all initial pending debug events
3526 up to the initial breakpoint.
3527 (win32_wait): If CACHED_STATUS was set, return that instead
3528 of doing a real wait. Remove the code resuming the execution
3529 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3530 during the initial phase. Also remove the code changing
3531 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3532 TARGET_WAITKIND_STOPPED.
3533
e7f0d979
YQ
35342013-12-11 Yao Qi <yao@codesourcery.com>
3535
3536 * notif.c (handle_notif_ack): Return 0 if no notification
3537 matches.
3538
ebcf782c
DE
35392013-11-20 Doug Evans <dje@google.com>
3540
3541 * linux-low.c (linux_set_resume_request): Fix comment.
3542
20ad9378
DE
35432013-11-20 Doug Evans <dje@google.com>
3544
3545 * linux-low.c (resume_status_pending_p): Tweak comment.
3546
a196ebeb
WT
35472013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3548
3549 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3550 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3551 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3552 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3553 (srv_amd64_regobj): Add amd64-mpx.o.
3554 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3555 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3556 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3557 * i387-fp.c (num_pl_bnd_register) Added constant.
3558 (num_pl_bnd_cfg_registers) Added constant.
3559 (struct i387_xsave) Added reserved area and MPX fields.
3560 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3561 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3562 function.
3563 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3564 (init_registers_amd64_mpx_linux): Declare new function.
3565 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3566 (x86_64_regmap): Add MPX registers.
3567 (x86_linux_read_description): Add MPX case.
3568 (initialize_low_arch): Initialize MPX targets.
3569
0080a2f6
TT
35702013-11-18 Tom Tromey <tromey@redhat.com>
3571
3572 * configure: Rebuild.
3573 * configure.ac: Don't check for stdlib.h.
3574 * gdbreplay.c: Unconditionally include stdlib.h.
3575
2978b111
TT
35762013-11-18 Tom Tromey <tromey@redhat.com>
3577
3578 * config.in: Rebuild.
3579 * configure: Rebuild.
3580 * configure.ac: Don't use AC_HEADER_DIRENT.
3581
a3d08894
TT
35822013-11-18 Tom Tromey <tromey@redhat.com>
3583
3584 * server.h: Don't check HAVE_STRING_H.
3585 * gdbreplay.c: Don't check HAVE_STRING_H.
3586 * configure: Rebuild.
3587
0a5dd17d
TT
35882013-11-18 Tom Tromey <tromey@redhat.com>
3589
3590 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3591 LIBGNU.
3592
1bd2f0ba
TT
35932013-11-08 Tom Tromey <tromey@redhat.com>
3594
3595 * configure, config.in: Rebuild.
3596 * configure.ac: Remove unused configury.
3597
3266f10b
TT
35982013-11-08 Tom Tromey <tromey@redhat.com>
3599
3600 * acinclude.m4: Include common.m4, codeset.m4.
3601 * configure, config.in: Rebuild.
3602 * configure.ac: Use GDB_AC_COMMON.
3603
6682d959
AA
36042013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3605
3606 * linux-s390-low.c (HWCAP_S390_TE): New define.
3607 (s390_arch_setup): Consider the TE field in the HWCAP for
3608 determining 'have_regset_tdb'.
3609
fd0a4d76
SDJ
36102013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3611
3612 PR gdb/16014
3613 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3614 call to sizeof.
3615
1a3d890b
PA
36162013-10-02 Pedro Alves <palves@redhat.com>
3617
3618 * server.c (process_serial_event): Don't output "GDBserver
3619 exiting" if GDB is connected through stdio.
3620 * target.c (mywait): Likewise, be silent if GDB is connected
3621 through stdio.
3622
97ad4581
JB
36232013-10-01 Joel Brobecker <brobecker@adacore.com>
3624
3625 * lynx-low.c (lynx_add_threads_after_attach): New function.
3626 (lynx_attach): Remove call to add_thread. Add call to
3627 lynx_add_threads_after_attach instead.
3628
5b4e221c
MF
36292013-09-28 Mike Frysinger <vapier@gentoo.org>
3630
3631 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3632 * config.in, configure: Regenerated.
3633
ee47b2f8
YQ
36342013-09-18 Yao Qi <yao@codesourcery.com>
3635
3636 PR server/15959
3637 * server.c (start_inferior): Clear 'resume_info'.
3638
d6707650 36392013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3640
d6707650
JW
3641 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3642 for each register.
3643
9243dd0e 36442013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3645
9243dd0e
JW
3646 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3647 linux-tile-low.o to srv_tgtobj.
3648
c623a6ef
WN
36492013-09-16 Will Newton <will.newton@linaro.org>
3650
3651 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3652 out regs.
3653
fb71d39e
PA
36542013-09-06 Pedro Alves <palves@redhat.com>
3655
3656 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3657 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3658 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3659 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3660 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3661 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3662
8e7e9910
PA
36632013-09-06 Pedro Alves <palves@redhat.com>
3664
3665 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3666 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3667
7c3a12ca
PA
36682013-09-06 Pedro Alves <palves@redhat.com>
3669
3670 * linux-amd64-ipa.c: Include tracepoint.h.
3671 * linux-i386-ipa.c: Include tracepoint.h.
3672
8eb3d7b6
RW
36732013-09-06 Ricard Wanderlof <ricardw@axis.com>
3674
3675 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3676 (ps_get_thread_area): New function.
3677
eddddb9d
RW
36782013-09-06 Ricard Wanderlof <ricardw@axis.com>
3679
3680 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3681 (initialize_low_arch): Call init_registers_crisv32 rather than
3682 init_register_crisv32.
3683
533b0600
PA
36842013-09-05 Pedro Alves <palves@redhat.com>
3685
3686 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3687 to ...
3688 * hostio.h: ... this new file.
3689 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3690 win32-low.c: Include hostio.h.
3691
0ce3d3b5
PA
36922013-09-05 Pedro Alves <palves@redhat.com>
3693
3694 * server.h (gdb_client_data, handler_func, callback_handler_func)
3695 (delete_file_handler, add_file_handler, append_callback_event)
3696 (delete_callback_event, start_event_loop, initialize_event_loop):
3697 Move to event-loop.h and include it.
3698 * event-loop.h: New file.
3699
799cdc37
PA
37002013-09-05 Pedro Alves <palves@redhat.com>
3701
3702 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3703 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3704 (loaded_dll, unloaded_dll): Move to ...
3705 * dll.h: ... this new file.
3706 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3707
6a6bbd9d
PA
37082013-09-05 Pedro Alves <palves@redhat.com>
3709
3710 * server.h (current_process, get_thread_process, all_processes)
3711 (add_inferior_to_list, for_each_inferior, current_inferior)
3712 (remove_inferior, add_process, remove_process, find_process_pid)
3713 (have_started_inferiors_p, have_attached_inferiors_p)
3714 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3715 (clear_inferiors, find_inferior, find_inferior_id)
3716 (inferior_target_data, set_inferior_target_data)
3717 (inferior_regcache_data, set_inferior_regcache_data): Move to
3718 inferiors.h, and include it.
3719 * inferiors.h: New file.
3720
f699aaba
PA
37212013-09-05 Pedro Alves <palves@redhat.com>
3722
3723 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3724 Move ...
72f4393d 3725 * ax.h: ... here.
f699aaba 3726
c144c7a0
PA
37272013-09-05 Pedro Alves <palves@redhat.com>
3728
3729 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3730 tracepoint.h.
3731 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3732 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3733 (handle_tracepoint_general_set, handle_tracepoint_query)
3734 (tracepoint_finished_step, tracepoint_was_hit)
3735 (release_while_stepping_state_list, current_traceframe)
3736 (in_readonly_region, traceframe_read_mem)
3737 (fetch_traceframe_registers, traceframe_read_sdata)
3738 (traceframe_read_info, struct fast_tpoint_collect_status)
3739 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3740 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3741 (supply_fast_tracepoint_registers)
3742 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3743 (ipa_tdesc, claim_trampoline_space)
3744 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3745 (agent_mem_read, agent_get_trace_state_variable_value)
3746 (agent_set_trace_state_variable_value, agent_tsv_read)
3747 (agent_mem_read_string, get_raw_reg_func_addr)
3748 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3749 * tracepoint.h: ... this new file.
3750
ff42e6ab
PA
37512013-09-05 Pedro Alves <palves@redhat.com>
3752
3753 * server.h (perror_with_name, error, fatal, warning, paddress)
3754 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3755 include it.
3756 * utils.h: New file.
3757
541af0f4
PA
37582013-09-05 Pedro Alves <palves@redhat.com>
3759
3760 * server.h (remote_debug, noack_mode, transport_is_reliable)
3761 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3762 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3763 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3764 (write_enn, initialize_async_io, enable_async_io)
3765 (disable_async_io, check_remote_input_interrupt_request)
3766 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3767 (dead_thread_notify, prepare_resume_reply)
3768 (decode_address_to_semicolon, decode_address, decode_m_packet)
3769 (decode_M_packet, decode_X_packet, decode_xfer_write)
3770 (decode_search_memory_packet, unhexify, hexify)
3771 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3772 (look_up_one_symbol, relocate_instruction)
3773 (monitor_output): Move to remote-utils.h, and include it.
3774 * remote-utils.h: New file.
3775
eebdf26b
PA
37762013-09-05 Pedro Alves <palves@redhat.com>
3777
3778 * server.h (_): Delete.
3779
3aafd2ff
PA
37802013-09-02 Pedro Alves <palves@redhat.com>
3781
3782 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3783 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3784 allocated.
3785 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3786
cee83bcb
PM
37872013-09-02 Pierre Muller <muller@sourceware.org>
3788
3789 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3790 or WriteProcessMemory complete successfully and handle
3791 ERROR_PARTIAL_COPY error.
3792
9a13b2fa
PA
37932013-09-02 Pedro Alves <palves@redhat.com>
3794
3795 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3796 error instead of EIO.
3797
602e3198
JK
37982013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3799
3800 PR server/15604
3801 * linux-low.c: Include filestuff.h.
3802 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3803 * lynx-low.c: Include filestuff.h.
3804 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3805 * server.c: Include filestuff.h.
3806 (main): Call notice_open_fds.
3807 * spu-low.c: Include filestuff.h.
3808 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3809
96d7229d
LM
38102013-08-22 Luis Machado <lgustavo@codesourcery.com>
3811
3812 * Makefile.in: Explain why ../target and ../nat are not
3813 listed as include file search paths.
3814 (linux-waitpid.o): New object file rule.
3815 * configure.srv (srv_native_linux_obj): New variable.
3816 Replace all occurrences of linux native object files with
3817 $srv_native_linux_obj.
3818 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3819 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3820 (linux_enable_event_reporting): Remove declaration.
3821 (my_waitpid): Moved to common/linux-waitpid.c.
3822 (linux_wait_for_event): Pass ptid when calling
3823 linux_enable_event_reporting.
3824 (linux_supports_tracefork_flag): Remove.
3825 (linux_enable_event_reporting): Likewise.
3826 (linux_tracefork_grandchild): Remove.
3827 (STACK_SIZE): Moved to common/linux-ptrace.c.
3828 (linux_tracefork_child): Remove.
3829 (linux_test_for_tracefork): Remove.
3830 (linux_look_up_symbols): Call linux_supports_traceclone.
3831 (initialize_low): Remove call to linux_test_for_tracefork.
3832 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3833 common/linux-ptrace.h.
3834 (PTRACE_TYPE_ARG4): Likewise.
3835 Include linux-ptrace.h.
3836
32940073
PA
38372013-08-21 Pedro Alves <palves@redhat.com>
3838
3839 * config.in: Renegerate.
3840
33b60d58 38412013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3842
33b60d58
LM
3843 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3844 (SFILES): Remove $(srcdir)/common/target-common.c and
3845 add $(srcdir)/target/waitstatus.c.
3846 (OBS): Remove target-common.o and add waitstatus.o.
3847 (server_h): Remove $(srcdir)/../common/target-common.h and
3848 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3849 and $(srcdir)/../target/waitstatus.h.
3850 (target-common.o): Remove.
3851 (waitstatus.o): New target object file.
3852 * target.h: Do not include target-common.h and
3853 include target/resume.h, target/wait.h and
3854 target/waitstatus.h.
3855
b8e1b30e
LM
38562013-08-13 Luis Machado <lgustavo@codesourcery.com>
3857
3858 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3859 to PTRACE_TYPE_ARG3.
3860 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3861 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3862 PTRACE_TYPE_ARG4.
3863 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3864 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3865
7a60ad40
YQ
38662013-07-27 Jie Zhang <jie@codesourcery.com>
3867 Daniel Jacobowitz <dan@codesourcery.com>
3868 Yao Qi <yao@codesourcery.com>
3869
3870 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3871 (mips-linux-watch.o): New rule.
3872 (mips_linux_watch_h): New variable.
3873 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3874 srv_tgtobj.
3875 * linux-mips-low.c: Include mips-linux-watch.h.
3876 (struct arch_process_info, struct arch_lwp_info): New.
3877 (update_watch_registers_callback): New function.
3878 (mips_linux_new_process, mips_linux_new_thread) New functions.
3879 (mips_linux_prepare_to_resume, mips_insert_point): New
3880 functions.
3881 (mips_remove_point, mips_stopped_by_watchpoint): New
3882 functions.
3883 (rsp_bp_type_to_target_hw_bp_type): New function.
3884 (mips_stopped_data_address): New function.
3885 (the_low_target): Add watchpoint support functions.
3886
de6f69ad
YQ
38872013-07-27 Yao Qi <yao@codesourcery.com>
3888
3889 * i386-low.c: Include break-common.h.
3890 (enum target_hw_bp_type): Remove.
3891
3360c0bf
LM
38922013-07-24 Luis Machado <lgustavo@codesourcery.com>
3893
3894 * Makefile.in (SFILES): /common/target-common.c.
3895 (OBS): Add target-common.o.
3896 (server_h): Add $(srcdir)/../common/target-common.h.
3897 (target-common.o): New target.
3898 * server.c (queue_stop_reply_callback): Free
3899 status string after use.
3900 * target.c (target_waitstatus_to_string): Remove.
3901 * target.h: Include target-common.h.
3902 (resume_kind): Likewise.
3903 (target_waitkind): Likewise.
3904 (target_waitstatus): Likewise.
3905 (TARGET_WNOHANG): Likewise.
3906
bd885420
YQ
39072013-07-04 Yao Qi <yao@codesourcery.com>
3908
3909 * Makefile.in (host_alias): Use @host_noncanonical@.
3910 (target_alias): Use @target_noncanonical@.
3911 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3912 ACX_NONCANONICAL_HOST.
3913 * configure: Regenerated.
3914
3915 Revert:
3916 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3917
3918 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3919 * configure: Rebuild.
3920 * Makefile.in (version_host, version_target): Get from configure.
3921 (version.c): Use $(version_host) and $(version_target).
3922
17ef446e
PA
39232013-07-03 Pedro Alves <palves@redhat.com>
3924
3925 * Makefile.in (config.status): Depend on development.sh.
3926 * acinclude.m4: Include libmcheck.m4.
3927 * configure: Regenerate.
3928
7a9a7487
MG
39292013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3930
3931 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3932 attribute inside the parentheses.
3933 (winapi_DebugSetProcessKillOnExit): Ditto.
3934 (winapi_DebugBreakProcess): Ditto.
3935 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3936
49b64de6
MG
39372013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3938
3939 * notif.h (notif_event): Add a dummy member to avoid compiler
3940 errors.
3941
d5749ee7
PA
39422013-07-01 Pedro Alves <palves@redhat.com>
3943
3944 * hostio.c (HOSTIO_PATH_MAX): Define.
3945 (require_filename, handle_open, handle_unlink, handle_readlink):
3946 Use it.
3947
d8d2a3ee
PA
39482013-07-01 Pedro Alves <palves@redhat.com>
3949
3950 * server.h: Include "pathmax.h".
3951 * linux-low.c: Don't include sys/param.h.
3952 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3953 MAXPATHLEN.
3954 * win32-low.c: Don't include sys/param.h.
3955 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3956
bc7dea8d
PA
39572013-07-01 Pedro Alves <palves@redhat.com>
3958
3959 * event-loop.c: Don't check HAVE_UNISTD_H before including
3960 <unistd.h>.
3961 * gdbreplay.c: Likewise.
3962 * remote-utils.c: Likewise.
3963 * server.c: Likewise.
3964 * configure.ac: Don't check for unistd.h.
3965 * configure: Regenerate.
3966
d6c2da54
TT
39672013-06-28 Tom Tromey <tromey@redhat.com>
3968
3969 * Makefile.in (version.c): Use version.in, not
3970 common/version.in.
3971
257b6bec
MG
39722013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3973
3974 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3975 * configure: Rebuild.
3976 * Makefile.in (version_host, version_target): Get from configure.
3977 (version.c): Use $(version_host) and $(version_target).
3978
86ebe149
DK
39792013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3980
3981 Fix trace-status to output user name without trailing colon.
3982 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3983
f30aa5af
DK
39842013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3985
3986 Fix trace-status to output proper start-time and stop-time.
3987 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3988 output start time and stop time in hex as gdb expects.
3989
28a93511
YQ
39902013-06-26 Pedro Alves <pedro@codesourcery.com>
3991
3992 * tracepoint.c (build_traceframe_info_xml): Output trace state
3993 variables present in the trace buffer.
3994
01208463
TT
39952013-06-24 Tom Tromey <tromey@redhat.com>
3996
3997 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3998 create-version.sh.
3999 (version.o): Remove.
4000 * gdbreplay.c: Include version.h.
4001 (version, host_name): Don't declare.
4002 * server.h: Include version.h.
4003 (version, host_name): Don't declare.
4004
760256f9
PA
40052013-06-12 Pedro Alves <palves@redhat.com>
4006
4007 * linux-x86-low.c (linux_is_elf64): Delete global.
4008 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4009 with local linux_pid_exe_is_elf_64_file use.
4010
030031ee
PA
40112013-06-11 Pedro Alves <palves@redhat.com>
4012
4013 * linux-low.c (regset_disabled, disable_regset): New functions.
4014 (regsets_fetch_inferior_registers)
4015 (regsets_store_inferior_registers): Use them.
4016 (initialize_regsets_info); Don't allocate the disabled_regsets
4017 array here.
4018 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4019 comment.
4020
5da6eb0a
PA
40212013-06-11 Pedro Alves <palves@redhat.com>
4022
4023 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4024 xmalloc.
4025
7e5aaa09
PA
40262013-06-11 Pedro Alves <palves@redhat.com>
4027
4028 * linux-x86-low.c (initialize_low_arch): Call
4029 init_registers_x32_avx_linux.
4030
d878444c
JK
40312013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4032
4033 Fix compatibility with Android Bionic.
4034 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4035 it is not empty.
4036
3aee8918
PA
40372013-06-07 Pedro Alves <palves@redhat.com>
4038
5f2b57b5 4039 PR server/14823
3aee8918
PA
4040 * Makefile.in (OBS): Add tdesc.o.
4041 (IPA_OBJS): Add tdesc-ipa.o.
4042 (tdesc-ipa.o): New rule.
4043 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4044 interface.
4045 * linux-low.c (new_inferior): Delete.
4046 (disabled_regsets, num_regsets): Delete.
4047 (linux_add_process): Adjust to set the new per-process
4048 new_inferior flag.
4049 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4050 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4051 was a stop. When calling arch_setup, switch the current inferior
4052 to the thread that got an event.
4053 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4054 (regsets_fetch_inferior_registers)
4055 (regsets_store_inferior_registers): New regsets_info parameter.
4056 Adjust to use it.
4057 (linux_register_in_regsets): New regs_info parameter. Adjust to
4058 use it.
4059 (register_addr, fetch_register, store_register): New usrregs_info
4060 parameter. Adjust to use it.
4061 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4062 parameter regs_info. Adjust to use it.
4063 (linux_fetch_registers): Get the current inferior's regs_info, and
4064 adjust to use it.
4065 (linux_store_registers): Ditto.
4066 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4067 (initialize_low): Don't initialize the target_regsets here. Call
4068 initialize_low_arch.
4069 * linux-low.h (target_regsets): Delete declaration.
4070 (struct regsets_info): New.
4071 (struct usrregs_info): New.
4072 (struct regs_info): New.
4073 (struct process_info_private) <new_inferior>: New field.
4074 (struct linux_target_ops): Delete the num_regs, regmap, and
4075 regset_bitmap fields. New field regs_info.
4076 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4077 * i387-fp.c (num_xmm_registers): Delete.
4078 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4079 calls to new interface.
4080 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4081 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4082 Infer the number of xmm registers from the regcache's target
4083 description.
4084 * i387-fp.h (num_xmm_registers): Delete.
4085 * inferiors.c (add_thread): Don't install the thread's regcache
4086 here.
4087 * proc-service.c (gregset_info): Fetch the current inferior's
4088 regs_info. Adjust to use it.
4089 * regcache.c: Include tdesc.h.
4090 (register_bytes, reg_defs, num_registers)
4091 (gdbserver_expedite_regs): Delete.
4092 (get_thread_regcache): If the thread doesn't have a regcache yet,
4093 create one, instead of aborting gdbserver.
4094 (regcache_invalidate_one): Rename to ...
4095 (regcache_invalidate_thread): ... this.
4096 (regcache_invalidate_one): New.
4097 (regcache_invalidate): Only invalidate registers of the current
4098 process.
4099 (init_register_cache): Add target_desc parameter, and use it.
4100 (new_register_cache): Ditto. Assert the target description has a
4101 non zero registers_size.
4102 (regcache_cpy): Add assertions. Adjust.
4103 (realloc_register_cache, set_register_cache): Delete.
4104 (registers_to_string, registers_from_string): Adjust.
4105 (find_register_by_name, find_regno, find_register_by_number)
4106 (register_cache_size): Add target_desc parameter, and use it.
4107 (free_register_cache_thread, free_register_cache_thread_one)
4108 (regcache_release, register_cache_size): New.
4109 (register_size): Add target_desc parameter, and use it.
4110 (register_data, supply_register, supply_register_zeroed)
4111 (supply_regblock, supply_register_by_name, collect_register)
4112 (collect_register_as_string, collect_register_by_name): Adjust.
4113 * regcache.h (struct target_desc): Forward declare.
4114 (struct regcache) <tdesc>: New field.
4115 (init_register_cache, new_register_cache): Add target_desc
4116 parameter.
4117 (regcache_invalidate_thread): Declare.
4118 (regcache_invalidate_one): Delete declaration.
4119 (regcache_release): Declare.
4120 (find_register_by_number, register_cache_size, register_size)
4121 (find_regno): Add target_desc parameter.
4122 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4123 declarations.
4124 * remote-utils.c: Include tdesc.h.
4125 (outreg, prepare_resume_reply): Adjust.
4126 * server.c: Include tdesc.h.
4127 (gdbserver_xmltarget): Delete declaration.
4128 (get_features_xml, process_serial_event): Adjust.
4129 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4130 declare.
4131 (struct process_info) <tdesc>: New field.
4132 (ipa_tdesc): Declare.
4133 * tdesc.c: New file.
4134 * tdesc.h: New file.
4135 * tracepoint.c: Include tdesc.h.
4136 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4137 (get_context_regcache): Adjust to pass ipa_tdesc down.
4138 (do_action_at_tracepoint): Adjust to get the register cache size
4139 from the context regcache's description.
4140 (traceframe_walk_blocks): Adjust to get the register cache size
4141 from the current trace frame's description.
4142 (traceframe_get_pc): Adjust to get current trace frame's
4143 description and pass it down.
4144 (gdb_collect): Adjust to get the register cache size from the
4145 IPA's description.
4146 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4147 (gdbserver_xmltarget): Delete.
4148 (initialize_low_tracepoint): Set the ipa's target description.
4149 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4150 (initialize_low_tracepoint): Set the ipa's target description.
4151 * linux-x86-low.c: Include tdesc.h.
4152 [__x86_64__] (is_64bit_tdesc): New.
4153 (ps_get_thread_area, x86_get_thread_area): Use it.
4154 (i386_cannot_store_register): Rename to ...
4155 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4156 (i386_cannot_fetch_register): Rename to ...
4157 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4158 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4159 to new interface.
4160 (target_regsets): Rename to ...
4161 (x86_regsets): ... this.
4162 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4163 interface.
4164 (x86_siginfo_fixup): Use is_64bit_tdesc.
4165 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4166 (tdesc_x32_avx_linux, tdesc_x32_linux)
4167 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4168 Declare.
4169 (x86_linux_update_xmltarget): Delete.
4170 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4171 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4172 (AMD64_LINUX_USER64_CS): New.
4173 (x86_linux_read_description): New, based on
4174 x86_linux_update_xmltarget.
4175 (same_process_callback): New.
4176 (x86_arch_setup_process_callback): New.
4177 (x86_linux_update_xmltarget): New.
4178 (x86_regsets_info): New.
4179 (amd64_linux_regs_info): New.
4180 (i386_linux_usrregs_info): New.
4181 (i386_linux_regs_info): New.
4182 (x86_linux_regs_info): New.
4183 (x86_arch_setup): Reimplement.
4184 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4185 (x86_emit_ops): Ditto.
4186 (the_low_target): Adjust. Install x86_linux_regs_info,
4187 x86_cannot_fetch_register, and x86_cannot_store_register.
4188 (initialize_low_arch): New.
4189 * linux-ia64-low.c (tdesc_ia64): Declare.
4190 (ia64_fetch_register): Adjust.
4191 (ia64_usrregs_info, regs_info): New globals.
4192 (ia64_regs_info): New function.
4193 (the_low_target): Adjust.
4194 (initialize_low_arch): New function.
4195 * linux-sparc-low.c (tdesc_sparc64): Declare.
4196 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4197 Adjust.
4198 (sparc_arch_setup): New function.
4199 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4200 (the_low_target): Adjust.
4201 (initialize_low_arch): New function.
4202 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4203 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4204 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4205 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4206 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4207 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4208 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4209 (tdesc_powerpc_isa205_vsx64l): Declare.
4210 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4211 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4212 (ppc_set_pc, ppc_get_hwcap): Adjust.
4213 (ppc_usrregs_info): Forward declare.
4214 (!__powerpc64__) ppc_regmap_adjusted: New global.
4215 (ppc_arch_setup): Adjust to the current process'es target
4216 description.
4217 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4218 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4219 (ppc_store_evrregset): Adjust.
4220 (target_regsets): Rename to ...
4221 (ppc_regsets): ... this, and make static.
4222 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4223 (ppc_regs_info): New function.
4224 (the_low_target): Adjust.
4225 (initialize_low_arch): New function.
4226 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4227 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4228 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4229 (tdesc_s390x_linux64v2): Declare.
4230 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4231 (s390_fill_gregset, s390_store_last_break): Adjust.
4232 (target_regsets): Rename to ...
4233 (s390_regsets): ... this, and make static.
4234 (s390_get_pc, s390_set_pc): Adjust.
4235 (s390_get_hwcap): New target_desc parameter, and use it.
4236 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4237 (s390_arch_setup): Adjust to set the current process'es target
4238 description. Don't adjust the regmap.
4239 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4240 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4241 (regs_info_3264): New globals.
4242 (s390_regs_info): New function.
4243 (the_low_target): Adjust.
4244 (initialize_low_arch): New function.
4245 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4246 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4247 [__mips64] (init_registers_mips_linux)
4248 (init_registers_mips_dsp_linux): Delete defines.
4249 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4250 (have_dsp): New global.
4251 (mips_read_description): New, based on mips_arch_setup.
4252 (mips_arch_setup): Reimplement.
4253 (get_usrregs_info): New function.
4254 (mips_cannot_fetch_register, mips_cannot_store_register)
4255 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4256 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4257 (target_regsets): Rename to ...
4258 (mips_regsets): ... this, and make static.
4259 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4260 (dsp_regs_info, regs_info): New globals.
4261 (mips_regs_info): New function.
4262 (the_low_target): Adjust.
4263 (initialize_low_arch): New function.
4264 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4265 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4266 Declare.
4267 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4268 (arm_read_description): New, with bits factored from
4269 arm_arch_setup.
4270 (arm_arch_setup): Reimplement.
4271 (target_regsets): Rename to ...
4272 (arm_regsets): ... this, and make static.
4273 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4274 (arm_regs_info): New function.
4275 (the_low_target): Adjust.
4276 (initialize_low_arch): New function.
4277 * linux-m68k-low.c (tdesc_m68k): Declare.
4278 (target_regsets): Rename to ...
4279 (m68k_regsets): ... this, and make static.
4280 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4281 (m68k_regs_info): New function.
4282 (m68k_arch_setup): New function.
4283 (the_low_target): Adjust.
4284 (initialize_low_arch): New function.
4285 * linux-sh-low.c (tdesc_sharch): Declare.
4286 (target_regsets): Rename to ...
4287 (sh_regsets): ... this, and make static.
4288 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4289 (sh_regs_info, sh_arch_setup): New functions.
4290 (the_low_target): Adjust.
4291 (initialize_low_arch): New function.
4292 * linux-bfin-low.c (tdesc_bfin): Declare.
4293 (bfin_arch_setup): New function.
4294 (bfin_usrregs_info, regs_info): New globals.
4295 (bfin_regs_info): New function.
4296 (the_low_target): Adjust.
4297 (initialize_low_arch): New function.
4298 * linux-cris-low.c (tdesc_cris): Declare.
4299 (cris_arch_setup): New function.
4300 (cris_usrregs_info, regs_info): New globals.
4301 (cris_regs_info): New function.
4302 (the_low_target): Adjust.
4303 (initialize_low_arch): New function.
4304 * linux-cris-low.c (tdesc_crisv32): Declare.
4305 (cris_arch_setup): New function.
4306 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4307 (cris_regs_info): New function.
4308 (the_low_target): Adjust.
4309 (initialize_low_arch): New function.
4310 * linux-m32r-low.c (tdesc_m32r): Declare.
4311 (m32r_arch_setup): New function.
4312 (m32r_usrregs_info, regs_info): New globals.
4313 (m32r_regs_info): Adjust.
4314 (initialize_low_arch): New function.
4315 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4316 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4317 (tic6x_usrregs_info): Forward declare.
4318 (tic6x_read_description): New function, based on ...
4319 (tic6x_arch_setup): ... this. Reimplement.
4320 (target_regsets): Rename to ...
4321 (tic6x_regsets): ... this, and make static.
4322 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4323 (tic6x_regs_info): New function.
4324 (the_low_target): Adjust.
4325 (initialize_low_arch): New function.
4326 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4327 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4328 (target_regsets): Rename to ...
4329 (xtensa_regsets): ... this, and make static.
4330 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4331 globals.
4332 (xtensa_arch_setup, xtensa_regs_info): New functions.
4333 (the_low_target): Adjust.
4334 (initialize_low_arch): New function.
4335 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4336 (nios2_arch_setup): Set the current process'es tdesc.
4337 (target_regsets): Rename to ...
4338 (nios2_regsets): ... this.
4339 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4340 (nios2_regs_info): New function.
4341 (the_low_target): Adjust.
4342 (initialize_low_arch): New function.
a261b8f5
PA
4343 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4344 (aarch64_arch_setup): Set the current process'es tdesc.
4345 (target_regsets): Rename to ...
4346 (aarch64_regsets): ... this.
4347 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4348 (aarch64_regs_info): New function.
4349 (the_low_target): Adjust.
4350 (initialize_low_arch): New function.
3aee8918
PA
4351 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4352 globals.
4353 (target_regsets): Rename to ...
4354 (tile_regsets): ... this.
4355 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4356 (tile_regs_info): New function.
4357 (tile_arch_setup): Set the current process'es tdesc.
4358 (the_low_target): Adjust.
4359 (initialize_low_arch): New function.
4360 * spu-low.c (tdesc_spu): Declare.
4361 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4362 * win32-arm-low.c (tdesc_arm): Declare.
4363 (arm_arch_setup): New function.
4364 (the_low_target): Install arm_arch_setup instead of
4365 init_registers_arm.
4366 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4367 (init_windows_x86): Rename to ...
4368 (i386_arch_setup): ... this. Set `win32_tdesc'.
4369 (the_low_target): Adjust.
4370 * win32-low.c (win32_tdesc): New global.
4371 (child_add_thread): Don't create the thread cache here.
4372 (do_initial_child_stuff): Set the new process'es tdesc.
4373 * win32-low.h (struct target_desc): Forward declare.
4374 (win32_tdesc): Declare.
4375 * lynx-i386-low.c (tdesc_i386): Declare global.
4376 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4377 * lynx-low.c (lynx_tdesc): New global.
4378 (lynx_add_process): Set the new process'es tdesc.
4379 * lynx-low.h (struct target_desc): Forward declare.
4380 (lynx_tdesc): Declare global.
4381 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4382 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4383 * nto-low.c (nto_tdesc): New global.
4384 (do_attach): Set the new process'es tdesc.
4385 * nto-low.h (struct target_desc): Forward declare.
4386 (nto_tdesc): Declare.
4387 * nto-x86-low.c (tdesc_i386): Declare.
4388 (nto_x86_arch_setup): Set `nto_tdesc'.
4389
b1fbec62
GB
43902013-06-04 Gary Benson <gbenson@redhat.com>
4391
4392 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4393 to qSupported response when appropriate.
4394 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4395 with nonzero-length annex.
4396 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4397 arguments supplied in annex.
4398
d1ec4ce7
DE
43992013-05-31 Doug Evans <dje@google.com>
4400
ac44adcb 4401 PR server/15594
d1ec4ce7
DE
4402 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4403 64 bits in 64-cross-32 environment.
4404
9b25f2d3
PA
44052013-05-28 Pedro Alves <palves@redhat.com>
4406
4407 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4408 (aarch64-without-fpu.c): Delete rule.
4409 * configure.srv (aarch64*-*-linux*): Remove references to
4410 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4411 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4412 declaration.
4413
6740dc9c
PA
44142013-05-24 Pedro Alves <palves@redhat.com>
4415
4416 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4417 instead of strchr/decode_address. Error if the range isn't split
4418 with a ','. Don't assume there's be a ':' in the action.
4419
c2d6af84
PA
44202013-05-23 Yao Qi <yao@codesourcery.com>
4421 Pedro Alves <palves@redhat.com>
4422
4423 * linux-low.c (lwp_in_step_range): New function.
4424 (linux_wait_1): If the thread was range stepping and stopped
4425 outside the stepping range, report the stop to GDB. Otherwise,
4426 continue stepping. Add range stepping debug output.
4427 (linux_set_resume_request): Copy the step range from the resume
4428 request to the lwp.
4429 (linux_supports_range_stepping): New.
4430 (linux_target_ops) <supports_range_stepping>: Set to
4431 linux_supports_range_stepping.
4432 * linux-low.h (struct linux_target_ops)
4433 <supports_range_stepping>: New field.
4434 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4435 * linux-x86-low.c (x86_supports_range_stepping): New.
4436 (the_low_target) <supports_range_stepping>: Set to
4437 x86_supports_range_stepping.
4438 * server.c (handle_v_cont): Handle 'r' action.
4439 (handle_v_requests): Append ";r" if the target supports range
4440 stepping.
4441 * target.h (struct thread_resume) <step_range_start,
4442 step_range_end>: New fields.
4443 (struct target_ops) <supports_range_stepping>:
4444 New field.
4445 (target_supports_range_stepping): New macro.
4446
58794e1a
JB
44472013-05-17 Joel Brobecker <brobecker@adacore.com>
4448
4449 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4450 confusion in comment.
4451
d631c5a7
JB
44522013-05-17 Joel Brobecker <brobecker@adacore.com>
4453
4454 * lynx-low.c (struct process_info_private): New type.
4455 (lynx_add_process): New function.
4456 (lynx_create_inferior, lynx_attach): Replace calls to
4457 add_process by calls to lynx_add_process.
4458 (lynx_resume): If PTID is null, then try using
4459 current_process()->private->last_wait_event_ptid.
4460 Add comments.
4461 (lynx_clear_inferiors): Delete. The contents of that function
4462 has been inlined in lynx_mourn;
4463 (lynx_wait_1): Save the ptid in the process's private data.
4464 (lynx_mourn): Free the process' private data. Replace call
4465 to lynx_clear_inferiors by call to clear_inferiors.
4466
96f7a20f
YQ
44672013-05-17 Yao Qi <yao@codesourcery.com>
4468
4469 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4470 the right place.
4471
db0dfaa0
LM
44722013-05-16 Luis Machado <lgustavo@codesourcery.com>
4473
4474 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4475 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4476 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4477 PT_TEXT_END_ADDR guards. Update comments.
4478 (linux_target_op) <read_offsets>: Conditionally define to
4479 linux_read_offsets if the target is UCLIBC and if it defines
4480 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4481
68f5f838
SL
44822013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4483 Andrew Jenner <andrew@codesourcery.com>
4484
4485 * Makefile.in (SFILES): Add linux-nios2-low.c.
4486 (clean): Add action to delete nios2-linux.c.
4487 (nios2-linux.c): New rule.
4488 * configure.srv: Add nios2*-*-linux*.
4489 * linux-nios2-low.c: New.
4490
1ebff1fd
HAQ
44912013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4492
4493 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4494
f6150862
HZ
44952013-04-25 Hui Zhu <hui@codesourcery.com>
4496
4497 PR gdb/15186
f6150862
HZ
4498 * ax.c (ax_printf): Add fflush.
4499
614c279d
TT
45002013-04-22 Tom Tromey <tromey@redhat.com>
4501
4502 * Makefile.in (SFILES): Add filestuff.c.
4503 (OBS): Add filestuff.o.
4504 (filestuff.o): New target.
4505 * config.in, configure: Rebuild.
4506 * configure.ac: Check for fdwalk, pipe2.
4507
7d4e5717
PA
45082013-04-17 Pedro Alves <palves@redhat.com>
4509
4510 * configure.ac (USE_THREAD_DB): Delete variable.
4511 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4512 Don't AC_SUBST USE_THREAD_DB.
4513 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4514 * config.in, configure: Regenerate.
4515
d5c93e41
PA
45162013-04-16 Pedro Alves <palves@redhat.com>
4517
4518 * linux-low.h (struct lwp_info) <thread_known>: Move under
4519 the USE_THREAD_DB #ifdef.
4520
04f5fe89
PA
45212013-04-16 Pedro Alves <palves@redhat.com>
4522
4523 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4524 (linux-low.o): Delete rule.
4525 * linux-low.h: Always include "gdb_thread_db.h" instead of
4526 conditionally including thread_db.h.
4527 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4528 HAVE_THREAD_DB_H.
4529
480b27bf
JK
45302013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4531
4532 * Makefile.in (install-only): Fix make install regression.
4533
43662968
JK
45342013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4535
4536 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4537 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4538 installation.
4539 * gdbserver.1: Remove.
4540
3e74e146
PA
45412013-03-22 Pedro Alves <palves@redhat.com>
4542
4543 * linux-low.c (handle_extended_wait): Don't call
4544 linux_enable_event_reporting.
4545
a8347a2a
TT
45462013-03-15 Tony Theodore <tonyt@logyst.com>
4547
4548 PR build/9098:
4549 * Makefile.in (SHELL): Use @SHELL@.
4550
eeb56fa7
SDJ
45512013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4552
4553 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4554 compiler warning.
4555
4fa7e2ff
JB
45562013-03-13 Joel Brobecker <brobecker@adacore.com>
4557
4558 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4559 Remove extraneous NULL element.
4560
8ddb1965
YQ
45612013-03-13 Yao Qi <yao@codesourcery.com>
4562
4563 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4564 'V' block in trace frame.
4565
9accd112
MM
45662013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4567
4568 * target.h (struct target_ops): Add btrace ops.
4569 (target_supports_btrace): New macro.
4570 (target_enable_btrace): New macro.
4571 (target_disable_btrace): New macro.
4572 (target_read_btrace): New macro.
4573 * gdbthread.h (struct thread_info): Add btrace field.
4574 * server.c: Include btrace-common.h.
4575 (handle_btrace_general_set): New function.
4576 (handle_btrace_enable): New function.
4577 (handle_btrace_disable): New function.
4578 (handle_general_set): Call handle_btrace_general_set.
4579 (handle_qxfer_btrace): New function.
4580 (struct qxfer qxfer_packets[]): Add btrace entry.
4581 * inferiors.c (remove_thread): Disable btrace.
4582 * linux-low: Include linux-btrace.h.
4583 (linux_low_enable_btrace): New function.
4584 (linux_low_read_btrace): New function.
4585 (linux_target_ops): Add btrace ops.
4586 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4587 Add srv_linux_btrace=yes.
4588 (x86_64-*-linux*): Add linux-btrace.o.
4589 Add srv_linux_btrace=yes.
4590 * configure.ac: Define HAVE_LINUX_BTRACE.
4591 * config.in: Regenerated.
4592 * configure: Regenerated.
4593
5cc22e4c
MM
45942013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4595
4596 * server.c (handle_qxfer): Preserve error message if -3 is
4597 returned.
4598 (qxfer): Document the -3 return value.
4599
7c97f91e
MM
46002013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4601
4602 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4603 (linux_btrace_h): New variable.
4604 (linux-btrace.o): New rule.
4605
be9a119c 46062013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4607 Hafiz Abid Qadeer <abidh@codesourcery.com>
4608
4609 * tracepoint.c (trace_buffer_size): New global.
4610 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4611 (init_trace_buffer): Change to one-argument function. Allocate
4612 trace buffer memory.
4613 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4614 handle QTBuffer:size packet.
4615 (cmd_bigqtbuffer_size): New function.
4616 (initialize_tracepoint): Call init_trace_buffer with
4617 DEFAULT_TRACE_BUFFER_SIZE.
4618 * server.c (handle_query): Add QTBuffer:size in the
4619 supported packets.
4620
e64f7499
YQ
46212013-03-07 Yao Qi <yao@codesourcery.com>
4622
4623 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4624 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4625 of -1.
4626 (cmd_qtsp): Adjust condition. Do post increment.
4627 Set cur_action and cur_step_action back to 0.
4628
f0ae6fc3
PA
46292013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4630
4631 PR server/15236
4632 * linux-low.c (linux_write_memory): Return early success if LEN is
4633 zero.
4634
b5b0b0af
CV
46352013-03-05 Corinna Vinschen <vinschen@redhat.de>
4636
334ad4a8 4637 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4638
589bc927
TT
46392013-02-28 Tom Tromey <tromey@redhat.com>
4640
4641 * configure.ac: Invoke AC_SYS_LARGEFILE.
4642 * configure, config.in: Rebuild.
4643
dfe07582
CV
46442013-02-28 Corinna Vinschen <vinschen@redhat.com>
4645
4646 * win32-low.c: Throughout, fix format strings and casts of
4647 printf-like functions to avoid type related warnings on all
4648 platforms.
4649 (get_child_debug_event): Print dwDebugEventCode as hex since
4650 that's how it's usually documented.
4651
736cd585
YQ
46522013-02-28 Yao Qi <yao@codesourcery.com>
4653
4654 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4655 pulongest.
4656
e1f58301
JW
46572013-02-27 Jiong Wang <jiwang@tilera.com>
4658
4659 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4660 (reg-tilegx32.c): New rule.
4661 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4662 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4663 different register info initializer according to elf class.
4664 (init_registers_tilgx32): New function. The tilegx32 register info
4665 initializer.
4666 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4667 (tile_store_gregset): Likewise.
4668
d171ca78
YQ
46692013-02-27 Yao Qi <yao@codesourcery.com>
4670
4671 * server.c (process_point_options): Print debug message when
4672 debug_threads is true.
4673
282bbdf3
YQ
46742013-02-26 Yao Qi <yao@codesourcery.com>
4675
4676 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4677
aca22551
PA
46782013-02-19 Pedro Alves <palves@redhat.com>
4679 Kai Tietz <ktietz@redhat.com>
4680
4681 PR gdb/15161
4682
4683 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4684 instead of strtoul to extract address from packet.
4685 (process_serial_event) <'z'>: Likewise.
4686
4f3cee1c
YQ
46872013-02-18 Yao Qi <yao@codesourcery.com>
4688
4689 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4690
8e1d55a3
PA
46912013-02-14 Pedro Alves <palves@redhat.com>
4692
4693 Plug memory leak.
4694
4695 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4696 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4697
458820da
PA
46982013-02-14 Pedro Alves <palves@redhat.com>
4699
4700 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4701
baea0dae
PA
47022013-02-14 Pedro Alves <palves@redhat.com>
4703
4704 * tracepoint.c (save_string): Delete.
4705 (add_tracepoint_action): Use savestring instead of save_string.
4706
0b1afbb3
PA
47072013-02-12 Pedro Alves <palves@redhat.com>
4708
4709 * linux-xtensa-low.c: Ditto.
4710 * xtensa-xtregs.c: Ditto.
4711
8a4ac37e
PA
47122013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4713
4714 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4715 thread_db.
4716
148de6bb
MS
47172013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4718
4719 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4720 aarch64_num_wp_regs and aarch64_num_bp_regs to
4721 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4722
55fac6e0
MS
47232013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4724
4725 * linux-aarch64-low.c (ps_get_thread_area): Replace
4726 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4727
176eb98c
MS
47282013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4729 Marcus Shawcroft <marcus.shawcroft@arm.com>
4730 Nigel Stephens <nigel.stephens@arm.com>
4731 Yufeng Zhang <yufeng.zhang@arm.com>
4732
4733 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4734 (aarch64.c, aarch64-without-fpu.c): New targets.
4735 * configure.srv (aarch64*-*-linux*): New.
4736 * linux-aarch64-low.c: New file.
4737
56f7af9c
MS
47382013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4739
43aaf8b6 4740 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
4741 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4742 (dequeue_one_deferred_signal, linux_resume_one_thread)
4743 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4744 (linux_tracefork_grandchild, linux_test_for_tracefork)
4745 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4746 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4747 where the argument is 0.
4748
60f662b0
YQ
47492013-01-25 Yao Qi <yao@codesourcery.com>
4750
4751 * event-loop.c: Include "queue.h".
4752 (gdb_event_p): New typedef.
4753 (struct gdb_event) <next_event>: Remove.
4754 (event_queue): Change to QUEUE(gdb_event_p).
4755 (async_queue_event): Remove.
4756 (gdb_event_xfree): New.
4757 (initialize_event_loop): New.
4758 (process_event): Use API from QUEUE.
4759 (wait_for_event): Likewise.
4760 * server.c (main): Call initialize_event_loop.
4761 * server.h (initialize_event_loop): Declare.
4762
5ae4861a
YQ
47632013-01-18 Yao Qi <yao@codesourcery.com>
4764
4765 * ax.h (struct eval_agent_expr_context): New.
4766 (gdb_eval_agent_expr): Update declaration.
4767 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4768 TFRAME. Add new argument CTX.
4769 * server.h (struct eval_agent_expr_context): Declare.
4770 (agent_mem_read, agent_tsv_read): Update declaration.
4771 (agent_mem_read_string): Likewise.
4772 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4773 (add_traceframe_block): Add new argument TPOINT.
4774 Increase TPOINT->traceframe_usage.
4775 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4776 eval_tracepoint_agent_expr.
4777 (condition_true_at_tracepoint): Likewise.
4778 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4779 (agent_mem_read_string, agent_tsv_read): Likewise.
4780
85e00e85
YQ
47812013-01-16 Yao Qi <yao@codesourcery.com>
4782
4783 * linux-low.c (linux_resume_one_lwp): Don't check
4784 'lwp->bp_reinsert != 0'.
4785
4039cf45
JB
47862013-01-07 Joel Brobecker <brobecker@adacore.com>
4787 Pedro Alves <palves@redhat.com>
4788
4789 * lynx-low.c (ptrace_request_to_str): Define a temporary
4790 macro and use it to simplify this function's implementation.
4791
9044dee2
JB
47922013-01-07 Joel Brobecker <brobecker@adacore.com>
4793
4794 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4795 sets errno.
4796
e6352c8f
JB
47972013-01-07 Joel Brobecker <brobecker@adacore.com>
4798
4799 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4800
50681a27
JB
48012013-01-07 Joel Brobecker <brobecker@adacore.com>
4802
4803 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4804
3f6e77ef
JB
48052013-01-07 Joel Brobecker <brobecker@adacore.com>
4806
4807 * lynx-low.c (lynx_resume): Use the resume_info parameter
4808 to determine the ptid for the lynx_ptrace call, unless
4809 it is equal to minus_one_ptid, in which case we use the
4810 ptid of the current_inferior.
4811 (lynx_wait_1): After having received a thread create/exit
4812 event, resume the inferior's execution using the signaling
4813 thread's ptid, rather than the old ptid.
4814
7fda33ae
JB
48152013-01-07 Joel Brobecker <brobecker@adacore.com>
4816
4817 * lynx-low.c (lynx_resume): Delete variable ret.
4818
b9786c74
JB
48192013-01-01 Joel Brobecker <brobecker@adacore.com>
4820
4821 * gdbreplay.c (gdbreplay_version): Update copyright year.
4822 * server.c (gdbserver_version): Likewise.
4823
8b93d60f
JB
48242012-12-17 Joel Brobecker <brobecker@adacore.com>
4825
4826 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4827 new thread.
4828
037335a7
JB
48292012-12-17 Joel Brobecker <brobecker@adacore.com>
4830
4831 * lynx-low.c (ptrace_request_to_str): Add handling for
4832 PTRACE_GETTRACESIG.
4833
52d4cbd8
JB
48342012-12-17 Joel Brobecker <brobecker@adacore.com>
4835
4836 * lynx-low.c (lynx_attach): Delete variable new_process.
4837
ab8f6ca9
JB
48382012-12-17 Joel Brobecker <brobecker@adacore.com>
4839
4840 * lynx-low.c (lynx_create_inferior): Delete variable
4841 new_process.
4842
78cbc024
JB
48432012-12-17 Joel Brobecker <brobecker@adacore.com>
4844
4845 * lynx-low.c (ptrace_request_to_str): Do not handle
4846 PTRACE_GETTHREADLIST if this macro does not exist.
4847
14a00470
YQ
48482012-12-15 Yao Qi <yao@codesourcery.com>
4849
4850 * Makefile.in (OBS): Add notif.o.
4851 * notif.c, notif.h: New.
4852 * server.c: Include "notif.h".
4853 (struct vstop_notif) <next>: Remove.
4854 <base>: New field.
4855 (queue_stop_reply): Update.
4856 (push_event, send_next_stop_reply): Remove.
4857 (discard_queued_stop_replies): Update.
4858 (notif_stop): New variable.
4859 (handle_v_stopped): Remove.
4860 (handle_v_requests): Don't call handle_v_stopped. Call
4861 handle_ack_notif instead.
4862 (queue_stop_reply_callback): Call notif_event_enque instead
4863 of queue_stop_reply.
4864 (handle_status): Don't call send_next_stop_reply, call
4865 notif_write_event instead.
4866 (kill_inferior_callback): Likewise.
4867 (detach_or_kill_inferior_callback): Likewise.
4868 (main): Call initialize_notif.
4869 (process_serial_event): Call QUEUE_is_empty.
4870 (handle_target_event): Call notif_push instead of push event.
4871 * server.h (push_event): Remove declaration.
4872
61c125b9
TT
48732012-12-10 Tom Tromey <tromey@redhat.com>
4874
4875 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4876 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4877 macros.
4878 (.c.o): Rewrite.
4879 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4880 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4881 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4882 (amd64-linux-ipa.o, ax.o): Rewrite.
4883 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4884 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4885 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4886 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4887 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4888 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4889 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4890 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4891 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4892 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4893 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4894 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4895 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4896 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4897 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4898 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4899 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4900 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4901 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4902 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4903 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4904 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4905 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4906 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4907 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4908 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4909 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4910 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4911 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4912 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4913 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4914 (reg-tilegx.o): Remove.
4915 (all_object_files): New macro.
4916 Include .deps files.
4917 * aclocal.m4, configure: Rebuild.
4918 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4919 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4920 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4921
e90e9ad9
TT
49222012-12-05 Tom Tromey <tromey@redhat.com>
4923
4924 PR gdb/14917:
4925 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4926
02d403bf 49272012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4928
4929 * configure.ac: Check for linux/perf_event.h.
4930 * config.in: Regenerated.
4931 * configure: Regenerated.
4932
0270a750
PA
49332012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4934
4935 * hostio.c (handle_readlink): Decrease buffer size
4936 parameter passed to readlink by one byte.
4937
8c29b58e
YQ
49382012-11-26 Yao Qi <yao@codesourcery.com>
4939
4940 * configure.ac (build_warnings): Append '-Wempty-body'.
4941 * configure: Regenerated.
4942 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4943 body.
4944
8bdce1ff
PM
49452012-11-15 Pierre Muller <muller@sourceware.org>
4946
4947 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4948 * config.in: Regenerate.
4949 * configure: Regenerate.
4950 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4951 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4952 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4953 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4954 header.
4955 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4956 instead of <sys/wait.h> header.
4957 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4958
02d403bf 49592012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4960
4961 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4962 (various make rules): Remove -DGDBSERVER
4963
fbd5db48
YQ
49642012-11-09 Yao Qi <yao@codesourcery.com>
4965
4966 * spu-low.c (current_ptid): Move it to ..
4967 * gdbthread.h: ... here. New.
4968 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4969 * server.c (myresume, process_serial_event): Likewise.
4970 * thread-db.c (thread_db_find_new_threads): Likewise.
4971 * tracepoint.c (run_inferior_command): Likewise.
4972
b3dc46ff
AB
49732012-10-01 Andrew Burgess <aburgess@broadcom.com>
4974
4975 * server.c (handle_search_memory_1): Include access length in
4976 warning message.
4977
07c04788
HPN
49782012-09-05 Michael Brandt <michael.brandt@axis.com>
4979
4980 * linux-crisv32-low.c: Fix compile errors.
4981
918d227b
YQ
49822012-09-04 Yao Qi <yao@codesourcery.com>
4983
4984 * tracepoint.c (cmd_qtsv): Adjust debug message.
4985 Don't check CUR_TPOINT.
4986
18c1b81a
YQ
49872012-08-28 Yao Qi <yao@codesourcery.com>
4988
4989 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4990 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4991 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4992 Remove declarations of xmalloc, xreallloc, xstrdup and
4993 freeargv.
4994 * Makefile.in (libiberty_h): New.
4995 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4996 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4997
dc82f37b
YQ
49982012-08-23 Yao Qi <yao@codesourcery.com>
4999
5000 * server.h: Remove declaration of 'xsnprintf'.
5001
406b1477
KS
50022012-08-22 Keith Seitz <keiths@redhat.com>
5003
5004 * server.h: Include build-gnulib-gbserver/config.h.
5005 * gdbreplay.c: Likewise.
5006
e6712ff1
DE
50072012-08-08 Doug Evans <dje@google.com>
5008
5009 * Makefile.in (SFILES): Add gdb_vecs.c.
5010 (OBS): Add gdb_vecs.o.
5011 (gdb_vecs_h, host_defs_h): New variables.
5012 (thread-db.o): Add $(gdb_vecs_h) dependency.
5013 (gdb_vecs.o): New rule.
5014 * thread-db.c: #include "gdb_vecs.h".
5015 (thread_db_load_search): Use a vector to iterate over path elements.
5016 Handle text appearing after "$pdir".
5017
5018 * configure.ac: Add check for strstr.
5019 * config.in: Regenerate.
5020 * configure: Regenerate.
5021
7c3270ae
UW
50222012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5023
5024 * hostio.c (handle_pread): If pread fails, fall back to attempting
5025 lseek/read.
5026 (handle_pwrite): Likewise for pwrite.
5027
b62e2b27
UW
50282012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5029
5030 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5031 between unsupported TYPE and unimplementable ADDR/LEN combination.
5032 (arm_insert_point): Act on new return value.
5033
78a99e91
PA
50342012-07-31 Pedro Alves <palves@redhat.com>
5035
5036 * server.c (process_point_options): Only skip tokens if we find
5037 one that is unrecognized. Don't treat 'X' specially while
5038 skipping unrecognized tokens.
5039
fcf303ab
UW
50402012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5041
5042 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5043 to 4-byte-align HW breakpoint addresses for Thumb.
5044
7255706c
YQ
50452012-07-27 Yao Qi <yao@codesourcery.com>
5046
5047 PR remote/14161.
5048
5049 * server.h: Declare gdb_agent_about_to_close.
5050 * target.c (kill_inferior): Include "agent.h".
5051 New. Send command 'kill'.
5052 * target.h (kill_inferior): Removed macro.
5053 * tracepoint.c (gdb_agent_about_to_close): New.
5054 (gdb_agent_helper_thread): Handle command 'close'.
5055 Wait endlessly until the inferior stops.
5056 Install gdb_agent_remove_socket to atexit hook.
5057 (agent_socket_name): New static variable.
5058 (gdb_agent_socket_init): Replace local variable 'name' with
5059 'agent_socket_name'.
5060 (gdb_agent_remove_socket): New.
5061
5a3f286f
YQ
50622012-07-27 Yao Qi <yao@codesourcery.com>
5063
5064 * server.c (process_point_options): Stop at 'X' when parsing.
5065
961bd387
ME
50662012-07-19 Michael Eager <eager@eagercon.com>
5067
a261b8f5 5068 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5069 to hw_execute.
5070 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5071 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5072 hardware breakpoint.
5073
aa7c7447
JK
50742012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5075
5076 * gdbserver/linux-low.c (initialize_low): Call
5077 linux_ptrace_init_warnings.
5078
7f216e7c
DE
50792012-07-02 Doug Evans <dje@google.com>
5080
5081 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5082 pointer to int.
5083
d3ce09f5
SS
50842012-07-02 Stan Shebs <stan@codesourcery.com>
5085
5086 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5087 (ax.o): Add it to build rule.
5088 (ax-ipa.o): Ditto.
5089 (OBS): Add format.o.
5090 (IPA_OBS): Add format.o.
5091 * server.c (handle_query): Claim support for breakpoint commands.
5092 (process_point_options): Add command case.
5093 (process_serial_event): Leave running if there are printfs in
5094 effect.
5095 * mem-break.h (any_persistent_commands): Declare.
5096 (add_breakpoint_commands): Declare.
5097 (gdb_no_commands_at_breakpoint): Declare.
5098 (run_breakpoint_commands): Declare.
5099 * mem-break.c (struct point_command_list): New struct.
5100 (struct breakpoint): New field command_list.
5101 (any_persistent_commands): New function.
5102 (add_commands_to_breakpoint): New function.
5103 (add_breakpoint_commands): New function.
5104 (gdb_no_commands_at_breakpoint): New function.
5105 (run_breakpoint_commands): New function.
5106 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5107 locally.
5108 * ax.c: Include format.h.
5109 (ax_printf): New function.
5110 (gdb_eval_agent_expr): Add printf opcode.
5111
2f8f6aed
YQ
51122012-06-13 Yao Qi <yao@codesourcery.com>
5113
5114 * server.c (start_inferior): Remove duplicated writes to fields
5115 'last_resume_kind' and 'last_status' of 'current_inferior'.
5116
0c9070b3
YQ
51172012-06-12 Yao Qi <yao@codesourcery.com>
5118 Pedro Alves <palves@redhat.com>
5119
5120 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5121 comment.
5122 * server.c (handle_v_cont): Extend comment.
5123
c52daf70
YQ
51242012-06-11 Yao Qi <yao@codesourcery.com>
5125
5126 * linux-low.c (linux_attach): Add 'static'.
5127
d38bbb0a
YQ
51282012-06-06 Yao Qi <yao@codesourcery.com>
5129
5130 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5131
89dc0afd
JK
51322012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5133
5134 Fix gcc -flto compilation warning.
5135 * server.c (main): Make variable multi_mode and attach volatile.
5136
75f62ce7
TJB
51372012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5138
5139 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5140 if the platform doesn't know about it.
5141
65f479b6
PA
51422012-05-30 Jeff Kenton <jkenton@tilera.com>
5143
5144 * Makefile.in (SFILES): Add linux-tile-low.c.
5145 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5146 * configure.srv: Handle tilegx-*-linux*.
5147 * linux-tile-low.c: New file.
5148
0c5bf5a9
JK
51492012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5150
5151 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5152
a493e3e2
PA
51532012-05-24 Pedro Alves <palves@redhat.com>
5154
5155 PR gdb/7205
5156
43aaf8b6 5157 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5158
2ea28649
PA
51592012-05-24 Pedro Alves <palves@redhat.com>
5160
5161 PR gdb/7205
5162
5163 Replace target_signal with gdb_signal throughout.
5164
8d409d16
MR
51652012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5166
5167 * linux-low.c (linux_store_registers): Avoid the copying sequence
5168 when no data has been retrieved by ptrace.
5169
23512c01
MGD
51702012-05-22 Will Deacon <will.deacon@arm.com>
5171
5172 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5173 Include asm/ptrace.h.
5174 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5175 already defined.
5176
4934b29e
MR
51772012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5178
5179 * linux-low.c (linux_store_registers): Don't re-retrieve data
5180 with ptrace that has already been obtained from /proc. Always
5181 copy any data retrieved with ptrace to the buffer supplied.
5182
bde24c0a
PA
51832012-05-11 Yao Qi <yao@codesourcery.com>
5184 Pedro Alves <palves@redhat.com>
5185
5186 * linux-low.c (enum stopping_threads_kind): New.
5187 (stopping_threads): Change type to `enum stopping_threads_kind'.
5188 (handle_extended_wait): If stopping and suspending threads, leave
5189 the new_lwp suspended too.
5190 (linux_wait_for_event): Adjust.
5191 (stop_all_lwps): Set `stopping_threads' to
5192 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5193 whether we're suspending threads or just stopping them. Assert no
5194 recursion happens.
5195
623b6bdf
YQ
51962012-04-29 Yao Qi <yao@codesourcery.com>
5197
5198 * server.h: Move some code to ...
5199 * gdbthread.h: ... here. New.
5200 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5201 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5202 (nto-low.o, win32-low.o): Likewise.
5203 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5204 * regcache.c, remote-utils.c, server.c: Likewise.
5205 * target.c, tracepoint.c, win32-low.c: Likewise.
5206
f15f9948
TJB
52072012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5208
5209 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5210 (PTRACE_ARG4_TYPE): Likewise.
5211 (PTRACE_XFER_TYPE): Likewise.
5212 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5213 ptrace to PTRACE_ARG3_TYPE.
5214 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5215 (PTRACE_ARG4_TYPE): Likewise.
5216 (PTRACE_XFER_TYPE): Likewise.
5217 (linux_detach_one_lwp): Cast fourth argument of
5218 ptrace to long then PTRACE_ARG4_TYPE.
5219 (regsets_fetch_inferior_registers): Cast third argument of
5220 ptrace to long then PTRACE_ARG3_TYPE.
5221 (regsets_store_inferior_registers): Likewise.
5222
38ea300a
PA
52232012-04-20 Pedro Alves <palves@redhat.com>
5224
5225 * configure: Regenerate.
5226
c971b7fa
PA
52272012-04-19 Pedro Alves <palves@redhat.com>
5228
43aaf8b6 5229 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5230 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5231 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5232 (all, install-only, uninstall, clean-info, all-lib, clean): No
5233 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5234 (maintainer-clean realclean distclean): Use subdir_do.
5235 (subdir_do): New.
5236 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5237 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5238 * acinclude.m4: Include acx_configure_dir.m4.
5239 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5240 calls. Call AC_PROG_RANLIB. Configure gnulib using
5241 ACX_CONFIGURE_DIR.
5242 (GNULIB): New.
5243 (GNULIB_STDINT_H): Adjust.
5244 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5245 * gdbreplay.c: Include build-gnulib/config.h.
5246 * server.h: Likewise.
5247 * aclocal.m4: Regenerate.
5248 * config.in: Regenerate.
5249 * configure: Regenerate.
c971b7fa 5250
809277f8
PA
52512012-04-19 Pedro Alves <palves@redhat.com>
5252
5253 * Makefile.in (LIBGNU, INCGNU): Adjust.
5254 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5255 (all, install-only, uninstall, clean-info, all-lib, clean)
5256 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5257 * configure.ac: Adjust AC_OUTPUT output.
5258 * aclocal.m4: Regenerate.
5259 * configure: Regenerate.
5260
fd9bb8b8
PA
52612012-04-19 Pedro Alves <palves@redhat.com>
5262
5263 * Makefile.in (generated_files): New.
5264 (server_h): Remove the explicit dependency on config.h, and depend
5265 on $generated_files.
5266
1c298c66
PA
52672012-04-19 Pedro Alves <palves@redhat.com>
5268
5269 * Makefile.in (INCGNU): Add -Ignulib.
5270
57c4b50b
PA
52712012-04-19 Pedro Alves <palves@redhat.com>
5272
5273 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5274 (INCGNU): ... this, and spell out -I here.
5275 (GNULIB_LIB): Rename to ...
5276 (LIBGNU): ... this.
5277 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5278
1030e047
PA
52792012-04-19 Pedro Alves <palves@redhat.com>
5280
5281 * config.in: Regenerate.
5282
447d4319
PA
52832012-04-19 Pedro Alves <palves@redhat.com>
5284
5285 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5286 * server.h (memmem): Remove declaration.
5287 * config.in: Regenerate.
5288 * configure: Regenerate.
5289
aad9eab9
YQ
52902012-04-19 Yao Qi <yao@codesourcery.com>
5291
5292 * Makefile.in (SFILES): Add common/vec.c.
5293 (OBS): Add vec.o.
5294 (vec.o): New rule.
5295
3e10640f
YQ
52962012-04-19 Yao Qi <yao@codesourcery.com>
5297
5298 * remote-utils.c (prepare_resume_reply): Replace with macro
5299 target_core_of_thread.
5300 * server.c (handle_qxfer_threads_proper): Likewise.
5301 * target.h (traget_core_of_thread): New macro.
5302
71622373
PA
53032012-04-18 Pedro Alves <palves@redhat.com>
5304
5305 * aclocal.m4: Regenerate.
5306 * configure: Regenerate.
5307
80d26939
YQ
53082012-04-16 Yao Qi <yao@codesourcery.com>
5309
5310 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5311 duplicated on address.
5312
42476b70
YQ
53132012-04-16 Yao Qi <yao@codesourcery.com>
5314
5315 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5316 (struct tracepoint_action_ops) <send>: New field.
5317 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5318 (agent_expr_send, x_tracepoint_action_send): New.
5319 (l_tracepoint_action_send): New.
5320 (cmd_qtdp): Download and install tracepoint
5321 according to `use_agent'.
5322 (run_inferior_command): Add one more parameter `len'.
5323 Update callers.
5324 (tracepoint_send_agent): New.
5325 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5326
7bc83639
YQ
53272012-04-16 Yao Qi <yao@codesourcery.com>
5328
5329 * tracepoint.c (download_tracepoints): Moved to ...
5330 (cmd_qtstart): ... here.
5331
5f18041e
YQ
53322012-04-14 Yao Qi <yao@codesourcery.com>
5333
5334 * tracepoint.c: Include inttypes.h.
5335 (struct collect_memory_action): Use sized types.
5336 (struct tracepoint): Likewise.
5337 (cmd_qtdp, stop_tracing): Update print specifiers.
5338 (cmd_qtp, response_tracepoint): Likewise.
5339 (collect_data_at_tracepoint): Likewise.
5340 (collect_data_at_step): Likewise.
5341
55a8c076
YQ
53422012-04-14 Yao Qi <yao@codesourcery.com>
5343
5344 Import gnulib module inttypes.
5345 * aclocal.m4, config.in, configure: Regenerated.
5346
dc750257
YQ
53472012-04-14 Yao Qi <yao@codesourcery.com>
5348
5349 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5350 Makefile and config.status at last.
5351
0ab5faf9
YQ
53522012-04-13 Yao Qi <yao@codesourcery.com>
5353
5354 * tracepoint.c: Include stdint.h unconditionally.
5355
18f5fd81
TJB
53562012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5357
5358 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5359 on BFD_HAVE_SYS_PROCFS_TYPE.
5360 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5361 * configure: Regenerate.
5362 * config.in: Likewise.
5363
4d47af5c
L
53642012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5365
5366 * Makefile.in (clean): Also remove x32.c x32-linux.c
5367 x32-avx.c x32-avx-linux.c.
5368 (x32.o): New target.
5369 (x32.c): Likewise.
5370 (x32-linux.o): Likewise.
5371 (x32-linux.c): Likewise.
5372 (x32-avx.o): Likewise.
5373 (x32-avx.c): Likewise.
5374 (x32-avx-linux.o): Likewise.
5375 (x32-avx-linux.c): Likewise.
5376
5377 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5378 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5379 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5380 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5381 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5382 i386/x32-avx-linux.xml.
5383
5384 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5385 (init_registers_x32_avx_linux): Likwise.
5386 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5387 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5388
ecedbe58
PA
53892012-04-13 Pedro Alves <palves@redhat.com>
5390
5391 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5392 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5393 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5394 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5395 the sub-make.
5396
c92b5177
L
53972012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5398
5399 * linux-x86-low.c (compat_x32_clock_t): New.
5400 (compat_x32_siginfo_t): Likewise.
5401 (compat_x32_siginfo_from_siginfo): Likewise.
5402 (siginfo_from_compat_x32_siginfo): Likewise.
5403 (linux_is_elf64): Likewise.
5404 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5405 and siginfo_from_compat_x32_siginfo for x32.
5406 (x86_arch_setup): Set linux_is_elf64.
5407
214d508e
L
54082012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5409
5410 PR gdb/13969
5411 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5412 e_machine field.
5413 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5414 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5415 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5416 compatible with process.
5417
c9a1864a
YQ
54182012-04-12 Yao Qi <yao@codesourcery.com>
5419
5420 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5421 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5422 (install-only, install-info, clean): Handle sub dir gnulib.
5423 (all-lib, am--refresh): New targets.
5424 (memmem.o): Remove target.
5425 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5426 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5427 (AC_REPLACE_FUNCS): Remove memmem.
5428 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5429 (AC_OUTPUT): Generate Makefile in gnulib/.
5430 * aclocal.m4, config.in, configure: Regenerated.
5431
367ba2c2
MR
54322012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5433
5434 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5435
9d236627
PA
54362012-04-05 Pedro Alves <palves@redhat.com>
5437
5438 -Werror=strict-aliasing
5439
5440 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5441 pointer.
5442
111217b3
PA
54432012-04-04 Pedro Alves <palves@redhat.com>
5444
5445 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5446 (sparc_store_gregset_from_stack, sparc_store_gregset)
5447 (sparc_breakpoint_at): Fix formatting.
5448
8365dcf5
TJB
54492012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5450
5451 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5452 are available.
5453 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5454 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5455 * config.in: Regenerate.
5456 * configure: Likewise.
5457
689cc2ae
PA
54582012-03-29 Pedro Alves <palves@redhat.com>
5459
5460 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5461 Correct ptrace arguments.
5462
c14dfd32
PA
54632012-03-28 Pedro Alves <palves@redhat.com>
5464
5465 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5466 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5467 (IA64_FR1_REGNUM): New defines.
5468 (ia64_fetch_register): New.
5469 (the_low_target): Install it.
5470 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5471 field.
5472 * linux-low.c (linux_fetch_registers): Try the
5473 the_low_target.fetch_register hook first.
5474
5475 * linux-arm-low.c (the_low_target): Adjust.
5476 * linux-bfin-low.c (the_low_target): Adjust.
5477 * linux-cris-low.c (the_low_target): Adjust.
5478 * linux-crisv32-low.c (the_low_target): Adjust.
5479 * linux-m32r-low.c (the_low_target): Adjust.
5480 * linux-m68k-low.c (the_low_target): Adjust.
5481 * linux-mips-low.c (the_low_target): Adjust.
5482 * linux-ppc-low.c (the_low_target): Adjust.
5483 * linux-s390-low.c (the_low_target): Adjust.
5484 * linux-sh-low.c (the_low_target): Adjust.
5485 * linux-sparc-low.c (the_low_target): Adjust.
5486 * linux-tic6x-low.c (the_low_target): Adjust.
5487 * linux-x86-low.c (the_low_target): Adjust.
5488 * linux-xtensa-low.c (the_low_target): Adjust.
5489
63c88e13
PA
54902012-03-26 Pedro Alves <palves@redhat.com>
5491
5492 * server.c (handle_qxfer_libraries): Don't bail early if
5493 the_target->qxfer_libraries_svr4 is not NULL.
5494
fb723180
PA
54952012-03-26 Pedro Alves <palves@redhat.com>
5496
5497 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5498
0afae3cf
PA
54992012-03-23 Pedro Alves <palves@redhat.com>
5500
5501 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5502 "library-list-svr4" element's start tag when the the DSO list is
5503 empty.
5504
485f1ee4
PA
55052012-03-23 Pedro Alves <palves@redhat.com>
5506
5507 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5508 a variable whose type size is the same as the inferior's pointer
5509 size.
5510
a5362b9a
TS
55112012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5512
5513 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5514 struct siginfo.
5515 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5516 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5517 * linux-low.h: Include <signal.h>.
5518 (struct siginfo): Remove forward declaration.
5519 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5520 struct siginfo.
5521
d226c142
MF
55222012-03-21 Mike Frysinger <vapier@gentoo.org>
5523
5524 * .gitignore: Ignore more files.
5525
122f36ef
PA
55262012-03-19 Pedro Alves <palves@redhat.com>
5527 Jan Kratochvil <jan.kratochvil@redhat.com>
5528
5529 * server.c (cont_thread, general_thread): Add describing comments.
5530 (start_inferior): Clear `cont_thread'.
5531 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5532 of a process.
5533
fc3e5175
YQ
55342012-03-15 Yao Qi <yao@codesourcery.com>
5535
5536 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5537 handling to ...
5538 (cmd_qtdp): ... here.
5539
8d0d92cd
YQ
55402012-03-15 Yao Qi <yao@codesourcery.com>
5541
5542 * tracepoint.c (struct tracepoint_action_ops): New.
5543 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5544 (m_tracepoint_action_download): New.
5545 (r_tracepoint_action_download): New.
5546 (x_tracepoint_action_download): New.
5547 (l_tracepoint_action_download): New.
5548 (add_tracepoint_action): Install `action->ops' according type.
5549 (download_tracepoint_1): Move code `download' function pointer
5550 of various tracepoint_action_ops.
5551
87b0bb13
JK
55522012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5553
5554 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5555 linux_ptrace_attach_warnings.
5556
5f572dec
JK
55572012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5558
5559 * Makefile.in (linux-ptrace.o): New.
5560 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5561 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5562 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5563 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5564 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5565 of these targets.
5566 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5567
f4647387
YQ
55682012-03-08 Yao Qi <yao@codesourcery.com>
5569 Pedro Alves <palves@redhat.com>
5570
5571 Fix PR server/13392.
5572 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5573 offset of JMP insn.
5574 * tracepoint.c (remove_tracepoint): New.
5575 (cmd_qtdp): Call remove_tracepoint when failed to install.
5576
9b224c5e
PA
55772012-03-07 Pedro Alves <palves@redhat.com>
5578
5579 * linux-low.c (get_detach_signal): New.
5580 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5581 Pass on pending signals to PTRACE_DETACH. Check the result of the
5582 ptrace call.
5583 * server.c (program_signals, program_signals_p): New.
5584 (handle_general_set): Handle QProgramSignals.
5585 * server.h (program_signals, program_signals_p): Declare.
5586
e237a7e2
JK
55872012-03-05 Pedro Alves <palves@redhat.com>
5588 Jan Kratochvil <jan.kratochvil@redhat.com>
5589
5590 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5591 New comment why.
5592
5808517f
YQ
55932012-03-03 Yao Qi <yao@codesourcery.com>
5594
5595 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5596 agent_look_up_symbols.
5597
58b4daa5
YQ
55982012-03-03 Yao Qi <yao@codesourcery.com>
5599
5600 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5601 (linux-x86-low.o): Likewise.
5602 * server.h: Remove in_process_agent_loaded.
5603 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5604 common/agent.c.
5605 Update callers.
5606
8ffcbaaf
YQ
56072012-03-03 Yao Qi <yao@codesourcery.com>
5608
5609 * tracepoint.c (gdb_agent_capability): New global.
5610 (in_process_agent_loaded_ust): Renamed to
5611 `in_process_agent_supports_ust'.
5612 Update callers.
5613 (in_process_agent_supports_ust): Call agent_capability_check.
5614 (clear_installed_tracepoints): Assert that agent supports
5615 agent.
5616
d1feda86
YQ
56172012-03-03 Yao Qi <yao@codesourcery.com>
5618
5619 * linux-low.c (linux_supports_agent): New.
5620 (linux_target_ops): Initialize field `supports_agent' with
5621 linux_supports_agent.
5622 * target.h (struct target_ops) <supports_agent>: New.
5623 (target_supports_agent): New macro.
5624 * server.c (handle_general_set): Handle packet 'QAgent'.
5625 (handle_query): Send `QAgent+'.
5626 * Makefile.in (server.o): Depends on agent.h.
5627
2fa291ac
YQ
56282012-03-03 Yao Qi <yao@codesourcery.com>
5629
5630 * Makefile.in (OBS): Add agent.o.
5631 Add new rule for agent.o.
5632 Track dependence of tracepoint.c on agent.h.
5633 * tracepoint.c (run_inferior_command_1):
5634 (run_inferior_command): Call agent_run_command.
5635 (gdb_ust_connect_sync_socket): Deleted. Move it to
5636 common/agent.c.
5637 (resume_thread, stop_thread): Likewise.
5638 (gdb_ust_socket_init): Renamed to ...
5639 (gdb_agent_socket_init): ... New.
5640 (gdb_ust_thread): Renamed to ...
5641 (gdb_agent_helper_thread): ... New.
5642 (gdb_ust_init): Move some code to ...
5643 (gdb_agent_init): ... here. New.
5644 [HAVE_UST]: Call gdb_ust_init.
5645 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5646 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5647 * config.in, configure: Regenerated.
5648
05044653
PA
56492012-03-02 Pedro Alves <palves@redhat.com>
5650
5651 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5652 * linux-low.c (struct simple_pid_list): New.
5653 (stopped_pids): New a struct simple_pid_list pointer.
5654 (add_to_pid_list, pull_pid_from_list): New.
5655 (handle_extended_wait): Don't assume the first signal new children
5656 report is SIGSTOP. Adjust call to pull_pid_from_list.
5657 (linux_wait_for_lwp): Adjust.
5658
8d00225b
YQ
56592012-03-02 Yao Qi <yao@codesourcery.com>
5660
5661 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5662 debug log.
5663
19560ba5
YQ
56642012-03-02 Yao Qi <yao@codesourcery.com>
5665
5666 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5667 `stop_pc' and `tpoint'. Update caller.
5668
1faeff08
MR
56692012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5670
5671 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5672 * linux-low.c (use_linux_regsets): New macro.
5673 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5674 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5675 (linux_register_in_regsets): New function.
5676 (usr_fetch_inferior_registers): Skip registers covered by
5677 regsets.
5678 (usr_store_inferior_registers): Likewise.
5679 (usr_fetch_inferior_registers): New macro.
5680 (usr_store_inferior_registers): Likewise.
5681 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5682 (linux_store_registers): Likewise.
5683 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5684 prototype.
5685 (init_registers_mips64_dsp_linux): Likewise.
5686 (init_registers_mips_linux): New macro.
5687 (init_registers_mips_dsp_linux): Likewise.
5688 (mips_dsp_num_regs): Likewise.
5689 (DSP_BASE, DSP_CONTROL): New fallback macros.
5690 (mips_base_regs): New macro.
5691 (mips_regmap): Use it. Fix the size.
5692 (mips_dsp_regmap): New variable.
5693 (mips_dsp_regset_bitmap): Likewise.
5694 (mips_arch_setup): New function.
5695 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5696 than mips_regmap.
5697 (mips_cannot_store_register): Likewise.
5698 (the_low_target): Update .arch_setup, .num_regs and .regmap
5699 initializers. Add .regset_bitmap initializer.
5700 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5701 initializer.
5702 * linux-bfin-low.c (the_low_target): Likewise.
5703 * linux-cris-low.c (the_low_target): Likewise.
5704 * linux-crisv32-low.c (the_low_target): Likewise.
5705 * linux-ia64-low.c (the_low_target): Likewise.
5706 * linux-m32r-low.c (the_low_target): Likewise.
5707 * linux-m68k-low.c (the_low_target): Likewise.
5708 * linux-ppc-low.c (the_low_target): Likewise.
5709 * linux-s390-low.c (the_low_target): Likewise.
5710 * linux-sh-low.c (the_low_target): Likewise.
5711 * linux-sparc-low.c (the_low_target): Likewise.
5712 * linux-tic6x-low.c (the_low_target): Likewise.
5713 * linux-x86-low.c (the_low_target): Likewise.
5714 * linux-xtensa-low.c (the_low_target): Likewise.
5715 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5716 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5717 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5718 srv_xmlfiles.
5719 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5720 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5721
c03e6ccc
YQ
57222012-02-29 Yao Qi <yao@codesourcery.com>
5723 Pedro Alves <palves@redhat.com>
5724
5725 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5726 `step_over_finished' is true.
5727
644cebc9
PA
57282012-02-27 Pedro Alves <palves@redhat.com>
5729
5730 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5731 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5732
c14d7ab2
PA
57332012-02-27 Pedro Alves <palves@redhat.com>
5734
5735 PR server/9684
5736 * linux-low.c (pid_is_stopped): New.
5737 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5738
412c89dd
LM
57392012-02-25 Luis Machado <lgustavo@codesourcery.com>
5740
5741 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5742 of conditions.
5743
b745defe
MR
57442012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5745
5746 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5747
9f3a5c85
LM
57482012-02-24 Luis Machado <lgustavo@codesourcery>
5749
5750 * server.c (handle_query): Advertise support for target-side
5751 breakpoint condition evaluation.
5752 (process_point_options): New function.
5753 (process_serial_event): When inserting a breakpoint, check for
5754 a target-side condition that should be evaluated.
5755
5756 * mem-break.c: Include regcache.h and ax.h.
5757 (point_cond_list_t): New data structure.
5758 (breakpoint) <cond_list>: New field.
5759 (find_gdb_breakpoint_at): Make non-static.
5760 (delete_gdb_breakpoint_at): Clear any target-side
5761 conditions.
5762 (clear_gdb_breakpoint_conditions): New function.
5763 (add_condition_to_breakpoint): Likewise.
5764 (add_breakpoint_condition): Likewise.
5765 (gdb_condition_true_at_breakpoint): Likewise.
5766 (gdb_breakpoint_here): Return result directly instead
5767 of going through a local variable.
5768
5769 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5770 (clear_gdb_breakpoint_conditions): Likewise.
5771 (add_breakpoint_condition): Likewise.
5772 (gdb_condition_true_at_breakpoint): Likewise.
5773
5774 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5775 (need_step_over_p): Take target-side breakpoint condition into
5776 consideration.
5777
5e1dc496
LM
57782012-02-24 Luis Machado <lgustavo@codesourcery>
5779
5780 * server.h: Include tracepoint.h.
5781 (agent_mem_read, agent_get_trace_state_variable_value,
5782 agent_set_trace_state_variable_value,
5783 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5784 get_set_tsv_func_addr): New prototypes.
5785
5786 * ax.h: New include file.
5787 * ax.c: New source file.
5788
5789 * tracepoint.c: Include ax.h.
5790 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5791 agent_expr, eval_result_type): Move to ax.h.
5792 (parse_agent_expr): Rename to ...
5793 (gdb_parse_agent_expr): ... this, make it non-static and move
5794 to ax.h.
5795 (unparse_agent_expr) Rename to ...
5796 (gdb_unparse_agent_expr): ... this, make it non-static and move
5797 to ax.h.
5798 (eval_agent_expr): Rename to ...
5799 (eval_tracepoint_agent_expr): ... this.
5800 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5801 forward declarations.
5802 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5803 (agent_get_trace_state_variable_value): New function.
5804 (agent_set_trace_state_variable_value): New function.
5805 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5806 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5807 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5808 (condition_true_at_tracepoint): Likewise.
5809 (parse_agent_expr): Rename to ...
5810 (gdb_parse_agent_expr): ... this and move to ax.c.
5811 (unparse_agent_expr): Rename to ...
5812 (gdb_unparse_agent_expr): ... this and move to ax.c.
5813 (gdb_agent_op_name): Move to ax.c.
5814 (eval_agent_expr): Rename to ...
5815 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5816 and move to ax.c.
5817 (eval_tracepoint_agent_expr): New function.
5818 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5819 non-static.
5e1dc496
LM
5820 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5821 ax.c.
5822 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5823 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5824 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5825 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5826 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5827 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5828 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5829 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5830 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5831 (compile_bytecodes): Remove forward declaration.
5832 (is_goto_target): Move to ax.c.
5833 (compile_bytecodes): Move to ax.c and call
5834 agent_get_trace_state_variable_value (...) and
5835 agent_set_trace_state_variable_value (...).
5836
5837 * Makefile.in: Update ax.c and IPA dependencies.
5838
277e4e52
PA
58392012-02-24 Pedro Alves <palves@redhat.com>
5840
5841 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5842 (cmd_bigqtbuffer_circular): ... this. Only handle
5843 'QTBuffer:circular:'.
5844 (handle_tracepoint_general_set): Adjust.
5845
bf4c19f7
YQ
58462012-02-16 Yao Qi <yao@codesourcery.com>
5847
5848 * inferiors.c: Move code to ...
5849 * dll.c: .... here. New.
5850 * server.h: Declare clear_dlls.
5851 * Makefile.in (SFILES): Add dll.c.
5852 (OBS): Add dll.o
5853 (dll.o): New rule.
5854
d73f2619
YQ
58552012-02-11 Yao Qi <yao@codesourcery.com>
5856
5857 * server.c: (handle_monitor_command): Add a new parameter
5858 `own_buf'.
5859 (handle_query): Update caller.
5860
f8255c2a
JB
58612012-02-09 Joel Brobecker <brobecker@adacore.com>
5862
5863 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5864 * configure, config.in: Regenerate.
5865 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5866 is not defined.
5867
da84f473
PA
58682012-02-02 Pedro Alves <palves@redhat.com>
5869
5870 Try SIGKILL first, then PTRACE_KILL.
5871 * linux-low.c (linux_kill_one_lwp): New.
5872 (linux_kill_one_lwp): Rename to ...
5873 (kill_one_lwp_callback): ... this. Use the new
5874 linux_kill_one_lwp.
5875
e886a173
PA
58762012-02-02 Pedro Alves <palves@redhat.com>
5877
5878 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5879 inferior.
5880
be07f1a2
PA
58812012-01-27 Pedro Alves <palves@redhat.com>
5882
5883 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5884 (elf_64_file_p): Make static.
5885 (linux_pid_exe_is_elf_64_file): New.
5886 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5887 Delete declarations.
5888 (linux_pid_exe_is_elf_64_file): Declare.
5889 * linux-x86-low.c (x86_arch_setup): Use
5890 linux_pid_exe_is_elf_64_file.
5891
d8301ad1
JK
58922012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5893
5894 * linux-low.c (linux_wait_for_event_1): Rename to ...
5895 (linux_wait_for_event): ... here and merge it with former
5896 linux_wait_for_event - new variable wait_ptid, use it.
5897 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5898
01b17894
PA
58992012-01-23 Pedro Alves <palves@redhat.com>
5900
5901 * server.c (main): Avoid yet another case of infinite loop while
5902 detaching/killing after a longjmp.
5903
e825046f
JK
59042012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5905
5906 Code cleanup.
5907 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5908
b9e7b9c3
UW
59092012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5910
5911 * hostio.c (handle_readlink): New function.
5912 (handle_vFile): Call it to handle "vFile:readlink" packets.
5913
901f9912
UW
59142012-01-20 Pedro Alves <palves@redhat.com>
5915 Ulrich Weigand <ulrich.weigand@linaro.org>
5916
5917 * server.c (handle_v_requests): Only support vAttach and vRun to
5918 start multiple processes when in extended protocol mode.
5919
fc1ab1a0
PA
59202012-01-17 Pedro Alves <palves@redhat.com>
5921
5922 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5923 memalign plus mprotect to allocate the scratch buffer.
5924
7d5d4e98
PA
59252012-01-13 Pedro Alves <palves@redhat.com>
5926
5927 * server.c (attach_inferior): Clear `cont_thread'.
5928
f128d5e9
PA
59292012-01-13 Pedro Alves <palves@redhat.com>
5930
5931 * server.c (main): Avoid infinite loop while detaching/killing
5932 after a longjmp.
5933
06db92f0
DE
59342012-01-09 Doug Evans <dje@google.com>
5935
5936 * server.c (start_inferior): Set last_ptid in --wrapper case.
5937
32d92999
YQ
59382012-01-06 Yao Qi <yao@codesourcery.com>
5939
5940 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5941 defined.
5942 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5943
5e0a92a9
YQ
59442012-01-04 Yao Qi <yao@codesourcery.com>
5945
5946 * tracepoint.c (cmd_qtdp): Print debug message
5947 for static tracepoint.
5948
ae639e8c
YQ
59492012-01-04 Yao Qi <yao@codesourcery.com>
5950
5951 * tracepoint.c (trace_vdebug): Differentiate debug message
5952 between gdbserver and IPA.
5953
f72429c5
YQ
59542012-01-03 Yao Qi <yao@codesourcery.com>
5955
5956 * tracepoint.c (tracepoint_was_hit): Don't collect for
5957 static tracepoint.
5958
12c3e59c
JB
59592012-01-02 Joel Brobecker <brobecker@adacore.com>
5960
5961 * terminal.h: Reformat copyright header.
5962
67827812
JB
59632012-01-02 Joel Brobecker <brobecker@adacore.com>
5964
5965 * server.c (gdbserver_version): Update copyright year.
5966 * gdbreplay.c (gdbreplay_version): Likewise.
5967
3e52c33d
JK
59682011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5969
5970 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5971
5972 Revert:
5973 2011-12-18 Hui Zhu <teawater@gmail.com>
5974 * linux-low.c (linux_create_inferior): Save return value to ret.
5975
66f1260e
HZ
59762011-12-18 Hui Zhu <teawater@gmail.com>
5977
5978 * linux-low.c (linux_create_inferior): Save return value to ret.
5979
e77616d7
DE
59802011-12-16 Doug Evans <dje@google.com>
5981
e7b06c57
DE
5982 * linux-low.c (linux_create_inferior): If stdio connection,
5983 redirect stdin from /dev/null, stdout to stderr.
5984 * remote-utils.c (remote_is_stdio): New static global.
5985 (remote_connection_is_stdio): New function.
5986 (remote_prepare): Handle stdio connection.
5987 (remote_open): Ditto.
5988 (remote_close): Don't close stdin for stdio connections.
5989 (read_prim,write_prim): New functions. Replace all calls to
5990 read/write to these.
5991 * server.c (main): Watch for "-" argument. Move call to
5992 remote_prepare before start_inferior.
5993 * server.h (STDIO_CONNECTION_NAME): New macro.
5994 (remote_connection_is_stdio): Declare.
5995
e77616d7
DE
5996 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5997 in debugging output.
5998
82067193
YQ
59992011-12-15 Yao Qi <yao@codesourcery.com>
6000
6001 * tracepoint.c: Include sys/syscall.h.
6002 (gdb_ust_thread): Remove preprocessor conditional.
6003
82bfbe7e
PA
60042011-12-14 Pedro Alves <pedro@codesourcery.com>
6005
6006 * linux-low.c (linux_detach_one_lwp): Call
6007 the_low_target.prepare_to_resume before detaching.
6008
712c6575
YQ
60092011-12-14 Yao Qi <yao@codesourcery.com>
6010
6011 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6012 of write.
6013
d54d1edf
YQ
60142011-12-14 Yao Qi <yao@codesourcery.com>
6015
6016 * i386-low.c (i386_low_stopped_data_address): Initialize local
6017 variable `control'.
6018
6210a125
PA
60192011-12-13 Pedro Alves <pedro@codesourcery.com>
6020
6021 PR remote/13492
6022
6023 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6024 DR_CONTROL unless necessary. Extend comments.
6025 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6026 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6027
2ece8244
YQ
60282011-12-13 Yao Qi <yao@codesourcery.com>
6029
6030 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6031 macros.
6032 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6033
784867a5
JK
60342011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6035
6036 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6037 Print new debug message for such case.
6038
6bf36717
JK
60392011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6040
6041 Fix overlapping memcpy.
6042 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6043 the read_inferior_memory transfer.
6044 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6045 write_inferior_memory transfer.
6046 (set_fast_tracepoint_jump): New variable buf. Use it for the
6047 read_inferior_memory and write_inferior_memory transfers.
6048 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6049 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6050 Use it for the write_inferior_memory transfer.
6051 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6052 buffers.
6053
50275556
MR
60542011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6055
6056 * linux-low.c (fetch_register, store_register): Make code
6057 consistent, fix formatting.
6058
7325beb4
MR
60592011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6060
6061 * linux-low.c (usr_store_inferior_registers): Factor out code
6062 to handle individual registers into...
6063 (store_register): ... this new function.
6064
c642a434
UW
60652011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6066
6067 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6068 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6069 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6070 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6071 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6072 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6073 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6074 (srv_xmlfiles): Add new XML files.
6075
6076 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6077 and <sys/uio.h>.
6078 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6079 (init_registers_s390_linux32v1): Add prototype.
6080 (init_registers_s390_linux32v2): Likewise.
6081 (init_registers_s390_linux64v1): Likewise.
6082 (init_registers_s390_linux64v2): Likewise.
6083 (init_registers_s390x_linux64v1): Likewise.
6084 (init_registers_s390x_linux64v2): Likewise.
6085 (s390_num_regs): Increment to 52.
6086 (s390_regmap): Add orig_r2 register.
6087 (s390_num_regs_3264): Increment to 68.
6088 (s390_regmap_3264): Add orig_r2 register.
6089 (s390_collect_ptrace_register): Handle orig_r2 register.
6090 (s390_supply_ptrace_register): Likewise.
6091 (s390_fill_last_break): New function.
6092 (s390_store_last_break): Likewise.
6093 (s390_fill_system_call): New function.
6094 (s390_store_system_call): Likewise.
6095 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6096 register sets.
6097 (s390_check_regset): New function.
6098 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6099 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6100 Update target_regsets for available register sets.
6101
2268b414
JK
61022011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6103 Jan Kratochvil <jan.kratochvil@redhat.com>
6104
6105 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6106 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6107 New.
6108 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6109 * linux-low.h (struct process_info_private): New member r_debug.
6110 * server.c (handle_qxfer_libraries): Call
6111 the_target->qxfer_libraries_svr4.
6112 (handle_qxfer_libraries_svr4): New function.
6113 (qxfer_packets): New entry "libraries-svr4".
6114 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6115 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6116 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6117 PACKET_qXfer_libraries_svr4.
6118
d6db1fab
UW
61192011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6120
6121 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6122 PSW address/mask between 8-byte and 16-byte formats.
6123 (s390_supply_ptrace_register): Likewise.
6124 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6125 basic addressing mode bit.
6126
242f5f1c
SS
61272011-11-24 Stan Shebs <stan@codesourcery.com>
6128
6129 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6130
f196051f
SS
61312011-11-17 Stan Shebs <stan@codesourcery.com>
6132
6133 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6134 (tracing_start_time): New global.
6135 (tracing_stop_time): New global.
6136 (tracing_user_name): New global.
6137 (tracing_notes): New global.
6138 (tracing_stop_note): New global.
6139 (cmd_qtstart): Set traceframe_usage, start_time.
6140 (stop_tracing): Set stop_time.
6141 (cmd_qtstatus): Report additional status.
6142 (cmd_qtp): New function.
6143 (handle_tracepoint_query): Call it.
6144 (cmd_qtnotes): New function.
6145 (handle_tracepoint_general_set): Call it.
6146 (get_timestamp): Rename from tsv_get_timestamp.
6147
405f8e94
SS
61482011-11-14 Stan Shebs <stan@codesourcery.com>
6149 Kwok Cheung Yeung <kcy@codesourcery.com>
6150
6151 * linux-x86-low.c (small_jump_insn): New.
6152 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6153 trampoline and error message, build a trampoline and issue a small
6154 jump instruction to it.
6155 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6156 trampoline and error message.
6157 (x86_get_min_fast_tracepoint_insn_len): New.
6158 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6159 * linux-low.h (struct linux_target_ops): Add arguments to
6160 install_fast_tracepoint_jump_pad operation, add new operation.
6161 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6162 arguments.
6163 (linux_get_min_fast_tracepoint_insn_len): New function.
6164 (linux_target_op): Add new operation.
6165 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6166 (gdb_trampoline_buffer_end): Ditto.
6167 (gdb_trampoline_buffer_error): Ditto.
6168 (struct ipa_sym_addresses): Add fields for new IPA variables.
6169 (symbol_list): Add entries for new IPA variables.
6170 (struct tracepoint): Add fields to hold the address range of the
6171 trampoline used by the tracepoint.
6172 (trampoline_buffer_head): New static variable.
6173 (trampoline_buffer_tail): Ditto.
6174 (claim_trampoline_space): New function.
6175 (have_fast_tracepoint_trampoline_buffer): New function.
6176 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6177 structure.
6178 (install_fast_tracepoint): Ditto, also add error buffer argument.
6179 (cmd_qtminftpilen): New function.
6180 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6181 (fast_tracepoint_from_trampoline_address): New function.
6182 (fast_tracepoint_collecting): Handle trampoline as part of jump
6183 pad space.
6184 (set_trampoline_buffer_space): New function.
6185 (initialize_tracepoint): Initialize new IPA variables.
6186 * target.h (struct target_ops): Add arguments to
6187 install_fast_tracepoint_jump_pad operation, add new
6188 get_min_fast_tracepoint_insn_len operation.
6189 (target_get_min_fast_tracepoint_insn_len): New.
6190 (install_fast_tracepoint_jump_pad): Add arguments.
6191 * server.h (IPA_BUFSIZ): Define.
6192 * linux-i386-ipa.c: Include extra header files.
6193 (initialize_fast_tracepoint_trampoline_buffer): New function.
6194 (initialize_low_tracepoint): Call it.
6195 * server.h (set_trampoline_buffer_space): Declare.
6196 (claim_trampoline_space): Ditto.
6197 (have_fast_tracepoint_trampoline_buffer): Ditto.
6198
1e4d1764
YQ
61992011-11-14 Yao Qi <yao@codesourcery.com>
6200
6201 * server.c (handle_query): Handle InstallInTrace for qSupported.
6202 * tracepoint.c (add_tracepoint): Sort list.
6203 (install_tracepoint, download_tracepoint): New.
6204 (cmd_qtdp): Call them to install and download tracepoints.
6205 (sort_tracepoints): Removed.
6206 (cmd_qtstart): Update.
6207
5c73ff4e
YQ
62082011-11-14 Yao Qi <yao@codesourcery.com>
6209
6210 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6211 * mem-break.h: Declare.
6212 * tracepoint.c (cmd_qtstart): Move some code to ...
6213 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6214 New.
6215 (download_tracepoints): Move some code to ...
6216 (download_tracepoint_1): ... here. New.
6217
86a30030
YQ
62182011-11-08 Yao Qi <yao@codesourcery.com>
6219
6220 * remote-utils.c (relocate_instruction): A comment fix.
6221
8d26e50c
JB
62222011-11-07 Joel Brobecker <brobecker@adacore.com>
6223
6224 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6225 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6226 dr_status_mirror and dr_control_mirror from debug_reg_state.
6227 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6228 (i386_initial_stuff): Remove use of deleted globals.
6229 (i386_get_thread_context, i386_set_thread_context,
6230 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6231 from debug_reg_state.
6232
a59306a3
YQ
62332011-11-05 Yao Qi <yao@codesourcery.com>
6234
6235 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6236 address as TPOINT's.
6237
3065dfb6
SS
62382011-11-02 Stan Shebs <stan@codesourcery.com>
6239
6240 * tracepoint.c (agent_mem_read_string): New function.
6241 (eval_agent_expr): Call it for tracenz.
6242 * server.c (handle_query): Report support for tracenz.
6243
fd0d8c7c
YQ
62442011-11-02 Yao Qi <yao@codesourcery.com>
6245
6246 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6247
609086b1
YQ
62482011-11-02 Yao Qi <yao@codesourcery.com>
6249
6250 * target.h: Fix a typo in comment.
6251
b9fd1791
PA
62522011-10-31 Pedro Alves <pedro@codesourcery.com>
6253
6254 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6255 clobber the breakpoints' shadows with fast tracepoint jumps.
6256 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6257 * target.c (write_inferior_memory): Also pass MYADDR down to
6258 check_mem_write.
6259
03583c20
UW
62602011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6261
6262 * configure.ac: Check support for personality routine.
6263 * configure: Regenerate.
6264 * config.in: Likewise.
6265 * linux-low.c: Include <sys/personality.h>.
6266 Define ADDR_NO_RANDOMIZE if necessary.
6267 (linux_create_inferior): Disable address space randomization when
6268 forking inferior, if requested.
6269 (linux_supports_disable_randomization): New function.
6270 (linux_target_ops): Install it.
6271 * server.h (disable_randomization): Declare.
6272 * server.c (disable_randomization): New global variable.
6273 (handle_general_set): Handle QDisableRandomization.
6274 (handle_query): Likewise for qSupported.
6275 (main): Support --disable-randomization and --no-disable-randomization
6276 command line arguments.
6277 * target.h (struct target_ops): Add supports_disable_randomization.
6278 (target_supports_disable_randomization): New macro.
6279
723b724b
MF
62802011-09-29 Mike Frysinger <vapier@gentoo.org>
6281
6282 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6283 ifdef check.
6284 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6285 [!PT_GETDSBT] (target_loadmap): New definition.
6286 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6287 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6288 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6289 and PT_GETDSBT to LINUX_LOADMAP.
6290 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6291 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6292
55329a5c 62932011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6294
6295 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6296 (arm_linux_hwbp_cap): New static variable.
6297 (arm_linux_get_hwbp_cap): Replace by ...
6298 (arm_linux_init_hwbp_cap): ... this new function.
6299 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6300 (arm_linux_get_hw_watchpoint_count): Likewise.
6301 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6302 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6303 (arm_prepare_to_resume): Use perror_with_name instead of error.
6304
55329a5c 63052011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6306
6307 * linux-arm-low.c: Include <signal.h>.
6308 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6309 (struct arm_linux_hwbp_cap): New data type.
6310 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6311 (struct arm_linux_hw_breakpoint): New data type.
6312 (MAX_BPTS, MAX_WPTS): Define.
6313 (struct arch_process_info, struct arch_lwp_info): New data types.
6314 (arm_linux_get_hwbp_cap): New function.
6315 (arm_linux_get_hw_breakpoint_count): Likewise.
6316 (arm_linux_get_hw_watchpoint_count): Likewise.
6317 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6318 (arm_hwbp_control_initialize): Likewise.
6319 (arm_hwbp_control_is_enabled): Likewise.
6320 (arm_hwbp_control_is_initialized): Likewise.
6321 (arm_hwbp_control_disable): Likewise.
6322 (arm_linux_hw_breakpoint_equal): Likewise.
6323 (arm_linux_hw_point_initialize): Likewise.
6324 (struct update_registers_data): New data structure.
6325 (update_registers_callback: New function.
6326 (arm_insert_point): Likewise.
6327 (arm_remove_point): Likewise.
6328 (arm_stopped_by_watchpoint): Likewise.
6329 (arm_stopped_data_address): Likewise.
6330 (arm_new_process): Likewise.
6331 (arm_new_thread): Likewise.
6332 (arm_prepare_to_resume): Likewise.
6333 (the_low_target): Register arm_insert_point, arm_remove_point,
6334 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6335 arm_new_thread, and arm_prepare_to_resume.
6336
6b9801d4
SS
63372011-09-15 Stan Shebs <stan@codesourcery.com>
6338
6339 * server.h (struct emit_ops): Add compare-goto fields.
6340 * tracepoint.c (gdb_agent_op_sizes): New table.
6341 (emit_eq_goto): New function.
6342 (emit_ne_goto): New function.
6343 (emit_lt_goto): New function.
6344 (emit_le_goto): New function.
6345 (emit_gt_goto): New function.
6346 (emit_ge_goto): New function.
6347 (is_goto_target): New function.
6348 (compile_bytecodes): Recognize special cases of compare-goto
6349 combinations and call specialized emitters for them.
6350 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6351 (amd64_emit_ne_goto): New function.
6352 (amd64_emit_lt_goto): New function.
6353 (amd64_emit_le_goto): New function.
6354 (amd64_emit_gt_goto): New function.
6355 (amd64_emit_ge_goto): New function.
6356 (amd64_emit_ops): Add the new functions.
6357 (i386_emit_eq_goto): New function.
6358 (i386_emit_ne_goto): New function.
6359 (i386_emit_lt_goto): New function.
6360 (i386_emit_le_goto): New function.
6361 (i386_emit_gt_goto): New function.
6362 (i386_emit_ge_goto): New function.
6363 (i386_emit_ops): Add the new functions.
6364
bf15cbda
SS
63652011-09-08 Stan Shebs <stan@codesourcery.com>
6366
6367 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6368 (i386_emit_epilogue): Restore %ebx.
6369
943ca1dd
JZ
63702011-08-31 Jie Zhang <jzhang918@gmail.com>
6371
6372 * server.c (step_thread): Remove definition.
6373 (process_serial_event): Don't handle Hs.
6374 * server.h (step_thread): Remove declaration.
6375 * target.c (set_desired_inferior): Remove use of step_thread.
6376
e3deef73
LM
63772011-08-24 Luis Machado <lgustavo@codesourcery.com>
6378
6379 * linux-low.c: Include linux-procfs.h.
6380 (linux_attach_lwp_1): Update comments.
6381 (linux_attach): Scan for existing threads when attaching to a
6382 process that is the tgid.
6383 * Makefile.in: Update dependencies.
6384
13da1c97
LM
63852011-08-24 Luis Machado <lgustavo@codesourcery.com>
6386
6387 * configure.srv: Add linux-procfs.o dependencies.
6388
881127c9
YQ
63892011-08-14 Yao Qi <yao@codesourcery.com>
6390
6391 * target.h (struct target_ops): Fix indent.
6392 * win32-low.c (win32_target_ops): Fix comment.
6393
58dbd541
YQ
63942011-08-14 Andrew Jenner <andrew@codesourcery.com>
6395 Yao Qi <yao@codesourcery.com>
6396
6397 * Makefile.in (clean): Remove tic6x-*.c files.
6398 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6399 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6400 (tic6x-c64xp-linux.c): Likewise.
6401 * configure.srv: Add support for tic6x-*-uclinux.
6402 * linux-tic6x-low.c: New.
6403 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6404
78d85199
YQ
64052011-08-14 Andrew Stubbs <ams@codesourcery.com>
6406 Yao Qi <yao@codesourcery.com>
6407
6408 * target.h (struct target_ops): Add read_loadmap.
6409 * linux-low.c (struct target_loadseg): New type.
6410 (struct target_loadmap): New type.
6411 (linux_read_loadmap): New function.
6412 (linux_target_ops): Add linux_read_loadmap.
6413 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6414 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6415 to NULL.
78d85199 6416
a959a88d
EZ
64172011-08-05 Eli Zaretskii <eliz@gnu.org>
6418
6419 * win32-low.c: Include <stdint.h>.
6420
1ced966e
PA
64212011-07-22 Pedro Alves <pedro@codesourcery.com>
6422
6423 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6424 to the inferior here.
6425 (i386_remove_aligned_watchpoint): Ditto.
6426 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6427 fit part of the watchpoint in the debug registers.
6428 (i386_update_inferior_debug_regs): New.
6429 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6430 registers, and only update the inferior on success.
6431 (i386_low_remove_watchpoint): Ditto.
6432
d26e3629
KY
64332011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6434
6435 * linux-low.c (compare_ints, unique, list_threads, show_process,
6436 linux_core_of_thread): Delete.
6437 (linux_target_ops): Change linux_core_of_thread to
6438 linux_common_core_of_thread.
6439 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6440 * utils.c (malloc_failure): Change type of argument.
6441 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6442 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6443 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6444 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6445 (IPA_OBJS): Add common-utils-ipa.o.
6446 (ptid_h, linux_osdata_h): New macros.
6447 (server_h): Add common/common-utils.h, common/xml-utils.h,
6448 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6449 common/ptid.h.
6450 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6451 ptid.o, buffer.o): New rules.
6452 (linux-low.o): Add common/linux-osdata.h as a dependency.
6453 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6454 * configure.ac: Add AC_HEADER_DIRENT check.
6455 * config.in: Regenerate.
6456 * configure: Regenerate.
6457 * remote-utils.c (xml_escape_text): Delete.
6458 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6459 buffer_xml_printf): Move to common/buffer.c.
6460 * server.c (main): Remove call to initialize_inferiors.
6461 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6462 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6463 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6464 internal_error, gdb_assert, gdb_assert_fail): Delete.
6465 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6466 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6467 common/buffer.h.
6468 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6469 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6470 initialize_inferiors): Delete.
6471
2275a1a7
PA
64722011-07-20 Pedro Alves <pedro@codesourcery.com>
6473
6474 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6475 symbol error.
6476
0a5b1e09
PA
64772011-05-31 Pedro Alves <pedro@codesourcery.com>
6478
6479 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6480 assertion.
6481 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6482
6938fd34
YQ
64832011-05-26 Yao Qi <yao@codesourcery.com>
6484
6485 * Makefile.in (thread-db.o): Track dependence to
6486 common/gdb_thread_db.h.
6487 * thread-db.c: include gdb_thread_db.h from right place.
6488
b481f9e0
TT
64892011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6490
6491 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6492 __FILE__ and __LINE__ to internal_error.
6493
98a5dd13
DE
64942011-05-13 Doug Evans <dje@google.com>
6495
6496 * thread-db.c (try_thread_db_load_from_sdir): New function.
6497 (try_thread_db_load_from_dir): New function.
6498 (thread_db_load_search): Handle $sdir, ignore $pdir.
6499 Remove trying of system directories if search of
6500 libthread-db-search-path fails, that is now done via $sdir.
6501
d248b706
KY
65022011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6503
6504 * server.c (handle_query): Add EnableDisableTracepoints to the list
6505 of supported features.
43aaf8b6 6506 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6507 tracepoints.
43aaf8b6
PA
6508 (cmd_qtenable_disable): New.
6509 (cmd_qtstart): Install tracepoints even if disabled.
6510 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6511 receiving a QTEnable or QTDisable packet.
6512 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6513 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6514 tracepoints.
6515 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6516
84e578fb
DE
65172011-05-10 Doug Evans <dje@google.com>
6518
6519 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6520
71f55dd8
DE
65212011-05-04 Doug Evans <dje@google.com>
6522
6523 * linux-low.c (linux_join): Skip process lookup.
6524 * spu-low.c (spu_join): Ditto.
6525 * server.c (join_inferiors_callback): Delete.
6526 (process_serial_event): For 'D' packet (detach) call join_inferior
6527 directly.
6528
4d393d60
JM
65292011-05-04 Joseph Myers <joseph@codesourcery.com>
6530
6531 * README: Don't mention xscale*-*-linux*.
6532 * configure.srv (xscale*-*-linux*): Don't handle target.
6533
b00ad6ff
NF
65342011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6535
6536 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6537 casting pointers.
6538 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6539 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6540 (i386_emit_void_call_2): Likewise.
6541
af96c192
YQ
65422011-04-26 Yao Qi <yao@codesourcery.com>
6543
43aaf8b6
PA
6544 * linux-low.c: Move common macros to linux-ptrace.h.
6545 Include linux-ptrace.h.
af96c192
YQ
6546 * Makefile.in (linux_ptrace_h): New.
6547 (linux-low.o): Depends on linux-ptrace.h.
6548
03f2bd59
JK
65492011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6550
6551 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6552 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6553 (remote_prepare): New function with most of the TCP code from ...
6554 (remote_open): ... here. Detect PORT here unconditionally. Move also
6555 setting transport_is_reliable.
6556 * server.c (run_once): New variable.
6557 (gdbserver_usage): Document it.
6558 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6559 the first run if RUN_ONCE.
6560 * server.h (run_once, remote_prepare): New declarations.
6561
7a9dd1b2
TT
65622011-04-19 Tom Tromey <tromey@redhat.com>
6563
6564 * win32-low.c (handle_load_dll): Remove duplicate "the".
6565
81239425
PM
65662011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6567
6568 Remove support for old Cygwin 1.5 versions.
6569 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6570 function to avoid warning.
6571 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6572 warning.
6573
9e0627f1
PM
65742011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6575
6576 * gdbserver/server.h (Macro _): Define it if not available.
6577
588eebee
MS
65782011-03-14 Michael Snyder <msnyder@vmware.com>
6579
348af9f7 6580 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6581
43f70d4c
JB
65822011-03-10 Joel Brobecker <brobecker@adacore.com>
6583
6584 * Makefile.in (maintainer-clean realclean distclean): Remove
6585 "make ... subdir_do" command.
6586
348af9f7
MS
65872011-03-10 Michael Snyder <msnyder@vmware.com>
6588
6589 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6590
6591 * server.c (handle_v_run): Free alloced buffer on early return.
6592
e637a4f5
YQ
65932011-03-09 Yao Qi <yao@codesourcery.com>
6594
6595 Revert:
6596 2011-03-04 Yao Qi <yao@codesourcery.com>
6597
6598 * Makefile.in: Remove GNU make feature --directory.
6599
6600 2011-03-05 Yao Qi <yao@codesourcery.com>
6601
6602 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6603 (subdir_do): New make target. Copied from gdb/Makefile.
6604 (maintainer-clean, realclean, distclean, clean): Call corresponding
6605 make targets in common/Makefile.
6606
6607 2011-02-11 Yao Qi <yao@codesourcery.com>
6608
6609 * configure.ac: Call AC_PROG_RANLIB.
6610 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6611 * configure: Regenerate.
6612
e6edda56
JK
66132011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6614
6615 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6616
e5141119
JB
66172011-03-06 Yao Qi <yao@codesourcery.com>
6618
6619 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6620
64794aa4
JB
66212011-03-05 Yao Qi <yao@codesourcery.com>
6622
6623 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6624 (subdir_do): New make target. Copied from gdb/Makefile.
6625 (maintainer-clean, realclean, distclean, clean): Call corresponding
6626 make targets in common/Makefile.
6627
7a762829
YQ
66282011-03-04 Yao Qi <yao@codesourcery.com>
6629
6630 * Makefile.in: Remove GNU make feature --directory.
6631
348af9f7
MS
66322011-03-04 Michael Snyder <msnyder@vmware.com>
6633
6634 * server.c (queue_stop_reply): Call xmalloc not malloc.
6635
66362011-03-02 Michael Snyder <msnyder@vmware.com>
6637
6638 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6639
9f72fee2
MS
66402011-02-28 Michael Snyder <msnyder@vmware.com>
6641
588eebee
MS
6642 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6643 (cmd_qtframe): Ditto.
6644 (cmd_qtbuffer): Ditto.
6645 (cmd_bigqtbuffer): Ditto.
6646
9f72fee2
MS
6647 * utils.c (decimal2str): Initialize 'width' to nine, then
6648 don't mess with it.
6649
8040bd49
UW
66502011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6651
6652 * hostio.c (require_data): Free *data, not data.
6653
7e52cbd0
JK
66542011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6655
6656 * hostio.c (require_data): Use free, not xfree.
6657
9130f83e
MS
66582011-02-27 Michael Snyder <msnyder@vmware.com>
6659
4b812f4e
MS
6660 * server.c (handle_query): Discard unused value.
6661
9130f83e
MS
6662 * hostio.c (require_data): Free malloc memory before returning
6663 error.
6664
69d37113
MS
66652011-02-26 Michael Snyder <msnyder@vmware.com>
6666
6667 * linux-low.c (list_threads): Call closedir for dirent.
6668
35f5825a
MS
66692011-02-27 Michael Snyder <msnyder@vmware.com>
6670
2a589cef
MS
6671 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6672 a case statement falls through.
6673
0adea5f7
MS
6674 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6675
35f5825a
MS
6676 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6677 in comparison.
6678
238f1c74
MS
66792011-02-26 Michael Snyder <msnyder@vmware.com>
6680
6681 * utils.c (decimal2str): Eliminate dead code and dead param.
6682 (pulongest): Drop dead param from call to decimal2str.
6683 (plongest): Ditto.
6684
633ff500
JB
66852011-02-24 Joel Brobecker <brobecker@adacore.com>
6686
6687 Revert the following patch (not approved yet):
6688 2011-02-21 Hui Zhu <teawater@gmail.com>
6689 * tracepoint.c (tp_printf): New function.
6690 (eval_agent_expr): Handle gdb_agent_op_printf.
6691
f9c6ff72
HZ
66922011-02-21 Hui Zhu <teawater@gmail.com>
6693
6694 * tracepoint.c (tp_printf): New function.
6695 (eval_agent_expr): Handle gdb_agent_op_printf.
6696
94d5e490
TT
66972011-02-18 Tom Tromey <tromey@redhat.com>
6698
6699 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6700 (tracepoint.o): Likewise.
6701 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6702 (gdb_agent_op_names): Likewise.
6703
c7f96d2b
TT
67042011-02-18 Tom Tromey <tromey@redhat.com>
6705
6706 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6707 gdb_agent_op_rot>: New constants.
6708 (gdb_agent_op_names): Add pick and roll.
6709 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6710 cases.
6711
0feedb2c
JK
67122011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6713
6714 * aclocal.m4: Regenerated with aclocal-1.11.1.
6715
b3b9301e
PA
67162011-02-14 Pedro Alves <pedro@codesourcery.com>
6717
6718 * server.c (handle_qxfer_traceframe_info): New.
6719 (qxfer_packets): Register "traceframe-info".
6720 (handle_query): Report support for qXfer:traceframe-info:read+.
6721 * tracepoint.c (match_blocktype): New.
6722 (traceframe_find_block_type): Rename to ...
6723 (traceframe_walk_blocks): ... this. Add callback filter argument,
6724 and use it.
6725 (traceframe_find_block_type): New, reimplemented on top of
6726 traceframe_walk_blocks.
6727 (build_traceframe_info_xml): New.
6728 (traceframe_read_info): New.
6729 * server.h (traceframe_read_info): Declare.
6730
4f3e6fb7
YQ
67312011-02-11 Yao Qi <yao@codesourcery.com>
6732
6733 * configure.ac: Call AC_PROG_RANLIB.
6734 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6735 * configure: Regenerate.
6736
764880b7
PA
67372011-02-07 Pedro Alves <pedro@codesourcery.com>
6738
6739 * server.c (gdb_read_memory): Change return semantics to allow
6740 partial transfers.
6741 (handle_search_memory_1): Adjust.
6742 (process_serial_event) <'m' packet>: Handle partial transfers.
6743 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6744
1c79eb8a
PA
67452011-01-28 Pedro Alves <pedro@codesourcery.com>
6746
6747 * regcache.c (init_register_cache): Initialize
6748 regcache->register_status.
6749 (free_register_cache): Release regcache->register_status.
6750 (regcache_cpy): Copy register_status.
6751 (registers_to_string): Print 'x's for unavailable registers.
6752 (supply_register): Mark the register's status valid or
6753 unavailable, depending on whether a buffer was passed in or not.
6754 (supply_register_zeroed): New.
6755 (supply_regblock): Mark the registers' status valid or
6756 unavailable, depending on whether a buffer was passed in or not.
6757 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6758 (struct regcache): New `register_status' field.
6759 (supply_register_zeroed): Declare.
6760 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6761 supply_register_zeroed, rather than passing a NULL buffer to
6762 supply_register.
6763 * tracepoint.c (fetch_traceframe_registers): Update comment.
6764
85724a0e
PA
67652011-01-28 Pedro Alves <pedro@codesourcery.com>
6766
6767 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6768 buffer explicit.
6769
d08aafef
PA
67702011-01-25 Pedro Alves <pedro@codesourcery.com>
6771
6772 * server.h (decode_xfer_write): Change prototype.
6773 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6774 and don't extract the annex here.
6775 * server.c (decode_xfer_read): Remove `annex' parameter,
6776 and don't extract the annex here.
6777 (decode_xfer): New.
6778 (struct qxfer): New.
6779 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6780 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6781 (handle_qxfer_statictrace): New functions, abstracted out from
6782 handle_query, and made to use the struct qxfer interface.
6783 (handle_threads_qxfer_proper): Rename to ...
6784 (handle_qxfer_threads_proper): ... this.
6785 (handle_threads_qxfer): Rename to ...
6786 (handle_qxfer_threads): ... this. Adjust.
6787 (qxfer_packets): New array.
6788 (handle_qxfer): New function.
6789 (handle_query): Use handle_qxfer.
6790
493e2a69
MS
67912011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6792
6793 * gdbreplay.c: Shorten lines of >= 80 columns.
6794 * linux-low.c: Ditto.
6795 * linux-ppc-low.c: Ditto.
6796 * linux-s390-low.c: Ditto.
6797 * linux-sparc-low.c: Ditto.
6798 * linux-x86-low.c: Ditto.
6799 * linux-xtensa-low.c: Ditto.
6800 * mem-break.c: Ditto.
6801 * nto-low.c: Ditto.
6802 * regcache.h: Ditto.
6803 * remote-utils.c: Ditto.
6804 * server.c: Ditto.
6805 * server.h: Ditto.
6806 * thread-db.c: Ditto.
6807 * tracepoint.c: Ditto.
6808 * utils.c: Ditto.
6809 * win32-low.h: Ditto.
6810
44944448
JB
68112011-01-05 Joel Brobecker <brobecker@adacore.com>
6812
6813 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6814 update.
6815
71ce852c
JB
68162011-01-01 Joel Brobecker <brobecker@adacore.com>
6817
6818 * server.c (gdbserver_version): Update copyright year in version
6819 output.
6820 * gdbreplay.c (gdbreplay_version): Ditto.
6821
eb826dc6
MF
68222010-12-29 Jie Zhang <jie.zhang@analog.com>
6823
6824 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6825 * linux-bfin-low.c: New file.
6826 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6827 PT_DATA_ADDR for BFIN targets.
6828 * Makefile.in (SFILES): Add linux-bfin-low.c.
6829 (clean): Remove reg-bfin.c.
6830 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6831 * README: Mention supported Blackfin targets.
6832
39ab222a
MF
68332010-12-23 Mike Frysinger <vapier@gentoo.org>
6834
6835 * .gitignore: New file.
6836
a1f2ce7d
MF
68372010-11-16 Mike Frysinger <vapier@gentoo.org>
6838
6839 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6840
f474844c
JZ
68412010-10-22 Jie Zhang <jie@codesourcery.com>
6842
6843 * Makefile.in: Add FLAGS_TO_PASS variable.
6844 (install): Remove dependency of install-only and recursively
6845 invoke make for install-only.
6846
f1048712
DE
68472010-10-04 Doug Evans <dje@google.com>
6848
6849 * Makefile.in (uninstall): Use $(DESTDIR).
6850
b53a1623
PA
68512010-09-24 Pedro Alves <pedro@codesourcery.com>
6852
e6ee044d
PA
6853 PR gdb/11842
6854
b53a1623
PA
6855 * linux-x86-low.c (compat_siginfo_from_siginfo)
6856 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6857 si_code is < 0. Check for si_code == SI_TIMER before checking for
6858 si_code < 0.
6859
fa1bd1e4
JB
68602010-09-13 Joel Brobecker <brobecker@adacore.com>
6861
6862 * lynx-i386-low.c: New file.
6863 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6864
47fac8f8
JB
68652010-09-13 Joel Brobecker <brobecker@adacore.com>
6866
6867 * lynx-low.c (ptrace_request_to_str): Remove handling for
6868 request values that have been removed in LynxOS 5.x.
6869
1adfc54d
JB
68702010-09-13 Joel Brobecker <brobecker@adacore.com>
6871
6872 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6873 <ptrace.h>
6874
c2a66c29
NS
68752010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6876
6877 * configure.ac: Add --enable-inprocess-agent option.
6878 * configure: Rebuilt.
6879
32fcada3
YQ
68802010-09-06 Yao Qi <yao@codesourcery.com>
6881
6882 * linux-low.c (linux_kill): Remove unused variable.
6883 (linux_stabilize_threads): Likewise.
6884 * server.c (start_inferior): Likewise.
6885 (queue_stop_reply_callback): Likewise.
6886 * tracepoint.c (do_action_at_tracepoint): Likewise.
6887
0cccb683
YQ
68882010-09-06 Yao Qi <yao@codesourcery.com>
6889
6890 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6891 on return.
6892
423ec54c
JK
68932010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6894
6895 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6896
12ac6819
PA
68972010-09-06 Pedro Alves <pedro@codesourcery.com>
6898
6899 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6900 "$(IPA_DEPFILES)".
6901
8ed54b31
JB
69022010-09-01 Joel Brobecker <brobecker@adacore.com>
6903
6904 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6905 gdbserver/lynx-ppc-low.c: New files.
6906 * Makefile.in (lynx_low_h): New variable.
6907 (lynx-low.o, lynx-ppc-low.o): New rules.
6908 * configure.ac: On LynxOS, link with -lnetinet.
6909 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6910 * configure: regenerate.
6911
bb0116a4
JB
69122010-09-01 Joel Brobecker <brobecker@adacore.com>
6913
6914 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6915 * configure.ac: Add check for vasprintf and vsnprintf.
6916 * configure, config.in: Regenerate.
6917 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6918
a778ab81 69192010-09-01 Joel Brobecker <brobecker@adacore.com>
6920
6921 * gdbreplay.c: Move include of alloca.h up, next to include of
6922 malloc.h.
6923 * server.h: Add include of malloc.h.
6924 * mem-break.c: Remove include of malloc.h.
6925 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6926
8b034a19 69272010-09-01 Joel Brobecker <brobecker@adacore.com>
6928
6929 * Makefile.in (memmem.o): Build with -Wno-error.
6930
69312010-09-01 Joel Brobecker <brobecker@adacore.com>
6932
6933 * utils.c (xsnprintf): Make non-static.
6934 * server.h: Add xsnprintf declaration.
6935 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6936 replace calls to snprintf by calls to xsnprintf throughout.
6937
69382010-09-01 Joel Brobecker <brobecker@adacore.com>
6939
6940 * configure.ac: Add configure check for alloca.
6941 * configure, config.in: Regenerate.
6942 * server.h: Include alloca.h if it exists.
6943 * gdbreplay.c: Include alloca.h if it exists.
6944
1a981360
PA
69452010-08-28 Pedro Alves <pedro@codesourcery.com>
6946
6947 * linux-low.c (__SIGRTMIN): Define if not already defined.
6948 (linux_create_inferior): Check for __ANDROID__ rather than
6949 __SIGRTMIN.
6950 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6951 are already deferred.
6952 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6953 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6954 stopped and already has a pending signal to report.
6955 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6956 a pending signal to report or is moving out of a jump pad.
6957 (linux_init_signals): Check for __ANDROID__ rather than
6958 __SIGRTMIN.
6959
b4d51a55
PA
69602010-08-28 Pedro Alves <pedro@codesourcery.com>
6961
6962 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6963 debug_threads check. Avoid a linear search when not doing debug
6964 output.
6965
ec48365d
PA
69662010-08-27 Pedro Alves <pedro@codesourcery.com>
6967
6968 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6969 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6970 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6971 (process_event): Change local fd's type to gdb_fildes_t.
6972 (create_file_handler): Adjust prototype.
6973 (delete_file_handler): Adjust prototype.
6974 (handle_file_event): Adjust prototype. Use pfildes.
6975 (create_file_event): Adjsut prototype.
6976 * remote-utils.c (remote_desc, listen_desc): Change type to
6977 gdb_fildes_t.
6978 * server.h: New gdb_fildes_t typedef.
6979 [USE_WIN32API]: Include winsock2.h.
6980 (delete_file_handler, add_file_handler): Adjust prototypes.
6981 (pfildes): Declare.
6982 * utils.c (pfildes): New.
6983
854d88f0
PA
69842010-08-27 Pedro Alves <pedro@codesourcery.com>
6985
6986 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6987 * configure: Regenerate.
6988
0146f85b
PA
69892010-08-27 Pedro Alves <pedro@codesourcery.com>
6990
6991 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6992 (linux_done_accessing_memory): ... this.
6993 (linux_target_ops): Adjust.
6994 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6995 * nto-low.c (nto_target_ops): Adjust comment.
6996 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6997 * spu-low.c (spu_target_ops): Adjust comment.
6998 * target.h (target_ops): Rename unprepare_to_access_memory field
6999 to done_accessing_memory.
7000 (unprepare_to_access_memory): Rename to ...
7001 (done_accessing_memory): ... this.
7002
90d74c30
PA
70032010-08-26 Pedro Alves <pedro@codesourcery.com>
7004
7005 * linux-low.c (linux_prepare_to_access_memory): New.
7006 (linux_unprepare_to_access_memory): New.
7007 (linux_target_ops): Install them.
7008 * server.c (read_memory): Rename to ...
7009 (gdb_read_memory): ... this. Use
7010 prepare_to_access_memory/prepare_to_access_memory.
7011 (write_memory): Rename to ...
7012 (gdb_write_memory): ... this. Use
7013 prepare_to_access_memory/prepare_to_access_memory.
7014 (handle_search_memory_1): Adjust.
7015 (process_serial_event): Adjust.
7016 * target.h (struct target_ops): New fields
7017 prepare_to_access_memory and unprepare_to_access_memory.
7018 (prepare_to_access_memory, unprepare_to_access_memory): New.
7019 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7020 prepare_to_access_memory/prepare_to_access_memory.
7021 * nto-low.c (nto_target_ops): Adjust.
7022 * spu-low.c (spu_target_ops): Adjust.
7023 * win32-low.c (win32_target_ops): Adjust.
7024
fd467969
PA
70252010-08-26 Pedro Alves <pedro@codesourcery.com>
7026
7027 * Makefile.in (WARN_CFLAGS): Get it from configure.
7028 (WERROR_CFLAGS): New.
7029 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7030 * configure.ac: Introduce --enable-werror, which adds -Werror to
7031 the compiler command line. Enabled by default. Disable with
7032 --disable-werror. Add -Wdeclaration-after-statement
7033 Wpointer-arith and -Wformat-nonliteral to warning flags.
7034 * configure: Regenerate.
7035
331e2f5f
PA
70362010-08-26 Pedro Alves <pedro@codesourcery.com>
7037
7038 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7039
e581f2b4
PA
70402010-08-26 Pedro Alves <pedro@codesourcery.com>
7041
7042 * gdbreplay.c (remote_error): New.
7043 (gdbchar): New.
7044 (expect): Use gdbchar. Check for error reading from GDB.
7045 Clarify sync error output.
7046 (play): Check for errors writing to GDB.
7047 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7048 * remote-utils.c (getpkt): Check for errors writing to the remote
7049 descriptor.
7050
3c11dd79
PA
70512010-08-25 Pedro Alves <pedro@codesourcery.com>
7052
7053 * linux-low.c (linux_wait_1): Move non-debugging code out of
7054 `debug_threads' control.
7055
d20a8ad9
PA
70562010-08-25 Pedro Alves <pedro@codesourcery.com>
7057
7058 * linux-low.c (linux_wait_1): Don't set last_status here.
7059 * server.c (push_event, queue_stop_reply_callback): Assert we're
7060 not pushing a TARGET_WAITKIND_IGNORE event.
7061 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7062 (myresume, handle_target_event): Set the thread's last_resume_kind
7063 and last_status from the target returned status.
7064
964e4306
PA
70652010-08-25 Pedro Alves <pedro@codesourcery.com>
7066
7067 PR threads/10729
7068
7069 * linux-x86-low.c (update_debug_registers_callback): New.
7070 (i386_dr_low_set_addr): Use it.
7071 (i386_dr_low_get_addr): New.
7072 (i386_dr_low_set_control): Use update_debug_registers_callback.
7073 (i386_dr_low_get_control): New.
7074 (i386_dr_low_get_status): Adjust.
7075 * linux-low.c (linux_stop_lwp): New.
7076 * linux-low.h (linux_stop_lwp): Declare.
7077
7078 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7079 argument instead of a i386_debug_reg_state.
7080 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7081 a i386_debug_reg_state.
7082 (i386_insert_aligned_watchpoint): Adjust.
7083 (i386_remove_aligned_watchpoint): Adjust.
7084 (i386_low_stopped_data_address): Read the debug registers from the
7085 inferior instead of from the mirrors.
7086 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7087 (i386_dr_low_get_addr): Declare.
7088 (i386_dr_low_get_control): Declare.
7089 (i386_dr_low_get_status): Change prototype.
7090
7091 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7092 (i386_dr_low_get_addr): New.
7093 (i386_dr_low_get_control): New.
7094 (i386_dr_low_get_status): Adjust prototype. Return
7095 dr_status_mirror.
7096 (i386_initial_stuff): Clear dr_status_mirror and
7097 dr_control_mirror.
7098 (i386_get_thread_context): Adjust.
7099 (i386_set_thread_context): Adjust.
7100 (i386_thread_added): Adjust.
7101
5f21a75b
PA
71022010-08-24 Pedro Alves <pedro@codesourcery.com>
7103
7104 * linux-low.h (linux_thread_area): Delete declaration.
7105
3e4c1235
TS
71062010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7107
7108 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7109 after its termination.
7110
1971b033
PA
71112010-08-09 Pedro Alves <pedro@codesourcery.com>
7112
7113 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7114 (gdb_wants_all_stopped): Delete.
7115 (linux_wait_1): Don't call them.
7116 * server.c (handle_v_cont): Tag all threads as want-stopped.
7117 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7118 stopped as "client-wants-stopped".
7119
310444ac
PA
71202010-07-31 Pedro Alves <pedro@codesourcery.com>
7121
7122 * Makefile.in (signals_h): New.
7123 (server_h): Depend on it.
7124 (server.o): Don't depend on $(signals_def).
7125 (signals.o): Depend on $(signals_def).
7126
a19cae16
JK
71272010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7128
7129 * Makefile.in (signals_def): New.
7130 (server_h): Append include/gdb/signals.h and signals_def.
7131 (server.o): Append signals_def.
7132
30d50328
JK
71332010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7134
7135 * server.c (handle_target_event): Use target_signal_to_host for
7136 resume_info.sig initialization.
7137 * target.h (struct thread_resume) <sig>: New comment.
7138
5c3216e2
OS
71392010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7140
c6f46ca0
OS
7141 * server.c (handle_query): strcpy() the returned string from paddress()
7142 instead of sprintf().
5c3216e2
OS
7143 * utils.c (paddress): Return phex_nz().
7144
6bd31874
JB
71452010-07-07 Joel Brobecker <brobecker@adacore.com>
7146
7147 * server.c (handle_v_cont): Call mourn_inferior if process
7148 just exited.
7149 (myresume): Likewise.
7150
0fb4aa4b
PA
71512010-07-01 Pedro Alves <pedro@codesourcery.com>
7152
7153 Static tracepoints, and integration with UST.
7154
7155 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7156 * mem-break.c (uninsert_all_breakpoints)
7157 (reinsert_all_breakpoints): New.
7158 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7159 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7160 (gdb_agent_ust_loaded, helper_thread_id)
7161 (gdb_agent_helper_thread_id): New macros.
7162 (struct ipa_sym_addresses): Add addr_ust_loaded,
7163 addr_helper_thread_id, addr_cmd_buf.
7164 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7165 (in_process_agent_loaded_ust): New.
7166 (write_e_ust_not_loaded): New.
7167 (maybe_write_ipa_ust_not_loaded): New.
7168 (struct collect_static_trace_data_action): New.
7169 (enum tracepoint_type) <static_tracepoint>: New.
7170 (struct tracepoint) <handle>: Mention static tracepoints.
7171 (struct static_tracepoint_ctx): New.
7172 (CMD_BUF_SIZE): New.
7173 (add_tracepoint_action): Handle static tracepoint actions.
7174 (unprobe_marker_at): New.
7175 (clear_installed_tracepoints): Handle static tracepoints.
7176 (cmd_qtdp): Handle static tracepoints.
7177 (probe_marker_at): New.
7178 (cmd_qtstart): Handle static tracepoints.
7179 (response_tracepoint): Handle static tracepoints.
7180 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7181 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7182 (get_context_regcache): Handle static tracepoints.
7183 (do_action_at_tracepoint): Handle static tracepoint actions.
7184 (traceframe_find_block_type): Handle static trace data blocks.
7185 (traceframe_read_sdata): New.
7186 (download_tracepoints): Download static tracepoint actions.
7187 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7188 (GDB_PROBE_NAME): New.
7189 (ust_ops): New.
7190 (GET_UST_SYM): New.
7191 (USTF): New.
7192 (dlsym_ust): New.
7193 (ust_marker_to_static_tracepoint): New.
7194 (gdb_probe): New.
7195 (collect_ust_data_at_tracepoint): New.
7196 (gdb_ust_probe): New.
7197 (UNIX_PATH_MAX, SOCK_DIR): New.
7198 (gdb_ust_connect_sync_socket): New.
7199 (resume_thread, stop_thread): New.
7200 (run_inferior_command): New.
7201 (init_named_socket): New.
7202 (gdb_ust_socket_init): New.
7203 (cstr_to_hexstr): New.
7204 (next_st): New.
7205 (first_marker, next_marker): New.
7206 (response_ust_marker): New.
7207 (cmd_qtfstm, cmd_qtsstm): New.
7208 (unprobe_marker_at, probe_marker_at): New.
7209 (cmd_qtstmat, gdb_ust_thread): New.
7210 (gdb_ust_init): New.
7211 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7212 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7213 (ST_REGENTRY): New.
7214 (x86_64_st_collect_regmap): New.
7215 (X86_64_NUM_ST_COLLECT_GREGS): New.
7216 (AMD64_RIP_REGNUM): New.
7217 (supply_static_tracepoint_registers): New.
7218 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7219 (ST_REGENTRY): New.
7220 (i386_st_collect_regmap): New.
7221 (i386_NUM_ST_COLLECT_GREGS): New.
7222 (supply_static_tracepoint_registers): New.
7223 * server.c (handle_query): Handle qXfer:statictrace:read.
7224 <qSupported>: Report support for StaticTracepoints, and
7225 qXfer:statictrace:read features.
7226 * server.h (traceframe_read_sdata)
7227 (supply_static_tracepoint_registers): Declare.
7228 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7229 (unpack_varlen_hex): Include in IPA build.
7230 * Makefile.in (ustlibs, ustinc): New.
7231 (IPA_OBJS): Add remote-utils-ipa.o.
7232 ($(IPA_LIB)): Link -ldl and -lpthread.
7233 (UST_CFLAGS): New.
7234 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7235 * config.in, configure: Regenerate.
7236
9e4344e5
PA
72372010-06-20 Ian Lance Taylor <iant@google.com>
7238 Pedro Alves <pedro@codesourcery.com>
7239
7240 * linux-x86-low.c (always_true): Delete.
7241 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7242 trying to fool the compiler with always_true.
7243
c6beb2cb
PA
72442010-06-20 Pedro Alves <pedro@codesourcery.com>
7245
7246 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7247 conditions in gdbserver.
7248
d2ed6730
UW
72492010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7250
7251 * spu-low.c (spu_read_memory): Wrap around local store limit.
7252 (spu_write_memory): Likewise.
7253
4e29fb54
PA
72542010-06-15 Pedro Alves <pedro@codesourcery.com>
7255
7256 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7257 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7258 LONGEST uses.
7259 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7260 uses.
7261 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7262 uses with LONGEST uses.
7263
6a271cae
PA
72642010-06-14 Stan Shebs <stan@codesourcery.com>
7265 Pedro Alves <pedro@codesourcery.com>
7266
7267 Bytecode compiler.
7268
7269 * linux-x86-low.c: Include limits.h.
7270 (add_insns): New.
7271 (always_true): New.
7272 (EMIT_ASM): New.
7273 (EMIT_ASM32): New.
7274 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7275 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7276 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7277 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7278 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7279 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7280 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7281 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7282 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7283 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7284 (amd64_emit_void_call_2): New.
7285 (amd64_emit_ops): New.
7286 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7287 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7288 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7289 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7290 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7291 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7292 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7293 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7294 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7295 (i386_emit_stack_adjust, i386_emit_int_call_1)
7296 (i386_emit_void_call_2): New.
7297 (i386_emit_ops): New.
7298 (x86_emit_ops): New.
7299 (the_low_target): Install x86_emit_ops.
7300 * server.h (struct emit_ops): New.
7301 (get_raw_reg_func_addr): Declare.
7302 (current_insn_ptr, emit_error): Declare.
7303 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7304 (set_trace_state_variable_value): New defines.
7305 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7306 addr_get_trace_state_variable_value and
7307 addr_set_trace_state_variable_value.
7308 (symbol_list): New fields for get_raw_reg,
7309 get_trace_state_variable_value and set_trace_state_variable_value.
7310 (condfn): New typedef.
7311 (struct tracepoint): New field `compiled_cond'.
7312 (do_action_at_tracepoint): Clear compiled_cond.
7313 (get_trace_state_variable_value, set_trace_state_variable_value):
7314 Export in the IPA.
7315 (condition_true_at_tracepoint): If there's a compiled condition,
7316 run that.
7317 (current_insn_ptr, emit_error): New globals.
7318 (struct bytecode_address): New.
7319 (get_raw_reg_func_addr): New.
7320 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7321 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7322 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7323 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7324 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7325 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7326 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7327 (compile_tracepoint_condition, compile_bytecodes): New.
7328 * target.h (emit_ops): Forward declare.
7329 (struct target_ops): New field emit_ops.
7330 (target_emit_ops): New.
7331 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7332 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7333 * linux-low.c (linux_emit_ops): New.
7334 (linux_target_ops): Install it.
7335 * linux-low.h (struct linux_target_ops): New field emit_ops.
7336
92b72907
UW
73372010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7338
7339 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7340 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7341
fa593d66
PA
73422010-06-01 Pedro Alves <pedro@codesourcery.com>
7343 Stan Shebs <stan@codesourcery.com>
7344
7345 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7346 (all): Depend on $(extra_libraries).
7347 (install-only): Install the IPA.
7348 (IPA_OBJS, IPA_LIB): New.
7349 (clean): Remove the IPA lib.
7350 (IPAGENT_CFLAGS): New.
7351 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7352 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7353 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7354 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7355 * configure.ac: Check for atomic builtins support in the compiler.
7356 (IPA_DEPFILES, extra_libraries): Define.
7357 * configure.srv (ipa_obj): Add description.
7358 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7359 (i[34567]86-*-linux*): Set ipa_obj.
7360 (x86_64-*-linux*): Set ipa_obj.
7361 * linux-low.c (stabilizing_threads): New.
7362 (supports_fast_tracepoints): New.
7363 (linux_detach): Stabilize threads before detaching.
7364 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7365 the lwp is either not stabilizing, or is moving out of a jump pad.
7366 (linux_fast_tracepoint_collecting): New.
7367 (maybe_move_out_of_jump_pad): New.
7368 (enqueue_one_deferred_signal): New.
7369 (dequeue_one_deferred_signal): New.
7370 (linux_wait_for_event_1): If moving out of a jump pad, defer
7371 pending signals to later.
7372 (linux_stabilize_threads): New.
7373 (linux_wait_1): Check if threads need moving out of jump pads, and
7374 do it if so.
7375 (stuck_in_jump_pad_callback): New.
7376 (move_out_of_jump_pad_callback): New.
7377 (lwp_running): New.
7378 (linux_resume_one_lwp): Handle moving out of jump pads.
7379 (linux_set_resume_request): Dequeue deferred signals.
7380 (need_step_over_p): Also step over fast tracepoint jumps.
7381 (start_step_over): Also uninsert fast tracepoint jumps.
7382 (finish_step_over): Also reinsert fast tracepoint jumps.
7383 (linux_install_fast_tracepoint_jump): New.
7384 (linux_target_ops): Install linux_stabilize_threads and
7385 linux_install_fast_tracepoint_jump_pad.
7386 * linux-low.h (linux_target_ops) <get_thread_area,
7387 install_fast_tracepoint_jump_pad>: New fields.
7388 (struct lwp_info) <collecting_fast_tracepoint,
7389 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7390 (linux_get_thread_area): Declare.
7391 * linux-x86-low.c (jump_insn): New.
7392 (x86_get_thread_area): New.
7393 (append_insns): New.
7394 (push_opcode): New.
7395 (amd64_install_fast_tracepoint_jump_pad): New.
7396 (i386_install_fast_tracepoint_jump_pad): New.
7397 (x86_install_fast_tracepoint_jump_pad): New.
7398 (the_low_target): Install x86_get_thread_area and
7399 x86_install_fast_tracepoint_jump_pad.
7400 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7401 (struct fast_tracepoint_jump): New.
7402 (fast_tracepoint_jump_insn): New.
7403 (fast_tracepoint_jump_shadow): New.
7404 (find_fast_tracepoint_jump_at): New.
7405 (fast_tracepoint_jump_here): New.
7406 (delete_fast_tracepoint_jump): New.
7407 (set_fast_tracepoint_jump): New.
7408 (uninsert_fast_tracepoint_jumps_at): New.
7409 (reinsert_fast_tracepoint_jumps_at): New.
7410 (set_breakpoint_at): Use write_inferior_memory.
7411 (uninsert_raw_breakpoint): Use write_inferior_memory.
7412 (check_mem_read): Mask out fast tracepoint jumps.
7413 (check_mem_write): Mask out fast tracepoint jumps.
7414 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7415 (set_fast_tracepoint_jump): Declare.
7416 (delete_fast_tracepoint_jump)
7417 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7418 (reinsert_fast_tracepoint_jumps_at): Declare.
7419 * regcache.c: Don't compile many functions when building the
7420 in-process agent library.
7421 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7422 the register buffer in the heap.
7423 (free_register_cache): If the register buffer isn't owned by the
7424 regcache, don't free it.
7425 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7426 pre-existing register caches.
7427 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7428 type.
7429 (convert_ascii_to_int): : Constify `from' parameter type.
7430 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7431 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7432 the needed buffer in-place.
7433 (relocate_instruction): New.
7434 * server.c (handle_query) <qSymbols>: If the target supports
7435 tracepoints, give it a chance of looking up symbols. Report
7436 support for fast tracepoints.
7437 (handle_status): Stabilize threads.
7438 (process_serial_event): Adjust.
7439 * server.h (struct fast_tracepoint_jump): Forward declare.
7440 (struct process_info) <fast_tracepoint_jumps>: New field.
7441 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7442 (decode_X_packet, decode_M_packet): Adjust.
7443 (relocate_instruction): Declare.
7444 (in_process_agent_loaded): Declare.
7445 (tracepoint_look_up_symbols): Declare.
7446 (struct fast_tpoint_collect_status): Declare.
7447 (fast_tracepoint_collecting): Declare.
7448 (force_unlock_trace_buffer): Declare.
7449 (handle_tracepoint_bkpts): Declare.
7450 (initialize_low_tracepoint)
7451 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7452 * target.h (struct target_ops) <stabilize_threads,
7453 install_fast_tracepoint_jump_pad>: New fields.
7454 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7455 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7456 [HAVE_STDINT_H]: Include stdint.h.
7457 (trace_debug_1): Rename to ...
7458 (trace_vdebug): ... this.
7459 (trace_debug): Rename to ...
7460 (trace_debug_1): ... this. Add `level' parameter.
7461 (trace_debug): New.
7462 (ATTR_USED, ATTR_NOINLINE): New.
7463 (IP_AGENT_EXPORT): New.
7464 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7465 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7466 (about_to_request_buffer_space, trace_buffer_is_full)
7467 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7468 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7469 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7470 (traceframe_write_count, traceframes_created)
7471 (trace_state_variables)
7472 New renaming defines.
7473 (struct ipa_sym_addresses): New.
7474 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7475 (symbol_list): New.
7476 (ipa_sym_addrs): New.
7477 (all_tracepoint_symbols_looked_up): New.
7478 (in_process_agent_loaded): New.
7479 (write_e_ipa_not_loaded): New.
7480 (maybe_write_ipa_not_loaded): New.
7481 (tracepoint_look_up_symbols): New.
7482 (debug_threads) [IN_PROCESS_AGENT]: New.
7483 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7484 (UNKNOWN_SIDE_EFFECTS): New.
7485 (stop_tracing): New.
7486 (flush_trace_buffer): New.
7487 (stop_tracing_bkpt): New.
7488 (flush_trace_buffer_bkpt): New.
7489 (read_inferior_integer): New.
7490 (read_inferior_uinteger): New.
7491 (read_inferior_data_pointer): New.
7492 (write_inferior_data_pointer): New.
7493 (write_inferior_integer): New.
7494 (write_inferior_uinteger): New.
7495 (struct collect_static_trace_data_action): Delete.
7496 (enum tracepoint_type): New.
7497 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7498 <actions_str, step_actions, step_actions_str>: Only include in
7499 GDBserver.
fa593d66
PA
7500 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7501 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7502 (tracepoints): Use IP_AGENT_EXPORT.
7503 (last_tracepoint): Don't include in the IPA.
7504 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7505 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7506 (alloced_trace_state_variables): New.
7507 (trace_state_variables): Use IP_AGENT_EXPORT.
7508 (traceframe_t): Delete unused variable.
7509 (circular_trace_buffer): Don't include in the IPA.
7510 (trace_buffer_start): Delete.
7511 (struct trace_buffer_control): New.
7512 (trace_buffer_free): Delete.
7513 (struct ipa_trace_buffer_control): New.
7514 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7515 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7516 New.
7517 (trace_buffer_ctrl): New.
7518 (TRACE_BUFFER_CTRL_CURR): New.
7519 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7520 Reimplement as macros.
7521 (trace_buffer_wrap): Delete.
7522 (traceframe_write_count, traceframe_read_count)
7523 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7524 (struct tracepoint_hit_ctx) <type>: New field.
7525 (struct fast_tracepoint_ctx): New.
7526 (memory_barrier): New.
7527 (cmpxchg): New.
7528 (record_tracepoint_error): Update atomically in the IPA.
7529 (clear_inferior_trace_buffer): New.
7530 (about_to_request_buffer_space): New.
7531 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7532 updating the same buffer.
7533 (add_tracepoint): Default the tracepoint's type to trap
7534 tracepoint, and orig_size to -1.
7535 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7536 internal variables.
7537 (create_trace_state_variable): New parameter `gdb'. Handle it.
7538 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7539 (cmd_qtdp): Handle fast tracepoints.
7540 (cmd_qtdv): Adjust.
7541 (max_jump_pad_size): New.
7542 (gdb_jump_pad_head): New.
7543 (get_jump_space_head): New.
7544 (claim_jump_space): New.
7545 (sort_tracepoints): New.
7546 (MAX_JUMP_SIZE): New.
7547 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7548 IPA.
7549 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7550 support. Upload fast traceframes, and delete internal IPA
7551 breakpoints.
7552 (stop_tracing_handler): New.
7553 (flush_trace_buffer_handler): New.
7554 (cmd_qtstop): Upload fast tracepoints.
7555 (response_tracepoint): Handle fast tracepoints.
7556 (tracepoint_finished_step): Upload fast traceframes. Set the
7557 tracepoint hit context's tracepoint type.
7558 (handle_tracepoint_bkpts): New.
7559 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7560 type. Add comment about fast tracepoints.
7561 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7562 non-existing action_str field.
7563 (get_context_regcache): Handle fast tracepoints.
7564 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7565 to the regcache.
7566 (fast_tracepoint_from_jump_pad_address): New.
7567 (fast_tracepoint_from_ipa_tpoint_address): New.
7568 (collecting_t): New.
7569 (force_unlock_trace_buffer): New.
7570 (fast_tracepoint_collecting): New.
7571 (collecting): New.
7572 (gdb_collect): New.
7573 (write_inferior_data_ptr): New.
7574 (target_tp_heap): New.
7575 (target_malloc): New.
7576 (download_agent_expr): New.
7577 (UALIGN): New.
7578 (download_tracepoints): New.
7579 (download_trace_state_variables): New.
7580 (upload_fast_traceframes): New.
7581 (IPA_FIRST_TRACEFRAME): New.
7582 (IPA_NEXT_TRACEFRAME_1): New.
7583 (IPA_NEXT_TRACEFRAME): New.
7584 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7585 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7586 (gdb_jump_pad_buffer_end): New.
7587 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7588 (initialize_tracepoint): Adjust.
7589 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7590 buffer. Initialize the low module.
7591 * utils.c (PREFIX, TOOLNAME): New.
7592 (malloc_failure): Use PREFIX.
7593 (error): In the IPA, an error causes an exit.
7594 (fatal, warning): Use PREFIX.
7595 (internal_error): Use TOOLNAME.
7596 (NUMCELLS): Increase to 10.
7597 * configure, config.in: Regenerate.
7598
d149dd1d
PA
75992010-06-01 Pedro Alves <pedro@codesourcery.com>
7600
7601 * server.c (handle_query) <qSupported>: Do two passes over the
7602 qSupported string to avoid nesting strtok.
7603
f6528abd
JK
76042010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7605
7606 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7607 (CDEPS): New.
7608 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7609 -Wl,--dynamic-list.
7610 * configure: Regenerate.
7611 * proc-service.list: New.
7612
ca2a87a0
JK
76132010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7614
7615 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7616 New comment.
7617
363a6e9f
OS
76182010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7619
7620 * gdbreplay.c (remote_open): Check error return from socket() call by
7621 its equality to -1 not by it being negative.
7622 * remote-utils.c (remote_open): Likewise.
7623
d23b6cb1
PA
76242010-05-23 Pedro Alves <pedro@codesourcery.com>
7625
7626 * config.h: Regenerate.
7627
28d3cf85
MK
76282010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7629
7630 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7631 doesn't provide PTRACE_GET_THREAD_AREA.
7632
fea36a59
MK
76332010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7634
7635 * linux-m68k-low.c: Include <asm/ptrace.h>
7636 (ps_get_thread_area): Implement.
7637
24b066ba
DE
76382010-05-03 Doug Evans <dje@google.com>
7639
7640 * event-loop.c (struct callback_event): New struct.
7641 (callback_list): New global.
7642 (append_callback_event, delete_callback_event): New functions.
7643 (process_callback): New function.
7644 (start_event_loop): Call it.
7645 * remote-utils.c (NOT_SCHEDULED): Define.
7646 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7647 moved out of readchar.
7648 (readchar): Rewrite. Call reschedule before returning.
7649 (reset_readchar): New function.
7650 (remote_close): Call it.
7651 (process_remaining, reschedule): New functions.
7652 * server.h (callback_handler_func): New typedef.
7653 (append_callback_event, delete_callback_event): Declare.
7654
9836d6ea
PA
76552010-05-03 Pedro Alves <pedro@codesourcery.com>
7656
7657 * proc-service.c (ps_pglobal_lookup): Use
7658 thread_db_look_up_one_symbol.
7659 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7660 parameter. Use it instead of all_symbols_looked_up.
7661 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7662 field.
7663 (all_symbols_looked_up): Don't declare.
7664 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7665 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7666 field.
7667 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7668 Set all_symbols_looked_up here.
7669 (thread_db_look_up_one_symbol): New.
7670 (thread_db_get_tls_address): Adjust.
7671 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7672 thread_db object on the heap, and tentatively set it in the
7673 process structure.
7674 (thread_db_init): Don't set all_symbols_looked_up here.
7675 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7676
7984d532
PA
76772010-05-03 Pedro Alves <pedro@codesourcery.com>
7678
7679 * linux-low.c (linux_kill, linux_detach): Adjust.
7680 (status_pending_p_callback): Remove redundant statement. Check
7681 for !TARGET_WAITIKIND_IGNORE, instead of
7682 TARGET_WAITKIND_STOPPED.
7683 (handle_tracepoints): Make sure LWP is locked. Adjust.
7684 (linux_wait_for_event_1): Adjust.
7685 (linux_cancel_breakpoints): New.
7686 (unsuspend_one_lwp): New.
7687 (unsuspend_all_lwps): New.
7688 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7689 (send_sigstop_callback): Change return type to int, add new
7690 `except' parameter and handle it.
7691 (suspend_and_send_sigstop_callback): New.
7692 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7693 pass them down. If SUSPEND, also increment the lwp's suspend
7694 count.
7695 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7696 (need_step_over_p): Don't consider suspended LWPs.
7697 (start_step_over): Adjust.
7698 (proceed_one_lwp): Change return type to int, add new `except'
7699 parameter and handle it.
7700 (unsuspend_and_proceed_one_lwp): New.
7701 (proceed_all_lwps): Use find_inferior instead of
7702 for_each_inferior.
7703 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7704 also decrement the suspend count of LWPs. Pass `except' down,
7705 instead of hacking its suspend count.
7706 (linux_pause_all): Add `freeze' parameter. Adjust.
7707 (linux_unpause_all): New.
7708 (linux_target_ops): Install linux_unpause_all.
7709 * server.c (handle_status): Adjust.
7710 * target.h (struct target_ops): New fields `unpause_all' and
7711 `cancel_breakpoints'. Add new parameter to `pause_all'.
7712 (pause_all): Add new `freeze' parameter.
7713 (unpause_all): New.
7714 (cancel_breakpoints): New.
7715 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7716 cancel breakpoints.
7717 (cmd_qtstart): Pause threads.
7718 (stop_tracing): Pause threads, and cancel breakpoints.
7719 * win32-low.c (win32_target_ops): Adjust.
7720
e471f25b
PA
77212010-05-03 Pedro Alves <pedro@codesourcery.com>
7722
7723 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7724 the inferior right away from here...
7725 (linux_wait_1): ... to here, and adjust to check the thread's
7726 last_resume_kind instead of the lwp's step or stop_expected flags.
7727
1915ef4f
PA
77282010-05-02 Pedro Alves <pedro@codesourcery.com>
7729
7730 * README: Use consistent `GDB' and `GDBserver' spellings.
7731
f9e39928
PA
77322010-05-02 Pedro Alves <pedro@codesourcery.com>
7733
7734 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7735 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7736 (linux_detach_one_lwp): Assume the lwp is stopped.
7737 (any_thread_of): Delete.
7738 (linux_detach): Stop all lwps here. Don't blindly delete all
7739 breakpoints.
7740 (delete_lwp_callback): New.
7741 (linux_mourn): Delete all lwps of the process that is gone.
7742 (linux_wait_1): Don't delete the last lwp of the process here.
7743 * mem-break.h (mark_breakpoints_out): Declare.
7744 * mem-break.c (mark_breakpoints_out): New.
7745 (free_all_breakpoints): Use it.
7746 * server.c (handle_target_event): If the process is gone, mark
7747 breakpoints out.
7748 * thread-db.c (struct thread_db) <create_bp>: New field.
7749 (thread_db_enable_reporting): Fix prototype. Store a thread event
7750 breakpoint reference in the thread_db struct.
7751 (thread_db_load_search): Clear the thread_db object.
7752 (try_thread_db_load_1): Ditto.
7753 (switch_to_process): New.
7754 (disable_thread_event_reporting): Use it.
7755 (remove_thread_event_breakpoints): New.
7756 (thread_db_detach, thread_db_mourn): Use it.
7757
1e7fc18c
PA
77582010-05-01 Pedro Alves <pedro@codesourcery.com>
7759
7760 * linux-low.c (linux_enable_event_reporting): New.
7761 (linux_wait_for_event_1, handle_extended_wait): Use it.
7762
02fc4de7
PA
77632010-04-30 Pedro Alves <pedro@codesourcery.com>
7764
7765 * linux-low.c (linux_kill_one_lwp, linux_kill)
7766 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7767 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7768 SIGSTOP even if the LWP is stopped.
7769 (send_sigstop_callback): New.
7770 (stop_all_lwps): Use send_sigstop_callback instead.
7771 (linux_resume_one_thread): Adjust.
7772 (proceed_one_lwp): Still proceed an LWP that the client has
7773 requested to stop, if we haven't reported it as stopped yet. Make
7774 sure that LWPs the client want stopped, have a pending SIGSTOP.
7775
bc3b5632
DE
77762010-04-26 Doug Evans <dje@google.com>
7777
ae1ada35
DE
7778 * server.c (handle_general_set): Make static.
7779
bc3b5632
DE
7780 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7781 Print received char after testing for error/eof instead of before.
7782 (input_interrupt): Tweak comment.
7783
65730243
DE
77842010-04-23 Doug Evans <dje@google.com>
7785
7786 * server.c (start_inferior): Print inferior argv if --debug.
7787
a8ae7dc0
AR
77882010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7789
7790 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7791 * nto-x86-low.c: Include server.h
7792
1c07cc19
PM
77932010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7794
7795 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7796 be consistent with other sources of this directory.
7797 (init_registers_amd64): Correct name of source file of this function
7798 in the comment.
7799
e0a61e09
PM
78002010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7801
7802 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7803 64-bit executables.
7804
54709339
PM
78052010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7806
7807 * win32-i386-low.c: Add 64-bit support.
7808 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7809 (init_registers_amd64): Declare.
7810 (mappings): Add 64-bit version of array.
7811 (init_windows_x86): New function.
7812 (the_low_target): Change init_arch field to init_windows_x86.
7813
e8f0053d
PM
78142010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7815
7816 * win32-low.c: Adapt to support also 64-bit architecture.
7817 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7818 (get_image_name): Use SIZE_T type for local variable `done'.
7819 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7820 (toolhelp_get_dll_name): Idem.
7821 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7822 Use uintptr_t typecast to avoid warning.
7823 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7824 (handle_exception): Use phex_nz to avoid warning.
7825 (win32_wait): Remove unused local variable `process'.
7826
c481e77e
PM
78272010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7828
7829 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7830 `amd64-avx.o'.
7831
12ea4b69
PM
78322010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7833
7834 * configure.ac: Use `ws2_32' library for srv_mingw.
7835 * configure: Regenerate.
7836 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7837 * remote-utils.c: Likewise.
7838
f6d1620c
L
78392010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7840
7841 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7842 if __x86_64__ is defined.
7843
8e642873
PM
78442010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7845
7846 * configure: Regenerate.
7847
711e434b
PM
78482010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7849
7850 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7851 * target.h (target_ops): New get_tib_address field.
7852 * win32-low.h (win32_thread_info): Add thread_local_base field.
7853 * win32-low.c (child_add_thread): Add tlb argument.
7854 Set thread_local_base field to TLB.
7855 (get_child_debug_event): Adapt to child_add_thread change.
7856 (win32_get_tib_address): New function.
7857 (win32_target_ops): Set get_tib_address field to
7858 win32_get_tib_address.
7859 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7860
505106cd
PA
78612010-04-12 Pedro Alves <pedro@codesourcery.com>
7862
505106cd
PA
7863 * linux-low.c (linux_mourn): Also remove the process.
7864 * server.c (handle_target_event): Don't remove the process here.
7865 * nto-low.c (nto_mourn): New.
7866 (nto_target_ops): Install it.
7867 * spu-low.c (spu_mourn): New.
7868 (spu_target_ops): Install it.
7869 * win32-low.c (win32_mourn): New.
7870 (win32_target_ops): Install it.
7871
e8470a06
PA
78722010-04-12 Pedro Alves <pedro@codesourcery.com>
7873
7874 * server.h (buffer_xml_printf): Remove redundant `;'.
7875
45ba0d02
PA
78762010-04-12 Pedro Alves <pedro@codesourcery.com>
7877
7878 * regcache.c (set_register_cache): Invalidate regcaches before
7879 changing the register cache layout.
7880 (regcache_invalidate_one): Allow a NULL regcache.
7881 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7882 regcaches before changing the register cache layout or the target
7883 regsets.
7884
59e04013
L
78852010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7886
7887 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7888 variable warning on Linux/x86-64.
7889
8336d594
PA
78902010-04-11 Pedro Alves <pedro@codesourcery.com>
7891
7892 GDBserver disconnected tracing support.
7893
7894 * linux-low.c (linux_remove_process): Delete.
7895 (add_lwp): Don't set last_resume_kind here.
7896 (linux_kill): Use `mourn'.
7897 (linux_detach): Use `thread_db_detach', and `mourn'.
7898 (linux_mourn): New.
7899 (linux_attach_lwp_1): Adjust comment.
7900 (linux_attach): last_resume_kind moved the thread_info; adjust.
7901 (status_pending_p_callback): Adjust.
7902 (linux_wait_for_event_1): Adjust.
7903 (count_events_callback, select_singlestep_lwp_callback)
7904 (select_event_lwp_callback, cancel_breakpoints_callback)
7905 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7906 (proceed_one_lwp): Adjust.
7907 (linux_async): Add debug output.
7908 (linux_thread_stopped): New.
7909 (linux_pause_all): New.
7910 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7911 linux_pause_all.
7912 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7913 (thread_db_free): Delete declaration.
7914 (thread_db_detach, thread_db_mourn): Declare.
7915 * thread-db.c (thread_db_init): Use thread_db_mourn.
7916 (thread_db_free): Delete, split in two.
7917 (disable_thread_event_reporting): New.
7918 (thread_db_detach): New.
7919 (thread_db_mourn): New.
7920
7921 * server.h (struct thread_info) <last_resume_kind>: New field.
7922 <attached>: Add comment.
7923 <gdb_detached>: New field.
7924 (handler_func): Change return type to int.
7925 (handle_serial_event, handle_target_event): Ditto.
7926 (gdb_connected): Declare.
7927 (tracing): Delete.
7928 (disconnected_tracing): Declare.
7929 (stop_tracing): Declare.
7930
7931 * server.c (handle_query) <qSupported>: Report support for
7932 disconnected tracing.
7933 (queue_stop_reply_callback): Account for running threads.
7934 (gdb_wants_thread_stopped): New.
7935 (gdb_wants_all_threads_stopped): New.
7936 (gdb_reattached_process): New.
7937 (handle_status): Clear the `gdb_detached' flag of all processes.
7938 In all-stop, stop all threads.
7939 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7940 (process_serial_event): If the remote connection breaks, or if an
7941 exit was forced with "monitor exit", force an event loop exit.
7942 Handle disconnected tracing on detach.
7943 (handle_serial_event): Adjust.
7944 (handle_target_event): If GDB isn't connected, forward events back
7945 to the inferior, unless the last process exited, in which case,
7946 exit gdbserver. Adjust interface.
7947
7948 * remote-utils.c (remote_open): Don't block in accept. Instead
7949 register an event loop source on the listen socket file
7950 descriptor. Refactor bits into ...
7951 (listen_desc): ... this new global.
7952 (gdb_connected): ... this new function.
7953 (enable_async_notification): ... this new function.
7954 (handle_accept_event): ... this new function.
7955 (remote_close): Clear remote_desc.
7956
7957 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7958
7959 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7960 New fields.
7961 (mourn_inferior): Define.
7962 (target_process_qsupported): Avoid the dangling else problem.
7963 (thread_stopped): Define.
7964 (pause_all): Define.
7965 (target_waitstatus_to_string): Declare.
7966 * target.c (target_waitstatus_to_string): New.
7967
7968 * tracepoint.c (tracing): Make extern.
7969 (disconnected_tracing): New.
7970 (stop_tracing): Make extern. Handle tracing stops due to GDB
7971 disconnecting.
7972 (cmd_qtdisconnected): New.
7973 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7974 (handle_tracepoint_general_set): Handle QTDisconnected.
7975
7976 * event-loop.c (event_handler_func): Change return type to int.
7977 (process_event): Bail out if the event handler wants the event
7978 loop to stop.
7979 (handle_file_event): Ditto.
7980 (start_event_loop): Bail out if the event handler wants the event
7981 loop to stop.
7982
7983 * nto-low.c (nto_target_ops): Adjust.
7984 * spu-low.c (spu_wait): Don't remove the process here.
7985 (spu_target_ops): Adjust.
7986 * win32-low.c (win32_wait): Don't remove the process here.
7987 (win32_target_ops): Adjust.
7988
5d267c4c
PA
79892010-04-11 Pedro Alves <pedro@codesourcery.com>
7990
7991 * regcache.c (realloc_register_cache): Invalidate inferior's
7992 regcache before recreating it.
7993
623ccd72
PA
79942010-04-09 Pedro Alves <pedro@codesourcery.com>
7995
7996 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7997
219f2f23
PA
79982010-04-09 Stan Shebs <stan@codesourcery.com>
7999 Pedro Alves <pedro@codesourcery.com>
8000
8001 * server.h (LONGEST): New.
8002 (struct thread_info) <while_stepping>: New field.
8003 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8004 Declare.
8005 (initialize_tracepoint, handle_tracepoint_general_set)
8006 (handle_tracepoint_query, tracepoint_finished_step)
8007 (tracepoint_was_hit, release_while_stepping_state_list):
8008 (current_traceframe): Declare.
8009 * server.c (handle_general_set): Handle tracepoint packets.
8010 (read_memory): New.
8011 (write_memory): New.
8012 (handle_search_memory_1): Use read_memory.
8013 (handle_query): Report support for conditional tracepoints, trace
8014 state variables, and tracepoint sources. Handle tracepoint
8015 queries.
8016 (main): Initialize the tracepoints module.
8017 (process_serial_event): Handle traceframe reads/writes.
8018
8019 * linux-low.c (handle_tracepoints): New.
8020 (linux_wait_1): Call it.
8021 (linux_resume_one_lwp): Handle while-stepping.
8022 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8023 (linux_target_ops): Install them.
8024 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8025 New field.
8026 * linux-x86-low.c (x86_supports_tracepoints): New.
8027 (the_low_target). Install it.
8028
8029 * mem-break.h (delete_breakpoint): Declare.
8030 * mem-break.c (delete_breakpoint): Make external.
8031
8032 * target.h (struct target_ops): Add `supports_tracepoints',
8033 `read_pc', and `write_pc' fields.
8034 (target_supports_tracepoints): Define.
8035 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8036 (phex_nz): New.
8037
8038 * regcache.h (struct regcache) <registers_owned>: New field.
8039 (init_register_cache, regcache_cpy): Declare.
8040 (regcache_read_pc, regcache_write_pc): Declare.
8041 (register_cache_size): Declare.
8042 (supply_regblock): Declare.
8043 * regcache.c (init_register_cache): New.
8044 (new_register_cache): Use it.
8045 (regcache_cpy): New.
8046 (register_cache_size): New.
8047 (supply_regblock): New.
8048 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8049
219f2f23
PA
8050 * tracepoint.c: New.
8051
8052 * Makefile.in (OBS): Add tracepoint.o.
8053 (tracepoint.o): New rule.
8054
3a13a53b
L
80552010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8056
8057 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8058 (i386-mmx.o): New.
8059 (i386-mmx.c): Likewise.
8060 (i386-mmx-linux.o): Likewise.
8061 (i386-mmx-linux.c): Likewise.
8062
8063 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8064 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8065 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8066 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8067
8068 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8069 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8070 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8071
1570b33e
L
80722010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8073
8074 * Makefile.in (clean): Updated.
8075 (i386-avx.o): New.
8076 (i386-avx.c): Likewise.
8077 (i386-avx-linux.o): Likewise.
8078 (i386-avx-linux.c): Likewise.
8079 (amd64-avx.o): Likewise.
8080 (amd64-avx.c): Likewise.
8081 (amd64-avx-linux.o): Likewise.
8082 (amd64-avx-linux.c): Likewise.
8083
8084 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8085 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8086 (srv_amd64_regobj): Add amd64-avx.o.
8087 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8088 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8089 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8090 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8091 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8092 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8093 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8094
8095 * i387-fp.c: Include "i386-xstate.h".
8096 (i387_xsave): New.
8097 (i387_cache_to_xsave): Likewise.
8098 (i387_xsave_to_cache): Likewise.
8099 (x86_xcr0): Likewise.
8100
8101 * i387-fp.h (i387_cache_to_xsave): Likewise.
8102 (i387_xsave_to_cache): Likewise.
8103 (x86_xcr0): Likewise.
8104
8105 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8106 * linux-crisv32-low.c (target_regsets): Likewise.
8107 * linux-m68k-low.c (target_regsets): Likewise.
8108 * linux-mips-low.c (target_regsets): Likewise.
8109 * linux-ppc-low.c (target_regsets): Likewise.
8110 * linux-s390-low.c (target_regsets): Likewise.
8111 * linux-sh-low.c (target_regsets): Likewise.
8112 * linux-sparc-low.c (target_regsets): Likewise.
8113 * linux-xtensa-low.c (target_regsets): Likewise.
8114
8115 * linux-low.c: Include <sys/uio.h>.
8116 (regsets_fetch_inferior_registers): Support nt_type.
8117 (regsets_store_inferior_registers): Likewise.
8118 (linux_process_qsupported): New.
8119 (linux_target_ops): Add linux_process_qsupported.
8120
8121 * linux-low.h (regset_info): Add nt_type.
8122 (linux_target_ops): Add process_qsupported.
8123
8124 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8125 and <sys/uio.h>.
8126 (init_registers_i386_avx_linux): New.
8127 (init_registers_amd64_avx_linux): Likewise.
8128 (xmltarget_i386_linux_no_xml): Likewise.
8129 (xmltarget_amd64_linux_no_xml): Likewise.
8130 (PTRACE_GETREGSET): Likewise.
8131 (PTRACE_SETREGSET): Likewise.
8132 (x86_fill_xstateregset): Likewise.
8133 (x86_store_xstateregset): Likewise.
8134 (use_xml): Likewise.
8135 (x86_linux_update_xmltarget): Likewise.
8136 (x86_linux_process_qsupported): Likewise.
8137 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8138 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8139 init_registers_i386_linux here. Call
8140 x86_linux_update_xmltarget.
8141 (the_low_target): Add x86_linux_process_qsupported.
8142
8143 * server.c (handle_query): Call target_process_qsupported.
8144
8145 * target.h (target_ops): Add process_qsupported.
8146 (target_process_qsupported): New.
8147
fc7238bb
PA
81482010-04-03 Pedro Alves <pedro@codesourcery.com>
8149
8150 * inferiors.c (add_thread): Set last_status kind to
8151 TARGET_WAITKIND_IGNORE.
8152 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8153 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8154 (linux_wait_1): Move `thread' local definition to block that uses
8155 it. Don't NULL initialize `event_child'.
8156 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8157 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8158 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8159
bdabb078
PA
81602010-04-01 Pedro Alves <pedro@codesourcery.com>
8161
8162 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8163 an extended waitstatus, or by a watchpoint.
8164 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8165 thread was stepping or has been stopped by a watchpoint.
8166
d3bbe7a0
PA
81672010-04-01 Pedro Alves <pedro@codesourcery.com>
8168
8169 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8170 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8171 of another, then delete the previous, and validate all
8172 breakpoints.
8173 (validate_inserted_breakpoint): New.
8174 (delete_disabled_breakpoints): New.
8175 (validate_breakpoints): New.
8176 (check_mem_read): Validate breakpoints before trusting their
8177 shadow. Delete disabled breakpoints.
8178 (check_mem_write): Validate breakpoints before trusting they
8179 should be inserted. Delete disabled breakpoints.
8180 * mem-break.h (validate_breakpoints):
8181 * server.c (handle_query): Validate breakpoints when we see a
8182 qSymbol query.
8183
8b07ae33
PA
81842010-04-01 Pedro Alves <pedro@codesourcery.com>
8185
8186 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8187 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8188 if we could tell there's a GDB breakpoint at stop_pc.
8189 (need_step_over_p): Don't do a step over if we find a GDB
8190 breakpoint at the resume PC.
8191
8192 * mem-break.c (struct raw_breakpoint): New.
8193 (enum bkpt_type): New type `gdb_breakpoint'.
8194 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8195 fields. New field `raw'.
8196 (find_raw_breakpoint_at): New.
8197 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8198 breakpoint instead.
8199 (set_breakpoint_at): Adjust.
8200 (delete_raw_breakpoint): New.
8201 (release_breakpoint): New.
8202 (delete_breakpoint): Rename to...
8203 (delete_breakpoint_1): ... this. Add proc parameter. Use
8204 release_breakpoint. Return ENOENT.
8205 (delete_breakpoint): Reimplement.
8206 (find_breakpoint_at): Delete.
8207 (find_gdb_breakpoint_at): New.
8208 (delete_breakpoint_at): Delete.
8209 (set_gdb_breakpoint_at): New.
8210 (delete_gdb_breakpoint_at): New.
8211 (gdb_breakpoint_here): New.
8212 (set_reinsert_breakpoint): Use release_breakpoint.
8213 (uninsert_breakpoint): Rename to ...
8214 (uninsert_raw_breakpoint): ... this.
8215 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8216 (reinsert_raw_breakpoint): Change parameter type to
8217 raw_breakpoint.
8218 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8219 instead.
8220 (check_breakpoints): Adjust. Use release_breakpoint.
8221 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8222 (breakpoint_inserted_here): Ditto.
8223 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8224 Don't trust the breakpoint's shadow if it is not inserted.
8225 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8226 (delete_all_breakpoints): Adjust.
8227 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8228 use delete_breakpoint_1.
8229
8230 * mem-break.h (breakpoints_supported): Delete declaration.
8231 (set_gdb_breakpoint_at): Declare.
8232 (gdb_breakpoint_here): Declare.
8233 (delete_breakpoint_at): Delete.
8234 (delete_gdb_breakpoint_at): Declare.
8235
8236 * server.h (struct raw_breakpoint): Forward declare.
8237 (struct process_info): New field `raw_breakpoints'.
8238
8239 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8240 breakpoints.
8241
6bf5e0ba
PA
82422010-03-24 Pedro Alves <pedro@codesourcery.com>
8243
8244 * linux-low.c (status_pending_p_callback): Fix comment.
8245 (linux_wait_for_event_1): Move most of the internal breakpoint
8246 handling from here...
8247 (linux_wait_1): ... to here.
8248 (count_events_callback): New.
8249 (select_singlestep_lwp_callback): New.
8250 (select_event_lwp_callback): New.
8251 (cancel_breakpoints_callback): New.
8252 (select_event_lwp): New.
8253 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8254 priority to all LWPs that have had events that should be reported
8255 to the client. Cancel breakpoints when about to reporting the
8256 event to the client, not while stopping lwps. No longer cancel
8257 finished single-steps here.
8258 (cancel_finished_single_step): Delete.
8259 (cancel_finished_single_steps): Delete.
8260
414a389f
PA
82612010-03-24 Pedro Alves <pedro@codesourcery.com>
8262
8263 * mem-break.c (enum bkpt_type): New.
8264 (struct breakpoint): New field `type'.
8265 (set_breakpoint_at): Change return type to struct breakpoint
8266 pointer. Set type to `other_breakpoint' by default.
8267 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8268 in the breakpoint list.
8269 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8270 (reinsert_breakpoint): Rename to ...
8271 (reinsert_raw_breakpoint): ... this.
8272 (reinsert_breakpoints_at): Adjust.
8273 * mem-break.h (struct breakpoint): Declare.
8274 (set_breakpoint_at): Change return type to struct breakpoint
8275 pointer.
8276
2280c721
PA
82772010-03-24 Pedro Alves <pedro@codesourcery.com>
8278
8279 * server.c (handle_query): Assign, not compare.
8280
d50171e4
PA
82812010-03-24 Pedro Alves <pedro@codesourcery.com>
8282
8283 Teach linux gdbserver to step-over-breakpoints.
8284
8285 * linux-low.c (can_hardware_single_step): New.
8286 (supports_breakpoints): New.
8287 (handle_extended_wait): If stopping threads, read the stop pc of
8288 the new cloned LWP.
8289 (get_pc): New.
8290 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8291 low target doesn't support retrieving the PC.
8292 (add_lwp): Set last_resume_kind to resume_continue.
8293 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8294 (linux_attach): Don't clear stop_expected. Set the lwp's
8295 last_resume_kind to resume_stop.
8296 (linux_detach_one_lwp): Don't check for removed breakpoints.
8297 (check_removed_breakpoint): Delete.
8298 (status_pending_p): Rename to ...
8299 (status_pending_p_callback): ... this. Don't check for removed
8300 breakpoints. Don't consider threads that are stopped from GDB's
8301 perspective.
8302 (linux_wait_for_lwp): Always read the stop_pc here.
8303 (cancel_breakpoint): New.
8304 (step_over_bkpt): New global.
8305 (linux_wait_for_event_1): Implement stepping over breakpoints.
8306 (gdb_wants_lwp_stopped): New.
8307 (gdb_wants_all_stopped): New.
8308 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8309 single-step traps here. Store the thread's last reported target
8310 wait status.
8311 (send_sigstop): Don't clear stop_expected. Always set it,
8312 instead.
8313 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8314 (cancel_finished_single_step): New.
8315 (cancel_finished_single_steps): New.
8316 (wait_for_sigstop): Don't cancel finished single-step traps here.
8317 (linux_resume_one_lwp): Don't check for removed breakpoints.
8318 Don't set `step' on non-hardware step archs.
8319 (linux_set_resume_request): Ignore resume_stop requests if already
8320 stopping or stopped. Set the lwp's last_resume_kind.
8321 (resume_status_pending_p): Don't check for removed breakpoints.
8322 (need_step_over_p): New.
8323 (start_step_over): New.
8324 (finish_step_over): New.
8325 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8326 requests. Clear the thread's last reported target waitstatus.
8327 Don't use the `suspended' flag. Don't consider pending breakpoints.
8328 (linux_resume): Start a step-over if necessary.
8329 (proceed_one_lwp): New.
8330 (proceed_all_lwps): New.
8331 (unstop_all_lwps): New.
8332 * linux-low.h (struct lwp_info): Rewrite comment for the
8333 `suspended' flag. Add the `stop_pc' field. Delete the
8334 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8335 Add `'last_resume_kind' and `need_step_over' fields.
8336 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8337 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8338 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8339 (set_raw_breakpoint_at): New.
8340 (set_breakpoint_at): Rewrite to use it.
8341 (reinsert_breakpoint_handler): Delete.
8342 (set_reinsert_breakpoint): New.
8343 (reinsert_breakpoint_by_bp): Delete.
8344 (delete_reinsert_breakpoints): New.
8345 (uninsert_breakpoint): Rewrite.
8346 (uninsert_breakpoints_at): New.
8347 (reinsert_breakpoint): Rewrite.
8348 (reinsert_breakpoints_at): New.
8349 (check_breakpoints): Rewrite.
8350 (breakpoint_here): New.
8351 (breakpoint_inserted_here): New.
8352 (check_mem_read): Adjust.
8353 * mem-break.h (breakpoints_supported, breakpoint_here)
8354 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8355 (reinsert_breakpoint_by_bp): Delete declaration.
8356 (delete_reinsert_breakpoints): Declare.
8357 (reinsert_breakpoint): Delete declaration.
8358 (reinsert_breakpoints_at): Declare.
8359 (uninsert_breakpoint): Delete declaration.
8360 (uninsert_breakpoints_at): Declare.
8361 (check_breakpoints): Adjust prototype.
8362 * server.h: Adjust include order.
8363 (struct thread_info): Declare here. Add a `last_status' field.
8364
30ba68cb
MS
83652010-03-23 Michael Snyder <msnyder@vmware.com>
8366
8367 * server.c (crc32): New function.
8368 (handle_query): Add handling for 'qCRC:' request.
8369
b9a881c2
PA
83702010-03-23 Pedro Alves <pedro@codesourcery.com>
8371
8372 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8373 lwp had been stopped by a watchpoint.
8374
e92d13d5
PA
83752010-03-16 Pedro Alves <pedro@codesourcery.com>
8376
8377 * server.h (internal_error): Declare.
8378 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8379 * utils.c (internal_error): New function.
8380
64daa791
AS
83812010-03-15 Andreas Schwab <schwab@redhat.com>
8382
8383 * configure.srv: Fix typo setting srv_regobj.
8384
f52cd8cd
PA
83852010-03-15 Pedro Alves <pedro@codesourcery.com>
8386
8387 * linux-low.c (fetch_register): Avoid passing a non string literal
8388 format to `error'.
8389 (usr_store_inferior_registers): Ditto.
8390
93ae6fdc
PA
83912010-03-14 Pedro Alves <pedro@codesourcery.com>
8392
8393 * linux-low.c (linux_write_memory): Bail out early if peeking
8394 memory failed.
8395
c3adc08c
PA
83962010-03-14 Pedro Alves <pedro@codesourcery.com>
8397
8398 * linux-low.h (struct lwp_info): New fields
8399 `stopped_by_watchpoint' and `stopped_data_address'.
8400 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8401 here, and cache them in the lwp object.
8402 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8403 directly.
8404 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8405 field.
8406 (linux_stopped_by_watchpoint): Rewrite.
8407 (linux_stopped_data_address): Rewrite.
8408
bce522a2
PA
84092010-03-06 Simo Melenius <simo.melenius@iki.fi>
8410
8411 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8412 switching the current inferior, not before.
8413
90884b2b
L
84142010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8415
8416 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8417 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8418 i386-linux.c and amd64-linux.c.
8419 (reg-i386.o): Removed.
8420 (reg-i386.c): Likewise.
8421 (reg-i386-linux.o): Likewise.
8422 (reg-i386-linux.c): Likewise.
8423 (reg-x86-64.o): Likewise.
8424 (reg-x86-64.c): Likewise.
8425 (reg-x86-64-linux.o): Likewise.
8426 (reg-x86-64-linux.c): Likewise.
8427 (i386.o): New.
8428 (i386.c): Likewise.
8429 (i386-linux.o): Likewise.
8430 (i386-linux.c): Likewise.
8431 (amd64.o): Likewise.
8432 (amd64.c): Likewise.
8433 (amd64-linux.o): Likewise.
8434 (amd64-linux.c): Likewise.
8435
8436 * configure.srv (srv_i386_regobj): New.
8437 (srv_i386_linux_regobj): Likewise.
8438 (srv_amd64_regobj): Likewise.
8439 (srv_amd64_linux_regobj): Likewise.
8440 (srv_i386_32bit_xmlfiles): Likewise.
8441 (srv_i386_64bit_xmlfiles): Likewise.
8442 (srv_i386_xmlfiles): Likewise.
8443 (srv_amd64_xmlfiles): Likewise.
8444 (srv_i386_linux_xmlfiles): Likewise.
8445 (srv_amd64_linux_xmlfiles): Likewise.
8446 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8447 srv_xmlfiles to $srv_i386_xmlfiles.
8448 (i[34567]86-*-mingw32ce*): Likewise.
8449 (i[34567]86-*-mingw*): Likewise.
8450 (i[34567]86-*-nto*): Likewise.
8451 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8452 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8453 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8454 (x86_64-*-linux*): Likewise.
8455
8456 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8457 (init_registers_amd64_linux): New.
8458 (x86_arch_setup): Replace init_registers_x86_64_linux with
8459 init_registers_amd64_linux.
8460
193f13e6
MK
84612010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8462
8463 * configure.ac: Check for libdl. If it is not available link against
8464 static libthread_db.
8465 * configure: Regenerate.
8466
85d721b8
PA
84672010-02-22 Pedro Alves <pedro@codesourcery.com>
8468
8469 PR9605
8470
8471 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8472 handing a read watchpoint.
8473 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8474
6076632b
DE
84752010-02-12 Doug Evans <dje@google.com>
8476
8477 * linux-low.c (linux_supports_tracefork_flag): Document.
8478 (linux_look_up_symbols): Add comment.
8479
3327ccf7
L
84802010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8481
8482 * regcache.c (supply_register): Clear regcache if buf is NULL.
8483
0718675c 84842010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8485 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8486
8487 * inferiors.c (find_inferior): Add function documentation.
8488 (unloaded_dll): Handle the case where the unloaded dll has not
8489 been previously registered in the dll list.
8490
177321bd
DJ
84912010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8492
8493 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8494 (thumb2_breakpoint): New.
8495 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8496
2b009048
DJ
84972010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8498
8499 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8500 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8501 breakpoints.
8502
3be029c7
PA
85032010-01-21 Pedro Alves <pedro@codesourcery.com>
8504
8505 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8506
18f5de3b
JK
85072010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8508
8509 * linux-s390-low.c (s390_collect_ptrace_register)
8510 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8511
3743bb4f
DE
85122010-01-21 Doug Evans <dje@google.com>
8513
14ce3065
DE
8514 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8515 (PTRACE_ARG4_TYPE): New macro.
8516 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8517 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8518 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8519 (usr_store_inferior_registers): Ditto.
8520 (linux_read_memory, linux_write_memory): Ditto.
8521 (linux_test_for_tracefork): Ditto.
8522
3743bb4f
DE
8523 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8524 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8525
8b315be5
PA
85262010-01-21 Pedro Alves <pedro@codesourcery.com>
8527
8528 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8529 target.
8530
85492558
PA
85312010-01-21 Pedro Alves <pedro@codesourcery.com>
8532
8533 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8534 prototype to take a regcache. Adjust.
8535
442ea881
PA
85362010-01-20 Pedro Alves <pedro@codesourcery.com>
8537
8538 * regcache.h (struct thread_info): Forward declare.
8539 (struct regcache): New.
8540 (new_register_cache): Adjust prototype.
8541 (get_thread_regcache): Declare.
8542 (free_register_cache): Adjust prototype.
8543 (registers_to_string, registers_from_string): Ditto.
8544 (supply_register, supply_register_by_name, collect_register)
8545 (collect_register_as_string, collect_register_by_name): Ditto.
8546 * regcache.c (struct inferior_regcache_data): Delete.
8547 (get_regcache): Rename to ...
8548 (get_thread_regcache): ... this. Adjust. Switch inferior before
8549 fetching registers.
8550 (regcache_invalidate_one): Adjust.
8551 (regcache_invalidate): Fix prototype.
8552 (new_register_cache): Return the new register cache.
8553 (free_register_cache): Change prototype.
8554 (realloc_register_cache): Adjust.
8555 (registers_to_string): Change prototype to take a regcache. Adjust.
8556 (registers_from_string): Ditto.
8557 (register_data): Ditto.
8558 (supply_register): Ditto.
8559 (supply_register_by_name): Ditto.
8560 (collect_register): Ditto.
8561 (collect_register_as_string): Ditto.
8562 (collect_register_by_name): Ditto.
8563 * server.c (process_serial_event): Adjust.
8564 * linux-low.h (regset_fill_func, regset_store_func): Change
8565 prototype.
8566 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8567 Change prototype.
8568 * linux-low.c (get_stop_pc): Adjust.
8569 (check_removed_breakpoint): Adjust.
8570 (linux_wait_for_event): Adjust.
8571 (linux_resume_one_lwp): Adjust.
8572 (fetch_register): Add regcache parameter. Adjust.
8573 (usr_store_inferior_registers): Ditto.
8574 (regsets_fetch_inferior_registers): Ditto.
8575 (regsets_store_inferior_registers): Ditto.
8576 (linux_fetch_registers, linux_store_registers): Ditto.
8577 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8578 regcache. Adjust.
43aaf8b6
PA
8579 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8580 Ditto.
442ea881
PA
8581 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8582 prototype to take a regcache.
8583 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8584 * remote-utils.c (convert_ascii_to_int, outreg)
8585 (prepare_resume_reply): Change prototype to take a regcache.
8586 Adjust.
8587 * target.h (struct target_ops) <fetch_registers, store_registers>:
8588 Change prototype to take a regcache.
8589 (fetch_inferior_registers, store_inferior_registers): Change
8590 prototype to take a regcache. Adjust.
8591 * proc-service.c (ps_lgetregs): Adjust.
8592 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8593 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8594 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8595 take a regcache. Adjust.
8596 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8597 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8598 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8599 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8600 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8601 (cris_cannot_fetch_register):
8602 (cris_breakpoint_at): Change prototype to take a regcache.
8603 Adjust.
8604 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8605 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8606 to take a regcache. Adjust.
8607 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8608 Adjust.
8609 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8610 take a regcache. Adjust.
8611 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8612 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8613 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8614 * linux-mips-low.c (mips_get_pc):
8615 (mips_set_pc): Change prototype to take a regcache. Adjust.
8616 (mips_reinsert_addr): Adjust.
8617 (mips_collect_register): Change prototype to take a regcache.
8618 Adjust.
8619 (mips_supply_register):
8620 (mips_collect_register_32bit, mips_supply_register_32bit)
8621 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8622 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8623 * linux-ppc-low.c (ppc_supply_ptrace_register)
8624 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8625 (parse_spufs_run): Adjust.
8626 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8627 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8628 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8629 take a regcache. Adjust.
8630 * linux-s390-low.c (s390_collect_ptrace_register)
8631 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8632 (s390_set_pc): Change prototype to take a regcache. Adjust.
8633 (s390_arch_setup): Adjust.
8634 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8635 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8636 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8637 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8638 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8639 regcache. Adjust.
8640 (sparc_breakpoint_at): Adjust.
8641 * linux-xtensa-low.c (xtensa_fill_gregset):
8642 (xtensa_store_gregset):
8643 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8644 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8645 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8646 prototype to take a regcache. Adjust.
8647 * win32-arm-low.c (arm_fetch_inferior_register)
8648 (arm_store_inferior_register): Change prototype to take a
8649 regcache. Adjust.
8650 * win32-i386-low.c (i386_fetch_inferior_register)
8651 (i386_store_inferior_register): Change prototype to take a
8652 regcache. Adjust.
8653 * win32-low.c (child_fetch_inferior_registers)
8654 (child_store_inferior_registers): Change prototype to take a
8655 regcache. Adjust.
8656 (win32_wait): Adjust.
8657 (win32_fetch_inferior_registers): Change prototype to take a
8658 regcache. Adjust.
8659 (win32_store_inferior_registers): Adjust.
8660 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8661 store_inferior_register>: Change prototype to take a regcache.
8662
60c3d7b0
DE
86632010-01-20 Doug Evans <dje@google.com>
8664
8665 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8666 #ifdef.
8667 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8668 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8669
dc146f7c
VP
86702010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8671
8672 * linux-low.c (linux_core_of_thread): New.
8673 (compare_ints, show_process, list_threads): New.
8674 (linux_qxfer_osdata): Report threads and cores.
8675 (linux_target_op): Register linux_core_of_thread.
8676 * remote-utils.c (prepare_resume_reply): Report the core.
8677 (buffer_xml_printf): Support %d specifier.
8678 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8679 New.
8680 (handle_query): Handle qXfer:threads. Announce availability
8681 thereof.
8682 * target.h (struct target_ops): New field core_of_thread.
8683
7803799a
UW
86842010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8685
8686 * Makefile.in (clean): Remove new generated files.
8687 (reg-s390.o, reg-s390.c): Remove rules.
8688 (reg-s390x.o, reg-s390x.c): Likewise.
8689 (s390-linux32.o, s390-linux32.c): Add rules.
8690 (s390-linux64.o, s390-linux64.c): Likewise.
8691 (s390x-linux64.o, s390x-linux64.c): Likewise.
8692 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8693 * linux-s390-low.c: Include <elf.h>.
8694 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8695 (init_registers_s390): Remove prototype.
8696 (init_registers_s390x): Likewise.
8697 (init_registers_s390_linux32): Add prototype.
8698 (init_registers_s390_linux64): Likewise.
8699 (init_registers_s390x_linux64): Likewise.
8700 (s390_num_regs_3264): New define.
8701 (s390_regmap_3264): New global variable.
8702 (s390_cannot_fetch_register): Remove obsolete check.
8703 (s390_cannot_store_register): Likewise.
8704 (s390_collect_ptrace_register): Handle upper/lower register halves.
8705 (s390_supply_ptrace_register): Likewise.
8706 (s390_fill_gregset): Update to register number changes.
8707 (s390_get_hwcap): New routine.
8708 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8709 Install appropriate regmap and register set.
8710
6e7ffa39
JB
87112010-01-01 Joel Brobecker <brobecker@adacore.com>
8712
8713 * server.c (gdbserver_version): Update copyright year to 2010.
8714 * gdbreplay.c (gdbreplay_version): Likewise.
8715
957f3f49
DE
87162009-12-28 Doug Evans <dje@google.com>
8717
8718 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8719 elf/external.h. Include <elf.h> instead but only if necessary.
8720
ca5c370d
PA
87212009-12-28 Pedro Alves <pedro@codesourcery.com>
8722
8723 * linux-low.c (linux_remove_process): Remove `detaching'
8724 parameter. Don't release/detach from thread_db here.
8725 (linux_kill): Release/detach from thread_db here, ...
8726 (linux_detach): ... and here, before actually detaching.
8727 (linux_wait_1): ... and here, when a process exits.
8728 * thread-db.c (any_thread_of): New.
8729 (thread_db_free): Switch the current inferior to a thread of the
8730 passed in process.
8731
4ee62156
DE
87322009-12-21 Doug Evans <dje@google.com>
8733
d90e6a88
DE
8734 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8735
c5f62d5f
DE
8736 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8737 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8738 warning ifndef __NR_tkill. Move setting of errno there too.
8739 Delete unnecessary resetting of errno after syscall.
8740 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8741
10e86dd7
DE
8742 * configure.ac: Check for dladdr.
8743 * config.in: Regenerate.
8744 * configure: Regenerate.
8745 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8746 (try_thread_db_load): Update.
8747
4ee62156
DE
8748 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8749
00f515da
DE
87502009-12-18 Doug Evans <dje@google.com>
8751
e9464885
DE
8752 * event-loop.c: Include unistd.h if it exists.
8753
07d4f67e
DE
8754 * linux-low.c (my_waitpid): Move definition away from being in
8755 between linux_tracefork_child/linux_test_for_tracefork.
8756
00f515da
DE
8757 * gdb_proc_service.h (psaddr_t): Fix type.
8758 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8759 signature to match glibc.
8760
1de1badb
DE
87612009-12-16 Doug Evans <dje@google.com>
8762
8763 * linux-low.c (linux_read_memory): Fix argument to read.
8764
aeeb81d1
PA
87652009-11-26 Pedro Alves <pedro@codesourcery.com>
8766
8767 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8768 events, don't leave current_inferior pointing at null.
8769
10357975
PA
87702009-11-26 Pedro Alves <pedro@codesourcery.com>
8771
8772 * win32-low.c (LOG): Delete.
8773 (OUTMSG): Output to stderr.
8774 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8775 on compile time LOG macro.
8776 (win32_wait): Fix debug output.
8777
cf6e3471
PA
87782009-11-26 Pedro Alves <pedro@codesourcery.com>
8779
8780 * win32-low.c (win32_add_one_solib): If the dll name is
8781 "ntdll.dll", prepend the system directory to the dll path.
8782
0c85e18e
MK
87832009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8784
8785 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8786
9ac544ce 87872009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8788 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8789
8790 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8791 * configure.ac: Check for __mcoldfire__ and set
8792 gdb_cv_m68k_is_coldfire.
8793 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8794 reg-cf.o and reg-m68k.o.
8795 * configure: Regenerated.
8796
fd7dd3e6
PA
87972009-11-16 Pedro Alves <pedro@codesourcery.com>
8798
8799 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8800 Pass it to thread_db_free.
8801 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8802 proper `detaching' argument to linux_remove_process.
8803 * linux-low.h (thread_db_free): Add `detaching' parameter.
8804 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8805 to thread_db_free.
8806 (thread_db_free): Add `detaching' parameter. Only
8807 call td_ta_clear_event if detaching from process.
8808
75aa492e
MK
88092009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8810
8811 * thread-db.c (thread_db_free): Fix typo.
8812
21e1bee4
PP
88132009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8814
8815 PR gdb/10838
8816 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8817
8838b45e
NS
88182009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8819
8820 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8821 with an i686 compiler.
8822 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8823 needed.
8824 * configure: Rebuilt.
8825
8a35fb51
SL
88262009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8827
8828 PR gdb/10783
8829
8830 * server.c (handle_search_memory_1): Correct read_addr initialization
8831 in loop for searching subsequent chunks.
8832
96f15937
PP
88332009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8834
8835 * configure.ac: New --with-libthread-db option.
8836 * thread-db.c: Allow direct dependence on libthread_db.
8837 (thread_db_free): Adjust.
8838 * config.in: Regenerate.
8839 * configure: Likewise.
889bf7c5 8840
5f7d1694
PP
88412009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8842
8843 PR gdb/10757
8844 * thread-db.c (attach_thread): New function.
8845 (maybe_attach_thread): Return success/failure.
8846 (find_new_threads_callback): Adjust.
889bf7c5
PA
8847 (thread_db_find_new_threads): Loop until no new threads.
8848
88e3b899
PA
88492009-10-13 Pedro Alves <pedro@codesourcery.com>
8850
8851 * proc-service.c (ps_lgetregs): Formatting.
8852
cdbfd419
PP
88532009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8854
8855 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8856 * configure.ac: Adjust.
8857 * linux-low.h (struct process_info_private): Move members to struct
8858 thread_db.
8859 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8860 * linux-low.c (linux_remove_process): Adjust.
8861 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8862 * server.c (handle_query): Move code ...
8863 (handle_monitor_command): ... here. New function.
8864 * target.h (struct target_ops): New member.
8865 * thread-db.c (struct thread_db): New.
8866 (libthread_db_search_path): New variable.
8867 (thread_db_create_event, thread_db_enable_reporting)
8868 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8869 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8870 (try_thread_db_load_1, dladdr_to_soname): New functions.
8871 (try_thread_db_load, thread_db_load_search): New functions.
8872 (thread_db_init): Search for libthread_db.
8873 (thread_db_free): New function.
8874 (thread_db_handle_monitor_command): Likewise.
8875 * config.in: Regenerate.
8876 * configure: Regenerate.
889bf7c5 8877
4168d2d6
UW
88782009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8879
8880 * spu-low.c (spu_kill): Wait for inferior to terminate.
8881 Call clear_inferiors.
8882 (spu_detach): Call clear_inferiors.
8883
81ecdfbb
RW
88842009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8885
8886 * aclocal.m4: Regenerate.
8887 * config.in: Likewise.
8888 * configure: Likewise.
8889
0b9ff2c0
UW
88902009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8891
8892 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8893 (parse_spufs_run): New function.
8894 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8895 (ppc_breakpoint_at): Handle SPU breakpoints.
8896
efcbbd14
UW
88972009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8898
8899 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8900 (SPUFS_MAGIC): Define.
8901 (spu_enumerate_spu_ids): New function.
8902 (linux_qxfer_spu): New function.
8903 (linux_target_ops): Install linux_qxfer_spu.
8904
f4d9bade
UW
89052009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8906
8907 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8908 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8909 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8910 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8911 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8912 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8913 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8914 (init_registers_powerpc_cell32l): Add prototype.
8915 (init_registers_powerpc_cell64l): Likewise.
8916 (ppc_arch_setup): Detect Cell/B.E. architecture.
8917
96e946ca
RW
89182009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8919
8920 * Makefile.in (datarootdir): New variable.
8921
58d6951d
DJ
89222009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8923
8924 * linux-low.c (linux_write_memory): Update debugging output.
8925 * Makefile.in (clean): Add new descriptions.
8926 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8927 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8928 * configure.srv: Add new files for arm*-*-linux*.
8929 * linux-arm-low.c: Add new declarations.
8930 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8931 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8932 (HWCAP_VFPv3D16): New.
8933 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8934 instead of __IWMMXT__.
8935 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8936 (arm_arch_setup): New.
8937 (target_regsets): Remove #ifdef. Add VFP regset.
8938 (the_low_target): Use arm_arch_setup.
8939
12b42a12
DJ
89402009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8941
8942 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8943 the main thread again.
8944
ac8c974e
AR
89452009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8946
8947 Adding Neutrino gdbserver.
8948 * configure: Regenerated.
8949 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8950 * configure.srv (i[34567]86-*-nto*): New target.
8951 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8952 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8953 (nto_comctrl) [__QNX__]: New function.
8954 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8955
4424e0c3 89562009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8957
8958 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8959 srv_tgtobj.
8960
912cf4ba
PA
89612009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8962 Pedro Alves <pedro@codesourcery.com>
8963
8964 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8965 don't support CONTEXT_EXTENDED_REGISTERS.
8966 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8967 (the_low_target): Install them.
8968 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8969 failing with ERROR_PIPE_NOT_CONNECTED.
8970
aa5ca48f
DE
89712009-06-30 Doug Evans <dje@google.com>
8972 Pierre Muller <muller@ics.u-strasbg.fr>
8973
8974 Add h/w watchpoint support to x86-linux, win32-i386.
8975 * Makefile.in (SFILES): Add i386-low.c
8976 (i386_low_h): Define.
8977 (i386-low.o): Add dependencies.
8978 (linux-x86-low.o): Add i386-low.h dependency.
8979 (win32-i386-low.o): Ditto.
8980 * i386-low.c: New file.
8981 * i386-low.h: New file.
8982 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8983 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8984 * linux-low.c (linux_add_process): Initialize arch_private.
8985 (linux_remove_process): Free arch_private.
8986 (add_lwp): Initialize arch_private.
8987 (delete_lwp): Free arch_private.
8988 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8989 provided.
8990 * linux-low.h (process_info_private): New member arch_private.
8991 (lwp_info): New member arch_private.
8992 (linux_target_ops): New members new_process, new_thread,
8993 prepare_to_resume.
8994 (ptid_of): New macro.
8995 * linux-x86-low.c: Include stddef.h, i386-low.h.
8996 (arch_process_info): New struct.
8997 (arch_lwp_info): New struct.
8998 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8999 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9000 (i386_dr_low_get_status): New function.
9001 (x86_insert_point, x86_remove_point): New functions.
9002 (x86_stopped_by_watchpoint): New function.
9003 (x86_stopped_data_address): New function.
9004 (x86_linux_new_process, x86_linux_new_thread): New functions.
9005 (x86_linux_prepare_to_resume): New function.
9006 (the_low_target): Add entries for insert_point, remove_point,
9007 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9008 prepare_to_resume.
9009 * server.c (debug_hw_points): New global.
9010 (monitor_show_help): Document set debug-hw-points.
9011 (handle_query): Process "set debug-hw-points".
9012 * server.h (debug_hw_points): Declare.
9013 (paddress): Declare.
9014 * utils.c (NUMCELLS, CELLSIZE): New macros.
9015 (get_sell, xsnprintf, paddress): New functions.
9016 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9017 remove_point, stopped_by_watchpoint, stopped_data_address.
9018 * win32-i386-low.c: Include i386-low.h.
9019 (debug_reg_state): Replaces dr.
9020 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9021 (i386_dr_low_get_status): New function.
9022 (i386_insert_point, i386_remove_point): New functions.
9023 (i386_stopped_by_watchpoint): New function.
9024 (i386_stopped_data_address): New function.
9025 (i386_initial_stuff): Update.
9026 (get_thread_context,set_thread_context,i386_thread_added): Update.
9027 (the_low_target): Add entries for insert_point,
9028 remove_point, stopped_by_watchpoint, stopped_data_address.
9029 * win32-low.c (win32_insert_watchpoint): New function.
9030 (win32_remove_watchpoint): New function.
9031 (win32_stopped_by_watchpoint): New function.
9032 (win32_stopped_data_address): New function.
9033 (win32_target_ops): Add entries for insert_watchpoint,
9034 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9035 * win32-low.h (win32_target_ops): New members insert_point,
9036 remove_point, stopped_by_watchpoint, stopped_data_address.
9037
d993e290
PA
90382009-06-25 Pedro Alves <pedro@codesourcery.com>
9039
9040 * server.c (process_serial_event): Re-return unsupported, not
9041 error, if the type isn't recognized. Re-allow supporting only
9042 insert or remove packets. Also call require_running for
9043 breakpoints. Add missing break statement to default case. Tidy.
9044 * target.h (struct target_ops): Rename insert_watchpoint to
9045 insert_point, and remove_watchpoint to remove_point.
9046
9047 * linux-low.h (struct linux_target_ops): Likewise.
9048 * linux-low.c (linux_insert_watchpoint): Rename to ...
9049 (linux_insert_point): ... this. Adjust.
9050 (linux_remove_watchpoint): Rename to ...
9051 (linux_remove_point): ... this. Adjust.
9052 (linux_target_ops): Adjust.
9053 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9054 (cris_insert_point): ... this.
9055 (cris_remove_watchpoint): Rename to ...
9056 (cris_remove_point): ... this.
9057 (the_low_target): Adjust.
9058
0f54c268
PM
90592009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9060
9061 * server.c (handle_v_kill): Pass signal_pid to
9062 kill_inferior if multi_process is zero.
9063
c6314022
AR
90642009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9065
9066 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9067 * target.h (target_ops): Comment for *_watchpoint to make it clear
9068 the functions can get types '0' and '1'.
9069
4463ce24
AR
90702009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9071
9072 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9073 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9074 * regcache.c (get_regcache): Likewise.
9075 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9076 * win32-low.c (child_fetch_inferior_registers): Remove check for
9077 regno 0.
9078
cf8fd78b
PA
90792009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9080 Pedro Alves <pedro@codesourcery.com>
9081
9082 * target.h (struct target_ops) <supports_multi_process>: New
9083 callback.
9084 (target_supports_multi_process): New.
9085 * server.c (handle_query): Even if GDB reports support, only
9086 enable multi-process if the target also supports it. Report
9087 multi-process support only if the target backend supports it.
9088 * linux-low.c (linux_supports_multi_process): New function.
9089 (linux_target_ops): Install it as target_supports_multi_process
9090 callback.
9091
47c0c975
DE
90922009-05-24 Doug Evans <dje@google.com>
9093
e09875d4
DE
9094 Global renaming of find_thread_pid to find_thread_ptid.
9095 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9096 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9097 All callers updated.
9098
e27d73f6
DE
9099 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9100 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9101 directly.
9102
47c0c975
DE
9103 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9104 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9105 (linux_resume_one_lwp): Ditto.
9106
2acc282a
DE
91072009-05-23 Doug Evans <dje@google.com>
9108
9109 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9110 from struct inferior_list_entry * to struct lwp_info *.
9111 All callers updated.
9112
9f1036c1
DE
91132009-05-13 Doug Evans <dje@google.com>
9114
9115 * linux-x86-low.c: Don't include assert.h.
9116 (x86_siginfo_fixup): Use fatal, not assert.
9117 (x86_arch_setup): Fix comment.
9118
d0722149
DE
91192009-05-12 Doug Evans <dje@google.com>
9120
9121 Biarch support for i386/amd64 gdbserver.
9122 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9123 Add linux-x86-low.c.
9124 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9125 (linux-x86-low.o): Add.
9126 * linux-x86-64-low.c: Delete.
9127 * linux-i386-low.c: Delete.
9128 * linux-x86-low.c: New file.
9129 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9130 linux-x86-low.o.
9131 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9132 linux-x86-low.o.
9133 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9134 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9135 (linux_child_pid_to_exec_file): New function.
9136 (elf_64_header_p, elf_64_file_p): New functions.
9137 (siginfo_fixup): New function.
9138 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9139 give target a chance to convert layout.
9140 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9141 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9142
fdeb2a12
DE
91432009-05-07 Doug Evans <dje@google.com>
9144
9145 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9146 (regsets_store_inferior_registers): Ditto.
9147
a6dbe5df
PA
91482009-05-06 Pedro Alves <pedro@codesourcery.com>
9149
9150 PR server/10048
9151
9152 * linux-low.c (must_set_ptrace_flags): Delete.
9153 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9154 of the global.
9155 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9156 `lwp->must_set_ptrace_flags' instead.
ba42693b 9157 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9158 (linux_wait_1): ... not here.
9159
5091eb23
DE
91602009-04-30 Doug Evans <dje@google.com>
9161
9f767825
DE
9162 * inferiors.c (started_inferior_callback): New function.
9163 (attached_inferior_callback): New function.
9164 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9165 * server.c (print_started_pid, print_attached_pid): New functions.
9166 (detach_or_kill_for_exit): New function.
9167 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9168 * server.h (have_started_inferiors_p): Declare.
9169 (have_attached_inferiors_p): Declare.
9170
5091eb23
DE
9171 * inferiors.c (remove_process): Fix memory leak, free process.
9172 * linux-low.c (linux_remove_process): New function.
9173 (linux_kill): Call it instead of remove_process.
9174 (linux_detach, linux_wait_1): Ditto.
9175
155c8968
PA
91762009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9177
9178 * configure.srv: Add x86 Windows CE target.
9179
7fe519cb
UW
91802009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9181
9182 * inferiors.c (get_thread_process): Make global.
9183 * server.h (get_thread_process): Add prototype.
9184 * thread-db.c (find_one_thread): Use get_thread_process
9185 instead of current_process.
9186 (thread_db_get_tls_address): Do not crash if called when
9187 thread layer is not yet initialized.
9188
5472f405
UW
91892009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9190
9191 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9192 * spu-low.c (current_tid): Rename to ...
9193 (current_ptid): ... this.
9194 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9195 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9196 ptid_get_lwp (current_ptid) instead of current_tid.
9197 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9198 instead of current_tid. Use find_process_pid to verify pid
9199 argument is valid. Pass proper argument to remove_process.
9200 (spu_thread_alive): Compare current_ptid instead of current_tid.
9201 (spu_resume): Likewise.
9202
55ac2b99
PA
92032009-04-02 Pedro Alves <pedro@codesourcery.com>
9204
9205 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9206 variable.
9207
95954743
PA
92082009-04-01 Pedro Alves <pedro@codesourcery.com>
9209
9210 Implement the multiprocess extensions, and add linux multiprocess
9211 support.
9212
9213 * server.h (ULONGEST): Declare.
9214 (struct ptid, ptid_t): New.
9215 (minus_one_ptid, null_ptid): Declare.
9216 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9217 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9218 (struct inferior_list_entry): Change `id' type from unsigned from
9219 to ptid_t.
9220 (struct sym_cache, struct breakpoint, struct
9221 process_info_private): Forward declare.
9222 (struct process_info): Declare.
9223 (current_process): Declare.
9224 (all_processes): Declare.
9225 (initialize_inferiors): Declare.
9226 (add_thread): Adjust to use ptid_t.
9227 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9228 (add_process, remove_process, find_thread_pid): Declare.
9229 (find_inferior_id): Adjust to use ptid_t.
9230 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9231 (multi_process): Declare.
9232 (push_event): Adjust to use ptid_t.
9233 (read_ptid, write_ptid): Declare.
9234 (prepare_resume_reply): Adjust to use ptid_t.
9235 (clear_symbol_cache): Declare.
9236 * inferiors.c (all_processes): New.
9237 (null_ptid, minus_one_ptid): New.
9238 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9239 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9240 (add_thread): Change unsigned long to ptid. Remove gdb_id
9241 parameter. Adjust.
9242 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9243 (gdb_id_to_thread): Rename to ...
9244 (find_thread_pid): ... this. Change unsigned long to ptid.
9245 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9246 (loaded_dll, pull_pid_from_list): Adjust.
9247 (add_process, remove_process, find_process_pid)
9248 (get_thread_process, current_process, initialize_inferiors): New.
9249 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9250 (struct target_waitstatus) <related_pid>: Ditto.
9251 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9252 return type to int.
9253 (struct target_ops) <join>: Add `pid' argument.
9254 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9255 (struct target_ops) <wait>: Add `ptid' field. Change return type
9256 to ptid.
9257 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9258 (mywait): Add `ptid' argument. Change return type to ptid_t.
9259 (target_pid_to_str): Declare.
9260 * target.c (set_desired_inferior): Adjust to use ptids.
9261 (mywait): Add new `ptid' argument. Adjust.
9262 (target_pid_to_str): New.
9263 * mem-break.h (free_all_breakpoints): Declare.
9264 * mem-break.c (breakpoints): Delelete.
9265 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9266 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9267 to use per-process breakpoint list.
9268 (free_all_breakpoints): New.
9269 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9270 (symbol_cache, all_symbols_looked_up): Delete.
9271 (hexchars): New.
9272 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9273 read_ptid): New.
9274 (prepare_resume_reply): Change ptid argument's type from unsigned
9275 long to ptid_t. Adjust. Implement W;process and X;process.
9276 (free_sym_cache, clear_symbol_cache): New.
9277 (look_up_one_symbol): Adjust to per-process symbol cache. *
9278 * server.c (cont_thread, general_thread, step_thread): Change type
9279 to ptid_t.
9280 (attached): Delete.
9281 (multi_process): New.
9282 (last_ptid): Change type to ptid_t.
9283 (struct vstop_notif) <ptid>: Change type to ptid_t.
9284 (queue_stop_reply, push_event): Change `ptid' argument's type to
9285 ptid_t.
9286 (discard_queued_stop_replies): Add `pid' argument.
9287 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9288 changes. Don't reference the `attached' global.
9289 (attach_inferior): Adjust to mywait interface changes.
9290 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9291 features. Handle and report "multiprocess+". Handle
9292 "qAttached:PID".
9293 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9294 changes.
9295 (handle_v_kill): New.
9296 (handle_v_stopped): Adjust to use target_pid_to_str.
9297 (handle_v_requests): Allow multiple attaches and runs when
9298 multiprocess extensions are in effect. Handle "vKill".
9299 (myresume): Adjust to use ptids.
9300 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9301 (handle_status): Adjust to discard_queued_stop_replies interface
9302 change.
9303 (first_thread_of, kill_inferior_callback)
9304 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9305 (main): Call initialize_inferiors. Adjust to use ptids, killing
9306 and detaching from all inferiors. Handle multiprocess packet
9307 variants.
9308 * linux-low.h: Include gdb_proc_service.h.
9309 (struct process_info_private): New.
9310 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9311 <lwpid_of>: Use ptid_get_lwp.
9312 (get_lwp_thread): Adjust.
9313 (struct lwp_info): Add `dead' member.
9314 (find_lwp_pid): Declare.
9315 * linux-low.c (thread_db_active): Delete.
9316 (new_inferior): Adjust comment.
9317 (inferior_pid): Delete.
9318 (linux_add_process): New.
9319 (handle_extended_wait): Adjust.
9320 (add_lwp): Change unsigned long to ptid.
9321 (linux_create_inferior): Add process to processes table. Adjust
9322 to use ptids. Don't set new_inferior here.
9323 (linux_attach_lwp): Rename to ...
9324 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9325 it. Adjust to use ptids.
9326 (linux_attach_lwp): New.
9327 (linux_attach): Add process to processes table. Don't set
9328 new_inferior here.
9329 (struct counter): New.
9330 (second_thread_of_pid_p, last_thread_of_process_p): New.
9331 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9332 multiple processes.
9333 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9334 processes. Remove process from process table.
9335 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9336 to multiple processes.
9337 (any_thread_of): New.
9338 (linux_detach): Add `pid' argument, and handle it. Remove process
9339 from processes table.
9340 (linux_join): Add `pid' argument. Handle it.
9341 (linux_thread_alive): Change unsighed long argument to ptid_t.
9342 Consider dead lwps as not being alive.
9343 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9344 threads we're not interested in.
9345 (same_lwp, find_lwp_pid): New.
9346 (linux_wait_for_lwp): Change `pid' argument's type from int to
9347 ptid_t. Adjust.
9348 (linux_wait_for_event): Rename to ...
9349 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9350 from int to ptid_t. Adjust.
9351 (linux_wait_for_event): New.
9352 (linux_wait_1): Add `ptid' argument. Change return type to
9353 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9354 that exit from the process table.
9355 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9356 Adjust.
9357 (mark_lwp_dead): New.
9358 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9359 stopping all threads, mark its main lwp as dead.
9360 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9361 ptids.
9362 (fetch_register, usr_store_inferior_registers)
9363 (regsets_fetch_inferior_registers)
9364 (regsets_store_inferior_registers, linux_read_memory)
9365 (linux_write_memory): Inline `inferior_pid'.
9366 (linux_look_up_symbols): Adjust to use per-process
9367 `thread_db_active'.
9368 (linux_request_interrupt): Adjust to use ptids.
9369 (linux_read_auxv): Inline `inferior_pid'.
9370 (initialize_low): Don't reference thread_db_active.
9371 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9372 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9373 (ps_getpid): Return the pid of the current inferior.
9374 * thread-db.c (proc_handle, thread_agent): Delete.
9375 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9376 per-process data.
9377 (find_one_thread): Change argument type to ptid_t. Adjust to
9378 per-process data.
9379 (maybe_attach_thread): Adjust to per-process data and ptids.
9380 (thread_db_find_new_threads): Ditto.
9381 (thread_db_init): Ditto.
9382 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9383 processes table. Adjust to use ptids.
9384 (spu_kill, spu_detach): Adjust interface. Remove process from
9385 processes table.
9386 (spu_join, spu_thread_alive): Adjust interface.
9387 (spu_wait): Adjust interface. Remove process from processes
9388 table. Adjust to use ptids.
9389 * win32-low.c (current_inferior_tid): Delete.
9390 (current_inferior_ptid): New.
9391 (debug_event_ptid): New.
9392 (thread_rec): Take a ptid. Adjust.
9393 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9394 (child_delete_thread): Ditto.
9395 (do_initial_child_stuff): Add `attached' argument. Add process to
9396 processes table.
9397 (child_fetch_inferior_registers, child_store_inferior_registers):
9398 Adjust.
9399 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9400 (win32_attach): Pass 1 to do_initial_child_stuff.
9401 (win32_kill): Adjust interface. Remove process from processes
9402 table.
9403 (win32_detach): Ditto.
9404 (win32_join): Adjust interface.
9405 (win32_thread_alive): Take a ptid.
9406 (win32_resume): Adjust to use ptids.
9407 (get_child_debug_event): Ditto.
9408 (win32_wait): Adjust interface. Remove exiting process from
9409 processes table.
9410
bd99dc85
PA
94112009-04-01 Pedro Alves <pedro@codesourcery.com>
9412
9413 Non-stop mode support.
9414
9415 * server.h (non_stop): Declare.
9416 (gdb_client_data, handler_func): Declare.
9417 (delete_file_handler, add_file_handler, start_event_loop):
9418 Declare.
9419 (handle_serial_event, handle_target_event, push_event)
9420 (putpkt_notif): Declare.
9421 * target.h (enum resume_kind): New.
9422 (struct thread_resume): Replace `step' field by `kind' field.
9423 (TARGET_WNOHANG): Define.
9424 (struct target_ops) <wait>: Add `options' argument.
9425 <supports_non_stop, async, start_non_stop>: New fields.
9426 (target_supports_non_stop, target_async): New.
9427 (start_non_stop): Declare.
9428 (mywait): Add `options' argument.
9429 * target.c (mywait): Add `options' argument. Print child exit
9430 notifications here.
9431 (start_non_stop): New.
9432 * server.c (non_stop, own_buf, mem_buf): New globals.
9433 (struct vstop_notif): New.
9434 (notif_queue): New global.
9435 (queue_stop_reply, push_event, discard_queued_stop_replies)
9436 (send_next_stop_reply): New.
9437 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9438 interface changes.
9439 (attach_inferior): In non-stop mode, don't wait for the target
9440 here.
9441 (handle_general_set): Handle QNonStop.
9442 (handle_query): When handling qC, return the current general
9443 thread, instead of the first thread of the list.
9444 (handle_query): If the backend supports non-stop mode, include
9445 QNonStop+ in the qSupported query response.
9446 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9447 and non-stop mode.
9448 (handle_v_attach, handle_v_run): Handle non-stop mode.
9449 (handle_v_stopped): New.
9450 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9451 (myresume): Adjust to use resume_kind. Handle non-stop.
9452 (queue_stop_reply_callback): New.
9453 (handle_status): Handle non-stop mode.
9454 (main): Clear non_stop flag on reconnection. Use the event-loop.
9455 Refactor serial protocol handling from here ...
9456 (process_serial_event): ... to this new function. When GDB
9457 selects any thread, select one here. In non-stop mode, wait until
9458 GDB acks all pending events before exiting.
9459 (handle_serial_event, handle_target_event): New.
9460 * remote-utils.c (remote_open): Install remote_desc in the event
9461 loop.
9462 (remote_close): Remove remote_desc from the event loop.
9463 (putpkt_binary): Rename to...
9464 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9465 (putpkt_binary): New as wrapper around putpkt_binary_1.
9466 (putpkt_notif): New.
9467 (prepare_resume_reply): In non-stop mode, don't change the
9468 general_thread.
9469 * event-loop.c: New.
9470 * Makefile.in (OBJ): Add event-loop.o.
9471 (event-loop.o): New rule.
9472
9473 * linux-low.h (pid_of): Moved here.
9474 (lwpid_of): New.
9475 (get_lwp_thread): Use lwpid_of.
9476 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9477 * linux-low.c (pid_of): Delete.
9478 (inferior_pid): Use lwpid_of.
9479 (linux_event_pipe): New.
9480 (target_is_async_p): New.
9481 (delete_lwp): New.
9482 (handle_extended_wait): Use lwpid_of.
9483 (add_lwp): Don't set lwpid field.
9484 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9485 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9486 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9487 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9488 first. Adjust to linux_wait_for_event interface changes. Use
9489 lwpid_of.
9490 (linux_detach): Don't delete the main lwp here.
9491 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9492 (status_pending_p): Don't consider explicitly suspended lwps.
9493 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9494 pointer. Add OPTIONS argument. Change return type to int. Use
9495 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9496 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9497 pointer. Add status pointer argument. Return a pid instead of a
9498 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9499 changes. In non-stop mode, don't switch to a random thread.
9500 (linux_wait): Rename to...
9501 (linux_wait_1): ... this. Add target_options argument, and handle
9502 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9503 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9504 clean exit and signal exit code. Don't stop all threads in
9505 non-stop mode. In all-stop mode, only stop all threads when
9506 reporting a stop to GDB. Handle explicit thread stop requests.
9507 (async_file_flush, async_file_mark): New.
9508 (linux_wait): New.
9509 (send_sigstop): Use lwpid_of.
9510 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9511 interface changes. In non-stop mode, don't switch to a random
9512 thread.
9513 (linux_resume_one_lwp): Use lwpid_of.
9514 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9515 (linux_resume_one_thread): ... this. Handle resume_stop. In
9516 non-stop mode, don't look for pending flag in all threads.
9517 (resume_status_pending_p): Don't consider explicitly suspended
9518 threads.
9519 (my_waitpid): Reimplement. Emulate __WALL.
9520 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9521 Use lwpid_of.
9522 (sigchld_handler, linux_supports_non_stop, linux_async)
9523 (linux_start_non_stop): New.
9524 (linux_target_ops): Register linux_supports_non_stop, linux_async
9525 and linux_start_non_stop.
9526 (initialize_low): Install SIGCHLD handler.
9527 * thread-db.c (thread_db_create_event, find_one_thread)
9528 (thread_db_get_tls_address): Use lwpid_of.
9529 * win32-low.c (win32_detach): Adjust to use resume_kind.
9530 (win32_wait): Add `options' argument.
9531 * spu-low.c (spu_resume): Adjust to use resume_kind.
9532 (spu_wait): Add `options' argument.
9533
5b1c542e
PA
95342009-04-01 Pedro Alves <pedro@codesourcery.com>
9535
9536 Decouple target code from remote protocol.
9537
9538 * target.h (enum target_waitkind): New.
9539 (struct target_waitstatus): New.
9540 (struct target_ops) <wait>: Return an unsigned long. Take a
9541 target_waitstatus pointer instead of a char pointer.
9542 (mywait): Likewise.
9543 * target.c (mywait): Change prototype to return an unsigned long.
9544 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9545 * server.h (thread_from_wait, old_thread_from_wait): Delete
9546 declarations.
9547 (prepare_resume_reply): Change prototype to take a
9548 target_waitstatus.
9549 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9550 (last_status, last_ptid): New.
9551 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9552 pid instead of a signal.
9553 (attach_inferior): Remove "status" and "signal" parameters.
9554 Adjust.
9555 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9556 not as an address.
9557 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9558 (handle_v_requests, myresume): Remove "status" and "signal"
9559 parameters. Adjust.
9560 (handle_status): New.
9561 (main): Delete local `status'. Adjust.
9562 * remote-utils.c: Include target.h.
9563 (prepare_resume_reply): Change prototype to take a
9564 target_waitstatus. Adjust.
9565
9566 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9567 interface.
9568 * spu-low.c (spu_wait): Adjust.
9569 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9570 Delete.
9571 (win32_wait): Adjust.
9572
2bd7c093
PA
95732009-04-01 Pedro Alves <pedro@codesourcery.com>
9574
9575 * target.h (struct thread_resume): Delete leave_stopped member.
9576 (struct target_ops): Add a `n' argument to the `resume' callback.
9577 * server.c (start_inferior): Adjust.
9578 (handle_v_cont, myresume): Adjust.
9579 * linux-low.c (check_removed_breakpoint): Adjust to resume
9580 interface change, and to removed leave_stopped field.
9581 (resume_ptr): Delete.
9582 (struct thread_resume_array): New.
9583 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9584 resume interface change.
9585 (linux_continue_one_thread, linux_queue_one_thread)
9586 (resume_status_pending_p): Check if the resume field is NULL
9587 instead of checking the leave_stopped member.
9588 (linux_resume): Adjust to the target resume interface change.
9589 * spu-low.c (spu_resume): Adjust to the target resume interface
9590 change.
9591 * win32-low.c (win32_detach, win32_resume): Ditto.
9592
c35fafde
PA
95932009-04-01 Pedro Alves <pedro@codesourcery.com>
9594
9595 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9596 flag.
9597 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9598 pending.
9599 (linux_continue_one_thread): Only preserve the stepping flag if
9600 there's a pending breakpoint.
9601
0a59d50b
PA
96022009-03-31 Pedro Alves <pedro@codesourcery.com>
9603
9604 * server.c (main): After the inferior having exited, call
9605 remote_close before exiting gdbserver.
9606
f04c6d38
TJB
96072009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9608
9609 Fix size of FPSCR in Power 7 processors.
9610 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9611 (PPC_FEATURE_HAS_DFP): New #define.
9612 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9613 size of the FPSCR.
9614
78e5cee6
PA
96152009-03-23 Pedro Alves <pedro@codesourcery.com>
9616
9617 * server.c (handle_query) Whitespace and formatting.
9618
1b3f6016
PA
96192009-03-22 Pedro Alves <pedro@codesourcery.com>
9620
9621 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9622 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9623 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9624 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9625 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9626 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9627 Makefile.in, configure.ac: Fix whitespace throughout.
9628 * configure: Regenerate.
9629
a07b2135
PA
96302009-03-22 Pedro Alves <pedro@codesourcery.com>
9631
9632 * inferiors.c (find_inferior): Make it safe for the callback
9633 function to delete the currently iterated inferior.
9634
67cc2626
PA
96352009-03-22 Pedro Alves <pedro@codesourcery.com>
9636
9637 * Makefile.in (linuw_low_h): Move higher.
9638 (thread-db.o): Depend on $(linux_low_h).
9639
54a0b537
PA
96402009-03-17 Pedro Alves <pedro@codesourcery.com>
9641
9642 Rename "process" to "lwp" throughout.
9643
9644 * linux-low.c (all_processes): Rename to...
9645 (all_lwps): ... this.
9646 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9647 (add_process): Rename to ...
9648 (add_lwp): ... this. Adjust.
9649 (linux_create_inferior): Adjust.
9650 (linux_attach_lwp): Adjust.
9651 (linux_attach): Adjust.
9652 (linux_kill_one_process): Rename to ...
9653 (linux_kill_one_lwp): ... this. Adjust.
9654 (linux_kill): Adjust.
9655 (linux_detach_one_process): Rename to ...
9656 (linux_detach_one_lwp): ... this. Adjust.
9657 (linux_detach): Adjust.
9658 (check_removed_breakpoint): Adjust.
9659 (status_pending_p): Adjust.
9660 (linux_wait_for_process): Rename to ...
9661 (linux_wait_for_lwp): ... this. Adjust.
9662 (linux_wait_for_event): Adjust.
9663 (send_sigstop): Adjust.
9664 (wait_for_sigstop): Adjust.
9665 (stop_all_processes): Rename to ...
9666 (stop_all_lwps): ... this.
9667 (linux_resume_one_process): Rename to ...
9668 (linux_resume_one_lwp): ... this. Adjust.
9669 (linux_set_resume_request, linux_continue_one_thread)
9670 (linux_queue_one_thread, resume_status_pending_p)
9671 (usr_store_inferior_registers, regsets_store_inferior_registers)
9672 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9673 Adjust.
9674 * linux-low.h (get_process): Rename to ...
9675 (get_lwp): ... this. Adjust.
9676 (get_thread_process): Rename to ...
9677 (get_thread_lwp): ... this. Adjust.
9678 (get_process_thread): Rename to ...
9679 (get_lwp_thread): ... this. Adjust.
9680 (struct process_info): Rename to ...
9681 (struct lwp_info): ... this.
9682 (all_processes): Rename to ...
9683 (all_lwps): ... this.
9684 * proc-service.c (ps_lgetregs): Adjust.
9685 * thread-db.c (thread_db_create_event, find_one_thread)
9686 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9687
0b16c5cf
PA
96882009-03-14 Pedro Alves <pedro@codesourcery.com>
9689
9690 * server.c (handle_query): Handle "qAttached".
9691
32de4b9d
NS
96922009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9693
9694 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9695 GPLv3, update license URL.
9696
2aecd87f
DE
96972009-03-01 Doug Evans <dje@google.com>
9698
93efd302 9699 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
9700 (server_h): Add gdb_signals.h.
9701 (signals.o): Update.
9702 * server.h (target_signal_from_host,target_signal_to_host_p)
9703 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9704
86b1f9c5
PM
97052009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9706
9707 * remote-utils.c (getpkt): Also generate remote-debug
9708 information if noack_mode is set.
9709
4aa995e1
PA
97102009-02-06 Pedro Alves <pedro@codesourcery.com>
9711
9712 * server.c (handle_query): Report qXfer:siginfo:read and
9713 qXfer:siginfo:write as supported and handle them.
9714 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9715 * linux-low.c (linux_xfer_siginfo): New.
9716 (linux_target_ops): Set it.
9717
62709adf
PA
97182009-01-26 Pedro Alves <pedro@codesourcery.com>
9719
9720 * server.c (gdbserver_usage): Mention --remote-debug.
9721 (main): Accept '--remote-debug' switch.
9722
aef93bd7
DE
97232009-01-18 Doug Evans <dje@google.com>
9724
9725 * regcache.c (new_register_cache): No need to check result of xcalloc.
9726 * server.c (handle_search_memory): Back out calls to xmalloc,
9727 result is checked and error is returned to user upon failure.
9728 (handle_query): Ditto. Add more checks for result of malloc.
9729 (handle_v_cont): Check result of malloc, report error back to
9730 user upon failure.
9731 (handle_v_run): Ditto. Call freeargv.
9732 * server.h (freeargv): Declare.
9733 * utils.c (freeargv): New fn.
9734
54363045
DE
97352009-01-15 Doug Evans <dje@google.com>
9736
f626972c
DE
9737 * gdbreplay.c (perror_with_name): Make arg const char *.
9738 * server.h (target_signal_to_name): Make return type const char *.
0842e787 9739 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 9740 * utils.c (perror_with_name): Make arg const char *.
54363045 9741
18aae699
PA
97422009-01-14 Pedro Alves <pedro@codesourcery.com>
9743
9744 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9745 when handling a EXIT_PROCESS_DEBUG_EVENT.
9746
ff703abe
JB
97472009-01-06 Joel Brobecker <brobecker@adacore.com>
9748
9749 * gdbreplay.c (gdbreplay_version): Update copyright year.
9750 * server.c (gdbserver_version): Likewise.
9751
f21cc1a2 97522009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
9753
9754 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 9755 (handle_extended_wait): Improve comment.
0e21c1ec 9756
bca929d3
DE
97572008-12-13 Doug Evans <dje@google.com>
9758
9759 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9760 * server.h (ATTR_MALLOC): New macro.
9761 (xmalloc,xcalloc,xstrdup): Declare.
9762 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9763 * inferiors.c: Ditto.
9764 * linux-low.c: Ditto.
9765 * mem-break.c: Ditto.
9766 * regcache.c: Ditto.
9767 * remote-utils.c: Ditto.
9768 * server.c: Ditto.
9769 * target.c: Ditto.
9770 * win32-low.c: Ditto.
9771
97438e3f
DE
97722008-12-12 Doug Evans <dje@google.com>
9773
896c7fbb
DE
9774 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9775 in debugging printf.
9776
97438e3f
DE
9777 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9778
e3b886f8
DE
97792008-12-09 Doug Evans <dje@google.com>
9780
9781 * linux-low.h (struct process_info): Delete member tid, unused.
9782 * thread-db.c (find_one_thread): Update.
9783 (maybe_attach_thread): Update.
9784
07e059b5
VP
97852008-12-02 Pedro Alves <pedro@codesourcery.com>
9786
889bf7c5
PA
9787 * target.h (struct target_ops): Add qxfer_osdata member.
9788 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9789 and dirent.h.
9790 (linux_qxfer_osdata): New functions.
9791 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9792 callback.
9793 * server.c (handle_query): Handle "qXfer:osdata:read:".
9794 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9795 (buffer_xml_printf): New functions.
9796 * server.h (struct buffer): New.
9797 (buffer_grow_str, buffer_grow_str0): New macros.
9798 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9799 (buffer_xml_printf): Declare.
07e059b5 9800
4cab47ab
DE
98012008-11-24 Doug Evans <dje@google.com>
9802
9803 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9804
f142445f
DJ
98052008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9806
9807 * server.c (handle_v_run): Always use the supplied argument list.
9808
d0107bb6 98092008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9810
d0107bb6
BW
9811 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9812 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9813
2c4ad781
TJB
98142008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9815
9816 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9817 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9818 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9819 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9820 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9821 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9822 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9823 XML target descriptions.
9824 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9825 when inferior is running on an ISA 2.05 or later processor. Add
9826 special case to return offset for full 64-bit slot of FPSCR when
9827 in 32-bits.
9828
dfb64f85
DJ
98292008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9830
9831 * Makefile.in (SFILES, clean): Added sparc64 files.
9832 (reg-sparc64.o, reg-sparc64.c): New.
9833 * configure.srv (sparc*-*-linux*): New configuration.
9834 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9835 syscall arguments for SPARC.
9836 (regsets_store_inferior_registers): Likewise.
9837 * linux-sparc-low.c: New file.
9838
66b6e1dd
DE
98392008-10-21 Doug Evans <dje@google.com>
9840
9841 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9842 (READLINE_DIR,READLINE_DEP): Delete.
9843 (INTERNAL_CFLAGS): Update.
9844 (LINTFLAGS): Update.
9845
9b710a42
PA
98462008-10-10 Pedro Alves <pedro@codesourcery.com>
9847
9848 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9849 whole argv from the last run, not just argv[0].
9850
5822d809
PA
98512008-09-08 Pedro Alves <pedro@codesourcery.com>
9852
9853 * regcache.c (new_register_cache): Return NULL if the register
9854 cache size isn't known yet.
9855 (free_register_cache): Avoid dereferencing a NULL regcache.
9856
74aac56f
DJ
98572008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9858
9859 * configure.srv: Merge MIPS and MIPS64.
9860
400b20f5
MR
98612008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9862
9863 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9864
677c5bb1
LM
98652008-08-18 Luis Machado <luisgpm@br.ibm.com>
9866
9867 * Makefile.in: Add required vsx dependencies.
9868
9869 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9870 Declare init_registers_powerpc_vsx32l.
9871 Declare init_registers_powerpc_vsx64l.
9872 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9873 (ppc_arch_setup): Check for VSX in hwcap.
9874 (ppc_fill_vsxregset): New function.
9875 (ppc_store_vsxregset): New function.
9876 Add new VSX entry in regset_info target_regsets.
9877
9878 * configure.srv: Add new VSX dependencies.
9879
a6f3e723
SL
98802008-08-12 Pedro Alves <pedro@codesourcery.com>
9881
9882 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9883 (remote_open): Set or clear transport_is_reliable.
9884 (putpkt_binary): Don't expect acks in noack mode.
9885 (getpkt): Don't send ack/nac in noack mode.
9886 * server.c (handle_general_set): Handle QStartNoAckMode.
9887 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9888 qSupported.
9889 (main): Reset noack_mode on every connection.
9890 * server.h (noack_mode): Declare.
9891
a417dc56
RW
98922008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9893
9894 * Makefile.in (GDBREPLAY_OBS): New variable.
9895 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9896
3221518c
UW
98972008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9898 Daniel Jacobowitz <dan@codesourcery.com>
9899
9900 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9901 (usr_store_inferior_registers): Likewise.
9902 (regsets_store_inferior_registers): Likewise.
9903
ec56be1b
PA
99042008-07-31 Rolf Jansen <rj@surtec.com>
9905 Pedro Alves <pedro@codesourcery.com>
9906
9907 * configure.ac: Check for memmem declaration.
9908 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9909 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9910 (disable_packet_qfThreadInfo): Unconditionally compile.
9911 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9912 * configure, config.in: Regenerate.
9913
2fe5e3ff
DE
99142008-07-28 Doug Kwan <dougkwan@google.com>
9915
9916 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9917 (linux_write_memory): Remove declaration of errno.
9918
836acd6d
UW
99192008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9920
9921 * linux-low.c (handle_extended_wait): Do not use "status"
9922 variable uninitialized.
9923
aeba519e
PA
99242008-07-07 Pedro Alves <pedro@codesourcery.com>
9925
9926 * server.c (handle_v_attach): Inhibit reporting dll changes.
9927
db42f210
PA
99282008-06-27 Pedro Alves <pedro@codesourcery.com>
9929
9930 * remote-utils.c (prepare_resume_reply): If requested, don't
9931 output "thread:TID" in the T stop reply.
9932
9933 * server.c (disable_packet_vCont, disable_packet_Tthread)
9934 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9935 (handle_query): If requested, disable support for qC, qfThreadInfo
9936 and qsThreadInfo.
9937 (handle_v_requests): If requested, disable support for vCont.
9938 (gdbserver_show_disableable): New.
9939 (main): Handle --disable-packet and --disable-packet=LIST.
9940
9941 * server.h (disable_packet_vCont, disable_packet_Tthread)
9942 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9943
8e4c5421
CD
99442008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9945
9946 * server.c (gdbserver_usage): Mention --version.
9947
6e23a804
DJ
99482008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9949
9950 * Makefile.in (gdbreplay.o): New rule.
9951
90aa6a40
JM
99522008-06-06 Joseph Myers <joseph@codesourcery.com>
9953
9954 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9955 message, not gdbserver.
9956
c16158bc 99572008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9958 Nathan Sidwell <nathan@codesourcery.com>
9959 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9960
9961 * acinclude.m4: Include ../../config/acx.m4.
9962 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9963 * configure, config.in: Regenerate.
9964 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9965 * server.c (gdbserver_version): Print PKGVERSION.
9966 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9967 (main): Adjust gdbserver_usage calls.
9968 * gdbreplay.c (version, host_name): Add declarations.
9969 (gdbreplay_version, gdbreplay_usage): New.
9970 (main): Accept --version and --help options.
9971
aeb75bf5
DJ
99722008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9973
9974 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9975 (arm_breakpoint_at): Handle Thumb.
9976 (the_low_target): Add comment.
9977
76b233dd
UW
99782008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9979
9980 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9981
08388c79
DE
99822008-05-09 Doug Evans <dje@google.com>
9983
a3c83fae
DE
9984 * server.h (decode_search_memory_packet): Declare.
9985 * remote-utils.c (decode_search_memory_packet): New fn.
9986 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9987 (handle_search_memory): New fn.
9988 (handle_query): Process qSearch:memory packets.
9989
bb9c3d36
UW
99902008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9991
9992 * regcache.c (registers_length): Remove.
9993 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9994 full register packet.
9995 * regcache.h (registers_length): Remove prototype.
9996 * server.h (PBUFSIZ): Define to 16384.
9997
7284e1be
UW
99982008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9999
10000 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10001 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10002 powerpc-64l.o, and powerpc-altivec64l.o.
10003 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10004 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10005 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10006 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10007 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10008 to srv_xmlfiles.
10009
10010 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10011 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10012 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10013 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10014 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10015 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10016 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10017 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10018 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10019 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10020 (clean): Update.
10021
10022 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10023 (init_registers_powerpc_32l): ... this new prototype.
10024 (init_registers_powerpc_32): Remove, replace by ...
10025 (init_registers_powerpc_altivec32l): ... this new prototype.
10026 (init_registers_powerpc_e500): Remove, replace by ...
10027 (init_registers_powerpc_e500l): ... this new prototype.
10028 (init_registers_ppc64): Remove, replace by ...
10029 (init_registers_powerpc_64l): ... this new prototype.
10030 (init_registers_powerpc_64): Remove, replace by ...
10031 (init_registers_powerpc_altivec64l): ... this new prototype.
10032 (ppc_num_regs): Set to 73.
10033 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10034 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10035 (ppc_cannot_store_register): Handle orig_r3 and trap.
10036 (ppc_arch_setup): Update init_registers_... calls.
10037 (ppc_fill_gregset): Handle orig_r3 and trap.
10038
10039 * inferiors.c (clear_inferiors): Reset current_inferior.
10040
fdc59709
PB
100412008-04-23 Paolo Bonzini <bonzini@gnu.org>
10042
889bf7c5
PA
10043 * acinclude.m4: Add override.m4.
10044 * configure: Regenerate.
fdc59709 10045
c9b2f845
UW
100462008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10047
10048 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10049 initial call to init_register_ppc64.
10050
550512b8
UW
100512008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10052
43aaf8b6
PA
10053 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10054 single powerpc*-*-linux* case.
550512b8
UW
10055 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10056
b6430ec3
UW
100572008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10058
10059 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10060 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10061 from reg_xmlfiles.
10062 * linux-ppc-low.c: Include <elf.h>.
10063 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10064 (ppc_hwcap): New global variable.
10065 (ppc_regmap): Remove __SPE__ #ifdef sections.
10066 (ppc_regmap_e500): New global variable.
10067 (ppc_cannot_store_register): Update __SPE__ special case.
10068 (ppc_get_hwcap): New function.
10069 (ppc_arch_setup): Use it to determine whether inferior supports
10070 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10071 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10072 Do not access registers if target does not support AltiVec.
10073 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10074 Do not access registers if target does not support SPE.
10075 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10076
52fa2412
UW
100772008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10078
10079 * linux-low.c (disabled_regsets, num_regsets): New.
10080 (use_regsets_p): Delete.
10081 (linux_wait_for_process): Clear disabled_regsets.
10082 (regsets_fetch_inferior_registers): Check and set it.
10083 (regsets_store_inferior_registers): Likewise.
10084 (linux_fetch_registers, linux_store_registers): Do not use
10085 use_regsets_p.
10086 (initialize_low): Allocate disabled_regsets.
10087
e28b3332
DJ
100882008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10089
10090 * Makefile.in (LIBOBJS): New.
10091 (OBS): Use LIBOBJS.
10092 (memmem.o): New rule.
10093 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10094 * configure: Regenerated.
10095
4536995d
UW
100962008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10097
10098 * server.c (handle_query): Never return "unsupported" for
10099 qXfer:features:read queries.
10100
221c031f
UW
101012008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10102
10103 * server.c (get_features_xml): Fix inverted condition.
10104 (handle_query): Always support qXfer:feature:read.
10105
ccd213ac
DJ
101062008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10107
10108 * server.c (wrapper_argv): New.
10109 (start_inferior): Handle wrapper_argv. If set, expect an extra
10110 trap.
10111 (gdbserver_usage): Document --wrapper.
10112 (main): Parse --wrapper.
10113
6fe305f7
UW
101142008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10115
10116 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10117 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10118 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10119 (ppc_set_pc): Likewise.
10120 (ppc_arch_setup): New function.
10121 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10122 of collect_register.
889bf7c5 10123 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10124
5b0a002e
UW
101252008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10126
10127 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10128 instead of linux-ppc64-low.o.
10129 * linux-ppc64-low.c: Remove file.
10130 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10131 (linux-ppc64-low.o): Remove rule.
10132
10133 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10134 (init_registers_powerpc_64): Likewise.
10135 (ppc_regmap): Conditionally define depending on __powerpc64__.
10136 (ppc_cannot_store_register): Do not special-case "fpscr" when
10137 compiled on __powerpc64__.
10138 (ppc_collect_ptrace_register): New function.
10139 (ppc_supply_ptrace_register): New function.
10140 (ppc_breakpoint): Change type to "unsigned int".
10141 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10142 (the_low_target): Conditionally provide initializers for the
889bf7c5 10143 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10144 collect_ptrace_register and supply_ptrace_register members.
10145
9b4b61c8
UW
101462008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10147
10148 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10149 * server.c (gdbserver_xmltarget): Define.
10150 (get_features_xml): Use it to replace "target.xml" and arch_string.
10151
10152 * configure.srv: Remove srv_xmltarget. Add XML files that were
10153 mentioned there to srv_xmlfiles instead. Remove conditional tests
10154 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10155 srv_xmlfiles and srv_regobj to include all possible choices.
10156 * configure.ac (srv_xmltarget): Remove.
10157 (srv_xmlfiles): Do not add "target.xml".
10158 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10159 checks for supplementary target information.
10160 * configure: Regenerate.
10161 * Makefile.in (XML_TARGET): Remove.
10162 (target.xml): Remove rule.
10163 (clean): Do not clean up target.xml.
10164 (.PRECIOUS): Do not mention target.xml.
10165
10166 * target.h (struct target_ops): Remove arch_string member.
10167 * linux-low.c (linux_arch_string): Remove.
10168 (linux_target_ops): Remove arch_string initializer.
10169 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10170 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10171 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10172 * spu-low.c (spu_arch_string): Remove.
10173 (spu_target_ops): Remove arch_string initializer.
10174 * win32-low.c (win32_arch_string): Remove.
10175 (win32_target_ops): Remove arch_string initializer.
10176 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10177 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10178 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10179
ee1a7ae4
UW
101802008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10181
10182 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10183 by collect_ptrace_register and supply_ptrace_register hooks.
10184 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10185 instead of checking for the_low_target.left_pad_xfer.
10186 (usr_store_inferior_registers): Use collect_ptrace_register callback
10187 instead of checking for the_low_target.left_pad_xfer.
10188
10189 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10190 (s390_supply_ptrace_register): Likewise.
10191 (s390_fill_gregset): Call s390_collect_ptrace_register.
10192 (the_low_target): Update.
10193
10194 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10195 (ppc_supply_ptrace_register): Likewise.
10196 (the_low_target): Update.
10197
10198 * linux-i386-low.c (the_low_target): Update.
10199 * linux-x86-64-low.c (the_low_target): Update.
10200
d61ddec4
UW
102012008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10202
10203 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10204 reg-s390.o and reg-s390x.o.
10205
10206 * linux-low.c (new_inferior): New global variable.
10207 (linux_create_inferior, linux_attach): Set it.
10208 (linux_wait_for_process): Call the_low_target.arch_setup after the
10209 target has stopped for the first time.
10210 (initialize_low): Do not call the_low_target.arch_setup.
10211
10212 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10213 (s390_set_pc): Likewise.
10214 (s390_arch_setup): New function.
10215 (the_low_target): Use s390_arch_setup as arch_setup routine.
10216
10217 * regcache.c (realloc_register_cache): New function.
10218 (set_register_cache): Call it for each existing regcache.
10219
d05b4ac3
UW
102202008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10221
10222 * server.h (init_registers): Remove prototype.
10223
10224 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10225 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10226 instead of init_registers ().
10227 * linux-arm-low.c (init_registers_arm): Add prototype.
10228 (init_registers_arm_with_iwmmxt): Likewise.
10229 (the_low_target): Add initializer for arch_setup field.
10230 * linux-cris-low.c (init_registers_cris): Add prototype.
10231 (the_low_target): Add initializer for arch_setup field.
10232 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10233 (the_low_target): Add initializer for arch_setup field.
10234 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10235 (the_low_target): Add initializer for arch_setup field.
10236 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10237 (the_low_target): Add initializer for arch_setup field.
10238 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10239 (the_low_target): Add initializer for arch_setup field.
10240 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10241 (the_low_target): Add initializer for arch_setup field.
10242 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10243 (init_registers_mips64_linux): Likewise.
10244 (the_low_target): Add initializer for arch_setup field.
10245 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10246 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10247 (the_low_target): Add initializer for arch_setup field.
10248 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10249 (init_registers_powerpc_64): Likewise.
10250 (the_low_target): Add initializer for arch_setup field.
10251 * linux-s390-low.c (init_registers_s390): Add prototype.
10252 (init_registers_s390x): Likewise.
10253 (the_low_target): Add initializer for arch_setup field.
10254 * linux-sh-low.c (init_registers_sh): Add prototype.
10255 (the_low_target): Add initializer for arch_setup field.
10256 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10257 (the_low_target): Add initializer for arch_setup field.
10258 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10259 (the_low_target): Add initializer for arch_setup field.
10260
10261 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10262 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10263 instead of init_registers ().
10264 * win32-arm-low.c (init_registers_arm): Add prototype.
10265 (the_low_target): Add initializer for arch_setup field.
10266 * win32-i386-low.c (init_registers_i386): Add prototype.
10267 (the_low_target): Add initializer for arch_setup field.
10268
10269 * spu-low.c (init_registers_spu): Add prototype.
10270 (initialize_low): Call initialie_registers_spu () instead of
10271 initialize_registers ().
10272
fd96d250
PA
102732008-02-19 Pedro Alves <pedro@codesourcery.com>
10274
10275 * server.c (handle_v_requests): When handling the vRun and vAttach
10276 packets, if already debugging a process, don't kill it. Return an
10277 error instead.
10278
d41b6bb4
DJ
102792008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10280
10281 * server.c (handle_query): Correct length check.
10282
5ac588cf
PA
102832008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10284
10285 * win32-low.c (do_initial_child_stuff): Add process handle
10286 parameter. Set current_process_handle and current_process_id from the
10287 parameters. Clear globals.
10288 (win32_create_inferior): Don't set current_process_handle and
10289 current_process_id here. Instead pass them on the call to
10290 do_initial_child_stuff.
10291 (win32_attach): Likewise.
10292 (win32_clear_inferiors): New.
10293 (win32_kill): Don't close the current process handle or the
10294 current thread handle here. Instead call win32_clear_inferiors.
10295 (win32_detach): Don't open a new handle to the process. Call
10296 win32_clear_inferiors.
10297 (win32_join): Don't rely on current_process_handle; open a new
10298 handle using the process id.
10299 (win32_wait): Call win32_clear_inferiors when the inferior process
10300 has exited.
10301
ecd7ecbc
DJ
103022008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10303
10304 * server.c (monitor_show_help): Add "exit".
10305
1525d545
MG
103062008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10307
ecd7ecbc 10308 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10309 (clean): Add reg-xtensa.c.
10310 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10311 * configure.srv (xtensa*-*-linux*) New target.
10312 * linux-xtensa-low.c: New.
10313 * xtensa-xtregs.c: New.
1525d545 10314
59a016f0
PA
103152008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10316
10317 * hostio.c: Don't include errno.h.
10318 (errno_to_fileio_errno): Move to hostio-errno.
10319 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10320 error number outputting to the target->hostio_last_error callback.
10321 (hostio_packet_error): Use FILEIO_EINVAL directly.
10322 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10323 calls to hostio_error.
10324 * hostio-errno.c: New.
10325 * server.h (hostio_last_error_from_errno): Declare.
10326 * target.h (target_ops): Add hostio_last_error member.
10327 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10328 as hostio_last_error handler.
889bf7c5 10329 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10330 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10331 (wince_hostio_last_error): New functions.
10332 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10333 as hostio_last_error handler.
10334 (win32_target_ops) [!_WIN32_WCE]: Register
10335 hostio_last_error_from_errno as hostio_last_error handler.
10336 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10337 (hostio-errno.o): New rule.
10338 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10339 * configure.srv (srv_hostio_err_objs): New variable. Default to
10340 hostio-errno.o.
10341 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10342 * configure: Regenerate.
10343
2d717e4f
DJ
103442008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10345
10346 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10347 (linux_kill, linux_detach): Clean up the process list.
10348 * remote-utils.c (remote_open): Improve port number parsing.
10349 (putpkt_binary, input_interrupt): Only send interrupts if the target
10350 is running.
10351 * server.c (extended_protocol): Make static.
10352 (attached): Define earlier.
10353 (exit_requested, response_needed, program_argv): New variables.
10354 (target_running): New.
10355 (start_inferior): Clear attached here.
10356 (attach_inferior): Set attached here.
10357 (require_running): Define.
10358 (handle_query): Use require_running and target_running. Implement
10359 "monitor exit".
10360 (handle_v_attach, handle_v_run): New.
10361 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10362 (gdbserver_usage): Update.
10363 (main): Redo argument parsing. Handle --debug and --multi. Handle
10364 --attach along with other options or after the port. Save
10365 program_argv. Support no initial program. Resynchronize
10366 communication with GDB after an error. Handle "monitor exit".
10367 Use require_running and target_running. Always allow the extended
10368 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10369 restart in extended mode.
10370 * README: Refer to the GDB manual. Update --attach usage.
10371
7407e2de
AS
103722007-12-20 Andreas Schwab <schwab@suse.de>
10373
10374 * linux-low.c (STACK_SIZE): Define.
10375 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10376 (linux_test_for_tracefork): Likewise.
10377
b65d95c5
DJ
103782007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10379
10380 * linux-low.c (linux_wait_for_event): Update messages. Do not
10381 reinsert auto-delete breakpoints.
10382 * mem-break.c (struct breakpoint): Change return type of handler to
10383 int.
10384 (set_breakpoint_at): Update handler type.
10385 (reinsert_breakpoint_handler): Return 1 instead of calling
10386 delete_breakpoint.
10387 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10388 setting a new one.
10389 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10390 * mem-break.h (set_breakpoint_at): Update handler type.
10391 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10392 * win32-low.c (auto_delete_breakpoint): New.
10393 (get_child_debug_event): Use it.
10394
4e799345
DJ
103952007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10396
10397 * configure.ac: Check for pread and pwrite.
10398 * hostio.c (handle_pread): Fall back to lseek and read.
10399 (handle_pwrite): Fall back to lseek and write.
10400 * config.in, configure: Regenerated.
10401
27524b67
DJ
104022007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10403
10404 * server.c (myresume): Add own_buf argument.
10405 (main): Update calls.
10406
a20d5e98
DJ
104072007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10408
10409 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10410 * remote-utils.c (remote_open): Do not call disable_async_io.
10411 (block_async_io): Delete.
10412 (unblock_async_io): Make static.
10413 (initialize_async_io): New.
10414 * server.c (handle_v_cont): Handle async I/O here.
10415 (myresume): Likewise. Move other common resume tasks here...
10416 (main): ... from here. Call initialize_async_io. Disable async
10417 I/O before the main loop.
10418 * server.h (initialize_async_io): Declare.
10419 (block_async_io, unblock_async_io): Delete prototypes.
10420 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10421
b79d787e
DJ
104222007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10423
10424 * remote-utils.c (readchar): Allow binary data in received messages.
10425
d97903b2
PA
104262007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10427
10428 * win32-low.c (attaching): New global.
10429 (win32_create_inferior): Clear the `attaching' global.
10430 (win32_attach): Set the `attaching' global.
10431 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10432 attaching. Only set a breakpoint at the entry point if not
10433 attaching.
10434
311de423
PA
104352007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10436
10437 * server.c (main): Don't report dll events on the initial
10438 connection on attaches.
10439
6c2d16d2
PA
104402007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10441
10442 * server.c (main): Relax numerical bases supported for the pid of
10443 the --attach command line argument.
10444
5ca906e6
PA
104452007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10446
10447 * win32-low.c (win32_attach): Call OpenProcess before
10448 DebugActiveProcess, not after. Add last error output to error
10449 call.
10450
9c6c8194
PA
104512007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10452
10453 * win32-low.c (win32_get_thread_context)
10454 (win32_set_thread_context): New functions.
10455 (thread_rec): Use win32_get_thread_context.
10456 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10457 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10458 field.
10459
4d5d1aaa
PA
104602007-12-03 Leo Zayas
10461 Pedro Alves <pedro_alves@portugalmail.pt>
10462
10463 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10464 global variables.
10465 (child_add_thread): Minor cleanup.
10466 (child_continue): Resume artificially suspended threads before
10467 calling ContinueDebugEvent.
10468 (suspend_one_thread): New.
10469 (fake_breakpoint_event): New.
10470 (get_child_debug_event): Change return type to int. Check here if
10471 gdb sent an interrupt request. If a soft interrupt was requested,
10472 fake a breakpoint event. Return 0 if there is no event to handle,
10473 and 1 otherwise.
10474 (win32_wait): Don't check here if gdb sent an interrupt request.
10475 Ensure there is a valid event to handle.
10476 (win32_request_interrupt): Add soft interruption method as last
10477 resort.
10478
c436e841
PA
104792007-12-03 Leo Zayas
10480 Pedro Alves <pedro_alves@portugalmail.pt>
10481
10482 * win32-low.h (win32_thread_info): Add descriptions to the
10483 structure members. Replace `suspend_count' counter by a
10484 `suspended' flag.
10485 * win32-low.c (thread_rec): Update condition of when to get the
10486 context from the inferior. Rely on ContextFlags being set if it
10487 has already been retrieved. Only suspend the inferior thread if
10488 we haven't already. Warn if that fails.
10489 (continue_one_thread): s/suspend_count/suspended/. Only call
10490 ResumeThread once. Warn if that fails.
10491
e7b5fa67
PA
104922007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10493
10494 * win32-low.c (win32_wait): Don't read from the inferior when it
10495 has already exited.
10496
a385171d
PA
104972007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10498
10499 * Makefile.in (win32_low_h): New variable.
10500 (win32-low.o): Add dependency on $(win32_low_h).
10501 (win32-arm-low.o, win32-i386-low.o): New rules.
10502
f80c84b3
DJ
105032007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10504
10505 * hostio.c: Correct copyright year.
10506
a6b151f1
DJ
105072007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10508
10509 * Makefile.in (OBS): Add hostio.o.
10510 (hostio.o): New rule.
10511 * server.h (handle_vFile): Declare.
10512 * hostio.c: New file.
10513 * server.c (handle_v_requests): Take packet_len and new_packet_len
10514 for binary packets. Call handle_vFile.
10515 (main): Update call to handle_v_requests.
10516
f9387fc3
DJ
105172007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10518
10519 * linux-low.c: Include <sched.h>.
10520
51c2684e
DJ
105212007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10522
10523 * linux-low.c (linux_tracefork_grandchild): New.
10524 (linux_tracefork_child): Use clone.
10525 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10526
75f83163
JB
105272007-10-31 Joel Brobecker <brobecker@adacore.com>
10528
10529 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10530
da5898ce
DJ
105312007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10532
10533 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10534
24a09b5f
DJ
105352007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10536
10537 * inferiors.c (change_inferior_id): Delete.
10538 (add_pid_to_list, pull_pid_from_list): New.
10539 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10540 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10541 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10542 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10543 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10544 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10545 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10546 (using_threads): Always set to 1.
10547 (handle_extended_wait): New.
10548 (add_process): Do not set TID.
10549 (linux_create_inferior): Set must_set_ptrace_flags.
10550 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10551 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10552 (linux_thread_alive): Rename TID argument to LWPID.
10553 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10554 (linux_wait_for_event): Do not use TID or check using_threads. Update
10555 call to dead_thread_notify. Call handle_extended_wait.
10556 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10557 (send_sigstop): Delete sigstop_sent.
10558 (wait_for_sigstop): Avoid TID.
10559 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10560 (linux_test_for_tracefork): New.
10561 (linux_lookup_signals): Use thread_db_active and
10562 linux_supports_tracefork_flag.
10563 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10564 * linux-low.h (get_process_thread): Avoid TID.
10565 (struct process_ifo): Move thread_known and tid to the end. Remove
10566 sigstop_sent.
10567 (linux_attach_lwp, thread_db_init): Update prototypes.
10568 * server.h (change_inferior_id): Delete prototype.
10569 (add_pid_to_list, pull_pid_from_list): New prototypes.
10570 * thread-db.c (thread_db_use_events): New.
10571 (find_first_thread): Rename to...
10572 (find_one_thread): ...this. Update callers and messages. Do not
10573 call fatal. Check thread_db_use_events. Do not call
10574 change_inferior_id or new_thread_notify.
10575 (maybe_attach_thread): Update. Do not call new_thread_notify.
10576 (thread_db_init): Set thread_db_use_events. Check use_events.
10577 * utils.c (fatal, warning): Correct message prefix.
10578
30ed0a8f
DJ
105792007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10580
10581 * Makefile.in (clean): Remove new files.
10582 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10583 (powerpc-64.o, powerpc-64.c): New rules.
10584 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10585 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10586 with SPE.
10587 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10588 SPE targets.
10589 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10590 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10591 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10592 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10593 (target_regsets): Add AltiVec and SPE register sets.
10594 * configure.ac: Check for AltiVec and SPE.
10595 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10596 (ppc_fill_vrregset, ppc_store_vrregset): New.
10597 (target_regsets): Add AltiVec register set.
10598 * configure: Regenerated.
10599
fd462a61
DJ
106002007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10601
10602 * linux-low.c (O_LARGEFILE): Define.
10603 (linux_read_memory): Use /proc/PID/mem.
10604 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10605 * configure, config.in: Regenerated.
10606
69f223ed
DJ
106072007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10608
10609 * linux-low.c (linux_wait_for_event): Do not pass signals while
10610 single-stepping.
10611
aec18585
PA
106122007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10613
10614 * win32-low.c (create_process): New.
10615 (win32_create_inferior): Use create_process instead of
10616 CreateProcess. If create_process failed retry appending an ".exe"
10617 suffix. Store the GetLastError result immediatelly after
10618 create_process calls and use it on the call to error.
10619
34d86ddd
PA
106202007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10621
10622 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10623
5a0e3bd0
JB
106242007-08-23 Joel Brobecker <brobecker@adacore.com>
10625
10626 * configure.ac: Switch license to GPLv3.
10627
f88c79e6
MS
106282007-08-01 Michael Snyder <msnyder@access-company.com>
10629
10630 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10631
6b3d9b83
PA
106322007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10633
10634 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10635 typedef.
10636 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10637 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10638 CloseToolhelp32Snapshot.
10639 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10640 CloseToolhelp32Snapshot.
10641
c588c53c
MS
106422007-07-27 Michael Snyder <michael.snyder@access-company.com>
10643
10644 * server.c (main): Check for inferior exit before main loop.
10645
aa0403d9
PA
106462007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10647
10648 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10649 instead of on tmp_desc.
10650
255e7678
DJ
106512007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10652 Daniel Jacobowitz <dan@codesourcery.com>
10653
10654 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10655 (add_thread): Minor cleanups.
10656 (clear_inferiors): Move lower in the file. Clear the DLL
10657 list.
10658 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10659 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10660 (xml_escape_text): New.
10661 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10662 for qSupported.
10663 (handle_v_cont): Report errors.
10664 (gdbserver_version): Update.
10665 (main): Correct size of own_buf. Do not report initial DLL events.
10666 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10667 (unloaded_dll, xml_escape_text): New.
10668 * win32-low.c (enum target_waitkind): Update comments.
10669 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10670 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10671 (win32_EnumProcessModules, win32_GetModuleInformation)
10672 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10673 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10674 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10675 (win32_Module32First, win32_Module32Next, load_toolhelp)
10676 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10677 (get_child_debug_event): Handle DLL events.
10678 (win32_wait): Likewise.
10679
0d37add9
DJ
106802007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10681
10682 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10683 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10684
45e2715e
PA
106852007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10686
10687 * win32-low.c (handle_output_debug_string): Ignore event if not
10688 waiting.
10689
c5674cf1
PA
106902007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10691
10692 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10693
2bbe3cc1
DJ
106942007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10695
10696 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10697
ae13219e
DJ
106982007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10699
10700 * inferiors.c (change_inferior_id): Add comment.
10701 * linux-low.c (check_removed_breakpoint): Add an early
10702 prototype. Improve debug output.
10703 (linux_attach): Doc update.
10704 (linux_detach_one_process, linux_detach): Clean up before releasing
10705 each process.
10706 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10707 * linux-low.h (struct process_info): Doc improvement.
10708 * mem-break.c (delete_all_breakpoints): New.
10709 * mem-break.h (delete_all_breakpoints): New prototype.
10710 * thread-db.c (find_first_thread): New.
10711 (thread_db_create_event): Call it instead of
10712 thread_db_find_new_threads. Clean up unused variables.
10713 (maybe_attach_thread): Remove first thread handling.
10714 (thread_db_find_new_threads): Use find_first_thread.
10715 (thread_db_get_tls_address): Likewise.
10716
4105de34
DJ
107172007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10718
10719 * thread-db.c (thread_db_find_new_threads): Add prototype.
10720 (thread_db_create_event): Check for the main thread before adding
10721 a new thread.
10722 (maybe_attach_thread): Only enable event reporting if TID == 0.
10723 (thread_db_get_tls_address): Check for new threads.
10724
2b876972
DJ
107252007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10726
10727 * linux-low.c (linux_create_inferior): Try execv before execvp.
10728 * spu-low.c (spu_create_inferior): Likewise.
10729
7a245884
DJ
107302007-06-13 Mike Frysinger <vapier@gentoo.org>
10731
10732 * linux-low.c (linux_create_inferior): Change execv to execvp.
10733 * spu-low.c (spu_create_inferior): Likewies.
10734
117ce543
DJ
107352007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10736
10737 * Makefile.in (clean): Clean new files instead of deleted ones.
10738 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10739 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10740 rules.
10741 * configure.srv: Specify XML files and new regformats for MIPS and
10742 MIPS64 GNU/Linux.
10743 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10744 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10745 an entry for the restart register.
10746 (mips_cannot_fetch_register, mips_cannot_store_register)
10747 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10748 register names to match the XML descriptions.
10749 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10750 restart register instead of $0.
10751
0e7f50da
UW
107522007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10753 Markus Deuling <deuling@de.ibm.com>
10754
10755 * remote-utils.c (decode_xfer_write): New function.
10756 * server.h (decode_xfer_write): Add prototype.
10757 * server.c (handle_query): Add PACKET_LEN argument. Support
10758 qXfer:spu:read and qXfer:spu:write packets.
10759 (main): Pass packet_len to handle_query.
10760 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10761 * target.h (target_ops): Add qxfer_spu.
10762
374c1d38
UW
107632007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10764
10765 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10766 accessing non-seekable spufs files.
10767
bb63802a
UW
107682007-05-16 Markus Deuling <deuling@de.ibm.com>
10769
889bf7c5 10770 * server.c (handle_query): Add reply for qC packet.
bb63802a 10771
7390519e
PA
107722007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10773 Leo Zayas <lerele@champenstudios@com>
10774
10775 * server.h (check_remote_input_interrupt_request): New function.
10776 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10777 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10778 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10779 (check_remote_input_interrupt_request): New function.
10780 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10781 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10782 winapi_GenerateConsoleCtrlEvent): New typedefs.
10783 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10784 to 250 ms.
10785 (win32_wait): Check for remote interrupt request
10786 with check_remote_input_interrupt_request.
10787 (win32_request_interrupt): New function.
10788 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10789
34b34921
PA
107902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10791
10792 * win32-low.c (debug_registers_changed,
10793 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10794 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10795 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10796 (thread_rec): Get context using the low target.
10797 (child_add_thread): Call thread_added on the low target,
10798 which does the same thing.
10799 (regptr): Delete.
10800 (do_initial_child_stuff): Remove debug registers references.
10801 Set context using the low target. Resume threads after
10802 setting the contexts.
10803 (child_continue): Remove dead variable. Remove debug
10804 registers references.
10805 (child_fetch_inferior_registers): Go through the low target.
10806 (do_child_store_inferior_registers): Remove.
10807 (child_store_inferior_registers): Go through the low target.
10808 (win32_resume): Remove debug registers references.
10809 Set context using the low target.
10810 (handle_exception): Change return type to void. Don't record
10811 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10812 first chance exception.
889bf7c5 10813 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10814 goto loop. Always return after waiting for debug event.
10815 (win32_wait): Convert to switch statement. Handle spurious
10816 events.
10817
10818 * win32-i386-low.c (debug_registers_changed,
10819 debug_registers_used): New.
10820 (initial_stuff): Rename to ...
10821 (i386_initial_stuff): ... this. Clear debug registers
10822 state variables.
10823 (store_debug_registers): Delete.
10824 (i386_get_thread_context): New.
10825 (load_debug_registers): Delete.
10826 (i386_set_thread_context): New.
10827 (i386_thread_added): New.
10828 (single_step): Rename to ...
10829 (i386_single_step): ... this.
10830 (do_fetch_inferior_registers): Rename to ...
10831 (i386_fetch_inferior_register): ... this.
10832 (i386_store_inferior_register): New.
10833 (the_low_target): Adapt to new interface.
10834
10835 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10836 (arm_get_thread_context): New.
10837 (arm_set_thread_context): New.
10838 (regptr): New.
10839 (do_fetch_inferior_registers): Rename to ...
10840 (arm_fetch_inferior_register): ... this.
10841 (arm_store_inferior_register): New.
10842 (arm_wince_breakpoint): Reimplement as unsigned long.
10843 (arm_wince_breakpoint_len): Define.
10844 (the_low_target): Adapt to new interface.
10845
10846 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10847 load_debug_registers. Add get_thread_context, set_thread_context,
10848 thread_added and store_inferior_register. Rename
10849 fetch_inferior_registers to fetch_inferior_register.
10850 (regptr): Remove declaration.
10851
dd6953e1
PA
108522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10853
10854 * linux-low.c (linux_detach): Change return type to int. Return 0.
10855 * spu-low.c (spu_detach): Likewise.
10856
444d6139
PA
108572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10858
10859 * target.h (target_ops): Change return type of detach to int.
10860 Add join.
10861 (join_inferior): New.
10862 * server.c (main): Don't skip detach support on mingw32.
10863 If the inferior doesn't support detaching return error.
10864 Call join_inferior instead of using waitpid.
10865 * linux-low.c (linux_join): New.
10866 (linux_target_op): Add linux_join.
10867 * spu-low.c (spu_join): New.
10868 (spu_target_ops): Add spu_join.
10869 * win32-low.c (win32_detach): Adapt to new interface.
10870 Reopen current_process_handle before detaching. Issue a child
10871 resume before detaching.
10872 (win32_join): New.
10873 (win32_target_op): Add win32_join.
10874
1d5315fe
PA
108752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10876
10877 * win32-low.c (win32-attach): Fix return value.
10878 * target.h (target_ops): Describe ATTACH return values.
10879
bf914831
PA
108802007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10881
10882 * win32-low.c (GETPROCADDRESS): Define.
10883 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10884 (winapi_DebugSetProcessKillOnExit): Likewise.
10885 (win32_create_inferior): Force usage of ansi CreateProcessA.
10886 (win32_attach): Use GETPROCADDRESS.
10887 (win32_detach): Likewise.
10888
f72f3e60
PA
108892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10890
10891 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10892
ed50f18f
PA
108932007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10894
10895 * win32-low.c: Commit leftover changes from 2007-03-29.
10896
0c2ead7e
DJ
108972007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10898
10899 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10900 fields short instead of int. Add explicit padding.
10901 (i387_cache_to_fsave): Remove unnecessary casts.
10902 (i387_fsave_to_cache): Doc fix.
10903 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10904
73725ff3
DJ
109052007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10906
10907 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10908 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10909
d99f33d8
PA
109102007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10911
10912 * configure.srv (arm*-*-mingw32ce*): Move near the other
10913 arm targets.
10914
68070c10
PA
109152007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10916
2482afc6 10917 * configure.ac: Add errno checking.
68070c10
PA
10918 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10919 sys/file.h and malloc.h.
10920 (AC_CHECK_DECLS): Add perror.
10921 (srv_mingwce): Handle.
2482afc6 10922 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10923 win32-i386-low.o to srv_tgtobj.
10924 (i[34567]86-*-mingw*): Likewise.
10925 (arm*-*-mingw32ce*): Add case.
10926 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10927 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10928 [__MINGW32CE__] (strerror): New function.
10929 [__MINGW32CE__] (errno): Define to GetLastError.
10930 [__MINGW32CE__] (COUNTOF): New macro.
10931 (remote_open): Remove extra close call.
10932 * mem-break.c (delete_breakpoint_at): New function.
10933 * mem-break.h (delete_breakpoint_at): Declare.
10934 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10935 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10936 [USE_WIN32API] (read, write): Add char* casts.
10937 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10938 * server.h: Include wincecompat.h on Windows CE.
10939 [HAVE_ERRNO_H]: Check.
10940 (perror): Declare if not declared.
10941 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10942 (perror_with_name): Remove errno declaration.
10943 * wincecompat.h: New.
10944 * wincecompat.c: New.
10945 * win32-low.h: New.
10946 * win32-arm-low.c: New.
10947 * win32-i386-low.c: New.
10948 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10949 (OUTMSG2): Make it safe.
10950 (_T): New macro.
10951 (COUNTOF): New macro.
10952 (NUM_REGS): Get it from the low target.
10953 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10954 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10955 (thread_rec): Let low target handle debug registers.
10956 (child_add_thread): Likewise.
10957 (child_init_thread_list): Likewise.
10958 (continue_one_thread): Likewise.
10959 (regptr): New.
10960 (do_child_fetch_inferior_registers): Move to ...
10961 * win32-i386-low.c: ... here, and rename to ...
10962 (do_fetch_inferior_registers): ... this.
889bf7c5 10963 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10964 Go through the low target.
10965 (do_child_store_inferior_registers): Use regptr.
10966 (strwinerror): New function.
10967 (win32_create_inferior): Handle Windows CE.
10968 Use strwinerror instead of strerror on Windows error
10969 codes. Add program to the error output.
10970 Don't close the main thread handle on Windows CE.
10971 (win32_attach): Use coredll.dll on Windows CE.
10972 (win32_kill): Close current process and current
10973 thread handles.
10974 (win32_detach): Use coredll.dll on Windows CE.
10975 (win32_resume): Let low target handle debug registers, and
10976 step request.
10977 (handle_exception): Add/Remove initial breakpoint. Avoid
10978 non-existant WSTOPSIG on Windows CE.
10979 (win32_read_inferior_memory): Cast to remove warning.
10980 (win32_arch_string): Go through the low target.
10981 (initialize_low): Call set_breakpoint_data with the low
10982 target's breakpoint.
10983 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10984 FOP_REGNUM, mappings): Move to ...
10985 * win32-i386-low.c: ... here.
10986 * win32-low.c (win32_thread_info): Move to ...
10987 * win32-low.h: ... here.
10988 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10989 win32-arm-low.c and wincecompat.c.
10990 (all:): Add $EXEEXT.
10991 (install-only:): Likewise.
10992 (gdbserver:): Likewise.
10993 (gdbreplay:): Likewise.
10994 * config.in: Regenerate.
10995 * configure: Regenerate.
10996
41093d81
PA
109972007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10998
10999 * win32-low.c: Rename typedef thread_info to
11000 win32_thread_info throughout.
11001
544afa54
PA
110022007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11003
11004 * win32-i386-low.c: Rename to ...
11005 * win32-low.c: ... this.
11006 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11007 * Makefile.in: Likewise.
11008
bce7165d
PA
110092007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11010
11011 * remote-utils.c (monitor_output): Constify msg parameter.
11012 * server.h (monitor_output): Likewise.
11013 * win32-i386-low.c (handle_output_debug_string): New.
11014 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11015 handle_output_debug_string.
11016 (get_child_debug_event): Likewise.
11017
506c7aa0
DJ
110182007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11019
11020 * server.c (main): Correct strtoul check.
11021
42c81e2a
DJ
110222007-03-27 Jon Ringle <jon@ringle.org>
11023
11024 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11025
9453113a
DJ
110262007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11027
11028 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11029
64a69107
DJ
110302007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11031
11032 * terminal.h: Check HAVE_SGTTY_H.
11033
110342007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11035
11036 * remote-utils.c (remote_open): Print out the assigned port number.
11037
c74d0ad8
DJ
110382007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11039
11040 * remote-utils.c (monitor_output): New function.
11041 * server.c (debug_threads): Define here.
11042 (monitor_show_help): New function.
11043 (handle_query): Handle qRcmd.
11044 (main): Do not handle 'd' packet.
11045 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11046 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11047 of debug_threads.
11048
de7c3b4a
PA
110492007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11050
11051 * Makefile.in (EXEEXT): New.
11052 (clean): Use $(EXEEXT).
11053
ef57601b
PA
110542007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11055
11056 * target.h (target_ops): Rename send_signal to request_interrupt,
11057 and remove enum target_signal parameter.
11058 * linux-low.c (linux_request_interrupt): Rename from
11059 linux_send_signal, and always send SIGINT.
11060 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11061 and always send SIGINT.
11062 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11063 of send_signal.
11064 (input_interrupt): Likewise.
11065
820f2bda
PA
110662007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11067
11068 * server.c (get_features_xml): Check if target implemented
11069 arch_string.
11070 * win32-i386-low.c (win32_arch_string): New.
11071 (win32_target_ops): Add win32_arch_string as arch_string member.
11072
ab39bf24
UW
110732007-02-22 Markus Deuling <deuling@de.ibm.com>
11074
11075 * spu-low.c (spu_arch_string): New.
11076 (spu_target_ops): Add spu_arch_string.
11077
61ff6e04
DJ
110782007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11079
11080 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11081 * configure.ac: Do not check for terminal.h.
11082 * configure, config.in: Regenerated.
11083
fb1e4ffc
DJ
110842007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11085
11086 * Makefile.in (OBS): Add $(XML_BUILTIN).
11087 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11088 (clean): Update.
11089 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11090 (arm-with-iwmmxt.c): New.
11091 * config.in, configure: Regenerate.
11092 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11093 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11094 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11095 (arm*-*-linux*): Add iWMMXt and regset support.
11096 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11097 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11098 (arm_store_wmmxregset, target_regsets): New.
11099 * server.c (get_features_xml): Take annex argument. Check builtin
11100 XML documents.
11101 (handle_query): Handle multiple annexes.
11102
0f48aa01
DJ
111032007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11104
11105 * remote-utils.c [USE_WIN32API] (read, write): Define.
11106 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11107 write.
11108
23181151
DJ
111092007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11110
11111 * linux-i386-low.c (the_low_target): Set arch_string.
11112 * linux-x86-64-low.c (the_low_target): Likewise.
11113 * linux-low.c (linux_arch_string): New.
11114 (linux_target_ops): Add it.
11115 * linux-low.h (struct linux_target_ops): Add arch_string.
11116 * server.c (write_qxfer_response): Use const void * for DATA.
11117 (get_features_xml): New.
11118 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11119 * target.h (struct target_ops): Add arch_string method.
11120
9d606399
DJ
111212007-01-03 Denis Pilat <denis.pilat@st.com>
11122 Daniel Jacobowitz <dan@codesourcery.com>
11123
11124 * linux-low.c (linux_kill): Handle being called with no threads.
11125 * win32-i386-low.c (win32_kill): Likewise.
11126 (get_child_debug_event): Clear current_process_handle.
11127
111282006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11129 Daniel Jacobowitz <dan@codesourcery.com>
11130
11131 * remote-utils.c (remote_open): Check the type of specified
11132 serial port devices before opening them.
11133 * server.c (main): Kill the inferior if an error occurs during
11134 the first remote_open.
11135
a5e13d24
DJ
111362006-12-05 Markus Deuling <deuling@de.ibm.com>
11137
11138 * README: Update supported targets.
11139
186947f7
DJ
111402006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11141
11142 * Makefile.in (clean): Remove reg-mips64.c.
11143 (reg-mips64.c, reg-mips64.o): New rules.
11144 * configure.srv: Handle mips64. Include regset support for mips.
11145 * linux-mips-low.c (union mips_register): New.
11146 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11147 (mips_breakpoint, mips_breakpoint_at): Use int.
11148 (mips_collect_register, mips_supply_register)
11149 (mips_collect_register_32bit, mips_supply_register_32bit)
11150 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11151 (mips_store_fpregset, target_regsets): New.
11152 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11153
a13e2c95
UW
111542006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11155
11156 * configure.srv: Add target "spu*-*-*".
11157 * Makefile.in (clean): Remove reg-spu.c.
11158 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11159 * spu-low.c: New file.
11160
cb7283db
DJ
111612006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11162
11163 * configure.ac: Correct td_thr_tls_get_addr test.
11164 * configure: Regenerated.
11165
89be2091
DJ
111662006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11167
11168 * linux-low.c (linux_wait_for_event): Reformat. Use the
11169 pass_signals array.
11170 * remote-utils.c (decode_address_to_semicolon): New.
11171 * server.c (pass_signals, handle_general_set): New.
11172 (handle_query): Mention QPassSignals for qSupported.
11173 (main): Call handle_general_set.
11174 * server.h (pass_signals, decode_address_to_semicolon): New.
11175
000ef4f0
DJ
111762006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11177
11178 * server.c (handle_query): Correct error handling for read_auxv.
11179
b7149293
UW
111802005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11181
11182 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11183 and srv_linux_thread_db to yes.
11184 * linux-s390-low.c (s390_fill_gregset): New function.
11185 (target_regsets): Define data structure.
11186
dae5f5cf
DJ
111872006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11188
11189 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11190 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11191 * config.in, configure: Regenerated.
11192 * inferiors.c (gdb_id_to_thread): New function.
11193 (gdb_id_to_thread_id): Use it.
11194 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11195 * linux-low.h (struct process_info): Add th member.
11196 (thread_db_get_tls_address): New prototype.
11197 * remote-utils.c (decode_address): Make non-static.
11198 * server.c (handle_query): Handle qGetTLSAddr.
11199 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11200 * target.h (struct target_ops): Add get_tls_address.
11201 * thread-db.c (maybe_attach_thread): Save the thread handle.
11202 (thread_db_get_tls_address): New.
11203
32ca6d61
DJ
112042006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11205
11206 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11207 (linux_resume_one_process): Take a siginfo_t *. Update all
11208 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11209 (struct pending_signals): Add a siginfo_t.
11210 (linux_wait_for_process): Always set last_status.
11211 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11212 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11213 * linux-low.h (struct process_info): Add last_status.
11214
5ffff7c1
DJ
112152006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11216
11217 * remote-utils.c (try_rle): New function.
11218 (putpkt_binary): Use it.
11219
8695c747
DJ
112202006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11221
11222 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11223 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11224 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11225 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11226 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11227 point registers.
11228
290fadea
RS
112292006-08-08 Richard Sandiford <richard@codesourcery.com>
11230
11231 * server.c (terminal_fd): New variable.
11232 (old_foreground_pgrp): Likewise.
11233 (restore_old_foreground_pgrp): New function.
11234 (start_inferior): Record the terminal file descriptor in terminal_fd
11235 and its original foreground group in old_foreground_pgrp. Register
11236 restore_old_foreground_pgrp with atexit().
11237
9f2e1e63
DJ
112382006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11239
11240 * server.c (handle_query): Correct qPart to qXfer.
11241
b80864fb
DJ
112422006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11243
11244 * configure.ac: Check for more headers which are missing on
11245 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11246 * configure.srv: Add Cygwin and mingw32.
11247 * remote-utils.c: Don't include headers unconditionally which
11248 are missing on mingw32. Include <winsock.h> for mingw32.
11249 (remote_open): Adjust for mingw32 support. Flush
11250 standard error after writing to it.
11251 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11252 (unblock_async_io, enable_async_io, disable_async_io)
11253 (readchar, getpkt): Update for Winsock support.
11254 (prepare_resume_reply): Expect a protocol signal number.
11255 * server.c: Disable <sys/wait.h> on mingw32.
11256 (start_inferior): Adjust for mingw32 support. Flush
11257 standard error after writing to it.
11258 (attach_inferior): Likewise. Use protocol signal
11259 numbers.
11260 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11261 and names.
11262 * win32-i386-low.c: New file.
11263 * Makefile.in (XM_CLIBS): Set.
11264 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11265 (win32-i386-low.o): New dependency rule.
11266 * linux-low.c (linux_wait): Use target signal numbers.
11267 * target.h (struct target_ops): Doc fix.
11268 * server.h (target_signal_to_name): New prototype.
11269 * gdbreplay.c: Don't include headers unconditionally which
11270 are missing on mingw32. Include <winsock.h> for mingw32.
11271 (remote_close, remote_open): Adjust for Winsock support.
11272 * configure, config.in: Regenerated.
11273
0876f84a
DJ
112742006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11275
11276 * server.c (decode_xfer_read, write_qxfer_response): New.
11277 (handle_query): Take a packet length argument. Handle
11278 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11279 the qSupported response.
11280 (main): Update call to handle_query.
11281
01f9e8fa
DJ
112822006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11283
11284 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11285 (putpkt_binary): Renamed from putpkt and adjusted for binary
11286 data.
11287 (putpkt): New wrapper for putpkt_binary.
11288 (readchar): Don't mask off the high bit.
11289 (decode_X_packet): New function.
11290 * server.c (main): Call putpkt_binary if a handler sets the packet
11291 length. Save the length of the incoming packet. Handle 'X'.
11292 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11293
be2a5f71
DJ
112942006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11295
11296 * server.c (handle_query): Handle qSupported.
11297
ea025f5f
DJ
112982006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11299
11300 * remote-utils.c (all_symbols_looked_up): New variable.
11301 (look_up_one_symbol): Check it.
11302 * server.h (look_up_one_symbol): New declaration.
11303 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11304
9308fc88
DJ
113052006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11306
11307 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11308 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11309 (PTRACE_GET_THREAD_AREA): Define.
11310 (ps_get_thread_area): New function.
11311
52fb6437
NS
113122006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11313
11314 * configure.srv (m68k*-*-uclinux*): New target.
11315 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11316 (linux_resume_one_process): Remove extraneous cast.
11317 (linux_read_offsets): New.
11318 (linux_target_op): Add linux_read_offsets on mmuless systems.
11319 * server.c (handle_query): Add qOffsets logic.
11320 * target.h (struct target_ops): Add read_offsets.
11321
21b0f40c
DJ
113222006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11323
11324 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11325 (PTRACE_GET_THREAD_AREA): Define.
11326 (ps_get_thread_area): New function.
11327 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11328 (linux-x86-64-low.o): Update.
11329
0050a760
DJ
113302006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11331
11332 * configure.ac: Remove checks for prfpregset_t.
11333 * gdb_proc_service.h: New file.
11334 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11335 new "gdb_proc_service.h".
11336 * proc-service.c: Likewise.
11337 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11338 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11339 * Makefile.in (gdb_proc_service_h): Updated.
11340 * configure, config.in: Regenerated.
11341
b92a518e
DJ
113422006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11343
11344 * remote-utils.c (prepare_resume_reply): Move declaration
11345 of gdb_id_from_wait to the top of the block.
11346
545587ee
DJ
113472006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11348
11349 * linux-low.c (regsets_store_inferior_registers): Read the regset
11350 from the target before filling it.
11351
9db87ebd
DJ
113522006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11353
11354 * server.c (attach_inferior): Return SIGTRAP for a successful
11355 attach.
11356
dd24457d
DJ
113572006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11358
11359 * Makefile.in (OBS): Add version.o.
11360 (STAGESTUFF): Delete.
11361 (version.o): Add dependencies.
11362 (version.c): Replace rule.
11363 (clean): Remove version.c.
11364 * server.c (gdbserver_version): New.
11365 (gdbserver_usage): Use printf.
11366 (main): Handle --version and --help.
11367 * server.h (version, host_name): Add declarations.
11368
6f0f660e
EZ
113692005-12-23 Eli Zaretskii <eliz@gnu.org>
11370
889bf7c5
PA
11371 * linux-arm-low.c:
11372 * linux-arm-low.c:
11373 * inferiors.c:
11374 * i387-fp.h:
11375 * i387-fp.c:
11376 * gdbreplay.c:
11377 * regcache.c:
11378 * proc-service.c:
11379 * mem-break.h:
11380 * mem-break.c:
11381 * linux-x86-64-low.c:
11382 * linux-sh-low.c:
11383 * linux-s390-low.c:
11384 * linux-ppc64-low.c:
11385 * linux-ppc-low.c:
11386 * linux-mips-low.c:
11387 * linux-m68k-low.c:
11388 * linux-m32r-low.c:
11389 * linux-low.h:
11390 * linux-low.c:
11391 * linux-ia64-low.c:
11392 * linux-i386-low.c:
11393 * linux-crisv32-low.c:
11394 * thread-db.c:
11395 * terminal.h:
11396 * target.h:
11397 * target.c:
11398 * server.h:
11399 * server.c:
11400 * remote-utils.c:
11401 * regcache.h:
11402 * utils.c:
11403 * Makefile.in:
11404 * configure.ac:
6f0f660e
EZ
11405 * gdbserver.1: Add (C) after Copyright. Update the FSF
11406 address.
11407
9d1fb177
DJ
114082005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11409
11410 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11411 (arm_breakpoint_at): Recognize both breakpoints.
11412 (the_low_target): Use the correct breakpoint instruction.
11413
011a70c2
DJ
114142005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11415
11416 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11417 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11418 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11419 (the_low_target): Update.
11420
7fb85e41
AS
114212005-10-25 Andreas Schwab <schwab@suse.de>
11422
11423 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11424
11425 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11426 (ia64_num_regs): Reduce to 462.
11427
3db0444b
DJ
114282005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11429
11430 * acinclude.m4: Correct quoting.
11431 * aclocal.m4: Regenerated.
11432
11433 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11434 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11435 (thread_db_init): Call thread_db_err_str.
11436 * configure.ac: Check for TD_VERSION.
11437 * config.in, configure: Regenerated.
11438
bee0189a
DJ
114392005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11440
11441 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11442
e9d25b98
DJ
114432005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11444
11445 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11446 is not available. Define HAVE_PTRACE_GETREGS if it is.
11447 * config.in, configure: Regenerated.
11448 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11449 * linux-i386-low.c, linux-m68k-low.c: Update to use
11450 HAVE_PTRACE_GETREGS.
11451 * linux-low.c (regsets_fetch_inferior_registers)
11452 (regsets_store_inferior_registers): Only return 0 if we processed
11453 GENERAL_REGS.
11454 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11455 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11456
a06660f7
DJ
114572005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11458
11459 * inferiors.c (struct thread_info): Add gdb_id.
11460 (add_thread): Add gdb_id argument.
11461 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11462 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11463 calls to add_thread.
11464 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11465 * server.c (handle_query): Use thread_to_gdb_id.
11466 (handle_v_cont, main): Use gdb_id_to_thread_id.
11467 * server.h (add_thread): Update prototype.
11468 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11469 prototypes.
11470
5a1f5858
DJ
114712005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11472
11473 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11474 left-padded registers.
11475 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11476 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11477
e122f1f5
SE
114782005-07-01 Steve Ellcey <sje@cup.hp.com>
11479
11480 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11481 * configure: Regenerate.
11482 * config.in: Regenerate.
11483 * server.h (NEED_DECLARATION_STRERROR):
11484 Replace with !HAVE_DECL_STRERROR.
11485
d592fa2f
DJ
114862005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11487
11488 * linux-low.c (linux_wait, linux_send_signal): Don't test
11489 an unsigned long variable for > 0 if it could be MAX_ULONG.
11490 * server.c (myresume): Likewise.
11491 * target.c (set_desired_inferior): Likewise.
11492
ccbd4912
MK
114932005-06-13 Mark Kettenis <kettenis@gnu.org>
11494
11495 * configure.ac: Simplify and improve check for socklen_t.
11496 * configure, config.in: Regenerate.
11497
f450004a
DJ
114982005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11499
11500 * acconfig.h: Remove.
11501 * configure.ac: Add a test for socklen_t. Use three-argument
11502 AC_DEFINE throughout.
11503 * config.in: Regenerated using autoheader 2.59.
11504 * configure: Regenerated.
11505
11506 * gdbreplay.c (socklen_t): Provide a default.
11507 (remote_open): Use socklen_t.
11508 * remote-utils.c (socklen_t): Provide a default.
11509 (remote_open): Use socklen_t.
11510 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11511 unsigned char.
11512
11513 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11514 char for buffers.
11515 * linux-low.c (linux_read_memory, linux_write_memory)
11516 (linux_read_auxv): Likewise.
11517 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11518 (check_mem_write): Likewise.
11519 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11520 Likewise.
11521 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11522 (registers_from_string, register_data): Likewise.
11523 * server.c (handle_query, main): Likewise.
11524 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11525 (decode_M_packet): Likewise.
11526 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11527 * target.h (struct target_ops): Update read_memory, write_memory,
11528 and read_auxv.
11529 (read_inferior_memory, write_inferior_memory): Update.
11530 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11531 to unsigned char *.
11532 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11533 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11534 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11535 linux-s390-low.c, linux-sh-low.c: Update for changes in
11536 read_inferior_memory and the_low_target->breakpoint.
11537
eee84df1
DJ
115382005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11539
11540 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11541 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11542 * configure.srv: Add powerpc64-*-linux*.
11543 * linux-ppc64-low.c: New file.
11544
45b134e5
OF
115452005-05-23 Orjan Friberg <orjanf@axis.com>
11546
11547 * linux-cris-low.c: New file with support for CRIS.
11548 * linux-crisv32-low.c: Ditto for CRISv32.
11549 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11550 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11551 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11552 reg-crisv32.o, and reg-crisv32.c to make rules.
11553 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11554 recognized targets.
11555
48d93c75
UW
115562005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11557
11558 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11559 of sizeof (PTRACE_XFER_TYPE).
11560 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11561
e013ee27
OF
115622005-05-12 Orjan Friberg <orjanf@axis.com>
11563
889bf7c5 11564 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11565 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11566 pointers for hardware watchpoint support.
11567 * linux-low.h (struct linux_target_ops): Ditto.
11568 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11569 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11570 to linux_target_ops.
11571 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11572 reply packet.
11573 * server.c (main): Recognize 'Z' and 'z' packets.
11574
b0ded00b
UW
115752005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11576
11577 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11578 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11579 (the_low_target): Add new members.
11580
8643e2ad
DJ
115812005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11582
11583 * proc-service.c (ps_lgetregs): Search all_processes instead of
11584 all_threads.
11585
fc620387
DJ
115862005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11587
11588 * server.c (start_inferior): Change return type to int.
11589 (attach_inferior): Change sigptr to int *.
11590 (handle_v_cont, handle_v_requests): Change signal to int *.
11591 (main): Change signal to int.
11592
115932005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11594
11595 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11596 * configure.srv: Add m32r*-*-linux*.
11597 * linux-m32r-low.c: New file.
11598
e0e76420
DJ
115992005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11600
11601 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11602
a1928bad
DJ
116032005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11604
11605 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11606 Take unsigned long arguments for PIDs.
11607 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11608 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11609 (wait_for_sigstop, linux_resume_one_process)
11610 (regsets_fetch_inferior_registers, linux_send_signal)
11611 (linux_read_auxv): Likewise. Update the types of variables holding
11612 PIDs. Update format string specifiers.
11613 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11614 * remote-utils.c (prepare_resume_reply): Likewise.
11615 * server.c (cont_thread, general_thread, step_thread)
11616 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11617 unsigned long.
11618 (handle_query): Update format specifiers.
11619 (handle_v_cont, main): Use strtoul for thread IDs.
11620 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11621 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11622 (general_thread, step_thread, thread_from_wait)
11623 (old_thread_from_wait): Update.
11624 * target.h (struct thread_resume): Use unsigned long for THREAD.
11625 (struct target_ops): Use unsigned long for arguments to attach and
11626 thread_alive.
11627
dcdb98d2
DJ
116282005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11629
11630 * acinclude.m4: Include bfd/bfd.m4 directly.
11631 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11632 <agriffis@toolchain.org>.
11633 * aclocal.m4, configure: Regenerated.
11634
bec39cab
AC
116352005-01-07 Andrew Cagney <cagney@gnu.org>
11636
11637 * configure.ac: Rename configure.in, require autoconf 2.59.
11638 * configure: Re-generate.
11639
434c4c77
DJ
116402004-12-08 Daniel Jacobowitz <dan@debian.org>
11641
11642 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11643 LIBS when finished.
11644 * aclocal.m4: Regenerated.
11645 * configure: Regenerated.
11646
db1d3e1b
AS
116472004-11-21 Andreas Schwab <schwab@suse.de>
11648
11649 * linux-m68k-low.c (m68k_num_gregs): Define.
11650 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11651 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11652 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11653 (m68k_breakpoint_at): New. Add to the_low_target.
11654
11655 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11656 srv_linux_thread_db to yes.
11657
43360365
JB
116582004-10-20 Joel Brobecker <brobecker@gnat.com>
11659
11660 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11661 (ARCH_SET_FS): Likewise.
11662 (ARCH_GET_FS): Likewise.
11663 (ARCH_GET_GS): Likewise.
11664
fd500816
DJ
116652004-10-16 Daniel Jacobowitz <dan@debian.org>
11666
11667 * linux-i386-low.c (ps_get_thread_area): New.
11668 * linux-x86-64-low.c (ps_get_thread_area): New.
11669 * linux-low.c: Include <sys/syscall.h>.
11670 (linux_kill_one_process): Don't kill the first thread here.
11671 (linux_kill): Kill the first thread here.
11672 (kill_lwp): New function.
11673 (send_sigstop, linux_send_signal): Use it.
11674 * proc-service.c: Clean up #ifdefs.
11675 (fpregset_info): Delete.
11676 (ps_lgetregs): Update and enable implementation.
11677 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11678 implementations.
11679 * remote-utils.c (struct sym_cache, symbol_cache): New.
11680 (input_interrupt): Print a clearer message.
11681 (async_io_enabled): New variable.
11682 (enable_async_io, disable_async_io): Use it. Update comments.
11683 (look_up_one_symbol): Use the symbol cache.
11684 * thread-db.c (thread_db_look_up_symbols): New function.
11685 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11686
f6de3c42
DJ
116872004-10-16 Daniel Jacobowitz <dan@debian.org>
11688
11689 * configure.in: Test for -rdynamic.
11690 * configure: Regenerated.
11691 * Makefile (INTERNAL_LDFLAGS): New.
11692 (gdbserver, gdbreplay): Use it.
11693
2c0fc042
AC
116942004-09-02 Andrew Cagney <cagney@gnu.org>
11695
11696 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11697
075b3282
DJ
116982004-03-23 Daniel Jacobowitz <drow@mvista.com>
11699
11700 * linux-low.c (linux_wait): Clear all_processes list also.
11701
fa6a77dc
DJ
117022004-03-12 Daniel Jacobowitz <drow@mvista.com>
11703
11704 * linux-low.c: Include <errno.h>. Remove extern declaration of
11705 errno.
11706
6d782a97
DJ
117072004-03-12 Daniel Jacobowitz <drow@mvista.com>
11708
11709 * gdbreplay.c, server.h, utils.c: Update copyright years.
11710
3a7fb99b
DJ
117112004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11712
11713 * server.c (main): Print child status or termination signal from
11714 variable 'signal', not 'sig'.
11715
c3e735a6
DJ
117162004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11717
11718 * linux-low.c (linux_read_memory): Change return type to
11719 int. Check for and return error from ptrace().
11720 * target.c (read_inferior_memory): Change return type to int. Pass
11721 back return status from the_target->read_memory().
11722 * target.h (struct target_ops): Adapt *read_memory() prototype.
11723 Update comment.
11724 (read_inferior_memory): Adapt prototype.
11725 * server.c (main): Return an error packet if
11726 read_inferior_memory() returns an error.
11727
a59d1c82
DJ
117282004-03-04 Daniel Jacobowitz <drow@mvista.com>
11729
11730 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11731 Unify with other clean targets.
11732
dc3f8883
DJ
117332004-02-29 Daniel Jacobowitz <drow@mvista.com>
11734
11735 * server.c (handle_v_cont): Call set_desired_inferior.
11736
89a208da
DJ
117372004-02-29 Daniel Jacobowitz <drow@mvista.com>
11738
11739 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11740
62ea82f5
DJ
117412004-02-29 Daniel Jacobowitz <drow@mvista.com>
11742
11743 * linux-low.c (linux_wait): Unblock async I/O.
11744 (linux_resume): Block and enable async I/O.
11745 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11746 * server.h (block_async_io, unblock_async_io): Add prototypes.
11747
6910d122
DJ
117482004-02-29 Daniel Jacobowitz <drow@mvista.com>
11749
11750 * remote-utils.c (remote_open): Print a status notice after
11751 opening a TCP port.
11752 * server.c (attach_inferior): Print a status notice after
11753 attaching.
11754
117552004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
11756
11757 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11758
c89dc5d4
DJ
117592004-02-26 Daniel Jacobowitz <drow@mvista.com>
11760
11761 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11762 error packet.
11763 * server.c, target.h: Update copyright years.
11764
4b8dad4a
RM
117652004-02-25 Roland McGrath <roland@redhat.com>
11766
11767 * target.h (struct target_ops): New member `read_auxv'.
11768 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11769 * linux-low.c (linux_read_auxv): New function.
11770 (linux_target_ops): Initialize `read_auxv' member to that.
11771
d7446758
JB
117722004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11773
11774 Committed by Jim Blandy <jimb@redhat.com>.
11775
11776 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11777 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11778 instead of GPR_SIZE to distiguish s390 and s390x targets.
11779
5544ad89
DJ
117802004-01-31 Daniel Jacobowitz <drow@mvista.com>
11781
11782 * linux-low.c: Update copyright year.
11783 (check_removed_breakpoint): Clear pending_is_breakpoint.
11784 (linux_set_resume_request, linux_queue_one_thread)
11785 (resume_status_pending_p): New functions.
11786 (linux_continue_one_thread): Use process->resume.
11787 (linux_resume): Only resume threads if there are no pending events.
11788 * linux-low.h (struct process_info): Add resume request
11789 pointer.
11790
2a68b70e
DJ
117912004-01-30 Daniel Jacobowitz <drow@mvista.com>
11792
11793 * regcache.c (new_register_cache): Clear the allocated register
11794 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11795
64386c31
DJ
117962003-10-13 Daniel Jacobowitz <drow@mvista.com>
11797
11798 * linux-low.c (linux_resume): Take a struct thread_resume *
11799 argument.
11800 (linux_wait): Update call.
11801 (resume_ptr): New static variable.
11802 (linux_continue_one_thread): Renamed from
11803 linux_continue_one_process. Use resume_ptr.
11804 (linux_resume): Use linux_continue_one_thread.
11805 * server.c (handle_v_cont, handle_v_requests): New functions.
11806 (myresume): New function.
11807 (main): Handle 'v' case.
11808 * target.h (struct thread_resume): New type.
11809 (struct target_ops): Change argument of "resume" to struct
11810 thread_resume *.
11811 (myresume): Delete macro.
11812
c938e9b0
L
118132003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11814
11815 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11816 (uninstall): Support DESTDIR.
11817
7f313d07
BC
11818Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11819
11820 * configure.srv: Add xscale*linux copy of arm*linux entry.
11821
3b2fc2ea
DJ
118222003-07-24 Daniel Jacobowitz <drow@mvista.com>
11823
11824 * linux-arm-low.c (arm_reinsert_addr): New function.
11825 (the_low_target): Add arm_reinsert_addr.
11826
1c0a559e
MK
118272003-07-08 Mark Kettenis <kettenis@gnu.org>
11828
11829 * mem-break.c: Remove whitespace at end of file.
11830
43d5792c
DJ
118312003-06-28 Daniel Jacobowitz <drow@mvista.com>
11832
11833 * configure.in: Check whether we need to prototype strerror.
11834 * server.h: Optionally prototype strerror.
11835 * gdbreplay.c (perror_with_name): Use strerror.
11836 * linux-low.c (linux_attach_lwp): Use strerror.
11837 * utils.c (perror_with_name): Use strerror.
11838 * config.in, configure: Regenerated.
11839
c8a86edf
DJ
118402003-06-28 Daniel Jacobowitz <drow@mvista.com>
11841
11842 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11843 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11844
73d37363
DJ
118452003-06-20 Daniel Jacobowitz <drow@mvista.com>
11846
11847 * Makefile.in (SFILES): Update.
11848 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11849 low-sun3.c: Remove files.
11850
6ad8ae5c
DJ
118512003-06-17 Daniel Jacobowitz <drow@mvista.com>
11852
11853 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11854 (linux_detach_one_process, linux_detach): New functions.
11855 (linux_target_ops): Add linux_detach.
11856 * server.c (main): Handle 'D' packet.
11857 * target.h (struct target_ops): Add "detach" member.
11858 (detach_inferior): Define.
11859
1581182a
MK
118602003-06-13 Mark Kettenis <kettenis@gnu.org>
11861
11862 From Kelley Cook <kelleycook@wideopenwest.com>:
11863 * configure.srv: Accept i[34567]86 variants.
11864
e5379b03
DJ
118652003-06-05 Daniel Jacobowitz <drow@mvista.com>
11866
11867 * linux-low.c (linux_wait_for_event): Correct comment typos.
11868 (linux_resume_one_process): Call check_removed_breakpoint.
11869 (linux_send_signal): New function.
11870 (linux_target_ops): Add linux_send_signal.
11871 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11872 of kill.
11873 * target.h (struct target_ops): Add send_signal.
11874
2ff29de4
JB
118752003-05-29 Jim Blandy <jimb@redhat.com>
11876
11877 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11878 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11879 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11880 away part of the register's value.
11881
254787d4
DJ
118822003-03-26 Daniel Jacobowitz <drow@mvista.com>
11883
11884 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11885 (linux_wait_for_event, linux_init_signals): Likewise.
11886
94e10508
DJ
118872003-03-17 Daniel Jacobowitz <drow@mvista.com>
11888
11889 * configure.in: Check for stdlib.h.
11890 * configure: Regenerated.
11891 * config.in: Regenerated.
11892
4c0711e0
DJ
118932003-01-04 Andreas Schwab <schwab@suse.de>
11894
11895 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11896
ef66e766
AC
118972003-01-02 Andrew Cagney <ac131313@redhat.com>
11898
11899 * Makefile.in: Remove obsolete code.
11900
a1358604
DJ
119012002-11-20 Daniel Jacobowitz <drow@mvista.com>
11902
11903 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11904 defined(PT_FPR0_HI).
11905
23ce3b1c
DJ
119062002-11-17 Stuart Hughes <seh@zee2.com>
11907
11908 * linux-arm-low.c (arm_num_regs): Increase.
11909 (arm_regmap): Include status register.
11910
119112002-11-17 Daniel Jacobowitz <drow@mvista.com>
11912
11913 * linux-low.c (register_addr): Remove incorrect -1 check.
11914
a9fa9f7d
DJ
119152002-08-29 Daniel Jacobowitz <drow@mvista.com>
11916
11917 * linux-low.c (linux_create_inferior): Call setpgid. Return
11918 the new PID.
11919 (unstopped_p, linux_signal_pid): Remove.
11920 (linux_target_ops): Remove linux_signal_pid.
11921 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11922 global instead of target method.
11923 * target.h (struct target_ops): Remove signal_pid. Update comment
11924 for create_inferior.
11925 * server.c (signal_pid): New variable.
11926 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11927 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11928 (attach_inferior): Set signal_pid.
11929
17574093
DJ
119302002-08-23 Daniel Jacobowitz <drow@mvista.com>
11931
11932 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11933
119342002-08-20 Jim Blandy <jimb@redhat.com>
11935
11936 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11937 default for this.
11938
119392002-08-01 Andrew Cagney <cagney@redhat.com>
11940
11941 * Makefile.in: Make chill references obsolete.
11942
119432002-07-24 Kevin Buettner <kevinb@redhat.com>
11944
11945 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11946 * configure: Regenerate.
11947 * config.in: Regenerate.
11948
119492002-07-09 David O'Brien <obrien@FreeBSD.org>
11950
11951 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11952 (perror_with_name, remote_close, remote_open, expect, play): Static.
11953
119542002-07-04 Michal Ludvig <mludvig@suse.cz>
11955
4b8dad4a 11956 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11957 byte offsets instead of an array of indexes.
11958 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11959
119602002-06-13 Daniel Jacobowitz <drow@mvista.com>
11961
11962 * regcache.c: Add comment.
11963
119642002-06-11 Daniel Jacobowitz <drow@mvista.com>
11965
11966 * thread-db.c: New file.
11967 * proc-service.c: New file.
11968 * acinclude.m4: New file.
11969 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11970 proc-service.o, and thread-db.o.
11971 (linux-low.o): Add USE_THREAD_DB.
11972 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11973 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11974 * aclocal.m4: Regenerated.
11975 * config.in: Regenerated.
11976 * configure: Regenerated.
11977 * configure.in: Check for proc_service.h, sys/procfs.h,
11978 thread_db.h, and linux/elf.h headrs.
11979 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11980 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11981 Check for -lthread_db and thread support.
11982 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11983 PowerPC, and SuperH.
11984 * i387-fp.c: Constify arguments.
11985 * i387-fp.h: Likewise.
11986 * inferiors.c: (struct thread_info): Renamed from
11987 `struct inferior_info'. Remove PID member. Use generic inferior
11988 list header. All uses updated.
11989 (inferiors, signal_pid): Removed.
11990 (all_threads): New variable.
11991 (get_thread): Define.
11992 (add_inferior_to_list): New function.
11993 (for_each_inferior): New function.
11994 (change_inferior_id): New function.
11995 (add_inferior): Removed.
11996 (remove_inferior): New function.
11997 (add_thread): New function.
11998 (free_one_thread): New function.
11999 (remove_thread): New function.
12000 (clear_inferiors): Use for_each_inferior and free_one_thread.
12001 (find_inferior): New function.
12002 (find_inferior_id): New function.
12003 (inferior_target_data): Update argument type.
12004 (set_inferior_target_data): Likewise.
12005 (inferior_regcache_data): Likewise.
12006 (set_inferior_regcache_data): Likewise.
12007 * linux-low.c (linux_bp_reinsert): Remove.
12008 (all_processes, stopping_threads, using_thrads)
12009 (struct pending_signals, debug_threads, pid_of): New.
12010 (inferior_pid): Replace with macro.
12011 (struct inferior_linux_data): Remove.
12012 (get_stop_pc, add_process): New functions.
12013 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12014 Use add_process and add_thread.
12015 (linux_attach_lwp): New function, based on old linux_attach. Use
12016 add_process and add_thread. Set stop_expected for new threads.
12017 (linux_attach): New function.
12018 (linux_kill_one_process): New function.
12019 (linux_kill): Kill all LWPs.
12020 (linux_thread_alive): Use find_inferior_id.
12021 (check_removed_breakpoints, status_pending_p): New functions.
12022 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12023 Update. Use WNOHANG. Wait for cloned processes also. Update process
12024 struct for the found process.
12025 (linux_wait_for_event): New function.
12026 (linux_wait): Use it. Support LWPs.
12027 (send_sigstop, wait_for_sigstop, stop_all_processes)
12028 (linux_resume_one_process, linux_continue_one_process): New functions.
12029 (linux_resume): Support LWPs.
12030 (REGISTER_RAW_SIZE): Remove.
12031 (fetch_register): Use register_size instead. Call supply_register.
12032 (usr_store_inferior_registers): Likewise. Call collect_register.
12033 Fix recursive case.
12034 (regsets_fetch_inferior_registers): Improve error message.
12035 (regsets_store_inferior_registers): Add debugging.
12036 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12037 (unstopped_p, linux_signal_pid): New functions.
12038 (linux_target_ops): Add linux_signal_pid.
12039 (linux_init_signals): New function.
12040 (initialize_low): Call it. Initialize using_threads.
12041 * regcache.c (inferior_regcache_data): Add valid
12042 flag.
12043 (get_regcache): Fetch registers lazily. Add fetch argument
12044 and update all callers.
12045 (regcache_invalidate_one, regcache_invalidate): New
12046 functions.
12047 (new_register_cache): Renamed from create_register_cache.
12048 Return the new regcache.
12049 (free_register_cache): Change argument to a void *.
12050 (registers_to_string, registers_from_string): Call get_regcache
12051 with fetch flag set.
12052 (register_data): Make static. Pass fetch flag to get_regcache.
12053 (supply_register): Call get_regcache with fetch flag clear.
12054 (collect_register): Call get_regcache with fetch flag set.
12055 (collect_register_as_string): New function.
12056 * regcache.h: Update.
12057 * remote-utils.c (putpkt): Flush after debug output and use
12058 stderr.
12059 Handle input interrupts while waiting for an ACK.
12060 (input_interrupt): Use signal_pid method.
12061 (getpkt): Flush after debug output and use stderr.
12062 (outreg): Use collect_register_as_string.
12063 (new_thread_notify, dead_thread_notify): New functions.
12064 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12065 and general_thread.
12066 (look_up_one_symbol): Flush after debug output.
12067 * server.c (step_thread, server_waiting): New variables.
12068 (start_inferior): Don't use signal_pid. Update call to mywait.
12069 (attach_inferior): Update call to mywait.
12070 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12071 (main): Don't fetch/store registers explicitly. Use
12072 set_desired_inferior. Support proposed ``Hs'' packet. Update
12073 calls to mywait.
12074 * server.h: Update.
12075 (struct inferior_list, struct_inferior_list_entry): New.
12076 * target.c (set_desired_inferior): New.
12077 (write_inferior_memory): Constify.
12078 (mywait): New function.
12079 * target.h: Update.
12080 (struct target_ops): New signal_pid method.
12081 (mywait): Removed macro, added prototype.
12082
12083 * linux-low.h (regset_func): Removed.
12084 (regset_fill_func, regset_store_func): New.
12085 (enum regset_type): New.
12086 (struct regset_info): Add type field. Use new operation types.
12087 (struct linux_target_ops): stop_pc renamed to get_pc.
12088 Add decr_pc_after_break and breakpoint_at.
12089 (get_process, get_thread_proess, get_process_thread)
12090 (strut process_info, all_processes, linux_attach_lwp)
12091 (thread_db_init): New.
12092
12093 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12094 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12095 (the_low_target): Add new members.
12096 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12097 (i386_store_fpxregset): Constify.
12098 (target_regsets): Add new kind identifier.
12099 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12100 (i386_set_pc): Add debugging.
12101 (i386_breakpoint_at): New function.
12102 (the_low_target): Add new members.
12103 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12104 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12105 (mips_breakpoint_at): New.
12106 (the_low_target): Add new members.
12107 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12108 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12109 (the_low_target): Add new members.
12110 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12111 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12112 (the_low_target): Add new members.
12113 * linux-x86-64-low.c (target_regsets): Add new kind
12114 identifier.
12115
121162002-05-15 Daniel Jacobowitz <drow@mvista.com>
12117
12118 From Martin Pool <mbp@samba.org>:
12119 * server.c (gdbserver_usage): New function.
12120 (main): Call it.
12121
121222002-05-14 Daniel Jacobowitz <drow@mvista.com>
12123
12124 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12125 stop_at -> stop_pc.
12126
121272002-05-04 Andrew Cagney <ac131313@redhat.com>
12128
12129 * Makefile.in: Remove obsolete code.
12130
121312002-04-24 Michal Ludvig <mludvig@suse.cz>
12132
12133 * linux-low.c (regsets_fetch_inferior_registers),
12134 (regsets_store_inferior_registers): Removed cast to int from
12135 ptrace() calls.
12136 * regcache.h: Added declaration of struct inferior_info.
12137
121382002-04-20 Daniel Jacobowitz <drow@mvista.com>
12139
12140 * inferiors.c (struct inferior_info): Add regcache_data.
12141 (add_inferior): Call create_register_cache.
12142 (clear_inferiors): Call free_register_cache.
12143 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12144 * regcache.c (struct inferior_regcache_data): New.
12145 (registers): Remove.
12146 (get_regcache): New function.
12147 (create_register_cache, free_register_cache): New functions.
12148 (set_register_cache): Don't initialize the register cache here.
12149 (registers_to_string, registers_from_string, register_data): Call
12150 get_regcache.
12151 * regcache.h: Add prototypes.
12152 * server.h: Likewise.
12153
121542002-04-20 Daniel Jacobowitz <drow@mvista.com>
12155
12156 * mem-break.c: New file.
12157 * mem-break.h: New file.
12158 * Makefile.in: Add mem-break.o rule; update server.h
12159 dependencies.
12160 * inferiors.c (struct inferior_info): Add target_data
12161 member.
12162 (clear_inferiors): Free target_data member if set.
12163 (inferior_target_data, set_inferior_target_data): New functions.
12164 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12165 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12166 * linux-low.c (linux_bp_reinsert): New variable.
12167 (struct inferior_linux_data): New.
12168 (linux_create_inferior): Use set_inferior_target_data.
12169 (linux_attach): Likewise. Call add_inferior.
12170 (linux_wait_for_one_inferior): New function.
12171 (linux_wait): Call it.
12172 (linux_write_memory): Add const.
12173 (initialize_low): Call set_breakpoint_data.
12174 * linux-low.h (struct linux_target_ops): Add breakpoint
12175 handling members.
12176 * server.c (attach_inferior): Remove extra add_inferior
12177 call.
12178 * server.h: Include mem-break.h. Update inferior.c
12179 prototypes.
12180 * target.c (read_inferior_memory)
12181 (write_inferior_memory): New functions.
12182 * target.h (read_inferior_memory)
12183 (write_inferior_memory): Change macros to prototypes.
12184 (struct target_ops): Update comments. Add const to write_memory
12185 definition.
12186
121872002-04-11 Daniel Jacobowitz <drow@mvista.com>
12188
12189 * linux-low.c (usr_store_inferior_registers): Support
12190 registers which are allowed to fail to store.
12191 * linux-low.h (linux_target_ops): Likewise.
12192 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12193 (ppc_cannot_store_register): FPSCR may not be storable.
12194
121952002-04-09 Daniel Jacobowitz <drow@mvista.com>
12196
12197 * server.h: Include <string.h> if HAVE_STRING_H.
12198 * ChangeLog: Correct paths in last ChangeLog entry.
12199
122002002-04-09 Daniel Jacobowitz <drow@mvista.com>
12201
12202 * linux-low.h: Remove obsolete prototypes.
12203 (struct linux_target_ops): New.
12204 (extern the_low_target): New.
12205 * linux-low.c (num_regs, regmap): Remove declarations.
12206 (register_addr): Use the_low_target explicitly.
12207 (fetch_register): Likewise.
12208 (usr_fetch_inferior_registers): Likewise.
12209 (usr_store_inferior_registers): Likewise.
12210 * linux-arm-low.c (num_regs): Remove.
12211 (arm_num_regs): Define.
12212 (arm_regmap): Renamed from regmap, made static.
12213 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12214 made static.
12215 (arm_cannot_store_register): Renamed from cannot_store_register,
12216 made static.
12217 (the_low_target): New.
12218 * linux-i386-low.c (num_regs): Remove.
12219 (i386_num_regs): Define.
12220 (i386_regmap): Renamed from regmap, made static.
12221 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12222 made static.
12223 (i386_cannot_store_register): Renamed from cannot_store_register,
12224 made static.
12225 (the_low_target): New.
12226 * linux-ia64-low.c (num_regs): Remove.
12227 (ia64_num_regs): Define.
12228 (ia64_regmap): Renamed from regmap, made static.
12229 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12230 made static.
12231 (ia64_cannot_store_register): Renamed from cannot_store_register,
12232 made static.
12233 (the_low_target): New.
12234 * linux-m68k-low.c (num_regs): Remove.
12235 (m68k_num_regs): Define.
12236 (m68k_regmap): Renamed from regmap, made static.
12237 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12238 made static.
12239 (m68k_cannot_store_register): Renamed from cannot_store_register,
12240 made static.
12241 (the_low_target): New.
12242 * linux-mips-low.c (num_regs): Remove.
12243 (mips_num_regs): Define.
12244 (mips_regmap): Renamed from regmap, made static.
12245 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12246 made static.
12247 (mips_cannot_store_register): Renamed from cannot_store_register,
12248 made static.
12249 (the_low_target): New.
12250 * linux-ppc-low.c (num_regs): Remove.
12251 (ppc_num_regs): Define.
12252 (ppc_regmap): Renamed from regmap, made static.
12253 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12254 made static.
12255 (ppc_cannot_store_register): Renamed from cannot_store_register,
12256 made static.
12257 (the_low_target): New.
12258 * linux-s390-low.c (num_regs): Remove.
12259 (s390_num_regs): Define.
12260 (s390_regmap): Renamed from regmap, made static.
12261 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12262 made static.
12263 (s390_cannot_store_register): Renamed from cannot_store_register,
12264 made static.
12265 (the_low_target): New.
12266 * linux-sh-low.c (num_regs): Remove.
12267 (sh_num_regs): Define.
12268 (sh_regmap): Renamed from regmap, made static.
12269 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12270 made static.
12271 (sh_cannot_store_register): Renamed from cannot_store_register,
12272 made static.
12273 (the_low_target): New.
12274 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12275 (the_low_target): New.
12276
122772002-04-09 Daniel Jacobowitz <drow@mvista.com>
12278
12279 * Makefile.in: Add stamp-h target.
12280 * configure.in: Create stamp-h.
12281 * configure: Regenerated.
12282
122832002-04-09 Daniel Jacobowitz <drow@mvista.com>
12284
12285 * inferiors.c: New file.
12286 * target.c: New file.
12287 * target.h: New file.
12288 * Makefile.in: Add target.o and inferiors.o. Update
12289 dependencies.
12290 * linux-low.c (inferior_pid): New static variable,
12291 moved from server.c.
12292 (linux_create_inferior): Renamed from create_inferior.
12293 Call add_inferior. Return 0 on success instead of a PID.
12294 (linux_attach): Renamed from myattach.
12295 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12296 (linux_thread_alive): Renamed from mythread_alive.
12297 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12298 child dies.
12299 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12300 (regsets_store_inferior_registers): Correct error message.
12301 Add missing ``return 0''.
12302 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12303 (linux_store_registers): Renamed from store_inferior_registers.
12304 (linux_read_memory): Renamed from read_inferior_memory.
12305 (linux_write_memory): Renamed from write_inferior_memory.
12306 (linux_target_ops): New structure.
12307 (initialize_low): Call set_target_ops ().
12308 * remote-utils.c (unhexify): New function.
12309 (hexify): New function.
12310 (input_interrupt): Send signals to ``signal_pid''.
12311 * server.c (inferior_pid): Remove.
12312 (start_inferior): Update create_inferior call.
12313 (attach_inferior): Call add_inferior.
12314 (handle_query): New function.
12315 (main): Call handle_query for `q' packets.
12316 * server.h: Include "target.h". Remove obsolete prototypes.
12317 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12318
123192002-04-09 Daniel Jacobowitz <drow@mvista.com>
12320
12321 * Makefile.in: Add WARN_CFLAGS. Update configury
12322 dependencies.
12323 * configure.in: Check for <string.h>
12324 * configure: Regenerate.
12325 * config.in: Regenerate.
12326 * gdbreplay.c: Include needed system headers.
12327 (remote_open): Remove strchr prototype.
12328 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12329 * regcache.c (supply_register): Change buf argument to const void *.
12330 (supply_register_by_name): Likewise.
12331 (collect_register): Change buf argument to void *.
12332 (collect_register_by_name): Likewise.
12333 * regcache.h: Add missing prototypes.
12334 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12335 * server.c (handle_query): New function.
12336 (attached): New static variable, moved out of main.
12337 (main): Quiet longjmp clobber warnings.
12338 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12339 * utils.c (error): Remove NORETURN.
12340 (fatal): Likewise.