Move target_read_uint32 out of aarch64_relocate_instruction
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-10-12 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4 argument insn. Remove local variable insn. Don't call
5 target_read_uint32.
6 (aarch64_install_fast_tracepoint_jump_pad): Call
7 target_read_uint32.
8
9 2015-09-30 Yao Qi <yao.qi@linaro.org>
10
11 * linux-aarch64-low.c (emit_movk): Shorten a long line.
12 (emit_load_store_pair): Likewise.
13
14 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
15
16 * dll.c (match_dll): Add cast(s).
17 (unloaded_dll): Likewise.
18 * linux-low.c (second_thread_of_pid_p): Likewise.
19 (delete_lwp_callback): Likewise.
20 (count_events_callback): Likewise.
21 (select_event_lwp_callback): Likewise.
22 (linux_set_resume_request): Likewise.
23 * server.c (accumulate_file_name_length): Likewise.
24 (emit_dll_description): Likewise.
25 (handle_qxfer_threads_worker): Likewise.
26 (visit_actioned_threads): Likewise.
27 * thread-db.c (any_thread_of): Likewise.
28 * tracepoint.c (same_process_p): Likewise.
29 (match_blocktype): Likewise.
30 (build_traceframe_info_xml): Likewise.
31
32 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
33
34 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
35 assignment.
36 (gdb_unparse_agent_expr): Likewise.
37 * hostio.c (require_data): Likewise.
38 (handle_pread): Likewise.
39 * linux-low.c (disable_regset): Likewise.
40 (fetch_register): Likewise.
41 (store_register): Likewise.
42 (get_dynamic): Likewise.
43 (linux_qxfer_libraries_svr4): Likewise.
44 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
45 (set_fast_tracepoint_jump): Likewise.
46 (uninsert_fast_tracepoint_jumps_at): Likewise.
47 (reinsert_fast_tracepoint_jumps_at): Likewise.
48 (validate_inserted_breakpoint): Likewise.
49 (clone_agent_expr): Likewise.
50 * regcache.c (init_register_cache): Likewise.
51 * remote-utils.c (putpkt_binary_1): Likewise.
52 (decode_M_packet): Likewise.
53 (decode_X_packet): Likewise.
54 (look_up_one_symbol): Likewise.
55 (relocate_instruction): Likewise.
56 (monitor_output): Likewise.
57 * server.c (handle_search_memory): Likewise.
58 (handle_qxfer_exec_file): Likewise.
59 (handle_qxfer_libraries): Likewise.
60 (handle_qxfer): Likewise.
61 (handle_query): Likewise.
62 (handle_v_cont): Likewise.
63 (handle_v_run): Likewise.
64 (captured_main): Likewise.
65 * target.c (write_inferior_memory): Likewise.
66 * thread-db.c (try_thread_db_load_from_dir): Likewise.
67 * tracepoint.c (init_trace_buffer): Likewise.
68 (add_tracepoint_action): Likewise.
69 (add_traceframe): Likewise.
70 (add_traceframe_block): Likewise.
71 (cmd_qtdpsrc): Likewise.
72 (cmd_qtdv): Likewise.
73 (cmd_qtstatus): Likewise.
74 (response_source): Likewise.
75 (response_tsv): Likewise.
76 (cmd_qtnotes): Likewise.
77 (gdb_collect): Likewise.
78 (initialize_tracepoint): Likewise.
79
80 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
81
82 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
83 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
84 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
85 <NOP>: New.
86 (enum aarch64_condition_codes): New enum.
87 (w0): New static global.
88 (fp): Likewise.
89 (lr): Likewise.
90 (struct aarch64_memory_operand) <type>: New
91 MEMORY_OPERAND_POSTINDEX type.
92 (postindex_memory_operand): New helper function.
93 (emit_ret): New function.
94 (emit_load_store_pair): New function, factored out of emit_stp
95 with support for MEMORY_OPERAND_POSTINDEX.
96 (emit_stp): Rewrite using emit_load_store_pair.
97 (emit_ldp): New function.
98 (emit_load_store): Likewise.
99 (emit_ldr): Mention post-index instruction in comment.
100 (emit_ldrh): New function.
101 (emit_ldrb): New function.
102 (emit_ldrsw): Mention post-index instruction in comment.
103 (emit_str): Likewise.
104 (emit_subs): New function.
105 (emit_cmp): Likewise.
106 (emit_and): Likewise.
107 (emit_orr): Likewise.
108 (emit_orn): Likewise.
109 (emit_eor): Likewise.
110 (emit_mvn): Likewise.
111 (emit_lslv): Likewise.
112 (emit_lsrv): Likewise.
113 (emit_asrv): Likewise.
114 (emit_mul): Likewise.
115 (emit_sbfm): Likewise.
116 (emit_sbfx): Likewise.
117 (emit_ubfm): Likewise.
118 (emit_ubfx): Likewise.
119 (emit_csinc): Likewise.
120 (emit_cset): Likewise.
121 (emit_nop): Likewise.
122 (emit_ops_insns): New helper function.
123 (emit_pop): Likewise.
124 (emit_push): Likewise.
125 (aarch64_emit_prologue): New function.
126 (aarch64_emit_epilogue): Likewise.
127 (aarch64_emit_add): Likewise.
128 (aarch64_emit_sub): Likewise.
129 (aarch64_emit_mul): Likewise.
130 (aarch64_emit_lsh): Likewise.
131 (aarch64_emit_rsh_signed): Likewise.
132 (aarch64_emit_rsh_unsigned): Likewise.
133 (aarch64_emit_ext): Likewise.
134 (aarch64_emit_log_not): Likewise.
135 (aarch64_emit_bit_and): Likewise.
136 (aarch64_emit_bit_or): Likewise.
137 (aarch64_emit_bit_xor): Likewise.
138 (aarch64_emit_bit_not): Likewise.
139 (aarch64_emit_equal): Likewise.
140 (aarch64_emit_less_signed): Likewise.
141 (aarch64_emit_less_unsigned): Likewise.
142 (aarch64_emit_ref): Likewise.
143 (aarch64_emit_if_goto): Likewise.
144 (aarch64_emit_goto): Likewise.
145 (aarch64_write_goto_address): Likewise.
146 (aarch64_emit_const): Likewise.
147 (aarch64_emit_call): Likewise.
148 (aarch64_emit_reg): Likewise.
149 (aarch64_emit_pop): Likewise.
150 (aarch64_emit_stack_flush): Likewise.
151 (aarch64_emit_zero_ext): Likewise.
152 (aarch64_emit_swap): Likewise.
153 (aarch64_emit_stack_adjust): Likewise.
154 (aarch64_emit_int_call_1): Likewise.
155 (aarch64_emit_void_call_2): Likewise.
156 (aarch64_emit_eq_goto): Likewise.
157 (aarch64_emit_ne_goto): Likewise.
158 (aarch64_emit_lt_goto): Likewise.
159 (aarch64_emit_le_goto): Likewise.
160 (aarch64_emit_gt_goto): Likewise.
161 (aarch64_emit_ge_got): Likewise.
162 (aarch64_emit_ops_impl): New static global variable.
163 (aarch64_emit_ops): New target function, return
164 &aarch64_emit_ops_impl.
165 (struct linux_target_ops): Install it.
166
167 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
168
169 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
170 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
171 aarch64-ipa.o.
172 * linux-aarch64-ipa.c: New file.
173 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
174 and endian.h.
175 (aarch64_get_thread_area): New target method.
176 (extract_signed_bitfield): New helper function.
177 (aarch64_decode_ldr_literal): New function.
178 (enum aarch64_opcodes): New enum.
179 (struct aarch64_register): New struct.
180 (struct aarch64_operand): New struct.
181 (x0): New static global.
182 (x1): Likewise.
183 (x2): Likewise.
184 (x3): Likewise.
185 (x4): Likewise.
186 (w2): Likewise.
187 (ip0): Likewise.
188 (sp): Likewise.
189 (xzr): Likewise.
190 (aarch64_register): New helper function.
191 (register_operand): Likewise.
192 (immediate_operand): Likewise.
193 (struct aarch64_memory_operand): New struct.
194 (offset_memory_operand): New helper function.
195 (preindex_memory_operand): Likewise.
196 (enum aarch64_system_control_registers): New enum.
197 (ENCODE): New macro.
198 (emit_insn): New helper function.
199 (emit_b): New function.
200 (emit_bcond): Likewise.
201 (emit_cb): Likewise.
202 (emit_tb): Likewise.
203 (emit_blr): Likewise.
204 (emit_stp): Likewise.
205 (emit_ldp_q_offset): Likewise.
206 (emit_stp_q_offset): Likewise.
207 (emit_load_store): Likewise.
208 (emit_ldr): Likewise.
209 (emit_ldrsw): Likewise.
210 (emit_str): Likewise.
211 (emit_ldaxr): Likewise.
212 (emit_stxr): Likewise.
213 (emit_stlr): Likewise.
214 (emit_data_processing_reg): Likewise.
215 (emit_data_processing): Likewise.
216 (emit_add): Likewise.
217 (emit_sub): Likewise.
218 (emit_mov): Likewise.
219 (emit_movk): Likewise.
220 (emit_mov_addr): Likewise.
221 (emit_mrs): Likewise.
222 (emit_msr): Likewise.
223 (emit_sevl): Likewise.
224 (emit_wfe): Likewise.
225 (append_insns): Likewise.
226 (can_encode_int32_in): New helper function.
227 (aarch64_relocate_instruction): New function.
228 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
229 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
230 (struct linux_target_ops): Install aarch64_get_thread_area,
231 aarch64_install_fast_tracepoint_jump_pad and
232 aarch64_get_min_fast_tracepoint_insn_len.
233
234 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
235
236 * Makefile.in (aarch64-insn.o): New rule.
237 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
238
239 2015-09-21 Yao Qi <yao.qi@linaro.org>
240
241 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
242
243 2015-09-21 Yao Qi <yao.qi@linaro.org>
244
245 * tracepoint.c (max_jump_pad_size): Remove.
246
247 2015-09-18 Yao Qi <yao.qi@linaro.org>
248
249 * linux-aarch64-low.c: Don't include sys/uio.h.
250 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
251
252 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
253
254 * tracepoint.c (eval_result_type): Change prototype.
255 (condition_true_at_tracepoint): Fix argument to compiled_cond.
256
257 2015-09-15 Pedro Alves <palves@redhat.com>
258
259 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
260 Check whether to report exec events instead of checking whether
261 multiprocess is enabled.
262
263 2015-09-15 Pedro Alves <palves@redhat.com>
264
265 PR remote/18965
266 * remote-utils.c (prepare_resume_reply): Merge
267 TARGET_WAITKIND_VFORK_DONE switch case with the
268 TARGET_WAITKIND_FORKED case.
269
270 2015-09-15 Yao Qi <yao.qi@linaro.org>
271
272 * server.c (handle_query): Check string comparison using
273 "else if" instead of "if".
274
275 2015-09-15 Yao Qi <yao.qi@linaro.org>
276
277 * server.c (vCont_supported): New global variable.
278 (handle_query): Set vCont_supported to 1 if "vContSupported+"
279 matches. Append ";vContSupported+" to own_buf.
280 (handle_v_requests): Append ";s;S" to own_buf if target supports
281 hardware single step or vCont_supported is false.
282 (capture_main): Set vCont_supported to zero.
283
284 2015-09-15 Yao Qi <yao.qi@linaro.org>
285
286 * linux-low.c (linux_supports_conditional_breakpoints): Rename
287 it to ...
288 (linux_supports_hardware_single_step): ... New function.
289 (linux_target_ops): Update.
290 * lynx-low.c (lynx_target_ops): Set field
291 supports_hardware_single_step to target_can_do_hardware_single_step.
292 * nto-low.c (nto_target_ops): Likewise.
293 * spu-low.c (spu_target_ops): Likewise.
294 * win32-low.c (win32_target_ops): Likewise.
295 * target.c (target_can_do_hardware_single_step): New function.
296 * target.h (struct target_ops) <supports_conditional_breakpoints>:
297 Remove. <supports_hardware_single_step>: New field.
298 (target_supports_conditional_breakpoints): Remove.
299 (target_supports_hardware_single_step): New macro.
300 (target_can_do_hardware_single_step): Declare.
301 * server.c (handle_query): Use target_supports_hardware_single_step
302 instead of target_supports_conditional_breakpoints.
303
304 2015-09-15 Yao Qi <yao.qi@linaro.org>
305
306 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
307 function.
308 (struct linux_target_ops the_low_target): Install
309 aarch64_linux_siginfo_fixup.
310
311 2015-09-11 Don Breazeal <donb@codesourcery.com>
312 Luis Machado <lgustavo@codesourcery.com>
313
314 * linux-low.c (linux_mourn): Static declaration.
315 (linux_arch_setup): Move in front of
316 handle_extended_wait.
317 (linux_arch_setup_thread): New function.
318 (handle_extended_wait): Handle exec events. Call
319 linux_arch_setup_thread. Make event_lwp argument a
320 pointer-to-a-pointer.
321 (check_zombie_leaders): Do not check stopped threads.
322 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
323 (linux_low_filter_event): Add lwp and thread for exec'ing
324 non-leader thread if leader thread has been deleted.
325 Refactor code into linux_arch_setup_thread and call it.
326 Pass child lwp pointer by reference to handle_extended_wait.
327 (linux_wait_for_event_filtered): Update comment.
328 (linux_wait_1): Prevent clobbering exec event status.
329 (linux_supports_exec_events): New function.
330 (linux_target_ops) <supports_exec_events>: Initialize new member.
331 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
332 new member.
333 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
334 * server.c (report_exec_events): New global variable.
335 (handle_query): Handle qSupported query for exec-events feature.
336 (captured_main): Initialize report_exec_events.
337 * server.h (report_exec_events): Declare new global variable.
338 * target.h (struct target_ops) <supports_exec_events>: New
339 member.
340 (target_supports_exec_events): New macro.
341 * win32-low.c (win32_target_ops) <supports_exec_events>:
342 Initialize new member.
343
344 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
345
346 * linux-low.c (linux_low_enable_btrace): Remove.
347 (linux_target_ops): Replace linux_low_enable_btrace with
348 linux_enable_btrace.
349
350 2015-09-03 Yao Qi <yao.qi@linaro.org>
351
352 * linux-aarch64-low.c (aarch64_insert_point): Call
353 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
354 returns true.
355
356 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
357
358 * linux-low.c (check_stopped_by_breakpoint): Use
359 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
360
361 2015-08-27 Pedro Alves <palves@redhat.com>
362
363 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
364
365 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
366
367 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
368 the XNEW-family equivalent.
369 (compile_bytecodes): Likewise.
370 * dll.c (loaded_dll): Likewise.
371 * event-loop.c (append_callback_event): Likewise.
372 (create_file_handler): Likewise.
373 (create_file_event): Likewise.
374 * hostio.c (handle_open): Likewise.
375 * inferiors.c (add_thread): Likewise.
376 (add_process): Likewise.
377 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
378 * linux-arm-low.c (arm_new_process): Likewise.
379 (arm_new_thread): Likewise.
380 * linux-low.c (add_to_pid_list): Likewise.
381 (linux_add_process): Likewise.
382 (handle_extended_wait): Likewise.
383 (add_lwp): Likewise.
384 (enqueue_one_deferred_signal): Likewise.
385 (enqueue_pending_signal): Likewise.
386 (linux_resume_one_lwp_throw): Likewise.
387 (linux_resume_one_thread): Likewise.
388 (linux_read_memory): Likewise.
389 (linux_write_memory): Likewise.
390 * linux-mips-low.c (mips_linux_new_process): Likewise.
391 (mips_linux_new_thread): Likewise.
392 (mips_add_watchpoint): Likewise.
393 * linux-x86-low.c (initialize_low_arch): Likewise.
394 * lynx-low.c (lynx_add_process): Likewise.
395 * mem-break.c (set_raw_breakpoint_at): Likewise.
396 (set_breakpoint): Likewise.
397 (add_condition_to_breakpoint): Likewise.
398 (add_commands_to_breakpoint): Likewise.
399 (clone_agent_expr): Likewise.
400 (clone_one_breakpoint): Likewise.
401 * regcache.c (new_register_cache): Likewise.
402 * remote-utils.c (look_up_one_symbol): Likewise.
403 * server.c (queue_stop_reply): Likewise.
404 (start_inferior): Likewise.
405 (queue_stop_reply_callback): Likewise.
406 (handle_target_event): Likewise.
407 * spu-low.c (fetch_ppc_memory): Likewise.
408 (store_ppc_memory): Likewise.
409 * target.c (set_target_ops): Likewise.
410 * thread-db.c (thread_db_load_search): Likewise.
411 (try_thread_db_load_1): Likewise.
412 * tracepoint.c (add_tracepoint): Likewise.
413 (add_tracepoint_action): Likewise.
414 (create_trace_state_variable): Likewise.
415 (cmd_qtdpsrc): Likewise.
416 (cmd_qtro): Likewise.
417 (add_while_stepping_state): Likewise.
418 * win32-low.c (child_add_thread): Likewise.
419 (get_image_name): Likewise.
420
421 2015-08-25 Yao Qi <yao.qi@linaro.org>
422
423 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
424
425 2015-08-25 Yao Qi <yao.qi@linaro.org>
426
427 * Makefile.in (aarch64-linux.o): New rule.
428 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
429 srv_tgtobj.
430 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
431 (aarch64_init_debug_reg_state): Make it extern.
432 (aarch64_linux_prepare_to_resume): Remove.
433
434 2015-08-25 Yao Qi <yao.qi@linaro.org>
435
436 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
437 lwp_arch_private_info and ptid_of_lwp.
438
439 2015-08-25 Yao Qi <yao.qi@linaro.org>
440
441 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
442 Find proc_info by find_process_pid. All callers updated.
443
444 2015-08-25 Yao Qi <yao.qi@linaro.org>
445
446 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
447 Remove.
448 (debug_reg_change_callback): Remove.
449 (aarch64_notify_debug_reg_change): Remove.
450
451 2015-08-25 Yao Qi <yao.qi@linaro.org>
452
453 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
454 Call current_lwp_ptid.
455
456 2015-08-25 Yao Qi <yao.qi@linaro.org>
457
458 * linux-aarch64-low.c (debug_reg_change_callback): Use
459 debug_printf.
460
461 2015-08-25 Yao Qi <yao.qi@linaro.org>
462
463 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
464
465 2015-08-25 Yao Qi <yao.qi@linaro.org>
466
467 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
468
469 2015-08-25 Yao Qi <yao.qi@linaro.org>
470
471 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
472 the code.
473
474 2015-08-25 Yao Qi <yao.qi@linaro.org>
475
476 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
477 Remove.
478 (debug_reg_change_callback): Remove argument entry and add argument
479 lwp. Remove local variable thread. Don't print thread id in the
480 debugging output. Don't check whether pid of thread equals to pid.
481 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
482 iterate_over_lwps instead find_inferior.
483
484 2015-08-24 Pedro Alves <palves@redhat.com>
485
486 * inferiors.c (get_first_process): New function.
487 * inferiors.h (get_first_process): New declaration.
488 * remote-utils.c (read_ptid): Default to the first process in the
489 list, instead of to the current thread's process.
490
491 2015-08-24 Pedro Alves <palves@redhat.com>
492
493 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
494 * event-loop.c: Likewise.
495 * remote-utils.c: Likewise.
496 * tracepoint.c: Likewise.
497
498 2015-08-24 Pedro Alves <palves@redhat.com>
499
500 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
501 ptid_get_lwp.
502
503 2015-08-21 Pedro Alves <palves@redhat.com>
504
505 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
506 instead of literal 1.
507
508 2015-08-21 Pedro Alves <palves@redhat.com>
509
510 * tdesc.c (default_description): Explicitly zero-initialize.
511
512 2015-08-21 Pedro Alves <palves@redhat.com>
513
514 PR gdb/18749
515 * inferiors.c (remove_thread): Discard any pending stop reply for
516 this thread.
517 * server.c (remove_all_on_match_pid): Rename to ...
518 (remove_all_on_match_ptid): ... this. Work with a filter ptid
519 instead of a pid.
520 (discard_queued_stop_replies): Change parameter to a ptid. Now
521 extern.
522 (handle_v_kill, kill_inferior_callback, captured_main)
523 (process_serial_event): Adjust.
524 * server.h (discard_queued_stop_replies): Declare.
525
526 2015-08-21 Pedro Alves <palves@redhat.com>
527
528 * linux-low.c (wait_for_sigstop): Always switch to no thread
529 selected if the previously current thread dies.
530 * lynx-low.c (lynx_request_interrupt): Use the first thread's
531 process instead of the current thread's.
532 * remote-utils.c (input_interrupt): Don't check if there's no
533 current thread.
534 * server.c (gdb_read_memory, gdb_write_memory): If setting the
535 current thread to the general thread fails, error out.
536 (handle_qxfer_auxv, handle_qxfer_libraries)
537 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
538 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
539 (handle_query): Check if there's a thread selected instead of
540 checking whether there's any thread in the thread list.
541 (handle_qxfer_threads, handle_qxfer_btrace)
542 (handle_qxfer_btrace_conf): Don't error out early if there's no
543 thread in the thread list.
544 (handle_v_cont, myresume): Don't set the current thread to the
545 continue thread.
546 (process_serial_event) <Hg handling>: Also set thread_id if the
547 previous general thread is still alive.
548 (process_serial_event) <g/G handling>: If setting the current
549 thread to the general thread fails, error out.
550 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
551 thread's lwp instead of the current thread's.
552 * target.c (set_desired_thread): If the desired thread was not
553 found, leave the current thread pointing to NULL. Return an int
554 (boolean) indicating success.
555 * target.h (set_desired_thread): Change return type to int.
556
557 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
558
559 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
560 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
561 #includes.
562 (ps_get_thread_area): New function.
563
564 2015-08-19 Gary Benson <gbenson@redhat.com>
565
566 * hostio.c (handle_pread): Do not attempt to read more data
567 than hostio_reply_with_data can fit in a packet.
568
569 2015-08-18 Joel Brobecker <brobecker@adacore.com>
570
571 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
572
573 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
574
575 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
576
577 2015-08-06 Pedro Alves <palves@redhat.com>
578
579 * tracepoint.c (expr_eval_result): Now an int.
580
581 2015-08-06 Pedro Alves <palves@redhat.com>
582
583 * gdbthread.h (struct regcache): Forward declare.
584 (struct thread_info) <regcache_data>: Now a struct regcache
585 pointer.
586 * inferiors.c (inferior_regcache_data)
587 (set_inferior_regcache_data): Now work with struct regcache
588 pointers.
589 * inferiors.h (struct regcache): Forward declare.
590 (inferior_regcache_data, set_inferior_regcache_data): Now work
591 with struct regcache pointers.
592 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
593 (free_register_cache_thread): Remove struct regcache pointer
594 casts.
595
596 2015-08-06 Pedro Alves <palves@redhat.com>
597
598 * server.c (captured_main): On error, print the exception message
599 to stderr, and if run_once is set, throw a quit.
600
601 2015-08-06 Pedro Alves <palves@redhat.com>
602
603 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
604 the current thread.
605
606 2015-08-06 Pedro Alves <palves@redhat.com>
607
608 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
609 reading beyond the passed in buffer length.
610
611 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
612
613 * tracepoint.c (symbol_list) <required>: Remove.
614
615 2015-08-06 Pedro Alves <palves@redhat.com>
616
617 * linux-low.c (handle_extended_wait): Set the fork child's suspend
618 count if stopping and suspending threads.
619 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
620 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
621 (linux_detach): Complete an ongoing step-over.
622 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
623 throughout.
624 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
625 (linux_wait_1): If passing a signal to the inferior after
626 finishing a step-over, unsuspend and re-resume all lwps. If we
627 see a single-step event but the thread should be continuing, don't
628 pass the trap to gdb.
629 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
630 internal_error instead of gdb_assert.
631 (enqueue_pending_signal): New function.
632 (check_ptrace_stopped_lwp_gone): Add debug output.
633 (start_step_over): Use internal_error instead of gdb_assert.
634 (complete_ongoing_step_over): New function.
635 (linux_resume_one_thread): Don't resume a suspended thread.
636 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
637 it stepping.
638
639 2015-08-06 Pedro Alves <palves@redhat.com>
640
641 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
642 (linux_thread_alive): Use lwp_is_marked_dead.
643 (extended_event_reported): Delete.
644 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
645 instead of extended_event_reported.
646 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
647 as well.
648 (lwp_is_marked_dead): New function.
649 (lwp_running): Use lwp_is_marked_dead.
650 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
651 comment.
652
653 2015-08-06 Pedro Alves <palves@redhat.com>
654
655 * linux-low.c (linux_wait_1): Move fork event output out of the
656 !report_to_gdb check. Pass event_child->waitstatus to
657 target_waitstatus_to_string instead of ourstatus.
658
659 2015-08-04 Yao Qi <yao.qi@linaro.org>
660
661 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
662 if current_thread is 32 bit.
663
664 2015-08-04 Yao Qi <yao.qi@linaro.org>
665
666 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
667 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
668 * server.c (extended_protocol): Remove "static".
669 * server.h (extended_protocol): Declare it.
670
671 2015-08-04 Yao Qi <yao.qi@linaro.org>
672
673 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
674 both aarch64 and aarch32.
675 (aarch64_set_pc): Likewise.
676
677 2015-08-04 Yao Qi <yao.qi@linaro.org>
678
679 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
680 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
681 arm-with-neon.xml to srv_xmlfiles.
682 * linux-aarch64-low.c: Include linux-aarch32-low.h.
683 (is_64bit_tdesc): New function.
684 (aarch64_linux_read_description): New function.
685 (aarch64_arch_setup): Call aarch64_linux_read_description.
686 (regs_info): Rename to regs_info_aarch64.
687 (aarch64_regs_info): Return right regs_info.
688 (initialize_low_arch): Call initialize_low_arch_aarch32.
689
690 2015-08-04 Yao Qi <yao.qi@linaro.org>
691
692 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
693 * linux-aarch32-low.c: New file.
694 * linux-aarch32-low.h: New file.
695 * linux-arm-low.c (arm_fill_gregset): Move it to
696 linux-aarch32-low.c.
697 (arm_store_gregset): Likewise.
698 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
699 (arm_store_vfpregset): Call arm_store_vfpregset_num.
700 (arm_arch_setup): Check if PTRACE_GETREGSET works.
701 (regs_info): Rename to regs_info_arm.
702 (arm_regs_info): Return regs_info_aarch32 if
703 have_ptrace_getregset is 1 and target description is
704 arm_with_neon or arm_with_vfpv3.
705 (initialize_low_arch): Don't call init_registers_arm_with_neon.
706 Call initialize_low_arch_aarch32 instead.
707
708 2015-08-04 Yao Qi <yao.qi@linaro.org>
709
710 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
711 * linux-low.c: ... here.
712 * linux-low.h (have_ptrace_getregset): Declare it.
713
714 2015-08-04 Pedro Alves <palves@redhat.com>
715
716 * thread-db.c (struct thread_db): Use new typedefs.
717 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
718 CHK calls.
719 (disable_thread_event_reporting): Cast result of dlsym to
720 destination function pointer type.
721 (thread_db_mourn): Use td_ta_delete_ftype.
722
723 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
724
725 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
726 arch variant.
727 (CDX_BREAKPOINT): Define for R2.
728 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
729 (the_low_target): Add comments.
730
731 2015-07-30 Yao Qi <yao.qi@linaro.org>
732
733 * linux-arm-low.c (arm_hwcap): Remove it.
734 (arm_read_description): New local variable arm_hwcap. Don't
735 set arm_hwcap to zero.
736
737 2015-07-30 Yao Qi <yao.qi@linaro.org>
738
739 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
740 Use regcache->tdesc instead.
741 (arm_store_wmmxregset): Likewise.
742 (arm_fill_vfpregset): Likewise.
743 (arm_store_vfpregset): Likewise.
744
745 2015-07-30 Yao Qi <yao.qi@linaro.org>
746
747 * linux-arm-low.c: Include arch/arm.h.
748 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
749 (arm_store_gregset): Likewise.
750
751 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
752
753 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
754 ptrace's 4th parameter.
755
756 2015-07-27 Yao Qi <yao.qi@linaro.org>
757
758 * configure.srv (case aarch64*-*-linux*): Don't set
759 srv_linux_usrregs.
760
761 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
762
763 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
764 sys/ptrace.h.
765 * linux-arm-low.c: Likewise.
766 * linux-cris-low.c: Likewise.
767 * linux-crisv32-low.c: Likewise.
768 * linux-low.c: Likewise.
769 * linux-m68k-low.c: Likewise.
770 * linux-mips-low.c: Likewise.
771 * linux-nios2-low.c: Likewise.
772 * linux-s390-low.c: Likewise.
773 * linux-sparc-low.c: Likewise.
774 * linux-tic6x-low.c: Likewise.
775 * linux-tile-low.c: Likewise.
776 * linux-x86-low.c: Likewise.
777
778 2015-07-24 Pedro Alves <palves@redhat.com>
779
780 * config.in: Regenerate.
781 * configure: Regenerate.
782
783 2015-07-24 Pedro Alves <palves@redhat.com>
784
785 * acinclude.m4: Include ../ptrace.m4.
786 * configure.ac: Call GDB_AC_PTRACE.
787 * config.in, configure: Regenerate.
788
789 2015-07-24 Yao Qi <yao.qi@linaro.org>
790
791 * linux-low.c (linux_create_inferior): Remove setting to
792 proc->priv->new_inferior.
793 (linux_attach): Likewise.
794 (linux_low_filter_event): Likewise.
795 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
796
797 2015-07-24 Yao Qi <yao.qi@linaro.org>
798
799 * linux-low.c (linux_arch_setup): New function.
800 (linux_low_filter_event): If proc->tdesc is NULL and
801 proc->attached is true, call the_low_target.arch_setup.
802 Otherwise, keep status pending, and return.
803 (linux_resume_one_lwp_throw): Don't call get_pc if
804 thread->while_stepping isn't NULL. Don't call
805 get_thread_regcache if proc->tdesc is NULL.
806 (need_step_over_p): Return 0 if proc->tdesc is NULL.
807 (linux_target_ops): Install arch_setup.
808 * server.c (start_inferior): Call the_target->arch_setup.
809 * target.h (struct target_ops) <arch_setup>: New field.
810 (target_arch_setup): New marco.
811 * lynx-low.c (lynx_target_ops): Update.
812 * nto-low.c (nto_target_ops): Update.
813 * spu-low.c (spu_target_ops): Update.
814 * win32-low.c (win32_target_ops): Update.
815
816 2015-07-24 Yao Qi <yao.qi@linaro.org>
817
818 * linux-low.c (linux_add_process): Don't set
819 proc->priv->new_inferior.
820 (linux_create_inferior): Set proc->priv->new_inferior to 1.
821 (linux_attach): Likewise.
822
823 2015-07-24 Yao Qi <yao.qi@linaro.org>
824
825 * server.c (start_inferior): Code refactor.
826
827 2015-07-24 Yao Qi <yao.qi@linaro.org>
828
829 * server.c (process_serial_event): Set general_thread.
830
831 2015-07-21 Yao Qi <yao.qi@linaro.org>
832
833 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
834 aarch64_linux_get_debug_reg_capacity.
835
836 2015-07-17 Yao Qi <yao.qi@linaro.org>
837
838 * Makefile.in (aarch64-linux-hw-point.o): New rule.
839 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
840 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
841 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
842 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
843 (AARCH64_HWP_ALIGNMENT): Likewise.
844 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
845 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
846 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
847 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
848 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
849 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
850 (struct aarch64_debug_reg_state): Likewise.
851 (struct arch_lwp_info): Likewise.
852 (aarch64_align_watchpoint): Likewise.
853 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
854 (aarch64_watchpoint_length): Likewise.
855 (aarch64_point_encode_ctrl_reg): Likewise
856 (aarch64_point_is_aligned): Likewise.
857 (aarch64_align_watchpoint): Likewise.
858 (aarch64_linux_set_debug_regs):
859 (aarch64_dr_state_insert_one_point): Likewise.
860 (aarch64_dr_state_remove_one_point): Likewise.
861 (aarch64_handle_breakpoint): Likewise.
862 (aarch64_handle_aligned_watchpoint): Likewise.
863 (aarch64_handle_unaligned_watchpoint): Likewise.
864 (aarch64_handle_watchpoint): Likewise.
865
866 2015-07-17 Yao Qi <yao.qi@linaro.org>
867
868 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
869 and don't aarch64_get_debug_reg_state. All callers update.
870 (aarch64_handle_aligned_watchpoint): Likewise.
871 (aarch64_handle_unaligned_watchpoint): Likewise.
872 (aarch64_handle_watchpoint): Likewise.
873 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
874 (aarch64_remove_point): Likewise.
875
876 2015-07-17 Yao Qi <yao.qi@linaro.org>
877
878 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
879 debug_printf.
880 (aarch64_handle_unaligned_watchpoint): Likewise.
881
882 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
883
884 Revert the previous 3 commits:
885 Move gdb_regex* to common/
886 Move linux_find_memory_regions_full & co.
887 gdbserver build-id attribute generator
888
889 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
890 Jan Kratochvil <jan.kratochvil@redhat.com>
891
892 gdbserver build-id attribute generator.
893 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
894 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
895 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
896 (find_phdr): New.
897 (get_dynamic): Use find_pdhr to traverse program headers.
898 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
899 (compare_mapping_entry_range, struct find_memory_region_callback_data)
900 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
901 (get_hex_build_id): New.
902 (linux_qxfer_libraries_svr4): Add optional build-id attribute
903 to reply XML document.
904
905 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
906 Jan Kratochvil <jan.kratochvil@redhat.com>
907
908 * target.c: Include target/target-utils.h and fcntl.h.
909 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
910 (target_fileio_read_stralloc): New functions.
911
912 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
913
914 * Makefile.in (OBS): Add gdb_regex.o.
915 (gdb_regex.o): New.
916 * config.in: Rebuilt.
917 * configure: Rebuilt.
918
919 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
920 Jan Kratochvil <jan.kratochvil@redhat.com>
921
922 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
923 * Makefile.in (OBS): Add target-utils.o.
924 (linux-maps.o, target-utils.o): New.
925 * configure.srv (srv_linux_obj): Add linux-maps.o.
926
927 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
928
929 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
930 function, return 1.
931 (the_low_target): Install it.
932
933 2015-07-14 Pedro Alves <palves@redhat.com>
934
935 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
936 Instead, ignore ECHILD, and throw an error for other errnos.
937
938 2015-07-10 Pedro Alves <palves@redhat.com>
939
940 * event-loop.c (struct callback_event) <data>: Change type to
941 gdb_client_data instance instead of gdb_client_data pointer.
942 (append_callback_event): Adjust.
943
944 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
945
946 * linux-aarch64-low.c: Add comments for each linux_target_ops
947 method. Remove comments already covered in target_ops and
948 linux_target_ops definitions.
949 (the_low_target): Add comments for each unimplemented method.
950
951 2015-07-09 Yao Qi <yao.qi@linaro.org>
952
953 * linux-aarch64-low.c (aarch64_regmap): Remove.
954 (aarch64_usrregs_info): Remove.
955 (regs_info): Set field usrregs to NULL.
956
957 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
958
959 * linux-low.c: Include "rsp-low.h"
960 (linux_low_encode_pt_config, linux_low_encode_raw): New.
961 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
962 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
963 (handle_btrace_enable_pt): New.
964 (handle_btrace_general_set): Support "pt".
965 (handle_btrace_conf_general_set): Support "pt:size".
966
967 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
968
969 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
970 Z_PACKET_SW_BP.
971
972 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
973
974 * linux-aarch64-low.c: Remove comment about endianness.
975 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
976 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
977 memcmp.
978
979 2015-06-24 Gary Benson <gbenson@redhat.com>
980
981 * linux-i386-ipa.c (stdint.h): Do not include.
982 * lynx-i386-low.c (stdint.h): Likewise.
983 * lynx-ppc-low.c (stdint.h): Likewise.
984 * mem-break.c (stdint.h): Likewise.
985 * thread-db.c (stdint.h): Likewise.
986 * tracepoint.c (stdint.h): Likewise.
987 * win32-low.c (stdint.h): Likewise.
988
989 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
990
991 * server.c (write_qxfer_response): Update call to
992 remote_escape_output.
993
994 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
995 Jan Kratochvil <jan.kratochvil@redhat.com>
996
997 Merge multiple hex conversions.
998 * gdbreplay.c (tohex): Rename to 'fromhex'.
999 (logchar): Use fromhex.
1000
1001 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1002
1003 * server.c (handle_qxfer_libraries): Set `version' attribute for
1004 <library-list>.
1005
1006 2015-06-10 Gary Benson <gbenson@redhat.com>
1007
1008 * target.h (struct target_ops) <multifs_open>: New field.
1009 <multifs_unlink>: Likewise.
1010 <multifs_readlink>: Likewise.
1011 * linux-low.c (nat/linux-namespaces.h): New include.
1012 (linux_target_ops): Initialize the_target->multifs_open,
1013 the_target->multifs_unlink and the_target->multifs_readlink.
1014 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1015 * hostio.c (hostio_fs_pid): New static variable.
1016 (hostio_handle_new_gdb_connection): New function.
1017 (handle_setfs): Likewise.
1018 (handle_open): Use the_target->multifs_open as appropriate.
1019 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1020 (handle_readlink): Use the_target->multifs_readlink as
1021 appropriate.
1022 (handle_vFile): Handle vFile:setfs packets.
1023 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1024 after target_handle_new_gdb_connection.
1025
1026 2015-06-10 Gary Benson <gbenson@redhat.com>
1027
1028 * configure.ac (AC_CHECK_FUNCS): Add setns.
1029 * config.in: Regenerate.
1030 * configure: Likewise.
1031 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1032 (linux-namespaces.o): New rule.
1033 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1034
1035 2015-06-09 Gary Benson <gbenson@redhat.com>
1036
1037 * hostio.c (handle_open): Process mode argument with
1038 fileio_to_host_mode.
1039
1040 2015-06-01 Yao Qi <yao.qi@linaro.org>
1041
1042 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1043 * linux-x86-low.c: Likewise.
1044
1045 2015-05-28 Don Breazeal <donb@codesourcery.com>
1046
1047 * linux-low.c (handle_extended_wait): Initialize
1048 thread_info.last_resume_kind for new fork children.
1049
1050 2015-05-15 Pedro Alves <palves@redhat.com>
1051
1052 * target.h (target_handle_new_gdb_connection): Rewrite using if
1053 wrapped in do/while.
1054
1055 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1056
1057 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1058 * configure, config.in: Regenerate.
1059 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1060 Declare typedef.
1061
1062 2015-05-12 Don Breazeal <donb@codesourcery.com>
1063
1064 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1065 PTRACE_EVENT_VFORK_DONE.
1066 (linux_low_ptrace_options, extended_event_reported): Add vfork
1067 events.
1068 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1069 and "vforkdone" for RSP 'T' Stop Reply Packet.
1070 * server.h (report_vfork_events): Declare
1071 global variable.
1072
1073 2015-05-12 Don Breazeal <donb@codesourcery.com>
1074
1075 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1076 (the_low_target) <new_fork>: Initialize new member.
1077 * linux-arm-low.c (arm_new_fork): New function.
1078 (the_low_target) <new_fork>: Initialize new member.
1079 * linux-low.c (handle_extended_wait): Call new target function
1080 new_fork.
1081 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1082 * linux-mips-low.c (mips_add_watchpoint): New function
1083 extracted from mips_insert_point.
1084 (the_low_target) <new_fork>: Initialize new member.
1085 (mips_linux_new_fork): New function.
1086 (mips_insert_point): Call mips_add_watchpoint.
1087 * linux-x86-low.c (x86_linux_new_fork): New function.
1088 (the_low_target) <new_fork>: Initialize new member.
1089
1090 2015-05-12 Don Breazeal <donb@codesourcery.com>
1091
1092 * linux-low.c (handle_extended_wait): Implement return value,
1093 rename argument 'event_child' to 'event_lwp', handle
1094 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1095 (linux_low_ptrace_options): New function.
1096 (linux_low_filter_event): Call linux_low_ptrace_options,
1097 use different argument fo linux_enable_event_reporting,
1098 use return value from handle_extended_wait.
1099 (extended_event_reported): New function.
1100 (linux_wait_1): Call extended_event_reported and set
1101 status to report fork events.
1102 (linux_write_memory): Add pid to debug message.
1103 (reset_lwp_ptrace_options_callback): New function.
1104 (linux_handle_new_gdb_connection): New function.
1105 (linux_target_ops): Initialize new structure member.
1106 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1107 * lynx-low.c: Initialize new structure member.
1108 * remote-utils.c (prepare_resume_reply): Implement stop reason
1109 "fork" for "T" stop message.
1110 * server.c (handle_query): Call handle_new_gdb_connection.
1111 * server.h (report_fork_events): Declare global flag.
1112 * target.h (struct target_ops) <handle_new_gdb_connection>:
1113 New member.
1114 (target_handle_new_gdb_connection): New macro.
1115 * win32-low.c: Initialize new structure member.
1116
1117 2015-05-12 Don Breazeal <donb@codesourcery.com>
1118
1119 * mem-break.c (APPEND_TO_LIST): Define macro.
1120 (clone_agent_expr): New function.
1121 (clone_one_breakpoint): New function.
1122 (clone_all_breakpoints): New function.
1123 * mem-break.h: Declare new functions.
1124
1125 2015-05-12 Don Breazeal <donb@codesourcery.com>
1126
1127 * linux-low.c (linux_supports_fork_events): New function.
1128 (linux_supports_vfork_events): New function.
1129 (linux_target_ops): Initialize new structure members.
1130 (initialize_low): Call linux_check_ptrace_features.
1131 * lynx-low.c (lynx_target_ops): Initialize new structure
1132 members.
1133 * server.c (report_fork_events, report_vfork_events):
1134 New global flags.
1135 (handle_query): Add new features to qSupported packet and
1136 response.
1137 (captured_main): Initialize new global variables.
1138 * target.h (struct target_ops) <supports_fork_events>:
1139 New member.
1140 <supports_vfork_events>: New member.
1141 (target_supports_fork_events): New macro.
1142 (target_supports_vfork_events): New macro.
1143 * win32-low.c (win32_target_ops): Initialize new structure
1144 members.
1145
1146 2015-05-12 Gary Benson <gbenson@redhat.com>
1147
1148 * server.c (handle_qxfer_exec_file): Use current process
1149 if annex is empty.
1150
1151 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1152
1153 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1154 Remove HAVE_PTRACE_GETREGS conditionals.
1155 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1156 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1157
1158 2015-05-08 Yao Qi <yao.qi@linaro.org>
1159
1160 * linux-low.c (linux_supports_conditional_breakpoints): New
1161 function.
1162 (linux_target_ops): Install new target method.
1163 * lynx-low.c (lynx_target_ops): Install NULL hook for
1164 supports_conditional_breakpoints.
1165 * nto-low.c (nto_target_ops): Likewise.
1166 * spu-low.c (spu_target_ops): Likewise.
1167 * win32-low.c (win32_target_ops): Likewise.
1168 * server.c (handle_query): Check
1169 target_supports_conditional_breakpoints.
1170 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1171 New field.
1172 (target_supports_conditional_breakpoints): New macro.
1173
1174 2015-05-06 Pedro Alves <palves@redhat.com>
1175
1176 PR server/18081
1177 * server.c (start_inferior): If the process exits, mourn it.
1178
1179 2015-04-21 Gary Benson <gbenson@redhat.com>
1180
1181 * hostio.c (fileio_open_flags_to_host): Factored out to
1182 fileio_to_host_openflags in common/fileio.c. Single use
1183 updated.
1184
1185 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1186
1187 * linux-xtensa-low.c (xtensa_fill_gregset)
1188 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1189 XCHAL_HAVE_LOOP.
1190
1191 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1192
1193 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1194 (regs_info): Replace usrregs pointer with NULL.
1195
1196 2015-04-17 Gary Benson <gbenson@redhat.com>
1197
1198 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1199 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1200 * server.c (handle_qxfer_exec_file): New function.
1201 (qxfer_packets): Add exec-file entry.
1202 (handle_query): Report qXfer:exec-file:read as supported packet.
1203
1204 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1205
1206 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1207
1208 2015-04-09 Gary Benson <gbenson@redhat.com>
1209
1210 * hostio-errno.c (errno_to_fileio_error): Remove function.
1211 Update caller to use remote_fileio_to_fio_error.
1212
1213 2015-04-09 Yao Qi <yao.qi@linaro.org>
1214
1215 * linux-low.c (linux_insert_point): Call
1216 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1217 (linux_remove_point): Call remove_memory_breakpoint if type is
1218 raw_bkpt_type_sw.
1219 * linux-x86-low.c (x86_insert_point): Don't call
1220 insert_memory_breakpoint.
1221 (x86_remove_point): Don't call remove_memory_breakpoint.
1222
1223 2015-04-01 Pedro Alves <palves@redhat.com>
1224 Cleber Rosa <crosa@redhat.com>
1225
1226 * server.c (gdbserver_usage): Reorganize and extend the usage
1227 message.
1228
1229 2015-03-24 Pedro Alves <palves@redhat.com>
1230
1231 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1232 output. Also dump TRAP_TRACE.
1233 (linux_low_filter_event): In debug output, distinguish a
1234 resume_stop SIGSTOP from a delayed SIGSTOP.
1235
1236 2015-03-24 Gary Benson <gbenson@redhat.com>
1237
1238 * linux-x86-low.c (x86_linux_new_thread): Moved to
1239 nat/x86-linux.c.
1240 (x86_linux_prepare_to_resume): Likewise.
1241
1242 2015-03-24 Gary Benson <gbenson@redhat.com>
1243
1244 * Makefile.in (x86-linux-dregs.o): New rule.
1245 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1246 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1247 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1248 (x86_linux_dr_get): Likewise.
1249 (x86_linux_dr_set): Likewise.
1250 (update_debug_registers_callback): Likewise.
1251 (x86_linux_dr_set_addr): Likewise.
1252 (x86_linux_dr_get_addr): Likewise.
1253 (x86_linux_dr_set_control): Likewise.
1254 (x86_linux_dr_get_control): Likewise.
1255 (x86_linux_dr_get_status): Likewise.
1256 (x86_linux_update_debug_registers): Likewise.
1257
1258 2015-03-24 Gary Benson <gbenson@redhat.com>
1259
1260 * linux-x86-low.c (x86_linux_update_debug_registers):
1261 New function, factored out from...
1262 (x86_linux_prepare_to_resume): ...this.
1263
1264 2015-03-24 Gary Benson <gbenson@redhat.com>
1265
1266 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1267 (x86_linux_dr_set): Likewise.
1268 (update_debug_registers_callback): Likewise.
1269 (x86_linux_dr_set_addr): Likewise.
1270 (x86_linux_dr_get_addr): Likewise.
1271 (x86_linux_dr_set_control): Likewise.
1272 (x86_linux_dr_get_control): Likewise.
1273 (x86_linux_dr_get_status): Likewise.
1274 (x86_linux_prepare_to_resume): Likewise.
1275
1276 2015-03-24 Gary Benson <gbenson@redhat.com>
1277
1278 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1279 Use perror_with_name. Pass string through gettext.
1280 (x86_linux_dr_set): Likewise.
1281
1282 2015-03-24 Gary Benson <gbenson@redhat.com>
1283
1284 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1285 (x86_linux_dr_set_addr): ...this.
1286 (x86_dr_low_get_addr): Rename to...
1287 (x86_linux_dr_get_addr): ...this.
1288 (x86_dr_low_set_control): Rename to...
1289 (x86_linux_dr_set_control): ...this.
1290 (x86_dr_low_get_control): Rename to...
1291 (x86_linux_dr_get_control): ...this.
1292 (x86_dr_low_get_status): Rename to...
1293 (x86_linux_dr_get_status): ...this.
1294 (x86_dr_low): Update with new function names.
1295
1296 2015-03-24 Gary Benson <gbenson@redhat.com>
1297
1298 * Makefile.in (x86-linux.o): New rule.
1299 * configure.srv: Add x86-linux.o to relevant targets.
1300 * linux-low.c (lwp_set_arch_private_info): New function.
1301 (lwp_arch_private_info): Likewise.
1302 * linux-x86-low.c: Include nat/x86-linux.h.
1303 (arch_lwp_info): Removed structure.
1304 (update_debug_registers_callback):
1305 Use lwp_set_debug_registers_changed.
1306 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1307 and lwp_set_debug_registers_changed.
1308 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1309
1310 2015-03-24 Gary Benson <gbenson@redhat.com>
1311
1312 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1313 * linux-arm-low.c (arm_new_thread): Likewise.
1314 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1315 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1316 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1317 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1318
1319 2015-03-24 Gary Benson <gbenson@redhat.com>
1320
1321 * linux-low.c (ptid_of_lwp): New function.
1322 (lwp_is_stopped): Likewise.
1323 (lwp_stop_reason): Likewise.
1324 * linux-x86-low.c (update_debug_registers_callback):
1325 Use lwp_is_stopped.
1326 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1327 lwp_stop_reason.
1328
1329 2015-03-24 Gary Benson <gbenson@redhat.com>
1330
1331 * linux-low.h (linux_stop_lwp): Remove declaration.
1332
1333 2015-03-24 Gary Benson <gbenson@redhat.com>
1334
1335 * linux-low.h: Include nat/linux-nat.h.
1336 * linux-low.c (iterate_over_lwps_args): New structure.
1337 (iterate_over_lwps_filter): New function.
1338 (iterate_over_lwps): Likewise.
1339 * linux-x86-low.c (update_debug_registers_callback):
1340 Update signature to what iterate_over_lwps expects.
1341 Remove PID check that iterate_over_lwps now performs.
1342 (x86_dr_low_set_addr): Use iterate_over_lwps.
1343 (x86_dr_low_set_control): Likewise.
1344
1345 2015-03-24 Gary Benson <gbenson@redhat.com>
1346
1347 * linux-x86-low.c (x86_debug_reg_state): New function.
1348 (x86_linux_prepare_to_resume): Use the above.
1349
1350 2015-03-24 Gary Benson <gbenson@redhat.com>
1351
1352 * linux-low.c (current_lwp_ptid): New function.
1353 * linux-x86-low.c: Include nat/linux-nat.h.
1354 (x86_dr_low_get_addr): Use current_lwp_ptid.
1355 (x86_dr_low_get_control): Likewise.
1356 (x86_dr_low_get_status): Likewise.
1357
1358 2015-03-20 Pedro Alves <palves@redhat.com>
1359
1360 * tracepoint.c (cmd_qtstatus): Make "str" const.
1361
1362 2015-03-20 Pedro Alves <palves@redhat.com>
1363
1364 * server.c (handle_general_set): Make "req_str" const.
1365
1366 2015-03-19 Pedro Alves <palves@redhat.com>
1367
1368 * linux-low.c (linux_resume_one_lwp): Rename to ...
1369 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1370 instead call perror_with_name.
1371 (check_ptrace_stopped_lwp_gone): New function.
1372 (linux_resume_one_lwp): Reimplement as wrapper around
1373 linux_resume_one_lwp_throw that swallows errors if the LWP is
1374 gone.
1375
1376 2015-03-19 Pedro Alves <palves@redhat.com>
1377
1378 * linux-low.c (count_events_callback, select_event_lwp_callback):
1379 No longer check whether the thread has resume_stop as last resume
1380 kind.
1381
1382 2015-03-19 Pedro Alves <palves@redhat.com>
1383
1384 * linux-low.c (count_events_callback, select_event_lwp_callback):
1385 Use the lwp's status_pending_p field, not the thread's.
1386
1387 2015-03-19 Pedro Alves <palves@redhat.com>
1388
1389 * linux-low.c (select_event_lwp_callback): Update comments to
1390 no longer mention SIGTRAP.
1391
1392 2015-03-18 Gary Benson <gbenson@redhat.com>
1393
1394 * server.c (handle_query): Do not report vFile:fstat as supported.
1395
1396 2015-03-11 Gary Benson <gbenson@redhat.com>
1397
1398 * hostio.c (sys/types.h): New include.
1399 (sys/stat.h): Likewise.
1400 (common-remote-fileio.h): Likewise.
1401 (handle_fstat): New function.
1402 (handle_vFile): Handle vFile:fstat packets.
1403
1404 2015-03-11 Gary Benson <gbenson@redhat.com>
1405
1406 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1407 struct stat.st_blocks and struct stat.st_blksize.
1408 * configure: Regenerate.
1409 * config.in: Likewise.
1410 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1411 (OBS): Add common-remote-fileio.o.
1412 (common-remote-fileio.o): New rule.
1413
1414 2015-03-09 Pedro Alves <palves@redhat.com>
1415
1416 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1417 'struct sockaddr' pointer in 'accept' call.
1418
1419 2015-03-09 Pedro Alves <palves@redhat.com>
1420
1421 Revert:
1422 2015-03-07 Pedro Alves <palves@redhat.com>
1423 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1424 or <winsock2.h> here. Instead include "gdb_socket.h".
1425 (remote_open): Use union gdb_sockaddr_u.
1426 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1427 or <winsock2.h> here. Instead include "gdb_socket.h".
1428 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1429 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1430 or <sys/un.h>.
1431 (init_named_socket, gdb_agent_helper_thread): Use union
1432 gdb_sockaddr_u.
1433
1434 2015-03-07 Pedro Alves <palves@redhat.com>
1435
1436 * configure.ac (build_warnings): Move
1437 -Wdeclaration-after-statement to the C-specific set.
1438 * configure: Regenerate.
1439
1440 2015-03-07 Pedro Alves <palves@redhat.com>
1441
1442 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1443 or <winsock2.h> here. Instead include "gdb_socket.h".
1444 (remote_open): Use union gdb_sockaddr_u.
1445 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1446 or <winsock2.h> here. Instead include "gdb_socket.h".
1447 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1448 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1449 or <sys/un.h>.
1450 (init_named_socket, gdb_agent_helper_thread): Use union
1451 gdb_sockaddr_u.
1452
1453 2015-03-07 Pedro Alves <palves@redhat.com>
1454
1455 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1456 instead.
1457
1458 2015-03-06 Yao Qi <yao.qi@linaro.org>
1459
1460 * linux-aarch64-low.c (aarch64_insert_point): Use
1461 show_debug_regs as a boolean.
1462 (aarch64_remove_point): Likewise.
1463
1464 2015-03-05 Pedro Alves <palves@redhat.com>
1465
1466 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1467 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1468 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1469 * nto-low.c (nto_target_ops): Likewise.
1470 * spu-low.c (spu_target_ops): Likewise.
1471 * win32-low.c (win32_target_ops): Likewise.
1472
1473 2015-03-04 Pedro Alves <palves@redhat.com>
1474
1475 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1476 Decide whether a breakpoint triggered based on the SIGTRAP's
1477 siginfo.si_code.
1478 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1479 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1480 (linux_low_filter_event): Check for breakpoints before checking
1481 watchpoints.
1482 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1483 siginfo.si_code.
1484 (linux_stopped_by_sw_breakpoint)
1485 (linux_supports_stopped_by_sw_breakpoint)
1486 (linux_stopped_by_hw_breakpoint)
1487 (linux_supports_stopped_by_hw_breakpoint): New functions.
1488 (linux_target_ops): Install new target methods.
1489
1490 2015-03-04 Pedro Alves <palves@redhat.com>
1491
1492 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1493 * server.c (swbreak_feature, hwbreak_feature): New globals.
1494 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1495 (captured_main): Clear swbreak_feature and hwbreak_feature.
1496 * server.h (swbreak_feature, hwbreak_feature): Declare.
1497 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1498 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1499 supports_stopped_by_hw_breakpoint>: New fields.
1500 (target_supports_stopped_by_sw_breakpoint)
1501 (target_stopped_by_sw_breakpoint)
1502 (target_supports_stopped_by_hw_breakpoint)
1503 (target_stopped_by_hw_breakpoint): Declare.
1504
1505 2015-03-04 Pedro Alves <palves@redhat.com>
1506
1507 enum lwp_stop_reason -> enum target_stop_reason
1508 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1509 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1510 (linux_wait_1, stuck_in_jump_pad_callback)
1511 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1512 (linux_stopped_by_watchpoint):
1513 * linux-low.h (enum lwp_stop_reason): Delete.
1514 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1515 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1516
1517 2015-03-04 Yao Qi <yao.qi@linaro.org>
1518
1519 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1520
1521 2015-03-03 Gary Benson <gbenson@redhat.com>
1522
1523 * hostio.c (handle_vFile): Fix prefix lengths.
1524
1525 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1526
1527 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1528 ptr_bits.
1529
1530 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1531
1532 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1533 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1534 (clean): Add "rm -f" for above C files.
1535 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1536 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1537 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1538 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1539 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1540 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1541 (init_registers_s390x_vx_linux64)
1542 (init_registers_s390x_tevx_linux64)
1543 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1544 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1545 declarations.
1546 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1547 (s390_store_vxrs_high): New functions.
1548 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1549 NT_S390_VXRS_HIGH.
1550 (s390_arch_setup): Add logic for selecting one of the new target
1551 descriptions. Activate the new vector regsets if applicable.
1552 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1553 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1554 and init_registers_s390x_tevx_linux64.
1555
1556 2015-03-01 Pedro Alves <palves@redhat.com>
1557
1558 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1559 parameter.
1560
1561 2015-02-27 Pedro Alves <palves@redhat.com>
1562
1563 * linux-x86-low.c (u_debugreg_offset): New function.
1564 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1565
1566 2015-02-27 Pedro Alves <palves@redhat.com>
1567
1568 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1569 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1570 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1571 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1572 (ps_lsetfpregs, ps_getpid)
1573 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1574 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1575 (ps_lsetxregs, ps_plog): Declare.
1576
1577 2015-02-27 Pedro Alves <palves@redhat.com>
1578
1579 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1580 IP_AGENT_EXPORT_FUNC.
1581 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1582 IP_AGENT_EXPORT_FUNC.
1583 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1584 (IP_AGENT_EXPORT): Delete.
1585 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1586 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1587 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1588 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1589 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1590 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1591 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1592 (traceframe_read_count, traceframe_write_count)
1593 (traceframes_created, trace_state_variables, get_raw_reg)
1594 (get_trace_state_variable_value, set_trace_state_variable_value)
1595 (ust_loaded, helper_thread_id, cmd_buf): Use
1596 IPA_SYM_EXPORTED_NAME.
1597 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1598 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1599 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1600 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1601 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1602 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1603 EXTERN_C_PUSH/EXTERN_C_POP.
1604 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1605 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1606 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1607 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1608 (traceframe_write_count, traceframe_read_count)
1609 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1610 (about_to_request_buffer_space, get_trace_state_variable_value)
1611 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1612 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1613 EXTERN_C_PUSH/EXTERN_C_POP.
1614 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1615 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1616 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1617 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1618 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1619 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1620 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1621 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1622 Define.
1623 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1624 (IP_AGENT_EXPORT_VAR_DECL): Define.
1625 (tracing): Declare.
1626 (gdb_agent_get_raw_reg): Declare.
1627
1628 2015-02-27 Tom Tromey <tromey@redhat.com>
1629 Pedro Alves <palves@redhat.com>
1630
1631 Rename symbols whose names are reserved C++ keywords throughout.
1632
1633 2015-02-27 Pedro Alves <palves@redhat.com>
1634
1635 * Makefile.in (COMPILER): New, get it from autoconf.
1636 (CXX): Get from autoconf instead.
1637 (COMPILE.pre): Use COMPILER.
1638 (CC-LD): Rename to ...
1639 (CC_LD): ... this. Use COMPILER.
1640 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1641 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1642 * acinclude.m4: Include build-with-cxx.m4.
1643 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1644 Disable -Werror by default if building in C++ mode.
1645 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1646 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1647 the C++ compiler. Save/restore CXXFLAGS too.
1648 * configure: Regenerate.
1649
1650 2015-02-27 Pedro Alves <palves@redhat.com>
1651
1652 * acinclude.m4: Include libiberty.m4.
1653 * configure.ac: Call libiberty_INIT.
1654 * config.in, configure: Regenerate.
1655
1656 2015-02-26 Pedro Alves <palves@redhat.com>
1657
1658 * linux-low.c (linux_wait_1): When incrementing the PC past a
1659 program breakpoint always use the_low_target.breakpoint_len as
1660 increment, rather than the maximum between that and
1661 the_low_target.decr_pc_after_break.
1662
1663 2015-02-23 Pedro Alves <palves@redhat.com>
1664
1665 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1666 thread was doing a step-over; always adjust the PC if
1667 we stepped over a permanent breakpoint.
1668 (linux_wait_1): If we stepped over breakpoint that was on top of a
1669 permanent breakpoint, manually advance the PC past it.
1670
1671 2015-02-23 Pedro Alves <palves@redhat.com>
1672
1673 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1674 modes.
1675 (x86_fill_gregset, x86_store_gregset): Use it when handling
1676 $orig_eax.
1677
1678 2015-02-20 Pedro Alves <palves@redhat.com>
1679
1680 * thread-db.c: Include "nat/linux-procfs.h".
1681 (thread_db_init): Skip listing new threads if the kernel supports
1682 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1683
1684 2015-02-20 Pedro Alves <palves@redhat.com>
1685
1686 * linux-low.c (status_pending_p_callback): Use ptid_match.
1687
1688 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1689
1690 PR breakpoints/16812
1691 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1692 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1693 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1694
1695 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1696
1697 PR breakpoints/15956
1698 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1699
1700 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1701
1702 * linux-low.c (linux_low_btrace_conf): Print size.
1703 * server.c (handle_btrace_conf_general_set): New.
1704 (hanle_general_set): Call handle_btrace_conf_general_set.
1705 (handle_query): Report Qbtrace-conf:bts:size as supported.
1706
1707 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1708
1709 * linux-low.c (linux_low_enable_btrace): Update parameters.
1710 (linux_low_btrace_conf): New.
1711 (linux_target_ops)<to_btrace_conf>: Initialize.
1712 * server.c (current_btrace_conf): New.
1713 (handle_btrace_enable): Rename to ...
1714 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1715 to target_enable_btrace. Update comment. Update users.
1716 (handle_qxfer_btrace_conf): New.
1717 (qxfer_packets): Add btrace-conf entry.
1718 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1719 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1720 (target_ops)<read_btrace_conf>: New.
1721 (target_enable_btrace): Update parameters.
1722 (target_read_btrace_conf): New.
1723
1724 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1725
1726 * server.c (handle_btrace_general_set): Remove call to
1727 target_supports_btrace.
1728 (supported_btrace_packets): New.
1729 (handle_query): Call supported_btrace_packets.
1730 * target.h: include btrace-common.h.
1731 (btrace_target_info): Removed.
1732 (supports_btrace, target_supports_btrace): Update parameters.
1733
1734 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1735
1736 * Makefile.in (SFILES): Add common/btrace-common.c.
1737 (OBS): Add common/btrace-common.o.
1738 (btrace-common.o): Add build rules.
1739 * linux-low: Include btrace-common.h.
1740 (linux_low_read_btrace): Use struct btrace_data. Call
1741 btrace_data_init and btrace_data_fini.
1742
1743 2015-02-06 Pedro Alves <palves@redhat.com>
1744
1745 * thread-db.c (find_new_threads_callback): Add debug output.
1746
1747 2015-02-04 Pedro Alves <palves@redhat.com>
1748
1749 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1750 (resume_stopped_resumed_lwps): New function.
1751 (linux_wait_for_event_filtered): Use it.
1752
1753 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1754
1755 * Makefile.in (SFILES): Add linux-personality.c.
1756 (linux-personality.o): New rule.
1757 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1758 list of objects to be built.
1759 * linux-low.c: Include nat/linux-personality.h.
1760 (linux_create_inferior): Remove code to disable address space
1761 randomization (moved to ../nat/linux-personality.c). Create
1762 cleanup to disable address space randomization.
1763
1764 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1765
1766 * Makefile.in (posix-strerror.o): New rule.
1767 (mingw-strerror.o): Likewise.
1768 * configure: Regenerated.
1769 * configure.ac: Source file ../common/common.host. Initialize new
1770 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1771
1772 2015-01-14 Yao Qi <yao@codesourcery.com>
1773
1774 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1775 (ppc-linux.o): New rule.
1776 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1777 * configure.ac: AC_CHECK_FUNCS(getauxval).
1778 * config.in: Re-generated.
1779 * configure: Re-generated.
1780 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1781 ppc64_64bit_inferior_p
1782
1783 2015-01-14 Yao Qi <yao@codesourcery.com>
1784
1785 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1786 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1787 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1788 (PT_ORIG_R3, PT_TRAP): Likewise.
1789 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1790 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1791 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1792
1793 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1794
1795 * i387-fp.c (i387_cache_to_xsave): In look over
1796 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1797 zmmh_low_space field by use of zmmh_high_space.
1798
1799 2015-01-09 Pedro Alves <palves@redhat.com>
1800
1801 * linux-low.c (step_over_bkpt): Move higher up in the file.
1802 (handle_extended_wait): Don't store the stop_pc here.
1803 (get_stop_pc): Adjust comments and rename to ...
1804 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1805 stopped for a software breakpoint or hardware breakpoint.
1806 (thread_still_has_status_pending_p): New function.
1807 (status_pending_p_callback): Use
1808 thread_still_has_status_pending_p. If the event is no longer
1809 interesting, resume the LWP.
1810 (handle_tracepoints): Add assert.
1811 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1812 (wstatus_maybe_breakpoint): New function.
1813 (cancel_breakpoint): Delete function.
1814 (check_stopped_by_watchpoint): New function, factored out from
1815 linux_low_filter_event.
1816 (lp_status_maybe_breakpoint): Delete function.
1817 (linux_low_filter_event): Remove filter_ptid argument.
1818 Leave thread group exits pending here. Store the LWP's stop PC.
1819 Always leave events pending.
1820 (linux_wait_for_event_filtered): Pull all events out of the
1821 kernel, and leave them all pending.
1822 (count_events_callback, select_event_lwp_callback): Consider all
1823 events.
1824 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1825 (select_event_lwp): Only give preference to the stepping LWP in
1826 all-stop mode. Adjust comments.
1827 (ignore_event): New function.
1828 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1829 references to cancel_breakpoints. Adjust to renames. Also give
1830 equal priority to all LWPs that have had events in non-stop mode.
1831 If reporting a software breakpoint event, unadjust the LWP's PC.
1832 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1833 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1834 Adjust.
1835 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1836 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1837 (linux_stopped_by_watchpoint): Adjust.
1838 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1839 * linux-low.h (enum lwp_stop_reason): New.
1840 (struct lwp_info) <stop_pc>: Adjust comment.
1841 <stopped_by_watchpoint>: Delete field.
1842 <stop_reason>: New field.
1843 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1844 * mem-break.c (software_breakpoint_inserted_here)
1845 (hardware_breakpoint_inserted_here): New function.
1846 * mem-break.h (software_breakpoint_inserted_here)
1847 (hardware_breakpoint_inserted_here): Declare.
1848 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1849 (cancel_breakpoints): Delete.
1850 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1851 (upload_fast_traceframes): Remove references to
1852 cancel_breakpoints.
1853
1854 2015-01-09 Pedro Alves <palves@redhat.com>
1855
1856 * thread-db.c (find_new_threads_callback): Ignore thread if the
1857 kernel thread ID is -1.
1858
1859 2015-01-09 Pedro Alves <palves@redhat.com>
1860
1861 * linux-low.c (linux_attach_fail_reason_string): Move to
1862 nat/linux-ptrace.c, and rename.
1863 (linux_attach_lwp): Update comment.
1864 (attach_proc_task_lwp_callback): New function.
1865 (linux_attach): Adjust to rename and use
1866 linux_proc_attach_tgid_threads.
1867 (linux_attach_fail_reason_string): Delete declaration.
1868
1869 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1870
1871 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1872 * server.c (gdbserver_version): Likewise.
1873
1874 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1875
1876 * remote-utils.c: Include ctype.h.
1877 (input_interrupt): Explicitly handle the case when the char
1878 received is the NUL byte. Improve the printing of non-ASCII
1879 characters.
1880
1881 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1882
1883 * linux-low.c (linux_low_filter_event): Update call to
1884 linux_enable_event_reporting following the addition of
1885 a new parameter to that function.
1886
1887 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1888
1889 PR server/17457
1890 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1891 (AARCH64_FPCR_REGNO): Likewise.
1892 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1893 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1894 (aarch64_store_fpregset): Likewise.
1895
1896 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1897
1898 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1899 Remove FIXME comment about assumption about N.
1900
1901 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1902
1903 * configure.ac: If large-file support is disabled in GDBserver,
1904 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1905 * configure: Regenerate.
1906
1907 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1908
1909 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1910 warning upon ENODATA from ptrace.
1911 * linux-s390-low.c (s390_store_tdb): New.
1912 (s390_regsets): Add regset for NT_S390_TDB.
1913
1914 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1915
1916 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1917 without a fill_function.
1918 * linux-s390-low.c (s390_fill_last_break): Remove.
1919 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1920 (s390_arch_setup): Use regset's size instead of fill_function for
1921 loop end condition.
1922
1923 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1924
1925 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1926 the regset's store function when ptrace returned an error.
1927 * regcache.c (get_thread_regcache): Invalidate register cache
1928 before fetching inferior's registers.
1929
1930 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1931
1932 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1933 while-loop as for-loop.
1934 (regsets_store_inferior_registers): Likewise.
1935
1936 2014-11-28 Yao Qi <yao@codesourcery.com>
1937
1938 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1939 * config.in, configure: Re-generate.
1940 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1941 is defined.
1942
1943 2014-11-21 Yao Qi <yao@codesourcery.com>
1944
1945 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1946 (AC_CHECK_HEADERS): Remove malloc.h.
1947 * configure: Re-generated.
1948 * config.in: Re-generated.
1949 * server.h: Don't include alloca.h and malloc.h.
1950 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1951 Don't include malloc.h.
1952
1953 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1954
1955 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1956 corresponding ERRNO check in same block.
1957
1958 2014-11-12 Pedro Alves <palves@redhat.com>
1959
1960 * server.c (cont_thread): Update comment.
1961 (start_inferior, attach_inferior): No longer clear cont_thread.
1962 (handle_v_cont): No longer set cont_thread.
1963 (captured_main): Clear cont_thread each time a GDB connects.
1964
1965 2014-11-12 Pedro Alves <palves@redhat.com>
1966
1967 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1968 thread, and don't resume all threads if the Hc thread has exited.
1969
1970 2014-11-12 Pedro Alves <palves@redhat.com>
1971
1972 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1973 the process group instead of to a specific LWP.
1974
1975 2014-10-15 Pedro Alves <palves@redhat.com>
1976
1977 PR server/17487
1978 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1979 parameter.
1980 (arm_set_thread_context): Delete.
1981 (the_low_target): Adjust.
1982 * win32-i386-low.c (debug_registers_changed)
1983 (debug_registers_used): Delete.
1984 (update_debug_registers_callback): New function.
1985 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1986 needing to update their debug registers.
1987 (win32_get_current_dr): New function.
1988 (x86_dr_low_get_addr, x86_dr_low_get_control)
1989 (x86_dr_low_get_status): Fetch the debug register from the thread
1990 record's context.
1991 (i386_initial_stuff): Adjust.
1992 (i386_get_thread_context): Remove current_event parameter. Don't
1993 clear debug_registers_changed nor copy DR values to
1994 debug_reg_state.
1995 (i386_set_thread_context): Delete.
1996 (i386_prepare_to_resume): New function.
1997 (i386_thread_added): Mark the thread as needing to update irs
1998 debug registers.
1999 (the_low_target): Remove i386_set_thread_context and install
2000 i386_prepare_to_resume.
2001 * win32-low.c (win32_get_thread_context): Adjust.
2002 (win32_set_thread_context): Use SetThreadContext
2003 directly.
2004 (win32_prepare_to_resume): New function.
2005 (win32_require_context): New function, factored out from ...
2006 (thread_rec): ... this.
2007 (continue_one_thread): Call win32_prepare_to_resume on each thread
2008 we're about to continue.
2009 (win32_resume): Call win32_prepare_to_resume on the event thread.
2010 * win32-low.h (struct win32_thread_info)
2011 <debug_registers_changed>: New field.
2012 (struct win32_target_ops): Change prototype of set_thread_context,
2013 delete set_thread_context and add prepare_to_resume.
2014 (win32_require_context): New declaration.
2015
2016 2014-10-08 Gary Benson <gbenson@redhat.com>
2017
2018 * server.h: Do not include common-exceptions.h.
2019
2020 2014-10-08 Gary Benson <gbenson@redhat.com>
2021
2022 * server.h: Do not include cleanups.h.
2023
2024 2014-09-30 James Hogan <james.hogan@imgtec.com>
2025
2026 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2027 mips64-dsp-linux.c.
2028
2029 2014-09-23 Yao Qi <yao@codesourcery.com>
2030
2031 * linux-low.c (lp_status_maybe_breakpoint): New function.
2032 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2033 (count_events_callback): Likewise.
2034 (select_event_lwp_callback): Likewise.
2035 (cancel_breakpoints_callback): Likewise.
2036
2037 2014-09-19 Don Breazeal <donb@codesourcery.com>
2038
2039 * linux-low.c (handle_extended_wait): Call
2040 linux_ptrace_get_extended_event.
2041 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2042 linux_is_extended_waitstatus.
2043
2044 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2045
2046 * Makefile.in (CPPFLAGS): Define.
2047 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2048 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2049
2050 2014-09-16 Gary Benson <gbenson@redhat.com>
2051
2052 * inferiors.h (current_inferior): Renamed as...
2053 (current_thread): New variable. All uses updated.
2054 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2055 (maybe_move_out_of_jump_pad): Likewise.
2056 (cancel_breakpoint): Likewise.
2057 (linux_low_filter_event): Likewise.
2058 (wait_for_sigstop): Likewise.
2059 (linux_resume_one_lwp): Likewise.
2060 (need_step_over_p): Likewise.
2061 (start_step_over): Likewise.
2062 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2063 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2064 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2065 and save_inferior as saved_thread.
2066 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2067 saved_thread.
2068 (regcache_invalidate_thread): Likewise.
2069 * remote-utils.c (prepare_resume_reply): Likewise.
2070 * thread-db.c (thread_db_get_tls_address): Likewise.
2071 (disable_thread_event_reporting): Likewise.
2072 (remove_thread_event_breakpoints): Likewise.
2073 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2074 as saved_thread.
2075 * target.h (set_desired_inferior): Renamed as...
2076 (set_desired_thread): New declaration. All uses updated.
2077 * server.c (myresume): Updated comment to reference thread instead
2078 of inferior.
2079 (handle_serial_event): Likewise.
2080 (handle_target_event): Likewise.
2081
2082 2014-09-12 Tom Tromey <tromey@redhat.com>
2083 Gary Benson <gbenson@redhat.com>
2084
2085 * regcache.h: Include common-regcache.h.
2086 (regcache_read_pc): Don't declare.
2087 * regcache.c (get_thread_regcache_for_ptid): New function.
2088
2089 2014-09-11 Tom Tromey <tromey@redhat.com>
2090 Gary Benson <gbenson@redhat.com>
2091
2092 * symbol.c: New file.
2093 * Makefile.in (SFILES): Add symbol.c.
2094 (OBS): Add symbol.o.
2095
2096 2014-09-11 Gary Benson <gbenson@redhat.com>
2097
2098 * target.c (target_stop_ptid, target_continue_ptid): New
2099 functions.
2100
2101 2014-09-11 Tom Tromey <tromey@redhat.com>
2102 Gary Benson <gbenson@redhat.com>
2103
2104 * target.h: Include target/target.h.
2105 * target.c (target_read_memory, target_read_uint32)
2106 (target_write_memory): New functions.
2107
2108 2014-09-11 Gary Benson <gbenson@redhat.com>
2109
2110 * server.h (debug_hw_points): Don't declare.
2111 * server.c (debug_hw_points): Don't define. Replace all uses
2112 with show_debug_regs.
2113 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2114 all uses with show_debug_regs.
2115
2116 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2117
2118 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2119 endianness into account.
2120 (ppc_supply_ptrace_register): Likewise.
2121
2122 2014-09-03 James Hogan <james.hogan@imgtec.com>
2123
2124 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2125 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2126
2127 2014-09-03 Gary Benson <gbenson@redhat.com>
2128
2129 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2130 ALL_DEBUG_ADDRESS_REGISTERS.
2131
2132 2014-09-02 Gary Benson <gbenson@redhat.com>
2133
2134 * i386-low.h: Renamed as...
2135 * x86-low.h: New file. All type, function and variable name
2136 prefixes changed from "i386_" to "x86_". All references updated.
2137 * i386-low.c: Renamed as...
2138 * x86-low.c: New file. All type, function and variable name
2139 prefixes changed from "i386_" to "x86_". All references updated.
2140
2141 2014-09-02 Gary Benson <gbenson@redhat.com>
2142
2143 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2144 (x86_linux_new_thread): Likewise.
2145
2146 2014-08-29 Gary Benson <gbenson@redhat.com>
2147
2148 * server.h (setjmp.h): Do not include.
2149 (toplevel): Do not declare.
2150 (common-exceptions.h): Include.
2151 (cleanups.h): Likewise.
2152 * server.c (toplevel): Do not define.
2153 (exit_code): New static global.
2154 (detach_or_kill_for_exit_cleanup): New function.
2155 (main): New function. Original main renamed to...
2156 (captured_main): New function.
2157 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2158
2159 2014-08-29 Gary Benson <gbenson@redhat.com>
2160
2161 * Makefile.in (SFILES): Add common/common-exceptions.c.
2162 (OBS): Add common-exceptions.o.
2163 (common-exceptions.o): New rule.
2164 * utils.c (prepare_to_throw_exception): New function.
2165
2166 2014-08-29 Gary Benson <gbenson@redhat.com>
2167
2168 * config.in: Regenerate.
2169 * configure: Likewise.
2170
2171 2014-08-29 Gary Benson <gbenson@redhat.com>
2172
2173 * Makefile.in (SFILES): Add common/cleanups.c.
2174 (OBS): cleanups.o.
2175 (cleanups.o): New rule.
2176
2177 2014-08-29 Gary Benson <gbenson@redhat.com>
2178
2179 * utils.c (internal_vwarning): New function.
2180
2181 2014-08-28 Gary Benson <gbenson@redhat.com>
2182
2183 * utils.h (fatal): Remove declaration.
2184 * utils.c (fatal): Remove function.
2185
2186 2014-08-28 Gary Benson <gbenson@redhat.com>
2187
2188 * tracepoint.c (gdb_agent_init): Replace fatal with
2189 perror_with_name.
2190 (initialize_tracepoint): Likewise.
2191
2192 2014-08-28 Gary Benson <gbenson@redhat.com>
2193
2194 * remote-utils.c (remote_prepare): Replace fatal with error.
2195
2196 2014-08-28 Gary Benson <gbenson@redhat.com>
2197
2198 * linux-low.c (linux_async): Replace fatal with warning.
2199 Tidy up and return.
2200 (linux_start_non_stop): Return -1 if linux_async failed.
2201
2202 2014-08-28 Gary Benson <gbenson@redhat.com>
2203
2204 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2205 gdb_assert.
2206 (i386_dr_low_get_addr): Remove vague comment.
2207 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2208 gdb_assert.
2209
2210 2014-08-28 Gary Benson <gbenson@redhat.com>
2211
2212 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2213 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2214 internal_error.
2215 (linux_resume_one_lwp): Likewise.
2216 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2217 gdb_assert.
2218 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2219 with internal_error.
2220 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2221 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2222 (find_register_by_name): Replace fatal with internal_error.
2223 (find_regno): Likewise.
2224 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2225 * thread-db.c (thread_db_create_event): Likewise.
2226 (thread_db_load_search): Likewise.
2227 (try_thread_db_load_1): Likewise.
2228 * tracepoint.c (get_jump_space_head): Replace fatal with
2229 internal_error.
2230 (claim_trampoline_space): Likewise.
2231 (have_fast_tracepoint_trampoline_buffer): Likewise.
2232 (cmd_qtstart): Likewise.
2233 (stop_tracing): Likewise.
2234 (fast_tracepoint_collecting): Likewise.
2235 (target_malloc): Likewise.
2236 (download_tracepoint): Likewise.
2237 (download_trace_state_variables): Replace check with gdb_assert.
2238 (upload_fast_traceframes): Replace fatal with internal_error.
2239
2240 2014-08-19 Tom Tromey <tromey@redhat.com>
2241 Gary Benson <gbenson@redhat.com>
2242
2243 * Makefile.in (SFILES): Add common/common-debug.c.
2244 (OBS): Add common-debug.o.
2245 (common-debug.o): New rule.
2246 * debug.h (debug_printf): Don't declare.
2247 * debug.c (debug_printf): Renamed and rewritten as...
2248 (debug_vprintf): New function.
2249
2250 2014-08-19 Gary Benson <gbenson@redhat.com>
2251
2252 * utils.h: Do not include print-utils.h.
2253
2254 2014-08-19 Tom Tromey <tromey@redhat.com>
2255 Gary Benson <gbenson@redhat.com>
2256
2257 * server.h: Add static assertion.
2258 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2259
2260 2014-08-19 Tom Tromey <tromey@redhat.com>
2261 Gary Benson <gbenson@redhat.com>
2262
2263 * Makefile.in (SFILES): Add common/errors.c.
2264 (OBS): Add errors.o.
2265 (IPA_OBS): Add errors-ipa.o.
2266 (errors.o): New rule.
2267 (errors-ipa.o): Likewise.
2268 * utils.h (perror_with_name, error, warning): Don't declare.
2269 * utils.c (warning): Renamed and rewritten as...
2270 (vwarning): New function.
2271 (error): Renamed and rewritten as...
2272 (verror): New function.
2273 (internal_error): Renamed and rewritten as...
2274 (internal_verror): New function.
2275
2276 2014-08-07 Gary Benson <gbenson@redhat.com>
2277
2278 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2279 * configure: Regenerate.
2280 * config.in: Likewise.
2281 * server.h: Do not include errno.h.
2282 * event-loop.c: Likewise.
2283 * hostio-errno.c: Likewise.
2284 * linux-low.c: Likewise.
2285 * remote-utils.c: Likewise.
2286 * spu-low.c: Likewise.
2287 * utils.c: Likewise.
2288 * gdbreplay.c: Unconditionally include errno.h.
2289
2290 2014-08-07 Gary Benson <gbenson@redhat.com>
2291
2292 * server.h: Do not include string.h.
2293 * event-loop.c: Likewise.
2294 * linux-low.c: Likewise.
2295 * regcache.c: Likewise.
2296 * remote-utils.c: Likewise.
2297 * spu-low.c: Likewise.
2298 * utils.c: Likewise.
2299
2300 2014-08-07 Gary Benson <gbenson@redhat.com>
2301
2302 * server.h: Do not include gdb_assert.h.
2303
2304 2014-08-07 Gary Benson <gbenson@redhat.com>
2305
2306 * server.h: Do not include common-utils.h.
2307
2308 2014-08-07 Gary Benson <gbenson@redhat.com>
2309
2310 * server.h: Do not include ptid.h.
2311 * notif.h: Likewise.
2312
2313 2014-08-07 Gary Benson <gbenson@redhat.com>
2314
2315 * server.h: Do not include gdb_locale.h.
2316
2317 2014-08-07 Gary Benson <gbenson@redhat.com>
2318
2319 * server.h: Do not include gdb/signals.h.
2320 * win32-low.c: Likewise.
2321
2322 2014-08-07 Gary Benson <gbenson@redhat.com>
2323
2324 * server.h: Do not include pathmax.h.
2325
2326 2014-08-07 Gary Benson <gbenson@redhat.com>
2327
2328 * server.h: Do not include libiberty.h.
2329 * linux-bfin-low.c: Likewise.
2330
2331 2014-08-07 Gary Benson <gbenson@redhat.com>
2332
2333 * server.h: Do not include ansidecl.h.
2334
2335 2014-08-07 Gary Benson <gbenson@redhat.com>
2336
2337 * linux-x86-low.c: Do not include stddef.h.
2338 * lynx-ppc-low.c: Likewise.
2339 * tracepoint.c: Likewise.
2340
2341 2014-08-07 Gary Benson <gbenson@redhat.com>
2342
2343 * server.h: Do not include stdarg.h.
2344 * nto-low.c: Likewise.
2345
2346 2014-08-07 Gary Benson <gbenson@redhat.com>
2347
2348 * server.h: Do not include stdlib.h.
2349 * inferiors.c: Likewise.
2350 * linux-low.c: Likewise.
2351 * regcache.c: Likewise.
2352 * spu-low.c: Likewise.
2353 * tracepoint.c: Likewise.
2354 * utils.c: Likewise.
2355
2356 2014-08-07 Gary Benson <gbenson@redhat.com>
2357
2358 * server.h: Do not include stdio.h.
2359 * linux-low.c: Likewise.
2360 * remote-utils.c: Likewise.
2361 * spu-low.c: Likewise.
2362 * utils.c: Likewise.
2363 * wincecompat.c: Likewise.
2364
2365 2014-08-06 Gary Benson <gbenson@redhat.com>
2366
2367 * regcache.c (init_register_cache): Move conditionals inside if.
2368
2369 2014-08-06 Gary Benson <gbenson@redhat.com>
2370
2371 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2372
2373 2014-07-31 Gary Benson <gbenson@redhat.com>
2374
2375 * ax.h: Do not include server.h.
2376 * gdbthread.h: Likewise.
2377 * lynx-low.h: Likewise.
2378 * notif.h: Likewise.
2379
2380 2014-07-30 Gary Benson <gbenson@redhat.com>
2381
2382 * server.h: Include common-defs.h.
2383 Do not include config.h or build-gnulib-gdbserver/config.h.
2384
2385 2014-07-30 Gary Benson <gbenson@redhat.com>
2386
2387 * hostio-errno.c: Move server.h to top of includes list.
2388 * inferiors.c: Likewise.
2389 * linux-x86-low.c: Likewise.
2390 * notif.c: Include server.h.
2391
2392 2014-07-24 Tom Tromey <tromey@redhat.com>
2393 Gary Benson <gbenson@redhat.com>
2394
2395 * server.h (CORE_ADDR): Now unsigned.
2396
2397 2014-07-16 Pedro Alves <palves@redhat.com>
2398
2399 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2400
2401 2014-07-15 Pedro Alves <palves@redhat.com>
2402
2403 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2404 copy.
2405
2406 2014-07-11 Pedro Alves <palves@redhat.com>
2407
2408 * linux-low.c (kill_wait_lwp): New function, based on
2409 kill_one_lwp_callback, but use my_waitpid directly.
2410 (kill_one_lwp_callback, linux_kill): Use it.
2411
2412 2014-06-23 Pedro Alves <palves@redhat.com>
2413
2414 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2415 before setting DR0..DR3.
2416
2417 2014-06-20 Gary Benson <gbenson@redhat.com>
2418
2419 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2420 * configure: Regenerated.
2421 * config.in: Likewise.
2422
2423 2014-06-20 Gary Benson <gbenson@redhat.com>
2424
2425 * Makefile.in (SFILES): Update locations for files moved
2426 from common to nat.
2427 (object file files): Reordered.
2428
2429 2014-06-20 Gary Benson <gbenson@redhat.com>
2430
2431 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2432 (i386_dr_low_set_addr): Likewise.
2433 (i386_dr_low_get_addr): Likewise.
2434 (i386_dr_low_can_set_control): Likewise.
2435 (i386_dr_low_set_control): Likewise.
2436 (i386_dr_low_get_control): Likewise.
2437 (i386_dr_low_get_status): Likewise.
2438 (i386_get_debug_register_length): Likewise.
2439 * linux-x86-low.c (i386_dr_low_set_addr):
2440 Changed signature. Made static.
2441 (i386_dr_low_get_addr): Likewise.
2442 (i386_dr_low_set_control): Likewise.
2443 (i386_dr_low_get_control): Likewise.
2444 (i386_dr_low_get_status): Likewise.
2445 (i386_dr_low): New global variable.
2446 * win32-i386-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
2454 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2455
2456 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2457 * Makefile.in (AR, AR_FLAGS): Define.
2458 * configure: Regenerate.
2459
2460 2014-06-19 Gary Benson <gbenson@redhat.com>
2461
2462 * Makefile.in (i386-dregs.o): New rule.
2463 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2464 * i386-low.c (target.h): Remove include.
2465 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2466 (DR_CONTROL_SHIFT): Likewise.
2467 (DR_CONTROL_SIZE): Likewise.
2468 (DR_RW_EXECUTE): Likewise.
2469 (DR_RW_WRITE): Likewise.
2470 (DR_RW_READ): Likewise.
2471 (DR_RW_IORW): Likewise.
2472 (DR_LEN_1): Likewise.
2473 (DR_LEN_2): Likewise.
2474 (DR_LEN_4): Likewise.
2475 (DR_LEN_8): Likewise.
2476 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2477 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2478 (DR_ENABLE_SIZE): Likewise.
2479 (DR_LOCAL_SLOWDOWN): Likewise.
2480 (DR_GLOBAL_SLOWDOWN): Likewise.
2481 (DR_CONTROL_RESERVED): Likewise.
2482 (I386_DR_CONTROL_MASK): Likewise.
2483 (I386_DR_VACANT): Likewise.
2484 (I386_DR_LOCAL_ENABLE): Likewise.
2485 (I386_DR_GLOBAL_ENABLE): Likewise.
2486 (I386_DR_DISABLE): Likewise.
2487 (I386_DR_SET_RW_LEN): Likewise.
2488 (I386_DR_GET_RW_LEN): Likewise.
2489 (I386_DR_WATCH_HIT): Likewise.
2490 (i386_wp_op_t): Likewise.
2491 (i386_show_dr): Likewise.
2492 (i386_length_and_rw_bits): Likewise.
2493 (i386_insert_aligned_watchpoint): Likewise.
2494 (i386_remove_aligned_watchpoint): Likewise.
2495 (i386_handle_nonaligned_watchpoint): Likewise.
2496 i386_update_inferior_debug_regs(): Likewise.
2497 (i386_dr_insert_watchpoint): Likewise.
2498 (i386_dr_remove_watchpoint): Likewise.
2499 (i386_dr_region_ok_for_watchpoint): Likewise.
2500 (i386_dr_stopped_data_address): Likewise.
2501 (i386_dr_stopped_by_watchpoint): Likewise.
2502
2503 2014-06-19 Gary Benson <gbenson@redhat.com>
2504
2505 * i386-low.c (i386_dr_show): Renamed to
2506 i386_show_dr and made static. All uses updated.
2507 (i386_dr_length_and_rw_bits): Renamed to
2508 i386_length_and_rw_bits and made static.
2509 All uses updated.
2510 (i386_dr_insert_aligned_watchpoint): Renamed to
2511 i386_insert_aligned_watchpoint and made static.
2512 All uses updated.
2513 (i386_dr_remove_aligned_watchpoint): Renamed to
2514 i386_remove_aligned_watchpoint and made static.
2515 All uses updated.
2516 (i386_dr_update_inferior_debug_regs): Renamed to
2517 i386_update_inferior_debug_regs and made static.
2518 All uses updated.
2519
2520 2014-06-18 Gary Benson <gbenson@redhat.com>
2521
2522 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2523 (i386_dr_low_can_set_control): Likewise.
2524 (i386_get_debug_register_length): Likewise.
2525 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2526 (i386_dr_low_can_set_control): Likewise.
2527 (i386_get_debug_register_length): Likewise.
2528
2529 2014-06-17 Gary Benson <gbenson@redhat.com>
2530
2531 * i386-low.h (i386-dregs.h): New include.
2532 (DR_FIRSTADDR): Now in i386-dregs.h.
2533 (DR_LASTADDR): Likewise.
2534 (DR_NADDR): Likewise.
2535 (DR_STATUS): Likewise.
2536 (DR_CONTROL): Likewise.
2537 (i386_debug_reg_state): Likewise.
2538 (i386_dr_insert_watchpoint): Likewise.
2539 (i386_dr_remove_watchpoint): Likewise.
2540 (i386_dr_region_ok_for_watchpoint): Likewise.
2541 (i386_dr_stopped_data_address): Likewise.
2542 (i386_dr_stopped_by_watchpoint): Likewise.
2543 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2544
2545 2014-06-18 Gary Benson <gbenson@redhat.com>
2546
2547 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2548 i386_dr_insert_watchpoint.
2549 (i386_low_remove_watchpoint): Renamed to
2550 i386_dr_remove_watchpoint.
2551 (i386_low_region_ok_for_watchpoint): Renamed to
2552 i386_dr_region_ok_for_watchpoint.
2553 (i386_low_stopped_data_address): Renamed to
2554 i386_dr_stopped_data_address.
2555 (i386_low_stopped_by_watchpoint): Renamed to
2556 i386_dr_stopped_by_watchpoint.
2557 * i386-low.c (i386_show_dr): Renamed to
2558 i386_dr_show and made nonstatic. All uses updated.
2559 (i386_length_and_rw_bits): Renamed to
2560 i386_dr_length_and_rw_bits and made nonstatic.
2561 All uses updated.
2562 (i386_insert_aligned_watchpoint): Renamed to
2563 i386_dr_insert_aligned_watchpoint and made nonstatic.
2564 All uses updated.
2565 (i386_remove_aligned_watchpoint): Renamed to
2566 i386_dr_remove_aligned_watchpoint and made nonstatic.
2567 All uses updated.
2568 (i386_update_inferior_debug_regs): Renamed to
2569 i386_dr_update_inferior_debug_regs and made nonstatic.
2570 All uses updated.
2571 (i386_low_insert_watchpoint): Renamed to
2572 i386_dr_insert_watchpoint. All uses updated.
2573 (i386_low_remove_watchpoint): Renamed to
2574 i386_dr_remove_watchpoint. All uses updated.
2575 (i386_low_region_ok_for_watchpoint): Renamed to
2576 i386_dr_region_ok_for_watchpoint. All uses updated.
2577 (i386_low_stopped_data_address): Renamed to
2578 i386_dr_stopped_data_address. All uses updated.
2579 (i386_low_stopped_by_watchpoint): Renamed to
2580 i386_dr_stopped_by_watchpoint. All uses updated.
2581
2582 2014-06-18 Gary Benson <gbenson@redhat.com>
2583
2584 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2585 (i386_dr_low_can_set_control): Likewise.
2586 (i386_insert_aligned_watchpoint): New check.
2587
2588 2014-06-18 Gary Benson <gbenson@redhat.com>
2589
2590 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2591 Renamed to state.
2592
2593 2014-06-18 Gary Benson <gbenson@redhat.com>
2594
2595 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2596 instead of fatal and error.
2597 (i386_handle_nonaligned_watchpoint): Likewise.
2598
2599 2014-06-18 Gary Benson <gbenson@redhat.com>
2600
2601 * i386-low.c (i386_get_debug_register_length): New macro.
2602 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2603 (i386_show_dr): Use debug_printf instead of fprintf. Use
2604 phex to format values.
2605
2606 2014-06-18 Gary Benson <gbenson@redhat.com>
2607
2608 * i386-low.h: Comment changes.
2609 * i386-low.c: Likewise.
2610
2611 2014-06-18 Gary Benson <gbenson@redhat.com>
2612
2613 * i386-low.c: Whitespace changes.
2614
2615 2014-06-12 Tom Tromey <tromey@redhat.com>
2616
2617 * utils.c (freeargv): Remove.
2618
2619 2014-06-12 Tom Tromey <tromey@redhat.com>
2620
2621 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2622 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2623 (parse_debug_format_options): Likewise.
2624 (gdbserver_usage): Likewise.
2625 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2626 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2627 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2628 against libiberty.
2629 ($(LIBGNU)): Depend on libiberty.
2630 (all-lib): Recurse into all subdirs.
2631 (install-only): Invoke "install" target in subdirs.
2632 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2633 targets.
2634 * configure: Rebuild.
2635 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2636 for vasprintf, vsnprintf, or gettimeofday.
2637 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2638 srv_tgtobj.
2639
2640 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2641
2642 * development.sh: Delete.
2643 * Makefile.in (config.status): Adjust dependency on development.sh.
2644 * configure.ac: Adjust development.sh source call.
2645 * configure: Regenerate.
2646
2647 2014-06-02 Pedro Alves <palves@redhat.com>
2648
2649 * ax.c (gdb_free_agent_expr): New function.
2650 * ax.h (gdb_free_agent_expr): New declaration.
2651 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2652 list.
2653 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2654 static.
2655 (clear_breakpoint_conditions_and_commands): New function.
2656 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2657 (clear_breakpoint_conditions_and_commands): New declaration.
2658
2659 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2660
2661 * linux-aarch64-low.c (asm/ptrace.h): Include.
2662
2663 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2664
2665 Fix TLS access for -static -pthread.
2666 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2667 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2668 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2669
2670 2014-05-20 Pedro Alves <palves@redhat.com>
2671
2672 * linux-aarch64-low.c (aarch64_insert_point)
2673 (aarch64_remove_point): No longer check whether the type is
2674 supported here. Adjust to new interface.
2675 (the_low_target): Install aarch64_supports_z_point_type as
2676 supports_z_point_type method.
2677 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2678 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2679 instead of a Z packet char. Adjust.
2680 (arm_supports_z_point_type): New function.
2681 (arm_insert_point, arm_remove_point): Adjust to new interface.
2682 (the_low_target): Install arm_supports_z_point_type.
2683 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2684 (cris_insert_point, cris_remove_point): Adjust to new interface.
2685 Don't check whether the type is supported here.
2686 (the_low_target): Install cris_supports_z_point_type.
2687 * linux-low.c (linux_supports_z_point_type): New function.
2688 (linux_insert_point, linux_remove_point): Adjust to new interface.
2689 * linux-low.h (struct linux_target_ops) <insert_point,
2690 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2691 raw_breakpoint pointer parameter.
2692 <supports_z_point_type>: New method.
2693 * linux-mips-low.c (mips_supports_z_point_type): New function.
2694 (mips_insert_point, mips_remove_point): Adjust to new interface.
2695 Use mips_supports_z_point_type.
2696 (the_low_target): Install mips_supports_z_point_type.
2697 * linux-ppc-low.c (the_low_target): Install NULL as
2698 supports_z_point_type method.
2699 * linux-s390-low.c (the_low_target): Install NULL as
2700 supports_z_point_type method.
2701 * linux-sparc-low.c (the_low_target): Install NULL as
2702 supports_z_point_type method.
2703 * linux-x86-low.c (x86_supports_z_point_type): New function.
2704 (x86_insert_point): Adjust to new insert_point interface. Use
2705 insert_memory_breakpoint. Adjust to new
2706 i386_low_insert_watchpoint interface.
2707 (x86_remove_point): Adjust to remove_point interface. Use
2708 remove_memory_breakpoint. Adjust to new
2709 i386_low_remove_watchpoint interface.
2710 (the_low_target): Install x86_supports_z_point_type.
2711 * lynx-low.c (lynx_target_ops): Install NULL as
2712 supports_z_point_type callback.
2713 * nto-low.c (nto_supports_z_point_type): New.
2714 (nto_insert_point, nto_remove_point): Adjust to new interface.
2715 (nto_target_ops): Install nto_supports_z_point_type.
2716 * mem-break.c: Adjust intro comment.
2717 (struct raw_breakpoint) <raw_type, size>: New fields.
2718 <inserted>: Update comment.
2719 <shlib_disabled>: Delete field.
2720 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2721 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2722 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2723 (raw_bkpt_type_to_target_hw_bp_type): New function.
2724 (find_enabled_raw_code_breakpoint_at): New function.
2725 (find_raw_breakpoint_at): New type and size parameters. Use them.
2726 (insert_memory_breakpoint): New function, based off
2727 set_raw_breakpoint_at.
2728 (remove_memory_breakpoint): New function.
2729 (set_raw_breakpoint_at): Reimplement.
2730 (set_breakpoint): New, based on set_breakpoint_at.
2731 (set_breakpoint_at): Reimplement.
2732 (delete_raw_breakpoint): Go through the_target->remove_point
2733 instead of assuming memory breakpoints.
2734 (find_gdb_breakpoint_at): Delete.
2735 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2736 (find_gdb_breakpoint): New function.
2737 (set_gdb_breakpoint_at): Delete.
2738 (z_type_supported): New function.
2739 (set_gdb_breakpoint_1): New function, loosely based off
2740 set_gdb_breakpoint_at.
2741 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2742 (delete_gdb_breakpoint_at): Delete.
2743 (delete_gdb_breakpoint_1): New function, loosely based off
2744 delete_gdb_breakpoint_at.
2745 (delete_gdb_breakpoint): New function.
2746 (clear_gdb_breakpoint_conditions): Rename to ...
2747 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2748 breakpoint.
2749 (add_condition_to_breakpoint): Make static.
2750 (add_breakpoint_condition): Take a struct breakpoint pointer
2751 instead of an address. Adjust.
2752 (gdb_condition_true_at_breakpoint): Rename to ...
2753 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2754 z_type parameter.
2755 (gdb_condition_true_at_breakpoint): Reimplement.
2756 (add_breakpoint_commands): Take a struct breakpoint pointer
2757 instead of an address. Adjust.
2758 (gdb_no_commands_at_breakpoint): Rename to ...
2759 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2760 parameter. Return true if no breakpoint was found. Change debug
2761 output.
2762 (gdb_no_commands_at_breakpoint): Reimplement.
2763 (run_breakpoint_commands): Rename to ...
2764 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2765 and change return type to boolean.
2766 (run_breakpoint_commands): New function.
2767 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2768 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2769 breakpoint. Go through the_target->remove_point instead of
2770 assuming memory breakpoint.
2771 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2772 software and hardware breakpoints.
2773 (reinsert_raw_breakpoint): Go through the_target->insert_point
2774 instead of assuming memory breakpoint.
2775 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2776 software and hardware breakpoints.
2777 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2778 Check both software and hardware breakpoints.
2779 (validate_inserted_breakpoint): Assert the breakpoint is a
2780 software breakpoint. Set the inserted flag to -1 instead of
2781 setting shlib_disabled.
2782 (delete_disabled_breakpoints): Adjust.
2783 (validate_breakpoints): Only validate software breakpoints.
2784 Adjust to inserted flag change.
2785 (check_mem_read, check_mem_write): Skip breakpoint types other
2786 than software breakpoints. Adjust to inserted flag change.
2787 * mem-break.h (enum raw_bkpt_type): New enum.
2788 (raw_breakpoint, struct process_info): Forward declare.
2789 (Z_packet_to_target_hw_bp_type): Delete declaration.
2790 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2791 (set_gdb_breakpoint, delete_gdb_breakpoint)
2792 (clear_breakpoint_conditions): New declarations.
2793 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2794 (breakpoint_inserted_here): Update comment.
2795 (add_breakpoint_condition, add_breakpoint_commands): Replace
2796 address parameter with a breakpoint pointer parameter.
2797 (gdb_breakpoint_here): Update comment.
2798 (delete_gdb_breakpoint_at): Delete.
2799 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2800 * server.c (process_point_options): Take a struct breakpoint
2801 pointer instead of an address. Adjust.
2802 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2803 delete_gdb_breakpoint.
2804 * spu-low.c (spu_target_ops): Install NULL as
2805 supports_z_point_type method.
2806 * target.h: Include mem-break.h.
2807 (struct target_ops) <prepare_to_access_memory>: Update comment.
2808 <supports_z_point_type>: New field.
2809 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2810 instead of a char. Also take a raw breakpoint pointer.
2811 * win32-arm-low.c (the_low_target): Install NULL as
2812 supports_z_point_type.
2813 * win32-i386-low.c (i386_supports_z_point_type): New function.
2814 (i386_insert_point, i386_remove_point): Adjust to new interface.
2815 (the_low_target): Install i386_supports_z_point_type.
2816 * win32-low.c (win32_supports_z_point_type): New function.
2817 (win32_insert_point, win32_remove_point): Adjust to new interface.
2818 (win32_target_ops): Install win32_supports_z_point_type.
2819 * win32-low.h (struct win32_target_ops):
2820 <supports_z_point_type>: New method.
2821 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2822 instead of a char. Also take a raw breakpoint pointer.
2823
2824 2014-05-20 Pedro Alves <palves@redhat.com>
2825
2826 * mem-break.h: Include break-common.h.
2827 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2828 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2829 (Z_packet_to_target_hw_bp_type): New declaration.
2830 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2831 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2832 (Z_PACKET_ACCESS_WP): Delete macros.
2833 (Z_packet_to_hw_type): Delete function.
2834 * i386-low.h: Don't include break-common.h here.
2835 (Z_packet_to_hw_type): Delete declaration.
2836 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2837 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2838 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2839 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2840 * linux-aarch64-low.c: Don't include break-common.h here.
2841 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2842 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2843 (Z_packet_to_target_hw_bp_type): Delete function.
2844 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2845 function.
2846 (mips_insert_point, mips_remove_point): Use
2847 Z_packet_to_target_hw_bp_type.
2848
2849 2014-05-20 Pedro Alves <palves@redhat.com>
2850
2851 * linux-aarch64-low.c: Include break-common.h.
2852 (enum target_point_type): Delete.
2853 (Z_packet_to_point_type): Rename to ...
2854 (Z_packet_to_target_hw_bp_type): ... this, and return a
2855 target_hw_bp_type instead.
2856 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2857 instead of an enum target_point_type.
2858 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2859 breakpoint type.
2860 (aarch64_dr_state_insert_one_point)
2861 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2862 (aarch64_handle_aligned_watchpoint)
2863 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2864 Take an enum target_hw_bp_type instead of an enum
2865 target_point_type.
2866 (aarch64_supports_z_point_type): New function.
2867 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2868 use Z_packet_to_target_hw_bp_type.
2869
2870 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2871
2872 * configure.ac: Only use -Werror by default when DEVELOPMENT
2873 is true.
2874 * configure: Regenerate.
2875
2876 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2877
2878 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2879 * linux-x86-low.c (X86_64_USER_REGS): New.
2880 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2881
2882 2014-04-28 Yao Qi <yao@codesourcery.com>
2883
2884 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2885 name.
2886
2887 2014-04-25 Pedro Alves <palves@redhat.com>
2888
2889 PR server/16255
2890 * linux-low.c (linux_attach_fail_reason_string): New function.
2891 (linux_attach_lwp): Delete.
2892 (linux_attach_lwp_1): Rename to ...
2893 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2894 argument. Remove "initial" parameter. Return int instead of
2895 void. Don't error or warn here.
2896 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2897 failure to attach to the tgid. Call warning when failing to
2898 attach to an lwp.
2899 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2900 argument. Remove "initial" parameter. Return int instead of
2901 void. Don't error or warn here.
2902 (linux_attach_fail_reason_string): New declaration.
2903 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2904 interface change. Use linux_attach_fail_reason_string.
2905
2906 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2907 Walfred Tedeschi <walfred.tedeschi@intel.com>
2908
2909 * Makefile.in: Added rules to handle new files
2910 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2911 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2912 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2913 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2914 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2915 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2916 x32-avx512-linux.o.
2917 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2918 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2919 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2920 i386/x32-avx512.xml.
2921 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2922 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2923 i386/x32-avx512-linux.xml.
2924 * i387-fp.c (num_avx512_k_registers): New constant for number
2925 of K registers.
2926 (num_avx512_zmmh_low_registers): New constant for number of
2927 lower ZMM registers (0-15).
2928 (num_avx512_zmmh_high_registers): New constant for number of
2929 higher ZMM registers (16-31).
2930 (num_avx512_ymmh_registers): New contant for number of higher
2931 YMM registers (ymm16-31 added by avx521 on x86_64).
2932 (num_avx512_xmm_registers): New constant for number of higher
2933 XMM registers (xmm16-31 added by AVX512 on x86_64).
2934 (struct i387_xsave): Add space for AVX512 registers.
2935 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2936 Add code to handle AVX512 registers.
2937 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2938 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2939 prototypei from generated file.
2940 (tdesc_amd64_avx512_linux): Likewise.
2941 (init_registers_x32_avx512_linux): Likewise.
2942 (tdesc_x32_avx512_linux): Likewise.
2943 (init_registers_i386_avx512_linux): Likewise.
2944 (tdesc_i386_avx512_linux): Likewise.
2945 (x86_64_regmap): Add AVX512 registers.
2946 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2947 mask.
2948 (initialize_low_arch): Add code to initialize AVX512 registers.
2949
2950 2014-04-23 Pedro Alves <palves@redhat.com>
2951
2952 * mem-break.c (find_gdb_breakpoint_at): Make static.
2953 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2954
2955 2014-04-23 Pedro Alves <palves@redhat.com>
2956
2957 * i386-low.c: Don't include break-common.h here.
2958 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2959 prototype to take target_hw_bp_type as argument instead of a Z
2960 packet char.
2961 * i386-low.h: Include break-common.h here.
2962 (Z_packet_to_hw_type): Declare.
2963 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2964 prototypes.
2965 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2966 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2967 (x86_remove_point): Convert the packet number to a
2968 target_hw_bp_type before calling i386_low_remove_watchpoint.
2969 * win32-i386-low.c (i386_insert_point): Convert the packet number
2970 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2971 (i386_remove_point): Convert the packet number to a
2972 target_hw_bp_type before calling i386_low_remove_watchpoint.
2973
2974 2014-04-23 Pedro Alves <palves@redhat.com>
2975
2976 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2977
2978 2014-04-10 Pedro Alves <palves@redhat.com>
2979
2980 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2981 Check if the condition or command is NULL before checking if the
2982 breakpoint is known. On success, return true.
2983 * mem-break.h (add_breakpoint_condition): Document return.
2984 (add_breakpoint_commands): Add describing comment.
2985 * server.c (skip_to_semicolon): New function.
2986 (process_point_options): Use it.
2987
2988 2014-04-09 Pedro Alves <palves@redhat.com>
2989
2990 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2991 to lwpid_of.
2992
2993 2014-02-27 Pedro Alves <palves@redhat.com>
2994
2995 PR 12702
2996 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2997 macros.
2998 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2999 output.
3000 (last_thread_of_process_p): Take a PID argument instead of a
3001 thread pointer.
3002 (linux_wait_for_lwp): Delete.
3003 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3004 functions.
3005 (linux_low_filter_event): New function, party factored out from
3006 linux_wait_for_event.
3007 (linux_wait_for_event): Rename to ...
3008 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3009 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3010 sigsuspend. Check for zombie leaders.
3011 (linux_wait_for_event): Reimplement as wrapper around
3012 linux_wait_for_event_filtered.
3013 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3014 a normal or signal exit is seen, it's the whole process exiting.
3015 (wait_for_sigstop): No longer a for_each_inferior callback.
3016 Rewrite on top of linux_wait_for_event_filtered.
3017 (stop_all_lwps): Call wait_for_sigstop directly.
3018 * server.c (resume, handle_target_event): Handle
3019 TARGET_WAITKIND_NO_RESUMED.
3020
3021 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3022
3023 * win32-low.c (psapi_get_dll_name,
3024 * win32_CreateToolhelp32Snapshot): Delete.
3025 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3026 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3027 Delete.
3028 (handle_load_dll): Add function description.
3029 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3030
3031 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3032
3033 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3034 Add comment.
3035 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3036 base address when calling win32_add_one_solib.
3037 (handle_load_dll): Delete local variable load_addr.
3038 Remove 0x1000 offset applied to DLL base address when calling
3039 win32_add_one_solib.
3040 (handle_unload_dll): Add comment.
3041
3042 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3043
3044 * win32-low.c (win32_add_all_dlls): Renames
3045 win32_ensure_ntdll_loaded. Rewrite function documentation.
3046 Adjust implementation to always load all DLLs.
3047 Add 0x1000 offset to DLL base address when calling
3048 win32_add_one_solib.
3049 (child_initialization_done): New static global.
3050 (do_initial_child_stuff): Set child_initialization_done to
3051 zero during child initialization, and 1 after. Replace call
3052 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3053 Add comment.
3054 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3055 (handle_unload_dll): Add function documentation.
3056 (get_child_debug_event): Ignore load and unload DLL events
3057 during child initialization.
3058
3059 2014-02-20 Doug Evans <dje@google.com>
3060
3061 Remove global all_lwps.
3062 * inferiors.h (ptid_of): Move here from linux-low.h.
3063 (pid_of, lwpid_of): Ditto.
3064 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3065 parameter is a struct thread_info * now.
3066 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3067 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3068 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3069 directly.
3070 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3071 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3072 * linux-arm-low.c (update_registers_callback): Update, "entry"
3073 parameter is a struct thread_info * now.
3074 Fetch lwpid from current_inferior directly.
3075 (arm_insert_point): Pass &all_threads to find_inferior instead of
3076 &all_lwps.
3077 (arm_remove_point): Ditto.
3078 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3079 (arm_prepare_to_resume): Fetch pid from thread.
3080 (arm_read_description): Fetch lwpid from current_inferior directly.
3081 * linux-low.c (all_lwps): Delete.
3082 (delete_lwp): Delete call to remove_inferior.
3083 (handle_extended_wait): Fetch lwpid from thread.
3084 (add_lwp): Don't set lwp->entry.id. Remove call to
3085 add_inferior_to_list.
3086 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3087 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3088 (kill_one_lwp_callback): Ditto.
3089 (linux_kill): Don't dereference NULL pointer.
3090 Fetch ptid,lwpid from thread.
3091 (get_detach_signal): Fetch ptid from thread.
3092 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3093 Simplify call to regcache_invalidate_thread.
3094 (delete_lwp_callback): Update, "entry" parameter is a
3095 struct thread_info * now. Fetch pid from thread.
3096 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3097 (status_pending_p_callback): Update, "entry" parameter is a
3098 struct thread_info * now. Fetch ptid from thread.
3099 (find_lwp_pid): Update, "entry" parameter is a
3100 struct thread_info * now.
3101 (linux_wait_for_lwp): Fetch pid from thread.
3102 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3103 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3104 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3105 (dequeue_one_deferred_signal): Ditto.
3106 (cancel_breakpoint): Fetch ptid from current_inferior.
3107 (linux_wait_for_event): Pass &all_threads to find_inferior,
3108 not &all_lwps. Fetch ptid, lwpid from thread.
3109 (count_events_callback): Update, "entry" parameter is a
3110 struct thread_info * now.
3111 (select_singlestep_lwp_callback): Ditto.
3112 (select_event_lwp_callback): Ditto.
3113 (cancel_breakpoints_callback): Ditto.
3114 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3115 not &all_lwps.
3116 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3117 (unsuspend_one_lwp): Update, "entry" parameter is a
3118 struct thread_info * now.
3119 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3120 not &all_lwps.
3121 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3122 Fetch lwpid from thread, not lwp.
3123 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3124 Pass &all_threads to find_inferior, not &all_lwps.
3125 (send_sigstop): Fetch lwpid from thread, not lwp.
3126 (send_sigstop_callback): Update, "entry" parameter is a
3127 struct thread_info * now.
3128 (suspend_and_send_sigstop_callback): Ditto.
3129 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3130 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3131 struct thread_info * now.
3132 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3133 from thread, lwp.
3134 (lwp_running): Update, "entry" parameter is a
3135 struct thread_info * now.
3136 (stop_all_lwps): Fetch ptid from thread.
3137 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3138 (linux_resume_one_lwp): Fetch lwpid from thread.
3139 (linux_set_resume_request): Update, "entry" parameter is a
3140 struct thread_info * now. Fetch pid, lwpid from thread.
3141 (resume_status_pending_p): Update, "entry" parameter is a
3142 struct thread_info * now.
3143 (need_step_over_p): Ditto. Fetch lwpid from thread.
3144 (start_step_over): Fetch lwpid from thread.
3145 (linux_resume_one_thread): Update, "entry" parameter is a
3146 struct thread_info * now. Fetch lwpid from thread.
3147 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3148 (proceed_one_lwp): Update, "entry" parameter is a
3149 struct thread_info * now. Fetch lwpid from thread.
3150 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3151 struct thread_info * now.
3152 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3153 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3154 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3155 directly.
3156 (regsets_store_inferior_registers): Ditto.
3157 (fetch_register, store_register): Ditto.
3158 (linux_read_memory, linux_write_memory): Ditto.
3159 (linux_request_interrupt): Ditto.
3160 (linux_read_auxv): Ditto.
3161 (linux_xfer_siginfo): Ditto.
3162 (linux_qxfer_spu): Ditto.
3163 (linux_qxfer_libraries_svr4): Ditto.
3164 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3165 moved to inferiors.h.
3166 (get_lwp): Delete.
3167 (get_thread_lwp): Update.
3168 (struct lwp_info): Delete member "entry". Simplify comment for
3169 member "thread".
3170 (all_lwps): Delete.
3171 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3172 current_inferior directly.
3173 (update_watch_registers_callback): Update, "entry" parameter is a
3174 struct thread_info * now. Fetch pid from thread.
3175 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3176 (mips_insert_point): Fetch lwpid from current_inferior.
3177 Pass &all_threads to find_inferior, not &all_lwps.
3178 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3179 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3180 directly.
3181 (mips_stopped_data_address): Ditto.
3182 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3183 directly.
3184 * linux-tile-low.c (tile_arch_setup): Ditto.
3185 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3186 (update_debug_registers_callback): Update, "entry" parameter is a
3187 struct thread_info * now. Fetch pid from thread.
3188 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3189 Pass &all_threads to find_inferior, not &all_lwps.
3190 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3191 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3192 Pass &all_threads to find_inferior, not &all_lwps.
3193 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3194 (i386_dr_low_get_status): Ditto.
3195 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3196 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3197 (x86_linux_read_description): Ditto.
3198 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3199
3200 2014-02-20 Doug Evans <dje@google.com>
3201
3202 * inferiors.c (get_first_inferior): Fix buglet.
3203
3204 2014-02-19 Doug Evans <dje@google.com>
3205
3206 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3207 * inferiors.c (add_thread): Change result type to struct thread_info *.
3208 All callers updated.
3209 (add_lwp): Call add_thread here instead of in callers.
3210 All callers updated.
3211 * linux-low.h (get_lwp_thread): Rewrite.
3212 (struct lwp_info): New member "thread".
3213
3214 2014-02-19 Doug Evans <dje@google.com>
3215
3216 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3217 All callers updated.
3218
3219 2014-02-19 Doug Evans <dje@google.com>
3220
3221 * inferiors.c (add_thread): Fix whitespace.
3222
3223 2014-02-19 Doug Evans <dje@google.com>
3224
3225 * dll.c (clear_dlls): Replace accessing list implemention details
3226 with API function.
3227 * gdbthread.h (get_first_thread): Declare.
3228 * inferiors.c (for_each_inferior_with_data): New function.
3229 (get_first_thread): New function.
3230 (find_thread_ptid): Simplify.
3231 (get_first_inferior): New function.
3232 (clear_list): Delete.
3233 (one_inferior_p): New function.
3234 (clear_inferior_list): New function.
3235 (clear_inferiors): Update.
3236 * inferiors.h (for_each_inferior_with_data): Declare.
3237 (clear_inferior_list): Declare.
3238 (one_inferior_p): Declare.
3239 (get_first_inferior): Declare.
3240 * linux-low.c (linux_wait_for_event): Replace accessing list
3241 implemention details with API function.
3242 * server.c (target_running): Ditto.
3243 (accumulate_file_name_length): New function.
3244 (emit_dll_description): New function.
3245 (handle_qxfer_libraries): Replace accessing list implemention
3246 details with API function.
3247 (handle_qxfer_threads_worker): New function.
3248 (handle_qxfer_threads_proper): Replace accessing list implemention
3249 details with API function.
3250 (handle_query): Ditto.
3251 (visit_actioned_threads_callback_ftype): New typedef.
3252 (visit_actioned_threads_data): New struct.
3253 (visit_actioned_threads): Rewrite to be find_inferior callback.
3254 (resume): Call find_inferior.
3255 (handle_status): Replace accessing list implemention
3256 details with API function.
3257 (process_serial_event): Replace accessing list implemention details
3258 with API function.
3259 * target.c (set_desired_inferior): Replace accessing list implemention
3260 details with API function.
3261 * tracepoint.c (same_process_p): New function.
3262 (gdb_agent_about_to_close): Replace accessing list implemention
3263 details with API function.
3264 * win32-low.c (child_delete_thread): Replace accessing list
3265 implemention details with API function.
3266 (match_dll_by_basename): New function.
3267 (dll_is_loaded_by_basename): New function.
3268 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3269 details call to dll_is_loaded_by_basename.
3270
3271 2014-02-19 Doug Evans <dje@google.com>
3272
3273 * dll.h (struct dll_info): Add comment.
3274 * gdbthread.h (struct thread_info): Add comment.
3275 (current_ptid): Simplify.
3276 * inferiors.c (add_process): Update.
3277 (remove_process): Update.
3278 * inferiors.h (struct process_info): Rename member "head" to "entry".
3279 * linux-low.c (delete_lwp): Update.
3280 (add_lwp): Update.
3281 (last_thread_of_process_p): Update.
3282 (kill_one_lwp_callback, linux_kill): Update.
3283 (status_pending_p_callback): Update.
3284 (wait_for_sigstop): Update. Simplify read of ptid.
3285 (start_step_over): Update.
3286 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3287 (get_lwp_thread): Update.
3288 (struct lwp_info): Rename member "head" to "entry".
3289 * regcache.h (inferior_list_entry): Delete.
3290 * server.c (kill_inferior_callback): Update.
3291 (detach_or_kill_inferior_callback): Update.
3292 (print_started_pid): Update.
3293 (print_attached_pid): Update.
3294 (process_serial_event): Simplify read of ptid.
3295 * thread-db.c (thread_db_create_event): Update.
3296 (thread_db_get_tls_address): Update.
3297 * win32-low.c (current_inferior_ptid): Simplify.
3298
3299 2014-02-19 Tom Tromey <tromey@redhat.com>
3300
3301 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3302 argument.
3303 (target_supports_btrace): Update.
3304
3305 2014-02-14 Yao Qi <yao@codesourcery.com>
3306
3307 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3308 (rsp-low-ipa.o): New target.
3309
3310 2014-02-12 Tom Tromey <tromey@redhat.com>
3311
3312 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3313 convert_ascii_to_int.
3314 * regcache.c (registers_to_string): Likewise.
3315 * remote-utils.c (decode_M_packet): Likewise.
3316 * server.c (process_serial_event): Likewise.
3317
3318 2014-02-12 Tom Tromey <tromey@redhat.com>
3319
3320 * server.c (handle_query, handle_v_run): Use hex2bin, not
3321 unhexify.
3322 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3323
3324 2014-02-12 Tom Tromey <tromey@redhat.com>
3325
3326 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3327 convert_int_to_ascii.
3328 * regcache.c (registers_to_string, collect_register_as_string):
3329 Likewise.
3330 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3331 Likewise.
3332 * server.c (process_serial_event): Likewise.
3333 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3334 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3335
3336 2014-02-12 Tom Tromey <tromey@redhat.com>
3337
3338 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3339 bin2hex, not hexify.
3340 * tracepoint.c (cmd_qtstatus): Likewise.
3341
3342 2014-02-12 Tom Tromey <tromey@redhat.com>
3343
3344 * remote-utils.c (monitor_output): Pass explicit length to
3345 hexify.
3346
3347 2014-02-12 Tom Tromey <tromey@redhat.com>
3348
3349 * tracepoint.c: Include rsp-low.h.
3350 * server.c: Include rsp-low.h.
3351 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3352 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3353 declare.
3354 * remote-utils.c: Include rsp-low.h.
3355 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3356 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3357 (convert_int_to_ascii, convert_ascii_to_int): Move to
3358 common/rsp-low.c.
3359 * regcache.c: Include rsp-low.h.
3360 * ax.c: Include rsp-low.h.
3361 * Makefile.in (SFILES): Add common/rsp-low.c.
3362 (OBS): Add rsp-low.o.
3363 (rsp-low.o): New target.
3364
3365 2014-02-12 Tom Tromey <tromey@redhat.com>
3366
3367 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3368 Include print-utils.h.
3369 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3370 (plongest, thirty_two, phex_nz): Remove.
3371 * Makefile.in (SFILES): Add common/print-utils.c.
3372 (OBS): Add print-utils.o.
3373 (print-utils-ipa.o): New target.
3374 (print-utils.o): New target.
3375 (IPA_OBJS): Add print-utils-ipa.o.
3376
3377 2014-02-06 Tom Tromey <tromey@redhat.com>
3378
3379 * Makefile.in (SFILES): Fix indentation.
3380
3381 2014-02-05 Doug Evans <dje@google.com>
3382
3383 * linux-low.c (linux_wait_for_event): Improve comment.
3384 (linux_wait_1): Keep current_inferior in sync with event_child.
3385
3386 2014-01-22 Doug Evans <dje@google.com>
3387
3388 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3389
3390 2014-01-22 Doug Evans <dje@google.com>
3391
3392 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3393 * configure: Regenerate.
3394 * config.in: Regenerate.
3395 * Makefile.in (SFILES): Add debug.c.
3396 (OBS): Add debug.o.
3397 * debug.c: New file.
3398 * debug.h: New file.
3399 * linux-aarch64-low.c (*): Update all debugging printfs to use
3400 debug_printf instead of fprintf.
3401 * linux-arm-low.c (*): Ditto.
3402 * linux-cris-low.c (*): Ditto.
3403 * linux-crisv32-low.c (*): Ditto.
3404 * linux-m32r-low.c (*): Ditto.
3405 * linux-sparc-low.c (*): Ditto.
3406 * linux-x86.c (*): Ditto.
3407 * linux-low.c (*): Ditto.
3408 (linux_wait_1): Add calls to debug_enter, debug_exit.
3409 (linux_wait): Remove redundant debugging printf.
3410 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3411 (linux_resume, unstop_all_lwps): Ditto.
3412 * mem-break.c (*): Update all debugging printfs to use
3413 debug_printf instead of fprintf.
3414 * remote-utils.c (*): Ditto.
3415 * thread-db.c (*): Ditto.
3416 * server.c #include <ctype.h>, "gdb_vecs.h".
3417 (debug_threads): Moved to debug.c.
3418 (*): Update all debugging printfs to use debug_printf instead of
3419 fprintf.
3420 (start_inferior): Replace call to fflush with call to debug_flush.
3421 (monitor_show_help): Mention set debug-format.
3422 (parse_debug_format_options): New function.
3423 (handle_monitor_command): Handle "monitor set debug-format".
3424 (gdbserver_usage): Mention --debug-format.
3425 (main): Parse --debug-format.
3426 * server.h (debug_threads): Declaration moved to debug.h.
3427 #include "debug.h".
3428 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3429 trace_debug_1 that uses debug_printf.
3430 (tracepoint_look_up_symbols): Update all debugging printfs to use
3431 debug_printf instead of fprintf.
3432
3433 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3434
3435 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3436 sys/ptrace.h.
3437
3438 2014-01-17 Pedro Alves <palves@redhat.com>
3439
3440 PR build/16445
3441 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3442 defined after including gdb_proc_service.h.
3443
3444 2014-01-16 Doug Evans <dje@google.com>
3445
3446 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3447 (match_dll): Use it.
3448
3449 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3450
3451 * target.h (target_ops) <read_btrace>: Change parameters and
3452 return type to allow error reporting.
3453 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3454 trace reading errors on.
3455 * linux-low.c (linux_low_read_btrace): Pass trace reading
3456 errors on.
3457 (linux_low_disable_btrace): New.
3458
3459 2014-01-15 Doug Evans <dje@google.com>
3460
3461 * inferiors.c (thread_id_to_gdb_id): Delete.
3462 * inferiors.h (thread_id_to_gdb_id): Delete.
3463
3464 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3465
3466 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3467 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3468 versions.
3469
3470 2014-01-08 Pedro Alves <palves@redhat.com>
3471
3472 * server.c (handle_status): Don't discard previous queued stop
3473 replies or thread's pending status here.
3474 (main) <disconnection>: Do it here instead.
3475
3476 2014-01-08 Pedro Alves <palves@redhat.com>
3477
3478 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3479 * server.c (visit_actioned_threads, handle_pending_status): New
3480 function.
3481 (handle_v_cont): Factor out parts to ...
3482 (resume): ... this new function. If in all-stop, and a thread
3483 being resumed has a pending status, report it without actually
3484 resuming.
3485 (myresume): Adjust to use the new 'resume' function.
3486 (clear_pending_status_callback, set_pending_status_callback)
3487 (find_status_pending_thread_callback): New functions.
3488 (handle_status): Handle the case of multiple threads having
3489 interesting statuses to report. Report threads' real last signal
3490 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3491 with an interesting thread to report the status for, instead of
3492 always reporting the status of the first thread.
3493
3494 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3495
3496 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3497 * gdbreplay.c (gdbreplay_version): Likewise.
3498
3499 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3500
3501 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3502 iov.iov_len with the real length in use.
3503
3504 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3505
3506 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3507 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3508 for all targets that use win32-low.c.
3509 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3510 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3511
3512 2013-12-13 Pedro Alves <palves@redhat.com>
3513
3514 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3515 if equal to TARGET_WAITKIND_LOADED.
3516 * win32-low.c (cached_status): New static global.
3517 (win32_wait): Add declaration.
3518 (do_initial_child_stuff): Flush all initial pending debug events
3519 up to the initial breakpoint.
3520 (win32_wait): If CACHED_STATUS was set, return that instead
3521 of doing a real wait. Remove the code resuming the execution
3522 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3523 during the initial phase. Also remove the code changing
3524 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3525 TARGET_WAITKIND_STOPPED.
3526
3527 2013-12-11 Yao Qi <yao@codesourcery.com>
3528
3529 * notif.c (handle_notif_ack): Return 0 if no notification
3530 matches.
3531
3532 2013-11-20 Doug Evans <dje@google.com>
3533
3534 * linux-low.c (linux_set_resume_request): Fix comment.
3535
3536 2013-11-20 Doug Evans <dje@google.com>
3537
3538 * linux-low.c (resume_status_pending_p): Tweak comment.
3539
3540 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3541
3542 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3543 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3544 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3545 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3546 (srv_amd64_regobj): Add amd64-mpx.o.
3547 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3548 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3549 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3550 * i387-fp.c (num_pl_bnd_register) Added constant.
3551 (num_pl_bnd_cfg_registers) Added constant.
3552 (struct i387_xsave) Added reserved area and MPX fields.
3553 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3554 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3555 function.
3556 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3557 (init_registers_amd64_mpx_linux): Declare new function.
3558 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3559 (x86_64_regmap): Add MPX registers.
3560 (x86_linux_read_description): Add MPX case.
3561 (initialize_low_arch): Initialize MPX targets.
3562
3563 2013-11-18 Tom Tromey <tromey@redhat.com>
3564
3565 * configure: Rebuild.
3566 * configure.ac: Don't check for stdlib.h.
3567 * gdbreplay.c: Unconditionally include stdlib.h.
3568
3569 2013-11-18 Tom Tromey <tromey@redhat.com>
3570
3571 * config.in: Rebuild.
3572 * configure: Rebuild.
3573 * configure.ac: Don't use AC_HEADER_DIRENT.
3574
3575 2013-11-18 Tom Tromey <tromey@redhat.com>
3576
3577 * server.h: Don't check HAVE_STRING_H.
3578 * gdbreplay.c: Don't check HAVE_STRING_H.
3579 * configure: Rebuild.
3580
3581 2013-11-18 Tom Tromey <tromey@redhat.com>
3582
3583 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3584 LIBGNU.
3585
3586 2013-11-08 Tom Tromey <tromey@redhat.com>
3587
3588 * configure, config.in: Rebuild.
3589 * configure.ac: Remove unused configury.
3590
3591 2013-11-08 Tom Tromey <tromey@redhat.com>
3592
3593 * acinclude.m4: Include common.m4, codeset.m4.
3594 * configure, config.in: Rebuild.
3595 * configure.ac: Use GDB_AC_COMMON.
3596
3597 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3598
3599 * linux-s390-low.c (HWCAP_S390_TE): New define.
3600 (s390_arch_setup): Consider the TE field in the HWCAP for
3601 determining 'have_regset_tdb'.
3602
3603 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3604
3605 PR gdb/16014
3606 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3607 call to sizeof.
3608
3609 2013-10-02 Pedro Alves <palves@redhat.com>
3610
3611 * server.c (process_serial_event): Don't output "GDBserver
3612 exiting" if GDB is connected through stdio.
3613 * target.c (mywait): Likewise, be silent if GDB is connected
3614 through stdio.
3615
3616 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3617
3618 * lynx-low.c (lynx_add_threads_after_attach): New function.
3619 (lynx_attach): Remove call to add_thread. Add call to
3620 lynx_add_threads_after_attach instead.
3621
3622 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3623
3624 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3625 * config.in, configure: Regenerated.
3626
3627 2013-09-18 Yao Qi <yao@codesourcery.com>
3628
3629 PR server/15959
3630 * server.c (start_inferior): Clear 'resume_info'.
3631
3632 2013-09-16 Jiong Wang <jiwang@tilera.com>
3633
3634 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3635 for each register.
3636
3637 2013-09-16 Jiong Wang <jiwang@tilera.com>
3638
3639 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3640 linux-tile-low.o to srv_tgtobj.
3641
3642 2013-09-16 Will Newton <will.newton@linaro.org>
3643
3644 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3645 out regs.
3646
3647 2013-09-06 Pedro Alves <palves@redhat.com>
3648
3649 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3650 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3651 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3652 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3653 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3654 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3655
3656 2013-09-06 Pedro Alves <palves@redhat.com>
3657
3658 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3659 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3660
3661 2013-09-06 Pedro Alves <palves@redhat.com>
3662
3663 * linux-amd64-ipa.c: Include tracepoint.h.
3664 * linux-i386-ipa.c: Include tracepoint.h.
3665
3666 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3667
3668 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3669 (ps_get_thread_area): New function.
3670
3671 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3672
3673 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3674 (initialize_low_arch): Call init_registers_crisv32 rather than
3675 init_register_crisv32.
3676
3677 2013-09-05 Pedro Alves <palves@redhat.com>
3678
3679 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3680 to ...
3681 * hostio.h: ... this new file.
3682 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3683 win32-low.c: Include hostio.h.
3684
3685 2013-09-05 Pedro Alves <palves@redhat.com>
3686
3687 * server.h (gdb_client_data, handler_func, callback_handler_func)
3688 (delete_file_handler, add_file_handler, append_callback_event)
3689 (delete_callback_event, start_event_loop, initialize_event_loop):
3690 Move to event-loop.h and include it.
3691 * event-loop.h: New file.
3692
3693 2013-09-05 Pedro Alves <palves@redhat.com>
3694
3695 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3696 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3697 (loaded_dll, unloaded_dll): Move to ...
3698 * dll.h: ... this new file.
3699 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3700
3701 2013-09-05 Pedro Alves <palves@redhat.com>
3702
3703 * server.h (current_process, get_thread_process, all_processes)
3704 (add_inferior_to_list, for_each_inferior, current_inferior)
3705 (remove_inferior, add_process, remove_process, find_process_pid)
3706 (have_started_inferiors_p, have_attached_inferiors_p)
3707 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3708 (clear_inferiors, find_inferior, find_inferior_id)
3709 (inferior_target_data, set_inferior_target_data)
3710 (inferior_regcache_data, set_inferior_regcache_data): Move to
3711 inferiors.h, and include it.
3712 * inferiors.h: New file.
3713
3714 2013-09-05 Pedro Alves <palves@redhat.com>
3715
3716 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3717 Move ...
3718 * ax.h: ... here.
3719
3720 2013-09-05 Pedro Alves <palves@redhat.com>
3721
3722 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3723 tracepoint.h.
3724 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3725 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3726 (handle_tracepoint_general_set, handle_tracepoint_query)
3727 (tracepoint_finished_step, tracepoint_was_hit)
3728 (release_while_stepping_state_list, current_traceframe)
3729 (in_readonly_region, traceframe_read_mem)
3730 (fetch_traceframe_registers, traceframe_read_sdata)
3731 (traceframe_read_info, struct fast_tpoint_collect_status)
3732 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3733 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3734 (supply_fast_tracepoint_registers)
3735 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3736 (ipa_tdesc, claim_trampoline_space)
3737 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3738 (agent_mem_read, agent_get_trace_state_variable_value)
3739 (agent_set_trace_state_variable_value, agent_tsv_read)
3740 (agent_mem_read_string, get_raw_reg_func_addr)
3741 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3742 * tracepoint.h: ... this new file.
3743
3744 2013-09-05 Pedro Alves <palves@redhat.com>
3745
3746 * server.h (perror_with_name, error, fatal, warning, paddress)
3747 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3748 include it.
3749 * utils.h: New file.
3750
3751 2013-09-05 Pedro Alves <palves@redhat.com>
3752
3753 * server.h (remote_debug, noack_mode, transport_is_reliable)
3754 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3755 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3756 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3757 (write_enn, initialize_async_io, enable_async_io)
3758 (disable_async_io, check_remote_input_interrupt_request)
3759 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3760 (dead_thread_notify, prepare_resume_reply)
3761 (decode_address_to_semicolon, decode_address, decode_m_packet)
3762 (decode_M_packet, decode_X_packet, decode_xfer_write)
3763 (decode_search_memory_packet, unhexify, hexify)
3764 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3765 (look_up_one_symbol, relocate_instruction)
3766 (monitor_output): Move to remote-utils.h, and include it.
3767 * remote-utils.h: New file.
3768
3769 2013-09-05 Pedro Alves <palves@redhat.com>
3770
3771 * server.h (_): Delete.
3772
3773 2013-09-02 Pedro Alves <palves@redhat.com>
3774
3775 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3776 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3777 allocated.
3778 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3779
3780 2013-09-02 Pierre Muller <muller@sourceware.org>
3781
3782 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3783 or WriteProcessMemory complete successfully and handle
3784 ERROR_PARTIAL_COPY error.
3785
3786 2013-09-02 Pedro Alves <palves@redhat.com>
3787
3788 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3789 error instead of EIO.
3790
3791 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3792
3793 PR server/15604
3794 * linux-low.c: Include filestuff.h.
3795 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3796 * lynx-low.c: Include filestuff.h.
3797 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3798 * server.c: Include filestuff.h.
3799 (main): Call notice_open_fds.
3800 * spu-low.c: Include filestuff.h.
3801 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3802
3803 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3804
3805 * Makefile.in: Explain why ../target and ../nat are not
3806 listed as include file search paths.
3807 (linux-waitpid.o): New object file rule.
3808 * configure.srv (srv_native_linux_obj): New variable.
3809 Replace all occurrences of linux native object files with
3810 $srv_native_linux_obj.
3811 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3812 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3813 (linux_enable_event_reporting): Remove declaration.
3814 (my_waitpid): Moved to common/linux-waitpid.c.
3815 (linux_wait_for_event): Pass ptid when calling
3816 linux_enable_event_reporting.
3817 (linux_supports_tracefork_flag): Remove.
3818 (linux_enable_event_reporting): Likewise.
3819 (linux_tracefork_grandchild): Remove.
3820 (STACK_SIZE): Moved to common/linux-ptrace.c.
3821 (linux_tracefork_child): Remove.
3822 (linux_test_for_tracefork): Remove.
3823 (linux_look_up_symbols): Call linux_supports_traceclone.
3824 (initialize_low): Remove call to linux_test_for_tracefork.
3825 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3826 common/linux-ptrace.h.
3827 (PTRACE_TYPE_ARG4): Likewise.
3828 Include linux-ptrace.h.
3829
3830 2013-08-21 Pedro Alves <palves@redhat.com>
3831
3832 * config.in: Renegerate.
3833
3834 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3835
3836 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3837 (SFILES): Remove $(srcdir)/common/target-common.c and
3838 add $(srcdir)/target/waitstatus.c.
3839 (OBS): Remove target-common.o and add waitstatus.o.
3840 (server_h): Remove $(srcdir)/../common/target-common.h and
3841 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3842 and $(srcdir)/../target/waitstatus.h.
3843 (target-common.o): Remove.
3844 (waitstatus.o): New target object file.
3845 * target.h: Do not include target-common.h and
3846 include target/resume.h, target/wait.h and
3847 target/waitstatus.h.
3848
3849 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3850
3851 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3852 to PTRACE_TYPE_ARG3.
3853 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3854 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3855 PTRACE_TYPE_ARG4.
3856 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3857 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3858
3859 2013-07-27 Jie Zhang <jie@codesourcery.com>
3860 Daniel Jacobowitz <dan@codesourcery.com>
3861 Yao Qi <yao@codesourcery.com>
3862
3863 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3864 (mips-linux-watch.o): New rule.
3865 (mips_linux_watch_h): New variable.
3866 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3867 srv_tgtobj.
3868 * linux-mips-low.c: Include mips-linux-watch.h.
3869 (struct arch_process_info, struct arch_lwp_info): New.
3870 (update_watch_registers_callback): New function.
3871 (mips_linux_new_process, mips_linux_new_thread) New functions.
3872 (mips_linux_prepare_to_resume, mips_insert_point): New
3873 functions.
3874 (mips_remove_point, mips_stopped_by_watchpoint): New
3875 functions.
3876 (rsp_bp_type_to_target_hw_bp_type): New function.
3877 (mips_stopped_data_address): New function.
3878 (the_low_target): Add watchpoint support functions.
3879
3880 2013-07-27 Yao Qi <yao@codesourcery.com>
3881
3882 * i386-low.c: Include break-common.h.
3883 (enum target_hw_bp_type): Remove.
3884
3885 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3886
3887 * Makefile.in (SFILES): /common/target-common.c.
3888 (OBS): Add target-common.o.
3889 (server_h): Add $(srcdir)/../common/target-common.h.
3890 (target-common.o): New target.
3891 * server.c (queue_stop_reply_callback): Free
3892 status string after use.
3893 * target.c (target_waitstatus_to_string): Remove.
3894 * target.h: Include target-common.h.
3895 (resume_kind): Likewise.
3896 (target_waitkind): Likewise.
3897 (target_waitstatus): Likewise.
3898 (TARGET_WNOHANG): Likewise.
3899
3900 2013-07-04 Yao Qi <yao@codesourcery.com>
3901
3902 * Makefile.in (host_alias): Use @host_noncanonical@.
3903 (target_alias): Use @target_noncanonical@.
3904 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3905 ACX_NONCANONICAL_HOST.
3906 * configure: Regenerated.
3907
3908 Revert:
3909 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3910
3911 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3912 * configure: Rebuild.
3913 * Makefile.in (version_host, version_target): Get from configure.
3914 (version.c): Use $(version_host) and $(version_target).
3915
3916 2013-07-03 Pedro Alves <palves@redhat.com>
3917
3918 * Makefile.in (config.status): Depend on development.sh.
3919 * acinclude.m4: Include libmcheck.m4.
3920 * configure: Regenerate.
3921
3922 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3923
3924 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3925 attribute inside the parentheses.
3926 (winapi_DebugSetProcessKillOnExit): Ditto.
3927 (winapi_DebugBreakProcess): Ditto.
3928 (winapi_GenerateConsoleCtrlEvent): Ditto.
3929
3930 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3931
3932 * notif.h (notif_event): Add a dummy member to avoid compiler
3933 errors.
3934
3935 2013-07-01 Pedro Alves <palves@redhat.com>
3936
3937 * hostio.c (HOSTIO_PATH_MAX): Define.
3938 (require_filename, handle_open, handle_unlink, handle_readlink):
3939 Use it.
3940
3941 2013-07-01 Pedro Alves <palves@redhat.com>
3942
3943 * server.h: Include "pathmax.h".
3944 * linux-low.c: Don't include sys/param.h.
3945 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3946 MAXPATHLEN.
3947 * win32-low.c: Don't include sys/param.h.
3948 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3949
3950 2013-07-01 Pedro Alves <palves@redhat.com>
3951
3952 * event-loop.c: Don't check HAVE_UNISTD_H before including
3953 <unistd.h>.
3954 * gdbreplay.c: Likewise.
3955 * remote-utils.c: Likewise.
3956 * server.c: Likewise.
3957 * configure.ac: Don't check for unistd.h.
3958 * configure: Regenerate.
3959
3960 2013-06-28 Tom Tromey <tromey@redhat.com>
3961
3962 * Makefile.in (version.c): Use version.in, not
3963 common/version.in.
3964
3965 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3966
3967 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3968 * configure: Rebuild.
3969 * Makefile.in (version_host, version_target): Get from configure.
3970 (version.c): Use $(version_host) and $(version_target).
3971
3972 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3973
3974 Fix trace-status to output user name without trailing colon.
3975 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3976
3977 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3978
3979 Fix trace-status to output proper start-time and stop-time.
3980 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3981 output start time and stop time in hex as gdb expects.
3982
3983 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3984
3985 * tracepoint.c (build_traceframe_info_xml): Output trace state
3986 variables present in the trace buffer.
3987
3988 2013-06-24 Tom Tromey <tromey@redhat.com>
3989
3990 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3991 create-version.sh.
3992 (version.o): Remove.
3993 * gdbreplay.c: Include version.h.
3994 (version, host_name): Don't declare.
3995 * server.h: Include version.h.
3996 (version, host_name): Don't declare.
3997
3998 2013-06-12 Pedro Alves <palves@redhat.com>
3999
4000 * linux-x86-low.c (linux_is_elf64): Delete global.
4001 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4002 with local linux_pid_exe_is_elf_64_file use.
4003
4004 2013-06-11 Pedro Alves <palves@redhat.com>
4005
4006 * linux-low.c (regset_disabled, disable_regset): New functions.
4007 (regsets_fetch_inferior_registers)
4008 (regsets_store_inferior_registers): Use them.
4009 (initialize_regsets_info); Don't allocate the disabled_regsets
4010 array here.
4011 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4012 comment.
4013
4014 2013-06-11 Pedro Alves <palves@redhat.com>
4015
4016 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4017 xmalloc.
4018
4019 2013-06-11 Pedro Alves <palves@redhat.com>
4020
4021 * linux-x86-low.c (initialize_low_arch): Call
4022 init_registers_x32_avx_linux.
4023
4024 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4025
4026 Fix compatibility with Android Bionic.
4027 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4028 it is not empty.
4029
4030 2013-06-07 Pedro Alves <palves@redhat.com>
4031
4032 PR server/14823
4033 * Makefile.in (OBS): Add tdesc.o.
4034 (IPA_OBJS): Add tdesc-ipa.o.
4035 (tdesc-ipa.o): New rule.
4036 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4037 interface.
4038 * linux-low.c (new_inferior): Delete.
4039 (disabled_regsets, num_regsets): Delete.
4040 (linux_add_process): Adjust to set the new per-process
4041 new_inferior flag.
4042 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4043 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4044 was a stop. When calling arch_setup, switch the current inferior
4045 to the thread that got an event.
4046 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4047 (regsets_fetch_inferior_registers)
4048 (regsets_store_inferior_registers): New regsets_info parameter.
4049 Adjust to use it.
4050 (linux_register_in_regsets): New regs_info parameter. Adjust to
4051 use it.
4052 (register_addr, fetch_register, store_register): New usrregs_info
4053 parameter. Adjust to use it.
4054 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4055 parameter regs_info. Adjust to use it.
4056 (linux_fetch_registers): Get the current inferior's regs_info, and
4057 adjust to use it.
4058 (linux_store_registers): Ditto.
4059 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4060 (initialize_low): Don't initialize the target_regsets here. Call
4061 initialize_low_arch.
4062 * linux-low.h (target_regsets): Delete declaration.
4063 (struct regsets_info): New.
4064 (struct usrregs_info): New.
4065 (struct regs_info): New.
4066 (struct process_info_private) <new_inferior>: New field.
4067 (struct linux_target_ops): Delete the num_regs, regmap, and
4068 regset_bitmap fields. New field regs_info.
4069 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4070 * i387-fp.c (num_xmm_registers): Delete.
4071 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4072 calls to new interface.
4073 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4074 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4075 Infer the number of xmm registers from the regcache's target
4076 description.
4077 * i387-fp.h (num_xmm_registers): Delete.
4078 * inferiors.c (add_thread): Don't install the thread's regcache
4079 here.
4080 * proc-service.c (gregset_info): Fetch the current inferior's
4081 regs_info. Adjust to use it.
4082 * regcache.c: Include tdesc.h.
4083 (register_bytes, reg_defs, num_registers)
4084 (gdbserver_expedite_regs): Delete.
4085 (get_thread_regcache): If the thread doesn't have a regcache yet,
4086 create one, instead of aborting gdbserver.
4087 (regcache_invalidate_one): Rename to ...
4088 (regcache_invalidate_thread): ... this.
4089 (regcache_invalidate_one): New.
4090 (regcache_invalidate): Only invalidate registers of the current
4091 process.
4092 (init_register_cache): Add target_desc parameter, and use it.
4093 (new_register_cache): Ditto. Assert the target description has a
4094 non zero registers_size.
4095 (regcache_cpy): Add assertions. Adjust.
4096 (realloc_register_cache, set_register_cache): Delete.
4097 (registers_to_string, registers_from_string): Adjust.
4098 (find_register_by_name, find_regno, find_register_by_number)
4099 (register_cache_size): Add target_desc parameter, and use it.
4100 (free_register_cache_thread, free_register_cache_thread_one)
4101 (regcache_release, register_cache_size): New.
4102 (register_size): Add target_desc parameter, and use it.
4103 (register_data, supply_register, supply_register_zeroed)
4104 (supply_regblock, supply_register_by_name, collect_register)
4105 (collect_register_as_string, collect_register_by_name): Adjust.
4106 * regcache.h (struct target_desc): Forward declare.
4107 (struct regcache) <tdesc>: New field.
4108 (init_register_cache, new_register_cache): Add target_desc
4109 parameter.
4110 (regcache_invalidate_thread): Declare.
4111 (regcache_invalidate_one): Delete declaration.
4112 (regcache_release): Declare.
4113 (find_register_by_number, register_cache_size, register_size)
4114 (find_regno): Add target_desc parameter.
4115 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4116 declarations.
4117 * remote-utils.c: Include tdesc.h.
4118 (outreg, prepare_resume_reply): Adjust.
4119 * server.c: Include tdesc.h.
4120 (gdbserver_xmltarget): Delete declaration.
4121 (get_features_xml, process_serial_event): Adjust.
4122 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4123 declare.
4124 (struct process_info) <tdesc>: New field.
4125 (ipa_tdesc): Declare.
4126 * tdesc.c: New file.
4127 * tdesc.h: New file.
4128 * tracepoint.c: Include tdesc.h.
4129 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4130 (get_context_regcache): Adjust to pass ipa_tdesc down.
4131 (do_action_at_tracepoint): Adjust to get the register cache size
4132 from the context regcache's description.
4133 (traceframe_walk_blocks): Adjust to get the register cache size
4134 from the current trace frame's description.
4135 (traceframe_get_pc): Adjust to get current trace frame's
4136 description and pass it down.
4137 (gdb_collect): Adjust to get the register cache size from the
4138 IPA's description.
4139 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4140 (gdbserver_xmltarget): Delete.
4141 (initialize_low_tracepoint): Set the ipa's target description.
4142 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4143 (initialize_low_tracepoint): Set the ipa's target description.
4144 * linux-x86-low.c: Include tdesc.h.
4145 [__x86_64__] (is_64bit_tdesc): New.
4146 (ps_get_thread_area, x86_get_thread_area): Use it.
4147 (i386_cannot_store_register): Rename to ...
4148 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4149 (i386_cannot_fetch_register): Rename to ...
4150 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4151 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4152 to new interface.
4153 (target_regsets): Rename to ...
4154 (x86_regsets): ... this.
4155 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4156 interface.
4157 (x86_siginfo_fixup): Use is_64bit_tdesc.
4158 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4159 (tdesc_x32_avx_linux, tdesc_x32_linux)
4160 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4161 Declare.
4162 (x86_linux_update_xmltarget): Delete.
4163 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4164 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4165 (AMD64_LINUX_USER64_CS): New.
4166 (x86_linux_read_description): New, based on
4167 x86_linux_update_xmltarget.
4168 (same_process_callback): New.
4169 (x86_arch_setup_process_callback): New.
4170 (x86_linux_update_xmltarget): New.
4171 (x86_regsets_info): New.
4172 (amd64_linux_regs_info): New.
4173 (i386_linux_usrregs_info): New.
4174 (i386_linux_regs_info): New.
4175 (x86_linux_regs_info): New.
4176 (x86_arch_setup): Reimplement.
4177 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4178 (x86_emit_ops): Ditto.
4179 (the_low_target): Adjust. Install x86_linux_regs_info,
4180 x86_cannot_fetch_register, and x86_cannot_store_register.
4181 (initialize_low_arch): New.
4182 * linux-ia64-low.c (tdesc_ia64): Declare.
4183 (ia64_fetch_register): Adjust.
4184 (ia64_usrregs_info, regs_info): New globals.
4185 (ia64_regs_info): New function.
4186 (the_low_target): Adjust.
4187 (initialize_low_arch): New function.
4188 * linux-sparc-low.c (tdesc_sparc64): Declare.
4189 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4190 Adjust.
4191 (sparc_arch_setup): New function.
4192 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4193 (the_low_target): Adjust.
4194 (initialize_low_arch): New function.
4195 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4196 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4197 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4198 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4199 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4200 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4201 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4202 (tdesc_powerpc_isa205_vsx64l): Declare.
4203 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4204 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4205 (ppc_set_pc, ppc_get_hwcap): Adjust.
4206 (ppc_usrregs_info): Forward declare.
4207 (!__powerpc64__) ppc_regmap_adjusted: New global.
4208 (ppc_arch_setup): Adjust to the current process'es target
4209 description.
4210 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4211 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4212 (ppc_store_evrregset): Adjust.
4213 (target_regsets): Rename to ...
4214 (ppc_regsets): ... this, and make static.
4215 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4216 (ppc_regs_info): New function.
4217 (the_low_target): Adjust.
4218 (initialize_low_arch): New function.
4219 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4220 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4221 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4222 (tdesc_s390x_linux64v2): Declare.
4223 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4224 (s390_fill_gregset, s390_store_last_break): Adjust.
4225 (target_regsets): Rename to ...
4226 (s390_regsets): ... this, and make static.
4227 (s390_get_pc, s390_set_pc): Adjust.
4228 (s390_get_hwcap): New target_desc parameter, and use it.
4229 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4230 (s390_arch_setup): Adjust to set the current process'es target
4231 description. Don't adjust the regmap.
4232 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4233 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4234 (regs_info_3264): New globals.
4235 (s390_regs_info): New function.
4236 (the_low_target): Adjust.
4237 (initialize_low_arch): New function.
4238 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4239 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4240 [__mips64] (init_registers_mips_linux)
4241 (init_registers_mips_dsp_linux): Delete defines.
4242 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4243 (have_dsp): New global.
4244 (mips_read_description): New, based on mips_arch_setup.
4245 (mips_arch_setup): Reimplement.
4246 (get_usrregs_info): New function.
4247 (mips_cannot_fetch_register, mips_cannot_store_register)
4248 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4249 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4250 (target_regsets): Rename to ...
4251 (mips_regsets): ... this, and make static.
4252 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4253 (dsp_regs_info, regs_info): New globals.
4254 (mips_regs_info): New function.
4255 (the_low_target): Adjust.
4256 (initialize_low_arch): New function.
4257 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4258 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4259 Declare.
4260 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4261 (arm_read_description): New, with bits factored from
4262 arm_arch_setup.
4263 (arm_arch_setup): Reimplement.
4264 (target_regsets): Rename to ...
4265 (arm_regsets): ... this, and make static.
4266 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4267 (arm_regs_info): New function.
4268 (the_low_target): Adjust.
4269 (initialize_low_arch): New function.
4270 * linux-m68k-low.c (tdesc_m68k): Declare.
4271 (target_regsets): Rename to ...
4272 (m68k_regsets): ... this, and make static.
4273 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4274 (m68k_regs_info): New function.
4275 (m68k_arch_setup): New function.
4276 (the_low_target): Adjust.
4277 (initialize_low_arch): New function.
4278 * linux-sh-low.c (tdesc_sharch): Declare.
4279 (target_regsets): Rename to ...
4280 (sh_regsets): ... this, and make static.
4281 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4282 (sh_regs_info, sh_arch_setup): New functions.
4283 (the_low_target): Adjust.
4284 (initialize_low_arch): New function.
4285 * linux-bfin-low.c (tdesc_bfin): Declare.
4286 (bfin_arch_setup): New function.
4287 (bfin_usrregs_info, regs_info): New globals.
4288 (bfin_regs_info): New function.
4289 (the_low_target): Adjust.
4290 (initialize_low_arch): New function.
4291 * linux-cris-low.c (tdesc_cris): Declare.
4292 (cris_arch_setup): New function.
4293 (cris_usrregs_info, regs_info): New globals.
4294 (cris_regs_info): New function.
4295 (the_low_target): Adjust.
4296 (initialize_low_arch): New function.
4297 * linux-cris-low.c (tdesc_crisv32): Declare.
4298 (cris_arch_setup): New function.
4299 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4300 (cris_regs_info): New function.
4301 (the_low_target): Adjust.
4302 (initialize_low_arch): New function.
4303 * linux-m32r-low.c (tdesc_m32r): Declare.
4304 (m32r_arch_setup): New function.
4305 (m32r_usrregs_info, regs_info): New globals.
4306 (m32r_regs_info): Adjust.
4307 (initialize_low_arch): New function.
4308 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4309 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4310 (tic6x_usrregs_info): Forward declare.
4311 (tic6x_read_description): New function, based on ...
4312 (tic6x_arch_setup): ... this. Reimplement.
4313 (target_regsets): Rename to ...
4314 (tic6x_regsets): ... this, and make static.
4315 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4316 (tic6x_regs_info): New function.
4317 (the_low_target): Adjust.
4318 (initialize_low_arch): New function.
4319 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4320 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4321 (target_regsets): Rename to ...
4322 (xtensa_regsets): ... this, and make static.
4323 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4324 globals.
4325 (xtensa_arch_setup, xtensa_regs_info): New functions.
4326 (the_low_target): Adjust.
4327 (initialize_low_arch): New function.
4328 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4329 (nios2_arch_setup): Set the current process'es tdesc.
4330 (target_regsets): Rename to ...
4331 (nios2_regsets): ... this.
4332 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4333 (nios2_regs_info): New function.
4334 (the_low_target): Adjust.
4335 (initialize_low_arch): New function.
4336 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4337 (aarch64_arch_setup): Set the current process'es tdesc.
4338 (target_regsets): Rename to ...
4339 (aarch64_regsets): ... this.
4340 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4341 (aarch64_regs_info): New function.
4342 (the_low_target): Adjust.
4343 (initialize_low_arch): New function.
4344 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4345 globals.
4346 (target_regsets): Rename to ...
4347 (tile_regsets): ... this.
4348 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4349 (tile_regs_info): New function.
4350 (tile_arch_setup): Set the current process'es tdesc.
4351 (the_low_target): Adjust.
4352 (initialize_low_arch): New function.
4353 * spu-low.c (tdesc_spu): Declare.
4354 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4355 * win32-arm-low.c (tdesc_arm): Declare.
4356 (arm_arch_setup): New function.
4357 (the_low_target): Install arm_arch_setup instead of
4358 init_registers_arm.
4359 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4360 (init_windows_x86): Rename to ...
4361 (i386_arch_setup): ... this. Set `win32_tdesc'.
4362 (the_low_target): Adjust.
4363 * win32-low.c (win32_tdesc): New global.
4364 (child_add_thread): Don't create the thread cache here.
4365 (do_initial_child_stuff): Set the new process'es tdesc.
4366 * win32-low.h (struct target_desc): Forward declare.
4367 (win32_tdesc): Declare.
4368 * lynx-i386-low.c (tdesc_i386): Declare global.
4369 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4370 * lynx-low.c (lynx_tdesc): New global.
4371 (lynx_add_process): Set the new process'es tdesc.
4372 * lynx-low.h (struct target_desc): Forward declare.
4373 (lynx_tdesc): Declare global.
4374 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4375 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4376 * nto-low.c (nto_tdesc): New global.
4377 (do_attach): Set the new process'es tdesc.
4378 * nto-low.h (struct target_desc): Forward declare.
4379 (nto_tdesc): Declare.
4380 * nto-x86-low.c (tdesc_i386): Declare.
4381 (nto_x86_arch_setup): Set `nto_tdesc'.
4382
4383 2013-06-04 Gary Benson <gbenson@redhat.com>
4384
4385 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4386 to qSupported response when appropriate.
4387 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4388 with nonzero-length annex.
4389 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4390 arguments supplied in annex.
4391
4392 2013-05-31 Doug Evans <dje@google.com>
4393
4394 PR server/15594
4395 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4396 64 bits in 64-cross-32 environment.
4397
4398 2013-05-28 Pedro Alves <palves@redhat.com>
4399
4400 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4401 (aarch64-without-fpu.c): Delete rule.
4402 * configure.srv (aarch64*-*-linux*): Remove references to
4403 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4404 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4405 declaration.
4406
4407 2013-05-24 Pedro Alves <palves@redhat.com>
4408
4409 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4410 instead of strchr/decode_address. Error if the range isn't split
4411 with a ','. Don't assume there's be a ':' in the action.
4412
4413 2013-05-23 Yao Qi <yao@codesourcery.com>
4414 Pedro Alves <palves@redhat.com>
4415
4416 * linux-low.c (lwp_in_step_range): New function.
4417 (linux_wait_1): If the thread was range stepping and stopped
4418 outside the stepping range, report the stop to GDB. Otherwise,
4419 continue stepping. Add range stepping debug output.
4420 (linux_set_resume_request): Copy the step range from the resume
4421 request to the lwp.
4422 (linux_supports_range_stepping): New.
4423 (linux_target_ops) <supports_range_stepping>: Set to
4424 linux_supports_range_stepping.
4425 * linux-low.h (struct linux_target_ops)
4426 <supports_range_stepping>: New field.
4427 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4428 * linux-x86-low.c (x86_supports_range_stepping): New.
4429 (the_low_target) <supports_range_stepping>: Set to
4430 x86_supports_range_stepping.
4431 * server.c (handle_v_cont): Handle 'r' action.
4432 (handle_v_requests): Append ";r" if the target supports range
4433 stepping.
4434 * target.h (struct thread_resume) <step_range_start,
4435 step_range_end>: New fields.
4436 (struct target_ops) <supports_range_stepping>:
4437 New field.
4438 (target_supports_range_stepping): New macro.
4439
4440 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4441
4442 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4443 confusion in comment.
4444
4445 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4446
4447 * lynx-low.c (struct process_info_private): New type.
4448 (lynx_add_process): New function.
4449 (lynx_create_inferior, lynx_attach): Replace calls to
4450 add_process by calls to lynx_add_process.
4451 (lynx_resume): If PTID is null, then try using
4452 current_process()->private->last_wait_event_ptid.
4453 Add comments.
4454 (lynx_clear_inferiors): Delete. The contents of that function
4455 has been inlined in lynx_mourn;
4456 (lynx_wait_1): Save the ptid in the process's private data.
4457 (lynx_mourn): Free the process' private data. Replace call
4458 to lynx_clear_inferiors by call to clear_inferiors.
4459
4460 2013-05-17 Yao Qi <yao@codesourcery.com>
4461
4462 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4463 the right place.
4464
4465 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4466
4467 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4468 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4469 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4470 PT_TEXT_END_ADDR guards. Update comments.
4471 (linux_target_op) <read_offsets>: Conditionally define to
4472 linux_read_offsets if the target is UCLIBC and if it defines
4473 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4474
4475 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4476 Andrew Jenner <andrew@codesourcery.com>
4477
4478 * Makefile.in (SFILES): Add linux-nios2-low.c.
4479 (clean): Add action to delete nios2-linux.c.
4480 (nios2-linux.c): New rule.
4481 * configure.srv: Add nios2*-*-linux*.
4482 * linux-nios2-low.c: New.
4483
4484 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4485
4486 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4487
4488 2013-04-25 Hui Zhu <hui@codesourcery.com>
4489
4490 PR gdb/15186
4491 * ax.c (ax_printf): Add fflush.
4492
4493 2013-04-22 Tom Tromey <tromey@redhat.com>
4494
4495 * Makefile.in (SFILES): Add filestuff.c.
4496 (OBS): Add filestuff.o.
4497 (filestuff.o): New target.
4498 * config.in, configure: Rebuild.
4499 * configure.ac: Check for fdwalk, pipe2.
4500
4501 2013-04-17 Pedro Alves <palves@redhat.com>
4502
4503 * configure.ac (USE_THREAD_DB): Delete variable.
4504 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4505 Don't AC_SUBST USE_THREAD_DB.
4506 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4507 * config.in, configure: Regenerate.
4508
4509 2013-04-16 Pedro Alves <palves@redhat.com>
4510
4511 * linux-low.h (struct lwp_info) <thread_known>: Move under
4512 the USE_THREAD_DB #ifdef.
4513
4514 2013-04-16 Pedro Alves <palves@redhat.com>
4515
4516 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4517 (linux-low.o): Delete rule.
4518 * linux-low.h: Always include "gdb_thread_db.h" instead of
4519 conditionally including thread_db.h.
4520 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4521 HAVE_THREAD_DB_H.
4522
4523 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4524
4525 * Makefile.in (install-only): Fix make install regression.
4526
4527 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4528
4529 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4530 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4531 installation.
4532 * gdbserver.1: Remove.
4533
4534 2013-03-22 Pedro Alves <palves@redhat.com>
4535
4536 * linux-low.c (handle_extended_wait): Don't call
4537 linux_enable_event_reporting.
4538
4539 2013-03-15 Tony Theodore <tonyt@logyst.com>
4540
4541 PR build/9098:
4542 * Makefile.in (SHELL): Use @SHELL@.
4543
4544 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4545
4546 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4547 compiler warning.
4548
4549 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4550
4551 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4552 Remove extraneous NULL element.
4553
4554 2013-03-13 Yao Qi <yao@codesourcery.com>
4555
4556 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4557 'V' block in trace frame.
4558
4559 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4560
4561 * target.h (struct target_ops): Add btrace ops.
4562 (target_supports_btrace): New macro.
4563 (target_enable_btrace): New macro.
4564 (target_disable_btrace): New macro.
4565 (target_read_btrace): New macro.
4566 * gdbthread.h (struct thread_info): Add btrace field.
4567 * server.c: Include btrace-common.h.
4568 (handle_btrace_general_set): New function.
4569 (handle_btrace_enable): New function.
4570 (handle_btrace_disable): New function.
4571 (handle_general_set): Call handle_btrace_general_set.
4572 (handle_qxfer_btrace): New function.
4573 (struct qxfer qxfer_packets[]): Add btrace entry.
4574 * inferiors.c (remove_thread): Disable btrace.
4575 * linux-low: Include linux-btrace.h.
4576 (linux_low_enable_btrace): New function.
4577 (linux_low_read_btrace): New function.
4578 (linux_target_ops): Add btrace ops.
4579 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4580 Add srv_linux_btrace=yes.
4581 (x86_64-*-linux*): Add linux-btrace.o.
4582 Add srv_linux_btrace=yes.
4583 * configure.ac: Define HAVE_LINUX_BTRACE.
4584 * config.in: Regenerated.
4585 * configure: Regenerated.
4586
4587 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4588
4589 * server.c (handle_qxfer): Preserve error message if -3 is
4590 returned.
4591 (qxfer): Document the -3 return value.
4592
4593 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4594
4595 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4596 (linux_btrace_h): New variable.
4597 (linux-btrace.o): New rule.
4598
4599 2013-03-08 Stan Shebs <stan@codesourcery.com>
4600 Hafiz Abid Qadeer <abidh@codesourcery.com>
4601
4602 * tracepoint.c (trace_buffer_size): New global.
4603 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4604 (init_trace_buffer): Change to one-argument function. Allocate
4605 trace buffer memory.
4606 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4607 handle QTBuffer:size packet.
4608 (cmd_bigqtbuffer_size): New function.
4609 (initialize_tracepoint): Call init_trace_buffer with
4610 DEFAULT_TRACE_BUFFER_SIZE.
4611 * server.c (handle_query): Add QTBuffer:size in the
4612 supported packets.
4613
4614 2013-03-07 Yao Qi <yao@codesourcery.com>
4615
4616 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4617 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4618 of -1.
4619 (cmd_qtsp): Adjust condition. Do post increment.
4620 Set cur_action and cur_step_action back to 0.
4621
4622 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4623
4624 PR server/15236
4625 * linux-low.c (linux_write_memory): Return early success if LEN is
4626 zero.
4627
4628 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4629
4630 * configure.srv: Add x86_64-*-cygwin* as target.
4631
4632 2013-02-28 Tom Tromey <tromey@redhat.com>
4633
4634 * configure.ac: Invoke AC_SYS_LARGEFILE.
4635 * configure, config.in: Rebuild.
4636
4637 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4638
4639 * win32-low.c: Throughout, fix format strings and casts of
4640 printf-like functions to avoid type related warnings on all
4641 platforms.
4642 (get_child_debug_event): Print dwDebugEventCode as hex since
4643 that's how it's usually documented.
4644
4645 2013-02-28 Yao Qi <yao@codesourcery.com>
4646
4647 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4648 pulongest.
4649
4650 2013-02-27 Jiong Wang <jiwang@tilera.com>
4651
4652 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4653 (reg-tilegx32.c): New rule.
4654 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4655 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4656 different register info initializer according to elf class.
4657 (init_registers_tilgx32): New function. The tilegx32 register info
4658 initializer.
4659 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4660 (tile_store_gregset): Likewise.
4661
4662 2013-02-27 Yao Qi <yao@codesourcery.com>
4663
4664 * server.c (process_point_options): Print debug message when
4665 debug_threads is true.
4666
4667 2013-02-26 Yao Qi <yao@codesourcery.com>
4668
4669 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4670
4671 2013-02-19 Pedro Alves <palves@redhat.com>
4672 Kai Tietz <ktietz@redhat.com>
4673
4674 PR gdb/15161
4675
4676 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4677 instead of strtoul to extract address from packet.
4678 (process_serial_event) <'z'>: Likewise.
4679
4680 2013-02-18 Yao Qi <yao@codesourcery.com>
4681
4682 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4683
4684 2013-02-14 Pedro Alves <palves@redhat.com>
4685
4686 Plug memory leak.
4687
4688 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4689 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4690
4691 2013-02-14 Pedro Alves <palves@redhat.com>
4692
4693 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4694
4695 2013-02-14 Pedro Alves <palves@redhat.com>
4696
4697 * tracepoint.c (save_string): Delete.
4698 (add_tracepoint_action): Use savestring instead of save_string.
4699
4700 2013-02-12 Pedro Alves <palves@redhat.com>
4701
4702 * linux-xtensa-low.c: Ditto.
4703 * xtensa-xtregs.c: Ditto.
4704
4705 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4706
4707 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4708 thread_db.
4709
4710 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4711
4712 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4713 aarch64_num_wp_regs and aarch64_num_bp_regs to
4714 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4715
4716 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4717
4718 * linux-aarch64-low.c (ps_get_thread_area): Replace
4719 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4720
4721 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4722 Marcus Shawcroft <marcus.shawcroft@arm.com>
4723 Nigel Stephens <nigel.stephens@arm.com>
4724 Yufeng Zhang <yufeng.zhang@arm.com>
4725
4726 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4727 (aarch64.c, aarch64-without-fpu.c): New targets.
4728 * configure.srv (aarch64*-*-linux*): New.
4729 * linux-aarch64-low.c: New file.
4730
4731 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4732
4733 * linux-low.c (handle_extended_wait, linux_create_inferior)
4734 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4735 (dequeue_one_deferred_signal, linux_resume_one_thread)
4736 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4737 (linux_tracefork_grandchild, linux_test_for_tracefork)
4738 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4739 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4740 where the argument is 0.
4741
4742 2013-01-25 Yao Qi <yao@codesourcery.com>
4743
4744 * event-loop.c: Include "queue.h".
4745 (gdb_event_p): New typedef.
4746 (struct gdb_event) <next_event>: Remove.
4747 (event_queue): Change to QUEUE(gdb_event_p).
4748 (async_queue_event): Remove.
4749 (gdb_event_xfree): New.
4750 (initialize_event_loop): New.
4751 (process_event): Use API from QUEUE.
4752 (wait_for_event): Likewise.
4753 * server.c (main): Call initialize_event_loop.
4754 * server.h (initialize_event_loop): Declare.
4755
4756 2013-01-18 Yao Qi <yao@codesourcery.com>
4757
4758 * ax.h (struct eval_agent_expr_context): New.
4759 (gdb_eval_agent_expr): Update declaration.
4760 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4761 TFRAME. Add new argument CTX.
4762 * server.h (struct eval_agent_expr_context): Declare.
4763 (agent_mem_read, agent_tsv_read): Update declaration.
4764 (agent_mem_read_string): Likewise.
4765 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4766 (add_traceframe_block): Add new argument TPOINT.
4767 Increase TPOINT->traceframe_usage.
4768 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4769 eval_tracepoint_agent_expr.
4770 (condition_true_at_tracepoint): Likewise.
4771 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4772 (agent_mem_read_string, agent_tsv_read): Likewise.
4773
4774 2013-01-16 Yao Qi <yao@codesourcery.com>
4775
4776 * linux-low.c (linux_resume_one_lwp): Don't check
4777 'lwp->bp_reinsert != 0'.
4778
4779 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4780 Pedro Alves <palves@redhat.com>
4781
4782 * lynx-low.c (ptrace_request_to_str): Define a temporary
4783 macro and use it to simplify this function's implementation.
4784
4785 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4786
4787 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4788 sets errno.
4789
4790 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4791
4792 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4793
4794 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4795
4796 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4797
4798 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4799
4800 * lynx-low.c (lynx_resume): Use the resume_info parameter
4801 to determine the ptid for the lynx_ptrace call, unless
4802 it is equal to minus_one_ptid, in which case we use the
4803 ptid of the current_inferior.
4804 (lynx_wait_1): After having received a thread create/exit
4805 event, resume the inferior's execution using the signaling
4806 thread's ptid, rather than the old ptid.
4807
4808 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4809
4810 * lynx-low.c (lynx_resume): Delete variable ret.
4811
4812 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4813
4814 * gdbreplay.c (gdbreplay_version): Update copyright year.
4815 * server.c (gdbserver_version): Likewise.
4816
4817 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4818
4819 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4820 new thread.
4821
4822 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4823
4824 * lynx-low.c (ptrace_request_to_str): Add handling for
4825 PTRACE_GETTRACESIG.
4826
4827 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4828
4829 * lynx-low.c (lynx_attach): Delete variable new_process.
4830
4831 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4832
4833 * lynx-low.c (lynx_create_inferior): Delete variable
4834 new_process.
4835
4836 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4837
4838 * lynx-low.c (ptrace_request_to_str): Do not handle
4839 PTRACE_GETTHREADLIST if this macro does not exist.
4840
4841 2012-12-15 Yao Qi <yao@codesourcery.com>
4842
4843 * Makefile.in (OBS): Add notif.o.
4844 * notif.c, notif.h: New.
4845 * server.c: Include "notif.h".
4846 (struct vstop_notif) <next>: Remove.
4847 <base>: New field.
4848 (queue_stop_reply): Update.
4849 (push_event, send_next_stop_reply): Remove.
4850 (discard_queued_stop_replies): Update.
4851 (notif_stop): New variable.
4852 (handle_v_stopped): Remove.
4853 (handle_v_requests): Don't call handle_v_stopped. Call
4854 handle_ack_notif instead.
4855 (queue_stop_reply_callback): Call notif_event_enque instead
4856 of queue_stop_reply.
4857 (handle_status): Don't call send_next_stop_reply, call
4858 notif_write_event instead.
4859 (kill_inferior_callback): Likewise.
4860 (detach_or_kill_inferior_callback): Likewise.
4861 (main): Call initialize_notif.
4862 (process_serial_event): Call QUEUE_is_empty.
4863 (handle_target_event): Call notif_push instead of push event.
4864 * server.h (push_event): Remove declaration.
4865
4866 2012-12-10 Tom Tromey <tromey@redhat.com>
4867
4868 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4869 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4870 macros.
4871 (.c.o): Rewrite.
4872 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4873 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4874 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4875 (amd64-linux-ipa.o, ax.o): Rewrite.
4876 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4877 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4878 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4879 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4880 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4881 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4882 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4883 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4884 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4885 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4886 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4887 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4888 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4889 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4890 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4891 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4892 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4893 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4894 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4895 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4896 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4897 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4898 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4899 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4900 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4901 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4902 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4903 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4904 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4905 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4906 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4907 (reg-tilegx.o): Remove.
4908 (all_object_files): New macro.
4909 Include .deps files.
4910 * aclocal.m4, configure: Rebuild.
4911 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4912 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4913 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4914
4915 2012-12-05 Tom Tromey <tromey@redhat.com>
4916
4917 PR gdb/14917:
4918 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4919
4920 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4921
4922 * configure.ac: Check for linux/perf_event.h.
4923 * config.in: Regenerated.
4924 * configure: Regenerated.
4925
4926 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4927
4928 * hostio.c (handle_readlink): Decrease buffer size
4929 parameter passed to readlink by one byte.
4930
4931 2012-11-26 Yao Qi <yao@codesourcery.com>
4932
4933 * configure.ac (build_warnings): Append '-Wempty-body'.
4934 * configure: Regenerated.
4935 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4936 body.
4937
4938 2012-11-15 Pierre Muller <muller@sourceware.org>
4939
4940 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4941 * config.in: Regenerate.
4942 * configure: Regenerate.
4943 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4944 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4945 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4946 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4947 header.
4948 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4949 instead of <sys/wait.h> header.
4950 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4951
4952 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4953
4954 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4955 (various make rules): Remove -DGDBSERVER
4956
4957 2012-11-09 Yao Qi <yao@codesourcery.com>
4958
4959 * spu-low.c (current_ptid): Move it to ..
4960 * gdbthread.h: ... here. New.
4961 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4962 * server.c (myresume, process_serial_event): Likewise.
4963 * thread-db.c (thread_db_find_new_threads): Likewise.
4964 * tracepoint.c (run_inferior_command): Likewise.
4965
4966 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4967
4968 * server.c (handle_search_memory_1): Include access length in
4969 warning message.
4970
4971 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4972
4973 * linux-crisv32-low.c: Fix compile errors.
4974
4975 2012-09-04 Yao Qi <yao@codesourcery.com>
4976
4977 * tracepoint.c (cmd_qtsv): Adjust debug message.
4978 Don't check CUR_TPOINT.
4979
4980 2012-08-28 Yao Qi <yao@codesourcery.com>
4981
4982 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4983 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4984 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4985 Remove declarations of xmalloc, xreallloc, xstrdup and
4986 freeargv.
4987 * Makefile.in (libiberty_h): New.
4988 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4989 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4990
4991 2012-08-23 Yao Qi <yao@codesourcery.com>
4992
4993 * server.h: Remove declaration of 'xsnprintf'.
4994
4995 2012-08-22 Keith Seitz <keiths@redhat.com>
4996
4997 * server.h: Include build-gnulib-gbserver/config.h.
4998 * gdbreplay.c: Likewise.
4999
5000 2012-08-08 Doug Evans <dje@google.com>
5001
5002 * Makefile.in (SFILES): Add gdb_vecs.c.
5003 (OBS): Add gdb_vecs.o.
5004 (gdb_vecs_h, host_defs_h): New variables.
5005 (thread-db.o): Add $(gdb_vecs_h) dependency.
5006 (gdb_vecs.o): New rule.
5007 * thread-db.c: #include "gdb_vecs.h".
5008 (thread_db_load_search): Use a vector to iterate over path elements.
5009 Handle text appearing after "$pdir".
5010
5011 * configure.ac: Add check for strstr.
5012 * config.in: Regenerate.
5013 * configure: Regenerate.
5014
5015 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5016
5017 * hostio.c (handle_pread): If pread fails, fall back to attempting
5018 lseek/read.
5019 (handle_pwrite): Likewise for pwrite.
5020
5021 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5022
5023 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5024 between unsupported TYPE and unimplementable ADDR/LEN combination.
5025 (arm_insert_point): Act on new return value.
5026
5027 2012-07-31 Pedro Alves <palves@redhat.com>
5028
5029 * server.c (process_point_options): Only skip tokens if we find
5030 one that is unrecognized. Don't treat 'X' specially while
5031 skipping unrecognized tokens.
5032
5033 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5034
5035 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5036 to 4-byte-align HW breakpoint addresses for Thumb.
5037
5038 2012-07-27 Yao Qi <yao@codesourcery.com>
5039
5040 PR remote/14161.
5041
5042 * server.h: Declare gdb_agent_about_to_close.
5043 * target.c (kill_inferior): Include "agent.h".
5044 New. Send command 'kill'.
5045 * target.h (kill_inferior): Removed macro.
5046 * tracepoint.c (gdb_agent_about_to_close): New.
5047 (gdb_agent_helper_thread): Handle command 'close'.
5048 Wait endlessly until the inferior stops.
5049 Install gdb_agent_remove_socket to atexit hook.
5050 (agent_socket_name): New static variable.
5051 (gdb_agent_socket_init): Replace local variable 'name' with
5052 'agent_socket_name'.
5053 (gdb_agent_remove_socket): New.
5054
5055 2012-07-27 Yao Qi <yao@codesourcery.com>
5056
5057 * server.c (process_point_options): Stop at 'X' when parsing.
5058
5059 2012-07-19 Michael Eager <eager@eagercon.com>
5060
5061 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5062 to hw_execute.
5063 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5064 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5065 hardware breakpoint.
5066
5067 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5068
5069 * gdbserver/linux-low.c (initialize_low): Call
5070 linux_ptrace_init_warnings.
5071
5072 2012-07-02 Doug Evans <dje@google.com>
5073
5074 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5075 pointer to int.
5076
5077 2012-07-02 Stan Shebs <stan@codesourcery.com>
5078
5079 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5080 (ax.o): Add it to build rule.
5081 (ax-ipa.o): Ditto.
5082 (OBS): Add format.o.
5083 (IPA_OBS): Add format.o.
5084 * server.c (handle_query): Claim support for breakpoint commands.
5085 (process_point_options): Add command case.
5086 (process_serial_event): Leave running if there are printfs in
5087 effect.
5088 * mem-break.h (any_persistent_commands): Declare.
5089 (add_breakpoint_commands): Declare.
5090 (gdb_no_commands_at_breakpoint): Declare.
5091 (run_breakpoint_commands): Declare.
5092 * mem-break.c (struct point_command_list): New struct.
5093 (struct breakpoint): New field command_list.
5094 (any_persistent_commands): New function.
5095 (add_commands_to_breakpoint): New function.
5096 (add_breakpoint_commands): New function.
5097 (gdb_no_commands_at_breakpoint): New function.
5098 (run_breakpoint_commands): New function.
5099 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5100 locally.
5101 * ax.c: Include format.h.
5102 (ax_printf): New function.
5103 (gdb_eval_agent_expr): Add printf opcode.
5104
5105 2012-06-13 Yao Qi <yao@codesourcery.com>
5106
5107 * server.c (start_inferior): Remove duplicated writes to fields
5108 'last_resume_kind' and 'last_status' of 'current_inferior'.
5109
5110 2012-06-12 Yao Qi <yao@codesourcery.com>
5111 Pedro Alves <palves@redhat.com>
5112
5113 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5114 comment.
5115 * server.c (handle_v_cont): Extend comment.
5116
5117 2012-06-11 Yao Qi <yao@codesourcery.com>
5118
5119 * linux-low.c (linux_attach): Add 'static'.
5120
5121 2012-06-06 Yao Qi <yao@codesourcery.com>
5122
5123 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5124
5125 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5126
5127 Fix gcc -flto compilation warning.
5128 * server.c (main): Make variable multi_mode and attach volatile.
5129
5130 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5131
5132 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5133 if the platform doesn't know about it.
5134
5135 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5136
5137 * Makefile.in (SFILES): Add linux-tile-low.c.
5138 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5139 * configure.srv: Handle tilegx-*-linux*.
5140 * linux-tile-low.c: New file.
5141
5142 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5143
5144 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5145
5146 2012-05-24 Pedro Alves <palves@redhat.com>
5147
5148 PR gdb/7205
5149
5150 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5151
5152 2012-05-24 Pedro Alves <palves@redhat.com>
5153
5154 PR gdb/7205
5155
5156 Replace target_signal with gdb_signal throughout.
5157
5158 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5159
5160 * linux-low.c (linux_store_registers): Avoid the copying sequence
5161 when no data has been retrieved by ptrace.
5162
5163 2012-05-22 Will Deacon <will.deacon@arm.com>
5164
5165 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5166 Include asm/ptrace.h.
5167 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5168 already defined.
5169
5170 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5171
5172 * linux-low.c (linux_store_registers): Don't re-retrieve data
5173 with ptrace that has already been obtained from /proc. Always
5174 copy any data retrieved with ptrace to the buffer supplied.
5175
5176 2012-05-11 Yao Qi <yao@codesourcery.com>
5177 Pedro Alves <palves@redhat.com>
5178
5179 * linux-low.c (enum stopping_threads_kind): New.
5180 (stopping_threads): Change type to `enum stopping_threads_kind'.
5181 (handle_extended_wait): If stopping and suspending threads, leave
5182 the new_lwp suspended too.
5183 (linux_wait_for_event): Adjust.
5184 (stop_all_lwps): Set `stopping_threads' to
5185 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5186 whether we're suspending threads or just stopping them. Assert no
5187 recursion happens.
5188
5189 2012-04-29 Yao Qi <yao@codesourcery.com>
5190
5191 * server.h: Move some code to ...
5192 * gdbthread.h: ... here. New.
5193 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5194 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5195 (nto-low.o, win32-low.o): Likewise.
5196 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5197 * regcache.c, remote-utils.c, server.c: Likewise.
5198 * target.c, tracepoint.c, win32-low.c: Likewise.
5199
5200 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5201
5202 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5203 (PTRACE_ARG4_TYPE): Likewise.
5204 (PTRACE_XFER_TYPE): Likewise.
5205 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5206 ptrace to PTRACE_ARG3_TYPE.
5207 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5208 (PTRACE_ARG4_TYPE): Likewise.
5209 (PTRACE_XFER_TYPE): Likewise.
5210 (linux_detach_one_lwp): Cast fourth argument of
5211 ptrace to long then PTRACE_ARG4_TYPE.
5212 (regsets_fetch_inferior_registers): Cast third argument of
5213 ptrace to long then PTRACE_ARG3_TYPE.
5214 (regsets_store_inferior_registers): Likewise.
5215
5216 2012-04-20 Pedro Alves <palves@redhat.com>
5217
5218 * configure: Regenerate.
5219
5220 2012-04-19 Pedro Alves <palves@redhat.com>
5221
5222 * Makefile.in (GNULIB_BUILDDIR): New.
5223 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5224 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5225 (all, install-only, uninstall, clean-info, all-lib, clean): No
5226 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5227 (maintainer-clean realclean distclean): Use subdir_do.
5228 (subdir_do): New.
5229 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5230 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5231 * acinclude.m4: Include acx_configure_dir.m4.
5232 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5233 calls. Call AC_PROG_RANLIB. Configure gnulib using
5234 ACX_CONFIGURE_DIR.
5235 (GNULIB): New.
5236 (GNULIB_STDINT_H): Adjust.
5237 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5238 * gdbreplay.c: Include build-gnulib/config.h.
5239 * server.h: Likewise.
5240 * aclocal.m4: Regenerate.
5241 * config.in: Regenerate.
5242 * configure: Regenerate.
5243
5244 2012-04-19 Pedro Alves <palves@redhat.com>
5245
5246 * Makefile.in (LIBGNU, INCGNU): Adjust.
5247 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5248 (all, install-only, uninstall, clean-info, all-lib, clean)
5249 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5250 * configure.ac: Adjust AC_OUTPUT output.
5251 * aclocal.m4: Regenerate.
5252 * configure: Regenerate.
5253
5254 2012-04-19 Pedro Alves <palves@redhat.com>
5255
5256 * Makefile.in (generated_files): New.
5257 (server_h): Remove the explicit dependency on config.h, and depend
5258 on $generated_files.
5259
5260 2012-04-19 Pedro Alves <palves@redhat.com>
5261
5262 * Makefile.in (INCGNU): Add -Ignulib.
5263
5264 2012-04-19 Pedro Alves <palves@redhat.com>
5265
5266 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5267 (INCGNU): ... this, and spell out -I here.
5268 (GNULIB_LIB): Rename to ...
5269 (LIBGNU): ... this.
5270 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5271
5272 2012-04-19 Pedro Alves <palves@redhat.com>
5273
5274 * config.in: Regenerate.
5275
5276 2012-04-19 Pedro Alves <palves@redhat.com>
5277
5278 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5279 * server.h (memmem): Remove declaration.
5280 * config.in: Regenerate.
5281 * configure: Regenerate.
5282
5283 2012-04-19 Yao Qi <yao@codesourcery.com>
5284
5285 * Makefile.in (SFILES): Add common/vec.c.
5286 (OBS): Add vec.o.
5287 (vec.o): New rule.
5288
5289 2012-04-19 Yao Qi <yao@codesourcery.com>
5290
5291 * remote-utils.c (prepare_resume_reply): Replace with macro
5292 target_core_of_thread.
5293 * server.c (handle_qxfer_threads_proper): Likewise.
5294 * target.h (traget_core_of_thread): New macro.
5295
5296 2012-04-18 Pedro Alves <palves@redhat.com>
5297
5298 * aclocal.m4: Regenerate.
5299 * configure: Regenerate.
5300
5301 2012-04-16 Yao Qi <yao@codesourcery.com>
5302
5303 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5304 duplicated on address.
5305
5306 2012-04-16 Yao Qi <yao@codesourcery.com>
5307
5308 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5309 (struct tracepoint_action_ops) <send>: New field.
5310 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5311 (agent_expr_send, x_tracepoint_action_send): New.
5312 (l_tracepoint_action_send): New.
5313 (cmd_qtdp): Download and install tracepoint
5314 according to `use_agent'.
5315 (run_inferior_command): Add one more parameter `len'.
5316 Update callers.
5317 (tracepoint_send_agent): New.
5318 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5319
5320 2012-04-16 Yao Qi <yao@codesourcery.com>
5321
5322 * tracepoint.c (download_tracepoints): Moved to ...
5323 (cmd_qtstart): ... here.
5324
5325 2012-04-14 Yao Qi <yao@codesourcery.com>
5326
5327 * tracepoint.c: Include inttypes.h.
5328 (struct collect_memory_action): Use sized types.
5329 (struct tracepoint): Likewise.
5330 (cmd_qtdp, stop_tracing): Update print specifiers.
5331 (cmd_qtp, response_tracepoint): Likewise.
5332 (collect_data_at_tracepoint): Likewise.
5333 (collect_data_at_step): Likewise.
5334
5335 2012-04-14 Yao Qi <yao@codesourcery.com>
5336
5337 Import gnulib module inttypes.
5338 * aclocal.m4, config.in, configure: Regenerated.
5339
5340 2012-04-14 Yao Qi <yao@codesourcery.com>
5341
5342 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5343 Makefile and config.status at last.
5344
5345 2012-04-13 Yao Qi <yao@codesourcery.com>
5346
5347 * tracepoint.c: Include stdint.h unconditionally.
5348
5349 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5350
5351 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5352 on BFD_HAVE_SYS_PROCFS_TYPE.
5353 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5354 * configure: Regenerate.
5355 * config.in: Likewise.
5356
5357 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5358
5359 * Makefile.in (clean): Also remove x32.c x32-linux.c
5360 x32-avx.c x32-avx-linux.c.
5361 (x32.o): New target.
5362 (x32.c): Likewise.
5363 (x32-linux.o): Likewise.
5364 (x32-linux.c): Likewise.
5365 (x32-avx.o): Likewise.
5366 (x32-avx.c): Likewise.
5367 (x32-avx-linux.o): Likewise.
5368 (x32-avx-linux.c): Likewise.
5369
5370 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5371 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5372 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5373 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5374 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5375 i386/x32-avx-linux.xml.
5376
5377 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5378 (init_registers_x32_avx_linux): Likwise.
5379 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5380 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5381
5382 2012-04-13 Pedro Alves <palves@redhat.com>
5383
5384 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5385 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5386 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5387 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5388 the sub-make.
5389
5390 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5391
5392 * linux-x86-low.c (compat_x32_clock_t): New.
5393 (compat_x32_siginfo_t): Likewise.
5394 (compat_x32_siginfo_from_siginfo): Likewise.
5395 (siginfo_from_compat_x32_siginfo): Likewise.
5396 (linux_is_elf64): Likewise.
5397 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5398 and siginfo_from_compat_x32_siginfo for x32.
5399 (x86_arch_setup): Set linux_is_elf64.
5400
5401 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5402
5403 PR gdb/13969
5404 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5405 e_machine field.
5406 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5407 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5408 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5409 compatible with process.
5410
5411 2012-04-12 Yao Qi <yao@codesourcery.com>
5412
5413 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5414 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5415 (install-only, install-info, clean): Handle sub dir gnulib.
5416 (all-lib, am--refresh): New targets.
5417 (memmem.o): Remove target.
5418 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5419 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5420 (AC_REPLACE_FUNCS): Remove memmem.
5421 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5422 (AC_OUTPUT): Generate Makefile in gnulib/.
5423 * aclocal.m4, config.in, configure: Regenerated.
5424
5425 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5426
5427 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5428
5429 2012-04-05 Pedro Alves <palves@redhat.com>
5430
5431 -Werror=strict-aliasing
5432
5433 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5434 pointer.
5435
5436 2012-04-04 Pedro Alves <palves@redhat.com>
5437
5438 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5439 (sparc_store_gregset_from_stack, sparc_store_gregset)
5440 (sparc_breakpoint_at): Fix formatting.
5441
5442 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5443
5444 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5445 are available.
5446 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5447 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5448 * config.in: Regenerate.
5449 * configure: Likewise.
5450
5451 2012-03-29 Pedro Alves <palves@redhat.com>
5452
5453 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5454 Correct ptrace arguments.
5455
5456 2012-03-28 Pedro Alves <palves@redhat.com>
5457
5458 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5459 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5460 (IA64_FR1_REGNUM): New defines.
5461 (ia64_fetch_register): New.
5462 (the_low_target): Install it.
5463 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5464 field.
5465 * linux-low.c (linux_fetch_registers): Try the
5466 the_low_target.fetch_register hook first.
5467
5468 * linux-arm-low.c (the_low_target): Adjust.
5469 * linux-bfin-low.c (the_low_target): Adjust.
5470 * linux-cris-low.c (the_low_target): Adjust.
5471 * linux-crisv32-low.c (the_low_target): Adjust.
5472 * linux-m32r-low.c (the_low_target): Adjust.
5473 * linux-m68k-low.c (the_low_target): Adjust.
5474 * linux-mips-low.c (the_low_target): Adjust.
5475 * linux-ppc-low.c (the_low_target): Adjust.
5476 * linux-s390-low.c (the_low_target): Adjust.
5477 * linux-sh-low.c (the_low_target): Adjust.
5478 * linux-sparc-low.c (the_low_target): Adjust.
5479 * linux-tic6x-low.c (the_low_target): Adjust.
5480 * linux-x86-low.c (the_low_target): Adjust.
5481 * linux-xtensa-low.c (the_low_target): Adjust.
5482
5483 2012-03-26 Pedro Alves <palves@redhat.com>
5484
5485 * server.c (handle_qxfer_libraries): Don't bail early if
5486 the_target->qxfer_libraries_svr4 is not NULL.
5487
5488 2012-03-26 Pedro Alves <palves@redhat.com>
5489
5490 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5491
5492 2012-03-23 Pedro Alves <palves@redhat.com>
5493
5494 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5495 "library-list-svr4" element's start tag when the the DSO list is
5496 empty.
5497
5498 2012-03-23 Pedro Alves <palves@redhat.com>
5499
5500 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5501 a variable whose type size is the same as the inferior's pointer
5502 size.
5503
5504 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5505
5506 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5507 struct siginfo.
5508 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5509 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5510 * linux-low.h: Include <signal.h>.
5511 (struct siginfo): Remove forward declaration.
5512 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5513 struct siginfo.
5514
5515 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5516
5517 * .gitignore: Ignore more files.
5518
5519 2012-03-19 Pedro Alves <palves@redhat.com>
5520 Jan Kratochvil <jan.kratochvil@redhat.com>
5521
5522 * server.c (cont_thread, general_thread): Add describing comments.
5523 (start_inferior): Clear `cont_thread'.
5524 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5525 of a process.
5526
5527 2012-03-15 Yao Qi <yao@codesourcery.com>
5528
5529 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5530 handling to ...
5531 (cmd_qtdp): ... here.
5532
5533 2012-03-15 Yao Qi <yao@codesourcery.com>
5534
5535 * tracepoint.c (struct tracepoint_action_ops): New.
5536 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5537 (m_tracepoint_action_download): New.
5538 (r_tracepoint_action_download): New.
5539 (x_tracepoint_action_download): New.
5540 (l_tracepoint_action_download): New.
5541 (add_tracepoint_action): Install `action->ops' according type.
5542 (download_tracepoint_1): Move code `download' function pointer
5543 of various tracepoint_action_ops.
5544
5545 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5546
5547 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5548 linux_ptrace_attach_warnings.
5549
5550 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5551
5552 * Makefile.in (linux-ptrace.o): New.
5553 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5554 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5555 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5556 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5557 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5558 of these targets.
5559 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5560
5561 2012-03-08 Yao Qi <yao@codesourcery.com>
5562 Pedro Alves <palves@redhat.com>
5563
5564 Fix PR server/13392.
5565 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5566 offset of JMP insn.
5567 * tracepoint.c (remove_tracepoint): New.
5568 (cmd_qtdp): Call remove_tracepoint when failed to install.
5569
5570 2012-03-07 Pedro Alves <palves@redhat.com>
5571
5572 * linux-low.c (get_detach_signal): New.
5573 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5574 Pass on pending signals to PTRACE_DETACH. Check the result of the
5575 ptrace call.
5576 * server.c (program_signals, program_signals_p): New.
5577 (handle_general_set): Handle QProgramSignals.
5578 * server.h (program_signals, program_signals_p): Declare.
5579
5580 2012-03-05 Pedro Alves <palves@redhat.com>
5581 Jan Kratochvil <jan.kratochvil@redhat.com>
5582
5583 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5584 New comment why.
5585
5586 2012-03-03 Yao Qi <yao@codesourcery.com>
5587
5588 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5589 agent_look_up_symbols.
5590
5591 2012-03-03 Yao Qi <yao@codesourcery.com>
5592
5593 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5594 (linux-x86-low.o): Likewise.
5595 * server.h: Remove in_process_agent_loaded.
5596 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5597 common/agent.c.
5598 Update callers.
5599
5600 2012-03-03 Yao Qi <yao@codesourcery.com>
5601
5602 * tracepoint.c (gdb_agent_capability): New global.
5603 (in_process_agent_loaded_ust): Renamed to
5604 `in_process_agent_supports_ust'.
5605 Update callers.
5606 (in_process_agent_supports_ust): Call agent_capability_check.
5607 (clear_installed_tracepoints): Assert that agent supports
5608 agent.
5609
5610 2012-03-03 Yao Qi <yao@codesourcery.com>
5611
5612 * linux-low.c (linux_supports_agent): New.
5613 (linux_target_ops): Initialize field `supports_agent' with
5614 linux_supports_agent.
5615 * target.h (struct target_ops) <supports_agent>: New.
5616 (target_supports_agent): New macro.
5617 * server.c (handle_general_set): Handle packet 'QAgent'.
5618 (handle_query): Send `QAgent+'.
5619 * Makefile.in (server.o): Depends on agent.h.
5620
5621 2012-03-03 Yao Qi <yao@codesourcery.com>
5622
5623 * Makefile.in (OBS): Add agent.o.
5624 Add new rule for agent.o.
5625 Track dependence of tracepoint.c on agent.h.
5626 * tracepoint.c (run_inferior_command_1):
5627 (run_inferior_command): Call agent_run_command.
5628 (gdb_ust_connect_sync_socket): Deleted. Move it to
5629 common/agent.c.
5630 (resume_thread, stop_thread): Likewise.
5631 (gdb_ust_socket_init): Renamed to ...
5632 (gdb_agent_socket_init): ... New.
5633 (gdb_ust_thread): Renamed to ...
5634 (gdb_agent_helper_thread): ... New.
5635 (gdb_ust_init): Move some code to ...
5636 (gdb_agent_init): ... here. New.
5637 [HAVE_UST]: Call gdb_ust_init.
5638 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5639 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5640 * config.in, configure: Regenerated.
5641
5642 2012-03-02 Pedro Alves <palves@redhat.com>
5643
5644 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5645 * linux-low.c (struct simple_pid_list): New.
5646 (stopped_pids): New a struct simple_pid_list pointer.
5647 (add_to_pid_list, pull_pid_from_list): New.
5648 (handle_extended_wait): Don't assume the first signal new children
5649 report is SIGSTOP. Adjust call to pull_pid_from_list.
5650 (linux_wait_for_lwp): Adjust.
5651
5652 2012-03-02 Yao Qi <yao@codesourcery.com>
5653
5654 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5655 debug log.
5656
5657 2012-03-02 Yao Qi <yao@codesourcery.com>
5658
5659 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5660 `stop_pc' and `tpoint'. Update caller.
5661
5662 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5663
5664 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5665 * linux-low.c (use_linux_regsets): New macro.
5666 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5667 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5668 (linux_register_in_regsets): New function.
5669 (usr_fetch_inferior_registers): Skip registers covered by
5670 regsets.
5671 (usr_store_inferior_registers): Likewise.
5672 (usr_fetch_inferior_registers): New macro.
5673 (usr_store_inferior_registers): Likewise.
5674 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5675 (linux_store_registers): Likewise.
5676 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5677 prototype.
5678 (init_registers_mips64_dsp_linux): Likewise.
5679 (init_registers_mips_linux): New macro.
5680 (init_registers_mips_dsp_linux): Likewise.
5681 (mips_dsp_num_regs): Likewise.
5682 (DSP_BASE, DSP_CONTROL): New fallback macros.
5683 (mips_base_regs): New macro.
5684 (mips_regmap): Use it. Fix the size.
5685 (mips_dsp_regmap): New variable.
5686 (mips_dsp_regset_bitmap): Likewise.
5687 (mips_arch_setup): New function.
5688 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5689 than mips_regmap.
5690 (mips_cannot_store_register): Likewise.
5691 (the_low_target): Update .arch_setup, .num_regs and .regmap
5692 initializers. Add .regset_bitmap initializer.
5693 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5694 initializer.
5695 * linux-bfin-low.c (the_low_target): Likewise.
5696 * linux-cris-low.c (the_low_target): Likewise.
5697 * linux-crisv32-low.c (the_low_target): Likewise.
5698 * linux-ia64-low.c (the_low_target): Likewise.
5699 * linux-m32r-low.c (the_low_target): Likewise.
5700 * linux-m68k-low.c (the_low_target): Likewise.
5701 * linux-ppc-low.c (the_low_target): Likewise.
5702 * linux-s390-low.c (the_low_target): Likewise.
5703 * linux-sh-low.c (the_low_target): Likewise.
5704 * linux-sparc-low.c (the_low_target): Likewise.
5705 * linux-tic6x-low.c (the_low_target): Likewise.
5706 * linux-x86-low.c (the_low_target): Likewise.
5707 * linux-xtensa-low.c (the_low_target): Likewise.
5708 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5709 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5710 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5711 srv_xmlfiles.
5712 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5713 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5714
5715 2012-02-29 Yao Qi <yao@codesourcery.com>
5716 Pedro Alves <palves@redhat.com>
5717
5718 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5719 `step_over_finished' is true.
5720
5721 2012-02-27 Pedro Alves <palves@redhat.com>
5722
5723 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5724 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5725
5726 2012-02-27 Pedro Alves <palves@redhat.com>
5727
5728 PR server/9684
5729 * linux-low.c (pid_is_stopped): New.
5730 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5731
5732 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5733
5734 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5735 of conditions.
5736
5737 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5738
5739 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5740
5741 2012-02-24 Luis Machado <lgustavo@codesourcery>
5742
5743 * server.c (handle_query): Advertise support for target-side
5744 breakpoint condition evaluation.
5745 (process_point_options): New function.
5746 (process_serial_event): When inserting a breakpoint, check for
5747 a target-side condition that should be evaluated.
5748
5749 * mem-break.c: Include regcache.h and ax.h.
5750 (point_cond_list_t): New data structure.
5751 (breakpoint) <cond_list>: New field.
5752 (find_gdb_breakpoint_at): Make non-static.
5753 (delete_gdb_breakpoint_at): Clear any target-side
5754 conditions.
5755 (clear_gdb_breakpoint_conditions): New function.
5756 (add_condition_to_breakpoint): Likewise.
5757 (add_breakpoint_condition): Likewise.
5758 (gdb_condition_true_at_breakpoint): Likewise.
5759 (gdb_breakpoint_here): Return result directly instead
5760 of going through a local variable.
5761
5762 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5763 (clear_gdb_breakpoint_conditions): Likewise.
5764 (add_breakpoint_condition): Likewise.
5765 (gdb_condition_true_at_breakpoint): Likewise.
5766
5767 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5768 (need_step_over_p): Take target-side breakpoint condition into
5769 consideration.
5770
5771 2012-02-24 Luis Machado <lgustavo@codesourcery>
5772
5773 * server.h: Include tracepoint.h.
5774 (agent_mem_read, agent_get_trace_state_variable_value,
5775 agent_set_trace_state_variable_value,
5776 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5777 get_set_tsv_func_addr): New prototypes.
5778
5779 * ax.h: New include file.
5780 * ax.c: New source file.
5781
5782 * tracepoint.c: Include ax.h.
5783 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5784 agent_expr, eval_result_type): Move to ax.h.
5785 (parse_agent_expr): Rename to ...
5786 (gdb_parse_agent_expr): ... this, make it non-static and move
5787 to ax.h.
5788 (unparse_agent_expr) Rename to ...
5789 (gdb_unparse_agent_expr): ... this, make it non-static and move
5790 to ax.h.
5791 (eval_agent_expr): Rename to ...
5792 (eval_tracepoint_agent_expr): ... this.
5793 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5794 forward declarations.
5795 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5796 (agent_get_trace_state_variable_value): New function.
5797 (agent_set_trace_state_variable_value): New function.
5798 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5799 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5800 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5801 (condition_true_at_tracepoint): Likewise.
5802 (parse_agent_expr): Rename to ...
5803 (gdb_parse_agent_expr): ... this and move to ax.c.
5804 (unparse_agent_expr): Rename to ...
5805 (gdb_unparse_agent_expr): ... this and move to ax.c.
5806 (gdb_agent_op_name): Move to ax.c.
5807 (eval_agent_expr): Rename to ...
5808 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5809 and move to ax.c.
5810 (eval_tracepoint_agent_expr): New function.
5811 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5812 non-static.
5813 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5814 ax.c.
5815 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5816 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5817 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5818 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5819 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5820 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5821 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5822 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5823 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5824 (compile_bytecodes): Remove forward declaration.
5825 (is_goto_target): Move to ax.c.
5826 (compile_bytecodes): Move to ax.c and call
5827 agent_get_trace_state_variable_value (...) and
5828 agent_set_trace_state_variable_value (...).
5829
5830 * Makefile.in: Update ax.c and IPA dependencies.
5831
5832 2012-02-24 Pedro Alves <palves@redhat.com>
5833
5834 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5835 (cmd_bigqtbuffer_circular): ... this. Only handle
5836 'QTBuffer:circular:'.
5837 (handle_tracepoint_general_set): Adjust.
5838
5839 2012-02-16 Yao Qi <yao@codesourcery.com>
5840
5841 * inferiors.c: Move code to ...
5842 * dll.c: .... here. New.
5843 * server.h: Declare clear_dlls.
5844 * Makefile.in (SFILES): Add dll.c.
5845 (OBS): Add dll.o
5846 (dll.o): New rule.
5847
5848 2012-02-11 Yao Qi <yao@codesourcery.com>
5849
5850 * server.c: (handle_monitor_command): Add a new parameter
5851 `own_buf'.
5852 (handle_query): Update caller.
5853
5854 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5855
5856 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5857 * configure, config.in: Regenerate.
5858 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5859 is not defined.
5860
5861 2012-02-02 Pedro Alves <palves@redhat.com>
5862
5863 Try SIGKILL first, then PTRACE_KILL.
5864 * linux-low.c (linux_kill_one_lwp): New.
5865 (linux_kill_one_lwp): Rename to ...
5866 (kill_one_lwp_callback): ... this. Use the new
5867 linux_kill_one_lwp.
5868
5869 2012-02-02 Pedro Alves <palves@redhat.com>
5870
5871 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5872 inferior.
5873
5874 2012-01-27 Pedro Alves <palves@redhat.com>
5875
5876 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5877 (elf_64_file_p): Make static.
5878 (linux_pid_exe_is_elf_64_file): New.
5879 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5880 Delete declarations.
5881 (linux_pid_exe_is_elf_64_file): Declare.
5882 * linux-x86-low.c (x86_arch_setup): Use
5883 linux_pid_exe_is_elf_64_file.
5884
5885 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5886
5887 * linux-low.c (linux_wait_for_event_1): Rename to ...
5888 (linux_wait_for_event): ... here and merge it with former
5889 linux_wait_for_event - new variable wait_ptid, use it.
5890 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5891
5892 2012-01-23 Pedro Alves <palves@redhat.com>
5893
5894 * server.c (main): Avoid yet another case of infinite loop while
5895 detaching/killing after a longjmp.
5896
5897 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5898
5899 Code cleanup.
5900 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5901
5902 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5903
5904 * hostio.c (handle_readlink): New function.
5905 (handle_vFile): Call it to handle "vFile:readlink" packets.
5906
5907 2012-01-20 Pedro Alves <palves@redhat.com>
5908 Ulrich Weigand <ulrich.weigand@linaro.org>
5909
5910 * server.c (handle_v_requests): Only support vAttach and vRun to
5911 start multiple processes when in extended protocol mode.
5912
5913 2012-01-17 Pedro Alves <palves@redhat.com>
5914
5915 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5916 memalign plus mprotect to allocate the scratch buffer.
5917
5918 2012-01-13 Pedro Alves <palves@redhat.com>
5919
5920 * server.c (attach_inferior): Clear `cont_thread'.
5921
5922 2012-01-13 Pedro Alves <palves@redhat.com>
5923
5924 * server.c (main): Avoid infinite loop while detaching/killing
5925 after a longjmp.
5926
5927 2012-01-09 Doug Evans <dje@google.com>
5928
5929 * server.c (start_inferior): Set last_ptid in --wrapper case.
5930
5931 2012-01-06 Yao Qi <yao@codesourcery.com>
5932
5933 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5934 defined.
5935 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5936
5937 2012-01-04 Yao Qi <yao@codesourcery.com>
5938
5939 * tracepoint.c (cmd_qtdp): Print debug message
5940 for static tracepoint.
5941
5942 2012-01-04 Yao Qi <yao@codesourcery.com>
5943
5944 * tracepoint.c (trace_vdebug): Differentiate debug message
5945 between gdbserver and IPA.
5946
5947 2012-01-03 Yao Qi <yao@codesourcery.com>
5948
5949 * tracepoint.c (tracepoint_was_hit): Don't collect for
5950 static tracepoint.
5951
5952 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5953
5954 * terminal.h: Reformat copyright header.
5955
5956 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5957
5958 * server.c (gdbserver_version): Update copyright year.
5959 * gdbreplay.c (gdbreplay_version): Likewise.
5960
5961 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5962
5963 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5964
5965 Revert:
5966 2011-12-18 Hui Zhu <teawater@gmail.com>
5967 * linux-low.c (linux_create_inferior): Save return value to ret.
5968
5969 2011-12-18 Hui Zhu <teawater@gmail.com>
5970
5971 * linux-low.c (linux_create_inferior): Save return value to ret.
5972
5973 2011-12-16 Doug Evans <dje@google.com>
5974
5975 * linux-low.c (linux_create_inferior): If stdio connection,
5976 redirect stdin from /dev/null, stdout to stderr.
5977 * remote-utils.c (remote_is_stdio): New static global.
5978 (remote_connection_is_stdio): New function.
5979 (remote_prepare): Handle stdio connection.
5980 (remote_open): Ditto.
5981 (remote_close): Don't close stdin for stdio connections.
5982 (read_prim,write_prim): New functions. Replace all calls to
5983 read/write to these.
5984 * server.c (main): Watch for "-" argument. Move call to
5985 remote_prepare before start_inferior.
5986 * server.h (STDIO_CONNECTION_NAME): New macro.
5987 (remote_connection_is_stdio): Declare.
5988
5989 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5990 in debugging output.
5991
5992 2011-12-15 Yao Qi <yao@codesourcery.com>
5993
5994 * tracepoint.c: Include sys/syscall.h.
5995 (gdb_ust_thread): Remove preprocessor conditional.
5996
5997 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5998
5999 * linux-low.c (linux_detach_one_lwp): Call
6000 the_low_target.prepare_to_resume before detaching.
6001
6002 2011-12-14 Yao Qi <yao@codesourcery.com>
6003
6004 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6005 of write.
6006
6007 2011-12-14 Yao Qi <yao@codesourcery.com>
6008
6009 * i386-low.c (i386_low_stopped_data_address): Initialize local
6010 variable `control'.
6011
6012 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6013
6014 PR remote/13492
6015
6016 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6017 DR_CONTROL unless necessary. Extend comments.
6018 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6019 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6020
6021 2011-12-13 Yao Qi <yao@codesourcery.com>
6022
6023 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6024 macros.
6025 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6026
6027 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6028
6029 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6030 Print new debug message for such case.
6031
6032 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6033
6034 Fix overlapping memcpy.
6035 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6036 the read_inferior_memory transfer.
6037 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6038 write_inferior_memory transfer.
6039 (set_fast_tracepoint_jump): New variable buf. Use it for the
6040 read_inferior_memory and write_inferior_memory transfers.
6041 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6042 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6043 Use it for the write_inferior_memory transfer.
6044 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6045 buffers.
6046
6047 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6048
6049 * linux-low.c (fetch_register, store_register): Make code
6050 consistent, fix formatting.
6051
6052 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6053
6054 * linux-low.c (usr_store_inferior_registers): Factor out code
6055 to handle individual registers into...
6056 (store_register): ... this new function.
6057
6058 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6059
6060 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6061 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6062 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6063 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6064 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6065 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6066 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6067 (srv_xmlfiles): Add new XML files.
6068
6069 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6070 and <sys/uio.h>.
6071 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6072 (init_registers_s390_linux32v1): Add prototype.
6073 (init_registers_s390_linux32v2): Likewise.
6074 (init_registers_s390_linux64v1): Likewise.
6075 (init_registers_s390_linux64v2): Likewise.
6076 (init_registers_s390x_linux64v1): Likewise.
6077 (init_registers_s390x_linux64v2): Likewise.
6078 (s390_num_regs): Increment to 52.
6079 (s390_regmap): Add orig_r2 register.
6080 (s390_num_regs_3264): Increment to 68.
6081 (s390_regmap_3264): Add orig_r2 register.
6082 (s390_collect_ptrace_register): Handle orig_r2 register.
6083 (s390_supply_ptrace_register): Likewise.
6084 (s390_fill_last_break): New function.
6085 (s390_store_last_break): Likewise.
6086 (s390_fill_system_call): New function.
6087 (s390_store_system_call): Likewise.
6088 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6089 register sets.
6090 (s390_check_regset): New function.
6091 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6092 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6093 Update target_regsets for available register sets.
6094
6095 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6096 Jan Kratochvil <jan.kratochvil@redhat.com>
6097
6098 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6099 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6100 New.
6101 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6102 * linux-low.h (struct process_info_private): New member r_debug.
6103 * server.c (handle_qxfer_libraries): Call
6104 the_target->qxfer_libraries_svr4.
6105 (handle_qxfer_libraries_svr4): New function.
6106 (qxfer_packets): New entry "libraries-svr4".
6107 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6108 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6109 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6110 PACKET_qXfer_libraries_svr4.
6111
6112 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6113
6114 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6115 PSW address/mask between 8-byte and 16-byte formats.
6116 (s390_supply_ptrace_register): Likewise.
6117 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6118 basic addressing mode bit.
6119
6120 2011-11-24 Stan Shebs <stan@codesourcery.com>
6121
6122 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6123
6124 2011-11-17 Stan Shebs <stan@codesourcery.com>
6125
6126 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6127 (tracing_start_time): New global.
6128 (tracing_stop_time): New global.
6129 (tracing_user_name): New global.
6130 (tracing_notes): New global.
6131 (tracing_stop_note): New global.
6132 (cmd_qtstart): Set traceframe_usage, start_time.
6133 (stop_tracing): Set stop_time.
6134 (cmd_qtstatus): Report additional status.
6135 (cmd_qtp): New function.
6136 (handle_tracepoint_query): Call it.
6137 (cmd_qtnotes): New function.
6138 (handle_tracepoint_general_set): Call it.
6139 (get_timestamp): Rename from tsv_get_timestamp.
6140
6141 2011-11-14 Stan Shebs <stan@codesourcery.com>
6142 Kwok Cheung Yeung <kcy@codesourcery.com>
6143
6144 * linux-x86-low.c (small_jump_insn): New.
6145 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6146 trampoline and error message, build a trampoline and issue a small
6147 jump instruction to it.
6148 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6149 trampoline and error message.
6150 (x86_get_min_fast_tracepoint_insn_len): New.
6151 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6152 * linux-low.h (struct linux_target_ops): Add arguments to
6153 install_fast_tracepoint_jump_pad operation, add new operation.
6154 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6155 arguments.
6156 (linux_get_min_fast_tracepoint_insn_len): New function.
6157 (linux_target_op): Add new operation.
6158 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6159 (gdb_trampoline_buffer_end): Ditto.
6160 (gdb_trampoline_buffer_error): Ditto.
6161 (struct ipa_sym_addresses): Add fields for new IPA variables.
6162 (symbol_list): Add entries for new IPA variables.
6163 (struct tracepoint): Add fields to hold the address range of the
6164 trampoline used by the tracepoint.
6165 (trampoline_buffer_head): New static variable.
6166 (trampoline_buffer_tail): Ditto.
6167 (claim_trampoline_space): New function.
6168 (have_fast_tracepoint_trampoline_buffer): New function.
6169 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6170 structure.
6171 (install_fast_tracepoint): Ditto, also add error buffer argument.
6172 (cmd_qtminftpilen): New function.
6173 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6174 (fast_tracepoint_from_trampoline_address): New function.
6175 (fast_tracepoint_collecting): Handle trampoline as part of jump
6176 pad space.
6177 (set_trampoline_buffer_space): New function.
6178 (initialize_tracepoint): Initialize new IPA variables.
6179 * target.h (struct target_ops): Add arguments to
6180 install_fast_tracepoint_jump_pad operation, add new
6181 get_min_fast_tracepoint_insn_len operation.
6182 (target_get_min_fast_tracepoint_insn_len): New.
6183 (install_fast_tracepoint_jump_pad): Add arguments.
6184 * server.h (IPA_BUFSIZ): Define.
6185 * linux-i386-ipa.c: Include extra header files.
6186 (initialize_fast_tracepoint_trampoline_buffer): New function.
6187 (initialize_low_tracepoint): Call it.
6188 * server.h (set_trampoline_buffer_space): Declare.
6189 (claim_trampoline_space): Ditto.
6190 (have_fast_tracepoint_trampoline_buffer): Ditto.
6191
6192 2011-11-14 Yao Qi <yao@codesourcery.com>
6193
6194 * server.c (handle_query): Handle InstallInTrace for qSupported.
6195 * tracepoint.c (add_tracepoint): Sort list.
6196 (install_tracepoint, download_tracepoint): New.
6197 (cmd_qtdp): Call them to install and download tracepoints.
6198 (sort_tracepoints): Removed.
6199 (cmd_qtstart): Update.
6200
6201 2011-11-14 Yao Qi <yao@codesourcery.com>
6202
6203 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6204 * mem-break.h: Declare.
6205 * tracepoint.c (cmd_qtstart): Move some code to ...
6206 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6207 New.
6208 (download_tracepoints): Move some code to ...
6209 (download_tracepoint_1): ... here. New.
6210
6211 2011-11-08 Yao Qi <yao@codesourcery.com>
6212
6213 * remote-utils.c (relocate_instruction): A comment fix.
6214
6215 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6216
6217 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6218 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6219 dr_status_mirror and dr_control_mirror from debug_reg_state.
6220 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6221 (i386_initial_stuff): Remove use of deleted globals.
6222 (i386_get_thread_context, i386_set_thread_context,
6223 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6224 from debug_reg_state.
6225
6226 2011-11-05 Yao Qi <yao@codesourcery.com>
6227
6228 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6229 address as TPOINT's.
6230
6231 2011-11-02 Stan Shebs <stan@codesourcery.com>
6232
6233 * tracepoint.c (agent_mem_read_string): New function.
6234 (eval_agent_expr): Call it for tracenz.
6235 * server.c (handle_query): Report support for tracenz.
6236
6237 2011-11-02 Yao Qi <yao@codesourcery.com>
6238
6239 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6240
6241 2011-11-02 Yao Qi <yao@codesourcery.com>
6242
6243 * target.h: Fix a typo in comment.
6244
6245 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6246
6247 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6248 clobber the breakpoints' shadows with fast tracepoint jumps.
6249 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6250 * target.c (write_inferior_memory): Also pass MYADDR down to
6251 check_mem_write.
6252
6253 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6254
6255 * configure.ac: Check support for personality routine.
6256 * configure: Regenerate.
6257 * config.in: Likewise.
6258 * linux-low.c: Include <sys/personality.h>.
6259 Define ADDR_NO_RANDOMIZE if necessary.
6260 (linux_create_inferior): Disable address space randomization when
6261 forking inferior, if requested.
6262 (linux_supports_disable_randomization): New function.
6263 (linux_target_ops): Install it.
6264 * server.h (disable_randomization): Declare.
6265 * server.c (disable_randomization): New global variable.
6266 (handle_general_set): Handle QDisableRandomization.
6267 (handle_query): Likewise for qSupported.
6268 (main): Support --disable-randomization and --no-disable-randomization
6269 command line arguments.
6270 * target.h (struct target_ops): Add supports_disable_randomization.
6271 (target_supports_disable_randomization): New macro.
6272
6273 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6274
6275 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6276 ifdef check.
6277 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6278 [!PT_GETDSBT] (target_loadmap): New definition.
6279 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6280 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6281 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6282 and PT_GETDSBT to LINUX_LOADMAP.
6283 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6284 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6285
6286 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6287
6288 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6289 (arm_linux_hwbp_cap): New static variable.
6290 (arm_linux_get_hwbp_cap): Replace by ...
6291 (arm_linux_init_hwbp_cap): ... this new function.
6292 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6293 (arm_linux_get_hw_watchpoint_count): Likewise.
6294 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6295 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6296 (arm_prepare_to_resume): Use perror_with_name instead of error.
6297
6298 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6299
6300 * linux-arm-low.c: Include <signal.h>.
6301 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6302 (struct arm_linux_hwbp_cap): New data type.
6303 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6304 (struct arm_linux_hw_breakpoint): New data type.
6305 (MAX_BPTS, MAX_WPTS): Define.
6306 (struct arch_process_info, struct arch_lwp_info): New data types.
6307 (arm_linux_get_hwbp_cap): New function.
6308 (arm_linux_get_hw_breakpoint_count): Likewise.
6309 (arm_linux_get_hw_watchpoint_count): Likewise.
6310 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6311 (arm_hwbp_control_initialize): Likewise.
6312 (arm_hwbp_control_is_enabled): Likewise.
6313 (arm_hwbp_control_is_initialized): Likewise.
6314 (arm_hwbp_control_disable): Likewise.
6315 (arm_linux_hw_breakpoint_equal): Likewise.
6316 (arm_linux_hw_point_initialize): Likewise.
6317 (struct update_registers_data): New data structure.
6318 (update_registers_callback: New function.
6319 (arm_insert_point): Likewise.
6320 (arm_remove_point): Likewise.
6321 (arm_stopped_by_watchpoint): Likewise.
6322 (arm_stopped_data_address): Likewise.
6323 (arm_new_process): Likewise.
6324 (arm_new_thread): Likewise.
6325 (arm_prepare_to_resume): Likewise.
6326 (the_low_target): Register arm_insert_point, arm_remove_point,
6327 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6328 arm_new_thread, and arm_prepare_to_resume.
6329
6330 2011-09-15 Stan Shebs <stan@codesourcery.com>
6331
6332 * server.h (struct emit_ops): Add compare-goto fields.
6333 * tracepoint.c (gdb_agent_op_sizes): New table.
6334 (emit_eq_goto): New function.
6335 (emit_ne_goto): New function.
6336 (emit_lt_goto): New function.
6337 (emit_le_goto): New function.
6338 (emit_gt_goto): New function.
6339 (emit_ge_goto): New function.
6340 (is_goto_target): New function.
6341 (compile_bytecodes): Recognize special cases of compare-goto
6342 combinations and call specialized emitters for them.
6343 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6344 (amd64_emit_ne_goto): New function.
6345 (amd64_emit_lt_goto): New function.
6346 (amd64_emit_le_goto): New function.
6347 (amd64_emit_gt_goto): New function.
6348 (amd64_emit_ge_goto): New function.
6349 (amd64_emit_ops): Add the new functions.
6350 (i386_emit_eq_goto): New function.
6351 (i386_emit_ne_goto): New function.
6352 (i386_emit_lt_goto): New function.
6353 (i386_emit_le_goto): New function.
6354 (i386_emit_gt_goto): New function.
6355 (i386_emit_ge_goto): New function.
6356 (i386_emit_ops): Add the new functions.
6357
6358 2011-09-08 Stan Shebs <stan@codesourcery.com>
6359
6360 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6361 (i386_emit_epilogue): Restore %ebx.
6362
6363 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6364
6365 * server.c (step_thread): Remove definition.
6366 (process_serial_event): Don't handle Hs.
6367 * server.h (step_thread): Remove declaration.
6368 * target.c (set_desired_inferior): Remove use of step_thread.
6369
6370 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6371
6372 * linux-low.c: Include linux-procfs.h.
6373 (linux_attach_lwp_1): Update comments.
6374 (linux_attach): Scan for existing threads when attaching to a
6375 process that is the tgid.
6376 * Makefile.in: Update dependencies.
6377
6378 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6379
6380 * configure.srv: Add linux-procfs.o dependencies.
6381
6382 2011-08-14 Yao Qi <yao@codesourcery.com>
6383
6384 * target.h (struct target_ops): Fix indent.
6385 * win32-low.c (win32_target_ops): Fix comment.
6386
6387 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6388 Yao Qi <yao@codesourcery.com>
6389
6390 * Makefile.in (clean): Remove tic6x-*.c files.
6391 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6392 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6393 (tic6x-c64xp-linux.c): Likewise.
6394 * configure.srv: Add support for tic6x-*-uclinux.
6395 * linux-tic6x-low.c: New.
6396 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6397
6398 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6399 Yao Qi <yao@codesourcery.com>
6400
6401 * target.h (struct target_ops): Add read_loadmap.
6402 * linux-low.c (struct target_loadseg): New type.
6403 (struct target_loadmap): New type.
6404 (linux_read_loadmap): New function.
6405 (linux_target_ops): Add linux_read_loadmap.
6406 * server.c (handle_query): Support qXfer:fdpic:read packet.
6407 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6408 to NULL.
6409
6410 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6411
6412 * win32-low.c: Include <stdint.h>.
6413
6414 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6415
6416 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6417 to the inferior here.
6418 (i386_remove_aligned_watchpoint): Ditto.
6419 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6420 fit part of the watchpoint in the debug registers.
6421 (i386_update_inferior_debug_regs): New.
6422 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6423 registers, and only update the inferior on success.
6424 (i386_low_remove_watchpoint): Ditto.
6425
6426 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6427
6428 * linux-low.c (compare_ints, unique, list_threads, show_process,
6429 linux_core_of_thread): Delete.
6430 (linux_target_ops): Change linux_core_of_thread to
6431 linux_common_core_of_thread.
6432 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6433 * utils.c (malloc_failure): Change type of argument.
6434 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6435 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6436 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6437 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6438 (IPA_OBJS): Add common-utils-ipa.o.
6439 (ptid_h, linux_osdata_h): New macros.
6440 (server_h): Add common/common-utils.h, common/xml-utils.h,
6441 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6442 common/ptid.h.
6443 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6444 ptid.o, buffer.o): New rules.
6445 (linux-low.o): Add common/linux-osdata.h as a dependency.
6446 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6447 * configure.ac: Add AC_HEADER_DIRENT check.
6448 * config.in: Regenerate.
6449 * configure: Regenerate.
6450 * remote-utils.c (xml_escape_text): Delete.
6451 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6452 buffer_xml_printf): Move to common/buffer.c.
6453 * server.c (main): Remove call to initialize_inferiors.
6454 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6455 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6456 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6457 internal_error, gdb_assert, gdb_assert_fail): Delete.
6458 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6459 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6460 common/buffer.h.
6461 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6462 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6463 initialize_inferiors): Delete.
6464
6465 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6466
6467 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6468 symbol error.
6469
6470 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6471
6472 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6473 assertion.
6474 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6475
6476 2011-05-26 Yao Qi <yao@codesourcery.com>
6477
6478 * Makefile.in (thread-db.o): Track dependence to
6479 common/gdb_thread_db.h.
6480 * thread-db.c: include gdb_thread_db.h from right place.
6481
6482 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6483
6484 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6485 __FILE__ and __LINE__ to internal_error.
6486
6487 2011-05-13 Doug Evans <dje@google.com>
6488
6489 * thread-db.c (try_thread_db_load_from_sdir): New function.
6490 (try_thread_db_load_from_dir): New function.
6491 (thread_db_load_search): Handle $sdir, ignore $pdir.
6492 Remove trying of system directories if search of
6493 libthread-db-search-path fails, that is now done via $sdir.
6494
6495 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6496
6497 * server.c (handle_query): Add EnableDisableTracepoints to the list
6498 of supported features.
6499 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6500 tracepoints.
6501 (cmd_qtenable_disable): New.
6502 (cmd_qtstart): Install tracepoints even if disabled.
6503 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6504 receiving a QTEnable or QTDisable packet.
6505 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6506 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6507 tracepoints.
6508 (gdb_probe): Skip data collection if static tracepoint is disabled.
6509
6510 2011-05-10 Doug Evans <dje@google.com>
6511
6512 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6513
6514 2011-05-04 Doug Evans <dje@google.com>
6515
6516 * linux-low.c (linux_join): Skip process lookup.
6517 * spu-low.c (spu_join): Ditto.
6518 * server.c (join_inferiors_callback): Delete.
6519 (process_serial_event): For 'D' packet (detach) call join_inferior
6520 directly.
6521
6522 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6523
6524 * README: Don't mention xscale*-*-linux*.
6525 * configure.srv (xscale*-*-linux*): Don't handle target.
6526
6527 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6528
6529 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6530 casting pointers.
6531 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6532 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6533 (i386_emit_void_call_2): Likewise.
6534
6535 2011-04-26 Yao Qi <yao@codesourcery.com>
6536
6537 * linux-low.c: Move common macros to linux-ptrace.h.
6538 Include linux-ptrace.h.
6539 * Makefile.in (linux_ptrace_h): New.
6540 (linux-low.o): Depends on linux-ptrace.h.
6541
6542 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6543
6544 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6545 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6546 (remote_prepare): New function with most of the TCP code from ...
6547 (remote_open): ... here. Detect PORT here unconditionally. Move also
6548 setting transport_is_reliable.
6549 * server.c (run_once): New variable.
6550 (gdbserver_usage): Document it.
6551 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6552 the first run if RUN_ONCE.
6553 * server.h (run_once, remote_prepare): New declarations.
6554
6555 2011-04-19 Tom Tromey <tromey@redhat.com>
6556
6557 * win32-low.c (handle_load_dll): Remove duplicate "the".
6558
6559 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6560
6561 Remove support for old Cygwin 1.5 versions.
6562 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6563 function to avoid warning.
6564 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6565 warning.
6566
6567 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6568
6569 * gdbserver/server.h (Macro _): Define it if not available.
6570
6571 2011-03-14 Michael Snyder <msnyder@vmware.com>
6572
6573 * hostio.c (handle_close): Remove unnecessary null test.
6574
6575 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6576
6577 * Makefile.in (maintainer-clean realclean distclean): Remove
6578 "make ... subdir_do" command.
6579
6580 2011-03-10 Michael Snyder <msnyder@vmware.com>
6581
6582 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6583
6584 * server.c (handle_v_run): Free alloced buffer on early return.
6585
6586 2011-03-09 Yao Qi <yao@codesourcery.com>
6587
6588 Revert:
6589 2011-03-04 Yao Qi <yao@codesourcery.com>
6590
6591 * Makefile.in: Remove GNU make feature --directory.
6592
6593 2011-03-05 Yao Qi <yao@codesourcery.com>
6594
6595 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6596 (subdir_do): New make target. Copied from gdb/Makefile.
6597 (maintainer-clean, realclean, distclean, clean): Call corresponding
6598 make targets in common/Makefile.
6599
6600 2011-02-11 Yao Qi <yao@codesourcery.com>
6601
6602 * configure.ac: Call AC_PROG_RANLIB.
6603 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6604 * configure: Regenerate.
6605
6606 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6607
6608 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6609
6610 2011-03-06 Yao Qi <yao@codesourcery.com>
6611
6612 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6613
6614 2011-03-05 Yao Qi <yao@codesourcery.com>
6615
6616 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6617 (subdir_do): New make target. Copied from gdb/Makefile.
6618 (maintainer-clean, realclean, distclean, clean): Call corresponding
6619 make targets in common/Makefile.
6620
6621 2011-03-04 Yao Qi <yao@codesourcery.com>
6622
6623 * Makefile.in: Remove GNU make feature --directory.
6624
6625 2011-03-04 Michael Snyder <msnyder@vmware.com>
6626
6627 * server.c (queue_stop_reply): Call xmalloc not malloc.
6628
6629 2011-03-02 Michael Snyder <msnyder@vmware.com>
6630
6631 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6632
6633 2011-02-28 Michael Snyder <msnyder@vmware.com>
6634
6635 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6636 (cmd_qtframe): Ditto.
6637 (cmd_qtbuffer): Ditto.
6638 (cmd_bigqtbuffer): Ditto.
6639
6640 * utils.c (decimal2str): Initialize 'width' to nine, then
6641 don't mess with it.
6642
6643 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6644
6645 * hostio.c (require_data): Free *data, not data.
6646
6647 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6648
6649 * hostio.c (require_data): Use free, not xfree.
6650
6651 2011-02-27 Michael Snyder <msnyder@vmware.com>
6652
6653 * server.c (handle_query): Discard unused value.
6654
6655 * hostio.c (require_data): Free malloc memory before returning
6656 error.
6657
6658 2011-02-26 Michael Snyder <msnyder@vmware.com>
6659
6660 * linux-low.c (list_threads): Call closedir for dirent.
6661
6662 2011-02-27 Michael Snyder <msnyder@vmware.com>
6663
6664 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6665 a case statement falls through.
6666
6667 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6668
6669 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6670 in comparison.
6671
6672 2011-02-26 Michael Snyder <msnyder@vmware.com>
6673
6674 * utils.c (decimal2str): Eliminate dead code and dead param.
6675 (pulongest): Drop dead param from call to decimal2str.
6676 (plongest): Ditto.
6677
6678 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6679
6680 Revert the following patch (not approved yet):
6681 2011-02-21 Hui Zhu <teawater@gmail.com>
6682 * tracepoint.c (tp_printf): New function.
6683 (eval_agent_expr): Handle gdb_agent_op_printf.
6684
6685 2011-02-21 Hui Zhu <teawater@gmail.com>
6686
6687 * tracepoint.c (tp_printf): New function.
6688 (eval_agent_expr): Handle gdb_agent_op_printf.
6689
6690 2011-02-18 Tom Tromey <tromey@redhat.com>
6691
6692 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6693 (tracepoint.o): Likewise.
6694 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6695 (gdb_agent_op_names): Likewise.
6696
6697 2011-02-18 Tom Tromey <tromey@redhat.com>
6698
6699 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6700 gdb_agent_op_rot>: New constants.
6701 (gdb_agent_op_names): Add pick and roll.
6702 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6703 cases.
6704
6705 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6706
6707 * aclocal.m4: Regenerated with aclocal-1.11.1.
6708
6709 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6710
6711 * server.c (handle_qxfer_traceframe_info): New.
6712 (qxfer_packets): Register "traceframe-info".
6713 (handle_query): Report support for qXfer:traceframe-info:read+.
6714 * tracepoint.c (match_blocktype): New.
6715 (traceframe_find_block_type): Rename to ...
6716 (traceframe_walk_blocks): ... this. Add callback filter argument,
6717 and use it.
6718 (traceframe_find_block_type): New, reimplemented on top of
6719 traceframe_walk_blocks.
6720 (build_traceframe_info_xml): New.
6721 (traceframe_read_info): New.
6722 * server.h (traceframe_read_info): Declare.
6723
6724 2011-02-11 Yao Qi <yao@codesourcery.com>
6725
6726 * configure.ac: Call AC_PROG_RANLIB.
6727 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6728 * configure: Regenerate.
6729
6730 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6731
6732 * server.c (gdb_read_memory): Change return semantics to allow
6733 partial transfers.
6734 (handle_search_memory_1): Adjust.
6735 (process_serial_event) <'m' packet>: Handle partial transfers.
6736 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6737
6738 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6739
6740 * regcache.c (init_register_cache): Initialize
6741 regcache->register_status.
6742 (free_register_cache): Release regcache->register_status.
6743 (regcache_cpy): Copy register_status.
6744 (registers_to_string): Print 'x's for unavailable registers.
6745 (supply_register): Mark the register's status valid or
6746 unavailable, depending on whether a buffer was passed in or not.
6747 (supply_register_zeroed): New.
6748 (supply_regblock): Mark the registers' status valid or
6749 unavailable, depending on whether a buffer was passed in or not.
6750 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6751 (struct regcache): New `register_status' field.
6752 (supply_register_zeroed): Declare.
6753 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6754 supply_register_zeroed, rather than passing a NULL buffer to
6755 supply_register.
6756 * tracepoint.c (fetch_traceframe_registers): Update comment.
6757
6758 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6759
6760 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6761 buffer explicit.
6762
6763 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6764
6765 * server.h (decode_xfer_write): Change prototype.
6766 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6767 and don't extract the annex here.
6768 * server.c (decode_xfer_read): Remove `annex' parameter,
6769 and don't extract the annex here.
6770 (decode_xfer): New.
6771 (struct qxfer): New.
6772 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6773 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6774 (handle_qxfer_statictrace): New functions, abstracted out from
6775 handle_query, and made to use the struct qxfer interface.
6776 (handle_threads_qxfer_proper): Rename to ...
6777 (handle_qxfer_threads_proper): ... this.
6778 (handle_threads_qxfer): Rename to ...
6779 (handle_qxfer_threads): ... this. Adjust.
6780 (qxfer_packets): New array.
6781 (handle_qxfer): New function.
6782 (handle_query): Use handle_qxfer.
6783
6784 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6785
6786 * gdbreplay.c: Shorten lines of >= 80 columns.
6787 * linux-low.c: Ditto.
6788 * linux-ppc-low.c: Ditto.
6789 * linux-s390-low.c: Ditto.
6790 * linux-sparc-low.c: Ditto.
6791 * linux-x86-low.c: Ditto.
6792 * linux-xtensa-low.c: Ditto.
6793 * mem-break.c: Ditto.
6794 * nto-low.c: Ditto.
6795 * regcache.h: Ditto.
6796 * remote-utils.c: Ditto.
6797 * server.c: Ditto.
6798 * server.h: Ditto.
6799 * thread-db.c: Ditto.
6800 * tracepoint.c: Ditto.
6801 * utils.c: Ditto.
6802 * win32-low.h: Ditto.
6803
6804 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6805
6806 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6807 update.
6808
6809 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6810
6811 * server.c (gdbserver_version): Update copyright year in version
6812 output.
6813 * gdbreplay.c (gdbreplay_version): Ditto.
6814
6815 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6816
6817 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6818 * linux-bfin-low.c: New file.
6819 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6820 PT_DATA_ADDR for BFIN targets.
6821 * Makefile.in (SFILES): Add linux-bfin-low.c.
6822 (clean): Remove reg-bfin.c.
6823 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6824 * README: Mention supported Blackfin targets.
6825
6826 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6827
6828 * .gitignore: New file.
6829
6830 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6831
6832 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6833
6834 2010-10-22 Jie Zhang <jie@codesourcery.com>
6835
6836 * Makefile.in: Add FLAGS_TO_PASS variable.
6837 (install): Remove dependency of install-only and recursively
6838 invoke make for install-only.
6839
6840 2010-10-04 Doug Evans <dje@google.com>
6841
6842 * Makefile.in (uninstall): Use $(DESTDIR).
6843
6844 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6845
6846 PR gdb/11842
6847
6848 * linux-x86-low.c (compat_siginfo_from_siginfo)
6849 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6850 si_code is < 0. Check for si_code == SI_TIMER before checking for
6851 si_code < 0.
6852
6853 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6854
6855 * lynx-i386-low.c: New file.
6856 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6857
6858 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6859
6860 * lynx-low.c (ptrace_request_to_str): Remove handling for
6861 request values that have been removed in LynxOS 5.x.
6862
6863 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6864
6865 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6866 <ptrace.h>
6867
6868 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6869
6870 * configure.ac: Add --enable-inprocess-agent option.
6871 * configure: Rebuilt.
6872
6873 2010-09-06 Yao Qi <yao@codesourcery.com>
6874
6875 * linux-low.c (linux_kill): Remove unused variable.
6876 (linux_stabilize_threads): Likewise.
6877 * server.c (start_inferior): Likewise.
6878 (queue_stop_reply_callback): Likewise.
6879 * tracepoint.c (do_action_at_tracepoint): Likewise.
6880
6881 2010-09-06 Yao Qi <yao@codesourcery.com>
6882
6883 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6884 on return.
6885
6886 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6887
6888 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6889
6890 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6891
6892 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6893 "$(IPA_DEPFILES)".
6894
6895 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6896
6897 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6898 gdbserver/lynx-ppc-low.c: New files.
6899 * Makefile.in (lynx_low_h): New variable.
6900 (lynx-low.o, lynx-ppc-low.o): New rules.
6901 * configure.ac: On LynxOS, link with -lnetinet.
6902 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6903 * configure: regenerate.
6904
6905 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6906
6907 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6908 * configure.ac: Add check for vasprintf and vsnprintf.
6909 * configure, config.in: Regenerate.
6910 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6911
6912 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6913
6914 * gdbreplay.c: Move include of alloca.h up, next to include of
6915 malloc.h.
6916 * server.h: Add include of malloc.h.
6917 * mem-break.c: Remove include of malloc.h.
6918 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6919
6920 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6921
6922 * Makefile.in (memmem.o): Build with -Wno-error.
6923
6924 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6925
6926 * utils.c (xsnprintf): Make non-static.
6927 * server.h: Add xsnprintf declaration.
6928 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6929 replace calls to snprintf by calls to xsnprintf throughout.
6930
6931 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6932
6933 * configure.ac: Add configure check for alloca.
6934 * configure, config.in: Regenerate.
6935 * server.h: Include alloca.h if it exists.
6936 * gdbreplay.c: Include alloca.h if it exists.
6937
6938 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6939
6940 * linux-low.c (__SIGRTMIN): Define if not already defined.
6941 (linux_create_inferior): Check for __ANDROID__ rather than
6942 __SIGRTMIN.
6943 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6944 are already deferred.
6945 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6946 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6947 stopped and already has a pending signal to report.
6948 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6949 a pending signal to report or is moving out of a jump pad.
6950 (linux_init_signals): Check for __ANDROID__ rather than
6951 __SIGRTMIN.
6952
6953 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6954
6955 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6956 debug_threads check. Avoid a linear search when not doing debug
6957 output.
6958
6959 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6960
6961 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6962 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6963 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6964 (process_event): Change local fd's type to gdb_fildes_t.
6965 (create_file_handler): Adjust prototype.
6966 (delete_file_handler): Adjust prototype.
6967 (handle_file_event): Adjust prototype. Use pfildes.
6968 (create_file_event): Adjsut prototype.
6969 * remote-utils.c (remote_desc, listen_desc): Change type to
6970 gdb_fildes_t.
6971 * server.h: New gdb_fildes_t typedef.
6972 [USE_WIN32API]: Include winsock2.h.
6973 (delete_file_handler, add_file_handler): Adjust prototypes.
6974 (pfildes): Declare.
6975 * utils.c (pfildes): New.
6976
6977 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6978
6979 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6980 * configure: Regenerate.
6981
6982 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6983
6984 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6985 (linux_done_accessing_memory): ... this.
6986 (linux_target_ops): Adjust.
6987 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6988 * nto-low.c (nto_target_ops): Adjust comment.
6989 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6990 * spu-low.c (spu_target_ops): Adjust comment.
6991 * target.h (target_ops): Rename unprepare_to_access_memory field
6992 to done_accessing_memory.
6993 (unprepare_to_access_memory): Rename to ...
6994 (done_accessing_memory): ... this.
6995
6996 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6997
6998 * linux-low.c (linux_prepare_to_access_memory): New.
6999 (linux_unprepare_to_access_memory): New.
7000 (linux_target_ops): Install them.
7001 * server.c (read_memory): Rename to ...
7002 (gdb_read_memory): ... this. Use
7003 prepare_to_access_memory/prepare_to_access_memory.
7004 (write_memory): Rename to ...
7005 (gdb_write_memory): ... this. Use
7006 prepare_to_access_memory/prepare_to_access_memory.
7007 (handle_search_memory_1): Adjust.
7008 (process_serial_event): Adjust.
7009 * target.h (struct target_ops): New fields
7010 prepare_to_access_memory and unprepare_to_access_memory.
7011 (prepare_to_access_memory, unprepare_to_access_memory): New.
7012 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7013 prepare_to_access_memory/prepare_to_access_memory.
7014 * nto-low.c (nto_target_ops): Adjust.
7015 * spu-low.c (spu_target_ops): Adjust.
7016 * win32-low.c (win32_target_ops): Adjust.
7017
7018 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7019
7020 * Makefile.in (WARN_CFLAGS): Get it from configure.
7021 (WERROR_CFLAGS): New.
7022 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7023 * configure.ac: Introduce --enable-werror, which adds -Werror to
7024 the compiler command line. Enabled by default. Disable with
7025 --disable-werror. Add -Wdeclaration-after-statement
7026 Wpointer-arith and -Wformat-nonliteral to warning flags.
7027 * configure: Regenerate.
7028
7029 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7030
7031 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7032
7033 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7034
7035 * gdbreplay.c (remote_error): New.
7036 (gdbchar): New.
7037 (expect): Use gdbchar. Check for error reading from GDB.
7038 Clarify sync error output.
7039 (play): Check for errors writing to GDB.
7040 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7041 * remote-utils.c (getpkt): Check for errors writing to the remote
7042 descriptor.
7043
7044 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7045
7046 * linux-low.c (linux_wait_1): Move non-debugging code out of
7047 `debug_threads' control.
7048
7049 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7050
7051 * linux-low.c (linux_wait_1): Don't set last_status here.
7052 * server.c (push_event, queue_stop_reply_callback): Assert we're
7053 not pushing a TARGET_WAITKIND_IGNORE event.
7054 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7055 (myresume, handle_target_event): Set the thread's last_resume_kind
7056 and last_status from the target returned status.
7057
7058 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7059
7060 PR threads/10729
7061
7062 * linux-x86-low.c (update_debug_registers_callback): New.
7063 (i386_dr_low_set_addr): Use it.
7064 (i386_dr_low_get_addr): New.
7065 (i386_dr_low_set_control): Use update_debug_registers_callback.
7066 (i386_dr_low_get_control): New.
7067 (i386_dr_low_get_status): Adjust.
7068 * linux-low.c (linux_stop_lwp): New.
7069 * linux-low.h (linux_stop_lwp): Declare.
7070
7071 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7072 argument instead of a i386_debug_reg_state.
7073 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7074 a i386_debug_reg_state.
7075 (i386_insert_aligned_watchpoint): Adjust.
7076 (i386_remove_aligned_watchpoint): Adjust.
7077 (i386_low_stopped_data_address): Read the debug registers from the
7078 inferior instead of from the mirrors.
7079 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7080 (i386_dr_low_get_addr): Declare.
7081 (i386_dr_low_get_control): Declare.
7082 (i386_dr_low_get_status): Change prototype.
7083
7084 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7085 (i386_dr_low_get_addr): New.
7086 (i386_dr_low_get_control): New.
7087 (i386_dr_low_get_status): Adjust prototype. Return
7088 dr_status_mirror.
7089 (i386_initial_stuff): Clear dr_status_mirror and
7090 dr_control_mirror.
7091 (i386_get_thread_context): Adjust.
7092 (i386_set_thread_context): Adjust.
7093 (i386_thread_added): Adjust.
7094
7095 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7096
7097 * linux-low.h (linux_thread_area): Delete declaration.
7098
7099 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7100
7101 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7102 after its termination.
7103
7104 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7105
7106 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7107 (gdb_wants_all_stopped): Delete.
7108 (linux_wait_1): Don't call them.
7109 * server.c (handle_v_cont): Tag all threads as want-stopped.
7110 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7111 stopped as "client-wants-stopped".
7112
7113 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7114
7115 * Makefile.in (signals_h): New.
7116 (server_h): Depend on it.
7117 (server.o): Don't depend on $(signals_def).
7118 (signals.o): Depend on $(signals_def).
7119
7120 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7121
7122 * Makefile.in (signals_def): New.
7123 (server_h): Append include/gdb/signals.h and signals_def.
7124 (server.o): Append signals_def.
7125
7126 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7127
7128 * server.c (handle_target_event): Use target_signal_to_host for
7129 resume_info.sig initialization.
7130 * target.h (struct thread_resume) <sig>: New comment.
7131
7132 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7133
7134 * server.c (handle_query): strcpy() the returned string from paddress()
7135 instead of sprintf().
7136 * utils.c (paddress): Return phex_nz().
7137
7138 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7139
7140 * server.c (handle_v_cont): Call mourn_inferior if process
7141 just exited.
7142 (myresume): Likewise.
7143
7144 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7145
7146 Static tracepoints, and integration with UST.
7147
7148 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7149 * mem-break.c (uninsert_all_breakpoints)
7150 (reinsert_all_breakpoints): New.
7151 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7152 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7153 (gdb_agent_ust_loaded, helper_thread_id)
7154 (gdb_agent_helper_thread_id): New macros.
7155 (struct ipa_sym_addresses): Add addr_ust_loaded,
7156 addr_helper_thread_id, addr_cmd_buf.
7157 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7158 (in_process_agent_loaded_ust): New.
7159 (write_e_ust_not_loaded): New.
7160 (maybe_write_ipa_ust_not_loaded): New.
7161 (struct collect_static_trace_data_action): New.
7162 (enum tracepoint_type) <static_tracepoint>: New.
7163 (struct tracepoint) <handle>: Mention static tracepoints.
7164 (struct static_tracepoint_ctx): New.
7165 (CMD_BUF_SIZE): New.
7166 (add_tracepoint_action): Handle static tracepoint actions.
7167 (unprobe_marker_at): New.
7168 (clear_installed_tracepoints): Handle static tracepoints.
7169 (cmd_qtdp): Handle static tracepoints.
7170 (probe_marker_at): New.
7171 (cmd_qtstart): Handle static tracepoints.
7172 (response_tracepoint): Handle static tracepoints.
7173 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7174 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7175 (get_context_regcache): Handle static tracepoints.
7176 (do_action_at_tracepoint): Handle static tracepoint actions.
7177 (traceframe_find_block_type): Handle static trace data blocks.
7178 (traceframe_read_sdata): New.
7179 (download_tracepoints): Download static tracepoint actions.
7180 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7181 (GDB_PROBE_NAME): New.
7182 (ust_ops): New.
7183 (GET_UST_SYM): New.
7184 (USTF): New.
7185 (dlsym_ust): New.
7186 (ust_marker_to_static_tracepoint): New.
7187 (gdb_probe): New.
7188 (collect_ust_data_at_tracepoint): New.
7189 (gdb_ust_probe): New.
7190 (UNIX_PATH_MAX, SOCK_DIR): New.
7191 (gdb_ust_connect_sync_socket): New.
7192 (resume_thread, stop_thread): New.
7193 (run_inferior_command): New.
7194 (init_named_socket): New.
7195 (gdb_ust_socket_init): New.
7196 (cstr_to_hexstr): New.
7197 (next_st): New.
7198 (first_marker, next_marker): New.
7199 (response_ust_marker): New.
7200 (cmd_qtfstm, cmd_qtsstm): New.
7201 (unprobe_marker_at, probe_marker_at): New.
7202 (cmd_qtstmat, gdb_ust_thread): New.
7203 (gdb_ust_init): New.
7204 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7205 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7206 (ST_REGENTRY): New.
7207 (x86_64_st_collect_regmap): New.
7208 (X86_64_NUM_ST_COLLECT_GREGS): New.
7209 (AMD64_RIP_REGNUM): New.
7210 (supply_static_tracepoint_registers): New.
7211 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7212 (ST_REGENTRY): New.
7213 (i386_st_collect_regmap): New.
7214 (i386_NUM_ST_COLLECT_GREGS): New.
7215 (supply_static_tracepoint_registers): New.
7216 * server.c (handle_query): Handle qXfer:statictrace:read.
7217 <qSupported>: Report support for StaticTracepoints, and
7218 qXfer:statictrace:read features.
7219 * server.h (traceframe_read_sdata)
7220 (supply_static_tracepoint_registers): Declare.
7221 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7222 (unpack_varlen_hex): Include in IPA build.
7223 * Makefile.in (ustlibs, ustinc): New.
7224 (IPA_OBJS): Add remote-utils-ipa.o.
7225 ($(IPA_LIB)): Link -ldl and -lpthread.
7226 (UST_CFLAGS): New.
7227 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7228 * config.in, configure: Regenerate.
7229
7230 2010-06-20 Ian Lance Taylor <iant@google.com>
7231 Pedro Alves <pedro@codesourcery.com>
7232
7233 * linux-x86-low.c (always_true): Delete.
7234 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7235 trying to fool the compiler with always_true.
7236
7237 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7238
7239 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7240 conditions in gdbserver.
7241
7242 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7243
7244 * spu-low.c (spu_read_memory): Wrap around local store limit.
7245 (spu_write_memory): Likewise.
7246
7247 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7248
7249 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7250 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7251 LONGEST uses.
7252 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7253 uses.
7254 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7255 uses with LONGEST uses.
7256
7257 2010-06-14 Stan Shebs <stan@codesourcery.com>
7258 Pedro Alves <pedro@codesourcery.com>
7259
7260 Bytecode compiler.
7261
7262 * linux-x86-low.c: Include limits.h.
7263 (add_insns): New.
7264 (always_true): New.
7265 (EMIT_ASM): New.
7266 (EMIT_ASM32): New.
7267 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7268 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7269 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7270 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7271 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7272 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7273 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7274 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7275 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7276 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7277 (amd64_emit_void_call_2): New.
7278 (amd64_emit_ops): New.
7279 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7280 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7281 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7282 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7283 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7284 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7285 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7286 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7287 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7288 (i386_emit_stack_adjust, i386_emit_int_call_1)
7289 (i386_emit_void_call_2): New.
7290 (i386_emit_ops): New.
7291 (x86_emit_ops): New.
7292 (the_low_target): Install x86_emit_ops.
7293 * server.h (struct emit_ops): New.
7294 (get_raw_reg_func_addr): Declare.
7295 (current_insn_ptr, emit_error): Declare.
7296 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7297 (set_trace_state_variable_value): New defines.
7298 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7299 addr_get_trace_state_variable_value and
7300 addr_set_trace_state_variable_value.
7301 (symbol_list): New fields for get_raw_reg,
7302 get_trace_state_variable_value and set_trace_state_variable_value.
7303 (condfn): New typedef.
7304 (struct tracepoint): New field `compiled_cond'.
7305 (do_action_at_tracepoint): Clear compiled_cond.
7306 (get_trace_state_variable_value, set_trace_state_variable_value):
7307 Export in the IPA.
7308 (condition_true_at_tracepoint): If there's a compiled condition,
7309 run that.
7310 (current_insn_ptr, emit_error): New globals.
7311 (struct bytecode_address): New.
7312 (get_raw_reg_func_addr): New.
7313 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7314 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7315 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7316 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7317 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7318 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7319 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7320 (compile_tracepoint_condition, compile_bytecodes): New.
7321 * target.h (emit_ops): Forward declare.
7322 (struct target_ops): New field emit_ops.
7323 (target_emit_ops): New.
7324 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7325 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7326 * linux-low.c (linux_emit_ops): New.
7327 (linux_target_ops): Install it.
7328 * linux-low.h (struct linux_target_ops): New field emit_ops.
7329
7330 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7331
7332 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7333 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7334
7335 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7336 Stan Shebs <stan@codesourcery.com>
7337
7338 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7339 (all): Depend on $(extra_libraries).
7340 (install-only): Install the IPA.
7341 (IPA_OBJS, IPA_LIB): New.
7342 (clean): Remove the IPA lib.
7343 (IPAGENT_CFLAGS): New.
7344 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7345 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7346 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7347 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7348 * configure.ac: Check for atomic builtins support in the compiler.
7349 (IPA_DEPFILES, extra_libraries): Define.
7350 * configure.srv (ipa_obj): Add description.
7351 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7352 (i[34567]86-*-linux*): Set ipa_obj.
7353 (x86_64-*-linux*): Set ipa_obj.
7354 * linux-low.c (stabilizing_threads): New.
7355 (supports_fast_tracepoints): New.
7356 (linux_detach): Stabilize threads before detaching.
7357 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7358 the lwp is either not stabilizing, or is moving out of a jump pad.
7359 (linux_fast_tracepoint_collecting): New.
7360 (maybe_move_out_of_jump_pad): New.
7361 (enqueue_one_deferred_signal): New.
7362 (dequeue_one_deferred_signal): New.
7363 (linux_wait_for_event_1): If moving out of a jump pad, defer
7364 pending signals to later.
7365 (linux_stabilize_threads): New.
7366 (linux_wait_1): Check if threads need moving out of jump pads, and
7367 do it if so.
7368 (stuck_in_jump_pad_callback): New.
7369 (move_out_of_jump_pad_callback): New.
7370 (lwp_running): New.
7371 (linux_resume_one_lwp): Handle moving out of jump pads.
7372 (linux_set_resume_request): Dequeue deferred signals.
7373 (need_step_over_p): Also step over fast tracepoint jumps.
7374 (start_step_over): Also uninsert fast tracepoint jumps.
7375 (finish_step_over): Also reinsert fast tracepoint jumps.
7376 (linux_install_fast_tracepoint_jump): New.
7377 (linux_target_ops): Install linux_stabilize_threads and
7378 linux_install_fast_tracepoint_jump_pad.
7379 * linux-low.h (linux_target_ops) <get_thread_area,
7380 install_fast_tracepoint_jump_pad>: New fields.
7381 (struct lwp_info) <collecting_fast_tracepoint,
7382 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7383 (linux_get_thread_area): Declare.
7384 * linux-x86-low.c (jump_insn): New.
7385 (x86_get_thread_area): New.
7386 (append_insns): New.
7387 (push_opcode): New.
7388 (amd64_install_fast_tracepoint_jump_pad): New.
7389 (i386_install_fast_tracepoint_jump_pad): New.
7390 (x86_install_fast_tracepoint_jump_pad): New.
7391 (the_low_target): Install x86_get_thread_area and
7392 x86_install_fast_tracepoint_jump_pad.
7393 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7394 (struct fast_tracepoint_jump): New.
7395 (fast_tracepoint_jump_insn): New.
7396 (fast_tracepoint_jump_shadow): New.
7397 (find_fast_tracepoint_jump_at): New.
7398 (fast_tracepoint_jump_here): New.
7399 (delete_fast_tracepoint_jump): New.
7400 (set_fast_tracepoint_jump): New.
7401 (uninsert_fast_tracepoint_jumps_at): New.
7402 (reinsert_fast_tracepoint_jumps_at): New.
7403 (set_breakpoint_at): Use write_inferior_memory.
7404 (uninsert_raw_breakpoint): Use write_inferior_memory.
7405 (check_mem_read): Mask out fast tracepoint jumps.
7406 (check_mem_write): Mask out fast tracepoint jumps.
7407 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7408 (set_fast_tracepoint_jump): Declare.
7409 (delete_fast_tracepoint_jump)
7410 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7411 (reinsert_fast_tracepoint_jumps_at): Declare.
7412 * regcache.c: Don't compile many functions when building the
7413 in-process agent library.
7414 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7415 the register buffer in the heap.
7416 (free_register_cache): If the register buffer isn't owned by the
7417 regcache, don't free it.
7418 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7419 pre-existing register caches.
7420 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7421 type.
7422 (convert_ascii_to_int): : Constify `from' parameter type.
7423 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7424 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7425 the needed buffer in-place.
7426 (relocate_instruction): New.
7427 * server.c (handle_query) <qSymbols>: If the target supports
7428 tracepoints, give it a chance of looking up symbols. Report
7429 support for fast tracepoints.
7430 (handle_status): Stabilize threads.
7431 (process_serial_event): Adjust.
7432 * server.h (struct fast_tracepoint_jump): Forward declare.
7433 (struct process_info) <fast_tracepoint_jumps>: New field.
7434 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7435 (decode_X_packet, decode_M_packet): Adjust.
7436 (relocate_instruction): Declare.
7437 (in_process_agent_loaded): Declare.
7438 (tracepoint_look_up_symbols): Declare.
7439 (struct fast_tpoint_collect_status): Declare.
7440 (fast_tracepoint_collecting): Declare.
7441 (force_unlock_trace_buffer): Declare.
7442 (handle_tracepoint_bkpts): Declare.
7443 (initialize_low_tracepoint)
7444 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7445 * target.h (struct target_ops) <stabilize_threads,
7446 install_fast_tracepoint_jump_pad>: New fields.
7447 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7448 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7449 [HAVE_STDINT_H]: Include stdint.h.
7450 (trace_debug_1): Rename to ...
7451 (trace_vdebug): ... this.
7452 (trace_debug): Rename to ...
7453 (trace_debug_1): ... this. Add `level' parameter.
7454 (trace_debug): New.
7455 (ATTR_USED, ATTR_NOINLINE): New.
7456 (IP_AGENT_EXPORT): New.
7457 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7458 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7459 (about_to_request_buffer_space, trace_buffer_is_full)
7460 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7461 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7462 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7463 (traceframe_write_count, traceframes_created)
7464 (trace_state_variables)
7465 New renaming defines.
7466 (struct ipa_sym_addresses): New.
7467 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7468 (symbol_list): New.
7469 (ipa_sym_addrs): New.
7470 (all_tracepoint_symbols_looked_up): New.
7471 (in_process_agent_loaded): New.
7472 (write_e_ipa_not_loaded): New.
7473 (maybe_write_ipa_not_loaded): New.
7474 (tracepoint_look_up_symbols): New.
7475 (debug_threads) [IN_PROCESS_AGENT]: New.
7476 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7477 (UNKNOWN_SIDE_EFFECTS): New.
7478 (stop_tracing): New.
7479 (flush_trace_buffer): New.
7480 (stop_tracing_bkpt): New.
7481 (flush_trace_buffer_bkpt): New.
7482 (read_inferior_integer): New.
7483 (read_inferior_uinteger): New.
7484 (read_inferior_data_pointer): New.
7485 (write_inferior_data_pointer): New.
7486 (write_inferior_integer): New.
7487 (write_inferior_uinteger): New.
7488 (struct collect_static_trace_data_action): Delete.
7489 (enum tracepoint_type): New.
7490 (struct tracepoint) <type>: New field `type'.
7491 <actions_str, step_actions, step_actions_str>: Only include in
7492 GDBserver.
7493 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7494 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7495 (tracepoints): Use IP_AGENT_EXPORT.
7496 (last_tracepoint): Don't include in the IPA.
7497 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7498 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7499 (alloced_trace_state_variables): New.
7500 (trace_state_variables): Use IP_AGENT_EXPORT.
7501 (traceframe_t): Delete unused variable.
7502 (circular_trace_buffer): Don't include in the IPA.
7503 (trace_buffer_start): Delete.
7504 (struct trace_buffer_control): New.
7505 (trace_buffer_free): Delete.
7506 (struct ipa_trace_buffer_control): New.
7507 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7508 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7509 New.
7510 (trace_buffer_ctrl): New.
7511 (TRACE_BUFFER_CTRL_CURR): New.
7512 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7513 Reimplement as macros.
7514 (trace_buffer_wrap): Delete.
7515 (traceframe_write_count, traceframe_read_count)
7516 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7517 (struct tracepoint_hit_ctx) <type>: New field.
7518 (struct fast_tracepoint_ctx): New.
7519 (memory_barrier): New.
7520 (cmpxchg): New.
7521 (record_tracepoint_error): Update atomically in the IPA.
7522 (clear_inferior_trace_buffer): New.
7523 (about_to_request_buffer_space): New.
7524 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7525 updating the same buffer.
7526 (add_tracepoint): Default the tracepoint's type to trap
7527 tracepoint, and orig_size to -1.
7528 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7529 internal variables.
7530 (create_trace_state_variable): New parameter `gdb'. Handle it.
7531 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7532 (cmd_qtdp): Handle fast tracepoints.
7533 (cmd_qtdv): Adjust.
7534 (max_jump_pad_size): New.
7535 (gdb_jump_pad_head): New.
7536 (get_jump_space_head): New.
7537 (claim_jump_space): New.
7538 (sort_tracepoints): New.
7539 (MAX_JUMP_SIZE): New.
7540 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7541 IPA.
7542 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7543 support. Upload fast traceframes, and delete internal IPA
7544 breakpoints.
7545 (stop_tracing_handler): New.
7546 (flush_trace_buffer_handler): New.
7547 (cmd_qtstop): Upload fast tracepoints.
7548 (response_tracepoint): Handle fast tracepoints.
7549 (tracepoint_finished_step): Upload fast traceframes. Set the
7550 tracepoint hit context's tracepoint type.
7551 (handle_tracepoint_bkpts): New.
7552 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7553 type. Add comment about fast tracepoints.
7554 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7555 non-existing action_str field.
7556 (get_context_regcache): Handle fast tracepoints.
7557 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7558 to the regcache.
7559 (fast_tracepoint_from_jump_pad_address): New.
7560 (fast_tracepoint_from_ipa_tpoint_address): New.
7561 (collecting_t): New.
7562 (force_unlock_trace_buffer): New.
7563 (fast_tracepoint_collecting): New.
7564 (collecting): New.
7565 (gdb_collect): New.
7566 (write_inferior_data_ptr): New.
7567 (target_tp_heap): New.
7568 (target_malloc): New.
7569 (download_agent_expr): New.
7570 (UALIGN): New.
7571 (download_tracepoints): New.
7572 (download_trace_state_variables): New.
7573 (upload_fast_traceframes): New.
7574 (IPA_FIRST_TRACEFRAME): New.
7575 (IPA_NEXT_TRACEFRAME_1): New.
7576 (IPA_NEXT_TRACEFRAME): New.
7577 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7578 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7579 (gdb_jump_pad_buffer_end): New.
7580 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7581 (initialize_tracepoint): Adjust.
7582 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7583 buffer. Initialize the low module.
7584 * utils.c (PREFIX, TOOLNAME): New.
7585 (malloc_failure): Use PREFIX.
7586 (error): In the IPA, an error causes an exit.
7587 (fatal, warning): Use PREFIX.
7588 (internal_error): Use TOOLNAME.
7589 (NUMCELLS): Increase to 10.
7590 * configure, config.in: Regenerate.
7591
7592 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7593
7594 * server.c (handle_query) <qSupported>: Do two passes over the
7595 qSupported string to avoid nesting strtok.
7596
7597 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7598
7599 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7600 (CDEPS): New.
7601 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7602 -Wl,--dynamic-list.
7603 * configure: Regenerate.
7604 * proc-service.list: New.
7605
7606 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7607
7608 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7609 New comment.
7610
7611 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7612
7613 * gdbreplay.c (remote_open): Check error return from socket() call by
7614 its equality to -1 not by it being negative.
7615 * remote-utils.c (remote_open): Likewise.
7616
7617 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7618
7619 * config.h: Regenerate.
7620
7621 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7622
7623 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7624 doesn't provide PTRACE_GET_THREAD_AREA.
7625
7626 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7627
7628 * linux-m68k-low.c: Include <asm/ptrace.h>
7629 (ps_get_thread_area): Implement.
7630
7631 2010-05-03 Doug Evans <dje@google.com>
7632
7633 * event-loop.c (struct callback_event): New struct.
7634 (callback_list): New global.
7635 (append_callback_event, delete_callback_event): New functions.
7636 (process_callback): New function.
7637 (start_event_loop): Call it.
7638 * remote-utils.c (NOT_SCHEDULED): Define.
7639 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7640 moved out of readchar.
7641 (readchar): Rewrite. Call reschedule before returning.
7642 (reset_readchar): New function.
7643 (remote_close): Call it.
7644 (process_remaining, reschedule): New functions.
7645 * server.h (callback_handler_func): New typedef.
7646 (append_callback_event, delete_callback_event): Declare.
7647
7648 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7649
7650 * proc-service.c (ps_pglobal_lookup): Use
7651 thread_db_look_up_one_symbol.
7652 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7653 parameter. Use it instead of all_symbols_looked_up.
7654 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7655 field.
7656 (all_symbols_looked_up): Don't declare.
7657 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7658 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7659 field.
7660 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7661 Set all_symbols_looked_up here.
7662 (thread_db_look_up_one_symbol): New.
7663 (thread_db_get_tls_address): Adjust.
7664 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7665 thread_db object on the heap, and tentatively set it in the
7666 process structure.
7667 (thread_db_init): Don't set all_symbols_looked_up here.
7668 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7669
7670 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7671
7672 * linux-low.c (linux_kill, linux_detach): Adjust.
7673 (status_pending_p_callback): Remove redundant statement. Check
7674 for !TARGET_WAITIKIND_IGNORE, instead of
7675 TARGET_WAITKIND_STOPPED.
7676 (handle_tracepoints): Make sure LWP is locked. Adjust.
7677 (linux_wait_for_event_1): Adjust.
7678 (linux_cancel_breakpoints): New.
7679 (unsuspend_one_lwp): New.
7680 (unsuspend_all_lwps): New.
7681 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7682 (send_sigstop_callback): Change return type to int, add new
7683 `except' parameter and handle it.
7684 (suspend_and_send_sigstop_callback): New.
7685 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7686 pass them down. If SUSPEND, also increment the lwp's suspend
7687 count.
7688 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7689 (need_step_over_p): Don't consider suspended LWPs.
7690 (start_step_over): Adjust.
7691 (proceed_one_lwp): Change return type to int, add new `except'
7692 parameter and handle it.
7693 (unsuspend_and_proceed_one_lwp): New.
7694 (proceed_all_lwps): Use find_inferior instead of
7695 for_each_inferior.
7696 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7697 also decrement the suspend count of LWPs. Pass `except' down,
7698 instead of hacking its suspend count.
7699 (linux_pause_all): Add `freeze' parameter. Adjust.
7700 (linux_unpause_all): New.
7701 (linux_target_ops): Install linux_unpause_all.
7702 * server.c (handle_status): Adjust.
7703 * target.h (struct target_ops): New fields `unpause_all' and
7704 `cancel_breakpoints'. Add new parameter to `pause_all'.
7705 (pause_all): Add new `freeze' parameter.
7706 (unpause_all): New.
7707 (cancel_breakpoints): New.
7708 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7709 cancel breakpoints.
7710 (cmd_qtstart): Pause threads.
7711 (stop_tracing): Pause threads, and cancel breakpoints.
7712 * win32-low.c (win32_target_ops): Adjust.
7713
7714 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7715
7716 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7717 the inferior right away from here...
7718 (linux_wait_1): ... to here, and adjust to check the thread's
7719 last_resume_kind instead of the lwp's step or stop_expected flags.
7720
7721 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7722
7723 * README: Use consistent `GDB' and `GDBserver' spellings.
7724
7725 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7726
7727 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7728 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7729 (linux_detach_one_lwp): Assume the lwp is stopped.
7730 (any_thread_of): Delete.
7731 (linux_detach): Stop all lwps here. Don't blindly delete all
7732 breakpoints.
7733 (delete_lwp_callback): New.
7734 (linux_mourn): Delete all lwps of the process that is gone.
7735 (linux_wait_1): Don't delete the last lwp of the process here.
7736 * mem-break.h (mark_breakpoints_out): Declare.
7737 * mem-break.c (mark_breakpoints_out): New.
7738 (free_all_breakpoints): Use it.
7739 * server.c (handle_target_event): If the process is gone, mark
7740 breakpoints out.
7741 * thread-db.c (struct thread_db) <create_bp>: New field.
7742 (thread_db_enable_reporting): Fix prototype. Store a thread event
7743 breakpoint reference in the thread_db struct.
7744 (thread_db_load_search): Clear the thread_db object.
7745 (try_thread_db_load_1): Ditto.
7746 (switch_to_process): New.
7747 (disable_thread_event_reporting): Use it.
7748 (remove_thread_event_breakpoints): New.
7749 (thread_db_detach, thread_db_mourn): Use it.
7750
7751 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7752
7753 * linux-low.c (linux_enable_event_reporting): New.
7754 (linux_wait_for_event_1, handle_extended_wait): Use it.
7755
7756 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7757
7758 * linux-low.c (linux_kill_one_lwp, linux_kill)
7759 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7760 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7761 SIGSTOP even if the LWP is stopped.
7762 (send_sigstop_callback): New.
7763 (stop_all_lwps): Use send_sigstop_callback instead.
7764 (linux_resume_one_thread): Adjust.
7765 (proceed_one_lwp): Still proceed an LWP that the client has
7766 requested to stop, if we haven't reported it as stopped yet. Make
7767 sure that LWPs the client want stopped, have a pending SIGSTOP.
7768
7769 2010-04-26 Doug Evans <dje@google.com>
7770
7771 * server.c (handle_general_set): Make static.
7772
7773 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7774 Print received char after testing for error/eof instead of before.
7775 (input_interrupt): Tweak comment.
7776
7777 2010-04-23 Doug Evans <dje@google.com>
7778
7779 * server.c (start_inferior): Print inferior argv if --debug.
7780
7781 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7782
7783 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7784 * nto-x86-low.c: Include server.h
7785
7786 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7787
7788 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7789 be consistent with other sources of this directory.
7790 (init_registers_amd64): Correct name of source file of this function
7791 in the comment.
7792
7793 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7794
7795 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7796 64-bit executables.
7797
7798 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7799
7800 * win32-i386-low.c: Add 64-bit support.
7801 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7802 (init_registers_amd64): Declare.
7803 (mappings): Add 64-bit version of array.
7804 (init_windows_x86): New function.
7805 (the_low_target): Change init_arch field to init_windows_x86.
7806
7807 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7808
7809 * win32-low.c: Adapt to support also 64-bit architecture.
7810 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7811 (get_image_name): Use SIZE_T type for local variable `done'.
7812 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7813 (toolhelp_get_dll_name): Idem.
7814 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7815 Use uintptr_t typecast to avoid warning.
7816 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7817 (handle_exception): Use phex_nz to avoid warning.
7818 (win32_wait): Remove unused local variable `process'.
7819
7820 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7821
7822 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7823 `amd64-avx.o'.
7824
7825 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7826
7827 * configure.ac: Use `ws2_32' library for srv_mingw.
7828 * configure: Regenerate.
7829 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7830 * remote-utils.c: Likewise.
7831
7832 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7833
7834 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7835 if __x86_64__ is defined.
7836
7837 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7838
7839 * configure: Regenerate.
7840
7841 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7842
7843 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7844 * target.h (target_ops): New get_tib_address field.
7845 * win32-low.h (win32_thread_info): Add thread_local_base field.
7846 * win32-low.c (child_add_thread): Add tlb argument.
7847 Set thread_local_base field to TLB.
7848 (get_child_debug_event): Adapt to child_add_thread change.
7849 (win32_get_tib_address): New function.
7850 (win32_target_ops): Set get_tib_address field to
7851 win32_get_tib_address.
7852 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7853
7854 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7855
7856 * linux-low.c (linux_mourn): Also remove the process.
7857 * server.c (handle_target_event): Don't remove the process here.
7858 * nto-low.c (nto_mourn): New.
7859 (nto_target_ops): Install it.
7860 * spu-low.c (spu_mourn): New.
7861 (spu_target_ops): Install it.
7862 * win32-low.c (win32_mourn): New.
7863 (win32_target_ops): Install it.
7864
7865 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7866
7867 * server.h (buffer_xml_printf): Remove redundant `;'.
7868
7869 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7870
7871 * regcache.c (set_register_cache): Invalidate regcaches before
7872 changing the register cache layout.
7873 (regcache_invalidate_one): Allow a NULL regcache.
7874 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7875 regcaches before changing the register cache layout or the target
7876 regsets.
7877
7878 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7879
7880 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7881 variable warning on Linux/x86-64.
7882
7883 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7884
7885 GDBserver disconnected tracing support.
7886
7887 * linux-low.c (linux_remove_process): Delete.
7888 (add_lwp): Don't set last_resume_kind here.
7889 (linux_kill): Use `mourn'.
7890 (linux_detach): Use `thread_db_detach', and `mourn'.
7891 (linux_mourn): New.
7892 (linux_attach_lwp_1): Adjust comment.
7893 (linux_attach): last_resume_kind moved the thread_info; adjust.
7894 (status_pending_p_callback): Adjust.
7895 (linux_wait_for_event_1): Adjust.
7896 (count_events_callback, select_singlestep_lwp_callback)
7897 (select_event_lwp_callback, cancel_breakpoints_callback)
7898 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7899 (proceed_one_lwp): Adjust.
7900 (linux_async): Add debug output.
7901 (linux_thread_stopped): New.
7902 (linux_pause_all): New.
7903 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7904 linux_pause_all.
7905 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7906 (thread_db_free): Delete declaration.
7907 (thread_db_detach, thread_db_mourn): Declare.
7908 * thread-db.c (thread_db_init): Use thread_db_mourn.
7909 (thread_db_free): Delete, split in two.
7910 (disable_thread_event_reporting): New.
7911 (thread_db_detach): New.
7912 (thread_db_mourn): New.
7913
7914 * server.h (struct thread_info) <last_resume_kind>: New field.
7915 <attached>: Add comment.
7916 <gdb_detached>: New field.
7917 (handler_func): Change return type to int.
7918 (handle_serial_event, handle_target_event): Ditto.
7919 (gdb_connected): Declare.
7920 (tracing): Delete.
7921 (disconnected_tracing): Declare.
7922 (stop_tracing): Declare.
7923
7924 * server.c (handle_query) <qSupported>: Report support for
7925 disconnected tracing.
7926 (queue_stop_reply_callback): Account for running threads.
7927 (gdb_wants_thread_stopped): New.
7928 (gdb_wants_all_threads_stopped): New.
7929 (gdb_reattached_process): New.
7930 (handle_status): Clear the `gdb_detached' flag of all processes.
7931 In all-stop, stop all threads.
7932 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7933 (process_serial_event): If the remote connection breaks, or if an
7934 exit was forced with "monitor exit", force an event loop exit.
7935 Handle disconnected tracing on detach.
7936 (handle_serial_event): Adjust.
7937 (handle_target_event): If GDB isn't connected, forward events back
7938 to the inferior, unless the last process exited, in which case,
7939 exit gdbserver. Adjust interface.
7940
7941 * remote-utils.c (remote_open): Don't block in accept. Instead
7942 register an event loop source on the listen socket file
7943 descriptor. Refactor bits into ...
7944 (listen_desc): ... this new global.
7945 (gdb_connected): ... this new function.
7946 (enable_async_notification): ... this new function.
7947 (handle_accept_event): ... this new function.
7948 (remote_close): Clear remote_desc.
7949
7950 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7951
7952 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7953 New fields.
7954 (mourn_inferior): Define.
7955 (target_process_qsupported): Avoid the dangling else problem.
7956 (thread_stopped): Define.
7957 (pause_all): Define.
7958 (target_waitstatus_to_string): Declare.
7959 * target.c (target_waitstatus_to_string): New.
7960
7961 * tracepoint.c (tracing): Make extern.
7962 (disconnected_tracing): New.
7963 (stop_tracing): Make extern. Handle tracing stops due to GDB
7964 disconnecting.
7965 (cmd_qtdisconnected): New.
7966 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7967 (handle_tracepoint_general_set): Handle QTDisconnected.
7968
7969 * event-loop.c (event_handler_func): Change return type to int.
7970 (process_event): Bail out if the event handler wants the event
7971 loop to stop.
7972 (handle_file_event): Ditto.
7973 (start_event_loop): Bail out if the event handler wants the event
7974 loop to stop.
7975
7976 * nto-low.c (nto_target_ops): Adjust.
7977 * spu-low.c (spu_wait): Don't remove the process here.
7978 (spu_target_ops): Adjust.
7979 * win32-low.c (win32_wait): Don't remove the process here.
7980 (win32_target_ops): Adjust.
7981
7982 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7983
7984 * regcache.c (realloc_register_cache): Invalidate inferior's
7985 regcache before recreating it.
7986
7987 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7988
7989 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7990
7991 2010-04-09 Stan Shebs <stan@codesourcery.com>
7992 Pedro Alves <pedro@codesourcery.com>
7993
7994 * server.h (LONGEST): New.
7995 (struct thread_info) <while_stepping>: New field.
7996 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7997 Declare.
7998 (initialize_tracepoint, handle_tracepoint_general_set)
7999 (handle_tracepoint_query, tracepoint_finished_step)
8000 (tracepoint_was_hit, release_while_stepping_state_list):
8001 (current_traceframe): Declare.
8002 * server.c (handle_general_set): Handle tracepoint packets.
8003 (read_memory): New.
8004 (write_memory): New.
8005 (handle_search_memory_1): Use read_memory.
8006 (handle_query): Report support for conditional tracepoints, trace
8007 state variables, and tracepoint sources. Handle tracepoint
8008 queries.
8009 (main): Initialize the tracepoints module.
8010 (process_serial_event): Handle traceframe reads/writes.
8011
8012 * linux-low.c (handle_tracepoints): New.
8013 (linux_wait_1): Call it.
8014 (linux_resume_one_lwp): Handle while-stepping.
8015 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8016 (linux_target_ops): Install them.
8017 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8018 New field.
8019 * linux-x86-low.c (x86_supports_tracepoints): New.
8020 (the_low_target). Install it.
8021
8022 * mem-break.h (delete_breakpoint): Declare.
8023 * mem-break.c (delete_breakpoint): Make external.
8024
8025 * target.h (struct target_ops): Add `supports_tracepoints',
8026 `read_pc', and `write_pc' fields.
8027 (target_supports_tracepoints): Define.
8028 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8029 (phex_nz): New.
8030
8031 * regcache.h (struct regcache) <registers_owned>: New field.
8032 (init_register_cache, regcache_cpy): Declare.
8033 (regcache_read_pc, regcache_write_pc): Declare.
8034 (register_cache_size): Declare.
8035 (supply_regblock): Declare.
8036 * regcache.c (init_register_cache): New.
8037 (new_register_cache): Use it.
8038 (regcache_cpy): New.
8039 (register_cache_size): New.
8040 (supply_regblock): New.
8041 (regcache_read_pc, regcache_write_pc): New.
8042
8043 * tracepoint.c: New.
8044
8045 * Makefile.in (OBS): Add tracepoint.o.
8046 (tracepoint.o): New rule.
8047
8048 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8049
8050 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8051 (i386-mmx.o): New.
8052 (i386-mmx.c): Likewise.
8053 (i386-mmx-linux.o): Likewise.
8054 (i386-mmx-linux.c): Likewise.
8055
8056 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8057 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8058 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8059 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8060
8061 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8062 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8063 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8064
8065 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8066
8067 * Makefile.in (clean): Updated.
8068 (i386-avx.o): New.
8069 (i386-avx.c): Likewise.
8070 (i386-avx-linux.o): Likewise.
8071 (i386-avx-linux.c): Likewise.
8072 (amd64-avx.o): Likewise.
8073 (amd64-avx.c): Likewise.
8074 (amd64-avx-linux.o): Likewise.
8075 (amd64-avx-linux.c): Likewise.
8076
8077 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8078 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8079 (srv_amd64_regobj): Add amd64-avx.o.
8080 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8081 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8082 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8083 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8084 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8085 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8086 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8087
8088 * i387-fp.c: Include "i386-xstate.h".
8089 (i387_xsave): New.
8090 (i387_cache_to_xsave): Likewise.
8091 (i387_xsave_to_cache): Likewise.
8092 (x86_xcr0): Likewise.
8093
8094 * i387-fp.h (i387_cache_to_xsave): Likewise.
8095 (i387_xsave_to_cache): Likewise.
8096 (x86_xcr0): Likewise.
8097
8098 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8099 * linux-crisv32-low.c (target_regsets): Likewise.
8100 * linux-m68k-low.c (target_regsets): Likewise.
8101 * linux-mips-low.c (target_regsets): Likewise.
8102 * linux-ppc-low.c (target_regsets): Likewise.
8103 * linux-s390-low.c (target_regsets): Likewise.
8104 * linux-sh-low.c (target_regsets): Likewise.
8105 * linux-sparc-low.c (target_regsets): Likewise.
8106 * linux-xtensa-low.c (target_regsets): Likewise.
8107
8108 * linux-low.c: Include <sys/uio.h>.
8109 (regsets_fetch_inferior_registers): Support nt_type.
8110 (regsets_store_inferior_registers): Likewise.
8111 (linux_process_qsupported): New.
8112 (linux_target_ops): Add linux_process_qsupported.
8113
8114 * linux-low.h (regset_info): Add nt_type.
8115 (linux_target_ops): Add process_qsupported.
8116
8117 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8118 and <sys/uio.h>.
8119 (init_registers_i386_avx_linux): New.
8120 (init_registers_amd64_avx_linux): Likewise.
8121 (xmltarget_i386_linux_no_xml): Likewise.
8122 (xmltarget_amd64_linux_no_xml): Likewise.
8123 (PTRACE_GETREGSET): Likewise.
8124 (PTRACE_SETREGSET): Likewise.
8125 (x86_fill_xstateregset): Likewise.
8126 (x86_store_xstateregset): Likewise.
8127 (use_xml): Likewise.
8128 (x86_linux_update_xmltarget): Likewise.
8129 (x86_linux_process_qsupported): Likewise.
8130 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8131 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8132 init_registers_i386_linux here. Call
8133 x86_linux_update_xmltarget.
8134 (the_low_target): Add x86_linux_process_qsupported.
8135
8136 * server.c (handle_query): Call target_process_qsupported.
8137
8138 * target.h (target_ops): Add process_qsupported.
8139 (target_process_qsupported): New.
8140
8141 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8142
8143 * inferiors.c (add_thread): Set last_status kind to
8144 TARGET_WAITKIND_IGNORE.
8145 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8146 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8147 (linux_wait_1): Move `thread' local definition to block that uses
8148 it. Don't NULL initialize `event_child'.
8149 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8150 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8151 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8152
8153 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8154
8155 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8156 an extended waitstatus, or by a watchpoint.
8157 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8158 thread was stepping or has been stopped by a watchpoint.
8159
8160 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8161
8162 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8163 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8164 of another, then delete the previous, and validate all
8165 breakpoints.
8166 (validate_inserted_breakpoint): New.
8167 (delete_disabled_breakpoints): New.
8168 (validate_breakpoints): New.
8169 (check_mem_read): Validate breakpoints before trusting their
8170 shadow. Delete disabled breakpoints.
8171 (check_mem_write): Validate breakpoints before trusting they
8172 should be inserted. Delete disabled breakpoints.
8173 * mem-break.h (validate_breakpoints):
8174 * server.c (handle_query): Validate breakpoints when we see a
8175 qSymbol query.
8176
8177 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8178
8179 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8180 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8181 if we could tell there's a GDB breakpoint at stop_pc.
8182 (need_step_over_p): Don't do a step over if we find a GDB
8183 breakpoint at the resume PC.
8184
8185 * mem-break.c (struct raw_breakpoint): New.
8186 (enum bkpt_type): New type `gdb_breakpoint'.
8187 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8188 fields. New field `raw'.
8189 (find_raw_breakpoint_at): New.
8190 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8191 breakpoint instead.
8192 (set_breakpoint_at): Adjust.
8193 (delete_raw_breakpoint): New.
8194 (release_breakpoint): New.
8195 (delete_breakpoint): Rename to...
8196 (delete_breakpoint_1): ... this. Add proc parameter. Use
8197 release_breakpoint. Return ENOENT.
8198 (delete_breakpoint): Reimplement.
8199 (find_breakpoint_at): Delete.
8200 (find_gdb_breakpoint_at): New.
8201 (delete_breakpoint_at): Delete.
8202 (set_gdb_breakpoint_at): New.
8203 (delete_gdb_breakpoint_at): New.
8204 (gdb_breakpoint_here): New.
8205 (set_reinsert_breakpoint): Use release_breakpoint.
8206 (uninsert_breakpoint): Rename to ...
8207 (uninsert_raw_breakpoint): ... this.
8208 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8209 (reinsert_raw_breakpoint): Change parameter type to
8210 raw_breakpoint.
8211 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8212 instead.
8213 (check_breakpoints): Adjust. Use release_breakpoint.
8214 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8215 (breakpoint_inserted_here): Ditto.
8216 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8217 Don't trust the breakpoint's shadow if it is not inserted.
8218 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8219 (delete_all_breakpoints): Adjust.
8220 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8221 use delete_breakpoint_1.
8222
8223 * mem-break.h (breakpoints_supported): Delete declaration.
8224 (set_gdb_breakpoint_at): Declare.
8225 (gdb_breakpoint_here): Declare.
8226 (delete_breakpoint_at): Delete.
8227 (delete_gdb_breakpoint_at): Declare.
8228
8229 * server.h (struct raw_breakpoint): Forward declare.
8230 (struct process_info): New field `raw_breakpoints'.
8231
8232 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8233 breakpoints.
8234
8235 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8236
8237 * linux-low.c (status_pending_p_callback): Fix comment.
8238 (linux_wait_for_event_1): Move most of the internal breakpoint
8239 handling from here...
8240 (linux_wait_1): ... to here.
8241 (count_events_callback): New.
8242 (select_singlestep_lwp_callback): New.
8243 (select_event_lwp_callback): New.
8244 (cancel_breakpoints_callback): New.
8245 (select_event_lwp): New.
8246 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8247 priority to all LWPs that have had events that should be reported
8248 to the client. Cancel breakpoints when about to reporting the
8249 event to the client, not while stopping lwps. No longer cancel
8250 finished single-steps here.
8251 (cancel_finished_single_step): Delete.
8252 (cancel_finished_single_steps): Delete.
8253
8254 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8255
8256 * mem-break.c (enum bkpt_type): New.
8257 (struct breakpoint): New field `type'.
8258 (set_breakpoint_at): Change return type to struct breakpoint
8259 pointer. Set type to `other_breakpoint' by default.
8260 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8261 in the breakpoint list.
8262 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8263 (reinsert_breakpoint): Rename to ...
8264 (reinsert_raw_breakpoint): ... this.
8265 (reinsert_breakpoints_at): Adjust.
8266 * mem-break.h (struct breakpoint): Declare.
8267 (set_breakpoint_at): Change return type to struct breakpoint
8268 pointer.
8269
8270 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8271
8272 * server.c (handle_query): Assign, not compare.
8273
8274 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8275
8276 Teach linux gdbserver to step-over-breakpoints.
8277
8278 * linux-low.c (can_hardware_single_step): New.
8279 (supports_breakpoints): New.
8280 (handle_extended_wait): If stopping threads, read the stop pc of
8281 the new cloned LWP.
8282 (get_pc): New.
8283 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8284 low target doesn't support retrieving the PC.
8285 (add_lwp): Set last_resume_kind to resume_continue.
8286 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8287 (linux_attach): Don't clear stop_expected. Set the lwp's
8288 last_resume_kind to resume_stop.
8289 (linux_detach_one_lwp): Don't check for removed breakpoints.
8290 (check_removed_breakpoint): Delete.
8291 (status_pending_p): Rename to ...
8292 (status_pending_p_callback): ... this. Don't check for removed
8293 breakpoints. Don't consider threads that are stopped from GDB's
8294 perspective.
8295 (linux_wait_for_lwp): Always read the stop_pc here.
8296 (cancel_breakpoint): New.
8297 (step_over_bkpt): New global.
8298 (linux_wait_for_event_1): Implement stepping over breakpoints.
8299 (gdb_wants_lwp_stopped): New.
8300 (gdb_wants_all_stopped): New.
8301 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8302 single-step traps here. Store the thread's last reported target
8303 wait status.
8304 (send_sigstop): Don't clear stop_expected. Always set it,
8305 instead.
8306 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8307 (cancel_finished_single_step): New.
8308 (cancel_finished_single_steps): New.
8309 (wait_for_sigstop): Don't cancel finished single-step traps here.
8310 (linux_resume_one_lwp): Don't check for removed breakpoints.
8311 Don't set `step' on non-hardware step archs.
8312 (linux_set_resume_request): Ignore resume_stop requests if already
8313 stopping or stopped. Set the lwp's last_resume_kind.
8314 (resume_status_pending_p): Don't check for removed breakpoints.
8315 (need_step_over_p): New.
8316 (start_step_over): New.
8317 (finish_step_over): New.
8318 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8319 requests. Clear the thread's last reported target waitstatus.
8320 Don't use the `suspended' flag. Don't consider pending breakpoints.
8321 (linux_resume): Start a step-over if necessary.
8322 (proceed_one_lwp): New.
8323 (proceed_all_lwps): New.
8324 (unstop_all_lwps): New.
8325 * linux-low.h (struct lwp_info): Rewrite comment for the
8326 `suspended' flag. Add the `stop_pc' field. Delete the
8327 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8328 Add `'last_resume_kind' and `need_step_over' fields.
8329 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8330 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8331 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8332 (set_raw_breakpoint_at): New.
8333 (set_breakpoint_at): Rewrite to use it.
8334 (reinsert_breakpoint_handler): Delete.
8335 (set_reinsert_breakpoint): New.
8336 (reinsert_breakpoint_by_bp): Delete.
8337 (delete_reinsert_breakpoints): New.
8338 (uninsert_breakpoint): Rewrite.
8339 (uninsert_breakpoints_at): New.
8340 (reinsert_breakpoint): Rewrite.
8341 (reinsert_breakpoints_at): New.
8342 (check_breakpoints): Rewrite.
8343 (breakpoint_here): New.
8344 (breakpoint_inserted_here): New.
8345 (check_mem_read): Adjust.
8346 * mem-break.h (breakpoints_supported, breakpoint_here)
8347 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8348 (reinsert_breakpoint_by_bp): Delete declaration.
8349 (delete_reinsert_breakpoints): Declare.
8350 (reinsert_breakpoint): Delete declaration.
8351 (reinsert_breakpoints_at): Declare.
8352 (uninsert_breakpoint): Delete declaration.
8353 (uninsert_breakpoints_at): Declare.
8354 (check_breakpoints): Adjust prototype.
8355 * server.h: Adjust include order.
8356 (struct thread_info): Declare here. Add a `last_status' field.
8357
8358 2010-03-23 Michael Snyder <msnyder@vmware.com>
8359
8360 * server.c (crc32): New function.
8361 (handle_query): Add handling for 'qCRC:' request.
8362
8363 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8364
8365 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8366 lwp had been stopped by a watchpoint.
8367
8368 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8369
8370 * server.h (internal_error): Declare.
8371 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8372 * utils.c (internal_error): New function.
8373
8374 2010-03-15 Andreas Schwab <schwab@redhat.com>
8375
8376 * configure.srv: Fix typo setting srv_regobj.
8377
8378 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8379
8380 * linux-low.c (fetch_register): Avoid passing a non string literal
8381 format to `error'.
8382 (usr_store_inferior_registers): Ditto.
8383
8384 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8385
8386 * linux-low.c (linux_write_memory): Bail out early if peeking
8387 memory failed.
8388
8389 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8390
8391 * linux-low.h (struct lwp_info): New fields
8392 `stopped_by_watchpoint' and `stopped_data_address'.
8393 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8394 here, and cache them in the lwp object.
8395 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8396 directly.
8397 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8398 field.
8399 (linux_stopped_by_watchpoint): Rewrite.
8400 (linux_stopped_data_address): Rewrite.
8401
8402 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8403
8404 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8405 switching the current inferior, not before.
8406
8407 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8408
8409 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8410 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8411 i386-linux.c and amd64-linux.c.
8412 (reg-i386.o): Removed.
8413 (reg-i386.c): Likewise.
8414 (reg-i386-linux.o): Likewise.
8415 (reg-i386-linux.c): Likewise.
8416 (reg-x86-64.o): Likewise.
8417 (reg-x86-64.c): Likewise.
8418 (reg-x86-64-linux.o): Likewise.
8419 (reg-x86-64-linux.c): Likewise.
8420 (i386.o): New.
8421 (i386.c): Likewise.
8422 (i386-linux.o): Likewise.
8423 (i386-linux.c): Likewise.
8424 (amd64.o): Likewise.
8425 (amd64.c): Likewise.
8426 (amd64-linux.o): Likewise.
8427 (amd64-linux.c): Likewise.
8428
8429 * configure.srv (srv_i386_regobj): New.
8430 (srv_i386_linux_regobj): Likewise.
8431 (srv_amd64_regobj): Likewise.
8432 (srv_amd64_linux_regobj): Likewise.
8433 (srv_i386_32bit_xmlfiles): Likewise.
8434 (srv_i386_64bit_xmlfiles): Likewise.
8435 (srv_i386_xmlfiles): Likewise.
8436 (srv_amd64_xmlfiles): Likewise.
8437 (srv_i386_linux_xmlfiles): Likewise.
8438 (srv_amd64_linux_xmlfiles): Likewise.
8439 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8440 srv_xmlfiles to $srv_i386_xmlfiles.
8441 (i[34567]86-*-mingw32ce*): Likewise.
8442 (i[34567]86-*-mingw*): Likewise.
8443 (i[34567]86-*-nto*): Likewise.
8444 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8445 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8446 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8447 (x86_64-*-linux*): Likewise.
8448
8449 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8450 (init_registers_amd64_linux): New.
8451 (x86_arch_setup): Replace init_registers_x86_64_linux with
8452 init_registers_amd64_linux.
8453
8454 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8455
8456 * configure.ac: Check for libdl. If it is not available link against
8457 static libthread_db.
8458 * configure: Regenerate.
8459
8460 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8461
8462 PR9605
8463
8464 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8465 handing a read watchpoint.
8466 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8467
8468 2010-02-12 Doug Evans <dje@google.com>
8469
8470 * linux-low.c (linux_supports_tracefork_flag): Document.
8471 (linux_look_up_symbols): Add comment.
8472
8473 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8474
8475 * regcache.c (supply_register): Clear regcache if buf is NULL.
8476
8477 2010-02-02 Nicolas Roche <roche@sourceware.org>
8478 Joel Brobecker <brobecker@adacore.com>
8479
8480 * inferiors.c (find_inferior): Add function documentation.
8481 (unloaded_dll): Handle the case where the unloaded dll has not
8482 been previously registered in the dll list.
8483
8484 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8485
8486 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8487 (thumb2_breakpoint): New.
8488 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8489
8490 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8491
8492 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8493 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8494 breakpoints.
8495
8496 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8497
8498 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8499
8500 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8501
8502 * linux-s390-low.c (s390_collect_ptrace_register)
8503 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8504
8505 2010-01-21 Doug Evans <dje@google.com>
8506
8507 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8508 (PTRACE_ARG4_TYPE): New macro.
8509 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8510 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8511 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8512 (usr_store_inferior_registers): Ditto.
8513 (linux_read_memory, linux_write_memory): Ditto.
8514 (linux_test_for_tracefork): Ditto.
8515
8516 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8517 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8518
8519 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8520
8521 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8522 target.
8523
8524 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8525
8526 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8527 prototype to take a regcache. Adjust.
8528
8529 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8530
8531 * regcache.h (struct thread_info): Forward declare.
8532 (struct regcache): New.
8533 (new_register_cache): Adjust prototype.
8534 (get_thread_regcache): Declare.
8535 (free_register_cache): Adjust prototype.
8536 (registers_to_string, registers_from_string): Ditto.
8537 (supply_register, supply_register_by_name, collect_register)
8538 (collect_register_as_string, collect_register_by_name): Ditto.
8539 * regcache.c (struct inferior_regcache_data): Delete.
8540 (get_regcache): Rename to ...
8541 (get_thread_regcache): ... this. Adjust. Switch inferior before
8542 fetching registers.
8543 (regcache_invalidate_one): Adjust.
8544 (regcache_invalidate): Fix prototype.
8545 (new_register_cache): Return the new register cache.
8546 (free_register_cache): Change prototype.
8547 (realloc_register_cache): Adjust.
8548 (registers_to_string): Change prototype to take a regcache. Adjust.
8549 (registers_from_string): Ditto.
8550 (register_data): Ditto.
8551 (supply_register): Ditto.
8552 (supply_register_by_name): Ditto.
8553 (collect_register): Ditto.
8554 (collect_register_as_string): Ditto.
8555 (collect_register_by_name): Ditto.
8556 * server.c (process_serial_event): Adjust.
8557 * linux-low.h (regset_fill_func, regset_store_func): Change
8558 prototype.
8559 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8560 Change prototype.
8561 * linux-low.c (get_stop_pc): Adjust.
8562 (check_removed_breakpoint): Adjust.
8563 (linux_wait_for_event): Adjust.
8564 (linux_resume_one_lwp): Adjust.
8565 (fetch_register): Add regcache parameter. Adjust.
8566 (usr_store_inferior_registers): Ditto.
8567 (regsets_fetch_inferior_registers): Ditto.
8568 (regsets_store_inferior_registers): Ditto.
8569 (linux_fetch_registers, linux_store_registers): Ditto.
8570 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8571 regcache. Adjust.
8572 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8573 Ditto.
8574 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8575 prototype to take a regcache.
8576 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8577 * remote-utils.c (convert_ascii_to_int, outreg)
8578 (prepare_resume_reply): Change prototype to take a regcache.
8579 Adjust.
8580 * target.h (struct target_ops) <fetch_registers, store_registers>:
8581 Change prototype to take a regcache.
8582 (fetch_inferior_registers, store_inferior_registers): Change
8583 prototype to take a regcache. Adjust.
8584 * proc-service.c (ps_lgetregs): Adjust.
8585 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8586 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8587 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8588 take a regcache. Adjust.
8589 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8590 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8591 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8592 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8593 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8594 (cris_cannot_fetch_register):
8595 (cris_breakpoint_at): Change prototype to take a regcache.
8596 Adjust.
8597 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8598 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8599 to take a regcache. Adjust.
8600 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8601 Adjust.
8602 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8603 take a regcache. Adjust.
8604 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8605 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8606 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8607 * linux-mips-low.c (mips_get_pc):
8608 (mips_set_pc): Change prototype to take a regcache. Adjust.
8609 (mips_reinsert_addr): Adjust.
8610 (mips_collect_register): Change prototype to take a regcache.
8611 Adjust.
8612 (mips_supply_register):
8613 (mips_collect_register_32bit, mips_supply_register_32bit)
8614 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8615 (mips_store_fpregset): Ditto.
8616 * linux-ppc-low.c (ppc_supply_ptrace_register)
8617 (ppc_supply_ptrace_register): Ditto.
8618 (parse_spufs_run): Adjust.
8619 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8620 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8621 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8622 take a regcache. Adjust.
8623 * linux-s390-low.c (s390_collect_ptrace_register)
8624 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8625 (s390_set_pc): Change prototype to take a regcache. Adjust.
8626 (s390_arch_setup): Adjust.
8627 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8628 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8629 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8630 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8631 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8632 regcache. Adjust.
8633 (sparc_breakpoint_at): Adjust.
8634 * linux-xtensa-low.c (xtensa_fill_gregset):
8635 (xtensa_store_gregset):
8636 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8637 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8638 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8639 prototype to take a regcache. Adjust.
8640 * win32-arm-low.c (arm_fetch_inferior_register)
8641 (arm_store_inferior_register): Change prototype to take a
8642 regcache. Adjust.
8643 * win32-i386-low.c (i386_fetch_inferior_register)
8644 (i386_store_inferior_register): Change prototype to take a
8645 regcache. Adjust.
8646 * win32-low.c (child_fetch_inferior_registers)
8647 (child_store_inferior_registers): Change prototype to take a
8648 regcache. Adjust.
8649 (win32_wait): Adjust.
8650 (win32_fetch_inferior_registers): Change prototype to take a
8651 regcache. Adjust.
8652 (win32_store_inferior_registers): Adjust.
8653 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8654 store_inferior_register>: Change prototype to take a regcache.
8655
8656 2010-01-20 Doug Evans <dje@google.com>
8657
8658 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8659 #ifdef.
8660 (linux_wait_for_event1, linux_init_signals): Ditto.
8661 (W_STOPCODE): Provide definition if missing.
8662
8663 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8664
8665 * linux-low.c (linux_core_of_thread): New.
8666 (compare_ints, show_process, list_threads): New.
8667 (linux_qxfer_osdata): Report threads and cores.
8668 (linux_target_op): Register linux_core_of_thread.
8669 * remote-utils.c (prepare_resume_reply): Report the core.
8670 (buffer_xml_printf): Support %d specifier.
8671 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8672 New.
8673 (handle_query): Handle qXfer:threads. Announce availability
8674 thereof.
8675 * target.h (struct target_ops): New field core_of_thread.
8676
8677 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8678
8679 * Makefile.in (clean): Remove new generated files.
8680 (reg-s390.o, reg-s390.c): Remove rules.
8681 (reg-s390x.o, reg-s390x.c): Likewise.
8682 (s390-linux32.o, s390-linux32.c): Add rules.
8683 (s390-linux64.o, s390-linux64.c): Likewise.
8684 (s390x-linux64.o, s390x-linux64.c): Likewise.
8685 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8686 * linux-s390-low.c: Include <elf.h>.
8687 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8688 (init_registers_s390): Remove prototype.
8689 (init_registers_s390x): Likewise.
8690 (init_registers_s390_linux32): Add prototype.
8691 (init_registers_s390_linux64): Likewise.
8692 (init_registers_s390x_linux64): Likewise.
8693 (s390_num_regs_3264): New define.
8694 (s390_regmap_3264): New global variable.
8695 (s390_cannot_fetch_register): Remove obsolete check.
8696 (s390_cannot_store_register): Likewise.
8697 (s390_collect_ptrace_register): Handle upper/lower register halves.
8698 (s390_supply_ptrace_register): Likewise.
8699 (s390_fill_gregset): Update to register number changes.
8700 (s390_get_hwcap): New routine.
8701 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8702 Install appropriate regmap and register set.
8703
8704 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8705
8706 * server.c (gdbserver_version): Update copyright year to 2010.
8707 * gdbreplay.c (gdbreplay_version): Likewise.
8708
8709 2009-12-28 Doug Evans <dje@google.com>
8710
8711 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8712 elf/external.h. Include <elf.h> instead but only if necessary.
8713
8714 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8715
8716 * linux-low.c (linux_remove_process): Remove `detaching'
8717 parameter. Don't release/detach from thread_db here.
8718 (linux_kill): Release/detach from thread_db here, ...
8719 (linux_detach): ... and here, before actually detaching.
8720 (linux_wait_1): ... and here, when a process exits.
8721 * thread-db.c (any_thread_of): New.
8722 (thread_db_free): Switch the current inferior to a thread of the
8723 passed in process.
8724
8725 2009-12-21 Doug Evans <dje@google.com>
8726
8727 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8728
8729 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8730 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8731 warning ifndef __NR_tkill. Move setting of errno there too.
8732 Delete unnecessary resetting of errno after syscall.
8733 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8734
8735 * configure.ac: Check for dladdr.
8736 * config.in: Regenerate.
8737 * configure: Regenerate.
8738 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8739 (try_thread_db_load): Update.
8740
8741 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8742
8743 2009-12-18 Doug Evans <dje@google.com>
8744
8745 * event-loop.c: Include unistd.h if it exists.
8746
8747 * linux-low.c (my_waitpid): Move definition away from being in
8748 between linux_tracefork_child/linux_test_for_tracefork.
8749
8750 * gdb_proc_service.h (psaddr_t): Fix type.
8751 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8752 signature to match glibc.
8753
8754 2009-12-16 Doug Evans <dje@google.com>
8755
8756 * linux-low.c (linux_read_memory): Fix argument to read.
8757
8758 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8759
8760 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8761 events, don't leave current_inferior pointing at null.
8762
8763 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8764
8765 * win32-low.c (LOG): Delete.
8766 (OUTMSG): Output to stderr.
8767 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8768 on compile time LOG macro.
8769 (win32_wait): Fix debug output.
8770
8771 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8772
8773 * win32-low.c (win32_add_one_solib): If the dll name is
8774 "ntdll.dll", prepend the system directory to the dll path.
8775
8776 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8777
8778 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8779
8780 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8781 Vladimir Prus <vladimir@codesourcery.com>
8782
8783 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8784 * configure.ac: Check for __mcoldfire__ and set
8785 gdb_cv_m68k_is_coldfire.
8786 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8787 reg-cf.o and reg-m68k.o.
8788 * configure: Regenerated.
8789
8790 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8791
8792 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8793 Pass it to thread_db_free.
8794 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8795 proper `detaching' argument to linux_remove_process.
8796 * linux-low.h (thread_db_free): Add `detaching' parameter.
8797 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8798 to thread_db_free.
8799 (thread_db_free): Add `detaching' parameter. Only
8800 call td_ta_clear_event if detaching from process.
8801
8802 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8803
8804 * thread-db.c (thread_db_free): Fix typo.
8805
8806 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8807
8808 PR gdb/10838
8809 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8810
8811 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8812
8813 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8814 with an i686 compiler.
8815 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8816 needed.
8817 * configure: Rebuilt.
8818
8819 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8820
8821 PR gdb/10783
8822
8823 * server.c (handle_search_memory_1): Correct read_addr initialization
8824 in loop for searching subsequent chunks.
8825
8826 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8827
8828 * configure.ac: New --with-libthread-db option.
8829 * thread-db.c: Allow direct dependence on libthread_db.
8830 (thread_db_free): Adjust.
8831 * config.in: Regenerate.
8832 * configure: Likewise.
8833
8834 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8835
8836 PR gdb/10757
8837 * thread-db.c (attach_thread): New function.
8838 (maybe_attach_thread): Return success/failure.
8839 (find_new_threads_callback): Adjust.
8840 (thread_db_find_new_threads): Loop until no new threads.
8841
8842 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8843
8844 * proc-service.c (ps_lgetregs): Formatting.
8845
8846 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8847
8848 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8849 * configure.ac: Adjust.
8850 * linux-low.h (struct process_info_private): Move members to struct
8851 thread_db.
8852 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8853 * linux-low.c (linux_remove_process): Adjust.
8854 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8855 * server.c (handle_query): Move code ...
8856 (handle_monitor_command): ... here. New function.
8857 * target.h (struct target_ops): New member.
8858 * thread-db.c (struct thread_db): New.
8859 (libthread_db_search_path): New variable.
8860 (thread_db_create_event, thread_db_enable_reporting)
8861 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8862 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8863 (try_thread_db_load_1, dladdr_to_soname): New functions.
8864 (try_thread_db_load, thread_db_load_search): New functions.
8865 (thread_db_init): Search for libthread_db.
8866 (thread_db_free): New function.
8867 (thread_db_handle_monitor_command): Likewise.
8868 * config.in: Regenerate.
8869 * configure: Regenerate.
8870
8871 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8872
8873 * spu-low.c (spu_kill): Wait for inferior to terminate.
8874 Call clear_inferiors.
8875 (spu_detach): Call clear_inferiors.
8876
8877 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8878
8879 * aclocal.m4: Regenerate.
8880 * config.in: Likewise.
8881 * configure: Likewise.
8882
8883 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8884
8885 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8886 (parse_spufs_run): New function.
8887 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8888 (ppc_breakpoint_at): Handle SPU breakpoints.
8889
8890 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8891
8892 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8893 (SPUFS_MAGIC): Define.
8894 (spu_enumerate_spu_ids): New function.
8895 (linux_qxfer_spu): New function.
8896 (linux_target_ops): Install linux_qxfer_spu.
8897
8898 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8899
8900 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8901 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8902 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8903 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8904 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8905 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8906 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8907 (init_registers_powerpc_cell32l): Add prototype.
8908 (init_registers_powerpc_cell64l): Likewise.
8909 (ppc_arch_setup): Detect Cell/B.E. architecture.
8910
8911 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8912
8913 * Makefile.in (datarootdir): New variable.
8914
8915 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8916
8917 * linux-low.c (linux_write_memory): Update debugging output.
8918 * Makefile.in (clean): Add new descriptions.
8919 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8920 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8921 * configure.srv: Add new files for arm*-*-linux*.
8922 * linux-arm-low.c: Add new declarations.
8923 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8924 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8925 (HWCAP_VFPv3D16): New.
8926 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8927 instead of __IWMMXT__.
8928 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8929 (arm_arch_setup): New.
8930 (target_regsets): Remove #ifdef. Add VFP regset.
8931 (the_low_target): Use arm_arch_setup.
8932
8933 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8934
8935 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8936 the main thread again.
8937
8938 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8939
8940 Adding Neutrino gdbserver.
8941 * configure: Regenerated.
8942 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8943 * configure.srv (i[34567]86-*-nto*): New target.
8944 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8945 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8946 (nto_comctrl) [__QNX__]: New function.
8947 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8948
8949 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8950
8951 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8952 srv_tgtobj.
8953
8954 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8955 Pedro Alves <pedro@codesourcery.com>
8956
8957 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8958 don't support CONTEXT_EXTENDED_REGISTERS.
8959 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8960 (the_low_target): Install them.
8961 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8962 failing with ERROR_PIPE_NOT_CONNECTED.
8963
8964 2009-06-30 Doug Evans <dje@google.com>
8965 Pierre Muller <muller@ics.u-strasbg.fr>
8966
8967 Add h/w watchpoint support to x86-linux, win32-i386.
8968 * Makefile.in (SFILES): Add i386-low.c
8969 (i386_low_h): Define.
8970 (i386-low.o): Add dependencies.
8971 (linux-x86-low.o): Add i386-low.h dependency.
8972 (win32-i386-low.o): Ditto.
8973 * i386-low.c: New file.
8974 * i386-low.h: New file.
8975 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8976 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8977 * linux-low.c (linux_add_process): Initialize arch_private.
8978 (linux_remove_process): Free arch_private.
8979 (add_lwp): Initialize arch_private.
8980 (delete_lwp): Free arch_private.
8981 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8982 provided.
8983 * linux-low.h (process_info_private): New member arch_private.
8984 (lwp_info): New member arch_private.
8985 (linux_target_ops): New members new_process, new_thread,
8986 prepare_to_resume.
8987 (ptid_of): New macro.
8988 * linux-x86-low.c: Include stddef.h, i386-low.h.
8989 (arch_process_info): New struct.
8990 (arch_lwp_info): New struct.
8991 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8992 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8993 (i386_dr_low_get_status): New function.
8994 (x86_insert_point, x86_remove_point): New functions.
8995 (x86_stopped_by_watchpoint): New function.
8996 (x86_stopped_data_address): New function.
8997 (x86_linux_new_process, x86_linux_new_thread): New functions.
8998 (x86_linux_prepare_to_resume): New function.
8999 (the_low_target): Add entries for insert_point, remove_point,
9000 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9001 prepare_to_resume.
9002 * server.c (debug_hw_points): New global.
9003 (monitor_show_help): Document set debug-hw-points.
9004 (handle_query): Process "set debug-hw-points".
9005 * server.h (debug_hw_points): Declare.
9006 (paddress): Declare.
9007 * utils.c (NUMCELLS, CELLSIZE): New macros.
9008 (get_sell, xsnprintf, paddress): New functions.
9009 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9010 remove_point, stopped_by_watchpoint, stopped_data_address.
9011 * win32-i386-low.c: Include i386-low.h.
9012 (debug_reg_state): Replaces dr.
9013 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9014 (i386_dr_low_get_status): New function.
9015 (i386_insert_point, i386_remove_point): New functions.
9016 (i386_stopped_by_watchpoint): New function.
9017 (i386_stopped_data_address): New function.
9018 (i386_initial_stuff): Update.
9019 (get_thread_context,set_thread_context,i386_thread_added): Update.
9020 (the_low_target): Add entries for insert_point,
9021 remove_point, stopped_by_watchpoint, stopped_data_address.
9022 * win32-low.c (win32_insert_watchpoint): New function.
9023 (win32_remove_watchpoint): New function.
9024 (win32_stopped_by_watchpoint): New function.
9025 (win32_stopped_data_address): New function.
9026 (win32_target_ops): Add entries for insert_watchpoint,
9027 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9028 * win32-low.h (win32_target_ops): New members insert_point,
9029 remove_point, stopped_by_watchpoint, stopped_data_address.
9030
9031 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9032
9033 * server.c (process_serial_event): Re-return unsupported, not
9034 error, if the type isn't recognized. Re-allow supporting only
9035 insert or remove packets. Also call require_running for
9036 breakpoints. Add missing break statement to default case. Tidy.
9037 * target.h (struct target_ops): Rename insert_watchpoint to
9038 insert_point, and remove_watchpoint to remove_point.
9039
9040 * linux-low.h (struct linux_target_ops): Likewise.
9041 * linux-low.c (linux_insert_watchpoint): Rename to ...
9042 (linux_insert_point): ... this. Adjust.
9043 (linux_remove_watchpoint): Rename to ...
9044 (linux_remove_point): ... this. Adjust.
9045 (linux_target_ops): Adjust.
9046 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9047 (cris_insert_point): ... this.
9048 (cris_remove_watchpoint): Rename to ...
9049 (cris_remove_point): ... this.
9050 (the_low_target): Adjust.
9051
9052 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9053
9054 * server.c (handle_v_kill): Pass signal_pid to
9055 kill_inferior if multi_process is zero.
9056
9057 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9058
9059 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9060 * target.h (target_ops): Comment for *_watchpoint to make it clear
9061 the functions can get types '0' and '1'.
9062
9063 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9064
9065 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9066 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9067 * regcache.c (get_regcache): Likewise.
9068 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9069 * win32-low.c (child_fetch_inferior_registers): Remove check for
9070 regno 0.
9071
9072 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9073 Pedro Alves <pedro@codesourcery.com>
9074
9075 * target.h (struct target_ops) <supports_multi_process>: New
9076 callback.
9077 (target_supports_multi_process): New.
9078 * server.c (handle_query): Even if GDB reports support, only
9079 enable multi-process if the target also supports it. Report
9080 multi-process support only if the target backend supports it.
9081 * linux-low.c (linux_supports_multi_process): New function.
9082 (linux_target_ops): Install it as target_supports_multi_process
9083 callback.
9084
9085 2009-05-24 Doug Evans <dje@google.com>
9086
9087 Global renaming of find_thread_pid to find_thread_ptid.
9088 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9089 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9090 All callers updated.
9091
9092 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9093 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9094 directly.
9095
9096 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9097 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9098 (linux_resume_one_lwp): Ditto.
9099
9100 2009-05-23 Doug Evans <dje@google.com>
9101
9102 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9103 from struct inferior_list_entry * to struct lwp_info *.
9104 All callers updated.
9105
9106 2009-05-13 Doug Evans <dje@google.com>
9107
9108 * linux-x86-low.c: Don't include assert.h.
9109 (x86_siginfo_fixup): Use fatal, not assert.
9110 (x86_arch_setup): Fix comment.
9111
9112 2009-05-12 Doug Evans <dje@google.com>
9113
9114 Biarch support for i386/amd64 gdbserver.
9115 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9116 Add linux-x86-low.c.
9117 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9118 (linux-x86-low.o): Add.
9119 * linux-x86-64-low.c: Delete.
9120 * linux-i386-low.c: Delete.
9121 * linux-x86-low.c: New file.
9122 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9123 linux-x86-low.o.
9124 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9125 linux-x86-low.o.
9126 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9127 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9128 (linux_child_pid_to_exec_file): New function.
9129 (elf_64_header_p, elf_64_file_p): New functions.
9130 (siginfo_fixup): New function.
9131 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9132 give target a chance to convert layout.
9133 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9134 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9135
9136 2009-05-07 Doug Evans <dje@google.com>
9137
9138 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9139 (regsets_store_inferior_registers): Ditto.
9140
9141 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9142
9143 PR server/10048
9144
9145 * linux-low.c (must_set_ptrace_flags): Delete.
9146 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9147 of the global.
9148 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9149 `lwp->must_set_ptrace_flags' instead.
9150 (linux_wait_for_event_1): Set ptrace options here.
9151 (linux_wait_1): ... not here.
9152
9153 2009-04-30 Doug Evans <dje@google.com>
9154
9155 * inferiors.c (started_inferior_callback): New function.
9156 (attached_inferior_callback): New function.
9157 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9158 * server.c (print_started_pid, print_attached_pid): New functions.
9159 (detach_or_kill_for_exit): New function.
9160 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9161 * server.h (have_started_inferiors_p): Declare.
9162 (have_attached_inferiors_p): Declare.
9163
9164 * inferiors.c (remove_process): Fix memory leak, free process.
9165 * linux-low.c (linux_remove_process): New function.
9166 (linux_kill): Call it instead of remove_process.
9167 (linux_detach, linux_wait_1): Ditto.
9168
9169 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9170
9171 * configure.srv: Add x86 Windows CE target.
9172
9173 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9174
9175 * inferiors.c (get_thread_process): Make global.
9176 * server.h (get_thread_process): Add prototype.
9177 * thread-db.c (find_one_thread): Use get_thread_process
9178 instead of current_process.
9179 (thread_db_get_tls_address): Do not crash if called when
9180 thread layer is not yet initialized.
9181
9182 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9183
9184 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9185 * spu-low.c (current_tid): Rename to ...
9186 (current_ptid): ... this.
9187 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9188 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9189 ptid_get_lwp (current_ptid) instead of current_tid.
9190 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9191 instead of current_tid. Use find_process_pid to verify pid
9192 argument is valid. Pass proper argument to remove_process.
9193 (spu_thread_alive): Compare current_ptid instead of current_tid.
9194 (spu_resume): Likewise.
9195
9196 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9197
9198 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9199 variable.
9200
9201 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9202
9203 Implement the multiprocess extensions, and add linux multiprocess
9204 support.
9205
9206 * server.h (ULONGEST): Declare.
9207 (struct ptid, ptid_t): New.
9208 (minus_one_ptid, null_ptid): Declare.
9209 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9210 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9211 (struct inferior_list_entry): Change `id' type from unsigned from
9212 to ptid_t.
9213 (struct sym_cache, struct breakpoint, struct
9214 process_info_private): Forward declare.
9215 (struct process_info): Declare.
9216 (current_process): Declare.
9217 (all_processes): Declare.
9218 (initialize_inferiors): Declare.
9219 (add_thread): Adjust to use ptid_t.
9220 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9221 (add_process, remove_process, find_thread_pid): Declare.
9222 (find_inferior_id): Adjust to use ptid_t.
9223 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9224 (multi_process): Declare.
9225 (push_event): Adjust to use ptid_t.
9226 (read_ptid, write_ptid): Declare.
9227 (prepare_resume_reply): Adjust to use ptid_t.
9228 (clear_symbol_cache): Declare.
9229 * inferiors.c (all_processes): New.
9230 (null_ptid, minus_one_ptid): New.
9231 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9232 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9233 (add_thread): Change unsigned long to ptid. Remove gdb_id
9234 parameter. Adjust.
9235 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9236 (gdb_id_to_thread): Rename to ...
9237 (find_thread_pid): ... this. Change unsigned long to ptid.
9238 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9239 (loaded_dll, pull_pid_from_list): Adjust.
9240 (add_process, remove_process, find_process_pid)
9241 (get_thread_process, current_process, initialize_inferiors): New.
9242 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9243 (struct target_waitstatus) <related_pid>: Ditto.
9244 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9245 return type to int.
9246 (struct target_ops) <join>: Add `pid' argument.
9247 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9248 (struct target_ops) <wait>: Add `ptid' field. Change return type
9249 to ptid.
9250 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9251 (mywait): Add `ptid' argument. Change return type to ptid_t.
9252 (target_pid_to_str): Declare.
9253 * target.c (set_desired_inferior): Adjust to use ptids.
9254 (mywait): Add new `ptid' argument. Adjust.
9255 (target_pid_to_str): New.
9256 * mem-break.h (free_all_breakpoints): Declare.
9257 * mem-break.c (breakpoints): Delelete.
9258 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9259 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9260 to use per-process breakpoint list.
9261 (free_all_breakpoints): New.
9262 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9263 (symbol_cache, all_symbols_looked_up): Delete.
9264 (hexchars): New.
9265 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9266 read_ptid): New.
9267 (prepare_resume_reply): Change ptid argument's type from unsigned
9268 long to ptid_t. Adjust. Implement W;process and X;process.
9269 (free_sym_cache, clear_symbol_cache): New.
9270 (look_up_one_symbol): Adjust to per-process symbol cache. *
9271 * server.c (cont_thread, general_thread, step_thread): Change type
9272 to ptid_t.
9273 (attached): Delete.
9274 (multi_process): New.
9275 (last_ptid): Change type to ptid_t.
9276 (struct vstop_notif) <ptid>: Change type to ptid_t.
9277 (queue_stop_reply, push_event): Change `ptid' argument's type to
9278 ptid_t.
9279 (discard_queued_stop_replies): Add `pid' argument.
9280 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9281 changes. Don't reference the `attached' global.
9282 (attach_inferior): Adjust to mywait interface changes.
9283 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9284 features. Handle and report "multiprocess+". Handle
9285 "qAttached:PID".
9286 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9287 changes.
9288 (handle_v_kill): New.
9289 (handle_v_stopped): Adjust to use target_pid_to_str.
9290 (handle_v_requests): Allow multiple attaches and runs when
9291 multiprocess extensions are in effect. Handle "vKill".
9292 (myresume): Adjust to use ptids.
9293 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9294 (handle_status): Adjust to discard_queued_stop_replies interface
9295 change.
9296 (first_thread_of, kill_inferior_callback)
9297 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9298 (main): Call initialize_inferiors. Adjust to use ptids, killing
9299 and detaching from all inferiors. Handle multiprocess packet
9300 variants.
9301 * linux-low.h: Include gdb_proc_service.h.
9302 (struct process_info_private): New.
9303 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9304 <lwpid_of>: Use ptid_get_lwp.
9305 (get_lwp_thread): Adjust.
9306 (struct lwp_info): Add `dead' member.
9307 (find_lwp_pid): Declare.
9308 * linux-low.c (thread_db_active): Delete.
9309 (new_inferior): Adjust comment.
9310 (inferior_pid): Delete.
9311 (linux_add_process): New.
9312 (handle_extended_wait): Adjust.
9313 (add_lwp): Change unsigned long to ptid.
9314 (linux_create_inferior): Add process to processes table. Adjust
9315 to use ptids. Don't set new_inferior here.
9316 (linux_attach_lwp): Rename to ...
9317 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9318 it. Adjust to use ptids.
9319 (linux_attach_lwp): New.
9320 (linux_attach): Add process to processes table. Don't set
9321 new_inferior here.
9322 (struct counter): New.
9323 (second_thread_of_pid_p, last_thread_of_process_p): New.
9324 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9325 multiple processes.
9326 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9327 processes. Remove process from process table.
9328 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9329 to multiple processes.
9330 (any_thread_of): New.
9331 (linux_detach): Add `pid' argument, and handle it. Remove process
9332 from processes table.
9333 (linux_join): Add `pid' argument. Handle it.
9334 (linux_thread_alive): Change unsighed long argument to ptid_t.
9335 Consider dead lwps as not being alive.
9336 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9337 threads we're not interested in.
9338 (same_lwp, find_lwp_pid): New.
9339 (linux_wait_for_lwp): Change `pid' argument's type from int to
9340 ptid_t. Adjust.
9341 (linux_wait_for_event): Rename to ...
9342 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9343 from int to ptid_t. Adjust.
9344 (linux_wait_for_event): New.
9345 (linux_wait_1): Add `ptid' argument. Change return type to
9346 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9347 that exit from the process table.
9348 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9349 Adjust.
9350 (mark_lwp_dead): New.
9351 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9352 stopping all threads, mark its main lwp as dead.
9353 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9354 ptids.
9355 (fetch_register, usr_store_inferior_registers)
9356 (regsets_fetch_inferior_registers)
9357 (regsets_store_inferior_registers, linux_read_memory)
9358 (linux_write_memory): Inline `inferior_pid'.
9359 (linux_look_up_symbols): Adjust to use per-process
9360 `thread_db_active'.
9361 (linux_request_interrupt): Adjust to use ptids.
9362 (linux_read_auxv): Inline `inferior_pid'.
9363 (initialize_low): Don't reference thread_db_active.
9364 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9365 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9366 (ps_getpid): Return the pid of the current inferior.
9367 * thread-db.c (proc_handle, thread_agent): Delete.
9368 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9369 per-process data.
9370 (find_one_thread): Change argument type to ptid_t. Adjust to
9371 per-process data.
9372 (maybe_attach_thread): Adjust to per-process data and ptids.
9373 (thread_db_find_new_threads): Ditto.
9374 (thread_db_init): Ditto.
9375 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9376 processes table. Adjust to use ptids.
9377 (spu_kill, spu_detach): Adjust interface. Remove process from
9378 processes table.
9379 (spu_join, spu_thread_alive): Adjust interface.
9380 (spu_wait): Adjust interface. Remove process from processes
9381 table. Adjust to use ptids.
9382 * win32-low.c (current_inferior_tid): Delete.
9383 (current_inferior_ptid): New.
9384 (debug_event_ptid): New.
9385 (thread_rec): Take a ptid. Adjust.
9386 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9387 (child_delete_thread): Ditto.
9388 (do_initial_child_stuff): Add `attached' argument. Add process to
9389 processes table.
9390 (child_fetch_inferior_registers, child_store_inferior_registers):
9391 Adjust.
9392 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9393 (win32_attach): Pass 1 to do_initial_child_stuff.
9394 (win32_kill): Adjust interface. Remove process from processes
9395 table.
9396 (win32_detach): Ditto.
9397 (win32_join): Adjust interface.
9398 (win32_thread_alive): Take a ptid.
9399 (win32_resume): Adjust to use ptids.
9400 (get_child_debug_event): Ditto.
9401 (win32_wait): Adjust interface. Remove exiting process from
9402 processes table.
9403
9404 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9405
9406 Non-stop mode support.
9407
9408 * server.h (non_stop): Declare.
9409 (gdb_client_data, handler_func): Declare.
9410 (delete_file_handler, add_file_handler, start_event_loop):
9411 Declare.
9412 (handle_serial_event, handle_target_event, push_event)
9413 (putpkt_notif): Declare.
9414 * target.h (enum resume_kind): New.
9415 (struct thread_resume): Replace `step' field by `kind' field.
9416 (TARGET_WNOHANG): Define.
9417 (struct target_ops) <wait>: Add `options' argument.
9418 <supports_non_stop, async, start_non_stop>: New fields.
9419 (target_supports_non_stop, target_async): New.
9420 (start_non_stop): Declare.
9421 (mywait): Add `options' argument.
9422 * target.c (mywait): Add `options' argument. Print child exit
9423 notifications here.
9424 (start_non_stop): New.
9425 * server.c (non_stop, own_buf, mem_buf): New globals.
9426 (struct vstop_notif): New.
9427 (notif_queue): New global.
9428 (queue_stop_reply, push_event, discard_queued_stop_replies)
9429 (send_next_stop_reply): New.
9430 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9431 interface changes.
9432 (attach_inferior): In non-stop mode, don't wait for the target
9433 here.
9434 (handle_general_set): Handle QNonStop.
9435 (handle_query): When handling qC, return the current general
9436 thread, instead of the first thread of the list.
9437 (handle_query): If the backend supports non-stop mode, include
9438 QNonStop+ in the qSupported query response.
9439 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9440 and non-stop mode.
9441 (handle_v_attach, handle_v_run): Handle non-stop mode.
9442 (handle_v_stopped): New.
9443 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9444 (myresume): Adjust to use resume_kind. Handle non-stop.
9445 (queue_stop_reply_callback): New.
9446 (handle_status): Handle non-stop mode.
9447 (main): Clear non_stop flag on reconnection. Use the event-loop.
9448 Refactor serial protocol handling from here ...
9449 (process_serial_event): ... to this new function. When GDB
9450 selects any thread, select one here. In non-stop mode, wait until
9451 GDB acks all pending events before exiting.
9452 (handle_serial_event, handle_target_event): New.
9453 * remote-utils.c (remote_open): Install remote_desc in the event
9454 loop.
9455 (remote_close): Remove remote_desc from the event loop.
9456 (putpkt_binary): Rename to...
9457 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9458 (putpkt_binary): New as wrapper around putpkt_binary_1.
9459 (putpkt_notif): New.
9460 (prepare_resume_reply): In non-stop mode, don't change the
9461 general_thread.
9462 * event-loop.c: New.
9463 * Makefile.in (OBJ): Add event-loop.o.
9464 (event-loop.o): New rule.
9465
9466 * linux-low.h (pid_of): Moved here.
9467 (lwpid_of): New.
9468 (get_lwp_thread): Use lwpid_of.
9469 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9470 * linux-low.c (pid_of): Delete.
9471 (inferior_pid): Use lwpid_of.
9472 (linux_event_pipe): New.
9473 (target_is_async_p): New.
9474 (delete_lwp): New.
9475 (handle_extended_wait): Use lwpid_of.
9476 (add_lwp): Don't set lwpid field.
9477 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9478 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9479 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9480 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9481 first. Adjust to linux_wait_for_event interface changes. Use
9482 lwpid_of.
9483 (linux_detach): Don't delete the main lwp here.
9484 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9485 (status_pending_p): Don't consider explicitly suspended lwps.
9486 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9487 pointer. Add OPTIONS argument. Change return type to int. Use
9488 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9489 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9490 pointer. Add status pointer argument. Return a pid instead of a
9491 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9492 changes. In non-stop mode, don't switch to a random thread.
9493 (linux_wait): Rename to...
9494 (linux_wait_1): ... this. Add target_options argument, and handle
9495 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9496 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9497 clean exit and signal exit code. Don't stop all threads in
9498 non-stop mode. In all-stop mode, only stop all threads when
9499 reporting a stop to GDB. Handle explicit thread stop requests.
9500 (async_file_flush, async_file_mark): New.
9501 (linux_wait): New.
9502 (send_sigstop): Use lwpid_of.
9503 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9504 interface changes. In non-stop mode, don't switch to a random
9505 thread.
9506 (linux_resume_one_lwp): Use lwpid_of.
9507 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9508 (linux_resume_one_thread): ... this. Handle resume_stop. In
9509 non-stop mode, don't look for pending flag in all threads.
9510 (resume_status_pending_p): Don't consider explicitly suspended
9511 threads.
9512 (my_waitpid): Reimplement. Emulate __WALL.
9513 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9514 Use lwpid_of.
9515 (sigchld_handler, linux_supports_non_stop, linux_async)
9516 (linux_start_non_stop): New.
9517 (linux_target_ops): Register linux_supports_non_stop, linux_async
9518 and linux_start_non_stop.
9519 (initialize_low): Install SIGCHLD handler.
9520 * thread-db.c (thread_db_create_event, find_one_thread)
9521 (thread_db_get_tls_address): Use lwpid_of.
9522 * win32-low.c (win32_detach): Adjust to use resume_kind.
9523 (win32_wait): Add `options' argument.
9524 * spu-low.c (spu_resume): Adjust to use resume_kind.
9525 (spu_wait): Add `options' argument.
9526
9527 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9528
9529 Decouple target code from remote protocol.
9530
9531 * target.h (enum target_waitkind): New.
9532 (struct target_waitstatus): New.
9533 (struct target_ops) <wait>: Return an unsigned long. Take a
9534 target_waitstatus pointer instead of a char pointer.
9535 (mywait): Likewise.
9536 * target.c (mywait): Change prototype to return an unsigned long.
9537 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9538 * server.h (thread_from_wait, old_thread_from_wait): Delete
9539 declarations.
9540 (prepare_resume_reply): Change prototype to take a
9541 target_waitstatus.
9542 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9543 (last_status, last_ptid): New.
9544 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9545 pid instead of a signal.
9546 (attach_inferior): Remove "status" and "signal" parameters.
9547 Adjust.
9548 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9549 not as an address.
9550 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9551 (handle_v_requests, myresume): Remove "status" and "signal"
9552 parameters. Adjust.
9553 (handle_status): New.
9554 (main): Delete local `status'. Adjust.
9555 * remote-utils.c: Include target.h.
9556 (prepare_resume_reply): Change prototype to take a
9557 target_waitstatus. Adjust.
9558
9559 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9560 interface.
9561 * spu-low.c (spu_wait): Adjust.
9562 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9563 Delete.
9564 (win32_wait): Adjust.
9565
9566 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9567
9568 * target.h (struct thread_resume): Delete leave_stopped member.
9569 (struct target_ops): Add a `n' argument to the `resume' callback.
9570 * server.c (start_inferior): Adjust.
9571 (handle_v_cont, myresume): Adjust.
9572 * linux-low.c (check_removed_breakpoint): Adjust to resume
9573 interface change, and to removed leave_stopped field.
9574 (resume_ptr): Delete.
9575 (struct thread_resume_array): New.
9576 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9577 resume interface change.
9578 (linux_continue_one_thread, linux_queue_one_thread)
9579 (resume_status_pending_p): Check if the resume field is NULL
9580 instead of checking the leave_stopped member.
9581 (linux_resume): Adjust to the target resume interface change.
9582 * spu-low.c (spu_resume): Adjust to the target resume interface
9583 change.
9584 * win32-low.c (win32_detach, win32_resume): Ditto.
9585
9586 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9587
9588 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9589 flag.
9590 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9591 pending.
9592 (linux_continue_one_thread): Only preserve the stepping flag if
9593 there's a pending breakpoint.
9594
9595 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9596
9597 * server.c (main): After the inferior having exited, call
9598 remote_close before exiting gdbserver.
9599
9600 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9601
9602 Fix size of FPSCR in Power 7 processors.
9603 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9604 (PPC_FEATURE_HAS_DFP): New #define.
9605 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9606 size of the FPSCR.
9607
9608 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9609
9610 * server.c (handle_query) Whitespace and formatting.
9611
9612 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9613
9614 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9615 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9616 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9617 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9618 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9619 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9620 Makefile.in, configure.ac: Fix whitespace throughout.
9621 * configure: Regenerate.
9622
9623 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9624
9625 * inferiors.c (find_inferior): Make it safe for the callback
9626 function to delete the currently iterated inferior.
9627
9628 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9629
9630 * Makefile.in (linuw_low_h): Move higher.
9631 (thread-db.o): Depend on $(linux_low_h).
9632
9633 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9634
9635 Rename "process" to "lwp" throughout.
9636
9637 * linux-low.c (all_processes): Rename to...
9638 (all_lwps): ... this.
9639 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9640 (add_process): Rename to ...
9641 (add_lwp): ... this. Adjust.
9642 (linux_create_inferior): Adjust.
9643 (linux_attach_lwp): Adjust.
9644 (linux_attach): Adjust.
9645 (linux_kill_one_process): Rename to ...
9646 (linux_kill_one_lwp): ... this. Adjust.
9647 (linux_kill): Adjust.
9648 (linux_detach_one_process): Rename to ...
9649 (linux_detach_one_lwp): ... this. Adjust.
9650 (linux_detach): Adjust.
9651 (check_removed_breakpoint): Adjust.
9652 (status_pending_p): Adjust.
9653 (linux_wait_for_process): Rename to ...
9654 (linux_wait_for_lwp): ... this. Adjust.
9655 (linux_wait_for_event): Adjust.
9656 (send_sigstop): Adjust.
9657 (wait_for_sigstop): Adjust.
9658 (stop_all_processes): Rename to ...
9659 (stop_all_lwps): ... this.
9660 (linux_resume_one_process): Rename to ...
9661 (linux_resume_one_lwp): ... this. Adjust.
9662 (linux_set_resume_request, linux_continue_one_thread)
9663 (linux_queue_one_thread, resume_status_pending_p)
9664 (usr_store_inferior_registers, regsets_store_inferior_registers)
9665 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9666 Adjust.
9667 * linux-low.h (get_process): Rename to ...
9668 (get_lwp): ... this. Adjust.
9669 (get_thread_process): Rename to ...
9670 (get_thread_lwp): ... this. Adjust.
9671 (get_process_thread): Rename to ...
9672 (get_lwp_thread): ... this. Adjust.
9673 (struct process_info): Rename to ...
9674 (struct lwp_info): ... this.
9675 (all_processes): Rename to ...
9676 (all_lwps): ... this.
9677 * proc-service.c (ps_lgetregs): Adjust.
9678 * thread-db.c (thread_db_create_event, find_one_thread)
9679 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9680
9681 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9682
9683 * server.c (handle_query): Handle "qAttached".
9684
9685 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9686
9687 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9688 GPLv3, update license URL.
9689
9690 2009-03-01 Doug Evans <dje@google.com>
9691
9692 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9693 (server_h): Add gdb_signals.h.
9694 (signals.o): Update.
9695 * server.h (target_signal_from_host,target_signal_to_host_p)
9696 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9697
9698 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9699
9700 * remote-utils.c (getpkt): Also generate remote-debug
9701 information if noack_mode is set.
9702
9703 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9704
9705 * server.c (handle_query): Report qXfer:siginfo:read and
9706 qXfer:siginfo:write as supported and handle them.
9707 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9708 * linux-low.c (linux_xfer_siginfo): New.
9709 (linux_target_ops): Set it.
9710
9711 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9712
9713 * server.c (gdbserver_usage): Mention --remote-debug.
9714 (main): Accept '--remote-debug' switch.
9715
9716 2009-01-18 Doug Evans <dje@google.com>
9717
9718 * regcache.c (new_register_cache): No need to check result of xcalloc.
9719 * server.c (handle_search_memory): Back out calls to xmalloc,
9720 result is checked and error is returned to user upon failure.
9721 (handle_query): Ditto. Add more checks for result of malloc.
9722 (handle_v_cont): Check result of malloc, report error back to
9723 user upon failure.
9724 (handle_v_run): Ditto. Call freeargv.
9725 * server.h (freeargv): Declare.
9726 * utils.c (freeargv): New fn.
9727
9728 2009-01-15 Doug Evans <dje@google.com>
9729
9730 * gdbreplay.c (perror_with_name): Make arg const char *.
9731 * server.h (target_signal_to_name): Make return type const char *.
9732 * thread-db.c (thread_db_err_str): Make return type const char *.
9733 * utils.c (perror_with_name): Make arg const char *.
9734
9735 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9736
9737 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9738 when handling a EXIT_PROCESS_DEBUG_EVENT.
9739
9740 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9741
9742 * gdbreplay.c (gdbreplay_version): Update copyright year.
9743 * server.c (gdbserver_version): Likewise.
9744
9745 2009-01-05 Doug Evans <dje@google.com>
9746
9747 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9748 (handle_extended_wait): Improve comment.
9749
9750 2008-12-13 Doug Evans <dje@google.com>
9751
9752 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9753 * server.h (ATTR_MALLOC): New macro.
9754 (xmalloc,xcalloc,xstrdup): Declare.
9755 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9756 * inferiors.c: Ditto.
9757 * linux-low.c: Ditto.
9758 * mem-break.c: Ditto.
9759 * regcache.c: Ditto.
9760 * remote-utils.c: Ditto.
9761 * server.c: Ditto.
9762 * target.c: Ditto.
9763 * win32-low.c: Ditto.
9764
9765 2008-12-12 Doug Evans <dje@google.com>
9766
9767 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9768 in debugging printf.
9769
9770 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9771
9772 2008-12-09 Doug Evans <dje@google.com>
9773
9774 * linux-low.h (struct process_info): Delete member tid, unused.
9775 * thread-db.c (find_one_thread): Update.
9776 (maybe_attach_thread): Update.
9777
9778 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9779
9780 * target.h (struct target_ops): Add qxfer_osdata member.
9781 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9782 and dirent.h.
9783 (linux_qxfer_osdata): New functions.
9784 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9785 callback.
9786 * server.c (handle_query): Handle "qXfer:osdata:read:".
9787 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9788 (buffer_xml_printf): New functions.
9789 * server.h (struct buffer): New.
9790 (buffer_grow_str, buffer_grow_str0): New macros.
9791 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9792 (buffer_xml_printf): Declare.
9793
9794 2008-11-24 Doug Evans <dje@google.com>
9795
9796 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9797
9798 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9799
9800 * server.c (handle_v_run): Always use the supplied argument list.
9801
9802 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9803
9804 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9805 (xtensa_regmap_table): Add entry for scompare1.
9806
9807 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9808
9809 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9810 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9811 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9812 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9813 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9814 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9815 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9816 XML target descriptions.
9817 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9818 when inferior is running on an ISA 2.05 or later processor. Add
9819 special case to return offset for full 64-bit slot of FPSCR when
9820 in 32-bits.
9821
9822 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9823
9824 * Makefile.in (SFILES, clean): Added sparc64 files.
9825 (reg-sparc64.o, reg-sparc64.c): New.
9826 * configure.srv (sparc*-*-linux*): New configuration.
9827 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9828 syscall arguments for SPARC.
9829 (regsets_store_inferior_registers): Likewise.
9830 * linux-sparc-low.c: New file.
9831
9832 2008-10-21 Doug Evans <dje@google.com>
9833
9834 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9835 (READLINE_DIR,READLINE_DEP): Delete.
9836 (INTERNAL_CFLAGS): Update.
9837 (LINTFLAGS): Update.
9838
9839 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9840
9841 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9842 whole argv from the last run, not just argv[0].
9843
9844 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9845
9846 * regcache.c (new_register_cache): Return NULL if the register
9847 cache size isn't known yet.
9848 (free_register_cache): Avoid dereferencing a NULL regcache.
9849
9850 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9851
9852 * configure.srv: Merge MIPS and MIPS64.
9853
9854 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9855
9856 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9857
9858 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9859
9860 * Makefile.in: Add required vsx dependencies.
9861
9862 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9863 Declare init_registers_powerpc_vsx32l.
9864 Declare init_registers_powerpc_vsx64l.
9865 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9866 (ppc_arch_setup): Check for VSX in hwcap.
9867 (ppc_fill_vsxregset): New function.
9868 (ppc_store_vsxregset): New function.
9869 Add new VSX entry in regset_info target_regsets.
9870
9871 * configure.srv: Add new VSX dependencies.
9872
9873 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9874
9875 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9876 (remote_open): Set or clear transport_is_reliable.
9877 (putpkt_binary): Don't expect acks in noack mode.
9878 (getpkt): Don't send ack/nac in noack mode.
9879 * server.c (handle_general_set): Handle QStartNoAckMode.
9880 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9881 qSupported.
9882 (main): Reset noack_mode on every connection.
9883 * server.h (noack_mode): Declare.
9884
9885 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9886
9887 * Makefile.in (GDBREPLAY_OBS): New variable.
9888 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9889
9890 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9891 Daniel Jacobowitz <dan@codesourcery.com>
9892
9893 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9894 (usr_store_inferior_registers): Likewise.
9895 (regsets_store_inferior_registers): Likewise.
9896
9897 2008-07-31 Rolf Jansen <rj@surtec.com>
9898 Pedro Alves <pedro@codesourcery.com>
9899
9900 * configure.ac: Check for memmem declaration.
9901 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9902 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9903 (disable_packet_qfThreadInfo): Unconditionally compile.
9904 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9905 * configure, config.in: Regenerate.
9906
9907 2008-07-28 Doug Kwan <dougkwan@google.com>
9908
9909 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9910 (linux_write_memory): Remove declaration of errno.
9911
9912 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9913
9914 * linux-low.c (handle_extended_wait): Do not use "status"
9915 variable uninitialized.
9916
9917 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9918
9919 * server.c (handle_v_attach): Inhibit reporting dll changes.
9920
9921 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9922
9923 * remote-utils.c (prepare_resume_reply): If requested, don't
9924 output "thread:TID" in the T stop reply.
9925
9926 * server.c (disable_packet_vCont, disable_packet_Tthread)
9927 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9928 (handle_query): If requested, disable support for qC, qfThreadInfo
9929 and qsThreadInfo.
9930 (handle_v_requests): If requested, disable support for vCont.
9931 (gdbserver_show_disableable): New.
9932 (main): Handle --disable-packet and --disable-packet=LIST.
9933
9934 * server.h (disable_packet_vCont, disable_packet_Tthread)
9935 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9936
9937 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9938
9939 * server.c (gdbserver_usage): Mention --version.
9940
9941 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9942
9943 * Makefile.in (gdbreplay.o): New rule.
9944
9945 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9946
9947 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9948 message, not gdbserver.
9949
9950 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9951 Nathan Sidwell <nathan@codesourcery.com>
9952 Joseph Myers <joseph@codesourcery.com>
9953
9954 * acinclude.m4: Include ../../config/acx.m4.
9955 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9956 * configure, config.in: Regenerate.
9957 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9958 * server.c (gdbserver_version): Print PKGVERSION.
9959 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9960 (main): Adjust gdbserver_usage calls.
9961 * gdbreplay.c (version, host_name): Add declarations.
9962 (gdbreplay_version, gdbreplay_usage): New.
9963 (main): Accept --version and --help options.
9964
9965 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9966
9967 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9968 (arm_breakpoint_at): Handle Thumb.
9969 (the_low_target): Add comment.
9970
9971 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9972
9973 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9974
9975 2008-05-09 Doug Evans <dje@google.com>
9976
9977 * server.h (decode_search_memory_packet): Declare.
9978 * remote-utils.c (decode_search_memory_packet): New fn.
9979 * server.c (handle_search_memory_1): New fn.
9980 (handle_search_memory): New fn.
9981 (handle_query): Process qSearch:memory packets.
9982
9983 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9984
9985 * regcache.c (registers_length): Remove.
9986 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9987 full register packet.
9988 * regcache.h (registers_length): Remove prototype.
9989 * server.h (PBUFSIZ): Define to 16384.
9990
9991 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9992
9993 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9994 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9995 powerpc-64l.o, and powerpc-altivec64l.o.
9996 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9997 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9998 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9999 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10000 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10001 to srv_xmlfiles.
10002
10003 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10004 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10005 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10006 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10007 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10008 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10009 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10010 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10011 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10012 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10013 (clean): Update.
10014
10015 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10016 (init_registers_powerpc_32l): ... this new prototype.
10017 (init_registers_powerpc_32): Remove, replace by ...
10018 (init_registers_powerpc_altivec32l): ... this new prototype.
10019 (init_registers_powerpc_e500): Remove, replace by ...
10020 (init_registers_powerpc_e500l): ... this new prototype.
10021 (init_registers_ppc64): Remove, replace by ...
10022 (init_registers_powerpc_64l): ... this new prototype.
10023 (init_registers_powerpc_64): Remove, replace by ...
10024 (init_registers_powerpc_altivec64l): ... this new prototype.
10025 (ppc_num_regs): Set to 73.
10026 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10027 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10028 (ppc_cannot_store_register): Handle orig_r3 and trap.
10029 (ppc_arch_setup): Update init_registers_... calls.
10030 (ppc_fill_gregset): Handle orig_r3 and trap.
10031
10032 * inferiors.c (clear_inferiors): Reset current_inferior.
10033
10034 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10035
10036 * acinclude.m4: Add override.m4.
10037 * configure: Regenerate.
10038
10039 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10040
10041 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10042 initial call to init_register_ppc64.
10043
10044 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10045
10046 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10047 single powerpc*-*-linux* case.
10048 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10049
10050 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10051
10052 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10053 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10054 from reg_xmlfiles.
10055 * linux-ppc-low.c: Include <elf.h>.
10056 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10057 (ppc_hwcap): New global variable.
10058 (ppc_regmap): Remove __SPE__ #ifdef sections.
10059 (ppc_regmap_e500): New global variable.
10060 (ppc_cannot_store_register): Update __SPE__ special case.
10061 (ppc_get_hwcap): New function.
10062 (ppc_arch_setup): Use it to determine whether inferior supports
10063 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10064 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10065 Do not access registers if target does not support AltiVec.
10066 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10067 Do not access registers if target does not support SPE.
10068 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10069
10070 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10071
10072 * linux-low.c (disabled_regsets, num_regsets): New.
10073 (use_regsets_p): Delete.
10074 (linux_wait_for_process): Clear disabled_regsets.
10075 (regsets_fetch_inferior_registers): Check and set it.
10076 (regsets_store_inferior_registers): Likewise.
10077 (linux_fetch_registers, linux_store_registers): Do not use
10078 use_regsets_p.
10079 (initialize_low): Allocate disabled_regsets.
10080
10081 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10082
10083 * Makefile.in (LIBOBJS): New.
10084 (OBS): Use LIBOBJS.
10085 (memmem.o): New rule.
10086 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10087 * configure: Regenerated.
10088
10089 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10090
10091 * server.c (handle_query): Never return "unsupported" for
10092 qXfer:features:read queries.
10093
10094 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10095
10096 * server.c (get_features_xml): Fix inverted condition.
10097 (handle_query): Always support qXfer:feature:read.
10098
10099 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10100
10101 * server.c (wrapper_argv): New.
10102 (start_inferior): Handle wrapper_argv. If set, expect an extra
10103 trap.
10104 (gdbserver_usage): Document --wrapper.
10105 (main): Parse --wrapper.
10106
10107 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10108
10109 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10110 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10111 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10112 (ppc_set_pc): Likewise.
10113 (ppc_arch_setup): New function.
10114 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10115 of collect_register.
10116 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10117
10118 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10119
10120 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10121 instead of linux-ppc64-low.o.
10122 * linux-ppc64-low.c: Remove file.
10123 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10124 (linux-ppc64-low.o): Remove rule.
10125
10126 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10127 (init_registers_powerpc_64): Likewise.
10128 (ppc_regmap): Conditionally define depending on __powerpc64__.
10129 (ppc_cannot_store_register): Do not special-case "fpscr" when
10130 compiled on __powerpc64__.
10131 (ppc_collect_ptrace_register): New function.
10132 (ppc_supply_ptrace_register): New function.
10133 (ppc_breakpoint): Change type to "unsigned int".
10134 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10135 (the_low_target): Conditionally provide initializers for the
10136 arch_setup member depending on __powerpc64__. Install
10137 collect_ptrace_register and supply_ptrace_register members.
10138
10139 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10140
10141 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10142 * server.c (gdbserver_xmltarget): Define.
10143 (get_features_xml): Use it to replace "target.xml" and arch_string.
10144
10145 * configure.srv: Remove srv_xmltarget. Add XML files that were
10146 mentioned there to srv_xmlfiles instead. Remove conditional tests
10147 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10148 srv_xmlfiles and srv_regobj to include all possible choices.
10149 * configure.ac (srv_xmltarget): Remove.
10150 (srv_xmlfiles): Do not add "target.xml".
10151 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10152 checks for supplementary target information.
10153 * configure: Regenerate.
10154 * Makefile.in (XML_TARGET): Remove.
10155 (target.xml): Remove rule.
10156 (clean): Do not clean up target.xml.
10157 (.PRECIOUS): Do not mention target.xml.
10158
10159 * target.h (struct target_ops): Remove arch_string member.
10160 * linux-low.c (linux_arch_string): Remove.
10161 (linux_target_ops): Remove arch_string initializer.
10162 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10163 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10164 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10165 * spu-low.c (spu_arch_string): Remove.
10166 (spu_target_ops): Remove arch_string initializer.
10167 * win32-low.c (win32_arch_string): Remove.
10168 (win32_target_ops): Remove arch_string initializer.
10169 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10170 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10171 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10172
10173 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10174
10175 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10176 by collect_ptrace_register and supply_ptrace_register hooks.
10177 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10178 instead of checking for the_low_target.left_pad_xfer.
10179 (usr_store_inferior_registers): Use collect_ptrace_register callback
10180 instead of checking for the_low_target.left_pad_xfer.
10181
10182 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10183 (s390_supply_ptrace_register): Likewise.
10184 (s390_fill_gregset): Call s390_collect_ptrace_register.
10185 (the_low_target): Update.
10186
10187 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10188 (ppc_supply_ptrace_register): Likewise.
10189 (the_low_target): Update.
10190
10191 * linux-i386-low.c (the_low_target): Update.
10192 * linux-x86-64-low.c (the_low_target): Update.
10193
10194 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10195
10196 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10197 reg-s390.o and reg-s390x.o.
10198
10199 * linux-low.c (new_inferior): New global variable.
10200 (linux_create_inferior, linux_attach): Set it.
10201 (linux_wait_for_process): Call the_low_target.arch_setup after the
10202 target has stopped for the first time.
10203 (initialize_low): Do not call the_low_target.arch_setup.
10204
10205 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10206 (s390_set_pc): Likewise.
10207 (s390_arch_setup): New function.
10208 (the_low_target): Use s390_arch_setup as arch_setup routine.
10209
10210 * regcache.c (realloc_register_cache): New function.
10211 (set_register_cache): Call it for each existing regcache.
10212
10213 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10214
10215 * server.h (init_registers): Remove prototype.
10216
10217 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10218 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10219 instead of init_registers ().
10220 * linux-arm-low.c (init_registers_arm): Add prototype.
10221 (init_registers_arm_with_iwmmxt): Likewise.
10222 (the_low_target): Add initializer for arch_setup field.
10223 * linux-cris-low.c (init_registers_cris): Add prototype.
10224 (the_low_target): Add initializer for arch_setup field.
10225 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10226 (the_low_target): Add initializer for arch_setup field.
10227 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10228 (the_low_target): Add initializer for arch_setup field.
10229 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10230 (the_low_target): Add initializer for arch_setup field.
10231 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10232 (the_low_target): Add initializer for arch_setup field.
10233 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10234 (the_low_target): Add initializer for arch_setup field.
10235 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10236 (init_registers_mips64_linux): Likewise.
10237 (the_low_target): Add initializer for arch_setup field.
10238 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10239 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10240 (the_low_target): Add initializer for arch_setup field.
10241 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10242 (init_registers_powerpc_64): Likewise.
10243 (the_low_target): Add initializer for arch_setup field.
10244 * linux-s390-low.c (init_registers_s390): Add prototype.
10245 (init_registers_s390x): Likewise.
10246 (the_low_target): Add initializer for arch_setup field.
10247 * linux-sh-low.c (init_registers_sh): Add prototype.
10248 (the_low_target): Add initializer for arch_setup field.
10249 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10250 (the_low_target): Add initializer for arch_setup field.
10251 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10252 (the_low_target): Add initializer for arch_setup field.
10253
10254 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10255 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10256 instead of init_registers ().
10257 * win32-arm-low.c (init_registers_arm): Add prototype.
10258 (the_low_target): Add initializer for arch_setup field.
10259 * win32-i386-low.c (init_registers_i386): Add prototype.
10260 (the_low_target): Add initializer for arch_setup field.
10261
10262 * spu-low.c (init_registers_spu): Add prototype.
10263 (initialize_low): Call initialie_registers_spu () instead of
10264 initialize_registers ().
10265
10266 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10267
10268 * server.c (handle_v_requests): When handling the vRun and vAttach
10269 packets, if already debugging a process, don't kill it. Return an
10270 error instead.
10271
10272 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10273
10274 * server.c (handle_query): Correct length check.
10275
10276 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10277
10278 * win32-low.c (do_initial_child_stuff): Add process handle
10279 parameter. Set current_process_handle and current_process_id from the
10280 parameters. Clear globals.
10281 (win32_create_inferior): Don't set current_process_handle and
10282 current_process_id here. Instead pass them on the call to
10283 do_initial_child_stuff.
10284 (win32_attach): Likewise.
10285 (win32_clear_inferiors): New.
10286 (win32_kill): Don't close the current process handle or the
10287 current thread handle here. Instead call win32_clear_inferiors.
10288 (win32_detach): Don't open a new handle to the process. Call
10289 win32_clear_inferiors.
10290 (win32_join): Don't rely on current_process_handle; open a new
10291 handle using the process id.
10292 (win32_wait): Call win32_clear_inferiors when the inferior process
10293 has exited.
10294
10295 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10296
10297 * server.c (monitor_show_help): Add "exit".
10298
10299 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10300
10301 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10302 (clean): Add reg-xtensa.c.
10303 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10304 * configure.srv (xtensa*-*-linux*) New target.
10305 * linux-xtensa-low.c: New.
10306 * xtensa-xtregs.c: New.
10307
10308 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10309
10310 * hostio.c: Don't include errno.h.
10311 (errno_to_fileio_errno): Move to hostio-errno.
10312 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10313 error number outputting to the target->hostio_last_error callback.
10314 (hostio_packet_error): Use FILEIO_EINVAL directly.
10315 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10316 calls to hostio_error.
10317 * hostio-errno.c: New.
10318 * server.h (hostio_last_error_from_errno): Declare.
10319 * target.h (target_ops): Add hostio_last_error member.
10320 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10321 as hostio_last_error handler.
10322 * spu-low.c (spu_target_ops): Likewise.
10323 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10324 (wince_hostio_last_error): New functions.
10325 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10326 as hostio_last_error handler.
10327 (win32_target_ops) [!_WIN32_WCE]: Register
10328 hostio_last_error_from_errno as hostio_last_error handler.
10329 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10330 (hostio-errno.o): New rule.
10331 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10332 * configure.srv (srv_hostio_err_objs): New variable. Default to
10333 hostio-errno.o.
10334 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10335 * configure: Regenerate.
10336
10337 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10338
10339 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10340 (linux_kill, linux_detach): Clean up the process list.
10341 * remote-utils.c (remote_open): Improve port number parsing.
10342 (putpkt_binary, input_interrupt): Only send interrupts if the target
10343 is running.
10344 * server.c (extended_protocol): Make static.
10345 (attached): Define earlier.
10346 (exit_requested, response_needed, program_argv): New variables.
10347 (target_running): New.
10348 (start_inferior): Clear attached here.
10349 (attach_inferior): Set attached here.
10350 (require_running): Define.
10351 (handle_query): Use require_running and target_running. Implement
10352 "monitor exit".
10353 (handle_v_attach, handle_v_run): New.
10354 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10355 (gdbserver_usage): Update.
10356 (main): Redo argument parsing. Handle --debug and --multi. Handle
10357 --attach along with other options or after the port. Save
10358 program_argv. Support no initial program. Resynchronize
10359 communication with GDB after an error. Handle "monitor exit".
10360 Use require_running and target_running. Always allow the extended
10361 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10362 restart in extended mode.
10363 * README: Refer to the GDB manual. Update --attach usage.
10364
10365 2007-12-20 Andreas Schwab <schwab@suse.de>
10366
10367 * linux-low.c (STACK_SIZE): Define.
10368 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10369 (linux_test_for_tracefork): Likewise.
10370
10371 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10372
10373 * linux-low.c (linux_wait_for_event): Update messages. Do not
10374 reinsert auto-delete breakpoints.
10375 * mem-break.c (struct breakpoint): Change return type of handler to
10376 int.
10377 (set_breakpoint_at): Update handler type.
10378 (reinsert_breakpoint_handler): Return 1 instead of calling
10379 delete_breakpoint.
10380 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10381 setting a new one.
10382 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10383 * mem-break.h (set_breakpoint_at): Update handler type.
10384 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10385 * win32-low.c (auto_delete_breakpoint): New.
10386 (get_child_debug_event): Use it.
10387
10388 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10389
10390 * configure.ac: Check for pread and pwrite.
10391 * hostio.c (handle_pread): Fall back to lseek and read.
10392 (handle_pwrite): Fall back to lseek and write.
10393 * config.in, configure: Regenerated.
10394
10395 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10396
10397 * server.c (myresume): Add own_buf argument.
10398 (main): Update calls.
10399
10400 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10401
10402 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10403 * remote-utils.c (remote_open): Do not call disable_async_io.
10404 (block_async_io): Delete.
10405 (unblock_async_io): Make static.
10406 (initialize_async_io): New.
10407 * server.c (handle_v_cont): Handle async I/O here.
10408 (myresume): Likewise. Move other common resume tasks here...
10409 (main): ... from here. Call initialize_async_io. Disable async
10410 I/O before the main loop.
10411 * server.h (initialize_async_io): Declare.
10412 (block_async_io, unblock_async_io): Delete prototypes.
10413 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10414
10415 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10416
10417 * remote-utils.c (readchar): Allow binary data in received messages.
10418
10419 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10420
10421 * win32-low.c (attaching): New global.
10422 (win32_create_inferior): Clear the `attaching' global.
10423 (win32_attach): Set the `attaching' global.
10424 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10425 attaching. Only set a breakpoint at the entry point if not
10426 attaching.
10427
10428 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10429
10430 * server.c (main): Don't report dll events on the initial
10431 connection on attaches.
10432
10433 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10434
10435 * server.c (main): Relax numerical bases supported for the pid of
10436 the --attach command line argument.
10437
10438 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10439
10440 * win32-low.c (win32_attach): Call OpenProcess before
10441 DebugActiveProcess, not after. Add last error output to error
10442 call.
10443
10444 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10445
10446 * win32-low.c (win32_get_thread_context)
10447 (win32_set_thread_context): New functions.
10448 (thread_rec): Use win32_get_thread_context.
10449 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10450 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10451 field.
10452
10453 2007-12-03 Leo Zayas
10454 Pedro Alves <pedro_alves@portugalmail.pt>
10455
10456 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10457 global variables.
10458 (child_add_thread): Minor cleanup.
10459 (child_continue): Resume artificially suspended threads before
10460 calling ContinueDebugEvent.
10461 (suspend_one_thread): New.
10462 (fake_breakpoint_event): New.
10463 (get_child_debug_event): Change return type to int. Check here if
10464 gdb sent an interrupt request. If a soft interrupt was requested,
10465 fake a breakpoint event. Return 0 if there is no event to handle,
10466 and 1 otherwise.
10467 (win32_wait): Don't check here if gdb sent an interrupt request.
10468 Ensure there is a valid event to handle.
10469 (win32_request_interrupt): Add soft interruption method as last
10470 resort.
10471
10472 2007-12-03 Leo Zayas
10473 Pedro Alves <pedro_alves@portugalmail.pt>
10474
10475 * win32-low.h (win32_thread_info): Add descriptions to the
10476 structure members. Replace `suspend_count' counter by a
10477 `suspended' flag.
10478 * win32-low.c (thread_rec): Update condition of when to get the
10479 context from the inferior. Rely on ContextFlags being set if it
10480 has already been retrieved. Only suspend the inferior thread if
10481 we haven't already. Warn if that fails.
10482 (continue_one_thread): s/suspend_count/suspended/. Only call
10483 ResumeThread once. Warn if that fails.
10484
10485 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10486
10487 * win32-low.c (win32_wait): Don't read from the inferior when it
10488 has already exited.
10489
10490 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10491
10492 * Makefile.in (win32_low_h): New variable.
10493 (win32-low.o): Add dependency on $(win32_low_h).
10494 (win32-arm-low.o, win32-i386-low.o): New rules.
10495
10496 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10497
10498 * hostio.c: Correct copyright year.
10499
10500 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10501
10502 * Makefile.in (OBS): Add hostio.o.
10503 (hostio.o): New rule.
10504 * server.h (handle_vFile): Declare.
10505 * hostio.c: New file.
10506 * server.c (handle_v_requests): Take packet_len and new_packet_len
10507 for binary packets. Call handle_vFile.
10508 (main): Update call to handle_v_requests.
10509
10510 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10511
10512 * linux-low.c: Include <sched.h>.
10513
10514 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10515
10516 * linux-low.c (linux_tracefork_grandchild): New.
10517 (linux_tracefork_child): Use clone.
10518 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10519
10520 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10521
10522 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10523
10524 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10525
10526 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10527
10528 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10529
10530 * inferiors.c (change_inferior_id): Delete.
10531 (add_pid_to_list, pull_pid_from_list): New.
10532 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10533 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10534 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10535 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10536 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10537 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10538 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10539 (using_threads): Always set to 1.
10540 (handle_extended_wait): New.
10541 (add_process): Do not set TID.
10542 (linux_create_inferior): Set must_set_ptrace_flags.
10543 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10544 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10545 (linux_thread_alive): Rename TID argument to LWPID.
10546 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10547 (linux_wait_for_event): Do not use TID or check using_threads. Update
10548 call to dead_thread_notify. Call handle_extended_wait.
10549 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10550 (send_sigstop): Delete sigstop_sent.
10551 (wait_for_sigstop): Avoid TID.
10552 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10553 (linux_test_for_tracefork): New.
10554 (linux_lookup_signals): Use thread_db_active and
10555 linux_supports_tracefork_flag.
10556 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10557 * linux-low.h (get_process_thread): Avoid TID.
10558 (struct process_ifo): Move thread_known and tid to the end. Remove
10559 sigstop_sent.
10560 (linux_attach_lwp, thread_db_init): Update prototypes.
10561 * server.h (change_inferior_id): Delete prototype.
10562 (add_pid_to_list, pull_pid_from_list): New prototypes.
10563 * thread-db.c (thread_db_use_events): New.
10564 (find_first_thread): Rename to...
10565 (find_one_thread): ...this. Update callers and messages. Do not
10566 call fatal. Check thread_db_use_events. Do not call
10567 change_inferior_id or new_thread_notify.
10568 (maybe_attach_thread): Update. Do not call new_thread_notify.
10569 (thread_db_init): Set thread_db_use_events. Check use_events.
10570 * utils.c (fatal, warning): Correct message prefix.
10571
10572 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10573
10574 * Makefile.in (clean): Remove new files.
10575 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10576 (powerpc-64.o, powerpc-64.c): New rules.
10577 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10578 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10579 with SPE.
10580 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10581 SPE targets.
10582 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10583 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10584 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10585 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10586 (target_regsets): Add AltiVec and SPE register sets.
10587 * configure.ac: Check for AltiVec and SPE.
10588 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10589 (ppc_fill_vrregset, ppc_store_vrregset): New.
10590 (target_regsets): Add AltiVec register set.
10591 * configure: Regenerated.
10592
10593 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10594
10595 * linux-low.c (O_LARGEFILE): Define.
10596 (linux_read_memory): Use /proc/PID/mem.
10597 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10598 * configure, config.in: Regenerated.
10599
10600 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10601
10602 * linux-low.c (linux_wait_for_event): Do not pass signals while
10603 single-stepping.
10604
10605 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10606
10607 * win32-low.c (create_process): New.
10608 (win32_create_inferior): Use create_process instead of
10609 CreateProcess. If create_process failed retry appending an ".exe"
10610 suffix. Store the GetLastError result immediatelly after
10611 create_process calls and use it on the call to error.
10612
10613 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10614
10615 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10616
10617 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10618
10619 * configure.ac: Switch license to GPLv3.
10620
10621 2007-08-01 Michael Snyder <msnyder@access-company.com>
10622
10623 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10624
10625 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10626
10627 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10628 typedef.
10629 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10630 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10631 CloseToolhelp32Snapshot.
10632 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10633 CloseToolhelp32Snapshot.
10634
10635 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10636
10637 * server.c (main): Check for inferior exit before main loop.
10638
10639 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10640
10641 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10642 instead of on tmp_desc.
10643
10644 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10645 Daniel Jacobowitz <dan@codesourcery.com>
10646
10647 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10648 (add_thread): Minor cleanups.
10649 (clear_inferiors): Move lower in the file. Clear the DLL
10650 list.
10651 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10652 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10653 (xml_escape_text): New.
10654 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10655 for qSupported.
10656 (handle_v_cont): Report errors.
10657 (gdbserver_version): Update.
10658 (main): Correct size of own_buf. Do not report initial DLL events.
10659 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10660 (unloaded_dll, xml_escape_text): New.
10661 * win32-low.c (enum target_waitkind): Update comments.
10662 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10663 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10664 (win32_EnumProcessModules, win32_GetModuleInformation)
10665 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10666 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10667 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10668 (win32_Module32First, win32_Module32Next, load_toolhelp)
10669 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10670 (get_child_debug_event): Handle DLL events.
10671 (win32_wait): Likewise.
10672
10673 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10674
10675 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10676 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10677
10678 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10679
10680 * win32-low.c (handle_output_debug_string): Ignore event if not
10681 waiting.
10682
10683 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10684
10685 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10686
10687 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10688
10689 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10690
10691 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10692
10693 * inferiors.c (change_inferior_id): Add comment.
10694 * linux-low.c (check_removed_breakpoint): Add an early
10695 prototype. Improve debug output.
10696 (linux_attach): Doc update.
10697 (linux_detach_one_process, linux_detach): Clean up before releasing
10698 each process.
10699 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10700 * linux-low.h (struct process_info): Doc improvement.
10701 * mem-break.c (delete_all_breakpoints): New.
10702 * mem-break.h (delete_all_breakpoints): New prototype.
10703 * thread-db.c (find_first_thread): New.
10704 (thread_db_create_event): Call it instead of
10705 thread_db_find_new_threads. Clean up unused variables.
10706 (maybe_attach_thread): Remove first thread handling.
10707 (thread_db_find_new_threads): Use find_first_thread.
10708 (thread_db_get_tls_address): Likewise.
10709
10710 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10711
10712 * thread-db.c (thread_db_find_new_threads): Add prototype.
10713 (thread_db_create_event): Check for the main thread before adding
10714 a new thread.
10715 (maybe_attach_thread): Only enable event reporting if TID == 0.
10716 (thread_db_get_tls_address): Check for new threads.
10717
10718 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10719
10720 * linux-low.c (linux_create_inferior): Try execv before execvp.
10721 * spu-low.c (spu_create_inferior): Likewise.
10722
10723 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10724
10725 * linux-low.c (linux_create_inferior): Change execv to execvp.
10726 * spu-low.c (spu_create_inferior): Likewies.
10727
10728 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10729
10730 * Makefile.in (clean): Clean new files instead of deleted ones.
10731 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10732 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10733 rules.
10734 * configure.srv: Specify XML files and new regformats for MIPS and
10735 MIPS64 GNU/Linux.
10736 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10737 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10738 an entry for the restart register.
10739 (mips_cannot_fetch_register, mips_cannot_store_register)
10740 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10741 register names to match the XML descriptions.
10742 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10743 restart register instead of $0.
10744
10745 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10746 Markus Deuling <deuling@de.ibm.com>
10747
10748 * remote-utils.c (decode_xfer_write): New function.
10749 * server.h (decode_xfer_write): Add prototype.
10750 * server.c (handle_query): Add PACKET_LEN argument. Support
10751 qXfer:spu:read and qXfer:spu:write packets.
10752 (main): Pass packet_len to handle_query.
10753 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10754 * target.h (target_ops): Add qxfer_spu.
10755
10756 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10757
10758 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10759 accessing non-seekable spufs files.
10760
10761 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10762
10763 * server.c (handle_query): Add reply for qC packet.
10764
10765 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10766 Leo Zayas <lerele@champenstudios@com>
10767
10768 * server.h (check_remote_input_interrupt_request): New function.
10769 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10770 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10771 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10772 (check_remote_input_interrupt_request): New function.
10773 * server.h (check_remote_input_interrupt_request): Declare.
10774 * win32-low.c (winapi_DebugBreakProcess,
10775 winapi_GenerateConsoleCtrlEvent): New typedefs.
10776 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10777 to 250 ms.
10778 (win32_wait): Check for remote interrupt request
10779 with check_remote_input_interrupt_request.
10780 (win32_request_interrupt): New function.
10781 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10782
10783 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10784
10785 * win32-low.c (debug_registers_changed,
10786 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10787 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10788 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10789 (thread_rec): Get context using the low target.
10790 (child_add_thread): Call thread_added on the low target,
10791 which does the same thing.
10792 (regptr): Delete.
10793 (do_initial_child_stuff): Remove debug registers references.
10794 Set context using the low target. Resume threads after
10795 setting the contexts.
10796 (child_continue): Remove dead variable. Remove debug
10797 registers references.
10798 (child_fetch_inferior_registers): Go through the low target.
10799 (do_child_store_inferior_registers): Remove.
10800 (child_store_inferior_registers): Go through the low target.
10801 (win32_resume): Remove debug registers references.
10802 Set context using the low target.
10803 (handle_exception): Change return type to void. Don't record
10804 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10805 first chance exception.
10806 (get_child_debug_event): Change return type to void. Remove
10807 goto loop. Always return after waiting for debug event.
10808 (win32_wait): Convert to switch statement. Handle spurious
10809 events.
10810
10811 * win32-i386-low.c (debug_registers_changed,
10812 debug_registers_used): New.
10813 (initial_stuff): Rename to ...
10814 (i386_initial_stuff): ... this. Clear debug registers
10815 state variables.
10816 (store_debug_registers): Delete.
10817 (i386_get_thread_context): New.
10818 (load_debug_registers): Delete.
10819 (i386_set_thread_context): New.
10820 (i386_thread_added): New.
10821 (single_step): Rename to ...
10822 (i386_single_step): ... this.
10823 (do_fetch_inferior_registers): Rename to ...
10824 (i386_fetch_inferior_register): ... this.
10825 (i386_store_inferior_register): New.
10826 (the_low_target): Adapt to new interface.
10827
10828 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10829 (arm_get_thread_context): New.
10830 (arm_set_thread_context): New.
10831 (regptr): New.
10832 (do_fetch_inferior_registers): Rename to ...
10833 (arm_fetch_inferior_register): ... this.
10834 (arm_store_inferior_register): New.
10835 (arm_wince_breakpoint): Reimplement as unsigned long.
10836 (arm_wince_breakpoint_len): Define.
10837 (the_low_target): Adapt to new interface.
10838
10839 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10840 load_debug_registers. Add get_thread_context, set_thread_context,
10841 thread_added and store_inferior_register. Rename
10842 fetch_inferior_registers to fetch_inferior_register.
10843 (regptr): Remove declaration.
10844
10845 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10846
10847 * linux-low.c (linux_detach): Change return type to int. Return 0.
10848 * spu-low.c (spu_detach): Likewise.
10849
10850 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10851
10852 * target.h (target_ops): Change return type of detach to int.
10853 Add join.
10854 (join_inferior): New.
10855 * server.c (main): Don't skip detach support on mingw32.
10856 If the inferior doesn't support detaching return error.
10857 Call join_inferior instead of using waitpid.
10858 * linux-low.c (linux_join): New.
10859 (linux_target_op): Add linux_join.
10860 * spu-low.c (spu_join): New.
10861 (spu_target_ops): Add spu_join.
10862 * win32-low.c (win32_detach): Adapt to new interface.
10863 Reopen current_process_handle before detaching. Issue a child
10864 resume before detaching.
10865 (win32_join): New.
10866 (win32_target_op): Add win32_join.
10867
10868 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10869
10870 * win32-low.c (win32-attach): Fix return value.
10871 * target.h (target_ops): Describe ATTACH return values.
10872
10873 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10874
10875 * win32-low.c (GETPROCADDRESS): Define.
10876 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10877 (winapi_DebugSetProcessKillOnExit): Likewise.
10878 (win32_create_inferior): Force usage of ansi CreateProcessA.
10879 (win32_attach): Use GETPROCADDRESS.
10880 (win32_detach): Likewise.
10881
10882 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10883
10884 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10885
10886 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10887
10888 * win32-low.c: Commit leftover changes from 2007-03-29.
10889
10890 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10891
10892 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10893 fields short instead of int. Add explicit padding.
10894 (i387_cache_to_fsave): Remove unnecessary casts.
10895 (i387_fsave_to_cache): Doc fix.
10896 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10897
10898 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10899
10900 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10901 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10902
10903 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10904
10905 * configure.srv (arm*-*-mingw32ce*): Move near the other
10906 arm targets.
10907
10908 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10909
10910 * configure.ac: Add errno checking.
10911 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10912 sys/file.h and malloc.h.
10913 (AC_CHECK_DECLS): Add perror.
10914 (srv_mingwce): Handle.
10915 * configure.srv (i[34567]86-*-cygwin*): Add
10916 win32-i386-low.o to srv_tgtobj.
10917 (i[34567]86-*-mingw*): Likewise.
10918 (arm*-*-mingw32ce*): Add case.
10919 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10920 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10921 [__MINGW32CE__] (strerror): New function.
10922 [__MINGW32CE__] (errno): Define to GetLastError.
10923 [__MINGW32CE__] (COUNTOF): New macro.
10924 (remote_open): Remove extra close call.
10925 * mem-break.c (delete_breakpoint_at): New function.
10926 * mem-break.h (delete_breakpoint_at): Declare.
10927 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10928 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10929 [USE_WIN32API] (read, write): Add char* casts.
10930 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10931 * server.h: Include wincecompat.h on Windows CE.
10932 [HAVE_ERRNO_H]: Check.
10933 (perror): Declare if not declared.
10934 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10935 (perror_with_name): Remove errno declaration.
10936 * wincecompat.h: New.
10937 * wincecompat.c: New.
10938 * win32-low.h: New.
10939 * win32-arm-low.c: New.
10940 * win32-i386-low.c: New.
10941 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10942 (OUTMSG2): Make it safe.
10943 (_T): New macro.
10944 (COUNTOF): New macro.
10945 (NUM_REGS): Get it from the low target.
10946 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10947 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10948 (thread_rec): Let low target handle debug registers.
10949 (child_add_thread): Likewise.
10950 (child_init_thread_list): Likewise.
10951 (continue_one_thread): Likewise.
10952 (regptr): New.
10953 (do_child_fetch_inferior_registers): Move to ...
10954 * win32-i386-low.c: ... here, and rename to ...
10955 (do_fetch_inferior_registers): ... this.
10956 * win32-low.c (child_fetch_inferior_registers):
10957 Go through the low target.
10958 (do_child_store_inferior_registers): Use regptr.
10959 (strwinerror): New function.
10960 (win32_create_inferior): Handle Windows CE.
10961 Use strwinerror instead of strerror on Windows error
10962 codes. Add program to the error output.
10963 Don't close the main thread handle on Windows CE.
10964 (win32_attach): Use coredll.dll on Windows CE.
10965 (win32_kill): Close current process and current
10966 thread handles.
10967 (win32_detach): Use coredll.dll on Windows CE.
10968 (win32_resume): Let low target handle debug registers, and
10969 step request.
10970 (handle_exception): Add/Remove initial breakpoint. Avoid
10971 non-existant WSTOPSIG on Windows CE.
10972 (win32_read_inferior_memory): Cast to remove warning.
10973 (win32_arch_string): Go through the low target.
10974 (initialize_low): Call set_breakpoint_data with the low
10975 target's breakpoint.
10976 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10977 FOP_REGNUM, mappings): Move to ...
10978 * win32-i386-low.c: ... here.
10979 * win32-low.c (win32_thread_info): Move to ...
10980 * win32-low.h: ... here.
10981 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10982 win32-arm-low.c and wincecompat.c.
10983 (all:): Add $EXEEXT.
10984 (install-only:): Likewise.
10985 (gdbserver:): Likewise.
10986 (gdbreplay:): Likewise.
10987 * config.in: Regenerate.
10988 * configure: Regenerate.
10989
10990 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10991
10992 * win32-low.c: Rename typedef thread_info to
10993 win32_thread_info throughout.
10994
10995 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10996
10997 * win32-i386-low.c: Rename to ...
10998 * win32-low.c: ... this.
10999 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11000 * Makefile.in: Likewise.
11001
11002 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11003
11004 * remote-utils.c (monitor_output): Constify msg parameter.
11005 * server.h (monitor_output): Likewise.
11006 * win32-i386-low.c (handle_output_debug_string): New.
11007 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11008 handle_output_debug_string.
11009 (get_child_debug_event): Likewise.
11010
11011 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11012
11013 * server.c (main): Correct strtoul check.
11014
11015 2007-03-27 Jon Ringle <jon@ringle.org>
11016
11017 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11018
11019 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11020
11021 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11022
11023 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11024
11025 * terminal.h: Check HAVE_SGTTY_H.
11026
11027 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11028
11029 * remote-utils.c (remote_open): Print out the assigned port number.
11030
11031 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11032
11033 * remote-utils.c (monitor_output): New function.
11034 * server.c (debug_threads): Define here.
11035 (monitor_show_help): New function.
11036 (handle_query): Handle qRcmd.
11037 (main): Do not handle 'd' packet.
11038 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11039 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11040 of debug_threads.
11041
11042 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11043
11044 * Makefile.in (EXEEXT): New.
11045 (clean): Use $(EXEEXT).
11046
11047 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11048
11049 * target.h (target_ops): Rename send_signal to request_interrupt,
11050 and remove enum target_signal parameter.
11051 * linux-low.c (linux_request_interrupt): Rename from
11052 linux_send_signal, and always send SIGINT.
11053 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11054 and always send SIGINT.
11055 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11056 of send_signal.
11057 (input_interrupt): Likewise.
11058
11059 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11060
11061 * server.c (get_features_xml): Check if target implemented
11062 arch_string.
11063 * win32-i386-low.c (win32_arch_string): New.
11064 (win32_target_ops): Add win32_arch_string as arch_string member.
11065
11066 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11067
11068 * spu-low.c (spu_arch_string): New.
11069 (spu_target_ops): Add spu_arch_string.
11070
11071 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11072
11073 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11074 * configure.ac: Do not check for terminal.h.
11075 * configure, config.in: Regenerated.
11076
11077 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11078
11079 * Makefile.in (OBS): Add $(XML_BUILTIN).
11080 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11081 (clean): Update.
11082 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11083 (arm-with-iwmmxt.c): New.
11084 * config.in, configure: Regenerate.
11085 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11086 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11087 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11088 (arm*-*-linux*): Add iWMMXt and regset support.
11089 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11090 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11091 (arm_store_wmmxregset, target_regsets): New.
11092 * server.c (get_features_xml): Take annex argument. Check builtin
11093 XML documents.
11094 (handle_query): Handle multiple annexes.
11095
11096 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11097
11098 * remote-utils.c [USE_WIN32API] (read, write): Define.
11099 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11100 write.
11101
11102 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11103
11104 * linux-i386-low.c (the_low_target): Set arch_string.
11105 * linux-x86-64-low.c (the_low_target): Likewise.
11106 * linux-low.c (linux_arch_string): New.
11107 (linux_target_ops): Add it.
11108 * linux-low.h (struct linux_target_ops): Add arch_string.
11109 * server.c (write_qxfer_response): Use const void * for DATA.
11110 (get_features_xml): New.
11111 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11112 * target.h (struct target_ops): Add arch_string method.
11113
11114 2007-01-03 Denis Pilat <denis.pilat@st.com>
11115 Daniel Jacobowitz <dan@codesourcery.com>
11116
11117 * linux-low.c (linux_kill): Handle being called with no threads.
11118 * win32-i386-low.c (win32_kill): Likewise.
11119 (get_child_debug_event): Clear current_process_handle.
11120
11121 2006-12-30 Denis PILAT <denis.pilat@st.com>
11122 Daniel Jacobowitz <dan@codesourcery.com>
11123
11124 * remote-utils.c (remote_open): Check the type of specified
11125 serial port devices before opening them.
11126 * server.c (main): Kill the inferior if an error occurs during
11127 the first remote_open.
11128
11129 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11130
11131 * README: Update supported targets.
11132
11133 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11134
11135 * Makefile.in (clean): Remove reg-mips64.c.
11136 (reg-mips64.c, reg-mips64.o): New rules.
11137 * configure.srv: Handle mips64. Include regset support for mips.
11138 * linux-mips-low.c (union mips_register): New.
11139 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11140 (mips_breakpoint, mips_breakpoint_at): Use int.
11141 (mips_collect_register, mips_supply_register)
11142 (mips_collect_register_32bit, mips_supply_register_32bit)
11143 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11144 (mips_store_fpregset, target_regsets): New.
11145 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11146
11147 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11148
11149 * configure.srv: Add target "spu*-*-*".
11150 * Makefile.in (clean): Remove reg-spu.c.
11151 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11152 * spu-low.c: New file.
11153
11154 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11155
11156 * configure.ac: Correct td_thr_tls_get_addr test.
11157 * configure: Regenerated.
11158
11159 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11160
11161 * linux-low.c (linux_wait_for_event): Reformat. Use the
11162 pass_signals array.
11163 * remote-utils.c (decode_address_to_semicolon): New.
11164 * server.c (pass_signals, handle_general_set): New.
11165 (handle_query): Mention QPassSignals for qSupported.
11166 (main): Call handle_general_set.
11167 * server.h (pass_signals, decode_address_to_semicolon): New.
11168
11169 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11170
11171 * server.c (handle_query): Correct error handling for read_auxv.
11172
11173 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11174
11175 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11176 and srv_linux_thread_db to yes.
11177 * linux-s390-low.c (s390_fill_gregset): New function.
11178 (target_regsets): Define data structure.
11179
11180 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11181
11182 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11183 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11184 * config.in, configure: Regenerated.
11185 * inferiors.c (gdb_id_to_thread): New function.
11186 (gdb_id_to_thread_id): Use it.
11187 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11188 * linux-low.h (struct process_info): Add th member.
11189 (thread_db_get_tls_address): New prototype.
11190 * remote-utils.c (decode_address): Make non-static.
11191 * server.c (handle_query): Handle qGetTLSAddr.
11192 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11193 * target.h (struct target_ops): Add get_tls_address.
11194 * thread-db.c (maybe_attach_thread): Save the thread handle.
11195 (thread_db_get_tls_address): New.
11196
11197 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11198
11199 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11200 (linux_resume_one_process): Take a siginfo_t *. Update all
11201 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11202 (struct pending_signals): Add a siginfo_t.
11203 (linux_wait_for_process): Always set last_status.
11204 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11205 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11206 * linux-low.h (struct process_info): Add last_status.
11207
11208 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11209
11210 * remote-utils.c (try_rle): New function.
11211 (putpkt_binary): Use it.
11212
11213 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11214
11215 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11216 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11217 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11218 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11219 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11220 point registers.
11221
11222 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11223
11224 * server.c (terminal_fd): New variable.
11225 (old_foreground_pgrp): Likewise.
11226 (restore_old_foreground_pgrp): New function.
11227 (start_inferior): Record the terminal file descriptor in terminal_fd
11228 and its original foreground group in old_foreground_pgrp. Register
11229 restore_old_foreground_pgrp with atexit().
11230
11231 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11232
11233 * server.c (handle_query): Correct qPart to qXfer.
11234
11235 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11236
11237 * configure.ac: Check for more headers which are missing on
11238 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11239 * configure.srv: Add Cygwin and mingw32.
11240 * remote-utils.c: Don't include headers unconditionally which
11241 are missing on mingw32. Include <winsock.h> for mingw32.
11242 (remote_open): Adjust for mingw32 support. Flush
11243 standard error after writing to it.
11244 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11245 (unblock_async_io, enable_async_io, disable_async_io)
11246 (readchar, getpkt): Update for Winsock support.
11247 (prepare_resume_reply): Expect a protocol signal number.
11248 * server.c: Disable <sys/wait.h> on mingw32.
11249 (start_inferior): Adjust for mingw32 support. Flush
11250 standard error after writing to it.
11251 (attach_inferior): Likewise. Use protocol signal
11252 numbers.
11253 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11254 and names.
11255 * win32-i386-low.c: New file.
11256 * Makefile.in (XM_CLIBS): Set.
11257 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11258 (win32-i386-low.o): New dependency rule.
11259 * linux-low.c (linux_wait): Use target signal numbers.
11260 * target.h (struct target_ops): Doc fix.
11261 * server.h (target_signal_to_name): New prototype.
11262 * gdbreplay.c: Don't include headers unconditionally which
11263 are missing on mingw32. Include <winsock.h> for mingw32.
11264 (remote_close, remote_open): Adjust for Winsock support.
11265 * configure, config.in: Regenerated.
11266
11267 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11268
11269 * server.c (decode_xfer_read, write_qxfer_response): New.
11270 (handle_query): Take a packet length argument. Handle
11271 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11272 the qSupported response.
11273 (main): Update call to handle_query.
11274
11275 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11276
11277 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11278 (putpkt_binary): Renamed from putpkt and adjusted for binary
11279 data.
11280 (putpkt): New wrapper for putpkt_binary.
11281 (readchar): Don't mask off the high bit.
11282 (decode_X_packet): New function.
11283 * server.c (main): Call putpkt_binary if a handler sets the packet
11284 length. Save the length of the incoming packet. Handle 'X'.
11285 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11286
11287 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11288
11289 * server.c (handle_query): Handle qSupported.
11290
11291 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11292
11293 * remote-utils.c (all_symbols_looked_up): New variable.
11294 (look_up_one_symbol): Check it.
11295 * server.h (look_up_one_symbol): New declaration.
11296 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11297
11298 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11299
11300 * Makefile.in (linux-arm-low.o): Update dependencies.
11301 * linux-arm-low.c: Include "gdb_proc_service.h".
11302 (PTRACE_GET_THREAD_AREA): Define.
11303 (ps_get_thread_area): New function.
11304
11305 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11306
11307 * configure.srv (m68k*-*-uclinux*): New target.
11308 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11309 (linux_resume_one_process): Remove extraneous cast.
11310 (linux_read_offsets): New.
11311 (linux_target_op): Add linux_read_offsets on mmuless systems.
11312 * server.c (handle_query): Add qOffsets logic.
11313 * target.h (struct target_ops): Add read_offsets.
11314
11315 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11316
11317 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11318 (PTRACE_GET_THREAD_AREA): Define.
11319 (ps_get_thread_area): New function.
11320 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11321 (linux-x86-64-low.o): Update.
11322
11323 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11324
11325 * configure.ac: Remove checks for prfpregset_t.
11326 * gdb_proc_service.h: New file.
11327 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11328 new "gdb_proc_service.h".
11329 * proc-service.c: Likewise.
11330 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11331 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11332 * Makefile.in (gdb_proc_service_h): Updated.
11333 * configure, config.in: Regenerated.
11334
11335 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11336
11337 * remote-utils.c (prepare_resume_reply): Move declaration
11338 of gdb_id_from_wait to the top of the block.
11339
11340 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11341
11342 * linux-low.c (regsets_store_inferior_registers): Read the regset
11343 from the target before filling it.
11344
11345 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11346
11347 * server.c (attach_inferior): Return SIGTRAP for a successful
11348 attach.
11349
11350 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11351
11352 * Makefile.in (OBS): Add version.o.
11353 (STAGESTUFF): Delete.
11354 (version.o): Add dependencies.
11355 (version.c): Replace rule.
11356 (clean): Remove version.c.
11357 * server.c (gdbserver_version): New.
11358 (gdbserver_usage): Use printf.
11359 (main): Handle --version and --help.
11360 * server.h (version, host_name): Add declarations.
11361
11362 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11363
11364 * linux-arm-low.c:
11365 * linux-arm-low.c:
11366 * inferiors.c:
11367 * i387-fp.h:
11368 * i387-fp.c:
11369 * gdbreplay.c:
11370 * regcache.c:
11371 * proc-service.c:
11372 * mem-break.h:
11373 * mem-break.c:
11374 * linux-x86-64-low.c:
11375 * linux-sh-low.c:
11376 * linux-s390-low.c:
11377 * linux-ppc64-low.c:
11378 * linux-ppc-low.c:
11379 * linux-mips-low.c:
11380 * linux-m68k-low.c:
11381 * linux-m32r-low.c:
11382 * linux-low.h:
11383 * linux-low.c:
11384 * linux-ia64-low.c:
11385 * linux-i386-low.c:
11386 * linux-crisv32-low.c:
11387 * thread-db.c:
11388 * terminal.h:
11389 * target.h:
11390 * target.c:
11391 * server.h:
11392 * server.c:
11393 * remote-utils.c:
11394 * regcache.h:
11395 * utils.c:
11396 * Makefile.in:
11397 * configure.ac:
11398 * gdbserver.1: Add (C) after Copyright. Update the FSF
11399 address.
11400
11401 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11402
11403 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11404 (arm_breakpoint_at): Recognize both breakpoints.
11405 (the_low_target): Use the correct breakpoint instruction.
11406
11407 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11408
11409 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11410 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11411 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11412 (the_low_target): Update.
11413
11414 2005-10-25 Andreas Schwab <schwab@suse.de>
11415
11416 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11417
11418 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11419 (ia64_num_regs): Reduce to 462.
11420
11421 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11422
11423 * acinclude.m4: Correct quoting.
11424 * aclocal.m4: Regenerated.
11425
11426 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11427 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11428 (thread_db_init): Call thread_db_err_str.
11429 * configure.ac: Check for TD_VERSION.
11430 * config.in, configure: Regenerated.
11431
11432 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11433
11434 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11435
11436 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11437
11438 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11439 is not available. Define HAVE_PTRACE_GETREGS if it is.
11440 * config.in, configure: Regenerated.
11441 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11442 * linux-i386-low.c, linux-m68k-low.c: Update to use
11443 HAVE_PTRACE_GETREGS.
11444 * linux-low.c (regsets_fetch_inferior_registers)
11445 (regsets_store_inferior_registers): Only return 0 if we processed
11446 GENERAL_REGS.
11447 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11448 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11449
11450 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11451
11452 * inferiors.c (struct thread_info): Add gdb_id.
11453 (add_thread): Add gdb_id argument.
11454 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11455 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11456 calls to add_thread.
11457 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11458 * server.c (handle_query): Use thread_to_gdb_id.
11459 (handle_v_cont, main): Use gdb_id_to_thread_id.
11460 * server.h (add_thread): Update prototype.
11461 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11462 prototypes.
11463
11464 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11465
11466 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11467 left-padded registers.
11468 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11469 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11470
11471 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11472
11473 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11474 * configure: Regenerate.
11475 * config.in: Regenerate.
11476 * server.h (NEED_DECLARATION_STRERROR):
11477 Replace with !HAVE_DECL_STRERROR.
11478
11479 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11480
11481 * linux-low.c (linux_wait, linux_send_signal): Don't test
11482 an unsigned long variable for > 0 if it could be MAX_ULONG.
11483 * server.c (myresume): Likewise.
11484 * target.c (set_desired_inferior): Likewise.
11485
11486 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11487
11488 * configure.ac: Simplify and improve check for socklen_t.
11489 * configure, config.in: Regenerate.
11490
11491 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11492
11493 * acconfig.h: Remove.
11494 * configure.ac: Add a test for socklen_t. Use three-argument
11495 AC_DEFINE throughout.
11496 * config.in: Regenerated using autoheader 2.59.
11497 * configure: Regenerated.
11498
11499 * gdbreplay.c (socklen_t): Provide a default.
11500 (remote_open): Use socklen_t.
11501 * remote-utils.c (socklen_t): Provide a default.
11502 (remote_open): Use socklen_t.
11503 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11504 unsigned char.
11505
11506 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11507 char for buffers.
11508 * linux-low.c (linux_read_memory, linux_write_memory)
11509 (linux_read_auxv): Likewise.
11510 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11511 (check_mem_write): Likewise.
11512 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11513 Likewise.
11514 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11515 (registers_from_string, register_data): Likewise.
11516 * server.c (handle_query, main): Likewise.
11517 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11518 (decode_M_packet): Likewise.
11519 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11520 * target.h (struct target_ops): Update read_memory, write_memory,
11521 and read_auxv.
11522 (read_inferior_memory, write_inferior_memory): Update.
11523 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11524 to unsigned char *.
11525 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11526 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11527 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11528 linux-s390-low.c, linux-sh-low.c: Update for changes in
11529 read_inferior_memory and the_low_target->breakpoint.
11530
11531 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11532
11533 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11534 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11535 * configure.srv: Add powerpc64-*-linux*.
11536 * linux-ppc64-low.c: New file.
11537
11538 2005-05-23 Orjan Friberg <orjanf@axis.com>
11539
11540 * linux-cris-low.c: New file with support for CRIS.
11541 * linux-crisv32-low.c: Ditto for CRISv32.
11542 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11543 (clean): Add reg-cris.c and reg-crisv32.c.
11544 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11545 reg-crisv32.o, and reg-crisv32.c to make rules.
11546 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11547 recognized targets.
11548
11549 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11550
11551 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11552 of sizeof (PTRACE_XFER_TYPE).
11553 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11554
11555 2005-05-12 Orjan Friberg <orjanf@axis.com>
11556
11557 * target.h (struct target_ops): Add insert_watchpoint,
11558 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11559 pointers for hardware watchpoint support.
11560 * linux-low.h (struct linux_target_ops): Ditto.
11561 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11562 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11563 to linux_target_ops.
11564 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11565 reply packet.
11566 * server.c (main): Recognize 'Z' and 'z' packets.
11567
11568 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11569
11570 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11571 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11572 (the_low_target): Add new members.
11573
11574 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11575
11576 * proc-service.c (ps_lgetregs): Search all_processes instead of
11577 all_threads.
11578
11579 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11580
11581 * server.c (start_inferior): Change return type to int.
11582 (attach_inferior): Change sigptr to int *.
11583 (handle_v_cont, handle_v_requests): Change signal to int *.
11584 (main): Change signal to int.
11585
11586 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11587
11588 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11589 * configure.srv: Add m32r*-*-linux*.
11590 * linux-m32r-low.c: New file.
11591
11592 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11593
11594 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11595
11596 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11597
11598 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11599 Take unsigned long arguments for PIDs.
11600 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11601 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11602 (wait_for_sigstop, linux_resume_one_process)
11603 (regsets_fetch_inferior_registers, linux_send_signal)
11604 (linux_read_auxv): Likewise. Update the types of variables holding
11605 PIDs. Update format string specifiers.
11606 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11607 * remote-utils.c (prepare_resume_reply): Likewise.
11608 * server.c (cont_thread, general_thread, step_thread)
11609 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11610 unsigned long.
11611 (handle_query): Update format specifiers.
11612 (handle_v_cont, main): Use strtoul for thread IDs.
11613 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11614 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11615 (general_thread, step_thread, thread_from_wait)
11616 (old_thread_from_wait): Update.
11617 * target.h (struct thread_resume): Use unsigned long for THREAD.
11618 (struct target_ops): Use unsigned long for arguments to attach and
11619 thread_alive.
11620
11621 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11622
11623 * acinclude.m4: Include bfd/bfd.m4 directly.
11624 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11625 <agriffis@toolchain.org>.
11626 * aclocal.m4, configure: Regenerated.
11627
11628 2005-01-07 Andrew Cagney <cagney@gnu.org>
11629
11630 * configure.ac: Rename configure.in, require autoconf 2.59.
11631 * configure: Re-generate.
11632
11633 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11634
11635 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11636 LIBS when finished.
11637 * aclocal.m4: Regenerated.
11638 * configure: Regenerated.
11639
11640 2004-11-21 Andreas Schwab <schwab@suse.de>
11641
11642 * linux-m68k-low.c (m68k_num_gregs): Define.
11643 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11644 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11645 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11646 (m68k_breakpoint_at): New. Add to the_low_target.
11647
11648 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11649 srv_linux_thread_db to yes.
11650
11651 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11652
11653 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11654 (ARCH_SET_FS): Likewise.
11655 (ARCH_GET_FS): Likewise.
11656 (ARCH_GET_GS): Likewise.
11657
11658 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11659
11660 * linux-i386-low.c (ps_get_thread_area): New.
11661 * linux-x86-64-low.c (ps_get_thread_area): New.
11662 * linux-low.c: Include <sys/syscall.h>.
11663 (linux_kill_one_process): Don't kill the first thread here.
11664 (linux_kill): Kill the first thread here.
11665 (kill_lwp): New function.
11666 (send_sigstop, linux_send_signal): Use it.
11667 * proc-service.c: Clean up #ifdefs.
11668 (fpregset_info): Delete.
11669 (ps_lgetregs): Update and enable implementation.
11670 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11671 implementations.
11672 * remote-utils.c (struct sym_cache, symbol_cache): New.
11673 (input_interrupt): Print a clearer message.
11674 (async_io_enabled): New variable.
11675 (enable_async_io, disable_async_io): Use it. Update comments.
11676 (look_up_one_symbol): Use the symbol cache.
11677 * thread-db.c (thread_db_look_up_symbols): New function.
11678 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11679
11680 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11681
11682 * configure.in: Test for -rdynamic.
11683 * configure: Regenerated.
11684 * Makefile (INTERNAL_LDFLAGS): New.
11685 (gdbserver, gdbreplay): Use it.
11686
11687 2004-09-02 Andrew Cagney <cagney@gnu.org>
11688
11689 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11690
11691 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11692
11693 * linux-low.c (linux_wait): Clear all_processes list also.
11694
11695 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11696
11697 * linux-low.c: Include <errno.h>. Remove extern declaration of
11698 errno.
11699
11700 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11701
11702 * gdbreplay.c, server.h, utils.c: Update copyright years.
11703
11704 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11705
11706 * server.c (main): Print child status or termination signal from
11707 variable 'signal', not 'sig'.
11708
11709 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11710
11711 * linux-low.c (linux_read_memory): Change return type to
11712 int. Check for and return error from ptrace().
11713 * target.c (read_inferior_memory): Change return type to int. Pass
11714 back return status from the_target->read_memory().
11715 * target.h (struct target_ops): Adapt *read_memory() prototype.
11716 Update comment.
11717 (read_inferior_memory): Adapt prototype.
11718 * server.c (main): Return an error packet if
11719 read_inferior_memory() returns an error.
11720
11721 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11722
11723 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11724 Unify with other clean targets.
11725
11726 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11727
11728 * server.c (handle_v_cont): Call set_desired_inferior.
11729
11730 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11731
11732 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11733
11734 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11735
11736 * linux-low.c (linux_wait): Unblock async I/O.
11737 (linux_resume): Block and enable async I/O.
11738 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11739 * server.h (block_async_io, unblock_async_io): Add prototypes.
11740
11741 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11742
11743 * remote-utils.c (remote_open): Print a status notice after
11744 opening a TCP port.
11745 * server.c (attach_inferior): Print a status notice after
11746 attaching.
11747
11748 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11749
11750 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11751
11752 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11753
11754 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11755 error packet.
11756 * server.c, target.h: Update copyright years.
11757
11758 2004-02-25 Roland McGrath <roland@redhat.com>
11759
11760 * target.h (struct target_ops): New member `read_auxv'.
11761 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11762 * linux-low.c (linux_read_auxv): New function.
11763 (linux_target_ops): Initialize `read_auxv' member to that.
11764
11765 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11766
11767 Committed by Jim Blandy <jimb@redhat.com>.
11768
11769 * linux-s390-low.c (s390_num_regs): Update.
11770 (s390_regmap): Remove control registers. Use __s390x__ predefine
11771 instead of GPR_SIZE to distiguish s390 and s390x targets.
11772
11773 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11774
11775 * linux-low.c: Update copyright year.
11776 (check_removed_breakpoint): Clear pending_is_breakpoint.
11777 (linux_set_resume_request, linux_queue_one_thread)
11778 (resume_status_pending_p): New functions.
11779 (linux_continue_one_thread): Use process->resume.
11780 (linux_resume): Only resume threads if there are no pending events.
11781 * linux-low.h (struct process_info): Add resume request
11782 pointer.
11783
11784 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11785
11786 * regcache.c (new_register_cache): Clear the allocated register
11787 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11788
11789 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11790
11791 * linux-low.c (linux_resume): Take a struct thread_resume *
11792 argument.
11793 (linux_wait): Update call.
11794 (resume_ptr): New static variable.
11795 (linux_continue_one_thread): Renamed from
11796 linux_continue_one_process. Use resume_ptr.
11797 (linux_resume): Use linux_continue_one_thread.
11798 * server.c (handle_v_cont, handle_v_requests): New functions.
11799 (myresume): New function.
11800 (main): Handle 'v' case.
11801 * target.h (struct thread_resume): New type.
11802 (struct target_ops): Change argument of "resume" to struct
11803 thread_resume *.
11804 (myresume): Delete macro.
11805
11806 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11807
11808 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11809 (uninstall): Support DESTDIR.
11810
11811 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11812
11813 * configure.srv: Add xscale*linux copy of arm*linux entry.
11814
11815 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11816
11817 * linux-arm-low.c (arm_reinsert_addr): New function.
11818 (the_low_target): Add arm_reinsert_addr.
11819
11820 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11821
11822 * mem-break.c: Remove whitespace at end of file.
11823
11824 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11825
11826 * configure.in: Check whether we need to prototype strerror.
11827 * server.h: Optionally prototype strerror.
11828 * gdbreplay.c (perror_with_name): Use strerror.
11829 * linux-low.c (linux_attach_lwp): Use strerror.
11830 * utils.c (perror_with_name): Use strerror.
11831 * config.in, configure: Regenerated.
11832
11833 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11834
11835 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11836 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11837
11838 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11839
11840 * Makefile.in (SFILES): Update.
11841 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11842 low-sun3.c: Remove files.
11843
11844 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11845
11846 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11847 (linux_detach_one_process, linux_detach): New functions.
11848 (linux_target_ops): Add linux_detach.
11849 * server.c (main): Handle 'D' packet.
11850 * target.h (struct target_ops): Add "detach" member.
11851 (detach_inferior): Define.
11852
11853 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11854
11855 From Kelley Cook <kelleycook@wideopenwest.com>:
11856 * configure.srv: Accept i[34567]86 variants.
11857
11858 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11859
11860 * linux-low.c (linux_wait_for_event): Correct comment typos.
11861 (linux_resume_one_process): Call check_removed_breakpoint.
11862 (linux_send_signal): New function.
11863 (linux_target_ops): Add linux_send_signal.
11864 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11865 of kill.
11866 * target.h (struct target_ops): Add send_signal.
11867
11868 2003-05-29 Jim Blandy <jimb@redhat.com>
11869
11870 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11871 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11872 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11873 away part of the register's value.
11874
11875 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11876
11877 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11878 (linux_wait_for_event, linux_init_signals): Likewise.
11879
11880 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11881
11882 * configure.in: Check for stdlib.h.
11883 * configure: Regenerated.
11884 * config.in: Regenerated.
11885
11886 2003-01-04 Andreas Schwab <schwab@suse.de>
11887
11888 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11889
11890 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11891
11892 * Makefile.in: Remove obsolete code.
11893
11894 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11895
11896 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11897 defined(PT_FPR0_HI).
11898
11899 2002-11-17 Stuart Hughes <seh@zee2.com>
11900
11901 * linux-arm-low.c (arm_num_regs): Increase.
11902 (arm_regmap): Include status register.
11903
11904 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11905
11906 * linux-low.c (register_addr): Remove incorrect -1 check.
11907
11908 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11909
11910 * linux-low.c (linux_create_inferior): Call setpgid. Return
11911 the new PID.
11912 (unstopped_p, linux_signal_pid): Remove.
11913 (linux_target_ops): Remove linux_signal_pid.
11914 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11915 global instead of target method.
11916 * target.h (struct target_ops): Remove signal_pid. Update comment
11917 for create_inferior.
11918 * server.c (signal_pid): New variable.
11919 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11920 gdbserver. Set the child to be the foreground process group.
11921 (attach_inferior): Set signal_pid.
11922
11923 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11924
11925 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11926
11927 2002-08-20 Jim Blandy <jimb@redhat.com>
11928
11929 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11930 default for this.
11931
11932 2002-08-01 Andrew Cagney <cagney@redhat.com>
11933
11934 * Makefile.in: Make chill references obsolete.
11935
11936 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11937
11938 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11939 * configure: Regenerate.
11940 * config.in: Regenerate.
11941
11942 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11943
11944 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11945 (perror_with_name, remote_close, remote_open, expect, play): Static.
11946
11947 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11948
11949 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11950 byte offsets instead of an array of indexes.
11951 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11952
11953 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11954
11955 * regcache.c: Add comment.
11956
11957 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11958
11959 * thread-db.c: New file.
11960 * proc-service.c: New file.
11961 * acinclude.m4: New file.
11962 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11963 proc-service.o, and thread-db.o.
11964 (linux-low.o): Add USE_THREAD_DB.
11965 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11966 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11967 * aclocal.m4: Regenerated.
11968 * config.in: Regenerated.
11969 * configure: Regenerated.
11970 * configure.in: Check for proc_service.h, sys/procfs.h,
11971 thread_db.h, and linux/elf.h headrs.
11972 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11973 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11974 Check for -lthread_db and thread support.
11975 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11976 PowerPC, and SuperH.
11977 * i387-fp.c: Constify arguments.
11978 * i387-fp.h: Likewise.
11979 * inferiors.c: (struct thread_info): Renamed from
11980 `struct inferior_info'. Remove PID member. Use generic inferior
11981 list header. All uses updated.
11982 (inferiors, signal_pid): Removed.
11983 (all_threads): New variable.
11984 (get_thread): Define.
11985 (add_inferior_to_list): New function.
11986 (for_each_inferior): New function.
11987 (change_inferior_id): New function.
11988 (add_inferior): Removed.
11989 (remove_inferior): New function.
11990 (add_thread): New function.
11991 (free_one_thread): New function.
11992 (remove_thread): New function.
11993 (clear_inferiors): Use for_each_inferior and free_one_thread.
11994 (find_inferior): New function.
11995 (find_inferior_id): New function.
11996 (inferior_target_data): Update argument type.
11997 (set_inferior_target_data): Likewise.
11998 (inferior_regcache_data): Likewise.
11999 (set_inferior_regcache_data): Likewise.
12000 * linux-low.c (linux_bp_reinsert): Remove.
12001 (all_processes, stopping_threads, using_thrads)
12002 (struct pending_signals, debug_threads, pid_of): New.
12003 (inferior_pid): Replace with macro.
12004 (struct inferior_linux_data): Remove.
12005 (get_stop_pc, add_process): New functions.
12006 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12007 Use add_process and add_thread.
12008 (linux_attach_lwp): New function, based on old linux_attach. Use
12009 add_process and add_thread. Set stop_expected for new threads.
12010 (linux_attach): New function.
12011 (linux_kill_one_process): New function.
12012 (linux_kill): Kill all LWPs.
12013 (linux_thread_alive): Use find_inferior_id.
12014 (check_removed_breakpoints, status_pending_p): New functions.
12015 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12016 Update. Use WNOHANG. Wait for cloned processes also. Update process
12017 struct for the found process.
12018 (linux_wait_for_event): New function.
12019 (linux_wait): Use it. Support LWPs.
12020 (send_sigstop, wait_for_sigstop, stop_all_processes)
12021 (linux_resume_one_process, linux_continue_one_process): New functions.
12022 (linux_resume): Support LWPs.
12023 (REGISTER_RAW_SIZE): Remove.
12024 (fetch_register): Use register_size instead. Call supply_register.
12025 (usr_store_inferior_registers): Likewise. Call collect_register.
12026 Fix recursive case.
12027 (regsets_fetch_inferior_registers): Improve error message.
12028 (regsets_store_inferior_registers): Add debugging.
12029 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12030 (unstopped_p, linux_signal_pid): New functions.
12031 (linux_target_ops): Add linux_signal_pid.
12032 (linux_init_signals): New function.
12033 (initialize_low): Call it. Initialize using_threads.
12034 * regcache.c (inferior_regcache_data): Add valid
12035 flag.
12036 (get_regcache): Fetch registers lazily. Add fetch argument
12037 and update all callers.
12038 (regcache_invalidate_one, regcache_invalidate): New
12039 functions.
12040 (new_register_cache): Renamed from create_register_cache.
12041 Return the new regcache.
12042 (free_register_cache): Change argument to a void *.
12043 (registers_to_string, registers_from_string): Call get_regcache
12044 with fetch flag set.
12045 (register_data): Make static. Pass fetch flag to get_regcache.
12046 (supply_register): Call get_regcache with fetch flag clear.
12047 (collect_register): Call get_regcache with fetch flag set.
12048 (collect_register_as_string): New function.
12049 * regcache.h: Update.
12050 * remote-utils.c (putpkt): Flush after debug output and use
12051 stderr.
12052 Handle input interrupts while waiting for an ACK.
12053 (input_interrupt): Use signal_pid method.
12054 (getpkt): Flush after debug output and use stderr.
12055 (outreg): Use collect_register_as_string.
12056 (new_thread_notify, dead_thread_notify): New functions.
12057 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12058 and general_thread.
12059 (look_up_one_symbol): Flush after debug output.
12060 * server.c (step_thread, server_waiting): New variables.
12061 (start_inferior): Don't use signal_pid. Update call to mywait.
12062 (attach_inferior): Update call to mywait.
12063 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12064 (main): Don't fetch/store registers explicitly. Use
12065 set_desired_inferior. Support proposed ``Hs'' packet. Update
12066 calls to mywait.
12067 * server.h: Update.
12068 (struct inferior_list, struct_inferior_list_entry): New.
12069 * target.c (set_desired_inferior): New.
12070 (write_inferior_memory): Constify.
12071 (mywait): New function.
12072 * target.h: Update.
12073 (struct target_ops): New signal_pid method.
12074 (mywait): Removed macro, added prototype.
12075
12076 * linux-low.h (regset_func): Removed.
12077 (regset_fill_func, regset_store_func): New.
12078 (enum regset_type): New.
12079 (struct regset_info): Add type field. Use new operation types.
12080 (struct linux_target_ops): stop_pc renamed to get_pc.
12081 Add decr_pc_after_break and breakpoint_at.
12082 (get_process, get_thread_proess, get_process_thread)
12083 (strut process_info, all_processes, linux_attach_lwp)
12084 (thread_db_init): New.
12085
12086 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12087 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12088 (the_low_target): Add new members.
12089 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12090 (i386_store_fpxregset): Constify.
12091 (target_regsets): Add new kind identifier.
12092 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12093 (i386_set_pc): Add debugging.
12094 (i386_breakpoint_at): New function.
12095 (the_low_target): Add new members.
12096 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12097 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12098 (mips_breakpoint_at): New.
12099 (the_low_target): Add new members.
12100 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12101 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12102 (the_low_target): Add new members.
12103 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12104 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12105 (the_low_target): Add new members.
12106 * linux-x86-64-low.c (target_regsets): Add new kind
12107 identifier.
12108
12109 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12110
12111 From Martin Pool <mbp@samba.org>:
12112 * server.c (gdbserver_usage): New function.
12113 (main): Call it.
12114
12115 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12116
12117 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12118 stop_at -> stop_pc.
12119
12120 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12121
12122 * Makefile.in: Remove obsolete code.
12123
12124 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12125
12126 * linux-low.c (regsets_fetch_inferior_registers),
12127 (regsets_store_inferior_registers): Removed cast to int from
12128 ptrace() calls.
12129 * regcache.h: Added declaration of struct inferior_info.
12130
12131 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12132
12133 * inferiors.c (struct inferior_info): Add regcache_data.
12134 (add_inferior): Call create_register_cache.
12135 (clear_inferiors): Call free_register_cache.
12136 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12137 * regcache.c (struct inferior_regcache_data): New.
12138 (registers): Remove.
12139 (get_regcache): New function.
12140 (create_register_cache, free_register_cache): New functions.
12141 (set_register_cache): Don't initialize the register cache here.
12142 (registers_to_string, registers_from_string, register_data): Call
12143 get_regcache.
12144 * regcache.h: Add prototypes.
12145 * server.h: Likewise.
12146
12147 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12148
12149 * mem-break.c: New file.
12150 * mem-break.h: New file.
12151 * Makefile.in: Add mem-break.o rule; update server.h
12152 dependencies.
12153 * inferiors.c (struct inferior_info): Add target_data
12154 member.
12155 (clear_inferiors): Free target_data member if set.
12156 (inferior_target_data, set_inferior_target_data): New functions.
12157 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12158 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12159 * linux-low.c (linux_bp_reinsert): New variable.
12160 (struct inferior_linux_data): New.
12161 (linux_create_inferior): Use set_inferior_target_data.
12162 (linux_attach): Likewise. Call add_inferior.
12163 (linux_wait_for_one_inferior): New function.
12164 (linux_wait): Call it.
12165 (linux_write_memory): Add const.
12166 (initialize_low): Call set_breakpoint_data.
12167 * linux-low.h (struct linux_target_ops): Add breakpoint
12168 handling members.
12169 * server.c (attach_inferior): Remove extra add_inferior
12170 call.
12171 * server.h: Include mem-break.h. Update inferior.c
12172 prototypes.
12173 * target.c (read_inferior_memory)
12174 (write_inferior_memory): New functions.
12175 * target.h (read_inferior_memory)
12176 (write_inferior_memory): Change macros to prototypes.
12177 (struct target_ops): Update comments. Add const to write_memory
12178 definition.
12179
12180 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12181
12182 * linux-low.c (usr_store_inferior_registers): Support
12183 registers which are allowed to fail to store.
12184 * linux-low.h (linux_target_ops): Likewise.
12185 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12186 (ppc_cannot_store_register): FPSCR may not be storable.
12187
12188 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12189
12190 * server.h: Include <string.h> if HAVE_STRING_H.
12191 * ChangeLog: Correct paths in last ChangeLog entry.
12192
12193 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12194
12195 * linux-low.h: Remove obsolete prototypes.
12196 (struct linux_target_ops): New.
12197 (extern the_low_target): New.
12198 * linux-low.c (num_regs, regmap): Remove declarations.
12199 (register_addr): Use the_low_target explicitly.
12200 (fetch_register): Likewise.
12201 (usr_fetch_inferior_registers): Likewise.
12202 (usr_store_inferior_registers): Likewise.
12203 * linux-arm-low.c (num_regs): Remove.
12204 (arm_num_regs): Define.
12205 (arm_regmap): Renamed from regmap, made static.
12206 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12207 made static.
12208 (arm_cannot_store_register): Renamed from cannot_store_register,
12209 made static.
12210 (the_low_target): New.
12211 * linux-i386-low.c (num_regs): Remove.
12212 (i386_num_regs): Define.
12213 (i386_regmap): Renamed from regmap, made static.
12214 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12215 made static.
12216 (i386_cannot_store_register): Renamed from cannot_store_register,
12217 made static.
12218 (the_low_target): New.
12219 * linux-ia64-low.c (num_regs): Remove.
12220 (ia64_num_regs): Define.
12221 (ia64_regmap): Renamed from regmap, made static.
12222 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12223 made static.
12224 (ia64_cannot_store_register): Renamed from cannot_store_register,
12225 made static.
12226 (the_low_target): New.
12227 * linux-m68k-low.c (num_regs): Remove.
12228 (m68k_num_regs): Define.
12229 (m68k_regmap): Renamed from regmap, made static.
12230 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12231 made static.
12232 (m68k_cannot_store_register): Renamed from cannot_store_register,
12233 made static.
12234 (the_low_target): New.
12235 * linux-mips-low.c (num_regs): Remove.
12236 (mips_num_regs): Define.
12237 (mips_regmap): Renamed from regmap, made static.
12238 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12239 made static.
12240 (mips_cannot_store_register): Renamed from cannot_store_register,
12241 made static.
12242 (the_low_target): New.
12243 * linux-ppc-low.c (num_regs): Remove.
12244 (ppc_num_regs): Define.
12245 (ppc_regmap): Renamed from regmap, made static.
12246 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12247 made static.
12248 (ppc_cannot_store_register): Renamed from cannot_store_register,
12249 made static.
12250 (the_low_target): New.
12251 * linux-s390-low.c (num_regs): Remove.
12252 (s390_num_regs): Define.
12253 (s390_regmap): Renamed from regmap, made static.
12254 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12255 made static.
12256 (s390_cannot_store_register): Renamed from cannot_store_register,
12257 made static.
12258 (the_low_target): New.
12259 * linux-sh-low.c (num_regs): Remove.
12260 (sh_num_regs): Define.
12261 (sh_regmap): Renamed from regmap, made static.
12262 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12263 made static.
12264 (sh_cannot_store_register): Renamed from cannot_store_register,
12265 made static.
12266 (the_low_target): New.
12267 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12268 (the_low_target): New.
12269
12270 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12271
12272 * Makefile.in: Add stamp-h target.
12273 * configure.in: Create stamp-h.
12274 * configure: Regenerated.
12275
12276 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12277
12278 * inferiors.c: New file.
12279 * target.c: New file.
12280 * target.h: New file.
12281 * Makefile.in: Add target.o and inferiors.o. Update
12282 dependencies.
12283 * linux-low.c (inferior_pid): New static variable,
12284 moved from server.c.
12285 (linux_create_inferior): Renamed from create_inferior.
12286 Call add_inferior. Return 0 on success instead of a PID.
12287 (linux_attach): Renamed from myattach.
12288 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12289 (linux_thread_alive): Renamed from mythread_alive.
12290 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12291 child dies.
12292 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12293 (regsets_store_inferior_registers): Correct error message.
12294 Add missing ``return 0''.
12295 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12296 (linux_store_registers): Renamed from store_inferior_registers.
12297 (linux_read_memory): Renamed from read_inferior_memory.
12298 (linux_write_memory): Renamed from write_inferior_memory.
12299 (linux_target_ops): New structure.
12300 (initialize_low): Call set_target_ops ().
12301 * remote-utils.c (unhexify): New function.
12302 (hexify): New function.
12303 (input_interrupt): Send signals to ``signal_pid''.
12304 * server.c (inferior_pid): Remove.
12305 (start_inferior): Update create_inferior call.
12306 (attach_inferior): Call add_inferior.
12307 (handle_query): New function.
12308 (main): Call handle_query for `q' packets.
12309 * server.h: Include "target.h". Remove obsolete prototypes.
12310 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12311
12312 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12313
12314 * Makefile.in: Add WARN_CFLAGS. Update configury
12315 dependencies.
12316 * configure.in: Check for <string.h>
12317 * configure: Regenerate.
12318 * config.in: Regenerate.
12319 * gdbreplay.c: Include needed system headers.
12320 (remote_open): Remove strchr prototype.
12321 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12322 * regcache.c (supply_register): Change buf argument to const void *.
12323 (supply_register_by_name): Likewise.
12324 (collect_register): Change buf argument to void *.
12325 (collect_register_by_name): Likewise.
12326 * regcache.h: Add missing prototypes.
12327 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12328 * server.c (handle_query): New function.
12329 (attached): New static variable, moved out of main.
12330 (main): Quiet longjmp clobber warnings.
12331 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12332 * utils.c (error): Remove NORETURN.
12333 (fatal): Likewise.
This page took 0.290471 seconds and 4 git commands to generate.