Shorten long lines in linux-aarch64-low.c
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-09-30 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4 (emit_load_store_pair): Likewise.
5
6 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7
8 * dll.c (match_dll): Add cast(s).
9 (unloaded_dll): Likewise.
10 * linux-low.c (second_thread_of_pid_p): Likewise.
11 (delete_lwp_callback): Likewise.
12 (count_events_callback): Likewise.
13 (select_event_lwp_callback): Likewise.
14 (linux_set_resume_request): Likewise.
15 * server.c (accumulate_file_name_length): Likewise.
16 (emit_dll_description): Likewise.
17 (handle_qxfer_threads_worker): Likewise.
18 (visit_actioned_threads): Likewise.
19 * thread-db.c (any_thread_of): Likewise.
20 * tracepoint.c (same_process_p): Likewise.
21 (match_blocktype): Likewise.
22 (build_traceframe_info_xml): Likewise.
23
24 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
25
26 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
27 assignment.
28 (gdb_unparse_agent_expr): Likewise.
29 * hostio.c (require_data): Likewise.
30 (handle_pread): Likewise.
31 * linux-low.c (disable_regset): Likewise.
32 (fetch_register): Likewise.
33 (store_register): Likewise.
34 (get_dynamic): Likewise.
35 (linux_qxfer_libraries_svr4): Likewise.
36 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
37 (set_fast_tracepoint_jump): Likewise.
38 (uninsert_fast_tracepoint_jumps_at): Likewise.
39 (reinsert_fast_tracepoint_jumps_at): Likewise.
40 (validate_inserted_breakpoint): Likewise.
41 (clone_agent_expr): Likewise.
42 * regcache.c (init_register_cache): Likewise.
43 * remote-utils.c (putpkt_binary_1): Likewise.
44 (decode_M_packet): Likewise.
45 (decode_X_packet): Likewise.
46 (look_up_one_symbol): Likewise.
47 (relocate_instruction): Likewise.
48 (monitor_output): Likewise.
49 * server.c (handle_search_memory): Likewise.
50 (handle_qxfer_exec_file): Likewise.
51 (handle_qxfer_libraries): Likewise.
52 (handle_qxfer): Likewise.
53 (handle_query): Likewise.
54 (handle_v_cont): Likewise.
55 (handle_v_run): Likewise.
56 (captured_main): Likewise.
57 * target.c (write_inferior_memory): Likewise.
58 * thread-db.c (try_thread_db_load_from_dir): Likewise.
59 * tracepoint.c (init_trace_buffer): Likewise.
60 (add_tracepoint_action): Likewise.
61 (add_traceframe): Likewise.
62 (add_traceframe_block): Likewise.
63 (cmd_qtdpsrc): Likewise.
64 (cmd_qtdv): Likewise.
65 (cmd_qtstatus): Likewise.
66 (response_source): Likewise.
67 (response_tsv): Likewise.
68 (cmd_qtnotes): Likewise.
69 (gdb_collect): Likewise.
70 (initialize_tracepoint): Likewise.
71
72 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
73
74 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
75 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
76 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
77 <NOP>: New.
78 (enum aarch64_condition_codes): New enum.
79 (w0): New static global.
80 (fp): Likewise.
81 (lr): Likewise.
82 (struct aarch64_memory_operand) <type>: New
83 MEMORY_OPERAND_POSTINDEX type.
84 (postindex_memory_operand): New helper function.
85 (emit_ret): New function.
86 (emit_load_store_pair): New function, factored out of emit_stp
87 with support for MEMORY_OPERAND_POSTINDEX.
88 (emit_stp): Rewrite using emit_load_store_pair.
89 (emit_ldp): New function.
90 (emit_load_store): Likewise.
91 (emit_ldr): Mention post-index instruction in comment.
92 (emit_ldrh): New function.
93 (emit_ldrb): New function.
94 (emit_ldrsw): Mention post-index instruction in comment.
95 (emit_str): Likewise.
96 (emit_subs): New function.
97 (emit_cmp): Likewise.
98 (emit_and): Likewise.
99 (emit_orr): Likewise.
100 (emit_orn): Likewise.
101 (emit_eor): Likewise.
102 (emit_mvn): Likewise.
103 (emit_lslv): Likewise.
104 (emit_lsrv): Likewise.
105 (emit_asrv): Likewise.
106 (emit_mul): Likewise.
107 (emit_sbfm): Likewise.
108 (emit_sbfx): Likewise.
109 (emit_ubfm): Likewise.
110 (emit_ubfx): Likewise.
111 (emit_csinc): Likewise.
112 (emit_cset): Likewise.
113 (emit_nop): Likewise.
114 (emit_ops_insns): New helper function.
115 (emit_pop): Likewise.
116 (emit_push): Likewise.
117 (aarch64_emit_prologue): New function.
118 (aarch64_emit_epilogue): Likewise.
119 (aarch64_emit_add): Likewise.
120 (aarch64_emit_sub): Likewise.
121 (aarch64_emit_mul): Likewise.
122 (aarch64_emit_lsh): Likewise.
123 (aarch64_emit_rsh_signed): Likewise.
124 (aarch64_emit_rsh_unsigned): Likewise.
125 (aarch64_emit_ext): Likewise.
126 (aarch64_emit_log_not): Likewise.
127 (aarch64_emit_bit_and): Likewise.
128 (aarch64_emit_bit_or): Likewise.
129 (aarch64_emit_bit_xor): Likewise.
130 (aarch64_emit_bit_not): Likewise.
131 (aarch64_emit_equal): Likewise.
132 (aarch64_emit_less_signed): Likewise.
133 (aarch64_emit_less_unsigned): Likewise.
134 (aarch64_emit_ref): Likewise.
135 (aarch64_emit_if_goto): Likewise.
136 (aarch64_emit_goto): Likewise.
137 (aarch64_write_goto_address): Likewise.
138 (aarch64_emit_const): Likewise.
139 (aarch64_emit_call): Likewise.
140 (aarch64_emit_reg): Likewise.
141 (aarch64_emit_pop): Likewise.
142 (aarch64_emit_stack_flush): Likewise.
143 (aarch64_emit_zero_ext): Likewise.
144 (aarch64_emit_swap): Likewise.
145 (aarch64_emit_stack_adjust): Likewise.
146 (aarch64_emit_int_call_1): Likewise.
147 (aarch64_emit_void_call_2): Likewise.
148 (aarch64_emit_eq_goto): Likewise.
149 (aarch64_emit_ne_goto): Likewise.
150 (aarch64_emit_lt_goto): Likewise.
151 (aarch64_emit_le_goto): Likewise.
152 (aarch64_emit_gt_goto): Likewise.
153 (aarch64_emit_ge_got): Likewise.
154 (aarch64_emit_ops_impl): New static global variable.
155 (aarch64_emit_ops): New target function, return
156 &aarch64_emit_ops_impl.
157 (struct linux_target_ops): Install it.
158
159 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
160
161 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
162 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
163 aarch64-ipa.o.
164 * linux-aarch64-ipa.c: New file.
165 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
166 and endian.h.
167 (aarch64_get_thread_area): New target method.
168 (extract_signed_bitfield): New helper function.
169 (aarch64_decode_ldr_literal): New function.
170 (enum aarch64_opcodes): New enum.
171 (struct aarch64_register): New struct.
172 (struct aarch64_operand): New struct.
173 (x0): New static global.
174 (x1): Likewise.
175 (x2): Likewise.
176 (x3): Likewise.
177 (x4): Likewise.
178 (w2): Likewise.
179 (ip0): Likewise.
180 (sp): Likewise.
181 (xzr): Likewise.
182 (aarch64_register): New helper function.
183 (register_operand): Likewise.
184 (immediate_operand): Likewise.
185 (struct aarch64_memory_operand): New struct.
186 (offset_memory_operand): New helper function.
187 (preindex_memory_operand): Likewise.
188 (enum aarch64_system_control_registers): New enum.
189 (ENCODE): New macro.
190 (emit_insn): New helper function.
191 (emit_b): New function.
192 (emit_bcond): Likewise.
193 (emit_cb): Likewise.
194 (emit_tb): Likewise.
195 (emit_blr): Likewise.
196 (emit_stp): Likewise.
197 (emit_ldp_q_offset): Likewise.
198 (emit_stp_q_offset): Likewise.
199 (emit_load_store): Likewise.
200 (emit_ldr): Likewise.
201 (emit_ldrsw): Likewise.
202 (emit_str): Likewise.
203 (emit_ldaxr): Likewise.
204 (emit_stxr): Likewise.
205 (emit_stlr): Likewise.
206 (emit_data_processing_reg): Likewise.
207 (emit_data_processing): Likewise.
208 (emit_add): Likewise.
209 (emit_sub): Likewise.
210 (emit_mov): Likewise.
211 (emit_movk): Likewise.
212 (emit_mov_addr): Likewise.
213 (emit_mrs): Likewise.
214 (emit_msr): Likewise.
215 (emit_sevl): Likewise.
216 (emit_wfe): Likewise.
217 (append_insns): Likewise.
218 (can_encode_int32_in): New helper function.
219 (aarch64_relocate_instruction): New function.
220 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
221 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
222 (struct linux_target_ops): Install aarch64_get_thread_area,
223 aarch64_install_fast_tracepoint_jump_pad and
224 aarch64_get_min_fast_tracepoint_insn_len.
225
226 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
227
228 * Makefile.in (aarch64-insn.o): New rule.
229 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
230
231 2015-09-21 Yao Qi <yao.qi@linaro.org>
232
233 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
234
235 2015-09-21 Yao Qi <yao.qi@linaro.org>
236
237 * tracepoint.c (max_jump_pad_size): Remove.
238
239 2015-09-18 Yao Qi <yao.qi@linaro.org>
240
241 * linux-aarch64-low.c: Don't include sys/uio.h.
242 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
243
244 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
245
246 * tracepoint.c (eval_result_type): Change prototype.
247 (condition_true_at_tracepoint): Fix argument to compiled_cond.
248
249 2015-09-15 Pedro Alves <palves@redhat.com>
250
251 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
252 Check whether to report exec events instead of checking whether
253 multiprocess is enabled.
254
255 2015-09-15 Pedro Alves <palves@redhat.com>
256
257 PR remote/18965
258 * remote-utils.c (prepare_resume_reply): Merge
259 TARGET_WAITKIND_VFORK_DONE switch case with the
260 TARGET_WAITKIND_FORKED case.
261
262 2015-09-15 Yao Qi <yao.qi@linaro.org>
263
264 * server.c (handle_query): Check string comparison using
265 "else if" instead of "if".
266
267 2015-09-15 Yao Qi <yao.qi@linaro.org>
268
269 * server.c (vCont_supported): New global variable.
270 (handle_query): Set vCont_supported to 1 if "vContSupported+"
271 matches. Append ";vContSupported+" to own_buf.
272 (handle_v_requests): Append ";s;S" to own_buf if target supports
273 hardware single step or vCont_supported is false.
274 (capture_main): Set vCont_supported to zero.
275
276 2015-09-15 Yao Qi <yao.qi@linaro.org>
277
278 * linux-low.c (linux_supports_conditional_breakpoints): Rename
279 it to ...
280 (linux_supports_hardware_single_step): ... New function.
281 (linux_target_ops): Update.
282 * lynx-low.c (lynx_target_ops): Set field
283 supports_hardware_single_step to target_can_do_hardware_single_step.
284 * nto-low.c (nto_target_ops): Likewise.
285 * spu-low.c (spu_target_ops): Likewise.
286 * win32-low.c (win32_target_ops): Likewise.
287 * target.c (target_can_do_hardware_single_step): New function.
288 * target.h (struct target_ops) <supports_conditional_breakpoints>:
289 Remove. <supports_hardware_single_step>: New field.
290 (target_supports_conditional_breakpoints): Remove.
291 (target_supports_hardware_single_step): New macro.
292 (target_can_do_hardware_single_step): Declare.
293 * server.c (handle_query): Use target_supports_hardware_single_step
294 instead of target_supports_conditional_breakpoints.
295
296 2015-09-15 Yao Qi <yao.qi@linaro.org>
297
298 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
299 function.
300 (struct linux_target_ops the_low_target): Install
301 aarch64_linux_siginfo_fixup.
302
303 2015-09-11 Don Breazeal <donb@codesourcery.com>
304 Luis Machado <lgustavo@codesourcery.com>
305
306 * linux-low.c (linux_mourn): Static declaration.
307 (linux_arch_setup): Move in front of
308 handle_extended_wait.
309 (linux_arch_setup_thread): New function.
310 (handle_extended_wait): Handle exec events. Call
311 linux_arch_setup_thread. Make event_lwp argument a
312 pointer-to-a-pointer.
313 (check_zombie_leaders): Do not check stopped threads.
314 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
315 (linux_low_filter_event): Add lwp and thread for exec'ing
316 non-leader thread if leader thread has been deleted.
317 Refactor code into linux_arch_setup_thread and call it.
318 Pass child lwp pointer by reference to handle_extended_wait.
319 (linux_wait_for_event_filtered): Update comment.
320 (linux_wait_1): Prevent clobbering exec event status.
321 (linux_supports_exec_events): New function.
322 (linux_target_ops) <supports_exec_events>: Initialize new member.
323 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
324 new member.
325 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
326 * server.c (report_exec_events): New global variable.
327 (handle_query): Handle qSupported query for exec-events feature.
328 (captured_main): Initialize report_exec_events.
329 * server.h (report_exec_events): Declare new global variable.
330 * target.h (struct target_ops) <supports_exec_events>: New
331 member.
332 (target_supports_exec_events): New macro.
333 * win32-low.c (win32_target_ops) <supports_exec_events>:
334 Initialize new member.
335
336 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
337
338 * linux-low.c (linux_low_enable_btrace): Remove.
339 (linux_target_ops): Replace linux_low_enable_btrace with
340 linux_enable_btrace.
341
342 2015-09-03 Yao Qi <yao.qi@linaro.org>
343
344 * linux-aarch64-low.c (aarch64_insert_point): Call
345 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
346 returns true.
347
348 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
349
350 * linux-low.c (check_stopped_by_breakpoint): Use
351 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
352
353 2015-08-27 Pedro Alves <palves@redhat.com>
354
355 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
356
357 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
358
359 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
360 the XNEW-family equivalent.
361 (compile_bytecodes): Likewise.
362 * dll.c (loaded_dll): Likewise.
363 * event-loop.c (append_callback_event): Likewise.
364 (create_file_handler): Likewise.
365 (create_file_event): Likewise.
366 * hostio.c (handle_open): Likewise.
367 * inferiors.c (add_thread): Likewise.
368 (add_process): Likewise.
369 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
370 * linux-arm-low.c (arm_new_process): Likewise.
371 (arm_new_thread): Likewise.
372 * linux-low.c (add_to_pid_list): Likewise.
373 (linux_add_process): Likewise.
374 (handle_extended_wait): Likewise.
375 (add_lwp): Likewise.
376 (enqueue_one_deferred_signal): Likewise.
377 (enqueue_pending_signal): Likewise.
378 (linux_resume_one_lwp_throw): Likewise.
379 (linux_resume_one_thread): Likewise.
380 (linux_read_memory): Likewise.
381 (linux_write_memory): Likewise.
382 * linux-mips-low.c (mips_linux_new_process): Likewise.
383 (mips_linux_new_thread): Likewise.
384 (mips_add_watchpoint): Likewise.
385 * linux-x86-low.c (initialize_low_arch): Likewise.
386 * lynx-low.c (lynx_add_process): Likewise.
387 * mem-break.c (set_raw_breakpoint_at): Likewise.
388 (set_breakpoint): Likewise.
389 (add_condition_to_breakpoint): Likewise.
390 (add_commands_to_breakpoint): Likewise.
391 (clone_agent_expr): Likewise.
392 (clone_one_breakpoint): Likewise.
393 * regcache.c (new_register_cache): Likewise.
394 * remote-utils.c (look_up_one_symbol): Likewise.
395 * server.c (queue_stop_reply): Likewise.
396 (start_inferior): Likewise.
397 (queue_stop_reply_callback): Likewise.
398 (handle_target_event): Likewise.
399 * spu-low.c (fetch_ppc_memory): Likewise.
400 (store_ppc_memory): Likewise.
401 * target.c (set_target_ops): Likewise.
402 * thread-db.c (thread_db_load_search): Likewise.
403 (try_thread_db_load_1): Likewise.
404 * tracepoint.c (add_tracepoint): Likewise.
405 (add_tracepoint_action): Likewise.
406 (create_trace_state_variable): Likewise.
407 (cmd_qtdpsrc): Likewise.
408 (cmd_qtro): Likewise.
409 (add_while_stepping_state): Likewise.
410 * win32-low.c (child_add_thread): Likewise.
411 (get_image_name): Likewise.
412
413 2015-08-25 Yao Qi <yao.qi@linaro.org>
414
415 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
416
417 2015-08-25 Yao Qi <yao.qi@linaro.org>
418
419 * Makefile.in (aarch64-linux.o): New rule.
420 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
421 srv_tgtobj.
422 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
423 (aarch64_init_debug_reg_state): Make it extern.
424 (aarch64_linux_prepare_to_resume): Remove.
425
426 2015-08-25 Yao Qi <yao.qi@linaro.org>
427
428 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
429 lwp_arch_private_info and ptid_of_lwp.
430
431 2015-08-25 Yao Qi <yao.qi@linaro.org>
432
433 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
434 Find proc_info by find_process_pid. All callers updated.
435
436 2015-08-25 Yao Qi <yao.qi@linaro.org>
437
438 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
439 Remove.
440 (debug_reg_change_callback): Remove.
441 (aarch64_notify_debug_reg_change): Remove.
442
443 2015-08-25 Yao Qi <yao.qi@linaro.org>
444
445 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
446 Call current_lwp_ptid.
447
448 2015-08-25 Yao Qi <yao.qi@linaro.org>
449
450 * linux-aarch64-low.c (debug_reg_change_callback): Use
451 debug_printf.
452
453 2015-08-25 Yao Qi <yao.qi@linaro.org>
454
455 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
456
457 2015-08-25 Yao Qi <yao.qi@linaro.org>
458
459 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
460
461 2015-08-25 Yao Qi <yao.qi@linaro.org>
462
463 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
464 the code.
465
466 2015-08-25 Yao Qi <yao.qi@linaro.org>
467
468 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
469 Remove.
470 (debug_reg_change_callback): Remove argument entry and add argument
471 lwp. Remove local variable thread. Don't print thread id in the
472 debugging output. Don't check whether pid of thread equals to pid.
473 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
474 iterate_over_lwps instead find_inferior.
475
476 2015-08-24 Pedro Alves <palves@redhat.com>
477
478 * inferiors.c (get_first_process): New function.
479 * inferiors.h (get_first_process): New declaration.
480 * remote-utils.c (read_ptid): Default to the first process in the
481 list, instead of to the current thread's process.
482
483 2015-08-24 Pedro Alves <palves@redhat.com>
484
485 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
486 * event-loop.c: Likewise.
487 * remote-utils.c: Likewise.
488 * tracepoint.c: Likewise.
489
490 2015-08-24 Pedro Alves <palves@redhat.com>
491
492 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
493 ptid_get_lwp.
494
495 2015-08-21 Pedro Alves <palves@redhat.com>
496
497 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
498 instead of literal 1.
499
500 2015-08-21 Pedro Alves <palves@redhat.com>
501
502 * tdesc.c (default_description): Explicitly zero-initialize.
503
504 2015-08-21 Pedro Alves <palves@redhat.com>
505
506 PR gdb/18749
507 * inferiors.c (remove_thread): Discard any pending stop reply for
508 this thread.
509 * server.c (remove_all_on_match_pid): Rename to ...
510 (remove_all_on_match_ptid): ... this. Work with a filter ptid
511 instead of a pid.
512 (discard_queued_stop_replies): Change parameter to a ptid. Now
513 extern.
514 (handle_v_kill, kill_inferior_callback, captured_main)
515 (process_serial_event): Adjust.
516 * server.h (discard_queued_stop_replies): Declare.
517
518 2015-08-21 Pedro Alves <palves@redhat.com>
519
520 * linux-low.c (wait_for_sigstop): Always switch to no thread
521 selected if the previously current thread dies.
522 * lynx-low.c (lynx_request_interrupt): Use the first thread's
523 process instead of the current thread's.
524 * remote-utils.c (input_interrupt): Don't check if there's no
525 current thread.
526 * server.c (gdb_read_memory, gdb_write_memory): If setting the
527 current thread to the general thread fails, error out.
528 (handle_qxfer_auxv, handle_qxfer_libraries)
529 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
530 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
531 (handle_query): Check if there's a thread selected instead of
532 checking whether there's any thread in the thread list.
533 (handle_qxfer_threads, handle_qxfer_btrace)
534 (handle_qxfer_btrace_conf): Don't error out early if there's no
535 thread in the thread list.
536 (handle_v_cont, myresume): Don't set the current thread to the
537 continue thread.
538 (process_serial_event) <Hg handling>: Also set thread_id if the
539 previous general thread is still alive.
540 (process_serial_event) <g/G handling>: If setting the current
541 thread to the general thread fails, error out.
542 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
543 thread's lwp instead of the current thread's.
544 * target.c (set_desired_thread): If the desired thread was not
545 found, leave the current thread pointing to NULL. Return an int
546 (boolean) indicating success.
547 * target.h (set_desired_thread): Change return type to int.
548
549 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
550
551 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
552 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
553 #includes.
554 (ps_get_thread_area): New function.
555
556 2015-08-19 Gary Benson <gbenson@redhat.com>
557
558 * hostio.c (handle_pread): Do not attempt to read more data
559 than hostio_reply_with_data can fit in a packet.
560
561 2015-08-18 Joel Brobecker <brobecker@adacore.com>
562
563 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
564
565 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
566
567 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
568
569 2015-08-06 Pedro Alves <palves@redhat.com>
570
571 * tracepoint.c (expr_eval_result): Now an int.
572
573 2015-08-06 Pedro Alves <palves@redhat.com>
574
575 * gdbthread.h (struct regcache): Forward declare.
576 (struct thread_info) <regcache_data>: Now a struct regcache
577 pointer.
578 * inferiors.c (inferior_regcache_data)
579 (set_inferior_regcache_data): Now work with struct regcache
580 pointers.
581 * inferiors.h (struct regcache): Forward declare.
582 (inferior_regcache_data, set_inferior_regcache_data): Now work
583 with struct regcache pointers.
584 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
585 (free_register_cache_thread): Remove struct regcache pointer
586 casts.
587
588 2015-08-06 Pedro Alves <palves@redhat.com>
589
590 * server.c (captured_main): On error, print the exception message
591 to stderr, and if run_once is set, throw a quit.
592
593 2015-08-06 Pedro Alves <palves@redhat.com>
594
595 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
596 the current thread.
597
598 2015-08-06 Pedro Alves <palves@redhat.com>
599
600 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
601 reading beyond the passed in buffer length.
602
603 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
604
605 * tracepoint.c (symbol_list) <required>: Remove.
606
607 2015-08-06 Pedro Alves <palves@redhat.com>
608
609 * linux-low.c (handle_extended_wait): Set the fork child's suspend
610 count if stopping and suspending threads.
611 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
612 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
613 (linux_detach): Complete an ongoing step-over.
614 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
615 throughout.
616 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
617 (linux_wait_1): If passing a signal to the inferior after
618 finishing a step-over, unsuspend and re-resume all lwps. If we
619 see a single-step event but the thread should be continuing, don't
620 pass the trap to gdb.
621 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
622 internal_error instead of gdb_assert.
623 (enqueue_pending_signal): New function.
624 (check_ptrace_stopped_lwp_gone): Add debug output.
625 (start_step_over): Use internal_error instead of gdb_assert.
626 (complete_ongoing_step_over): New function.
627 (linux_resume_one_thread): Don't resume a suspended thread.
628 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
629 it stepping.
630
631 2015-08-06 Pedro Alves <palves@redhat.com>
632
633 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
634 (linux_thread_alive): Use lwp_is_marked_dead.
635 (extended_event_reported): Delete.
636 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
637 instead of extended_event_reported.
638 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
639 as well.
640 (lwp_is_marked_dead): New function.
641 (lwp_running): Use lwp_is_marked_dead.
642 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
643 comment.
644
645 2015-08-06 Pedro Alves <palves@redhat.com>
646
647 * linux-low.c (linux_wait_1): Move fork event output out of the
648 !report_to_gdb check. Pass event_child->waitstatus to
649 target_waitstatus_to_string instead of ourstatus.
650
651 2015-08-04 Yao Qi <yao.qi@linaro.org>
652
653 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
654 if current_thread is 32 bit.
655
656 2015-08-04 Yao Qi <yao.qi@linaro.org>
657
658 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
659 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
660 * server.c (extended_protocol): Remove "static".
661 * server.h (extended_protocol): Declare it.
662
663 2015-08-04 Yao Qi <yao.qi@linaro.org>
664
665 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
666 both aarch64 and aarch32.
667 (aarch64_set_pc): Likewise.
668
669 2015-08-04 Yao Qi <yao.qi@linaro.org>
670
671 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
672 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
673 arm-with-neon.xml to srv_xmlfiles.
674 * linux-aarch64-low.c: Include linux-aarch32-low.h.
675 (is_64bit_tdesc): New function.
676 (aarch64_linux_read_description): New function.
677 (aarch64_arch_setup): Call aarch64_linux_read_description.
678 (regs_info): Rename to regs_info_aarch64.
679 (aarch64_regs_info): Return right regs_info.
680 (initialize_low_arch): Call initialize_low_arch_aarch32.
681
682 2015-08-04 Yao Qi <yao.qi@linaro.org>
683
684 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
685 * linux-aarch32-low.c: New file.
686 * linux-aarch32-low.h: New file.
687 * linux-arm-low.c (arm_fill_gregset): Move it to
688 linux-aarch32-low.c.
689 (arm_store_gregset): Likewise.
690 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
691 (arm_store_vfpregset): Call arm_store_vfpregset_num.
692 (arm_arch_setup): Check if PTRACE_GETREGSET works.
693 (regs_info): Rename to regs_info_arm.
694 (arm_regs_info): Return regs_info_aarch32 if
695 have_ptrace_getregset is 1 and target description is
696 arm_with_neon or arm_with_vfpv3.
697 (initialize_low_arch): Don't call init_registers_arm_with_neon.
698 Call initialize_low_arch_aarch32 instead.
699
700 2015-08-04 Yao Qi <yao.qi@linaro.org>
701
702 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
703 * linux-low.c: ... here.
704 * linux-low.h (have_ptrace_getregset): Declare it.
705
706 2015-08-04 Pedro Alves <palves@redhat.com>
707
708 * thread-db.c (struct thread_db): Use new typedefs.
709 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
710 CHK calls.
711 (disable_thread_event_reporting): Cast result of dlsym to
712 destination function pointer type.
713 (thread_db_mourn): Use td_ta_delete_ftype.
714
715 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
716
717 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
718 arch variant.
719 (CDX_BREAKPOINT): Define for R2.
720 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
721 (the_low_target): Add comments.
722
723 2015-07-30 Yao Qi <yao.qi@linaro.org>
724
725 * linux-arm-low.c (arm_hwcap): Remove it.
726 (arm_read_description): New local variable arm_hwcap. Don't
727 set arm_hwcap to zero.
728
729 2015-07-30 Yao Qi <yao.qi@linaro.org>
730
731 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
732 Use regcache->tdesc instead.
733 (arm_store_wmmxregset): Likewise.
734 (arm_fill_vfpregset): Likewise.
735 (arm_store_vfpregset): Likewise.
736
737 2015-07-30 Yao Qi <yao.qi@linaro.org>
738
739 * linux-arm-low.c: Include arch/arm.h.
740 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
741 (arm_store_gregset): Likewise.
742
743 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
744
745 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
746 ptrace's 4th parameter.
747
748 2015-07-27 Yao Qi <yao.qi@linaro.org>
749
750 * configure.srv (case aarch64*-*-linux*): Don't set
751 srv_linux_usrregs.
752
753 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
754
755 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
756 sys/ptrace.h.
757 * linux-arm-low.c: Likewise.
758 * linux-cris-low.c: Likewise.
759 * linux-crisv32-low.c: Likewise.
760 * linux-low.c: Likewise.
761 * linux-m68k-low.c: Likewise.
762 * linux-mips-low.c: Likewise.
763 * linux-nios2-low.c: Likewise.
764 * linux-s390-low.c: Likewise.
765 * linux-sparc-low.c: Likewise.
766 * linux-tic6x-low.c: Likewise.
767 * linux-tile-low.c: Likewise.
768 * linux-x86-low.c: Likewise.
769
770 2015-07-24 Pedro Alves <palves@redhat.com>
771
772 * config.in: Regenerate.
773 * configure: Regenerate.
774
775 2015-07-24 Pedro Alves <palves@redhat.com>
776
777 * acinclude.m4: Include ../ptrace.m4.
778 * configure.ac: Call GDB_AC_PTRACE.
779 * config.in, configure: Regenerate.
780
781 2015-07-24 Yao Qi <yao.qi@linaro.org>
782
783 * linux-low.c (linux_create_inferior): Remove setting to
784 proc->priv->new_inferior.
785 (linux_attach): Likewise.
786 (linux_low_filter_event): Likewise.
787 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
788
789 2015-07-24 Yao Qi <yao.qi@linaro.org>
790
791 * linux-low.c (linux_arch_setup): New function.
792 (linux_low_filter_event): If proc->tdesc is NULL and
793 proc->attached is true, call the_low_target.arch_setup.
794 Otherwise, keep status pending, and return.
795 (linux_resume_one_lwp_throw): Don't call get_pc if
796 thread->while_stepping isn't NULL. Don't call
797 get_thread_regcache if proc->tdesc is NULL.
798 (need_step_over_p): Return 0 if proc->tdesc is NULL.
799 (linux_target_ops): Install arch_setup.
800 * server.c (start_inferior): Call the_target->arch_setup.
801 * target.h (struct target_ops) <arch_setup>: New field.
802 (target_arch_setup): New marco.
803 * lynx-low.c (lynx_target_ops): Update.
804 * nto-low.c (nto_target_ops): Update.
805 * spu-low.c (spu_target_ops): Update.
806 * win32-low.c (win32_target_ops): Update.
807
808 2015-07-24 Yao Qi <yao.qi@linaro.org>
809
810 * linux-low.c (linux_add_process): Don't set
811 proc->priv->new_inferior.
812 (linux_create_inferior): Set proc->priv->new_inferior to 1.
813 (linux_attach): Likewise.
814
815 2015-07-24 Yao Qi <yao.qi@linaro.org>
816
817 * server.c (start_inferior): Code refactor.
818
819 2015-07-24 Yao Qi <yao.qi@linaro.org>
820
821 * server.c (process_serial_event): Set general_thread.
822
823 2015-07-21 Yao Qi <yao.qi@linaro.org>
824
825 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
826 aarch64_linux_get_debug_reg_capacity.
827
828 2015-07-17 Yao Qi <yao.qi@linaro.org>
829
830 * Makefile.in (aarch64-linux-hw-point.o): New rule.
831 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
832 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
833 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
834 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
835 (AARCH64_HWP_ALIGNMENT): Likewise.
836 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
837 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
838 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
839 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
840 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
841 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
842 (struct aarch64_debug_reg_state): Likewise.
843 (struct arch_lwp_info): Likewise.
844 (aarch64_align_watchpoint): Likewise.
845 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
846 (aarch64_watchpoint_length): Likewise.
847 (aarch64_point_encode_ctrl_reg): Likewise
848 (aarch64_point_is_aligned): Likewise.
849 (aarch64_align_watchpoint): Likewise.
850 (aarch64_linux_set_debug_regs):
851 (aarch64_dr_state_insert_one_point): Likewise.
852 (aarch64_dr_state_remove_one_point): Likewise.
853 (aarch64_handle_breakpoint): Likewise.
854 (aarch64_handle_aligned_watchpoint): Likewise.
855 (aarch64_handle_unaligned_watchpoint): Likewise.
856 (aarch64_handle_watchpoint): Likewise.
857
858 2015-07-17 Yao Qi <yao.qi@linaro.org>
859
860 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
861 and don't aarch64_get_debug_reg_state. All callers update.
862 (aarch64_handle_aligned_watchpoint): Likewise.
863 (aarch64_handle_unaligned_watchpoint): Likewise.
864 (aarch64_handle_watchpoint): Likewise.
865 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
866 (aarch64_remove_point): Likewise.
867
868 2015-07-17 Yao Qi <yao.qi@linaro.org>
869
870 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
871 debug_printf.
872 (aarch64_handle_unaligned_watchpoint): Likewise.
873
874 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
875
876 Revert the previous 3 commits:
877 Move gdb_regex* to common/
878 Move linux_find_memory_regions_full & co.
879 gdbserver build-id attribute generator
880
881 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
882 Jan Kratochvil <jan.kratochvil@redhat.com>
883
884 gdbserver build-id attribute generator.
885 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
886 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
887 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
888 (find_phdr): New.
889 (get_dynamic): Use find_pdhr to traverse program headers.
890 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
891 (compare_mapping_entry_range, struct find_memory_region_callback_data)
892 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
893 (get_hex_build_id): New.
894 (linux_qxfer_libraries_svr4): Add optional build-id attribute
895 to reply XML document.
896
897 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
898 Jan Kratochvil <jan.kratochvil@redhat.com>
899
900 * target.c: Include target/target-utils.h and fcntl.h.
901 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
902 (target_fileio_read_stralloc): New functions.
903
904 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
905
906 * Makefile.in (OBS): Add gdb_regex.o.
907 (gdb_regex.o): New.
908 * config.in: Rebuilt.
909 * configure: Rebuilt.
910
911 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
912 Jan Kratochvil <jan.kratochvil@redhat.com>
913
914 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
915 * Makefile.in (OBS): Add target-utils.o.
916 (linux-maps.o, target-utils.o): New.
917 * configure.srv (srv_linux_obj): Add linux-maps.o.
918
919 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
920
921 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
922 function, return 1.
923 (the_low_target): Install it.
924
925 2015-07-14 Pedro Alves <palves@redhat.com>
926
927 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
928 Instead, ignore ECHILD, and throw an error for other errnos.
929
930 2015-07-10 Pedro Alves <palves@redhat.com>
931
932 * event-loop.c (struct callback_event) <data>: Change type to
933 gdb_client_data instance instead of gdb_client_data pointer.
934 (append_callback_event): Adjust.
935
936 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
937
938 * linux-aarch64-low.c: Add comments for each linux_target_ops
939 method. Remove comments already covered in target_ops and
940 linux_target_ops definitions.
941 (the_low_target): Add comments for each unimplemented method.
942
943 2015-07-09 Yao Qi <yao.qi@linaro.org>
944
945 * linux-aarch64-low.c (aarch64_regmap): Remove.
946 (aarch64_usrregs_info): Remove.
947 (regs_info): Set field usrregs to NULL.
948
949 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
950
951 * linux-low.c: Include "rsp-low.h"
952 (linux_low_encode_pt_config, linux_low_encode_raw): New.
953 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
954 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
955 (handle_btrace_enable_pt): New.
956 (handle_btrace_general_set): Support "pt".
957 (handle_btrace_conf_general_set): Support "pt:size".
958
959 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
960
961 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
962 Z_PACKET_SW_BP.
963
964 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
965
966 * linux-aarch64-low.c: Remove comment about endianness.
967 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
968 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
969 memcmp.
970
971 2015-06-24 Gary Benson <gbenson@redhat.com>
972
973 * linux-i386-ipa.c (stdint.h): Do not include.
974 * lynx-i386-low.c (stdint.h): Likewise.
975 * lynx-ppc-low.c (stdint.h): Likewise.
976 * mem-break.c (stdint.h): Likewise.
977 * thread-db.c (stdint.h): Likewise.
978 * tracepoint.c (stdint.h): Likewise.
979 * win32-low.c (stdint.h): Likewise.
980
981 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
982
983 * server.c (write_qxfer_response): Update call to
984 remote_escape_output.
985
986 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
987 Jan Kratochvil <jan.kratochvil@redhat.com>
988
989 Merge multiple hex conversions.
990 * gdbreplay.c (tohex): Rename to 'fromhex'.
991 (logchar): Use fromhex.
992
993 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
994
995 * server.c (handle_qxfer_libraries): Set `version' attribute for
996 <library-list>.
997
998 2015-06-10 Gary Benson <gbenson@redhat.com>
999
1000 * target.h (struct target_ops) <multifs_open>: New field.
1001 <multifs_unlink>: Likewise.
1002 <multifs_readlink>: Likewise.
1003 * linux-low.c (nat/linux-namespaces.h): New include.
1004 (linux_target_ops): Initialize the_target->multifs_open,
1005 the_target->multifs_unlink and the_target->multifs_readlink.
1006 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1007 * hostio.c (hostio_fs_pid): New static variable.
1008 (hostio_handle_new_gdb_connection): New function.
1009 (handle_setfs): Likewise.
1010 (handle_open): Use the_target->multifs_open as appropriate.
1011 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1012 (handle_readlink): Use the_target->multifs_readlink as
1013 appropriate.
1014 (handle_vFile): Handle vFile:setfs packets.
1015 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1016 after target_handle_new_gdb_connection.
1017
1018 2015-06-10 Gary Benson <gbenson@redhat.com>
1019
1020 * configure.ac (AC_CHECK_FUNCS): Add setns.
1021 * config.in: Regenerate.
1022 * configure: Likewise.
1023 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1024 (linux-namespaces.o): New rule.
1025 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1026
1027 2015-06-09 Gary Benson <gbenson@redhat.com>
1028
1029 * hostio.c (handle_open): Process mode argument with
1030 fileio_to_host_mode.
1031
1032 2015-06-01 Yao Qi <yao.qi@linaro.org>
1033
1034 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1035 * linux-x86-low.c: Likewise.
1036
1037 2015-05-28 Don Breazeal <donb@codesourcery.com>
1038
1039 * linux-low.c (handle_extended_wait): Initialize
1040 thread_info.last_resume_kind for new fork children.
1041
1042 2015-05-15 Pedro Alves <palves@redhat.com>
1043
1044 * target.h (target_handle_new_gdb_connection): Rewrite using if
1045 wrapped in do/while.
1046
1047 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1048
1049 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1050 * configure, config.in: Regenerate.
1051 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1052 Declare typedef.
1053
1054 2015-05-12 Don Breazeal <donb@codesourcery.com>
1055
1056 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1057 PTRACE_EVENT_VFORK_DONE.
1058 (linux_low_ptrace_options, extended_event_reported): Add vfork
1059 events.
1060 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1061 and "vforkdone" for RSP 'T' Stop Reply Packet.
1062 * server.h (report_vfork_events): Declare
1063 global variable.
1064
1065 2015-05-12 Don Breazeal <donb@codesourcery.com>
1066
1067 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1068 (the_low_target) <new_fork>: Initialize new member.
1069 * linux-arm-low.c (arm_new_fork): New function.
1070 (the_low_target) <new_fork>: Initialize new member.
1071 * linux-low.c (handle_extended_wait): Call new target function
1072 new_fork.
1073 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1074 * linux-mips-low.c (mips_add_watchpoint): New function
1075 extracted from mips_insert_point.
1076 (the_low_target) <new_fork>: Initialize new member.
1077 (mips_linux_new_fork): New function.
1078 (mips_insert_point): Call mips_add_watchpoint.
1079 * linux-x86-low.c (x86_linux_new_fork): New function.
1080 (the_low_target) <new_fork>: Initialize new member.
1081
1082 2015-05-12 Don Breazeal <donb@codesourcery.com>
1083
1084 * linux-low.c (handle_extended_wait): Implement return value,
1085 rename argument 'event_child' to 'event_lwp', handle
1086 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1087 (linux_low_ptrace_options): New function.
1088 (linux_low_filter_event): Call linux_low_ptrace_options,
1089 use different argument fo linux_enable_event_reporting,
1090 use return value from handle_extended_wait.
1091 (extended_event_reported): New function.
1092 (linux_wait_1): Call extended_event_reported and set
1093 status to report fork events.
1094 (linux_write_memory): Add pid to debug message.
1095 (reset_lwp_ptrace_options_callback): New function.
1096 (linux_handle_new_gdb_connection): New function.
1097 (linux_target_ops): Initialize new structure member.
1098 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1099 * lynx-low.c: Initialize new structure member.
1100 * remote-utils.c (prepare_resume_reply): Implement stop reason
1101 "fork" for "T" stop message.
1102 * server.c (handle_query): Call handle_new_gdb_connection.
1103 * server.h (report_fork_events): Declare global flag.
1104 * target.h (struct target_ops) <handle_new_gdb_connection>:
1105 New member.
1106 (target_handle_new_gdb_connection): New macro.
1107 * win32-low.c: Initialize new structure member.
1108
1109 2015-05-12 Don Breazeal <donb@codesourcery.com>
1110
1111 * mem-break.c (APPEND_TO_LIST): Define macro.
1112 (clone_agent_expr): New function.
1113 (clone_one_breakpoint): New function.
1114 (clone_all_breakpoints): New function.
1115 * mem-break.h: Declare new functions.
1116
1117 2015-05-12 Don Breazeal <donb@codesourcery.com>
1118
1119 * linux-low.c (linux_supports_fork_events): New function.
1120 (linux_supports_vfork_events): New function.
1121 (linux_target_ops): Initialize new structure members.
1122 (initialize_low): Call linux_check_ptrace_features.
1123 * lynx-low.c (lynx_target_ops): Initialize new structure
1124 members.
1125 * server.c (report_fork_events, report_vfork_events):
1126 New global flags.
1127 (handle_query): Add new features to qSupported packet and
1128 response.
1129 (captured_main): Initialize new global variables.
1130 * target.h (struct target_ops) <supports_fork_events>:
1131 New member.
1132 <supports_vfork_events>: New member.
1133 (target_supports_fork_events): New macro.
1134 (target_supports_vfork_events): New macro.
1135 * win32-low.c (win32_target_ops): Initialize new structure
1136 members.
1137
1138 2015-05-12 Gary Benson <gbenson@redhat.com>
1139
1140 * server.c (handle_qxfer_exec_file): Use current process
1141 if annex is empty.
1142
1143 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1144
1145 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1146 Remove HAVE_PTRACE_GETREGS conditionals.
1147 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1148 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1149
1150 2015-05-08 Yao Qi <yao.qi@linaro.org>
1151
1152 * linux-low.c (linux_supports_conditional_breakpoints): New
1153 function.
1154 (linux_target_ops): Install new target method.
1155 * lynx-low.c (lynx_target_ops): Install NULL hook for
1156 supports_conditional_breakpoints.
1157 * nto-low.c (nto_target_ops): Likewise.
1158 * spu-low.c (spu_target_ops): Likewise.
1159 * win32-low.c (win32_target_ops): Likewise.
1160 * server.c (handle_query): Check
1161 target_supports_conditional_breakpoints.
1162 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1163 New field.
1164 (target_supports_conditional_breakpoints): New macro.
1165
1166 2015-05-06 Pedro Alves <palves@redhat.com>
1167
1168 PR server/18081
1169 * server.c (start_inferior): If the process exits, mourn it.
1170
1171 2015-04-21 Gary Benson <gbenson@redhat.com>
1172
1173 * hostio.c (fileio_open_flags_to_host): Factored out to
1174 fileio_to_host_openflags in common/fileio.c. Single use
1175 updated.
1176
1177 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1178
1179 * linux-xtensa-low.c (xtensa_fill_gregset)
1180 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1181 XCHAL_HAVE_LOOP.
1182
1183 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1184
1185 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1186 (regs_info): Replace usrregs pointer with NULL.
1187
1188 2015-04-17 Gary Benson <gbenson@redhat.com>
1189
1190 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1191 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1192 * server.c (handle_qxfer_exec_file): New function.
1193 (qxfer_packets): Add exec-file entry.
1194 (handle_query): Report qXfer:exec-file:read as supported packet.
1195
1196 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1197
1198 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1199
1200 2015-04-09 Gary Benson <gbenson@redhat.com>
1201
1202 * hostio-errno.c (errno_to_fileio_error): Remove function.
1203 Update caller to use remote_fileio_to_fio_error.
1204
1205 2015-04-09 Yao Qi <yao.qi@linaro.org>
1206
1207 * linux-low.c (linux_insert_point): Call
1208 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1209 (linux_remove_point): Call remove_memory_breakpoint if type is
1210 raw_bkpt_type_sw.
1211 * linux-x86-low.c (x86_insert_point): Don't call
1212 insert_memory_breakpoint.
1213 (x86_remove_point): Don't call remove_memory_breakpoint.
1214
1215 2015-04-01 Pedro Alves <palves@redhat.com>
1216 Cleber Rosa <crosa@redhat.com>
1217
1218 * server.c (gdbserver_usage): Reorganize and extend the usage
1219 message.
1220
1221 2015-03-24 Pedro Alves <palves@redhat.com>
1222
1223 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1224 output. Also dump TRAP_TRACE.
1225 (linux_low_filter_event): In debug output, distinguish a
1226 resume_stop SIGSTOP from a delayed SIGSTOP.
1227
1228 2015-03-24 Gary Benson <gbenson@redhat.com>
1229
1230 * linux-x86-low.c (x86_linux_new_thread): Moved to
1231 nat/x86-linux.c.
1232 (x86_linux_prepare_to_resume): Likewise.
1233
1234 2015-03-24 Gary Benson <gbenson@redhat.com>
1235
1236 * Makefile.in (x86-linux-dregs.o): New rule.
1237 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1238 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1239 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1240 (x86_linux_dr_get): Likewise.
1241 (x86_linux_dr_set): Likewise.
1242 (update_debug_registers_callback): Likewise.
1243 (x86_linux_dr_set_addr): Likewise.
1244 (x86_linux_dr_get_addr): Likewise.
1245 (x86_linux_dr_set_control): Likewise.
1246 (x86_linux_dr_get_control): Likewise.
1247 (x86_linux_dr_get_status): Likewise.
1248 (x86_linux_update_debug_registers): Likewise.
1249
1250 2015-03-24 Gary Benson <gbenson@redhat.com>
1251
1252 * linux-x86-low.c (x86_linux_update_debug_registers):
1253 New function, factored out from...
1254 (x86_linux_prepare_to_resume): ...this.
1255
1256 2015-03-24 Gary Benson <gbenson@redhat.com>
1257
1258 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1259 (x86_linux_dr_set): Likewise.
1260 (update_debug_registers_callback): Likewise.
1261 (x86_linux_dr_set_addr): Likewise.
1262 (x86_linux_dr_get_addr): Likewise.
1263 (x86_linux_dr_set_control): Likewise.
1264 (x86_linux_dr_get_control): Likewise.
1265 (x86_linux_dr_get_status): Likewise.
1266 (x86_linux_prepare_to_resume): Likewise.
1267
1268 2015-03-24 Gary Benson <gbenson@redhat.com>
1269
1270 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1271 Use perror_with_name. Pass string through gettext.
1272 (x86_linux_dr_set): Likewise.
1273
1274 2015-03-24 Gary Benson <gbenson@redhat.com>
1275
1276 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1277 (x86_linux_dr_set_addr): ...this.
1278 (x86_dr_low_get_addr): Rename to...
1279 (x86_linux_dr_get_addr): ...this.
1280 (x86_dr_low_set_control): Rename to...
1281 (x86_linux_dr_set_control): ...this.
1282 (x86_dr_low_get_control): Rename to...
1283 (x86_linux_dr_get_control): ...this.
1284 (x86_dr_low_get_status): Rename to...
1285 (x86_linux_dr_get_status): ...this.
1286 (x86_dr_low): Update with new function names.
1287
1288 2015-03-24 Gary Benson <gbenson@redhat.com>
1289
1290 * Makefile.in (x86-linux.o): New rule.
1291 * configure.srv: Add x86-linux.o to relevant targets.
1292 * linux-low.c (lwp_set_arch_private_info): New function.
1293 (lwp_arch_private_info): Likewise.
1294 * linux-x86-low.c: Include nat/x86-linux.h.
1295 (arch_lwp_info): Removed structure.
1296 (update_debug_registers_callback):
1297 Use lwp_set_debug_registers_changed.
1298 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1299 and lwp_set_debug_registers_changed.
1300 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1301
1302 2015-03-24 Gary Benson <gbenson@redhat.com>
1303
1304 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1305 * linux-arm-low.c (arm_new_thread): Likewise.
1306 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1307 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1308 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1309 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1310
1311 2015-03-24 Gary Benson <gbenson@redhat.com>
1312
1313 * linux-low.c (ptid_of_lwp): New function.
1314 (lwp_is_stopped): Likewise.
1315 (lwp_stop_reason): Likewise.
1316 * linux-x86-low.c (update_debug_registers_callback):
1317 Use lwp_is_stopped.
1318 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1319 lwp_stop_reason.
1320
1321 2015-03-24 Gary Benson <gbenson@redhat.com>
1322
1323 * linux-low.h (linux_stop_lwp): Remove declaration.
1324
1325 2015-03-24 Gary Benson <gbenson@redhat.com>
1326
1327 * linux-low.h: Include nat/linux-nat.h.
1328 * linux-low.c (iterate_over_lwps_args): New structure.
1329 (iterate_over_lwps_filter): New function.
1330 (iterate_over_lwps): Likewise.
1331 * linux-x86-low.c (update_debug_registers_callback):
1332 Update signature to what iterate_over_lwps expects.
1333 Remove PID check that iterate_over_lwps now performs.
1334 (x86_dr_low_set_addr): Use iterate_over_lwps.
1335 (x86_dr_low_set_control): Likewise.
1336
1337 2015-03-24 Gary Benson <gbenson@redhat.com>
1338
1339 * linux-x86-low.c (x86_debug_reg_state): New function.
1340 (x86_linux_prepare_to_resume): Use the above.
1341
1342 2015-03-24 Gary Benson <gbenson@redhat.com>
1343
1344 * linux-low.c (current_lwp_ptid): New function.
1345 * linux-x86-low.c: Include nat/linux-nat.h.
1346 (x86_dr_low_get_addr): Use current_lwp_ptid.
1347 (x86_dr_low_get_control): Likewise.
1348 (x86_dr_low_get_status): Likewise.
1349
1350 2015-03-20 Pedro Alves <palves@redhat.com>
1351
1352 * tracepoint.c (cmd_qtstatus): Make "str" const.
1353
1354 2015-03-20 Pedro Alves <palves@redhat.com>
1355
1356 * server.c (handle_general_set): Make "req_str" const.
1357
1358 2015-03-19 Pedro Alves <palves@redhat.com>
1359
1360 * linux-low.c (linux_resume_one_lwp): Rename to ...
1361 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1362 instead call perror_with_name.
1363 (check_ptrace_stopped_lwp_gone): New function.
1364 (linux_resume_one_lwp): Reimplement as wrapper around
1365 linux_resume_one_lwp_throw that swallows errors if the LWP is
1366 gone.
1367
1368 2015-03-19 Pedro Alves <palves@redhat.com>
1369
1370 * linux-low.c (count_events_callback, select_event_lwp_callback):
1371 No longer check whether the thread has resume_stop as last resume
1372 kind.
1373
1374 2015-03-19 Pedro Alves <palves@redhat.com>
1375
1376 * linux-low.c (count_events_callback, select_event_lwp_callback):
1377 Use the lwp's status_pending_p field, not the thread's.
1378
1379 2015-03-19 Pedro Alves <palves@redhat.com>
1380
1381 * linux-low.c (select_event_lwp_callback): Update comments to
1382 no longer mention SIGTRAP.
1383
1384 2015-03-18 Gary Benson <gbenson@redhat.com>
1385
1386 * server.c (handle_query): Do not report vFile:fstat as supported.
1387
1388 2015-03-11 Gary Benson <gbenson@redhat.com>
1389
1390 * hostio.c (sys/types.h): New include.
1391 (sys/stat.h): Likewise.
1392 (common-remote-fileio.h): Likewise.
1393 (handle_fstat): New function.
1394 (handle_vFile): Handle vFile:fstat packets.
1395
1396 2015-03-11 Gary Benson <gbenson@redhat.com>
1397
1398 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1399 struct stat.st_blocks and struct stat.st_blksize.
1400 * configure: Regenerate.
1401 * config.in: Likewise.
1402 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1403 (OBS): Add common-remote-fileio.o.
1404 (common-remote-fileio.o): New rule.
1405
1406 2015-03-09 Pedro Alves <palves@redhat.com>
1407
1408 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1409 'struct sockaddr' pointer in 'accept' call.
1410
1411 2015-03-09 Pedro Alves <palves@redhat.com>
1412
1413 Revert:
1414 2015-03-07 Pedro Alves <palves@redhat.com>
1415 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1416 or <winsock2.h> here. Instead include "gdb_socket.h".
1417 (remote_open): Use union gdb_sockaddr_u.
1418 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1419 or <winsock2.h> here. Instead include "gdb_socket.h".
1420 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1421 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1422 or <sys/un.h>.
1423 (init_named_socket, gdb_agent_helper_thread): Use union
1424 gdb_sockaddr_u.
1425
1426 2015-03-07 Pedro Alves <palves@redhat.com>
1427
1428 * configure.ac (build_warnings): Move
1429 -Wdeclaration-after-statement to the C-specific set.
1430 * configure: Regenerate.
1431
1432 2015-03-07 Pedro Alves <palves@redhat.com>
1433
1434 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1435 or <winsock2.h> here. Instead include "gdb_socket.h".
1436 (remote_open): Use union gdb_sockaddr_u.
1437 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1438 or <winsock2.h> here. Instead include "gdb_socket.h".
1439 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1440 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1441 or <sys/un.h>.
1442 (init_named_socket, gdb_agent_helper_thread): Use union
1443 gdb_sockaddr_u.
1444
1445 2015-03-07 Pedro Alves <palves@redhat.com>
1446
1447 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1448 instead.
1449
1450 2015-03-06 Yao Qi <yao.qi@linaro.org>
1451
1452 * linux-aarch64-low.c (aarch64_insert_point): Use
1453 show_debug_regs as a boolean.
1454 (aarch64_remove_point): Likewise.
1455
1456 2015-03-05 Pedro Alves <palves@redhat.com>
1457
1458 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1459 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1460 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1461 * nto-low.c (nto_target_ops): Likewise.
1462 * spu-low.c (spu_target_ops): Likewise.
1463 * win32-low.c (win32_target_ops): Likewise.
1464
1465 2015-03-04 Pedro Alves <palves@redhat.com>
1466
1467 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1468 Decide whether a breakpoint triggered based on the SIGTRAP's
1469 siginfo.si_code.
1470 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1471 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1472 (linux_low_filter_event): Check for breakpoints before checking
1473 watchpoints.
1474 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1475 siginfo.si_code.
1476 (linux_stopped_by_sw_breakpoint)
1477 (linux_supports_stopped_by_sw_breakpoint)
1478 (linux_stopped_by_hw_breakpoint)
1479 (linux_supports_stopped_by_hw_breakpoint): New functions.
1480 (linux_target_ops): Install new target methods.
1481
1482 2015-03-04 Pedro Alves <palves@redhat.com>
1483
1484 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1485 * server.c (swbreak_feature, hwbreak_feature): New globals.
1486 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1487 (captured_main): Clear swbreak_feature and hwbreak_feature.
1488 * server.h (swbreak_feature, hwbreak_feature): Declare.
1489 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1490 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1491 supports_stopped_by_hw_breakpoint>: New fields.
1492 (target_supports_stopped_by_sw_breakpoint)
1493 (target_stopped_by_sw_breakpoint)
1494 (target_supports_stopped_by_hw_breakpoint)
1495 (target_stopped_by_hw_breakpoint): Declare.
1496
1497 2015-03-04 Pedro Alves <palves@redhat.com>
1498
1499 enum lwp_stop_reason -> enum target_stop_reason
1500 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1501 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1502 (linux_wait_1, stuck_in_jump_pad_callback)
1503 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1504 (linux_stopped_by_watchpoint):
1505 * linux-low.h (enum lwp_stop_reason): Delete.
1506 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1507 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1508
1509 2015-03-04 Yao Qi <yao.qi@linaro.org>
1510
1511 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1512
1513 2015-03-03 Gary Benson <gbenson@redhat.com>
1514
1515 * hostio.c (handle_vFile): Fix prefix lengths.
1516
1517 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1518
1519 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1520 ptr_bits.
1521
1522 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1523
1524 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1525 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1526 (clean): Add "rm -f" for above C files.
1527 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1528 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1529 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1530 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1531 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1532 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1533 (init_registers_s390x_vx_linux64)
1534 (init_registers_s390x_tevx_linux64)
1535 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1536 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1537 declarations.
1538 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1539 (s390_store_vxrs_high): New functions.
1540 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1541 NT_S390_VXRS_HIGH.
1542 (s390_arch_setup): Add logic for selecting one of the new target
1543 descriptions. Activate the new vector regsets if applicable.
1544 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1545 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1546 and init_registers_s390x_tevx_linux64.
1547
1548 2015-03-01 Pedro Alves <palves@redhat.com>
1549
1550 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1551 parameter.
1552
1553 2015-02-27 Pedro Alves <palves@redhat.com>
1554
1555 * linux-x86-low.c (u_debugreg_offset): New function.
1556 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1557
1558 2015-02-27 Pedro Alves <palves@redhat.com>
1559
1560 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1561 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1562 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1563 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1564 (ps_lsetfpregs, ps_getpid)
1565 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1566 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1567 (ps_lsetxregs, ps_plog): Declare.
1568
1569 2015-02-27 Pedro Alves <palves@redhat.com>
1570
1571 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1572 IP_AGENT_EXPORT_FUNC.
1573 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1574 IP_AGENT_EXPORT_FUNC.
1575 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1576 (IP_AGENT_EXPORT): Delete.
1577 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1578 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1579 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1580 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1581 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1582 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1583 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1584 (traceframe_read_count, traceframe_write_count)
1585 (traceframes_created, trace_state_variables, get_raw_reg)
1586 (get_trace_state_variable_value, set_trace_state_variable_value)
1587 (ust_loaded, helper_thread_id, cmd_buf): Use
1588 IPA_SYM_EXPORTED_NAME.
1589 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1590 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1591 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1592 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1593 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1594 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1595 EXTERN_C_PUSH/EXTERN_C_POP.
1596 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1597 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1598 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1599 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1600 (traceframe_write_count, traceframe_read_count)
1601 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1602 (about_to_request_buffer_space, get_trace_state_variable_value)
1603 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1604 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1605 EXTERN_C_PUSH/EXTERN_C_POP.
1606 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1607 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1608 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1609 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1610 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1611 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1612 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1613 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1614 Define.
1615 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1616 (IP_AGENT_EXPORT_VAR_DECL): Define.
1617 (tracing): Declare.
1618 (gdb_agent_get_raw_reg): Declare.
1619
1620 2015-02-27 Tom Tromey <tromey@redhat.com>
1621 Pedro Alves <palves@redhat.com>
1622
1623 Rename symbols whose names are reserved C++ keywords throughout.
1624
1625 2015-02-27 Pedro Alves <palves@redhat.com>
1626
1627 * Makefile.in (COMPILER): New, get it from autoconf.
1628 (CXX): Get from autoconf instead.
1629 (COMPILE.pre): Use COMPILER.
1630 (CC-LD): Rename to ...
1631 (CC_LD): ... this. Use COMPILER.
1632 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1633 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1634 * acinclude.m4: Include build-with-cxx.m4.
1635 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1636 Disable -Werror by default if building in C++ mode.
1637 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1638 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1639 the C++ compiler. Save/restore CXXFLAGS too.
1640 * configure: Regenerate.
1641
1642 2015-02-27 Pedro Alves <palves@redhat.com>
1643
1644 * acinclude.m4: Include libiberty.m4.
1645 * configure.ac: Call libiberty_INIT.
1646 * config.in, configure: Regenerate.
1647
1648 2015-02-26 Pedro Alves <palves@redhat.com>
1649
1650 * linux-low.c (linux_wait_1): When incrementing the PC past a
1651 program breakpoint always use the_low_target.breakpoint_len as
1652 increment, rather than the maximum between that and
1653 the_low_target.decr_pc_after_break.
1654
1655 2015-02-23 Pedro Alves <palves@redhat.com>
1656
1657 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1658 thread was doing a step-over; always adjust the PC if
1659 we stepped over a permanent breakpoint.
1660 (linux_wait_1): If we stepped over breakpoint that was on top of a
1661 permanent breakpoint, manually advance the PC past it.
1662
1663 2015-02-23 Pedro Alves <palves@redhat.com>
1664
1665 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1666 modes.
1667 (x86_fill_gregset, x86_store_gregset): Use it when handling
1668 $orig_eax.
1669
1670 2015-02-20 Pedro Alves <palves@redhat.com>
1671
1672 * thread-db.c: Include "nat/linux-procfs.h".
1673 (thread_db_init): Skip listing new threads if the kernel supports
1674 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1675
1676 2015-02-20 Pedro Alves <palves@redhat.com>
1677
1678 * linux-low.c (status_pending_p_callback): Use ptid_match.
1679
1680 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1681
1682 PR breakpoints/16812
1683 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1684 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1685 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1686
1687 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1688
1689 PR breakpoints/15956
1690 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1691
1692 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1693
1694 * linux-low.c (linux_low_btrace_conf): Print size.
1695 * server.c (handle_btrace_conf_general_set): New.
1696 (hanle_general_set): Call handle_btrace_conf_general_set.
1697 (handle_query): Report Qbtrace-conf:bts:size as supported.
1698
1699 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1700
1701 * linux-low.c (linux_low_enable_btrace): Update parameters.
1702 (linux_low_btrace_conf): New.
1703 (linux_target_ops)<to_btrace_conf>: Initialize.
1704 * server.c (current_btrace_conf): New.
1705 (handle_btrace_enable): Rename to ...
1706 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1707 to target_enable_btrace. Update comment. Update users.
1708 (handle_qxfer_btrace_conf): New.
1709 (qxfer_packets): Add btrace-conf entry.
1710 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1711 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1712 (target_ops)<read_btrace_conf>: New.
1713 (target_enable_btrace): Update parameters.
1714 (target_read_btrace_conf): New.
1715
1716 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1717
1718 * server.c (handle_btrace_general_set): Remove call to
1719 target_supports_btrace.
1720 (supported_btrace_packets): New.
1721 (handle_query): Call supported_btrace_packets.
1722 * target.h: include btrace-common.h.
1723 (btrace_target_info): Removed.
1724 (supports_btrace, target_supports_btrace): Update parameters.
1725
1726 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1727
1728 * Makefile.in (SFILES): Add common/btrace-common.c.
1729 (OBS): Add common/btrace-common.o.
1730 (btrace-common.o): Add build rules.
1731 * linux-low: Include btrace-common.h.
1732 (linux_low_read_btrace): Use struct btrace_data. Call
1733 btrace_data_init and btrace_data_fini.
1734
1735 2015-02-06 Pedro Alves <palves@redhat.com>
1736
1737 * thread-db.c (find_new_threads_callback): Add debug output.
1738
1739 2015-02-04 Pedro Alves <palves@redhat.com>
1740
1741 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1742 (resume_stopped_resumed_lwps): New function.
1743 (linux_wait_for_event_filtered): Use it.
1744
1745 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1746
1747 * Makefile.in (SFILES): Add linux-personality.c.
1748 (linux-personality.o): New rule.
1749 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1750 list of objects to be built.
1751 * linux-low.c: Include nat/linux-personality.h.
1752 (linux_create_inferior): Remove code to disable address space
1753 randomization (moved to ../nat/linux-personality.c). Create
1754 cleanup to disable address space randomization.
1755
1756 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1757
1758 * Makefile.in (posix-strerror.o): New rule.
1759 (mingw-strerror.o): Likewise.
1760 * configure: Regenerated.
1761 * configure.ac: Source file ../common/common.host. Initialize new
1762 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1763
1764 2015-01-14 Yao Qi <yao@codesourcery.com>
1765
1766 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1767 (ppc-linux.o): New rule.
1768 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1769 * configure.ac: AC_CHECK_FUNCS(getauxval).
1770 * config.in: Re-generated.
1771 * configure: Re-generated.
1772 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1773 ppc64_64bit_inferior_p
1774
1775 2015-01-14 Yao Qi <yao@codesourcery.com>
1776
1777 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1778 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1779 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1780 (PT_ORIG_R3, PT_TRAP): Likewise.
1781 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1782 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1783 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1784
1785 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1786
1787 * i387-fp.c (i387_cache_to_xsave): In look over
1788 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1789 zmmh_low_space field by use of zmmh_high_space.
1790
1791 2015-01-09 Pedro Alves <palves@redhat.com>
1792
1793 * linux-low.c (step_over_bkpt): Move higher up in the file.
1794 (handle_extended_wait): Don't store the stop_pc here.
1795 (get_stop_pc): Adjust comments and rename to ...
1796 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1797 stopped for a software breakpoint or hardware breakpoint.
1798 (thread_still_has_status_pending_p): New function.
1799 (status_pending_p_callback): Use
1800 thread_still_has_status_pending_p. If the event is no longer
1801 interesting, resume the LWP.
1802 (handle_tracepoints): Add assert.
1803 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1804 (wstatus_maybe_breakpoint): New function.
1805 (cancel_breakpoint): Delete function.
1806 (check_stopped_by_watchpoint): New function, factored out from
1807 linux_low_filter_event.
1808 (lp_status_maybe_breakpoint): Delete function.
1809 (linux_low_filter_event): Remove filter_ptid argument.
1810 Leave thread group exits pending here. Store the LWP's stop PC.
1811 Always leave events pending.
1812 (linux_wait_for_event_filtered): Pull all events out of the
1813 kernel, and leave them all pending.
1814 (count_events_callback, select_event_lwp_callback): Consider all
1815 events.
1816 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1817 (select_event_lwp): Only give preference to the stepping LWP in
1818 all-stop mode. Adjust comments.
1819 (ignore_event): New function.
1820 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1821 references to cancel_breakpoints. Adjust to renames. Also give
1822 equal priority to all LWPs that have had events in non-stop mode.
1823 If reporting a software breakpoint event, unadjust the LWP's PC.
1824 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1825 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1826 Adjust.
1827 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1828 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1829 (linux_stopped_by_watchpoint): Adjust.
1830 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1831 * linux-low.h (enum lwp_stop_reason): New.
1832 (struct lwp_info) <stop_pc>: Adjust comment.
1833 <stopped_by_watchpoint>: Delete field.
1834 <stop_reason>: New field.
1835 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1836 * mem-break.c (software_breakpoint_inserted_here)
1837 (hardware_breakpoint_inserted_here): New function.
1838 * mem-break.h (software_breakpoint_inserted_here)
1839 (hardware_breakpoint_inserted_here): Declare.
1840 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1841 (cancel_breakpoints): Delete.
1842 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1843 (upload_fast_traceframes): Remove references to
1844 cancel_breakpoints.
1845
1846 2015-01-09 Pedro Alves <palves@redhat.com>
1847
1848 * thread-db.c (find_new_threads_callback): Ignore thread if the
1849 kernel thread ID is -1.
1850
1851 2015-01-09 Pedro Alves <palves@redhat.com>
1852
1853 * linux-low.c (linux_attach_fail_reason_string): Move to
1854 nat/linux-ptrace.c, and rename.
1855 (linux_attach_lwp): Update comment.
1856 (attach_proc_task_lwp_callback): New function.
1857 (linux_attach): Adjust to rename and use
1858 linux_proc_attach_tgid_threads.
1859 (linux_attach_fail_reason_string): Delete declaration.
1860
1861 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1862
1863 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1864 * server.c (gdbserver_version): Likewise.
1865
1866 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1867
1868 * remote-utils.c: Include ctype.h.
1869 (input_interrupt): Explicitly handle the case when the char
1870 received is the NUL byte. Improve the printing of non-ASCII
1871 characters.
1872
1873 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1874
1875 * linux-low.c (linux_low_filter_event): Update call to
1876 linux_enable_event_reporting following the addition of
1877 a new parameter to that function.
1878
1879 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1880
1881 PR server/17457
1882 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1883 (AARCH64_FPCR_REGNO): Likewise.
1884 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1885 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1886 (aarch64_store_fpregset): Likewise.
1887
1888 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1889
1890 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1891 Remove FIXME comment about assumption about N.
1892
1893 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1894
1895 * configure.ac: If large-file support is disabled in GDBserver,
1896 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1897 * configure: Regenerate.
1898
1899 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1900
1901 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1902 warning upon ENODATA from ptrace.
1903 * linux-s390-low.c (s390_store_tdb): New.
1904 (s390_regsets): Add regset for NT_S390_TDB.
1905
1906 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1907
1908 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1909 without a fill_function.
1910 * linux-s390-low.c (s390_fill_last_break): Remove.
1911 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1912 (s390_arch_setup): Use regset's size instead of fill_function for
1913 loop end condition.
1914
1915 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1916
1917 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1918 the regset's store function when ptrace returned an error.
1919 * regcache.c (get_thread_regcache): Invalidate register cache
1920 before fetching inferior's registers.
1921
1922 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1923
1924 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1925 while-loop as for-loop.
1926 (regsets_store_inferior_registers): Likewise.
1927
1928 2014-11-28 Yao Qi <yao@codesourcery.com>
1929
1930 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1931 * config.in, configure: Re-generate.
1932 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1933 is defined.
1934
1935 2014-11-21 Yao Qi <yao@codesourcery.com>
1936
1937 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1938 (AC_CHECK_HEADERS): Remove malloc.h.
1939 * configure: Re-generated.
1940 * config.in: Re-generated.
1941 * server.h: Don't include alloca.h and malloc.h.
1942 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1943 Don't include malloc.h.
1944
1945 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1946
1947 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1948 corresponding ERRNO check in same block.
1949
1950 2014-11-12 Pedro Alves <palves@redhat.com>
1951
1952 * server.c (cont_thread): Update comment.
1953 (start_inferior, attach_inferior): No longer clear cont_thread.
1954 (handle_v_cont): No longer set cont_thread.
1955 (captured_main): Clear cont_thread each time a GDB connects.
1956
1957 2014-11-12 Pedro Alves <palves@redhat.com>
1958
1959 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1960 thread, and don't resume all threads if the Hc thread has exited.
1961
1962 2014-11-12 Pedro Alves <palves@redhat.com>
1963
1964 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1965 the process group instead of to a specific LWP.
1966
1967 2014-10-15 Pedro Alves <palves@redhat.com>
1968
1969 PR server/17487
1970 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1971 parameter.
1972 (arm_set_thread_context): Delete.
1973 (the_low_target): Adjust.
1974 * win32-i386-low.c (debug_registers_changed)
1975 (debug_registers_used): Delete.
1976 (update_debug_registers_callback): New function.
1977 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1978 needing to update their debug registers.
1979 (win32_get_current_dr): New function.
1980 (x86_dr_low_get_addr, x86_dr_low_get_control)
1981 (x86_dr_low_get_status): Fetch the debug register from the thread
1982 record's context.
1983 (i386_initial_stuff): Adjust.
1984 (i386_get_thread_context): Remove current_event parameter. Don't
1985 clear debug_registers_changed nor copy DR values to
1986 debug_reg_state.
1987 (i386_set_thread_context): Delete.
1988 (i386_prepare_to_resume): New function.
1989 (i386_thread_added): Mark the thread as needing to update irs
1990 debug registers.
1991 (the_low_target): Remove i386_set_thread_context and install
1992 i386_prepare_to_resume.
1993 * win32-low.c (win32_get_thread_context): Adjust.
1994 (win32_set_thread_context): Use SetThreadContext
1995 directly.
1996 (win32_prepare_to_resume): New function.
1997 (win32_require_context): New function, factored out from ...
1998 (thread_rec): ... this.
1999 (continue_one_thread): Call win32_prepare_to_resume on each thread
2000 we're about to continue.
2001 (win32_resume): Call win32_prepare_to_resume on the event thread.
2002 * win32-low.h (struct win32_thread_info)
2003 <debug_registers_changed>: New field.
2004 (struct win32_target_ops): Change prototype of set_thread_context,
2005 delete set_thread_context and add prepare_to_resume.
2006 (win32_require_context): New declaration.
2007
2008 2014-10-08 Gary Benson <gbenson@redhat.com>
2009
2010 * server.h: Do not include common-exceptions.h.
2011
2012 2014-10-08 Gary Benson <gbenson@redhat.com>
2013
2014 * server.h: Do not include cleanups.h.
2015
2016 2014-09-30 James Hogan <james.hogan@imgtec.com>
2017
2018 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2019 mips64-dsp-linux.c.
2020
2021 2014-09-23 Yao Qi <yao@codesourcery.com>
2022
2023 * linux-low.c (lp_status_maybe_breakpoint): New function.
2024 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2025 (count_events_callback): Likewise.
2026 (select_event_lwp_callback): Likewise.
2027 (cancel_breakpoints_callback): Likewise.
2028
2029 2014-09-19 Don Breazeal <donb@codesourcery.com>
2030
2031 * linux-low.c (handle_extended_wait): Call
2032 linux_ptrace_get_extended_event.
2033 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2034 linux_is_extended_waitstatus.
2035
2036 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2037
2038 * Makefile.in (CPPFLAGS): Define.
2039 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2040 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2041
2042 2014-09-16 Gary Benson <gbenson@redhat.com>
2043
2044 * inferiors.h (current_inferior): Renamed as...
2045 (current_thread): New variable. All uses updated.
2046 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2047 (maybe_move_out_of_jump_pad): Likewise.
2048 (cancel_breakpoint): Likewise.
2049 (linux_low_filter_event): Likewise.
2050 (wait_for_sigstop): Likewise.
2051 (linux_resume_one_lwp): Likewise.
2052 (need_step_over_p): Likewise.
2053 (start_step_over): Likewise.
2054 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2055 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2056 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2057 and save_inferior as saved_thread.
2058 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2059 saved_thread.
2060 (regcache_invalidate_thread): Likewise.
2061 * remote-utils.c (prepare_resume_reply): Likewise.
2062 * thread-db.c (thread_db_get_tls_address): Likewise.
2063 (disable_thread_event_reporting): Likewise.
2064 (remove_thread_event_breakpoints): Likewise.
2065 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2066 as saved_thread.
2067 * target.h (set_desired_inferior): Renamed as...
2068 (set_desired_thread): New declaration. All uses updated.
2069 * server.c (myresume): Updated comment to reference thread instead
2070 of inferior.
2071 (handle_serial_event): Likewise.
2072 (handle_target_event): Likewise.
2073
2074 2014-09-12 Tom Tromey <tromey@redhat.com>
2075 Gary Benson <gbenson@redhat.com>
2076
2077 * regcache.h: Include common-regcache.h.
2078 (regcache_read_pc): Don't declare.
2079 * regcache.c (get_thread_regcache_for_ptid): New function.
2080
2081 2014-09-11 Tom Tromey <tromey@redhat.com>
2082 Gary Benson <gbenson@redhat.com>
2083
2084 * symbol.c: New file.
2085 * Makefile.in (SFILES): Add symbol.c.
2086 (OBS): Add symbol.o.
2087
2088 2014-09-11 Gary Benson <gbenson@redhat.com>
2089
2090 * target.c (target_stop_ptid, target_continue_ptid): New
2091 functions.
2092
2093 2014-09-11 Tom Tromey <tromey@redhat.com>
2094 Gary Benson <gbenson@redhat.com>
2095
2096 * target.h: Include target/target.h.
2097 * target.c (target_read_memory, target_read_uint32)
2098 (target_write_memory): New functions.
2099
2100 2014-09-11 Gary Benson <gbenson@redhat.com>
2101
2102 * server.h (debug_hw_points): Don't declare.
2103 * server.c (debug_hw_points): Don't define. Replace all uses
2104 with show_debug_regs.
2105 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2106 all uses with show_debug_regs.
2107
2108 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2109
2110 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2111 endianness into account.
2112 (ppc_supply_ptrace_register): Likewise.
2113
2114 2014-09-03 James Hogan <james.hogan@imgtec.com>
2115
2116 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2117 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2118
2119 2014-09-03 Gary Benson <gbenson@redhat.com>
2120
2121 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2122 ALL_DEBUG_ADDRESS_REGISTERS.
2123
2124 2014-09-02 Gary Benson <gbenson@redhat.com>
2125
2126 * i386-low.h: Renamed as...
2127 * x86-low.h: New file. All type, function and variable name
2128 prefixes changed from "i386_" to "x86_". All references updated.
2129 * i386-low.c: Renamed as...
2130 * x86-low.c: New file. All type, function and variable name
2131 prefixes changed from "i386_" to "x86_". All references updated.
2132
2133 2014-09-02 Gary Benson <gbenson@redhat.com>
2134
2135 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2136 (x86_linux_new_thread): Likewise.
2137
2138 2014-08-29 Gary Benson <gbenson@redhat.com>
2139
2140 * server.h (setjmp.h): Do not include.
2141 (toplevel): Do not declare.
2142 (common-exceptions.h): Include.
2143 (cleanups.h): Likewise.
2144 * server.c (toplevel): Do not define.
2145 (exit_code): New static global.
2146 (detach_or_kill_for_exit_cleanup): New function.
2147 (main): New function. Original main renamed to...
2148 (captured_main): New function.
2149 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2150
2151 2014-08-29 Gary Benson <gbenson@redhat.com>
2152
2153 * Makefile.in (SFILES): Add common/common-exceptions.c.
2154 (OBS): Add common-exceptions.o.
2155 (common-exceptions.o): New rule.
2156 * utils.c (prepare_to_throw_exception): New function.
2157
2158 2014-08-29 Gary Benson <gbenson@redhat.com>
2159
2160 * config.in: Regenerate.
2161 * configure: Likewise.
2162
2163 2014-08-29 Gary Benson <gbenson@redhat.com>
2164
2165 * Makefile.in (SFILES): Add common/cleanups.c.
2166 (OBS): cleanups.o.
2167 (cleanups.o): New rule.
2168
2169 2014-08-29 Gary Benson <gbenson@redhat.com>
2170
2171 * utils.c (internal_vwarning): New function.
2172
2173 2014-08-28 Gary Benson <gbenson@redhat.com>
2174
2175 * utils.h (fatal): Remove declaration.
2176 * utils.c (fatal): Remove function.
2177
2178 2014-08-28 Gary Benson <gbenson@redhat.com>
2179
2180 * tracepoint.c (gdb_agent_init): Replace fatal with
2181 perror_with_name.
2182 (initialize_tracepoint): Likewise.
2183
2184 2014-08-28 Gary Benson <gbenson@redhat.com>
2185
2186 * remote-utils.c (remote_prepare): Replace fatal with error.
2187
2188 2014-08-28 Gary Benson <gbenson@redhat.com>
2189
2190 * linux-low.c (linux_async): Replace fatal with warning.
2191 Tidy up and return.
2192 (linux_start_non_stop): Return -1 if linux_async failed.
2193
2194 2014-08-28 Gary Benson <gbenson@redhat.com>
2195
2196 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2197 gdb_assert.
2198 (i386_dr_low_get_addr): Remove vague comment.
2199 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2200 gdb_assert.
2201
2202 2014-08-28 Gary Benson <gbenson@redhat.com>
2203
2204 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2205 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2206 internal_error.
2207 (linux_resume_one_lwp): Likewise.
2208 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2209 gdb_assert.
2210 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2211 with internal_error.
2212 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2213 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2214 (find_register_by_name): Replace fatal with internal_error.
2215 (find_regno): Likewise.
2216 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2217 * thread-db.c (thread_db_create_event): Likewise.
2218 (thread_db_load_search): Likewise.
2219 (try_thread_db_load_1): Likewise.
2220 * tracepoint.c (get_jump_space_head): Replace fatal with
2221 internal_error.
2222 (claim_trampoline_space): Likewise.
2223 (have_fast_tracepoint_trampoline_buffer): Likewise.
2224 (cmd_qtstart): Likewise.
2225 (stop_tracing): Likewise.
2226 (fast_tracepoint_collecting): Likewise.
2227 (target_malloc): Likewise.
2228 (download_tracepoint): Likewise.
2229 (download_trace_state_variables): Replace check with gdb_assert.
2230 (upload_fast_traceframes): Replace fatal with internal_error.
2231
2232 2014-08-19 Tom Tromey <tromey@redhat.com>
2233 Gary Benson <gbenson@redhat.com>
2234
2235 * Makefile.in (SFILES): Add common/common-debug.c.
2236 (OBS): Add common-debug.o.
2237 (common-debug.o): New rule.
2238 * debug.h (debug_printf): Don't declare.
2239 * debug.c (debug_printf): Renamed and rewritten as...
2240 (debug_vprintf): New function.
2241
2242 2014-08-19 Gary Benson <gbenson@redhat.com>
2243
2244 * utils.h: Do not include print-utils.h.
2245
2246 2014-08-19 Tom Tromey <tromey@redhat.com>
2247 Gary Benson <gbenson@redhat.com>
2248
2249 * server.h: Add static assertion.
2250 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2251
2252 2014-08-19 Tom Tromey <tromey@redhat.com>
2253 Gary Benson <gbenson@redhat.com>
2254
2255 * Makefile.in (SFILES): Add common/errors.c.
2256 (OBS): Add errors.o.
2257 (IPA_OBS): Add errors-ipa.o.
2258 (errors.o): New rule.
2259 (errors-ipa.o): Likewise.
2260 * utils.h (perror_with_name, error, warning): Don't declare.
2261 * utils.c (warning): Renamed and rewritten as...
2262 (vwarning): New function.
2263 (error): Renamed and rewritten as...
2264 (verror): New function.
2265 (internal_error): Renamed and rewritten as...
2266 (internal_verror): New function.
2267
2268 2014-08-07 Gary Benson <gbenson@redhat.com>
2269
2270 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2271 * configure: Regenerate.
2272 * config.in: Likewise.
2273 * server.h: Do not include errno.h.
2274 * event-loop.c: Likewise.
2275 * hostio-errno.c: Likewise.
2276 * linux-low.c: Likewise.
2277 * remote-utils.c: Likewise.
2278 * spu-low.c: Likewise.
2279 * utils.c: Likewise.
2280 * gdbreplay.c: Unconditionally include errno.h.
2281
2282 2014-08-07 Gary Benson <gbenson@redhat.com>
2283
2284 * server.h: Do not include string.h.
2285 * event-loop.c: Likewise.
2286 * linux-low.c: Likewise.
2287 * regcache.c: Likewise.
2288 * remote-utils.c: Likewise.
2289 * spu-low.c: Likewise.
2290 * utils.c: Likewise.
2291
2292 2014-08-07 Gary Benson <gbenson@redhat.com>
2293
2294 * server.h: Do not include gdb_assert.h.
2295
2296 2014-08-07 Gary Benson <gbenson@redhat.com>
2297
2298 * server.h: Do not include common-utils.h.
2299
2300 2014-08-07 Gary Benson <gbenson@redhat.com>
2301
2302 * server.h: Do not include ptid.h.
2303 * notif.h: Likewise.
2304
2305 2014-08-07 Gary Benson <gbenson@redhat.com>
2306
2307 * server.h: Do not include gdb_locale.h.
2308
2309 2014-08-07 Gary Benson <gbenson@redhat.com>
2310
2311 * server.h: Do not include gdb/signals.h.
2312 * win32-low.c: Likewise.
2313
2314 2014-08-07 Gary Benson <gbenson@redhat.com>
2315
2316 * server.h: Do not include pathmax.h.
2317
2318 2014-08-07 Gary Benson <gbenson@redhat.com>
2319
2320 * server.h: Do not include libiberty.h.
2321 * linux-bfin-low.c: Likewise.
2322
2323 2014-08-07 Gary Benson <gbenson@redhat.com>
2324
2325 * server.h: Do not include ansidecl.h.
2326
2327 2014-08-07 Gary Benson <gbenson@redhat.com>
2328
2329 * linux-x86-low.c: Do not include stddef.h.
2330 * lynx-ppc-low.c: Likewise.
2331 * tracepoint.c: Likewise.
2332
2333 2014-08-07 Gary Benson <gbenson@redhat.com>
2334
2335 * server.h: Do not include stdarg.h.
2336 * nto-low.c: Likewise.
2337
2338 2014-08-07 Gary Benson <gbenson@redhat.com>
2339
2340 * server.h: Do not include stdlib.h.
2341 * inferiors.c: Likewise.
2342 * linux-low.c: Likewise.
2343 * regcache.c: Likewise.
2344 * spu-low.c: Likewise.
2345 * tracepoint.c: Likewise.
2346 * utils.c: Likewise.
2347
2348 2014-08-07 Gary Benson <gbenson@redhat.com>
2349
2350 * server.h: Do not include stdio.h.
2351 * linux-low.c: Likewise.
2352 * remote-utils.c: Likewise.
2353 * spu-low.c: Likewise.
2354 * utils.c: Likewise.
2355 * wincecompat.c: Likewise.
2356
2357 2014-08-06 Gary Benson <gbenson@redhat.com>
2358
2359 * regcache.c (init_register_cache): Move conditionals inside if.
2360
2361 2014-08-06 Gary Benson <gbenson@redhat.com>
2362
2363 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2364
2365 2014-07-31 Gary Benson <gbenson@redhat.com>
2366
2367 * ax.h: Do not include server.h.
2368 * gdbthread.h: Likewise.
2369 * lynx-low.h: Likewise.
2370 * notif.h: Likewise.
2371
2372 2014-07-30 Gary Benson <gbenson@redhat.com>
2373
2374 * server.h: Include common-defs.h.
2375 Do not include config.h or build-gnulib-gdbserver/config.h.
2376
2377 2014-07-30 Gary Benson <gbenson@redhat.com>
2378
2379 * hostio-errno.c: Move server.h to top of includes list.
2380 * inferiors.c: Likewise.
2381 * linux-x86-low.c: Likewise.
2382 * notif.c: Include server.h.
2383
2384 2014-07-24 Tom Tromey <tromey@redhat.com>
2385 Gary Benson <gbenson@redhat.com>
2386
2387 * server.h (CORE_ADDR): Now unsigned.
2388
2389 2014-07-16 Pedro Alves <palves@redhat.com>
2390
2391 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2392
2393 2014-07-15 Pedro Alves <palves@redhat.com>
2394
2395 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2396 copy.
2397
2398 2014-07-11 Pedro Alves <palves@redhat.com>
2399
2400 * linux-low.c (kill_wait_lwp): New function, based on
2401 kill_one_lwp_callback, but use my_waitpid directly.
2402 (kill_one_lwp_callback, linux_kill): Use it.
2403
2404 2014-06-23 Pedro Alves <palves@redhat.com>
2405
2406 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2407 before setting DR0..DR3.
2408
2409 2014-06-20 Gary Benson <gbenson@redhat.com>
2410
2411 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2412 * configure: Regenerated.
2413 * config.in: Likewise.
2414
2415 2014-06-20 Gary Benson <gbenson@redhat.com>
2416
2417 * Makefile.in (SFILES): Update locations for files moved
2418 from common to nat.
2419 (object file files): Reordered.
2420
2421 2014-06-20 Gary Benson <gbenson@redhat.com>
2422
2423 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2424 (i386_dr_low_set_addr): Likewise.
2425 (i386_dr_low_get_addr): Likewise.
2426 (i386_dr_low_can_set_control): Likewise.
2427 (i386_dr_low_set_control): Likewise.
2428 (i386_dr_low_get_control): Likewise.
2429 (i386_dr_low_get_status): Likewise.
2430 (i386_get_debug_register_length): Likewise.
2431 * linux-x86-low.c (i386_dr_low_set_addr):
2432 Changed signature. Made static.
2433 (i386_dr_low_get_addr): Likewise.
2434 (i386_dr_low_set_control): Likewise.
2435 (i386_dr_low_get_control): Likewise.
2436 (i386_dr_low_get_status): Likewise.
2437 (i386_dr_low): New global variable.
2438 * win32-i386-low.c (i386_dr_low_set_addr):
2439 Changed signature. Made static.
2440 (i386_dr_low_get_addr): Likewise.
2441 (i386_dr_low_set_control): Likewise.
2442 (i386_dr_low_get_control): Likewise.
2443 (i386_dr_low_get_status): Likewise.
2444 (i386_dr_low): New global variable.
2445
2446 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2447
2448 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2449 * Makefile.in (AR, AR_FLAGS): Define.
2450 * configure: Regenerate.
2451
2452 2014-06-19 Gary Benson <gbenson@redhat.com>
2453
2454 * Makefile.in (i386-dregs.o): New rule.
2455 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2456 * i386-low.c (target.h): Remove include.
2457 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2458 (DR_CONTROL_SHIFT): Likewise.
2459 (DR_CONTROL_SIZE): Likewise.
2460 (DR_RW_EXECUTE): Likewise.
2461 (DR_RW_WRITE): Likewise.
2462 (DR_RW_READ): Likewise.
2463 (DR_RW_IORW): Likewise.
2464 (DR_LEN_1): Likewise.
2465 (DR_LEN_2): Likewise.
2466 (DR_LEN_4): Likewise.
2467 (DR_LEN_8): Likewise.
2468 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2469 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2470 (DR_ENABLE_SIZE): Likewise.
2471 (DR_LOCAL_SLOWDOWN): Likewise.
2472 (DR_GLOBAL_SLOWDOWN): Likewise.
2473 (DR_CONTROL_RESERVED): Likewise.
2474 (I386_DR_CONTROL_MASK): Likewise.
2475 (I386_DR_VACANT): Likewise.
2476 (I386_DR_LOCAL_ENABLE): Likewise.
2477 (I386_DR_GLOBAL_ENABLE): Likewise.
2478 (I386_DR_DISABLE): Likewise.
2479 (I386_DR_SET_RW_LEN): Likewise.
2480 (I386_DR_GET_RW_LEN): Likewise.
2481 (I386_DR_WATCH_HIT): Likewise.
2482 (i386_wp_op_t): Likewise.
2483 (i386_show_dr): Likewise.
2484 (i386_length_and_rw_bits): Likewise.
2485 (i386_insert_aligned_watchpoint): Likewise.
2486 (i386_remove_aligned_watchpoint): Likewise.
2487 (i386_handle_nonaligned_watchpoint): Likewise.
2488 i386_update_inferior_debug_regs(): Likewise.
2489 (i386_dr_insert_watchpoint): Likewise.
2490 (i386_dr_remove_watchpoint): Likewise.
2491 (i386_dr_region_ok_for_watchpoint): Likewise.
2492 (i386_dr_stopped_data_address): Likewise.
2493 (i386_dr_stopped_by_watchpoint): Likewise.
2494
2495 2014-06-19 Gary Benson <gbenson@redhat.com>
2496
2497 * i386-low.c (i386_dr_show): Renamed to
2498 i386_show_dr and made static. All uses updated.
2499 (i386_dr_length_and_rw_bits): Renamed to
2500 i386_length_and_rw_bits and made static.
2501 All uses updated.
2502 (i386_dr_insert_aligned_watchpoint): Renamed to
2503 i386_insert_aligned_watchpoint and made static.
2504 All uses updated.
2505 (i386_dr_remove_aligned_watchpoint): Renamed to
2506 i386_remove_aligned_watchpoint and made static.
2507 All uses updated.
2508 (i386_dr_update_inferior_debug_regs): Renamed to
2509 i386_update_inferior_debug_regs and made static.
2510 All uses updated.
2511
2512 2014-06-18 Gary Benson <gbenson@redhat.com>
2513
2514 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2515 (i386_dr_low_can_set_control): Likewise.
2516 (i386_get_debug_register_length): Likewise.
2517 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2518 (i386_dr_low_can_set_control): Likewise.
2519 (i386_get_debug_register_length): Likewise.
2520
2521 2014-06-17 Gary Benson <gbenson@redhat.com>
2522
2523 * i386-low.h (i386-dregs.h): New include.
2524 (DR_FIRSTADDR): Now in i386-dregs.h.
2525 (DR_LASTADDR): Likewise.
2526 (DR_NADDR): Likewise.
2527 (DR_STATUS): Likewise.
2528 (DR_CONTROL): Likewise.
2529 (i386_debug_reg_state): Likewise.
2530 (i386_dr_insert_watchpoint): Likewise.
2531 (i386_dr_remove_watchpoint): Likewise.
2532 (i386_dr_region_ok_for_watchpoint): Likewise.
2533 (i386_dr_stopped_data_address): Likewise.
2534 (i386_dr_stopped_by_watchpoint): Likewise.
2535 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2536
2537 2014-06-18 Gary Benson <gbenson@redhat.com>
2538
2539 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2540 i386_dr_insert_watchpoint.
2541 (i386_low_remove_watchpoint): Renamed to
2542 i386_dr_remove_watchpoint.
2543 (i386_low_region_ok_for_watchpoint): Renamed to
2544 i386_dr_region_ok_for_watchpoint.
2545 (i386_low_stopped_data_address): Renamed to
2546 i386_dr_stopped_data_address.
2547 (i386_low_stopped_by_watchpoint): Renamed to
2548 i386_dr_stopped_by_watchpoint.
2549 * i386-low.c (i386_show_dr): Renamed to
2550 i386_dr_show and made nonstatic. All uses updated.
2551 (i386_length_and_rw_bits): Renamed to
2552 i386_dr_length_and_rw_bits and made nonstatic.
2553 All uses updated.
2554 (i386_insert_aligned_watchpoint): Renamed to
2555 i386_dr_insert_aligned_watchpoint and made nonstatic.
2556 All uses updated.
2557 (i386_remove_aligned_watchpoint): Renamed to
2558 i386_dr_remove_aligned_watchpoint and made nonstatic.
2559 All uses updated.
2560 (i386_update_inferior_debug_regs): Renamed to
2561 i386_dr_update_inferior_debug_regs and made nonstatic.
2562 All uses updated.
2563 (i386_low_insert_watchpoint): Renamed to
2564 i386_dr_insert_watchpoint. All uses updated.
2565 (i386_low_remove_watchpoint): Renamed to
2566 i386_dr_remove_watchpoint. All uses updated.
2567 (i386_low_region_ok_for_watchpoint): Renamed to
2568 i386_dr_region_ok_for_watchpoint. All uses updated.
2569 (i386_low_stopped_data_address): Renamed to
2570 i386_dr_stopped_data_address. All uses updated.
2571 (i386_low_stopped_by_watchpoint): Renamed to
2572 i386_dr_stopped_by_watchpoint. All uses updated.
2573
2574 2014-06-18 Gary Benson <gbenson@redhat.com>
2575
2576 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2577 (i386_dr_low_can_set_control): Likewise.
2578 (i386_insert_aligned_watchpoint): New check.
2579
2580 2014-06-18 Gary Benson <gbenson@redhat.com>
2581
2582 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2583 Renamed to state.
2584
2585 2014-06-18 Gary Benson <gbenson@redhat.com>
2586
2587 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2588 instead of fatal and error.
2589 (i386_handle_nonaligned_watchpoint): Likewise.
2590
2591 2014-06-18 Gary Benson <gbenson@redhat.com>
2592
2593 * i386-low.c (i386_get_debug_register_length): New macro.
2594 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2595 (i386_show_dr): Use debug_printf instead of fprintf. Use
2596 phex to format values.
2597
2598 2014-06-18 Gary Benson <gbenson@redhat.com>
2599
2600 * i386-low.h: Comment changes.
2601 * i386-low.c: Likewise.
2602
2603 2014-06-18 Gary Benson <gbenson@redhat.com>
2604
2605 * i386-low.c: Whitespace changes.
2606
2607 2014-06-12 Tom Tromey <tromey@redhat.com>
2608
2609 * utils.c (freeargv): Remove.
2610
2611 2014-06-12 Tom Tromey <tromey@redhat.com>
2612
2613 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2614 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2615 (parse_debug_format_options): Likewise.
2616 (gdbserver_usage): Likewise.
2617 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2618 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2619 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2620 against libiberty.
2621 ($(LIBGNU)): Depend on libiberty.
2622 (all-lib): Recurse into all subdirs.
2623 (install-only): Invoke "install" target in subdirs.
2624 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2625 targets.
2626 * configure: Rebuild.
2627 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2628 for vasprintf, vsnprintf, or gettimeofday.
2629 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2630 srv_tgtobj.
2631
2632 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2633
2634 * development.sh: Delete.
2635 * Makefile.in (config.status): Adjust dependency on development.sh.
2636 * configure.ac: Adjust development.sh source call.
2637 * configure: Regenerate.
2638
2639 2014-06-02 Pedro Alves <palves@redhat.com>
2640
2641 * ax.c (gdb_free_agent_expr): New function.
2642 * ax.h (gdb_free_agent_expr): New declaration.
2643 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2644 list.
2645 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2646 static.
2647 (clear_breakpoint_conditions_and_commands): New function.
2648 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2649 (clear_breakpoint_conditions_and_commands): New declaration.
2650
2651 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2652
2653 * linux-aarch64-low.c (asm/ptrace.h): Include.
2654
2655 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2656
2657 Fix TLS access for -static -pthread.
2658 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2659 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2660 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2661
2662 2014-05-20 Pedro Alves <palves@redhat.com>
2663
2664 * linux-aarch64-low.c (aarch64_insert_point)
2665 (aarch64_remove_point): No longer check whether the type is
2666 supported here. Adjust to new interface.
2667 (the_low_target): Install aarch64_supports_z_point_type as
2668 supports_z_point_type method.
2669 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2670 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2671 instead of a Z packet char. Adjust.
2672 (arm_supports_z_point_type): New function.
2673 (arm_insert_point, arm_remove_point): Adjust to new interface.
2674 (the_low_target): Install arm_supports_z_point_type.
2675 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2676 (cris_insert_point, cris_remove_point): Adjust to new interface.
2677 Don't check whether the type is supported here.
2678 (the_low_target): Install cris_supports_z_point_type.
2679 * linux-low.c (linux_supports_z_point_type): New function.
2680 (linux_insert_point, linux_remove_point): Adjust to new interface.
2681 * linux-low.h (struct linux_target_ops) <insert_point,
2682 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2683 raw_breakpoint pointer parameter.
2684 <supports_z_point_type>: New method.
2685 * linux-mips-low.c (mips_supports_z_point_type): New function.
2686 (mips_insert_point, mips_remove_point): Adjust to new interface.
2687 Use mips_supports_z_point_type.
2688 (the_low_target): Install mips_supports_z_point_type.
2689 * linux-ppc-low.c (the_low_target): Install NULL as
2690 supports_z_point_type method.
2691 * linux-s390-low.c (the_low_target): Install NULL as
2692 supports_z_point_type method.
2693 * linux-sparc-low.c (the_low_target): Install NULL as
2694 supports_z_point_type method.
2695 * linux-x86-low.c (x86_supports_z_point_type): New function.
2696 (x86_insert_point): Adjust to new insert_point interface. Use
2697 insert_memory_breakpoint. Adjust to new
2698 i386_low_insert_watchpoint interface.
2699 (x86_remove_point): Adjust to remove_point interface. Use
2700 remove_memory_breakpoint. Adjust to new
2701 i386_low_remove_watchpoint interface.
2702 (the_low_target): Install x86_supports_z_point_type.
2703 * lynx-low.c (lynx_target_ops): Install NULL as
2704 supports_z_point_type callback.
2705 * nto-low.c (nto_supports_z_point_type): New.
2706 (nto_insert_point, nto_remove_point): Adjust to new interface.
2707 (nto_target_ops): Install nto_supports_z_point_type.
2708 * mem-break.c: Adjust intro comment.
2709 (struct raw_breakpoint) <raw_type, size>: New fields.
2710 <inserted>: Update comment.
2711 <shlib_disabled>: Delete field.
2712 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2713 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2714 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2715 (raw_bkpt_type_to_target_hw_bp_type): New function.
2716 (find_enabled_raw_code_breakpoint_at): New function.
2717 (find_raw_breakpoint_at): New type and size parameters. Use them.
2718 (insert_memory_breakpoint): New function, based off
2719 set_raw_breakpoint_at.
2720 (remove_memory_breakpoint): New function.
2721 (set_raw_breakpoint_at): Reimplement.
2722 (set_breakpoint): New, based on set_breakpoint_at.
2723 (set_breakpoint_at): Reimplement.
2724 (delete_raw_breakpoint): Go through the_target->remove_point
2725 instead of assuming memory breakpoints.
2726 (find_gdb_breakpoint_at): Delete.
2727 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2728 (find_gdb_breakpoint): New function.
2729 (set_gdb_breakpoint_at): Delete.
2730 (z_type_supported): New function.
2731 (set_gdb_breakpoint_1): New function, loosely based off
2732 set_gdb_breakpoint_at.
2733 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2734 (delete_gdb_breakpoint_at): Delete.
2735 (delete_gdb_breakpoint_1): New function, loosely based off
2736 delete_gdb_breakpoint_at.
2737 (delete_gdb_breakpoint): New function.
2738 (clear_gdb_breakpoint_conditions): Rename to ...
2739 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2740 breakpoint.
2741 (add_condition_to_breakpoint): Make static.
2742 (add_breakpoint_condition): Take a struct breakpoint pointer
2743 instead of an address. Adjust.
2744 (gdb_condition_true_at_breakpoint): Rename to ...
2745 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2746 z_type parameter.
2747 (gdb_condition_true_at_breakpoint): Reimplement.
2748 (add_breakpoint_commands): Take a struct breakpoint pointer
2749 instead of an address. Adjust.
2750 (gdb_no_commands_at_breakpoint): Rename to ...
2751 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2752 parameter. Return true if no breakpoint was found. Change debug
2753 output.
2754 (gdb_no_commands_at_breakpoint): Reimplement.
2755 (run_breakpoint_commands): Rename to ...
2756 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2757 and change return type to boolean.
2758 (run_breakpoint_commands): New function.
2759 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2760 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2761 breakpoint. Go through the_target->remove_point instead of
2762 assuming memory breakpoint.
2763 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2764 software and hardware breakpoints.
2765 (reinsert_raw_breakpoint): Go through the_target->insert_point
2766 instead of assuming memory breakpoint.
2767 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2768 software and hardware breakpoints.
2769 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2770 Check both software and hardware breakpoints.
2771 (validate_inserted_breakpoint): Assert the breakpoint is a
2772 software breakpoint. Set the inserted flag to -1 instead of
2773 setting shlib_disabled.
2774 (delete_disabled_breakpoints): Adjust.
2775 (validate_breakpoints): Only validate software breakpoints.
2776 Adjust to inserted flag change.
2777 (check_mem_read, check_mem_write): Skip breakpoint types other
2778 than software breakpoints. Adjust to inserted flag change.
2779 * mem-break.h (enum raw_bkpt_type): New enum.
2780 (raw_breakpoint, struct process_info): Forward declare.
2781 (Z_packet_to_target_hw_bp_type): Delete declaration.
2782 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2783 (set_gdb_breakpoint, delete_gdb_breakpoint)
2784 (clear_breakpoint_conditions): New declarations.
2785 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2786 (breakpoint_inserted_here): Update comment.
2787 (add_breakpoint_condition, add_breakpoint_commands): Replace
2788 address parameter with a breakpoint pointer parameter.
2789 (gdb_breakpoint_here): Update comment.
2790 (delete_gdb_breakpoint_at): Delete.
2791 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2792 * server.c (process_point_options): Take a struct breakpoint
2793 pointer instead of an address. Adjust.
2794 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2795 delete_gdb_breakpoint.
2796 * spu-low.c (spu_target_ops): Install NULL as
2797 supports_z_point_type method.
2798 * target.h: Include mem-break.h.
2799 (struct target_ops) <prepare_to_access_memory>: Update comment.
2800 <supports_z_point_type>: New field.
2801 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2802 instead of a char. Also take a raw breakpoint pointer.
2803 * win32-arm-low.c (the_low_target): Install NULL as
2804 supports_z_point_type.
2805 * win32-i386-low.c (i386_supports_z_point_type): New function.
2806 (i386_insert_point, i386_remove_point): Adjust to new interface.
2807 (the_low_target): Install i386_supports_z_point_type.
2808 * win32-low.c (win32_supports_z_point_type): New function.
2809 (win32_insert_point, win32_remove_point): Adjust to new interface.
2810 (win32_target_ops): Install win32_supports_z_point_type.
2811 * win32-low.h (struct win32_target_ops):
2812 <supports_z_point_type>: New method.
2813 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2814 instead of a char. Also take a raw breakpoint pointer.
2815
2816 2014-05-20 Pedro Alves <palves@redhat.com>
2817
2818 * mem-break.h: Include break-common.h.
2819 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2820 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2821 (Z_packet_to_target_hw_bp_type): New declaration.
2822 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2823 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2824 (Z_PACKET_ACCESS_WP): Delete macros.
2825 (Z_packet_to_hw_type): Delete function.
2826 * i386-low.h: Don't include break-common.h here.
2827 (Z_packet_to_hw_type): Delete declaration.
2828 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2829 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2830 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2831 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2832 * linux-aarch64-low.c: Don't include break-common.h here.
2833 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2834 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2835 (Z_packet_to_target_hw_bp_type): Delete function.
2836 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2837 function.
2838 (mips_insert_point, mips_remove_point): Use
2839 Z_packet_to_target_hw_bp_type.
2840
2841 2014-05-20 Pedro Alves <palves@redhat.com>
2842
2843 * linux-aarch64-low.c: Include break-common.h.
2844 (enum target_point_type): Delete.
2845 (Z_packet_to_point_type): Rename to ...
2846 (Z_packet_to_target_hw_bp_type): ... this, and return a
2847 target_hw_bp_type instead.
2848 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2849 instead of an enum target_point_type.
2850 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2851 breakpoint type.
2852 (aarch64_dr_state_insert_one_point)
2853 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2854 (aarch64_handle_aligned_watchpoint)
2855 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2856 Take an enum target_hw_bp_type instead of an enum
2857 target_point_type.
2858 (aarch64_supports_z_point_type): New function.
2859 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2860 use Z_packet_to_target_hw_bp_type.
2861
2862 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2863
2864 * configure.ac: Only use -Werror by default when DEVELOPMENT
2865 is true.
2866 * configure: Regenerate.
2867
2868 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2869
2870 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2871 * linux-x86-low.c (X86_64_USER_REGS): New.
2872 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2873
2874 2014-04-28 Yao Qi <yao@codesourcery.com>
2875
2876 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2877 name.
2878
2879 2014-04-25 Pedro Alves <palves@redhat.com>
2880
2881 PR server/16255
2882 * linux-low.c (linux_attach_fail_reason_string): New function.
2883 (linux_attach_lwp): Delete.
2884 (linux_attach_lwp_1): Rename to ...
2885 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2886 argument. Remove "initial" parameter. Return int instead of
2887 void. Don't error or warn here.
2888 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2889 failure to attach to the tgid. Call warning when failing to
2890 attach to an lwp.
2891 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2892 argument. Remove "initial" parameter. Return int instead of
2893 void. Don't error or warn here.
2894 (linux_attach_fail_reason_string): New declaration.
2895 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2896 interface change. Use linux_attach_fail_reason_string.
2897
2898 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2899 Walfred Tedeschi <walfred.tedeschi@intel.com>
2900
2901 * Makefile.in: Added rules to handle new files
2902 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2903 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2904 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2905 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2906 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2907 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2908 x32-avx512-linux.o.
2909 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2910 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2911 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2912 i386/x32-avx512.xml.
2913 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2914 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2915 i386/x32-avx512-linux.xml.
2916 * i387-fp.c (num_avx512_k_registers): New constant for number
2917 of K registers.
2918 (num_avx512_zmmh_low_registers): New constant for number of
2919 lower ZMM registers (0-15).
2920 (num_avx512_zmmh_high_registers): New constant for number of
2921 higher ZMM registers (16-31).
2922 (num_avx512_ymmh_registers): New contant for number of higher
2923 YMM registers (ymm16-31 added by avx521 on x86_64).
2924 (num_avx512_xmm_registers): New constant for number of higher
2925 XMM registers (xmm16-31 added by AVX512 on x86_64).
2926 (struct i387_xsave): Add space for AVX512 registers.
2927 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2928 Add code to handle AVX512 registers.
2929 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2930 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2931 prototypei from generated file.
2932 (tdesc_amd64_avx512_linux): Likewise.
2933 (init_registers_x32_avx512_linux): Likewise.
2934 (tdesc_x32_avx512_linux): Likewise.
2935 (init_registers_i386_avx512_linux): Likewise.
2936 (tdesc_i386_avx512_linux): Likewise.
2937 (x86_64_regmap): Add AVX512 registers.
2938 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2939 mask.
2940 (initialize_low_arch): Add code to initialize AVX512 registers.
2941
2942 2014-04-23 Pedro Alves <palves@redhat.com>
2943
2944 * mem-break.c (find_gdb_breakpoint_at): Make static.
2945 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2946
2947 2014-04-23 Pedro Alves <palves@redhat.com>
2948
2949 * i386-low.c: Don't include break-common.h here.
2950 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2951 prototype to take target_hw_bp_type as argument instead of a Z
2952 packet char.
2953 * i386-low.h: Include break-common.h here.
2954 (Z_packet_to_hw_type): Declare.
2955 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2956 prototypes.
2957 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2958 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2959 (x86_remove_point): Convert the packet number to a
2960 target_hw_bp_type before calling i386_low_remove_watchpoint.
2961 * win32-i386-low.c (i386_insert_point): Convert the packet number
2962 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2963 (i386_remove_point): Convert the packet number to a
2964 target_hw_bp_type before calling i386_low_remove_watchpoint.
2965
2966 2014-04-23 Pedro Alves <palves@redhat.com>
2967
2968 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2969
2970 2014-04-10 Pedro Alves <palves@redhat.com>
2971
2972 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2973 Check if the condition or command is NULL before checking if the
2974 breakpoint is known. On success, return true.
2975 * mem-break.h (add_breakpoint_condition): Document return.
2976 (add_breakpoint_commands): Add describing comment.
2977 * server.c (skip_to_semicolon): New function.
2978 (process_point_options): Use it.
2979
2980 2014-04-09 Pedro Alves <palves@redhat.com>
2981
2982 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2983 to lwpid_of.
2984
2985 2014-02-27 Pedro Alves <palves@redhat.com>
2986
2987 PR 12702
2988 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2989 macros.
2990 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2991 output.
2992 (last_thread_of_process_p): Take a PID argument instead of a
2993 thread pointer.
2994 (linux_wait_for_lwp): Delete.
2995 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2996 functions.
2997 (linux_low_filter_event): New function, party factored out from
2998 linux_wait_for_event.
2999 (linux_wait_for_event): Rename to ...
3000 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3001 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3002 sigsuspend. Check for zombie leaders.
3003 (linux_wait_for_event): Reimplement as wrapper around
3004 linux_wait_for_event_filtered.
3005 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3006 a normal or signal exit is seen, it's the whole process exiting.
3007 (wait_for_sigstop): No longer a for_each_inferior callback.
3008 Rewrite on top of linux_wait_for_event_filtered.
3009 (stop_all_lwps): Call wait_for_sigstop directly.
3010 * server.c (resume, handle_target_event): Handle
3011 TARGET_WAITKIND_NO_RESUMED.
3012
3013 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3014
3015 * win32-low.c (psapi_get_dll_name,
3016 * win32_CreateToolhelp32Snapshot): Delete.
3017 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3018 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3019 Delete.
3020 (handle_load_dll): Add function description.
3021 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3022
3023 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3024
3025 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3026 Add comment.
3027 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3028 base address when calling win32_add_one_solib.
3029 (handle_load_dll): Delete local variable load_addr.
3030 Remove 0x1000 offset applied to DLL base address when calling
3031 win32_add_one_solib.
3032 (handle_unload_dll): Add comment.
3033
3034 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3035
3036 * win32-low.c (win32_add_all_dlls): Renames
3037 win32_ensure_ntdll_loaded. Rewrite function documentation.
3038 Adjust implementation to always load all DLLs.
3039 Add 0x1000 offset to DLL base address when calling
3040 win32_add_one_solib.
3041 (child_initialization_done): New static global.
3042 (do_initial_child_stuff): Set child_initialization_done to
3043 zero during child initialization, and 1 after. Replace call
3044 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3045 Add comment.
3046 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3047 (handle_unload_dll): Add function documentation.
3048 (get_child_debug_event): Ignore load and unload DLL events
3049 during child initialization.
3050
3051 2014-02-20 Doug Evans <dje@google.com>
3052
3053 Remove global all_lwps.
3054 * inferiors.h (ptid_of): Move here from linux-low.h.
3055 (pid_of, lwpid_of): Ditto.
3056 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3057 parameter is a struct thread_info * now.
3058 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3059 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3060 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3061 directly.
3062 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3063 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3064 * linux-arm-low.c (update_registers_callback): Update, "entry"
3065 parameter is a struct thread_info * now.
3066 Fetch lwpid from current_inferior directly.
3067 (arm_insert_point): Pass &all_threads to find_inferior instead of
3068 &all_lwps.
3069 (arm_remove_point): Ditto.
3070 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3071 (arm_prepare_to_resume): Fetch pid from thread.
3072 (arm_read_description): Fetch lwpid from current_inferior directly.
3073 * linux-low.c (all_lwps): Delete.
3074 (delete_lwp): Delete call to remove_inferior.
3075 (handle_extended_wait): Fetch lwpid from thread.
3076 (add_lwp): Don't set lwp->entry.id. Remove call to
3077 add_inferior_to_list.
3078 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3079 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3080 (kill_one_lwp_callback): Ditto.
3081 (linux_kill): Don't dereference NULL pointer.
3082 Fetch ptid,lwpid from thread.
3083 (get_detach_signal): Fetch ptid from thread.
3084 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3085 Simplify call to regcache_invalidate_thread.
3086 (delete_lwp_callback): Update, "entry" parameter is a
3087 struct thread_info * now. Fetch pid from thread.
3088 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3089 (status_pending_p_callback): Update, "entry" parameter is a
3090 struct thread_info * now. Fetch ptid from thread.
3091 (find_lwp_pid): Update, "entry" parameter is a
3092 struct thread_info * now.
3093 (linux_wait_for_lwp): Fetch pid from thread.
3094 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3095 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3096 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3097 (dequeue_one_deferred_signal): Ditto.
3098 (cancel_breakpoint): Fetch ptid from current_inferior.
3099 (linux_wait_for_event): Pass &all_threads to find_inferior,
3100 not &all_lwps. Fetch ptid, lwpid from thread.
3101 (count_events_callback): Update, "entry" parameter is a
3102 struct thread_info * now.
3103 (select_singlestep_lwp_callback): Ditto.
3104 (select_event_lwp_callback): Ditto.
3105 (cancel_breakpoints_callback): Ditto.
3106 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3107 not &all_lwps.
3108 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3109 (unsuspend_one_lwp): Update, "entry" parameter is a
3110 struct thread_info * now.
3111 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3112 not &all_lwps.
3113 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3114 Fetch lwpid from thread, not lwp.
3115 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3116 Pass &all_threads to find_inferior, not &all_lwps.
3117 (send_sigstop): Fetch lwpid from thread, not lwp.
3118 (send_sigstop_callback): Update, "entry" parameter is a
3119 struct thread_info * now.
3120 (suspend_and_send_sigstop_callback): Ditto.
3121 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3122 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3123 struct thread_info * now.
3124 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3125 from thread, lwp.
3126 (lwp_running): Update, "entry" parameter is a
3127 struct thread_info * now.
3128 (stop_all_lwps): Fetch ptid from thread.
3129 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3130 (linux_resume_one_lwp): Fetch lwpid from thread.
3131 (linux_set_resume_request): Update, "entry" parameter is a
3132 struct thread_info * now. Fetch pid, lwpid from thread.
3133 (resume_status_pending_p): Update, "entry" parameter is a
3134 struct thread_info * now.
3135 (need_step_over_p): Ditto. Fetch lwpid from thread.
3136 (start_step_over): Fetch lwpid from thread.
3137 (linux_resume_one_thread): Update, "entry" parameter is a
3138 struct thread_info * now. Fetch lwpid from thread.
3139 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3140 (proceed_one_lwp): Update, "entry" parameter is a
3141 struct thread_info * now. Fetch lwpid from thread.
3142 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3143 struct thread_info * now.
3144 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3145 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3146 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3147 directly.
3148 (regsets_store_inferior_registers): Ditto.
3149 (fetch_register, store_register): Ditto.
3150 (linux_read_memory, linux_write_memory): Ditto.
3151 (linux_request_interrupt): Ditto.
3152 (linux_read_auxv): Ditto.
3153 (linux_xfer_siginfo): Ditto.
3154 (linux_qxfer_spu): Ditto.
3155 (linux_qxfer_libraries_svr4): Ditto.
3156 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3157 moved to inferiors.h.
3158 (get_lwp): Delete.
3159 (get_thread_lwp): Update.
3160 (struct lwp_info): Delete member "entry". Simplify comment for
3161 member "thread".
3162 (all_lwps): Delete.
3163 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3164 current_inferior directly.
3165 (update_watch_registers_callback): Update, "entry" parameter is a
3166 struct thread_info * now. Fetch pid from thread.
3167 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3168 (mips_insert_point): Fetch lwpid from current_inferior.
3169 Pass &all_threads to find_inferior, not &all_lwps.
3170 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3171 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3172 directly.
3173 (mips_stopped_data_address): Ditto.
3174 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3175 directly.
3176 * linux-tile-low.c (tile_arch_setup): Ditto.
3177 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3178 (update_debug_registers_callback): Update, "entry" parameter is a
3179 struct thread_info * now. Fetch pid from thread.
3180 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3181 Pass &all_threads to find_inferior, not &all_lwps.
3182 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3183 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3184 Pass &all_threads to find_inferior, not &all_lwps.
3185 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3186 (i386_dr_low_get_status): Ditto.
3187 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3188 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3189 (x86_linux_read_description): Ditto.
3190 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3191
3192 2014-02-20 Doug Evans <dje@google.com>
3193
3194 * inferiors.c (get_first_inferior): Fix buglet.
3195
3196 2014-02-19 Doug Evans <dje@google.com>
3197
3198 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3199 * inferiors.c (add_thread): Change result type to struct thread_info *.
3200 All callers updated.
3201 (add_lwp): Call add_thread here instead of in callers.
3202 All callers updated.
3203 * linux-low.h (get_lwp_thread): Rewrite.
3204 (struct lwp_info): New member "thread".
3205
3206 2014-02-19 Doug Evans <dje@google.com>
3207
3208 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3209 All callers updated.
3210
3211 2014-02-19 Doug Evans <dje@google.com>
3212
3213 * inferiors.c (add_thread): Fix whitespace.
3214
3215 2014-02-19 Doug Evans <dje@google.com>
3216
3217 * dll.c (clear_dlls): Replace accessing list implemention details
3218 with API function.
3219 * gdbthread.h (get_first_thread): Declare.
3220 * inferiors.c (for_each_inferior_with_data): New function.
3221 (get_first_thread): New function.
3222 (find_thread_ptid): Simplify.
3223 (get_first_inferior): New function.
3224 (clear_list): Delete.
3225 (one_inferior_p): New function.
3226 (clear_inferior_list): New function.
3227 (clear_inferiors): Update.
3228 * inferiors.h (for_each_inferior_with_data): Declare.
3229 (clear_inferior_list): Declare.
3230 (one_inferior_p): Declare.
3231 (get_first_inferior): Declare.
3232 * linux-low.c (linux_wait_for_event): Replace accessing list
3233 implemention details with API function.
3234 * server.c (target_running): Ditto.
3235 (accumulate_file_name_length): New function.
3236 (emit_dll_description): New function.
3237 (handle_qxfer_libraries): Replace accessing list implemention
3238 details with API function.
3239 (handle_qxfer_threads_worker): New function.
3240 (handle_qxfer_threads_proper): Replace accessing list implemention
3241 details with API function.
3242 (handle_query): Ditto.
3243 (visit_actioned_threads_callback_ftype): New typedef.
3244 (visit_actioned_threads_data): New struct.
3245 (visit_actioned_threads): Rewrite to be find_inferior callback.
3246 (resume): Call find_inferior.
3247 (handle_status): Replace accessing list implemention
3248 details with API function.
3249 (process_serial_event): Replace accessing list implemention details
3250 with API function.
3251 * target.c (set_desired_inferior): Replace accessing list implemention
3252 details with API function.
3253 * tracepoint.c (same_process_p): New function.
3254 (gdb_agent_about_to_close): Replace accessing list implemention
3255 details with API function.
3256 * win32-low.c (child_delete_thread): Replace accessing list
3257 implemention details with API function.
3258 (match_dll_by_basename): New function.
3259 (dll_is_loaded_by_basename): New function.
3260 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3261 details call to dll_is_loaded_by_basename.
3262
3263 2014-02-19 Doug Evans <dje@google.com>
3264
3265 * dll.h (struct dll_info): Add comment.
3266 * gdbthread.h (struct thread_info): Add comment.
3267 (current_ptid): Simplify.
3268 * inferiors.c (add_process): Update.
3269 (remove_process): Update.
3270 * inferiors.h (struct process_info): Rename member "head" to "entry".
3271 * linux-low.c (delete_lwp): Update.
3272 (add_lwp): Update.
3273 (last_thread_of_process_p): Update.
3274 (kill_one_lwp_callback, linux_kill): Update.
3275 (status_pending_p_callback): Update.
3276 (wait_for_sigstop): Update. Simplify read of ptid.
3277 (start_step_over): Update.
3278 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3279 (get_lwp_thread): Update.
3280 (struct lwp_info): Rename member "head" to "entry".
3281 * regcache.h (inferior_list_entry): Delete.
3282 * server.c (kill_inferior_callback): Update.
3283 (detach_or_kill_inferior_callback): Update.
3284 (print_started_pid): Update.
3285 (print_attached_pid): Update.
3286 (process_serial_event): Simplify read of ptid.
3287 * thread-db.c (thread_db_create_event): Update.
3288 (thread_db_get_tls_address): Update.
3289 * win32-low.c (current_inferior_ptid): Simplify.
3290
3291 2014-02-19 Tom Tromey <tromey@redhat.com>
3292
3293 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3294 argument.
3295 (target_supports_btrace): Update.
3296
3297 2014-02-14 Yao Qi <yao@codesourcery.com>
3298
3299 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3300 (rsp-low-ipa.o): New target.
3301
3302 2014-02-12 Tom Tromey <tromey@redhat.com>
3303
3304 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3305 convert_ascii_to_int.
3306 * regcache.c (registers_to_string): Likewise.
3307 * remote-utils.c (decode_M_packet): Likewise.
3308 * server.c (process_serial_event): Likewise.
3309
3310 2014-02-12 Tom Tromey <tromey@redhat.com>
3311
3312 * server.c (handle_query, handle_v_run): Use hex2bin, not
3313 unhexify.
3314 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3315
3316 2014-02-12 Tom Tromey <tromey@redhat.com>
3317
3318 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3319 convert_int_to_ascii.
3320 * regcache.c (registers_to_string, collect_register_as_string):
3321 Likewise.
3322 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3323 Likewise.
3324 * server.c (process_serial_event): Likewise.
3325 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3326 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3327
3328 2014-02-12 Tom Tromey <tromey@redhat.com>
3329
3330 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3331 bin2hex, not hexify.
3332 * tracepoint.c (cmd_qtstatus): Likewise.
3333
3334 2014-02-12 Tom Tromey <tromey@redhat.com>
3335
3336 * remote-utils.c (monitor_output): Pass explicit length to
3337 hexify.
3338
3339 2014-02-12 Tom Tromey <tromey@redhat.com>
3340
3341 * tracepoint.c: Include rsp-low.h.
3342 * server.c: Include rsp-low.h.
3343 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3344 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3345 declare.
3346 * remote-utils.c: Include rsp-low.h.
3347 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3348 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3349 (convert_int_to_ascii, convert_ascii_to_int): Move to
3350 common/rsp-low.c.
3351 * regcache.c: Include rsp-low.h.
3352 * ax.c: Include rsp-low.h.
3353 * Makefile.in (SFILES): Add common/rsp-low.c.
3354 (OBS): Add rsp-low.o.
3355 (rsp-low.o): New target.
3356
3357 2014-02-12 Tom Tromey <tromey@redhat.com>
3358
3359 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3360 Include print-utils.h.
3361 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3362 (plongest, thirty_two, phex_nz): Remove.
3363 * Makefile.in (SFILES): Add common/print-utils.c.
3364 (OBS): Add print-utils.o.
3365 (print-utils-ipa.o): New target.
3366 (print-utils.o): New target.
3367 (IPA_OBJS): Add print-utils-ipa.o.
3368
3369 2014-02-06 Tom Tromey <tromey@redhat.com>
3370
3371 * Makefile.in (SFILES): Fix indentation.
3372
3373 2014-02-05 Doug Evans <dje@google.com>
3374
3375 * linux-low.c (linux_wait_for_event): Improve comment.
3376 (linux_wait_1): Keep current_inferior in sync with event_child.
3377
3378 2014-01-22 Doug Evans <dje@google.com>
3379
3380 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3381
3382 2014-01-22 Doug Evans <dje@google.com>
3383
3384 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3385 * configure: Regenerate.
3386 * config.in: Regenerate.
3387 * Makefile.in (SFILES): Add debug.c.
3388 (OBS): Add debug.o.
3389 * debug.c: New file.
3390 * debug.h: New file.
3391 * linux-aarch64-low.c (*): Update all debugging printfs to use
3392 debug_printf instead of fprintf.
3393 * linux-arm-low.c (*): Ditto.
3394 * linux-cris-low.c (*): Ditto.
3395 * linux-crisv32-low.c (*): Ditto.
3396 * linux-m32r-low.c (*): Ditto.
3397 * linux-sparc-low.c (*): Ditto.
3398 * linux-x86.c (*): Ditto.
3399 * linux-low.c (*): Ditto.
3400 (linux_wait_1): Add calls to debug_enter, debug_exit.
3401 (linux_wait): Remove redundant debugging printf.
3402 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3403 (linux_resume, unstop_all_lwps): Ditto.
3404 * mem-break.c (*): Update all debugging printfs to use
3405 debug_printf instead of fprintf.
3406 * remote-utils.c (*): Ditto.
3407 * thread-db.c (*): Ditto.
3408 * server.c #include <ctype.h>, "gdb_vecs.h".
3409 (debug_threads): Moved to debug.c.
3410 (*): Update all debugging printfs to use debug_printf instead of
3411 fprintf.
3412 (start_inferior): Replace call to fflush with call to debug_flush.
3413 (monitor_show_help): Mention set debug-format.
3414 (parse_debug_format_options): New function.
3415 (handle_monitor_command): Handle "monitor set debug-format".
3416 (gdbserver_usage): Mention --debug-format.
3417 (main): Parse --debug-format.
3418 * server.h (debug_threads): Declaration moved to debug.h.
3419 #include "debug.h".
3420 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3421 trace_debug_1 that uses debug_printf.
3422 (tracepoint_look_up_symbols): Update all debugging printfs to use
3423 debug_printf instead of fprintf.
3424
3425 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3426
3427 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3428 sys/ptrace.h.
3429
3430 2014-01-17 Pedro Alves <palves@redhat.com>
3431
3432 PR build/16445
3433 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3434 defined after including gdb_proc_service.h.
3435
3436 2014-01-16 Doug Evans <dje@google.com>
3437
3438 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3439 (match_dll): Use it.
3440
3441 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3442
3443 * target.h (target_ops) <read_btrace>: Change parameters and
3444 return type to allow error reporting.
3445 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3446 trace reading errors on.
3447 * linux-low.c (linux_low_read_btrace): Pass trace reading
3448 errors on.
3449 (linux_low_disable_btrace): New.
3450
3451 2014-01-15 Doug Evans <dje@google.com>
3452
3453 * inferiors.c (thread_id_to_gdb_id): Delete.
3454 * inferiors.h (thread_id_to_gdb_id): Delete.
3455
3456 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3457
3458 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3459 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3460 versions.
3461
3462 2014-01-08 Pedro Alves <palves@redhat.com>
3463
3464 * server.c (handle_status): Don't discard previous queued stop
3465 replies or thread's pending status here.
3466 (main) <disconnection>: Do it here instead.
3467
3468 2014-01-08 Pedro Alves <palves@redhat.com>
3469
3470 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3471 * server.c (visit_actioned_threads, handle_pending_status): New
3472 function.
3473 (handle_v_cont): Factor out parts to ...
3474 (resume): ... this new function. If in all-stop, and a thread
3475 being resumed has a pending status, report it without actually
3476 resuming.
3477 (myresume): Adjust to use the new 'resume' function.
3478 (clear_pending_status_callback, set_pending_status_callback)
3479 (find_status_pending_thread_callback): New functions.
3480 (handle_status): Handle the case of multiple threads having
3481 interesting statuses to report. Report threads' real last signal
3482 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3483 with an interesting thread to report the status for, instead of
3484 always reporting the status of the first thread.
3485
3486 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3487
3488 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3489 * gdbreplay.c (gdbreplay_version): Likewise.
3490
3491 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3492
3493 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3494 iov.iov_len with the real length in use.
3495
3496 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3497
3498 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3499 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3500 for all targets that use win32-low.c.
3501 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3502 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3503
3504 2013-12-13 Pedro Alves <palves@redhat.com>
3505
3506 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3507 if equal to TARGET_WAITKIND_LOADED.
3508 * win32-low.c (cached_status): New static global.
3509 (win32_wait): Add declaration.
3510 (do_initial_child_stuff): Flush all initial pending debug events
3511 up to the initial breakpoint.
3512 (win32_wait): If CACHED_STATUS was set, return that instead
3513 of doing a real wait. Remove the code resuming the execution
3514 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3515 during the initial phase. Also remove the code changing
3516 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3517 TARGET_WAITKIND_STOPPED.
3518
3519 2013-12-11 Yao Qi <yao@codesourcery.com>
3520
3521 * notif.c (handle_notif_ack): Return 0 if no notification
3522 matches.
3523
3524 2013-11-20 Doug Evans <dje@google.com>
3525
3526 * linux-low.c (linux_set_resume_request): Fix comment.
3527
3528 2013-11-20 Doug Evans <dje@google.com>
3529
3530 * linux-low.c (resume_status_pending_p): Tweak comment.
3531
3532 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3533
3534 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3535 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3536 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3537 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3538 (srv_amd64_regobj): Add amd64-mpx.o.
3539 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3540 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3541 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3542 * i387-fp.c (num_pl_bnd_register) Added constant.
3543 (num_pl_bnd_cfg_registers) Added constant.
3544 (struct i387_xsave) Added reserved area and MPX fields.
3545 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3546 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3547 function.
3548 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3549 (init_registers_amd64_mpx_linux): Declare new function.
3550 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3551 (x86_64_regmap): Add MPX registers.
3552 (x86_linux_read_description): Add MPX case.
3553 (initialize_low_arch): Initialize MPX targets.
3554
3555 2013-11-18 Tom Tromey <tromey@redhat.com>
3556
3557 * configure: Rebuild.
3558 * configure.ac: Don't check for stdlib.h.
3559 * gdbreplay.c: Unconditionally include stdlib.h.
3560
3561 2013-11-18 Tom Tromey <tromey@redhat.com>
3562
3563 * config.in: Rebuild.
3564 * configure: Rebuild.
3565 * configure.ac: Don't use AC_HEADER_DIRENT.
3566
3567 2013-11-18 Tom Tromey <tromey@redhat.com>
3568
3569 * server.h: Don't check HAVE_STRING_H.
3570 * gdbreplay.c: Don't check HAVE_STRING_H.
3571 * configure: Rebuild.
3572
3573 2013-11-18 Tom Tromey <tromey@redhat.com>
3574
3575 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3576 LIBGNU.
3577
3578 2013-11-08 Tom Tromey <tromey@redhat.com>
3579
3580 * configure, config.in: Rebuild.
3581 * configure.ac: Remove unused configury.
3582
3583 2013-11-08 Tom Tromey <tromey@redhat.com>
3584
3585 * acinclude.m4: Include common.m4, codeset.m4.
3586 * configure, config.in: Rebuild.
3587 * configure.ac: Use GDB_AC_COMMON.
3588
3589 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3590
3591 * linux-s390-low.c (HWCAP_S390_TE): New define.
3592 (s390_arch_setup): Consider the TE field in the HWCAP for
3593 determining 'have_regset_tdb'.
3594
3595 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3596
3597 PR gdb/16014
3598 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3599 call to sizeof.
3600
3601 2013-10-02 Pedro Alves <palves@redhat.com>
3602
3603 * server.c (process_serial_event): Don't output "GDBserver
3604 exiting" if GDB is connected through stdio.
3605 * target.c (mywait): Likewise, be silent if GDB is connected
3606 through stdio.
3607
3608 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3609
3610 * lynx-low.c (lynx_add_threads_after_attach): New function.
3611 (lynx_attach): Remove call to add_thread. Add call to
3612 lynx_add_threads_after_attach instead.
3613
3614 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3615
3616 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3617 * config.in, configure: Regenerated.
3618
3619 2013-09-18 Yao Qi <yao@codesourcery.com>
3620
3621 PR server/15959
3622 * server.c (start_inferior): Clear 'resume_info'.
3623
3624 2013-09-16 Jiong Wang <jiwang@tilera.com>
3625
3626 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3627 for each register.
3628
3629 2013-09-16 Jiong Wang <jiwang@tilera.com>
3630
3631 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3632 linux-tile-low.o to srv_tgtobj.
3633
3634 2013-09-16 Will Newton <will.newton@linaro.org>
3635
3636 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3637 out regs.
3638
3639 2013-09-06 Pedro Alves <palves@redhat.com>
3640
3641 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3642 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3643 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3644 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3645 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3646 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3647
3648 2013-09-06 Pedro Alves <palves@redhat.com>
3649
3650 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3651 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3652
3653 2013-09-06 Pedro Alves <palves@redhat.com>
3654
3655 * linux-amd64-ipa.c: Include tracepoint.h.
3656 * linux-i386-ipa.c: Include tracepoint.h.
3657
3658 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3659
3660 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3661 (ps_get_thread_area): New function.
3662
3663 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3664
3665 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3666 (initialize_low_arch): Call init_registers_crisv32 rather than
3667 init_register_crisv32.
3668
3669 2013-09-05 Pedro Alves <palves@redhat.com>
3670
3671 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3672 to ...
3673 * hostio.h: ... this new file.
3674 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3675 win32-low.c: Include hostio.h.
3676
3677 2013-09-05 Pedro Alves <palves@redhat.com>
3678
3679 * server.h (gdb_client_data, handler_func, callback_handler_func)
3680 (delete_file_handler, add_file_handler, append_callback_event)
3681 (delete_callback_event, start_event_loop, initialize_event_loop):
3682 Move to event-loop.h and include it.
3683 * event-loop.h: New file.
3684
3685 2013-09-05 Pedro Alves <palves@redhat.com>
3686
3687 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3688 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3689 (loaded_dll, unloaded_dll): Move to ...
3690 * dll.h: ... this new file.
3691 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3692
3693 2013-09-05 Pedro Alves <palves@redhat.com>
3694
3695 * server.h (current_process, get_thread_process, all_processes)
3696 (add_inferior_to_list, for_each_inferior, current_inferior)
3697 (remove_inferior, add_process, remove_process, find_process_pid)
3698 (have_started_inferiors_p, have_attached_inferiors_p)
3699 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3700 (clear_inferiors, find_inferior, find_inferior_id)
3701 (inferior_target_data, set_inferior_target_data)
3702 (inferior_regcache_data, set_inferior_regcache_data): Move to
3703 inferiors.h, and include it.
3704 * inferiors.h: New file.
3705
3706 2013-09-05 Pedro Alves <palves@redhat.com>
3707
3708 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3709 Move ...
3710 * ax.h: ... here.
3711
3712 2013-09-05 Pedro Alves <palves@redhat.com>
3713
3714 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3715 tracepoint.h.
3716 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3717 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3718 (handle_tracepoint_general_set, handle_tracepoint_query)
3719 (tracepoint_finished_step, tracepoint_was_hit)
3720 (release_while_stepping_state_list, current_traceframe)
3721 (in_readonly_region, traceframe_read_mem)
3722 (fetch_traceframe_registers, traceframe_read_sdata)
3723 (traceframe_read_info, struct fast_tpoint_collect_status)
3724 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3725 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3726 (supply_fast_tracepoint_registers)
3727 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3728 (ipa_tdesc, claim_trampoline_space)
3729 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3730 (agent_mem_read, agent_get_trace_state_variable_value)
3731 (agent_set_trace_state_variable_value, agent_tsv_read)
3732 (agent_mem_read_string, get_raw_reg_func_addr)
3733 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3734 * tracepoint.h: ... this new file.
3735
3736 2013-09-05 Pedro Alves <palves@redhat.com>
3737
3738 * server.h (perror_with_name, error, fatal, warning, paddress)
3739 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3740 include it.
3741 * utils.h: New file.
3742
3743 2013-09-05 Pedro Alves <palves@redhat.com>
3744
3745 * server.h (remote_debug, noack_mode, transport_is_reliable)
3746 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3747 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3748 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3749 (write_enn, initialize_async_io, enable_async_io)
3750 (disable_async_io, check_remote_input_interrupt_request)
3751 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3752 (dead_thread_notify, prepare_resume_reply)
3753 (decode_address_to_semicolon, decode_address, decode_m_packet)
3754 (decode_M_packet, decode_X_packet, decode_xfer_write)
3755 (decode_search_memory_packet, unhexify, hexify)
3756 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3757 (look_up_one_symbol, relocate_instruction)
3758 (monitor_output): Move to remote-utils.h, and include it.
3759 * remote-utils.h: New file.
3760
3761 2013-09-05 Pedro Alves <palves@redhat.com>
3762
3763 * server.h (_): Delete.
3764
3765 2013-09-02 Pedro Alves <palves@redhat.com>
3766
3767 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3768 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3769 allocated.
3770 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3771
3772 2013-09-02 Pierre Muller <muller@sourceware.org>
3773
3774 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3775 or WriteProcessMemory complete successfully and handle
3776 ERROR_PARTIAL_COPY error.
3777
3778 2013-09-02 Pedro Alves <palves@redhat.com>
3779
3780 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3781 error instead of EIO.
3782
3783 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3784
3785 PR server/15604
3786 * linux-low.c: Include filestuff.h.
3787 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3788 * lynx-low.c: Include filestuff.h.
3789 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3790 * server.c: Include filestuff.h.
3791 (main): Call notice_open_fds.
3792 * spu-low.c: Include filestuff.h.
3793 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3794
3795 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3796
3797 * Makefile.in: Explain why ../target and ../nat are not
3798 listed as include file search paths.
3799 (linux-waitpid.o): New object file rule.
3800 * configure.srv (srv_native_linux_obj): New variable.
3801 Replace all occurrences of linux native object files with
3802 $srv_native_linux_obj.
3803 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3804 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3805 (linux_enable_event_reporting): Remove declaration.
3806 (my_waitpid): Moved to common/linux-waitpid.c.
3807 (linux_wait_for_event): Pass ptid when calling
3808 linux_enable_event_reporting.
3809 (linux_supports_tracefork_flag): Remove.
3810 (linux_enable_event_reporting): Likewise.
3811 (linux_tracefork_grandchild): Remove.
3812 (STACK_SIZE): Moved to common/linux-ptrace.c.
3813 (linux_tracefork_child): Remove.
3814 (linux_test_for_tracefork): Remove.
3815 (linux_look_up_symbols): Call linux_supports_traceclone.
3816 (initialize_low): Remove call to linux_test_for_tracefork.
3817 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3818 common/linux-ptrace.h.
3819 (PTRACE_TYPE_ARG4): Likewise.
3820 Include linux-ptrace.h.
3821
3822 2013-08-21 Pedro Alves <palves@redhat.com>
3823
3824 * config.in: Renegerate.
3825
3826 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3827
3828 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3829 (SFILES): Remove $(srcdir)/common/target-common.c and
3830 add $(srcdir)/target/waitstatus.c.
3831 (OBS): Remove target-common.o and add waitstatus.o.
3832 (server_h): Remove $(srcdir)/../common/target-common.h and
3833 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3834 and $(srcdir)/../target/waitstatus.h.
3835 (target-common.o): Remove.
3836 (waitstatus.o): New target object file.
3837 * target.h: Do not include target-common.h and
3838 include target/resume.h, target/wait.h and
3839 target/waitstatus.h.
3840
3841 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3842
3843 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3844 to PTRACE_TYPE_ARG3.
3845 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3846 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3847 PTRACE_TYPE_ARG4.
3848 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3849 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3850
3851 2013-07-27 Jie Zhang <jie@codesourcery.com>
3852 Daniel Jacobowitz <dan@codesourcery.com>
3853 Yao Qi <yao@codesourcery.com>
3854
3855 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3856 (mips-linux-watch.o): New rule.
3857 (mips_linux_watch_h): New variable.
3858 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3859 srv_tgtobj.
3860 * linux-mips-low.c: Include mips-linux-watch.h.
3861 (struct arch_process_info, struct arch_lwp_info): New.
3862 (update_watch_registers_callback): New function.
3863 (mips_linux_new_process, mips_linux_new_thread) New functions.
3864 (mips_linux_prepare_to_resume, mips_insert_point): New
3865 functions.
3866 (mips_remove_point, mips_stopped_by_watchpoint): New
3867 functions.
3868 (rsp_bp_type_to_target_hw_bp_type): New function.
3869 (mips_stopped_data_address): New function.
3870 (the_low_target): Add watchpoint support functions.
3871
3872 2013-07-27 Yao Qi <yao@codesourcery.com>
3873
3874 * i386-low.c: Include break-common.h.
3875 (enum target_hw_bp_type): Remove.
3876
3877 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3878
3879 * Makefile.in (SFILES): /common/target-common.c.
3880 (OBS): Add target-common.o.
3881 (server_h): Add $(srcdir)/../common/target-common.h.
3882 (target-common.o): New target.
3883 * server.c (queue_stop_reply_callback): Free
3884 status string after use.
3885 * target.c (target_waitstatus_to_string): Remove.
3886 * target.h: Include target-common.h.
3887 (resume_kind): Likewise.
3888 (target_waitkind): Likewise.
3889 (target_waitstatus): Likewise.
3890 (TARGET_WNOHANG): Likewise.
3891
3892 2013-07-04 Yao Qi <yao@codesourcery.com>
3893
3894 * Makefile.in (host_alias): Use @host_noncanonical@.
3895 (target_alias): Use @target_noncanonical@.
3896 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3897 ACX_NONCANONICAL_HOST.
3898 * configure: Regenerated.
3899
3900 Revert:
3901 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3902
3903 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3904 * configure: Rebuild.
3905 * Makefile.in (version_host, version_target): Get from configure.
3906 (version.c): Use $(version_host) and $(version_target).
3907
3908 2013-07-03 Pedro Alves <palves@redhat.com>
3909
3910 * Makefile.in (config.status): Depend on development.sh.
3911 * acinclude.m4: Include libmcheck.m4.
3912 * configure: Regenerate.
3913
3914 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3915
3916 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3917 attribute inside the parentheses.
3918 (winapi_DebugSetProcessKillOnExit): Ditto.
3919 (winapi_DebugBreakProcess): Ditto.
3920 (winapi_GenerateConsoleCtrlEvent): Ditto.
3921
3922 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3923
3924 * notif.h (notif_event): Add a dummy member to avoid compiler
3925 errors.
3926
3927 2013-07-01 Pedro Alves <palves@redhat.com>
3928
3929 * hostio.c (HOSTIO_PATH_MAX): Define.
3930 (require_filename, handle_open, handle_unlink, handle_readlink):
3931 Use it.
3932
3933 2013-07-01 Pedro Alves <palves@redhat.com>
3934
3935 * server.h: Include "pathmax.h".
3936 * linux-low.c: Don't include sys/param.h.
3937 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3938 MAXPATHLEN.
3939 * win32-low.c: Don't include sys/param.h.
3940 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3941
3942 2013-07-01 Pedro Alves <palves@redhat.com>
3943
3944 * event-loop.c: Don't check HAVE_UNISTD_H before including
3945 <unistd.h>.
3946 * gdbreplay.c: Likewise.
3947 * remote-utils.c: Likewise.
3948 * server.c: Likewise.
3949 * configure.ac: Don't check for unistd.h.
3950 * configure: Regenerate.
3951
3952 2013-06-28 Tom Tromey <tromey@redhat.com>
3953
3954 * Makefile.in (version.c): Use version.in, not
3955 common/version.in.
3956
3957 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3958
3959 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3960 * configure: Rebuild.
3961 * Makefile.in (version_host, version_target): Get from configure.
3962 (version.c): Use $(version_host) and $(version_target).
3963
3964 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3965
3966 Fix trace-status to output user name without trailing colon.
3967 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3968
3969 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3970
3971 Fix trace-status to output proper start-time and stop-time.
3972 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3973 output start time and stop time in hex as gdb expects.
3974
3975 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3976
3977 * tracepoint.c (build_traceframe_info_xml): Output trace state
3978 variables present in the trace buffer.
3979
3980 2013-06-24 Tom Tromey <tromey@redhat.com>
3981
3982 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3983 create-version.sh.
3984 (version.o): Remove.
3985 * gdbreplay.c: Include version.h.
3986 (version, host_name): Don't declare.
3987 * server.h: Include version.h.
3988 (version, host_name): Don't declare.
3989
3990 2013-06-12 Pedro Alves <palves@redhat.com>
3991
3992 * linux-x86-low.c (linux_is_elf64): Delete global.
3993 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3994 with local linux_pid_exe_is_elf_64_file use.
3995
3996 2013-06-11 Pedro Alves <palves@redhat.com>
3997
3998 * linux-low.c (regset_disabled, disable_regset): New functions.
3999 (regsets_fetch_inferior_registers)
4000 (regsets_store_inferior_registers): Use them.
4001 (initialize_regsets_info); Don't allocate the disabled_regsets
4002 array here.
4003 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4004 comment.
4005
4006 2013-06-11 Pedro Alves <palves@redhat.com>
4007
4008 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4009 xmalloc.
4010
4011 2013-06-11 Pedro Alves <palves@redhat.com>
4012
4013 * linux-x86-low.c (initialize_low_arch): Call
4014 init_registers_x32_avx_linux.
4015
4016 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4017
4018 Fix compatibility with Android Bionic.
4019 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4020 it is not empty.
4021
4022 2013-06-07 Pedro Alves <palves@redhat.com>
4023
4024 PR server/14823
4025 * Makefile.in (OBS): Add tdesc.o.
4026 (IPA_OBJS): Add tdesc-ipa.o.
4027 (tdesc-ipa.o): New rule.
4028 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4029 interface.
4030 * linux-low.c (new_inferior): Delete.
4031 (disabled_regsets, num_regsets): Delete.
4032 (linux_add_process): Adjust to set the new per-process
4033 new_inferior flag.
4034 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4035 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4036 was a stop. When calling arch_setup, switch the current inferior
4037 to the thread that got an event.
4038 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4039 (regsets_fetch_inferior_registers)
4040 (regsets_store_inferior_registers): New regsets_info parameter.
4041 Adjust to use it.
4042 (linux_register_in_regsets): New regs_info parameter. Adjust to
4043 use it.
4044 (register_addr, fetch_register, store_register): New usrregs_info
4045 parameter. Adjust to use it.
4046 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4047 parameter regs_info. Adjust to use it.
4048 (linux_fetch_registers): Get the current inferior's regs_info, and
4049 adjust to use it.
4050 (linux_store_registers): Ditto.
4051 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4052 (initialize_low): Don't initialize the target_regsets here. Call
4053 initialize_low_arch.
4054 * linux-low.h (target_regsets): Delete declaration.
4055 (struct regsets_info): New.
4056 (struct usrregs_info): New.
4057 (struct regs_info): New.
4058 (struct process_info_private) <new_inferior>: New field.
4059 (struct linux_target_ops): Delete the num_regs, regmap, and
4060 regset_bitmap fields. New field regs_info.
4061 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4062 * i387-fp.c (num_xmm_registers): Delete.
4063 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4064 calls to new interface.
4065 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4066 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4067 Infer the number of xmm registers from the regcache's target
4068 description.
4069 * i387-fp.h (num_xmm_registers): Delete.
4070 * inferiors.c (add_thread): Don't install the thread's regcache
4071 here.
4072 * proc-service.c (gregset_info): Fetch the current inferior's
4073 regs_info. Adjust to use it.
4074 * regcache.c: Include tdesc.h.
4075 (register_bytes, reg_defs, num_registers)
4076 (gdbserver_expedite_regs): Delete.
4077 (get_thread_regcache): If the thread doesn't have a regcache yet,
4078 create one, instead of aborting gdbserver.
4079 (regcache_invalidate_one): Rename to ...
4080 (regcache_invalidate_thread): ... this.
4081 (regcache_invalidate_one): New.
4082 (regcache_invalidate): Only invalidate registers of the current
4083 process.
4084 (init_register_cache): Add target_desc parameter, and use it.
4085 (new_register_cache): Ditto. Assert the target description has a
4086 non zero registers_size.
4087 (regcache_cpy): Add assertions. Adjust.
4088 (realloc_register_cache, set_register_cache): Delete.
4089 (registers_to_string, registers_from_string): Adjust.
4090 (find_register_by_name, find_regno, find_register_by_number)
4091 (register_cache_size): Add target_desc parameter, and use it.
4092 (free_register_cache_thread, free_register_cache_thread_one)
4093 (regcache_release, register_cache_size): New.
4094 (register_size): Add target_desc parameter, and use it.
4095 (register_data, supply_register, supply_register_zeroed)
4096 (supply_regblock, supply_register_by_name, collect_register)
4097 (collect_register_as_string, collect_register_by_name): Adjust.
4098 * regcache.h (struct target_desc): Forward declare.
4099 (struct regcache) <tdesc>: New field.
4100 (init_register_cache, new_register_cache): Add target_desc
4101 parameter.
4102 (regcache_invalidate_thread): Declare.
4103 (regcache_invalidate_one): Delete declaration.
4104 (regcache_release): Declare.
4105 (find_register_by_number, register_cache_size, register_size)
4106 (find_regno): Add target_desc parameter.
4107 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4108 declarations.
4109 * remote-utils.c: Include tdesc.h.
4110 (outreg, prepare_resume_reply): Adjust.
4111 * server.c: Include tdesc.h.
4112 (gdbserver_xmltarget): Delete declaration.
4113 (get_features_xml, process_serial_event): Adjust.
4114 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4115 declare.
4116 (struct process_info) <tdesc>: New field.
4117 (ipa_tdesc): Declare.
4118 * tdesc.c: New file.
4119 * tdesc.h: New file.
4120 * tracepoint.c: Include tdesc.h.
4121 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4122 (get_context_regcache): Adjust to pass ipa_tdesc down.
4123 (do_action_at_tracepoint): Adjust to get the register cache size
4124 from the context regcache's description.
4125 (traceframe_walk_blocks): Adjust to get the register cache size
4126 from the current trace frame's description.
4127 (traceframe_get_pc): Adjust to get current trace frame's
4128 description and pass it down.
4129 (gdb_collect): Adjust to get the register cache size from the
4130 IPA's description.
4131 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4132 (gdbserver_xmltarget): Delete.
4133 (initialize_low_tracepoint): Set the ipa's target description.
4134 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4135 (initialize_low_tracepoint): Set the ipa's target description.
4136 * linux-x86-low.c: Include tdesc.h.
4137 [__x86_64__] (is_64bit_tdesc): New.
4138 (ps_get_thread_area, x86_get_thread_area): Use it.
4139 (i386_cannot_store_register): Rename to ...
4140 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4141 (i386_cannot_fetch_register): Rename to ...
4142 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4143 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4144 to new interface.
4145 (target_regsets): Rename to ...
4146 (x86_regsets): ... this.
4147 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4148 interface.
4149 (x86_siginfo_fixup): Use is_64bit_tdesc.
4150 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4151 (tdesc_x32_avx_linux, tdesc_x32_linux)
4152 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4153 Declare.
4154 (x86_linux_update_xmltarget): Delete.
4155 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4156 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4157 (AMD64_LINUX_USER64_CS): New.
4158 (x86_linux_read_description): New, based on
4159 x86_linux_update_xmltarget.
4160 (same_process_callback): New.
4161 (x86_arch_setup_process_callback): New.
4162 (x86_linux_update_xmltarget): New.
4163 (x86_regsets_info): New.
4164 (amd64_linux_regs_info): New.
4165 (i386_linux_usrregs_info): New.
4166 (i386_linux_regs_info): New.
4167 (x86_linux_regs_info): New.
4168 (x86_arch_setup): Reimplement.
4169 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4170 (x86_emit_ops): Ditto.
4171 (the_low_target): Adjust. Install x86_linux_regs_info,
4172 x86_cannot_fetch_register, and x86_cannot_store_register.
4173 (initialize_low_arch): New.
4174 * linux-ia64-low.c (tdesc_ia64): Declare.
4175 (ia64_fetch_register): Adjust.
4176 (ia64_usrregs_info, regs_info): New globals.
4177 (ia64_regs_info): New function.
4178 (the_low_target): Adjust.
4179 (initialize_low_arch): New function.
4180 * linux-sparc-low.c (tdesc_sparc64): Declare.
4181 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4182 Adjust.
4183 (sparc_arch_setup): New function.
4184 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4185 (the_low_target): Adjust.
4186 (initialize_low_arch): New function.
4187 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4188 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4189 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4190 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4191 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4192 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4193 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4194 (tdesc_powerpc_isa205_vsx64l): Declare.
4195 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4196 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4197 (ppc_set_pc, ppc_get_hwcap): Adjust.
4198 (ppc_usrregs_info): Forward declare.
4199 (!__powerpc64__) ppc_regmap_adjusted: New global.
4200 (ppc_arch_setup): Adjust to the current process'es target
4201 description.
4202 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4203 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4204 (ppc_store_evrregset): Adjust.
4205 (target_regsets): Rename to ...
4206 (ppc_regsets): ... this, and make static.
4207 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4208 (ppc_regs_info): New function.
4209 (the_low_target): Adjust.
4210 (initialize_low_arch): New function.
4211 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4212 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4213 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4214 (tdesc_s390x_linux64v2): Declare.
4215 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4216 (s390_fill_gregset, s390_store_last_break): Adjust.
4217 (target_regsets): Rename to ...
4218 (s390_regsets): ... this, and make static.
4219 (s390_get_pc, s390_set_pc): Adjust.
4220 (s390_get_hwcap): New target_desc parameter, and use it.
4221 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4222 (s390_arch_setup): Adjust to set the current process'es target
4223 description. Don't adjust the regmap.
4224 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4225 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4226 (regs_info_3264): New globals.
4227 (s390_regs_info): New function.
4228 (the_low_target): Adjust.
4229 (initialize_low_arch): New function.
4230 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4231 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4232 [__mips64] (init_registers_mips_linux)
4233 (init_registers_mips_dsp_linux): Delete defines.
4234 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4235 (have_dsp): New global.
4236 (mips_read_description): New, based on mips_arch_setup.
4237 (mips_arch_setup): Reimplement.
4238 (get_usrregs_info): New function.
4239 (mips_cannot_fetch_register, mips_cannot_store_register)
4240 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4241 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4242 (target_regsets): Rename to ...
4243 (mips_regsets): ... this, and make static.
4244 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4245 (dsp_regs_info, regs_info): New globals.
4246 (mips_regs_info): New function.
4247 (the_low_target): Adjust.
4248 (initialize_low_arch): New function.
4249 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4250 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4251 Declare.
4252 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4253 (arm_read_description): New, with bits factored from
4254 arm_arch_setup.
4255 (arm_arch_setup): Reimplement.
4256 (target_regsets): Rename to ...
4257 (arm_regsets): ... this, and make static.
4258 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4259 (arm_regs_info): New function.
4260 (the_low_target): Adjust.
4261 (initialize_low_arch): New function.
4262 * linux-m68k-low.c (tdesc_m68k): Declare.
4263 (target_regsets): Rename to ...
4264 (m68k_regsets): ... this, and make static.
4265 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4266 (m68k_regs_info): New function.
4267 (m68k_arch_setup): New function.
4268 (the_low_target): Adjust.
4269 (initialize_low_arch): New function.
4270 * linux-sh-low.c (tdesc_sharch): Declare.
4271 (target_regsets): Rename to ...
4272 (sh_regsets): ... this, and make static.
4273 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4274 (sh_regs_info, sh_arch_setup): New functions.
4275 (the_low_target): Adjust.
4276 (initialize_low_arch): New function.
4277 * linux-bfin-low.c (tdesc_bfin): Declare.
4278 (bfin_arch_setup): New function.
4279 (bfin_usrregs_info, regs_info): New globals.
4280 (bfin_regs_info): New function.
4281 (the_low_target): Adjust.
4282 (initialize_low_arch): New function.
4283 * linux-cris-low.c (tdesc_cris): Declare.
4284 (cris_arch_setup): New function.
4285 (cris_usrregs_info, regs_info): New globals.
4286 (cris_regs_info): New function.
4287 (the_low_target): Adjust.
4288 (initialize_low_arch): New function.
4289 * linux-cris-low.c (tdesc_crisv32): Declare.
4290 (cris_arch_setup): New function.
4291 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4292 (cris_regs_info): New function.
4293 (the_low_target): Adjust.
4294 (initialize_low_arch): New function.
4295 * linux-m32r-low.c (tdesc_m32r): Declare.
4296 (m32r_arch_setup): New function.
4297 (m32r_usrregs_info, regs_info): New globals.
4298 (m32r_regs_info): Adjust.
4299 (initialize_low_arch): New function.
4300 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4301 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4302 (tic6x_usrregs_info): Forward declare.
4303 (tic6x_read_description): New function, based on ...
4304 (tic6x_arch_setup): ... this. Reimplement.
4305 (target_regsets): Rename to ...
4306 (tic6x_regsets): ... this, and make static.
4307 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4308 (tic6x_regs_info): New function.
4309 (the_low_target): Adjust.
4310 (initialize_low_arch): New function.
4311 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4312 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4313 (target_regsets): Rename to ...
4314 (xtensa_regsets): ... this, and make static.
4315 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4316 globals.
4317 (xtensa_arch_setup, xtensa_regs_info): New functions.
4318 (the_low_target): Adjust.
4319 (initialize_low_arch): New function.
4320 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4321 (nios2_arch_setup): Set the current process'es tdesc.
4322 (target_regsets): Rename to ...
4323 (nios2_regsets): ... this.
4324 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4325 (nios2_regs_info): New function.
4326 (the_low_target): Adjust.
4327 (initialize_low_arch): New function.
4328 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4329 (aarch64_arch_setup): Set the current process'es tdesc.
4330 (target_regsets): Rename to ...
4331 (aarch64_regsets): ... this.
4332 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4333 (aarch64_regs_info): New function.
4334 (the_low_target): Adjust.
4335 (initialize_low_arch): New function.
4336 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4337 globals.
4338 (target_regsets): Rename to ...
4339 (tile_regsets): ... this.
4340 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4341 (tile_regs_info): New function.
4342 (tile_arch_setup): Set the current process'es tdesc.
4343 (the_low_target): Adjust.
4344 (initialize_low_arch): New function.
4345 * spu-low.c (tdesc_spu): Declare.
4346 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4347 * win32-arm-low.c (tdesc_arm): Declare.
4348 (arm_arch_setup): New function.
4349 (the_low_target): Install arm_arch_setup instead of
4350 init_registers_arm.
4351 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4352 (init_windows_x86): Rename to ...
4353 (i386_arch_setup): ... this. Set `win32_tdesc'.
4354 (the_low_target): Adjust.
4355 * win32-low.c (win32_tdesc): New global.
4356 (child_add_thread): Don't create the thread cache here.
4357 (do_initial_child_stuff): Set the new process'es tdesc.
4358 * win32-low.h (struct target_desc): Forward declare.
4359 (win32_tdesc): Declare.
4360 * lynx-i386-low.c (tdesc_i386): Declare global.
4361 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4362 * lynx-low.c (lynx_tdesc): New global.
4363 (lynx_add_process): Set the new process'es tdesc.
4364 * lynx-low.h (struct target_desc): Forward declare.
4365 (lynx_tdesc): Declare global.
4366 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4367 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4368 * nto-low.c (nto_tdesc): New global.
4369 (do_attach): Set the new process'es tdesc.
4370 * nto-low.h (struct target_desc): Forward declare.
4371 (nto_tdesc): Declare.
4372 * nto-x86-low.c (tdesc_i386): Declare.
4373 (nto_x86_arch_setup): Set `nto_tdesc'.
4374
4375 2013-06-04 Gary Benson <gbenson@redhat.com>
4376
4377 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4378 to qSupported response when appropriate.
4379 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4380 with nonzero-length annex.
4381 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4382 arguments supplied in annex.
4383
4384 2013-05-31 Doug Evans <dje@google.com>
4385
4386 PR server/15594
4387 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4388 64 bits in 64-cross-32 environment.
4389
4390 2013-05-28 Pedro Alves <palves@redhat.com>
4391
4392 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4393 (aarch64-without-fpu.c): Delete rule.
4394 * configure.srv (aarch64*-*-linux*): Remove references to
4395 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4396 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4397 declaration.
4398
4399 2013-05-24 Pedro Alves <palves@redhat.com>
4400
4401 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4402 instead of strchr/decode_address. Error if the range isn't split
4403 with a ','. Don't assume there's be a ':' in the action.
4404
4405 2013-05-23 Yao Qi <yao@codesourcery.com>
4406 Pedro Alves <palves@redhat.com>
4407
4408 * linux-low.c (lwp_in_step_range): New function.
4409 (linux_wait_1): If the thread was range stepping and stopped
4410 outside the stepping range, report the stop to GDB. Otherwise,
4411 continue stepping. Add range stepping debug output.
4412 (linux_set_resume_request): Copy the step range from the resume
4413 request to the lwp.
4414 (linux_supports_range_stepping): New.
4415 (linux_target_ops) <supports_range_stepping>: Set to
4416 linux_supports_range_stepping.
4417 * linux-low.h (struct linux_target_ops)
4418 <supports_range_stepping>: New field.
4419 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4420 * linux-x86-low.c (x86_supports_range_stepping): New.
4421 (the_low_target) <supports_range_stepping>: Set to
4422 x86_supports_range_stepping.
4423 * server.c (handle_v_cont): Handle 'r' action.
4424 (handle_v_requests): Append ";r" if the target supports range
4425 stepping.
4426 * target.h (struct thread_resume) <step_range_start,
4427 step_range_end>: New fields.
4428 (struct target_ops) <supports_range_stepping>:
4429 New field.
4430 (target_supports_range_stepping): New macro.
4431
4432 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4433
4434 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4435 confusion in comment.
4436
4437 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4438
4439 * lynx-low.c (struct process_info_private): New type.
4440 (lynx_add_process): New function.
4441 (lynx_create_inferior, lynx_attach): Replace calls to
4442 add_process by calls to lynx_add_process.
4443 (lynx_resume): If PTID is null, then try using
4444 current_process()->private->last_wait_event_ptid.
4445 Add comments.
4446 (lynx_clear_inferiors): Delete. The contents of that function
4447 has been inlined in lynx_mourn;
4448 (lynx_wait_1): Save the ptid in the process's private data.
4449 (lynx_mourn): Free the process' private data. Replace call
4450 to lynx_clear_inferiors by call to clear_inferiors.
4451
4452 2013-05-17 Yao Qi <yao@codesourcery.com>
4453
4454 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4455 the right place.
4456
4457 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4458
4459 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4460 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4461 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4462 PT_TEXT_END_ADDR guards. Update comments.
4463 (linux_target_op) <read_offsets>: Conditionally define to
4464 linux_read_offsets if the target is UCLIBC and if it defines
4465 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4466
4467 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4468 Andrew Jenner <andrew@codesourcery.com>
4469
4470 * Makefile.in (SFILES): Add linux-nios2-low.c.
4471 (clean): Add action to delete nios2-linux.c.
4472 (nios2-linux.c): New rule.
4473 * configure.srv: Add nios2*-*-linux*.
4474 * linux-nios2-low.c: New.
4475
4476 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4477
4478 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4479
4480 2013-04-25 Hui Zhu <hui@codesourcery.com>
4481
4482 PR gdb/15186
4483 * ax.c (ax_printf): Add fflush.
4484
4485 2013-04-22 Tom Tromey <tromey@redhat.com>
4486
4487 * Makefile.in (SFILES): Add filestuff.c.
4488 (OBS): Add filestuff.o.
4489 (filestuff.o): New target.
4490 * config.in, configure: Rebuild.
4491 * configure.ac: Check for fdwalk, pipe2.
4492
4493 2013-04-17 Pedro Alves <palves@redhat.com>
4494
4495 * configure.ac (USE_THREAD_DB): Delete variable.
4496 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4497 Don't AC_SUBST USE_THREAD_DB.
4498 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4499 * config.in, configure: Regenerate.
4500
4501 2013-04-16 Pedro Alves <palves@redhat.com>
4502
4503 * linux-low.h (struct lwp_info) <thread_known>: Move under
4504 the USE_THREAD_DB #ifdef.
4505
4506 2013-04-16 Pedro Alves <palves@redhat.com>
4507
4508 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4509 (linux-low.o): Delete rule.
4510 * linux-low.h: Always include "gdb_thread_db.h" instead of
4511 conditionally including thread_db.h.
4512 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4513 HAVE_THREAD_DB_H.
4514
4515 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4516
4517 * Makefile.in (install-only): Fix make install regression.
4518
4519 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4520
4521 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4522 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4523 installation.
4524 * gdbserver.1: Remove.
4525
4526 2013-03-22 Pedro Alves <palves@redhat.com>
4527
4528 * linux-low.c (handle_extended_wait): Don't call
4529 linux_enable_event_reporting.
4530
4531 2013-03-15 Tony Theodore <tonyt@logyst.com>
4532
4533 PR build/9098:
4534 * Makefile.in (SHELL): Use @SHELL@.
4535
4536 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4537
4538 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4539 compiler warning.
4540
4541 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4542
4543 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4544 Remove extraneous NULL element.
4545
4546 2013-03-13 Yao Qi <yao@codesourcery.com>
4547
4548 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4549 'V' block in trace frame.
4550
4551 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4552
4553 * target.h (struct target_ops): Add btrace ops.
4554 (target_supports_btrace): New macro.
4555 (target_enable_btrace): New macro.
4556 (target_disable_btrace): New macro.
4557 (target_read_btrace): New macro.
4558 * gdbthread.h (struct thread_info): Add btrace field.
4559 * server.c: Include btrace-common.h.
4560 (handle_btrace_general_set): New function.
4561 (handle_btrace_enable): New function.
4562 (handle_btrace_disable): New function.
4563 (handle_general_set): Call handle_btrace_general_set.
4564 (handle_qxfer_btrace): New function.
4565 (struct qxfer qxfer_packets[]): Add btrace entry.
4566 * inferiors.c (remove_thread): Disable btrace.
4567 * linux-low: Include linux-btrace.h.
4568 (linux_low_enable_btrace): New function.
4569 (linux_low_read_btrace): New function.
4570 (linux_target_ops): Add btrace ops.
4571 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4572 Add srv_linux_btrace=yes.
4573 (x86_64-*-linux*): Add linux-btrace.o.
4574 Add srv_linux_btrace=yes.
4575 * configure.ac: Define HAVE_LINUX_BTRACE.
4576 * config.in: Regenerated.
4577 * configure: Regenerated.
4578
4579 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4580
4581 * server.c (handle_qxfer): Preserve error message if -3 is
4582 returned.
4583 (qxfer): Document the -3 return value.
4584
4585 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4586
4587 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4588 (linux_btrace_h): New variable.
4589 (linux-btrace.o): New rule.
4590
4591 2013-03-08 Stan Shebs <stan@codesourcery.com>
4592 Hafiz Abid Qadeer <abidh@codesourcery.com>
4593
4594 * tracepoint.c (trace_buffer_size): New global.
4595 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4596 (init_trace_buffer): Change to one-argument function. Allocate
4597 trace buffer memory.
4598 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4599 handle QTBuffer:size packet.
4600 (cmd_bigqtbuffer_size): New function.
4601 (initialize_tracepoint): Call init_trace_buffer with
4602 DEFAULT_TRACE_BUFFER_SIZE.
4603 * server.c (handle_query): Add QTBuffer:size in the
4604 supported packets.
4605
4606 2013-03-07 Yao Qi <yao@codesourcery.com>
4607
4608 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4609 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4610 of -1.
4611 (cmd_qtsp): Adjust condition. Do post increment.
4612 Set cur_action and cur_step_action back to 0.
4613
4614 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4615
4616 PR server/15236
4617 * linux-low.c (linux_write_memory): Return early success if LEN is
4618 zero.
4619
4620 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4621
4622 * configure.srv: Add x86_64-*-cygwin* as target.
4623
4624 2013-02-28 Tom Tromey <tromey@redhat.com>
4625
4626 * configure.ac: Invoke AC_SYS_LARGEFILE.
4627 * configure, config.in: Rebuild.
4628
4629 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4630
4631 * win32-low.c: Throughout, fix format strings and casts of
4632 printf-like functions to avoid type related warnings on all
4633 platforms.
4634 (get_child_debug_event): Print dwDebugEventCode as hex since
4635 that's how it's usually documented.
4636
4637 2013-02-28 Yao Qi <yao@codesourcery.com>
4638
4639 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4640 pulongest.
4641
4642 2013-02-27 Jiong Wang <jiwang@tilera.com>
4643
4644 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4645 (reg-tilegx32.c): New rule.
4646 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4647 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4648 different register info initializer according to elf class.
4649 (init_registers_tilgx32): New function. The tilegx32 register info
4650 initializer.
4651 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4652 (tile_store_gregset): Likewise.
4653
4654 2013-02-27 Yao Qi <yao@codesourcery.com>
4655
4656 * server.c (process_point_options): Print debug message when
4657 debug_threads is true.
4658
4659 2013-02-26 Yao Qi <yao@codesourcery.com>
4660
4661 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4662
4663 2013-02-19 Pedro Alves <palves@redhat.com>
4664 Kai Tietz <ktietz@redhat.com>
4665
4666 PR gdb/15161
4667
4668 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4669 instead of strtoul to extract address from packet.
4670 (process_serial_event) <'z'>: Likewise.
4671
4672 2013-02-18 Yao Qi <yao@codesourcery.com>
4673
4674 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4675
4676 2013-02-14 Pedro Alves <palves@redhat.com>
4677
4678 Plug memory leak.
4679
4680 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4681 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4682
4683 2013-02-14 Pedro Alves <palves@redhat.com>
4684
4685 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4686
4687 2013-02-14 Pedro Alves <palves@redhat.com>
4688
4689 * tracepoint.c (save_string): Delete.
4690 (add_tracepoint_action): Use savestring instead of save_string.
4691
4692 2013-02-12 Pedro Alves <palves@redhat.com>
4693
4694 * linux-xtensa-low.c: Ditto.
4695 * xtensa-xtregs.c: Ditto.
4696
4697 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4698
4699 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4700 thread_db.
4701
4702 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4703
4704 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4705 aarch64_num_wp_regs and aarch64_num_bp_regs to
4706 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4707
4708 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4709
4710 * linux-aarch64-low.c (ps_get_thread_area): Replace
4711 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4712
4713 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4714 Marcus Shawcroft <marcus.shawcroft@arm.com>
4715 Nigel Stephens <nigel.stephens@arm.com>
4716 Yufeng Zhang <yufeng.zhang@arm.com>
4717
4718 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4719 (aarch64.c, aarch64-without-fpu.c): New targets.
4720 * configure.srv (aarch64*-*-linux*): New.
4721 * linux-aarch64-low.c: New file.
4722
4723 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4724
4725 * linux-low.c (handle_extended_wait, linux_create_inferior)
4726 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4727 (dequeue_one_deferred_signal, linux_resume_one_thread)
4728 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4729 (linux_tracefork_grandchild, linux_test_for_tracefork)
4730 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4731 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4732 where the argument is 0.
4733
4734 2013-01-25 Yao Qi <yao@codesourcery.com>
4735
4736 * event-loop.c: Include "queue.h".
4737 (gdb_event_p): New typedef.
4738 (struct gdb_event) <next_event>: Remove.
4739 (event_queue): Change to QUEUE(gdb_event_p).
4740 (async_queue_event): Remove.
4741 (gdb_event_xfree): New.
4742 (initialize_event_loop): New.
4743 (process_event): Use API from QUEUE.
4744 (wait_for_event): Likewise.
4745 * server.c (main): Call initialize_event_loop.
4746 * server.h (initialize_event_loop): Declare.
4747
4748 2013-01-18 Yao Qi <yao@codesourcery.com>
4749
4750 * ax.h (struct eval_agent_expr_context): New.
4751 (gdb_eval_agent_expr): Update declaration.
4752 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4753 TFRAME. Add new argument CTX.
4754 * server.h (struct eval_agent_expr_context): Declare.
4755 (agent_mem_read, agent_tsv_read): Update declaration.
4756 (agent_mem_read_string): Likewise.
4757 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4758 (add_traceframe_block): Add new argument TPOINT.
4759 Increase TPOINT->traceframe_usage.
4760 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4761 eval_tracepoint_agent_expr.
4762 (condition_true_at_tracepoint): Likewise.
4763 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4764 (agent_mem_read_string, agent_tsv_read): Likewise.
4765
4766 2013-01-16 Yao Qi <yao@codesourcery.com>
4767
4768 * linux-low.c (linux_resume_one_lwp): Don't check
4769 'lwp->bp_reinsert != 0'.
4770
4771 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4772 Pedro Alves <palves@redhat.com>
4773
4774 * lynx-low.c (ptrace_request_to_str): Define a temporary
4775 macro and use it to simplify this function's implementation.
4776
4777 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4778
4779 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4780 sets errno.
4781
4782 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4783
4784 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4785
4786 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4787
4788 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4789
4790 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4791
4792 * lynx-low.c (lynx_resume): Use the resume_info parameter
4793 to determine the ptid for the lynx_ptrace call, unless
4794 it is equal to minus_one_ptid, in which case we use the
4795 ptid of the current_inferior.
4796 (lynx_wait_1): After having received a thread create/exit
4797 event, resume the inferior's execution using the signaling
4798 thread's ptid, rather than the old ptid.
4799
4800 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4801
4802 * lynx-low.c (lynx_resume): Delete variable ret.
4803
4804 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4805
4806 * gdbreplay.c (gdbreplay_version): Update copyright year.
4807 * server.c (gdbserver_version): Likewise.
4808
4809 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4810
4811 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4812 new thread.
4813
4814 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4815
4816 * lynx-low.c (ptrace_request_to_str): Add handling for
4817 PTRACE_GETTRACESIG.
4818
4819 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4820
4821 * lynx-low.c (lynx_attach): Delete variable new_process.
4822
4823 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4824
4825 * lynx-low.c (lynx_create_inferior): Delete variable
4826 new_process.
4827
4828 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4829
4830 * lynx-low.c (ptrace_request_to_str): Do not handle
4831 PTRACE_GETTHREADLIST if this macro does not exist.
4832
4833 2012-12-15 Yao Qi <yao@codesourcery.com>
4834
4835 * Makefile.in (OBS): Add notif.o.
4836 * notif.c, notif.h: New.
4837 * server.c: Include "notif.h".
4838 (struct vstop_notif) <next>: Remove.
4839 <base>: New field.
4840 (queue_stop_reply): Update.
4841 (push_event, send_next_stop_reply): Remove.
4842 (discard_queued_stop_replies): Update.
4843 (notif_stop): New variable.
4844 (handle_v_stopped): Remove.
4845 (handle_v_requests): Don't call handle_v_stopped. Call
4846 handle_ack_notif instead.
4847 (queue_stop_reply_callback): Call notif_event_enque instead
4848 of queue_stop_reply.
4849 (handle_status): Don't call send_next_stop_reply, call
4850 notif_write_event instead.
4851 (kill_inferior_callback): Likewise.
4852 (detach_or_kill_inferior_callback): Likewise.
4853 (main): Call initialize_notif.
4854 (process_serial_event): Call QUEUE_is_empty.
4855 (handle_target_event): Call notif_push instead of push event.
4856 * server.h (push_event): Remove declaration.
4857
4858 2012-12-10 Tom Tromey <tromey@redhat.com>
4859
4860 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4861 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4862 macros.
4863 (.c.o): Rewrite.
4864 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4865 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4866 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4867 (amd64-linux-ipa.o, ax.o): Rewrite.
4868 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4869 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4870 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4871 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4872 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4873 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4874 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4875 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4876 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4877 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4878 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4879 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4880 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4881 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4882 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4883 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4884 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4885 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4886 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4887 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4888 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4889 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4890 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4891 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4892 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4893 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4894 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4895 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4896 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4897 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4898 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4899 (reg-tilegx.o): Remove.
4900 (all_object_files): New macro.
4901 Include .deps files.
4902 * aclocal.m4, configure: Rebuild.
4903 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4904 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4905 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4906
4907 2012-12-05 Tom Tromey <tromey@redhat.com>
4908
4909 PR gdb/14917:
4910 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4911
4912 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4913
4914 * configure.ac: Check for linux/perf_event.h.
4915 * config.in: Regenerated.
4916 * configure: Regenerated.
4917
4918 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4919
4920 * hostio.c (handle_readlink): Decrease buffer size
4921 parameter passed to readlink by one byte.
4922
4923 2012-11-26 Yao Qi <yao@codesourcery.com>
4924
4925 * configure.ac (build_warnings): Append '-Wempty-body'.
4926 * configure: Regenerated.
4927 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4928 body.
4929
4930 2012-11-15 Pierre Muller <muller@sourceware.org>
4931
4932 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4933 * config.in: Regenerate.
4934 * configure: Regenerate.
4935 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4936 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4937 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4938 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4939 header.
4940 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4941 instead of <sys/wait.h> header.
4942 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4943
4944 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4945
4946 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4947 (various make rules): Remove -DGDBSERVER
4948
4949 2012-11-09 Yao Qi <yao@codesourcery.com>
4950
4951 * spu-low.c (current_ptid): Move it to ..
4952 * gdbthread.h: ... here. New.
4953 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4954 * server.c (myresume, process_serial_event): Likewise.
4955 * thread-db.c (thread_db_find_new_threads): Likewise.
4956 * tracepoint.c (run_inferior_command): Likewise.
4957
4958 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4959
4960 * server.c (handle_search_memory_1): Include access length in
4961 warning message.
4962
4963 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4964
4965 * linux-crisv32-low.c: Fix compile errors.
4966
4967 2012-09-04 Yao Qi <yao@codesourcery.com>
4968
4969 * tracepoint.c (cmd_qtsv): Adjust debug message.
4970 Don't check CUR_TPOINT.
4971
4972 2012-08-28 Yao Qi <yao@codesourcery.com>
4973
4974 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4975 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4976 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4977 Remove declarations of xmalloc, xreallloc, xstrdup and
4978 freeargv.
4979 * Makefile.in (libiberty_h): New.
4980 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4981 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4982
4983 2012-08-23 Yao Qi <yao@codesourcery.com>
4984
4985 * server.h: Remove declaration of 'xsnprintf'.
4986
4987 2012-08-22 Keith Seitz <keiths@redhat.com>
4988
4989 * server.h: Include build-gnulib-gbserver/config.h.
4990 * gdbreplay.c: Likewise.
4991
4992 2012-08-08 Doug Evans <dje@google.com>
4993
4994 * Makefile.in (SFILES): Add gdb_vecs.c.
4995 (OBS): Add gdb_vecs.o.
4996 (gdb_vecs_h, host_defs_h): New variables.
4997 (thread-db.o): Add $(gdb_vecs_h) dependency.
4998 (gdb_vecs.o): New rule.
4999 * thread-db.c: #include "gdb_vecs.h".
5000 (thread_db_load_search): Use a vector to iterate over path elements.
5001 Handle text appearing after "$pdir".
5002
5003 * configure.ac: Add check for strstr.
5004 * config.in: Regenerate.
5005 * configure: Regenerate.
5006
5007 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5008
5009 * hostio.c (handle_pread): If pread fails, fall back to attempting
5010 lseek/read.
5011 (handle_pwrite): Likewise for pwrite.
5012
5013 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5014
5015 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5016 between unsupported TYPE and unimplementable ADDR/LEN combination.
5017 (arm_insert_point): Act on new return value.
5018
5019 2012-07-31 Pedro Alves <palves@redhat.com>
5020
5021 * server.c (process_point_options): Only skip tokens if we find
5022 one that is unrecognized. Don't treat 'X' specially while
5023 skipping unrecognized tokens.
5024
5025 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5026
5027 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5028 to 4-byte-align HW breakpoint addresses for Thumb.
5029
5030 2012-07-27 Yao Qi <yao@codesourcery.com>
5031
5032 PR remote/14161.
5033
5034 * server.h: Declare gdb_agent_about_to_close.
5035 * target.c (kill_inferior): Include "agent.h".
5036 New. Send command 'kill'.
5037 * target.h (kill_inferior): Removed macro.
5038 * tracepoint.c (gdb_agent_about_to_close): New.
5039 (gdb_agent_helper_thread): Handle command 'close'.
5040 Wait endlessly until the inferior stops.
5041 Install gdb_agent_remove_socket to atexit hook.
5042 (agent_socket_name): New static variable.
5043 (gdb_agent_socket_init): Replace local variable 'name' with
5044 'agent_socket_name'.
5045 (gdb_agent_remove_socket): New.
5046
5047 2012-07-27 Yao Qi <yao@codesourcery.com>
5048
5049 * server.c (process_point_options): Stop at 'X' when parsing.
5050
5051 2012-07-19 Michael Eager <eager@eagercon.com>
5052
5053 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5054 to hw_execute.
5055 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5056 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5057 hardware breakpoint.
5058
5059 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5060
5061 * gdbserver/linux-low.c (initialize_low): Call
5062 linux_ptrace_init_warnings.
5063
5064 2012-07-02 Doug Evans <dje@google.com>
5065
5066 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5067 pointer to int.
5068
5069 2012-07-02 Stan Shebs <stan@codesourcery.com>
5070
5071 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5072 (ax.o): Add it to build rule.
5073 (ax-ipa.o): Ditto.
5074 (OBS): Add format.o.
5075 (IPA_OBS): Add format.o.
5076 * server.c (handle_query): Claim support for breakpoint commands.
5077 (process_point_options): Add command case.
5078 (process_serial_event): Leave running if there are printfs in
5079 effect.
5080 * mem-break.h (any_persistent_commands): Declare.
5081 (add_breakpoint_commands): Declare.
5082 (gdb_no_commands_at_breakpoint): Declare.
5083 (run_breakpoint_commands): Declare.
5084 * mem-break.c (struct point_command_list): New struct.
5085 (struct breakpoint): New field command_list.
5086 (any_persistent_commands): New function.
5087 (add_commands_to_breakpoint): New function.
5088 (add_breakpoint_commands): New function.
5089 (gdb_no_commands_at_breakpoint): New function.
5090 (run_breakpoint_commands): New function.
5091 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5092 locally.
5093 * ax.c: Include format.h.
5094 (ax_printf): New function.
5095 (gdb_eval_agent_expr): Add printf opcode.
5096
5097 2012-06-13 Yao Qi <yao@codesourcery.com>
5098
5099 * server.c (start_inferior): Remove duplicated writes to fields
5100 'last_resume_kind' and 'last_status' of 'current_inferior'.
5101
5102 2012-06-12 Yao Qi <yao@codesourcery.com>
5103 Pedro Alves <palves@redhat.com>
5104
5105 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5106 comment.
5107 * server.c (handle_v_cont): Extend comment.
5108
5109 2012-06-11 Yao Qi <yao@codesourcery.com>
5110
5111 * linux-low.c (linux_attach): Add 'static'.
5112
5113 2012-06-06 Yao Qi <yao@codesourcery.com>
5114
5115 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5116
5117 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5118
5119 Fix gcc -flto compilation warning.
5120 * server.c (main): Make variable multi_mode and attach volatile.
5121
5122 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5123
5124 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5125 if the platform doesn't know about it.
5126
5127 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5128
5129 * Makefile.in (SFILES): Add linux-tile-low.c.
5130 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5131 * configure.srv: Handle tilegx-*-linux*.
5132 * linux-tile-low.c: New file.
5133
5134 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5135
5136 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5137
5138 2012-05-24 Pedro Alves <palves@redhat.com>
5139
5140 PR gdb/7205
5141
5142 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5143
5144 2012-05-24 Pedro Alves <palves@redhat.com>
5145
5146 PR gdb/7205
5147
5148 Replace target_signal with gdb_signal throughout.
5149
5150 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5151
5152 * linux-low.c (linux_store_registers): Avoid the copying sequence
5153 when no data has been retrieved by ptrace.
5154
5155 2012-05-22 Will Deacon <will.deacon@arm.com>
5156
5157 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5158 Include asm/ptrace.h.
5159 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5160 already defined.
5161
5162 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5163
5164 * linux-low.c (linux_store_registers): Don't re-retrieve data
5165 with ptrace that has already been obtained from /proc. Always
5166 copy any data retrieved with ptrace to the buffer supplied.
5167
5168 2012-05-11 Yao Qi <yao@codesourcery.com>
5169 Pedro Alves <palves@redhat.com>
5170
5171 * linux-low.c (enum stopping_threads_kind): New.
5172 (stopping_threads): Change type to `enum stopping_threads_kind'.
5173 (handle_extended_wait): If stopping and suspending threads, leave
5174 the new_lwp suspended too.
5175 (linux_wait_for_event): Adjust.
5176 (stop_all_lwps): Set `stopping_threads' to
5177 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5178 whether we're suspending threads or just stopping them. Assert no
5179 recursion happens.
5180
5181 2012-04-29 Yao Qi <yao@codesourcery.com>
5182
5183 * server.h: Move some code to ...
5184 * gdbthread.h: ... here. New.
5185 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5186 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5187 (nto-low.o, win32-low.o): Likewise.
5188 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5189 * regcache.c, remote-utils.c, server.c: Likewise.
5190 * target.c, tracepoint.c, win32-low.c: Likewise.
5191
5192 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5193
5194 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5195 (PTRACE_ARG4_TYPE): Likewise.
5196 (PTRACE_XFER_TYPE): Likewise.
5197 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5198 ptrace to PTRACE_ARG3_TYPE.
5199 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5200 (PTRACE_ARG4_TYPE): Likewise.
5201 (PTRACE_XFER_TYPE): Likewise.
5202 (linux_detach_one_lwp): Cast fourth argument of
5203 ptrace to long then PTRACE_ARG4_TYPE.
5204 (regsets_fetch_inferior_registers): Cast third argument of
5205 ptrace to long then PTRACE_ARG3_TYPE.
5206 (regsets_store_inferior_registers): Likewise.
5207
5208 2012-04-20 Pedro Alves <palves@redhat.com>
5209
5210 * configure: Regenerate.
5211
5212 2012-04-19 Pedro Alves <palves@redhat.com>
5213
5214 * Makefile.in (GNULIB_BUILDDIR): New.
5215 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5216 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5217 (all, install-only, uninstall, clean-info, all-lib, clean): No
5218 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5219 (maintainer-clean realclean distclean): Use subdir_do.
5220 (subdir_do): New.
5221 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5222 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5223 * acinclude.m4: Include acx_configure_dir.m4.
5224 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5225 calls. Call AC_PROG_RANLIB. Configure gnulib using
5226 ACX_CONFIGURE_DIR.
5227 (GNULIB): New.
5228 (GNULIB_STDINT_H): Adjust.
5229 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5230 * gdbreplay.c: Include build-gnulib/config.h.
5231 * server.h: Likewise.
5232 * aclocal.m4: Regenerate.
5233 * config.in: Regenerate.
5234 * configure: Regenerate.
5235
5236 2012-04-19 Pedro Alves <palves@redhat.com>
5237
5238 * Makefile.in (LIBGNU, INCGNU): Adjust.
5239 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5240 (all, install-only, uninstall, clean-info, all-lib, clean)
5241 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5242 * configure.ac: Adjust AC_OUTPUT output.
5243 * aclocal.m4: Regenerate.
5244 * configure: Regenerate.
5245
5246 2012-04-19 Pedro Alves <palves@redhat.com>
5247
5248 * Makefile.in (generated_files): New.
5249 (server_h): Remove the explicit dependency on config.h, and depend
5250 on $generated_files.
5251
5252 2012-04-19 Pedro Alves <palves@redhat.com>
5253
5254 * Makefile.in (INCGNU): Add -Ignulib.
5255
5256 2012-04-19 Pedro Alves <palves@redhat.com>
5257
5258 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5259 (INCGNU): ... this, and spell out -I here.
5260 (GNULIB_LIB): Rename to ...
5261 (LIBGNU): ... this.
5262 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5263
5264 2012-04-19 Pedro Alves <palves@redhat.com>
5265
5266 * config.in: Regenerate.
5267
5268 2012-04-19 Pedro Alves <palves@redhat.com>
5269
5270 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5271 * server.h (memmem): Remove declaration.
5272 * config.in: Regenerate.
5273 * configure: Regenerate.
5274
5275 2012-04-19 Yao Qi <yao@codesourcery.com>
5276
5277 * Makefile.in (SFILES): Add common/vec.c.
5278 (OBS): Add vec.o.
5279 (vec.o): New rule.
5280
5281 2012-04-19 Yao Qi <yao@codesourcery.com>
5282
5283 * remote-utils.c (prepare_resume_reply): Replace with macro
5284 target_core_of_thread.
5285 * server.c (handle_qxfer_threads_proper): Likewise.
5286 * target.h (traget_core_of_thread): New macro.
5287
5288 2012-04-18 Pedro Alves <palves@redhat.com>
5289
5290 * aclocal.m4: Regenerate.
5291 * configure: Regenerate.
5292
5293 2012-04-16 Yao Qi <yao@codesourcery.com>
5294
5295 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5296 duplicated on address.
5297
5298 2012-04-16 Yao Qi <yao@codesourcery.com>
5299
5300 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5301 (struct tracepoint_action_ops) <send>: New field.
5302 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5303 (agent_expr_send, x_tracepoint_action_send): New.
5304 (l_tracepoint_action_send): New.
5305 (cmd_qtdp): Download and install tracepoint
5306 according to `use_agent'.
5307 (run_inferior_command): Add one more parameter `len'.
5308 Update callers.
5309 (tracepoint_send_agent): New.
5310 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5311
5312 2012-04-16 Yao Qi <yao@codesourcery.com>
5313
5314 * tracepoint.c (download_tracepoints): Moved to ...
5315 (cmd_qtstart): ... here.
5316
5317 2012-04-14 Yao Qi <yao@codesourcery.com>
5318
5319 * tracepoint.c: Include inttypes.h.
5320 (struct collect_memory_action): Use sized types.
5321 (struct tracepoint): Likewise.
5322 (cmd_qtdp, stop_tracing): Update print specifiers.
5323 (cmd_qtp, response_tracepoint): Likewise.
5324 (collect_data_at_tracepoint): Likewise.
5325 (collect_data_at_step): Likewise.
5326
5327 2012-04-14 Yao Qi <yao@codesourcery.com>
5328
5329 Import gnulib module inttypes.
5330 * aclocal.m4, config.in, configure: Regenerated.
5331
5332 2012-04-14 Yao Qi <yao@codesourcery.com>
5333
5334 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5335 Makefile and config.status at last.
5336
5337 2012-04-13 Yao Qi <yao@codesourcery.com>
5338
5339 * tracepoint.c: Include stdint.h unconditionally.
5340
5341 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5342
5343 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5344 on BFD_HAVE_SYS_PROCFS_TYPE.
5345 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5346 * configure: Regenerate.
5347 * config.in: Likewise.
5348
5349 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5350
5351 * Makefile.in (clean): Also remove x32.c x32-linux.c
5352 x32-avx.c x32-avx-linux.c.
5353 (x32.o): New target.
5354 (x32.c): Likewise.
5355 (x32-linux.o): Likewise.
5356 (x32-linux.c): Likewise.
5357 (x32-avx.o): Likewise.
5358 (x32-avx.c): Likewise.
5359 (x32-avx-linux.o): Likewise.
5360 (x32-avx-linux.c): Likewise.
5361
5362 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5363 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5364 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5365 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5366 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5367 i386/x32-avx-linux.xml.
5368
5369 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5370 (init_registers_x32_avx_linux): Likwise.
5371 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5372 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5373
5374 2012-04-13 Pedro Alves <palves@redhat.com>
5375
5376 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5377 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5378 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5379 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5380 the sub-make.
5381
5382 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5383
5384 * linux-x86-low.c (compat_x32_clock_t): New.
5385 (compat_x32_siginfo_t): Likewise.
5386 (compat_x32_siginfo_from_siginfo): Likewise.
5387 (siginfo_from_compat_x32_siginfo): Likewise.
5388 (linux_is_elf64): Likewise.
5389 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5390 and siginfo_from_compat_x32_siginfo for x32.
5391 (x86_arch_setup): Set linux_is_elf64.
5392
5393 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5394
5395 PR gdb/13969
5396 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5397 e_machine field.
5398 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5399 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5400 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5401 compatible with process.
5402
5403 2012-04-12 Yao Qi <yao@codesourcery.com>
5404
5405 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5406 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5407 (install-only, install-info, clean): Handle sub dir gnulib.
5408 (all-lib, am--refresh): New targets.
5409 (memmem.o): Remove target.
5410 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5411 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5412 (AC_REPLACE_FUNCS): Remove memmem.
5413 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5414 (AC_OUTPUT): Generate Makefile in gnulib/.
5415 * aclocal.m4, config.in, configure: Regenerated.
5416
5417 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5418
5419 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5420
5421 2012-04-05 Pedro Alves <palves@redhat.com>
5422
5423 -Werror=strict-aliasing
5424
5425 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5426 pointer.
5427
5428 2012-04-04 Pedro Alves <palves@redhat.com>
5429
5430 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5431 (sparc_store_gregset_from_stack, sparc_store_gregset)
5432 (sparc_breakpoint_at): Fix formatting.
5433
5434 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5435
5436 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5437 are available.
5438 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5439 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5440 * config.in: Regenerate.
5441 * configure: Likewise.
5442
5443 2012-03-29 Pedro Alves <palves@redhat.com>
5444
5445 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5446 Correct ptrace arguments.
5447
5448 2012-03-28 Pedro Alves <palves@redhat.com>
5449
5450 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5451 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5452 (IA64_FR1_REGNUM): New defines.
5453 (ia64_fetch_register): New.
5454 (the_low_target): Install it.
5455 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5456 field.
5457 * linux-low.c (linux_fetch_registers): Try the
5458 the_low_target.fetch_register hook first.
5459
5460 * linux-arm-low.c (the_low_target): Adjust.
5461 * linux-bfin-low.c (the_low_target): Adjust.
5462 * linux-cris-low.c (the_low_target): Adjust.
5463 * linux-crisv32-low.c (the_low_target): Adjust.
5464 * linux-m32r-low.c (the_low_target): Adjust.
5465 * linux-m68k-low.c (the_low_target): Adjust.
5466 * linux-mips-low.c (the_low_target): Adjust.
5467 * linux-ppc-low.c (the_low_target): Adjust.
5468 * linux-s390-low.c (the_low_target): Adjust.
5469 * linux-sh-low.c (the_low_target): Adjust.
5470 * linux-sparc-low.c (the_low_target): Adjust.
5471 * linux-tic6x-low.c (the_low_target): Adjust.
5472 * linux-x86-low.c (the_low_target): Adjust.
5473 * linux-xtensa-low.c (the_low_target): Adjust.
5474
5475 2012-03-26 Pedro Alves <palves@redhat.com>
5476
5477 * server.c (handle_qxfer_libraries): Don't bail early if
5478 the_target->qxfer_libraries_svr4 is not NULL.
5479
5480 2012-03-26 Pedro Alves <palves@redhat.com>
5481
5482 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5483
5484 2012-03-23 Pedro Alves <palves@redhat.com>
5485
5486 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5487 "library-list-svr4" element's start tag when the the DSO list is
5488 empty.
5489
5490 2012-03-23 Pedro Alves <palves@redhat.com>
5491
5492 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5493 a variable whose type size is the same as the inferior's pointer
5494 size.
5495
5496 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5497
5498 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5499 struct siginfo.
5500 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5501 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5502 * linux-low.h: Include <signal.h>.
5503 (struct siginfo): Remove forward declaration.
5504 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5505 struct siginfo.
5506
5507 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5508
5509 * .gitignore: Ignore more files.
5510
5511 2012-03-19 Pedro Alves <palves@redhat.com>
5512 Jan Kratochvil <jan.kratochvil@redhat.com>
5513
5514 * server.c (cont_thread, general_thread): Add describing comments.
5515 (start_inferior): Clear `cont_thread'.
5516 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5517 of a process.
5518
5519 2012-03-15 Yao Qi <yao@codesourcery.com>
5520
5521 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5522 handling to ...
5523 (cmd_qtdp): ... here.
5524
5525 2012-03-15 Yao Qi <yao@codesourcery.com>
5526
5527 * tracepoint.c (struct tracepoint_action_ops): New.
5528 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5529 (m_tracepoint_action_download): New.
5530 (r_tracepoint_action_download): New.
5531 (x_tracepoint_action_download): New.
5532 (l_tracepoint_action_download): New.
5533 (add_tracepoint_action): Install `action->ops' according type.
5534 (download_tracepoint_1): Move code `download' function pointer
5535 of various tracepoint_action_ops.
5536
5537 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5538
5539 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5540 linux_ptrace_attach_warnings.
5541
5542 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5543
5544 * Makefile.in (linux-ptrace.o): New.
5545 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5546 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5547 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5548 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5549 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5550 of these targets.
5551 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5552
5553 2012-03-08 Yao Qi <yao@codesourcery.com>
5554 Pedro Alves <palves@redhat.com>
5555
5556 Fix PR server/13392.
5557 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5558 offset of JMP insn.
5559 * tracepoint.c (remove_tracepoint): New.
5560 (cmd_qtdp): Call remove_tracepoint when failed to install.
5561
5562 2012-03-07 Pedro Alves <palves@redhat.com>
5563
5564 * linux-low.c (get_detach_signal): New.
5565 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5566 Pass on pending signals to PTRACE_DETACH. Check the result of the
5567 ptrace call.
5568 * server.c (program_signals, program_signals_p): New.
5569 (handle_general_set): Handle QProgramSignals.
5570 * server.h (program_signals, program_signals_p): Declare.
5571
5572 2012-03-05 Pedro Alves <palves@redhat.com>
5573 Jan Kratochvil <jan.kratochvil@redhat.com>
5574
5575 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5576 New comment why.
5577
5578 2012-03-03 Yao Qi <yao@codesourcery.com>
5579
5580 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5581 agent_look_up_symbols.
5582
5583 2012-03-03 Yao Qi <yao@codesourcery.com>
5584
5585 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5586 (linux-x86-low.o): Likewise.
5587 * server.h: Remove in_process_agent_loaded.
5588 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5589 common/agent.c.
5590 Update callers.
5591
5592 2012-03-03 Yao Qi <yao@codesourcery.com>
5593
5594 * tracepoint.c (gdb_agent_capability): New global.
5595 (in_process_agent_loaded_ust): Renamed to
5596 `in_process_agent_supports_ust'.
5597 Update callers.
5598 (in_process_agent_supports_ust): Call agent_capability_check.
5599 (clear_installed_tracepoints): Assert that agent supports
5600 agent.
5601
5602 2012-03-03 Yao Qi <yao@codesourcery.com>
5603
5604 * linux-low.c (linux_supports_agent): New.
5605 (linux_target_ops): Initialize field `supports_agent' with
5606 linux_supports_agent.
5607 * target.h (struct target_ops) <supports_agent>: New.
5608 (target_supports_agent): New macro.
5609 * server.c (handle_general_set): Handle packet 'QAgent'.
5610 (handle_query): Send `QAgent+'.
5611 * Makefile.in (server.o): Depends on agent.h.
5612
5613 2012-03-03 Yao Qi <yao@codesourcery.com>
5614
5615 * Makefile.in (OBS): Add agent.o.
5616 Add new rule for agent.o.
5617 Track dependence of tracepoint.c on agent.h.
5618 * tracepoint.c (run_inferior_command_1):
5619 (run_inferior_command): Call agent_run_command.
5620 (gdb_ust_connect_sync_socket): Deleted. Move it to
5621 common/agent.c.
5622 (resume_thread, stop_thread): Likewise.
5623 (gdb_ust_socket_init): Renamed to ...
5624 (gdb_agent_socket_init): ... New.
5625 (gdb_ust_thread): Renamed to ...
5626 (gdb_agent_helper_thread): ... New.
5627 (gdb_ust_init): Move some code to ...
5628 (gdb_agent_init): ... here. New.
5629 [HAVE_UST]: Call gdb_ust_init.
5630 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5631 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5632 * config.in, configure: Regenerated.
5633
5634 2012-03-02 Pedro Alves <palves@redhat.com>
5635
5636 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5637 * linux-low.c (struct simple_pid_list): New.
5638 (stopped_pids): New a struct simple_pid_list pointer.
5639 (add_to_pid_list, pull_pid_from_list): New.
5640 (handle_extended_wait): Don't assume the first signal new children
5641 report is SIGSTOP. Adjust call to pull_pid_from_list.
5642 (linux_wait_for_lwp): Adjust.
5643
5644 2012-03-02 Yao Qi <yao@codesourcery.com>
5645
5646 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5647 debug log.
5648
5649 2012-03-02 Yao Qi <yao@codesourcery.com>
5650
5651 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5652 `stop_pc' and `tpoint'. Update caller.
5653
5654 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5655
5656 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5657 * linux-low.c (use_linux_regsets): New macro.
5658 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5659 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5660 (linux_register_in_regsets): New function.
5661 (usr_fetch_inferior_registers): Skip registers covered by
5662 regsets.
5663 (usr_store_inferior_registers): Likewise.
5664 (usr_fetch_inferior_registers): New macro.
5665 (usr_store_inferior_registers): Likewise.
5666 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5667 (linux_store_registers): Likewise.
5668 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5669 prototype.
5670 (init_registers_mips64_dsp_linux): Likewise.
5671 (init_registers_mips_linux): New macro.
5672 (init_registers_mips_dsp_linux): Likewise.
5673 (mips_dsp_num_regs): Likewise.
5674 (DSP_BASE, DSP_CONTROL): New fallback macros.
5675 (mips_base_regs): New macro.
5676 (mips_regmap): Use it. Fix the size.
5677 (mips_dsp_regmap): New variable.
5678 (mips_dsp_regset_bitmap): Likewise.
5679 (mips_arch_setup): New function.
5680 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5681 than mips_regmap.
5682 (mips_cannot_store_register): Likewise.
5683 (the_low_target): Update .arch_setup, .num_regs and .regmap
5684 initializers. Add .regset_bitmap initializer.
5685 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5686 initializer.
5687 * linux-bfin-low.c (the_low_target): Likewise.
5688 * linux-cris-low.c (the_low_target): Likewise.
5689 * linux-crisv32-low.c (the_low_target): Likewise.
5690 * linux-ia64-low.c (the_low_target): Likewise.
5691 * linux-m32r-low.c (the_low_target): Likewise.
5692 * linux-m68k-low.c (the_low_target): Likewise.
5693 * linux-ppc-low.c (the_low_target): Likewise.
5694 * linux-s390-low.c (the_low_target): Likewise.
5695 * linux-sh-low.c (the_low_target): Likewise.
5696 * linux-sparc-low.c (the_low_target): Likewise.
5697 * linux-tic6x-low.c (the_low_target): Likewise.
5698 * linux-x86-low.c (the_low_target): Likewise.
5699 * linux-xtensa-low.c (the_low_target): Likewise.
5700 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5701 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5702 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5703 srv_xmlfiles.
5704 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5705 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5706
5707 2012-02-29 Yao Qi <yao@codesourcery.com>
5708 Pedro Alves <palves@redhat.com>
5709
5710 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5711 `step_over_finished' is true.
5712
5713 2012-02-27 Pedro Alves <palves@redhat.com>
5714
5715 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5716 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5717
5718 2012-02-27 Pedro Alves <palves@redhat.com>
5719
5720 PR server/9684
5721 * linux-low.c (pid_is_stopped): New.
5722 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5723
5724 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5725
5726 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5727 of conditions.
5728
5729 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5730
5731 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5732
5733 2012-02-24 Luis Machado <lgustavo@codesourcery>
5734
5735 * server.c (handle_query): Advertise support for target-side
5736 breakpoint condition evaluation.
5737 (process_point_options): New function.
5738 (process_serial_event): When inserting a breakpoint, check for
5739 a target-side condition that should be evaluated.
5740
5741 * mem-break.c: Include regcache.h and ax.h.
5742 (point_cond_list_t): New data structure.
5743 (breakpoint) <cond_list>: New field.
5744 (find_gdb_breakpoint_at): Make non-static.
5745 (delete_gdb_breakpoint_at): Clear any target-side
5746 conditions.
5747 (clear_gdb_breakpoint_conditions): New function.
5748 (add_condition_to_breakpoint): Likewise.
5749 (add_breakpoint_condition): Likewise.
5750 (gdb_condition_true_at_breakpoint): Likewise.
5751 (gdb_breakpoint_here): Return result directly instead
5752 of going through a local variable.
5753
5754 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5755 (clear_gdb_breakpoint_conditions): Likewise.
5756 (add_breakpoint_condition): Likewise.
5757 (gdb_condition_true_at_breakpoint): Likewise.
5758
5759 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5760 (need_step_over_p): Take target-side breakpoint condition into
5761 consideration.
5762
5763 2012-02-24 Luis Machado <lgustavo@codesourcery>
5764
5765 * server.h: Include tracepoint.h.
5766 (agent_mem_read, agent_get_trace_state_variable_value,
5767 agent_set_trace_state_variable_value,
5768 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5769 get_set_tsv_func_addr): New prototypes.
5770
5771 * ax.h: New include file.
5772 * ax.c: New source file.
5773
5774 * tracepoint.c: Include ax.h.
5775 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5776 agent_expr, eval_result_type): Move to ax.h.
5777 (parse_agent_expr): Rename to ...
5778 (gdb_parse_agent_expr): ... this, make it non-static and move
5779 to ax.h.
5780 (unparse_agent_expr) Rename to ...
5781 (gdb_unparse_agent_expr): ... this, make it non-static and move
5782 to ax.h.
5783 (eval_agent_expr): Rename to ...
5784 (eval_tracepoint_agent_expr): ... this.
5785 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5786 forward declarations.
5787 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5788 (agent_get_trace_state_variable_value): New function.
5789 (agent_set_trace_state_variable_value): New function.
5790 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5791 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5792 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5793 (condition_true_at_tracepoint): Likewise.
5794 (parse_agent_expr): Rename to ...
5795 (gdb_parse_agent_expr): ... this and move to ax.c.
5796 (unparse_agent_expr): Rename to ...
5797 (gdb_unparse_agent_expr): ... this and move to ax.c.
5798 (gdb_agent_op_name): Move to ax.c.
5799 (eval_agent_expr): Rename to ...
5800 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5801 and move to ax.c.
5802 (eval_tracepoint_agent_expr): New function.
5803 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5804 non-static.
5805 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5806 ax.c.
5807 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5808 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5809 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5810 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5811 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5812 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5813 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5814 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5815 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5816 (compile_bytecodes): Remove forward declaration.
5817 (is_goto_target): Move to ax.c.
5818 (compile_bytecodes): Move to ax.c and call
5819 agent_get_trace_state_variable_value (...) and
5820 agent_set_trace_state_variable_value (...).
5821
5822 * Makefile.in: Update ax.c and IPA dependencies.
5823
5824 2012-02-24 Pedro Alves <palves@redhat.com>
5825
5826 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5827 (cmd_bigqtbuffer_circular): ... this. Only handle
5828 'QTBuffer:circular:'.
5829 (handle_tracepoint_general_set): Adjust.
5830
5831 2012-02-16 Yao Qi <yao@codesourcery.com>
5832
5833 * inferiors.c: Move code to ...
5834 * dll.c: .... here. New.
5835 * server.h: Declare clear_dlls.
5836 * Makefile.in (SFILES): Add dll.c.
5837 (OBS): Add dll.o
5838 (dll.o): New rule.
5839
5840 2012-02-11 Yao Qi <yao@codesourcery.com>
5841
5842 * server.c: (handle_monitor_command): Add a new parameter
5843 `own_buf'.
5844 (handle_query): Update caller.
5845
5846 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5847
5848 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5849 * configure, config.in: Regenerate.
5850 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5851 is not defined.
5852
5853 2012-02-02 Pedro Alves <palves@redhat.com>
5854
5855 Try SIGKILL first, then PTRACE_KILL.
5856 * linux-low.c (linux_kill_one_lwp): New.
5857 (linux_kill_one_lwp): Rename to ...
5858 (kill_one_lwp_callback): ... this. Use the new
5859 linux_kill_one_lwp.
5860
5861 2012-02-02 Pedro Alves <palves@redhat.com>
5862
5863 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5864 inferior.
5865
5866 2012-01-27 Pedro Alves <palves@redhat.com>
5867
5868 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5869 (elf_64_file_p): Make static.
5870 (linux_pid_exe_is_elf_64_file): New.
5871 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5872 Delete declarations.
5873 (linux_pid_exe_is_elf_64_file): Declare.
5874 * linux-x86-low.c (x86_arch_setup): Use
5875 linux_pid_exe_is_elf_64_file.
5876
5877 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5878
5879 * linux-low.c (linux_wait_for_event_1): Rename to ...
5880 (linux_wait_for_event): ... here and merge it with former
5881 linux_wait_for_event - new variable wait_ptid, use it.
5882 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5883
5884 2012-01-23 Pedro Alves <palves@redhat.com>
5885
5886 * server.c (main): Avoid yet another case of infinite loop while
5887 detaching/killing after a longjmp.
5888
5889 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5890
5891 Code cleanup.
5892 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5893
5894 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5895
5896 * hostio.c (handle_readlink): New function.
5897 (handle_vFile): Call it to handle "vFile:readlink" packets.
5898
5899 2012-01-20 Pedro Alves <palves@redhat.com>
5900 Ulrich Weigand <ulrich.weigand@linaro.org>
5901
5902 * server.c (handle_v_requests): Only support vAttach and vRun to
5903 start multiple processes when in extended protocol mode.
5904
5905 2012-01-17 Pedro Alves <palves@redhat.com>
5906
5907 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5908 memalign plus mprotect to allocate the scratch buffer.
5909
5910 2012-01-13 Pedro Alves <palves@redhat.com>
5911
5912 * server.c (attach_inferior): Clear `cont_thread'.
5913
5914 2012-01-13 Pedro Alves <palves@redhat.com>
5915
5916 * server.c (main): Avoid infinite loop while detaching/killing
5917 after a longjmp.
5918
5919 2012-01-09 Doug Evans <dje@google.com>
5920
5921 * server.c (start_inferior): Set last_ptid in --wrapper case.
5922
5923 2012-01-06 Yao Qi <yao@codesourcery.com>
5924
5925 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5926 defined.
5927 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5928
5929 2012-01-04 Yao Qi <yao@codesourcery.com>
5930
5931 * tracepoint.c (cmd_qtdp): Print debug message
5932 for static tracepoint.
5933
5934 2012-01-04 Yao Qi <yao@codesourcery.com>
5935
5936 * tracepoint.c (trace_vdebug): Differentiate debug message
5937 between gdbserver and IPA.
5938
5939 2012-01-03 Yao Qi <yao@codesourcery.com>
5940
5941 * tracepoint.c (tracepoint_was_hit): Don't collect for
5942 static tracepoint.
5943
5944 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5945
5946 * terminal.h: Reformat copyright header.
5947
5948 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5949
5950 * server.c (gdbserver_version): Update copyright year.
5951 * gdbreplay.c (gdbreplay_version): Likewise.
5952
5953 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5954
5955 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5956
5957 Revert:
5958 2011-12-18 Hui Zhu <teawater@gmail.com>
5959 * linux-low.c (linux_create_inferior): Save return value to ret.
5960
5961 2011-12-18 Hui Zhu <teawater@gmail.com>
5962
5963 * linux-low.c (linux_create_inferior): Save return value to ret.
5964
5965 2011-12-16 Doug Evans <dje@google.com>
5966
5967 * linux-low.c (linux_create_inferior): If stdio connection,
5968 redirect stdin from /dev/null, stdout to stderr.
5969 * remote-utils.c (remote_is_stdio): New static global.
5970 (remote_connection_is_stdio): New function.
5971 (remote_prepare): Handle stdio connection.
5972 (remote_open): Ditto.
5973 (remote_close): Don't close stdin for stdio connections.
5974 (read_prim,write_prim): New functions. Replace all calls to
5975 read/write to these.
5976 * server.c (main): Watch for "-" argument. Move call to
5977 remote_prepare before start_inferior.
5978 * server.h (STDIO_CONNECTION_NAME): New macro.
5979 (remote_connection_is_stdio): Declare.
5980
5981 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5982 in debugging output.
5983
5984 2011-12-15 Yao Qi <yao@codesourcery.com>
5985
5986 * tracepoint.c: Include sys/syscall.h.
5987 (gdb_ust_thread): Remove preprocessor conditional.
5988
5989 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5990
5991 * linux-low.c (linux_detach_one_lwp): Call
5992 the_low_target.prepare_to_resume before detaching.
5993
5994 2011-12-14 Yao Qi <yao@codesourcery.com>
5995
5996 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5997 of write.
5998
5999 2011-12-14 Yao Qi <yao@codesourcery.com>
6000
6001 * i386-low.c (i386_low_stopped_data_address): Initialize local
6002 variable `control'.
6003
6004 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6005
6006 PR remote/13492
6007
6008 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6009 DR_CONTROL unless necessary. Extend comments.
6010 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6011 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6012
6013 2011-12-13 Yao Qi <yao@codesourcery.com>
6014
6015 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6016 macros.
6017 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6018
6019 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6020
6021 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6022 Print new debug message for such case.
6023
6024 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6025
6026 Fix overlapping memcpy.
6027 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6028 the read_inferior_memory transfer.
6029 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6030 write_inferior_memory transfer.
6031 (set_fast_tracepoint_jump): New variable buf. Use it for the
6032 read_inferior_memory and write_inferior_memory transfers.
6033 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6034 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6035 Use it for the write_inferior_memory transfer.
6036 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6037 buffers.
6038
6039 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6040
6041 * linux-low.c (fetch_register, store_register): Make code
6042 consistent, fix formatting.
6043
6044 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6045
6046 * linux-low.c (usr_store_inferior_registers): Factor out code
6047 to handle individual registers into...
6048 (store_register): ... this new function.
6049
6050 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6051
6052 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6053 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6054 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6055 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6056 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6057 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6058 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6059 (srv_xmlfiles): Add new XML files.
6060
6061 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6062 and <sys/uio.h>.
6063 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6064 (init_registers_s390_linux32v1): Add prototype.
6065 (init_registers_s390_linux32v2): Likewise.
6066 (init_registers_s390_linux64v1): Likewise.
6067 (init_registers_s390_linux64v2): Likewise.
6068 (init_registers_s390x_linux64v1): Likewise.
6069 (init_registers_s390x_linux64v2): Likewise.
6070 (s390_num_regs): Increment to 52.
6071 (s390_regmap): Add orig_r2 register.
6072 (s390_num_regs_3264): Increment to 68.
6073 (s390_regmap_3264): Add orig_r2 register.
6074 (s390_collect_ptrace_register): Handle orig_r2 register.
6075 (s390_supply_ptrace_register): Likewise.
6076 (s390_fill_last_break): New function.
6077 (s390_store_last_break): Likewise.
6078 (s390_fill_system_call): New function.
6079 (s390_store_system_call): Likewise.
6080 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6081 register sets.
6082 (s390_check_regset): New function.
6083 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6084 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6085 Update target_regsets for available register sets.
6086
6087 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6088 Jan Kratochvil <jan.kratochvil@redhat.com>
6089
6090 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6091 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6092 New.
6093 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6094 * linux-low.h (struct process_info_private): New member r_debug.
6095 * server.c (handle_qxfer_libraries): Call
6096 the_target->qxfer_libraries_svr4.
6097 (handle_qxfer_libraries_svr4): New function.
6098 (qxfer_packets): New entry "libraries-svr4".
6099 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6100 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6101 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6102 PACKET_qXfer_libraries_svr4.
6103
6104 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6105
6106 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6107 PSW address/mask between 8-byte and 16-byte formats.
6108 (s390_supply_ptrace_register): Likewise.
6109 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6110 basic addressing mode bit.
6111
6112 2011-11-24 Stan Shebs <stan@codesourcery.com>
6113
6114 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6115
6116 2011-11-17 Stan Shebs <stan@codesourcery.com>
6117
6118 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6119 (tracing_start_time): New global.
6120 (tracing_stop_time): New global.
6121 (tracing_user_name): New global.
6122 (tracing_notes): New global.
6123 (tracing_stop_note): New global.
6124 (cmd_qtstart): Set traceframe_usage, start_time.
6125 (stop_tracing): Set stop_time.
6126 (cmd_qtstatus): Report additional status.
6127 (cmd_qtp): New function.
6128 (handle_tracepoint_query): Call it.
6129 (cmd_qtnotes): New function.
6130 (handle_tracepoint_general_set): Call it.
6131 (get_timestamp): Rename from tsv_get_timestamp.
6132
6133 2011-11-14 Stan Shebs <stan@codesourcery.com>
6134 Kwok Cheung Yeung <kcy@codesourcery.com>
6135
6136 * linux-x86-low.c (small_jump_insn): New.
6137 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6138 trampoline and error message, build a trampoline and issue a small
6139 jump instruction to it.
6140 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6141 trampoline and error message.
6142 (x86_get_min_fast_tracepoint_insn_len): New.
6143 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6144 * linux-low.h (struct linux_target_ops): Add arguments to
6145 install_fast_tracepoint_jump_pad operation, add new operation.
6146 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6147 arguments.
6148 (linux_get_min_fast_tracepoint_insn_len): New function.
6149 (linux_target_op): Add new operation.
6150 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6151 (gdb_trampoline_buffer_end): Ditto.
6152 (gdb_trampoline_buffer_error): Ditto.
6153 (struct ipa_sym_addresses): Add fields for new IPA variables.
6154 (symbol_list): Add entries for new IPA variables.
6155 (struct tracepoint): Add fields to hold the address range of the
6156 trampoline used by the tracepoint.
6157 (trampoline_buffer_head): New static variable.
6158 (trampoline_buffer_tail): Ditto.
6159 (claim_trampoline_space): New function.
6160 (have_fast_tracepoint_trampoline_buffer): New function.
6161 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6162 structure.
6163 (install_fast_tracepoint): Ditto, also add error buffer argument.
6164 (cmd_qtminftpilen): New function.
6165 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6166 (fast_tracepoint_from_trampoline_address): New function.
6167 (fast_tracepoint_collecting): Handle trampoline as part of jump
6168 pad space.
6169 (set_trampoline_buffer_space): New function.
6170 (initialize_tracepoint): Initialize new IPA variables.
6171 * target.h (struct target_ops): Add arguments to
6172 install_fast_tracepoint_jump_pad operation, add new
6173 get_min_fast_tracepoint_insn_len operation.
6174 (target_get_min_fast_tracepoint_insn_len): New.
6175 (install_fast_tracepoint_jump_pad): Add arguments.
6176 * server.h (IPA_BUFSIZ): Define.
6177 * linux-i386-ipa.c: Include extra header files.
6178 (initialize_fast_tracepoint_trampoline_buffer): New function.
6179 (initialize_low_tracepoint): Call it.
6180 * server.h (set_trampoline_buffer_space): Declare.
6181 (claim_trampoline_space): Ditto.
6182 (have_fast_tracepoint_trampoline_buffer): Ditto.
6183
6184 2011-11-14 Yao Qi <yao@codesourcery.com>
6185
6186 * server.c (handle_query): Handle InstallInTrace for qSupported.
6187 * tracepoint.c (add_tracepoint): Sort list.
6188 (install_tracepoint, download_tracepoint): New.
6189 (cmd_qtdp): Call them to install and download tracepoints.
6190 (sort_tracepoints): Removed.
6191 (cmd_qtstart): Update.
6192
6193 2011-11-14 Yao Qi <yao@codesourcery.com>
6194
6195 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6196 * mem-break.h: Declare.
6197 * tracepoint.c (cmd_qtstart): Move some code to ...
6198 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6199 New.
6200 (download_tracepoints): Move some code to ...
6201 (download_tracepoint_1): ... here. New.
6202
6203 2011-11-08 Yao Qi <yao@codesourcery.com>
6204
6205 * remote-utils.c (relocate_instruction): A comment fix.
6206
6207 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6208
6209 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6210 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6211 dr_status_mirror and dr_control_mirror from debug_reg_state.
6212 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6213 (i386_initial_stuff): Remove use of deleted globals.
6214 (i386_get_thread_context, i386_set_thread_context,
6215 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6216 from debug_reg_state.
6217
6218 2011-11-05 Yao Qi <yao@codesourcery.com>
6219
6220 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6221 address as TPOINT's.
6222
6223 2011-11-02 Stan Shebs <stan@codesourcery.com>
6224
6225 * tracepoint.c (agent_mem_read_string): New function.
6226 (eval_agent_expr): Call it for tracenz.
6227 * server.c (handle_query): Report support for tracenz.
6228
6229 2011-11-02 Yao Qi <yao@codesourcery.com>
6230
6231 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6232
6233 2011-11-02 Yao Qi <yao@codesourcery.com>
6234
6235 * target.h: Fix a typo in comment.
6236
6237 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6238
6239 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6240 clobber the breakpoints' shadows with fast tracepoint jumps.
6241 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6242 * target.c (write_inferior_memory): Also pass MYADDR down to
6243 check_mem_write.
6244
6245 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6246
6247 * configure.ac: Check support for personality routine.
6248 * configure: Regenerate.
6249 * config.in: Likewise.
6250 * linux-low.c: Include <sys/personality.h>.
6251 Define ADDR_NO_RANDOMIZE if necessary.
6252 (linux_create_inferior): Disable address space randomization when
6253 forking inferior, if requested.
6254 (linux_supports_disable_randomization): New function.
6255 (linux_target_ops): Install it.
6256 * server.h (disable_randomization): Declare.
6257 * server.c (disable_randomization): New global variable.
6258 (handle_general_set): Handle QDisableRandomization.
6259 (handle_query): Likewise for qSupported.
6260 (main): Support --disable-randomization and --no-disable-randomization
6261 command line arguments.
6262 * target.h (struct target_ops): Add supports_disable_randomization.
6263 (target_supports_disable_randomization): New macro.
6264
6265 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6266
6267 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6268 ifdef check.
6269 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6270 [!PT_GETDSBT] (target_loadmap): New definition.
6271 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6272 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6273 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6274 and PT_GETDSBT to LINUX_LOADMAP.
6275 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6276 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6277
6278 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6279
6280 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6281 (arm_linux_hwbp_cap): New static variable.
6282 (arm_linux_get_hwbp_cap): Replace by ...
6283 (arm_linux_init_hwbp_cap): ... this new function.
6284 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6285 (arm_linux_get_hw_watchpoint_count): Likewise.
6286 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6287 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6288 (arm_prepare_to_resume): Use perror_with_name instead of error.
6289
6290 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6291
6292 * linux-arm-low.c: Include <signal.h>.
6293 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6294 (struct arm_linux_hwbp_cap): New data type.
6295 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6296 (struct arm_linux_hw_breakpoint): New data type.
6297 (MAX_BPTS, MAX_WPTS): Define.
6298 (struct arch_process_info, struct arch_lwp_info): New data types.
6299 (arm_linux_get_hwbp_cap): New function.
6300 (arm_linux_get_hw_breakpoint_count): Likewise.
6301 (arm_linux_get_hw_watchpoint_count): Likewise.
6302 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6303 (arm_hwbp_control_initialize): Likewise.
6304 (arm_hwbp_control_is_enabled): Likewise.
6305 (arm_hwbp_control_is_initialized): Likewise.
6306 (arm_hwbp_control_disable): Likewise.
6307 (arm_linux_hw_breakpoint_equal): Likewise.
6308 (arm_linux_hw_point_initialize): Likewise.
6309 (struct update_registers_data): New data structure.
6310 (update_registers_callback: New function.
6311 (arm_insert_point): Likewise.
6312 (arm_remove_point): Likewise.
6313 (arm_stopped_by_watchpoint): Likewise.
6314 (arm_stopped_data_address): Likewise.
6315 (arm_new_process): Likewise.
6316 (arm_new_thread): Likewise.
6317 (arm_prepare_to_resume): Likewise.
6318 (the_low_target): Register arm_insert_point, arm_remove_point,
6319 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6320 arm_new_thread, and arm_prepare_to_resume.
6321
6322 2011-09-15 Stan Shebs <stan@codesourcery.com>
6323
6324 * server.h (struct emit_ops): Add compare-goto fields.
6325 * tracepoint.c (gdb_agent_op_sizes): New table.
6326 (emit_eq_goto): New function.
6327 (emit_ne_goto): New function.
6328 (emit_lt_goto): New function.
6329 (emit_le_goto): New function.
6330 (emit_gt_goto): New function.
6331 (emit_ge_goto): New function.
6332 (is_goto_target): New function.
6333 (compile_bytecodes): Recognize special cases of compare-goto
6334 combinations and call specialized emitters for them.
6335 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6336 (amd64_emit_ne_goto): New function.
6337 (amd64_emit_lt_goto): New function.
6338 (amd64_emit_le_goto): New function.
6339 (amd64_emit_gt_goto): New function.
6340 (amd64_emit_ge_goto): New function.
6341 (amd64_emit_ops): Add the new functions.
6342 (i386_emit_eq_goto): New function.
6343 (i386_emit_ne_goto): New function.
6344 (i386_emit_lt_goto): New function.
6345 (i386_emit_le_goto): New function.
6346 (i386_emit_gt_goto): New function.
6347 (i386_emit_ge_goto): New function.
6348 (i386_emit_ops): Add the new functions.
6349
6350 2011-09-08 Stan Shebs <stan@codesourcery.com>
6351
6352 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6353 (i386_emit_epilogue): Restore %ebx.
6354
6355 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6356
6357 * server.c (step_thread): Remove definition.
6358 (process_serial_event): Don't handle Hs.
6359 * server.h (step_thread): Remove declaration.
6360 * target.c (set_desired_inferior): Remove use of step_thread.
6361
6362 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6363
6364 * linux-low.c: Include linux-procfs.h.
6365 (linux_attach_lwp_1): Update comments.
6366 (linux_attach): Scan for existing threads when attaching to a
6367 process that is the tgid.
6368 * Makefile.in: Update dependencies.
6369
6370 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6371
6372 * configure.srv: Add linux-procfs.o dependencies.
6373
6374 2011-08-14 Yao Qi <yao@codesourcery.com>
6375
6376 * target.h (struct target_ops): Fix indent.
6377 * win32-low.c (win32_target_ops): Fix comment.
6378
6379 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6380 Yao Qi <yao@codesourcery.com>
6381
6382 * Makefile.in (clean): Remove tic6x-*.c files.
6383 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6384 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6385 (tic6x-c64xp-linux.c): Likewise.
6386 * configure.srv: Add support for tic6x-*-uclinux.
6387 * linux-tic6x-low.c: New.
6388 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6389
6390 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6391 Yao Qi <yao@codesourcery.com>
6392
6393 * target.h (struct target_ops): Add read_loadmap.
6394 * linux-low.c (struct target_loadseg): New type.
6395 (struct target_loadmap): New type.
6396 (linux_read_loadmap): New function.
6397 (linux_target_ops): Add linux_read_loadmap.
6398 * server.c (handle_query): Support qXfer:fdpic:read packet.
6399 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6400 to NULL.
6401
6402 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6403
6404 * win32-low.c: Include <stdint.h>.
6405
6406 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6407
6408 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6409 to the inferior here.
6410 (i386_remove_aligned_watchpoint): Ditto.
6411 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6412 fit part of the watchpoint in the debug registers.
6413 (i386_update_inferior_debug_regs): New.
6414 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6415 registers, and only update the inferior on success.
6416 (i386_low_remove_watchpoint): Ditto.
6417
6418 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6419
6420 * linux-low.c (compare_ints, unique, list_threads, show_process,
6421 linux_core_of_thread): Delete.
6422 (linux_target_ops): Change linux_core_of_thread to
6423 linux_common_core_of_thread.
6424 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6425 * utils.c (malloc_failure): Change type of argument.
6426 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6427 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6428 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6429 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6430 (IPA_OBJS): Add common-utils-ipa.o.
6431 (ptid_h, linux_osdata_h): New macros.
6432 (server_h): Add common/common-utils.h, common/xml-utils.h,
6433 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6434 common/ptid.h.
6435 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6436 ptid.o, buffer.o): New rules.
6437 (linux-low.o): Add common/linux-osdata.h as a dependency.
6438 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6439 * configure.ac: Add AC_HEADER_DIRENT check.
6440 * config.in: Regenerate.
6441 * configure: Regenerate.
6442 * remote-utils.c (xml_escape_text): Delete.
6443 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6444 buffer_xml_printf): Move to common/buffer.c.
6445 * server.c (main): Remove call to initialize_inferiors.
6446 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6447 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6448 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6449 internal_error, gdb_assert, gdb_assert_fail): Delete.
6450 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6451 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6452 common/buffer.h.
6453 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6454 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6455 initialize_inferiors): Delete.
6456
6457 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6458
6459 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6460 symbol error.
6461
6462 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6463
6464 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6465 assertion.
6466 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6467
6468 2011-05-26 Yao Qi <yao@codesourcery.com>
6469
6470 * Makefile.in (thread-db.o): Track dependence to
6471 common/gdb_thread_db.h.
6472 * thread-db.c: include gdb_thread_db.h from right place.
6473
6474 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6475
6476 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6477 __FILE__ and __LINE__ to internal_error.
6478
6479 2011-05-13 Doug Evans <dje@google.com>
6480
6481 * thread-db.c (try_thread_db_load_from_sdir): New function.
6482 (try_thread_db_load_from_dir): New function.
6483 (thread_db_load_search): Handle $sdir, ignore $pdir.
6484 Remove trying of system directories if search of
6485 libthread-db-search-path fails, that is now done via $sdir.
6486
6487 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6488
6489 * server.c (handle_query): Add EnableDisableTracepoints to the list
6490 of supported features.
6491 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6492 tracepoints.
6493 (cmd_qtenable_disable): New.
6494 (cmd_qtstart): Install tracepoints even if disabled.
6495 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6496 receiving a QTEnable or QTDisable packet.
6497 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6498 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6499 tracepoints.
6500 (gdb_probe): Skip data collection if static tracepoint is disabled.
6501
6502 2011-05-10 Doug Evans <dje@google.com>
6503
6504 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6505
6506 2011-05-04 Doug Evans <dje@google.com>
6507
6508 * linux-low.c (linux_join): Skip process lookup.
6509 * spu-low.c (spu_join): Ditto.
6510 * server.c (join_inferiors_callback): Delete.
6511 (process_serial_event): For 'D' packet (detach) call join_inferior
6512 directly.
6513
6514 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6515
6516 * README: Don't mention xscale*-*-linux*.
6517 * configure.srv (xscale*-*-linux*): Don't handle target.
6518
6519 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6520
6521 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6522 casting pointers.
6523 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6524 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6525 (i386_emit_void_call_2): Likewise.
6526
6527 2011-04-26 Yao Qi <yao@codesourcery.com>
6528
6529 * linux-low.c: Move common macros to linux-ptrace.h.
6530 Include linux-ptrace.h.
6531 * Makefile.in (linux_ptrace_h): New.
6532 (linux-low.o): Depends on linux-ptrace.h.
6533
6534 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6535
6536 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6537 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6538 (remote_prepare): New function with most of the TCP code from ...
6539 (remote_open): ... here. Detect PORT here unconditionally. Move also
6540 setting transport_is_reliable.
6541 * server.c (run_once): New variable.
6542 (gdbserver_usage): Document it.
6543 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6544 the first run if RUN_ONCE.
6545 * server.h (run_once, remote_prepare): New declarations.
6546
6547 2011-04-19 Tom Tromey <tromey@redhat.com>
6548
6549 * win32-low.c (handle_load_dll): Remove duplicate "the".
6550
6551 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6552
6553 Remove support for old Cygwin 1.5 versions.
6554 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6555 function to avoid warning.
6556 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6557 warning.
6558
6559 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6560
6561 * gdbserver/server.h (Macro _): Define it if not available.
6562
6563 2011-03-14 Michael Snyder <msnyder@vmware.com>
6564
6565 * hostio.c (handle_close): Remove unnecessary null test.
6566
6567 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6568
6569 * Makefile.in (maintainer-clean realclean distclean): Remove
6570 "make ... subdir_do" command.
6571
6572 2011-03-10 Michael Snyder <msnyder@vmware.com>
6573
6574 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6575
6576 * server.c (handle_v_run): Free alloced buffer on early return.
6577
6578 2011-03-09 Yao Qi <yao@codesourcery.com>
6579
6580 Revert:
6581 2011-03-04 Yao Qi <yao@codesourcery.com>
6582
6583 * Makefile.in: Remove GNU make feature --directory.
6584
6585 2011-03-05 Yao Qi <yao@codesourcery.com>
6586
6587 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6588 (subdir_do): New make target. Copied from gdb/Makefile.
6589 (maintainer-clean, realclean, distclean, clean): Call corresponding
6590 make targets in common/Makefile.
6591
6592 2011-02-11 Yao Qi <yao@codesourcery.com>
6593
6594 * configure.ac: Call AC_PROG_RANLIB.
6595 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6596 * configure: Regenerate.
6597
6598 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6599
6600 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6601
6602 2011-03-06 Yao Qi <yao@codesourcery.com>
6603
6604 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6605
6606 2011-03-05 Yao Qi <yao@codesourcery.com>
6607
6608 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6609 (subdir_do): New make target. Copied from gdb/Makefile.
6610 (maintainer-clean, realclean, distclean, clean): Call corresponding
6611 make targets in common/Makefile.
6612
6613 2011-03-04 Yao Qi <yao@codesourcery.com>
6614
6615 * Makefile.in: Remove GNU make feature --directory.
6616
6617 2011-03-04 Michael Snyder <msnyder@vmware.com>
6618
6619 * server.c (queue_stop_reply): Call xmalloc not malloc.
6620
6621 2011-03-02 Michael Snyder <msnyder@vmware.com>
6622
6623 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6624
6625 2011-02-28 Michael Snyder <msnyder@vmware.com>
6626
6627 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6628 (cmd_qtframe): Ditto.
6629 (cmd_qtbuffer): Ditto.
6630 (cmd_bigqtbuffer): Ditto.
6631
6632 * utils.c (decimal2str): Initialize 'width' to nine, then
6633 don't mess with it.
6634
6635 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6636
6637 * hostio.c (require_data): Free *data, not data.
6638
6639 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6640
6641 * hostio.c (require_data): Use free, not xfree.
6642
6643 2011-02-27 Michael Snyder <msnyder@vmware.com>
6644
6645 * server.c (handle_query): Discard unused value.
6646
6647 * hostio.c (require_data): Free malloc memory before returning
6648 error.
6649
6650 2011-02-26 Michael Snyder <msnyder@vmware.com>
6651
6652 * linux-low.c (list_threads): Call closedir for dirent.
6653
6654 2011-02-27 Michael Snyder <msnyder@vmware.com>
6655
6656 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6657 a case statement falls through.
6658
6659 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6660
6661 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6662 in comparison.
6663
6664 2011-02-26 Michael Snyder <msnyder@vmware.com>
6665
6666 * utils.c (decimal2str): Eliminate dead code and dead param.
6667 (pulongest): Drop dead param from call to decimal2str.
6668 (plongest): Ditto.
6669
6670 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6671
6672 Revert the following patch (not approved yet):
6673 2011-02-21 Hui Zhu <teawater@gmail.com>
6674 * tracepoint.c (tp_printf): New function.
6675 (eval_agent_expr): Handle gdb_agent_op_printf.
6676
6677 2011-02-21 Hui Zhu <teawater@gmail.com>
6678
6679 * tracepoint.c (tp_printf): New function.
6680 (eval_agent_expr): Handle gdb_agent_op_printf.
6681
6682 2011-02-18 Tom Tromey <tromey@redhat.com>
6683
6684 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6685 (tracepoint.o): Likewise.
6686 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6687 (gdb_agent_op_names): Likewise.
6688
6689 2011-02-18 Tom Tromey <tromey@redhat.com>
6690
6691 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6692 gdb_agent_op_rot>: New constants.
6693 (gdb_agent_op_names): Add pick and roll.
6694 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6695 cases.
6696
6697 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6698
6699 * aclocal.m4: Regenerated with aclocal-1.11.1.
6700
6701 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6702
6703 * server.c (handle_qxfer_traceframe_info): New.
6704 (qxfer_packets): Register "traceframe-info".
6705 (handle_query): Report support for qXfer:traceframe-info:read+.
6706 * tracepoint.c (match_blocktype): New.
6707 (traceframe_find_block_type): Rename to ...
6708 (traceframe_walk_blocks): ... this. Add callback filter argument,
6709 and use it.
6710 (traceframe_find_block_type): New, reimplemented on top of
6711 traceframe_walk_blocks.
6712 (build_traceframe_info_xml): New.
6713 (traceframe_read_info): New.
6714 * server.h (traceframe_read_info): Declare.
6715
6716 2011-02-11 Yao Qi <yao@codesourcery.com>
6717
6718 * configure.ac: Call AC_PROG_RANLIB.
6719 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6720 * configure: Regenerate.
6721
6722 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6723
6724 * server.c (gdb_read_memory): Change return semantics to allow
6725 partial transfers.
6726 (handle_search_memory_1): Adjust.
6727 (process_serial_event) <'m' packet>: Handle partial transfers.
6728 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6729
6730 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6731
6732 * regcache.c (init_register_cache): Initialize
6733 regcache->register_status.
6734 (free_register_cache): Release regcache->register_status.
6735 (regcache_cpy): Copy register_status.
6736 (registers_to_string): Print 'x's for unavailable registers.
6737 (supply_register): Mark the register's status valid or
6738 unavailable, depending on whether a buffer was passed in or not.
6739 (supply_register_zeroed): New.
6740 (supply_regblock): Mark the registers' status valid or
6741 unavailable, depending on whether a buffer was passed in or not.
6742 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6743 (struct regcache): New `register_status' field.
6744 (supply_register_zeroed): Declare.
6745 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6746 supply_register_zeroed, rather than passing a NULL buffer to
6747 supply_register.
6748 * tracepoint.c (fetch_traceframe_registers): Update comment.
6749
6750 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6751
6752 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6753 buffer explicit.
6754
6755 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6756
6757 * server.h (decode_xfer_write): Change prototype.
6758 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6759 and don't extract the annex here.
6760 * server.c (decode_xfer_read): Remove `annex' parameter,
6761 and don't extract the annex here.
6762 (decode_xfer): New.
6763 (struct qxfer): New.
6764 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6765 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6766 (handle_qxfer_statictrace): New functions, abstracted out from
6767 handle_query, and made to use the struct qxfer interface.
6768 (handle_threads_qxfer_proper): Rename to ...
6769 (handle_qxfer_threads_proper): ... this.
6770 (handle_threads_qxfer): Rename to ...
6771 (handle_qxfer_threads): ... this. Adjust.
6772 (qxfer_packets): New array.
6773 (handle_qxfer): New function.
6774 (handle_query): Use handle_qxfer.
6775
6776 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6777
6778 * gdbreplay.c: Shorten lines of >= 80 columns.
6779 * linux-low.c: Ditto.
6780 * linux-ppc-low.c: Ditto.
6781 * linux-s390-low.c: Ditto.
6782 * linux-sparc-low.c: Ditto.
6783 * linux-x86-low.c: Ditto.
6784 * linux-xtensa-low.c: Ditto.
6785 * mem-break.c: Ditto.
6786 * nto-low.c: Ditto.
6787 * regcache.h: Ditto.
6788 * remote-utils.c: Ditto.
6789 * server.c: Ditto.
6790 * server.h: Ditto.
6791 * thread-db.c: Ditto.
6792 * tracepoint.c: Ditto.
6793 * utils.c: Ditto.
6794 * win32-low.h: Ditto.
6795
6796 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6797
6798 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6799 update.
6800
6801 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6802
6803 * server.c (gdbserver_version): Update copyright year in version
6804 output.
6805 * gdbreplay.c (gdbreplay_version): Ditto.
6806
6807 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6808
6809 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6810 * linux-bfin-low.c: New file.
6811 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6812 PT_DATA_ADDR for BFIN targets.
6813 * Makefile.in (SFILES): Add linux-bfin-low.c.
6814 (clean): Remove reg-bfin.c.
6815 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6816 * README: Mention supported Blackfin targets.
6817
6818 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6819
6820 * .gitignore: New file.
6821
6822 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6823
6824 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6825
6826 2010-10-22 Jie Zhang <jie@codesourcery.com>
6827
6828 * Makefile.in: Add FLAGS_TO_PASS variable.
6829 (install): Remove dependency of install-only and recursively
6830 invoke make for install-only.
6831
6832 2010-10-04 Doug Evans <dje@google.com>
6833
6834 * Makefile.in (uninstall): Use $(DESTDIR).
6835
6836 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6837
6838 PR gdb/11842
6839
6840 * linux-x86-low.c (compat_siginfo_from_siginfo)
6841 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6842 si_code is < 0. Check for si_code == SI_TIMER before checking for
6843 si_code < 0.
6844
6845 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6846
6847 * lynx-i386-low.c: New file.
6848 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6849
6850 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6851
6852 * lynx-low.c (ptrace_request_to_str): Remove handling for
6853 request values that have been removed in LynxOS 5.x.
6854
6855 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6856
6857 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6858 <ptrace.h>
6859
6860 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6861
6862 * configure.ac: Add --enable-inprocess-agent option.
6863 * configure: Rebuilt.
6864
6865 2010-09-06 Yao Qi <yao@codesourcery.com>
6866
6867 * linux-low.c (linux_kill): Remove unused variable.
6868 (linux_stabilize_threads): Likewise.
6869 * server.c (start_inferior): Likewise.
6870 (queue_stop_reply_callback): Likewise.
6871 * tracepoint.c (do_action_at_tracepoint): Likewise.
6872
6873 2010-09-06 Yao Qi <yao@codesourcery.com>
6874
6875 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6876 on return.
6877
6878 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6879
6880 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6881
6882 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6883
6884 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6885 "$(IPA_DEPFILES)".
6886
6887 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6888
6889 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6890 gdbserver/lynx-ppc-low.c: New files.
6891 * Makefile.in (lynx_low_h): New variable.
6892 (lynx-low.o, lynx-ppc-low.o): New rules.
6893 * configure.ac: On LynxOS, link with -lnetinet.
6894 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6895 * configure: regenerate.
6896
6897 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6898
6899 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6900 * configure.ac: Add check for vasprintf and vsnprintf.
6901 * configure, config.in: Regenerate.
6902 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6903
6904 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6905
6906 * gdbreplay.c: Move include of alloca.h up, next to include of
6907 malloc.h.
6908 * server.h: Add include of malloc.h.
6909 * mem-break.c: Remove include of malloc.h.
6910 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6911
6912 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6913
6914 * Makefile.in (memmem.o): Build with -Wno-error.
6915
6916 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6917
6918 * utils.c (xsnprintf): Make non-static.
6919 * server.h: Add xsnprintf declaration.
6920 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6921 replace calls to snprintf by calls to xsnprintf throughout.
6922
6923 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6924
6925 * configure.ac: Add configure check for alloca.
6926 * configure, config.in: Regenerate.
6927 * server.h: Include alloca.h if it exists.
6928 * gdbreplay.c: Include alloca.h if it exists.
6929
6930 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6931
6932 * linux-low.c (__SIGRTMIN): Define if not already defined.
6933 (linux_create_inferior): Check for __ANDROID__ rather than
6934 __SIGRTMIN.
6935 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6936 are already deferred.
6937 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6938 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6939 stopped and already has a pending signal to report.
6940 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6941 a pending signal to report or is moving out of a jump pad.
6942 (linux_init_signals): Check for __ANDROID__ rather than
6943 __SIGRTMIN.
6944
6945 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6946
6947 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6948 debug_threads check. Avoid a linear search when not doing debug
6949 output.
6950
6951 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6952
6953 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6954 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6955 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6956 (process_event): Change local fd's type to gdb_fildes_t.
6957 (create_file_handler): Adjust prototype.
6958 (delete_file_handler): Adjust prototype.
6959 (handle_file_event): Adjust prototype. Use pfildes.
6960 (create_file_event): Adjsut prototype.
6961 * remote-utils.c (remote_desc, listen_desc): Change type to
6962 gdb_fildes_t.
6963 * server.h: New gdb_fildes_t typedef.
6964 [USE_WIN32API]: Include winsock2.h.
6965 (delete_file_handler, add_file_handler): Adjust prototypes.
6966 (pfildes): Declare.
6967 * utils.c (pfildes): New.
6968
6969 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6970
6971 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6972 * configure: Regenerate.
6973
6974 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6975
6976 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6977 (linux_done_accessing_memory): ... this.
6978 (linux_target_ops): Adjust.
6979 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6980 * nto-low.c (nto_target_ops): Adjust comment.
6981 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6982 * spu-low.c (spu_target_ops): Adjust comment.
6983 * target.h (target_ops): Rename unprepare_to_access_memory field
6984 to done_accessing_memory.
6985 (unprepare_to_access_memory): Rename to ...
6986 (done_accessing_memory): ... this.
6987
6988 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6989
6990 * linux-low.c (linux_prepare_to_access_memory): New.
6991 (linux_unprepare_to_access_memory): New.
6992 (linux_target_ops): Install them.
6993 * server.c (read_memory): Rename to ...
6994 (gdb_read_memory): ... this. Use
6995 prepare_to_access_memory/prepare_to_access_memory.
6996 (write_memory): Rename to ...
6997 (gdb_write_memory): ... this. Use
6998 prepare_to_access_memory/prepare_to_access_memory.
6999 (handle_search_memory_1): Adjust.
7000 (process_serial_event): Adjust.
7001 * target.h (struct target_ops): New fields
7002 prepare_to_access_memory and unprepare_to_access_memory.
7003 (prepare_to_access_memory, unprepare_to_access_memory): New.
7004 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7005 prepare_to_access_memory/prepare_to_access_memory.
7006 * nto-low.c (nto_target_ops): Adjust.
7007 * spu-low.c (spu_target_ops): Adjust.
7008 * win32-low.c (win32_target_ops): Adjust.
7009
7010 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7011
7012 * Makefile.in (WARN_CFLAGS): Get it from configure.
7013 (WERROR_CFLAGS): New.
7014 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7015 * configure.ac: Introduce --enable-werror, which adds -Werror to
7016 the compiler command line. Enabled by default. Disable with
7017 --disable-werror. Add -Wdeclaration-after-statement
7018 Wpointer-arith and -Wformat-nonliteral to warning flags.
7019 * configure: Regenerate.
7020
7021 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7022
7023 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7024
7025 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7026
7027 * gdbreplay.c (remote_error): New.
7028 (gdbchar): New.
7029 (expect): Use gdbchar. Check for error reading from GDB.
7030 Clarify sync error output.
7031 (play): Check for errors writing to GDB.
7032 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7033 * remote-utils.c (getpkt): Check for errors writing to the remote
7034 descriptor.
7035
7036 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7037
7038 * linux-low.c (linux_wait_1): Move non-debugging code out of
7039 `debug_threads' control.
7040
7041 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7042
7043 * linux-low.c (linux_wait_1): Don't set last_status here.
7044 * server.c (push_event, queue_stop_reply_callback): Assert we're
7045 not pushing a TARGET_WAITKIND_IGNORE event.
7046 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7047 (myresume, handle_target_event): Set the thread's last_resume_kind
7048 and last_status from the target returned status.
7049
7050 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7051
7052 PR threads/10729
7053
7054 * linux-x86-low.c (update_debug_registers_callback): New.
7055 (i386_dr_low_set_addr): Use it.
7056 (i386_dr_low_get_addr): New.
7057 (i386_dr_low_set_control): Use update_debug_registers_callback.
7058 (i386_dr_low_get_control): New.
7059 (i386_dr_low_get_status): Adjust.
7060 * linux-low.c (linux_stop_lwp): New.
7061 * linux-low.h (linux_stop_lwp): Declare.
7062
7063 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7064 argument instead of a i386_debug_reg_state.
7065 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7066 a i386_debug_reg_state.
7067 (i386_insert_aligned_watchpoint): Adjust.
7068 (i386_remove_aligned_watchpoint): Adjust.
7069 (i386_low_stopped_data_address): Read the debug registers from the
7070 inferior instead of from the mirrors.
7071 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7072 (i386_dr_low_get_addr): Declare.
7073 (i386_dr_low_get_control): Declare.
7074 (i386_dr_low_get_status): Change prototype.
7075
7076 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7077 (i386_dr_low_get_addr): New.
7078 (i386_dr_low_get_control): New.
7079 (i386_dr_low_get_status): Adjust prototype. Return
7080 dr_status_mirror.
7081 (i386_initial_stuff): Clear dr_status_mirror and
7082 dr_control_mirror.
7083 (i386_get_thread_context): Adjust.
7084 (i386_set_thread_context): Adjust.
7085 (i386_thread_added): Adjust.
7086
7087 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7088
7089 * linux-low.h (linux_thread_area): Delete declaration.
7090
7091 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7092
7093 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7094 after its termination.
7095
7096 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7097
7098 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7099 (gdb_wants_all_stopped): Delete.
7100 (linux_wait_1): Don't call them.
7101 * server.c (handle_v_cont): Tag all threads as want-stopped.
7102 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7103 stopped as "client-wants-stopped".
7104
7105 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7106
7107 * Makefile.in (signals_h): New.
7108 (server_h): Depend on it.
7109 (server.o): Don't depend on $(signals_def).
7110 (signals.o): Depend on $(signals_def).
7111
7112 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7113
7114 * Makefile.in (signals_def): New.
7115 (server_h): Append include/gdb/signals.h and signals_def.
7116 (server.o): Append signals_def.
7117
7118 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7119
7120 * server.c (handle_target_event): Use target_signal_to_host for
7121 resume_info.sig initialization.
7122 * target.h (struct thread_resume) <sig>: New comment.
7123
7124 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7125
7126 * server.c (handle_query): strcpy() the returned string from paddress()
7127 instead of sprintf().
7128 * utils.c (paddress): Return phex_nz().
7129
7130 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7131
7132 * server.c (handle_v_cont): Call mourn_inferior if process
7133 just exited.
7134 (myresume): Likewise.
7135
7136 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7137
7138 Static tracepoints, and integration with UST.
7139
7140 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7141 * mem-break.c (uninsert_all_breakpoints)
7142 (reinsert_all_breakpoints): New.
7143 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7144 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7145 (gdb_agent_ust_loaded, helper_thread_id)
7146 (gdb_agent_helper_thread_id): New macros.
7147 (struct ipa_sym_addresses): Add addr_ust_loaded,
7148 addr_helper_thread_id, addr_cmd_buf.
7149 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7150 (in_process_agent_loaded_ust): New.
7151 (write_e_ust_not_loaded): New.
7152 (maybe_write_ipa_ust_not_loaded): New.
7153 (struct collect_static_trace_data_action): New.
7154 (enum tracepoint_type) <static_tracepoint>: New.
7155 (struct tracepoint) <handle>: Mention static tracepoints.
7156 (struct static_tracepoint_ctx): New.
7157 (CMD_BUF_SIZE): New.
7158 (add_tracepoint_action): Handle static tracepoint actions.
7159 (unprobe_marker_at): New.
7160 (clear_installed_tracepoints): Handle static tracepoints.
7161 (cmd_qtdp): Handle static tracepoints.
7162 (probe_marker_at): New.
7163 (cmd_qtstart): Handle static tracepoints.
7164 (response_tracepoint): Handle static tracepoints.
7165 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7166 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7167 (get_context_regcache): Handle static tracepoints.
7168 (do_action_at_tracepoint): Handle static tracepoint actions.
7169 (traceframe_find_block_type): Handle static trace data blocks.
7170 (traceframe_read_sdata): New.
7171 (download_tracepoints): Download static tracepoint actions.
7172 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7173 (GDB_PROBE_NAME): New.
7174 (ust_ops): New.
7175 (GET_UST_SYM): New.
7176 (USTF): New.
7177 (dlsym_ust): New.
7178 (ust_marker_to_static_tracepoint): New.
7179 (gdb_probe): New.
7180 (collect_ust_data_at_tracepoint): New.
7181 (gdb_ust_probe): New.
7182 (UNIX_PATH_MAX, SOCK_DIR): New.
7183 (gdb_ust_connect_sync_socket): New.
7184 (resume_thread, stop_thread): New.
7185 (run_inferior_command): New.
7186 (init_named_socket): New.
7187 (gdb_ust_socket_init): New.
7188 (cstr_to_hexstr): New.
7189 (next_st): New.
7190 (first_marker, next_marker): New.
7191 (response_ust_marker): New.
7192 (cmd_qtfstm, cmd_qtsstm): New.
7193 (unprobe_marker_at, probe_marker_at): New.
7194 (cmd_qtstmat, gdb_ust_thread): New.
7195 (gdb_ust_init): New.
7196 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7197 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7198 (ST_REGENTRY): New.
7199 (x86_64_st_collect_regmap): New.
7200 (X86_64_NUM_ST_COLLECT_GREGS): New.
7201 (AMD64_RIP_REGNUM): New.
7202 (supply_static_tracepoint_registers): New.
7203 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7204 (ST_REGENTRY): New.
7205 (i386_st_collect_regmap): New.
7206 (i386_NUM_ST_COLLECT_GREGS): New.
7207 (supply_static_tracepoint_registers): New.
7208 * server.c (handle_query): Handle qXfer:statictrace:read.
7209 <qSupported>: Report support for StaticTracepoints, and
7210 qXfer:statictrace:read features.
7211 * server.h (traceframe_read_sdata)
7212 (supply_static_tracepoint_registers): Declare.
7213 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7214 (unpack_varlen_hex): Include in IPA build.
7215 * Makefile.in (ustlibs, ustinc): New.
7216 (IPA_OBJS): Add remote-utils-ipa.o.
7217 ($(IPA_LIB)): Link -ldl and -lpthread.
7218 (UST_CFLAGS): New.
7219 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7220 * config.in, configure: Regenerate.
7221
7222 2010-06-20 Ian Lance Taylor <iant@google.com>
7223 Pedro Alves <pedro@codesourcery.com>
7224
7225 * linux-x86-low.c (always_true): Delete.
7226 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7227 trying to fool the compiler with always_true.
7228
7229 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7230
7231 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7232 conditions in gdbserver.
7233
7234 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7235
7236 * spu-low.c (spu_read_memory): Wrap around local store limit.
7237 (spu_write_memory): Likewise.
7238
7239 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7240
7241 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7242 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7243 LONGEST uses.
7244 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7245 uses.
7246 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7247 uses with LONGEST uses.
7248
7249 2010-06-14 Stan Shebs <stan@codesourcery.com>
7250 Pedro Alves <pedro@codesourcery.com>
7251
7252 Bytecode compiler.
7253
7254 * linux-x86-low.c: Include limits.h.
7255 (add_insns): New.
7256 (always_true): New.
7257 (EMIT_ASM): New.
7258 (EMIT_ASM32): New.
7259 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7260 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7261 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7262 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7263 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7264 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7265 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7266 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7267 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7268 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7269 (amd64_emit_void_call_2): New.
7270 (amd64_emit_ops): New.
7271 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7272 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7273 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7274 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7275 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7276 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7277 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7278 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7279 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7280 (i386_emit_stack_adjust, i386_emit_int_call_1)
7281 (i386_emit_void_call_2): New.
7282 (i386_emit_ops): New.
7283 (x86_emit_ops): New.
7284 (the_low_target): Install x86_emit_ops.
7285 * server.h (struct emit_ops): New.
7286 (get_raw_reg_func_addr): Declare.
7287 (current_insn_ptr, emit_error): Declare.
7288 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7289 (set_trace_state_variable_value): New defines.
7290 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7291 addr_get_trace_state_variable_value and
7292 addr_set_trace_state_variable_value.
7293 (symbol_list): New fields for get_raw_reg,
7294 get_trace_state_variable_value and set_trace_state_variable_value.
7295 (condfn): New typedef.
7296 (struct tracepoint): New field `compiled_cond'.
7297 (do_action_at_tracepoint): Clear compiled_cond.
7298 (get_trace_state_variable_value, set_trace_state_variable_value):
7299 Export in the IPA.
7300 (condition_true_at_tracepoint): If there's a compiled condition,
7301 run that.
7302 (current_insn_ptr, emit_error): New globals.
7303 (struct bytecode_address): New.
7304 (get_raw_reg_func_addr): New.
7305 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7306 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7307 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7308 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7309 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7310 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7311 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7312 (compile_tracepoint_condition, compile_bytecodes): New.
7313 * target.h (emit_ops): Forward declare.
7314 (struct target_ops): New field emit_ops.
7315 (target_emit_ops): New.
7316 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7317 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7318 * linux-low.c (linux_emit_ops): New.
7319 (linux_target_ops): Install it.
7320 * linux-low.h (struct linux_target_ops): New field emit_ops.
7321
7322 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7323
7324 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7325 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7326
7327 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7328 Stan Shebs <stan@codesourcery.com>
7329
7330 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7331 (all): Depend on $(extra_libraries).
7332 (install-only): Install the IPA.
7333 (IPA_OBJS, IPA_LIB): New.
7334 (clean): Remove the IPA lib.
7335 (IPAGENT_CFLAGS): New.
7336 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7337 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7338 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7339 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7340 * configure.ac: Check for atomic builtins support in the compiler.
7341 (IPA_DEPFILES, extra_libraries): Define.
7342 * configure.srv (ipa_obj): Add description.
7343 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7344 (i[34567]86-*-linux*): Set ipa_obj.
7345 (x86_64-*-linux*): Set ipa_obj.
7346 * linux-low.c (stabilizing_threads): New.
7347 (supports_fast_tracepoints): New.
7348 (linux_detach): Stabilize threads before detaching.
7349 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7350 the lwp is either not stabilizing, or is moving out of a jump pad.
7351 (linux_fast_tracepoint_collecting): New.
7352 (maybe_move_out_of_jump_pad): New.
7353 (enqueue_one_deferred_signal): New.
7354 (dequeue_one_deferred_signal): New.
7355 (linux_wait_for_event_1): If moving out of a jump pad, defer
7356 pending signals to later.
7357 (linux_stabilize_threads): New.
7358 (linux_wait_1): Check if threads need moving out of jump pads, and
7359 do it if so.
7360 (stuck_in_jump_pad_callback): New.
7361 (move_out_of_jump_pad_callback): New.
7362 (lwp_running): New.
7363 (linux_resume_one_lwp): Handle moving out of jump pads.
7364 (linux_set_resume_request): Dequeue deferred signals.
7365 (need_step_over_p): Also step over fast tracepoint jumps.
7366 (start_step_over): Also uninsert fast tracepoint jumps.
7367 (finish_step_over): Also reinsert fast tracepoint jumps.
7368 (linux_install_fast_tracepoint_jump): New.
7369 (linux_target_ops): Install linux_stabilize_threads and
7370 linux_install_fast_tracepoint_jump_pad.
7371 * linux-low.h (linux_target_ops) <get_thread_area,
7372 install_fast_tracepoint_jump_pad>: New fields.
7373 (struct lwp_info) <collecting_fast_tracepoint,
7374 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7375 (linux_get_thread_area): Declare.
7376 * linux-x86-low.c (jump_insn): New.
7377 (x86_get_thread_area): New.
7378 (append_insns): New.
7379 (push_opcode): New.
7380 (amd64_install_fast_tracepoint_jump_pad): New.
7381 (i386_install_fast_tracepoint_jump_pad): New.
7382 (x86_install_fast_tracepoint_jump_pad): New.
7383 (the_low_target): Install x86_get_thread_area and
7384 x86_install_fast_tracepoint_jump_pad.
7385 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7386 (struct fast_tracepoint_jump): New.
7387 (fast_tracepoint_jump_insn): New.
7388 (fast_tracepoint_jump_shadow): New.
7389 (find_fast_tracepoint_jump_at): New.
7390 (fast_tracepoint_jump_here): New.
7391 (delete_fast_tracepoint_jump): New.
7392 (set_fast_tracepoint_jump): New.
7393 (uninsert_fast_tracepoint_jumps_at): New.
7394 (reinsert_fast_tracepoint_jumps_at): New.
7395 (set_breakpoint_at): Use write_inferior_memory.
7396 (uninsert_raw_breakpoint): Use write_inferior_memory.
7397 (check_mem_read): Mask out fast tracepoint jumps.
7398 (check_mem_write): Mask out fast tracepoint jumps.
7399 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7400 (set_fast_tracepoint_jump): Declare.
7401 (delete_fast_tracepoint_jump)
7402 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7403 (reinsert_fast_tracepoint_jumps_at): Declare.
7404 * regcache.c: Don't compile many functions when building the
7405 in-process agent library.
7406 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7407 the register buffer in the heap.
7408 (free_register_cache): If the register buffer isn't owned by the
7409 regcache, don't free it.
7410 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7411 pre-existing register caches.
7412 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7413 type.
7414 (convert_ascii_to_int): : Constify `from' parameter type.
7415 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7416 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7417 the needed buffer in-place.
7418 (relocate_instruction): New.
7419 * server.c (handle_query) <qSymbols>: If the target supports
7420 tracepoints, give it a chance of looking up symbols. Report
7421 support for fast tracepoints.
7422 (handle_status): Stabilize threads.
7423 (process_serial_event): Adjust.
7424 * server.h (struct fast_tracepoint_jump): Forward declare.
7425 (struct process_info) <fast_tracepoint_jumps>: New field.
7426 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7427 (decode_X_packet, decode_M_packet): Adjust.
7428 (relocate_instruction): Declare.
7429 (in_process_agent_loaded): Declare.
7430 (tracepoint_look_up_symbols): Declare.
7431 (struct fast_tpoint_collect_status): Declare.
7432 (fast_tracepoint_collecting): Declare.
7433 (force_unlock_trace_buffer): Declare.
7434 (handle_tracepoint_bkpts): Declare.
7435 (initialize_low_tracepoint)
7436 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7437 * target.h (struct target_ops) <stabilize_threads,
7438 install_fast_tracepoint_jump_pad>: New fields.
7439 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7440 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7441 [HAVE_STDINT_H]: Include stdint.h.
7442 (trace_debug_1): Rename to ...
7443 (trace_vdebug): ... this.
7444 (trace_debug): Rename to ...
7445 (trace_debug_1): ... this. Add `level' parameter.
7446 (trace_debug): New.
7447 (ATTR_USED, ATTR_NOINLINE): New.
7448 (IP_AGENT_EXPORT): New.
7449 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7450 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7451 (about_to_request_buffer_space, trace_buffer_is_full)
7452 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7453 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7454 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7455 (traceframe_write_count, traceframes_created)
7456 (trace_state_variables)
7457 New renaming defines.
7458 (struct ipa_sym_addresses): New.
7459 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7460 (symbol_list): New.
7461 (ipa_sym_addrs): New.
7462 (all_tracepoint_symbols_looked_up): New.
7463 (in_process_agent_loaded): New.
7464 (write_e_ipa_not_loaded): New.
7465 (maybe_write_ipa_not_loaded): New.
7466 (tracepoint_look_up_symbols): New.
7467 (debug_threads) [IN_PROCESS_AGENT]: New.
7468 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7469 (UNKNOWN_SIDE_EFFECTS): New.
7470 (stop_tracing): New.
7471 (flush_trace_buffer): New.
7472 (stop_tracing_bkpt): New.
7473 (flush_trace_buffer_bkpt): New.
7474 (read_inferior_integer): New.
7475 (read_inferior_uinteger): New.
7476 (read_inferior_data_pointer): New.
7477 (write_inferior_data_pointer): New.
7478 (write_inferior_integer): New.
7479 (write_inferior_uinteger): New.
7480 (struct collect_static_trace_data_action): Delete.
7481 (enum tracepoint_type): New.
7482 (struct tracepoint) <type>: New field `type'.
7483 <actions_str, step_actions, step_actions_str>: Only include in
7484 GDBserver.
7485 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7486 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7487 (tracepoints): Use IP_AGENT_EXPORT.
7488 (last_tracepoint): Don't include in the IPA.
7489 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7490 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7491 (alloced_trace_state_variables): New.
7492 (trace_state_variables): Use IP_AGENT_EXPORT.
7493 (traceframe_t): Delete unused variable.
7494 (circular_trace_buffer): Don't include in the IPA.
7495 (trace_buffer_start): Delete.
7496 (struct trace_buffer_control): New.
7497 (trace_buffer_free): Delete.
7498 (struct ipa_trace_buffer_control): New.
7499 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7500 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7501 New.
7502 (trace_buffer_ctrl): New.
7503 (TRACE_BUFFER_CTRL_CURR): New.
7504 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7505 Reimplement as macros.
7506 (trace_buffer_wrap): Delete.
7507 (traceframe_write_count, traceframe_read_count)
7508 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7509 (struct tracepoint_hit_ctx) <type>: New field.
7510 (struct fast_tracepoint_ctx): New.
7511 (memory_barrier): New.
7512 (cmpxchg): New.
7513 (record_tracepoint_error): Update atomically in the IPA.
7514 (clear_inferior_trace_buffer): New.
7515 (about_to_request_buffer_space): New.
7516 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7517 updating the same buffer.
7518 (add_tracepoint): Default the tracepoint's type to trap
7519 tracepoint, and orig_size to -1.
7520 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7521 internal variables.
7522 (create_trace_state_variable): New parameter `gdb'. Handle it.
7523 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7524 (cmd_qtdp): Handle fast tracepoints.
7525 (cmd_qtdv): Adjust.
7526 (max_jump_pad_size): New.
7527 (gdb_jump_pad_head): New.
7528 (get_jump_space_head): New.
7529 (claim_jump_space): New.
7530 (sort_tracepoints): New.
7531 (MAX_JUMP_SIZE): New.
7532 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7533 IPA.
7534 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7535 support. Upload fast traceframes, and delete internal IPA
7536 breakpoints.
7537 (stop_tracing_handler): New.
7538 (flush_trace_buffer_handler): New.
7539 (cmd_qtstop): Upload fast tracepoints.
7540 (response_tracepoint): Handle fast tracepoints.
7541 (tracepoint_finished_step): Upload fast traceframes. Set the
7542 tracepoint hit context's tracepoint type.
7543 (handle_tracepoint_bkpts): New.
7544 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7545 type. Add comment about fast tracepoints.
7546 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7547 non-existing action_str field.
7548 (get_context_regcache): Handle fast tracepoints.
7549 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7550 to the regcache.
7551 (fast_tracepoint_from_jump_pad_address): New.
7552 (fast_tracepoint_from_ipa_tpoint_address): New.
7553 (collecting_t): New.
7554 (force_unlock_trace_buffer): New.
7555 (fast_tracepoint_collecting): New.
7556 (collecting): New.
7557 (gdb_collect): New.
7558 (write_inferior_data_ptr): New.
7559 (target_tp_heap): New.
7560 (target_malloc): New.
7561 (download_agent_expr): New.
7562 (UALIGN): New.
7563 (download_tracepoints): New.
7564 (download_trace_state_variables): New.
7565 (upload_fast_traceframes): New.
7566 (IPA_FIRST_TRACEFRAME): New.
7567 (IPA_NEXT_TRACEFRAME_1): New.
7568 (IPA_NEXT_TRACEFRAME): New.
7569 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7570 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7571 (gdb_jump_pad_buffer_end): New.
7572 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7573 (initialize_tracepoint): Adjust.
7574 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7575 buffer. Initialize the low module.
7576 * utils.c (PREFIX, TOOLNAME): New.
7577 (malloc_failure): Use PREFIX.
7578 (error): In the IPA, an error causes an exit.
7579 (fatal, warning): Use PREFIX.
7580 (internal_error): Use TOOLNAME.
7581 (NUMCELLS): Increase to 10.
7582 * configure, config.in: Regenerate.
7583
7584 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7585
7586 * server.c (handle_query) <qSupported>: Do two passes over the
7587 qSupported string to avoid nesting strtok.
7588
7589 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7590
7591 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7592 (CDEPS): New.
7593 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7594 -Wl,--dynamic-list.
7595 * configure: Regenerate.
7596 * proc-service.list: New.
7597
7598 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7599
7600 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7601 New comment.
7602
7603 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7604
7605 * gdbreplay.c (remote_open): Check error return from socket() call by
7606 its equality to -1 not by it being negative.
7607 * remote-utils.c (remote_open): Likewise.
7608
7609 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7610
7611 * config.h: Regenerate.
7612
7613 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7614
7615 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7616 doesn't provide PTRACE_GET_THREAD_AREA.
7617
7618 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7619
7620 * linux-m68k-low.c: Include <asm/ptrace.h>
7621 (ps_get_thread_area): Implement.
7622
7623 2010-05-03 Doug Evans <dje@google.com>
7624
7625 * event-loop.c (struct callback_event): New struct.
7626 (callback_list): New global.
7627 (append_callback_event, delete_callback_event): New functions.
7628 (process_callback): New function.
7629 (start_event_loop): Call it.
7630 * remote-utils.c (NOT_SCHEDULED): Define.
7631 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7632 moved out of readchar.
7633 (readchar): Rewrite. Call reschedule before returning.
7634 (reset_readchar): New function.
7635 (remote_close): Call it.
7636 (process_remaining, reschedule): New functions.
7637 * server.h (callback_handler_func): New typedef.
7638 (append_callback_event, delete_callback_event): Declare.
7639
7640 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7641
7642 * proc-service.c (ps_pglobal_lookup): Use
7643 thread_db_look_up_one_symbol.
7644 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7645 parameter. Use it instead of all_symbols_looked_up.
7646 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7647 field.
7648 (all_symbols_looked_up): Don't declare.
7649 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7650 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7651 field.
7652 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7653 Set all_symbols_looked_up here.
7654 (thread_db_look_up_one_symbol): New.
7655 (thread_db_get_tls_address): Adjust.
7656 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7657 thread_db object on the heap, and tentatively set it in the
7658 process structure.
7659 (thread_db_init): Don't set all_symbols_looked_up here.
7660 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7661
7662 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7663
7664 * linux-low.c (linux_kill, linux_detach): Adjust.
7665 (status_pending_p_callback): Remove redundant statement. Check
7666 for !TARGET_WAITIKIND_IGNORE, instead of
7667 TARGET_WAITKIND_STOPPED.
7668 (handle_tracepoints): Make sure LWP is locked. Adjust.
7669 (linux_wait_for_event_1): Adjust.
7670 (linux_cancel_breakpoints): New.
7671 (unsuspend_one_lwp): New.
7672 (unsuspend_all_lwps): New.
7673 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7674 (send_sigstop_callback): Change return type to int, add new
7675 `except' parameter and handle it.
7676 (suspend_and_send_sigstop_callback): New.
7677 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7678 pass them down. If SUSPEND, also increment the lwp's suspend
7679 count.
7680 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7681 (need_step_over_p): Don't consider suspended LWPs.
7682 (start_step_over): Adjust.
7683 (proceed_one_lwp): Change return type to int, add new `except'
7684 parameter and handle it.
7685 (unsuspend_and_proceed_one_lwp): New.
7686 (proceed_all_lwps): Use find_inferior instead of
7687 for_each_inferior.
7688 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7689 also decrement the suspend count of LWPs. Pass `except' down,
7690 instead of hacking its suspend count.
7691 (linux_pause_all): Add `freeze' parameter. Adjust.
7692 (linux_unpause_all): New.
7693 (linux_target_ops): Install linux_unpause_all.
7694 * server.c (handle_status): Adjust.
7695 * target.h (struct target_ops): New fields `unpause_all' and
7696 `cancel_breakpoints'. Add new parameter to `pause_all'.
7697 (pause_all): Add new `freeze' parameter.
7698 (unpause_all): New.
7699 (cancel_breakpoints): New.
7700 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7701 cancel breakpoints.
7702 (cmd_qtstart): Pause threads.
7703 (stop_tracing): Pause threads, and cancel breakpoints.
7704 * win32-low.c (win32_target_ops): Adjust.
7705
7706 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7707
7708 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7709 the inferior right away from here...
7710 (linux_wait_1): ... to here, and adjust to check the thread's
7711 last_resume_kind instead of the lwp's step or stop_expected flags.
7712
7713 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7714
7715 * README: Use consistent `GDB' and `GDBserver' spellings.
7716
7717 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7718
7719 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7720 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7721 (linux_detach_one_lwp): Assume the lwp is stopped.
7722 (any_thread_of): Delete.
7723 (linux_detach): Stop all lwps here. Don't blindly delete all
7724 breakpoints.
7725 (delete_lwp_callback): New.
7726 (linux_mourn): Delete all lwps of the process that is gone.
7727 (linux_wait_1): Don't delete the last lwp of the process here.
7728 * mem-break.h (mark_breakpoints_out): Declare.
7729 * mem-break.c (mark_breakpoints_out): New.
7730 (free_all_breakpoints): Use it.
7731 * server.c (handle_target_event): If the process is gone, mark
7732 breakpoints out.
7733 * thread-db.c (struct thread_db) <create_bp>: New field.
7734 (thread_db_enable_reporting): Fix prototype. Store a thread event
7735 breakpoint reference in the thread_db struct.
7736 (thread_db_load_search): Clear the thread_db object.
7737 (try_thread_db_load_1): Ditto.
7738 (switch_to_process): New.
7739 (disable_thread_event_reporting): Use it.
7740 (remove_thread_event_breakpoints): New.
7741 (thread_db_detach, thread_db_mourn): Use it.
7742
7743 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7744
7745 * linux-low.c (linux_enable_event_reporting): New.
7746 (linux_wait_for_event_1, handle_extended_wait): Use it.
7747
7748 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7749
7750 * linux-low.c (linux_kill_one_lwp, linux_kill)
7751 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7752 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7753 SIGSTOP even if the LWP is stopped.
7754 (send_sigstop_callback): New.
7755 (stop_all_lwps): Use send_sigstop_callback instead.
7756 (linux_resume_one_thread): Adjust.
7757 (proceed_one_lwp): Still proceed an LWP that the client has
7758 requested to stop, if we haven't reported it as stopped yet. Make
7759 sure that LWPs the client want stopped, have a pending SIGSTOP.
7760
7761 2010-04-26 Doug Evans <dje@google.com>
7762
7763 * server.c (handle_general_set): Make static.
7764
7765 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7766 Print received char after testing for error/eof instead of before.
7767 (input_interrupt): Tweak comment.
7768
7769 2010-04-23 Doug Evans <dje@google.com>
7770
7771 * server.c (start_inferior): Print inferior argv if --debug.
7772
7773 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7774
7775 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7776 * nto-x86-low.c: Include server.h
7777
7778 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7779
7780 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7781 be consistent with other sources of this directory.
7782 (init_registers_amd64): Correct name of source file of this function
7783 in the comment.
7784
7785 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7786
7787 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7788 64-bit executables.
7789
7790 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7791
7792 * win32-i386-low.c: Add 64-bit support.
7793 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7794 (init_registers_amd64): Declare.
7795 (mappings): Add 64-bit version of array.
7796 (init_windows_x86): New function.
7797 (the_low_target): Change init_arch field to init_windows_x86.
7798
7799 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7800
7801 * win32-low.c: Adapt to support also 64-bit architecture.
7802 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7803 (get_image_name): Use SIZE_T type for local variable `done'.
7804 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7805 (toolhelp_get_dll_name): Idem.
7806 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7807 Use uintptr_t typecast to avoid warning.
7808 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7809 (handle_exception): Use phex_nz to avoid warning.
7810 (win32_wait): Remove unused local variable `process'.
7811
7812 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7813
7814 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7815 `amd64-avx.o'.
7816
7817 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7818
7819 * configure.ac: Use `ws2_32' library for srv_mingw.
7820 * configure: Regenerate.
7821 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7822 * remote-utils.c: Likewise.
7823
7824 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7825
7826 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7827 if __x86_64__ is defined.
7828
7829 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7830
7831 * configure: Regenerate.
7832
7833 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7834
7835 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7836 * target.h (target_ops): New get_tib_address field.
7837 * win32-low.h (win32_thread_info): Add thread_local_base field.
7838 * win32-low.c (child_add_thread): Add tlb argument.
7839 Set thread_local_base field to TLB.
7840 (get_child_debug_event): Adapt to child_add_thread change.
7841 (win32_get_tib_address): New function.
7842 (win32_target_ops): Set get_tib_address field to
7843 win32_get_tib_address.
7844 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7845
7846 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7847
7848 * linux-low.c (linux_mourn): Also remove the process.
7849 * server.c (handle_target_event): Don't remove the process here.
7850 * nto-low.c (nto_mourn): New.
7851 (nto_target_ops): Install it.
7852 * spu-low.c (spu_mourn): New.
7853 (spu_target_ops): Install it.
7854 * win32-low.c (win32_mourn): New.
7855 (win32_target_ops): Install it.
7856
7857 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7858
7859 * server.h (buffer_xml_printf): Remove redundant `;'.
7860
7861 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7862
7863 * regcache.c (set_register_cache): Invalidate regcaches before
7864 changing the register cache layout.
7865 (regcache_invalidate_one): Allow a NULL regcache.
7866 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7867 regcaches before changing the register cache layout or the target
7868 regsets.
7869
7870 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7871
7872 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7873 variable warning on Linux/x86-64.
7874
7875 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7876
7877 GDBserver disconnected tracing support.
7878
7879 * linux-low.c (linux_remove_process): Delete.
7880 (add_lwp): Don't set last_resume_kind here.
7881 (linux_kill): Use `mourn'.
7882 (linux_detach): Use `thread_db_detach', and `mourn'.
7883 (linux_mourn): New.
7884 (linux_attach_lwp_1): Adjust comment.
7885 (linux_attach): last_resume_kind moved the thread_info; adjust.
7886 (status_pending_p_callback): Adjust.
7887 (linux_wait_for_event_1): Adjust.
7888 (count_events_callback, select_singlestep_lwp_callback)
7889 (select_event_lwp_callback, cancel_breakpoints_callback)
7890 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7891 (proceed_one_lwp): Adjust.
7892 (linux_async): Add debug output.
7893 (linux_thread_stopped): New.
7894 (linux_pause_all): New.
7895 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7896 linux_pause_all.
7897 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7898 (thread_db_free): Delete declaration.
7899 (thread_db_detach, thread_db_mourn): Declare.
7900 * thread-db.c (thread_db_init): Use thread_db_mourn.
7901 (thread_db_free): Delete, split in two.
7902 (disable_thread_event_reporting): New.
7903 (thread_db_detach): New.
7904 (thread_db_mourn): New.
7905
7906 * server.h (struct thread_info) <last_resume_kind>: New field.
7907 <attached>: Add comment.
7908 <gdb_detached>: New field.
7909 (handler_func): Change return type to int.
7910 (handle_serial_event, handle_target_event): Ditto.
7911 (gdb_connected): Declare.
7912 (tracing): Delete.
7913 (disconnected_tracing): Declare.
7914 (stop_tracing): Declare.
7915
7916 * server.c (handle_query) <qSupported>: Report support for
7917 disconnected tracing.
7918 (queue_stop_reply_callback): Account for running threads.
7919 (gdb_wants_thread_stopped): New.
7920 (gdb_wants_all_threads_stopped): New.
7921 (gdb_reattached_process): New.
7922 (handle_status): Clear the `gdb_detached' flag of all processes.
7923 In all-stop, stop all threads.
7924 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7925 (process_serial_event): If the remote connection breaks, or if an
7926 exit was forced with "monitor exit", force an event loop exit.
7927 Handle disconnected tracing on detach.
7928 (handle_serial_event): Adjust.
7929 (handle_target_event): If GDB isn't connected, forward events back
7930 to the inferior, unless the last process exited, in which case,
7931 exit gdbserver. Adjust interface.
7932
7933 * remote-utils.c (remote_open): Don't block in accept. Instead
7934 register an event loop source on the listen socket file
7935 descriptor. Refactor bits into ...
7936 (listen_desc): ... this new global.
7937 (gdb_connected): ... this new function.
7938 (enable_async_notification): ... this new function.
7939 (handle_accept_event): ... this new function.
7940 (remote_close): Clear remote_desc.
7941
7942 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7943
7944 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7945 New fields.
7946 (mourn_inferior): Define.
7947 (target_process_qsupported): Avoid the dangling else problem.
7948 (thread_stopped): Define.
7949 (pause_all): Define.
7950 (target_waitstatus_to_string): Declare.
7951 * target.c (target_waitstatus_to_string): New.
7952
7953 * tracepoint.c (tracing): Make extern.
7954 (disconnected_tracing): New.
7955 (stop_tracing): Make extern. Handle tracing stops due to GDB
7956 disconnecting.
7957 (cmd_qtdisconnected): New.
7958 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7959 (handle_tracepoint_general_set): Handle QTDisconnected.
7960
7961 * event-loop.c (event_handler_func): Change return type to int.
7962 (process_event): Bail out if the event handler wants the event
7963 loop to stop.
7964 (handle_file_event): Ditto.
7965 (start_event_loop): Bail out if the event handler wants the event
7966 loop to stop.
7967
7968 * nto-low.c (nto_target_ops): Adjust.
7969 * spu-low.c (spu_wait): Don't remove the process here.
7970 (spu_target_ops): Adjust.
7971 * win32-low.c (win32_wait): Don't remove the process here.
7972 (win32_target_ops): Adjust.
7973
7974 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7975
7976 * regcache.c (realloc_register_cache): Invalidate inferior's
7977 regcache before recreating it.
7978
7979 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7980
7981 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7982
7983 2010-04-09 Stan Shebs <stan@codesourcery.com>
7984 Pedro Alves <pedro@codesourcery.com>
7985
7986 * server.h (LONGEST): New.
7987 (struct thread_info) <while_stepping>: New field.
7988 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7989 Declare.
7990 (initialize_tracepoint, handle_tracepoint_general_set)
7991 (handle_tracepoint_query, tracepoint_finished_step)
7992 (tracepoint_was_hit, release_while_stepping_state_list):
7993 (current_traceframe): Declare.
7994 * server.c (handle_general_set): Handle tracepoint packets.
7995 (read_memory): New.
7996 (write_memory): New.
7997 (handle_search_memory_1): Use read_memory.
7998 (handle_query): Report support for conditional tracepoints, trace
7999 state variables, and tracepoint sources. Handle tracepoint
8000 queries.
8001 (main): Initialize the tracepoints module.
8002 (process_serial_event): Handle traceframe reads/writes.
8003
8004 * linux-low.c (handle_tracepoints): New.
8005 (linux_wait_1): Call it.
8006 (linux_resume_one_lwp): Handle while-stepping.
8007 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8008 (linux_target_ops): Install them.
8009 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8010 New field.
8011 * linux-x86-low.c (x86_supports_tracepoints): New.
8012 (the_low_target). Install it.
8013
8014 * mem-break.h (delete_breakpoint): Declare.
8015 * mem-break.c (delete_breakpoint): Make external.
8016
8017 * target.h (struct target_ops): Add `supports_tracepoints',
8018 `read_pc', and `write_pc' fields.
8019 (target_supports_tracepoints): Define.
8020 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8021 (phex_nz): New.
8022
8023 * regcache.h (struct regcache) <registers_owned>: New field.
8024 (init_register_cache, regcache_cpy): Declare.
8025 (regcache_read_pc, regcache_write_pc): Declare.
8026 (register_cache_size): Declare.
8027 (supply_regblock): Declare.
8028 * regcache.c (init_register_cache): New.
8029 (new_register_cache): Use it.
8030 (regcache_cpy): New.
8031 (register_cache_size): New.
8032 (supply_regblock): New.
8033 (regcache_read_pc, regcache_write_pc): New.
8034
8035 * tracepoint.c: New.
8036
8037 * Makefile.in (OBS): Add tracepoint.o.
8038 (tracepoint.o): New rule.
8039
8040 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8041
8042 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8043 (i386-mmx.o): New.
8044 (i386-mmx.c): Likewise.
8045 (i386-mmx-linux.o): Likewise.
8046 (i386-mmx-linux.c): Likewise.
8047
8048 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8049 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8050 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8051 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8052
8053 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8054 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8055 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8056
8057 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8058
8059 * Makefile.in (clean): Updated.
8060 (i386-avx.o): New.
8061 (i386-avx.c): Likewise.
8062 (i386-avx-linux.o): Likewise.
8063 (i386-avx-linux.c): Likewise.
8064 (amd64-avx.o): Likewise.
8065 (amd64-avx.c): Likewise.
8066 (amd64-avx-linux.o): Likewise.
8067 (amd64-avx-linux.c): Likewise.
8068
8069 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8070 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8071 (srv_amd64_regobj): Add amd64-avx.o.
8072 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8073 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8074 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8075 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8076 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8077 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8078 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8079
8080 * i387-fp.c: Include "i386-xstate.h".
8081 (i387_xsave): New.
8082 (i387_cache_to_xsave): Likewise.
8083 (i387_xsave_to_cache): Likewise.
8084 (x86_xcr0): Likewise.
8085
8086 * i387-fp.h (i387_cache_to_xsave): Likewise.
8087 (i387_xsave_to_cache): Likewise.
8088 (x86_xcr0): Likewise.
8089
8090 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8091 * linux-crisv32-low.c (target_regsets): Likewise.
8092 * linux-m68k-low.c (target_regsets): Likewise.
8093 * linux-mips-low.c (target_regsets): Likewise.
8094 * linux-ppc-low.c (target_regsets): Likewise.
8095 * linux-s390-low.c (target_regsets): Likewise.
8096 * linux-sh-low.c (target_regsets): Likewise.
8097 * linux-sparc-low.c (target_regsets): Likewise.
8098 * linux-xtensa-low.c (target_regsets): Likewise.
8099
8100 * linux-low.c: Include <sys/uio.h>.
8101 (regsets_fetch_inferior_registers): Support nt_type.
8102 (regsets_store_inferior_registers): Likewise.
8103 (linux_process_qsupported): New.
8104 (linux_target_ops): Add linux_process_qsupported.
8105
8106 * linux-low.h (regset_info): Add nt_type.
8107 (linux_target_ops): Add process_qsupported.
8108
8109 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8110 and <sys/uio.h>.
8111 (init_registers_i386_avx_linux): New.
8112 (init_registers_amd64_avx_linux): Likewise.
8113 (xmltarget_i386_linux_no_xml): Likewise.
8114 (xmltarget_amd64_linux_no_xml): Likewise.
8115 (PTRACE_GETREGSET): Likewise.
8116 (PTRACE_SETREGSET): Likewise.
8117 (x86_fill_xstateregset): Likewise.
8118 (x86_store_xstateregset): Likewise.
8119 (use_xml): Likewise.
8120 (x86_linux_update_xmltarget): Likewise.
8121 (x86_linux_process_qsupported): Likewise.
8122 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8123 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8124 init_registers_i386_linux here. Call
8125 x86_linux_update_xmltarget.
8126 (the_low_target): Add x86_linux_process_qsupported.
8127
8128 * server.c (handle_query): Call target_process_qsupported.
8129
8130 * target.h (target_ops): Add process_qsupported.
8131 (target_process_qsupported): New.
8132
8133 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8134
8135 * inferiors.c (add_thread): Set last_status kind to
8136 TARGET_WAITKIND_IGNORE.
8137 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8138 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8139 (linux_wait_1): Move `thread' local definition to block that uses
8140 it. Don't NULL initialize `event_child'.
8141 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8142 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8143 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8144
8145 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8146
8147 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8148 an extended waitstatus, or by a watchpoint.
8149 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8150 thread was stepping or has been stopped by a watchpoint.
8151
8152 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8153
8154 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8155 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8156 of another, then delete the previous, and validate all
8157 breakpoints.
8158 (validate_inserted_breakpoint): New.
8159 (delete_disabled_breakpoints): New.
8160 (validate_breakpoints): New.
8161 (check_mem_read): Validate breakpoints before trusting their
8162 shadow. Delete disabled breakpoints.
8163 (check_mem_write): Validate breakpoints before trusting they
8164 should be inserted. Delete disabled breakpoints.
8165 * mem-break.h (validate_breakpoints):
8166 * server.c (handle_query): Validate breakpoints when we see a
8167 qSymbol query.
8168
8169 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8170
8171 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8172 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8173 if we could tell there's a GDB breakpoint at stop_pc.
8174 (need_step_over_p): Don't do a step over if we find a GDB
8175 breakpoint at the resume PC.
8176
8177 * mem-break.c (struct raw_breakpoint): New.
8178 (enum bkpt_type): New type `gdb_breakpoint'.
8179 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8180 fields. New field `raw'.
8181 (find_raw_breakpoint_at): New.
8182 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8183 breakpoint instead.
8184 (set_breakpoint_at): Adjust.
8185 (delete_raw_breakpoint): New.
8186 (release_breakpoint): New.
8187 (delete_breakpoint): Rename to...
8188 (delete_breakpoint_1): ... this. Add proc parameter. Use
8189 release_breakpoint. Return ENOENT.
8190 (delete_breakpoint): Reimplement.
8191 (find_breakpoint_at): Delete.
8192 (find_gdb_breakpoint_at): New.
8193 (delete_breakpoint_at): Delete.
8194 (set_gdb_breakpoint_at): New.
8195 (delete_gdb_breakpoint_at): New.
8196 (gdb_breakpoint_here): New.
8197 (set_reinsert_breakpoint): Use release_breakpoint.
8198 (uninsert_breakpoint): Rename to ...
8199 (uninsert_raw_breakpoint): ... this.
8200 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8201 (reinsert_raw_breakpoint): Change parameter type to
8202 raw_breakpoint.
8203 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8204 instead.
8205 (check_breakpoints): Adjust. Use release_breakpoint.
8206 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8207 (breakpoint_inserted_here): Ditto.
8208 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8209 Don't trust the breakpoint's shadow if it is not inserted.
8210 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8211 (delete_all_breakpoints): Adjust.
8212 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8213 use delete_breakpoint_1.
8214
8215 * mem-break.h (breakpoints_supported): Delete declaration.
8216 (set_gdb_breakpoint_at): Declare.
8217 (gdb_breakpoint_here): Declare.
8218 (delete_breakpoint_at): Delete.
8219 (delete_gdb_breakpoint_at): Declare.
8220
8221 * server.h (struct raw_breakpoint): Forward declare.
8222 (struct process_info): New field `raw_breakpoints'.
8223
8224 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8225 breakpoints.
8226
8227 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8228
8229 * linux-low.c (status_pending_p_callback): Fix comment.
8230 (linux_wait_for_event_1): Move most of the internal breakpoint
8231 handling from here...
8232 (linux_wait_1): ... to here.
8233 (count_events_callback): New.
8234 (select_singlestep_lwp_callback): New.
8235 (select_event_lwp_callback): New.
8236 (cancel_breakpoints_callback): New.
8237 (select_event_lwp): New.
8238 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8239 priority to all LWPs that have had events that should be reported
8240 to the client. Cancel breakpoints when about to reporting the
8241 event to the client, not while stopping lwps. No longer cancel
8242 finished single-steps here.
8243 (cancel_finished_single_step): Delete.
8244 (cancel_finished_single_steps): Delete.
8245
8246 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8247
8248 * mem-break.c (enum bkpt_type): New.
8249 (struct breakpoint): New field `type'.
8250 (set_breakpoint_at): Change return type to struct breakpoint
8251 pointer. Set type to `other_breakpoint' by default.
8252 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8253 in the breakpoint list.
8254 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8255 (reinsert_breakpoint): Rename to ...
8256 (reinsert_raw_breakpoint): ... this.
8257 (reinsert_breakpoints_at): Adjust.
8258 * mem-break.h (struct breakpoint): Declare.
8259 (set_breakpoint_at): Change return type to struct breakpoint
8260 pointer.
8261
8262 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8263
8264 * server.c (handle_query): Assign, not compare.
8265
8266 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8267
8268 Teach linux gdbserver to step-over-breakpoints.
8269
8270 * linux-low.c (can_hardware_single_step): New.
8271 (supports_breakpoints): New.
8272 (handle_extended_wait): If stopping threads, read the stop pc of
8273 the new cloned LWP.
8274 (get_pc): New.
8275 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8276 low target doesn't support retrieving the PC.
8277 (add_lwp): Set last_resume_kind to resume_continue.
8278 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8279 (linux_attach): Don't clear stop_expected. Set the lwp's
8280 last_resume_kind to resume_stop.
8281 (linux_detach_one_lwp): Don't check for removed breakpoints.
8282 (check_removed_breakpoint): Delete.
8283 (status_pending_p): Rename to ...
8284 (status_pending_p_callback): ... this. Don't check for removed
8285 breakpoints. Don't consider threads that are stopped from GDB's
8286 perspective.
8287 (linux_wait_for_lwp): Always read the stop_pc here.
8288 (cancel_breakpoint): New.
8289 (step_over_bkpt): New global.
8290 (linux_wait_for_event_1): Implement stepping over breakpoints.
8291 (gdb_wants_lwp_stopped): New.
8292 (gdb_wants_all_stopped): New.
8293 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8294 single-step traps here. Store the thread's last reported target
8295 wait status.
8296 (send_sigstop): Don't clear stop_expected. Always set it,
8297 instead.
8298 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8299 (cancel_finished_single_step): New.
8300 (cancel_finished_single_steps): New.
8301 (wait_for_sigstop): Don't cancel finished single-step traps here.
8302 (linux_resume_one_lwp): Don't check for removed breakpoints.
8303 Don't set `step' on non-hardware step archs.
8304 (linux_set_resume_request): Ignore resume_stop requests if already
8305 stopping or stopped. Set the lwp's last_resume_kind.
8306 (resume_status_pending_p): Don't check for removed breakpoints.
8307 (need_step_over_p): New.
8308 (start_step_over): New.
8309 (finish_step_over): New.
8310 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8311 requests. Clear the thread's last reported target waitstatus.
8312 Don't use the `suspended' flag. Don't consider pending breakpoints.
8313 (linux_resume): Start a step-over if necessary.
8314 (proceed_one_lwp): New.
8315 (proceed_all_lwps): New.
8316 (unstop_all_lwps): New.
8317 * linux-low.h (struct lwp_info): Rewrite comment for the
8318 `suspended' flag. Add the `stop_pc' field. Delete the
8319 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8320 Add `'last_resume_kind' and `need_step_over' fields.
8321 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8322 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8323 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8324 (set_raw_breakpoint_at): New.
8325 (set_breakpoint_at): Rewrite to use it.
8326 (reinsert_breakpoint_handler): Delete.
8327 (set_reinsert_breakpoint): New.
8328 (reinsert_breakpoint_by_bp): Delete.
8329 (delete_reinsert_breakpoints): New.
8330 (uninsert_breakpoint): Rewrite.
8331 (uninsert_breakpoints_at): New.
8332 (reinsert_breakpoint): Rewrite.
8333 (reinsert_breakpoints_at): New.
8334 (check_breakpoints): Rewrite.
8335 (breakpoint_here): New.
8336 (breakpoint_inserted_here): New.
8337 (check_mem_read): Adjust.
8338 * mem-break.h (breakpoints_supported, breakpoint_here)
8339 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8340 (reinsert_breakpoint_by_bp): Delete declaration.
8341 (delete_reinsert_breakpoints): Declare.
8342 (reinsert_breakpoint): Delete declaration.
8343 (reinsert_breakpoints_at): Declare.
8344 (uninsert_breakpoint): Delete declaration.
8345 (uninsert_breakpoints_at): Declare.
8346 (check_breakpoints): Adjust prototype.
8347 * server.h: Adjust include order.
8348 (struct thread_info): Declare here. Add a `last_status' field.
8349
8350 2010-03-23 Michael Snyder <msnyder@vmware.com>
8351
8352 * server.c (crc32): New function.
8353 (handle_query): Add handling for 'qCRC:' request.
8354
8355 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8356
8357 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8358 lwp had been stopped by a watchpoint.
8359
8360 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8361
8362 * server.h (internal_error): Declare.
8363 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8364 * utils.c (internal_error): New function.
8365
8366 2010-03-15 Andreas Schwab <schwab@redhat.com>
8367
8368 * configure.srv: Fix typo setting srv_regobj.
8369
8370 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8371
8372 * linux-low.c (fetch_register): Avoid passing a non string literal
8373 format to `error'.
8374 (usr_store_inferior_registers): Ditto.
8375
8376 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8377
8378 * linux-low.c (linux_write_memory): Bail out early if peeking
8379 memory failed.
8380
8381 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8382
8383 * linux-low.h (struct lwp_info): New fields
8384 `stopped_by_watchpoint' and `stopped_data_address'.
8385 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8386 here, and cache them in the lwp object.
8387 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8388 directly.
8389 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8390 field.
8391 (linux_stopped_by_watchpoint): Rewrite.
8392 (linux_stopped_data_address): Rewrite.
8393
8394 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8395
8396 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8397 switching the current inferior, not before.
8398
8399 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8400
8401 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8402 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8403 i386-linux.c and amd64-linux.c.
8404 (reg-i386.o): Removed.
8405 (reg-i386.c): Likewise.
8406 (reg-i386-linux.o): Likewise.
8407 (reg-i386-linux.c): Likewise.
8408 (reg-x86-64.o): Likewise.
8409 (reg-x86-64.c): Likewise.
8410 (reg-x86-64-linux.o): Likewise.
8411 (reg-x86-64-linux.c): Likewise.
8412 (i386.o): New.
8413 (i386.c): Likewise.
8414 (i386-linux.o): Likewise.
8415 (i386-linux.c): Likewise.
8416 (amd64.o): Likewise.
8417 (amd64.c): Likewise.
8418 (amd64-linux.o): Likewise.
8419 (amd64-linux.c): Likewise.
8420
8421 * configure.srv (srv_i386_regobj): New.
8422 (srv_i386_linux_regobj): Likewise.
8423 (srv_amd64_regobj): Likewise.
8424 (srv_amd64_linux_regobj): Likewise.
8425 (srv_i386_32bit_xmlfiles): Likewise.
8426 (srv_i386_64bit_xmlfiles): Likewise.
8427 (srv_i386_xmlfiles): Likewise.
8428 (srv_amd64_xmlfiles): Likewise.
8429 (srv_i386_linux_xmlfiles): Likewise.
8430 (srv_amd64_linux_xmlfiles): Likewise.
8431 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8432 srv_xmlfiles to $srv_i386_xmlfiles.
8433 (i[34567]86-*-mingw32ce*): Likewise.
8434 (i[34567]86-*-mingw*): Likewise.
8435 (i[34567]86-*-nto*): Likewise.
8436 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8437 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8438 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8439 (x86_64-*-linux*): Likewise.
8440
8441 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8442 (init_registers_amd64_linux): New.
8443 (x86_arch_setup): Replace init_registers_x86_64_linux with
8444 init_registers_amd64_linux.
8445
8446 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8447
8448 * configure.ac: Check for libdl. If it is not available link against
8449 static libthread_db.
8450 * configure: Regenerate.
8451
8452 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8453
8454 PR9605
8455
8456 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8457 handing a read watchpoint.
8458 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8459
8460 2010-02-12 Doug Evans <dje@google.com>
8461
8462 * linux-low.c (linux_supports_tracefork_flag): Document.
8463 (linux_look_up_symbols): Add comment.
8464
8465 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8466
8467 * regcache.c (supply_register): Clear regcache if buf is NULL.
8468
8469 2010-02-02 Nicolas Roche <roche@sourceware.org>
8470 Joel Brobecker <brobecker@adacore.com>
8471
8472 * inferiors.c (find_inferior): Add function documentation.
8473 (unloaded_dll): Handle the case where the unloaded dll has not
8474 been previously registered in the dll list.
8475
8476 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8477
8478 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8479 (thumb2_breakpoint): New.
8480 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8481
8482 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8483
8484 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8485 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8486 breakpoints.
8487
8488 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8489
8490 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8491
8492 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8493
8494 * linux-s390-low.c (s390_collect_ptrace_register)
8495 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8496
8497 2010-01-21 Doug Evans <dje@google.com>
8498
8499 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8500 (PTRACE_ARG4_TYPE): New macro.
8501 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8502 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8503 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8504 (usr_store_inferior_registers): Ditto.
8505 (linux_read_memory, linux_write_memory): Ditto.
8506 (linux_test_for_tracefork): Ditto.
8507
8508 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8509 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8510
8511 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8512
8513 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8514 target.
8515
8516 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8517
8518 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8519 prototype to take a regcache. Adjust.
8520
8521 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8522
8523 * regcache.h (struct thread_info): Forward declare.
8524 (struct regcache): New.
8525 (new_register_cache): Adjust prototype.
8526 (get_thread_regcache): Declare.
8527 (free_register_cache): Adjust prototype.
8528 (registers_to_string, registers_from_string): Ditto.
8529 (supply_register, supply_register_by_name, collect_register)
8530 (collect_register_as_string, collect_register_by_name): Ditto.
8531 * regcache.c (struct inferior_regcache_data): Delete.
8532 (get_regcache): Rename to ...
8533 (get_thread_regcache): ... this. Adjust. Switch inferior before
8534 fetching registers.
8535 (regcache_invalidate_one): Adjust.
8536 (regcache_invalidate): Fix prototype.
8537 (new_register_cache): Return the new register cache.
8538 (free_register_cache): Change prototype.
8539 (realloc_register_cache): Adjust.
8540 (registers_to_string): Change prototype to take a regcache. Adjust.
8541 (registers_from_string): Ditto.
8542 (register_data): Ditto.
8543 (supply_register): Ditto.
8544 (supply_register_by_name): Ditto.
8545 (collect_register): Ditto.
8546 (collect_register_as_string): Ditto.
8547 (collect_register_by_name): Ditto.
8548 * server.c (process_serial_event): Adjust.
8549 * linux-low.h (regset_fill_func, regset_store_func): Change
8550 prototype.
8551 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8552 Change prototype.
8553 * linux-low.c (get_stop_pc): Adjust.
8554 (check_removed_breakpoint): Adjust.
8555 (linux_wait_for_event): Adjust.
8556 (linux_resume_one_lwp): Adjust.
8557 (fetch_register): Add regcache parameter. Adjust.
8558 (usr_store_inferior_registers): Ditto.
8559 (regsets_fetch_inferior_registers): Ditto.
8560 (regsets_store_inferior_registers): Ditto.
8561 (linux_fetch_registers, linux_store_registers): Ditto.
8562 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8563 regcache. Adjust.
8564 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8565 Ditto.
8566 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8567 prototype to take a regcache.
8568 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8569 * remote-utils.c (convert_ascii_to_int, outreg)
8570 (prepare_resume_reply): Change prototype to take a regcache.
8571 Adjust.
8572 * target.h (struct target_ops) <fetch_registers, store_registers>:
8573 Change prototype to take a regcache.
8574 (fetch_inferior_registers, store_inferior_registers): Change
8575 prototype to take a regcache. Adjust.
8576 * proc-service.c (ps_lgetregs): Adjust.
8577 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8578 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8579 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8580 take a regcache. Adjust.
8581 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8582 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8583 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8584 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8585 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8586 (cris_cannot_fetch_register):
8587 (cris_breakpoint_at): Change prototype to take a regcache.
8588 Adjust.
8589 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8590 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8591 to take a regcache. Adjust.
8592 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8593 Adjust.
8594 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8595 take a regcache. Adjust.
8596 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8597 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8598 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8599 * linux-mips-low.c (mips_get_pc):
8600 (mips_set_pc): Change prototype to take a regcache. Adjust.
8601 (mips_reinsert_addr): Adjust.
8602 (mips_collect_register): Change prototype to take a regcache.
8603 Adjust.
8604 (mips_supply_register):
8605 (mips_collect_register_32bit, mips_supply_register_32bit)
8606 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8607 (mips_store_fpregset): Ditto.
8608 * linux-ppc-low.c (ppc_supply_ptrace_register)
8609 (ppc_supply_ptrace_register): Ditto.
8610 (parse_spufs_run): Adjust.
8611 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8612 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8613 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8614 take a regcache. Adjust.
8615 * linux-s390-low.c (s390_collect_ptrace_register)
8616 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8617 (s390_set_pc): Change prototype to take a regcache. Adjust.
8618 (s390_arch_setup): Adjust.
8619 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8620 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8621 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8622 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8623 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8624 regcache. Adjust.
8625 (sparc_breakpoint_at): Adjust.
8626 * linux-xtensa-low.c (xtensa_fill_gregset):
8627 (xtensa_store_gregset):
8628 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8629 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8630 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8631 prototype to take a regcache. Adjust.
8632 * win32-arm-low.c (arm_fetch_inferior_register)
8633 (arm_store_inferior_register): Change prototype to take a
8634 regcache. Adjust.
8635 * win32-i386-low.c (i386_fetch_inferior_register)
8636 (i386_store_inferior_register): Change prototype to take a
8637 regcache. Adjust.
8638 * win32-low.c (child_fetch_inferior_registers)
8639 (child_store_inferior_registers): Change prototype to take a
8640 regcache. Adjust.
8641 (win32_wait): Adjust.
8642 (win32_fetch_inferior_registers): Change prototype to take a
8643 regcache. Adjust.
8644 (win32_store_inferior_registers): Adjust.
8645 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8646 store_inferior_register>: Change prototype to take a regcache.
8647
8648 2010-01-20 Doug Evans <dje@google.com>
8649
8650 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8651 #ifdef.
8652 (linux_wait_for_event1, linux_init_signals): Ditto.
8653 (W_STOPCODE): Provide definition if missing.
8654
8655 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8656
8657 * linux-low.c (linux_core_of_thread): New.
8658 (compare_ints, show_process, list_threads): New.
8659 (linux_qxfer_osdata): Report threads and cores.
8660 (linux_target_op): Register linux_core_of_thread.
8661 * remote-utils.c (prepare_resume_reply): Report the core.
8662 (buffer_xml_printf): Support %d specifier.
8663 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8664 New.
8665 (handle_query): Handle qXfer:threads. Announce availability
8666 thereof.
8667 * target.h (struct target_ops): New field core_of_thread.
8668
8669 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8670
8671 * Makefile.in (clean): Remove new generated files.
8672 (reg-s390.o, reg-s390.c): Remove rules.
8673 (reg-s390x.o, reg-s390x.c): Likewise.
8674 (s390-linux32.o, s390-linux32.c): Add rules.
8675 (s390-linux64.o, s390-linux64.c): Likewise.
8676 (s390x-linux64.o, s390x-linux64.c): Likewise.
8677 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8678 * linux-s390-low.c: Include <elf.h>.
8679 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8680 (init_registers_s390): Remove prototype.
8681 (init_registers_s390x): Likewise.
8682 (init_registers_s390_linux32): Add prototype.
8683 (init_registers_s390_linux64): Likewise.
8684 (init_registers_s390x_linux64): Likewise.
8685 (s390_num_regs_3264): New define.
8686 (s390_regmap_3264): New global variable.
8687 (s390_cannot_fetch_register): Remove obsolete check.
8688 (s390_cannot_store_register): Likewise.
8689 (s390_collect_ptrace_register): Handle upper/lower register halves.
8690 (s390_supply_ptrace_register): Likewise.
8691 (s390_fill_gregset): Update to register number changes.
8692 (s390_get_hwcap): New routine.
8693 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8694 Install appropriate regmap and register set.
8695
8696 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8697
8698 * server.c (gdbserver_version): Update copyright year to 2010.
8699 * gdbreplay.c (gdbreplay_version): Likewise.
8700
8701 2009-12-28 Doug Evans <dje@google.com>
8702
8703 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8704 elf/external.h. Include <elf.h> instead but only if necessary.
8705
8706 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8707
8708 * linux-low.c (linux_remove_process): Remove `detaching'
8709 parameter. Don't release/detach from thread_db here.
8710 (linux_kill): Release/detach from thread_db here, ...
8711 (linux_detach): ... and here, before actually detaching.
8712 (linux_wait_1): ... and here, when a process exits.
8713 * thread-db.c (any_thread_of): New.
8714 (thread_db_free): Switch the current inferior to a thread of the
8715 passed in process.
8716
8717 2009-12-21 Doug Evans <dje@google.com>
8718
8719 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8720
8721 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8722 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8723 warning ifndef __NR_tkill. Move setting of errno there too.
8724 Delete unnecessary resetting of errno after syscall.
8725 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8726
8727 * configure.ac: Check for dladdr.
8728 * config.in: Regenerate.
8729 * configure: Regenerate.
8730 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8731 (try_thread_db_load): Update.
8732
8733 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8734
8735 2009-12-18 Doug Evans <dje@google.com>
8736
8737 * event-loop.c: Include unistd.h if it exists.
8738
8739 * linux-low.c (my_waitpid): Move definition away from being in
8740 between linux_tracefork_child/linux_test_for_tracefork.
8741
8742 * gdb_proc_service.h (psaddr_t): Fix type.
8743 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8744 signature to match glibc.
8745
8746 2009-12-16 Doug Evans <dje@google.com>
8747
8748 * linux-low.c (linux_read_memory): Fix argument to read.
8749
8750 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8751
8752 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8753 events, don't leave current_inferior pointing at null.
8754
8755 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8756
8757 * win32-low.c (LOG): Delete.
8758 (OUTMSG): Output to stderr.
8759 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8760 on compile time LOG macro.
8761 (win32_wait): Fix debug output.
8762
8763 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8764
8765 * win32-low.c (win32_add_one_solib): If the dll name is
8766 "ntdll.dll", prepend the system directory to the dll path.
8767
8768 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8769
8770 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8771
8772 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8773 Vladimir Prus <vladimir@codesourcery.com>
8774
8775 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8776 * configure.ac: Check for __mcoldfire__ and set
8777 gdb_cv_m68k_is_coldfire.
8778 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8779 reg-cf.o and reg-m68k.o.
8780 * configure: Regenerated.
8781
8782 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8783
8784 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8785 Pass it to thread_db_free.
8786 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8787 proper `detaching' argument to linux_remove_process.
8788 * linux-low.h (thread_db_free): Add `detaching' parameter.
8789 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8790 to thread_db_free.
8791 (thread_db_free): Add `detaching' parameter. Only
8792 call td_ta_clear_event if detaching from process.
8793
8794 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8795
8796 * thread-db.c (thread_db_free): Fix typo.
8797
8798 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8799
8800 PR gdb/10838
8801 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8802
8803 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8804
8805 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8806 with an i686 compiler.
8807 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8808 needed.
8809 * configure: Rebuilt.
8810
8811 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8812
8813 PR gdb/10783
8814
8815 * server.c (handle_search_memory_1): Correct read_addr initialization
8816 in loop for searching subsequent chunks.
8817
8818 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8819
8820 * configure.ac: New --with-libthread-db option.
8821 * thread-db.c: Allow direct dependence on libthread_db.
8822 (thread_db_free): Adjust.
8823 * config.in: Regenerate.
8824 * configure: Likewise.
8825
8826 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8827
8828 PR gdb/10757
8829 * thread-db.c (attach_thread): New function.
8830 (maybe_attach_thread): Return success/failure.
8831 (find_new_threads_callback): Adjust.
8832 (thread_db_find_new_threads): Loop until no new threads.
8833
8834 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8835
8836 * proc-service.c (ps_lgetregs): Formatting.
8837
8838 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8839
8840 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8841 * configure.ac: Adjust.
8842 * linux-low.h (struct process_info_private): Move members to struct
8843 thread_db.
8844 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8845 * linux-low.c (linux_remove_process): Adjust.
8846 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8847 * server.c (handle_query): Move code ...
8848 (handle_monitor_command): ... here. New function.
8849 * target.h (struct target_ops): New member.
8850 * thread-db.c (struct thread_db): New.
8851 (libthread_db_search_path): New variable.
8852 (thread_db_create_event, thread_db_enable_reporting)
8853 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8854 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8855 (try_thread_db_load_1, dladdr_to_soname): New functions.
8856 (try_thread_db_load, thread_db_load_search): New functions.
8857 (thread_db_init): Search for libthread_db.
8858 (thread_db_free): New function.
8859 (thread_db_handle_monitor_command): Likewise.
8860 * config.in: Regenerate.
8861 * configure: Regenerate.
8862
8863 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8864
8865 * spu-low.c (spu_kill): Wait for inferior to terminate.
8866 Call clear_inferiors.
8867 (spu_detach): Call clear_inferiors.
8868
8869 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8870
8871 * aclocal.m4: Regenerate.
8872 * config.in: Likewise.
8873 * configure: Likewise.
8874
8875 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8876
8877 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8878 (parse_spufs_run): New function.
8879 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8880 (ppc_breakpoint_at): Handle SPU breakpoints.
8881
8882 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8883
8884 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8885 (SPUFS_MAGIC): Define.
8886 (spu_enumerate_spu_ids): New function.
8887 (linux_qxfer_spu): New function.
8888 (linux_target_ops): Install linux_qxfer_spu.
8889
8890 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8891
8892 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8893 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8894 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8895 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8896 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8897 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8898 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8899 (init_registers_powerpc_cell32l): Add prototype.
8900 (init_registers_powerpc_cell64l): Likewise.
8901 (ppc_arch_setup): Detect Cell/B.E. architecture.
8902
8903 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8904
8905 * Makefile.in (datarootdir): New variable.
8906
8907 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8908
8909 * linux-low.c (linux_write_memory): Update debugging output.
8910 * Makefile.in (clean): Add new descriptions.
8911 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8912 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8913 * configure.srv: Add new files for arm*-*-linux*.
8914 * linux-arm-low.c: Add new declarations.
8915 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8916 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8917 (HWCAP_VFPv3D16): New.
8918 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8919 instead of __IWMMXT__.
8920 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8921 (arm_arch_setup): New.
8922 (target_regsets): Remove #ifdef. Add VFP regset.
8923 (the_low_target): Use arm_arch_setup.
8924
8925 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8926
8927 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8928 the main thread again.
8929
8930 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8931
8932 Adding Neutrino gdbserver.
8933 * configure: Regenerated.
8934 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8935 * configure.srv (i[34567]86-*-nto*): New target.
8936 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8937 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8938 (nto_comctrl) [__QNX__]: New function.
8939 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8940
8941 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8942
8943 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8944 srv_tgtobj.
8945
8946 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8947 Pedro Alves <pedro@codesourcery.com>
8948
8949 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8950 don't support CONTEXT_EXTENDED_REGISTERS.
8951 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8952 (the_low_target): Install them.
8953 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8954 failing with ERROR_PIPE_NOT_CONNECTED.
8955
8956 2009-06-30 Doug Evans <dje@google.com>
8957 Pierre Muller <muller@ics.u-strasbg.fr>
8958
8959 Add h/w watchpoint support to x86-linux, win32-i386.
8960 * Makefile.in (SFILES): Add i386-low.c
8961 (i386_low_h): Define.
8962 (i386-low.o): Add dependencies.
8963 (linux-x86-low.o): Add i386-low.h dependency.
8964 (win32-i386-low.o): Ditto.
8965 * i386-low.c: New file.
8966 * i386-low.h: New file.
8967 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8968 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8969 * linux-low.c (linux_add_process): Initialize arch_private.
8970 (linux_remove_process): Free arch_private.
8971 (add_lwp): Initialize arch_private.
8972 (delete_lwp): Free arch_private.
8973 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8974 provided.
8975 * linux-low.h (process_info_private): New member arch_private.
8976 (lwp_info): New member arch_private.
8977 (linux_target_ops): New members new_process, new_thread,
8978 prepare_to_resume.
8979 (ptid_of): New macro.
8980 * linux-x86-low.c: Include stddef.h, i386-low.h.
8981 (arch_process_info): New struct.
8982 (arch_lwp_info): New struct.
8983 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8984 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8985 (i386_dr_low_get_status): New function.
8986 (x86_insert_point, x86_remove_point): New functions.
8987 (x86_stopped_by_watchpoint): New function.
8988 (x86_stopped_data_address): New function.
8989 (x86_linux_new_process, x86_linux_new_thread): New functions.
8990 (x86_linux_prepare_to_resume): New function.
8991 (the_low_target): Add entries for insert_point, remove_point,
8992 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8993 prepare_to_resume.
8994 * server.c (debug_hw_points): New global.
8995 (monitor_show_help): Document set debug-hw-points.
8996 (handle_query): Process "set debug-hw-points".
8997 * server.h (debug_hw_points): Declare.
8998 (paddress): Declare.
8999 * utils.c (NUMCELLS, CELLSIZE): New macros.
9000 (get_sell, xsnprintf, paddress): New functions.
9001 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9002 remove_point, stopped_by_watchpoint, stopped_data_address.
9003 * win32-i386-low.c: Include i386-low.h.
9004 (debug_reg_state): Replaces dr.
9005 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9006 (i386_dr_low_get_status): New function.
9007 (i386_insert_point, i386_remove_point): New functions.
9008 (i386_stopped_by_watchpoint): New function.
9009 (i386_stopped_data_address): New function.
9010 (i386_initial_stuff): Update.
9011 (get_thread_context,set_thread_context,i386_thread_added): Update.
9012 (the_low_target): Add entries for insert_point,
9013 remove_point, stopped_by_watchpoint, stopped_data_address.
9014 * win32-low.c (win32_insert_watchpoint): New function.
9015 (win32_remove_watchpoint): New function.
9016 (win32_stopped_by_watchpoint): New function.
9017 (win32_stopped_data_address): New function.
9018 (win32_target_ops): Add entries for insert_watchpoint,
9019 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9020 * win32-low.h (win32_target_ops): New members insert_point,
9021 remove_point, stopped_by_watchpoint, stopped_data_address.
9022
9023 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9024
9025 * server.c (process_serial_event): Re-return unsupported, not
9026 error, if the type isn't recognized. Re-allow supporting only
9027 insert or remove packets. Also call require_running for
9028 breakpoints. Add missing break statement to default case. Tidy.
9029 * target.h (struct target_ops): Rename insert_watchpoint to
9030 insert_point, and remove_watchpoint to remove_point.
9031
9032 * linux-low.h (struct linux_target_ops): Likewise.
9033 * linux-low.c (linux_insert_watchpoint): Rename to ...
9034 (linux_insert_point): ... this. Adjust.
9035 (linux_remove_watchpoint): Rename to ...
9036 (linux_remove_point): ... this. Adjust.
9037 (linux_target_ops): Adjust.
9038 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9039 (cris_insert_point): ... this.
9040 (cris_remove_watchpoint): Rename to ...
9041 (cris_remove_point): ... this.
9042 (the_low_target): Adjust.
9043
9044 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9045
9046 * server.c (handle_v_kill): Pass signal_pid to
9047 kill_inferior if multi_process is zero.
9048
9049 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9050
9051 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9052 * target.h (target_ops): Comment for *_watchpoint to make it clear
9053 the functions can get types '0' and '1'.
9054
9055 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9056
9057 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9058 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9059 * regcache.c (get_regcache): Likewise.
9060 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9061 * win32-low.c (child_fetch_inferior_registers): Remove check for
9062 regno 0.
9063
9064 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9065 Pedro Alves <pedro@codesourcery.com>
9066
9067 * target.h (struct target_ops) <supports_multi_process>: New
9068 callback.
9069 (target_supports_multi_process): New.
9070 * server.c (handle_query): Even if GDB reports support, only
9071 enable multi-process if the target also supports it. Report
9072 multi-process support only if the target backend supports it.
9073 * linux-low.c (linux_supports_multi_process): New function.
9074 (linux_target_ops): Install it as target_supports_multi_process
9075 callback.
9076
9077 2009-05-24 Doug Evans <dje@google.com>
9078
9079 Global renaming of find_thread_pid to find_thread_ptid.
9080 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9081 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9082 All callers updated.
9083
9084 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9085 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9086 directly.
9087
9088 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9089 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9090 (linux_resume_one_lwp): Ditto.
9091
9092 2009-05-23 Doug Evans <dje@google.com>
9093
9094 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9095 from struct inferior_list_entry * to struct lwp_info *.
9096 All callers updated.
9097
9098 2009-05-13 Doug Evans <dje@google.com>
9099
9100 * linux-x86-low.c: Don't include assert.h.
9101 (x86_siginfo_fixup): Use fatal, not assert.
9102 (x86_arch_setup): Fix comment.
9103
9104 2009-05-12 Doug Evans <dje@google.com>
9105
9106 Biarch support for i386/amd64 gdbserver.
9107 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9108 Add linux-x86-low.c.
9109 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9110 (linux-x86-low.o): Add.
9111 * linux-x86-64-low.c: Delete.
9112 * linux-i386-low.c: Delete.
9113 * linux-x86-low.c: New file.
9114 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9115 linux-x86-low.o.
9116 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9117 linux-x86-low.o.
9118 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9119 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9120 (linux_child_pid_to_exec_file): New function.
9121 (elf_64_header_p, elf_64_file_p): New functions.
9122 (siginfo_fixup): New function.
9123 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9124 give target a chance to convert layout.
9125 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9126 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9127
9128 2009-05-07 Doug Evans <dje@google.com>
9129
9130 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9131 (regsets_store_inferior_registers): Ditto.
9132
9133 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9134
9135 PR server/10048
9136
9137 * linux-low.c (must_set_ptrace_flags): Delete.
9138 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9139 of the global.
9140 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9141 `lwp->must_set_ptrace_flags' instead.
9142 (linux_wait_for_event_1): Set ptrace options here.
9143 (linux_wait_1): ... not here.
9144
9145 2009-04-30 Doug Evans <dje@google.com>
9146
9147 * inferiors.c (started_inferior_callback): New function.
9148 (attached_inferior_callback): New function.
9149 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9150 * server.c (print_started_pid, print_attached_pid): New functions.
9151 (detach_or_kill_for_exit): New function.
9152 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9153 * server.h (have_started_inferiors_p): Declare.
9154 (have_attached_inferiors_p): Declare.
9155
9156 * inferiors.c (remove_process): Fix memory leak, free process.
9157 * linux-low.c (linux_remove_process): New function.
9158 (linux_kill): Call it instead of remove_process.
9159 (linux_detach, linux_wait_1): Ditto.
9160
9161 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9162
9163 * configure.srv: Add x86 Windows CE target.
9164
9165 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9166
9167 * inferiors.c (get_thread_process): Make global.
9168 * server.h (get_thread_process): Add prototype.
9169 * thread-db.c (find_one_thread): Use get_thread_process
9170 instead of current_process.
9171 (thread_db_get_tls_address): Do not crash if called when
9172 thread layer is not yet initialized.
9173
9174 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9175
9176 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9177 * spu-low.c (current_tid): Rename to ...
9178 (current_ptid): ... this.
9179 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9180 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9181 ptid_get_lwp (current_ptid) instead of current_tid.
9182 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9183 instead of current_tid. Use find_process_pid to verify pid
9184 argument is valid. Pass proper argument to remove_process.
9185 (spu_thread_alive): Compare current_ptid instead of current_tid.
9186 (spu_resume): Likewise.
9187
9188 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9189
9190 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9191 variable.
9192
9193 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9194
9195 Implement the multiprocess extensions, and add linux multiprocess
9196 support.
9197
9198 * server.h (ULONGEST): Declare.
9199 (struct ptid, ptid_t): New.
9200 (minus_one_ptid, null_ptid): Declare.
9201 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9202 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9203 (struct inferior_list_entry): Change `id' type from unsigned from
9204 to ptid_t.
9205 (struct sym_cache, struct breakpoint, struct
9206 process_info_private): Forward declare.
9207 (struct process_info): Declare.
9208 (current_process): Declare.
9209 (all_processes): Declare.
9210 (initialize_inferiors): Declare.
9211 (add_thread): Adjust to use ptid_t.
9212 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9213 (add_process, remove_process, find_thread_pid): Declare.
9214 (find_inferior_id): Adjust to use ptid_t.
9215 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9216 (multi_process): Declare.
9217 (push_event): Adjust to use ptid_t.
9218 (read_ptid, write_ptid): Declare.
9219 (prepare_resume_reply): Adjust to use ptid_t.
9220 (clear_symbol_cache): Declare.
9221 * inferiors.c (all_processes): New.
9222 (null_ptid, minus_one_ptid): New.
9223 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9224 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9225 (add_thread): Change unsigned long to ptid. Remove gdb_id
9226 parameter. Adjust.
9227 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9228 (gdb_id_to_thread): Rename to ...
9229 (find_thread_pid): ... this. Change unsigned long to ptid.
9230 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9231 (loaded_dll, pull_pid_from_list): Adjust.
9232 (add_process, remove_process, find_process_pid)
9233 (get_thread_process, current_process, initialize_inferiors): New.
9234 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9235 (struct target_waitstatus) <related_pid>: Ditto.
9236 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9237 return type to int.
9238 (struct target_ops) <join>: Add `pid' argument.
9239 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9240 (struct target_ops) <wait>: Add `ptid' field. Change return type
9241 to ptid.
9242 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9243 (mywait): Add `ptid' argument. Change return type to ptid_t.
9244 (target_pid_to_str): Declare.
9245 * target.c (set_desired_inferior): Adjust to use ptids.
9246 (mywait): Add new `ptid' argument. Adjust.
9247 (target_pid_to_str): New.
9248 * mem-break.h (free_all_breakpoints): Declare.
9249 * mem-break.c (breakpoints): Delelete.
9250 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9251 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9252 to use per-process breakpoint list.
9253 (free_all_breakpoints): New.
9254 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9255 (symbol_cache, all_symbols_looked_up): Delete.
9256 (hexchars): New.
9257 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9258 read_ptid): New.
9259 (prepare_resume_reply): Change ptid argument's type from unsigned
9260 long to ptid_t. Adjust. Implement W;process and X;process.
9261 (free_sym_cache, clear_symbol_cache): New.
9262 (look_up_one_symbol): Adjust to per-process symbol cache. *
9263 * server.c (cont_thread, general_thread, step_thread): Change type
9264 to ptid_t.
9265 (attached): Delete.
9266 (multi_process): New.
9267 (last_ptid): Change type to ptid_t.
9268 (struct vstop_notif) <ptid>: Change type to ptid_t.
9269 (queue_stop_reply, push_event): Change `ptid' argument's type to
9270 ptid_t.
9271 (discard_queued_stop_replies): Add `pid' argument.
9272 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9273 changes. Don't reference the `attached' global.
9274 (attach_inferior): Adjust to mywait interface changes.
9275 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9276 features. Handle and report "multiprocess+". Handle
9277 "qAttached:PID".
9278 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9279 changes.
9280 (handle_v_kill): New.
9281 (handle_v_stopped): Adjust to use target_pid_to_str.
9282 (handle_v_requests): Allow multiple attaches and runs when
9283 multiprocess extensions are in effect. Handle "vKill".
9284 (myresume): Adjust to use ptids.
9285 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9286 (handle_status): Adjust to discard_queued_stop_replies interface
9287 change.
9288 (first_thread_of, kill_inferior_callback)
9289 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9290 (main): Call initialize_inferiors. Adjust to use ptids, killing
9291 and detaching from all inferiors. Handle multiprocess packet
9292 variants.
9293 * linux-low.h: Include gdb_proc_service.h.
9294 (struct process_info_private): New.
9295 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9296 <lwpid_of>: Use ptid_get_lwp.
9297 (get_lwp_thread): Adjust.
9298 (struct lwp_info): Add `dead' member.
9299 (find_lwp_pid): Declare.
9300 * linux-low.c (thread_db_active): Delete.
9301 (new_inferior): Adjust comment.
9302 (inferior_pid): Delete.
9303 (linux_add_process): New.
9304 (handle_extended_wait): Adjust.
9305 (add_lwp): Change unsigned long to ptid.
9306 (linux_create_inferior): Add process to processes table. Adjust
9307 to use ptids. Don't set new_inferior here.
9308 (linux_attach_lwp): Rename to ...
9309 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9310 it. Adjust to use ptids.
9311 (linux_attach_lwp): New.
9312 (linux_attach): Add process to processes table. Don't set
9313 new_inferior here.
9314 (struct counter): New.
9315 (second_thread_of_pid_p, last_thread_of_process_p): New.
9316 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9317 multiple processes.
9318 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9319 processes. Remove process from process table.
9320 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9321 to multiple processes.
9322 (any_thread_of): New.
9323 (linux_detach): Add `pid' argument, and handle it. Remove process
9324 from processes table.
9325 (linux_join): Add `pid' argument. Handle it.
9326 (linux_thread_alive): Change unsighed long argument to ptid_t.
9327 Consider dead lwps as not being alive.
9328 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9329 threads we're not interested in.
9330 (same_lwp, find_lwp_pid): New.
9331 (linux_wait_for_lwp): Change `pid' argument's type from int to
9332 ptid_t. Adjust.
9333 (linux_wait_for_event): Rename to ...
9334 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9335 from int to ptid_t. Adjust.
9336 (linux_wait_for_event): New.
9337 (linux_wait_1): Add `ptid' argument. Change return type to
9338 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9339 that exit from the process table.
9340 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9341 Adjust.
9342 (mark_lwp_dead): New.
9343 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9344 stopping all threads, mark its main lwp as dead.
9345 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9346 ptids.
9347 (fetch_register, usr_store_inferior_registers)
9348 (regsets_fetch_inferior_registers)
9349 (regsets_store_inferior_registers, linux_read_memory)
9350 (linux_write_memory): Inline `inferior_pid'.
9351 (linux_look_up_symbols): Adjust to use per-process
9352 `thread_db_active'.
9353 (linux_request_interrupt): Adjust to use ptids.
9354 (linux_read_auxv): Inline `inferior_pid'.
9355 (initialize_low): Don't reference thread_db_active.
9356 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9357 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9358 (ps_getpid): Return the pid of the current inferior.
9359 * thread-db.c (proc_handle, thread_agent): Delete.
9360 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9361 per-process data.
9362 (find_one_thread): Change argument type to ptid_t. Adjust to
9363 per-process data.
9364 (maybe_attach_thread): Adjust to per-process data and ptids.
9365 (thread_db_find_new_threads): Ditto.
9366 (thread_db_init): Ditto.
9367 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9368 processes table. Adjust to use ptids.
9369 (spu_kill, spu_detach): Adjust interface. Remove process from
9370 processes table.
9371 (spu_join, spu_thread_alive): Adjust interface.
9372 (spu_wait): Adjust interface. Remove process from processes
9373 table. Adjust to use ptids.
9374 * win32-low.c (current_inferior_tid): Delete.
9375 (current_inferior_ptid): New.
9376 (debug_event_ptid): New.
9377 (thread_rec): Take a ptid. Adjust.
9378 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9379 (child_delete_thread): Ditto.
9380 (do_initial_child_stuff): Add `attached' argument. Add process to
9381 processes table.
9382 (child_fetch_inferior_registers, child_store_inferior_registers):
9383 Adjust.
9384 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9385 (win32_attach): Pass 1 to do_initial_child_stuff.
9386 (win32_kill): Adjust interface. Remove process from processes
9387 table.
9388 (win32_detach): Ditto.
9389 (win32_join): Adjust interface.
9390 (win32_thread_alive): Take a ptid.
9391 (win32_resume): Adjust to use ptids.
9392 (get_child_debug_event): Ditto.
9393 (win32_wait): Adjust interface. Remove exiting process from
9394 processes table.
9395
9396 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9397
9398 Non-stop mode support.
9399
9400 * server.h (non_stop): Declare.
9401 (gdb_client_data, handler_func): Declare.
9402 (delete_file_handler, add_file_handler, start_event_loop):
9403 Declare.
9404 (handle_serial_event, handle_target_event, push_event)
9405 (putpkt_notif): Declare.
9406 * target.h (enum resume_kind): New.
9407 (struct thread_resume): Replace `step' field by `kind' field.
9408 (TARGET_WNOHANG): Define.
9409 (struct target_ops) <wait>: Add `options' argument.
9410 <supports_non_stop, async, start_non_stop>: New fields.
9411 (target_supports_non_stop, target_async): New.
9412 (start_non_stop): Declare.
9413 (mywait): Add `options' argument.
9414 * target.c (mywait): Add `options' argument. Print child exit
9415 notifications here.
9416 (start_non_stop): New.
9417 * server.c (non_stop, own_buf, mem_buf): New globals.
9418 (struct vstop_notif): New.
9419 (notif_queue): New global.
9420 (queue_stop_reply, push_event, discard_queued_stop_replies)
9421 (send_next_stop_reply): New.
9422 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9423 interface changes.
9424 (attach_inferior): In non-stop mode, don't wait for the target
9425 here.
9426 (handle_general_set): Handle QNonStop.
9427 (handle_query): When handling qC, return the current general
9428 thread, instead of the first thread of the list.
9429 (handle_query): If the backend supports non-stop mode, include
9430 QNonStop+ in the qSupported query response.
9431 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9432 and non-stop mode.
9433 (handle_v_attach, handle_v_run): Handle non-stop mode.
9434 (handle_v_stopped): New.
9435 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9436 (myresume): Adjust to use resume_kind. Handle non-stop.
9437 (queue_stop_reply_callback): New.
9438 (handle_status): Handle non-stop mode.
9439 (main): Clear non_stop flag on reconnection. Use the event-loop.
9440 Refactor serial protocol handling from here ...
9441 (process_serial_event): ... to this new function. When GDB
9442 selects any thread, select one here. In non-stop mode, wait until
9443 GDB acks all pending events before exiting.
9444 (handle_serial_event, handle_target_event): New.
9445 * remote-utils.c (remote_open): Install remote_desc in the event
9446 loop.
9447 (remote_close): Remove remote_desc from the event loop.
9448 (putpkt_binary): Rename to...
9449 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9450 (putpkt_binary): New as wrapper around putpkt_binary_1.
9451 (putpkt_notif): New.
9452 (prepare_resume_reply): In non-stop mode, don't change the
9453 general_thread.
9454 * event-loop.c: New.
9455 * Makefile.in (OBJ): Add event-loop.o.
9456 (event-loop.o): New rule.
9457
9458 * linux-low.h (pid_of): Moved here.
9459 (lwpid_of): New.
9460 (get_lwp_thread): Use lwpid_of.
9461 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9462 * linux-low.c (pid_of): Delete.
9463 (inferior_pid): Use lwpid_of.
9464 (linux_event_pipe): New.
9465 (target_is_async_p): New.
9466 (delete_lwp): New.
9467 (handle_extended_wait): Use lwpid_of.
9468 (add_lwp): Don't set lwpid field.
9469 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9470 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9471 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9472 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9473 first. Adjust to linux_wait_for_event interface changes. Use
9474 lwpid_of.
9475 (linux_detach): Don't delete the main lwp here.
9476 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9477 (status_pending_p): Don't consider explicitly suspended lwps.
9478 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9479 pointer. Add OPTIONS argument. Change return type to int. Use
9480 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9481 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9482 pointer. Add status pointer argument. Return a pid instead of a
9483 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9484 changes. In non-stop mode, don't switch to a random thread.
9485 (linux_wait): Rename to...
9486 (linux_wait_1): ... this. Add target_options argument, and handle
9487 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9488 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9489 clean exit and signal exit code. Don't stop all threads in
9490 non-stop mode. In all-stop mode, only stop all threads when
9491 reporting a stop to GDB. Handle explicit thread stop requests.
9492 (async_file_flush, async_file_mark): New.
9493 (linux_wait): New.
9494 (send_sigstop): Use lwpid_of.
9495 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9496 interface changes. In non-stop mode, don't switch to a random
9497 thread.
9498 (linux_resume_one_lwp): Use lwpid_of.
9499 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9500 (linux_resume_one_thread): ... this. Handle resume_stop. In
9501 non-stop mode, don't look for pending flag in all threads.
9502 (resume_status_pending_p): Don't consider explicitly suspended
9503 threads.
9504 (my_waitpid): Reimplement. Emulate __WALL.
9505 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9506 Use lwpid_of.
9507 (sigchld_handler, linux_supports_non_stop, linux_async)
9508 (linux_start_non_stop): New.
9509 (linux_target_ops): Register linux_supports_non_stop, linux_async
9510 and linux_start_non_stop.
9511 (initialize_low): Install SIGCHLD handler.
9512 * thread-db.c (thread_db_create_event, find_one_thread)
9513 (thread_db_get_tls_address): Use lwpid_of.
9514 * win32-low.c (win32_detach): Adjust to use resume_kind.
9515 (win32_wait): Add `options' argument.
9516 * spu-low.c (spu_resume): Adjust to use resume_kind.
9517 (spu_wait): Add `options' argument.
9518
9519 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9520
9521 Decouple target code from remote protocol.
9522
9523 * target.h (enum target_waitkind): New.
9524 (struct target_waitstatus): New.
9525 (struct target_ops) <wait>: Return an unsigned long. Take a
9526 target_waitstatus pointer instead of a char pointer.
9527 (mywait): Likewise.
9528 * target.c (mywait): Change prototype to return an unsigned long.
9529 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9530 * server.h (thread_from_wait, old_thread_from_wait): Delete
9531 declarations.
9532 (prepare_resume_reply): Change prototype to take a
9533 target_waitstatus.
9534 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9535 (last_status, last_ptid): New.
9536 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9537 pid instead of a signal.
9538 (attach_inferior): Remove "status" and "signal" parameters.
9539 Adjust.
9540 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9541 not as an address.
9542 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9543 (handle_v_requests, myresume): Remove "status" and "signal"
9544 parameters. Adjust.
9545 (handle_status): New.
9546 (main): Delete local `status'. Adjust.
9547 * remote-utils.c: Include target.h.
9548 (prepare_resume_reply): Change prototype to take a
9549 target_waitstatus. Adjust.
9550
9551 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9552 interface.
9553 * spu-low.c (spu_wait): Adjust.
9554 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9555 Delete.
9556 (win32_wait): Adjust.
9557
9558 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9559
9560 * target.h (struct thread_resume): Delete leave_stopped member.
9561 (struct target_ops): Add a `n' argument to the `resume' callback.
9562 * server.c (start_inferior): Adjust.
9563 (handle_v_cont, myresume): Adjust.
9564 * linux-low.c (check_removed_breakpoint): Adjust to resume
9565 interface change, and to removed leave_stopped field.
9566 (resume_ptr): Delete.
9567 (struct thread_resume_array): New.
9568 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9569 resume interface change.
9570 (linux_continue_one_thread, linux_queue_one_thread)
9571 (resume_status_pending_p): Check if the resume field is NULL
9572 instead of checking the leave_stopped member.
9573 (linux_resume): Adjust to the target resume interface change.
9574 * spu-low.c (spu_resume): Adjust to the target resume interface
9575 change.
9576 * win32-low.c (win32_detach, win32_resume): Ditto.
9577
9578 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9579
9580 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9581 flag.
9582 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9583 pending.
9584 (linux_continue_one_thread): Only preserve the stepping flag if
9585 there's a pending breakpoint.
9586
9587 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9588
9589 * server.c (main): After the inferior having exited, call
9590 remote_close before exiting gdbserver.
9591
9592 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9593
9594 Fix size of FPSCR in Power 7 processors.
9595 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9596 (PPC_FEATURE_HAS_DFP): New #define.
9597 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9598 size of the FPSCR.
9599
9600 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9601
9602 * server.c (handle_query) Whitespace and formatting.
9603
9604 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9605
9606 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9607 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9608 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9609 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9610 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9611 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9612 Makefile.in, configure.ac: Fix whitespace throughout.
9613 * configure: Regenerate.
9614
9615 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9616
9617 * inferiors.c (find_inferior): Make it safe for the callback
9618 function to delete the currently iterated inferior.
9619
9620 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9621
9622 * Makefile.in (linuw_low_h): Move higher.
9623 (thread-db.o): Depend on $(linux_low_h).
9624
9625 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9626
9627 Rename "process" to "lwp" throughout.
9628
9629 * linux-low.c (all_processes): Rename to...
9630 (all_lwps): ... this.
9631 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9632 (add_process): Rename to ...
9633 (add_lwp): ... this. Adjust.
9634 (linux_create_inferior): Adjust.
9635 (linux_attach_lwp): Adjust.
9636 (linux_attach): Adjust.
9637 (linux_kill_one_process): Rename to ...
9638 (linux_kill_one_lwp): ... this. Adjust.
9639 (linux_kill): Adjust.
9640 (linux_detach_one_process): Rename to ...
9641 (linux_detach_one_lwp): ... this. Adjust.
9642 (linux_detach): Adjust.
9643 (check_removed_breakpoint): Adjust.
9644 (status_pending_p): Adjust.
9645 (linux_wait_for_process): Rename to ...
9646 (linux_wait_for_lwp): ... this. Adjust.
9647 (linux_wait_for_event): Adjust.
9648 (send_sigstop): Adjust.
9649 (wait_for_sigstop): Adjust.
9650 (stop_all_processes): Rename to ...
9651 (stop_all_lwps): ... this.
9652 (linux_resume_one_process): Rename to ...
9653 (linux_resume_one_lwp): ... this. Adjust.
9654 (linux_set_resume_request, linux_continue_one_thread)
9655 (linux_queue_one_thread, resume_status_pending_p)
9656 (usr_store_inferior_registers, regsets_store_inferior_registers)
9657 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9658 Adjust.
9659 * linux-low.h (get_process): Rename to ...
9660 (get_lwp): ... this. Adjust.
9661 (get_thread_process): Rename to ...
9662 (get_thread_lwp): ... this. Adjust.
9663 (get_process_thread): Rename to ...
9664 (get_lwp_thread): ... this. Adjust.
9665 (struct process_info): Rename to ...
9666 (struct lwp_info): ... this.
9667 (all_processes): Rename to ...
9668 (all_lwps): ... this.
9669 * proc-service.c (ps_lgetregs): Adjust.
9670 * thread-db.c (thread_db_create_event, find_one_thread)
9671 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9672
9673 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9674
9675 * server.c (handle_query): Handle "qAttached".
9676
9677 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9678
9679 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9680 GPLv3, update license URL.
9681
9682 2009-03-01 Doug Evans <dje@google.com>
9683
9684 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9685 (server_h): Add gdb_signals.h.
9686 (signals.o): Update.
9687 * server.h (target_signal_from_host,target_signal_to_host_p)
9688 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9689
9690 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9691
9692 * remote-utils.c (getpkt): Also generate remote-debug
9693 information if noack_mode is set.
9694
9695 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9696
9697 * server.c (handle_query): Report qXfer:siginfo:read and
9698 qXfer:siginfo:write as supported and handle them.
9699 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9700 * linux-low.c (linux_xfer_siginfo): New.
9701 (linux_target_ops): Set it.
9702
9703 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9704
9705 * server.c (gdbserver_usage): Mention --remote-debug.
9706 (main): Accept '--remote-debug' switch.
9707
9708 2009-01-18 Doug Evans <dje@google.com>
9709
9710 * regcache.c (new_register_cache): No need to check result of xcalloc.
9711 * server.c (handle_search_memory): Back out calls to xmalloc,
9712 result is checked and error is returned to user upon failure.
9713 (handle_query): Ditto. Add more checks for result of malloc.
9714 (handle_v_cont): Check result of malloc, report error back to
9715 user upon failure.
9716 (handle_v_run): Ditto. Call freeargv.
9717 * server.h (freeargv): Declare.
9718 * utils.c (freeargv): New fn.
9719
9720 2009-01-15 Doug Evans <dje@google.com>
9721
9722 * gdbreplay.c (perror_with_name): Make arg const char *.
9723 * server.h (target_signal_to_name): Make return type const char *.
9724 * thread-db.c (thread_db_err_str): Make return type const char *.
9725 * utils.c (perror_with_name): Make arg const char *.
9726
9727 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9728
9729 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9730 when handling a EXIT_PROCESS_DEBUG_EVENT.
9731
9732 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9733
9734 * gdbreplay.c (gdbreplay_version): Update copyright year.
9735 * server.c (gdbserver_version): Likewise.
9736
9737 2009-01-05 Doug Evans <dje@google.com>
9738
9739 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9740 (handle_extended_wait): Improve comment.
9741
9742 2008-12-13 Doug Evans <dje@google.com>
9743
9744 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9745 * server.h (ATTR_MALLOC): New macro.
9746 (xmalloc,xcalloc,xstrdup): Declare.
9747 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9748 * inferiors.c: Ditto.
9749 * linux-low.c: Ditto.
9750 * mem-break.c: Ditto.
9751 * regcache.c: Ditto.
9752 * remote-utils.c: Ditto.
9753 * server.c: Ditto.
9754 * target.c: Ditto.
9755 * win32-low.c: Ditto.
9756
9757 2008-12-12 Doug Evans <dje@google.com>
9758
9759 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9760 in debugging printf.
9761
9762 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9763
9764 2008-12-09 Doug Evans <dje@google.com>
9765
9766 * linux-low.h (struct process_info): Delete member tid, unused.
9767 * thread-db.c (find_one_thread): Update.
9768 (maybe_attach_thread): Update.
9769
9770 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9771
9772 * target.h (struct target_ops): Add qxfer_osdata member.
9773 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9774 and dirent.h.
9775 (linux_qxfer_osdata): New functions.
9776 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9777 callback.
9778 * server.c (handle_query): Handle "qXfer:osdata:read:".
9779 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9780 (buffer_xml_printf): New functions.
9781 * server.h (struct buffer): New.
9782 (buffer_grow_str, buffer_grow_str0): New macros.
9783 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9784 (buffer_xml_printf): Declare.
9785
9786 2008-11-24 Doug Evans <dje@google.com>
9787
9788 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9789
9790 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9791
9792 * server.c (handle_v_run): Always use the supplied argument list.
9793
9794 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9795
9796 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9797 (xtensa_regmap_table): Add entry for scompare1.
9798
9799 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9800
9801 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9802 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9803 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9804 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9805 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9806 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9807 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9808 XML target descriptions.
9809 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9810 when inferior is running on an ISA 2.05 or later processor. Add
9811 special case to return offset for full 64-bit slot of FPSCR when
9812 in 32-bits.
9813
9814 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9815
9816 * Makefile.in (SFILES, clean): Added sparc64 files.
9817 (reg-sparc64.o, reg-sparc64.c): New.
9818 * configure.srv (sparc*-*-linux*): New configuration.
9819 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9820 syscall arguments for SPARC.
9821 (regsets_store_inferior_registers): Likewise.
9822 * linux-sparc-low.c: New file.
9823
9824 2008-10-21 Doug Evans <dje@google.com>
9825
9826 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9827 (READLINE_DIR,READLINE_DEP): Delete.
9828 (INTERNAL_CFLAGS): Update.
9829 (LINTFLAGS): Update.
9830
9831 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9832
9833 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9834 whole argv from the last run, not just argv[0].
9835
9836 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9837
9838 * regcache.c (new_register_cache): Return NULL if the register
9839 cache size isn't known yet.
9840 (free_register_cache): Avoid dereferencing a NULL regcache.
9841
9842 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9843
9844 * configure.srv: Merge MIPS and MIPS64.
9845
9846 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9847
9848 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9849
9850 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9851
9852 * Makefile.in: Add required vsx dependencies.
9853
9854 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9855 Declare init_registers_powerpc_vsx32l.
9856 Declare init_registers_powerpc_vsx64l.
9857 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9858 (ppc_arch_setup): Check for VSX in hwcap.
9859 (ppc_fill_vsxregset): New function.
9860 (ppc_store_vsxregset): New function.
9861 Add new VSX entry in regset_info target_regsets.
9862
9863 * configure.srv: Add new VSX dependencies.
9864
9865 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9866
9867 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9868 (remote_open): Set or clear transport_is_reliable.
9869 (putpkt_binary): Don't expect acks in noack mode.
9870 (getpkt): Don't send ack/nac in noack mode.
9871 * server.c (handle_general_set): Handle QStartNoAckMode.
9872 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9873 qSupported.
9874 (main): Reset noack_mode on every connection.
9875 * server.h (noack_mode): Declare.
9876
9877 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9878
9879 * Makefile.in (GDBREPLAY_OBS): New variable.
9880 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9881
9882 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9883 Daniel Jacobowitz <dan@codesourcery.com>
9884
9885 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9886 (usr_store_inferior_registers): Likewise.
9887 (regsets_store_inferior_registers): Likewise.
9888
9889 2008-07-31 Rolf Jansen <rj@surtec.com>
9890 Pedro Alves <pedro@codesourcery.com>
9891
9892 * configure.ac: Check for memmem declaration.
9893 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9894 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9895 (disable_packet_qfThreadInfo): Unconditionally compile.
9896 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9897 * configure, config.in: Regenerate.
9898
9899 2008-07-28 Doug Kwan <dougkwan@google.com>
9900
9901 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9902 (linux_write_memory): Remove declaration of errno.
9903
9904 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9905
9906 * linux-low.c (handle_extended_wait): Do not use "status"
9907 variable uninitialized.
9908
9909 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9910
9911 * server.c (handle_v_attach): Inhibit reporting dll changes.
9912
9913 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9914
9915 * remote-utils.c (prepare_resume_reply): If requested, don't
9916 output "thread:TID" in the T stop reply.
9917
9918 * server.c (disable_packet_vCont, disable_packet_Tthread)
9919 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9920 (handle_query): If requested, disable support for qC, qfThreadInfo
9921 and qsThreadInfo.
9922 (handle_v_requests): If requested, disable support for vCont.
9923 (gdbserver_show_disableable): New.
9924 (main): Handle --disable-packet and --disable-packet=LIST.
9925
9926 * server.h (disable_packet_vCont, disable_packet_Tthread)
9927 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9928
9929 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9930
9931 * server.c (gdbserver_usage): Mention --version.
9932
9933 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9934
9935 * Makefile.in (gdbreplay.o): New rule.
9936
9937 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9938
9939 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9940 message, not gdbserver.
9941
9942 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9943 Nathan Sidwell <nathan@codesourcery.com>
9944 Joseph Myers <joseph@codesourcery.com>
9945
9946 * acinclude.m4: Include ../../config/acx.m4.
9947 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9948 * configure, config.in: Regenerate.
9949 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9950 * server.c (gdbserver_version): Print PKGVERSION.
9951 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9952 (main): Adjust gdbserver_usage calls.
9953 * gdbreplay.c (version, host_name): Add declarations.
9954 (gdbreplay_version, gdbreplay_usage): New.
9955 (main): Accept --version and --help options.
9956
9957 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9958
9959 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9960 (arm_breakpoint_at): Handle Thumb.
9961 (the_low_target): Add comment.
9962
9963 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9964
9965 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9966
9967 2008-05-09 Doug Evans <dje@google.com>
9968
9969 * server.h (decode_search_memory_packet): Declare.
9970 * remote-utils.c (decode_search_memory_packet): New fn.
9971 * server.c (handle_search_memory_1): New fn.
9972 (handle_search_memory): New fn.
9973 (handle_query): Process qSearch:memory packets.
9974
9975 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9976
9977 * regcache.c (registers_length): Remove.
9978 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9979 full register packet.
9980 * regcache.h (registers_length): Remove prototype.
9981 * server.h (PBUFSIZ): Define to 16384.
9982
9983 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9984
9985 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9986 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9987 powerpc-64l.o, and powerpc-altivec64l.o.
9988 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9989 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9990 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9991 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9992 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9993 to srv_xmlfiles.
9994
9995 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9996 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9997 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9998 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9999 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10000 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10001 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10002 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10003 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10004 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10005 (clean): Update.
10006
10007 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10008 (init_registers_powerpc_32l): ... this new prototype.
10009 (init_registers_powerpc_32): Remove, replace by ...
10010 (init_registers_powerpc_altivec32l): ... this new prototype.
10011 (init_registers_powerpc_e500): Remove, replace by ...
10012 (init_registers_powerpc_e500l): ... this new prototype.
10013 (init_registers_ppc64): Remove, replace by ...
10014 (init_registers_powerpc_64l): ... this new prototype.
10015 (init_registers_powerpc_64): Remove, replace by ...
10016 (init_registers_powerpc_altivec64l): ... this new prototype.
10017 (ppc_num_regs): Set to 73.
10018 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10019 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10020 (ppc_cannot_store_register): Handle orig_r3 and trap.
10021 (ppc_arch_setup): Update init_registers_... calls.
10022 (ppc_fill_gregset): Handle orig_r3 and trap.
10023
10024 * inferiors.c (clear_inferiors): Reset current_inferior.
10025
10026 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10027
10028 * acinclude.m4: Add override.m4.
10029 * configure: Regenerate.
10030
10031 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10032
10033 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10034 initial call to init_register_ppc64.
10035
10036 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10037
10038 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10039 single powerpc*-*-linux* case.
10040 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10041
10042 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10043
10044 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10045 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10046 from reg_xmlfiles.
10047 * linux-ppc-low.c: Include <elf.h>.
10048 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10049 (ppc_hwcap): New global variable.
10050 (ppc_regmap): Remove __SPE__ #ifdef sections.
10051 (ppc_regmap_e500): New global variable.
10052 (ppc_cannot_store_register): Update __SPE__ special case.
10053 (ppc_get_hwcap): New function.
10054 (ppc_arch_setup): Use it to determine whether inferior supports
10055 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10056 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10057 Do not access registers if target does not support AltiVec.
10058 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10059 Do not access registers if target does not support SPE.
10060 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10061
10062 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10063
10064 * linux-low.c (disabled_regsets, num_regsets): New.
10065 (use_regsets_p): Delete.
10066 (linux_wait_for_process): Clear disabled_regsets.
10067 (regsets_fetch_inferior_registers): Check and set it.
10068 (regsets_store_inferior_registers): Likewise.
10069 (linux_fetch_registers, linux_store_registers): Do not use
10070 use_regsets_p.
10071 (initialize_low): Allocate disabled_regsets.
10072
10073 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10074
10075 * Makefile.in (LIBOBJS): New.
10076 (OBS): Use LIBOBJS.
10077 (memmem.o): New rule.
10078 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10079 * configure: Regenerated.
10080
10081 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10082
10083 * server.c (handle_query): Never return "unsupported" for
10084 qXfer:features:read queries.
10085
10086 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10087
10088 * server.c (get_features_xml): Fix inverted condition.
10089 (handle_query): Always support qXfer:feature:read.
10090
10091 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10092
10093 * server.c (wrapper_argv): New.
10094 (start_inferior): Handle wrapper_argv. If set, expect an extra
10095 trap.
10096 (gdbserver_usage): Document --wrapper.
10097 (main): Parse --wrapper.
10098
10099 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10100
10101 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10102 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10103 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10104 (ppc_set_pc): Likewise.
10105 (ppc_arch_setup): New function.
10106 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10107 of collect_register.
10108 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10109
10110 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10111
10112 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10113 instead of linux-ppc64-low.o.
10114 * linux-ppc64-low.c: Remove file.
10115 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10116 (linux-ppc64-low.o): Remove rule.
10117
10118 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10119 (init_registers_powerpc_64): Likewise.
10120 (ppc_regmap): Conditionally define depending on __powerpc64__.
10121 (ppc_cannot_store_register): Do not special-case "fpscr" when
10122 compiled on __powerpc64__.
10123 (ppc_collect_ptrace_register): New function.
10124 (ppc_supply_ptrace_register): New function.
10125 (ppc_breakpoint): Change type to "unsigned int".
10126 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10127 (the_low_target): Conditionally provide initializers for the
10128 arch_setup member depending on __powerpc64__. Install
10129 collect_ptrace_register and supply_ptrace_register members.
10130
10131 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10132
10133 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10134 * server.c (gdbserver_xmltarget): Define.
10135 (get_features_xml): Use it to replace "target.xml" and arch_string.
10136
10137 * configure.srv: Remove srv_xmltarget. Add XML files that were
10138 mentioned there to srv_xmlfiles instead. Remove conditional tests
10139 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10140 srv_xmlfiles and srv_regobj to include all possible choices.
10141 * configure.ac (srv_xmltarget): Remove.
10142 (srv_xmlfiles): Do not add "target.xml".
10143 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10144 checks for supplementary target information.
10145 * configure: Regenerate.
10146 * Makefile.in (XML_TARGET): Remove.
10147 (target.xml): Remove rule.
10148 (clean): Do not clean up target.xml.
10149 (.PRECIOUS): Do not mention target.xml.
10150
10151 * target.h (struct target_ops): Remove arch_string member.
10152 * linux-low.c (linux_arch_string): Remove.
10153 (linux_target_ops): Remove arch_string initializer.
10154 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10155 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10156 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10157 * spu-low.c (spu_arch_string): Remove.
10158 (spu_target_ops): Remove arch_string initializer.
10159 * win32-low.c (win32_arch_string): Remove.
10160 (win32_target_ops): Remove arch_string initializer.
10161 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10162 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10163 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10164
10165 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10166
10167 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10168 by collect_ptrace_register and supply_ptrace_register hooks.
10169 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10170 instead of checking for the_low_target.left_pad_xfer.
10171 (usr_store_inferior_registers): Use collect_ptrace_register callback
10172 instead of checking for the_low_target.left_pad_xfer.
10173
10174 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10175 (s390_supply_ptrace_register): Likewise.
10176 (s390_fill_gregset): Call s390_collect_ptrace_register.
10177 (the_low_target): Update.
10178
10179 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10180 (ppc_supply_ptrace_register): Likewise.
10181 (the_low_target): Update.
10182
10183 * linux-i386-low.c (the_low_target): Update.
10184 * linux-x86-64-low.c (the_low_target): Update.
10185
10186 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10187
10188 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10189 reg-s390.o and reg-s390x.o.
10190
10191 * linux-low.c (new_inferior): New global variable.
10192 (linux_create_inferior, linux_attach): Set it.
10193 (linux_wait_for_process): Call the_low_target.arch_setup after the
10194 target has stopped for the first time.
10195 (initialize_low): Do not call the_low_target.arch_setup.
10196
10197 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10198 (s390_set_pc): Likewise.
10199 (s390_arch_setup): New function.
10200 (the_low_target): Use s390_arch_setup as arch_setup routine.
10201
10202 * regcache.c (realloc_register_cache): New function.
10203 (set_register_cache): Call it for each existing regcache.
10204
10205 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10206
10207 * server.h (init_registers): Remove prototype.
10208
10209 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10210 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10211 instead of init_registers ().
10212 * linux-arm-low.c (init_registers_arm): Add prototype.
10213 (init_registers_arm_with_iwmmxt): Likewise.
10214 (the_low_target): Add initializer for arch_setup field.
10215 * linux-cris-low.c (init_registers_cris): Add prototype.
10216 (the_low_target): Add initializer for arch_setup field.
10217 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10218 (the_low_target): Add initializer for arch_setup field.
10219 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10220 (the_low_target): Add initializer for arch_setup field.
10221 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10222 (the_low_target): Add initializer for arch_setup field.
10223 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10224 (the_low_target): Add initializer for arch_setup field.
10225 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10226 (the_low_target): Add initializer for arch_setup field.
10227 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10228 (init_registers_mips64_linux): Likewise.
10229 (the_low_target): Add initializer for arch_setup field.
10230 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10231 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10232 (the_low_target): Add initializer for arch_setup field.
10233 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10234 (init_registers_powerpc_64): Likewise.
10235 (the_low_target): Add initializer for arch_setup field.
10236 * linux-s390-low.c (init_registers_s390): Add prototype.
10237 (init_registers_s390x): Likewise.
10238 (the_low_target): Add initializer for arch_setup field.
10239 * linux-sh-low.c (init_registers_sh): Add prototype.
10240 (the_low_target): Add initializer for arch_setup field.
10241 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10242 (the_low_target): Add initializer for arch_setup field.
10243 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10244 (the_low_target): Add initializer for arch_setup field.
10245
10246 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10247 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10248 instead of init_registers ().
10249 * win32-arm-low.c (init_registers_arm): Add prototype.
10250 (the_low_target): Add initializer for arch_setup field.
10251 * win32-i386-low.c (init_registers_i386): Add prototype.
10252 (the_low_target): Add initializer for arch_setup field.
10253
10254 * spu-low.c (init_registers_spu): Add prototype.
10255 (initialize_low): Call initialie_registers_spu () instead of
10256 initialize_registers ().
10257
10258 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10259
10260 * server.c (handle_v_requests): When handling the vRun and vAttach
10261 packets, if already debugging a process, don't kill it. Return an
10262 error instead.
10263
10264 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10265
10266 * server.c (handle_query): Correct length check.
10267
10268 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10269
10270 * win32-low.c (do_initial_child_stuff): Add process handle
10271 parameter. Set current_process_handle and current_process_id from the
10272 parameters. Clear globals.
10273 (win32_create_inferior): Don't set current_process_handle and
10274 current_process_id here. Instead pass them on the call to
10275 do_initial_child_stuff.
10276 (win32_attach): Likewise.
10277 (win32_clear_inferiors): New.
10278 (win32_kill): Don't close the current process handle or the
10279 current thread handle here. Instead call win32_clear_inferiors.
10280 (win32_detach): Don't open a new handle to the process. Call
10281 win32_clear_inferiors.
10282 (win32_join): Don't rely on current_process_handle; open a new
10283 handle using the process id.
10284 (win32_wait): Call win32_clear_inferiors when the inferior process
10285 has exited.
10286
10287 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10288
10289 * server.c (monitor_show_help): Add "exit".
10290
10291 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10292
10293 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10294 (clean): Add reg-xtensa.c.
10295 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10296 * configure.srv (xtensa*-*-linux*) New target.
10297 * linux-xtensa-low.c: New.
10298 * xtensa-xtregs.c: New.
10299
10300 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10301
10302 * hostio.c: Don't include errno.h.
10303 (errno_to_fileio_errno): Move to hostio-errno.
10304 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10305 error number outputting to the target->hostio_last_error callback.
10306 (hostio_packet_error): Use FILEIO_EINVAL directly.
10307 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10308 calls to hostio_error.
10309 * hostio-errno.c: New.
10310 * server.h (hostio_last_error_from_errno): Declare.
10311 * target.h (target_ops): Add hostio_last_error member.
10312 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10313 as hostio_last_error handler.
10314 * spu-low.c (spu_target_ops): Likewise.
10315 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10316 (wince_hostio_last_error): New functions.
10317 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10318 as hostio_last_error handler.
10319 (win32_target_ops) [!_WIN32_WCE]: Register
10320 hostio_last_error_from_errno as hostio_last_error handler.
10321 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10322 (hostio-errno.o): New rule.
10323 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10324 * configure.srv (srv_hostio_err_objs): New variable. Default to
10325 hostio-errno.o.
10326 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10327 * configure: Regenerate.
10328
10329 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10330
10331 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10332 (linux_kill, linux_detach): Clean up the process list.
10333 * remote-utils.c (remote_open): Improve port number parsing.
10334 (putpkt_binary, input_interrupt): Only send interrupts if the target
10335 is running.
10336 * server.c (extended_protocol): Make static.
10337 (attached): Define earlier.
10338 (exit_requested, response_needed, program_argv): New variables.
10339 (target_running): New.
10340 (start_inferior): Clear attached here.
10341 (attach_inferior): Set attached here.
10342 (require_running): Define.
10343 (handle_query): Use require_running and target_running. Implement
10344 "monitor exit".
10345 (handle_v_attach, handle_v_run): New.
10346 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10347 (gdbserver_usage): Update.
10348 (main): Redo argument parsing. Handle --debug and --multi. Handle
10349 --attach along with other options or after the port. Save
10350 program_argv. Support no initial program. Resynchronize
10351 communication with GDB after an error. Handle "monitor exit".
10352 Use require_running and target_running. Always allow the extended
10353 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10354 restart in extended mode.
10355 * README: Refer to the GDB manual. Update --attach usage.
10356
10357 2007-12-20 Andreas Schwab <schwab@suse.de>
10358
10359 * linux-low.c (STACK_SIZE): Define.
10360 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10361 (linux_test_for_tracefork): Likewise.
10362
10363 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10364
10365 * linux-low.c (linux_wait_for_event): Update messages. Do not
10366 reinsert auto-delete breakpoints.
10367 * mem-break.c (struct breakpoint): Change return type of handler to
10368 int.
10369 (set_breakpoint_at): Update handler type.
10370 (reinsert_breakpoint_handler): Return 1 instead of calling
10371 delete_breakpoint.
10372 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10373 setting a new one.
10374 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10375 * mem-break.h (set_breakpoint_at): Update handler type.
10376 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10377 * win32-low.c (auto_delete_breakpoint): New.
10378 (get_child_debug_event): Use it.
10379
10380 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10381
10382 * configure.ac: Check for pread and pwrite.
10383 * hostio.c (handle_pread): Fall back to lseek and read.
10384 (handle_pwrite): Fall back to lseek and write.
10385 * config.in, configure: Regenerated.
10386
10387 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10388
10389 * server.c (myresume): Add own_buf argument.
10390 (main): Update calls.
10391
10392 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10393
10394 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10395 * remote-utils.c (remote_open): Do not call disable_async_io.
10396 (block_async_io): Delete.
10397 (unblock_async_io): Make static.
10398 (initialize_async_io): New.
10399 * server.c (handle_v_cont): Handle async I/O here.
10400 (myresume): Likewise. Move other common resume tasks here...
10401 (main): ... from here. Call initialize_async_io. Disable async
10402 I/O before the main loop.
10403 * server.h (initialize_async_io): Declare.
10404 (block_async_io, unblock_async_io): Delete prototypes.
10405 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10406
10407 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10408
10409 * remote-utils.c (readchar): Allow binary data in received messages.
10410
10411 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10412
10413 * win32-low.c (attaching): New global.
10414 (win32_create_inferior): Clear the `attaching' global.
10415 (win32_attach): Set the `attaching' global.
10416 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10417 attaching. Only set a breakpoint at the entry point if not
10418 attaching.
10419
10420 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10421
10422 * server.c (main): Don't report dll events on the initial
10423 connection on attaches.
10424
10425 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10426
10427 * server.c (main): Relax numerical bases supported for the pid of
10428 the --attach command line argument.
10429
10430 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10431
10432 * win32-low.c (win32_attach): Call OpenProcess before
10433 DebugActiveProcess, not after. Add last error output to error
10434 call.
10435
10436 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10437
10438 * win32-low.c (win32_get_thread_context)
10439 (win32_set_thread_context): New functions.
10440 (thread_rec): Use win32_get_thread_context.
10441 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10442 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10443 field.
10444
10445 2007-12-03 Leo Zayas
10446 Pedro Alves <pedro_alves@portugalmail.pt>
10447
10448 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10449 global variables.
10450 (child_add_thread): Minor cleanup.
10451 (child_continue): Resume artificially suspended threads before
10452 calling ContinueDebugEvent.
10453 (suspend_one_thread): New.
10454 (fake_breakpoint_event): New.
10455 (get_child_debug_event): Change return type to int. Check here if
10456 gdb sent an interrupt request. If a soft interrupt was requested,
10457 fake a breakpoint event. Return 0 if there is no event to handle,
10458 and 1 otherwise.
10459 (win32_wait): Don't check here if gdb sent an interrupt request.
10460 Ensure there is a valid event to handle.
10461 (win32_request_interrupt): Add soft interruption method as last
10462 resort.
10463
10464 2007-12-03 Leo Zayas
10465 Pedro Alves <pedro_alves@portugalmail.pt>
10466
10467 * win32-low.h (win32_thread_info): Add descriptions to the
10468 structure members. Replace `suspend_count' counter by a
10469 `suspended' flag.
10470 * win32-low.c (thread_rec): Update condition of when to get the
10471 context from the inferior. Rely on ContextFlags being set if it
10472 has already been retrieved. Only suspend the inferior thread if
10473 we haven't already. Warn if that fails.
10474 (continue_one_thread): s/suspend_count/suspended/. Only call
10475 ResumeThread once. Warn if that fails.
10476
10477 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10478
10479 * win32-low.c (win32_wait): Don't read from the inferior when it
10480 has already exited.
10481
10482 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10483
10484 * Makefile.in (win32_low_h): New variable.
10485 (win32-low.o): Add dependency on $(win32_low_h).
10486 (win32-arm-low.o, win32-i386-low.o): New rules.
10487
10488 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10489
10490 * hostio.c: Correct copyright year.
10491
10492 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10493
10494 * Makefile.in (OBS): Add hostio.o.
10495 (hostio.o): New rule.
10496 * server.h (handle_vFile): Declare.
10497 * hostio.c: New file.
10498 * server.c (handle_v_requests): Take packet_len and new_packet_len
10499 for binary packets. Call handle_vFile.
10500 (main): Update call to handle_v_requests.
10501
10502 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10503
10504 * linux-low.c: Include <sched.h>.
10505
10506 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10507
10508 * linux-low.c (linux_tracefork_grandchild): New.
10509 (linux_tracefork_child): Use clone.
10510 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10511
10512 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10513
10514 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10515
10516 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10517
10518 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10519
10520 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10521
10522 * inferiors.c (change_inferior_id): Delete.
10523 (add_pid_to_list, pull_pid_from_list): New.
10524 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10525 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10526 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10527 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10528 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10529 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10530 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10531 (using_threads): Always set to 1.
10532 (handle_extended_wait): New.
10533 (add_process): Do not set TID.
10534 (linux_create_inferior): Set must_set_ptrace_flags.
10535 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10536 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10537 (linux_thread_alive): Rename TID argument to LWPID.
10538 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10539 (linux_wait_for_event): Do not use TID or check using_threads. Update
10540 call to dead_thread_notify. Call handle_extended_wait.
10541 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10542 (send_sigstop): Delete sigstop_sent.
10543 (wait_for_sigstop): Avoid TID.
10544 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10545 (linux_test_for_tracefork): New.
10546 (linux_lookup_signals): Use thread_db_active and
10547 linux_supports_tracefork_flag.
10548 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10549 * linux-low.h (get_process_thread): Avoid TID.
10550 (struct process_ifo): Move thread_known and tid to the end. Remove
10551 sigstop_sent.
10552 (linux_attach_lwp, thread_db_init): Update prototypes.
10553 * server.h (change_inferior_id): Delete prototype.
10554 (add_pid_to_list, pull_pid_from_list): New prototypes.
10555 * thread-db.c (thread_db_use_events): New.
10556 (find_first_thread): Rename to...
10557 (find_one_thread): ...this. Update callers and messages. Do not
10558 call fatal. Check thread_db_use_events. Do not call
10559 change_inferior_id or new_thread_notify.
10560 (maybe_attach_thread): Update. Do not call new_thread_notify.
10561 (thread_db_init): Set thread_db_use_events. Check use_events.
10562 * utils.c (fatal, warning): Correct message prefix.
10563
10564 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10565
10566 * Makefile.in (clean): Remove new files.
10567 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10568 (powerpc-64.o, powerpc-64.c): New rules.
10569 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10570 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10571 with SPE.
10572 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10573 SPE targets.
10574 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10575 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10576 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10577 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10578 (target_regsets): Add AltiVec and SPE register sets.
10579 * configure.ac: Check for AltiVec and SPE.
10580 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10581 (ppc_fill_vrregset, ppc_store_vrregset): New.
10582 (target_regsets): Add AltiVec register set.
10583 * configure: Regenerated.
10584
10585 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10586
10587 * linux-low.c (O_LARGEFILE): Define.
10588 (linux_read_memory): Use /proc/PID/mem.
10589 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10590 * configure, config.in: Regenerated.
10591
10592 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10593
10594 * linux-low.c (linux_wait_for_event): Do not pass signals while
10595 single-stepping.
10596
10597 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10598
10599 * win32-low.c (create_process): New.
10600 (win32_create_inferior): Use create_process instead of
10601 CreateProcess. If create_process failed retry appending an ".exe"
10602 suffix. Store the GetLastError result immediatelly after
10603 create_process calls and use it on the call to error.
10604
10605 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10606
10607 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10608
10609 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10610
10611 * configure.ac: Switch license to GPLv3.
10612
10613 2007-08-01 Michael Snyder <msnyder@access-company.com>
10614
10615 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10616
10617 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10618
10619 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10620 typedef.
10621 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10622 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10623 CloseToolhelp32Snapshot.
10624 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10625 CloseToolhelp32Snapshot.
10626
10627 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10628
10629 * server.c (main): Check for inferior exit before main loop.
10630
10631 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10632
10633 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10634 instead of on tmp_desc.
10635
10636 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10637 Daniel Jacobowitz <dan@codesourcery.com>
10638
10639 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10640 (add_thread): Minor cleanups.
10641 (clear_inferiors): Move lower in the file. Clear the DLL
10642 list.
10643 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10644 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10645 (xml_escape_text): New.
10646 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10647 for qSupported.
10648 (handle_v_cont): Report errors.
10649 (gdbserver_version): Update.
10650 (main): Correct size of own_buf. Do not report initial DLL events.
10651 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10652 (unloaded_dll, xml_escape_text): New.
10653 * win32-low.c (enum target_waitkind): Update comments.
10654 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10655 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10656 (win32_EnumProcessModules, win32_GetModuleInformation)
10657 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10658 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10659 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10660 (win32_Module32First, win32_Module32Next, load_toolhelp)
10661 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10662 (get_child_debug_event): Handle DLL events.
10663 (win32_wait): Likewise.
10664
10665 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10666
10667 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10668 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10669
10670 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10671
10672 * win32-low.c (handle_output_debug_string): Ignore event if not
10673 waiting.
10674
10675 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10676
10677 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10678
10679 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10680
10681 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10682
10683 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10684
10685 * inferiors.c (change_inferior_id): Add comment.
10686 * linux-low.c (check_removed_breakpoint): Add an early
10687 prototype. Improve debug output.
10688 (linux_attach): Doc update.
10689 (linux_detach_one_process, linux_detach): Clean up before releasing
10690 each process.
10691 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10692 * linux-low.h (struct process_info): Doc improvement.
10693 * mem-break.c (delete_all_breakpoints): New.
10694 * mem-break.h (delete_all_breakpoints): New prototype.
10695 * thread-db.c (find_first_thread): New.
10696 (thread_db_create_event): Call it instead of
10697 thread_db_find_new_threads. Clean up unused variables.
10698 (maybe_attach_thread): Remove first thread handling.
10699 (thread_db_find_new_threads): Use find_first_thread.
10700 (thread_db_get_tls_address): Likewise.
10701
10702 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10703
10704 * thread-db.c (thread_db_find_new_threads): Add prototype.
10705 (thread_db_create_event): Check for the main thread before adding
10706 a new thread.
10707 (maybe_attach_thread): Only enable event reporting if TID == 0.
10708 (thread_db_get_tls_address): Check for new threads.
10709
10710 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10711
10712 * linux-low.c (linux_create_inferior): Try execv before execvp.
10713 * spu-low.c (spu_create_inferior): Likewise.
10714
10715 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10716
10717 * linux-low.c (linux_create_inferior): Change execv to execvp.
10718 * spu-low.c (spu_create_inferior): Likewies.
10719
10720 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10721
10722 * Makefile.in (clean): Clean new files instead of deleted ones.
10723 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10724 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10725 rules.
10726 * configure.srv: Specify XML files and new regformats for MIPS and
10727 MIPS64 GNU/Linux.
10728 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10729 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10730 an entry for the restart register.
10731 (mips_cannot_fetch_register, mips_cannot_store_register)
10732 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10733 register names to match the XML descriptions.
10734 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10735 restart register instead of $0.
10736
10737 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10738 Markus Deuling <deuling@de.ibm.com>
10739
10740 * remote-utils.c (decode_xfer_write): New function.
10741 * server.h (decode_xfer_write): Add prototype.
10742 * server.c (handle_query): Add PACKET_LEN argument. Support
10743 qXfer:spu:read and qXfer:spu:write packets.
10744 (main): Pass packet_len to handle_query.
10745 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10746 * target.h (target_ops): Add qxfer_spu.
10747
10748 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10749
10750 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10751 accessing non-seekable spufs files.
10752
10753 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10754
10755 * server.c (handle_query): Add reply for qC packet.
10756
10757 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10758 Leo Zayas <lerele@champenstudios@com>
10759
10760 * server.h (check_remote_input_interrupt_request): New function.
10761 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10762 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10763 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10764 (check_remote_input_interrupt_request): New function.
10765 * server.h (check_remote_input_interrupt_request): Declare.
10766 * win32-low.c (winapi_DebugBreakProcess,
10767 winapi_GenerateConsoleCtrlEvent): New typedefs.
10768 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10769 to 250 ms.
10770 (win32_wait): Check for remote interrupt request
10771 with check_remote_input_interrupt_request.
10772 (win32_request_interrupt): New function.
10773 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10774
10775 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10776
10777 * win32-low.c (debug_registers_changed,
10778 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10779 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10780 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10781 (thread_rec): Get context using the low target.
10782 (child_add_thread): Call thread_added on the low target,
10783 which does the same thing.
10784 (regptr): Delete.
10785 (do_initial_child_stuff): Remove debug registers references.
10786 Set context using the low target. Resume threads after
10787 setting the contexts.
10788 (child_continue): Remove dead variable. Remove debug
10789 registers references.
10790 (child_fetch_inferior_registers): Go through the low target.
10791 (do_child_store_inferior_registers): Remove.
10792 (child_store_inferior_registers): Go through the low target.
10793 (win32_resume): Remove debug registers references.
10794 Set context using the low target.
10795 (handle_exception): Change return type to void. Don't record
10796 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10797 first chance exception.
10798 (get_child_debug_event): Change return type to void. Remove
10799 goto loop. Always return after waiting for debug event.
10800 (win32_wait): Convert to switch statement. Handle spurious
10801 events.
10802
10803 * win32-i386-low.c (debug_registers_changed,
10804 debug_registers_used): New.
10805 (initial_stuff): Rename to ...
10806 (i386_initial_stuff): ... this. Clear debug registers
10807 state variables.
10808 (store_debug_registers): Delete.
10809 (i386_get_thread_context): New.
10810 (load_debug_registers): Delete.
10811 (i386_set_thread_context): New.
10812 (i386_thread_added): New.
10813 (single_step): Rename to ...
10814 (i386_single_step): ... this.
10815 (do_fetch_inferior_registers): Rename to ...
10816 (i386_fetch_inferior_register): ... this.
10817 (i386_store_inferior_register): New.
10818 (the_low_target): Adapt to new interface.
10819
10820 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10821 (arm_get_thread_context): New.
10822 (arm_set_thread_context): New.
10823 (regptr): New.
10824 (do_fetch_inferior_registers): Rename to ...
10825 (arm_fetch_inferior_register): ... this.
10826 (arm_store_inferior_register): New.
10827 (arm_wince_breakpoint): Reimplement as unsigned long.
10828 (arm_wince_breakpoint_len): Define.
10829 (the_low_target): Adapt to new interface.
10830
10831 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10832 load_debug_registers. Add get_thread_context, set_thread_context,
10833 thread_added and store_inferior_register. Rename
10834 fetch_inferior_registers to fetch_inferior_register.
10835 (regptr): Remove declaration.
10836
10837 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10838
10839 * linux-low.c (linux_detach): Change return type to int. Return 0.
10840 * spu-low.c (spu_detach): Likewise.
10841
10842 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10843
10844 * target.h (target_ops): Change return type of detach to int.
10845 Add join.
10846 (join_inferior): New.
10847 * server.c (main): Don't skip detach support on mingw32.
10848 If the inferior doesn't support detaching return error.
10849 Call join_inferior instead of using waitpid.
10850 * linux-low.c (linux_join): New.
10851 (linux_target_op): Add linux_join.
10852 * spu-low.c (spu_join): New.
10853 (spu_target_ops): Add spu_join.
10854 * win32-low.c (win32_detach): Adapt to new interface.
10855 Reopen current_process_handle before detaching. Issue a child
10856 resume before detaching.
10857 (win32_join): New.
10858 (win32_target_op): Add win32_join.
10859
10860 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10861
10862 * win32-low.c (win32-attach): Fix return value.
10863 * target.h (target_ops): Describe ATTACH return values.
10864
10865 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10866
10867 * win32-low.c (GETPROCADDRESS): Define.
10868 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10869 (winapi_DebugSetProcessKillOnExit): Likewise.
10870 (win32_create_inferior): Force usage of ansi CreateProcessA.
10871 (win32_attach): Use GETPROCADDRESS.
10872 (win32_detach): Likewise.
10873
10874 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10875
10876 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10877
10878 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10879
10880 * win32-low.c: Commit leftover changes from 2007-03-29.
10881
10882 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10883
10884 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10885 fields short instead of int. Add explicit padding.
10886 (i387_cache_to_fsave): Remove unnecessary casts.
10887 (i387_fsave_to_cache): Doc fix.
10888 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10889
10890 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10891
10892 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10893 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10894
10895 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10896
10897 * configure.srv (arm*-*-mingw32ce*): Move near the other
10898 arm targets.
10899
10900 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10901
10902 * configure.ac: Add errno checking.
10903 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10904 sys/file.h and malloc.h.
10905 (AC_CHECK_DECLS): Add perror.
10906 (srv_mingwce): Handle.
10907 * configure.srv (i[34567]86-*-cygwin*): Add
10908 win32-i386-low.o to srv_tgtobj.
10909 (i[34567]86-*-mingw*): Likewise.
10910 (arm*-*-mingw32ce*): Add case.
10911 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10912 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10913 [__MINGW32CE__] (strerror): New function.
10914 [__MINGW32CE__] (errno): Define to GetLastError.
10915 [__MINGW32CE__] (COUNTOF): New macro.
10916 (remote_open): Remove extra close call.
10917 * mem-break.c (delete_breakpoint_at): New function.
10918 * mem-break.h (delete_breakpoint_at): Declare.
10919 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10920 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10921 [USE_WIN32API] (read, write): Add char* casts.
10922 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10923 * server.h: Include wincecompat.h on Windows CE.
10924 [HAVE_ERRNO_H]: Check.
10925 (perror): Declare if not declared.
10926 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10927 (perror_with_name): Remove errno declaration.
10928 * wincecompat.h: New.
10929 * wincecompat.c: New.
10930 * win32-low.h: New.
10931 * win32-arm-low.c: New.
10932 * win32-i386-low.c: New.
10933 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10934 (OUTMSG2): Make it safe.
10935 (_T): New macro.
10936 (COUNTOF): New macro.
10937 (NUM_REGS): Get it from the low target.
10938 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10939 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10940 (thread_rec): Let low target handle debug registers.
10941 (child_add_thread): Likewise.
10942 (child_init_thread_list): Likewise.
10943 (continue_one_thread): Likewise.
10944 (regptr): New.
10945 (do_child_fetch_inferior_registers): Move to ...
10946 * win32-i386-low.c: ... here, and rename to ...
10947 (do_fetch_inferior_registers): ... this.
10948 * win32-low.c (child_fetch_inferior_registers):
10949 Go through the low target.
10950 (do_child_store_inferior_registers): Use regptr.
10951 (strwinerror): New function.
10952 (win32_create_inferior): Handle Windows CE.
10953 Use strwinerror instead of strerror on Windows error
10954 codes. Add program to the error output.
10955 Don't close the main thread handle on Windows CE.
10956 (win32_attach): Use coredll.dll on Windows CE.
10957 (win32_kill): Close current process and current
10958 thread handles.
10959 (win32_detach): Use coredll.dll on Windows CE.
10960 (win32_resume): Let low target handle debug registers, and
10961 step request.
10962 (handle_exception): Add/Remove initial breakpoint. Avoid
10963 non-existant WSTOPSIG on Windows CE.
10964 (win32_read_inferior_memory): Cast to remove warning.
10965 (win32_arch_string): Go through the low target.
10966 (initialize_low): Call set_breakpoint_data with the low
10967 target's breakpoint.
10968 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10969 FOP_REGNUM, mappings): Move to ...
10970 * win32-i386-low.c: ... here.
10971 * win32-low.c (win32_thread_info): Move to ...
10972 * win32-low.h: ... here.
10973 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10974 win32-arm-low.c and wincecompat.c.
10975 (all:): Add $EXEEXT.
10976 (install-only:): Likewise.
10977 (gdbserver:): Likewise.
10978 (gdbreplay:): Likewise.
10979 * config.in: Regenerate.
10980 * configure: Regenerate.
10981
10982 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10983
10984 * win32-low.c: Rename typedef thread_info to
10985 win32_thread_info throughout.
10986
10987 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10988
10989 * win32-i386-low.c: Rename to ...
10990 * win32-low.c: ... this.
10991 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10992 * Makefile.in: Likewise.
10993
10994 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10995
10996 * remote-utils.c (monitor_output): Constify msg parameter.
10997 * server.h (monitor_output): Likewise.
10998 * win32-i386-low.c (handle_output_debug_string): New.
10999 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11000 handle_output_debug_string.
11001 (get_child_debug_event): Likewise.
11002
11003 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11004
11005 * server.c (main): Correct strtoul check.
11006
11007 2007-03-27 Jon Ringle <jon@ringle.org>
11008
11009 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11010
11011 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11012
11013 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11014
11015 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11016
11017 * terminal.h: Check HAVE_SGTTY_H.
11018
11019 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11020
11021 * remote-utils.c (remote_open): Print out the assigned port number.
11022
11023 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11024
11025 * remote-utils.c (monitor_output): New function.
11026 * server.c (debug_threads): Define here.
11027 (monitor_show_help): New function.
11028 (handle_query): Handle qRcmd.
11029 (main): Do not handle 'd' packet.
11030 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11031 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11032 of debug_threads.
11033
11034 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11035
11036 * Makefile.in (EXEEXT): New.
11037 (clean): Use $(EXEEXT).
11038
11039 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11040
11041 * target.h (target_ops): Rename send_signal to request_interrupt,
11042 and remove enum target_signal parameter.
11043 * linux-low.c (linux_request_interrupt): Rename from
11044 linux_send_signal, and always send SIGINT.
11045 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11046 and always send SIGINT.
11047 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11048 of send_signal.
11049 (input_interrupt): Likewise.
11050
11051 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11052
11053 * server.c (get_features_xml): Check if target implemented
11054 arch_string.
11055 * win32-i386-low.c (win32_arch_string): New.
11056 (win32_target_ops): Add win32_arch_string as arch_string member.
11057
11058 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11059
11060 * spu-low.c (spu_arch_string): New.
11061 (spu_target_ops): Add spu_arch_string.
11062
11063 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11064
11065 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11066 * configure.ac: Do not check for terminal.h.
11067 * configure, config.in: Regenerated.
11068
11069 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11070
11071 * Makefile.in (OBS): Add $(XML_BUILTIN).
11072 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11073 (clean): Update.
11074 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11075 (arm-with-iwmmxt.c): New.
11076 * config.in, configure: Regenerate.
11077 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11078 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11079 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11080 (arm*-*-linux*): Add iWMMXt and regset support.
11081 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11082 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11083 (arm_store_wmmxregset, target_regsets): New.
11084 * server.c (get_features_xml): Take annex argument. Check builtin
11085 XML documents.
11086 (handle_query): Handle multiple annexes.
11087
11088 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11089
11090 * remote-utils.c [USE_WIN32API] (read, write): Define.
11091 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11092 write.
11093
11094 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11095
11096 * linux-i386-low.c (the_low_target): Set arch_string.
11097 * linux-x86-64-low.c (the_low_target): Likewise.
11098 * linux-low.c (linux_arch_string): New.
11099 (linux_target_ops): Add it.
11100 * linux-low.h (struct linux_target_ops): Add arch_string.
11101 * server.c (write_qxfer_response): Use const void * for DATA.
11102 (get_features_xml): New.
11103 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11104 * target.h (struct target_ops): Add arch_string method.
11105
11106 2007-01-03 Denis Pilat <denis.pilat@st.com>
11107 Daniel Jacobowitz <dan@codesourcery.com>
11108
11109 * linux-low.c (linux_kill): Handle being called with no threads.
11110 * win32-i386-low.c (win32_kill): Likewise.
11111 (get_child_debug_event): Clear current_process_handle.
11112
11113 2006-12-30 Denis PILAT <denis.pilat@st.com>
11114 Daniel Jacobowitz <dan@codesourcery.com>
11115
11116 * remote-utils.c (remote_open): Check the type of specified
11117 serial port devices before opening them.
11118 * server.c (main): Kill the inferior if an error occurs during
11119 the first remote_open.
11120
11121 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11122
11123 * README: Update supported targets.
11124
11125 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11126
11127 * Makefile.in (clean): Remove reg-mips64.c.
11128 (reg-mips64.c, reg-mips64.o): New rules.
11129 * configure.srv: Handle mips64. Include regset support for mips.
11130 * linux-mips-low.c (union mips_register): New.
11131 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11132 (mips_breakpoint, mips_breakpoint_at): Use int.
11133 (mips_collect_register, mips_supply_register)
11134 (mips_collect_register_32bit, mips_supply_register_32bit)
11135 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11136 (mips_store_fpregset, target_regsets): New.
11137 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11138
11139 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11140
11141 * configure.srv: Add target "spu*-*-*".
11142 * Makefile.in (clean): Remove reg-spu.c.
11143 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11144 * spu-low.c: New file.
11145
11146 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11147
11148 * configure.ac: Correct td_thr_tls_get_addr test.
11149 * configure: Regenerated.
11150
11151 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11152
11153 * linux-low.c (linux_wait_for_event): Reformat. Use the
11154 pass_signals array.
11155 * remote-utils.c (decode_address_to_semicolon): New.
11156 * server.c (pass_signals, handle_general_set): New.
11157 (handle_query): Mention QPassSignals for qSupported.
11158 (main): Call handle_general_set.
11159 * server.h (pass_signals, decode_address_to_semicolon): New.
11160
11161 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11162
11163 * server.c (handle_query): Correct error handling for read_auxv.
11164
11165 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11166
11167 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11168 and srv_linux_thread_db to yes.
11169 * linux-s390-low.c (s390_fill_gregset): New function.
11170 (target_regsets): Define data structure.
11171
11172 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11173
11174 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11175 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11176 * config.in, configure: Regenerated.
11177 * inferiors.c (gdb_id_to_thread): New function.
11178 (gdb_id_to_thread_id): Use it.
11179 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11180 * linux-low.h (struct process_info): Add th member.
11181 (thread_db_get_tls_address): New prototype.
11182 * remote-utils.c (decode_address): Make non-static.
11183 * server.c (handle_query): Handle qGetTLSAddr.
11184 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11185 * target.h (struct target_ops): Add get_tls_address.
11186 * thread-db.c (maybe_attach_thread): Save the thread handle.
11187 (thread_db_get_tls_address): New.
11188
11189 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11190
11191 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11192 (linux_resume_one_process): Take a siginfo_t *. Update all
11193 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11194 (struct pending_signals): Add a siginfo_t.
11195 (linux_wait_for_process): Always set last_status.
11196 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11197 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11198 * linux-low.h (struct process_info): Add last_status.
11199
11200 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11201
11202 * remote-utils.c (try_rle): New function.
11203 (putpkt_binary): Use it.
11204
11205 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11206
11207 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11208 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11209 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11210 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11211 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11212 point registers.
11213
11214 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11215
11216 * server.c (terminal_fd): New variable.
11217 (old_foreground_pgrp): Likewise.
11218 (restore_old_foreground_pgrp): New function.
11219 (start_inferior): Record the terminal file descriptor in terminal_fd
11220 and its original foreground group in old_foreground_pgrp. Register
11221 restore_old_foreground_pgrp with atexit().
11222
11223 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11224
11225 * server.c (handle_query): Correct qPart to qXfer.
11226
11227 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11228
11229 * configure.ac: Check for more headers which are missing on
11230 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11231 * configure.srv: Add Cygwin and mingw32.
11232 * remote-utils.c: Don't include headers unconditionally which
11233 are missing on mingw32. Include <winsock.h> for mingw32.
11234 (remote_open): Adjust for mingw32 support. Flush
11235 standard error after writing to it.
11236 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11237 (unblock_async_io, enable_async_io, disable_async_io)
11238 (readchar, getpkt): Update for Winsock support.
11239 (prepare_resume_reply): Expect a protocol signal number.
11240 * server.c: Disable <sys/wait.h> on mingw32.
11241 (start_inferior): Adjust for mingw32 support. Flush
11242 standard error after writing to it.
11243 (attach_inferior): Likewise. Use protocol signal
11244 numbers.
11245 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11246 and names.
11247 * win32-i386-low.c: New file.
11248 * Makefile.in (XM_CLIBS): Set.
11249 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11250 (win32-i386-low.o): New dependency rule.
11251 * linux-low.c (linux_wait): Use target signal numbers.
11252 * target.h (struct target_ops): Doc fix.
11253 * server.h (target_signal_to_name): New prototype.
11254 * gdbreplay.c: Don't include headers unconditionally which
11255 are missing on mingw32. Include <winsock.h> for mingw32.
11256 (remote_close, remote_open): Adjust for Winsock support.
11257 * configure, config.in: Regenerated.
11258
11259 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11260
11261 * server.c (decode_xfer_read, write_qxfer_response): New.
11262 (handle_query): Take a packet length argument. Handle
11263 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11264 the qSupported response.
11265 (main): Update call to handle_query.
11266
11267 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11268
11269 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11270 (putpkt_binary): Renamed from putpkt and adjusted for binary
11271 data.
11272 (putpkt): New wrapper for putpkt_binary.
11273 (readchar): Don't mask off the high bit.
11274 (decode_X_packet): New function.
11275 * server.c (main): Call putpkt_binary if a handler sets the packet
11276 length. Save the length of the incoming packet. Handle 'X'.
11277 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11278
11279 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11280
11281 * server.c (handle_query): Handle qSupported.
11282
11283 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11284
11285 * remote-utils.c (all_symbols_looked_up): New variable.
11286 (look_up_one_symbol): Check it.
11287 * server.h (look_up_one_symbol): New declaration.
11288 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11289
11290 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11291
11292 * Makefile.in (linux-arm-low.o): Update dependencies.
11293 * linux-arm-low.c: Include "gdb_proc_service.h".
11294 (PTRACE_GET_THREAD_AREA): Define.
11295 (ps_get_thread_area): New function.
11296
11297 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11298
11299 * configure.srv (m68k*-*-uclinux*): New target.
11300 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11301 (linux_resume_one_process): Remove extraneous cast.
11302 (linux_read_offsets): New.
11303 (linux_target_op): Add linux_read_offsets on mmuless systems.
11304 * server.c (handle_query): Add qOffsets logic.
11305 * target.h (struct target_ops): Add read_offsets.
11306
11307 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11308
11309 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11310 (PTRACE_GET_THREAD_AREA): Define.
11311 (ps_get_thread_area): New function.
11312 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11313 (linux-x86-64-low.o): Update.
11314
11315 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11316
11317 * configure.ac: Remove checks for prfpregset_t.
11318 * gdb_proc_service.h: New file.
11319 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11320 new "gdb_proc_service.h".
11321 * proc-service.c: Likewise.
11322 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11323 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11324 * Makefile.in (gdb_proc_service_h): Updated.
11325 * configure, config.in: Regenerated.
11326
11327 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11328
11329 * remote-utils.c (prepare_resume_reply): Move declaration
11330 of gdb_id_from_wait to the top of the block.
11331
11332 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11333
11334 * linux-low.c (regsets_store_inferior_registers): Read the regset
11335 from the target before filling it.
11336
11337 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11338
11339 * server.c (attach_inferior): Return SIGTRAP for a successful
11340 attach.
11341
11342 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11343
11344 * Makefile.in (OBS): Add version.o.
11345 (STAGESTUFF): Delete.
11346 (version.o): Add dependencies.
11347 (version.c): Replace rule.
11348 (clean): Remove version.c.
11349 * server.c (gdbserver_version): New.
11350 (gdbserver_usage): Use printf.
11351 (main): Handle --version and --help.
11352 * server.h (version, host_name): Add declarations.
11353
11354 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11355
11356 * linux-arm-low.c:
11357 * linux-arm-low.c:
11358 * inferiors.c:
11359 * i387-fp.h:
11360 * i387-fp.c:
11361 * gdbreplay.c:
11362 * regcache.c:
11363 * proc-service.c:
11364 * mem-break.h:
11365 * mem-break.c:
11366 * linux-x86-64-low.c:
11367 * linux-sh-low.c:
11368 * linux-s390-low.c:
11369 * linux-ppc64-low.c:
11370 * linux-ppc-low.c:
11371 * linux-mips-low.c:
11372 * linux-m68k-low.c:
11373 * linux-m32r-low.c:
11374 * linux-low.h:
11375 * linux-low.c:
11376 * linux-ia64-low.c:
11377 * linux-i386-low.c:
11378 * linux-crisv32-low.c:
11379 * thread-db.c:
11380 * terminal.h:
11381 * target.h:
11382 * target.c:
11383 * server.h:
11384 * server.c:
11385 * remote-utils.c:
11386 * regcache.h:
11387 * utils.c:
11388 * Makefile.in:
11389 * configure.ac:
11390 * gdbserver.1: Add (C) after Copyright. Update the FSF
11391 address.
11392
11393 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11394
11395 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11396 (arm_breakpoint_at): Recognize both breakpoints.
11397 (the_low_target): Use the correct breakpoint instruction.
11398
11399 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11400
11401 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11402 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11403 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11404 (the_low_target): Update.
11405
11406 2005-10-25 Andreas Schwab <schwab@suse.de>
11407
11408 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11409
11410 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11411 (ia64_num_regs): Reduce to 462.
11412
11413 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11414
11415 * acinclude.m4: Correct quoting.
11416 * aclocal.m4: Regenerated.
11417
11418 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11419 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11420 (thread_db_init): Call thread_db_err_str.
11421 * configure.ac: Check for TD_VERSION.
11422 * config.in, configure: Regenerated.
11423
11424 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11425
11426 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11427
11428 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11429
11430 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11431 is not available. Define HAVE_PTRACE_GETREGS if it is.
11432 * config.in, configure: Regenerated.
11433 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11434 * linux-i386-low.c, linux-m68k-low.c: Update to use
11435 HAVE_PTRACE_GETREGS.
11436 * linux-low.c (regsets_fetch_inferior_registers)
11437 (regsets_store_inferior_registers): Only return 0 if we processed
11438 GENERAL_REGS.
11439 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11440 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11441
11442 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11443
11444 * inferiors.c (struct thread_info): Add gdb_id.
11445 (add_thread): Add gdb_id argument.
11446 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11447 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11448 calls to add_thread.
11449 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11450 * server.c (handle_query): Use thread_to_gdb_id.
11451 (handle_v_cont, main): Use gdb_id_to_thread_id.
11452 * server.h (add_thread): Update prototype.
11453 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11454 prototypes.
11455
11456 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11457
11458 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11459 left-padded registers.
11460 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11461 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11462
11463 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11464
11465 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11466 * configure: Regenerate.
11467 * config.in: Regenerate.
11468 * server.h (NEED_DECLARATION_STRERROR):
11469 Replace with !HAVE_DECL_STRERROR.
11470
11471 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11472
11473 * linux-low.c (linux_wait, linux_send_signal): Don't test
11474 an unsigned long variable for > 0 if it could be MAX_ULONG.
11475 * server.c (myresume): Likewise.
11476 * target.c (set_desired_inferior): Likewise.
11477
11478 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11479
11480 * configure.ac: Simplify and improve check for socklen_t.
11481 * configure, config.in: Regenerate.
11482
11483 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11484
11485 * acconfig.h: Remove.
11486 * configure.ac: Add a test for socklen_t. Use three-argument
11487 AC_DEFINE throughout.
11488 * config.in: Regenerated using autoheader 2.59.
11489 * configure: Regenerated.
11490
11491 * gdbreplay.c (socklen_t): Provide a default.
11492 (remote_open): Use socklen_t.
11493 * remote-utils.c (socklen_t): Provide a default.
11494 (remote_open): Use socklen_t.
11495 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11496 unsigned char.
11497
11498 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11499 char for buffers.
11500 * linux-low.c (linux_read_memory, linux_write_memory)
11501 (linux_read_auxv): Likewise.
11502 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11503 (check_mem_write): Likewise.
11504 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11505 Likewise.
11506 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11507 (registers_from_string, register_data): Likewise.
11508 * server.c (handle_query, main): Likewise.
11509 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11510 (decode_M_packet): Likewise.
11511 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11512 * target.h (struct target_ops): Update read_memory, write_memory,
11513 and read_auxv.
11514 (read_inferior_memory, write_inferior_memory): Update.
11515 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11516 to unsigned char *.
11517 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11518 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11519 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11520 linux-s390-low.c, linux-sh-low.c: Update for changes in
11521 read_inferior_memory and the_low_target->breakpoint.
11522
11523 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11524
11525 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11526 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11527 * configure.srv: Add powerpc64-*-linux*.
11528 * linux-ppc64-low.c: New file.
11529
11530 2005-05-23 Orjan Friberg <orjanf@axis.com>
11531
11532 * linux-cris-low.c: New file with support for CRIS.
11533 * linux-crisv32-low.c: Ditto for CRISv32.
11534 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11535 (clean): Add reg-cris.c and reg-crisv32.c.
11536 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11537 reg-crisv32.o, and reg-crisv32.c to make rules.
11538 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11539 recognized targets.
11540
11541 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11542
11543 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11544 of sizeof (PTRACE_XFER_TYPE).
11545 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11546
11547 2005-05-12 Orjan Friberg <orjanf@axis.com>
11548
11549 * target.h (struct target_ops): Add insert_watchpoint,
11550 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11551 pointers for hardware watchpoint support.
11552 * linux-low.h (struct linux_target_ops): Ditto.
11553 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11554 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11555 to linux_target_ops.
11556 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11557 reply packet.
11558 * server.c (main): Recognize 'Z' and 'z' packets.
11559
11560 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11561
11562 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11563 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11564 (the_low_target): Add new members.
11565
11566 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11567
11568 * proc-service.c (ps_lgetregs): Search all_processes instead of
11569 all_threads.
11570
11571 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11572
11573 * server.c (start_inferior): Change return type to int.
11574 (attach_inferior): Change sigptr to int *.
11575 (handle_v_cont, handle_v_requests): Change signal to int *.
11576 (main): Change signal to int.
11577
11578 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11579
11580 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11581 * configure.srv: Add m32r*-*-linux*.
11582 * linux-m32r-low.c: New file.
11583
11584 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11585
11586 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11587
11588 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11589
11590 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11591 Take unsigned long arguments for PIDs.
11592 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11593 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11594 (wait_for_sigstop, linux_resume_one_process)
11595 (regsets_fetch_inferior_registers, linux_send_signal)
11596 (linux_read_auxv): Likewise. Update the types of variables holding
11597 PIDs. Update format string specifiers.
11598 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11599 * remote-utils.c (prepare_resume_reply): Likewise.
11600 * server.c (cont_thread, general_thread, step_thread)
11601 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11602 unsigned long.
11603 (handle_query): Update format specifiers.
11604 (handle_v_cont, main): Use strtoul for thread IDs.
11605 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11606 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11607 (general_thread, step_thread, thread_from_wait)
11608 (old_thread_from_wait): Update.
11609 * target.h (struct thread_resume): Use unsigned long for THREAD.
11610 (struct target_ops): Use unsigned long for arguments to attach and
11611 thread_alive.
11612
11613 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11614
11615 * acinclude.m4: Include bfd/bfd.m4 directly.
11616 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11617 <agriffis@toolchain.org>.
11618 * aclocal.m4, configure: Regenerated.
11619
11620 2005-01-07 Andrew Cagney <cagney@gnu.org>
11621
11622 * configure.ac: Rename configure.in, require autoconf 2.59.
11623 * configure: Re-generate.
11624
11625 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11626
11627 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11628 LIBS when finished.
11629 * aclocal.m4: Regenerated.
11630 * configure: Regenerated.
11631
11632 2004-11-21 Andreas Schwab <schwab@suse.de>
11633
11634 * linux-m68k-low.c (m68k_num_gregs): Define.
11635 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11636 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11637 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11638 (m68k_breakpoint_at): New. Add to the_low_target.
11639
11640 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11641 srv_linux_thread_db to yes.
11642
11643 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11644
11645 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11646 (ARCH_SET_FS): Likewise.
11647 (ARCH_GET_FS): Likewise.
11648 (ARCH_GET_GS): Likewise.
11649
11650 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11651
11652 * linux-i386-low.c (ps_get_thread_area): New.
11653 * linux-x86-64-low.c (ps_get_thread_area): New.
11654 * linux-low.c: Include <sys/syscall.h>.
11655 (linux_kill_one_process): Don't kill the first thread here.
11656 (linux_kill): Kill the first thread here.
11657 (kill_lwp): New function.
11658 (send_sigstop, linux_send_signal): Use it.
11659 * proc-service.c: Clean up #ifdefs.
11660 (fpregset_info): Delete.
11661 (ps_lgetregs): Update and enable implementation.
11662 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11663 implementations.
11664 * remote-utils.c (struct sym_cache, symbol_cache): New.
11665 (input_interrupt): Print a clearer message.
11666 (async_io_enabled): New variable.
11667 (enable_async_io, disable_async_io): Use it. Update comments.
11668 (look_up_one_symbol): Use the symbol cache.
11669 * thread-db.c (thread_db_look_up_symbols): New function.
11670 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11671
11672 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11673
11674 * configure.in: Test for -rdynamic.
11675 * configure: Regenerated.
11676 * Makefile (INTERNAL_LDFLAGS): New.
11677 (gdbserver, gdbreplay): Use it.
11678
11679 2004-09-02 Andrew Cagney <cagney@gnu.org>
11680
11681 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11682
11683 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11684
11685 * linux-low.c (linux_wait): Clear all_processes list also.
11686
11687 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11688
11689 * linux-low.c: Include <errno.h>. Remove extern declaration of
11690 errno.
11691
11692 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11693
11694 * gdbreplay.c, server.h, utils.c: Update copyright years.
11695
11696 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11697
11698 * server.c (main): Print child status or termination signal from
11699 variable 'signal', not 'sig'.
11700
11701 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11702
11703 * linux-low.c (linux_read_memory): Change return type to
11704 int. Check for and return error from ptrace().
11705 * target.c (read_inferior_memory): Change return type to int. Pass
11706 back return status from the_target->read_memory().
11707 * target.h (struct target_ops): Adapt *read_memory() prototype.
11708 Update comment.
11709 (read_inferior_memory): Adapt prototype.
11710 * server.c (main): Return an error packet if
11711 read_inferior_memory() returns an error.
11712
11713 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11714
11715 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11716 Unify with other clean targets.
11717
11718 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11719
11720 * server.c (handle_v_cont): Call set_desired_inferior.
11721
11722 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11723
11724 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11725
11726 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11727
11728 * linux-low.c (linux_wait): Unblock async I/O.
11729 (linux_resume): Block and enable async I/O.
11730 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11731 * server.h (block_async_io, unblock_async_io): Add prototypes.
11732
11733 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11734
11735 * remote-utils.c (remote_open): Print a status notice after
11736 opening a TCP port.
11737 * server.c (attach_inferior): Print a status notice after
11738 attaching.
11739
11740 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11741
11742 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11743
11744 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11745
11746 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11747 error packet.
11748 * server.c, target.h: Update copyright years.
11749
11750 2004-02-25 Roland McGrath <roland@redhat.com>
11751
11752 * target.h (struct target_ops): New member `read_auxv'.
11753 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11754 * linux-low.c (linux_read_auxv): New function.
11755 (linux_target_ops): Initialize `read_auxv' member to that.
11756
11757 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11758
11759 Committed by Jim Blandy <jimb@redhat.com>.
11760
11761 * linux-s390-low.c (s390_num_regs): Update.
11762 (s390_regmap): Remove control registers. Use __s390x__ predefine
11763 instead of GPR_SIZE to distiguish s390 and s390x targets.
11764
11765 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11766
11767 * linux-low.c: Update copyright year.
11768 (check_removed_breakpoint): Clear pending_is_breakpoint.
11769 (linux_set_resume_request, linux_queue_one_thread)
11770 (resume_status_pending_p): New functions.
11771 (linux_continue_one_thread): Use process->resume.
11772 (linux_resume): Only resume threads if there are no pending events.
11773 * linux-low.h (struct process_info): Add resume request
11774 pointer.
11775
11776 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11777
11778 * regcache.c (new_register_cache): Clear the allocated register
11779 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11780
11781 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11782
11783 * linux-low.c (linux_resume): Take a struct thread_resume *
11784 argument.
11785 (linux_wait): Update call.
11786 (resume_ptr): New static variable.
11787 (linux_continue_one_thread): Renamed from
11788 linux_continue_one_process. Use resume_ptr.
11789 (linux_resume): Use linux_continue_one_thread.
11790 * server.c (handle_v_cont, handle_v_requests): New functions.
11791 (myresume): New function.
11792 (main): Handle 'v' case.
11793 * target.h (struct thread_resume): New type.
11794 (struct target_ops): Change argument of "resume" to struct
11795 thread_resume *.
11796 (myresume): Delete macro.
11797
11798 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11799
11800 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11801 (uninstall): Support DESTDIR.
11802
11803 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11804
11805 * configure.srv: Add xscale*linux copy of arm*linux entry.
11806
11807 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11808
11809 * linux-arm-low.c (arm_reinsert_addr): New function.
11810 (the_low_target): Add arm_reinsert_addr.
11811
11812 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11813
11814 * mem-break.c: Remove whitespace at end of file.
11815
11816 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11817
11818 * configure.in: Check whether we need to prototype strerror.
11819 * server.h: Optionally prototype strerror.
11820 * gdbreplay.c (perror_with_name): Use strerror.
11821 * linux-low.c (linux_attach_lwp): Use strerror.
11822 * utils.c (perror_with_name): Use strerror.
11823 * config.in, configure: Regenerated.
11824
11825 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11826
11827 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11828 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11829
11830 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11831
11832 * Makefile.in (SFILES): Update.
11833 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11834 low-sun3.c: Remove files.
11835
11836 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11837
11838 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11839 (linux_detach_one_process, linux_detach): New functions.
11840 (linux_target_ops): Add linux_detach.
11841 * server.c (main): Handle 'D' packet.
11842 * target.h (struct target_ops): Add "detach" member.
11843 (detach_inferior): Define.
11844
11845 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11846
11847 From Kelley Cook <kelleycook@wideopenwest.com>:
11848 * configure.srv: Accept i[34567]86 variants.
11849
11850 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11851
11852 * linux-low.c (linux_wait_for_event): Correct comment typos.
11853 (linux_resume_one_process): Call check_removed_breakpoint.
11854 (linux_send_signal): New function.
11855 (linux_target_ops): Add linux_send_signal.
11856 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11857 of kill.
11858 * target.h (struct target_ops): Add send_signal.
11859
11860 2003-05-29 Jim Blandy <jimb@redhat.com>
11861
11862 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11863 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11864 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11865 away part of the register's value.
11866
11867 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11868
11869 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11870 (linux_wait_for_event, linux_init_signals): Likewise.
11871
11872 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11873
11874 * configure.in: Check for stdlib.h.
11875 * configure: Regenerated.
11876 * config.in: Regenerated.
11877
11878 2003-01-04 Andreas Schwab <schwab@suse.de>
11879
11880 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11881
11882 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11883
11884 * Makefile.in: Remove obsolete code.
11885
11886 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11887
11888 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11889 defined(PT_FPR0_HI).
11890
11891 2002-11-17 Stuart Hughes <seh@zee2.com>
11892
11893 * linux-arm-low.c (arm_num_regs): Increase.
11894 (arm_regmap): Include status register.
11895
11896 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11897
11898 * linux-low.c (register_addr): Remove incorrect -1 check.
11899
11900 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11901
11902 * linux-low.c (linux_create_inferior): Call setpgid. Return
11903 the new PID.
11904 (unstopped_p, linux_signal_pid): Remove.
11905 (linux_target_ops): Remove linux_signal_pid.
11906 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11907 global instead of target method.
11908 * target.h (struct target_ops): Remove signal_pid. Update comment
11909 for create_inferior.
11910 * server.c (signal_pid): New variable.
11911 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11912 gdbserver. Set the child to be the foreground process group.
11913 (attach_inferior): Set signal_pid.
11914
11915 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11916
11917 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11918
11919 2002-08-20 Jim Blandy <jimb@redhat.com>
11920
11921 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11922 default for this.
11923
11924 2002-08-01 Andrew Cagney <cagney@redhat.com>
11925
11926 * Makefile.in: Make chill references obsolete.
11927
11928 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11929
11930 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11931 * configure: Regenerate.
11932 * config.in: Regenerate.
11933
11934 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11935
11936 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11937 (perror_with_name, remote_close, remote_open, expect, play): Static.
11938
11939 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11940
11941 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11942 byte offsets instead of an array of indexes.
11943 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11944
11945 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11946
11947 * regcache.c: Add comment.
11948
11949 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11950
11951 * thread-db.c: New file.
11952 * proc-service.c: New file.
11953 * acinclude.m4: New file.
11954 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11955 proc-service.o, and thread-db.o.
11956 (linux-low.o): Add USE_THREAD_DB.
11957 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11958 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11959 * aclocal.m4: Regenerated.
11960 * config.in: Regenerated.
11961 * configure: Regenerated.
11962 * configure.in: Check for proc_service.h, sys/procfs.h,
11963 thread_db.h, and linux/elf.h headrs.
11964 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11965 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11966 Check for -lthread_db and thread support.
11967 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11968 PowerPC, and SuperH.
11969 * i387-fp.c: Constify arguments.
11970 * i387-fp.h: Likewise.
11971 * inferiors.c: (struct thread_info): Renamed from
11972 `struct inferior_info'. Remove PID member. Use generic inferior
11973 list header. All uses updated.
11974 (inferiors, signal_pid): Removed.
11975 (all_threads): New variable.
11976 (get_thread): Define.
11977 (add_inferior_to_list): New function.
11978 (for_each_inferior): New function.
11979 (change_inferior_id): New function.
11980 (add_inferior): Removed.
11981 (remove_inferior): New function.
11982 (add_thread): New function.
11983 (free_one_thread): New function.
11984 (remove_thread): New function.
11985 (clear_inferiors): Use for_each_inferior and free_one_thread.
11986 (find_inferior): New function.
11987 (find_inferior_id): New function.
11988 (inferior_target_data): Update argument type.
11989 (set_inferior_target_data): Likewise.
11990 (inferior_regcache_data): Likewise.
11991 (set_inferior_regcache_data): Likewise.
11992 * linux-low.c (linux_bp_reinsert): Remove.
11993 (all_processes, stopping_threads, using_thrads)
11994 (struct pending_signals, debug_threads, pid_of): New.
11995 (inferior_pid): Replace with macro.
11996 (struct inferior_linux_data): Remove.
11997 (get_stop_pc, add_process): New functions.
11998 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11999 Use add_process and add_thread.
12000 (linux_attach_lwp): New function, based on old linux_attach. Use
12001 add_process and add_thread. Set stop_expected for new threads.
12002 (linux_attach): New function.
12003 (linux_kill_one_process): New function.
12004 (linux_kill): Kill all LWPs.
12005 (linux_thread_alive): Use find_inferior_id.
12006 (check_removed_breakpoints, status_pending_p): New functions.
12007 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12008 Update. Use WNOHANG. Wait for cloned processes also. Update process
12009 struct for the found process.
12010 (linux_wait_for_event): New function.
12011 (linux_wait): Use it. Support LWPs.
12012 (send_sigstop, wait_for_sigstop, stop_all_processes)
12013 (linux_resume_one_process, linux_continue_one_process): New functions.
12014 (linux_resume): Support LWPs.
12015 (REGISTER_RAW_SIZE): Remove.
12016 (fetch_register): Use register_size instead. Call supply_register.
12017 (usr_store_inferior_registers): Likewise. Call collect_register.
12018 Fix recursive case.
12019 (regsets_fetch_inferior_registers): Improve error message.
12020 (regsets_store_inferior_registers): Add debugging.
12021 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12022 (unstopped_p, linux_signal_pid): New functions.
12023 (linux_target_ops): Add linux_signal_pid.
12024 (linux_init_signals): New function.
12025 (initialize_low): Call it. Initialize using_threads.
12026 * regcache.c (inferior_regcache_data): Add valid
12027 flag.
12028 (get_regcache): Fetch registers lazily. Add fetch argument
12029 and update all callers.
12030 (regcache_invalidate_one, regcache_invalidate): New
12031 functions.
12032 (new_register_cache): Renamed from create_register_cache.
12033 Return the new regcache.
12034 (free_register_cache): Change argument to a void *.
12035 (registers_to_string, registers_from_string): Call get_regcache
12036 with fetch flag set.
12037 (register_data): Make static. Pass fetch flag to get_regcache.
12038 (supply_register): Call get_regcache with fetch flag clear.
12039 (collect_register): Call get_regcache with fetch flag set.
12040 (collect_register_as_string): New function.
12041 * regcache.h: Update.
12042 * remote-utils.c (putpkt): Flush after debug output and use
12043 stderr.
12044 Handle input interrupts while waiting for an ACK.
12045 (input_interrupt): Use signal_pid method.
12046 (getpkt): Flush after debug output and use stderr.
12047 (outreg): Use collect_register_as_string.
12048 (new_thread_notify, dead_thread_notify): New functions.
12049 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12050 and general_thread.
12051 (look_up_one_symbol): Flush after debug output.
12052 * server.c (step_thread, server_waiting): New variables.
12053 (start_inferior): Don't use signal_pid. Update call to mywait.
12054 (attach_inferior): Update call to mywait.
12055 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12056 (main): Don't fetch/store registers explicitly. Use
12057 set_desired_inferior. Support proposed ``Hs'' packet. Update
12058 calls to mywait.
12059 * server.h: Update.
12060 (struct inferior_list, struct_inferior_list_entry): New.
12061 * target.c (set_desired_inferior): New.
12062 (write_inferior_memory): Constify.
12063 (mywait): New function.
12064 * target.h: Update.
12065 (struct target_ops): New signal_pid method.
12066 (mywait): Removed macro, added prototype.
12067
12068 * linux-low.h (regset_func): Removed.
12069 (regset_fill_func, regset_store_func): New.
12070 (enum regset_type): New.
12071 (struct regset_info): Add type field. Use new operation types.
12072 (struct linux_target_ops): stop_pc renamed to get_pc.
12073 Add decr_pc_after_break and breakpoint_at.
12074 (get_process, get_thread_proess, get_process_thread)
12075 (strut process_info, all_processes, linux_attach_lwp)
12076 (thread_db_init): New.
12077
12078 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12079 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12080 (the_low_target): Add new members.
12081 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12082 (i386_store_fpxregset): Constify.
12083 (target_regsets): Add new kind identifier.
12084 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12085 (i386_set_pc): Add debugging.
12086 (i386_breakpoint_at): New function.
12087 (the_low_target): Add new members.
12088 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12089 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12090 (mips_breakpoint_at): New.
12091 (the_low_target): Add new members.
12092 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12093 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12094 (the_low_target): Add new members.
12095 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12096 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12097 (the_low_target): Add new members.
12098 * linux-x86-64-low.c (target_regsets): Add new kind
12099 identifier.
12100
12101 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12102
12103 From Martin Pool <mbp@samba.org>:
12104 * server.c (gdbserver_usage): New function.
12105 (main): Call it.
12106
12107 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12108
12109 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12110 stop_at -> stop_pc.
12111
12112 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12113
12114 * Makefile.in: Remove obsolete code.
12115
12116 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12117
12118 * linux-low.c (regsets_fetch_inferior_registers),
12119 (regsets_store_inferior_registers): Removed cast to int from
12120 ptrace() calls.
12121 * regcache.h: Added declaration of struct inferior_info.
12122
12123 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12124
12125 * inferiors.c (struct inferior_info): Add regcache_data.
12126 (add_inferior): Call create_register_cache.
12127 (clear_inferiors): Call free_register_cache.
12128 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12129 * regcache.c (struct inferior_regcache_data): New.
12130 (registers): Remove.
12131 (get_regcache): New function.
12132 (create_register_cache, free_register_cache): New functions.
12133 (set_register_cache): Don't initialize the register cache here.
12134 (registers_to_string, registers_from_string, register_data): Call
12135 get_regcache.
12136 * regcache.h: Add prototypes.
12137 * server.h: Likewise.
12138
12139 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12140
12141 * mem-break.c: New file.
12142 * mem-break.h: New file.
12143 * Makefile.in: Add mem-break.o rule; update server.h
12144 dependencies.
12145 * inferiors.c (struct inferior_info): Add target_data
12146 member.
12147 (clear_inferiors): Free target_data member if set.
12148 (inferior_target_data, set_inferior_target_data): New functions.
12149 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12150 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12151 * linux-low.c (linux_bp_reinsert): New variable.
12152 (struct inferior_linux_data): New.
12153 (linux_create_inferior): Use set_inferior_target_data.
12154 (linux_attach): Likewise. Call add_inferior.
12155 (linux_wait_for_one_inferior): New function.
12156 (linux_wait): Call it.
12157 (linux_write_memory): Add const.
12158 (initialize_low): Call set_breakpoint_data.
12159 * linux-low.h (struct linux_target_ops): Add breakpoint
12160 handling members.
12161 * server.c (attach_inferior): Remove extra add_inferior
12162 call.
12163 * server.h: Include mem-break.h. Update inferior.c
12164 prototypes.
12165 * target.c (read_inferior_memory)
12166 (write_inferior_memory): New functions.
12167 * target.h (read_inferior_memory)
12168 (write_inferior_memory): Change macros to prototypes.
12169 (struct target_ops): Update comments. Add const to write_memory
12170 definition.
12171
12172 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12173
12174 * linux-low.c (usr_store_inferior_registers): Support
12175 registers which are allowed to fail to store.
12176 * linux-low.h (linux_target_ops): Likewise.
12177 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12178 (ppc_cannot_store_register): FPSCR may not be storable.
12179
12180 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12181
12182 * server.h: Include <string.h> if HAVE_STRING_H.
12183 * ChangeLog: Correct paths in last ChangeLog entry.
12184
12185 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12186
12187 * linux-low.h: Remove obsolete prototypes.
12188 (struct linux_target_ops): New.
12189 (extern the_low_target): New.
12190 * linux-low.c (num_regs, regmap): Remove declarations.
12191 (register_addr): Use the_low_target explicitly.
12192 (fetch_register): Likewise.
12193 (usr_fetch_inferior_registers): Likewise.
12194 (usr_store_inferior_registers): Likewise.
12195 * linux-arm-low.c (num_regs): Remove.
12196 (arm_num_regs): Define.
12197 (arm_regmap): Renamed from regmap, made static.
12198 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12199 made static.
12200 (arm_cannot_store_register): Renamed from cannot_store_register,
12201 made static.
12202 (the_low_target): New.
12203 * linux-i386-low.c (num_regs): Remove.
12204 (i386_num_regs): Define.
12205 (i386_regmap): Renamed from regmap, made static.
12206 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12207 made static.
12208 (i386_cannot_store_register): Renamed from cannot_store_register,
12209 made static.
12210 (the_low_target): New.
12211 * linux-ia64-low.c (num_regs): Remove.
12212 (ia64_num_regs): Define.
12213 (ia64_regmap): Renamed from regmap, made static.
12214 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12215 made static.
12216 (ia64_cannot_store_register): Renamed from cannot_store_register,
12217 made static.
12218 (the_low_target): New.
12219 * linux-m68k-low.c (num_regs): Remove.
12220 (m68k_num_regs): Define.
12221 (m68k_regmap): Renamed from regmap, made static.
12222 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12223 made static.
12224 (m68k_cannot_store_register): Renamed from cannot_store_register,
12225 made static.
12226 (the_low_target): New.
12227 * linux-mips-low.c (num_regs): Remove.
12228 (mips_num_regs): Define.
12229 (mips_regmap): Renamed from regmap, made static.
12230 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12231 made static.
12232 (mips_cannot_store_register): Renamed from cannot_store_register,
12233 made static.
12234 (the_low_target): New.
12235 * linux-ppc-low.c (num_regs): Remove.
12236 (ppc_num_regs): Define.
12237 (ppc_regmap): Renamed from regmap, made static.
12238 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12239 made static.
12240 (ppc_cannot_store_register): Renamed from cannot_store_register,
12241 made static.
12242 (the_low_target): New.
12243 * linux-s390-low.c (num_regs): Remove.
12244 (s390_num_regs): Define.
12245 (s390_regmap): Renamed from regmap, made static.
12246 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12247 made static.
12248 (s390_cannot_store_register): Renamed from cannot_store_register,
12249 made static.
12250 (the_low_target): New.
12251 * linux-sh-low.c (num_regs): Remove.
12252 (sh_num_regs): Define.
12253 (sh_regmap): Renamed from regmap, made static.
12254 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12255 made static.
12256 (sh_cannot_store_register): Renamed from cannot_store_register,
12257 made static.
12258 (the_low_target): New.
12259 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12260 (the_low_target): New.
12261
12262 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12263
12264 * Makefile.in: Add stamp-h target.
12265 * configure.in: Create stamp-h.
12266 * configure: Regenerated.
12267
12268 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12269
12270 * inferiors.c: New file.
12271 * target.c: New file.
12272 * target.h: New file.
12273 * Makefile.in: Add target.o and inferiors.o. Update
12274 dependencies.
12275 * linux-low.c (inferior_pid): New static variable,
12276 moved from server.c.
12277 (linux_create_inferior): Renamed from create_inferior.
12278 Call add_inferior. Return 0 on success instead of a PID.
12279 (linux_attach): Renamed from myattach.
12280 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12281 (linux_thread_alive): Renamed from mythread_alive.
12282 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12283 child dies.
12284 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12285 (regsets_store_inferior_registers): Correct error message.
12286 Add missing ``return 0''.
12287 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12288 (linux_store_registers): Renamed from store_inferior_registers.
12289 (linux_read_memory): Renamed from read_inferior_memory.
12290 (linux_write_memory): Renamed from write_inferior_memory.
12291 (linux_target_ops): New structure.
12292 (initialize_low): Call set_target_ops ().
12293 * remote-utils.c (unhexify): New function.
12294 (hexify): New function.
12295 (input_interrupt): Send signals to ``signal_pid''.
12296 * server.c (inferior_pid): Remove.
12297 (start_inferior): Update create_inferior call.
12298 (attach_inferior): Call add_inferior.
12299 (handle_query): New function.
12300 (main): Call handle_query for `q' packets.
12301 * server.h: Include "target.h". Remove obsolete prototypes.
12302 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12303
12304 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12305
12306 * Makefile.in: Add WARN_CFLAGS. Update configury
12307 dependencies.
12308 * configure.in: Check for <string.h>
12309 * configure: Regenerate.
12310 * config.in: Regenerate.
12311 * gdbreplay.c: Include needed system headers.
12312 (remote_open): Remove strchr prototype.
12313 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12314 * regcache.c (supply_register): Change buf argument to const void *.
12315 (supply_register_by_name): Likewise.
12316 (collect_register): Change buf argument to void *.
12317 (collect_register_by_name): Likewise.
12318 * regcache.h: Add missing prototypes.
12319 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12320 * server.c (handle_query): New function.
12321 (attached): New static variable, moved out of main.
12322 (main): Quiet longjmp clobber warnings.
12323 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12324 * utils.c (error): Remove NORETURN.
12325 (fatal): Likewise.
This page took 0.295465 seconds and 4 git commands to generate.