Add support for fast tracepoints
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2
3 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5 aarch64-ipa.o.
6 * linux-aarch64-ipa.c: New file.
7 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
8 and endian.h.
9 (aarch64_get_thread_area): New target method.
10 (extract_signed_bitfield): New helper function.
11 (aarch64_decode_ldr_literal): New function.
12 (enum aarch64_opcodes): New enum.
13 (struct aarch64_register): New struct.
14 (struct aarch64_operand): New struct.
15 (x0): New static global.
16 (x1): Likewise.
17 (x2): Likewise.
18 (x3): Likewise.
19 (x4): Likewise.
20 (w2): Likewise.
21 (ip0): Likewise.
22 (sp): Likewise.
23 (xzr): Likewise.
24 (aarch64_register): New helper function.
25 (register_operand): Likewise.
26 (immediate_operand): Likewise.
27 (struct aarch64_memory_operand): New struct.
28 (offset_memory_operand): New helper function.
29 (preindex_memory_operand): Likewise.
30 (enum aarch64_system_control_registers): New enum.
31 (ENCODE): New macro.
32 (emit_insn): New helper function.
33 (emit_b): New function.
34 (emit_bcond): Likewise.
35 (emit_cb): Likewise.
36 (emit_tb): Likewise.
37 (emit_blr): Likewise.
38 (emit_stp): Likewise.
39 (emit_ldp_q_offset): Likewise.
40 (emit_stp_q_offset): Likewise.
41 (emit_load_store): Likewise.
42 (emit_ldr): Likewise.
43 (emit_ldrsw): Likewise.
44 (emit_str): Likewise.
45 (emit_ldaxr): Likewise.
46 (emit_stxr): Likewise.
47 (emit_stlr): Likewise.
48 (emit_data_processing_reg): Likewise.
49 (emit_data_processing): Likewise.
50 (emit_add): Likewise.
51 (emit_sub): Likewise.
52 (emit_mov): Likewise.
53 (emit_movk): Likewise.
54 (emit_mov_addr): Likewise.
55 (emit_mrs): Likewise.
56 (emit_msr): Likewise.
57 (emit_sevl): Likewise.
58 (emit_wfe): Likewise.
59 (append_insns): Likewise.
60 (can_encode_int32_in): New helper function.
61 (aarch64_relocate_instruction): New function.
62 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
63 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
64 (struct linux_target_ops): Install aarch64_get_thread_area,
65 aarch64_install_fast_tracepoint_jump_pad and
66 aarch64_get_min_fast_tracepoint_insn_len.
67
68 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
69
70 * Makefile.in (aarch64-insn.o): New rule.
71 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
72
73 2015-09-21 Yao Qi <yao.qi@linaro.org>
74
75 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
76
77 2015-09-21 Yao Qi <yao.qi@linaro.org>
78
79 * tracepoint.c (max_jump_pad_size): Remove.
80
81 2015-09-18 Yao Qi <yao.qi@linaro.org>
82
83 * linux-aarch64-low.c: Don't include sys/uio.h.
84 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
85
86 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
87
88 * tracepoint.c (eval_result_type): Change prototype.
89 (condition_true_at_tracepoint): Fix argument to compiled_cond.
90
91 2015-09-15 Pedro Alves <palves@redhat.com>
92
93 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
94 Check whether to report exec events instead of checking whether
95 multiprocess is enabled.
96
97 2015-09-15 Pedro Alves <palves@redhat.com>
98
99 PR remote/18965
100 * remote-utils.c (prepare_resume_reply): Merge
101 TARGET_WAITKIND_VFORK_DONE switch case with the
102 TARGET_WAITKIND_FORKED case.
103
104 2015-09-15 Yao Qi <yao.qi@linaro.org>
105
106 * server.c (handle_query): Check string comparison using
107 "else if" instead of "if".
108
109 2015-09-15 Yao Qi <yao.qi@linaro.org>
110
111 * server.c (vCont_supported): New global variable.
112 (handle_query): Set vCont_supported to 1 if "vContSupported+"
113 matches. Append ";vContSupported+" to own_buf.
114 (handle_v_requests): Append ";s;S" to own_buf if target supports
115 hardware single step or vCont_supported is false.
116 (capture_main): Set vCont_supported to zero.
117
118 2015-09-15 Yao Qi <yao.qi@linaro.org>
119
120 * linux-low.c (linux_supports_conditional_breakpoints): Rename
121 it to ...
122 (linux_supports_hardware_single_step): ... New function.
123 (linux_target_ops): Update.
124 * lynx-low.c (lynx_target_ops): Set field
125 supports_hardware_single_step to target_can_do_hardware_single_step.
126 * nto-low.c (nto_target_ops): Likewise.
127 * spu-low.c (spu_target_ops): Likewise.
128 * win32-low.c (win32_target_ops): Likewise.
129 * target.c (target_can_do_hardware_single_step): New function.
130 * target.h (struct target_ops) <supports_conditional_breakpoints>:
131 Remove. <supports_hardware_single_step>: New field.
132 (target_supports_conditional_breakpoints): Remove.
133 (target_supports_hardware_single_step): New macro.
134 (target_can_do_hardware_single_step): Declare.
135 * server.c (handle_query): Use target_supports_hardware_single_step
136 instead of target_supports_conditional_breakpoints.
137
138 2015-09-15 Yao Qi <yao.qi@linaro.org>
139
140 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
141 function.
142 (struct linux_target_ops the_low_target): Install
143 aarch64_linux_siginfo_fixup.
144
145 2015-09-11 Don Breazeal <donb@codesourcery.com>
146 Luis Machado <lgustavo@codesourcery.com>
147
148 * linux-low.c (linux_mourn): Static declaration.
149 (linux_arch_setup): Move in front of
150 handle_extended_wait.
151 (linux_arch_setup_thread): New function.
152 (handle_extended_wait): Handle exec events. Call
153 linux_arch_setup_thread. Make event_lwp argument a
154 pointer-to-a-pointer.
155 (check_zombie_leaders): Do not check stopped threads.
156 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
157 (linux_low_filter_event): Add lwp and thread for exec'ing
158 non-leader thread if leader thread has been deleted.
159 Refactor code into linux_arch_setup_thread and call it.
160 Pass child lwp pointer by reference to handle_extended_wait.
161 (linux_wait_for_event_filtered): Update comment.
162 (linux_wait_1): Prevent clobbering exec event status.
163 (linux_supports_exec_events): New function.
164 (linux_target_ops) <supports_exec_events>: Initialize new member.
165 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
166 new member.
167 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
168 * server.c (report_exec_events): New global variable.
169 (handle_query): Handle qSupported query for exec-events feature.
170 (captured_main): Initialize report_exec_events.
171 * server.h (report_exec_events): Declare new global variable.
172 * target.h (struct target_ops) <supports_exec_events>: New
173 member.
174 (target_supports_exec_events): New macro.
175 * win32-low.c (win32_target_ops) <supports_exec_events>:
176 Initialize new member.
177
178 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
179
180 * linux-low.c (linux_low_enable_btrace): Remove.
181 (linux_target_ops): Replace linux_low_enable_btrace with
182 linux_enable_btrace.
183
184 2015-09-03 Yao Qi <yao.qi@linaro.org>
185
186 * linux-aarch64-low.c (aarch64_insert_point): Call
187 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
188 returns true.
189
190 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
191
192 * linux-low.c (check_stopped_by_breakpoint): Use
193 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
194
195 2015-08-27 Pedro Alves <palves@redhat.com>
196
197 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
198
199 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
200
201 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
202 the XNEW-family equivalent.
203 (compile_bytecodes): Likewise.
204 * dll.c (loaded_dll): Likewise.
205 * event-loop.c (append_callback_event): Likewise.
206 (create_file_handler): Likewise.
207 (create_file_event): Likewise.
208 * hostio.c (handle_open): Likewise.
209 * inferiors.c (add_thread): Likewise.
210 (add_process): Likewise.
211 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
212 * linux-arm-low.c (arm_new_process): Likewise.
213 (arm_new_thread): Likewise.
214 * linux-low.c (add_to_pid_list): Likewise.
215 (linux_add_process): Likewise.
216 (handle_extended_wait): Likewise.
217 (add_lwp): Likewise.
218 (enqueue_one_deferred_signal): Likewise.
219 (enqueue_pending_signal): Likewise.
220 (linux_resume_one_lwp_throw): Likewise.
221 (linux_resume_one_thread): Likewise.
222 (linux_read_memory): Likewise.
223 (linux_write_memory): Likewise.
224 * linux-mips-low.c (mips_linux_new_process): Likewise.
225 (mips_linux_new_thread): Likewise.
226 (mips_add_watchpoint): Likewise.
227 * linux-x86-low.c (initialize_low_arch): Likewise.
228 * lynx-low.c (lynx_add_process): Likewise.
229 * mem-break.c (set_raw_breakpoint_at): Likewise.
230 (set_breakpoint): Likewise.
231 (add_condition_to_breakpoint): Likewise.
232 (add_commands_to_breakpoint): Likewise.
233 (clone_agent_expr): Likewise.
234 (clone_one_breakpoint): Likewise.
235 * regcache.c (new_register_cache): Likewise.
236 * remote-utils.c (look_up_one_symbol): Likewise.
237 * server.c (queue_stop_reply): Likewise.
238 (start_inferior): Likewise.
239 (queue_stop_reply_callback): Likewise.
240 (handle_target_event): Likewise.
241 * spu-low.c (fetch_ppc_memory): Likewise.
242 (store_ppc_memory): Likewise.
243 * target.c (set_target_ops): Likewise.
244 * thread-db.c (thread_db_load_search): Likewise.
245 (try_thread_db_load_1): Likewise.
246 * tracepoint.c (add_tracepoint): Likewise.
247 (add_tracepoint_action): Likewise.
248 (create_trace_state_variable): Likewise.
249 (cmd_qtdpsrc): Likewise.
250 (cmd_qtro): Likewise.
251 (add_while_stepping_state): Likewise.
252 * win32-low.c (child_add_thread): Likewise.
253 (get_image_name): Likewise.
254
255 2015-08-25 Yao Qi <yao.qi@linaro.org>
256
257 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
258
259 2015-08-25 Yao Qi <yao.qi@linaro.org>
260
261 * Makefile.in (aarch64-linux.o): New rule.
262 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
263 srv_tgtobj.
264 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
265 (aarch64_init_debug_reg_state): Make it extern.
266 (aarch64_linux_prepare_to_resume): Remove.
267
268 2015-08-25 Yao Qi <yao.qi@linaro.org>
269
270 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
271 lwp_arch_private_info and ptid_of_lwp.
272
273 2015-08-25 Yao Qi <yao.qi@linaro.org>
274
275 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
276 Find proc_info by find_process_pid. All callers updated.
277
278 2015-08-25 Yao Qi <yao.qi@linaro.org>
279
280 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
281 Remove.
282 (debug_reg_change_callback): Remove.
283 (aarch64_notify_debug_reg_change): Remove.
284
285 2015-08-25 Yao Qi <yao.qi@linaro.org>
286
287 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
288 Call current_lwp_ptid.
289
290 2015-08-25 Yao Qi <yao.qi@linaro.org>
291
292 * linux-aarch64-low.c (debug_reg_change_callback): Use
293 debug_printf.
294
295 2015-08-25 Yao Qi <yao.qi@linaro.org>
296
297 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
298
299 2015-08-25 Yao Qi <yao.qi@linaro.org>
300
301 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
302
303 2015-08-25 Yao Qi <yao.qi@linaro.org>
304
305 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
306 the code.
307
308 2015-08-25 Yao Qi <yao.qi@linaro.org>
309
310 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
311 Remove.
312 (debug_reg_change_callback): Remove argument entry and add argument
313 lwp. Remove local variable thread. Don't print thread id in the
314 debugging output. Don't check whether pid of thread equals to pid.
315 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
316 iterate_over_lwps instead find_inferior.
317
318 2015-08-24 Pedro Alves <palves@redhat.com>
319
320 * inferiors.c (get_first_process): New function.
321 * inferiors.h (get_first_process): New declaration.
322 * remote-utils.c (read_ptid): Default to the first process in the
323 list, instead of to the current thread's process.
324
325 2015-08-24 Pedro Alves <palves@redhat.com>
326
327 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
328 * event-loop.c: Likewise.
329 * remote-utils.c: Likewise.
330 * tracepoint.c: Likewise.
331
332 2015-08-24 Pedro Alves <palves@redhat.com>
333
334 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
335 ptid_get_lwp.
336
337 2015-08-21 Pedro Alves <palves@redhat.com>
338
339 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
340 instead of literal 1.
341
342 2015-08-21 Pedro Alves <palves@redhat.com>
343
344 * tdesc.c (default_description): Explicitly zero-initialize.
345
346 2015-08-21 Pedro Alves <palves@redhat.com>
347
348 PR gdb/18749
349 * inferiors.c (remove_thread): Discard any pending stop reply for
350 this thread.
351 * server.c (remove_all_on_match_pid): Rename to ...
352 (remove_all_on_match_ptid): ... this. Work with a filter ptid
353 instead of a pid.
354 (discard_queued_stop_replies): Change parameter to a ptid. Now
355 extern.
356 (handle_v_kill, kill_inferior_callback, captured_main)
357 (process_serial_event): Adjust.
358 * server.h (discard_queued_stop_replies): Declare.
359
360 2015-08-21 Pedro Alves <palves@redhat.com>
361
362 * linux-low.c (wait_for_sigstop): Always switch to no thread
363 selected if the previously current thread dies.
364 * lynx-low.c (lynx_request_interrupt): Use the first thread's
365 process instead of the current thread's.
366 * remote-utils.c (input_interrupt): Don't check if there's no
367 current thread.
368 * server.c (gdb_read_memory, gdb_write_memory): If setting the
369 current thread to the general thread fails, error out.
370 (handle_qxfer_auxv, handle_qxfer_libraries)
371 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
372 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
373 (handle_query): Check if there's a thread selected instead of
374 checking whether there's any thread in the thread list.
375 (handle_qxfer_threads, handle_qxfer_btrace)
376 (handle_qxfer_btrace_conf): Don't error out early if there's no
377 thread in the thread list.
378 (handle_v_cont, myresume): Don't set the current thread to the
379 continue thread.
380 (process_serial_event) <Hg handling>: Also set thread_id if the
381 previous general thread is still alive.
382 (process_serial_event) <g/G handling>: If setting the current
383 thread to the general thread fails, error out.
384 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
385 thread's lwp instead of the current thread's.
386 * target.c (set_desired_thread): If the desired thread was not
387 found, leave the current thread pointing to NULL. Return an int
388 (boolean) indicating success.
389 * target.h (set_desired_thread): Change return type to int.
390
391 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
392
393 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
394 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
395 #includes.
396 (ps_get_thread_area): New function.
397
398 2015-08-19 Gary Benson <gbenson@redhat.com>
399
400 * hostio.c (handle_pread): Do not attempt to read more data
401 than hostio_reply_with_data can fit in a packet.
402
403 2015-08-18 Joel Brobecker <brobecker@adacore.com>
404
405 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
406
407 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
408
409 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
410
411 2015-08-06 Pedro Alves <palves@redhat.com>
412
413 * tracepoint.c (expr_eval_result): Now an int.
414
415 2015-08-06 Pedro Alves <palves@redhat.com>
416
417 * gdbthread.h (struct regcache): Forward declare.
418 (struct thread_info) <regcache_data>: Now a struct regcache
419 pointer.
420 * inferiors.c (inferior_regcache_data)
421 (set_inferior_regcache_data): Now work with struct regcache
422 pointers.
423 * inferiors.h (struct regcache): Forward declare.
424 (inferior_regcache_data, set_inferior_regcache_data): Now work
425 with struct regcache pointers.
426 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
427 (free_register_cache_thread): Remove struct regcache pointer
428 casts.
429
430 2015-08-06 Pedro Alves <palves@redhat.com>
431
432 * server.c (captured_main): On error, print the exception message
433 to stderr, and if run_once is set, throw a quit.
434
435 2015-08-06 Pedro Alves <palves@redhat.com>
436
437 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
438 the current thread.
439
440 2015-08-06 Pedro Alves <palves@redhat.com>
441
442 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
443 reading beyond the passed in buffer length.
444
445 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
446
447 * tracepoint.c (symbol_list) <required>: Remove.
448
449 2015-08-06 Pedro Alves <palves@redhat.com>
450
451 * linux-low.c (handle_extended_wait): Set the fork child's suspend
452 count if stopping and suspending threads.
453 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
454 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
455 (linux_detach): Complete an ongoing step-over.
456 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
457 throughout.
458 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
459 (linux_wait_1): If passing a signal to the inferior after
460 finishing a step-over, unsuspend and re-resume all lwps. If we
461 see a single-step event but the thread should be continuing, don't
462 pass the trap to gdb.
463 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
464 internal_error instead of gdb_assert.
465 (enqueue_pending_signal): New function.
466 (check_ptrace_stopped_lwp_gone): Add debug output.
467 (start_step_over): Use internal_error instead of gdb_assert.
468 (complete_ongoing_step_over): New function.
469 (linux_resume_one_thread): Don't resume a suspended thread.
470 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
471 it stepping.
472
473 2015-08-06 Pedro Alves <palves@redhat.com>
474
475 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
476 (linux_thread_alive): Use lwp_is_marked_dead.
477 (extended_event_reported): Delete.
478 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
479 instead of extended_event_reported.
480 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
481 as well.
482 (lwp_is_marked_dead): New function.
483 (lwp_running): Use lwp_is_marked_dead.
484 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
485 comment.
486
487 2015-08-06 Pedro Alves <palves@redhat.com>
488
489 * linux-low.c (linux_wait_1): Move fork event output out of the
490 !report_to_gdb check. Pass event_child->waitstatus to
491 target_waitstatus_to_string instead of ourstatus.
492
493 2015-08-04 Yao Qi <yao.qi@linaro.org>
494
495 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
496 if current_thread is 32 bit.
497
498 2015-08-04 Yao Qi <yao.qi@linaro.org>
499
500 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
501 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
502 * server.c (extended_protocol): Remove "static".
503 * server.h (extended_protocol): Declare it.
504
505 2015-08-04 Yao Qi <yao.qi@linaro.org>
506
507 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
508 both aarch64 and aarch32.
509 (aarch64_set_pc): Likewise.
510
511 2015-08-04 Yao Qi <yao.qi@linaro.org>
512
513 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
514 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
515 arm-with-neon.xml to srv_xmlfiles.
516 * linux-aarch64-low.c: Include linux-aarch32-low.h.
517 (is_64bit_tdesc): New function.
518 (aarch64_linux_read_description): New function.
519 (aarch64_arch_setup): Call aarch64_linux_read_description.
520 (regs_info): Rename to regs_info_aarch64.
521 (aarch64_regs_info): Return right regs_info.
522 (initialize_low_arch): Call initialize_low_arch_aarch32.
523
524 2015-08-04 Yao Qi <yao.qi@linaro.org>
525
526 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
527 * linux-aarch32-low.c: New file.
528 * linux-aarch32-low.h: New file.
529 * linux-arm-low.c (arm_fill_gregset): Move it to
530 linux-aarch32-low.c.
531 (arm_store_gregset): Likewise.
532 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
533 (arm_store_vfpregset): Call arm_store_vfpregset_num.
534 (arm_arch_setup): Check if PTRACE_GETREGSET works.
535 (regs_info): Rename to regs_info_arm.
536 (arm_regs_info): Return regs_info_aarch32 if
537 have_ptrace_getregset is 1 and target description is
538 arm_with_neon or arm_with_vfpv3.
539 (initialize_low_arch): Don't call init_registers_arm_with_neon.
540 Call initialize_low_arch_aarch32 instead.
541
542 2015-08-04 Yao Qi <yao.qi@linaro.org>
543
544 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
545 * linux-low.c: ... here.
546 * linux-low.h (have_ptrace_getregset): Declare it.
547
548 2015-08-04 Pedro Alves <palves@redhat.com>
549
550 * thread-db.c (struct thread_db): Use new typedefs.
551 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
552 CHK calls.
553 (disable_thread_event_reporting): Cast result of dlsym to
554 destination function pointer type.
555 (thread_db_mourn): Use td_ta_delete_ftype.
556
557 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
558
559 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
560 arch variant.
561 (CDX_BREAKPOINT): Define for R2.
562 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
563 (the_low_target): Add comments.
564
565 2015-07-30 Yao Qi <yao.qi@linaro.org>
566
567 * linux-arm-low.c (arm_hwcap): Remove it.
568 (arm_read_description): New local variable arm_hwcap. Don't
569 set arm_hwcap to zero.
570
571 2015-07-30 Yao Qi <yao.qi@linaro.org>
572
573 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
574 Use regcache->tdesc instead.
575 (arm_store_wmmxregset): Likewise.
576 (arm_fill_vfpregset): Likewise.
577 (arm_store_vfpregset): Likewise.
578
579 2015-07-30 Yao Qi <yao.qi@linaro.org>
580
581 * linux-arm-low.c: Include arch/arm.h.
582 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
583 (arm_store_gregset): Likewise.
584
585 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
586
587 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
588 ptrace's 4th parameter.
589
590 2015-07-27 Yao Qi <yao.qi@linaro.org>
591
592 * configure.srv (case aarch64*-*-linux*): Don't set
593 srv_linux_usrregs.
594
595 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
596
597 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
598 sys/ptrace.h.
599 * linux-arm-low.c: Likewise.
600 * linux-cris-low.c: Likewise.
601 * linux-crisv32-low.c: Likewise.
602 * linux-low.c: Likewise.
603 * linux-m68k-low.c: Likewise.
604 * linux-mips-low.c: Likewise.
605 * linux-nios2-low.c: Likewise.
606 * linux-s390-low.c: Likewise.
607 * linux-sparc-low.c: Likewise.
608 * linux-tic6x-low.c: Likewise.
609 * linux-tile-low.c: Likewise.
610 * linux-x86-low.c: Likewise.
611
612 2015-07-24 Pedro Alves <palves@redhat.com>
613
614 * config.in: Regenerate.
615 * configure: Regenerate.
616
617 2015-07-24 Pedro Alves <palves@redhat.com>
618
619 * acinclude.m4: Include ../ptrace.m4.
620 * configure.ac: Call GDB_AC_PTRACE.
621 * config.in, configure: Regenerate.
622
623 2015-07-24 Yao Qi <yao.qi@linaro.org>
624
625 * linux-low.c (linux_create_inferior): Remove setting to
626 proc->priv->new_inferior.
627 (linux_attach): Likewise.
628 (linux_low_filter_event): Likewise.
629 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
630
631 2015-07-24 Yao Qi <yao.qi@linaro.org>
632
633 * linux-low.c (linux_arch_setup): New function.
634 (linux_low_filter_event): If proc->tdesc is NULL and
635 proc->attached is true, call the_low_target.arch_setup.
636 Otherwise, keep status pending, and return.
637 (linux_resume_one_lwp_throw): Don't call get_pc if
638 thread->while_stepping isn't NULL. Don't call
639 get_thread_regcache if proc->tdesc is NULL.
640 (need_step_over_p): Return 0 if proc->tdesc is NULL.
641 (linux_target_ops): Install arch_setup.
642 * server.c (start_inferior): Call the_target->arch_setup.
643 * target.h (struct target_ops) <arch_setup>: New field.
644 (target_arch_setup): New marco.
645 * lynx-low.c (lynx_target_ops): Update.
646 * nto-low.c (nto_target_ops): Update.
647 * spu-low.c (spu_target_ops): Update.
648 * win32-low.c (win32_target_ops): Update.
649
650 2015-07-24 Yao Qi <yao.qi@linaro.org>
651
652 * linux-low.c (linux_add_process): Don't set
653 proc->priv->new_inferior.
654 (linux_create_inferior): Set proc->priv->new_inferior to 1.
655 (linux_attach): Likewise.
656
657 2015-07-24 Yao Qi <yao.qi@linaro.org>
658
659 * server.c (start_inferior): Code refactor.
660
661 2015-07-24 Yao Qi <yao.qi@linaro.org>
662
663 * server.c (process_serial_event): Set general_thread.
664
665 2015-07-21 Yao Qi <yao.qi@linaro.org>
666
667 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
668 aarch64_linux_get_debug_reg_capacity.
669
670 2015-07-17 Yao Qi <yao.qi@linaro.org>
671
672 * Makefile.in (aarch64-linux-hw-point.o): New rule.
673 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
674 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
675 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
676 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
677 (AARCH64_HWP_ALIGNMENT): Likewise.
678 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
679 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
680 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
681 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
682 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
683 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
684 (struct aarch64_debug_reg_state): Likewise.
685 (struct arch_lwp_info): Likewise.
686 (aarch64_align_watchpoint): Likewise.
687 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
688 (aarch64_watchpoint_length): Likewise.
689 (aarch64_point_encode_ctrl_reg): Likewise
690 (aarch64_point_is_aligned): Likewise.
691 (aarch64_align_watchpoint): Likewise.
692 (aarch64_linux_set_debug_regs):
693 (aarch64_dr_state_insert_one_point): Likewise.
694 (aarch64_dr_state_remove_one_point): Likewise.
695 (aarch64_handle_breakpoint): Likewise.
696 (aarch64_handle_aligned_watchpoint): Likewise.
697 (aarch64_handle_unaligned_watchpoint): Likewise.
698 (aarch64_handle_watchpoint): Likewise.
699
700 2015-07-17 Yao Qi <yao.qi@linaro.org>
701
702 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
703 and don't aarch64_get_debug_reg_state. All callers update.
704 (aarch64_handle_aligned_watchpoint): Likewise.
705 (aarch64_handle_unaligned_watchpoint): Likewise.
706 (aarch64_handle_watchpoint): Likewise.
707 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
708 (aarch64_remove_point): Likewise.
709
710 2015-07-17 Yao Qi <yao.qi@linaro.org>
711
712 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
713 debug_printf.
714 (aarch64_handle_unaligned_watchpoint): Likewise.
715
716 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
717
718 Revert the previous 3 commits:
719 Move gdb_regex* to common/
720 Move linux_find_memory_regions_full & co.
721 gdbserver build-id attribute generator
722
723 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
724 Jan Kratochvil <jan.kratochvil@redhat.com>
725
726 gdbserver build-id attribute generator.
727 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
728 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
729 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
730 (find_phdr): New.
731 (get_dynamic): Use find_pdhr to traverse program headers.
732 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
733 (compare_mapping_entry_range, struct find_memory_region_callback_data)
734 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
735 (get_hex_build_id): New.
736 (linux_qxfer_libraries_svr4): Add optional build-id attribute
737 to reply XML document.
738
739 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
740 Jan Kratochvil <jan.kratochvil@redhat.com>
741
742 * target.c: Include target/target-utils.h and fcntl.h.
743 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
744 (target_fileio_read_stralloc): New functions.
745
746 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
747
748 * Makefile.in (OBS): Add gdb_regex.o.
749 (gdb_regex.o): New.
750 * config.in: Rebuilt.
751 * configure: Rebuilt.
752
753 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
754 Jan Kratochvil <jan.kratochvil@redhat.com>
755
756 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
757 * Makefile.in (OBS): Add target-utils.o.
758 (linux-maps.o, target-utils.o): New.
759 * configure.srv (srv_linux_obj): Add linux-maps.o.
760
761 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
762
763 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
764 function, return 1.
765 (the_low_target): Install it.
766
767 2015-07-14 Pedro Alves <palves@redhat.com>
768
769 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
770 Instead, ignore ECHILD, and throw an error for other errnos.
771
772 2015-07-10 Pedro Alves <palves@redhat.com>
773
774 * event-loop.c (struct callback_event) <data>: Change type to
775 gdb_client_data instance instead of gdb_client_data pointer.
776 (append_callback_event): Adjust.
777
778 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
779
780 * linux-aarch64-low.c: Add comments for each linux_target_ops
781 method. Remove comments already covered in target_ops and
782 linux_target_ops definitions.
783 (the_low_target): Add comments for each unimplemented method.
784
785 2015-07-09 Yao Qi <yao.qi@linaro.org>
786
787 * linux-aarch64-low.c (aarch64_regmap): Remove.
788 (aarch64_usrregs_info): Remove.
789 (regs_info): Set field usrregs to NULL.
790
791 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
792
793 * linux-low.c: Include "rsp-low.h"
794 (linux_low_encode_pt_config, linux_low_encode_raw): New.
795 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
796 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
797 (handle_btrace_enable_pt): New.
798 (handle_btrace_general_set): Support "pt".
799 (handle_btrace_conf_general_set): Support "pt:size".
800
801 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
802
803 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
804 Z_PACKET_SW_BP.
805
806 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
807
808 * linux-aarch64-low.c: Remove comment about endianness.
809 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
810 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
811 memcmp.
812
813 2015-06-24 Gary Benson <gbenson@redhat.com>
814
815 * linux-i386-ipa.c (stdint.h): Do not include.
816 * lynx-i386-low.c (stdint.h): Likewise.
817 * lynx-ppc-low.c (stdint.h): Likewise.
818 * mem-break.c (stdint.h): Likewise.
819 * thread-db.c (stdint.h): Likewise.
820 * tracepoint.c (stdint.h): Likewise.
821 * win32-low.c (stdint.h): Likewise.
822
823 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
824
825 * server.c (write_qxfer_response): Update call to
826 remote_escape_output.
827
828 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
829 Jan Kratochvil <jan.kratochvil@redhat.com>
830
831 Merge multiple hex conversions.
832 * gdbreplay.c (tohex): Rename to 'fromhex'.
833 (logchar): Use fromhex.
834
835 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
836
837 * server.c (handle_qxfer_libraries): Set `version' attribute for
838 <library-list>.
839
840 2015-06-10 Gary Benson <gbenson@redhat.com>
841
842 * target.h (struct target_ops) <multifs_open>: New field.
843 <multifs_unlink>: Likewise.
844 <multifs_readlink>: Likewise.
845 * linux-low.c (nat/linux-namespaces.h): New include.
846 (linux_target_ops): Initialize the_target->multifs_open,
847 the_target->multifs_unlink and the_target->multifs_readlink.
848 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
849 * hostio.c (hostio_fs_pid): New static variable.
850 (hostio_handle_new_gdb_connection): New function.
851 (handle_setfs): Likewise.
852 (handle_open): Use the_target->multifs_open as appropriate.
853 (handle_unlink): Use the_target->multifs_unlink as appropriate.
854 (handle_readlink): Use the_target->multifs_readlink as
855 appropriate.
856 (handle_vFile): Handle vFile:setfs packets.
857 * server.c (handle_query): Call hostio_handle_new_gdb_connection
858 after target_handle_new_gdb_connection.
859
860 2015-06-10 Gary Benson <gbenson@redhat.com>
861
862 * configure.ac (AC_CHECK_FUNCS): Add setns.
863 * config.in: Regenerate.
864 * configure: Likewise.
865 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
866 (linux-namespaces.o): New rule.
867 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
868
869 2015-06-09 Gary Benson <gbenson@redhat.com>
870
871 * hostio.c (handle_open): Process mode argument with
872 fileio_to_host_mode.
873
874 2015-06-01 Yao Qi <yao.qi@linaro.org>
875
876 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
877 * linux-x86-low.c: Likewise.
878
879 2015-05-28 Don Breazeal <donb@codesourcery.com>
880
881 * linux-low.c (handle_extended_wait): Initialize
882 thread_info.last_resume_kind for new fork children.
883
884 2015-05-15 Pedro Alves <palves@redhat.com>
885
886 * target.h (target_handle_new_gdb_connection): Rewrite using if
887 wrapped in do/while.
888
889 2015-05-14 Joel Brobecker <brobecker@adacore.com>
890
891 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
892 * configure, config.in: Regenerate.
893 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
894 Declare typedef.
895
896 2015-05-12 Don Breazeal <donb@codesourcery.com>
897
898 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
899 PTRACE_EVENT_VFORK_DONE.
900 (linux_low_ptrace_options, extended_event_reported): Add vfork
901 events.
902 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
903 and "vforkdone" for RSP 'T' Stop Reply Packet.
904 * server.h (report_vfork_events): Declare
905 global variable.
906
907 2015-05-12 Don Breazeal <donb@codesourcery.com>
908
909 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
910 (the_low_target) <new_fork>: Initialize new member.
911 * linux-arm-low.c (arm_new_fork): New function.
912 (the_low_target) <new_fork>: Initialize new member.
913 * linux-low.c (handle_extended_wait): Call new target function
914 new_fork.
915 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
916 * linux-mips-low.c (mips_add_watchpoint): New function
917 extracted from mips_insert_point.
918 (the_low_target) <new_fork>: Initialize new member.
919 (mips_linux_new_fork): New function.
920 (mips_insert_point): Call mips_add_watchpoint.
921 * linux-x86-low.c (x86_linux_new_fork): New function.
922 (the_low_target) <new_fork>: Initialize new member.
923
924 2015-05-12 Don Breazeal <donb@codesourcery.com>
925
926 * linux-low.c (handle_extended_wait): Implement return value,
927 rename argument 'event_child' to 'event_lwp', handle
928 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
929 (linux_low_ptrace_options): New function.
930 (linux_low_filter_event): Call linux_low_ptrace_options,
931 use different argument fo linux_enable_event_reporting,
932 use return value from handle_extended_wait.
933 (extended_event_reported): New function.
934 (linux_wait_1): Call extended_event_reported and set
935 status to report fork events.
936 (linux_write_memory): Add pid to debug message.
937 (reset_lwp_ptrace_options_callback): New function.
938 (linux_handle_new_gdb_connection): New function.
939 (linux_target_ops): Initialize new structure member.
940 * linux-low.h (struct lwp_info) <waitstatus>: New member.
941 * lynx-low.c: Initialize new structure member.
942 * remote-utils.c (prepare_resume_reply): Implement stop reason
943 "fork" for "T" stop message.
944 * server.c (handle_query): Call handle_new_gdb_connection.
945 * server.h (report_fork_events): Declare global flag.
946 * target.h (struct target_ops) <handle_new_gdb_connection>:
947 New member.
948 (target_handle_new_gdb_connection): New macro.
949 * win32-low.c: Initialize new structure member.
950
951 2015-05-12 Don Breazeal <donb@codesourcery.com>
952
953 * mem-break.c (APPEND_TO_LIST): Define macro.
954 (clone_agent_expr): New function.
955 (clone_one_breakpoint): New function.
956 (clone_all_breakpoints): New function.
957 * mem-break.h: Declare new functions.
958
959 2015-05-12 Don Breazeal <donb@codesourcery.com>
960
961 * linux-low.c (linux_supports_fork_events): New function.
962 (linux_supports_vfork_events): New function.
963 (linux_target_ops): Initialize new structure members.
964 (initialize_low): Call linux_check_ptrace_features.
965 * lynx-low.c (lynx_target_ops): Initialize new structure
966 members.
967 * server.c (report_fork_events, report_vfork_events):
968 New global flags.
969 (handle_query): Add new features to qSupported packet and
970 response.
971 (captured_main): Initialize new global variables.
972 * target.h (struct target_ops) <supports_fork_events>:
973 New member.
974 <supports_vfork_events>: New member.
975 (target_supports_fork_events): New macro.
976 (target_supports_vfork_events): New macro.
977 * win32-low.c (win32_target_ops): Initialize new structure
978 members.
979
980 2015-05-12 Gary Benson <gbenson@redhat.com>
981
982 * server.c (handle_qxfer_exec_file): Use current process
983 if annex is empty.
984
985 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
986
987 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
988 Remove HAVE_PTRACE_GETREGS conditionals.
989 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
990 instead of PTRACE_GETREGS and PTRACE_SETREGS.
991
992 2015-05-08 Yao Qi <yao.qi@linaro.org>
993
994 * linux-low.c (linux_supports_conditional_breakpoints): New
995 function.
996 (linux_target_ops): Install new target method.
997 * lynx-low.c (lynx_target_ops): Install NULL hook for
998 supports_conditional_breakpoints.
999 * nto-low.c (nto_target_ops): Likewise.
1000 * spu-low.c (spu_target_ops): Likewise.
1001 * win32-low.c (win32_target_ops): Likewise.
1002 * server.c (handle_query): Check
1003 target_supports_conditional_breakpoints.
1004 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1005 New field.
1006 (target_supports_conditional_breakpoints): New macro.
1007
1008 2015-05-06 Pedro Alves <palves@redhat.com>
1009
1010 PR server/18081
1011 * server.c (start_inferior): If the process exits, mourn it.
1012
1013 2015-04-21 Gary Benson <gbenson@redhat.com>
1014
1015 * hostio.c (fileio_open_flags_to_host): Factored out to
1016 fileio_to_host_openflags in common/fileio.c. Single use
1017 updated.
1018
1019 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1020
1021 * linux-xtensa-low.c (xtensa_fill_gregset)
1022 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1023 XCHAL_HAVE_LOOP.
1024
1025 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1026
1027 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1028 (regs_info): Replace usrregs pointer with NULL.
1029
1030 2015-04-17 Gary Benson <gbenson@redhat.com>
1031
1032 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1033 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1034 * server.c (handle_qxfer_exec_file): New function.
1035 (qxfer_packets): Add exec-file entry.
1036 (handle_query): Report qXfer:exec-file:read as supported packet.
1037
1038 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1039
1040 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1041
1042 2015-04-09 Gary Benson <gbenson@redhat.com>
1043
1044 * hostio-errno.c (errno_to_fileio_error): Remove function.
1045 Update caller to use remote_fileio_to_fio_error.
1046
1047 2015-04-09 Yao Qi <yao.qi@linaro.org>
1048
1049 * linux-low.c (linux_insert_point): Call
1050 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1051 (linux_remove_point): Call remove_memory_breakpoint if type is
1052 raw_bkpt_type_sw.
1053 * linux-x86-low.c (x86_insert_point): Don't call
1054 insert_memory_breakpoint.
1055 (x86_remove_point): Don't call remove_memory_breakpoint.
1056
1057 2015-04-01 Pedro Alves <palves@redhat.com>
1058 Cleber Rosa <crosa@redhat.com>
1059
1060 * server.c (gdbserver_usage): Reorganize and extend the usage
1061 message.
1062
1063 2015-03-24 Pedro Alves <palves@redhat.com>
1064
1065 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1066 output. Also dump TRAP_TRACE.
1067 (linux_low_filter_event): In debug output, distinguish a
1068 resume_stop SIGSTOP from a delayed SIGSTOP.
1069
1070 2015-03-24 Gary Benson <gbenson@redhat.com>
1071
1072 * linux-x86-low.c (x86_linux_new_thread): Moved to
1073 nat/x86-linux.c.
1074 (x86_linux_prepare_to_resume): Likewise.
1075
1076 2015-03-24 Gary Benson <gbenson@redhat.com>
1077
1078 * Makefile.in (x86-linux-dregs.o): New rule.
1079 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1080 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1081 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1082 (x86_linux_dr_get): Likewise.
1083 (x86_linux_dr_set): Likewise.
1084 (update_debug_registers_callback): Likewise.
1085 (x86_linux_dr_set_addr): Likewise.
1086 (x86_linux_dr_get_addr): Likewise.
1087 (x86_linux_dr_set_control): Likewise.
1088 (x86_linux_dr_get_control): Likewise.
1089 (x86_linux_dr_get_status): Likewise.
1090 (x86_linux_update_debug_registers): Likewise.
1091
1092 2015-03-24 Gary Benson <gbenson@redhat.com>
1093
1094 * linux-x86-low.c (x86_linux_update_debug_registers):
1095 New function, factored out from...
1096 (x86_linux_prepare_to_resume): ...this.
1097
1098 2015-03-24 Gary Benson <gbenson@redhat.com>
1099
1100 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1101 (x86_linux_dr_set): Likewise.
1102 (update_debug_registers_callback): Likewise.
1103 (x86_linux_dr_set_addr): Likewise.
1104 (x86_linux_dr_get_addr): Likewise.
1105 (x86_linux_dr_set_control): Likewise.
1106 (x86_linux_dr_get_control): Likewise.
1107 (x86_linux_dr_get_status): Likewise.
1108 (x86_linux_prepare_to_resume): Likewise.
1109
1110 2015-03-24 Gary Benson <gbenson@redhat.com>
1111
1112 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1113 Use perror_with_name. Pass string through gettext.
1114 (x86_linux_dr_set): Likewise.
1115
1116 2015-03-24 Gary Benson <gbenson@redhat.com>
1117
1118 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1119 (x86_linux_dr_set_addr): ...this.
1120 (x86_dr_low_get_addr): Rename to...
1121 (x86_linux_dr_get_addr): ...this.
1122 (x86_dr_low_set_control): Rename to...
1123 (x86_linux_dr_set_control): ...this.
1124 (x86_dr_low_get_control): Rename to...
1125 (x86_linux_dr_get_control): ...this.
1126 (x86_dr_low_get_status): Rename to...
1127 (x86_linux_dr_get_status): ...this.
1128 (x86_dr_low): Update with new function names.
1129
1130 2015-03-24 Gary Benson <gbenson@redhat.com>
1131
1132 * Makefile.in (x86-linux.o): New rule.
1133 * configure.srv: Add x86-linux.o to relevant targets.
1134 * linux-low.c (lwp_set_arch_private_info): New function.
1135 (lwp_arch_private_info): Likewise.
1136 * linux-x86-low.c: Include nat/x86-linux.h.
1137 (arch_lwp_info): Removed structure.
1138 (update_debug_registers_callback):
1139 Use lwp_set_debug_registers_changed.
1140 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1141 and lwp_set_debug_registers_changed.
1142 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1143
1144 2015-03-24 Gary Benson <gbenson@redhat.com>
1145
1146 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1147 * linux-arm-low.c (arm_new_thread): Likewise.
1148 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1149 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1150 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1151 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1152
1153 2015-03-24 Gary Benson <gbenson@redhat.com>
1154
1155 * linux-low.c (ptid_of_lwp): New function.
1156 (lwp_is_stopped): Likewise.
1157 (lwp_stop_reason): Likewise.
1158 * linux-x86-low.c (update_debug_registers_callback):
1159 Use lwp_is_stopped.
1160 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1161 lwp_stop_reason.
1162
1163 2015-03-24 Gary Benson <gbenson@redhat.com>
1164
1165 * linux-low.h (linux_stop_lwp): Remove declaration.
1166
1167 2015-03-24 Gary Benson <gbenson@redhat.com>
1168
1169 * linux-low.h: Include nat/linux-nat.h.
1170 * linux-low.c (iterate_over_lwps_args): New structure.
1171 (iterate_over_lwps_filter): New function.
1172 (iterate_over_lwps): Likewise.
1173 * linux-x86-low.c (update_debug_registers_callback):
1174 Update signature to what iterate_over_lwps expects.
1175 Remove PID check that iterate_over_lwps now performs.
1176 (x86_dr_low_set_addr): Use iterate_over_lwps.
1177 (x86_dr_low_set_control): Likewise.
1178
1179 2015-03-24 Gary Benson <gbenson@redhat.com>
1180
1181 * linux-x86-low.c (x86_debug_reg_state): New function.
1182 (x86_linux_prepare_to_resume): Use the above.
1183
1184 2015-03-24 Gary Benson <gbenson@redhat.com>
1185
1186 * linux-low.c (current_lwp_ptid): New function.
1187 * linux-x86-low.c: Include nat/linux-nat.h.
1188 (x86_dr_low_get_addr): Use current_lwp_ptid.
1189 (x86_dr_low_get_control): Likewise.
1190 (x86_dr_low_get_status): Likewise.
1191
1192 2015-03-20 Pedro Alves <palves@redhat.com>
1193
1194 * tracepoint.c (cmd_qtstatus): Make "str" const.
1195
1196 2015-03-20 Pedro Alves <palves@redhat.com>
1197
1198 * server.c (handle_general_set): Make "req_str" const.
1199
1200 2015-03-19 Pedro Alves <palves@redhat.com>
1201
1202 * linux-low.c (linux_resume_one_lwp): Rename to ...
1203 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1204 instead call perror_with_name.
1205 (check_ptrace_stopped_lwp_gone): New function.
1206 (linux_resume_one_lwp): Reimplement as wrapper around
1207 linux_resume_one_lwp_throw that swallows errors if the LWP is
1208 gone.
1209
1210 2015-03-19 Pedro Alves <palves@redhat.com>
1211
1212 * linux-low.c (count_events_callback, select_event_lwp_callback):
1213 No longer check whether the thread has resume_stop as last resume
1214 kind.
1215
1216 2015-03-19 Pedro Alves <palves@redhat.com>
1217
1218 * linux-low.c (count_events_callback, select_event_lwp_callback):
1219 Use the lwp's status_pending_p field, not the thread's.
1220
1221 2015-03-19 Pedro Alves <palves@redhat.com>
1222
1223 * linux-low.c (select_event_lwp_callback): Update comments to
1224 no longer mention SIGTRAP.
1225
1226 2015-03-18 Gary Benson <gbenson@redhat.com>
1227
1228 * server.c (handle_query): Do not report vFile:fstat as supported.
1229
1230 2015-03-11 Gary Benson <gbenson@redhat.com>
1231
1232 * hostio.c (sys/types.h): New include.
1233 (sys/stat.h): Likewise.
1234 (common-remote-fileio.h): Likewise.
1235 (handle_fstat): New function.
1236 (handle_vFile): Handle vFile:fstat packets.
1237
1238 2015-03-11 Gary Benson <gbenson@redhat.com>
1239
1240 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1241 struct stat.st_blocks and struct stat.st_blksize.
1242 * configure: Regenerate.
1243 * config.in: Likewise.
1244 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1245 (OBS): Add common-remote-fileio.o.
1246 (common-remote-fileio.o): New rule.
1247
1248 2015-03-09 Pedro Alves <palves@redhat.com>
1249
1250 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1251 'struct sockaddr' pointer in 'accept' call.
1252
1253 2015-03-09 Pedro Alves <palves@redhat.com>
1254
1255 Revert:
1256 2015-03-07 Pedro Alves <palves@redhat.com>
1257 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1258 or <winsock2.h> here. Instead include "gdb_socket.h".
1259 (remote_open): Use union gdb_sockaddr_u.
1260 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1261 or <winsock2.h> here. Instead include "gdb_socket.h".
1262 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1263 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1264 or <sys/un.h>.
1265 (init_named_socket, gdb_agent_helper_thread): Use union
1266 gdb_sockaddr_u.
1267
1268 2015-03-07 Pedro Alves <palves@redhat.com>
1269
1270 * configure.ac (build_warnings): Move
1271 -Wdeclaration-after-statement to the C-specific set.
1272 * configure: Regenerate.
1273
1274 2015-03-07 Pedro Alves <palves@redhat.com>
1275
1276 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1277 or <winsock2.h> here. Instead include "gdb_socket.h".
1278 (remote_open): Use union gdb_sockaddr_u.
1279 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1280 or <winsock2.h> here. Instead include "gdb_socket.h".
1281 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1282 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1283 or <sys/un.h>.
1284 (init_named_socket, gdb_agent_helper_thread): Use union
1285 gdb_sockaddr_u.
1286
1287 2015-03-07 Pedro Alves <palves@redhat.com>
1288
1289 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1290 instead.
1291
1292 2015-03-06 Yao Qi <yao.qi@linaro.org>
1293
1294 * linux-aarch64-low.c (aarch64_insert_point): Use
1295 show_debug_regs as a boolean.
1296 (aarch64_remove_point): Likewise.
1297
1298 2015-03-05 Pedro Alves <palves@redhat.com>
1299
1300 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1301 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1302 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1303 * nto-low.c (nto_target_ops): Likewise.
1304 * spu-low.c (spu_target_ops): Likewise.
1305 * win32-low.c (win32_target_ops): Likewise.
1306
1307 2015-03-04 Pedro Alves <palves@redhat.com>
1308
1309 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1310 Decide whether a breakpoint triggered based on the SIGTRAP's
1311 siginfo.si_code.
1312 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1313 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1314 (linux_low_filter_event): Check for breakpoints before checking
1315 watchpoints.
1316 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1317 siginfo.si_code.
1318 (linux_stopped_by_sw_breakpoint)
1319 (linux_supports_stopped_by_sw_breakpoint)
1320 (linux_stopped_by_hw_breakpoint)
1321 (linux_supports_stopped_by_hw_breakpoint): New functions.
1322 (linux_target_ops): Install new target methods.
1323
1324 2015-03-04 Pedro Alves <palves@redhat.com>
1325
1326 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1327 * server.c (swbreak_feature, hwbreak_feature): New globals.
1328 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1329 (captured_main): Clear swbreak_feature and hwbreak_feature.
1330 * server.h (swbreak_feature, hwbreak_feature): Declare.
1331 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1332 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1333 supports_stopped_by_hw_breakpoint>: New fields.
1334 (target_supports_stopped_by_sw_breakpoint)
1335 (target_stopped_by_sw_breakpoint)
1336 (target_supports_stopped_by_hw_breakpoint)
1337 (target_stopped_by_hw_breakpoint): Declare.
1338
1339 2015-03-04 Pedro Alves <palves@redhat.com>
1340
1341 enum lwp_stop_reason -> enum target_stop_reason
1342 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1343 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1344 (linux_wait_1, stuck_in_jump_pad_callback)
1345 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1346 (linux_stopped_by_watchpoint):
1347 * linux-low.h (enum lwp_stop_reason): Delete.
1348 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1349 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1350
1351 2015-03-04 Yao Qi <yao.qi@linaro.org>
1352
1353 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1354
1355 2015-03-03 Gary Benson <gbenson@redhat.com>
1356
1357 * hostio.c (handle_vFile): Fix prefix lengths.
1358
1359 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1360
1361 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1362 ptr_bits.
1363
1364 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1365
1366 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1367 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1368 (clean): Add "rm -f" for above C files.
1369 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1370 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1371 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1372 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1373 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1374 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1375 (init_registers_s390x_vx_linux64)
1376 (init_registers_s390x_tevx_linux64)
1377 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1378 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1379 declarations.
1380 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1381 (s390_store_vxrs_high): New functions.
1382 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1383 NT_S390_VXRS_HIGH.
1384 (s390_arch_setup): Add logic for selecting one of the new target
1385 descriptions. Activate the new vector regsets if applicable.
1386 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1387 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1388 and init_registers_s390x_tevx_linux64.
1389
1390 2015-03-01 Pedro Alves <palves@redhat.com>
1391
1392 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1393 parameter.
1394
1395 2015-02-27 Pedro Alves <palves@redhat.com>
1396
1397 * linux-x86-low.c (u_debugreg_offset): New function.
1398 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1399
1400 2015-02-27 Pedro Alves <palves@redhat.com>
1401
1402 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1403 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1404 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1405 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1406 (ps_lsetfpregs, ps_getpid)
1407 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1408 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1409 (ps_lsetxregs, ps_plog): Declare.
1410
1411 2015-02-27 Pedro Alves <palves@redhat.com>
1412
1413 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1414 IP_AGENT_EXPORT_FUNC.
1415 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1416 IP_AGENT_EXPORT_FUNC.
1417 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1418 (IP_AGENT_EXPORT): Delete.
1419 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1420 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1421 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1422 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1423 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1424 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1425 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1426 (traceframe_read_count, traceframe_write_count)
1427 (traceframes_created, trace_state_variables, get_raw_reg)
1428 (get_trace_state_variable_value, set_trace_state_variable_value)
1429 (ust_loaded, helper_thread_id, cmd_buf): Use
1430 IPA_SYM_EXPORTED_NAME.
1431 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1432 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1433 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1434 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1435 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1436 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1437 EXTERN_C_PUSH/EXTERN_C_POP.
1438 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1439 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1440 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1441 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1442 (traceframe_write_count, traceframe_read_count)
1443 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1444 (about_to_request_buffer_space, get_trace_state_variable_value)
1445 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1446 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1447 EXTERN_C_PUSH/EXTERN_C_POP.
1448 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1449 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1450 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1451 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1452 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1453 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1454 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1455 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1456 Define.
1457 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1458 (IP_AGENT_EXPORT_VAR_DECL): Define.
1459 (tracing): Declare.
1460 (gdb_agent_get_raw_reg): Declare.
1461
1462 2015-02-27 Tom Tromey <tromey@redhat.com>
1463 Pedro Alves <palves@redhat.com>
1464
1465 Rename symbols whose names are reserved C++ keywords throughout.
1466
1467 2015-02-27 Pedro Alves <palves@redhat.com>
1468
1469 * Makefile.in (COMPILER): New, get it from autoconf.
1470 (CXX): Get from autoconf instead.
1471 (COMPILE.pre): Use COMPILER.
1472 (CC-LD): Rename to ...
1473 (CC_LD): ... this. Use COMPILER.
1474 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1475 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1476 * acinclude.m4: Include build-with-cxx.m4.
1477 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1478 Disable -Werror by default if building in C++ mode.
1479 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1480 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1481 the C++ compiler. Save/restore CXXFLAGS too.
1482 * configure: Regenerate.
1483
1484 2015-02-27 Pedro Alves <palves@redhat.com>
1485
1486 * acinclude.m4: Include libiberty.m4.
1487 * configure.ac: Call libiberty_INIT.
1488 * config.in, configure: Regenerate.
1489
1490 2015-02-26 Pedro Alves <palves@redhat.com>
1491
1492 * linux-low.c (linux_wait_1): When incrementing the PC past a
1493 program breakpoint always use the_low_target.breakpoint_len as
1494 increment, rather than the maximum between that and
1495 the_low_target.decr_pc_after_break.
1496
1497 2015-02-23 Pedro Alves <palves@redhat.com>
1498
1499 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1500 thread was doing a step-over; always adjust the PC if
1501 we stepped over a permanent breakpoint.
1502 (linux_wait_1): If we stepped over breakpoint that was on top of a
1503 permanent breakpoint, manually advance the PC past it.
1504
1505 2015-02-23 Pedro Alves <palves@redhat.com>
1506
1507 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1508 modes.
1509 (x86_fill_gregset, x86_store_gregset): Use it when handling
1510 $orig_eax.
1511
1512 2015-02-20 Pedro Alves <palves@redhat.com>
1513
1514 * thread-db.c: Include "nat/linux-procfs.h".
1515 (thread_db_init): Skip listing new threads if the kernel supports
1516 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1517
1518 2015-02-20 Pedro Alves <palves@redhat.com>
1519
1520 * linux-low.c (status_pending_p_callback): Use ptid_match.
1521
1522 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1523
1524 PR breakpoints/16812
1525 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1526 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1527 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1528
1529 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1530
1531 PR breakpoints/15956
1532 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1533
1534 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1535
1536 * linux-low.c (linux_low_btrace_conf): Print size.
1537 * server.c (handle_btrace_conf_general_set): New.
1538 (hanle_general_set): Call handle_btrace_conf_general_set.
1539 (handle_query): Report Qbtrace-conf:bts:size as supported.
1540
1541 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1542
1543 * linux-low.c (linux_low_enable_btrace): Update parameters.
1544 (linux_low_btrace_conf): New.
1545 (linux_target_ops)<to_btrace_conf>: Initialize.
1546 * server.c (current_btrace_conf): New.
1547 (handle_btrace_enable): Rename to ...
1548 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1549 to target_enable_btrace. Update comment. Update users.
1550 (handle_qxfer_btrace_conf): New.
1551 (qxfer_packets): Add btrace-conf entry.
1552 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1553 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1554 (target_ops)<read_btrace_conf>: New.
1555 (target_enable_btrace): Update parameters.
1556 (target_read_btrace_conf): New.
1557
1558 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1559
1560 * server.c (handle_btrace_general_set): Remove call to
1561 target_supports_btrace.
1562 (supported_btrace_packets): New.
1563 (handle_query): Call supported_btrace_packets.
1564 * target.h: include btrace-common.h.
1565 (btrace_target_info): Removed.
1566 (supports_btrace, target_supports_btrace): Update parameters.
1567
1568 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1569
1570 * Makefile.in (SFILES): Add common/btrace-common.c.
1571 (OBS): Add common/btrace-common.o.
1572 (btrace-common.o): Add build rules.
1573 * linux-low: Include btrace-common.h.
1574 (linux_low_read_btrace): Use struct btrace_data. Call
1575 btrace_data_init and btrace_data_fini.
1576
1577 2015-02-06 Pedro Alves <palves@redhat.com>
1578
1579 * thread-db.c (find_new_threads_callback): Add debug output.
1580
1581 2015-02-04 Pedro Alves <palves@redhat.com>
1582
1583 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1584 (resume_stopped_resumed_lwps): New function.
1585 (linux_wait_for_event_filtered): Use it.
1586
1587 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1588
1589 * Makefile.in (SFILES): Add linux-personality.c.
1590 (linux-personality.o): New rule.
1591 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1592 list of objects to be built.
1593 * linux-low.c: Include nat/linux-personality.h.
1594 (linux_create_inferior): Remove code to disable address space
1595 randomization (moved to ../nat/linux-personality.c). Create
1596 cleanup to disable address space randomization.
1597
1598 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1599
1600 * Makefile.in (posix-strerror.o): New rule.
1601 (mingw-strerror.o): Likewise.
1602 * configure: Regenerated.
1603 * configure.ac: Source file ../common/common.host. Initialize new
1604 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1605
1606 2015-01-14 Yao Qi <yao@codesourcery.com>
1607
1608 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1609 (ppc-linux.o): New rule.
1610 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1611 * configure.ac: AC_CHECK_FUNCS(getauxval).
1612 * config.in: Re-generated.
1613 * configure: Re-generated.
1614 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1615 ppc64_64bit_inferior_p
1616
1617 2015-01-14 Yao Qi <yao@codesourcery.com>
1618
1619 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1620 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1621 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1622 (PT_ORIG_R3, PT_TRAP): Likewise.
1623 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1624 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1625 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1626
1627 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1628
1629 * i387-fp.c (i387_cache_to_xsave): In look over
1630 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1631 zmmh_low_space field by use of zmmh_high_space.
1632
1633 2015-01-09 Pedro Alves <palves@redhat.com>
1634
1635 * linux-low.c (step_over_bkpt): Move higher up in the file.
1636 (handle_extended_wait): Don't store the stop_pc here.
1637 (get_stop_pc): Adjust comments and rename to ...
1638 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1639 stopped for a software breakpoint or hardware breakpoint.
1640 (thread_still_has_status_pending_p): New function.
1641 (status_pending_p_callback): Use
1642 thread_still_has_status_pending_p. If the event is no longer
1643 interesting, resume the LWP.
1644 (handle_tracepoints): Add assert.
1645 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1646 (wstatus_maybe_breakpoint): New function.
1647 (cancel_breakpoint): Delete function.
1648 (check_stopped_by_watchpoint): New function, factored out from
1649 linux_low_filter_event.
1650 (lp_status_maybe_breakpoint): Delete function.
1651 (linux_low_filter_event): Remove filter_ptid argument.
1652 Leave thread group exits pending here. Store the LWP's stop PC.
1653 Always leave events pending.
1654 (linux_wait_for_event_filtered): Pull all events out of the
1655 kernel, and leave them all pending.
1656 (count_events_callback, select_event_lwp_callback): Consider all
1657 events.
1658 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1659 (select_event_lwp): Only give preference to the stepping LWP in
1660 all-stop mode. Adjust comments.
1661 (ignore_event): New function.
1662 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1663 references to cancel_breakpoints. Adjust to renames. Also give
1664 equal priority to all LWPs that have had events in non-stop mode.
1665 If reporting a software breakpoint event, unadjust the LWP's PC.
1666 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1667 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1668 Adjust.
1669 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1670 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1671 (linux_stopped_by_watchpoint): Adjust.
1672 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1673 * linux-low.h (enum lwp_stop_reason): New.
1674 (struct lwp_info) <stop_pc>: Adjust comment.
1675 <stopped_by_watchpoint>: Delete field.
1676 <stop_reason>: New field.
1677 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1678 * mem-break.c (software_breakpoint_inserted_here)
1679 (hardware_breakpoint_inserted_here): New function.
1680 * mem-break.h (software_breakpoint_inserted_here)
1681 (hardware_breakpoint_inserted_here): Declare.
1682 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1683 (cancel_breakpoints): Delete.
1684 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1685 (upload_fast_traceframes): Remove references to
1686 cancel_breakpoints.
1687
1688 2015-01-09 Pedro Alves <palves@redhat.com>
1689
1690 * thread-db.c (find_new_threads_callback): Ignore thread if the
1691 kernel thread ID is -1.
1692
1693 2015-01-09 Pedro Alves <palves@redhat.com>
1694
1695 * linux-low.c (linux_attach_fail_reason_string): Move to
1696 nat/linux-ptrace.c, and rename.
1697 (linux_attach_lwp): Update comment.
1698 (attach_proc_task_lwp_callback): New function.
1699 (linux_attach): Adjust to rename and use
1700 linux_proc_attach_tgid_threads.
1701 (linux_attach_fail_reason_string): Delete declaration.
1702
1703 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1704
1705 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1706 * server.c (gdbserver_version): Likewise.
1707
1708 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1709
1710 * remote-utils.c: Include ctype.h.
1711 (input_interrupt): Explicitly handle the case when the char
1712 received is the NUL byte. Improve the printing of non-ASCII
1713 characters.
1714
1715 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1716
1717 * linux-low.c (linux_low_filter_event): Update call to
1718 linux_enable_event_reporting following the addition of
1719 a new parameter to that function.
1720
1721 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1722
1723 PR server/17457
1724 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1725 (AARCH64_FPCR_REGNO): Likewise.
1726 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1727 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1728 (aarch64_store_fpregset): Likewise.
1729
1730 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1731
1732 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1733 Remove FIXME comment about assumption about N.
1734
1735 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1736
1737 * configure.ac: If large-file support is disabled in GDBserver,
1738 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1739 * configure: Regenerate.
1740
1741 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1742
1743 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1744 warning upon ENODATA from ptrace.
1745 * linux-s390-low.c (s390_store_tdb): New.
1746 (s390_regsets): Add regset for NT_S390_TDB.
1747
1748 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1749
1750 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1751 without a fill_function.
1752 * linux-s390-low.c (s390_fill_last_break): Remove.
1753 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1754 (s390_arch_setup): Use regset's size instead of fill_function for
1755 loop end condition.
1756
1757 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1758
1759 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1760 the regset's store function when ptrace returned an error.
1761 * regcache.c (get_thread_regcache): Invalidate register cache
1762 before fetching inferior's registers.
1763
1764 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1765
1766 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1767 while-loop as for-loop.
1768 (regsets_store_inferior_registers): Likewise.
1769
1770 2014-11-28 Yao Qi <yao@codesourcery.com>
1771
1772 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1773 * config.in, configure: Re-generate.
1774 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1775 is defined.
1776
1777 2014-11-21 Yao Qi <yao@codesourcery.com>
1778
1779 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1780 (AC_CHECK_HEADERS): Remove malloc.h.
1781 * configure: Re-generated.
1782 * config.in: Re-generated.
1783 * server.h: Don't include alloca.h and malloc.h.
1784 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1785 Don't include malloc.h.
1786
1787 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1788
1789 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1790 corresponding ERRNO check in same block.
1791
1792 2014-11-12 Pedro Alves <palves@redhat.com>
1793
1794 * server.c (cont_thread): Update comment.
1795 (start_inferior, attach_inferior): No longer clear cont_thread.
1796 (handle_v_cont): No longer set cont_thread.
1797 (captured_main): Clear cont_thread each time a GDB connects.
1798
1799 2014-11-12 Pedro Alves <palves@redhat.com>
1800
1801 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1802 thread, and don't resume all threads if the Hc thread has exited.
1803
1804 2014-11-12 Pedro Alves <palves@redhat.com>
1805
1806 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1807 the process group instead of to a specific LWP.
1808
1809 2014-10-15 Pedro Alves <palves@redhat.com>
1810
1811 PR server/17487
1812 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1813 parameter.
1814 (arm_set_thread_context): Delete.
1815 (the_low_target): Adjust.
1816 * win32-i386-low.c (debug_registers_changed)
1817 (debug_registers_used): Delete.
1818 (update_debug_registers_callback): New function.
1819 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1820 needing to update their debug registers.
1821 (win32_get_current_dr): New function.
1822 (x86_dr_low_get_addr, x86_dr_low_get_control)
1823 (x86_dr_low_get_status): Fetch the debug register from the thread
1824 record's context.
1825 (i386_initial_stuff): Adjust.
1826 (i386_get_thread_context): Remove current_event parameter. Don't
1827 clear debug_registers_changed nor copy DR values to
1828 debug_reg_state.
1829 (i386_set_thread_context): Delete.
1830 (i386_prepare_to_resume): New function.
1831 (i386_thread_added): Mark the thread as needing to update irs
1832 debug registers.
1833 (the_low_target): Remove i386_set_thread_context and install
1834 i386_prepare_to_resume.
1835 * win32-low.c (win32_get_thread_context): Adjust.
1836 (win32_set_thread_context): Use SetThreadContext
1837 directly.
1838 (win32_prepare_to_resume): New function.
1839 (win32_require_context): New function, factored out from ...
1840 (thread_rec): ... this.
1841 (continue_one_thread): Call win32_prepare_to_resume on each thread
1842 we're about to continue.
1843 (win32_resume): Call win32_prepare_to_resume on the event thread.
1844 * win32-low.h (struct win32_thread_info)
1845 <debug_registers_changed>: New field.
1846 (struct win32_target_ops): Change prototype of set_thread_context,
1847 delete set_thread_context and add prepare_to_resume.
1848 (win32_require_context): New declaration.
1849
1850 2014-10-08 Gary Benson <gbenson@redhat.com>
1851
1852 * server.h: Do not include common-exceptions.h.
1853
1854 2014-10-08 Gary Benson <gbenson@redhat.com>
1855
1856 * server.h: Do not include cleanups.h.
1857
1858 2014-09-30 James Hogan <james.hogan@imgtec.com>
1859
1860 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1861 mips64-dsp-linux.c.
1862
1863 2014-09-23 Yao Qi <yao@codesourcery.com>
1864
1865 * linux-low.c (lp_status_maybe_breakpoint): New function.
1866 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1867 (count_events_callback): Likewise.
1868 (select_event_lwp_callback): Likewise.
1869 (cancel_breakpoints_callback): Likewise.
1870
1871 2014-09-19 Don Breazeal <donb@codesourcery.com>
1872
1873 * linux-low.c (handle_extended_wait): Call
1874 linux_ptrace_get_extended_event.
1875 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1876 linux_is_extended_waitstatus.
1877
1878 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1879
1880 * Makefile.in (CPPFLAGS): Define.
1881 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1882 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1883
1884 2014-09-16 Gary Benson <gbenson@redhat.com>
1885
1886 * inferiors.h (current_inferior): Renamed as...
1887 (current_thread): New variable. All uses updated.
1888 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1889 (maybe_move_out_of_jump_pad): Likewise.
1890 (cancel_breakpoint): Likewise.
1891 (linux_low_filter_event): Likewise.
1892 (wait_for_sigstop): Likewise.
1893 (linux_resume_one_lwp): Likewise.
1894 (need_step_over_p): Likewise.
1895 (start_step_over): Likewise.
1896 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1897 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1898 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1899 and save_inferior as saved_thread.
1900 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1901 saved_thread.
1902 (regcache_invalidate_thread): Likewise.
1903 * remote-utils.c (prepare_resume_reply): Likewise.
1904 * thread-db.c (thread_db_get_tls_address): Likewise.
1905 (disable_thread_event_reporting): Likewise.
1906 (remove_thread_event_breakpoints): Likewise.
1907 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1908 as saved_thread.
1909 * target.h (set_desired_inferior): Renamed as...
1910 (set_desired_thread): New declaration. All uses updated.
1911 * server.c (myresume): Updated comment to reference thread instead
1912 of inferior.
1913 (handle_serial_event): Likewise.
1914 (handle_target_event): Likewise.
1915
1916 2014-09-12 Tom Tromey <tromey@redhat.com>
1917 Gary Benson <gbenson@redhat.com>
1918
1919 * regcache.h: Include common-regcache.h.
1920 (regcache_read_pc): Don't declare.
1921 * regcache.c (get_thread_regcache_for_ptid): New function.
1922
1923 2014-09-11 Tom Tromey <tromey@redhat.com>
1924 Gary Benson <gbenson@redhat.com>
1925
1926 * symbol.c: New file.
1927 * Makefile.in (SFILES): Add symbol.c.
1928 (OBS): Add symbol.o.
1929
1930 2014-09-11 Gary Benson <gbenson@redhat.com>
1931
1932 * target.c (target_stop_ptid, target_continue_ptid): New
1933 functions.
1934
1935 2014-09-11 Tom Tromey <tromey@redhat.com>
1936 Gary Benson <gbenson@redhat.com>
1937
1938 * target.h: Include target/target.h.
1939 * target.c (target_read_memory, target_read_uint32)
1940 (target_write_memory): New functions.
1941
1942 2014-09-11 Gary Benson <gbenson@redhat.com>
1943
1944 * server.h (debug_hw_points): Don't declare.
1945 * server.c (debug_hw_points): Don't define. Replace all uses
1946 with show_debug_regs.
1947 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1948 all uses with show_debug_regs.
1949
1950 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1951
1952 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1953 endianness into account.
1954 (ppc_supply_ptrace_register): Likewise.
1955
1956 2014-09-03 James Hogan <james.hogan@imgtec.com>
1957
1958 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1959 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1960
1961 2014-09-03 Gary Benson <gbenson@redhat.com>
1962
1963 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1964 ALL_DEBUG_ADDRESS_REGISTERS.
1965
1966 2014-09-02 Gary Benson <gbenson@redhat.com>
1967
1968 * i386-low.h: Renamed as...
1969 * x86-low.h: New file. All type, function and variable name
1970 prefixes changed from "i386_" to "x86_". All references updated.
1971 * i386-low.c: Renamed as...
1972 * x86-low.c: New file. All type, function and variable name
1973 prefixes changed from "i386_" to "x86_". All references updated.
1974
1975 2014-09-02 Gary Benson <gbenson@redhat.com>
1976
1977 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1978 (x86_linux_new_thread): Likewise.
1979
1980 2014-08-29 Gary Benson <gbenson@redhat.com>
1981
1982 * server.h (setjmp.h): Do not include.
1983 (toplevel): Do not declare.
1984 (common-exceptions.h): Include.
1985 (cleanups.h): Likewise.
1986 * server.c (toplevel): Do not define.
1987 (exit_code): New static global.
1988 (detach_or_kill_for_exit_cleanup): New function.
1989 (main): New function. Original main renamed to...
1990 (captured_main): New function.
1991 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1992
1993 2014-08-29 Gary Benson <gbenson@redhat.com>
1994
1995 * Makefile.in (SFILES): Add common/common-exceptions.c.
1996 (OBS): Add common-exceptions.o.
1997 (common-exceptions.o): New rule.
1998 * utils.c (prepare_to_throw_exception): New function.
1999
2000 2014-08-29 Gary Benson <gbenson@redhat.com>
2001
2002 * config.in: Regenerate.
2003 * configure: Likewise.
2004
2005 2014-08-29 Gary Benson <gbenson@redhat.com>
2006
2007 * Makefile.in (SFILES): Add common/cleanups.c.
2008 (OBS): cleanups.o.
2009 (cleanups.o): New rule.
2010
2011 2014-08-29 Gary Benson <gbenson@redhat.com>
2012
2013 * utils.c (internal_vwarning): New function.
2014
2015 2014-08-28 Gary Benson <gbenson@redhat.com>
2016
2017 * utils.h (fatal): Remove declaration.
2018 * utils.c (fatal): Remove function.
2019
2020 2014-08-28 Gary Benson <gbenson@redhat.com>
2021
2022 * tracepoint.c (gdb_agent_init): Replace fatal with
2023 perror_with_name.
2024 (initialize_tracepoint): Likewise.
2025
2026 2014-08-28 Gary Benson <gbenson@redhat.com>
2027
2028 * remote-utils.c (remote_prepare): Replace fatal with error.
2029
2030 2014-08-28 Gary Benson <gbenson@redhat.com>
2031
2032 * linux-low.c (linux_async): Replace fatal with warning.
2033 Tidy up and return.
2034 (linux_start_non_stop): Return -1 if linux_async failed.
2035
2036 2014-08-28 Gary Benson <gbenson@redhat.com>
2037
2038 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2039 gdb_assert.
2040 (i386_dr_low_get_addr): Remove vague comment.
2041 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2042 gdb_assert.
2043
2044 2014-08-28 Gary Benson <gbenson@redhat.com>
2045
2046 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2047 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2048 internal_error.
2049 (linux_resume_one_lwp): Likewise.
2050 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2051 gdb_assert.
2052 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2053 with internal_error.
2054 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2055 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2056 (find_register_by_name): Replace fatal with internal_error.
2057 (find_regno): Likewise.
2058 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2059 * thread-db.c (thread_db_create_event): Likewise.
2060 (thread_db_load_search): Likewise.
2061 (try_thread_db_load_1): Likewise.
2062 * tracepoint.c (get_jump_space_head): Replace fatal with
2063 internal_error.
2064 (claim_trampoline_space): Likewise.
2065 (have_fast_tracepoint_trampoline_buffer): Likewise.
2066 (cmd_qtstart): Likewise.
2067 (stop_tracing): Likewise.
2068 (fast_tracepoint_collecting): Likewise.
2069 (target_malloc): Likewise.
2070 (download_tracepoint): Likewise.
2071 (download_trace_state_variables): Replace check with gdb_assert.
2072 (upload_fast_traceframes): Replace fatal with internal_error.
2073
2074 2014-08-19 Tom Tromey <tromey@redhat.com>
2075 Gary Benson <gbenson@redhat.com>
2076
2077 * Makefile.in (SFILES): Add common/common-debug.c.
2078 (OBS): Add common-debug.o.
2079 (common-debug.o): New rule.
2080 * debug.h (debug_printf): Don't declare.
2081 * debug.c (debug_printf): Renamed and rewritten as...
2082 (debug_vprintf): New function.
2083
2084 2014-08-19 Gary Benson <gbenson@redhat.com>
2085
2086 * utils.h: Do not include print-utils.h.
2087
2088 2014-08-19 Tom Tromey <tromey@redhat.com>
2089 Gary Benson <gbenson@redhat.com>
2090
2091 * server.h: Add static assertion.
2092 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2093
2094 2014-08-19 Tom Tromey <tromey@redhat.com>
2095 Gary Benson <gbenson@redhat.com>
2096
2097 * Makefile.in (SFILES): Add common/errors.c.
2098 (OBS): Add errors.o.
2099 (IPA_OBS): Add errors-ipa.o.
2100 (errors.o): New rule.
2101 (errors-ipa.o): Likewise.
2102 * utils.h (perror_with_name, error, warning): Don't declare.
2103 * utils.c (warning): Renamed and rewritten as...
2104 (vwarning): New function.
2105 (error): Renamed and rewritten as...
2106 (verror): New function.
2107 (internal_error): Renamed and rewritten as...
2108 (internal_verror): New function.
2109
2110 2014-08-07 Gary Benson <gbenson@redhat.com>
2111
2112 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2113 * configure: Regenerate.
2114 * config.in: Likewise.
2115 * server.h: Do not include errno.h.
2116 * event-loop.c: Likewise.
2117 * hostio-errno.c: Likewise.
2118 * linux-low.c: Likewise.
2119 * remote-utils.c: Likewise.
2120 * spu-low.c: Likewise.
2121 * utils.c: Likewise.
2122 * gdbreplay.c: Unconditionally include errno.h.
2123
2124 2014-08-07 Gary Benson <gbenson@redhat.com>
2125
2126 * server.h: Do not include string.h.
2127 * event-loop.c: Likewise.
2128 * linux-low.c: Likewise.
2129 * regcache.c: Likewise.
2130 * remote-utils.c: Likewise.
2131 * spu-low.c: Likewise.
2132 * utils.c: Likewise.
2133
2134 2014-08-07 Gary Benson <gbenson@redhat.com>
2135
2136 * server.h: Do not include gdb_assert.h.
2137
2138 2014-08-07 Gary Benson <gbenson@redhat.com>
2139
2140 * server.h: Do not include common-utils.h.
2141
2142 2014-08-07 Gary Benson <gbenson@redhat.com>
2143
2144 * server.h: Do not include ptid.h.
2145 * notif.h: Likewise.
2146
2147 2014-08-07 Gary Benson <gbenson@redhat.com>
2148
2149 * server.h: Do not include gdb_locale.h.
2150
2151 2014-08-07 Gary Benson <gbenson@redhat.com>
2152
2153 * server.h: Do not include gdb/signals.h.
2154 * win32-low.c: Likewise.
2155
2156 2014-08-07 Gary Benson <gbenson@redhat.com>
2157
2158 * server.h: Do not include pathmax.h.
2159
2160 2014-08-07 Gary Benson <gbenson@redhat.com>
2161
2162 * server.h: Do not include libiberty.h.
2163 * linux-bfin-low.c: Likewise.
2164
2165 2014-08-07 Gary Benson <gbenson@redhat.com>
2166
2167 * server.h: Do not include ansidecl.h.
2168
2169 2014-08-07 Gary Benson <gbenson@redhat.com>
2170
2171 * linux-x86-low.c: Do not include stddef.h.
2172 * lynx-ppc-low.c: Likewise.
2173 * tracepoint.c: Likewise.
2174
2175 2014-08-07 Gary Benson <gbenson@redhat.com>
2176
2177 * server.h: Do not include stdarg.h.
2178 * nto-low.c: Likewise.
2179
2180 2014-08-07 Gary Benson <gbenson@redhat.com>
2181
2182 * server.h: Do not include stdlib.h.
2183 * inferiors.c: Likewise.
2184 * linux-low.c: Likewise.
2185 * regcache.c: Likewise.
2186 * spu-low.c: Likewise.
2187 * tracepoint.c: Likewise.
2188 * utils.c: Likewise.
2189
2190 2014-08-07 Gary Benson <gbenson@redhat.com>
2191
2192 * server.h: Do not include stdio.h.
2193 * linux-low.c: Likewise.
2194 * remote-utils.c: Likewise.
2195 * spu-low.c: Likewise.
2196 * utils.c: Likewise.
2197 * wincecompat.c: Likewise.
2198
2199 2014-08-06 Gary Benson <gbenson@redhat.com>
2200
2201 * regcache.c (init_register_cache): Move conditionals inside if.
2202
2203 2014-08-06 Gary Benson <gbenson@redhat.com>
2204
2205 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2206
2207 2014-07-31 Gary Benson <gbenson@redhat.com>
2208
2209 * ax.h: Do not include server.h.
2210 * gdbthread.h: Likewise.
2211 * lynx-low.h: Likewise.
2212 * notif.h: Likewise.
2213
2214 2014-07-30 Gary Benson <gbenson@redhat.com>
2215
2216 * server.h: Include common-defs.h.
2217 Do not include config.h or build-gnulib-gdbserver/config.h.
2218
2219 2014-07-30 Gary Benson <gbenson@redhat.com>
2220
2221 * hostio-errno.c: Move server.h to top of includes list.
2222 * inferiors.c: Likewise.
2223 * linux-x86-low.c: Likewise.
2224 * notif.c: Include server.h.
2225
2226 2014-07-24 Tom Tromey <tromey@redhat.com>
2227 Gary Benson <gbenson@redhat.com>
2228
2229 * server.h (CORE_ADDR): Now unsigned.
2230
2231 2014-07-16 Pedro Alves <palves@redhat.com>
2232
2233 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2234
2235 2014-07-15 Pedro Alves <palves@redhat.com>
2236
2237 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2238 copy.
2239
2240 2014-07-11 Pedro Alves <palves@redhat.com>
2241
2242 * linux-low.c (kill_wait_lwp): New function, based on
2243 kill_one_lwp_callback, but use my_waitpid directly.
2244 (kill_one_lwp_callback, linux_kill): Use it.
2245
2246 2014-06-23 Pedro Alves <palves@redhat.com>
2247
2248 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2249 before setting DR0..DR3.
2250
2251 2014-06-20 Gary Benson <gbenson@redhat.com>
2252
2253 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2254 * configure: Regenerated.
2255 * config.in: Likewise.
2256
2257 2014-06-20 Gary Benson <gbenson@redhat.com>
2258
2259 * Makefile.in (SFILES): Update locations for files moved
2260 from common to nat.
2261 (object file files): Reordered.
2262
2263 2014-06-20 Gary Benson <gbenson@redhat.com>
2264
2265 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2266 (i386_dr_low_set_addr): Likewise.
2267 (i386_dr_low_get_addr): Likewise.
2268 (i386_dr_low_can_set_control): Likewise.
2269 (i386_dr_low_set_control): Likewise.
2270 (i386_dr_low_get_control): Likewise.
2271 (i386_dr_low_get_status): Likewise.
2272 (i386_get_debug_register_length): Likewise.
2273 * linux-x86-low.c (i386_dr_low_set_addr):
2274 Changed signature. Made static.
2275 (i386_dr_low_get_addr): Likewise.
2276 (i386_dr_low_set_control): Likewise.
2277 (i386_dr_low_get_control): Likewise.
2278 (i386_dr_low_get_status): Likewise.
2279 (i386_dr_low): New global variable.
2280 * win32-i386-low.c (i386_dr_low_set_addr):
2281 Changed signature. Made static.
2282 (i386_dr_low_get_addr): Likewise.
2283 (i386_dr_low_set_control): Likewise.
2284 (i386_dr_low_get_control): Likewise.
2285 (i386_dr_low_get_status): Likewise.
2286 (i386_dr_low): New global variable.
2287
2288 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2289
2290 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2291 * Makefile.in (AR, AR_FLAGS): Define.
2292 * configure: Regenerate.
2293
2294 2014-06-19 Gary Benson <gbenson@redhat.com>
2295
2296 * Makefile.in (i386-dregs.o): New rule.
2297 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2298 * i386-low.c (target.h): Remove include.
2299 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2300 (DR_CONTROL_SHIFT): Likewise.
2301 (DR_CONTROL_SIZE): Likewise.
2302 (DR_RW_EXECUTE): Likewise.
2303 (DR_RW_WRITE): Likewise.
2304 (DR_RW_READ): Likewise.
2305 (DR_RW_IORW): Likewise.
2306 (DR_LEN_1): Likewise.
2307 (DR_LEN_2): Likewise.
2308 (DR_LEN_4): Likewise.
2309 (DR_LEN_8): Likewise.
2310 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2311 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2312 (DR_ENABLE_SIZE): Likewise.
2313 (DR_LOCAL_SLOWDOWN): Likewise.
2314 (DR_GLOBAL_SLOWDOWN): Likewise.
2315 (DR_CONTROL_RESERVED): Likewise.
2316 (I386_DR_CONTROL_MASK): Likewise.
2317 (I386_DR_VACANT): Likewise.
2318 (I386_DR_LOCAL_ENABLE): Likewise.
2319 (I386_DR_GLOBAL_ENABLE): Likewise.
2320 (I386_DR_DISABLE): Likewise.
2321 (I386_DR_SET_RW_LEN): Likewise.
2322 (I386_DR_GET_RW_LEN): Likewise.
2323 (I386_DR_WATCH_HIT): Likewise.
2324 (i386_wp_op_t): Likewise.
2325 (i386_show_dr): Likewise.
2326 (i386_length_and_rw_bits): Likewise.
2327 (i386_insert_aligned_watchpoint): Likewise.
2328 (i386_remove_aligned_watchpoint): Likewise.
2329 (i386_handle_nonaligned_watchpoint): Likewise.
2330 i386_update_inferior_debug_regs(): Likewise.
2331 (i386_dr_insert_watchpoint): Likewise.
2332 (i386_dr_remove_watchpoint): Likewise.
2333 (i386_dr_region_ok_for_watchpoint): Likewise.
2334 (i386_dr_stopped_data_address): Likewise.
2335 (i386_dr_stopped_by_watchpoint): Likewise.
2336
2337 2014-06-19 Gary Benson <gbenson@redhat.com>
2338
2339 * i386-low.c (i386_dr_show): Renamed to
2340 i386_show_dr and made static. All uses updated.
2341 (i386_dr_length_and_rw_bits): Renamed to
2342 i386_length_and_rw_bits and made static.
2343 All uses updated.
2344 (i386_dr_insert_aligned_watchpoint): Renamed to
2345 i386_insert_aligned_watchpoint and made static.
2346 All uses updated.
2347 (i386_dr_remove_aligned_watchpoint): Renamed to
2348 i386_remove_aligned_watchpoint and made static.
2349 All uses updated.
2350 (i386_dr_update_inferior_debug_regs): Renamed to
2351 i386_update_inferior_debug_regs and made static.
2352 All uses updated.
2353
2354 2014-06-18 Gary Benson <gbenson@redhat.com>
2355
2356 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2357 (i386_dr_low_can_set_control): Likewise.
2358 (i386_get_debug_register_length): Likewise.
2359 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2360 (i386_dr_low_can_set_control): Likewise.
2361 (i386_get_debug_register_length): Likewise.
2362
2363 2014-06-17 Gary Benson <gbenson@redhat.com>
2364
2365 * i386-low.h (i386-dregs.h): New include.
2366 (DR_FIRSTADDR): Now in i386-dregs.h.
2367 (DR_LASTADDR): Likewise.
2368 (DR_NADDR): Likewise.
2369 (DR_STATUS): Likewise.
2370 (DR_CONTROL): Likewise.
2371 (i386_debug_reg_state): Likewise.
2372 (i386_dr_insert_watchpoint): Likewise.
2373 (i386_dr_remove_watchpoint): Likewise.
2374 (i386_dr_region_ok_for_watchpoint): Likewise.
2375 (i386_dr_stopped_data_address): Likewise.
2376 (i386_dr_stopped_by_watchpoint): Likewise.
2377 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2378
2379 2014-06-18 Gary Benson <gbenson@redhat.com>
2380
2381 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2382 i386_dr_insert_watchpoint.
2383 (i386_low_remove_watchpoint): Renamed to
2384 i386_dr_remove_watchpoint.
2385 (i386_low_region_ok_for_watchpoint): Renamed to
2386 i386_dr_region_ok_for_watchpoint.
2387 (i386_low_stopped_data_address): Renamed to
2388 i386_dr_stopped_data_address.
2389 (i386_low_stopped_by_watchpoint): Renamed to
2390 i386_dr_stopped_by_watchpoint.
2391 * i386-low.c (i386_show_dr): Renamed to
2392 i386_dr_show and made nonstatic. All uses updated.
2393 (i386_length_and_rw_bits): Renamed to
2394 i386_dr_length_and_rw_bits and made nonstatic.
2395 All uses updated.
2396 (i386_insert_aligned_watchpoint): Renamed to
2397 i386_dr_insert_aligned_watchpoint and made nonstatic.
2398 All uses updated.
2399 (i386_remove_aligned_watchpoint): Renamed to
2400 i386_dr_remove_aligned_watchpoint and made nonstatic.
2401 All uses updated.
2402 (i386_update_inferior_debug_regs): Renamed to
2403 i386_dr_update_inferior_debug_regs and made nonstatic.
2404 All uses updated.
2405 (i386_low_insert_watchpoint): Renamed to
2406 i386_dr_insert_watchpoint. All uses updated.
2407 (i386_low_remove_watchpoint): Renamed to
2408 i386_dr_remove_watchpoint. All uses updated.
2409 (i386_low_region_ok_for_watchpoint): Renamed to
2410 i386_dr_region_ok_for_watchpoint. All uses updated.
2411 (i386_low_stopped_data_address): Renamed to
2412 i386_dr_stopped_data_address. All uses updated.
2413 (i386_low_stopped_by_watchpoint): Renamed to
2414 i386_dr_stopped_by_watchpoint. All uses updated.
2415
2416 2014-06-18 Gary Benson <gbenson@redhat.com>
2417
2418 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2419 (i386_dr_low_can_set_control): Likewise.
2420 (i386_insert_aligned_watchpoint): New check.
2421
2422 2014-06-18 Gary Benson <gbenson@redhat.com>
2423
2424 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2425 Renamed to state.
2426
2427 2014-06-18 Gary Benson <gbenson@redhat.com>
2428
2429 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2430 instead of fatal and error.
2431 (i386_handle_nonaligned_watchpoint): Likewise.
2432
2433 2014-06-18 Gary Benson <gbenson@redhat.com>
2434
2435 * i386-low.c (i386_get_debug_register_length): New macro.
2436 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2437 (i386_show_dr): Use debug_printf instead of fprintf. Use
2438 phex to format values.
2439
2440 2014-06-18 Gary Benson <gbenson@redhat.com>
2441
2442 * i386-low.h: Comment changes.
2443 * i386-low.c: Likewise.
2444
2445 2014-06-18 Gary Benson <gbenson@redhat.com>
2446
2447 * i386-low.c: Whitespace changes.
2448
2449 2014-06-12 Tom Tromey <tromey@redhat.com>
2450
2451 * utils.c (freeargv): Remove.
2452
2453 2014-06-12 Tom Tromey <tromey@redhat.com>
2454
2455 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2456 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2457 (parse_debug_format_options): Likewise.
2458 (gdbserver_usage): Likewise.
2459 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2460 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2461 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2462 against libiberty.
2463 ($(LIBGNU)): Depend on libiberty.
2464 (all-lib): Recurse into all subdirs.
2465 (install-only): Invoke "install" target in subdirs.
2466 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2467 targets.
2468 * configure: Rebuild.
2469 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2470 for vasprintf, vsnprintf, or gettimeofday.
2471 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2472 srv_tgtobj.
2473
2474 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2475
2476 * development.sh: Delete.
2477 * Makefile.in (config.status): Adjust dependency on development.sh.
2478 * configure.ac: Adjust development.sh source call.
2479 * configure: Regenerate.
2480
2481 2014-06-02 Pedro Alves <palves@redhat.com>
2482
2483 * ax.c (gdb_free_agent_expr): New function.
2484 * ax.h (gdb_free_agent_expr): New declaration.
2485 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2486 list.
2487 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2488 static.
2489 (clear_breakpoint_conditions_and_commands): New function.
2490 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2491 (clear_breakpoint_conditions_and_commands): New declaration.
2492
2493 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2494
2495 * linux-aarch64-low.c (asm/ptrace.h): Include.
2496
2497 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2498
2499 Fix TLS access for -static -pthread.
2500 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2501 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2502 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2503
2504 2014-05-20 Pedro Alves <palves@redhat.com>
2505
2506 * linux-aarch64-low.c (aarch64_insert_point)
2507 (aarch64_remove_point): No longer check whether the type is
2508 supported here. Adjust to new interface.
2509 (the_low_target): Install aarch64_supports_z_point_type as
2510 supports_z_point_type method.
2511 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2512 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2513 instead of a Z packet char. Adjust.
2514 (arm_supports_z_point_type): New function.
2515 (arm_insert_point, arm_remove_point): Adjust to new interface.
2516 (the_low_target): Install arm_supports_z_point_type.
2517 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2518 (cris_insert_point, cris_remove_point): Adjust to new interface.
2519 Don't check whether the type is supported here.
2520 (the_low_target): Install cris_supports_z_point_type.
2521 * linux-low.c (linux_supports_z_point_type): New function.
2522 (linux_insert_point, linux_remove_point): Adjust to new interface.
2523 * linux-low.h (struct linux_target_ops) <insert_point,
2524 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2525 raw_breakpoint pointer parameter.
2526 <supports_z_point_type>: New method.
2527 * linux-mips-low.c (mips_supports_z_point_type): New function.
2528 (mips_insert_point, mips_remove_point): Adjust to new interface.
2529 Use mips_supports_z_point_type.
2530 (the_low_target): Install mips_supports_z_point_type.
2531 * linux-ppc-low.c (the_low_target): Install NULL as
2532 supports_z_point_type method.
2533 * linux-s390-low.c (the_low_target): Install NULL as
2534 supports_z_point_type method.
2535 * linux-sparc-low.c (the_low_target): Install NULL as
2536 supports_z_point_type method.
2537 * linux-x86-low.c (x86_supports_z_point_type): New function.
2538 (x86_insert_point): Adjust to new insert_point interface. Use
2539 insert_memory_breakpoint. Adjust to new
2540 i386_low_insert_watchpoint interface.
2541 (x86_remove_point): Adjust to remove_point interface. Use
2542 remove_memory_breakpoint. Adjust to new
2543 i386_low_remove_watchpoint interface.
2544 (the_low_target): Install x86_supports_z_point_type.
2545 * lynx-low.c (lynx_target_ops): Install NULL as
2546 supports_z_point_type callback.
2547 * nto-low.c (nto_supports_z_point_type): New.
2548 (nto_insert_point, nto_remove_point): Adjust to new interface.
2549 (nto_target_ops): Install nto_supports_z_point_type.
2550 * mem-break.c: Adjust intro comment.
2551 (struct raw_breakpoint) <raw_type, size>: New fields.
2552 <inserted>: Update comment.
2553 <shlib_disabled>: Delete field.
2554 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2555 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2556 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2557 (raw_bkpt_type_to_target_hw_bp_type): New function.
2558 (find_enabled_raw_code_breakpoint_at): New function.
2559 (find_raw_breakpoint_at): New type and size parameters. Use them.
2560 (insert_memory_breakpoint): New function, based off
2561 set_raw_breakpoint_at.
2562 (remove_memory_breakpoint): New function.
2563 (set_raw_breakpoint_at): Reimplement.
2564 (set_breakpoint): New, based on set_breakpoint_at.
2565 (set_breakpoint_at): Reimplement.
2566 (delete_raw_breakpoint): Go through the_target->remove_point
2567 instead of assuming memory breakpoints.
2568 (find_gdb_breakpoint_at): Delete.
2569 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2570 (find_gdb_breakpoint): New function.
2571 (set_gdb_breakpoint_at): Delete.
2572 (z_type_supported): New function.
2573 (set_gdb_breakpoint_1): New function, loosely based off
2574 set_gdb_breakpoint_at.
2575 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2576 (delete_gdb_breakpoint_at): Delete.
2577 (delete_gdb_breakpoint_1): New function, loosely based off
2578 delete_gdb_breakpoint_at.
2579 (delete_gdb_breakpoint): New function.
2580 (clear_gdb_breakpoint_conditions): Rename to ...
2581 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2582 breakpoint.
2583 (add_condition_to_breakpoint): Make static.
2584 (add_breakpoint_condition): Take a struct breakpoint pointer
2585 instead of an address. Adjust.
2586 (gdb_condition_true_at_breakpoint): Rename to ...
2587 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2588 z_type parameter.
2589 (gdb_condition_true_at_breakpoint): Reimplement.
2590 (add_breakpoint_commands): Take a struct breakpoint pointer
2591 instead of an address. Adjust.
2592 (gdb_no_commands_at_breakpoint): Rename to ...
2593 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2594 parameter. Return true if no breakpoint was found. Change debug
2595 output.
2596 (gdb_no_commands_at_breakpoint): Reimplement.
2597 (run_breakpoint_commands): Rename to ...
2598 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2599 and change return type to boolean.
2600 (run_breakpoint_commands): New function.
2601 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2602 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2603 breakpoint. Go through the_target->remove_point instead of
2604 assuming memory breakpoint.
2605 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2606 software and hardware breakpoints.
2607 (reinsert_raw_breakpoint): Go through the_target->insert_point
2608 instead of assuming memory breakpoint.
2609 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2610 software and hardware breakpoints.
2611 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2612 Check both software and hardware breakpoints.
2613 (validate_inserted_breakpoint): Assert the breakpoint is a
2614 software breakpoint. Set the inserted flag to -1 instead of
2615 setting shlib_disabled.
2616 (delete_disabled_breakpoints): Adjust.
2617 (validate_breakpoints): Only validate software breakpoints.
2618 Adjust to inserted flag change.
2619 (check_mem_read, check_mem_write): Skip breakpoint types other
2620 than software breakpoints. Adjust to inserted flag change.
2621 * mem-break.h (enum raw_bkpt_type): New enum.
2622 (raw_breakpoint, struct process_info): Forward declare.
2623 (Z_packet_to_target_hw_bp_type): Delete declaration.
2624 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2625 (set_gdb_breakpoint, delete_gdb_breakpoint)
2626 (clear_breakpoint_conditions): New declarations.
2627 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2628 (breakpoint_inserted_here): Update comment.
2629 (add_breakpoint_condition, add_breakpoint_commands): Replace
2630 address parameter with a breakpoint pointer parameter.
2631 (gdb_breakpoint_here): Update comment.
2632 (delete_gdb_breakpoint_at): Delete.
2633 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2634 * server.c (process_point_options): Take a struct breakpoint
2635 pointer instead of an address. Adjust.
2636 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2637 delete_gdb_breakpoint.
2638 * spu-low.c (spu_target_ops): Install NULL as
2639 supports_z_point_type method.
2640 * target.h: Include mem-break.h.
2641 (struct target_ops) <prepare_to_access_memory>: Update comment.
2642 <supports_z_point_type>: New field.
2643 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2644 instead of a char. Also take a raw breakpoint pointer.
2645 * win32-arm-low.c (the_low_target): Install NULL as
2646 supports_z_point_type.
2647 * win32-i386-low.c (i386_supports_z_point_type): New function.
2648 (i386_insert_point, i386_remove_point): Adjust to new interface.
2649 (the_low_target): Install i386_supports_z_point_type.
2650 * win32-low.c (win32_supports_z_point_type): New function.
2651 (win32_insert_point, win32_remove_point): Adjust to new interface.
2652 (win32_target_ops): Install win32_supports_z_point_type.
2653 * win32-low.h (struct win32_target_ops):
2654 <supports_z_point_type>: New method.
2655 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2656 instead of a char. Also take a raw breakpoint pointer.
2657
2658 2014-05-20 Pedro Alves <palves@redhat.com>
2659
2660 * mem-break.h: Include break-common.h.
2661 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2662 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2663 (Z_packet_to_target_hw_bp_type): New declaration.
2664 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2665 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2666 (Z_PACKET_ACCESS_WP): Delete macros.
2667 (Z_packet_to_hw_type): Delete function.
2668 * i386-low.h: Don't include break-common.h here.
2669 (Z_packet_to_hw_type): Delete declaration.
2670 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2671 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2672 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2673 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2674 * linux-aarch64-low.c: Don't include break-common.h here.
2675 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2676 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2677 (Z_packet_to_target_hw_bp_type): Delete function.
2678 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2679 function.
2680 (mips_insert_point, mips_remove_point): Use
2681 Z_packet_to_target_hw_bp_type.
2682
2683 2014-05-20 Pedro Alves <palves@redhat.com>
2684
2685 * linux-aarch64-low.c: Include break-common.h.
2686 (enum target_point_type): Delete.
2687 (Z_packet_to_point_type): Rename to ...
2688 (Z_packet_to_target_hw_bp_type): ... this, and return a
2689 target_hw_bp_type instead.
2690 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2691 instead of an enum target_point_type.
2692 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2693 breakpoint type.
2694 (aarch64_dr_state_insert_one_point)
2695 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2696 (aarch64_handle_aligned_watchpoint)
2697 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2698 Take an enum target_hw_bp_type instead of an enum
2699 target_point_type.
2700 (aarch64_supports_z_point_type): New function.
2701 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2702 use Z_packet_to_target_hw_bp_type.
2703
2704 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2705
2706 * configure.ac: Only use -Werror by default when DEVELOPMENT
2707 is true.
2708 * configure: Regenerate.
2709
2710 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2711
2712 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2713 * linux-x86-low.c (X86_64_USER_REGS): New.
2714 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2715
2716 2014-04-28 Yao Qi <yao@codesourcery.com>
2717
2718 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2719 name.
2720
2721 2014-04-25 Pedro Alves <palves@redhat.com>
2722
2723 PR server/16255
2724 * linux-low.c (linux_attach_fail_reason_string): New function.
2725 (linux_attach_lwp): Delete.
2726 (linux_attach_lwp_1): Rename to ...
2727 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2728 argument. Remove "initial" parameter. Return int instead of
2729 void. Don't error or warn here.
2730 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2731 failure to attach to the tgid. Call warning when failing to
2732 attach to an lwp.
2733 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2734 argument. Remove "initial" parameter. Return int instead of
2735 void. Don't error or warn here.
2736 (linux_attach_fail_reason_string): New declaration.
2737 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2738 interface change. Use linux_attach_fail_reason_string.
2739
2740 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2741 Walfred Tedeschi <walfred.tedeschi@intel.com>
2742
2743 * Makefile.in: Added rules to handle new files
2744 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2745 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2746 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2747 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2748 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2749 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2750 x32-avx512-linux.o.
2751 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2752 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2753 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2754 i386/x32-avx512.xml.
2755 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2756 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2757 i386/x32-avx512-linux.xml.
2758 * i387-fp.c (num_avx512_k_registers): New constant for number
2759 of K registers.
2760 (num_avx512_zmmh_low_registers): New constant for number of
2761 lower ZMM registers (0-15).
2762 (num_avx512_zmmh_high_registers): New constant for number of
2763 higher ZMM registers (16-31).
2764 (num_avx512_ymmh_registers): New contant for number of higher
2765 YMM registers (ymm16-31 added by avx521 on x86_64).
2766 (num_avx512_xmm_registers): New constant for number of higher
2767 XMM registers (xmm16-31 added by AVX512 on x86_64).
2768 (struct i387_xsave): Add space for AVX512 registers.
2769 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2770 Add code to handle AVX512 registers.
2771 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2772 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2773 prototypei from generated file.
2774 (tdesc_amd64_avx512_linux): Likewise.
2775 (init_registers_x32_avx512_linux): Likewise.
2776 (tdesc_x32_avx512_linux): Likewise.
2777 (init_registers_i386_avx512_linux): Likewise.
2778 (tdesc_i386_avx512_linux): Likewise.
2779 (x86_64_regmap): Add AVX512 registers.
2780 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2781 mask.
2782 (initialize_low_arch): Add code to initialize AVX512 registers.
2783
2784 2014-04-23 Pedro Alves <palves@redhat.com>
2785
2786 * mem-break.c (find_gdb_breakpoint_at): Make static.
2787 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2788
2789 2014-04-23 Pedro Alves <palves@redhat.com>
2790
2791 * i386-low.c: Don't include break-common.h here.
2792 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2793 prototype to take target_hw_bp_type as argument instead of a Z
2794 packet char.
2795 * i386-low.h: Include break-common.h here.
2796 (Z_packet_to_hw_type): Declare.
2797 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2798 prototypes.
2799 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2800 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2801 (x86_remove_point): Convert the packet number to a
2802 target_hw_bp_type before calling i386_low_remove_watchpoint.
2803 * win32-i386-low.c (i386_insert_point): Convert the packet number
2804 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2805 (i386_remove_point): Convert the packet number to a
2806 target_hw_bp_type before calling i386_low_remove_watchpoint.
2807
2808 2014-04-23 Pedro Alves <palves@redhat.com>
2809
2810 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2811
2812 2014-04-10 Pedro Alves <palves@redhat.com>
2813
2814 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2815 Check if the condition or command is NULL before checking if the
2816 breakpoint is known. On success, return true.
2817 * mem-break.h (add_breakpoint_condition): Document return.
2818 (add_breakpoint_commands): Add describing comment.
2819 * server.c (skip_to_semicolon): New function.
2820 (process_point_options): Use it.
2821
2822 2014-04-09 Pedro Alves <palves@redhat.com>
2823
2824 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2825 to lwpid_of.
2826
2827 2014-02-27 Pedro Alves <palves@redhat.com>
2828
2829 PR 12702
2830 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2831 macros.
2832 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2833 output.
2834 (last_thread_of_process_p): Take a PID argument instead of a
2835 thread pointer.
2836 (linux_wait_for_lwp): Delete.
2837 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2838 functions.
2839 (linux_low_filter_event): New function, party factored out from
2840 linux_wait_for_event.
2841 (linux_wait_for_event): Rename to ...
2842 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2843 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2844 sigsuspend. Check for zombie leaders.
2845 (linux_wait_for_event): Reimplement as wrapper around
2846 linux_wait_for_event_filtered.
2847 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2848 a normal or signal exit is seen, it's the whole process exiting.
2849 (wait_for_sigstop): No longer a for_each_inferior callback.
2850 Rewrite on top of linux_wait_for_event_filtered.
2851 (stop_all_lwps): Call wait_for_sigstop directly.
2852 * server.c (resume, handle_target_event): Handle
2853 TARGET_WAITKIND_NO_RESUMED.
2854
2855 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2856
2857 * win32-low.c (psapi_get_dll_name,
2858 * win32_CreateToolhelp32Snapshot): Delete.
2859 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2860 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2861 Delete.
2862 (handle_load_dll): Add function description.
2863 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2864
2865 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2866
2867 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2868 Add comment.
2869 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2870 base address when calling win32_add_one_solib.
2871 (handle_load_dll): Delete local variable load_addr.
2872 Remove 0x1000 offset applied to DLL base address when calling
2873 win32_add_one_solib.
2874 (handle_unload_dll): Add comment.
2875
2876 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2877
2878 * win32-low.c (win32_add_all_dlls): Renames
2879 win32_ensure_ntdll_loaded. Rewrite function documentation.
2880 Adjust implementation to always load all DLLs.
2881 Add 0x1000 offset to DLL base address when calling
2882 win32_add_one_solib.
2883 (child_initialization_done): New static global.
2884 (do_initial_child_stuff): Set child_initialization_done to
2885 zero during child initialization, and 1 after. Replace call
2886 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2887 Add comment.
2888 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2889 (handle_unload_dll): Add function documentation.
2890 (get_child_debug_event): Ignore load and unload DLL events
2891 during child initialization.
2892
2893 2014-02-20 Doug Evans <dje@google.com>
2894
2895 Remove global all_lwps.
2896 * inferiors.h (ptid_of): Move here from linux-low.h.
2897 (pid_of, lwpid_of): Ditto.
2898 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2899 parameter is a struct thread_info * now.
2900 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2901 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2902 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2903 directly.
2904 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2905 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2906 * linux-arm-low.c (update_registers_callback): Update, "entry"
2907 parameter is a struct thread_info * now.
2908 Fetch lwpid from current_inferior directly.
2909 (arm_insert_point): Pass &all_threads to find_inferior instead of
2910 &all_lwps.
2911 (arm_remove_point): Ditto.
2912 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2913 (arm_prepare_to_resume): Fetch pid from thread.
2914 (arm_read_description): Fetch lwpid from current_inferior directly.
2915 * linux-low.c (all_lwps): Delete.
2916 (delete_lwp): Delete call to remove_inferior.
2917 (handle_extended_wait): Fetch lwpid from thread.
2918 (add_lwp): Don't set lwp->entry.id. Remove call to
2919 add_inferior_to_list.
2920 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2921 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2922 (kill_one_lwp_callback): Ditto.
2923 (linux_kill): Don't dereference NULL pointer.
2924 Fetch ptid,lwpid from thread.
2925 (get_detach_signal): Fetch ptid from thread.
2926 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2927 Simplify call to regcache_invalidate_thread.
2928 (delete_lwp_callback): Update, "entry" parameter is a
2929 struct thread_info * now. Fetch pid from thread.
2930 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2931 (status_pending_p_callback): Update, "entry" parameter is a
2932 struct thread_info * now. Fetch ptid from thread.
2933 (find_lwp_pid): Update, "entry" parameter is a
2934 struct thread_info * now.
2935 (linux_wait_for_lwp): Fetch pid from thread.
2936 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2937 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2938 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2939 (dequeue_one_deferred_signal): Ditto.
2940 (cancel_breakpoint): Fetch ptid from current_inferior.
2941 (linux_wait_for_event): Pass &all_threads to find_inferior,
2942 not &all_lwps. Fetch ptid, lwpid from thread.
2943 (count_events_callback): Update, "entry" parameter is a
2944 struct thread_info * now.
2945 (select_singlestep_lwp_callback): Ditto.
2946 (select_event_lwp_callback): Ditto.
2947 (cancel_breakpoints_callback): Ditto.
2948 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2949 not &all_lwps.
2950 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2951 (unsuspend_one_lwp): Update, "entry" parameter is a
2952 struct thread_info * now.
2953 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2954 not &all_lwps.
2955 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2956 Fetch lwpid from thread, not lwp.
2957 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2958 Pass &all_threads to find_inferior, not &all_lwps.
2959 (send_sigstop): Fetch lwpid from thread, not lwp.
2960 (send_sigstop_callback): Update, "entry" parameter is a
2961 struct thread_info * now.
2962 (suspend_and_send_sigstop_callback): Ditto.
2963 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2964 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2965 struct thread_info * now.
2966 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2967 from thread, lwp.
2968 (lwp_running): Update, "entry" parameter is a
2969 struct thread_info * now.
2970 (stop_all_lwps): Fetch ptid from thread.
2971 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2972 (linux_resume_one_lwp): Fetch lwpid from thread.
2973 (linux_set_resume_request): Update, "entry" parameter is a
2974 struct thread_info * now. Fetch pid, lwpid from thread.
2975 (resume_status_pending_p): Update, "entry" parameter is a
2976 struct thread_info * now.
2977 (need_step_over_p): Ditto. Fetch lwpid from thread.
2978 (start_step_over): Fetch lwpid from thread.
2979 (linux_resume_one_thread): Update, "entry" parameter is a
2980 struct thread_info * now. Fetch lwpid from thread.
2981 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2982 (proceed_one_lwp): Update, "entry" parameter is a
2983 struct thread_info * now. Fetch lwpid from thread.
2984 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2985 struct thread_info * now.
2986 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2987 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2988 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2989 directly.
2990 (regsets_store_inferior_registers): Ditto.
2991 (fetch_register, store_register): Ditto.
2992 (linux_read_memory, linux_write_memory): Ditto.
2993 (linux_request_interrupt): Ditto.
2994 (linux_read_auxv): Ditto.
2995 (linux_xfer_siginfo): Ditto.
2996 (linux_qxfer_spu): Ditto.
2997 (linux_qxfer_libraries_svr4): Ditto.
2998 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2999 moved to inferiors.h.
3000 (get_lwp): Delete.
3001 (get_thread_lwp): Update.
3002 (struct lwp_info): Delete member "entry". Simplify comment for
3003 member "thread".
3004 (all_lwps): Delete.
3005 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3006 current_inferior directly.
3007 (update_watch_registers_callback): Update, "entry" parameter is a
3008 struct thread_info * now. Fetch pid from thread.
3009 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3010 (mips_insert_point): Fetch lwpid from current_inferior.
3011 Pass &all_threads to find_inferior, not &all_lwps.
3012 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3013 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3014 directly.
3015 (mips_stopped_data_address): Ditto.
3016 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3017 directly.
3018 * linux-tile-low.c (tile_arch_setup): Ditto.
3019 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3020 (update_debug_registers_callback): Update, "entry" parameter is a
3021 struct thread_info * now. Fetch pid from thread.
3022 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3023 Pass &all_threads to find_inferior, not &all_lwps.
3024 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3025 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3026 Pass &all_threads to find_inferior, not &all_lwps.
3027 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3028 (i386_dr_low_get_status): Ditto.
3029 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3030 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3031 (x86_linux_read_description): Ditto.
3032 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3033
3034 2014-02-20 Doug Evans <dje@google.com>
3035
3036 * inferiors.c (get_first_inferior): Fix buglet.
3037
3038 2014-02-19 Doug Evans <dje@google.com>
3039
3040 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3041 * inferiors.c (add_thread): Change result type to struct thread_info *.
3042 All callers updated.
3043 (add_lwp): Call add_thread here instead of in callers.
3044 All callers updated.
3045 * linux-low.h (get_lwp_thread): Rewrite.
3046 (struct lwp_info): New member "thread".
3047
3048 2014-02-19 Doug Evans <dje@google.com>
3049
3050 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3051 All callers updated.
3052
3053 2014-02-19 Doug Evans <dje@google.com>
3054
3055 * inferiors.c (add_thread): Fix whitespace.
3056
3057 2014-02-19 Doug Evans <dje@google.com>
3058
3059 * dll.c (clear_dlls): Replace accessing list implemention details
3060 with API function.
3061 * gdbthread.h (get_first_thread): Declare.
3062 * inferiors.c (for_each_inferior_with_data): New function.
3063 (get_first_thread): New function.
3064 (find_thread_ptid): Simplify.
3065 (get_first_inferior): New function.
3066 (clear_list): Delete.
3067 (one_inferior_p): New function.
3068 (clear_inferior_list): New function.
3069 (clear_inferiors): Update.
3070 * inferiors.h (for_each_inferior_with_data): Declare.
3071 (clear_inferior_list): Declare.
3072 (one_inferior_p): Declare.
3073 (get_first_inferior): Declare.
3074 * linux-low.c (linux_wait_for_event): Replace accessing list
3075 implemention details with API function.
3076 * server.c (target_running): Ditto.
3077 (accumulate_file_name_length): New function.
3078 (emit_dll_description): New function.
3079 (handle_qxfer_libraries): Replace accessing list implemention
3080 details with API function.
3081 (handle_qxfer_threads_worker): New function.
3082 (handle_qxfer_threads_proper): Replace accessing list implemention
3083 details with API function.
3084 (handle_query): Ditto.
3085 (visit_actioned_threads_callback_ftype): New typedef.
3086 (visit_actioned_threads_data): New struct.
3087 (visit_actioned_threads): Rewrite to be find_inferior callback.
3088 (resume): Call find_inferior.
3089 (handle_status): Replace accessing list implemention
3090 details with API function.
3091 (process_serial_event): Replace accessing list implemention details
3092 with API function.
3093 * target.c (set_desired_inferior): Replace accessing list implemention
3094 details with API function.
3095 * tracepoint.c (same_process_p): New function.
3096 (gdb_agent_about_to_close): Replace accessing list implemention
3097 details with API function.
3098 * win32-low.c (child_delete_thread): Replace accessing list
3099 implemention details with API function.
3100 (match_dll_by_basename): New function.
3101 (dll_is_loaded_by_basename): New function.
3102 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3103 details call to dll_is_loaded_by_basename.
3104
3105 2014-02-19 Doug Evans <dje@google.com>
3106
3107 * dll.h (struct dll_info): Add comment.
3108 * gdbthread.h (struct thread_info): Add comment.
3109 (current_ptid): Simplify.
3110 * inferiors.c (add_process): Update.
3111 (remove_process): Update.
3112 * inferiors.h (struct process_info): Rename member "head" to "entry".
3113 * linux-low.c (delete_lwp): Update.
3114 (add_lwp): Update.
3115 (last_thread_of_process_p): Update.
3116 (kill_one_lwp_callback, linux_kill): Update.
3117 (status_pending_p_callback): Update.
3118 (wait_for_sigstop): Update. Simplify read of ptid.
3119 (start_step_over): Update.
3120 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3121 (get_lwp_thread): Update.
3122 (struct lwp_info): Rename member "head" to "entry".
3123 * regcache.h (inferior_list_entry): Delete.
3124 * server.c (kill_inferior_callback): Update.
3125 (detach_or_kill_inferior_callback): Update.
3126 (print_started_pid): Update.
3127 (print_attached_pid): Update.
3128 (process_serial_event): Simplify read of ptid.
3129 * thread-db.c (thread_db_create_event): Update.
3130 (thread_db_get_tls_address): Update.
3131 * win32-low.c (current_inferior_ptid): Simplify.
3132
3133 2014-02-19 Tom Tromey <tromey@redhat.com>
3134
3135 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3136 argument.
3137 (target_supports_btrace): Update.
3138
3139 2014-02-14 Yao Qi <yao@codesourcery.com>
3140
3141 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3142 (rsp-low-ipa.o): New target.
3143
3144 2014-02-12 Tom Tromey <tromey@redhat.com>
3145
3146 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3147 convert_ascii_to_int.
3148 * regcache.c (registers_to_string): Likewise.
3149 * remote-utils.c (decode_M_packet): Likewise.
3150 * server.c (process_serial_event): Likewise.
3151
3152 2014-02-12 Tom Tromey <tromey@redhat.com>
3153
3154 * server.c (handle_query, handle_v_run): Use hex2bin, not
3155 unhexify.
3156 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3157
3158 2014-02-12 Tom Tromey <tromey@redhat.com>
3159
3160 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3161 convert_int_to_ascii.
3162 * regcache.c (registers_to_string, collect_register_as_string):
3163 Likewise.
3164 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3165 Likewise.
3166 * server.c (process_serial_event): Likewise.
3167 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3168 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3169
3170 2014-02-12 Tom Tromey <tromey@redhat.com>
3171
3172 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3173 bin2hex, not hexify.
3174 * tracepoint.c (cmd_qtstatus): Likewise.
3175
3176 2014-02-12 Tom Tromey <tromey@redhat.com>
3177
3178 * remote-utils.c (monitor_output): Pass explicit length to
3179 hexify.
3180
3181 2014-02-12 Tom Tromey <tromey@redhat.com>
3182
3183 * tracepoint.c: Include rsp-low.h.
3184 * server.c: Include rsp-low.h.
3185 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3186 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3187 declare.
3188 * remote-utils.c: Include rsp-low.h.
3189 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3190 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3191 (convert_int_to_ascii, convert_ascii_to_int): Move to
3192 common/rsp-low.c.
3193 * regcache.c: Include rsp-low.h.
3194 * ax.c: Include rsp-low.h.
3195 * Makefile.in (SFILES): Add common/rsp-low.c.
3196 (OBS): Add rsp-low.o.
3197 (rsp-low.o): New target.
3198
3199 2014-02-12 Tom Tromey <tromey@redhat.com>
3200
3201 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3202 Include print-utils.h.
3203 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3204 (plongest, thirty_two, phex_nz): Remove.
3205 * Makefile.in (SFILES): Add common/print-utils.c.
3206 (OBS): Add print-utils.o.
3207 (print-utils-ipa.o): New target.
3208 (print-utils.o): New target.
3209 (IPA_OBJS): Add print-utils-ipa.o.
3210
3211 2014-02-06 Tom Tromey <tromey@redhat.com>
3212
3213 * Makefile.in (SFILES): Fix indentation.
3214
3215 2014-02-05 Doug Evans <dje@google.com>
3216
3217 * linux-low.c (linux_wait_for_event): Improve comment.
3218 (linux_wait_1): Keep current_inferior in sync with event_child.
3219
3220 2014-01-22 Doug Evans <dje@google.com>
3221
3222 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3223
3224 2014-01-22 Doug Evans <dje@google.com>
3225
3226 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3227 * configure: Regenerate.
3228 * config.in: Regenerate.
3229 * Makefile.in (SFILES): Add debug.c.
3230 (OBS): Add debug.o.
3231 * debug.c: New file.
3232 * debug.h: New file.
3233 * linux-aarch64-low.c (*): Update all debugging printfs to use
3234 debug_printf instead of fprintf.
3235 * linux-arm-low.c (*): Ditto.
3236 * linux-cris-low.c (*): Ditto.
3237 * linux-crisv32-low.c (*): Ditto.
3238 * linux-m32r-low.c (*): Ditto.
3239 * linux-sparc-low.c (*): Ditto.
3240 * linux-x86.c (*): Ditto.
3241 * linux-low.c (*): Ditto.
3242 (linux_wait_1): Add calls to debug_enter, debug_exit.
3243 (linux_wait): Remove redundant debugging printf.
3244 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3245 (linux_resume, unstop_all_lwps): Ditto.
3246 * mem-break.c (*): Update all debugging printfs to use
3247 debug_printf instead of fprintf.
3248 * remote-utils.c (*): Ditto.
3249 * thread-db.c (*): Ditto.
3250 * server.c #include <ctype.h>, "gdb_vecs.h".
3251 (debug_threads): Moved to debug.c.
3252 (*): Update all debugging printfs to use debug_printf instead of
3253 fprintf.
3254 (start_inferior): Replace call to fflush with call to debug_flush.
3255 (monitor_show_help): Mention set debug-format.
3256 (parse_debug_format_options): New function.
3257 (handle_monitor_command): Handle "monitor set debug-format".
3258 (gdbserver_usage): Mention --debug-format.
3259 (main): Parse --debug-format.
3260 * server.h (debug_threads): Declaration moved to debug.h.
3261 #include "debug.h".
3262 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3263 trace_debug_1 that uses debug_printf.
3264 (tracepoint_look_up_symbols): Update all debugging printfs to use
3265 debug_printf instead of fprintf.
3266
3267 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3268
3269 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3270 sys/ptrace.h.
3271
3272 2014-01-17 Pedro Alves <palves@redhat.com>
3273
3274 PR build/16445
3275 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3276 defined after including gdb_proc_service.h.
3277
3278 2014-01-16 Doug Evans <dje@google.com>
3279
3280 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3281 (match_dll): Use it.
3282
3283 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3284
3285 * target.h (target_ops) <read_btrace>: Change parameters and
3286 return type to allow error reporting.
3287 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3288 trace reading errors on.
3289 * linux-low.c (linux_low_read_btrace): Pass trace reading
3290 errors on.
3291 (linux_low_disable_btrace): New.
3292
3293 2014-01-15 Doug Evans <dje@google.com>
3294
3295 * inferiors.c (thread_id_to_gdb_id): Delete.
3296 * inferiors.h (thread_id_to_gdb_id): Delete.
3297
3298 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3299
3300 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3301 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3302 versions.
3303
3304 2014-01-08 Pedro Alves <palves@redhat.com>
3305
3306 * server.c (handle_status): Don't discard previous queued stop
3307 replies or thread's pending status here.
3308 (main) <disconnection>: Do it here instead.
3309
3310 2014-01-08 Pedro Alves <palves@redhat.com>
3311
3312 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3313 * server.c (visit_actioned_threads, handle_pending_status): New
3314 function.
3315 (handle_v_cont): Factor out parts to ...
3316 (resume): ... this new function. If in all-stop, and a thread
3317 being resumed has a pending status, report it without actually
3318 resuming.
3319 (myresume): Adjust to use the new 'resume' function.
3320 (clear_pending_status_callback, set_pending_status_callback)
3321 (find_status_pending_thread_callback): New functions.
3322 (handle_status): Handle the case of multiple threads having
3323 interesting statuses to report. Report threads' real last signal
3324 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3325 with an interesting thread to report the status for, instead of
3326 always reporting the status of the first thread.
3327
3328 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3329
3330 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3331 * gdbreplay.c (gdbreplay_version): Likewise.
3332
3333 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3334
3335 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3336 iov.iov_len with the real length in use.
3337
3338 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3339
3340 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3341 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3342 for all targets that use win32-low.c.
3343 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3344 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3345
3346 2013-12-13 Pedro Alves <palves@redhat.com>
3347
3348 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3349 if equal to TARGET_WAITKIND_LOADED.
3350 * win32-low.c (cached_status): New static global.
3351 (win32_wait): Add declaration.
3352 (do_initial_child_stuff): Flush all initial pending debug events
3353 up to the initial breakpoint.
3354 (win32_wait): If CACHED_STATUS was set, return that instead
3355 of doing a real wait. Remove the code resuming the execution
3356 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3357 during the initial phase. Also remove the code changing
3358 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3359 TARGET_WAITKIND_STOPPED.
3360
3361 2013-12-11 Yao Qi <yao@codesourcery.com>
3362
3363 * notif.c (handle_notif_ack): Return 0 if no notification
3364 matches.
3365
3366 2013-11-20 Doug Evans <dje@google.com>
3367
3368 * linux-low.c (linux_set_resume_request): Fix comment.
3369
3370 2013-11-20 Doug Evans <dje@google.com>
3371
3372 * linux-low.c (resume_status_pending_p): Tweak comment.
3373
3374 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3375
3376 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3377 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3378 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3379 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3380 (srv_amd64_regobj): Add amd64-mpx.o.
3381 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3382 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3383 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3384 * i387-fp.c (num_pl_bnd_register) Added constant.
3385 (num_pl_bnd_cfg_registers) Added constant.
3386 (struct i387_xsave) Added reserved area and MPX fields.
3387 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3388 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3389 function.
3390 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3391 (init_registers_amd64_mpx_linux): Declare new function.
3392 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3393 (x86_64_regmap): Add MPX registers.
3394 (x86_linux_read_description): Add MPX case.
3395 (initialize_low_arch): Initialize MPX targets.
3396
3397 2013-11-18 Tom Tromey <tromey@redhat.com>
3398
3399 * configure: Rebuild.
3400 * configure.ac: Don't check for stdlib.h.
3401 * gdbreplay.c: Unconditionally include stdlib.h.
3402
3403 2013-11-18 Tom Tromey <tromey@redhat.com>
3404
3405 * config.in: Rebuild.
3406 * configure: Rebuild.
3407 * configure.ac: Don't use AC_HEADER_DIRENT.
3408
3409 2013-11-18 Tom Tromey <tromey@redhat.com>
3410
3411 * server.h: Don't check HAVE_STRING_H.
3412 * gdbreplay.c: Don't check HAVE_STRING_H.
3413 * configure: Rebuild.
3414
3415 2013-11-18 Tom Tromey <tromey@redhat.com>
3416
3417 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3418 LIBGNU.
3419
3420 2013-11-08 Tom Tromey <tromey@redhat.com>
3421
3422 * configure, config.in: Rebuild.
3423 * configure.ac: Remove unused configury.
3424
3425 2013-11-08 Tom Tromey <tromey@redhat.com>
3426
3427 * acinclude.m4: Include common.m4, codeset.m4.
3428 * configure, config.in: Rebuild.
3429 * configure.ac: Use GDB_AC_COMMON.
3430
3431 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3432
3433 * linux-s390-low.c (HWCAP_S390_TE): New define.
3434 (s390_arch_setup): Consider the TE field in the HWCAP for
3435 determining 'have_regset_tdb'.
3436
3437 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3438
3439 PR gdb/16014
3440 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3441 call to sizeof.
3442
3443 2013-10-02 Pedro Alves <palves@redhat.com>
3444
3445 * server.c (process_serial_event): Don't output "GDBserver
3446 exiting" if GDB is connected through stdio.
3447 * target.c (mywait): Likewise, be silent if GDB is connected
3448 through stdio.
3449
3450 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3451
3452 * lynx-low.c (lynx_add_threads_after_attach): New function.
3453 (lynx_attach): Remove call to add_thread. Add call to
3454 lynx_add_threads_after_attach instead.
3455
3456 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3457
3458 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3459 * config.in, configure: Regenerated.
3460
3461 2013-09-18 Yao Qi <yao@codesourcery.com>
3462
3463 PR server/15959
3464 * server.c (start_inferior): Clear 'resume_info'.
3465
3466 2013-09-16 Jiong Wang <jiwang@tilera.com>
3467
3468 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3469 for each register.
3470
3471 2013-09-16 Jiong Wang <jiwang@tilera.com>
3472
3473 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3474 linux-tile-low.o to srv_tgtobj.
3475
3476 2013-09-16 Will Newton <will.newton@linaro.org>
3477
3478 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3479 out regs.
3480
3481 2013-09-06 Pedro Alves <palves@redhat.com>
3482
3483 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3484 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3485 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3486 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3487 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3488 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3489
3490 2013-09-06 Pedro Alves <palves@redhat.com>
3491
3492 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3493 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3494
3495 2013-09-06 Pedro Alves <palves@redhat.com>
3496
3497 * linux-amd64-ipa.c: Include tracepoint.h.
3498 * linux-i386-ipa.c: Include tracepoint.h.
3499
3500 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3501
3502 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3503 (ps_get_thread_area): New function.
3504
3505 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3506
3507 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3508 (initialize_low_arch): Call init_registers_crisv32 rather than
3509 init_register_crisv32.
3510
3511 2013-09-05 Pedro Alves <palves@redhat.com>
3512
3513 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3514 to ...
3515 * hostio.h: ... this new file.
3516 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3517 win32-low.c: Include hostio.h.
3518
3519 2013-09-05 Pedro Alves <palves@redhat.com>
3520
3521 * server.h (gdb_client_data, handler_func, callback_handler_func)
3522 (delete_file_handler, add_file_handler, append_callback_event)
3523 (delete_callback_event, start_event_loop, initialize_event_loop):
3524 Move to event-loop.h and include it.
3525 * event-loop.h: New file.
3526
3527 2013-09-05 Pedro Alves <palves@redhat.com>
3528
3529 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3530 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3531 (loaded_dll, unloaded_dll): Move to ...
3532 * dll.h: ... this new file.
3533 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3534
3535 2013-09-05 Pedro Alves <palves@redhat.com>
3536
3537 * server.h (current_process, get_thread_process, all_processes)
3538 (add_inferior_to_list, for_each_inferior, current_inferior)
3539 (remove_inferior, add_process, remove_process, find_process_pid)
3540 (have_started_inferiors_p, have_attached_inferiors_p)
3541 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3542 (clear_inferiors, find_inferior, find_inferior_id)
3543 (inferior_target_data, set_inferior_target_data)
3544 (inferior_regcache_data, set_inferior_regcache_data): Move to
3545 inferiors.h, and include it.
3546 * inferiors.h: New file.
3547
3548 2013-09-05 Pedro Alves <palves@redhat.com>
3549
3550 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3551 Move ...
3552 * ax.h: ... here.
3553
3554 2013-09-05 Pedro Alves <palves@redhat.com>
3555
3556 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3557 tracepoint.h.
3558 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3559 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3560 (handle_tracepoint_general_set, handle_tracepoint_query)
3561 (tracepoint_finished_step, tracepoint_was_hit)
3562 (release_while_stepping_state_list, current_traceframe)
3563 (in_readonly_region, traceframe_read_mem)
3564 (fetch_traceframe_registers, traceframe_read_sdata)
3565 (traceframe_read_info, struct fast_tpoint_collect_status)
3566 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3567 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3568 (supply_fast_tracepoint_registers)
3569 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3570 (ipa_tdesc, claim_trampoline_space)
3571 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3572 (agent_mem_read, agent_get_trace_state_variable_value)
3573 (agent_set_trace_state_variable_value, agent_tsv_read)
3574 (agent_mem_read_string, get_raw_reg_func_addr)
3575 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3576 * tracepoint.h: ... this new file.
3577
3578 2013-09-05 Pedro Alves <palves@redhat.com>
3579
3580 * server.h (perror_with_name, error, fatal, warning, paddress)
3581 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3582 include it.
3583 * utils.h: New file.
3584
3585 2013-09-05 Pedro Alves <palves@redhat.com>
3586
3587 * server.h (remote_debug, noack_mode, transport_is_reliable)
3588 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3589 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3590 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3591 (write_enn, initialize_async_io, enable_async_io)
3592 (disable_async_io, check_remote_input_interrupt_request)
3593 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3594 (dead_thread_notify, prepare_resume_reply)
3595 (decode_address_to_semicolon, decode_address, decode_m_packet)
3596 (decode_M_packet, decode_X_packet, decode_xfer_write)
3597 (decode_search_memory_packet, unhexify, hexify)
3598 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3599 (look_up_one_symbol, relocate_instruction)
3600 (monitor_output): Move to remote-utils.h, and include it.
3601 * remote-utils.h: New file.
3602
3603 2013-09-05 Pedro Alves <palves@redhat.com>
3604
3605 * server.h (_): Delete.
3606
3607 2013-09-02 Pedro Alves <palves@redhat.com>
3608
3609 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3610 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3611 allocated.
3612 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3613
3614 2013-09-02 Pierre Muller <muller@sourceware.org>
3615
3616 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3617 or WriteProcessMemory complete successfully and handle
3618 ERROR_PARTIAL_COPY error.
3619
3620 2013-09-02 Pedro Alves <palves@redhat.com>
3621
3622 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3623 error instead of EIO.
3624
3625 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3626
3627 PR server/15604
3628 * linux-low.c: Include filestuff.h.
3629 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3630 * lynx-low.c: Include filestuff.h.
3631 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3632 * server.c: Include filestuff.h.
3633 (main): Call notice_open_fds.
3634 * spu-low.c: Include filestuff.h.
3635 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3636
3637 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3638
3639 * Makefile.in: Explain why ../target and ../nat are not
3640 listed as include file search paths.
3641 (linux-waitpid.o): New object file rule.
3642 * configure.srv (srv_native_linux_obj): New variable.
3643 Replace all occurrences of linux native object files with
3644 $srv_native_linux_obj.
3645 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3646 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3647 (linux_enable_event_reporting): Remove declaration.
3648 (my_waitpid): Moved to common/linux-waitpid.c.
3649 (linux_wait_for_event): Pass ptid when calling
3650 linux_enable_event_reporting.
3651 (linux_supports_tracefork_flag): Remove.
3652 (linux_enable_event_reporting): Likewise.
3653 (linux_tracefork_grandchild): Remove.
3654 (STACK_SIZE): Moved to common/linux-ptrace.c.
3655 (linux_tracefork_child): Remove.
3656 (linux_test_for_tracefork): Remove.
3657 (linux_look_up_symbols): Call linux_supports_traceclone.
3658 (initialize_low): Remove call to linux_test_for_tracefork.
3659 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3660 common/linux-ptrace.h.
3661 (PTRACE_TYPE_ARG4): Likewise.
3662 Include linux-ptrace.h.
3663
3664 2013-08-21 Pedro Alves <palves@redhat.com>
3665
3666 * config.in: Renegerate.
3667
3668 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3669
3670 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3671 (SFILES): Remove $(srcdir)/common/target-common.c and
3672 add $(srcdir)/target/waitstatus.c.
3673 (OBS): Remove target-common.o and add waitstatus.o.
3674 (server_h): Remove $(srcdir)/../common/target-common.h and
3675 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3676 and $(srcdir)/../target/waitstatus.h.
3677 (target-common.o): Remove.
3678 (waitstatus.o): New target object file.
3679 * target.h: Do not include target-common.h and
3680 include target/resume.h, target/wait.h and
3681 target/waitstatus.h.
3682
3683 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3684
3685 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3686 to PTRACE_TYPE_ARG3.
3687 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3688 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3689 PTRACE_TYPE_ARG4.
3690 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3691 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3692
3693 2013-07-27 Jie Zhang <jie@codesourcery.com>
3694 Daniel Jacobowitz <dan@codesourcery.com>
3695 Yao Qi <yao@codesourcery.com>
3696
3697 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3698 (mips-linux-watch.o): New rule.
3699 (mips_linux_watch_h): New variable.
3700 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3701 srv_tgtobj.
3702 * linux-mips-low.c: Include mips-linux-watch.h.
3703 (struct arch_process_info, struct arch_lwp_info): New.
3704 (update_watch_registers_callback): New function.
3705 (mips_linux_new_process, mips_linux_new_thread) New functions.
3706 (mips_linux_prepare_to_resume, mips_insert_point): New
3707 functions.
3708 (mips_remove_point, mips_stopped_by_watchpoint): New
3709 functions.
3710 (rsp_bp_type_to_target_hw_bp_type): New function.
3711 (mips_stopped_data_address): New function.
3712 (the_low_target): Add watchpoint support functions.
3713
3714 2013-07-27 Yao Qi <yao@codesourcery.com>
3715
3716 * i386-low.c: Include break-common.h.
3717 (enum target_hw_bp_type): Remove.
3718
3719 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3720
3721 * Makefile.in (SFILES): /common/target-common.c.
3722 (OBS): Add target-common.o.
3723 (server_h): Add $(srcdir)/../common/target-common.h.
3724 (target-common.o): New target.
3725 * server.c (queue_stop_reply_callback): Free
3726 status string after use.
3727 * target.c (target_waitstatus_to_string): Remove.
3728 * target.h: Include target-common.h.
3729 (resume_kind): Likewise.
3730 (target_waitkind): Likewise.
3731 (target_waitstatus): Likewise.
3732 (TARGET_WNOHANG): Likewise.
3733
3734 2013-07-04 Yao Qi <yao@codesourcery.com>
3735
3736 * Makefile.in (host_alias): Use @host_noncanonical@.
3737 (target_alias): Use @target_noncanonical@.
3738 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3739 ACX_NONCANONICAL_HOST.
3740 * configure: Regenerated.
3741
3742 Revert:
3743 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3744
3745 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3746 * configure: Rebuild.
3747 * Makefile.in (version_host, version_target): Get from configure.
3748 (version.c): Use $(version_host) and $(version_target).
3749
3750 2013-07-03 Pedro Alves <palves@redhat.com>
3751
3752 * Makefile.in (config.status): Depend on development.sh.
3753 * acinclude.m4: Include libmcheck.m4.
3754 * configure: Regenerate.
3755
3756 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3757
3758 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3759 attribute inside the parentheses.
3760 (winapi_DebugSetProcessKillOnExit): Ditto.
3761 (winapi_DebugBreakProcess): Ditto.
3762 (winapi_GenerateConsoleCtrlEvent): Ditto.
3763
3764 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3765
3766 * notif.h (notif_event): Add a dummy member to avoid compiler
3767 errors.
3768
3769 2013-07-01 Pedro Alves <palves@redhat.com>
3770
3771 * hostio.c (HOSTIO_PATH_MAX): Define.
3772 (require_filename, handle_open, handle_unlink, handle_readlink):
3773 Use it.
3774
3775 2013-07-01 Pedro Alves <palves@redhat.com>
3776
3777 * server.h: Include "pathmax.h".
3778 * linux-low.c: Don't include sys/param.h.
3779 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3780 MAXPATHLEN.
3781 * win32-low.c: Don't include sys/param.h.
3782 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3783
3784 2013-07-01 Pedro Alves <palves@redhat.com>
3785
3786 * event-loop.c: Don't check HAVE_UNISTD_H before including
3787 <unistd.h>.
3788 * gdbreplay.c: Likewise.
3789 * remote-utils.c: Likewise.
3790 * server.c: Likewise.
3791 * configure.ac: Don't check for unistd.h.
3792 * configure: Regenerate.
3793
3794 2013-06-28 Tom Tromey <tromey@redhat.com>
3795
3796 * Makefile.in (version.c): Use version.in, not
3797 common/version.in.
3798
3799 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3800
3801 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3802 * configure: Rebuild.
3803 * Makefile.in (version_host, version_target): Get from configure.
3804 (version.c): Use $(version_host) and $(version_target).
3805
3806 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3807
3808 Fix trace-status to output user name without trailing colon.
3809 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3810
3811 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3812
3813 Fix trace-status to output proper start-time and stop-time.
3814 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3815 output start time and stop time in hex as gdb expects.
3816
3817 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3818
3819 * tracepoint.c (build_traceframe_info_xml): Output trace state
3820 variables present in the trace buffer.
3821
3822 2013-06-24 Tom Tromey <tromey@redhat.com>
3823
3824 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3825 create-version.sh.
3826 (version.o): Remove.
3827 * gdbreplay.c: Include version.h.
3828 (version, host_name): Don't declare.
3829 * server.h: Include version.h.
3830 (version, host_name): Don't declare.
3831
3832 2013-06-12 Pedro Alves <palves@redhat.com>
3833
3834 * linux-x86-low.c (linux_is_elf64): Delete global.
3835 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3836 with local linux_pid_exe_is_elf_64_file use.
3837
3838 2013-06-11 Pedro Alves <palves@redhat.com>
3839
3840 * linux-low.c (regset_disabled, disable_regset): New functions.
3841 (regsets_fetch_inferior_registers)
3842 (regsets_store_inferior_registers): Use them.
3843 (initialize_regsets_info); Don't allocate the disabled_regsets
3844 array here.
3845 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3846 comment.
3847
3848 2013-06-11 Pedro Alves <palves@redhat.com>
3849
3850 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3851 xmalloc.
3852
3853 2013-06-11 Pedro Alves <palves@redhat.com>
3854
3855 * linux-x86-low.c (initialize_low_arch): Call
3856 init_registers_x32_avx_linux.
3857
3858 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3859
3860 Fix compatibility with Android Bionic.
3861 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3862 it is not empty.
3863
3864 2013-06-07 Pedro Alves <palves@redhat.com>
3865
3866 PR server/14823
3867 * Makefile.in (OBS): Add tdesc.o.
3868 (IPA_OBJS): Add tdesc-ipa.o.
3869 (tdesc-ipa.o): New rule.
3870 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3871 interface.
3872 * linux-low.c (new_inferior): Delete.
3873 (disabled_regsets, num_regsets): Delete.
3874 (linux_add_process): Adjust to set the new per-process
3875 new_inferior flag.
3876 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3877 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3878 was a stop. When calling arch_setup, switch the current inferior
3879 to the thread that got an event.
3880 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3881 (regsets_fetch_inferior_registers)
3882 (regsets_store_inferior_registers): New regsets_info parameter.
3883 Adjust to use it.
3884 (linux_register_in_regsets): New regs_info parameter. Adjust to
3885 use it.
3886 (register_addr, fetch_register, store_register): New usrregs_info
3887 parameter. Adjust to use it.
3888 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3889 parameter regs_info. Adjust to use it.
3890 (linux_fetch_registers): Get the current inferior's regs_info, and
3891 adjust to use it.
3892 (linux_store_registers): Ditto.
3893 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3894 (initialize_low): Don't initialize the target_regsets here. Call
3895 initialize_low_arch.
3896 * linux-low.h (target_regsets): Delete declaration.
3897 (struct regsets_info): New.
3898 (struct usrregs_info): New.
3899 (struct regs_info): New.
3900 (struct process_info_private) <new_inferior>: New field.
3901 (struct linux_target_ops): Delete the num_regs, regmap, and
3902 regset_bitmap fields. New field regs_info.
3903 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3904 * i387-fp.c (num_xmm_registers): Delete.
3905 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3906 calls to new interface.
3907 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3908 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3909 Infer the number of xmm registers from the regcache's target
3910 description.
3911 * i387-fp.h (num_xmm_registers): Delete.
3912 * inferiors.c (add_thread): Don't install the thread's regcache
3913 here.
3914 * proc-service.c (gregset_info): Fetch the current inferior's
3915 regs_info. Adjust to use it.
3916 * regcache.c: Include tdesc.h.
3917 (register_bytes, reg_defs, num_registers)
3918 (gdbserver_expedite_regs): Delete.
3919 (get_thread_regcache): If the thread doesn't have a regcache yet,
3920 create one, instead of aborting gdbserver.
3921 (regcache_invalidate_one): Rename to ...
3922 (regcache_invalidate_thread): ... this.
3923 (regcache_invalidate_one): New.
3924 (regcache_invalidate): Only invalidate registers of the current
3925 process.
3926 (init_register_cache): Add target_desc parameter, and use it.
3927 (new_register_cache): Ditto. Assert the target description has a
3928 non zero registers_size.
3929 (regcache_cpy): Add assertions. Adjust.
3930 (realloc_register_cache, set_register_cache): Delete.
3931 (registers_to_string, registers_from_string): Adjust.
3932 (find_register_by_name, find_regno, find_register_by_number)
3933 (register_cache_size): Add target_desc parameter, and use it.
3934 (free_register_cache_thread, free_register_cache_thread_one)
3935 (regcache_release, register_cache_size): New.
3936 (register_size): Add target_desc parameter, and use it.
3937 (register_data, supply_register, supply_register_zeroed)
3938 (supply_regblock, supply_register_by_name, collect_register)
3939 (collect_register_as_string, collect_register_by_name): Adjust.
3940 * regcache.h (struct target_desc): Forward declare.
3941 (struct regcache) <tdesc>: New field.
3942 (init_register_cache, new_register_cache): Add target_desc
3943 parameter.
3944 (regcache_invalidate_thread): Declare.
3945 (regcache_invalidate_one): Delete declaration.
3946 (regcache_release): Declare.
3947 (find_register_by_number, register_cache_size, register_size)
3948 (find_regno): Add target_desc parameter.
3949 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3950 declarations.
3951 * remote-utils.c: Include tdesc.h.
3952 (outreg, prepare_resume_reply): Adjust.
3953 * server.c: Include tdesc.h.
3954 (gdbserver_xmltarget): Delete declaration.
3955 (get_features_xml, process_serial_event): Adjust.
3956 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3957 declare.
3958 (struct process_info) <tdesc>: New field.
3959 (ipa_tdesc): Declare.
3960 * tdesc.c: New file.
3961 * tdesc.h: New file.
3962 * tracepoint.c: Include tdesc.h.
3963 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3964 (get_context_regcache): Adjust to pass ipa_tdesc down.
3965 (do_action_at_tracepoint): Adjust to get the register cache size
3966 from the context regcache's description.
3967 (traceframe_walk_blocks): Adjust to get the register cache size
3968 from the current trace frame's description.
3969 (traceframe_get_pc): Adjust to get current trace frame's
3970 description and pass it down.
3971 (gdb_collect): Adjust to get the register cache size from the
3972 IPA's description.
3973 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3974 (gdbserver_xmltarget): Delete.
3975 (initialize_low_tracepoint): Set the ipa's target description.
3976 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3977 (initialize_low_tracepoint): Set the ipa's target description.
3978 * linux-x86-low.c: Include tdesc.h.
3979 [__x86_64__] (is_64bit_tdesc): New.
3980 (ps_get_thread_area, x86_get_thread_area): Use it.
3981 (i386_cannot_store_register): Rename to ...
3982 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3983 (i386_cannot_fetch_register): Rename to ...
3984 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3985 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3986 to new interface.
3987 (target_regsets): Rename to ...
3988 (x86_regsets): ... this.
3989 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3990 interface.
3991 (x86_siginfo_fixup): Use is_64bit_tdesc.
3992 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3993 (tdesc_x32_avx_linux, tdesc_x32_linux)
3994 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3995 Declare.
3996 (x86_linux_update_xmltarget): Delete.
3997 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3998 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3999 (AMD64_LINUX_USER64_CS): New.
4000 (x86_linux_read_description): New, based on
4001 x86_linux_update_xmltarget.
4002 (same_process_callback): New.
4003 (x86_arch_setup_process_callback): New.
4004 (x86_linux_update_xmltarget): New.
4005 (x86_regsets_info): New.
4006 (amd64_linux_regs_info): New.
4007 (i386_linux_usrregs_info): New.
4008 (i386_linux_regs_info): New.
4009 (x86_linux_regs_info): New.
4010 (x86_arch_setup): Reimplement.
4011 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4012 (x86_emit_ops): Ditto.
4013 (the_low_target): Adjust. Install x86_linux_regs_info,
4014 x86_cannot_fetch_register, and x86_cannot_store_register.
4015 (initialize_low_arch): New.
4016 * linux-ia64-low.c (tdesc_ia64): Declare.
4017 (ia64_fetch_register): Adjust.
4018 (ia64_usrregs_info, regs_info): New globals.
4019 (ia64_regs_info): New function.
4020 (the_low_target): Adjust.
4021 (initialize_low_arch): New function.
4022 * linux-sparc-low.c (tdesc_sparc64): Declare.
4023 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4024 Adjust.
4025 (sparc_arch_setup): New function.
4026 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4027 (the_low_target): Adjust.
4028 (initialize_low_arch): New function.
4029 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4030 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4031 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4032 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4033 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4034 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4035 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4036 (tdesc_powerpc_isa205_vsx64l): Declare.
4037 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4038 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4039 (ppc_set_pc, ppc_get_hwcap): Adjust.
4040 (ppc_usrregs_info): Forward declare.
4041 (!__powerpc64__) ppc_regmap_adjusted: New global.
4042 (ppc_arch_setup): Adjust to the current process'es target
4043 description.
4044 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4045 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4046 (ppc_store_evrregset): Adjust.
4047 (target_regsets): Rename to ...
4048 (ppc_regsets): ... this, and make static.
4049 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4050 (ppc_regs_info): New function.
4051 (the_low_target): Adjust.
4052 (initialize_low_arch): New function.
4053 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4054 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4055 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4056 (tdesc_s390x_linux64v2): Declare.
4057 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4058 (s390_fill_gregset, s390_store_last_break): Adjust.
4059 (target_regsets): Rename to ...
4060 (s390_regsets): ... this, and make static.
4061 (s390_get_pc, s390_set_pc): Adjust.
4062 (s390_get_hwcap): New target_desc parameter, and use it.
4063 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4064 (s390_arch_setup): Adjust to set the current process'es target
4065 description. Don't adjust the regmap.
4066 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4067 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4068 (regs_info_3264): New globals.
4069 (s390_regs_info): New function.
4070 (the_low_target): Adjust.
4071 (initialize_low_arch): New function.
4072 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4073 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4074 [__mips64] (init_registers_mips_linux)
4075 (init_registers_mips_dsp_linux): Delete defines.
4076 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4077 (have_dsp): New global.
4078 (mips_read_description): New, based on mips_arch_setup.
4079 (mips_arch_setup): Reimplement.
4080 (get_usrregs_info): New function.
4081 (mips_cannot_fetch_register, mips_cannot_store_register)
4082 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4083 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4084 (target_regsets): Rename to ...
4085 (mips_regsets): ... this, and make static.
4086 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4087 (dsp_regs_info, regs_info): New globals.
4088 (mips_regs_info): New function.
4089 (the_low_target): Adjust.
4090 (initialize_low_arch): New function.
4091 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4092 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4093 Declare.
4094 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4095 (arm_read_description): New, with bits factored from
4096 arm_arch_setup.
4097 (arm_arch_setup): Reimplement.
4098 (target_regsets): Rename to ...
4099 (arm_regsets): ... this, and make static.
4100 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4101 (arm_regs_info): New function.
4102 (the_low_target): Adjust.
4103 (initialize_low_arch): New function.
4104 * linux-m68k-low.c (tdesc_m68k): Declare.
4105 (target_regsets): Rename to ...
4106 (m68k_regsets): ... this, and make static.
4107 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4108 (m68k_regs_info): New function.
4109 (m68k_arch_setup): New function.
4110 (the_low_target): Adjust.
4111 (initialize_low_arch): New function.
4112 * linux-sh-low.c (tdesc_sharch): Declare.
4113 (target_regsets): Rename to ...
4114 (sh_regsets): ... this, and make static.
4115 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4116 (sh_regs_info, sh_arch_setup): New functions.
4117 (the_low_target): Adjust.
4118 (initialize_low_arch): New function.
4119 * linux-bfin-low.c (tdesc_bfin): Declare.
4120 (bfin_arch_setup): New function.
4121 (bfin_usrregs_info, regs_info): New globals.
4122 (bfin_regs_info): New function.
4123 (the_low_target): Adjust.
4124 (initialize_low_arch): New function.
4125 * linux-cris-low.c (tdesc_cris): Declare.
4126 (cris_arch_setup): New function.
4127 (cris_usrregs_info, regs_info): New globals.
4128 (cris_regs_info): New function.
4129 (the_low_target): Adjust.
4130 (initialize_low_arch): New function.
4131 * linux-cris-low.c (tdesc_crisv32): Declare.
4132 (cris_arch_setup): New function.
4133 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4134 (cris_regs_info): New function.
4135 (the_low_target): Adjust.
4136 (initialize_low_arch): New function.
4137 * linux-m32r-low.c (tdesc_m32r): Declare.
4138 (m32r_arch_setup): New function.
4139 (m32r_usrregs_info, regs_info): New globals.
4140 (m32r_regs_info): Adjust.
4141 (initialize_low_arch): New function.
4142 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4143 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4144 (tic6x_usrregs_info): Forward declare.
4145 (tic6x_read_description): New function, based on ...
4146 (tic6x_arch_setup): ... this. Reimplement.
4147 (target_regsets): Rename to ...
4148 (tic6x_regsets): ... this, and make static.
4149 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4150 (tic6x_regs_info): New function.
4151 (the_low_target): Adjust.
4152 (initialize_low_arch): New function.
4153 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4154 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4155 (target_regsets): Rename to ...
4156 (xtensa_regsets): ... this, and make static.
4157 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4158 globals.
4159 (xtensa_arch_setup, xtensa_regs_info): New functions.
4160 (the_low_target): Adjust.
4161 (initialize_low_arch): New function.
4162 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4163 (nios2_arch_setup): Set the current process'es tdesc.
4164 (target_regsets): Rename to ...
4165 (nios2_regsets): ... this.
4166 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4167 (nios2_regs_info): New function.
4168 (the_low_target): Adjust.
4169 (initialize_low_arch): New function.
4170 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4171 (aarch64_arch_setup): Set the current process'es tdesc.
4172 (target_regsets): Rename to ...
4173 (aarch64_regsets): ... this.
4174 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4175 (aarch64_regs_info): New function.
4176 (the_low_target): Adjust.
4177 (initialize_low_arch): New function.
4178 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4179 globals.
4180 (target_regsets): Rename to ...
4181 (tile_regsets): ... this.
4182 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4183 (tile_regs_info): New function.
4184 (tile_arch_setup): Set the current process'es tdesc.
4185 (the_low_target): Adjust.
4186 (initialize_low_arch): New function.
4187 * spu-low.c (tdesc_spu): Declare.
4188 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4189 * win32-arm-low.c (tdesc_arm): Declare.
4190 (arm_arch_setup): New function.
4191 (the_low_target): Install arm_arch_setup instead of
4192 init_registers_arm.
4193 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4194 (init_windows_x86): Rename to ...
4195 (i386_arch_setup): ... this. Set `win32_tdesc'.
4196 (the_low_target): Adjust.
4197 * win32-low.c (win32_tdesc): New global.
4198 (child_add_thread): Don't create the thread cache here.
4199 (do_initial_child_stuff): Set the new process'es tdesc.
4200 * win32-low.h (struct target_desc): Forward declare.
4201 (win32_tdesc): Declare.
4202 * lynx-i386-low.c (tdesc_i386): Declare global.
4203 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4204 * lynx-low.c (lynx_tdesc): New global.
4205 (lynx_add_process): Set the new process'es tdesc.
4206 * lynx-low.h (struct target_desc): Forward declare.
4207 (lynx_tdesc): Declare global.
4208 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4209 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4210 * nto-low.c (nto_tdesc): New global.
4211 (do_attach): Set the new process'es tdesc.
4212 * nto-low.h (struct target_desc): Forward declare.
4213 (nto_tdesc): Declare.
4214 * nto-x86-low.c (tdesc_i386): Declare.
4215 (nto_x86_arch_setup): Set `nto_tdesc'.
4216
4217 2013-06-04 Gary Benson <gbenson@redhat.com>
4218
4219 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4220 to qSupported response when appropriate.
4221 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4222 with nonzero-length annex.
4223 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4224 arguments supplied in annex.
4225
4226 2013-05-31 Doug Evans <dje@google.com>
4227
4228 PR server/15594
4229 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4230 64 bits in 64-cross-32 environment.
4231
4232 2013-05-28 Pedro Alves <palves@redhat.com>
4233
4234 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4235 (aarch64-without-fpu.c): Delete rule.
4236 * configure.srv (aarch64*-*-linux*): Remove references to
4237 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4238 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4239 declaration.
4240
4241 2013-05-24 Pedro Alves <palves@redhat.com>
4242
4243 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4244 instead of strchr/decode_address. Error if the range isn't split
4245 with a ','. Don't assume there's be a ':' in the action.
4246
4247 2013-05-23 Yao Qi <yao@codesourcery.com>
4248 Pedro Alves <palves@redhat.com>
4249
4250 * linux-low.c (lwp_in_step_range): New function.
4251 (linux_wait_1): If the thread was range stepping and stopped
4252 outside the stepping range, report the stop to GDB. Otherwise,
4253 continue stepping. Add range stepping debug output.
4254 (linux_set_resume_request): Copy the step range from the resume
4255 request to the lwp.
4256 (linux_supports_range_stepping): New.
4257 (linux_target_ops) <supports_range_stepping>: Set to
4258 linux_supports_range_stepping.
4259 * linux-low.h (struct linux_target_ops)
4260 <supports_range_stepping>: New field.
4261 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4262 * linux-x86-low.c (x86_supports_range_stepping): New.
4263 (the_low_target) <supports_range_stepping>: Set to
4264 x86_supports_range_stepping.
4265 * server.c (handle_v_cont): Handle 'r' action.
4266 (handle_v_requests): Append ";r" if the target supports range
4267 stepping.
4268 * target.h (struct thread_resume) <step_range_start,
4269 step_range_end>: New fields.
4270 (struct target_ops) <supports_range_stepping>:
4271 New field.
4272 (target_supports_range_stepping): New macro.
4273
4274 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4275
4276 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4277 confusion in comment.
4278
4279 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4280
4281 * lynx-low.c (struct process_info_private): New type.
4282 (lynx_add_process): New function.
4283 (lynx_create_inferior, lynx_attach): Replace calls to
4284 add_process by calls to lynx_add_process.
4285 (lynx_resume): If PTID is null, then try using
4286 current_process()->private->last_wait_event_ptid.
4287 Add comments.
4288 (lynx_clear_inferiors): Delete. The contents of that function
4289 has been inlined in lynx_mourn;
4290 (lynx_wait_1): Save the ptid in the process's private data.
4291 (lynx_mourn): Free the process' private data. Replace call
4292 to lynx_clear_inferiors by call to clear_inferiors.
4293
4294 2013-05-17 Yao Qi <yao@codesourcery.com>
4295
4296 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4297 the right place.
4298
4299 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4300
4301 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4302 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4303 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4304 PT_TEXT_END_ADDR guards. Update comments.
4305 (linux_target_op) <read_offsets>: Conditionally define to
4306 linux_read_offsets if the target is UCLIBC and if it defines
4307 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4308
4309 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4310 Andrew Jenner <andrew@codesourcery.com>
4311
4312 * Makefile.in (SFILES): Add linux-nios2-low.c.
4313 (clean): Add action to delete nios2-linux.c.
4314 (nios2-linux.c): New rule.
4315 * configure.srv: Add nios2*-*-linux*.
4316 * linux-nios2-low.c: New.
4317
4318 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4319
4320 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4321
4322 2013-04-25 Hui Zhu <hui@codesourcery.com>
4323
4324 PR gdb/15186
4325 * ax.c (ax_printf): Add fflush.
4326
4327 2013-04-22 Tom Tromey <tromey@redhat.com>
4328
4329 * Makefile.in (SFILES): Add filestuff.c.
4330 (OBS): Add filestuff.o.
4331 (filestuff.o): New target.
4332 * config.in, configure: Rebuild.
4333 * configure.ac: Check for fdwalk, pipe2.
4334
4335 2013-04-17 Pedro Alves <palves@redhat.com>
4336
4337 * configure.ac (USE_THREAD_DB): Delete variable.
4338 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4339 Don't AC_SUBST USE_THREAD_DB.
4340 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4341 * config.in, configure: Regenerate.
4342
4343 2013-04-16 Pedro Alves <palves@redhat.com>
4344
4345 * linux-low.h (struct lwp_info) <thread_known>: Move under
4346 the USE_THREAD_DB #ifdef.
4347
4348 2013-04-16 Pedro Alves <palves@redhat.com>
4349
4350 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4351 (linux-low.o): Delete rule.
4352 * linux-low.h: Always include "gdb_thread_db.h" instead of
4353 conditionally including thread_db.h.
4354 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4355 HAVE_THREAD_DB_H.
4356
4357 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4358
4359 * Makefile.in (install-only): Fix make install regression.
4360
4361 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4362
4363 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4364 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4365 installation.
4366 * gdbserver.1: Remove.
4367
4368 2013-03-22 Pedro Alves <palves@redhat.com>
4369
4370 * linux-low.c (handle_extended_wait): Don't call
4371 linux_enable_event_reporting.
4372
4373 2013-03-15 Tony Theodore <tonyt@logyst.com>
4374
4375 PR build/9098:
4376 * Makefile.in (SHELL): Use @SHELL@.
4377
4378 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4379
4380 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4381 compiler warning.
4382
4383 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4384
4385 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4386 Remove extraneous NULL element.
4387
4388 2013-03-13 Yao Qi <yao@codesourcery.com>
4389
4390 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4391 'V' block in trace frame.
4392
4393 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4394
4395 * target.h (struct target_ops): Add btrace ops.
4396 (target_supports_btrace): New macro.
4397 (target_enable_btrace): New macro.
4398 (target_disable_btrace): New macro.
4399 (target_read_btrace): New macro.
4400 * gdbthread.h (struct thread_info): Add btrace field.
4401 * server.c: Include btrace-common.h.
4402 (handle_btrace_general_set): New function.
4403 (handle_btrace_enable): New function.
4404 (handle_btrace_disable): New function.
4405 (handle_general_set): Call handle_btrace_general_set.
4406 (handle_qxfer_btrace): New function.
4407 (struct qxfer qxfer_packets[]): Add btrace entry.
4408 * inferiors.c (remove_thread): Disable btrace.
4409 * linux-low: Include linux-btrace.h.
4410 (linux_low_enable_btrace): New function.
4411 (linux_low_read_btrace): New function.
4412 (linux_target_ops): Add btrace ops.
4413 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4414 Add srv_linux_btrace=yes.
4415 (x86_64-*-linux*): Add linux-btrace.o.
4416 Add srv_linux_btrace=yes.
4417 * configure.ac: Define HAVE_LINUX_BTRACE.
4418 * config.in: Regenerated.
4419 * configure: Regenerated.
4420
4421 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4422
4423 * server.c (handle_qxfer): Preserve error message if -3 is
4424 returned.
4425 (qxfer): Document the -3 return value.
4426
4427 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4428
4429 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4430 (linux_btrace_h): New variable.
4431 (linux-btrace.o): New rule.
4432
4433 2013-03-08 Stan Shebs <stan@codesourcery.com>
4434 Hafiz Abid Qadeer <abidh@codesourcery.com>
4435
4436 * tracepoint.c (trace_buffer_size): New global.
4437 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4438 (init_trace_buffer): Change to one-argument function. Allocate
4439 trace buffer memory.
4440 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4441 handle QTBuffer:size packet.
4442 (cmd_bigqtbuffer_size): New function.
4443 (initialize_tracepoint): Call init_trace_buffer with
4444 DEFAULT_TRACE_BUFFER_SIZE.
4445 * server.c (handle_query): Add QTBuffer:size in the
4446 supported packets.
4447
4448 2013-03-07 Yao Qi <yao@codesourcery.com>
4449
4450 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4451 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4452 of -1.
4453 (cmd_qtsp): Adjust condition. Do post increment.
4454 Set cur_action and cur_step_action back to 0.
4455
4456 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4457
4458 PR server/15236
4459 * linux-low.c (linux_write_memory): Return early success if LEN is
4460 zero.
4461
4462 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4463
4464 * configure.srv: Add x86_64-*-cygwin* as target.
4465
4466 2013-02-28 Tom Tromey <tromey@redhat.com>
4467
4468 * configure.ac: Invoke AC_SYS_LARGEFILE.
4469 * configure, config.in: Rebuild.
4470
4471 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4472
4473 * win32-low.c: Throughout, fix format strings and casts of
4474 printf-like functions to avoid type related warnings on all
4475 platforms.
4476 (get_child_debug_event): Print dwDebugEventCode as hex since
4477 that's how it's usually documented.
4478
4479 2013-02-28 Yao Qi <yao@codesourcery.com>
4480
4481 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4482 pulongest.
4483
4484 2013-02-27 Jiong Wang <jiwang@tilera.com>
4485
4486 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4487 (reg-tilegx32.c): New rule.
4488 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4489 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4490 different register info initializer according to elf class.
4491 (init_registers_tilgx32): New function. The tilegx32 register info
4492 initializer.
4493 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4494 (tile_store_gregset): Likewise.
4495
4496 2013-02-27 Yao Qi <yao@codesourcery.com>
4497
4498 * server.c (process_point_options): Print debug message when
4499 debug_threads is true.
4500
4501 2013-02-26 Yao Qi <yao@codesourcery.com>
4502
4503 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4504
4505 2013-02-19 Pedro Alves <palves@redhat.com>
4506 Kai Tietz <ktietz@redhat.com>
4507
4508 PR gdb/15161
4509
4510 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4511 instead of strtoul to extract address from packet.
4512 (process_serial_event) <'z'>: Likewise.
4513
4514 2013-02-18 Yao Qi <yao@codesourcery.com>
4515
4516 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4517
4518 2013-02-14 Pedro Alves <palves@redhat.com>
4519
4520 Plug memory leak.
4521
4522 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4523 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4524
4525 2013-02-14 Pedro Alves <palves@redhat.com>
4526
4527 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4528
4529 2013-02-14 Pedro Alves <palves@redhat.com>
4530
4531 * tracepoint.c (save_string): Delete.
4532 (add_tracepoint_action): Use savestring instead of save_string.
4533
4534 2013-02-12 Pedro Alves <palves@redhat.com>
4535
4536 * linux-xtensa-low.c: Ditto.
4537 * xtensa-xtregs.c: Ditto.
4538
4539 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4540
4541 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4542 thread_db.
4543
4544 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4545
4546 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4547 aarch64_num_wp_regs and aarch64_num_bp_regs to
4548 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4549
4550 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4551
4552 * linux-aarch64-low.c (ps_get_thread_area): Replace
4553 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4554
4555 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4556 Marcus Shawcroft <marcus.shawcroft@arm.com>
4557 Nigel Stephens <nigel.stephens@arm.com>
4558 Yufeng Zhang <yufeng.zhang@arm.com>
4559
4560 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4561 (aarch64.c, aarch64-without-fpu.c): New targets.
4562 * configure.srv (aarch64*-*-linux*): New.
4563 * linux-aarch64-low.c: New file.
4564
4565 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4566
4567 * linux-low.c (handle_extended_wait, linux_create_inferior)
4568 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4569 (dequeue_one_deferred_signal, linux_resume_one_thread)
4570 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4571 (linux_tracefork_grandchild, linux_test_for_tracefork)
4572 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4573 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4574 where the argument is 0.
4575
4576 2013-01-25 Yao Qi <yao@codesourcery.com>
4577
4578 * event-loop.c: Include "queue.h".
4579 (gdb_event_p): New typedef.
4580 (struct gdb_event) <next_event>: Remove.
4581 (event_queue): Change to QUEUE(gdb_event_p).
4582 (async_queue_event): Remove.
4583 (gdb_event_xfree): New.
4584 (initialize_event_loop): New.
4585 (process_event): Use API from QUEUE.
4586 (wait_for_event): Likewise.
4587 * server.c (main): Call initialize_event_loop.
4588 * server.h (initialize_event_loop): Declare.
4589
4590 2013-01-18 Yao Qi <yao@codesourcery.com>
4591
4592 * ax.h (struct eval_agent_expr_context): New.
4593 (gdb_eval_agent_expr): Update declaration.
4594 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4595 TFRAME. Add new argument CTX.
4596 * server.h (struct eval_agent_expr_context): Declare.
4597 (agent_mem_read, agent_tsv_read): Update declaration.
4598 (agent_mem_read_string): Likewise.
4599 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4600 (add_traceframe_block): Add new argument TPOINT.
4601 Increase TPOINT->traceframe_usage.
4602 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4603 eval_tracepoint_agent_expr.
4604 (condition_true_at_tracepoint): Likewise.
4605 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4606 (agent_mem_read_string, agent_tsv_read): Likewise.
4607
4608 2013-01-16 Yao Qi <yao@codesourcery.com>
4609
4610 * linux-low.c (linux_resume_one_lwp): Don't check
4611 'lwp->bp_reinsert != 0'.
4612
4613 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4614 Pedro Alves <palves@redhat.com>
4615
4616 * lynx-low.c (ptrace_request_to_str): Define a temporary
4617 macro and use it to simplify this function's implementation.
4618
4619 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4620
4621 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4622 sets errno.
4623
4624 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4625
4626 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4627
4628 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4629
4630 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4631
4632 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4633
4634 * lynx-low.c (lynx_resume): Use the resume_info parameter
4635 to determine the ptid for the lynx_ptrace call, unless
4636 it is equal to minus_one_ptid, in which case we use the
4637 ptid of the current_inferior.
4638 (lynx_wait_1): After having received a thread create/exit
4639 event, resume the inferior's execution using the signaling
4640 thread's ptid, rather than the old ptid.
4641
4642 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4643
4644 * lynx-low.c (lynx_resume): Delete variable ret.
4645
4646 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4647
4648 * gdbreplay.c (gdbreplay_version): Update copyright year.
4649 * server.c (gdbserver_version): Likewise.
4650
4651 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4652
4653 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4654 new thread.
4655
4656 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4657
4658 * lynx-low.c (ptrace_request_to_str): Add handling for
4659 PTRACE_GETTRACESIG.
4660
4661 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4662
4663 * lynx-low.c (lynx_attach): Delete variable new_process.
4664
4665 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4666
4667 * lynx-low.c (lynx_create_inferior): Delete variable
4668 new_process.
4669
4670 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4671
4672 * lynx-low.c (ptrace_request_to_str): Do not handle
4673 PTRACE_GETTHREADLIST if this macro does not exist.
4674
4675 2012-12-15 Yao Qi <yao@codesourcery.com>
4676
4677 * Makefile.in (OBS): Add notif.o.
4678 * notif.c, notif.h: New.
4679 * server.c: Include "notif.h".
4680 (struct vstop_notif) <next>: Remove.
4681 <base>: New field.
4682 (queue_stop_reply): Update.
4683 (push_event, send_next_stop_reply): Remove.
4684 (discard_queued_stop_replies): Update.
4685 (notif_stop): New variable.
4686 (handle_v_stopped): Remove.
4687 (handle_v_requests): Don't call handle_v_stopped. Call
4688 handle_ack_notif instead.
4689 (queue_stop_reply_callback): Call notif_event_enque instead
4690 of queue_stop_reply.
4691 (handle_status): Don't call send_next_stop_reply, call
4692 notif_write_event instead.
4693 (kill_inferior_callback): Likewise.
4694 (detach_or_kill_inferior_callback): Likewise.
4695 (main): Call initialize_notif.
4696 (process_serial_event): Call QUEUE_is_empty.
4697 (handle_target_event): Call notif_push instead of push event.
4698 * server.h (push_event): Remove declaration.
4699
4700 2012-12-10 Tom Tromey <tromey@redhat.com>
4701
4702 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4703 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4704 macros.
4705 (.c.o): Rewrite.
4706 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4707 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4708 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4709 (amd64-linux-ipa.o, ax.o): Rewrite.
4710 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4711 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4712 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4713 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4714 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4715 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4716 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4717 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4718 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4719 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4720 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4721 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4722 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4723 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4724 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4725 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4726 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4727 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4728 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4729 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4730 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4731 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4732 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4733 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4734 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4735 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4736 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4737 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4738 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4739 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4740 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4741 (reg-tilegx.o): Remove.
4742 (all_object_files): New macro.
4743 Include .deps files.
4744 * aclocal.m4, configure: Rebuild.
4745 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4746 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4747 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4748
4749 2012-12-05 Tom Tromey <tromey@redhat.com>
4750
4751 PR gdb/14917:
4752 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4753
4754 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4755
4756 * configure.ac: Check for linux/perf_event.h.
4757 * config.in: Regenerated.
4758 * configure: Regenerated.
4759
4760 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4761
4762 * hostio.c (handle_readlink): Decrease buffer size
4763 parameter passed to readlink by one byte.
4764
4765 2012-11-26 Yao Qi <yao@codesourcery.com>
4766
4767 * configure.ac (build_warnings): Append '-Wempty-body'.
4768 * configure: Regenerated.
4769 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4770 body.
4771
4772 2012-11-15 Pierre Muller <muller@sourceware.org>
4773
4774 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4775 * config.in: Regenerate.
4776 * configure: Regenerate.
4777 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4778 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4779 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4780 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4781 header.
4782 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4783 instead of <sys/wait.h> header.
4784 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4785
4786 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4787
4788 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4789 (various make rules): Remove -DGDBSERVER
4790
4791 2012-11-09 Yao Qi <yao@codesourcery.com>
4792
4793 * spu-low.c (current_ptid): Move it to ..
4794 * gdbthread.h: ... here. New.
4795 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4796 * server.c (myresume, process_serial_event): Likewise.
4797 * thread-db.c (thread_db_find_new_threads): Likewise.
4798 * tracepoint.c (run_inferior_command): Likewise.
4799
4800 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4801
4802 * server.c (handle_search_memory_1): Include access length in
4803 warning message.
4804
4805 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4806
4807 * linux-crisv32-low.c: Fix compile errors.
4808
4809 2012-09-04 Yao Qi <yao@codesourcery.com>
4810
4811 * tracepoint.c (cmd_qtsv): Adjust debug message.
4812 Don't check CUR_TPOINT.
4813
4814 2012-08-28 Yao Qi <yao@codesourcery.com>
4815
4816 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4817 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4818 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4819 Remove declarations of xmalloc, xreallloc, xstrdup and
4820 freeargv.
4821 * Makefile.in (libiberty_h): New.
4822 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4823 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4824
4825 2012-08-23 Yao Qi <yao@codesourcery.com>
4826
4827 * server.h: Remove declaration of 'xsnprintf'.
4828
4829 2012-08-22 Keith Seitz <keiths@redhat.com>
4830
4831 * server.h: Include build-gnulib-gbserver/config.h.
4832 * gdbreplay.c: Likewise.
4833
4834 2012-08-08 Doug Evans <dje@google.com>
4835
4836 * Makefile.in (SFILES): Add gdb_vecs.c.
4837 (OBS): Add gdb_vecs.o.
4838 (gdb_vecs_h, host_defs_h): New variables.
4839 (thread-db.o): Add $(gdb_vecs_h) dependency.
4840 (gdb_vecs.o): New rule.
4841 * thread-db.c: #include "gdb_vecs.h".
4842 (thread_db_load_search): Use a vector to iterate over path elements.
4843 Handle text appearing after "$pdir".
4844
4845 * configure.ac: Add check for strstr.
4846 * config.in: Regenerate.
4847 * configure: Regenerate.
4848
4849 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4850
4851 * hostio.c (handle_pread): If pread fails, fall back to attempting
4852 lseek/read.
4853 (handle_pwrite): Likewise for pwrite.
4854
4855 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4856
4857 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4858 between unsupported TYPE and unimplementable ADDR/LEN combination.
4859 (arm_insert_point): Act on new return value.
4860
4861 2012-07-31 Pedro Alves <palves@redhat.com>
4862
4863 * server.c (process_point_options): Only skip tokens if we find
4864 one that is unrecognized. Don't treat 'X' specially while
4865 skipping unrecognized tokens.
4866
4867 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4868
4869 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4870 to 4-byte-align HW breakpoint addresses for Thumb.
4871
4872 2012-07-27 Yao Qi <yao@codesourcery.com>
4873
4874 PR remote/14161.
4875
4876 * server.h: Declare gdb_agent_about_to_close.
4877 * target.c (kill_inferior): Include "agent.h".
4878 New. Send command 'kill'.
4879 * target.h (kill_inferior): Removed macro.
4880 * tracepoint.c (gdb_agent_about_to_close): New.
4881 (gdb_agent_helper_thread): Handle command 'close'.
4882 Wait endlessly until the inferior stops.
4883 Install gdb_agent_remove_socket to atexit hook.
4884 (agent_socket_name): New static variable.
4885 (gdb_agent_socket_init): Replace local variable 'name' with
4886 'agent_socket_name'.
4887 (gdb_agent_remove_socket): New.
4888
4889 2012-07-27 Yao Qi <yao@codesourcery.com>
4890
4891 * server.c (process_point_options): Stop at 'X' when parsing.
4892
4893 2012-07-19 Michael Eager <eager@eagercon.com>
4894
4895 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4896 to hw_execute.
4897 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4898 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4899 hardware breakpoint.
4900
4901 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4902
4903 * gdbserver/linux-low.c (initialize_low): Call
4904 linux_ptrace_init_warnings.
4905
4906 2012-07-02 Doug Evans <dje@google.com>
4907
4908 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4909 pointer to int.
4910
4911 2012-07-02 Stan Shebs <stan@codesourcery.com>
4912
4913 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4914 (ax.o): Add it to build rule.
4915 (ax-ipa.o): Ditto.
4916 (OBS): Add format.o.
4917 (IPA_OBS): Add format.o.
4918 * server.c (handle_query): Claim support for breakpoint commands.
4919 (process_point_options): Add command case.
4920 (process_serial_event): Leave running if there are printfs in
4921 effect.
4922 * mem-break.h (any_persistent_commands): Declare.
4923 (add_breakpoint_commands): Declare.
4924 (gdb_no_commands_at_breakpoint): Declare.
4925 (run_breakpoint_commands): Declare.
4926 * mem-break.c (struct point_command_list): New struct.
4927 (struct breakpoint): New field command_list.
4928 (any_persistent_commands): New function.
4929 (add_commands_to_breakpoint): New function.
4930 (add_breakpoint_commands): New function.
4931 (gdb_no_commands_at_breakpoint): New function.
4932 (run_breakpoint_commands): New function.
4933 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4934 locally.
4935 * ax.c: Include format.h.
4936 (ax_printf): New function.
4937 (gdb_eval_agent_expr): Add printf opcode.
4938
4939 2012-06-13 Yao Qi <yao@codesourcery.com>
4940
4941 * server.c (start_inferior): Remove duplicated writes to fields
4942 'last_resume_kind' and 'last_status' of 'current_inferior'.
4943
4944 2012-06-12 Yao Qi <yao@codesourcery.com>
4945 Pedro Alves <palves@redhat.com>
4946
4947 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4948 comment.
4949 * server.c (handle_v_cont): Extend comment.
4950
4951 2012-06-11 Yao Qi <yao@codesourcery.com>
4952
4953 * linux-low.c (linux_attach): Add 'static'.
4954
4955 2012-06-06 Yao Qi <yao@codesourcery.com>
4956
4957 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4958
4959 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4960
4961 Fix gcc -flto compilation warning.
4962 * server.c (main): Make variable multi_mode and attach volatile.
4963
4964 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4965
4966 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4967 if the platform doesn't know about it.
4968
4969 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4970
4971 * Makefile.in (SFILES): Add linux-tile-low.c.
4972 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4973 * configure.srv: Handle tilegx-*-linux*.
4974 * linux-tile-low.c: New file.
4975
4976 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4977
4978 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4979
4980 2012-05-24 Pedro Alves <palves@redhat.com>
4981
4982 PR gdb/7205
4983
4984 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4985
4986 2012-05-24 Pedro Alves <palves@redhat.com>
4987
4988 PR gdb/7205
4989
4990 Replace target_signal with gdb_signal throughout.
4991
4992 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4993
4994 * linux-low.c (linux_store_registers): Avoid the copying sequence
4995 when no data has been retrieved by ptrace.
4996
4997 2012-05-22 Will Deacon <will.deacon@arm.com>
4998
4999 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5000 Include asm/ptrace.h.
5001 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5002 already defined.
5003
5004 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5005
5006 * linux-low.c (linux_store_registers): Don't re-retrieve data
5007 with ptrace that has already been obtained from /proc. Always
5008 copy any data retrieved with ptrace to the buffer supplied.
5009
5010 2012-05-11 Yao Qi <yao@codesourcery.com>
5011 Pedro Alves <palves@redhat.com>
5012
5013 * linux-low.c (enum stopping_threads_kind): New.
5014 (stopping_threads): Change type to `enum stopping_threads_kind'.
5015 (handle_extended_wait): If stopping and suspending threads, leave
5016 the new_lwp suspended too.
5017 (linux_wait_for_event): Adjust.
5018 (stop_all_lwps): Set `stopping_threads' to
5019 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5020 whether we're suspending threads or just stopping them. Assert no
5021 recursion happens.
5022
5023 2012-04-29 Yao Qi <yao@codesourcery.com>
5024
5025 * server.h: Move some code to ...
5026 * gdbthread.h: ... here. New.
5027 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5028 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5029 (nto-low.o, win32-low.o): Likewise.
5030 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5031 * regcache.c, remote-utils.c, server.c: Likewise.
5032 * target.c, tracepoint.c, win32-low.c: Likewise.
5033
5034 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5035
5036 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5037 (PTRACE_ARG4_TYPE): Likewise.
5038 (PTRACE_XFER_TYPE): Likewise.
5039 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5040 ptrace to PTRACE_ARG3_TYPE.
5041 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5042 (PTRACE_ARG4_TYPE): Likewise.
5043 (PTRACE_XFER_TYPE): Likewise.
5044 (linux_detach_one_lwp): Cast fourth argument of
5045 ptrace to long then PTRACE_ARG4_TYPE.
5046 (regsets_fetch_inferior_registers): Cast third argument of
5047 ptrace to long then PTRACE_ARG3_TYPE.
5048 (regsets_store_inferior_registers): Likewise.
5049
5050 2012-04-20 Pedro Alves <palves@redhat.com>
5051
5052 * configure: Regenerate.
5053
5054 2012-04-19 Pedro Alves <palves@redhat.com>
5055
5056 * Makefile.in (GNULIB_BUILDDIR): New.
5057 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5058 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5059 (all, install-only, uninstall, clean-info, all-lib, clean): No
5060 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5061 (maintainer-clean realclean distclean): Use subdir_do.
5062 (subdir_do): New.
5063 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5064 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5065 * acinclude.m4: Include acx_configure_dir.m4.
5066 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5067 calls. Call AC_PROG_RANLIB. Configure gnulib using
5068 ACX_CONFIGURE_DIR.
5069 (GNULIB): New.
5070 (GNULIB_STDINT_H): Adjust.
5071 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5072 * gdbreplay.c: Include build-gnulib/config.h.
5073 * server.h: Likewise.
5074 * aclocal.m4: Regenerate.
5075 * config.in: Regenerate.
5076 * configure: Regenerate.
5077
5078 2012-04-19 Pedro Alves <palves@redhat.com>
5079
5080 * Makefile.in (LIBGNU, INCGNU): Adjust.
5081 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5082 (all, install-only, uninstall, clean-info, all-lib, clean)
5083 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5084 * configure.ac: Adjust AC_OUTPUT output.
5085 * aclocal.m4: Regenerate.
5086 * configure: Regenerate.
5087
5088 2012-04-19 Pedro Alves <palves@redhat.com>
5089
5090 * Makefile.in (generated_files): New.
5091 (server_h): Remove the explicit dependency on config.h, and depend
5092 on $generated_files.
5093
5094 2012-04-19 Pedro Alves <palves@redhat.com>
5095
5096 * Makefile.in (INCGNU): Add -Ignulib.
5097
5098 2012-04-19 Pedro Alves <palves@redhat.com>
5099
5100 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5101 (INCGNU): ... this, and spell out -I here.
5102 (GNULIB_LIB): Rename to ...
5103 (LIBGNU): ... this.
5104 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5105
5106 2012-04-19 Pedro Alves <palves@redhat.com>
5107
5108 * config.in: Regenerate.
5109
5110 2012-04-19 Pedro Alves <palves@redhat.com>
5111
5112 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5113 * server.h (memmem): Remove declaration.
5114 * config.in: Regenerate.
5115 * configure: Regenerate.
5116
5117 2012-04-19 Yao Qi <yao@codesourcery.com>
5118
5119 * Makefile.in (SFILES): Add common/vec.c.
5120 (OBS): Add vec.o.
5121 (vec.o): New rule.
5122
5123 2012-04-19 Yao Qi <yao@codesourcery.com>
5124
5125 * remote-utils.c (prepare_resume_reply): Replace with macro
5126 target_core_of_thread.
5127 * server.c (handle_qxfer_threads_proper): Likewise.
5128 * target.h (traget_core_of_thread): New macro.
5129
5130 2012-04-18 Pedro Alves <palves@redhat.com>
5131
5132 * aclocal.m4: Regenerate.
5133 * configure: Regenerate.
5134
5135 2012-04-16 Yao Qi <yao@codesourcery.com>
5136
5137 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5138 duplicated on address.
5139
5140 2012-04-16 Yao Qi <yao@codesourcery.com>
5141
5142 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5143 (struct tracepoint_action_ops) <send>: New field.
5144 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5145 (agent_expr_send, x_tracepoint_action_send): New.
5146 (l_tracepoint_action_send): New.
5147 (cmd_qtdp): Download and install tracepoint
5148 according to `use_agent'.
5149 (run_inferior_command): Add one more parameter `len'.
5150 Update callers.
5151 (tracepoint_send_agent): New.
5152 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5153
5154 2012-04-16 Yao Qi <yao@codesourcery.com>
5155
5156 * tracepoint.c (download_tracepoints): Moved to ...
5157 (cmd_qtstart): ... here.
5158
5159 2012-04-14 Yao Qi <yao@codesourcery.com>
5160
5161 * tracepoint.c: Include inttypes.h.
5162 (struct collect_memory_action): Use sized types.
5163 (struct tracepoint): Likewise.
5164 (cmd_qtdp, stop_tracing): Update print specifiers.
5165 (cmd_qtp, response_tracepoint): Likewise.
5166 (collect_data_at_tracepoint): Likewise.
5167 (collect_data_at_step): Likewise.
5168
5169 2012-04-14 Yao Qi <yao@codesourcery.com>
5170
5171 Import gnulib module inttypes.
5172 * aclocal.m4, config.in, configure: Regenerated.
5173
5174 2012-04-14 Yao Qi <yao@codesourcery.com>
5175
5176 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5177 Makefile and config.status at last.
5178
5179 2012-04-13 Yao Qi <yao@codesourcery.com>
5180
5181 * tracepoint.c: Include stdint.h unconditionally.
5182
5183 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5184
5185 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5186 on BFD_HAVE_SYS_PROCFS_TYPE.
5187 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5188 * configure: Regenerate.
5189 * config.in: Likewise.
5190
5191 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5192
5193 * Makefile.in (clean): Also remove x32.c x32-linux.c
5194 x32-avx.c x32-avx-linux.c.
5195 (x32.o): New target.
5196 (x32.c): Likewise.
5197 (x32-linux.o): Likewise.
5198 (x32-linux.c): Likewise.
5199 (x32-avx.o): Likewise.
5200 (x32-avx.c): Likewise.
5201 (x32-avx-linux.o): Likewise.
5202 (x32-avx-linux.c): Likewise.
5203
5204 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5205 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5206 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5207 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5208 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5209 i386/x32-avx-linux.xml.
5210
5211 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5212 (init_registers_x32_avx_linux): Likwise.
5213 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5214 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5215
5216 2012-04-13 Pedro Alves <palves@redhat.com>
5217
5218 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5219 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5220 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5221 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5222 the sub-make.
5223
5224 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5225
5226 * linux-x86-low.c (compat_x32_clock_t): New.
5227 (compat_x32_siginfo_t): Likewise.
5228 (compat_x32_siginfo_from_siginfo): Likewise.
5229 (siginfo_from_compat_x32_siginfo): Likewise.
5230 (linux_is_elf64): Likewise.
5231 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5232 and siginfo_from_compat_x32_siginfo for x32.
5233 (x86_arch_setup): Set linux_is_elf64.
5234
5235 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5236
5237 PR gdb/13969
5238 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5239 e_machine field.
5240 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5241 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5242 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5243 compatible with process.
5244
5245 2012-04-12 Yao Qi <yao@codesourcery.com>
5246
5247 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5248 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5249 (install-only, install-info, clean): Handle sub dir gnulib.
5250 (all-lib, am--refresh): New targets.
5251 (memmem.o): Remove target.
5252 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5253 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5254 (AC_REPLACE_FUNCS): Remove memmem.
5255 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5256 (AC_OUTPUT): Generate Makefile in gnulib/.
5257 * aclocal.m4, config.in, configure: Regenerated.
5258
5259 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5260
5261 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5262
5263 2012-04-05 Pedro Alves <palves@redhat.com>
5264
5265 -Werror=strict-aliasing
5266
5267 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5268 pointer.
5269
5270 2012-04-04 Pedro Alves <palves@redhat.com>
5271
5272 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5273 (sparc_store_gregset_from_stack, sparc_store_gregset)
5274 (sparc_breakpoint_at): Fix formatting.
5275
5276 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5277
5278 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5279 are available.
5280 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5281 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5282 * config.in: Regenerate.
5283 * configure: Likewise.
5284
5285 2012-03-29 Pedro Alves <palves@redhat.com>
5286
5287 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5288 Correct ptrace arguments.
5289
5290 2012-03-28 Pedro Alves <palves@redhat.com>
5291
5292 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5293 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5294 (IA64_FR1_REGNUM): New defines.
5295 (ia64_fetch_register): New.
5296 (the_low_target): Install it.
5297 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5298 field.
5299 * linux-low.c (linux_fetch_registers): Try the
5300 the_low_target.fetch_register hook first.
5301
5302 * linux-arm-low.c (the_low_target): Adjust.
5303 * linux-bfin-low.c (the_low_target): Adjust.
5304 * linux-cris-low.c (the_low_target): Adjust.
5305 * linux-crisv32-low.c (the_low_target): Adjust.
5306 * linux-m32r-low.c (the_low_target): Adjust.
5307 * linux-m68k-low.c (the_low_target): Adjust.
5308 * linux-mips-low.c (the_low_target): Adjust.
5309 * linux-ppc-low.c (the_low_target): Adjust.
5310 * linux-s390-low.c (the_low_target): Adjust.
5311 * linux-sh-low.c (the_low_target): Adjust.
5312 * linux-sparc-low.c (the_low_target): Adjust.
5313 * linux-tic6x-low.c (the_low_target): Adjust.
5314 * linux-x86-low.c (the_low_target): Adjust.
5315 * linux-xtensa-low.c (the_low_target): Adjust.
5316
5317 2012-03-26 Pedro Alves <palves@redhat.com>
5318
5319 * server.c (handle_qxfer_libraries): Don't bail early if
5320 the_target->qxfer_libraries_svr4 is not NULL.
5321
5322 2012-03-26 Pedro Alves <palves@redhat.com>
5323
5324 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5325
5326 2012-03-23 Pedro Alves <palves@redhat.com>
5327
5328 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5329 "library-list-svr4" element's start tag when the the DSO list is
5330 empty.
5331
5332 2012-03-23 Pedro Alves <palves@redhat.com>
5333
5334 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5335 a variable whose type size is the same as the inferior's pointer
5336 size.
5337
5338 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5339
5340 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5341 struct siginfo.
5342 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5343 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5344 * linux-low.h: Include <signal.h>.
5345 (struct siginfo): Remove forward declaration.
5346 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5347 struct siginfo.
5348
5349 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5350
5351 * .gitignore: Ignore more files.
5352
5353 2012-03-19 Pedro Alves <palves@redhat.com>
5354 Jan Kratochvil <jan.kratochvil@redhat.com>
5355
5356 * server.c (cont_thread, general_thread): Add describing comments.
5357 (start_inferior): Clear `cont_thread'.
5358 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5359 of a process.
5360
5361 2012-03-15 Yao Qi <yao@codesourcery.com>
5362
5363 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5364 handling to ...
5365 (cmd_qtdp): ... here.
5366
5367 2012-03-15 Yao Qi <yao@codesourcery.com>
5368
5369 * tracepoint.c (struct tracepoint_action_ops): New.
5370 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5371 (m_tracepoint_action_download): New.
5372 (r_tracepoint_action_download): New.
5373 (x_tracepoint_action_download): New.
5374 (l_tracepoint_action_download): New.
5375 (add_tracepoint_action): Install `action->ops' according type.
5376 (download_tracepoint_1): Move code `download' function pointer
5377 of various tracepoint_action_ops.
5378
5379 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5380
5381 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5382 linux_ptrace_attach_warnings.
5383
5384 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5385
5386 * Makefile.in (linux-ptrace.o): New.
5387 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5388 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5389 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5390 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5391 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5392 of these targets.
5393 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5394
5395 2012-03-08 Yao Qi <yao@codesourcery.com>
5396 Pedro Alves <palves@redhat.com>
5397
5398 Fix PR server/13392.
5399 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5400 offset of JMP insn.
5401 * tracepoint.c (remove_tracepoint): New.
5402 (cmd_qtdp): Call remove_tracepoint when failed to install.
5403
5404 2012-03-07 Pedro Alves <palves@redhat.com>
5405
5406 * linux-low.c (get_detach_signal): New.
5407 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5408 Pass on pending signals to PTRACE_DETACH. Check the result of the
5409 ptrace call.
5410 * server.c (program_signals, program_signals_p): New.
5411 (handle_general_set): Handle QProgramSignals.
5412 * server.h (program_signals, program_signals_p): Declare.
5413
5414 2012-03-05 Pedro Alves <palves@redhat.com>
5415 Jan Kratochvil <jan.kratochvil@redhat.com>
5416
5417 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5418 New comment why.
5419
5420 2012-03-03 Yao Qi <yao@codesourcery.com>
5421
5422 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5423 agent_look_up_symbols.
5424
5425 2012-03-03 Yao Qi <yao@codesourcery.com>
5426
5427 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5428 (linux-x86-low.o): Likewise.
5429 * server.h: Remove in_process_agent_loaded.
5430 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5431 common/agent.c.
5432 Update callers.
5433
5434 2012-03-03 Yao Qi <yao@codesourcery.com>
5435
5436 * tracepoint.c (gdb_agent_capability): New global.
5437 (in_process_agent_loaded_ust): Renamed to
5438 `in_process_agent_supports_ust'.
5439 Update callers.
5440 (in_process_agent_supports_ust): Call agent_capability_check.
5441 (clear_installed_tracepoints): Assert that agent supports
5442 agent.
5443
5444 2012-03-03 Yao Qi <yao@codesourcery.com>
5445
5446 * linux-low.c (linux_supports_agent): New.
5447 (linux_target_ops): Initialize field `supports_agent' with
5448 linux_supports_agent.
5449 * target.h (struct target_ops) <supports_agent>: New.
5450 (target_supports_agent): New macro.
5451 * server.c (handle_general_set): Handle packet 'QAgent'.
5452 (handle_query): Send `QAgent+'.
5453 * Makefile.in (server.o): Depends on agent.h.
5454
5455 2012-03-03 Yao Qi <yao@codesourcery.com>
5456
5457 * Makefile.in (OBS): Add agent.o.
5458 Add new rule for agent.o.
5459 Track dependence of tracepoint.c on agent.h.
5460 * tracepoint.c (run_inferior_command_1):
5461 (run_inferior_command): Call agent_run_command.
5462 (gdb_ust_connect_sync_socket): Deleted. Move it to
5463 common/agent.c.
5464 (resume_thread, stop_thread): Likewise.
5465 (gdb_ust_socket_init): Renamed to ...
5466 (gdb_agent_socket_init): ... New.
5467 (gdb_ust_thread): Renamed to ...
5468 (gdb_agent_helper_thread): ... New.
5469 (gdb_ust_init): Move some code to ...
5470 (gdb_agent_init): ... here. New.
5471 [HAVE_UST]: Call gdb_ust_init.
5472 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5473 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5474 * config.in, configure: Regenerated.
5475
5476 2012-03-02 Pedro Alves <palves@redhat.com>
5477
5478 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5479 * linux-low.c (struct simple_pid_list): New.
5480 (stopped_pids): New a struct simple_pid_list pointer.
5481 (add_to_pid_list, pull_pid_from_list): New.
5482 (handle_extended_wait): Don't assume the first signal new children
5483 report is SIGSTOP. Adjust call to pull_pid_from_list.
5484 (linux_wait_for_lwp): Adjust.
5485
5486 2012-03-02 Yao Qi <yao@codesourcery.com>
5487
5488 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5489 debug log.
5490
5491 2012-03-02 Yao Qi <yao@codesourcery.com>
5492
5493 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5494 `stop_pc' and `tpoint'. Update caller.
5495
5496 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5497
5498 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5499 * linux-low.c (use_linux_regsets): New macro.
5500 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5501 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5502 (linux_register_in_regsets): New function.
5503 (usr_fetch_inferior_registers): Skip registers covered by
5504 regsets.
5505 (usr_store_inferior_registers): Likewise.
5506 (usr_fetch_inferior_registers): New macro.
5507 (usr_store_inferior_registers): Likewise.
5508 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5509 (linux_store_registers): Likewise.
5510 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5511 prototype.
5512 (init_registers_mips64_dsp_linux): Likewise.
5513 (init_registers_mips_linux): New macro.
5514 (init_registers_mips_dsp_linux): Likewise.
5515 (mips_dsp_num_regs): Likewise.
5516 (DSP_BASE, DSP_CONTROL): New fallback macros.
5517 (mips_base_regs): New macro.
5518 (mips_regmap): Use it. Fix the size.
5519 (mips_dsp_regmap): New variable.
5520 (mips_dsp_regset_bitmap): Likewise.
5521 (mips_arch_setup): New function.
5522 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5523 than mips_regmap.
5524 (mips_cannot_store_register): Likewise.
5525 (the_low_target): Update .arch_setup, .num_regs and .regmap
5526 initializers. Add .regset_bitmap initializer.
5527 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5528 initializer.
5529 * linux-bfin-low.c (the_low_target): Likewise.
5530 * linux-cris-low.c (the_low_target): Likewise.
5531 * linux-crisv32-low.c (the_low_target): Likewise.
5532 * linux-ia64-low.c (the_low_target): Likewise.
5533 * linux-m32r-low.c (the_low_target): Likewise.
5534 * linux-m68k-low.c (the_low_target): Likewise.
5535 * linux-ppc-low.c (the_low_target): Likewise.
5536 * linux-s390-low.c (the_low_target): Likewise.
5537 * linux-sh-low.c (the_low_target): Likewise.
5538 * linux-sparc-low.c (the_low_target): Likewise.
5539 * linux-tic6x-low.c (the_low_target): Likewise.
5540 * linux-x86-low.c (the_low_target): Likewise.
5541 * linux-xtensa-low.c (the_low_target): Likewise.
5542 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5543 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5544 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5545 srv_xmlfiles.
5546 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5547 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5548
5549 2012-02-29 Yao Qi <yao@codesourcery.com>
5550 Pedro Alves <palves@redhat.com>
5551
5552 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5553 `step_over_finished' is true.
5554
5555 2012-02-27 Pedro Alves <palves@redhat.com>
5556
5557 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5558 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5559
5560 2012-02-27 Pedro Alves <palves@redhat.com>
5561
5562 PR server/9684
5563 * linux-low.c (pid_is_stopped): New.
5564 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5565
5566 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5567
5568 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5569 of conditions.
5570
5571 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5572
5573 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5574
5575 2012-02-24 Luis Machado <lgustavo@codesourcery>
5576
5577 * server.c (handle_query): Advertise support for target-side
5578 breakpoint condition evaluation.
5579 (process_point_options): New function.
5580 (process_serial_event): When inserting a breakpoint, check for
5581 a target-side condition that should be evaluated.
5582
5583 * mem-break.c: Include regcache.h and ax.h.
5584 (point_cond_list_t): New data structure.
5585 (breakpoint) <cond_list>: New field.
5586 (find_gdb_breakpoint_at): Make non-static.
5587 (delete_gdb_breakpoint_at): Clear any target-side
5588 conditions.
5589 (clear_gdb_breakpoint_conditions): New function.
5590 (add_condition_to_breakpoint): Likewise.
5591 (add_breakpoint_condition): Likewise.
5592 (gdb_condition_true_at_breakpoint): Likewise.
5593 (gdb_breakpoint_here): Return result directly instead
5594 of going through a local variable.
5595
5596 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5597 (clear_gdb_breakpoint_conditions): Likewise.
5598 (add_breakpoint_condition): Likewise.
5599 (gdb_condition_true_at_breakpoint): Likewise.
5600
5601 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5602 (need_step_over_p): Take target-side breakpoint condition into
5603 consideration.
5604
5605 2012-02-24 Luis Machado <lgustavo@codesourcery>
5606
5607 * server.h: Include tracepoint.h.
5608 (agent_mem_read, agent_get_trace_state_variable_value,
5609 agent_set_trace_state_variable_value,
5610 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5611 get_set_tsv_func_addr): New prototypes.
5612
5613 * ax.h: New include file.
5614 * ax.c: New source file.
5615
5616 * tracepoint.c: Include ax.h.
5617 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5618 agent_expr, eval_result_type): Move to ax.h.
5619 (parse_agent_expr): Rename to ...
5620 (gdb_parse_agent_expr): ... this, make it non-static and move
5621 to ax.h.
5622 (unparse_agent_expr) Rename to ...
5623 (gdb_unparse_agent_expr): ... this, make it non-static and move
5624 to ax.h.
5625 (eval_agent_expr): Rename to ...
5626 (eval_tracepoint_agent_expr): ... this.
5627 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5628 forward declarations.
5629 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5630 (agent_get_trace_state_variable_value): New function.
5631 (agent_set_trace_state_variable_value): New function.
5632 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5633 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5634 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5635 (condition_true_at_tracepoint): Likewise.
5636 (parse_agent_expr): Rename to ...
5637 (gdb_parse_agent_expr): ... this and move to ax.c.
5638 (unparse_agent_expr): Rename to ...
5639 (gdb_unparse_agent_expr): ... this and move to ax.c.
5640 (gdb_agent_op_name): Move to ax.c.
5641 (eval_agent_expr): Rename to ...
5642 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5643 and move to ax.c.
5644 (eval_tracepoint_agent_expr): New function.
5645 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5646 non-static.
5647 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5648 ax.c.
5649 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5650 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5651 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5652 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5653 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5654 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5655 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5656 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5657 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5658 (compile_bytecodes): Remove forward declaration.
5659 (is_goto_target): Move to ax.c.
5660 (compile_bytecodes): Move to ax.c and call
5661 agent_get_trace_state_variable_value (...) and
5662 agent_set_trace_state_variable_value (...).
5663
5664 * Makefile.in: Update ax.c and IPA dependencies.
5665
5666 2012-02-24 Pedro Alves <palves@redhat.com>
5667
5668 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5669 (cmd_bigqtbuffer_circular): ... this. Only handle
5670 'QTBuffer:circular:'.
5671 (handle_tracepoint_general_set): Adjust.
5672
5673 2012-02-16 Yao Qi <yao@codesourcery.com>
5674
5675 * inferiors.c: Move code to ...
5676 * dll.c: .... here. New.
5677 * server.h: Declare clear_dlls.
5678 * Makefile.in (SFILES): Add dll.c.
5679 (OBS): Add dll.o
5680 (dll.o): New rule.
5681
5682 2012-02-11 Yao Qi <yao@codesourcery.com>
5683
5684 * server.c: (handle_monitor_command): Add a new parameter
5685 `own_buf'.
5686 (handle_query): Update caller.
5687
5688 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5689
5690 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5691 * configure, config.in: Regenerate.
5692 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5693 is not defined.
5694
5695 2012-02-02 Pedro Alves <palves@redhat.com>
5696
5697 Try SIGKILL first, then PTRACE_KILL.
5698 * linux-low.c (linux_kill_one_lwp): New.
5699 (linux_kill_one_lwp): Rename to ...
5700 (kill_one_lwp_callback): ... this. Use the new
5701 linux_kill_one_lwp.
5702
5703 2012-02-02 Pedro Alves <palves@redhat.com>
5704
5705 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5706 inferior.
5707
5708 2012-01-27 Pedro Alves <palves@redhat.com>
5709
5710 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5711 (elf_64_file_p): Make static.
5712 (linux_pid_exe_is_elf_64_file): New.
5713 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5714 Delete declarations.
5715 (linux_pid_exe_is_elf_64_file): Declare.
5716 * linux-x86-low.c (x86_arch_setup): Use
5717 linux_pid_exe_is_elf_64_file.
5718
5719 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5720
5721 * linux-low.c (linux_wait_for_event_1): Rename to ...
5722 (linux_wait_for_event): ... here and merge it with former
5723 linux_wait_for_event - new variable wait_ptid, use it.
5724 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5725
5726 2012-01-23 Pedro Alves <palves@redhat.com>
5727
5728 * server.c (main): Avoid yet another case of infinite loop while
5729 detaching/killing after a longjmp.
5730
5731 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5732
5733 Code cleanup.
5734 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5735
5736 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5737
5738 * hostio.c (handle_readlink): New function.
5739 (handle_vFile): Call it to handle "vFile:readlink" packets.
5740
5741 2012-01-20 Pedro Alves <palves@redhat.com>
5742 Ulrich Weigand <ulrich.weigand@linaro.org>
5743
5744 * server.c (handle_v_requests): Only support vAttach and vRun to
5745 start multiple processes when in extended protocol mode.
5746
5747 2012-01-17 Pedro Alves <palves@redhat.com>
5748
5749 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5750 memalign plus mprotect to allocate the scratch buffer.
5751
5752 2012-01-13 Pedro Alves <palves@redhat.com>
5753
5754 * server.c (attach_inferior): Clear `cont_thread'.
5755
5756 2012-01-13 Pedro Alves <palves@redhat.com>
5757
5758 * server.c (main): Avoid infinite loop while detaching/killing
5759 after a longjmp.
5760
5761 2012-01-09 Doug Evans <dje@google.com>
5762
5763 * server.c (start_inferior): Set last_ptid in --wrapper case.
5764
5765 2012-01-06 Yao Qi <yao@codesourcery.com>
5766
5767 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5768 defined.
5769 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5770
5771 2012-01-04 Yao Qi <yao@codesourcery.com>
5772
5773 * tracepoint.c (cmd_qtdp): Print debug message
5774 for static tracepoint.
5775
5776 2012-01-04 Yao Qi <yao@codesourcery.com>
5777
5778 * tracepoint.c (trace_vdebug): Differentiate debug message
5779 between gdbserver and IPA.
5780
5781 2012-01-03 Yao Qi <yao@codesourcery.com>
5782
5783 * tracepoint.c (tracepoint_was_hit): Don't collect for
5784 static tracepoint.
5785
5786 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5787
5788 * terminal.h: Reformat copyright header.
5789
5790 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5791
5792 * server.c (gdbserver_version): Update copyright year.
5793 * gdbreplay.c (gdbreplay_version): Likewise.
5794
5795 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5796
5797 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5798
5799 Revert:
5800 2011-12-18 Hui Zhu <teawater@gmail.com>
5801 * linux-low.c (linux_create_inferior): Save return value to ret.
5802
5803 2011-12-18 Hui Zhu <teawater@gmail.com>
5804
5805 * linux-low.c (linux_create_inferior): Save return value to ret.
5806
5807 2011-12-16 Doug Evans <dje@google.com>
5808
5809 * linux-low.c (linux_create_inferior): If stdio connection,
5810 redirect stdin from /dev/null, stdout to stderr.
5811 * remote-utils.c (remote_is_stdio): New static global.
5812 (remote_connection_is_stdio): New function.
5813 (remote_prepare): Handle stdio connection.
5814 (remote_open): Ditto.
5815 (remote_close): Don't close stdin for stdio connections.
5816 (read_prim,write_prim): New functions. Replace all calls to
5817 read/write to these.
5818 * server.c (main): Watch for "-" argument. Move call to
5819 remote_prepare before start_inferior.
5820 * server.h (STDIO_CONNECTION_NAME): New macro.
5821 (remote_connection_is_stdio): Declare.
5822
5823 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5824 in debugging output.
5825
5826 2011-12-15 Yao Qi <yao@codesourcery.com>
5827
5828 * tracepoint.c: Include sys/syscall.h.
5829 (gdb_ust_thread): Remove preprocessor conditional.
5830
5831 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5832
5833 * linux-low.c (linux_detach_one_lwp): Call
5834 the_low_target.prepare_to_resume before detaching.
5835
5836 2011-12-14 Yao Qi <yao@codesourcery.com>
5837
5838 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5839 of write.
5840
5841 2011-12-14 Yao Qi <yao@codesourcery.com>
5842
5843 * i386-low.c (i386_low_stopped_data_address): Initialize local
5844 variable `control'.
5845
5846 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5847
5848 PR remote/13492
5849
5850 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5851 DR_CONTROL unless necessary. Extend comments.
5852 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5853 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5854
5855 2011-12-13 Yao Qi <yao@codesourcery.com>
5856
5857 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5858 macros.
5859 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5860
5861 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5862
5863 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5864 Print new debug message for such case.
5865
5866 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5867
5868 Fix overlapping memcpy.
5869 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5870 the read_inferior_memory transfer.
5871 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5872 write_inferior_memory transfer.
5873 (set_fast_tracepoint_jump): New variable buf. Use it for the
5874 read_inferior_memory and write_inferior_memory transfers.
5875 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5876 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5877 Use it for the write_inferior_memory transfer.
5878 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5879 buffers.
5880
5881 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5882
5883 * linux-low.c (fetch_register, store_register): Make code
5884 consistent, fix formatting.
5885
5886 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5887
5888 * linux-low.c (usr_store_inferior_registers): Factor out code
5889 to handle individual registers into...
5890 (store_register): ... this new function.
5891
5892 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5893
5894 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5895 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5896 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5897 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5898 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5899 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5900 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5901 (srv_xmlfiles): Add new XML files.
5902
5903 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5904 and <sys/uio.h>.
5905 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5906 (init_registers_s390_linux32v1): Add prototype.
5907 (init_registers_s390_linux32v2): Likewise.
5908 (init_registers_s390_linux64v1): Likewise.
5909 (init_registers_s390_linux64v2): Likewise.
5910 (init_registers_s390x_linux64v1): Likewise.
5911 (init_registers_s390x_linux64v2): Likewise.
5912 (s390_num_regs): Increment to 52.
5913 (s390_regmap): Add orig_r2 register.
5914 (s390_num_regs_3264): Increment to 68.
5915 (s390_regmap_3264): Add orig_r2 register.
5916 (s390_collect_ptrace_register): Handle orig_r2 register.
5917 (s390_supply_ptrace_register): Likewise.
5918 (s390_fill_last_break): New function.
5919 (s390_store_last_break): Likewise.
5920 (s390_fill_system_call): New function.
5921 (s390_store_system_call): Likewise.
5922 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5923 register sets.
5924 (s390_check_regset): New function.
5925 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5926 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5927 Update target_regsets for available register sets.
5928
5929 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5930 Jan Kratochvil <jan.kratochvil@redhat.com>
5931
5932 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5933 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5934 New.
5935 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5936 * linux-low.h (struct process_info_private): New member r_debug.
5937 * server.c (handle_qxfer_libraries): Call
5938 the_target->qxfer_libraries_svr4.
5939 (handle_qxfer_libraries_svr4): New function.
5940 (qxfer_packets): New entry "libraries-svr4".
5941 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5942 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5943 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5944 PACKET_qXfer_libraries_svr4.
5945
5946 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5947
5948 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5949 PSW address/mask between 8-byte and 16-byte formats.
5950 (s390_supply_ptrace_register): Likewise.
5951 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5952 basic addressing mode bit.
5953
5954 2011-11-24 Stan Shebs <stan@codesourcery.com>
5955
5956 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5957
5958 2011-11-17 Stan Shebs <stan@codesourcery.com>
5959
5960 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5961 (tracing_start_time): New global.
5962 (tracing_stop_time): New global.
5963 (tracing_user_name): New global.
5964 (tracing_notes): New global.
5965 (tracing_stop_note): New global.
5966 (cmd_qtstart): Set traceframe_usage, start_time.
5967 (stop_tracing): Set stop_time.
5968 (cmd_qtstatus): Report additional status.
5969 (cmd_qtp): New function.
5970 (handle_tracepoint_query): Call it.
5971 (cmd_qtnotes): New function.
5972 (handle_tracepoint_general_set): Call it.
5973 (get_timestamp): Rename from tsv_get_timestamp.
5974
5975 2011-11-14 Stan Shebs <stan@codesourcery.com>
5976 Kwok Cheung Yeung <kcy@codesourcery.com>
5977
5978 * linux-x86-low.c (small_jump_insn): New.
5979 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5980 trampoline and error message, build a trampoline and issue a small
5981 jump instruction to it.
5982 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5983 trampoline and error message.
5984 (x86_get_min_fast_tracepoint_insn_len): New.
5985 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5986 * linux-low.h (struct linux_target_ops): Add arguments to
5987 install_fast_tracepoint_jump_pad operation, add new operation.
5988 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5989 arguments.
5990 (linux_get_min_fast_tracepoint_insn_len): New function.
5991 (linux_target_op): Add new operation.
5992 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5993 (gdb_trampoline_buffer_end): Ditto.
5994 (gdb_trampoline_buffer_error): Ditto.
5995 (struct ipa_sym_addresses): Add fields for new IPA variables.
5996 (symbol_list): Add entries for new IPA variables.
5997 (struct tracepoint): Add fields to hold the address range of the
5998 trampoline used by the tracepoint.
5999 (trampoline_buffer_head): New static variable.
6000 (trampoline_buffer_tail): Ditto.
6001 (claim_trampoline_space): New function.
6002 (have_fast_tracepoint_trampoline_buffer): New function.
6003 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6004 structure.
6005 (install_fast_tracepoint): Ditto, also add error buffer argument.
6006 (cmd_qtminftpilen): New function.
6007 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6008 (fast_tracepoint_from_trampoline_address): New function.
6009 (fast_tracepoint_collecting): Handle trampoline as part of jump
6010 pad space.
6011 (set_trampoline_buffer_space): New function.
6012 (initialize_tracepoint): Initialize new IPA variables.
6013 * target.h (struct target_ops): Add arguments to
6014 install_fast_tracepoint_jump_pad operation, add new
6015 get_min_fast_tracepoint_insn_len operation.
6016 (target_get_min_fast_tracepoint_insn_len): New.
6017 (install_fast_tracepoint_jump_pad): Add arguments.
6018 * server.h (IPA_BUFSIZ): Define.
6019 * linux-i386-ipa.c: Include extra header files.
6020 (initialize_fast_tracepoint_trampoline_buffer): New function.
6021 (initialize_low_tracepoint): Call it.
6022 * server.h (set_trampoline_buffer_space): Declare.
6023 (claim_trampoline_space): Ditto.
6024 (have_fast_tracepoint_trampoline_buffer): Ditto.
6025
6026 2011-11-14 Yao Qi <yao@codesourcery.com>
6027
6028 * server.c (handle_query): Handle InstallInTrace for qSupported.
6029 * tracepoint.c (add_tracepoint): Sort list.
6030 (install_tracepoint, download_tracepoint): New.
6031 (cmd_qtdp): Call them to install and download tracepoints.
6032 (sort_tracepoints): Removed.
6033 (cmd_qtstart): Update.
6034
6035 2011-11-14 Yao Qi <yao@codesourcery.com>
6036
6037 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6038 * mem-break.h: Declare.
6039 * tracepoint.c (cmd_qtstart): Move some code to ...
6040 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6041 New.
6042 (download_tracepoints): Move some code to ...
6043 (download_tracepoint_1): ... here. New.
6044
6045 2011-11-08 Yao Qi <yao@codesourcery.com>
6046
6047 * remote-utils.c (relocate_instruction): A comment fix.
6048
6049 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6050
6051 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6052 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6053 dr_status_mirror and dr_control_mirror from debug_reg_state.
6054 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6055 (i386_initial_stuff): Remove use of deleted globals.
6056 (i386_get_thread_context, i386_set_thread_context,
6057 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6058 from debug_reg_state.
6059
6060 2011-11-05 Yao Qi <yao@codesourcery.com>
6061
6062 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6063 address as TPOINT's.
6064
6065 2011-11-02 Stan Shebs <stan@codesourcery.com>
6066
6067 * tracepoint.c (agent_mem_read_string): New function.
6068 (eval_agent_expr): Call it for tracenz.
6069 * server.c (handle_query): Report support for tracenz.
6070
6071 2011-11-02 Yao Qi <yao@codesourcery.com>
6072
6073 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6074
6075 2011-11-02 Yao Qi <yao@codesourcery.com>
6076
6077 * target.h: Fix a typo in comment.
6078
6079 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6080
6081 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6082 clobber the breakpoints' shadows with fast tracepoint jumps.
6083 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6084 * target.c (write_inferior_memory): Also pass MYADDR down to
6085 check_mem_write.
6086
6087 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6088
6089 * configure.ac: Check support for personality routine.
6090 * configure: Regenerate.
6091 * config.in: Likewise.
6092 * linux-low.c: Include <sys/personality.h>.
6093 Define ADDR_NO_RANDOMIZE if necessary.
6094 (linux_create_inferior): Disable address space randomization when
6095 forking inferior, if requested.
6096 (linux_supports_disable_randomization): New function.
6097 (linux_target_ops): Install it.
6098 * server.h (disable_randomization): Declare.
6099 * server.c (disable_randomization): New global variable.
6100 (handle_general_set): Handle QDisableRandomization.
6101 (handle_query): Likewise for qSupported.
6102 (main): Support --disable-randomization and --no-disable-randomization
6103 command line arguments.
6104 * target.h (struct target_ops): Add supports_disable_randomization.
6105 (target_supports_disable_randomization): New macro.
6106
6107 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6108
6109 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6110 ifdef check.
6111 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6112 [!PT_GETDSBT] (target_loadmap): New definition.
6113 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6114 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6115 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6116 and PT_GETDSBT to LINUX_LOADMAP.
6117 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6118 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6119
6120 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6121
6122 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6123 (arm_linux_hwbp_cap): New static variable.
6124 (arm_linux_get_hwbp_cap): Replace by ...
6125 (arm_linux_init_hwbp_cap): ... this new function.
6126 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6127 (arm_linux_get_hw_watchpoint_count): Likewise.
6128 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6129 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6130 (arm_prepare_to_resume): Use perror_with_name instead of error.
6131
6132 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6133
6134 * linux-arm-low.c: Include <signal.h>.
6135 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6136 (struct arm_linux_hwbp_cap): New data type.
6137 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6138 (struct arm_linux_hw_breakpoint): New data type.
6139 (MAX_BPTS, MAX_WPTS): Define.
6140 (struct arch_process_info, struct arch_lwp_info): New data types.
6141 (arm_linux_get_hwbp_cap): New function.
6142 (arm_linux_get_hw_breakpoint_count): Likewise.
6143 (arm_linux_get_hw_watchpoint_count): Likewise.
6144 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6145 (arm_hwbp_control_initialize): Likewise.
6146 (arm_hwbp_control_is_enabled): Likewise.
6147 (arm_hwbp_control_is_initialized): Likewise.
6148 (arm_hwbp_control_disable): Likewise.
6149 (arm_linux_hw_breakpoint_equal): Likewise.
6150 (arm_linux_hw_point_initialize): Likewise.
6151 (struct update_registers_data): New data structure.
6152 (update_registers_callback: New function.
6153 (arm_insert_point): Likewise.
6154 (arm_remove_point): Likewise.
6155 (arm_stopped_by_watchpoint): Likewise.
6156 (arm_stopped_data_address): Likewise.
6157 (arm_new_process): Likewise.
6158 (arm_new_thread): Likewise.
6159 (arm_prepare_to_resume): Likewise.
6160 (the_low_target): Register arm_insert_point, arm_remove_point,
6161 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6162 arm_new_thread, and arm_prepare_to_resume.
6163
6164 2011-09-15 Stan Shebs <stan@codesourcery.com>
6165
6166 * server.h (struct emit_ops): Add compare-goto fields.
6167 * tracepoint.c (gdb_agent_op_sizes): New table.
6168 (emit_eq_goto): New function.
6169 (emit_ne_goto): New function.
6170 (emit_lt_goto): New function.
6171 (emit_le_goto): New function.
6172 (emit_gt_goto): New function.
6173 (emit_ge_goto): New function.
6174 (is_goto_target): New function.
6175 (compile_bytecodes): Recognize special cases of compare-goto
6176 combinations and call specialized emitters for them.
6177 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6178 (amd64_emit_ne_goto): New function.
6179 (amd64_emit_lt_goto): New function.
6180 (amd64_emit_le_goto): New function.
6181 (amd64_emit_gt_goto): New function.
6182 (amd64_emit_ge_goto): New function.
6183 (amd64_emit_ops): Add the new functions.
6184 (i386_emit_eq_goto): New function.
6185 (i386_emit_ne_goto): New function.
6186 (i386_emit_lt_goto): New function.
6187 (i386_emit_le_goto): New function.
6188 (i386_emit_gt_goto): New function.
6189 (i386_emit_ge_goto): New function.
6190 (i386_emit_ops): Add the new functions.
6191
6192 2011-09-08 Stan Shebs <stan@codesourcery.com>
6193
6194 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6195 (i386_emit_epilogue): Restore %ebx.
6196
6197 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6198
6199 * server.c (step_thread): Remove definition.
6200 (process_serial_event): Don't handle Hs.
6201 * server.h (step_thread): Remove declaration.
6202 * target.c (set_desired_inferior): Remove use of step_thread.
6203
6204 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6205
6206 * linux-low.c: Include linux-procfs.h.
6207 (linux_attach_lwp_1): Update comments.
6208 (linux_attach): Scan for existing threads when attaching to a
6209 process that is the tgid.
6210 * Makefile.in: Update dependencies.
6211
6212 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6213
6214 * configure.srv: Add linux-procfs.o dependencies.
6215
6216 2011-08-14 Yao Qi <yao@codesourcery.com>
6217
6218 * target.h (struct target_ops): Fix indent.
6219 * win32-low.c (win32_target_ops): Fix comment.
6220
6221 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6222 Yao Qi <yao@codesourcery.com>
6223
6224 * Makefile.in (clean): Remove tic6x-*.c files.
6225 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6226 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6227 (tic6x-c64xp-linux.c): Likewise.
6228 * configure.srv: Add support for tic6x-*-uclinux.
6229 * linux-tic6x-low.c: New.
6230 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6231
6232 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6233 Yao Qi <yao@codesourcery.com>
6234
6235 * target.h (struct target_ops): Add read_loadmap.
6236 * linux-low.c (struct target_loadseg): New type.
6237 (struct target_loadmap): New type.
6238 (linux_read_loadmap): New function.
6239 (linux_target_ops): Add linux_read_loadmap.
6240 * server.c (handle_query): Support qXfer:fdpic:read packet.
6241 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6242 to NULL.
6243
6244 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6245
6246 * win32-low.c: Include <stdint.h>.
6247
6248 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6249
6250 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6251 to the inferior here.
6252 (i386_remove_aligned_watchpoint): Ditto.
6253 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6254 fit part of the watchpoint in the debug registers.
6255 (i386_update_inferior_debug_regs): New.
6256 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6257 registers, and only update the inferior on success.
6258 (i386_low_remove_watchpoint): Ditto.
6259
6260 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6261
6262 * linux-low.c (compare_ints, unique, list_threads, show_process,
6263 linux_core_of_thread): Delete.
6264 (linux_target_ops): Change linux_core_of_thread to
6265 linux_common_core_of_thread.
6266 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6267 * utils.c (malloc_failure): Change type of argument.
6268 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6269 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6270 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6271 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6272 (IPA_OBJS): Add common-utils-ipa.o.
6273 (ptid_h, linux_osdata_h): New macros.
6274 (server_h): Add common/common-utils.h, common/xml-utils.h,
6275 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6276 common/ptid.h.
6277 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6278 ptid.o, buffer.o): New rules.
6279 (linux-low.o): Add common/linux-osdata.h as a dependency.
6280 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6281 * configure.ac: Add AC_HEADER_DIRENT check.
6282 * config.in: Regenerate.
6283 * configure: Regenerate.
6284 * remote-utils.c (xml_escape_text): Delete.
6285 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6286 buffer_xml_printf): Move to common/buffer.c.
6287 * server.c (main): Remove call to initialize_inferiors.
6288 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6289 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6290 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6291 internal_error, gdb_assert, gdb_assert_fail): Delete.
6292 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6293 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6294 common/buffer.h.
6295 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6296 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6297 initialize_inferiors): Delete.
6298
6299 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6300
6301 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6302 symbol error.
6303
6304 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6305
6306 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6307 assertion.
6308 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6309
6310 2011-05-26 Yao Qi <yao@codesourcery.com>
6311
6312 * Makefile.in (thread-db.o): Track dependence to
6313 common/gdb_thread_db.h.
6314 * thread-db.c: include gdb_thread_db.h from right place.
6315
6316 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6317
6318 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6319 __FILE__ and __LINE__ to internal_error.
6320
6321 2011-05-13 Doug Evans <dje@google.com>
6322
6323 * thread-db.c (try_thread_db_load_from_sdir): New function.
6324 (try_thread_db_load_from_dir): New function.
6325 (thread_db_load_search): Handle $sdir, ignore $pdir.
6326 Remove trying of system directories if search of
6327 libthread-db-search-path fails, that is now done via $sdir.
6328
6329 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6330
6331 * server.c (handle_query): Add EnableDisableTracepoints to the list
6332 of supported features.
6333 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6334 tracepoints.
6335 (cmd_qtenable_disable): New.
6336 (cmd_qtstart): Install tracepoints even if disabled.
6337 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6338 receiving a QTEnable or QTDisable packet.
6339 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6340 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6341 tracepoints.
6342 (gdb_probe): Skip data collection if static tracepoint is disabled.
6343
6344 2011-05-10 Doug Evans <dje@google.com>
6345
6346 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6347
6348 2011-05-04 Doug Evans <dje@google.com>
6349
6350 * linux-low.c (linux_join): Skip process lookup.
6351 * spu-low.c (spu_join): Ditto.
6352 * server.c (join_inferiors_callback): Delete.
6353 (process_serial_event): For 'D' packet (detach) call join_inferior
6354 directly.
6355
6356 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6357
6358 * README: Don't mention xscale*-*-linux*.
6359 * configure.srv (xscale*-*-linux*): Don't handle target.
6360
6361 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6362
6363 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6364 casting pointers.
6365 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6366 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6367 (i386_emit_void_call_2): Likewise.
6368
6369 2011-04-26 Yao Qi <yao@codesourcery.com>
6370
6371 * linux-low.c: Move common macros to linux-ptrace.h.
6372 Include linux-ptrace.h.
6373 * Makefile.in (linux_ptrace_h): New.
6374 (linux-low.o): Depends on linux-ptrace.h.
6375
6376 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6377
6378 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6379 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6380 (remote_prepare): New function with most of the TCP code from ...
6381 (remote_open): ... here. Detect PORT here unconditionally. Move also
6382 setting transport_is_reliable.
6383 * server.c (run_once): New variable.
6384 (gdbserver_usage): Document it.
6385 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6386 the first run if RUN_ONCE.
6387 * server.h (run_once, remote_prepare): New declarations.
6388
6389 2011-04-19 Tom Tromey <tromey@redhat.com>
6390
6391 * win32-low.c (handle_load_dll): Remove duplicate "the".
6392
6393 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6394
6395 Remove support for old Cygwin 1.5 versions.
6396 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6397 function to avoid warning.
6398 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6399 warning.
6400
6401 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6402
6403 * gdbserver/server.h (Macro _): Define it if not available.
6404
6405 2011-03-14 Michael Snyder <msnyder@vmware.com>
6406
6407 * hostio.c (handle_close): Remove unnecessary null test.
6408
6409 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6410
6411 * Makefile.in (maintainer-clean realclean distclean): Remove
6412 "make ... subdir_do" command.
6413
6414 2011-03-10 Michael Snyder <msnyder@vmware.com>
6415
6416 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6417
6418 * server.c (handle_v_run): Free alloced buffer on early return.
6419
6420 2011-03-09 Yao Qi <yao@codesourcery.com>
6421
6422 Revert:
6423 2011-03-04 Yao Qi <yao@codesourcery.com>
6424
6425 * Makefile.in: Remove GNU make feature --directory.
6426
6427 2011-03-05 Yao Qi <yao@codesourcery.com>
6428
6429 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6430 (subdir_do): New make target. Copied from gdb/Makefile.
6431 (maintainer-clean, realclean, distclean, clean): Call corresponding
6432 make targets in common/Makefile.
6433
6434 2011-02-11 Yao Qi <yao@codesourcery.com>
6435
6436 * configure.ac: Call AC_PROG_RANLIB.
6437 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6438 * configure: Regenerate.
6439
6440 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6441
6442 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6443
6444 2011-03-06 Yao Qi <yao@codesourcery.com>
6445
6446 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6447
6448 2011-03-05 Yao Qi <yao@codesourcery.com>
6449
6450 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6451 (subdir_do): New make target. Copied from gdb/Makefile.
6452 (maintainer-clean, realclean, distclean, clean): Call corresponding
6453 make targets in common/Makefile.
6454
6455 2011-03-04 Yao Qi <yao@codesourcery.com>
6456
6457 * Makefile.in: Remove GNU make feature --directory.
6458
6459 2011-03-04 Michael Snyder <msnyder@vmware.com>
6460
6461 * server.c (queue_stop_reply): Call xmalloc not malloc.
6462
6463 2011-03-02 Michael Snyder <msnyder@vmware.com>
6464
6465 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6466
6467 2011-02-28 Michael Snyder <msnyder@vmware.com>
6468
6469 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6470 (cmd_qtframe): Ditto.
6471 (cmd_qtbuffer): Ditto.
6472 (cmd_bigqtbuffer): Ditto.
6473
6474 * utils.c (decimal2str): Initialize 'width' to nine, then
6475 don't mess with it.
6476
6477 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6478
6479 * hostio.c (require_data): Free *data, not data.
6480
6481 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6482
6483 * hostio.c (require_data): Use free, not xfree.
6484
6485 2011-02-27 Michael Snyder <msnyder@vmware.com>
6486
6487 * server.c (handle_query): Discard unused value.
6488
6489 * hostio.c (require_data): Free malloc memory before returning
6490 error.
6491
6492 2011-02-26 Michael Snyder <msnyder@vmware.com>
6493
6494 * linux-low.c (list_threads): Call closedir for dirent.
6495
6496 2011-02-27 Michael Snyder <msnyder@vmware.com>
6497
6498 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6499 a case statement falls through.
6500
6501 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6502
6503 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6504 in comparison.
6505
6506 2011-02-26 Michael Snyder <msnyder@vmware.com>
6507
6508 * utils.c (decimal2str): Eliminate dead code and dead param.
6509 (pulongest): Drop dead param from call to decimal2str.
6510 (plongest): Ditto.
6511
6512 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6513
6514 Revert the following patch (not approved yet):
6515 2011-02-21 Hui Zhu <teawater@gmail.com>
6516 * tracepoint.c (tp_printf): New function.
6517 (eval_agent_expr): Handle gdb_agent_op_printf.
6518
6519 2011-02-21 Hui Zhu <teawater@gmail.com>
6520
6521 * tracepoint.c (tp_printf): New function.
6522 (eval_agent_expr): Handle gdb_agent_op_printf.
6523
6524 2011-02-18 Tom Tromey <tromey@redhat.com>
6525
6526 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6527 (tracepoint.o): Likewise.
6528 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6529 (gdb_agent_op_names): Likewise.
6530
6531 2011-02-18 Tom Tromey <tromey@redhat.com>
6532
6533 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6534 gdb_agent_op_rot>: New constants.
6535 (gdb_agent_op_names): Add pick and roll.
6536 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6537 cases.
6538
6539 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6540
6541 * aclocal.m4: Regenerated with aclocal-1.11.1.
6542
6543 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6544
6545 * server.c (handle_qxfer_traceframe_info): New.
6546 (qxfer_packets): Register "traceframe-info".
6547 (handle_query): Report support for qXfer:traceframe-info:read+.
6548 * tracepoint.c (match_blocktype): New.
6549 (traceframe_find_block_type): Rename to ...
6550 (traceframe_walk_blocks): ... this. Add callback filter argument,
6551 and use it.
6552 (traceframe_find_block_type): New, reimplemented on top of
6553 traceframe_walk_blocks.
6554 (build_traceframe_info_xml): New.
6555 (traceframe_read_info): New.
6556 * server.h (traceframe_read_info): Declare.
6557
6558 2011-02-11 Yao Qi <yao@codesourcery.com>
6559
6560 * configure.ac: Call AC_PROG_RANLIB.
6561 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6562 * configure: Regenerate.
6563
6564 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6565
6566 * server.c (gdb_read_memory): Change return semantics to allow
6567 partial transfers.
6568 (handle_search_memory_1): Adjust.
6569 (process_serial_event) <'m' packet>: Handle partial transfers.
6570 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6571
6572 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6573
6574 * regcache.c (init_register_cache): Initialize
6575 regcache->register_status.
6576 (free_register_cache): Release regcache->register_status.
6577 (regcache_cpy): Copy register_status.
6578 (registers_to_string): Print 'x's for unavailable registers.
6579 (supply_register): Mark the register's status valid or
6580 unavailable, depending on whether a buffer was passed in or not.
6581 (supply_register_zeroed): New.
6582 (supply_regblock): Mark the registers' status valid or
6583 unavailable, depending on whether a buffer was passed in or not.
6584 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6585 (struct regcache): New `register_status' field.
6586 (supply_register_zeroed): Declare.
6587 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6588 supply_register_zeroed, rather than passing a NULL buffer to
6589 supply_register.
6590 * tracepoint.c (fetch_traceframe_registers): Update comment.
6591
6592 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6593
6594 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6595 buffer explicit.
6596
6597 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6598
6599 * server.h (decode_xfer_write): Change prototype.
6600 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6601 and don't extract the annex here.
6602 * server.c (decode_xfer_read): Remove `annex' parameter,
6603 and don't extract the annex here.
6604 (decode_xfer): New.
6605 (struct qxfer): New.
6606 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6607 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6608 (handle_qxfer_statictrace): New functions, abstracted out from
6609 handle_query, and made to use the struct qxfer interface.
6610 (handle_threads_qxfer_proper): Rename to ...
6611 (handle_qxfer_threads_proper): ... this.
6612 (handle_threads_qxfer): Rename to ...
6613 (handle_qxfer_threads): ... this. Adjust.
6614 (qxfer_packets): New array.
6615 (handle_qxfer): New function.
6616 (handle_query): Use handle_qxfer.
6617
6618 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6619
6620 * gdbreplay.c: Shorten lines of >= 80 columns.
6621 * linux-low.c: Ditto.
6622 * linux-ppc-low.c: Ditto.
6623 * linux-s390-low.c: Ditto.
6624 * linux-sparc-low.c: Ditto.
6625 * linux-x86-low.c: Ditto.
6626 * linux-xtensa-low.c: Ditto.
6627 * mem-break.c: Ditto.
6628 * nto-low.c: Ditto.
6629 * regcache.h: Ditto.
6630 * remote-utils.c: Ditto.
6631 * server.c: Ditto.
6632 * server.h: Ditto.
6633 * thread-db.c: Ditto.
6634 * tracepoint.c: Ditto.
6635 * utils.c: Ditto.
6636 * win32-low.h: Ditto.
6637
6638 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6639
6640 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6641 update.
6642
6643 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6644
6645 * server.c (gdbserver_version): Update copyright year in version
6646 output.
6647 * gdbreplay.c (gdbreplay_version): Ditto.
6648
6649 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6650
6651 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6652 * linux-bfin-low.c: New file.
6653 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6654 PT_DATA_ADDR for BFIN targets.
6655 * Makefile.in (SFILES): Add linux-bfin-low.c.
6656 (clean): Remove reg-bfin.c.
6657 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6658 * README: Mention supported Blackfin targets.
6659
6660 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6661
6662 * .gitignore: New file.
6663
6664 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6665
6666 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6667
6668 2010-10-22 Jie Zhang <jie@codesourcery.com>
6669
6670 * Makefile.in: Add FLAGS_TO_PASS variable.
6671 (install): Remove dependency of install-only and recursively
6672 invoke make for install-only.
6673
6674 2010-10-04 Doug Evans <dje@google.com>
6675
6676 * Makefile.in (uninstall): Use $(DESTDIR).
6677
6678 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6679
6680 PR gdb/11842
6681
6682 * linux-x86-low.c (compat_siginfo_from_siginfo)
6683 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6684 si_code is < 0. Check for si_code == SI_TIMER before checking for
6685 si_code < 0.
6686
6687 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6688
6689 * lynx-i386-low.c: New file.
6690 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6691
6692 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6693
6694 * lynx-low.c (ptrace_request_to_str): Remove handling for
6695 request values that have been removed in LynxOS 5.x.
6696
6697 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6698
6699 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6700 <ptrace.h>
6701
6702 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6703
6704 * configure.ac: Add --enable-inprocess-agent option.
6705 * configure: Rebuilt.
6706
6707 2010-09-06 Yao Qi <yao@codesourcery.com>
6708
6709 * linux-low.c (linux_kill): Remove unused variable.
6710 (linux_stabilize_threads): Likewise.
6711 * server.c (start_inferior): Likewise.
6712 (queue_stop_reply_callback): Likewise.
6713 * tracepoint.c (do_action_at_tracepoint): Likewise.
6714
6715 2010-09-06 Yao Qi <yao@codesourcery.com>
6716
6717 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6718 on return.
6719
6720 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6721
6722 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6723
6724 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6725
6726 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6727 "$(IPA_DEPFILES)".
6728
6729 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6730
6731 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6732 gdbserver/lynx-ppc-low.c: New files.
6733 * Makefile.in (lynx_low_h): New variable.
6734 (lynx-low.o, lynx-ppc-low.o): New rules.
6735 * configure.ac: On LynxOS, link with -lnetinet.
6736 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6737 * configure: regenerate.
6738
6739 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6740
6741 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6742 * configure.ac: Add check for vasprintf and vsnprintf.
6743 * configure, config.in: Regenerate.
6744 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6745
6746 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6747
6748 * gdbreplay.c: Move include of alloca.h up, next to include of
6749 malloc.h.
6750 * server.h: Add include of malloc.h.
6751 * mem-break.c: Remove include of malloc.h.
6752 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6753
6754 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6755
6756 * Makefile.in (memmem.o): Build with -Wno-error.
6757
6758 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6759
6760 * utils.c (xsnprintf): Make non-static.
6761 * server.h: Add xsnprintf declaration.
6762 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6763 replace calls to snprintf by calls to xsnprintf throughout.
6764
6765 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6766
6767 * configure.ac: Add configure check for alloca.
6768 * configure, config.in: Regenerate.
6769 * server.h: Include alloca.h if it exists.
6770 * gdbreplay.c: Include alloca.h if it exists.
6771
6772 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6773
6774 * linux-low.c (__SIGRTMIN): Define if not already defined.
6775 (linux_create_inferior): Check for __ANDROID__ rather than
6776 __SIGRTMIN.
6777 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6778 are already deferred.
6779 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6780 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6781 stopped and already has a pending signal to report.
6782 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6783 a pending signal to report or is moving out of a jump pad.
6784 (linux_init_signals): Check for __ANDROID__ rather than
6785 __SIGRTMIN.
6786
6787 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6788
6789 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6790 debug_threads check. Avoid a linear search when not doing debug
6791 output.
6792
6793 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6794
6795 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6796 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6797 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6798 (process_event): Change local fd's type to gdb_fildes_t.
6799 (create_file_handler): Adjust prototype.
6800 (delete_file_handler): Adjust prototype.
6801 (handle_file_event): Adjust prototype. Use pfildes.
6802 (create_file_event): Adjsut prototype.
6803 * remote-utils.c (remote_desc, listen_desc): Change type to
6804 gdb_fildes_t.
6805 * server.h: New gdb_fildes_t typedef.
6806 [USE_WIN32API]: Include winsock2.h.
6807 (delete_file_handler, add_file_handler): Adjust prototypes.
6808 (pfildes): Declare.
6809 * utils.c (pfildes): New.
6810
6811 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6812
6813 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6814 * configure: Regenerate.
6815
6816 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6817
6818 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6819 (linux_done_accessing_memory): ... this.
6820 (linux_target_ops): Adjust.
6821 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6822 * nto-low.c (nto_target_ops): Adjust comment.
6823 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6824 * spu-low.c (spu_target_ops): Adjust comment.
6825 * target.h (target_ops): Rename unprepare_to_access_memory field
6826 to done_accessing_memory.
6827 (unprepare_to_access_memory): Rename to ...
6828 (done_accessing_memory): ... this.
6829
6830 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6831
6832 * linux-low.c (linux_prepare_to_access_memory): New.
6833 (linux_unprepare_to_access_memory): New.
6834 (linux_target_ops): Install them.
6835 * server.c (read_memory): Rename to ...
6836 (gdb_read_memory): ... this. Use
6837 prepare_to_access_memory/prepare_to_access_memory.
6838 (write_memory): Rename to ...
6839 (gdb_write_memory): ... this. Use
6840 prepare_to_access_memory/prepare_to_access_memory.
6841 (handle_search_memory_1): Adjust.
6842 (process_serial_event): Adjust.
6843 * target.h (struct target_ops): New fields
6844 prepare_to_access_memory and unprepare_to_access_memory.
6845 (prepare_to_access_memory, unprepare_to_access_memory): New.
6846 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6847 prepare_to_access_memory/prepare_to_access_memory.
6848 * nto-low.c (nto_target_ops): Adjust.
6849 * spu-low.c (spu_target_ops): Adjust.
6850 * win32-low.c (win32_target_ops): Adjust.
6851
6852 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6853
6854 * Makefile.in (WARN_CFLAGS): Get it from configure.
6855 (WERROR_CFLAGS): New.
6856 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6857 * configure.ac: Introduce --enable-werror, which adds -Werror to
6858 the compiler command line. Enabled by default. Disable with
6859 --disable-werror. Add -Wdeclaration-after-statement
6860 Wpointer-arith and -Wformat-nonliteral to warning flags.
6861 * configure: Regenerate.
6862
6863 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6864
6865 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6866
6867 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6868
6869 * gdbreplay.c (remote_error): New.
6870 (gdbchar): New.
6871 (expect): Use gdbchar. Check for error reading from GDB.
6872 Clarify sync error output.
6873 (play): Check for errors writing to GDB.
6874 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6875 * remote-utils.c (getpkt): Check for errors writing to the remote
6876 descriptor.
6877
6878 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6879
6880 * linux-low.c (linux_wait_1): Move non-debugging code out of
6881 `debug_threads' control.
6882
6883 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6884
6885 * linux-low.c (linux_wait_1): Don't set last_status here.
6886 * server.c (push_event, queue_stop_reply_callback): Assert we're
6887 not pushing a TARGET_WAITKIND_IGNORE event.
6888 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6889 (myresume, handle_target_event): Set the thread's last_resume_kind
6890 and last_status from the target returned status.
6891
6892 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6893
6894 PR threads/10729
6895
6896 * linux-x86-low.c (update_debug_registers_callback): New.
6897 (i386_dr_low_set_addr): Use it.
6898 (i386_dr_low_get_addr): New.
6899 (i386_dr_low_set_control): Use update_debug_registers_callback.
6900 (i386_dr_low_get_control): New.
6901 (i386_dr_low_get_status): Adjust.
6902 * linux-low.c (linux_stop_lwp): New.
6903 * linux-low.h (linux_stop_lwp): Declare.
6904
6905 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6906 argument instead of a i386_debug_reg_state.
6907 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6908 a i386_debug_reg_state.
6909 (i386_insert_aligned_watchpoint): Adjust.
6910 (i386_remove_aligned_watchpoint): Adjust.
6911 (i386_low_stopped_data_address): Read the debug registers from the
6912 inferior instead of from the mirrors.
6913 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6914 (i386_dr_low_get_addr): Declare.
6915 (i386_dr_low_get_control): Declare.
6916 (i386_dr_low_get_status): Change prototype.
6917
6918 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6919 (i386_dr_low_get_addr): New.
6920 (i386_dr_low_get_control): New.
6921 (i386_dr_low_get_status): Adjust prototype. Return
6922 dr_status_mirror.
6923 (i386_initial_stuff): Clear dr_status_mirror and
6924 dr_control_mirror.
6925 (i386_get_thread_context): Adjust.
6926 (i386_set_thread_context): Adjust.
6927 (i386_thread_added): Adjust.
6928
6929 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6930
6931 * linux-low.h (linux_thread_area): Delete declaration.
6932
6933 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6934
6935 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6936 after its termination.
6937
6938 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6939
6940 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6941 (gdb_wants_all_stopped): Delete.
6942 (linux_wait_1): Don't call them.
6943 * server.c (handle_v_cont): Tag all threads as want-stopped.
6944 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6945 stopped as "client-wants-stopped".
6946
6947 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6948
6949 * Makefile.in (signals_h): New.
6950 (server_h): Depend on it.
6951 (server.o): Don't depend on $(signals_def).
6952 (signals.o): Depend on $(signals_def).
6953
6954 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6955
6956 * Makefile.in (signals_def): New.
6957 (server_h): Append include/gdb/signals.h and signals_def.
6958 (server.o): Append signals_def.
6959
6960 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6961
6962 * server.c (handle_target_event): Use target_signal_to_host for
6963 resume_info.sig initialization.
6964 * target.h (struct thread_resume) <sig>: New comment.
6965
6966 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6967
6968 * server.c (handle_query): strcpy() the returned string from paddress()
6969 instead of sprintf().
6970 * utils.c (paddress): Return phex_nz().
6971
6972 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6973
6974 * server.c (handle_v_cont): Call mourn_inferior if process
6975 just exited.
6976 (myresume): Likewise.
6977
6978 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6979
6980 Static tracepoints, and integration with UST.
6981
6982 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6983 * mem-break.c (uninsert_all_breakpoints)
6984 (reinsert_all_breakpoints): New.
6985 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6986 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6987 (gdb_agent_ust_loaded, helper_thread_id)
6988 (gdb_agent_helper_thread_id): New macros.
6989 (struct ipa_sym_addresses): Add addr_ust_loaded,
6990 addr_helper_thread_id, addr_cmd_buf.
6991 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6992 (in_process_agent_loaded_ust): New.
6993 (write_e_ust_not_loaded): New.
6994 (maybe_write_ipa_ust_not_loaded): New.
6995 (struct collect_static_trace_data_action): New.
6996 (enum tracepoint_type) <static_tracepoint>: New.
6997 (struct tracepoint) <handle>: Mention static tracepoints.
6998 (struct static_tracepoint_ctx): New.
6999 (CMD_BUF_SIZE): New.
7000 (add_tracepoint_action): Handle static tracepoint actions.
7001 (unprobe_marker_at): New.
7002 (clear_installed_tracepoints): Handle static tracepoints.
7003 (cmd_qtdp): Handle static tracepoints.
7004 (probe_marker_at): New.
7005 (cmd_qtstart): Handle static tracepoints.
7006 (response_tracepoint): Handle static tracepoints.
7007 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7008 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7009 (get_context_regcache): Handle static tracepoints.
7010 (do_action_at_tracepoint): Handle static tracepoint actions.
7011 (traceframe_find_block_type): Handle static trace data blocks.
7012 (traceframe_read_sdata): New.
7013 (download_tracepoints): Download static tracepoint actions.
7014 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7015 (GDB_PROBE_NAME): New.
7016 (ust_ops): New.
7017 (GET_UST_SYM): New.
7018 (USTF): New.
7019 (dlsym_ust): New.
7020 (ust_marker_to_static_tracepoint): New.
7021 (gdb_probe): New.
7022 (collect_ust_data_at_tracepoint): New.
7023 (gdb_ust_probe): New.
7024 (UNIX_PATH_MAX, SOCK_DIR): New.
7025 (gdb_ust_connect_sync_socket): New.
7026 (resume_thread, stop_thread): New.
7027 (run_inferior_command): New.
7028 (init_named_socket): New.
7029 (gdb_ust_socket_init): New.
7030 (cstr_to_hexstr): New.
7031 (next_st): New.
7032 (first_marker, next_marker): New.
7033 (response_ust_marker): New.
7034 (cmd_qtfstm, cmd_qtsstm): New.
7035 (unprobe_marker_at, probe_marker_at): New.
7036 (cmd_qtstmat, gdb_ust_thread): New.
7037 (gdb_ust_init): New.
7038 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7039 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7040 (ST_REGENTRY): New.
7041 (x86_64_st_collect_regmap): New.
7042 (X86_64_NUM_ST_COLLECT_GREGS): New.
7043 (AMD64_RIP_REGNUM): New.
7044 (supply_static_tracepoint_registers): New.
7045 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7046 (ST_REGENTRY): New.
7047 (i386_st_collect_regmap): New.
7048 (i386_NUM_ST_COLLECT_GREGS): New.
7049 (supply_static_tracepoint_registers): New.
7050 * server.c (handle_query): Handle qXfer:statictrace:read.
7051 <qSupported>: Report support for StaticTracepoints, and
7052 qXfer:statictrace:read features.
7053 * server.h (traceframe_read_sdata)
7054 (supply_static_tracepoint_registers): Declare.
7055 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7056 (unpack_varlen_hex): Include in IPA build.
7057 * Makefile.in (ustlibs, ustinc): New.
7058 (IPA_OBJS): Add remote-utils-ipa.o.
7059 ($(IPA_LIB)): Link -ldl and -lpthread.
7060 (UST_CFLAGS): New.
7061 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7062 * config.in, configure: Regenerate.
7063
7064 2010-06-20 Ian Lance Taylor <iant@google.com>
7065 Pedro Alves <pedro@codesourcery.com>
7066
7067 * linux-x86-low.c (always_true): Delete.
7068 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7069 trying to fool the compiler with always_true.
7070
7071 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7072
7073 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7074 conditions in gdbserver.
7075
7076 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7077
7078 * spu-low.c (spu_read_memory): Wrap around local store limit.
7079 (spu_write_memory): Likewise.
7080
7081 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7082
7083 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7084 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7085 LONGEST uses.
7086 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7087 uses.
7088 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7089 uses with LONGEST uses.
7090
7091 2010-06-14 Stan Shebs <stan@codesourcery.com>
7092 Pedro Alves <pedro@codesourcery.com>
7093
7094 Bytecode compiler.
7095
7096 * linux-x86-low.c: Include limits.h.
7097 (add_insns): New.
7098 (always_true): New.
7099 (EMIT_ASM): New.
7100 (EMIT_ASM32): New.
7101 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7102 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7103 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7104 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7105 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7106 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7107 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7108 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7109 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7110 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7111 (amd64_emit_void_call_2): New.
7112 (amd64_emit_ops): New.
7113 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7114 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7115 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7116 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7117 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7118 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7119 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7120 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7121 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7122 (i386_emit_stack_adjust, i386_emit_int_call_1)
7123 (i386_emit_void_call_2): New.
7124 (i386_emit_ops): New.
7125 (x86_emit_ops): New.
7126 (the_low_target): Install x86_emit_ops.
7127 * server.h (struct emit_ops): New.
7128 (get_raw_reg_func_addr): Declare.
7129 (current_insn_ptr, emit_error): Declare.
7130 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7131 (set_trace_state_variable_value): New defines.
7132 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7133 addr_get_trace_state_variable_value and
7134 addr_set_trace_state_variable_value.
7135 (symbol_list): New fields for get_raw_reg,
7136 get_trace_state_variable_value and set_trace_state_variable_value.
7137 (condfn): New typedef.
7138 (struct tracepoint): New field `compiled_cond'.
7139 (do_action_at_tracepoint): Clear compiled_cond.
7140 (get_trace_state_variable_value, set_trace_state_variable_value):
7141 Export in the IPA.
7142 (condition_true_at_tracepoint): If there's a compiled condition,
7143 run that.
7144 (current_insn_ptr, emit_error): New globals.
7145 (struct bytecode_address): New.
7146 (get_raw_reg_func_addr): New.
7147 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7148 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7149 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7150 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7151 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7152 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7153 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7154 (compile_tracepoint_condition, compile_bytecodes): New.
7155 * target.h (emit_ops): Forward declare.
7156 (struct target_ops): New field emit_ops.
7157 (target_emit_ops): New.
7158 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7159 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7160 * linux-low.c (linux_emit_ops): New.
7161 (linux_target_ops): Install it.
7162 * linux-low.h (struct linux_target_ops): New field emit_ops.
7163
7164 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7165
7166 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7167 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7168
7169 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7170 Stan Shebs <stan@codesourcery.com>
7171
7172 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7173 (all): Depend on $(extra_libraries).
7174 (install-only): Install the IPA.
7175 (IPA_OBJS, IPA_LIB): New.
7176 (clean): Remove the IPA lib.
7177 (IPAGENT_CFLAGS): New.
7178 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7179 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7180 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7181 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7182 * configure.ac: Check for atomic builtins support in the compiler.
7183 (IPA_DEPFILES, extra_libraries): Define.
7184 * configure.srv (ipa_obj): Add description.
7185 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7186 (i[34567]86-*-linux*): Set ipa_obj.
7187 (x86_64-*-linux*): Set ipa_obj.
7188 * linux-low.c (stabilizing_threads): New.
7189 (supports_fast_tracepoints): New.
7190 (linux_detach): Stabilize threads before detaching.
7191 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7192 the lwp is either not stabilizing, or is moving out of a jump pad.
7193 (linux_fast_tracepoint_collecting): New.
7194 (maybe_move_out_of_jump_pad): New.
7195 (enqueue_one_deferred_signal): New.
7196 (dequeue_one_deferred_signal): New.
7197 (linux_wait_for_event_1): If moving out of a jump pad, defer
7198 pending signals to later.
7199 (linux_stabilize_threads): New.
7200 (linux_wait_1): Check if threads need moving out of jump pads, and
7201 do it if so.
7202 (stuck_in_jump_pad_callback): New.
7203 (move_out_of_jump_pad_callback): New.
7204 (lwp_running): New.
7205 (linux_resume_one_lwp): Handle moving out of jump pads.
7206 (linux_set_resume_request): Dequeue deferred signals.
7207 (need_step_over_p): Also step over fast tracepoint jumps.
7208 (start_step_over): Also uninsert fast tracepoint jumps.
7209 (finish_step_over): Also reinsert fast tracepoint jumps.
7210 (linux_install_fast_tracepoint_jump): New.
7211 (linux_target_ops): Install linux_stabilize_threads and
7212 linux_install_fast_tracepoint_jump_pad.
7213 * linux-low.h (linux_target_ops) <get_thread_area,
7214 install_fast_tracepoint_jump_pad>: New fields.
7215 (struct lwp_info) <collecting_fast_tracepoint,
7216 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7217 (linux_get_thread_area): Declare.
7218 * linux-x86-low.c (jump_insn): New.
7219 (x86_get_thread_area): New.
7220 (append_insns): New.
7221 (push_opcode): New.
7222 (amd64_install_fast_tracepoint_jump_pad): New.
7223 (i386_install_fast_tracepoint_jump_pad): New.
7224 (x86_install_fast_tracepoint_jump_pad): New.
7225 (the_low_target): Install x86_get_thread_area and
7226 x86_install_fast_tracepoint_jump_pad.
7227 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7228 (struct fast_tracepoint_jump): New.
7229 (fast_tracepoint_jump_insn): New.
7230 (fast_tracepoint_jump_shadow): New.
7231 (find_fast_tracepoint_jump_at): New.
7232 (fast_tracepoint_jump_here): New.
7233 (delete_fast_tracepoint_jump): New.
7234 (set_fast_tracepoint_jump): New.
7235 (uninsert_fast_tracepoint_jumps_at): New.
7236 (reinsert_fast_tracepoint_jumps_at): New.
7237 (set_breakpoint_at): Use write_inferior_memory.
7238 (uninsert_raw_breakpoint): Use write_inferior_memory.
7239 (check_mem_read): Mask out fast tracepoint jumps.
7240 (check_mem_write): Mask out fast tracepoint jumps.
7241 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7242 (set_fast_tracepoint_jump): Declare.
7243 (delete_fast_tracepoint_jump)
7244 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7245 (reinsert_fast_tracepoint_jumps_at): Declare.
7246 * regcache.c: Don't compile many functions when building the
7247 in-process agent library.
7248 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7249 the register buffer in the heap.
7250 (free_register_cache): If the register buffer isn't owned by the
7251 regcache, don't free it.
7252 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7253 pre-existing register caches.
7254 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7255 type.
7256 (convert_ascii_to_int): : Constify `from' parameter type.
7257 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7258 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7259 the needed buffer in-place.
7260 (relocate_instruction): New.
7261 * server.c (handle_query) <qSymbols>: If the target supports
7262 tracepoints, give it a chance of looking up symbols. Report
7263 support for fast tracepoints.
7264 (handle_status): Stabilize threads.
7265 (process_serial_event): Adjust.
7266 * server.h (struct fast_tracepoint_jump): Forward declare.
7267 (struct process_info) <fast_tracepoint_jumps>: New field.
7268 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7269 (decode_X_packet, decode_M_packet): Adjust.
7270 (relocate_instruction): Declare.
7271 (in_process_agent_loaded): Declare.
7272 (tracepoint_look_up_symbols): Declare.
7273 (struct fast_tpoint_collect_status): Declare.
7274 (fast_tracepoint_collecting): Declare.
7275 (force_unlock_trace_buffer): Declare.
7276 (handle_tracepoint_bkpts): Declare.
7277 (initialize_low_tracepoint)
7278 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7279 * target.h (struct target_ops) <stabilize_threads,
7280 install_fast_tracepoint_jump_pad>: New fields.
7281 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7282 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7283 [HAVE_STDINT_H]: Include stdint.h.
7284 (trace_debug_1): Rename to ...
7285 (trace_vdebug): ... this.
7286 (trace_debug): Rename to ...
7287 (trace_debug_1): ... this. Add `level' parameter.
7288 (trace_debug): New.
7289 (ATTR_USED, ATTR_NOINLINE): New.
7290 (IP_AGENT_EXPORT): New.
7291 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7292 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7293 (about_to_request_buffer_space, trace_buffer_is_full)
7294 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7295 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7296 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7297 (traceframe_write_count, traceframes_created)
7298 (trace_state_variables)
7299 New renaming defines.
7300 (struct ipa_sym_addresses): New.
7301 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7302 (symbol_list): New.
7303 (ipa_sym_addrs): New.
7304 (all_tracepoint_symbols_looked_up): New.
7305 (in_process_agent_loaded): New.
7306 (write_e_ipa_not_loaded): New.
7307 (maybe_write_ipa_not_loaded): New.
7308 (tracepoint_look_up_symbols): New.
7309 (debug_threads) [IN_PROCESS_AGENT]: New.
7310 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7311 (UNKNOWN_SIDE_EFFECTS): New.
7312 (stop_tracing): New.
7313 (flush_trace_buffer): New.
7314 (stop_tracing_bkpt): New.
7315 (flush_trace_buffer_bkpt): New.
7316 (read_inferior_integer): New.
7317 (read_inferior_uinteger): New.
7318 (read_inferior_data_pointer): New.
7319 (write_inferior_data_pointer): New.
7320 (write_inferior_integer): New.
7321 (write_inferior_uinteger): New.
7322 (struct collect_static_trace_data_action): Delete.
7323 (enum tracepoint_type): New.
7324 (struct tracepoint) <type>: New field `type'.
7325 <actions_str, step_actions, step_actions_str>: Only include in
7326 GDBserver.
7327 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7328 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7329 (tracepoints): Use IP_AGENT_EXPORT.
7330 (last_tracepoint): Don't include in the IPA.
7331 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7332 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7333 (alloced_trace_state_variables): New.
7334 (trace_state_variables): Use IP_AGENT_EXPORT.
7335 (traceframe_t): Delete unused variable.
7336 (circular_trace_buffer): Don't include in the IPA.
7337 (trace_buffer_start): Delete.
7338 (struct trace_buffer_control): New.
7339 (trace_buffer_free): Delete.
7340 (struct ipa_trace_buffer_control): New.
7341 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7342 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7343 New.
7344 (trace_buffer_ctrl): New.
7345 (TRACE_BUFFER_CTRL_CURR): New.
7346 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7347 Reimplement as macros.
7348 (trace_buffer_wrap): Delete.
7349 (traceframe_write_count, traceframe_read_count)
7350 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7351 (struct tracepoint_hit_ctx) <type>: New field.
7352 (struct fast_tracepoint_ctx): New.
7353 (memory_barrier): New.
7354 (cmpxchg): New.
7355 (record_tracepoint_error): Update atomically in the IPA.
7356 (clear_inferior_trace_buffer): New.
7357 (about_to_request_buffer_space): New.
7358 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7359 updating the same buffer.
7360 (add_tracepoint): Default the tracepoint's type to trap
7361 tracepoint, and orig_size to -1.
7362 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7363 internal variables.
7364 (create_trace_state_variable): New parameter `gdb'. Handle it.
7365 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7366 (cmd_qtdp): Handle fast tracepoints.
7367 (cmd_qtdv): Adjust.
7368 (max_jump_pad_size): New.
7369 (gdb_jump_pad_head): New.
7370 (get_jump_space_head): New.
7371 (claim_jump_space): New.
7372 (sort_tracepoints): New.
7373 (MAX_JUMP_SIZE): New.
7374 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7375 IPA.
7376 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7377 support. Upload fast traceframes, and delete internal IPA
7378 breakpoints.
7379 (stop_tracing_handler): New.
7380 (flush_trace_buffer_handler): New.
7381 (cmd_qtstop): Upload fast tracepoints.
7382 (response_tracepoint): Handle fast tracepoints.
7383 (tracepoint_finished_step): Upload fast traceframes. Set the
7384 tracepoint hit context's tracepoint type.
7385 (handle_tracepoint_bkpts): New.
7386 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7387 type. Add comment about fast tracepoints.
7388 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7389 non-existing action_str field.
7390 (get_context_regcache): Handle fast tracepoints.
7391 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7392 to the regcache.
7393 (fast_tracepoint_from_jump_pad_address): New.
7394 (fast_tracepoint_from_ipa_tpoint_address): New.
7395 (collecting_t): New.
7396 (force_unlock_trace_buffer): New.
7397 (fast_tracepoint_collecting): New.
7398 (collecting): New.
7399 (gdb_collect): New.
7400 (write_inferior_data_ptr): New.
7401 (target_tp_heap): New.
7402 (target_malloc): New.
7403 (download_agent_expr): New.
7404 (UALIGN): New.
7405 (download_tracepoints): New.
7406 (download_trace_state_variables): New.
7407 (upload_fast_traceframes): New.
7408 (IPA_FIRST_TRACEFRAME): New.
7409 (IPA_NEXT_TRACEFRAME_1): New.
7410 (IPA_NEXT_TRACEFRAME): New.
7411 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7412 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7413 (gdb_jump_pad_buffer_end): New.
7414 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7415 (initialize_tracepoint): Adjust.
7416 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7417 buffer. Initialize the low module.
7418 * utils.c (PREFIX, TOOLNAME): New.
7419 (malloc_failure): Use PREFIX.
7420 (error): In the IPA, an error causes an exit.
7421 (fatal, warning): Use PREFIX.
7422 (internal_error): Use TOOLNAME.
7423 (NUMCELLS): Increase to 10.
7424 * configure, config.in: Regenerate.
7425
7426 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7427
7428 * server.c (handle_query) <qSupported>: Do two passes over the
7429 qSupported string to avoid nesting strtok.
7430
7431 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7432
7433 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7434 (CDEPS): New.
7435 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7436 -Wl,--dynamic-list.
7437 * configure: Regenerate.
7438 * proc-service.list: New.
7439
7440 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7441
7442 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7443 New comment.
7444
7445 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7446
7447 * gdbreplay.c (remote_open): Check error return from socket() call by
7448 its equality to -1 not by it being negative.
7449 * remote-utils.c (remote_open): Likewise.
7450
7451 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7452
7453 * config.h: Regenerate.
7454
7455 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7456
7457 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7458 doesn't provide PTRACE_GET_THREAD_AREA.
7459
7460 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7461
7462 * linux-m68k-low.c: Include <asm/ptrace.h>
7463 (ps_get_thread_area): Implement.
7464
7465 2010-05-03 Doug Evans <dje@google.com>
7466
7467 * event-loop.c (struct callback_event): New struct.
7468 (callback_list): New global.
7469 (append_callback_event, delete_callback_event): New functions.
7470 (process_callback): New function.
7471 (start_event_loop): Call it.
7472 * remote-utils.c (NOT_SCHEDULED): Define.
7473 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7474 moved out of readchar.
7475 (readchar): Rewrite. Call reschedule before returning.
7476 (reset_readchar): New function.
7477 (remote_close): Call it.
7478 (process_remaining, reschedule): New functions.
7479 * server.h (callback_handler_func): New typedef.
7480 (append_callback_event, delete_callback_event): Declare.
7481
7482 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7483
7484 * proc-service.c (ps_pglobal_lookup): Use
7485 thread_db_look_up_one_symbol.
7486 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7487 parameter. Use it instead of all_symbols_looked_up.
7488 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7489 field.
7490 (all_symbols_looked_up): Don't declare.
7491 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7492 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7493 field.
7494 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7495 Set all_symbols_looked_up here.
7496 (thread_db_look_up_one_symbol): New.
7497 (thread_db_get_tls_address): Adjust.
7498 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7499 thread_db object on the heap, and tentatively set it in the
7500 process structure.
7501 (thread_db_init): Don't set all_symbols_looked_up here.
7502 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7503
7504 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7505
7506 * linux-low.c (linux_kill, linux_detach): Adjust.
7507 (status_pending_p_callback): Remove redundant statement. Check
7508 for !TARGET_WAITIKIND_IGNORE, instead of
7509 TARGET_WAITKIND_STOPPED.
7510 (handle_tracepoints): Make sure LWP is locked. Adjust.
7511 (linux_wait_for_event_1): Adjust.
7512 (linux_cancel_breakpoints): New.
7513 (unsuspend_one_lwp): New.
7514 (unsuspend_all_lwps): New.
7515 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7516 (send_sigstop_callback): Change return type to int, add new
7517 `except' parameter and handle it.
7518 (suspend_and_send_sigstop_callback): New.
7519 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7520 pass them down. If SUSPEND, also increment the lwp's suspend
7521 count.
7522 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7523 (need_step_over_p): Don't consider suspended LWPs.
7524 (start_step_over): Adjust.
7525 (proceed_one_lwp): Change return type to int, add new `except'
7526 parameter and handle it.
7527 (unsuspend_and_proceed_one_lwp): New.
7528 (proceed_all_lwps): Use find_inferior instead of
7529 for_each_inferior.
7530 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7531 also decrement the suspend count of LWPs. Pass `except' down,
7532 instead of hacking its suspend count.
7533 (linux_pause_all): Add `freeze' parameter. Adjust.
7534 (linux_unpause_all): New.
7535 (linux_target_ops): Install linux_unpause_all.
7536 * server.c (handle_status): Adjust.
7537 * target.h (struct target_ops): New fields `unpause_all' and
7538 `cancel_breakpoints'. Add new parameter to `pause_all'.
7539 (pause_all): Add new `freeze' parameter.
7540 (unpause_all): New.
7541 (cancel_breakpoints): New.
7542 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7543 cancel breakpoints.
7544 (cmd_qtstart): Pause threads.
7545 (stop_tracing): Pause threads, and cancel breakpoints.
7546 * win32-low.c (win32_target_ops): Adjust.
7547
7548 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7549
7550 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7551 the inferior right away from here...
7552 (linux_wait_1): ... to here, and adjust to check the thread's
7553 last_resume_kind instead of the lwp's step or stop_expected flags.
7554
7555 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7556
7557 * README: Use consistent `GDB' and `GDBserver' spellings.
7558
7559 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7560
7561 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7562 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7563 (linux_detach_one_lwp): Assume the lwp is stopped.
7564 (any_thread_of): Delete.
7565 (linux_detach): Stop all lwps here. Don't blindly delete all
7566 breakpoints.
7567 (delete_lwp_callback): New.
7568 (linux_mourn): Delete all lwps of the process that is gone.
7569 (linux_wait_1): Don't delete the last lwp of the process here.
7570 * mem-break.h (mark_breakpoints_out): Declare.
7571 * mem-break.c (mark_breakpoints_out): New.
7572 (free_all_breakpoints): Use it.
7573 * server.c (handle_target_event): If the process is gone, mark
7574 breakpoints out.
7575 * thread-db.c (struct thread_db) <create_bp>: New field.
7576 (thread_db_enable_reporting): Fix prototype. Store a thread event
7577 breakpoint reference in the thread_db struct.
7578 (thread_db_load_search): Clear the thread_db object.
7579 (try_thread_db_load_1): Ditto.
7580 (switch_to_process): New.
7581 (disable_thread_event_reporting): Use it.
7582 (remove_thread_event_breakpoints): New.
7583 (thread_db_detach, thread_db_mourn): Use it.
7584
7585 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7586
7587 * linux-low.c (linux_enable_event_reporting): New.
7588 (linux_wait_for_event_1, handle_extended_wait): Use it.
7589
7590 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7591
7592 * linux-low.c (linux_kill_one_lwp, linux_kill)
7593 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7594 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7595 SIGSTOP even if the LWP is stopped.
7596 (send_sigstop_callback): New.
7597 (stop_all_lwps): Use send_sigstop_callback instead.
7598 (linux_resume_one_thread): Adjust.
7599 (proceed_one_lwp): Still proceed an LWP that the client has
7600 requested to stop, if we haven't reported it as stopped yet. Make
7601 sure that LWPs the client want stopped, have a pending SIGSTOP.
7602
7603 2010-04-26 Doug Evans <dje@google.com>
7604
7605 * server.c (handle_general_set): Make static.
7606
7607 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7608 Print received char after testing for error/eof instead of before.
7609 (input_interrupt): Tweak comment.
7610
7611 2010-04-23 Doug Evans <dje@google.com>
7612
7613 * server.c (start_inferior): Print inferior argv if --debug.
7614
7615 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7616
7617 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7618 * nto-x86-low.c: Include server.h
7619
7620 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7621
7622 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7623 be consistent with other sources of this directory.
7624 (init_registers_amd64): Correct name of source file of this function
7625 in the comment.
7626
7627 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7628
7629 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7630 64-bit executables.
7631
7632 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7633
7634 * win32-i386-low.c: Add 64-bit support.
7635 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7636 (init_registers_amd64): Declare.
7637 (mappings): Add 64-bit version of array.
7638 (init_windows_x86): New function.
7639 (the_low_target): Change init_arch field to init_windows_x86.
7640
7641 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7642
7643 * win32-low.c: Adapt to support also 64-bit architecture.
7644 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7645 (get_image_name): Use SIZE_T type for local variable `done'.
7646 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7647 (toolhelp_get_dll_name): Idem.
7648 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7649 Use uintptr_t typecast to avoid warning.
7650 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7651 (handle_exception): Use phex_nz to avoid warning.
7652 (win32_wait): Remove unused local variable `process'.
7653
7654 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7655
7656 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7657 `amd64-avx.o'.
7658
7659 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7660
7661 * configure.ac: Use `ws2_32' library for srv_mingw.
7662 * configure: Regenerate.
7663 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7664 * remote-utils.c: Likewise.
7665
7666 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7667
7668 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7669 if __x86_64__ is defined.
7670
7671 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7672
7673 * configure: Regenerate.
7674
7675 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7676
7677 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7678 * target.h (target_ops): New get_tib_address field.
7679 * win32-low.h (win32_thread_info): Add thread_local_base field.
7680 * win32-low.c (child_add_thread): Add tlb argument.
7681 Set thread_local_base field to TLB.
7682 (get_child_debug_event): Adapt to child_add_thread change.
7683 (win32_get_tib_address): New function.
7684 (win32_target_ops): Set get_tib_address field to
7685 win32_get_tib_address.
7686 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7687
7688 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7689
7690 * linux-low.c (linux_mourn): Also remove the process.
7691 * server.c (handle_target_event): Don't remove the process here.
7692 * nto-low.c (nto_mourn): New.
7693 (nto_target_ops): Install it.
7694 * spu-low.c (spu_mourn): New.
7695 (spu_target_ops): Install it.
7696 * win32-low.c (win32_mourn): New.
7697 (win32_target_ops): Install it.
7698
7699 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7700
7701 * server.h (buffer_xml_printf): Remove redundant `;'.
7702
7703 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7704
7705 * regcache.c (set_register_cache): Invalidate regcaches before
7706 changing the register cache layout.
7707 (regcache_invalidate_one): Allow a NULL regcache.
7708 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7709 regcaches before changing the register cache layout or the target
7710 regsets.
7711
7712 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7713
7714 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7715 variable warning on Linux/x86-64.
7716
7717 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7718
7719 GDBserver disconnected tracing support.
7720
7721 * linux-low.c (linux_remove_process): Delete.
7722 (add_lwp): Don't set last_resume_kind here.
7723 (linux_kill): Use `mourn'.
7724 (linux_detach): Use `thread_db_detach', and `mourn'.
7725 (linux_mourn): New.
7726 (linux_attach_lwp_1): Adjust comment.
7727 (linux_attach): last_resume_kind moved the thread_info; adjust.
7728 (status_pending_p_callback): Adjust.
7729 (linux_wait_for_event_1): Adjust.
7730 (count_events_callback, select_singlestep_lwp_callback)
7731 (select_event_lwp_callback, cancel_breakpoints_callback)
7732 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7733 (proceed_one_lwp): Adjust.
7734 (linux_async): Add debug output.
7735 (linux_thread_stopped): New.
7736 (linux_pause_all): New.
7737 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7738 linux_pause_all.
7739 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7740 (thread_db_free): Delete declaration.
7741 (thread_db_detach, thread_db_mourn): Declare.
7742 * thread-db.c (thread_db_init): Use thread_db_mourn.
7743 (thread_db_free): Delete, split in two.
7744 (disable_thread_event_reporting): New.
7745 (thread_db_detach): New.
7746 (thread_db_mourn): New.
7747
7748 * server.h (struct thread_info) <last_resume_kind>: New field.
7749 <attached>: Add comment.
7750 <gdb_detached>: New field.
7751 (handler_func): Change return type to int.
7752 (handle_serial_event, handle_target_event): Ditto.
7753 (gdb_connected): Declare.
7754 (tracing): Delete.
7755 (disconnected_tracing): Declare.
7756 (stop_tracing): Declare.
7757
7758 * server.c (handle_query) <qSupported>: Report support for
7759 disconnected tracing.
7760 (queue_stop_reply_callback): Account for running threads.
7761 (gdb_wants_thread_stopped): New.
7762 (gdb_wants_all_threads_stopped): New.
7763 (gdb_reattached_process): New.
7764 (handle_status): Clear the `gdb_detached' flag of all processes.
7765 In all-stop, stop all threads.
7766 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7767 (process_serial_event): If the remote connection breaks, or if an
7768 exit was forced with "monitor exit", force an event loop exit.
7769 Handle disconnected tracing on detach.
7770 (handle_serial_event): Adjust.
7771 (handle_target_event): If GDB isn't connected, forward events back
7772 to the inferior, unless the last process exited, in which case,
7773 exit gdbserver. Adjust interface.
7774
7775 * remote-utils.c (remote_open): Don't block in accept. Instead
7776 register an event loop source on the listen socket file
7777 descriptor. Refactor bits into ...
7778 (listen_desc): ... this new global.
7779 (gdb_connected): ... this new function.
7780 (enable_async_notification): ... this new function.
7781 (handle_accept_event): ... this new function.
7782 (remote_close): Clear remote_desc.
7783
7784 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7785
7786 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7787 New fields.
7788 (mourn_inferior): Define.
7789 (target_process_qsupported): Avoid the dangling else problem.
7790 (thread_stopped): Define.
7791 (pause_all): Define.
7792 (target_waitstatus_to_string): Declare.
7793 * target.c (target_waitstatus_to_string): New.
7794
7795 * tracepoint.c (tracing): Make extern.
7796 (disconnected_tracing): New.
7797 (stop_tracing): Make extern. Handle tracing stops due to GDB
7798 disconnecting.
7799 (cmd_qtdisconnected): New.
7800 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7801 (handle_tracepoint_general_set): Handle QTDisconnected.
7802
7803 * event-loop.c (event_handler_func): Change return type to int.
7804 (process_event): Bail out if the event handler wants the event
7805 loop to stop.
7806 (handle_file_event): Ditto.
7807 (start_event_loop): Bail out if the event handler wants the event
7808 loop to stop.
7809
7810 * nto-low.c (nto_target_ops): Adjust.
7811 * spu-low.c (spu_wait): Don't remove the process here.
7812 (spu_target_ops): Adjust.
7813 * win32-low.c (win32_wait): Don't remove the process here.
7814 (win32_target_ops): Adjust.
7815
7816 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7817
7818 * regcache.c (realloc_register_cache): Invalidate inferior's
7819 regcache before recreating it.
7820
7821 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7822
7823 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7824
7825 2010-04-09 Stan Shebs <stan@codesourcery.com>
7826 Pedro Alves <pedro@codesourcery.com>
7827
7828 * server.h (LONGEST): New.
7829 (struct thread_info) <while_stepping>: New field.
7830 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7831 Declare.
7832 (initialize_tracepoint, handle_tracepoint_general_set)
7833 (handle_tracepoint_query, tracepoint_finished_step)
7834 (tracepoint_was_hit, release_while_stepping_state_list):
7835 (current_traceframe): Declare.
7836 * server.c (handle_general_set): Handle tracepoint packets.
7837 (read_memory): New.
7838 (write_memory): New.
7839 (handle_search_memory_1): Use read_memory.
7840 (handle_query): Report support for conditional tracepoints, trace
7841 state variables, and tracepoint sources. Handle tracepoint
7842 queries.
7843 (main): Initialize the tracepoints module.
7844 (process_serial_event): Handle traceframe reads/writes.
7845
7846 * linux-low.c (handle_tracepoints): New.
7847 (linux_wait_1): Call it.
7848 (linux_resume_one_lwp): Handle while-stepping.
7849 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7850 (linux_target_ops): Install them.
7851 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7852 New field.
7853 * linux-x86-low.c (x86_supports_tracepoints): New.
7854 (the_low_target). Install it.
7855
7856 * mem-break.h (delete_breakpoint): Declare.
7857 * mem-break.c (delete_breakpoint): Make external.
7858
7859 * target.h (struct target_ops): Add `supports_tracepoints',
7860 `read_pc', and `write_pc' fields.
7861 (target_supports_tracepoints): Define.
7862 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7863 (phex_nz): New.
7864
7865 * regcache.h (struct regcache) <registers_owned>: New field.
7866 (init_register_cache, regcache_cpy): Declare.
7867 (regcache_read_pc, regcache_write_pc): Declare.
7868 (register_cache_size): Declare.
7869 (supply_regblock): Declare.
7870 * regcache.c (init_register_cache): New.
7871 (new_register_cache): Use it.
7872 (regcache_cpy): New.
7873 (register_cache_size): New.
7874 (supply_regblock): New.
7875 (regcache_read_pc, regcache_write_pc): New.
7876
7877 * tracepoint.c: New.
7878
7879 * Makefile.in (OBS): Add tracepoint.o.
7880 (tracepoint.o): New rule.
7881
7882 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7883
7884 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7885 (i386-mmx.o): New.
7886 (i386-mmx.c): Likewise.
7887 (i386-mmx-linux.o): Likewise.
7888 (i386-mmx-linux.c): Likewise.
7889
7890 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7891 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7892 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7893 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7894
7895 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7896 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7897 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7898
7899 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7900
7901 * Makefile.in (clean): Updated.
7902 (i386-avx.o): New.
7903 (i386-avx.c): Likewise.
7904 (i386-avx-linux.o): Likewise.
7905 (i386-avx-linux.c): Likewise.
7906 (amd64-avx.o): Likewise.
7907 (amd64-avx.c): Likewise.
7908 (amd64-avx-linux.o): Likewise.
7909 (amd64-avx-linux.c): Likewise.
7910
7911 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7912 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7913 (srv_amd64_regobj): Add amd64-avx.o.
7914 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7915 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7916 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7917 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7918 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7919 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7920 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7921
7922 * i387-fp.c: Include "i386-xstate.h".
7923 (i387_xsave): New.
7924 (i387_cache_to_xsave): Likewise.
7925 (i387_xsave_to_cache): Likewise.
7926 (x86_xcr0): Likewise.
7927
7928 * i387-fp.h (i387_cache_to_xsave): Likewise.
7929 (i387_xsave_to_cache): Likewise.
7930 (x86_xcr0): Likewise.
7931
7932 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7933 * linux-crisv32-low.c (target_regsets): Likewise.
7934 * linux-m68k-low.c (target_regsets): Likewise.
7935 * linux-mips-low.c (target_regsets): Likewise.
7936 * linux-ppc-low.c (target_regsets): Likewise.
7937 * linux-s390-low.c (target_regsets): Likewise.
7938 * linux-sh-low.c (target_regsets): Likewise.
7939 * linux-sparc-low.c (target_regsets): Likewise.
7940 * linux-xtensa-low.c (target_regsets): Likewise.
7941
7942 * linux-low.c: Include <sys/uio.h>.
7943 (regsets_fetch_inferior_registers): Support nt_type.
7944 (regsets_store_inferior_registers): Likewise.
7945 (linux_process_qsupported): New.
7946 (linux_target_ops): Add linux_process_qsupported.
7947
7948 * linux-low.h (regset_info): Add nt_type.
7949 (linux_target_ops): Add process_qsupported.
7950
7951 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7952 and <sys/uio.h>.
7953 (init_registers_i386_avx_linux): New.
7954 (init_registers_amd64_avx_linux): Likewise.
7955 (xmltarget_i386_linux_no_xml): Likewise.
7956 (xmltarget_amd64_linux_no_xml): Likewise.
7957 (PTRACE_GETREGSET): Likewise.
7958 (PTRACE_SETREGSET): Likewise.
7959 (x86_fill_xstateregset): Likewise.
7960 (x86_store_xstateregset): Likewise.
7961 (use_xml): Likewise.
7962 (x86_linux_update_xmltarget): Likewise.
7963 (x86_linux_process_qsupported): Likewise.
7964 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7965 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7966 init_registers_i386_linux here. Call
7967 x86_linux_update_xmltarget.
7968 (the_low_target): Add x86_linux_process_qsupported.
7969
7970 * server.c (handle_query): Call target_process_qsupported.
7971
7972 * target.h (target_ops): Add process_qsupported.
7973 (target_process_qsupported): New.
7974
7975 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7976
7977 * inferiors.c (add_thread): Set last_status kind to
7978 TARGET_WAITKIND_IGNORE.
7979 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7980 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7981 (linux_wait_1): Move `thread' local definition to block that uses
7982 it. Don't NULL initialize `event_child'.
7983 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7984 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7985 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7986
7987 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7988
7989 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7990 an extended waitstatus, or by a watchpoint.
7991 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7992 thread was stepping or has been stopped by a watchpoint.
7993
7994 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7995
7996 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7997 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7998 of another, then delete the previous, and validate all
7999 breakpoints.
8000 (validate_inserted_breakpoint): New.
8001 (delete_disabled_breakpoints): New.
8002 (validate_breakpoints): New.
8003 (check_mem_read): Validate breakpoints before trusting their
8004 shadow. Delete disabled breakpoints.
8005 (check_mem_write): Validate breakpoints before trusting they
8006 should be inserted. Delete disabled breakpoints.
8007 * mem-break.h (validate_breakpoints):
8008 * server.c (handle_query): Validate breakpoints when we see a
8009 qSymbol query.
8010
8011 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8012
8013 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8014 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8015 if we could tell there's a GDB breakpoint at stop_pc.
8016 (need_step_over_p): Don't do a step over if we find a GDB
8017 breakpoint at the resume PC.
8018
8019 * mem-break.c (struct raw_breakpoint): New.
8020 (enum bkpt_type): New type `gdb_breakpoint'.
8021 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8022 fields. New field `raw'.
8023 (find_raw_breakpoint_at): New.
8024 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8025 breakpoint instead.
8026 (set_breakpoint_at): Adjust.
8027 (delete_raw_breakpoint): New.
8028 (release_breakpoint): New.
8029 (delete_breakpoint): Rename to...
8030 (delete_breakpoint_1): ... this. Add proc parameter. Use
8031 release_breakpoint. Return ENOENT.
8032 (delete_breakpoint): Reimplement.
8033 (find_breakpoint_at): Delete.
8034 (find_gdb_breakpoint_at): New.
8035 (delete_breakpoint_at): Delete.
8036 (set_gdb_breakpoint_at): New.
8037 (delete_gdb_breakpoint_at): New.
8038 (gdb_breakpoint_here): New.
8039 (set_reinsert_breakpoint): Use release_breakpoint.
8040 (uninsert_breakpoint): Rename to ...
8041 (uninsert_raw_breakpoint): ... this.
8042 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8043 (reinsert_raw_breakpoint): Change parameter type to
8044 raw_breakpoint.
8045 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8046 instead.
8047 (check_breakpoints): Adjust. Use release_breakpoint.
8048 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8049 (breakpoint_inserted_here): Ditto.
8050 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8051 Don't trust the breakpoint's shadow if it is not inserted.
8052 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8053 (delete_all_breakpoints): Adjust.
8054 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8055 use delete_breakpoint_1.
8056
8057 * mem-break.h (breakpoints_supported): Delete declaration.
8058 (set_gdb_breakpoint_at): Declare.
8059 (gdb_breakpoint_here): Declare.
8060 (delete_breakpoint_at): Delete.
8061 (delete_gdb_breakpoint_at): Declare.
8062
8063 * server.h (struct raw_breakpoint): Forward declare.
8064 (struct process_info): New field `raw_breakpoints'.
8065
8066 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8067 breakpoints.
8068
8069 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8070
8071 * linux-low.c (status_pending_p_callback): Fix comment.
8072 (linux_wait_for_event_1): Move most of the internal breakpoint
8073 handling from here...
8074 (linux_wait_1): ... to here.
8075 (count_events_callback): New.
8076 (select_singlestep_lwp_callback): New.
8077 (select_event_lwp_callback): New.
8078 (cancel_breakpoints_callback): New.
8079 (select_event_lwp): New.
8080 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8081 priority to all LWPs that have had events that should be reported
8082 to the client. Cancel breakpoints when about to reporting the
8083 event to the client, not while stopping lwps. No longer cancel
8084 finished single-steps here.
8085 (cancel_finished_single_step): Delete.
8086 (cancel_finished_single_steps): Delete.
8087
8088 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8089
8090 * mem-break.c (enum bkpt_type): New.
8091 (struct breakpoint): New field `type'.
8092 (set_breakpoint_at): Change return type to struct breakpoint
8093 pointer. Set type to `other_breakpoint' by default.
8094 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8095 in the breakpoint list.
8096 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8097 (reinsert_breakpoint): Rename to ...
8098 (reinsert_raw_breakpoint): ... this.
8099 (reinsert_breakpoints_at): Adjust.
8100 * mem-break.h (struct breakpoint): Declare.
8101 (set_breakpoint_at): Change return type to struct breakpoint
8102 pointer.
8103
8104 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8105
8106 * server.c (handle_query): Assign, not compare.
8107
8108 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8109
8110 Teach linux gdbserver to step-over-breakpoints.
8111
8112 * linux-low.c (can_hardware_single_step): New.
8113 (supports_breakpoints): New.
8114 (handle_extended_wait): If stopping threads, read the stop pc of
8115 the new cloned LWP.
8116 (get_pc): New.
8117 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8118 low target doesn't support retrieving the PC.
8119 (add_lwp): Set last_resume_kind to resume_continue.
8120 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8121 (linux_attach): Don't clear stop_expected. Set the lwp's
8122 last_resume_kind to resume_stop.
8123 (linux_detach_one_lwp): Don't check for removed breakpoints.
8124 (check_removed_breakpoint): Delete.
8125 (status_pending_p): Rename to ...
8126 (status_pending_p_callback): ... this. Don't check for removed
8127 breakpoints. Don't consider threads that are stopped from GDB's
8128 perspective.
8129 (linux_wait_for_lwp): Always read the stop_pc here.
8130 (cancel_breakpoint): New.
8131 (step_over_bkpt): New global.
8132 (linux_wait_for_event_1): Implement stepping over breakpoints.
8133 (gdb_wants_lwp_stopped): New.
8134 (gdb_wants_all_stopped): New.
8135 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8136 single-step traps here. Store the thread's last reported target
8137 wait status.
8138 (send_sigstop): Don't clear stop_expected. Always set it,
8139 instead.
8140 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8141 (cancel_finished_single_step): New.
8142 (cancel_finished_single_steps): New.
8143 (wait_for_sigstop): Don't cancel finished single-step traps here.
8144 (linux_resume_one_lwp): Don't check for removed breakpoints.
8145 Don't set `step' on non-hardware step archs.
8146 (linux_set_resume_request): Ignore resume_stop requests if already
8147 stopping or stopped. Set the lwp's last_resume_kind.
8148 (resume_status_pending_p): Don't check for removed breakpoints.
8149 (need_step_over_p): New.
8150 (start_step_over): New.
8151 (finish_step_over): New.
8152 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8153 requests. Clear the thread's last reported target waitstatus.
8154 Don't use the `suspended' flag. Don't consider pending breakpoints.
8155 (linux_resume): Start a step-over if necessary.
8156 (proceed_one_lwp): New.
8157 (proceed_all_lwps): New.
8158 (unstop_all_lwps): New.
8159 * linux-low.h (struct lwp_info): Rewrite comment for the
8160 `suspended' flag. Add the `stop_pc' field. Delete the
8161 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8162 Add `'last_resume_kind' and `need_step_over' fields.
8163 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8164 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8165 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8166 (set_raw_breakpoint_at): New.
8167 (set_breakpoint_at): Rewrite to use it.
8168 (reinsert_breakpoint_handler): Delete.
8169 (set_reinsert_breakpoint): New.
8170 (reinsert_breakpoint_by_bp): Delete.
8171 (delete_reinsert_breakpoints): New.
8172 (uninsert_breakpoint): Rewrite.
8173 (uninsert_breakpoints_at): New.
8174 (reinsert_breakpoint): Rewrite.
8175 (reinsert_breakpoints_at): New.
8176 (check_breakpoints): Rewrite.
8177 (breakpoint_here): New.
8178 (breakpoint_inserted_here): New.
8179 (check_mem_read): Adjust.
8180 * mem-break.h (breakpoints_supported, breakpoint_here)
8181 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8182 (reinsert_breakpoint_by_bp): Delete declaration.
8183 (delete_reinsert_breakpoints): Declare.
8184 (reinsert_breakpoint): Delete declaration.
8185 (reinsert_breakpoints_at): Declare.
8186 (uninsert_breakpoint): Delete declaration.
8187 (uninsert_breakpoints_at): Declare.
8188 (check_breakpoints): Adjust prototype.
8189 * server.h: Adjust include order.
8190 (struct thread_info): Declare here. Add a `last_status' field.
8191
8192 2010-03-23 Michael Snyder <msnyder@vmware.com>
8193
8194 * server.c (crc32): New function.
8195 (handle_query): Add handling for 'qCRC:' request.
8196
8197 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8198
8199 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8200 lwp had been stopped by a watchpoint.
8201
8202 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8203
8204 * server.h (internal_error): Declare.
8205 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8206 * utils.c (internal_error): New function.
8207
8208 2010-03-15 Andreas Schwab <schwab@redhat.com>
8209
8210 * configure.srv: Fix typo setting srv_regobj.
8211
8212 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8213
8214 * linux-low.c (fetch_register): Avoid passing a non string literal
8215 format to `error'.
8216 (usr_store_inferior_registers): Ditto.
8217
8218 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8219
8220 * linux-low.c (linux_write_memory): Bail out early if peeking
8221 memory failed.
8222
8223 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8224
8225 * linux-low.h (struct lwp_info): New fields
8226 `stopped_by_watchpoint' and `stopped_data_address'.
8227 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8228 here, and cache them in the lwp object.
8229 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8230 directly.
8231 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8232 field.
8233 (linux_stopped_by_watchpoint): Rewrite.
8234 (linux_stopped_data_address): Rewrite.
8235
8236 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8237
8238 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8239 switching the current inferior, not before.
8240
8241 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8242
8243 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8244 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8245 i386-linux.c and amd64-linux.c.
8246 (reg-i386.o): Removed.
8247 (reg-i386.c): Likewise.
8248 (reg-i386-linux.o): Likewise.
8249 (reg-i386-linux.c): Likewise.
8250 (reg-x86-64.o): Likewise.
8251 (reg-x86-64.c): Likewise.
8252 (reg-x86-64-linux.o): Likewise.
8253 (reg-x86-64-linux.c): Likewise.
8254 (i386.o): New.
8255 (i386.c): Likewise.
8256 (i386-linux.o): Likewise.
8257 (i386-linux.c): Likewise.
8258 (amd64.o): Likewise.
8259 (amd64.c): Likewise.
8260 (amd64-linux.o): Likewise.
8261 (amd64-linux.c): Likewise.
8262
8263 * configure.srv (srv_i386_regobj): New.
8264 (srv_i386_linux_regobj): Likewise.
8265 (srv_amd64_regobj): Likewise.
8266 (srv_amd64_linux_regobj): Likewise.
8267 (srv_i386_32bit_xmlfiles): Likewise.
8268 (srv_i386_64bit_xmlfiles): Likewise.
8269 (srv_i386_xmlfiles): Likewise.
8270 (srv_amd64_xmlfiles): Likewise.
8271 (srv_i386_linux_xmlfiles): Likewise.
8272 (srv_amd64_linux_xmlfiles): Likewise.
8273 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8274 srv_xmlfiles to $srv_i386_xmlfiles.
8275 (i[34567]86-*-mingw32ce*): Likewise.
8276 (i[34567]86-*-mingw*): Likewise.
8277 (i[34567]86-*-nto*): Likewise.
8278 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8279 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8280 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8281 (x86_64-*-linux*): Likewise.
8282
8283 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8284 (init_registers_amd64_linux): New.
8285 (x86_arch_setup): Replace init_registers_x86_64_linux with
8286 init_registers_amd64_linux.
8287
8288 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8289
8290 * configure.ac: Check for libdl. If it is not available link against
8291 static libthread_db.
8292 * configure: Regenerate.
8293
8294 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8295
8296 PR9605
8297
8298 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8299 handing a read watchpoint.
8300 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8301
8302 2010-02-12 Doug Evans <dje@google.com>
8303
8304 * linux-low.c (linux_supports_tracefork_flag): Document.
8305 (linux_look_up_symbols): Add comment.
8306
8307 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8308
8309 * regcache.c (supply_register): Clear regcache if buf is NULL.
8310
8311 2010-02-02 Nicolas Roche <roche@sourceware.org>
8312 Joel Brobecker <brobecker@adacore.com>
8313
8314 * inferiors.c (find_inferior): Add function documentation.
8315 (unloaded_dll): Handle the case where the unloaded dll has not
8316 been previously registered in the dll list.
8317
8318 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8319
8320 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8321 (thumb2_breakpoint): New.
8322 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8323
8324 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8325
8326 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8327 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8328 breakpoints.
8329
8330 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8331
8332 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8333
8334 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8335
8336 * linux-s390-low.c (s390_collect_ptrace_register)
8337 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8338
8339 2010-01-21 Doug Evans <dje@google.com>
8340
8341 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8342 (PTRACE_ARG4_TYPE): New macro.
8343 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8344 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8345 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8346 (usr_store_inferior_registers): Ditto.
8347 (linux_read_memory, linux_write_memory): Ditto.
8348 (linux_test_for_tracefork): Ditto.
8349
8350 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8351 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8352
8353 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8354
8355 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8356 target.
8357
8358 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8359
8360 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8361 prototype to take a regcache. Adjust.
8362
8363 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8364
8365 * regcache.h (struct thread_info): Forward declare.
8366 (struct regcache): New.
8367 (new_register_cache): Adjust prototype.
8368 (get_thread_regcache): Declare.
8369 (free_register_cache): Adjust prototype.
8370 (registers_to_string, registers_from_string): Ditto.
8371 (supply_register, supply_register_by_name, collect_register)
8372 (collect_register_as_string, collect_register_by_name): Ditto.
8373 * regcache.c (struct inferior_regcache_data): Delete.
8374 (get_regcache): Rename to ...
8375 (get_thread_regcache): ... this. Adjust. Switch inferior before
8376 fetching registers.
8377 (regcache_invalidate_one): Adjust.
8378 (regcache_invalidate): Fix prototype.
8379 (new_register_cache): Return the new register cache.
8380 (free_register_cache): Change prototype.
8381 (realloc_register_cache): Adjust.
8382 (registers_to_string): Change prototype to take a regcache. Adjust.
8383 (registers_from_string): Ditto.
8384 (register_data): Ditto.
8385 (supply_register): Ditto.
8386 (supply_register_by_name): Ditto.
8387 (collect_register): Ditto.
8388 (collect_register_as_string): Ditto.
8389 (collect_register_by_name): Ditto.
8390 * server.c (process_serial_event): Adjust.
8391 * linux-low.h (regset_fill_func, regset_store_func): Change
8392 prototype.
8393 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8394 Change prototype.
8395 * linux-low.c (get_stop_pc): Adjust.
8396 (check_removed_breakpoint): Adjust.
8397 (linux_wait_for_event): Adjust.
8398 (linux_resume_one_lwp): Adjust.
8399 (fetch_register): Add regcache parameter. Adjust.
8400 (usr_store_inferior_registers): Ditto.
8401 (regsets_fetch_inferior_registers): Ditto.
8402 (regsets_store_inferior_registers): Ditto.
8403 (linux_fetch_registers, linux_store_registers): Ditto.
8404 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8405 regcache. Adjust.
8406 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8407 Ditto.
8408 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8409 prototype to take a regcache.
8410 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8411 * remote-utils.c (convert_ascii_to_int, outreg)
8412 (prepare_resume_reply): Change prototype to take a regcache.
8413 Adjust.
8414 * target.h (struct target_ops) <fetch_registers, store_registers>:
8415 Change prototype to take a regcache.
8416 (fetch_inferior_registers, store_inferior_registers): Change
8417 prototype to take a regcache. Adjust.
8418 * proc-service.c (ps_lgetregs): Adjust.
8419 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8420 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8421 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8422 take a regcache. Adjust.
8423 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8424 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8425 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8426 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8427 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8428 (cris_cannot_fetch_register):
8429 (cris_breakpoint_at): Change prototype to take a regcache.
8430 Adjust.
8431 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8432 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8433 to take a regcache. Adjust.
8434 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8435 Adjust.
8436 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8437 take a regcache. Adjust.
8438 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8439 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8440 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8441 * linux-mips-low.c (mips_get_pc):
8442 (mips_set_pc): Change prototype to take a regcache. Adjust.
8443 (mips_reinsert_addr): Adjust.
8444 (mips_collect_register): Change prototype to take a regcache.
8445 Adjust.
8446 (mips_supply_register):
8447 (mips_collect_register_32bit, mips_supply_register_32bit)
8448 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8449 (mips_store_fpregset): Ditto.
8450 * linux-ppc-low.c (ppc_supply_ptrace_register)
8451 (ppc_supply_ptrace_register): Ditto.
8452 (parse_spufs_run): Adjust.
8453 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8454 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8455 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8456 take a regcache. Adjust.
8457 * linux-s390-low.c (s390_collect_ptrace_register)
8458 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8459 (s390_set_pc): Change prototype to take a regcache. Adjust.
8460 (s390_arch_setup): Adjust.
8461 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8462 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8463 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8464 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8465 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8466 regcache. Adjust.
8467 (sparc_breakpoint_at): Adjust.
8468 * linux-xtensa-low.c (xtensa_fill_gregset):
8469 (xtensa_store_gregset):
8470 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8471 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8472 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8473 prototype to take a regcache. Adjust.
8474 * win32-arm-low.c (arm_fetch_inferior_register)
8475 (arm_store_inferior_register): Change prototype to take a
8476 regcache. Adjust.
8477 * win32-i386-low.c (i386_fetch_inferior_register)
8478 (i386_store_inferior_register): Change prototype to take a
8479 regcache. Adjust.
8480 * win32-low.c (child_fetch_inferior_registers)
8481 (child_store_inferior_registers): Change prototype to take a
8482 regcache. Adjust.
8483 (win32_wait): Adjust.
8484 (win32_fetch_inferior_registers): Change prototype to take a
8485 regcache. Adjust.
8486 (win32_store_inferior_registers): Adjust.
8487 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8488 store_inferior_register>: Change prototype to take a regcache.
8489
8490 2010-01-20 Doug Evans <dje@google.com>
8491
8492 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8493 #ifdef.
8494 (linux_wait_for_event1, linux_init_signals): Ditto.
8495 (W_STOPCODE): Provide definition if missing.
8496
8497 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8498
8499 * linux-low.c (linux_core_of_thread): New.
8500 (compare_ints, show_process, list_threads): New.
8501 (linux_qxfer_osdata): Report threads and cores.
8502 (linux_target_op): Register linux_core_of_thread.
8503 * remote-utils.c (prepare_resume_reply): Report the core.
8504 (buffer_xml_printf): Support %d specifier.
8505 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8506 New.
8507 (handle_query): Handle qXfer:threads. Announce availability
8508 thereof.
8509 * target.h (struct target_ops): New field core_of_thread.
8510
8511 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8512
8513 * Makefile.in (clean): Remove new generated files.
8514 (reg-s390.o, reg-s390.c): Remove rules.
8515 (reg-s390x.o, reg-s390x.c): Likewise.
8516 (s390-linux32.o, s390-linux32.c): Add rules.
8517 (s390-linux64.o, s390-linux64.c): Likewise.
8518 (s390x-linux64.o, s390x-linux64.c): Likewise.
8519 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8520 * linux-s390-low.c: Include <elf.h>.
8521 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8522 (init_registers_s390): Remove prototype.
8523 (init_registers_s390x): Likewise.
8524 (init_registers_s390_linux32): Add prototype.
8525 (init_registers_s390_linux64): Likewise.
8526 (init_registers_s390x_linux64): Likewise.
8527 (s390_num_regs_3264): New define.
8528 (s390_regmap_3264): New global variable.
8529 (s390_cannot_fetch_register): Remove obsolete check.
8530 (s390_cannot_store_register): Likewise.
8531 (s390_collect_ptrace_register): Handle upper/lower register halves.
8532 (s390_supply_ptrace_register): Likewise.
8533 (s390_fill_gregset): Update to register number changes.
8534 (s390_get_hwcap): New routine.
8535 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8536 Install appropriate regmap and register set.
8537
8538 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8539
8540 * server.c (gdbserver_version): Update copyright year to 2010.
8541 * gdbreplay.c (gdbreplay_version): Likewise.
8542
8543 2009-12-28 Doug Evans <dje@google.com>
8544
8545 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8546 elf/external.h. Include <elf.h> instead but only if necessary.
8547
8548 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8549
8550 * linux-low.c (linux_remove_process): Remove `detaching'
8551 parameter. Don't release/detach from thread_db here.
8552 (linux_kill): Release/detach from thread_db here, ...
8553 (linux_detach): ... and here, before actually detaching.
8554 (linux_wait_1): ... and here, when a process exits.
8555 * thread-db.c (any_thread_of): New.
8556 (thread_db_free): Switch the current inferior to a thread of the
8557 passed in process.
8558
8559 2009-12-21 Doug Evans <dje@google.com>
8560
8561 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8562
8563 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8564 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8565 warning ifndef __NR_tkill. Move setting of errno there too.
8566 Delete unnecessary resetting of errno after syscall.
8567 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8568
8569 * configure.ac: Check for dladdr.
8570 * config.in: Regenerate.
8571 * configure: Regenerate.
8572 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8573 (try_thread_db_load): Update.
8574
8575 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8576
8577 2009-12-18 Doug Evans <dje@google.com>
8578
8579 * event-loop.c: Include unistd.h if it exists.
8580
8581 * linux-low.c (my_waitpid): Move definition away from being in
8582 between linux_tracefork_child/linux_test_for_tracefork.
8583
8584 * gdb_proc_service.h (psaddr_t): Fix type.
8585 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8586 signature to match glibc.
8587
8588 2009-12-16 Doug Evans <dje@google.com>
8589
8590 * linux-low.c (linux_read_memory): Fix argument to read.
8591
8592 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8593
8594 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8595 events, don't leave current_inferior pointing at null.
8596
8597 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8598
8599 * win32-low.c (LOG): Delete.
8600 (OUTMSG): Output to stderr.
8601 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8602 on compile time LOG macro.
8603 (win32_wait): Fix debug output.
8604
8605 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8606
8607 * win32-low.c (win32_add_one_solib): If the dll name is
8608 "ntdll.dll", prepend the system directory to the dll path.
8609
8610 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8611
8612 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8613
8614 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8615 Vladimir Prus <vladimir@codesourcery.com>
8616
8617 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8618 * configure.ac: Check for __mcoldfire__ and set
8619 gdb_cv_m68k_is_coldfire.
8620 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8621 reg-cf.o and reg-m68k.o.
8622 * configure: Regenerated.
8623
8624 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8625
8626 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8627 Pass it to thread_db_free.
8628 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8629 proper `detaching' argument to linux_remove_process.
8630 * linux-low.h (thread_db_free): Add `detaching' parameter.
8631 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8632 to thread_db_free.
8633 (thread_db_free): Add `detaching' parameter. Only
8634 call td_ta_clear_event if detaching from process.
8635
8636 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8637
8638 * thread-db.c (thread_db_free): Fix typo.
8639
8640 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8641
8642 PR gdb/10838
8643 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8644
8645 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8646
8647 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8648 with an i686 compiler.
8649 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8650 needed.
8651 * configure: Rebuilt.
8652
8653 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8654
8655 PR gdb/10783
8656
8657 * server.c (handle_search_memory_1): Correct read_addr initialization
8658 in loop for searching subsequent chunks.
8659
8660 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8661
8662 * configure.ac: New --with-libthread-db option.
8663 * thread-db.c: Allow direct dependence on libthread_db.
8664 (thread_db_free): Adjust.
8665 * config.in: Regenerate.
8666 * configure: Likewise.
8667
8668 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8669
8670 PR gdb/10757
8671 * thread-db.c (attach_thread): New function.
8672 (maybe_attach_thread): Return success/failure.
8673 (find_new_threads_callback): Adjust.
8674 (thread_db_find_new_threads): Loop until no new threads.
8675
8676 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8677
8678 * proc-service.c (ps_lgetregs): Formatting.
8679
8680 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8681
8682 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8683 * configure.ac: Adjust.
8684 * linux-low.h (struct process_info_private): Move members to struct
8685 thread_db.
8686 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8687 * linux-low.c (linux_remove_process): Adjust.
8688 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8689 * server.c (handle_query): Move code ...
8690 (handle_monitor_command): ... here. New function.
8691 * target.h (struct target_ops): New member.
8692 * thread-db.c (struct thread_db): New.
8693 (libthread_db_search_path): New variable.
8694 (thread_db_create_event, thread_db_enable_reporting)
8695 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8696 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8697 (try_thread_db_load_1, dladdr_to_soname): New functions.
8698 (try_thread_db_load, thread_db_load_search): New functions.
8699 (thread_db_init): Search for libthread_db.
8700 (thread_db_free): New function.
8701 (thread_db_handle_monitor_command): Likewise.
8702 * config.in: Regenerate.
8703 * configure: Regenerate.
8704
8705 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8706
8707 * spu-low.c (spu_kill): Wait for inferior to terminate.
8708 Call clear_inferiors.
8709 (spu_detach): Call clear_inferiors.
8710
8711 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8712
8713 * aclocal.m4: Regenerate.
8714 * config.in: Likewise.
8715 * configure: Likewise.
8716
8717 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8718
8719 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8720 (parse_spufs_run): New function.
8721 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8722 (ppc_breakpoint_at): Handle SPU breakpoints.
8723
8724 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8725
8726 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8727 (SPUFS_MAGIC): Define.
8728 (spu_enumerate_spu_ids): New function.
8729 (linux_qxfer_spu): New function.
8730 (linux_target_ops): Install linux_qxfer_spu.
8731
8732 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8733
8734 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8735 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8736 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8737 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8738 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8739 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8740 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8741 (init_registers_powerpc_cell32l): Add prototype.
8742 (init_registers_powerpc_cell64l): Likewise.
8743 (ppc_arch_setup): Detect Cell/B.E. architecture.
8744
8745 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8746
8747 * Makefile.in (datarootdir): New variable.
8748
8749 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8750
8751 * linux-low.c (linux_write_memory): Update debugging output.
8752 * Makefile.in (clean): Add new descriptions.
8753 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8754 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8755 * configure.srv: Add new files for arm*-*-linux*.
8756 * linux-arm-low.c: Add new declarations.
8757 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8758 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8759 (HWCAP_VFPv3D16): New.
8760 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8761 instead of __IWMMXT__.
8762 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8763 (arm_arch_setup): New.
8764 (target_regsets): Remove #ifdef. Add VFP regset.
8765 (the_low_target): Use arm_arch_setup.
8766
8767 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8768
8769 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8770 the main thread again.
8771
8772 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8773
8774 Adding Neutrino gdbserver.
8775 * configure: Regenerated.
8776 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8777 * configure.srv (i[34567]86-*-nto*): New target.
8778 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8779 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8780 (nto_comctrl) [__QNX__]: New function.
8781 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8782
8783 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8784
8785 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8786 srv_tgtobj.
8787
8788 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8789 Pedro Alves <pedro@codesourcery.com>
8790
8791 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8792 don't support CONTEXT_EXTENDED_REGISTERS.
8793 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8794 (the_low_target): Install them.
8795 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8796 failing with ERROR_PIPE_NOT_CONNECTED.
8797
8798 2009-06-30 Doug Evans <dje@google.com>
8799 Pierre Muller <muller@ics.u-strasbg.fr>
8800
8801 Add h/w watchpoint support to x86-linux, win32-i386.
8802 * Makefile.in (SFILES): Add i386-low.c
8803 (i386_low_h): Define.
8804 (i386-low.o): Add dependencies.
8805 (linux-x86-low.o): Add i386-low.h dependency.
8806 (win32-i386-low.o): Ditto.
8807 * i386-low.c: New file.
8808 * i386-low.h: New file.
8809 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8810 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8811 * linux-low.c (linux_add_process): Initialize arch_private.
8812 (linux_remove_process): Free arch_private.
8813 (add_lwp): Initialize arch_private.
8814 (delete_lwp): Free arch_private.
8815 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8816 provided.
8817 * linux-low.h (process_info_private): New member arch_private.
8818 (lwp_info): New member arch_private.
8819 (linux_target_ops): New members new_process, new_thread,
8820 prepare_to_resume.
8821 (ptid_of): New macro.
8822 * linux-x86-low.c: Include stddef.h, i386-low.h.
8823 (arch_process_info): New struct.
8824 (arch_lwp_info): New struct.
8825 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8826 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8827 (i386_dr_low_get_status): New function.
8828 (x86_insert_point, x86_remove_point): New functions.
8829 (x86_stopped_by_watchpoint): New function.
8830 (x86_stopped_data_address): New function.
8831 (x86_linux_new_process, x86_linux_new_thread): New functions.
8832 (x86_linux_prepare_to_resume): New function.
8833 (the_low_target): Add entries for insert_point, remove_point,
8834 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8835 prepare_to_resume.
8836 * server.c (debug_hw_points): New global.
8837 (monitor_show_help): Document set debug-hw-points.
8838 (handle_query): Process "set debug-hw-points".
8839 * server.h (debug_hw_points): Declare.
8840 (paddress): Declare.
8841 * utils.c (NUMCELLS, CELLSIZE): New macros.
8842 (get_sell, xsnprintf, paddress): New functions.
8843 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8844 remove_point, stopped_by_watchpoint, stopped_data_address.
8845 * win32-i386-low.c: Include i386-low.h.
8846 (debug_reg_state): Replaces dr.
8847 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8848 (i386_dr_low_get_status): New function.
8849 (i386_insert_point, i386_remove_point): New functions.
8850 (i386_stopped_by_watchpoint): New function.
8851 (i386_stopped_data_address): New function.
8852 (i386_initial_stuff): Update.
8853 (get_thread_context,set_thread_context,i386_thread_added): Update.
8854 (the_low_target): Add entries for insert_point,
8855 remove_point, stopped_by_watchpoint, stopped_data_address.
8856 * win32-low.c (win32_insert_watchpoint): New function.
8857 (win32_remove_watchpoint): New function.
8858 (win32_stopped_by_watchpoint): New function.
8859 (win32_stopped_data_address): New function.
8860 (win32_target_ops): Add entries for insert_watchpoint,
8861 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8862 * win32-low.h (win32_target_ops): New members insert_point,
8863 remove_point, stopped_by_watchpoint, stopped_data_address.
8864
8865 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8866
8867 * server.c (process_serial_event): Re-return unsupported, not
8868 error, if the type isn't recognized. Re-allow supporting only
8869 insert or remove packets. Also call require_running for
8870 breakpoints. Add missing break statement to default case. Tidy.
8871 * target.h (struct target_ops): Rename insert_watchpoint to
8872 insert_point, and remove_watchpoint to remove_point.
8873
8874 * linux-low.h (struct linux_target_ops): Likewise.
8875 * linux-low.c (linux_insert_watchpoint): Rename to ...
8876 (linux_insert_point): ... this. Adjust.
8877 (linux_remove_watchpoint): Rename to ...
8878 (linux_remove_point): ... this. Adjust.
8879 (linux_target_ops): Adjust.
8880 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8881 (cris_insert_point): ... this.
8882 (cris_remove_watchpoint): Rename to ...
8883 (cris_remove_point): ... this.
8884 (the_low_target): Adjust.
8885
8886 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8887
8888 * server.c (handle_v_kill): Pass signal_pid to
8889 kill_inferior if multi_process is zero.
8890
8891 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8892
8893 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8894 * target.h (target_ops): Comment for *_watchpoint to make it clear
8895 the functions can get types '0' and '1'.
8896
8897 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8898
8899 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8900 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8901 * regcache.c (get_regcache): Likewise.
8902 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8903 * win32-low.c (child_fetch_inferior_registers): Remove check for
8904 regno 0.
8905
8906 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8907 Pedro Alves <pedro@codesourcery.com>
8908
8909 * target.h (struct target_ops) <supports_multi_process>: New
8910 callback.
8911 (target_supports_multi_process): New.
8912 * server.c (handle_query): Even if GDB reports support, only
8913 enable multi-process if the target also supports it. Report
8914 multi-process support only if the target backend supports it.
8915 * linux-low.c (linux_supports_multi_process): New function.
8916 (linux_target_ops): Install it as target_supports_multi_process
8917 callback.
8918
8919 2009-05-24 Doug Evans <dje@google.com>
8920
8921 Global renaming of find_thread_pid to find_thread_ptid.
8922 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8923 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8924 All callers updated.
8925
8926 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8927 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8928 directly.
8929
8930 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8931 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8932 (linux_resume_one_lwp): Ditto.
8933
8934 2009-05-23 Doug Evans <dje@google.com>
8935
8936 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8937 from struct inferior_list_entry * to struct lwp_info *.
8938 All callers updated.
8939
8940 2009-05-13 Doug Evans <dje@google.com>
8941
8942 * linux-x86-low.c: Don't include assert.h.
8943 (x86_siginfo_fixup): Use fatal, not assert.
8944 (x86_arch_setup): Fix comment.
8945
8946 2009-05-12 Doug Evans <dje@google.com>
8947
8948 Biarch support for i386/amd64 gdbserver.
8949 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8950 Add linux-x86-low.c.
8951 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8952 (linux-x86-low.o): Add.
8953 * linux-x86-64-low.c: Delete.
8954 * linux-i386-low.c: Delete.
8955 * linux-x86-low.c: New file.
8956 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8957 linux-x86-low.o.
8958 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8959 linux-x86-low.o.
8960 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8961 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8962 (linux_child_pid_to_exec_file): New function.
8963 (elf_64_header_p, elf_64_file_p): New functions.
8964 (siginfo_fixup): New function.
8965 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8966 give target a chance to convert layout.
8967 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8968 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8969
8970 2009-05-07 Doug Evans <dje@google.com>
8971
8972 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8973 (regsets_store_inferior_registers): Ditto.
8974
8975 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8976
8977 PR server/10048
8978
8979 * linux-low.c (must_set_ptrace_flags): Delete.
8980 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8981 of the global.
8982 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8983 `lwp->must_set_ptrace_flags' instead.
8984 (linux_wait_for_event_1): Set ptrace options here.
8985 (linux_wait_1): ... not here.
8986
8987 2009-04-30 Doug Evans <dje@google.com>
8988
8989 * inferiors.c (started_inferior_callback): New function.
8990 (attached_inferior_callback): New function.
8991 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8992 * server.c (print_started_pid, print_attached_pid): New functions.
8993 (detach_or_kill_for_exit): New function.
8994 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8995 * server.h (have_started_inferiors_p): Declare.
8996 (have_attached_inferiors_p): Declare.
8997
8998 * inferiors.c (remove_process): Fix memory leak, free process.
8999 * linux-low.c (linux_remove_process): New function.
9000 (linux_kill): Call it instead of remove_process.
9001 (linux_detach, linux_wait_1): Ditto.
9002
9003 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9004
9005 * configure.srv: Add x86 Windows CE target.
9006
9007 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9008
9009 * inferiors.c (get_thread_process): Make global.
9010 * server.h (get_thread_process): Add prototype.
9011 * thread-db.c (find_one_thread): Use get_thread_process
9012 instead of current_process.
9013 (thread_db_get_tls_address): Do not crash if called when
9014 thread layer is not yet initialized.
9015
9016 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9017
9018 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9019 * spu-low.c (current_tid): Rename to ...
9020 (current_ptid): ... this.
9021 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9022 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9023 ptid_get_lwp (current_ptid) instead of current_tid.
9024 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9025 instead of current_tid. Use find_process_pid to verify pid
9026 argument is valid. Pass proper argument to remove_process.
9027 (spu_thread_alive): Compare current_ptid instead of current_tid.
9028 (spu_resume): Likewise.
9029
9030 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9031
9032 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9033 variable.
9034
9035 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9036
9037 Implement the multiprocess extensions, and add linux multiprocess
9038 support.
9039
9040 * server.h (ULONGEST): Declare.
9041 (struct ptid, ptid_t): New.
9042 (minus_one_ptid, null_ptid): Declare.
9043 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9044 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9045 (struct inferior_list_entry): Change `id' type from unsigned from
9046 to ptid_t.
9047 (struct sym_cache, struct breakpoint, struct
9048 process_info_private): Forward declare.
9049 (struct process_info): Declare.
9050 (current_process): Declare.
9051 (all_processes): Declare.
9052 (initialize_inferiors): Declare.
9053 (add_thread): Adjust to use ptid_t.
9054 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9055 (add_process, remove_process, find_thread_pid): Declare.
9056 (find_inferior_id): Adjust to use ptid_t.
9057 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9058 (multi_process): Declare.
9059 (push_event): Adjust to use ptid_t.
9060 (read_ptid, write_ptid): Declare.
9061 (prepare_resume_reply): Adjust to use ptid_t.
9062 (clear_symbol_cache): Declare.
9063 * inferiors.c (all_processes): New.
9064 (null_ptid, minus_one_ptid): New.
9065 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9066 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9067 (add_thread): Change unsigned long to ptid. Remove gdb_id
9068 parameter. Adjust.
9069 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9070 (gdb_id_to_thread): Rename to ...
9071 (find_thread_pid): ... this. Change unsigned long to ptid.
9072 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9073 (loaded_dll, pull_pid_from_list): Adjust.
9074 (add_process, remove_process, find_process_pid)
9075 (get_thread_process, current_process, initialize_inferiors): New.
9076 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9077 (struct target_waitstatus) <related_pid>: Ditto.
9078 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9079 return type to int.
9080 (struct target_ops) <join>: Add `pid' argument.
9081 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9082 (struct target_ops) <wait>: Add `ptid' field. Change return type
9083 to ptid.
9084 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9085 (mywait): Add `ptid' argument. Change return type to ptid_t.
9086 (target_pid_to_str): Declare.
9087 * target.c (set_desired_inferior): Adjust to use ptids.
9088 (mywait): Add new `ptid' argument. Adjust.
9089 (target_pid_to_str): New.
9090 * mem-break.h (free_all_breakpoints): Declare.
9091 * mem-break.c (breakpoints): Delelete.
9092 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9093 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9094 to use per-process breakpoint list.
9095 (free_all_breakpoints): New.
9096 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9097 (symbol_cache, all_symbols_looked_up): Delete.
9098 (hexchars): New.
9099 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9100 read_ptid): New.
9101 (prepare_resume_reply): Change ptid argument's type from unsigned
9102 long to ptid_t. Adjust. Implement W;process and X;process.
9103 (free_sym_cache, clear_symbol_cache): New.
9104 (look_up_one_symbol): Adjust to per-process symbol cache. *
9105 * server.c (cont_thread, general_thread, step_thread): Change type
9106 to ptid_t.
9107 (attached): Delete.
9108 (multi_process): New.
9109 (last_ptid): Change type to ptid_t.
9110 (struct vstop_notif) <ptid>: Change type to ptid_t.
9111 (queue_stop_reply, push_event): Change `ptid' argument's type to
9112 ptid_t.
9113 (discard_queued_stop_replies): Add `pid' argument.
9114 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9115 changes. Don't reference the `attached' global.
9116 (attach_inferior): Adjust to mywait interface changes.
9117 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9118 features. Handle and report "multiprocess+". Handle
9119 "qAttached:PID".
9120 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9121 changes.
9122 (handle_v_kill): New.
9123 (handle_v_stopped): Adjust to use target_pid_to_str.
9124 (handle_v_requests): Allow multiple attaches and runs when
9125 multiprocess extensions are in effect. Handle "vKill".
9126 (myresume): Adjust to use ptids.
9127 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9128 (handle_status): Adjust to discard_queued_stop_replies interface
9129 change.
9130 (first_thread_of, kill_inferior_callback)
9131 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9132 (main): Call initialize_inferiors. Adjust to use ptids, killing
9133 and detaching from all inferiors. Handle multiprocess packet
9134 variants.
9135 * linux-low.h: Include gdb_proc_service.h.
9136 (struct process_info_private): New.
9137 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9138 <lwpid_of>: Use ptid_get_lwp.
9139 (get_lwp_thread): Adjust.
9140 (struct lwp_info): Add `dead' member.
9141 (find_lwp_pid): Declare.
9142 * linux-low.c (thread_db_active): Delete.
9143 (new_inferior): Adjust comment.
9144 (inferior_pid): Delete.
9145 (linux_add_process): New.
9146 (handle_extended_wait): Adjust.
9147 (add_lwp): Change unsigned long to ptid.
9148 (linux_create_inferior): Add process to processes table. Adjust
9149 to use ptids. Don't set new_inferior here.
9150 (linux_attach_lwp): Rename to ...
9151 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9152 it. Adjust to use ptids.
9153 (linux_attach_lwp): New.
9154 (linux_attach): Add process to processes table. Don't set
9155 new_inferior here.
9156 (struct counter): New.
9157 (second_thread_of_pid_p, last_thread_of_process_p): New.
9158 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9159 multiple processes.
9160 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9161 processes. Remove process from process table.
9162 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9163 to multiple processes.
9164 (any_thread_of): New.
9165 (linux_detach): Add `pid' argument, and handle it. Remove process
9166 from processes table.
9167 (linux_join): Add `pid' argument. Handle it.
9168 (linux_thread_alive): Change unsighed long argument to ptid_t.
9169 Consider dead lwps as not being alive.
9170 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9171 threads we're not interested in.
9172 (same_lwp, find_lwp_pid): New.
9173 (linux_wait_for_lwp): Change `pid' argument's type from int to
9174 ptid_t. Adjust.
9175 (linux_wait_for_event): Rename to ...
9176 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9177 from int to ptid_t. Adjust.
9178 (linux_wait_for_event): New.
9179 (linux_wait_1): Add `ptid' argument. Change return type to
9180 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9181 that exit from the process table.
9182 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9183 Adjust.
9184 (mark_lwp_dead): New.
9185 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9186 stopping all threads, mark its main lwp as dead.
9187 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9188 ptids.
9189 (fetch_register, usr_store_inferior_registers)
9190 (regsets_fetch_inferior_registers)
9191 (regsets_store_inferior_registers, linux_read_memory)
9192 (linux_write_memory): Inline `inferior_pid'.
9193 (linux_look_up_symbols): Adjust to use per-process
9194 `thread_db_active'.
9195 (linux_request_interrupt): Adjust to use ptids.
9196 (linux_read_auxv): Inline `inferior_pid'.
9197 (initialize_low): Don't reference thread_db_active.
9198 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9199 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9200 (ps_getpid): Return the pid of the current inferior.
9201 * thread-db.c (proc_handle, thread_agent): Delete.
9202 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9203 per-process data.
9204 (find_one_thread): Change argument type to ptid_t. Adjust to
9205 per-process data.
9206 (maybe_attach_thread): Adjust to per-process data and ptids.
9207 (thread_db_find_new_threads): Ditto.
9208 (thread_db_init): Ditto.
9209 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9210 processes table. Adjust to use ptids.
9211 (spu_kill, spu_detach): Adjust interface. Remove process from
9212 processes table.
9213 (spu_join, spu_thread_alive): Adjust interface.
9214 (spu_wait): Adjust interface. Remove process from processes
9215 table. Adjust to use ptids.
9216 * win32-low.c (current_inferior_tid): Delete.
9217 (current_inferior_ptid): New.
9218 (debug_event_ptid): New.
9219 (thread_rec): Take a ptid. Adjust.
9220 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9221 (child_delete_thread): Ditto.
9222 (do_initial_child_stuff): Add `attached' argument. Add process to
9223 processes table.
9224 (child_fetch_inferior_registers, child_store_inferior_registers):
9225 Adjust.
9226 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9227 (win32_attach): Pass 1 to do_initial_child_stuff.
9228 (win32_kill): Adjust interface. Remove process from processes
9229 table.
9230 (win32_detach): Ditto.
9231 (win32_join): Adjust interface.
9232 (win32_thread_alive): Take a ptid.
9233 (win32_resume): Adjust to use ptids.
9234 (get_child_debug_event): Ditto.
9235 (win32_wait): Adjust interface. Remove exiting process from
9236 processes table.
9237
9238 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9239
9240 Non-stop mode support.
9241
9242 * server.h (non_stop): Declare.
9243 (gdb_client_data, handler_func): Declare.
9244 (delete_file_handler, add_file_handler, start_event_loop):
9245 Declare.
9246 (handle_serial_event, handle_target_event, push_event)
9247 (putpkt_notif): Declare.
9248 * target.h (enum resume_kind): New.
9249 (struct thread_resume): Replace `step' field by `kind' field.
9250 (TARGET_WNOHANG): Define.
9251 (struct target_ops) <wait>: Add `options' argument.
9252 <supports_non_stop, async, start_non_stop>: New fields.
9253 (target_supports_non_stop, target_async): New.
9254 (start_non_stop): Declare.
9255 (mywait): Add `options' argument.
9256 * target.c (mywait): Add `options' argument. Print child exit
9257 notifications here.
9258 (start_non_stop): New.
9259 * server.c (non_stop, own_buf, mem_buf): New globals.
9260 (struct vstop_notif): New.
9261 (notif_queue): New global.
9262 (queue_stop_reply, push_event, discard_queued_stop_replies)
9263 (send_next_stop_reply): New.
9264 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9265 interface changes.
9266 (attach_inferior): In non-stop mode, don't wait for the target
9267 here.
9268 (handle_general_set): Handle QNonStop.
9269 (handle_query): When handling qC, return the current general
9270 thread, instead of the first thread of the list.
9271 (handle_query): If the backend supports non-stop mode, include
9272 QNonStop+ in the qSupported query response.
9273 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9274 and non-stop mode.
9275 (handle_v_attach, handle_v_run): Handle non-stop mode.
9276 (handle_v_stopped): New.
9277 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9278 (myresume): Adjust to use resume_kind. Handle non-stop.
9279 (queue_stop_reply_callback): New.
9280 (handle_status): Handle non-stop mode.
9281 (main): Clear non_stop flag on reconnection. Use the event-loop.
9282 Refactor serial protocol handling from here ...
9283 (process_serial_event): ... to this new function. When GDB
9284 selects any thread, select one here. In non-stop mode, wait until
9285 GDB acks all pending events before exiting.
9286 (handle_serial_event, handle_target_event): New.
9287 * remote-utils.c (remote_open): Install remote_desc in the event
9288 loop.
9289 (remote_close): Remove remote_desc from the event loop.
9290 (putpkt_binary): Rename to...
9291 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9292 (putpkt_binary): New as wrapper around putpkt_binary_1.
9293 (putpkt_notif): New.
9294 (prepare_resume_reply): In non-stop mode, don't change the
9295 general_thread.
9296 * event-loop.c: New.
9297 * Makefile.in (OBJ): Add event-loop.o.
9298 (event-loop.o): New rule.
9299
9300 * linux-low.h (pid_of): Moved here.
9301 (lwpid_of): New.
9302 (get_lwp_thread): Use lwpid_of.
9303 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9304 * linux-low.c (pid_of): Delete.
9305 (inferior_pid): Use lwpid_of.
9306 (linux_event_pipe): New.
9307 (target_is_async_p): New.
9308 (delete_lwp): New.
9309 (handle_extended_wait): Use lwpid_of.
9310 (add_lwp): Don't set lwpid field.
9311 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9312 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9313 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9314 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9315 first. Adjust to linux_wait_for_event interface changes. Use
9316 lwpid_of.
9317 (linux_detach): Don't delete the main lwp here.
9318 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9319 (status_pending_p): Don't consider explicitly suspended lwps.
9320 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9321 pointer. Add OPTIONS argument. Change return type to int. Use
9322 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9323 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9324 pointer. Add status pointer argument. Return a pid instead of a
9325 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9326 changes. In non-stop mode, don't switch to a random thread.
9327 (linux_wait): Rename to...
9328 (linux_wait_1): ... this. Add target_options argument, and handle
9329 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9330 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9331 clean exit and signal exit code. Don't stop all threads in
9332 non-stop mode. In all-stop mode, only stop all threads when
9333 reporting a stop to GDB. Handle explicit thread stop requests.
9334 (async_file_flush, async_file_mark): New.
9335 (linux_wait): New.
9336 (send_sigstop): Use lwpid_of.
9337 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9338 interface changes. In non-stop mode, don't switch to a random
9339 thread.
9340 (linux_resume_one_lwp): Use lwpid_of.
9341 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9342 (linux_resume_one_thread): ... this. Handle resume_stop. In
9343 non-stop mode, don't look for pending flag in all threads.
9344 (resume_status_pending_p): Don't consider explicitly suspended
9345 threads.
9346 (my_waitpid): Reimplement. Emulate __WALL.
9347 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9348 Use lwpid_of.
9349 (sigchld_handler, linux_supports_non_stop, linux_async)
9350 (linux_start_non_stop): New.
9351 (linux_target_ops): Register linux_supports_non_stop, linux_async
9352 and linux_start_non_stop.
9353 (initialize_low): Install SIGCHLD handler.
9354 * thread-db.c (thread_db_create_event, find_one_thread)
9355 (thread_db_get_tls_address): Use lwpid_of.
9356 * win32-low.c (win32_detach): Adjust to use resume_kind.
9357 (win32_wait): Add `options' argument.
9358 * spu-low.c (spu_resume): Adjust to use resume_kind.
9359 (spu_wait): Add `options' argument.
9360
9361 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9362
9363 Decouple target code from remote protocol.
9364
9365 * target.h (enum target_waitkind): New.
9366 (struct target_waitstatus): New.
9367 (struct target_ops) <wait>: Return an unsigned long. Take a
9368 target_waitstatus pointer instead of a char pointer.
9369 (mywait): Likewise.
9370 * target.c (mywait): Change prototype to return an unsigned long.
9371 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9372 * server.h (thread_from_wait, old_thread_from_wait): Delete
9373 declarations.
9374 (prepare_resume_reply): Change prototype to take a
9375 target_waitstatus.
9376 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9377 (last_status, last_ptid): New.
9378 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9379 pid instead of a signal.
9380 (attach_inferior): Remove "status" and "signal" parameters.
9381 Adjust.
9382 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9383 not as an address.
9384 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9385 (handle_v_requests, myresume): Remove "status" and "signal"
9386 parameters. Adjust.
9387 (handle_status): New.
9388 (main): Delete local `status'. Adjust.
9389 * remote-utils.c: Include target.h.
9390 (prepare_resume_reply): Change prototype to take a
9391 target_waitstatus. Adjust.
9392
9393 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9394 interface.
9395 * spu-low.c (spu_wait): Adjust.
9396 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9397 Delete.
9398 (win32_wait): Adjust.
9399
9400 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9401
9402 * target.h (struct thread_resume): Delete leave_stopped member.
9403 (struct target_ops): Add a `n' argument to the `resume' callback.
9404 * server.c (start_inferior): Adjust.
9405 (handle_v_cont, myresume): Adjust.
9406 * linux-low.c (check_removed_breakpoint): Adjust to resume
9407 interface change, and to removed leave_stopped field.
9408 (resume_ptr): Delete.
9409 (struct thread_resume_array): New.
9410 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9411 resume interface change.
9412 (linux_continue_one_thread, linux_queue_one_thread)
9413 (resume_status_pending_p): Check if the resume field is NULL
9414 instead of checking the leave_stopped member.
9415 (linux_resume): Adjust to the target resume interface change.
9416 * spu-low.c (spu_resume): Adjust to the target resume interface
9417 change.
9418 * win32-low.c (win32_detach, win32_resume): Ditto.
9419
9420 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9421
9422 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9423 flag.
9424 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9425 pending.
9426 (linux_continue_one_thread): Only preserve the stepping flag if
9427 there's a pending breakpoint.
9428
9429 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9430
9431 * server.c (main): After the inferior having exited, call
9432 remote_close before exiting gdbserver.
9433
9434 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9435
9436 Fix size of FPSCR in Power 7 processors.
9437 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9438 (PPC_FEATURE_HAS_DFP): New #define.
9439 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9440 size of the FPSCR.
9441
9442 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9443
9444 * server.c (handle_query) Whitespace and formatting.
9445
9446 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9447
9448 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9449 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9450 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9451 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9452 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9453 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9454 Makefile.in, configure.ac: Fix whitespace throughout.
9455 * configure: Regenerate.
9456
9457 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9458
9459 * inferiors.c (find_inferior): Make it safe for the callback
9460 function to delete the currently iterated inferior.
9461
9462 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9463
9464 * Makefile.in (linuw_low_h): Move higher.
9465 (thread-db.o): Depend on $(linux_low_h).
9466
9467 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9468
9469 Rename "process" to "lwp" throughout.
9470
9471 * linux-low.c (all_processes): Rename to...
9472 (all_lwps): ... this.
9473 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9474 (add_process): Rename to ...
9475 (add_lwp): ... this. Adjust.
9476 (linux_create_inferior): Adjust.
9477 (linux_attach_lwp): Adjust.
9478 (linux_attach): Adjust.
9479 (linux_kill_one_process): Rename to ...
9480 (linux_kill_one_lwp): ... this. Adjust.
9481 (linux_kill): Adjust.
9482 (linux_detach_one_process): Rename to ...
9483 (linux_detach_one_lwp): ... this. Adjust.
9484 (linux_detach): Adjust.
9485 (check_removed_breakpoint): Adjust.
9486 (status_pending_p): Adjust.
9487 (linux_wait_for_process): Rename to ...
9488 (linux_wait_for_lwp): ... this. Adjust.
9489 (linux_wait_for_event): Adjust.
9490 (send_sigstop): Adjust.
9491 (wait_for_sigstop): Adjust.
9492 (stop_all_processes): Rename to ...
9493 (stop_all_lwps): ... this.
9494 (linux_resume_one_process): Rename to ...
9495 (linux_resume_one_lwp): ... this. Adjust.
9496 (linux_set_resume_request, linux_continue_one_thread)
9497 (linux_queue_one_thread, resume_status_pending_p)
9498 (usr_store_inferior_registers, regsets_store_inferior_registers)
9499 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9500 Adjust.
9501 * linux-low.h (get_process): Rename to ...
9502 (get_lwp): ... this. Adjust.
9503 (get_thread_process): Rename to ...
9504 (get_thread_lwp): ... this. Adjust.
9505 (get_process_thread): Rename to ...
9506 (get_lwp_thread): ... this. Adjust.
9507 (struct process_info): Rename to ...
9508 (struct lwp_info): ... this.
9509 (all_processes): Rename to ...
9510 (all_lwps): ... this.
9511 * proc-service.c (ps_lgetregs): Adjust.
9512 * thread-db.c (thread_db_create_event, find_one_thread)
9513 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9514
9515 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9516
9517 * server.c (handle_query): Handle "qAttached".
9518
9519 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9520
9521 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9522 GPLv3, update license URL.
9523
9524 2009-03-01 Doug Evans <dje@google.com>
9525
9526 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9527 (server_h): Add gdb_signals.h.
9528 (signals.o): Update.
9529 * server.h (target_signal_from_host,target_signal_to_host_p)
9530 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9531
9532 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9533
9534 * remote-utils.c (getpkt): Also generate remote-debug
9535 information if noack_mode is set.
9536
9537 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9538
9539 * server.c (handle_query): Report qXfer:siginfo:read and
9540 qXfer:siginfo:write as supported and handle them.
9541 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9542 * linux-low.c (linux_xfer_siginfo): New.
9543 (linux_target_ops): Set it.
9544
9545 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9546
9547 * server.c (gdbserver_usage): Mention --remote-debug.
9548 (main): Accept '--remote-debug' switch.
9549
9550 2009-01-18 Doug Evans <dje@google.com>
9551
9552 * regcache.c (new_register_cache): No need to check result of xcalloc.
9553 * server.c (handle_search_memory): Back out calls to xmalloc,
9554 result is checked and error is returned to user upon failure.
9555 (handle_query): Ditto. Add more checks for result of malloc.
9556 (handle_v_cont): Check result of malloc, report error back to
9557 user upon failure.
9558 (handle_v_run): Ditto. Call freeargv.
9559 * server.h (freeargv): Declare.
9560 * utils.c (freeargv): New fn.
9561
9562 2009-01-15 Doug Evans <dje@google.com>
9563
9564 * gdbreplay.c (perror_with_name): Make arg const char *.
9565 * server.h (target_signal_to_name): Make return type const char *.
9566 * thread-db.c (thread_db_err_str): Make return type const char *.
9567 * utils.c (perror_with_name): Make arg const char *.
9568
9569 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9570
9571 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9572 when handling a EXIT_PROCESS_DEBUG_EVENT.
9573
9574 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9575
9576 * gdbreplay.c (gdbreplay_version): Update copyright year.
9577 * server.c (gdbserver_version): Likewise.
9578
9579 2009-01-05 Doug Evans <dje@google.com>
9580
9581 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9582 (handle_extended_wait): Improve comment.
9583
9584 2008-12-13 Doug Evans <dje@google.com>
9585
9586 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9587 * server.h (ATTR_MALLOC): New macro.
9588 (xmalloc,xcalloc,xstrdup): Declare.
9589 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9590 * inferiors.c: Ditto.
9591 * linux-low.c: Ditto.
9592 * mem-break.c: Ditto.
9593 * regcache.c: Ditto.
9594 * remote-utils.c: Ditto.
9595 * server.c: Ditto.
9596 * target.c: Ditto.
9597 * win32-low.c: Ditto.
9598
9599 2008-12-12 Doug Evans <dje@google.com>
9600
9601 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9602 in debugging printf.
9603
9604 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9605
9606 2008-12-09 Doug Evans <dje@google.com>
9607
9608 * linux-low.h (struct process_info): Delete member tid, unused.
9609 * thread-db.c (find_one_thread): Update.
9610 (maybe_attach_thread): Update.
9611
9612 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9613
9614 * target.h (struct target_ops): Add qxfer_osdata member.
9615 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9616 and dirent.h.
9617 (linux_qxfer_osdata): New functions.
9618 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9619 callback.
9620 * server.c (handle_query): Handle "qXfer:osdata:read:".
9621 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9622 (buffer_xml_printf): New functions.
9623 * server.h (struct buffer): New.
9624 (buffer_grow_str, buffer_grow_str0): New macros.
9625 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9626 (buffer_xml_printf): Declare.
9627
9628 2008-11-24 Doug Evans <dje@google.com>
9629
9630 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9631
9632 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9633
9634 * server.c (handle_v_run): Always use the supplied argument list.
9635
9636 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9637
9638 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9639 (xtensa_regmap_table): Add entry for scompare1.
9640
9641 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9642
9643 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9644 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9645 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9646 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9647 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9648 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9649 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9650 XML target descriptions.
9651 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9652 when inferior is running on an ISA 2.05 or later processor. Add
9653 special case to return offset for full 64-bit slot of FPSCR when
9654 in 32-bits.
9655
9656 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9657
9658 * Makefile.in (SFILES, clean): Added sparc64 files.
9659 (reg-sparc64.o, reg-sparc64.c): New.
9660 * configure.srv (sparc*-*-linux*): New configuration.
9661 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9662 syscall arguments for SPARC.
9663 (regsets_store_inferior_registers): Likewise.
9664 * linux-sparc-low.c: New file.
9665
9666 2008-10-21 Doug Evans <dje@google.com>
9667
9668 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9669 (READLINE_DIR,READLINE_DEP): Delete.
9670 (INTERNAL_CFLAGS): Update.
9671 (LINTFLAGS): Update.
9672
9673 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9674
9675 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9676 whole argv from the last run, not just argv[0].
9677
9678 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9679
9680 * regcache.c (new_register_cache): Return NULL if the register
9681 cache size isn't known yet.
9682 (free_register_cache): Avoid dereferencing a NULL regcache.
9683
9684 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9685
9686 * configure.srv: Merge MIPS and MIPS64.
9687
9688 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9689
9690 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9691
9692 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9693
9694 * Makefile.in: Add required vsx dependencies.
9695
9696 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9697 Declare init_registers_powerpc_vsx32l.
9698 Declare init_registers_powerpc_vsx64l.
9699 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9700 (ppc_arch_setup): Check for VSX in hwcap.
9701 (ppc_fill_vsxregset): New function.
9702 (ppc_store_vsxregset): New function.
9703 Add new VSX entry in regset_info target_regsets.
9704
9705 * configure.srv: Add new VSX dependencies.
9706
9707 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9708
9709 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9710 (remote_open): Set or clear transport_is_reliable.
9711 (putpkt_binary): Don't expect acks in noack mode.
9712 (getpkt): Don't send ack/nac in noack mode.
9713 * server.c (handle_general_set): Handle QStartNoAckMode.
9714 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9715 qSupported.
9716 (main): Reset noack_mode on every connection.
9717 * server.h (noack_mode): Declare.
9718
9719 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9720
9721 * Makefile.in (GDBREPLAY_OBS): New variable.
9722 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9723
9724 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9725 Daniel Jacobowitz <dan@codesourcery.com>
9726
9727 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9728 (usr_store_inferior_registers): Likewise.
9729 (regsets_store_inferior_registers): Likewise.
9730
9731 2008-07-31 Rolf Jansen <rj@surtec.com>
9732 Pedro Alves <pedro@codesourcery.com>
9733
9734 * configure.ac: Check for memmem declaration.
9735 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9736 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9737 (disable_packet_qfThreadInfo): Unconditionally compile.
9738 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9739 * configure, config.in: Regenerate.
9740
9741 2008-07-28 Doug Kwan <dougkwan@google.com>
9742
9743 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9744 (linux_write_memory): Remove declaration of errno.
9745
9746 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9747
9748 * linux-low.c (handle_extended_wait): Do not use "status"
9749 variable uninitialized.
9750
9751 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9752
9753 * server.c (handle_v_attach): Inhibit reporting dll changes.
9754
9755 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9756
9757 * remote-utils.c (prepare_resume_reply): If requested, don't
9758 output "thread:TID" in the T stop reply.
9759
9760 * server.c (disable_packet_vCont, disable_packet_Tthread)
9761 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9762 (handle_query): If requested, disable support for qC, qfThreadInfo
9763 and qsThreadInfo.
9764 (handle_v_requests): If requested, disable support for vCont.
9765 (gdbserver_show_disableable): New.
9766 (main): Handle --disable-packet and --disable-packet=LIST.
9767
9768 * server.h (disable_packet_vCont, disable_packet_Tthread)
9769 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9770
9771 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9772
9773 * server.c (gdbserver_usage): Mention --version.
9774
9775 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9776
9777 * Makefile.in (gdbreplay.o): New rule.
9778
9779 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9780
9781 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9782 message, not gdbserver.
9783
9784 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9785 Nathan Sidwell <nathan@codesourcery.com>
9786 Joseph Myers <joseph@codesourcery.com>
9787
9788 * acinclude.m4: Include ../../config/acx.m4.
9789 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9790 * configure, config.in: Regenerate.
9791 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9792 * server.c (gdbserver_version): Print PKGVERSION.
9793 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9794 (main): Adjust gdbserver_usage calls.
9795 * gdbreplay.c (version, host_name): Add declarations.
9796 (gdbreplay_version, gdbreplay_usage): New.
9797 (main): Accept --version and --help options.
9798
9799 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9800
9801 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9802 (arm_breakpoint_at): Handle Thumb.
9803 (the_low_target): Add comment.
9804
9805 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9806
9807 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9808
9809 2008-05-09 Doug Evans <dje@google.com>
9810
9811 * server.h (decode_search_memory_packet): Declare.
9812 * remote-utils.c (decode_search_memory_packet): New fn.
9813 * server.c (handle_search_memory_1): New fn.
9814 (handle_search_memory): New fn.
9815 (handle_query): Process qSearch:memory packets.
9816
9817 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9818
9819 * regcache.c (registers_length): Remove.
9820 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9821 full register packet.
9822 * regcache.h (registers_length): Remove prototype.
9823 * server.h (PBUFSIZ): Define to 16384.
9824
9825 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9826
9827 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9828 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9829 powerpc-64l.o, and powerpc-altivec64l.o.
9830 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9831 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9832 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9833 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9834 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9835 to srv_xmlfiles.
9836
9837 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9838 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9839 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9840 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9841 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9842 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9843 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9844 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9845 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9846 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9847 (clean): Update.
9848
9849 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9850 (init_registers_powerpc_32l): ... this new prototype.
9851 (init_registers_powerpc_32): Remove, replace by ...
9852 (init_registers_powerpc_altivec32l): ... this new prototype.
9853 (init_registers_powerpc_e500): Remove, replace by ...
9854 (init_registers_powerpc_e500l): ... this new prototype.
9855 (init_registers_ppc64): Remove, replace by ...
9856 (init_registers_powerpc_64l): ... this new prototype.
9857 (init_registers_powerpc_64): Remove, replace by ...
9858 (init_registers_powerpc_altivec64l): ... this new prototype.
9859 (ppc_num_regs): Set to 73.
9860 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9861 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9862 (ppc_cannot_store_register): Handle orig_r3 and trap.
9863 (ppc_arch_setup): Update init_registers_... calls.
9864 (ppc_fill_gregset): Handle orig_r3 and trap.
9865
9866 * inferiors.c (clear_inferiors): Reset current_inferior.
9867
9868 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9869
9870 * acinclude.m4: Add override.m4.
9871 * configure: Regenerate.
9872
9873 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9874
9875 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9876 initial call to init_register_ppc64.
9877
9878 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9879
9880 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9881 single powerpc*-*-linux* case.
9882 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9883
9884 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9885
9886 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9887 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9888 from reg_xmlfiles.
9889 * linux-ppc-low.c: Include <elf.h>.
9890 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9891 (ppc_hwcap): New global variable.
9892 (ppc_regmap): Remove __SPE__ #ifdef sections.
9893 (ppc_regmap_e500): New global variable.
9894 (ppc_cannot_store_register): Update __SPE__ special case.
9895 (ppc_get_hwcap): New function.
9896 (ppc_arch_setup): Use it to determine whether inferior supports
9897 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9898 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9899 Do not access registers if target does not support AltiVec.
9900 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9901 Do not access registers if target does not support SPE.
9902 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9903
9904 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9905
9906 * linux-low.c (disabled_regsets, num_regsets): New.
9907 (use_regsets_p): Delete.
9908 (linux_wait_for_process): Clear disabled_regsets.
9909 (regsets_fetch_inferior_registers): Check and set it.
9910 (regsets_store_inferior_registers): Likewise.
9911 (linux_fetch_registers, linux_store_registers): Do not use
9912 use_regsets_p.
9913 (initialize_low): Allocate disabled_regsets.
9914
9915 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9916
9917 * Makefile.in (LIBOBJS): New.
9918 (OBS): Use LIBOBJS.
9919 (memmem.o): New rule.
9920 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9921 * configure: Regenerated.
9922
9923 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9924
9925 * server.c (handle_query): Never return "unsupported" for
9926 qXfer:features:read queries.
9927
9928 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9929
9930 * server.c (get_features_xml): Fix inverted condition.
9931 (handle_query): Always support qXfer:feature:read.
9932
9933 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9934
9935 * server.c (wrapper_argv): New.
9936 (start_inferior): Handle wrapper_argv. If set, expect an extra
9937 trap.
9938 (gdbserver_usage): Document --wrapper.
9939 (main): Parse --wrapper.
9940
9941 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9942
9943 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9944 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9945 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9946 (ppc_set_pc): Likewise.
9947 (ppc_arch_setup): New function.
9948 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9949 of collect_register.
9950 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9951
9952 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9953
9954 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9955 instead of linux-ppc64-low.o.
9956 * linux-ppc64-low.c: Remove file.
9957 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9958 (linux-ppc64-low.o): Remove rule.
9959
9960 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9961 (init_registers_powerpc_64): Likewise.
9962 (ppc_regmap): Conditionally define depending on __powerpc64__.
9963 (ppc_cannot_store_register): Do not special-case "fpscr" when
9964 compiled on __powerpc64__.
9965 (ppc_collect_ptrace_register): New function.
9966 (ppc_supply_ptrace_register): New function.
9967 (ppc_breakpoint): Change type to "unsigned int".
9968 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9969 (the_low_target): Conditionally provide initializers for the
9970 arch_setup member depending on __powerpc64__. Install
9971 collect_ptrace_register and supply_ptrace_register members.
9972
9973 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9974
9975 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9976 * server.c (gdbserver_xmltarget): Define.
9977 (get_features_xml): Use it to replace "target.xml" and arch_string.
9978
9979 * configure.srv: Remove srv_xmltarget. Add XML files that were
9980 mentioned there to srv_xmlfiles instead. Remove conditional tests
9981 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9982 srv_xmlfiles and srv_regobj to include all possible choices.
9983 * configure.ac (srv_xmltarget): Remove.
9984 (srv_xmlfiles): Do not add "target.xml".
9985 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9986 checks for supplementary target information.
9987 * configure: Regenerate.
9988 * Makefile.in (XML_TARGET): Remove.
9989 (target.xml): Remove rule.
9990 (clean): Do not clean up target.xml.
9991 (.PRECIOUS): Do not mention target.xml.
9992
9993 * target.h (struct target_ops): Remove arch_string member.
9994 * linux-low.c (linux_arch_string): Remove.
9995 (linux_target_ops): Remove arch_string initializer.
9996 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9997 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9998 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9999 * spu-low.c (spu_arch_string): Remove.
10000 (spu_target_ops): Remove arch_string initializer.
10001 * win32-low.c (win32_arch_string): Remove.
10002 (win32_target_ops): Remove arch_string initializer.
10003 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10004 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10005 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10006
10007 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10008
10009 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10010 by collect_ptrace_register and supply_ptrace_register hooks.
10011 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10012 instead of checking for the_low_target.left_pad_xfer.
10013 (usr_store_inferior_registers): Use collect_ptrace_register callback
10014 instead of checking for the_low_target.left_pad_xfer.
10015
10016 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10017 (s390_supply_ptrace_register): Likewise.
10018 (s390_fill_gregset): Call s390_collect_ptrace_register.
10019 (the_low_target): Update.
10020
10021 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10022 (ppc_supply_ptrace_register): Likewise.
10023 (the_low_target): Update.
10024
10025 * linux-i386-low.c (the_low_target): Update.
10026 * linux-x86-64-low.c (the_low_target): Update.
10027
10028 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10029
10030 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10031 reg-s390.o and reg-s390x.o.
10032
10033 * linux-low.c (new_inferior): New global variable.
10034 (linux_create_inferior, linux_attach): Set it.
10035 (linux_wait_for_process): Call the_low_target.arch_setup after the
10036 target has stopped for the first time.
10037 (initialize_low): Do not call the_low_target.arch_setup.
10038
10039 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10040 (s390_set_pc): Likewise.
10041 (s390_arch_setup): New function.
10042 (the_low_target): Use s390_arch_setup as arch_setup routine.
10043
10044 * regcache.c (realloc_register_cache): New function.
10045 (set_register_cache): Call it for each existing regcache.
10046
10047 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10048
10049 * server.h (init_registers): Remove prototype.
10050
10051 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10052 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10053 instead of init_registers ().
10054 * linux-arm-low.c (init_registers_arm): Add prototype.
10055 (init_registers_arm_with_iwmmxt): Likewise.
10056 (the_low_target): Add initializer for arch_setup field.
10057 * linux-cris-low.c (init_registers_cris): Add prototype.
10058 (the_low_target): Add initializer for arch_setup field.
10059 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10060 (the_low_target): Add initializer for arch_setup field.
10061 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10062 (the_low_target): Add initializer for arch_setup field.
10063 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10064 (the_low_target): Add initializer for arch_setup field.
10065 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10066 (the_low_target): Add initializer for arch_setup field.
10067 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10068 (the_low_target): Add initializer for arch_setup field.
10069 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10070 (init_registers_mips64_linux): Likewise.
10071 (the_low_target): Add initializer for arch_setup field.
10072 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10073 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10074 (the_low_target): Add initializer for arch_setup field.
10075 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10076 (init_registers_powerpc_64): Likewise.
10077 (the_low_target): Add initializer for arch_setup field.
10078 * linux-s390-low.c (init_registers_s390): Add prototype.
10079 (init_registers_s390x): Likewise.
10080 (the_low_target): Add initializer for arch_setup field.
10081 * linux-sh-low.c (init_registers_sh): Add prototype.
10082 (the_low_target): Add initializer for arch_setup field.
10083 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10084 (the_low_target): Add initializer for arch_setup field.
10085 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10086 (the_low_target): Add initializer for arch_setup field.
10087
10088 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10089 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10090 instead of init_registers ().
10091 * win32-arm-low.c (init_registers_arm): Add prototype.
10092 (the_low_target): Add initializer for arch_setup field.
10093 * win32-i386-low.c (init_registers_i386): Add prototype.
10094 (the_low_target): Add initializer for arch_setup field.
10095
10096 * spu-low.c (init_registers_spu): Add prototype.
10097 (initialize_low): Call initialie_registers_spu () instead of
10098 initialize_registers ().
10099
10100 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10101
10102 * server.c (handle_v_requests): When handling the vRun and vAttach
10103 packets, if already debugging a process, don't kill it. Return an
10104 error instead.
10105
10106 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10107
10108 * server.c (handle_query): Correct length check.
10109
10110 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10111
10112 * win32-low.c (do_initial_child_stuff): Add process handle
10113 parameter. Set current_process_handle and current_process_id from the
10114 parameters. Clear globals.
10115 (win32_create_inferior): Don't set current_process_handle and
10116 current_process_id here. Instead pass them on the call to
10117 do_initial_child_stuff.
10118 (win32_attach): Likewise.
10119 (win32_clear_inferiors): New.
10120 (win32_kill): Don't close the current process handle or the
10121 current thread handle here. Instead call win32_clear_inferiors.
10122 (win32_detach): Don't open a new handle to the process. Call
10123 win32_clear_inferiors.
10124 (win32_join): Don't rely on current_process_handle; open a new
10125 handle using the process id.
10126 (win32_wait): Call win32_clear_inferiors when the inferior process
10127 has exited.
10128
10129 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10130
10131 * server.c (monitor_show_help): Add "exit".
10132
10133 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10134
10135 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10136 (clean): Add reg-xtensa.c.
10137 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10138 * configure.srv (xtensa*-*-linux*) New target.
10139 * linux-xtensa-low.c: New.
10140 * xtensa-xtregs.c: New.
10141
10142 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10143
10144 * hostio.c: Don't include errno.h.
10145 (errno_to_fileio_errno): Move to hostio-errno.
10146 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10147 error number outputting to the target->hostio_last_error callback.
10148 (hostio_packet_error): Use FILEIO_EINVAL directly.
10149 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10150 calls to hostio_error.
10151 * hostio-errno.c: New.
10152 * server.h (hostio_last_error_from_errno): Declare.
10153 * target.h (target_ops): Add hostio_last_error member.
10154 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10155 as hostio_last_error handler.
10156 * spu-low.c (spu_target_ops): Likewise.
10157 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10158 (wince_hostio_last_error): New functions.
10159 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10160 as hostio_last_error handler.
10161 (win32_target_ops) [!_WIN32_WCE]: Register
10162 hostio_last_error_from_errno as hostio_last_error handler.
10163 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10164 (hostio-errno.o): New rule.
10165 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10166 * configure.srv (srv_hostio_err_objs): New variable. Default to
10167 hostio-errno.o.
10168 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10169 * configure: Regenerate.
10170
10171 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10172
10173 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10174 (linux_kill, linux_detach): Clean up the process list.
10175 * remote-utils.c (remote_open): Improve port number parsing.
10176 (putpkt_binary, input_interrupt): Only send interrupts if the target
10177 is running.
10178 * server.c (extended_protocol): Make static.
10179 (attached): Define earlier.
10180 (exit_requested, response_needed, program_argv): New variables.
10181 (target_running): New.
10182 (start_inferior): Clear attached here.
10183 (attach_inferior): Set attached here.
10184 (require_running): Define.
10185 (handle_query): Use require_running and target_running. Implement
10186 "monitor exit".
10187 (handle_v_attach, handle_v_run): New.
10188 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10189 (gdbserver_usage): Update.
10190 (main): Redo argument parsing. Handle --debug and --multi. Handle
10191 --attach along with other options or after the port. Save
10192 program_argv. Support no initial program. Resynchronize
10193 communication with GDB after an error. Handle "monitor exit".
10194 Use require_running and target_running. Always allow the extended
10195 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10196 restart in extended mode.
10197 * README: Refer to the GDB manual. Update --attach usage.
10198
10199 2007-12-20 Andreas Schwab <schwab@suse.de>
10200
10201 * linux-low.c (STACK_SIZE): Define.
10202 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10203 (linux_test_for_tracefork): Likewise.
10204
10205 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10206
10207 * linux-low.c (linux_wait_for_event): Update messages. Do not
10208 reinsert auto-delete breakpoints.
10209 * mem-break.c (struct breakpoint): Change return type of handler to
10210 int.
10211 (set_breakpoint_at): Update handler type.
10212 (reinsert_breakpoint_handler): Return 1 instead of calling
10213 delete_breakpoint.
10214 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10215 setting a new one.
10216 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10217 * mem-break.h (set_breakpoint_at): Update handler type.
10218 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10219 * win32-low.c (auto_delete_breakpoint): New.
10220 (get_child_debug_event): Use it.
10221
10222 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10223
10224 * configure.ac: Check for pread and pwrite.
10225 * hostio.c (handle_pread): Fall back to lseek and read.
10226 (handle_pwrite): Fall back to lseek and write.
10227 * config.in, configure: Regenerated.
10228
10229 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10230
10231 * server.c (myresume): Add own_buf argument.
10232 (main): Update calls.
10233
10234 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10235
10236 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10237 * remote-utils.c (remote_open): Do not call disable_async_io.
10238 (block_async_io): Delete.
10239 (unblock_async_io): Make static.
10240 (initialize_async_io): New.
10241 * server.c (handle_v_cont): Handle async I/O here.
10242 (myresume): Likewise. Move other common resume tasks here...
10243 (main): ... from here. Call initialize_async_io. Disable async
10244 I/O before the main loop.
10245 * server.h (initialize_async_io): Declare.
10246 (block_async_io, unblock_async_io): Delete prototypes.
10247 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10248
10249 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10250
10251 * remote-utils.c (readchar): Allow binary data in received messages.
10252
10253 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10254
10255 * win32-low.c (attaching): New global.
10256 (win32_create_inferior): Clear the `attaching' global.
10257 (win32_attach): Set the `attaching' global.
10258 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10259 attaching. Only set a breakpoint at the entry point if not
10260 attaching.
10261
10262 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10263
10264 * server.c (main): Don't report dll events on the initial
10265 connection on attaches.
10266
10267 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10268
10269 * server.c (main): Relax numerical bases supported for the pid of
10270 the --attach command line argument.
10271
10272 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10273
10274 * win32-low.c (win32_attach): Call OpenProcess before
10275 DebugActiveProcess, not after. Add last error output to error
10276 call.
10277
10278 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10279
10280 * win32-low.c (win32_get_thread_context)
10281 (win32_set_thread_context): New functions.
10282 (thread_rec): Use win32_get_thread_context.
10283 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10284 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10285 field.
10286
10287 2007-12-03 Leo Zayas
10288 Pedro Alves <pedro_alves@portugalmail.pt>
10289
10290 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10291 global variables.
10292 (child_add_thread): Minor cleanup.
10293 (child_continue): Resume artificially suspended threads before
10294 calling ContinueDebugEvent.
10295 (suspend_one_thread): New.
10296 (fake_breakpoint_event): New.
10297 (get_child_debug_event): Change return type to int. Check here if
10298 gdb sent an interrupt request. If a soft interrupt was requested,
10299 fake a breakpoint event. Return 0 if there is no event to handle,
10300 and 1 otherwise.
10301 (win32_wait): Don't check here if gdb sent an interrupt request.
10302 Ensure there is a valid event to handle.
10303 (win32_request_interrupt): Add soft interruption method as last
10304 resort.
10305
10306 2007-12-03 Leo Zayas
10307 Pedro Alves <pedro_alves@portugalmail.pt>
10308
10309 * win32-low.h (win32_thread_info): Add descriptions to the
10310 structure members. Replace `suspend_count' counter by a
10311 `suspended' flag.
10312 * win32-low.c (thread_rec): Update condition of when to get the
10313 context from the inferior. Rely on ContextFlags being set if it
10314 has already been retrieved. Only suspend the inferior thread if
10315 we haven't already. Warn if that fails.
10316 (continue_one_thread): s/suspend_count/suspended/. Only call
10317 ResumeThread once. Warn if that fails.
10318
10319 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10320
10321 * win32-low.c (win32_wait): Don't read from the inferior when it
10322 has already exited.
10323
10324 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10325
10326 * Makefile.in (win32_low_h): New variable.
10327 (win32-low.o): Add dependency on $(win32_low_h).
10328 (win32-arm-low.o, win32-i386-low.o): New rules.
10329
10330 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10331
10332 * hostio.c: Correct copyright year.
10333
10334 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10335
10336 * Makefile.in (OBS): Add hostio.o.
10337 (hostio.o): New rule.
10338 * server.h (handle_vFile): Declare.
10339 * hostio.c: New file.
10340 * server.c (handle_v_requests): Take packet_len and new_packet_len
10341 for binary packets. Call handle_vFile.
10342 (main): Update call to handle_v_requests.
10343
10344 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10345
10346 * linux-low.c: Include <sched.h>.
10347
10348 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10349
10350 * linux-low.c (linux_tracefork_grandchild): New.
10351 (linux_tracefork_child): Use clone.
10352 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10353
10354 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10355
10356 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10357
10358 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10359
10360 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10361
10362 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10363
10364 * inferiors.c (change_inferior_id): Delete.
10365 (add_pid_to_list, pull_pid_from_list): New.
10366 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10367 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10368 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10369 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10370 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10371 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10372 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10373 (using_threads): Always set to 1.
10374 (handle_extended_wait): New.
10375 (add_process): Do not set TID.
10376 (linux_create_inferior): Set must_set_ptrace_flags.
10377 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10378 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10379 (linux_thread_alive): Rename TID argument to LWPID.
10380 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10381 (linux_wait_for_event): Do not use TID or check using_threads. Update
10382 call to dead_thread_notify. Call handle_extended_wait.
10383 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10384 (send_sigstop): Delete sigstop_sent.
10385 (wait_for_sigstop): Avoid TID.
10386 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10387 (linux_test_for_tracefork): New.
10388 (linux_lookup_signals): Use thread_db_active and
10389 linux_supports_tracefork_flag.
10390 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10391 * linux-low.h (get_process_thread): Avoid TID.
10392 (struct process_ifo): Move thread_known and tid to the end. Remove
10393 sigstop_sent.
10394 (linux_attach_lwp, thread_db_init): Update prototypes.
10395 * server.h (change_inferior_id): Delete prototype.
10396 (add_pid_to_list, pull_pid_from_list): New prototypes.
10397 * thread-db.c (thread_db_use_events): New.
10398 (find_first_thread): Rename to...
10399 (find_one_thread): ...this. Update callers and messages. Do not
10400 call fatal. Check thread_db_use_events. Do not call
10401 change_inferior_id or new_thread_notify.
10402 (maybe_attach_thread): Update. Do not call new_thread_notify.
10403 (thread_db_init): Set thread_db_use_events. Check use_events.
10404 * utils.c (fatal, warning): Correct message prefix.
10405
10406 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10407
10408 * Makefile.in (clean): Remove new files.
10409 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10410 (powerpc-64.o, powerpc-64.c): New rules.
10411 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10412 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10413 with SPE.
10414 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10415 SPE targets.
10416 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10417 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10418 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10419 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10420 (target_regsets): Add AltiVec and SPE register sets.
10421 * configure.ac: Check for AltiVec and SPE.
10422 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10423 (ppc_fill_vrregset, ppc_store_vrregset): New.
10424 (target_regsets): Add AltiVec register set.
10425 * configure: Regenerated.
10426
10427 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10428
10429 * linux-low.c (O_LARGEFILE): Define.
10430 (linux_read_memory): Use /proc/PID/mem.
10431 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10432 * configure, config.in: Regenerated.
10433
10434 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10435
10436 * linux-low.c (linux_wait_for_event): Do not pass signals while
10437 single-stepping.
10438
10439 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10440
10441 * win32-low.c (create_process): New.
10442 (win32_create_inferior): Use create_process instead of
10443 CreateProcess. If create_process failed retry appending an ".exe"
10444 suffix. Store the GetLastError result immediatelly after
10445 create_process calls and use it on the call to error.
10446
10447 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10448
10449 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10450
10451 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10452
10453 * configure.ac: Switch license to GPLv3.
10454
10455 2007-08-01 Michael Snyder <msnyder@access-company.com>
10456
10457 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10458
10459 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10460
10461 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10462 typedef.
10463 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10464 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10465 CloseToolhelp32Snapshot.
10466 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10467 CloseToolhelp32Snapshot.
10468
10469 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10470
10471 * server.c (main): Check for inferior exit before main loop.
10472
10473 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10474
10475 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10476 instead of on tmp_desc.
10477
10478 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10479 Daniel Jacobowitz <dan@codesourcery.com>
10480
10481 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10482 (add_thread): Minor cleanups.
10483 (clear_inferiors): Move lower in the file. Clear the DLL
10484 list.
10485 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10486 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10487 (xml_escape_text): New.
10488 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10489 for qSupported.
10490 (handle_v_cont): Report errors.
10491 (gdbserver_version): Update.
10492 (main): Correct size of own_buf. Do not report initial DLL events.
10493 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10494 (unloaded_dll, xml_escape_text): New.
10495 * win32-low.c (enum target_waitkind): Update comments.
10496 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10497 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10498 (win32_EnumProcessModules, win32_GetModuleInformation)
10499 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10500 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10501 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10502 (win32_Module32First, win32_Module32Next, load_toolhelp)
10503 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10504 (get_child_debug_event): Handle DLL events.
10505 (win32_wait): Likewise.
10506
10507 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10508
10509 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10510 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10511
10512 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10513
10514 * win32-low.c (handle_output_debug_string): Ignore event if not
10515 waiting.
10516
10517 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10518
10519 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10520
10521 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10522
10523 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10524
10525 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10526
10527 * inferiors.c (change_inferior_id): Add comment.
10528 * linux-low.c (check_removed_breakpoint): Add an early
10529 prototype. Improve debug output.
10530 (linux_attach): Doc update.
10531 (linux_detach_one_process, linux_detach): Clean up before releasing
10532 each process.
10533 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10534 * linux-low.h (struct process_info): Doc improvement.
10535 * mem-break.c (delete_all_breakpoints): New.
10536 * mem-break.h (delete_all_breakpoints): New prototype.
10537 * thread-db.c (find_first_thread): New.
10538 (thread_db_create_event): Call it instead of
10539 thread_db_find_new_threads. Clean up unused variables.
10540 (maybe_attach_thread): Remove first thread handling.
10541 (thread_db_find_new_threads): Use find_first_thread.
10542 (thread_db_get_tls_address): Likewise.
10543
10544 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10545
10546 * thread-db.c (thread_db_find_new_threads): Add prototype.
10547 (thread_db_create_event): Check for the main thread before adding
10548 a new thread.
10549 (maybe_attach_thread): Only enable event reporting if TID == 0.
10550 (thread_db_get_tls_address): Check for new threads.
10551
10552 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10553
10554 * linux-low.c (linux_create_inferior): Try execv before execvp.
10555 * spu-low.c (spu_create_inferior): Likewise.
10556
10557 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10558
10559 * linux-low.c (linux_create_inferior): Change execv to execvp.
10560 * spu-low.c (spu_create_inferior): Likewies.
10561
10562 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10563
10564 * Makefile.in (clean): Clean new files instead of deleted ones.
10565 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10566 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10567 rules.
10568 * configure.srv: Specify XML files and new regformats for MIPS and
10569 MIPS64 GNU/Linux.
10570 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10571 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10572 an entry for the restart register.
10573 (mips_cannot_fetch_register, mips_cannot_store_register)
10574 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10575 register names to match the XML descriptions.
10576 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10577 restart register instead of $0.
10578
10579 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10580 Markus Deuling <deuling@de.ibm.com>
10581
10582 * remote-utils.c (decode_xfer_write): New function.
10583 * server.h (decode_xfer_write): Add prototype.
10584 * server.c (handle_query): Add PACKET_LEN argument. Support
10585 qXfer:spu:read and qXfer:spu:write packets.
10586 (main): Pass packet_len to handle_query.
10587 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10588 * target.h (target_ops): Add qxfer_spu.
10589
10590 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10591
10592 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10593 accessing non-seekable spufs files.
10594
10595 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10596
10597 * server.c (handle_query): Add reply for qC packet.
10598
10599 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10600 Leo Zayas <lerele@champenstudios@com>
10601
10602 * server.h (check_remote_input_interrupt_request): New function.
10603 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10604 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10605 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10606 (check_remote_input_interrupt_request): New function.
10607 * server.h (check_remote_input_interrupt_request): Declare.
10608 * win32-low.c (winapi_DebugBreakProcess,
10609 winapi_GenerateConsoleCtrlEvent): New typedefs.
10610 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10611 to 250 ms.
10612 (win32_wait): Check for remote interrupt request
10613 with check_remote_input_interrupt_request.
10614 (win32_request_interrupt): New function.
10615 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10616
10617 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10618
10619 * win32-low.c (debug_registers_changed,
10620 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10621 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10622 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10623 (thread_rec): Get context using the low target.
10624 (child_add_thread): Call thread_added on the low target,
10625 which does the same thing.
10626 (regptr): Delete.
10627 (do_initial_child_stuff): Remove debug registers references.
10628 Set context using the low target. Resume threads after
10629 setting the contexts.
10630 (child_continue): Remove dead variable. Remove debug
10631 registers references.
10632 (child_fetch_inferior_registers): Go through the low target.
10633 (do_child_store_inferior_registers): Remove.
10634 (child_store_inferior_registers): Go through the low target.
10635 (win32_resume): Remove debug registers references.
10636 Set context using the low target.
10637 (handle_exception): Change return type to void. Don't record
10638 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10639 first chance exception.
10640 (get_child_debug_event): Change return type to void. Remove
10641 goto loop. Always return after waiting for debug event.
10642 (win32_wait): Convert to switch statement. Handle spurious
10643 events.
10644
10645 * win32-i386-low.c (debug_registers_changed,
10646 debug_registers_used): New.
10647 (initial_stuff): Rename to ...
10648 (i386_initial_stuff): ... this. Clear debug registers
10649 state variables.
10650 (store_debug_registers): Delete.
10651 (i386_get_thread_context): New.
10652 (load_debug_registers): Delete.
10653 (i386_set_thread_context): New.
10654 (i386_thread_added): New.
10655 (single_step): Rename to ...
10656 (i386_single_step): ... this.
10657 (do_fetch_inferior_registers): Rename to ...
10658 (i386_fetch_inferior_register): ... this.
10659 (i386_store_inferior_register): New.
10660 (the_low_target): Adapt to new interface.
10661
10662 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10663 (arm_get_thread_context): New.
10664 (arm_set_thread_context): New.
10665 (regptr): New.
10666 (do_fetch_inferior_registers): Rename to ...
10667 (arm_fetch_inferior_register): ... this.
10668 (arm_store_inferior_register): New.
10669 (arm_wince_breakpoint): Reimplement as unsigned long.
10670 (arm_wince_breakpoint_len): Define.
10671 (the_low_target): Adapt to new interface.
10672
10673 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10674 load_debug_registers. Add get_thread_context, set_thread_context,
10675 thread_added and store_inferior_register. Rename
10676 fetch_inferior_registers to fetch_inferior_register.
10677 (regptr): Remove declaration.
10678
10679 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10680
10681 * linux-low.c (linux_detach): Change return type to int. Return 0.
10682 * spu-low.c (spu_detach): Likewise.
10683
10684 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10685
10686 * target.h (target_ops): Change return type of detach to int.
10687 Add join.
10688 (join_inferior): New.
10689 * server.c (main): Don't skip detach support on mingw32.
10690 If the inferior doesn't support detaching return error.
10691 Call join_inferior instead of using waitpid.
10692 * linux-low.c (linux_join): New.
10693 (linux_target_op): Add linux_join.
10694 * spu-low.c (spu_join): New.
10695 (spu_target_ops): Add spu_join.
10696 * win32-low.c (win32_detach): Adapt to new interface.
10697 Reopen current_process_handle before detaching. Issue a child
10698 resume before detaching.
10699 (win32_join): New.
10700 (win32_target_op): Add win32_join.
10701
10702 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10703
10704 * win32-low.c (win32-attach): Fix return value.
10705 * target.h (target_ops): Describe ATTACH return values.
10706
10707 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10708
10709 * win32-low.c (GETPROCADDRESS): Define.
10710 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10711 (winapi_DebugSetProcessKillOnExit): Likewise.
10712 (win32_create_inferior): Force usage of ansi CreateProcessA.
10713 (win32_attach): Use GETPROCADDRESS.
10714 (win32_detach): Likewise.
10715
10716 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10717
10718 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10719
10720 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10721
10722 * win32-low.c: Commit leftover changes from 2007-03-29.
10723
10724 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10725
10726 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10727 fields short instead of int. Add explicit padding.
10728 (i387_cache_to_fsave): Remove unnecessary casts.
10729 (i387_fsave_to_cache): Doc fix.
10730 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10731
10732 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10733
10734 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10735 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10736
10737 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10738
10739 * configure.srv (arm*-*-mingw32ce*): Move near the other
10740 arm targets.
10741
10742 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10743
10744 * configure.ac: Add errno checking.
10745 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10746 sys/file.h and malloc.h.
10747 (AC_CHECK_DECLS): Add perror.
10748 (srv_mingwce): Handle.
10749 * configure.srv (i[34567]86-*-cygwin*): Add
10750 win32-i386-low.o to srv_tgtobj.
10751 (i[34567]86-*-mingw*): Likewise.
10752 (arm*-*-mingw32ce*): Add case.
10753 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10754 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10755 [__MINGW32CE__] (strerror): New function.
10756 [__MINGW32CE__] (errno): Define to GetLastError.
10757 [__MINGW32CE__] (COUNTOF): New macro.
10758 (remote_open): Remove extra close call.
10759 * mem-break.c (delete_breakpoint_at): New function.
10760 * mem-break.h (delete_breakpoint_at): Declare.
10761 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10762 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10763 [USE_WIN32API] (read, write): Add char* casts.
10764 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10765 * server.h: Include wincecompat.h on Windows CE.
10766 [HAVE_ERRNO_H]: Check.
10767 (perror): Declare if not declared.
10768 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10769 (perror_with_name): Remove errno declaration.
10770 * wincecompat.h: New.
10771 * wincecompat.c: New.
10772 * win32-low.h: New.
10773 * win32-arm-low.c: New.
10774 * win32-i386-low.c: New.
10775 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10776 (OUTMSG2): Make it safe.
10777 (_T): New macro.
10778 (COUNTOF): New macro.
10779 (NUM_REGS): Get it from the low target.
10780 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10781 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10782 (thread_rec): Let low target handle debug registers.
10783 (child_add_thread): Likewise.
10784 (child_init_thread_list): Likewise.
10785 (continue_one_thread): Likewise.
10786 (regptr): New.
10787 (do_child_fetch_inferior_registers): Move to ...
10788 * win32-i386-low.c: ... here, and rename to ...
10789 (do_fetch_inferior_registers): ... this.
10790 * win32-low.c (child_fetch_inferior_registers):
10791 Go through the low target.
10792 (do_child_store_inferior_registers): Use regptr.
10793 (strwinerror): New function.
10794 (win32_create_inferior): Handle Windows CE.
10795 Use strwinerror instead of strerror on Windows error
10796 codes. Add program to the error output.
10797 Don't close the main thread handle on Windows CE.
10798 (win32_attach): Use coredll.dll on Windows CE.
10799 (win32_kill): Close current process and current
10800 thread handles.
10801 (win32_detach): Use coredll.dll on Windows CE.
10802 (win32_resume): Let low target handle debug registers, and
10803 step request.
10804 (handle_exception): Add/Remove initial breakpoint. Avoid
10805 non-existant WSTOPSIG on Windows CE.
10806 (win32_read_inferior_memory): Cast to remove warning.
10807 (win32_arch_string): Go through the low target.
10808 (initialize_low): Call set_breakpoint_data with the low
10809 target's breakpoint.
10810 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10811 FOP_REGNUM, mappings): Move to ...
10812 * win32-i386-low.c: ... here.
10813 * win32-low.c (win32_thread_info): Move to ...
10814 * win32-low.h: ... here.
10815 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10816 win32-arm-low.c and wincecompat.c.
10817 (all:): Add $EXEEXT.
10818 (install-only:): Likewise.
10819 (gdbserver:): Likewise.
10820 (gdbreplay:): Likewise.
10821 * config.in: Regenerate.
10822 * configure: Regenerate.
10823
10824 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10825
10826 * win32-low.c: Rename typedef thread_info to
10827 win32_thread_info throughout.
10828
10829 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10830
10831 * win32-i386-low.c: Rename to ...
10832 * win32-low.c: ... this.
10833 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10834 * Makefile.in: Likewise.
10835
10836 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10837
10838 * remote-utils.c (monitor_output): Constify msg parameter.
10839 * server.h (monitor_output): Likewise.
10840 * win32-i386-low.c (handle_output_debug_string): New.
10841 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10842 handle_output_debug_string.
10843 (get_child_debug_event): Likewise.
10844
10845 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10846
10847 * server.c (main): Correct strtoul check.
10848
10849 2007-03-27 Jon Ringle <jon@ringle.org>
10850
10851 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10852
10853 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10854
10855 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10856
10857 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10858
10859 * terminal.h: Check HAVE_SGTTY_H.
10860
10861 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10862
10863 * remote-utils.c (remote_open): Print out the assigned port number.
10864
10865 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10866
10867 * remote-utils.c (monitor_output): New function.
10868 * server.c (debug_threads): Define here.
10869 (monitor_show_help): New function.
10870 (handle_query): Handle qRcmd.
10871 (main): Do not handle 'd' packet.
10872 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10873 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10874 of debug_threads.
10875
10876 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10877
10878 * Makefile.in (EXEEXT): New.
10879 (clean): Use $(EXEEXT).
10880
10881 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10882
10883 * target.h (target_ops): Rename send_signal to request_interrupt,
10884 and remove enum target_signal parameter.
10885 * linux-low.c (linux_request_interrupt): Rename from
10886 linux_send_signal, and always send SIGINT.
10887 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10888 and always send SIGINT.
10889 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10890 of send_signal.
10891 (input_interrupt): Likewise.
10892
10893 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10894
10895 * server.c (get_features_xml): Check if target implemented
10896 arch_string.
10897 * win32-i386-low.c (win32_arch_string): New.
10898 (win32_target_ops): Add win32_arch_string as arch_string member.
10899
10900 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10901
10902 * spu-low.c (spu_arch_string): New.
10903 (spu_target_ops): Add spu_arch_string.
10904
10905 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10906
10907 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10908 * configure.ac: Do not check for terminal.h.
10909 * configure, config.in: Regenerated.
10910
10911 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10912
10913 * Makefile.in (OBS): Add $(XML_BUILTIN).
10914 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10915 (clean): Update.
10916 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10917 (arm-with-iwmmxt.c): New.
10918 * config.in, configure: Regenerate.
10919 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10920 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10921 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10922 (arm*-*-linux*): Add iWMMXt and regset support.
10923 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10924 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10925 (arm_store_wmmxregset, target_regsets): New.
10926 * server.c (get_features_xml): Take annex argument. Check builtin
10927 XML documents.
10928 (handle_query): Handle multiple annexes.
10929
10930 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10931
10932 * remote-utils.c [USE_WIN32API] (read, write): Define.
10933 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10934 write.
10935
10936 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10937
10938 * linux-i386-low.c (the_low_target): Set arch_string.
10939 * linux-x86-64-low.c (the_low_target): Likewise.
10940 * linux-low.c (linux_arch_string): New.
10941 (linux_target_ops): Add it.
10942 * linux-low.h (struct linux_target_ops): Add arch_string.
10943 * server.c (write_qxfer_response): Use const void * for DATA.
10944 (get_features_xml): New.
10945 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10946 * target.h (struct target_ops): Add arch_string method.
10947
10948 2007-01-03 Denis Pilat <denis.pilat@st.com>
10949 Daniel Jacobowitz <dan@codesourcery.com>
10950
10951 * linux-low.c (linux_kill): Handle being called with no threads.
10952 * win32-i386-low.c (win32_kill): Likewise.
10953 (get_child_debug_event): Clear current_process_handle.
10954
10955 2006-12-30 Denis PILAT <denis.pilat@st.com>
10956 Daniel Jacobowitz <dan@codesourcery.com>
10957
10958 * remote-utils.c (remote_open): Check the type of specified
10959 serial port devices before opening them.
10960 * server.c (main): Kill the inferior if an error occurs during
10961 the first remote_open.
10962
10963 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10964
10965 * README: Update supported targets.
10966
10967 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10968
10969 * Makefile.in (clean): Remove reg-mips64.c.
10970 (reg-mips64.c, reg-mips64.o): New rules.
10971 * configure.srv: Handle mips64. Include regset support for mips.
10972 * linux-mips-low.c (union mips_register): New.
10973 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10974 (mips_breakpoint, mips_breakpoint_at): Use int.
10975 (mips_collect_register, mips_supply_register)
10976 (mips_collect_register_32bit, mips_supply_register_32bit)
10977 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10978 (mips_store_fpregset, target_regsets): New.
10979 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10980
10981 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10982
10983 * configure.srv: Add target "spu*-*-*".
10984 * Makefile.in (clean): Remove reg-spu.c.
10985 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10986 * spu-low.c: New file.
10987
10988 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10989
10990 * configure.ac: Correct td_thr_tls_get_addr test.
10991 * configure: Regenerated.
10992
10993 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10994
10995 * linux-low.c (linux_wait_for_event): Reformat. Use the
10996 pass_signals array.
10997 * remote-utils.c (decode_address_to_semicolon): New.
10998 * server.c (pass_signals, handle_general_set): New.
10999 (handle_query): Mention QPassSignals for qSupported.
11000 (main): Call handle_general_set.
11001 * server.h (pass_signals, decode_address_to_semicolon): New.
11002
11003 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11004
11005 * server.c (handle_query): Correct error handling for read_auxv.
11006
11007 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11008
11009 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11010 and srv_linux_thread_db to yes.
11011 * linux-s390-low.c (s390_fill_gregset): New function.
11012 (target_regsets): Define data structure.
11013
11014 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11015
11016 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11017 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11018 * config.in, configure: Regenerated.
11019 * inferiors.c (gdb_id_to_thread): New function.
11020 (gdb_id_to_thread_id): Use it.
11021 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11022 * linux-low.h (struct process_info): Add th member.
11023 (thread_db_get_tls_address): New prototype.
11024 * remote-utils.c (decode_address): Make non-static.
11025 * server.c (handle_query): Handle qGetTLSAddr.
11026 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11027 * target.h (struct target_ops): Add get_tls_address.
11028 * thread-db.c (maybe_attach_thread): Save the thread handle.
11029 (thread_db_get_tls_address): New.
11030
11031 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11032
11033 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11034 (linux_resume_one_process): Take a siginfo_t *. Update all
11035 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11036 (struct pending_signals): Add a siginfo_t.
11037 (linux_wait_for_process): Always set last_status.
11038 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11039 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11040 * linux-low.h (struct process_info): Add last_status.
11041
11042 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11043
11044 * remote-utils.c (try_rle): New function.
11045 (putpkt_binary): Use it.
11046
11047 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11048
11049 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11050 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11051 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11052 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11053 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11054 point registers.
11055
11056 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11057
11058 * server.c (terminal_fd): New variable.
11059 (old_foreground_pgrp): Likewise.
11060 (restore_old_foreground_pgrp): New function.
11061 (start_inferior): Record the terminal file descriptor in terminal_fd
11062 and its original foreground group in old_foreground_pgrp. Register
11063 restore_old_foreground_pgrp with atexit().
11064
11065 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11066
11067 * server.c (handle_query): Correct qPart to qXfer.
11068
11069 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11070
11071 * configure.ac: Check for more headers which are missing on
11072 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11073 * configure.srv: Add Cygwin and mingw32.
11074 * remote-utils.c: Don't include headers unconditionally which
11075 are missing on mingw32. Include <winsock.h> for mingw32.
11076 (remote_open): Adjust for mingw32 support. Flush
11077 standard error after writing to it.
11078 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11079 (unblock_async_io, enable_async_io, disable_async_io)
11080 (readchar, getpkt): Update for Winsock support.
11081 (prepare_resume_reply): Expect a protocol signal number.
11082 * server.c: Disable <sys/wait.h> on mingw32.
11083 (start_inferior): Adjust for mingw32 support. Flush
11084 standard error after writing to it.
11085 (attach_inferior): Likewise. Use protocol signal
11086 numbers.
11087 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11088 and names.
11089 * win32-i386-low.c: New file.
11090 * Makefile.in (XM_CLIBS): Set.
11091 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11092 (win32-i386-low.o): New dependency rule.
11093 * linux-low.c (linux_wait): Use target signal numbers.
11094 * target.h (struct target_ops): Doc fix.
11095 * server.h (target_signal_to_name): New prototype.
11096 * gdbreplay.c: Don't include headers unconditionally which
11097 are missing on mingw32. Include <winsock.h> for mingw32.
11098 (remote_close, remote_open): Adjust for Winsock support.
11099 * configure, config.in: Regenerated.
11100
11101 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11102
11103 * server.c (decode_xfer_read, write_qxfer_response): New.
11104 (handle_query): Take a packet length argument. Handle
11105 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11106 the qSupported response.
11107 (main): Update call to handle_query.
11108
11109 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11110
11111 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11112 (putpkt_binary): Renamed from putpkt and adjusted for binary
11113 data.
11114 (putpkt): New wrapper for putpkt_binary.
11115 (readchar): Don't mask off the high bit.
11116 (decode_X_packet): New function.
11117 * server.c (main): Call putpkt_binary if a handler sets the packet
11118 length. Save the length of the incoming packet. Handle 'X'.
11119 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11120
11121 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11122
11123 * server.c (handle_query): Handle qSupported.
11124
11125 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11126
11127 * remote-utils.c (all_symbols_looked_up): New variable.
11128 (look_up_one_symbol): Check it.
11129 * server.h (look_up_one_symbol): New declaration.
11130 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11131
11132 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11133
11134 * Makefile.in (linux-arm-low.o): Update dependencies.
11135 * linux-arm-low.c: Include "gdb_proc_service.h".
11136 (PTRACE_GET_THREAD_AREA): Define.
11137 (ps_get_thread_area): New function.
11138
11139 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11140
11141 * configure.srv (m68k*-*-uclinux*): New target.
11142 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11143 (linux_resume_one_process): Remove extraneous cast.
11144 (linux_read_offsets): New.
11145 (linux_target_op): Add linux_read_offsets on mmuless systems.
11146 * server.c (handle_query): Add qOffsets logic.
11147 * target.h (struct target_ops): Add read_offsets.
11148
11149 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11150
11151 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11152 (PTRACE_GET_THREAD_AREA): Define.
11153 (ps_get_thread_area): New function.
11154 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11155 (linux-x86-64-low.o): Update.
11156
11157 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11158
11159 * configure.ac: Remove checks for prfpregset_t.
11160 * gdb_proc_service.h: New file.
11161 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11162 new "gdb_proc_service.h".
11163 * proc-service.c: Likewise.
11164 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11165 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11166 * Makefile.in (gdb_proc_service_h): Updated.
11167 * configure, config.in: Regenerated.
11168
11169 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11170
11171 * remote-utils.c (prepare_resume_reply): Move declaration
11172 of gdb_id_from_wait to the top of the block.
11173
11174 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11175
11176 * linux-low.c (regsets_store_inferior_registers): Read the regset
11177 from the target before filling it.
11178
11179 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11180
11181 * server.c (attach_inferior): Return SIGTRAP for a successful
11182 attach.
11183
11184 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11185
11186 * Makefile.in (OBS): Add version.o.
11187 (STAGESTUFF): Delete.
11188 (version.o): Add dependencies.
11189 (version.c): Replace rule.
11190 (clean): Remove version.c.
11191 * server.c (gdbserver_version): New.
11192 (gdbserver_usage): Use printf.
11193 (main): Handle --version and --help.
11194 * server.h (version, host_name): Add declarations.
11195
11196 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11197
11198 * linux-arm-low.c:
11199 * linux-arm-low.c:
11200 * inferiors.c:
11201 * i387-fp.h:
11202 * i387-fp.c:
11203 * gdbreplay.c:
11204 * regcache.c:
11205 * proc-service.c:
11206 * mem-break.h:
11207 * mem-break.c:
11208 * linux-x86-64-low.c:
11209 * linux-sh-low.c:
11210 * linux-s390-low.c:
11211 * linux-ppc64-low.c:
11212 * linux-ppc-low.c:
11213 * linux-mips-low.c:
11214 * linux-m68k-low.c:
11215 * linux-m32r-low.c:
11216 * linux-low.h:
11217 * linux-low.c:
11218 * linux-ia64-low.c:
11219 * linux-i386-low.c:
11220 * linux-crisv32-low.c:
11221 * thread-db.c:
11222 * terminal.h:
11223 * target.h:
11224 * target.c:
11225 * server.h:
11226 * server.c:
11227 * remote-utils.c:
11228 * regcache.h:
11229 * utils.c:
11230 * Makefile.in:
11231 * configure.ac:
11232 * gdbserver.1: Add (C) after Copyright. Update the FSF
11233 address.
11234
11235 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11236
11237 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11238 (arm_breakpoint_at): Recognize both breakpoints.
11239 (the_low_target): Use the correct breakpoint instruction.
11240
11241 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11242
11243 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11244 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11245 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11246 (the_low_target): Update.
11247
11248 2005-10-25 Andreas Schwab <schwab@suse.de>
11249
11250 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11251
11252 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11253 (ia64_num_regs): Reduce to 462.
11254
11255 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11256
11257 * acinclude.m4: Correct quoting.
11258 * aclocal.m4: Regenerated.
11259
11260 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11261 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11262 (thread_db_init): Call thread_db_err_str.
11263 * configure.ac: Check for TD_VERSION.
11264 * config.in, configure: Regenerated.
11265
11266 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11267
11268 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11269
11270 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11271
11272 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11273 is not available. Define HAVE_PTRACE_GETREGS if it is.
11274 * config.in, configure: Regenerated.
11275 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11276 * linux-i386-low.c, linux-m68k-low.c: Update to use
11277 HAVE_PTRACE_GETREGS.
11278 * linux-low.c (regsets_fetch_inferior_registers)
11279 (regsets_store_inferior_registers): Only return 0 if we processed
11280 GENERAL_REGS.
11281 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11282 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11283
11284 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11285
11286 * inferiors.c (struct thread_info): Add gdb_id.
11287 (add_thread): Add gdb_id argument.
11288 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11289 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11290 calls to add_thread.
11291 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11292 * server.c (handle_query): Use thread_to_gdb_id.
11293 (handle_v_cont, main): Use gdb_id_to_thread_id.
11294 * server.h (add_thread): Update prototype.
11295 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11296 prototypes.
11297
11298 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11299
11300 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11301 left-padded registers.
11302 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11303 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11304
11305 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11306
11307 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11308 * configure: Regenerate.
11309 * config.in: Regenerate.
11310 * server.h (NEED_DECLARATION_STRERROR):
11311 Replace with !HAVE_DECL_STRERROR.
11312
11313 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11314
11315 * linux-low.c (linux_wait, linux_send_signal): Don't test
11316 an unsigned long variable for > 0 if it could be MAX_ULONG.
11317 * server.c (myresume): Likewise.
11318 * target.c (set_desired_inferior): Likewise.
11319
11320 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11321
11322 * configure.ac: Simplify and improve check for socklen_t.
11323 * configure, config.in: Regenerate.
11324
11325 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11326
11327 * acconfig.h: Remove.
11328 * configure.ac: Add a test for socklen_t. Use three-argument
11329 AC_DEFINE throughout.
11330 * config.in: Regenerated using autoheader 2.59.
11331 * configure: Regenerated.
11332
11333 * gdbreplay.c (socklen_t): Provide a default.
11334 (remote_open): Use socklen_t.
11335 * remote-utils.c (socklen_t): Provide a default.
11336 (remote_open): Use socklen_t.
11337 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11338 unsigned char.
11339
11340 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11341 char for buffers.
11342 * linux-low.c (linux_read_memory, linux_write_memory)
11343 (linux_read_auxv): Likewise.
11344 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11345 (check_mem_write): Likewise.
11346 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11347 Likewise.
11348 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11349 (registers_from_string, register_data): Likewise.
11350 * server.c (handle_query, main): Likewise.
11351 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11352 (decode_M_packet): Likewise.
11353 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11354 * target.h (struct target_ops): Update read_memory, write_memory,
11355 and read_auxv.
11356 (read_inferior_memory, write_inferior_memory): Update.
11357 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11358 to unsigned char *.
11359 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11360 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11361 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11362 linux-s390-low.c, linux-sh-low.c: Update for changes in
11363 read_inferior_memory and the_low_target->breakpoint.
11364
11365 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11366
11367 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11368 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11369 * configure.srv: Add powerpc64-*-linux*.
11370 * linux-ppc64-low.c: New file.
11371
11372 2005-05-23 Orjan Friberg <orjanf@axis.com>
11373
11374 * linux-cris-low.c: New file with support for CRIS.
11375 * linux-crisv32-low.c: Ditto for CRISv32.
11376 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11377 (clean): Add reg-cris.c and reg-crisv32.c.
11378 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11379 reg-crisv32.o, and reg-crisv32.c to make rules.
11380 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11381 recognized targets.
11382
11383 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11384
11385 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11386 of sizeof (PTRACE_XFER_TYPE).
11387 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11388
11389 2005-05-12 Orjan Friberg <orjanf@axis.com>
11390
11391 * target.h (struct target_ops): Add insert_watchpoint,
11392 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11393 pointers for hardware watchpoint support.
11394 * linux-low.h (struct linux_target_ops): Ditto.
11395 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11396 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11397 to linux_target_ops.
11398 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11399 reply packet.
11400 * server.c (main): Recognize 'Z' and 'z' packets.
11401
11402 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11403
11404 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11405 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11406 (the_low_target): Add new members.
11407
11408 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11409
11410 * proc-service.c (ps_lgetregs): Search all_processes instead of
11411 all_threads.
11412
11413 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11414
11415 * server.c (start_inferior): Change return type to int.
11416 (attach_inferior): Change sigptr to int *.
11417 (handle_v_cont, handle_v_requests): Change signal to int *.
11418 (main): Change signal to int.
11419
11420 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11421
11422 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11423 * configure.srv: Add m32r*-*-linux*.
11424 * linux-m32r-low.c: New file.
11425
11426 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11427
11428 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11429
11430 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11431
11432 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11433 Take unsigned long arguments for PIDs.
11434 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11435 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11436 (wait_for_sigstop, linux_resume_one_process)
11437 (regsets_fetch_inferior_registers, linux_send_signal)
11438 (linux_read_auxv): Likewise. Update the types of variables holding
11439 PIDs. Update format string specifiers.
11440 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11441 * remote-utils.c (prepare_resume_reply): Likewise.
11442 * server.c (cont_thread, general_thread, step_thread)
11443 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11444 unsigned long.
11445 (handle_query): Update format specifiers.
11446 (handle_v_cont, main): Use strtoul for thread IDs.
11447 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11448 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11449 (general_thread, step_thread, thread_from_wait)
11450 (old_thread_from_wait): Update.
11451 * target.h (struct thread_resume): Use unsigned long for THREAD.
11452 (struct target_ops): Use unsigned long for arguments to attach and
11453 thread_alive.
11454
11455 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11456
11457 * acinclude.m4: Include bfd/bfd.m4 directly.
11458 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11459 <agriffis@toolchain.org>.
11460 * aclocal.m4, configure: Regenerated.
11461
11462 2005-01-07 Andrew Cagney <cagney@gnu.org>
11463
11464 * configure.ac: Rename configure.in, require autoconf 2.59.
11465 * configure: Re-generate.
11466
11467 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11468
11469 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11470 LIBS when finished.
11471 * aclocal.m4: Regenerated.
11472 * configure: Regenerated.
11473
11474 2004-11-21 Andreas Schwab <schwab@suse.de>
11475
11476 * linux-m68k-low.c (m68k_num_gregs): Define.
11477 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11478 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11479 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11480 (m68k_breakpoint_at): New. Add to the_low_target.
11481
11482 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11483 srv_linux_thread_db to yes.
11484
11485 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11486
11487 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11488 (ARCH_SET_FS): Likewise.
11489 (ARCH_GET_FS): Likewise.
11490 (ARCH_GET_GS): Likewise.
11491
11492 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11493
11494 * linux-i386-low.c (ps_get_thread_area): New.
11495 * linux-x86-64-low.c (ps_get_thread_area): New.
11496 * linux-low.c: Include <sys/syscall.h>.
11497 (linux_kill_one_process): Don't kill the first thread here.
11498 (linux_kill): Kill the first thread here.
11499 (kill_lwp): New function.
11500 (send_sigstop, linux_send_signal): Use it.
11501 * proc-service.c: Clean up #ifdefs.
11502 (fpregset_info): Delete.
11503 (ps_lgetregs): Update and enable implementation.
11504 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11505 implementations.
11506 * remote-utils.c (struct sym_cache, symbol_cache): New.
11507 (input_interrupt): Print a clearer message.
11508 (async_io_enabled): New variable.
11509 (enable_async_io, disable_async_io): Use it. Update comments.
11510 (look_up_one_symbol): Use the symbol cache.
11511 * thread-db.c (thread_db_look_up_symbols): New function.
11512 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11513
11514 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11515
11516 * configure.in: Test for -rdynamic.
11517 * configure: Regenerated.
11518 * Makefile (INTERNAL_LDFLAGS): New.
11519 (gdbserver, gdbreplay): Use it.
11520
11521 2004-09-02 Andrew Cagney <cagney@gnu.org>
11522
11523 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11524
11525 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11526
11527 * linux-low.c (linux_wait): Clear all_processes list also.
11528
11529 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11530
11531 * linux-low.c: Include <errno.h>. Remove extern declaration of
11532 errno.
11533
11534 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11535
11536 * gdbreplay.c, server.h, utils.c: Update copyright years.
11537
11538 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11539
11540 * server.c (main): Print child status or termination signal from
11541 variable 'signal', not 'sig'.
11542
11543 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11544
11545 * linux-low.c (linux_read_memory): Change return type to
11546 int. Check for and return error from ptrace().
11547 * target.c (read_inferior_memory): Change return type to int. Pass
11548 back return status from the_target->read_memory().
11549 * target.h (struct target_ops): Adapt *read_memory() prototype.
11550 Update comment.
11551 (read_inferior_memory): Adapt prototype.
11552 * server.c (main): Return an error packet if
11553 read_inferior_memory() returns an error.
11554
11555 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11556
11557 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11558 Unify with other clean targets.
11559
11560 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11561
11562 * server.c (handle_v_cont): Call set_desired_inferior.
11563
11564 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11565
11566 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11567
11568 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11569
11570 * linux-low.c (linux_wait): Unblock async I/O.
11571 (linux_resume): Block and enable async I/O.
11572 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11573 * server.h (block_async_io, unblock_async_io): Add prototypes.
11574
11575 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11576
11577 * remote-utils.c (remote_open): Print a status notice after
11578 opening a TCP port.
11579 * server.c (attach_inferior): Print a status notice after
11580 attaching.
11581
11582 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11583
11584 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11585
11586 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11587
11588 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11589 error packet.
11590 * server.c, target.h: Update copyright years.
11591
11592 2004-02-25 Roland McGrath <roland@redhat.com>
11593
11594 * target.h (struct target_ops): New member `read_auxv'.
11595 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11596 * linux-low.c (linux_read_auxv): New function.
11597 (linux_target_ops): Initialize `read_auxv' member to that.
11598
11599 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11600
11601 Committed by Jim Blandy <jimb@redhat.com>.
11602
11603 * linux-s390-low.c (s390_num_regs): Update.
11604 (s390_regmap): Remove control registers. Use __s390x__ predefine
11605 instead of GPR_SIZE to distiguish s390 and s390x targets.
11606
11607 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11608
11609 * linux-low.c: Update copyright year.
11610 (check_removed_breakpoint): Clear pending_is_breakpoint.
11611 (linux_set_resume_request, linux_queue_one_thread)
11612 (resume_status_pending_p): New functions.
11613 (linux_continue_one_thread): Use process->resume.
11614 (linux_resume): Only resume threads if there are no pending events.
11615 * linux-low.h (struct process_info): Add resume request
11616 pointer.
11617
11618 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11619
11620 * regcache.c (new_register_cache): Clear the allocated register
11621 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11622
11623 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11624
11625 * linux-low.c (linux_resume): Take a struct thread_resume *
11626 argument.
11627 (linux_wait): Update call.
11628 (resume_ptr): New static variable.
11629 (linux_continue_one_thread): Renamed from
11630 linux_continue_one_process. Use resume_ptr.
11631 (linux_resume): Use linux_continue_one_thread.
11632 * server.c (handle_v_cont, handle_v_requests): New functions.
11633 (myresume): New function.
11634 (main): Handle 'v' case.
11635 * target.h (struct thread_resume): New type.
11636 (struct target_ops): Change argument of "resume" to struct
11637 thread_resume *.
11638 (myresume): Delete macro.
11639
11640 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11641
11642 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11643 (uninstall): Support DESTDIR.
11644
11645 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11646
11647 * configure.srv: Add xscale*linux copy of arm*linux entry.
11648
11649 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11650
11651 * linux-arm-low.c (arm_reinsert_addr): New function.
11652 (the_low_target): Add arm_reinsert_addr.
11653
11654 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11655
11656 * mem-break.c: Remove whitespace at end of file.
11657
11658 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11659
11660 * configure.in: Check whether we need to prototype strerror.
11661 * server.h: Optionally prototype strerror.
11662 * gdbreplay.c (perror_with_name): Use strerror.
11663 * linux-low.c (linux_attach_lwp): Use strerror.
11664 * utils.c (perror_with_name): Use strerror.
11665 * config.in, configure: Regenerated.
11666
11667 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11668
11669 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11670 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11671
11672 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11673
11674 * Makefile.in (SFILES): Update.
11675 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11676 low-sun3.c: Remove files.
11677
11678 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11679
11680 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11681 (linux_detach_one_process, linux_detach): New functions.
11682 (linux_target_ops): Add linux_detach.
11683 * server.c (main): Handle 'D' packet.
11684 * target.h (struct target_ops): Add "detach" member.
11685 (detach_inferior): Define.
11686
11687 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11688
11689 From Kelley Cook <kelleycook@wideopenwest.com>:
11690 * configure.srv: Accept i[34567]86 variants.
11691
11692 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11693
11694 * linux-low.c (linux_wait_for_event): Correct comment typos.
11695 (linux_resume_one_process): Call check_removed_breakpoint.
11696 (linux_send_signal): New function.
11697 (linux_target_ops): Add linux_send_signal.
11698 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11699 of kill.
11700 * target.h (struct target_ops): Add send_signal.
11701
11702 2003-05-29 Jim Blandy <jimb@redhat.com>
11703
11704 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11705 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11706 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11707 away part of the register's value.
11708
11709 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11710
11711 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11712 (linux_wait_for_event, linux_init_signals): Likewise.
11713
11714 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11715
11716 * configure.in: Check for stdlib.h.
11717 * configure: Regenerated.
11718 * config.in: Regenerated.
11719
11720 2003-01-04 Andreas Schwab <schwab@suse.de>
11721
11722 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11723
11724 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11725
11726 * Makefile.in: Remove obsolete code.
11727
11728 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11729
11730 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11731 defined(PT_FPR0_HI).
11732
11733 2002-11-17 Stuart Hughes <seh@zee2.com>
11734
11735 * linux-arm-low.c (arm_num_regs): Increase.
11736 (arm_regmap): Include status register.
11737
11738 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11739
11740 * linux-low.c (register_addr): Remove incorrect -1 check.
11741
11742 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11743
11744 * linux-low.c (linux_create_inferior): Call setpgid. Return
11745 the new PID.
11746 (unstopped_p, linux_signal_pid): Remove.
11747 (linux_target_ops): Remove linux_signal_pid.
11748 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11749 global instead of target method.
11750 * target.h (struct target_ops): Remove signal_pid. Update comment
11751 for create_inferior.
11752 * server.c (signal_pid): New variable.
11753 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11754 gdbserver. Set the child to be the foreground process group.
11755 (attach_inferior): Set signal_pid.
11756
11757 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11758
11759 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11760
11761 2002-08-20 Jim Blandy <jimb@redhat.com>
11762
11763 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11764 default for this.
11765
11766 2002-08-01 Andrew Cagney <cagney@redhat.com>
11767
11768 * Makefile.in: Make chill references obsolete.
11769
11770 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11771
11772 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11773 * configure: Regenerate.
11774 * config.in: Regenerate.
11775
11776 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11777
11778 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11779 (perror_with_name, remote_close, remote_open, expect, play): Static.
11780
11781 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11782
11783 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11784 byte offsets instead of an array of indexes.
11785 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11786
11787 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11788
11789 * regcache.c: Add comment.
11790
11791 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11792
11793 * thread-db.c: New file.
11794 * proc-service.c: New file.
11795 * acinclude.m4: New file.
11796 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11797 proc-service.o, and thread-db.o.
11798 (linux-low.o): Add USE_THREAD_DB.
11799 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11800 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11801 * aclocal.m4: Regenerated.
11802 * config.in: Regenerated.
11803 * configure: Regenerated.
11804 * configure.in: Check for proc_service.h, sys/procfs.h,
11805 thread_db.h, and linux/elf.h headrs.
11806 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11807 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11808 Check for -lthread_db and thread support.
11809 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11810 PowerPC, and SuperH.
11811 * i387-fp.c: Constify arguments.
11812 * i387-fp.h: Likewise.
11813 * inferiors.c: (struct thread_info): Renamed from
11814 `struct inferior_info'. Remove PID member. Use generic inferior
11815 list header. All uses updated.
11816 (inferiors, signal_pid): Removed.
11817 (all_threads): New variable.
11818 (get_thread): Define.
11819 (add_inferior_to_list): New function.
11820 (for_each_inferior): New function.
11821 (change_inferior_id): New function.
11822 (add_inferior): Removed.
11823 (remove_inferior): New function.
11824 (add_thread): New function.
11825 (free_one_thread): New function.
11826 (remove_thread): New function.
11827 (clear_inferiors): Use for_each_inferior and free_one_thread.
11828 (find_inferior): New function.
11829 (find_inferior_id): New function.
11830 (inferior_target_data): Update argument type.
11831 (set_inferior_target_data): Likewise.
11832 (inferior_regcache_data): Likewise.
11833 (set_inferior_regcache_data): Likewise.
11834 * linux-low.c (linux_bp_reinsert): Remove.
11835 (all_processes, stopping_threads, using_thrads)
11836 (struct pending_signals, debug_threads, pid_of): New.
11837 (inferior_pid): Replace with macro.
11838 (struct inferior_linux_data): Remove.
11839 (get_stop_pc, add_process): New functions.
11840 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11841 Use add_process and add_thread.
11842 (linux_attach_lwp): New function, based on old linux_attach. Use
11843 add_process and add_thread. Set stop_expected for new threads.
11844 (linux_attach): New function.
11845 (linux_kill_one_process): New function.
11846 (linux_kill): Kill all LWPs.
11847 (linux_thread_alive): Use find_inferior_id.
11848 (check_removed_breakpoints, status_pending_p): New functions.
11849 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11850 Update. Use WNOHANG. Wait for cloned processes also. Update process
11851 struct for the found process.
11852 (linux_wait_for_event): New function.
11853 (linux_wait): Use it. Support LWPs.
11854 (send_sigstop, wait_for_sigstop, stop_all_processes)
11855 (linux_resume_one_process, linux_continue_one_process): New functions.
11856 (linux_resume): Support LWPs.
11857 (REGISTER_RAW_SIZE): Remove.
11858 (fetch_register): Use register_size instead. Call supply_register.
11859 (usr_store_inferior_registers): Likewise. Call collect_register.
11860 Fix recursive case.
11861 (regsets_fetch_inferior_registers): Improve error message.
11862 (regsets_store_inferior_registers): Add debugging.
11863 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11864 (unstopped_p, linux_signal_pid): New functions.
11865 (linux_target_ops): Add linux_signal_pid.
11866 (linux_init_signals): New function.
11867 (initialize_low): Call it. Initialize using_threads.
11868 * regcache.c (inferior_regcache_data): Add valid
11869 flag.
11870 (get_regcache): Fetch registers lazily. Add fetch argument
11871 and update all callers.
11872 (regcache_invalidate_one, regcache_invalidate): New
11873 functions.
11874 (new_register_cache): Renamed from create_register_cache.
11875 Return the new regcache.
11876 (free_register_cache): Change argument to a void *.
11877 (registers_to_string, registers_from_string): Call get_regcache
11878 with fetch flag set.
11879 (register_data): Make static. Pass fetch flag to get_regcache.
11880 (supply_register): Call get_regcache with fetch flag clear.
11881 (collect_register): Call get_regcache with fetch flag set.
11882 (collect_register_as_string): New function.
11883 * regcache.h: Update.
11884 * remote-utils.c (putpkt): Flush after debug output and use
11885 stderr.
11886 Handle input interrupts while waiting for an ACK.
11887 (input_interrupt): Use signal_pid method.
11888 (getpkt): Flush after debug output and use stderr.
11889 (outreg): Use collect_register_as_string.
11890 (new_thread_notify, dead_thread_notify): New functions.
11891 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11892 and general_thread.
11893 (look_up_one_symbol): Flush after debug output.
11894 * server.c (step_thread, server_waiting): New variables.
11895 (start_inferior): Don't use signal_pid. Update call to mywait.
11896 (attach_inferior): Update call to mywait.
11897 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11898 (main): Don't fetch/store registers explicitly. Use
11899 set_desired_inferior. Support proposed ``Hs'' packet. Update
11900 calls to mywait.
11901 * server.h: Update.
11902 (struct inferior_list, struct_inferior_list_entry): New.
11903 * target.c (set_desired_inferior): New.
11904 (write_inferior_memory): Constify.
11905 (mywait): New function.
11906 * target.h: Update.
11907 (struct target_ops): New signal_pid method.
11908 (mywait): Removed macro, added prototype.
11909
11910 * linux-low.h (regset_func): Removed.
11911 (regset_fill_func, regset_store_func): New.
11912 (enum regset_type): New.
11913 (struct regset_info): Add type field. Use new operation types.
11914 (struct linux_target_ops): stop_pc renamed to get_pc.
11915 Add decr_pc_after_break and breakpoint_at.
11916 (get_process, get_thread_proess, get_process_thread)
11917 (strut process_info, all_processes, linux_attach_lwp)
11918 (thread_db_init): New.
11919
11920 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11921 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11922 (the_low_target): Add new members.
11923 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11924 (i386_store_fpxregset): Constify.
11925 (target_regsets): Add new kind identifier.
11926 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11927 (i386_set_pc): Add debugging.
11928 (i386_breakpoint_at): New function.
11929 (the_low_target): Add new members.
11930 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11931 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11932 (mips_breakpoint_at): New.
11933 (the_low_target): Add new members.
11934 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11935 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11936 (the_low_target): Add new members.
11937 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11938 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11939 (the_low_target): Add new members.
11940 * linux-x86-64-low.c (target_regsets): Add new kind
11941 identifier.
11942
11943 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11944
11945 From Martin Pool <mbp@samba.org>:
11946 * server.c (gdbserver_usage): New function.
11947 (main): Call it.
11948
11949 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11950
11951 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11952 stop_at -> stop_pc.
11953
11954 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11955
11956 * Makefile.in: Remove obsolete code.
11957
11958 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11959
11960 * linux-low.c (regsets_fetch_inferior_registers),
11961 (regsets_store_inferior_registers): Removed cast to int from
11962 ptrace() calls.
11963 * regcache.h: Added declaration of struct inferior_info.
11964
11965 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11966
11967 * inferiors.c (struct inferior_info): Add regcache_data.
11968 (add_inferior): Call create_register_cache.
11969 (clear_inferiors): Call free_register_cache.
11970 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11971 * regcache.c (struct inferior_regcache_data): New.
11972 (registers): Remove.
11973 (get_regcache): New function.
11974 (create_register_cache, free_register_cache): New functions.
11975 (set_register_cache): Don't initialize the register cache here.
11976 (registers_to_string, registers_from_string, register_data): Call
11977 get_regcache.
11978 * regcache.h: Add prototypes.
11979 * server.h: Likewise.
11980
11981 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11982
11983 * mem-break.c: New file.
11984 * mem-break.h: New file.
11985 * Makefile.in: Add mem-break.o rule; update server.h
11986 dependencies.
11987 * inferiors.c (struct inferior_info): Add target_data
11988 member.
11989 (clear_inferiors): Free target_data member if set.
11990 (inferior_target_data, set_inferior_target_data): New functions.
11991 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11992 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11993 * linux-low.c (linux_bp_reinsert): New variable.
11994 (struct inferior_linux_data): New.
11995 (linux_create_inferior): Use set_inferior_target_data.
11996 (linux_attach): Likewise. Call add_inferior.
11997 (linux_wait_for_one_inferior): New function.
11998 (linux_wait): Call it.
11999 (linux_write_memory): Add const.
12000 (initialize_low): Call set_breakpoint_data.
12001 * linux-low.h (struct linux_target_ops): Add breakpoint
12002 handling members.
12003 * server.c (attach_inferior): Remove extra add_inferior
12004 call.
12005 * server.h: Include mem-break.h. Update inferior.c
12006 prototypes.
12007 * target.c (read_inferior_memory)
12008 (write_inferior_memory): New functions.
12009 * target.h (read_inferior_memory)
12010 (write_inferior_memory): Change macros to prototypes.
12011 (struct target_ops): Update comments. Add const to write_memory
12012 definition.
12013
12014 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12015
12016 * linux-low.c (usr_store_inferior_registers): Support
12017 registers which are allowed to fail to store.
12018 * linux-low.h (linux_target_ops): Likewise.
12019 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12020 (ppc_cannot_store_register): FPSCR may not be storable.
12021
12022 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12023
12024 * server.h: Include <string.h> if HAVE_STRING_H.
12025 * ChangeLog: Correct paths in last ChangeLog entry.
12026
12027 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12028
12029 * linux-low.h: Remove obsolete prototypes.
12030 (struct linux_target_ops): New.
12031 (extern the_low_target): New.
12032 * linux-low.c (num_regs, regmap): Remove declarations.
12033 (register_addr): Use the_low_target explicitly.
12034 (fetch_register): Likewise.
12035 (usr_fetch_inferior_registers): Likewise.
12036 (usr_store_inferior_registers): Likewise.
12037 * linux-arm-low.c (num_regs): Remove.
12038 (arm_num_regs): Define.
12039 (arm_regmap): Renamed from regmap, made static.
12040 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12041 made static.
12042 (arm_cannot_store_register): Renamed from cannot_store_register,
12043 made static.
12044 (the_low_target): New.
12045 * linux-i386-low.c (num_regs): Remove.
12046 (i386_num_regs): Define.
12047 (i386_regmap): Renamed from regmap, made static.
12048 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12049 made static.
12050 (i386_cannot_store_register): Renamed from cannot_store_register,
12051 made static.
12052 (the_low_target): New.
12053 * linux-ia64-low.c (num_regs): Remove.
12054 (ia64_num_regs): Define.
12055 (ia64_regmap): Renamed from regmap, made static.
12056 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12057 made static.
12058 (ia64_cannot_store_register): Renamed from cannot_store_register,
12059 made static.
12060 (the_low_target): New.
12061 * linux-m68k-low.c (num_regs): Remove.
12062 (m68k_num_regs): Define.
12063 (m68k_regmap): Renamed from regmap, made static.
12064 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12065 made static.
12066 (m68k_cannot_store_register): Renamed from cannot_store_register,
12067 made static.
12068 (the_low_target): New.
12069 * linux-mips-low.c (num_regs): Remove.
12070 (mips_num_regs): Define.
12071 (mips_regmap): Renamed from regmap, made static.
12072 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12073 made static.
12074 (mips_cannot_store_register): Renamed from cannot_store_register,
12075 made static.
12076 (the_low_target): New.
12077 * linux-ppc-low.c (num_regs): Remove.
12078 (ppc_num_regs): Define.
12079 (ppc_regmap): Renamed from regmap, made static.
12080 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12081 made static.
12082 (ppc_cannot_store_register): Renamed from cannot_store_register,
12083 made static.
12084 (the_low_target): New.
12085 * linux-s390-low.c (num_regs): Remove.
12086 (s390_num_regs): Define.
12087 (s390_regmap): Renamed from regmap, made static.
12088 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12089 made static.
12090 (s390_cannot_store_register): Renamed from cannot_store_register,
12091 made static.
12092 (the_low_target): New.
12093 * linux-sh-low.c (num_regs): Remove.
12094 (sh_num_regs): Define.
12095 (sh_regmap): Renamed from regmap, made static.
12096 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12097 made static.
12098 (sh_cannot_store_register): Renamed from cannot_store_register,
12099 made static.
12100 (the_low_target): New.
12101 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12102 (the_low_target): New.
12103
12104 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12105
12106 * Makefile.in: Add stamp-h target.
12107 * configure.in: Create stamp-h.
12108 * configure: Regenerated.
12109
12110 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12111
12112 * inferiors.c: New file.
12113 * target.c: New file.
12114 * target.h: New file.
12115 * Makefile.in: Add target.o and inferiors.o. Update
12116 dependencies.
12117 * linux-low.c (inferior_pid): New static variable,
12118 moved from server.c.
12119 (linux_create_inferior): Renamed from create_inferior.
12120 Call add_inferior. Return 0 on success instead of a PID.
12121 (linux_attach): Renamed from myattach.
12122 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12123 (linux_thread_alive): Renamed from mythread_alive.
12124 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12125 child dies.
12126 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12127 (regsets_store_inferior_registers): Correct error message.
12128 Add missing ``return 0''.
12129 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12130 (linux_store_registers): Renamed from store_inferior_registers.
12131 (linux_read_memory): Renamed from read_inferior_memory.
12132 (linux_write_memory): Renamed from write_inferior_memory.
12133 (linux_target_ops): New structure.
12134 (initialize_low): Call set_target_ops ().
12135 * remote-utils.c (unhexify): New function.
12136 (hexify): New function.
12137 (input_interrupt): Send signals to ``signal_pid''.
12138 * server.c (inferior_pid): Remove.
12139 (start_inferior): Update create_inferior call.
12140 (attach_inferior): Call add_inferior.
12141 (handle_query): New function.
12142 (main): Call handle_query for `q' packets.
12143 * server.h: Include "target.h". Remove obsolete prototypes.
12144 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12145
12146 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12147
12148 * Makefile.in: Add WARN_CFLAGS. Update configury
12149 dependencies.
12150 * configure.in: Check for <string.h>
12151 * configure: Regenerate.
12152 * config.in: Regenerate.
12153 * gdbreplay.c: Include needed system headers.
12154 (remote_open): Remove strchr prototype.
12155 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12156 * regcache.c (supply_register): Change buf argument to const void *.
12157 (supply_register_by_name): Likewise.
12158 (collect_register): Change buf argument to void *.
12159 (collect_register_by_name): Likewise.
12160 * regcache.h: Add missing prototypes.
12161 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12162 * server.c (handle_query): New function.
12163 (attached): New static variable, moved out of main.
12164 (main): Quiet longjmp clobber warnings.
12165 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12166 * utils.c (error): Remove NORETURN.
12167 (fatal): Likewise.
This page took 0.378926 seconds and 4 git commands to generate.