gdbserver: Fix exec stop reply reporting conditions
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-09-15 Pedro Alves <palves@redhat.com>
2
3 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4 Check whether to report exec events instead of checking whether
5 multiprocess is enabled.
6
7 2015-09-15 Pedro Alves <palves@redhat.com>
8
9 PR remote/18965
10 * remote-utils.c (prepare_resume_reply): Merge
11 TARGET_WAITKIND_VFORK_DONE switch case with the
12 TARGET_WAITKIND_FORKED case.
13
14 2015-09-15 Yao Qi <yao.qi@linaro.org>
15
16 * server.c (handle_query): Check string comparison using
17 "else if" instead of "if".
18
19 2015-09-15 Yao Qi <yao.qi@linaro.org>
20
21 * server.c (vCont_supported): New global variable.
22 (handle_query): Set vCont_supported to 1 if "vContSupported+"
23 matches. Append ";vContSupported+" to own_buf.
24 (handle_v_requests): Append ";s;S" to own_buf if target supports
25 hardware single step or vCont_supported is false.
26 (capture_main): Set vCont_supported to zero.
27
28 2015-09-15 Yao Qi <yao.qi@linaro.org>
29
30 * linux-low.c (linux_supports_conditional_breakpoints): Rename
31 it to ...
32 (linux_supports_hardware_single_step): ... New function.
33 (linux_target_ops): Update.
34 * lynx-low.c (lynx_target_ops): Set field
35 supports_hardware_single_step to target_can_do_hardware_single_step.
36 * nto-low.c (nto_target_ops): Likewise.
37 * spu-low.c (spu_target_ops): Likewise.
38 * win32-low.c (win32_target_ops): Likewise.
39 * target.c (target_can_do_hardware_single_step): New function.
40 * target.h (struct target_ops) <supports_conditional_breakpoints>:
41 Remove. <supports_hardware_single_step>: New field.
42 (target_supports_conditional_breakpoints): Remove.
43 (target_supports_hardware_single_step): New macro.
44 (target_can_do_hardware_single_step): Declare.
45 * server.c (handle_query): Use target_supports_hardware_single_step
46 instead of target_supports_conditional_breakpoints.
47
48 2015-09-15 Yao Qi <yao.qi@linaro.org>
49
50 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
51 function.
52 (struct linux_target_ops the_low_target): Install
53 aarch64_linux_siginfo_fixup.
54
55 2015-09-11 Don Breazeal <donb@codesourcery.com>
56 Luis Machado <lgustavo@codesourcery.com>
57
58 * linux-low.c (linux_mourn): Static declaration.
59 (linux_arch_setup): Move in front of
60 handle_extended_wait.
61 (linux_arch_setup_thread): New function.
62 (handle_extended_wait): Handle exec events. Call
63 linux_arch_setup_thread. Make event_lwp argument a
64 pointer-to-a-pointer.
65 (check_zombie_leaders): Do not check stopped threads.
66 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
67 (linux_low_filter_event): Add lwp and thread for exec'ing
68 non-leader thread if leader thread has been deleted.
69 Refactor code into linux_arch_setup_thread and call it.
70 Pass child lwp pointer by reference to handle_extended_wait.
71 (linux_wait_for_event_filtered): Update comment.
72 (linux_wait_1): Prevent clobbering exec event status.
73 (linux_supports_exec_events): New function.
74 (linux_target_ops) <supports_exec_events>: Initialize new member.
75 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
76 new member.
77 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
78 * server.c (report_exec_events): New global variable.
79 (handle_query): Handle qSupported query for exec-events feature.
80 (captured_main): Initialize report_exec_events.
81 * server.h (report_exec_events): Declare new global variable.
82 * target.h (struct target_ops) <supports_exec_events>: New
83 member.
84 (target_supports_exec_events): New macro.
85 * win32-low.c (win32_target_ops) <supports_exec_events>:
86 Initialize new member.
87
88 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
89
90 * linux-low.c (linux_low_enable_btrace): Remove.
91 (linux_target_ops): Replace linux_low_enable_btrace with
92 linux_enable_btrace.
93
94 2015-09-03 Yao Qi <yao.qi@linaro.org>
95
96 * linux-aarch64-low.c (aarch64_insert_point): Call
97 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
98 returns true.
99
100 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
101
102 * linux-low.c (check_stopped_by_breakpoint): Use
103 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
104
105 2015-08-27 Pedro Alves <palves@redhat.com>
106
107 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
108
109 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
110
111 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
112 the XNEW-family equivalent.
113 (compile_bytecodes): Likewise.
114 * dll.c (loaded_dll): Likewise.
115 * event-loop.c (append_callback_event): Likewise.
116 (create_file_handler): Likewise.
117 (create_file_event): Likewise.
118 * hostio.c (handle_open): Likewise.
119 * inferiors.c (add_thread): Likewise.
120 (add_process): Likewise.
121 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
122 * linux-arm-low.c (arm_new_process): Likewise.
123 (arm_new_thread): Likewise.
124 * linux-low.c (add_to_pid_list): Likewise.
125 (linux_add_process): Likewise.
126 (handle_extended_wait): Likewise.
127 (add_lwp): Likewise.
128 (enqueue_one_deferred_signal): Likewise.
129 (enqueue_pending_signal): Likewise.
130 (linux_resume_one_lwp_throw): Likewise.
131 (linux_resume_one_thread): Likewise.
132 (linux_read_memory): Likewise.
133 (linux_write_memory): Likewise.
134 * linux-mips-low.c (mips_linux_new_process): Likewise.
135 (mips_linux_new_thread): Likewise.
136 (mips_add_watchpoint): Likewise.
137 * linux-x86-low.c (initialize_low_arch): Likewise.
138 * lynx-low.c (lynx_add_process): Likewise.
139 * mem-break.c (set_raw_breakpoint_at): Likewise.
140 (set_breakpoint): Likewise.
141 (add_condition_to_breakpoint): Likewise.
142 (add_commands_to_breakpoint): Likewise.
143 (clone_agent_expr): Likewise.
144 (clone_one_breakpoint): Likewise.
145 * regcache.c (new_register_cache): Likewise.
146 * remote-utils.c (look_up_one_symbol): Likewise.
147 * server.c (queue_stop_reply): Likewise.
148 (start_inferior): Likewise.
149 (queue_stop_reply_callback): Likewise.
150 (handle_target_event): Likewise.
151 * spu-low.c (fetch_ppc_memory): Likewise.
152 (store_ppc_memory): Likewise.
153 * target.c (set_target_ops): Likewise.
154 * thread-db.c (thread_db_load_search): Likewise.
155 (try_thread_db_load_1): Likewise.
156 * tracepoint.c (add_tracepoint): Likewise.
157 (add_tracepoint_action): Likewise.
158 (create_trace_state_variable): Likewise.
159 (cmd_qtdpsrc): Likewise.
160 (cmd_qtro): Likewise.
161 (add_while_stepping_state): Likewise.
162 * win32-low.c (child_add_thread): Likewise.
163 (get_image_name): Likewise.
164
165 2015-08-25 Yao Qi <yao.qi@linaro.org>
166
167 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
168
169 2015-08-25 Yao Qi <yao.qi@linaro.org>
170
171 * Makefile.in (aarch64-linux.o): New rule.
172 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
173 srv_tgtobj.
174 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
175 (aarch64_init_debug_reg_state): Make it extern.
176 (aarch64_linux_prepare_to_resume): Remove.
177
178 2015-08-25 Yao Qi <yao.qi@linaro.org>
179
180 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
181 lwp_arch_private_info and ptid_of_lwp.
182
183 2015-08-25 Yao Qi <yao.qi@linaro.org>
184
185 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
186 Find proc_info by find_process_pid. All callers updated.
187
188 2015-08-25 Yao Qi <yao.qi@linaro.org>
189
190 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
191 Remove.
192 (debug_reg_change_callback): Remove.
193 (aarch64_notify_debug_reg_change): Remove.
194
195 2015-08-25 Yao Qi <yao.qi@linaro.org>
196
197 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
198 Call current_lwp_ptid.
199
200 2015-08-25 Yao Qi <yao.qi@linaro.org>
201
202 * linux-aarch64-low.c (debug_reg_change_callback): Use
203 debug_printf.
204
205 2015-08-25 Yao Qi <yao.qi@linaro.org>
206
207 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
208
209 2015-08-25 Yao Qi <yao.qi@linaro.org>
210
211 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
212
213 2015-08-25 Yao Qi <yao.qi@linaro.org>
214
215 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
216 the code.
217
218 2015-08-25 Yao Qi <yao.qi@linaro.org>
219
220 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
221 Remove.
222 (debug_reg_change_callback): Remove argument entry and add argument
223 lwp. Remove local variable thread. Don't print thread id in the
224 debugging output. Don't check whether pid of thread equals to pid.
225 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
226 iterate_over_lwps instead find_inferior.
227
228 2015-08-24 Pedro Alves <palves@redhat.com>
229
230 * inferiors.c (get_first_process): New function.
231 * inferiors.h (get_first_process): New declaration.
232 * remote-utils.c (read_ptid): Default to the first process in the
233 list, instead of to the current thread's process.
234
235 2015-08-24 Pedro Alves <palves@redhat.com>
236
237 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
238 * event-loop.c: Likewise.
239 * remote-utils.c: Likewise.
240 * tracepoint.c: Likewise.
241
242 2015-08-24 Pedro Alves <palves@redhat.com>
243
244 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
245 ptid_get_lwp.
246
247 2015-08-21 Pedro Alves <palves@redhat.com>
248
249 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
250 instead of literal 1.
251
252 2015-08-21 Pedro Alves <palves@redhat.com>
253
254 * tdesc.c (default_description): Explicitly zero-initialize.
255
256 2015-08-21 Pedro Alves <palves@redhat.com>
257
258 PR gdb/18749
259 * inferiors.c (remove_thread): Discard any pending stop reply for
260 this thread.
261 * server.c (remove_all_on_match_pid): Rename to ...
262 (remove_all_on_match_ptid): ... this. Work with a filter ptid
263 instead of a pid.
264 (discard_queued_stop_replies): Change parameter to a ptid. Now
265 extern.
266 (handle_v_kill, kill_inferior_callback, captured_main)
267 (process_serial_event): Adjust.
268 * server.h (discard_queued_stop_replies): Declare.
269
270 2015-08-21 Pedro Alves <palves@redhat.com>
271
272 * linux-low.c (wait_for_sigstop): Always switch to no thread
273 selected if the previously current thread dies.
274 * lynx-low.c (lynx_request_interrupt): Use the first thread's
275 process instead of the current thread's.
276 * remote-utils.c (input_interrupt): Don't check if there's no
277 current thread.
278 * server.c (gdb_read_memory, gdb_write_memory): If setting the
279 current thread to the general thread fails, error out.
280 (handle_qxfer_auxv, handle_qxfer_libraries)
281 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
282 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
283 (handle_query): Check if there's a thread selected instead of
284 checking whether there's any thread in the thread list.
285 (handle_qxfer_threads, handle_qxfer_btrace)
286 (handle_qxfer_btrace_conf): Don't error out early if there's no
287 thread in the thread list.
288 (handle_v_cont, myresume): Don't set the current thread to the
289 continue thread.
290 (process_serial_event) <Hg handling>: Also set thread_id if the
291 previous general thread is still alive.
292 (process_serial_event) <g/G handling>: If setting the current
293 thread to the general thread fails, error out.
294 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
295 thread's lwp instead of the current thread's.
296 * target.c (set_desired_thread): If the desired thread was not
297 found, leave the current thread pointing to NULL. Return an int
298 (boolean) indicating success.
299 * target.h (set_desired_thread): Change return type to int.
300
301 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
302
303 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
304 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
305 #includes.
306 (ps_get_thread_area): New function.
307
308 2015-08-19 Gary Benson <gbenson@redhat.com>
309
310 * hostio.c (handle_pread): Do not attempt to read more data
311 than hostio_reply_with_data can fit in a packet.
312
313 2015-08-18 Joel Brobecker <brobecker@adacore.com>
314
315 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
316
317 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
318
319 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
320
321 2015-08-06 Pedro Alves <palves@redhat.com>
322
323 * tracepoint.c (expr_eval_result): Now an int.
324
325 2015-08-06 Pedro Alves <palves@redhat.com>
326
327 * gdbthread.h (struct regcache): Forward declare.
328 (struct thread_info) <regcache_data>: Now a struct regcache
329 pointer.
330 * inferiors.c (inferior_regcache_data)
331 (set_inferior_regcache_data): Now work with struct regcache
332 pointers.
333 * inferiors.h (struct regcache): Forward declare.
334 (inferior_regcache_data, set_inferior_regcache_data): Now work
335 with struct regcache pointers.
336 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
337 (free_register_cache_thread): Remove struct regcache pointer
338 casts.
339
340 2015-08-06 Pedro Alves <palves@redhat.com>
341
342 * server.c (captured_main): On error, print the exception message
343 to stderr, and if run_once is set, throw a quit.
344
345 2015-08-06 Pedro Alves <palves@redhat.com>
346
347 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
348 the current thread.
349
350 2015-08-06 Pedro Alves <palves@redhat.com>
351
352 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
353 reading beyond the passed in buffer length.
354
355 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
356
357 * tracepoint.c (symbol_list) <required>: Remove.
358
359 2015-08-06 Pedro Alves <palves@redhat.com>
360
361 * linux-low.c (handle_extended_wait): Set the fork child's suspend
362 count if stopping and suspending threads.
363 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
364 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
365 (linux_detach): Complete an ongoing step-over.
366 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
367 throughout.
368 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
369 (linux_wait_1): If passing a signal to the inferior after
370 finishing a step-over, unsuspend and re-resume all lwps. If we
371 see a single-step event but the thread should be continuing, don't
372 pass the trap to gdb.
373 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
374 internal_error instead of gdb_assert.
375 (enqueue_pending_signal): New function.
376 (check_ptrace_stopped_lwp_gone): Add debug output.
377 (start_step_over): Use internal_error instead of gdb_assert.
378 (complete_ongoing_step_over): New function.
379 (linux_resume_one_thread): Don't resume a suspended thread.
380 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
381 it stepping.
382
383 2015-08-06 Pedro Alves <palves@redhat.com>
384
385 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
386 (linux_thread_alive): Use lwp_is_marked_dead.
387 (extended_event_reported): Delete.
388 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
389 instead of extended_event_reported.
390 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
391 as well.
392 (lwp_is_marked_dead): New function.
393 (lwp_running): Use lwp_is_marked_dead.
394 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
395 comment.
396
397 2015-08-06 Pedro Alves <palves@redhat.com>
398
399 * linux-low.c (linux_wait_1): Move fork event output out of the
400 !report_to_gdb check. Pass event_child->waitstatus to
401 target_waitstatus_to_string instead of ourstatus.
402
403 2015-08-04 Yao Qi <yao.qi@linaro.org>
404
405 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
406 if current_thread is 32 bit.
407
408 2015-08-04 Yao Qi <yao.qi@linaro.org>
409
410 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
411 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
412 * server.c (extended_protocol): Remove "static".
413 * server.h (extended_protocol): Declare it.
414
415 2015-08-04 Yao Qi <yao.qi@linaro.org>
416
417 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
418 both aarch64 and aarch32.
419 (aarch64_set_pc): Likewise.
420
421 2015-08-04 Yao Qi <yao.qi@linaro.org>
422
423 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
424 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
425 arm-with-neon.xml to srv_xmlfiles.
426 * linux-aarch64-low.c: Include linux-aarch32-low.h.
427 (is_64bit_tdesc): New function.
428 (aarch64_linux_read_description): New function.
429 (aarch64_arch_setup): Call aarch64_linux_read_description.
430 (regs_info): Rename to regs_info_aarch64.
431 (aarch64_regs_info): Return right regs_info.
432 (initialize_low_arch): Call initialize_low_arch_aarch32.
433
434 2015-08-04 Yao Qi <yao.qi@linaro.org>
435
436 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
437 * linux-aarch32-low.c: New file.
438 * linux-aarch32-low.h: New file.
439 * linux-arm-low.c (arm_fill_gregset): Move it to
440 linux-aarch32-low.c.
441 (arm_store_gregset): Likewise.
442 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
443 (arm_store_vfpregset): Call arm_store_vfpregset_num.
444 (arm_arch_setup): Check if PTRACE_GETREGSET works.
445 (regs_info): Rename to regs_info_arm.
446 (arm_regs_info): Return regs_info_aarch32 if
447 have_ptrace_getregset is 1 and target description is
448 arm_with_neon or arm_with_vfpv3.
449 (initialize_low_arch): Don't call init_registers_arm_with_neon.
450 Call initialize_low_arch_aarch32 instead.
451
452 2015-08-04 Yao Qi <yao.qi@linaro.org>
453
454 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
455 * linux-low.c: ... here.
456 * linux-low.h (have_ptrace_getregset): Declare it.
457
458 2015-08-04 Pedro Alves <palves@redhat.com>
459
460 * thread-db.c (struct thread_db): Use new typedefs.
461 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
462 CHK calls.
463 (disable_thread_event_reporting): Cast result of dlsym to
464 destination function pointer type.
465 (thread_db_mourn): Use td_ta_delete_ftype.
466
467 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
468
469 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
470 arch variant.
471 (CDX_BREAKPOINT): Define for R2.
472 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
473 (the_low_target): Add comments.
474
475 2015-07-30 Yao Qi <yao.qi@linaro.org>
476
477 * linux-arm-low.c (arm_hwcap): Remove it.
478 (arm_read_description): New local variable arm_hwcap. Don't
479 set arm_hwcap to zero.
480
481 2015-07-30 Yao Qi <yao.qi@linaro.org>
482
483 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
484 Use regcache->tdesc instead.
485 (arm_store_wmmxregset): Likewise.
486 (arm_fill_vfpregset): Likewise.
487 (arm_store_vfpregset): Likewise.
488
489 2015-07-30 Yao Qi <yao.qi@linaro.org>
490
491 * linux-arm-low.c: Include arch/arm.h.
492 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
493 (arm_store_gregset): Likewise.
494
495 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
496
497 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
498 ptrace's 4th parameter.
499
500 2015-07-27 Yao Qi <yao.qi@linaro.org>
501
502 * configure.srv (case aarch64*-*-linux*): Don't set
503 srv_linux_usrregs.
504
505 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
506
507 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
508 sys/ptrace.h.
509 * linux-arm-low.c: Likewise.
510 * linux-cris-low.c: Likewise.
511 * linux-crisv32-low.c: Likewise.
512 * linux-low.c: Likewise.
513 * linux-m68k-low.c: Likewise.
514 * linux-mips-low.c: Likewise.
515 * linux-nios2-low.c: Likewise.
516 * linux-s390-low.c: Likewise.
517 * linux-sparc-low.c: Likewise.
518 * linux-tic6x-low.c: Likewise.
519 * linux-tile-low.c: Likewise.
520 * linux-x86-low.c: Likewise.
521
522 2015-07-24 Pedro Alves <palves@redhat.com>
523
524 * config.in: Regenerate.
525 * configure: Regenerate.
526
527 2015-07-24 Pedro Alves <palves@redhat.com>
528
529 * acinclude.m4: Include ../ptrace.m4.
530 * configure.ac: Call GDB_AC_PTRACE.
531 * config.in, configure: Regenerate.
532
533 2015-07-24 Yao Qi <yao.qi@linaro.org>
534
535 * linux-low.c (linux_create_inferior): Remove setting to
536 proc->priv->new_inferior.
537 (linux_attach): Likewise.
538 (linux_low_filter_event): Likewise.
539 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
540
541 2015-07-24 Yao Qi <yao.qi@linaro.org>
542
543 * linux-low.c (linux_arch_setup): New function.
544 (linux_low_filter_event): If proc->tdesc is NULL and
545 proc->attached is true, call the_low_target.arch_setup.
546 Otherwise, keep status pending, and return.
547 (linux_resume_one_lwp_throw): Don't call get_pc if
548 thread->while_stepping isn't NULL. Don't call
549 get_thread_regcache if proc->tdesc is NULL.
550 (need_step_over_p): Return 0 if proc->tdesc is NULL.
551 (linux_target_ops): Install arch_setup.
552 * server.c (start_inferior): Call the_target->arch_setup.
553 * target.h (struct target_ops) <arch_setup>: New field.
554 (target_arch_setup): New marco.
555 * lynx-low.c (lynx_target_ops): Update.
556 * nto-low.c (nto_target_ops): Update.
557 * spu-low.c (spu_target_ops): Update.
558 * win32-low.c (win32_target_ops): Update.
559
560 2015-07-24 Yao Qi <yao.qi@linaro.org>
561
562 * linux-low.c (linux_add_process): Don't set
563 proc->priv->new_inferior.
564 (linux_create_inferior): Set proc->priv->new_inferior to 1.
565 (linux_attach): Likewise.
566
567 2015-07-24 Yao Qi <yao.qi@linaro.org>
568
569 * server.c (start_inferior): Code refactor.
570
571 2015-07-24 Yao Qi <yao.qi@linaro.org>
572
573 * server.c (process_serial_event): Set general_thread.
574
575 2015-07-21 Yao Qi <yao.qi@linaro.org>
576
577 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
578 aarch64_linux_get_debug_reg_capacity.
579
580 2015-07-17 Yao Qi <yao.qi@linaro.org>
581
582 * Makefile.in (aarch64-linux-hw-point.o): New rule.
583 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
584 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
585 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
586 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
587 (AARCH64_HWP_ALIGNMENT): Likewise.
588 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
589 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
590 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
591 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
592 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
593 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
594 (struct aarch64_debug_reg_state): Likewise.
595 (struct arch_lwp_info): Likewise.
596 (aarch64_align_watchpoint): Likewise.
597 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
598 (aarch64_watchpoint_length): Likewise.
599 (aarch64_point_encode_ctrl_reg): Likewise
600 (aarch64_point_is_aligned): Likewise.
601 (aarch64_align_watchpoint): Likewise.
602 (aarch64_linux_set_debug_regs):
603 (aarch64_dr_state_insert_one_point): Likewise.
604 (aarch64_dr_state_remove_one_point): Likewise.
605 (aarch64_handle_breakpoint): Likewise.
606 (aarch64_handle_aligned_watchpoint): Likewise.
607 (aarch64_handle_unaligned_watchpoint): Likewise.
608 (aarch64_handle_watchpoint): Likewise.
609
610 2015-07-17 Yao Qi <yao.qi@linaro.org>
611
612 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
613 and don't aarch64_get_debug_reg_state. All callers update.
614 (aarch64_handle_aligned_watchpoint): Likewise.
615 (aarch64_handle_unaligned_watchpoint): Likewise.
616 (aarch64_handle_watchpoint): Likewise.
617 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
618 (aarch64_remove_point): Likewise.
619
620 2015-07-17 Yao Qi <yao.qi@linaro.org>
621
622 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
623 debug_printf.
624 (aarch64_handle_unaligned_watchpoint): Likewise.
625
626 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
627
628 Revert the previous 3 commits:
629 Move gdb_regex* to common/
630 Move linux_find_memory_regions_full & co.
631 gdbserver build-id attribute generator
632
633 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
634 Jan Kratochvil <jan.kratochvil@redhat.com>
635
636 gdbserver build-id attribute generator.
637 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
638 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
639 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
640 (find_phdr): New.
641 (get_dynamic): Use find_pdhr to traverse program headers.
642 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
643 (compare_mapping_entry_range, struct find_memory_region_callback_data)
644 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
645 (get_hex_build_id): New.
646 (linux_qxfer_libraries_svr4): Add optional build-id attribute
647 to reply XML document.
648
649 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
650 Jan Kratochvil <jan.kratochvil@redhat.com>
651
652 * target.c: Include target/target-utils.h and fcntl.h.
653 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
654 (target_fileio_read_stralloc): New functions.
655
656 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
657
658 * Makefile.in (OBS): Add gdb_regex.o.
659 (gdb_regex.o): New.
660 * config.in: Rebuilt.
661 * configure: Rebuilt.
662
663 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
664 Jan Kratochvil <jan.kratochvil@redhat.com>
665
666 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
667 * Makefile.in (OBS): Add target-utils.o.
668 (linux-maps.o, target-utils.o): New.
669 * configure.srv (srv_linux_obj): Add linux-maps.o.
670
671 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
672
673 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
674 function, return 1.
675 (the_low_target): Install it.
676
677 2015-07-14 Pedro Alves <palves@redhat.com>
678
679 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
680 Instead, ignore ECHILD, and throw an error for other errnos.
681
682 2015-07-10 Pedro Alves <palves@redhat.com>
683
684 * event-loop.c (struct callback_event) <data>: Change type to
685 gdb_client_data instance instead of gdb_client_data pointer.
686 (append_callback_event): Adjust.
687
688 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
689
690 * linux-aarch64-low.c: Add comments for each linux_target_ops
691 method. Remove comments already covered in target_ops and
692 linux_target_ops definitions.
693 (the_low_target): Add comments for each unimplemented method.
694
695 2015-07-09 Yao Qi <yao.qi@linaro.org>
696
697 * linux-aarch64-low.c (aarch64_regmap): Remove.
698 (aarch64_usrregs_info): Remove.
699 (regs_info): Set field usrregs to NULL.
700
701 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
702
703 * linux-low.c: Include "rsp-low.h"
704 (linux_low_encode_pt_config, linux_low_encode_raw): New.
705 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
706 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
707 (handle_btrace_enable_pt): New.
708 (handle_btrace_general_set): Support "pt".
709 (handle_btrace_conf_general_set): Support "pt:size".
710
711 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
712
713 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
714 Z_PACKET_SW_BP.
715
716 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
717
718 * linux-aarch64-low.c: Remove comment about endianness.
719 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
720 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
721 memcmp.
722
723 2015-06-24 Gary Benson <gbenson@redhat.com>
724
725 * linux-i386-ipa.c (stdint.h): Do not include.
726 * lynx-i386-low.c (stdint.h): Likewise.
727 * lynx-ppc-low.c (stdint.h): Likewise.
728 * mem-break.c (stdint.h): Likewise.
729 * thread-db.c (stdint.h): Likewise.
730 * tracepoint.c (stdint.h): Likewise.
731 * win32-low.c (stdint.h): Likewise.
732
733 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
734
735 * server.c (write_qxfer_response): Update call to
736 remote_escape_output.
737
738 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
739 Jan Kratochvil <jan.kratochvil@redhat.com>
740
741 Merge multiple hex conversions.
742 * gdbreplay.c (tohex): Rename to 'fromhex'.
743 (logchar): Use fromhex.
744
745 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
746
747 * server.c (handle_qxfer_libraries): Set `version' attribute for
748 <library-list>.
749
750 2015-06-10 Gary Benson <gbenson@redhat.com>
751
752 * target.h (struct target_ops) <multifs_open>: New field.
753 <multifs_unlink>: Likewise.
754 <multifs_readlink>: Likewise.
755 * linux-low.c (nat/linux-namespaces.h): New include.
756 (linux_target_ops): Initialize the_target->multifs_open,
757 the_target->multifs_unlink and the_target->multifs_readlink.
758 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
759 * hostio.c (hostio_fs_pid): New static variable.
760 (hostio_handle_new_gdb_connection): New function.
761 (handle_setfs): Likewise.
762 (handle_open): Use the_target->multifs_open as appropriate.
763 (handle_unlink): Use the_target->multifs_unlink as appropriate.
764 (handle_readlink): Use the_target->multifs_readlink as
765 appropriate.
766 (handle_vFile): Handle vFile:setfs packets.
767 * server.c (handle_query): Call hostio_handle_new_gdb_connection
768 after target_handle_new_gdb_connection.
769
770 2015-06-10 Gary Benson <gbenson@redhat.com>
771
772 * configure.ac (AC_CHECK_FUNCS): Add setns.
773 * config.in: Regenerate.
774 * configure: Likewise.
775 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
776 (linux-namespaces.o): New rule.
777 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
778
779 2015-06-09 Gary Benson <gbenson@redhat.com>
780
781 * hostio.c (handle_open): Process mode argument with
782 fileio_to_host_mode.
783
784 2015-06-01 Yao Qi <yao.qi@linaro.org>
785
786 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
787 * linux-x86-low.c: Likewise.
788
789 2015-05-28 Don Breazeal <donb@codesourcery.com>
790
791 * linux-low.c (handle_extended_wait): Initialize
792 thread_info.last_resume_kind for new fork children.
793
794 2015-05-15 Pedro Alves <palves@redhat.com>
795
796 * target.h (target_handle_new_gdb_connection): Rewrite using if
797 wrapped in do/while.
798
799 2015-05-14 Joel Brobecker <brobecker@adacore.com>
800
801 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
802 * configure, config.in: Regenerate.
803 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
804 Declare typedef.
805
806 2015-05-12 Don Breazeal <donb@codesourcery.com>
807
808 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
809 PTRACE_EVENT_VFORK_DONE.
810 (linux_low_ptrace_options, extended_event_reported): Add vfork
811 events.
812 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
813 and "vforkdone" for RSP 'T' Stop Reply Packet.
814 * server.h (report_vfork_events): Declare
815 global variable.
816
817 2015-05-12 Don Breazeal <donb@codesourcery.com>
818
819 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
820 (the_low_target) <new_fork>: Initialize new member.
821 * linux-arm-low.c (arm_new_fork): New function.
822 (the_low_target) <new_fork>: Initialize new member.
823 * linux-low.c (handle_extended_wait): Call new target function
824 new_fork.
825 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
826 * linux-mips-low.c (mips_add_watchpoint): New function
827 extracted from mips_insert_point.
828 (the_low_target) <new_fork>: Initialize new member.
829 (mips_linux_new_fork): New function.
830 (mips_insert_point): Call mips_add_watchpoint.
831 * linux-x86-low.c (x86_linux_new_fork): New function.
832 (the_low_target) <new_fork>: Initialize new member.
833
834 2015-05-12 Don Breazeal <donb@codesourcery.com>
835
836 * linux-low.c (handle_extended_wait): Implement return value,
837 rename argument 'event_child' to 'event_lwp', handle
838 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
839 (linux_low_ptrace_options): New function.
840 (linux_low_filter_event): Call linux_low_ptrace_options,
841 use different argument fo linux_enable_event_reporting,
842 use return value from handle_extended_wait.
843 (extended_event_reported): New function.
844 (linux_wait_1): Call extended_event_reported and set
845 status to report fork events.
846 (linux_write_memory): Add pid to debug message.
847 (reset_lwp_ptrace_options_callback): New function.
848 (linux_handle_new_gdb_connection): New function.
849 (linux_target_ops): Initialize new structure member.
850 * linux-low.h (struct lwp_info) <waitstatus>: New member.
851 * lynx-low.c: Initialize new structure member.
852 * remote-utils.c (prepare_resume_reply): Implement stop reason
853 "fork" for "T" stop message.
854 * server.c (handle_query): Call handle_new_gdb_connection.
855 * server.h (report_fork_events): Declare global flag.
856 * target.h (struct target_ops) <handle_new_gdb_connection>:
857 New member.
858 (target_handle_new_gdb_connection): New macro.
859 * win32-low.c: Initialize new structure member.
860
861 2015-05-12 Don Breazeal <donb@codesourcery.com>
862
863 * mem-break.c (APPEND_TO_LIST): Define macro.
864 (clone_agent_expr): New function.
865 (clone_one_breakpoint): New function.
866 (clone_all_breakpoints): New function.
867 * mem-break.h: Declare new functions.
868
869 2015-05-12 Don Breazeal <donb@codesourcery.com>
870
871 * linux-low.c (linux_supports_fork_events): New function.
872 (linux_supports_vfork_events): New function.
873 (linux_target_ops): Initialize new structure members.
874 (initialize_low): Call linux_check_ptrace_features.
875 * lynx-low.c (lynx_target_ops): Initialize new structure
876 members.
877 * server.c (report_fork_events, report_vfork_events):
878 New global flags.
879 (handle_query): Add new features to qSupported packet and
880 response.
881 (captured_main): Initialize new global variables.
882 * target.h (struct target_ops) <supports_fork_events>:
883 New member.
884 <supports_vfork_events>: New member.
885 (target_supports_fork_events): New macro.
886 (target_supports_vfork_events): New macro.
887 * win32-low.c (win32_target_ops): Initialize new structure
888 members.
889
890 2015-05-12 Gary Benson <gbenson@redhat.com>
891
892 * server.c (handle_qxfer_exec_file): Use current process
893 if annex is empty.
894
895 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
896
897 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
898 Remove HAVE_PTRACE_GETREGS conditionals.
899 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
900 instead of PTRACE_GETREGS and PTRACE_SETREGS.
901
902 2015-05-08 Yao Qi <yao.qi@linaro.org>
903
904 * linux-low.c (linux_supports_conditional_breakpoints): New
905 function.
906 (linux_target_ops): Install new target method.
907 * lynx-low.c (lynx_target_ops): Install NULL hook for
908 supports_conditional_breakpoints.
909 * nto-low.c (nto_target_ops): Likewise.
910 * spu-low.c (spu_target_ops): Likewise.
911 * win32-low.c (win32_target_ops): Likewise.
912 * server.c (handle_query): Check
913 target_supports_conditional_breakpoints.
914 * target.h (struct target_ops) <supports_conditional_breakpoints>:
915 New field.
916 (target_supports_conditional_breakpoints): New macro.
917
918 2015-05-06 Pedro Alves <palves@redhat.com>
919
920 PR server/18081
921 * server.c (start_inferior): If the process exits, mourn it.
922
923 2015-04-21 Gary Benson <gbenson@redhat.com>
924
925 * hostio.c (fileio_open_flags_to_host): Factored out to
926 fileio_to_host_openflags in common/fileio.c. Single use
927 updated.
928
929 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
930
931 * linux-xtensa-low.c (xtensa_fill_gregset)
932 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
933 XCHAL_HAVE_LOOP.
934
935 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
936
937 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
938 (regs_info): Replace usrregs pointer with NULL.
939
940 2015-04-17 Gary Benson <gbenson@redhat.com>
941
942 * target.h (struct target_ops) <pid_to_exec_file>: New field.
943 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
944 * server.c (handle_qxfer_exec_file): New function.
945 (qxfer_packets): Add exec-file entry.
946 (handle_query): Report qXfer:exec-file:read as supported packet.
947
948 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
949
950 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
951
952 2015-04-09 Gary Benson <gbenson@redhat.com>
953
954 * hostio-errno.c (errno_to_fileio_error): Remove function.
955 Update caller to use remote_fileio_to_fio_error.
956
957 2015-04-09 Yao Qi <yao.qi@linaro.org>
958
959 * linux-low.c (linux_insert_point): Call
960 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
961 (linux_remove_point): Call remove_memory_breakpoint if type is
962 raw_bkpt_type_sw.
963 * linux-x86-low.c (x86_insert_point): Don't call
964 insert_memory_breakpoint.
965 (x86_remove_point): Don't call remove_memory_breakpoint.
966
967 2015-04-01 Pedro Alves <palves@redhat.com>
968 Cleber Rosa <crosa@redhat.com>
969
970 * server.c (gdbserver_usage): Reorganize and extend the usage
971 message.
972
973 2015-03-24 Pedro Alves <palves@redhat.com>
974
975 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
976 output. Also dump TRAP_TRACE.
977 (linux_low_filter_event): In debug output, distinguish a
978 resume_stop SIGSTOP from a delayed SIGSTOP.
979
980 2015-03-24 Gary Benson <gbenson@redhat.com>
981
982 * linux-x86-low.c (x86_linux_new_thread): Moved to
983 nat/x86-linux.c.
984 (x86_linux_prepare_to_resume): Likewise.
985
986 2015-03-24 Gary Benson <gbenson@redhat.com>
987
988 * Makefile.in (x86-linux-dregs.o): New rule.
989 * configure.srv: Add x86-linux-dregs.o to relevant targets.
990 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
991 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
992 (x86_linux_dr_get): Likewise.
993 (x86_linux_dr_set): Likewise.
994 (update_debug_registers_callback): Likewise.
995 (x86_linux_dr_set_addr): Likewise.
996 (x86_linux_dr_get_addr): Likewise.
997 (x86_linux_dr_set_control): Likewise.
998 (x86_linux_dr_get_control): Likewise.
999 (x86_linux_dr_get_status): Likewise.
1000 (x86_linux_update_debug_registers): Likewise.
1001
1002 2015-03-24 Gary Benson <gbenson@redhat.com>
1003
1004 * linux-x86-low.c (x86_linux_update_debug_registers):
1005 New function, factored out from...
1006 (x86_linux_prepare_to_resume): ...this.
1007
1008 2015-03-24 Gary Benson <gbenson@redhat.com>
1009
1010 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1011 (x86_linux_dr_set): Likewise.
1012 (update_debug_registers_callback): Likewise.
1013 (x86_linux_dr_set_addr): Likewise.
1014 (x86_linux_dr_get_addr): Likewise.
1015 (x86_linux_dr_set_control): Likewise.
1016 (x86_linux_dr_get_control): Likewise.
1017 (x86_linux_dr_get_status): Likewise.
1018 (x86_linux_prepare_to_resume): Likewise.
1019
1020 2015-03-24 Gary Benson <gbenson@redhat.com>
1021
1022 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1023 Use perror_with_name. Pass string through gettext.
1024 (x86_linux_dr_set): Likewise.
1025
1026 2015-03-24 Gary Benson <gbenson@redhat.com>
1027
1028 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1029 (x86_linux_dr_set_addr): ...this.
1030 (x86_dr_low_get_addr): Rename to...
1031 (x86_linux_dr_get_addr): ...this.
1032 (x86_dr_low_set_control): Rename to...
1033 (x86_linux_dr_set_control): ...this.
1034 (x86_dr_low_get_control): Rename to...
1035 (x86_linux_dr_get_control): ...this.
1036 (x86_dr_low_get_status): Rename to...
1037 (x86_linux_dr_get_status): ...this.
1038 (x86_dr_low): Update with new function names.
1039
1040 2015-03-24 Gary Benson <gbenson@redhat.com>
1041
1042 * Makefile.in (x86-linux.o): New rule.
1043 * configure.srv: Add x86-linux.o to relevant targets.
1044 * linux-low.c (lwp_set_arch_private_info): New function.
1045 (lwp_arch_private_info): Likewise.
1046 * linux-x86-low.c: Include nat/x86-linux.h.
1047 (arch_lwp_info): Removed structure.
1048 (update_debug_registers_callback):
1049 Use lwp_set_debug_registers_changed.
1050 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1051 and lwp_set_debug_registers_changed.
1052 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1053
1054 2015-03-24 Gary Benson <gbenson@redhat.com>
1055
1056 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1057 * linux-arm-low.c (arm_new_thread): Likewise.
1058 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1059 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1060 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1061 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1062
1063 2015-03-24 Gary Benson <gbenson@redhat.com>
1064
1065 * linux-low.c (ptid_of_lwp): New function.
1066 (lwp_is_stopped): Likewise.
1067 (lwp_stop_reason): Likewise.
1068 * linux-x86-low.c (update_debug_registers_callback):
1069 Use lwp_is_stopped.
1070 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1071 lwp_stop_reason.
1072
1073 2015-03-24 Gary Benson <gbenson@redhat.com>
1074
1075 * linux-low.h (linux_stop_lwp): Remove declaration.
1076
1077 2015-03-24 Gary Benson <gbenson@redhat.com>
1078
1079 * linux-low.h: Include nat/linux-nat.h.
1080 * linux-low.c (iterate_over_lwps_args): New structure.
1081 (iterate_over_lwps_filter): New function.
1082 (iterate_over_lwps): Likewise.
1083 * linux-x86-low.c (update_debug_registers_callback):
1084 Update signature to what iterate_over_lwps expects.
1085 Remove PID check that iterate_over_lwps now performs.
1086 (x86_dr_low_set_addr): Use iterate_over_lwps.
1087 (x86_dr_low_set_control): Likewise.
1088
1089 2015-03-24 Gary Benson <gbenson@redhat.com>
1090
1091 * linux-x86-low.c (x86_debug_reg_state): New function.
1092 (x86_linux_prepare_to_resume): Use the above.
1093
1094 2015-03-24 Gary Benson <gbenson@redhat.com>
1095
1096 * linux-low.c (current_lwp_ptid): New function.
1097 * linux-x86-low.c: Include nat/linux-nat.h.
1098 (x86_dr_low_get_addr): Use current_lwp_ptid.
1099 (x86_dr_low_get_control): Likewise.
1100 (x86_dr_low_get_status): Likewise.
1101
1102 2015-03-20 Pedro Alves <palves@redhat.com>
1103
1104 * tracepoint.c (cmd_qtstatus): Make "str" const.
1105
1106 2015-03-20 Pedro Alves <palves@redhat.com>
1107
1108 * server.c (handle_general_set): Make "req_str" const.
1109
1110 2015-03-19 Pedro Alves <palves@redhat.com>
1111
1112 * linux-low.c (linux_resume_one_lwp): Rename to ...
1113 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1114 instead call perror_with_name.
1115 (check_ptrace_stopped_lwp_gone): New function.
1116 (linux_resume_one_lwp): Reimplement as wrapper around
1117 linux_resume_one_lwp_throw that swallows errors if the LWP is
1118 gone.
1119
1120 2015-03-19 Pedro Alves <palves@redhat.com>
1121
1122 * linux-low.c (count_events_callback, select_event_lwp_callback):
1123 No longer check whether the thread has resume_stop as last resume
1124 kind.
1125
1126 2015-03-19 Pedro Alves <palves@redhat.com>
1127
1128 * linux-low.c (count_events_callback, select_event_lwp_callback):
1129 Use the lwp's status_pending_p field, not the thread's.
1130
1131 2015-03-19 Pedro Alves <palves@redhat.com>
1132
1133 * linux-low.c (select_event_lwp_callback): Update comments to
1134 no longer mention SIGTRAP.
1135
1136 2015-03-18 Gary Benson <gbenson@redhat.com>
1137
1138 * server.c (handle_query): Do not report vFile:fstat as supported.
1139
1140 2015-03-11 Gary Benson <gbenson@redhat.com>
1141
1142 * hostio.c (sys/types.h): New include.
1143 (sys/stat.h): Likewise.
1144 (common-remote-fileio.h): Likewise.
1145 (handle_fstat): New function.
1146 (handle_vFile): Handle vFile:fstat packets.
1147
1148 2015-03-11 Gary Benson <gbenson@redhat.com>
1149
1150 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1151 struct stat.st_blocks and struct stat.st_blksize.
1152 * configure: Regenerate.
1153 * config.in: Likewise.
1154 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1155 (OBS): Add common-remote-fileio.o.
1156 (common-remote-fileio.o): New rule.
1157
1158 2015-03-09 Pedro Alves <palves@redhat.com>
1159
1160 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1161 'struct sockaddr' pointer in 'accept' call.
1162
1163 2015-03-09 Pedro Alves <palves@redhat.com>
1164
1165 Revert:
1166 2015-03-07 Pedro Alves <palves@redhat.com>
1167 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1168 or <winsock2.h> here. Instead include "gdb_socket.h".
1169 (remote_open): Use union gdb_sockaddr_u.
1170 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1171 or <winsock2.h> here. Instead include "gdb_socket.h".
1172 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1173 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1174 or <sys/un.h>.
1175 (init_named_socket, gdb_agent_helper_thread): Use union
1176 gdb_sockaddr_u.
1177
1178 2015-03-07 Pedro Alves <palves@redhat.com>
1179
1180 * configure.ac (build_warnings): Move
1181 -Wdeclaration-after-statement to the C-specific set.
1182 * configure: Regenerate.
1183
1184 2015-03-07 Pedro Alves <palves@redhat.com>
1185
1186 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1187 or <winsock2.h> here. Instead include "gdb_socket.h".
1188 (remote_open): Use union gdb_sockaddr_u.
1189 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1190 or <winsock2.h> here. Instead include "gdb_socket.h".
1191 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1192 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1193 or <sys/un.h>.
1194 (init_named_socket, gdb_agent_helper_thread): Use union
1195 gdb_sockaddr_u.
1196
1197 2015-03-07 Pedro Alves <palves@redhat.com>
1198
1199 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1200 instead.
1201
1202 2015-03-06 Yao Qi <yao.qi@linaro.org>
1203
1204 * linux-aarch64-low.c (aarch64_insert_point): Use
1205 show_debug_regs as a boolean.
1206 (aarch64_remove_point): Likewise.
1207
1208 2015-03-05 Pedro Alves <palves@redhat.com>
1209
1210 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1211 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1212 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1213 * nto-low.c (nto_target_ops): Likewise.
1214 * spu-low.c (spu_target_ops): Likewise.
1215 * win32-low.c (win32_target_ops): Likewise.
1216
1217 2015-03-04 Pedro Alves <palves@redhat.com>
1218
1219 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1220 Decide whether a breakpoint triggered based on the SIGTRAP's
1221 siginfo.si_code.
1222 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1223 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1224 (linux_low_filter_event): Check for breakpoints before checking
1225 watchpoints.
1226 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1227 siginfo.si_code.
1228 (linux_stopped_by_sw_breakpoint)
1229 (linux_supports_stopped_by_sw_breakpoint)
1230 (linux_stopped_by_hw_breakpoint)
1231 (linux_supports_stopped_by_hw_breakpoint): New functions.
1232 (linux_target_ops): Install new target methods.
1233
1234 2015-03-04 Pedro Alves <palves@redhat.com>
1235
1236 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1237 * server.c (swbreak_feature, hwbreak_feature): New globals.
1238 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1239 (captured_main): Clear swbreak_feature and hwbreak_feature.
1240 * server.h (swbreak_feature, hwbreak_feature): Declare.
1241 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1242 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1243 supports_stopped_by_hw_breakpoint>: New fields.
1244 (target_supports_stopped_by_sw_breakpoint)
1245 (target_stopped_by_sw_breakpoint)
1246 (target_supports_stopped_by_hw_breakpoint)
1247 (target_stopped_by_hw_breakpoint): Declare.
1248
1249 2015-03-04 Pedro Alves <palves@redhat.com>
1250
1251 enum lwp_stop_reason -> enum target_stop_reason
1252 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1253 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1254 (linux_wait_1, stuck_in_jump_pad_callback)
1255 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1256 (linux_stopped_by_watchpoint):
1257 * linux-low.h (enum lwp_stop_reason): Delete.
1258 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1259 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1260
1261 2015-03-04 Yao Qi <yao.qi@linaro.org>
1262
1263 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1264
1265 2015-03-03 Gary Benson <gbenson@redhat.com>
1266
1267 * hostio.c (handle_vFile): Fix prefix lengths.
1268
1269 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1270
1271 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1272 ptr_bits.
1273
1274 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1275
1276 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1277 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1278 (clean): Add "rm -f" for above C files.
1279 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1280 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1281 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1282 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1283 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1284 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1285 (init_registers_s390x_vx_linux64)
1286 (init_registers_s390x_tevx_linux64)
1287 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1288 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1289 declarations.
1290 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1291 (s390_store_vxrs_high): New functions.
1292 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1293 NT_S390_VXRS_HIGH.
1294 (s390_arch_setup): Add logic for selecting one of the new target
1295 descriptions. Activate the new vector regsets if applicable.
1296 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1297 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1298 and init_registers_s390x_tevx_linux64.
1299
1300 2015-03-01 Pedro Alves <palves@redhat.com>
1301
1302 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1303 parameter.
1304
1305 2015-02-27 Pedro Alves <palves@redhat.com>
1306
1307 * linux-x86-low.c (u_debugreg_offset): New function.
1308 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1309
1310 2015-02-27 Pedro Alves <palves@redhat.com>
1311
1312 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1313 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1314 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1315 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1316 (ps_lsetfpregs, ps_getpid)
1317 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1318 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1319 (ps_lsetxregs, ps_plog): Declare.
1320
1321 2015-02-27 Pedro Alves <palves@redhat.com>
1322
1323 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1324 IP_AGENT_EXPORT_FUNC.
1325 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1326 IP_AGENT_EXPORT_FUNC.
1327 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1328 (IP_AGENT_EXPORT): Delete.
1329 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1330 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1331 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1332 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1333 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1334 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1335 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1336 (traceframe_read_count, traceframe_write_count)
1337 (traceframes_created, trace_state_variables, get_raw_reg)
1338 (get_trace_state_variable_value, set_trace_state_variable_value)
1339 (ust_loaded, helper_thread_id, cmd_buf): Use
1340 IPA_SYM_EXPORTED_NAME.
1341 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1342 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1343 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1344 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1345 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1346 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1347 EXTERN_C_PUSH/EXTERN_C_POP.
1348 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1349 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1350 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1351 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1352 (traceframe_write_count, traceframe_read_count)
1353 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1354 (about_to_request_buffer_space, get_trace_state_variable_value)
1355 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1356 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1357 EXTERN_C_PUSH/EXTERN_C_POP.
1358 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1359 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1360 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1361 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1362 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1363 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1364 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1365 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1366 Define.
1367 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1368 (IP_AGENT_EXPORT_VAR_DECL): Define.
1369 (tracing): Declare.
1370 (gdb_agent_get_raw_reg): Declare.
1371
1372 2015-02-27 Tom Tromey <tromey@redhat.com>
1373 Pedro Alves <palves@redhat.com>
1374
1375 Rename symbols whose names are reserved C++ keywords throughout.
1376
1377 2015-02-27 Pedro Alves <palves@redhat.com>
1378
1379 * Makefile.in (COMPILER): New, get it from autoconf.
1380 (CXX): Get from autoconf instead.
1381 (COMPILE.pre): Use COMPILER.
1382 (CC-LD): Rename to ...
1383 (CC_LD): ... this. Use COMPILER.
1384 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1385 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1386 * acinclude.m4: Include build-with-cxx.m4.
1387 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1388 Disable -Werror by default if building in C++ mode.
1389 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1390 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1391 the C++ compiler. Save/restore CXXFLAGS too.
1392 * configure: Regenerate.
1393
1394 2015-02-27 Pedro Alves <palves@redhat.com>
1395
1396 * acinclude.m4: Include libiberty.m4.
1397 * configure.ac: Call libiberty_INIT.
1398 * config.in, configure: Regenerate.
1399
1400 2015-02-26 Pedro Alves <palves@redhat.com>
1401
1402 * linux-low.c (linux_wait_1): When incrementing the PC past a
1403 program breakpoint always use the_low_target.breakpoint_len as
1404 increment, rather than the maximum between that and
1405 the_low_target.decr_pc_after_break.
1406
1407 2015-02-23 Pedro Alves <palves@redhat.com>
1408
1409 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1410 thread was doing a step-over; always adjust the PC if
1411 we stepped over a permanent breakpoint.
1412 (linux_wait_1): If we stepped over breakpoint that was on top of a
1413 permanent breakpoint, manually advance the PC past it.
1414
1415 2015-02-23 Pedro Alves <palves@redhat.com>
1416
1417 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1418 modes.
1419 (x86_fill_gregset, x86_store_gregset): Use it when handling
1420 $orig_eax.
1421
1422 2015-02-20 Pedro Alves <palves@redhat.com>
1423
1424 * thread-db.c: Include "nat/linux-procfs.h".
1425 (thread_db_init): Skip listing new threads if the kernel supports
1426 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1427
1428 2015-02-20 Pedro Alves <palves@redhat.com>
1429
1430 * linux-low.c (status_pending_p_callback): Use ptid_match.
1431
1432 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1433
1434 PR breakpoints/16812
1435 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1436 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1437 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1438
1439 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1440
1441 PR breakpoints/15956
1442 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1443
1444 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1445
1446 * linux-low.c (linux_low_btrace_conf): Print size.
1447 * server.c (handle_btrace_conf_general_set): New.
1448 (hanle_general_set): Call handle_btrace_conf_general_set.
1449 (handle_query): Report Qbtrace-conf:bts:size as supported.
1450
1451 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1452
1453 * linux-low.c (linux_low_enable_btrace): Update parameters.
1454 (linux_low_btrace_conf): New.
1455 (linux_target_ops)<to_btrace_conf>: Initialize.
1456 * server.c (current_btrace_conf): New.
1457 (handle_btrace_enable): Rename to ...
1458 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1459 to target_enable_btrace. Update comment. Update users.
1460 (handle_qxfer_btrace_conf): New.
1461 (qxfer_packets): Add btrace-conf entry.
1462 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1463 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1464 (target_ops)<read_btrace_conf>: New.
1465 (target_enable_btrace): Update parameters.
1466 (target_read_btrace_conf): New.
1467
1468 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1469
1470 * server.c (handle_btrace_general_set): Remove call to
1471 target_supports_btrace.
1472 (supported_btrace_packets): New.
1473 (handle_query): Call supported_btrace_packets.
1474 * target.h: include btrace-common.h.
1475 (btrace_target_info): Removed.
1476 (supports_btrace, target_supports_btrace): Update parameters.
1477
1478 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1479
1480 * Makefile.in (SFILES): Add common/btrace-common.c.
1481 (OBS): Add common/btrace-common.o.
1482 (btrace-common.o): Add build rules.
1483 * linux-low: Include btrace-common.h.
1484 (linux_low_read_btrace): Use struct btrace_data. Call
1485 btrace_data_init and btrace_data_fini.
1486
1487 2015-02-06 Pedro Alves <palves@redhat.com>
1488
1489 * thread-db.c (find_new_threads_callback): Add debug output.
1490
1491 2015-02-04 Pedro Alves <palves@redhat.com>
1492
1493 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1494 (resume_stopped_resumed_lwps): New function.
1495 (linux_wait_for_event_filtered): Use it.
1496
1497 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1498
1499 * Makefile.in (SFILES): Add linux-personality.c.
1500 (linux-personality.o): New rule.
1501 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1502 list of objects to be built.
1503 * linux-low.c: Include nat/linux-personality.h.
1504 (linux_create_inferior): Remove code to disable address space
1505 randomization (moved to ../nat/linux-personality.c). Create
1506 cleanup to disable address space randomization.
1507
1508 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1509
1510 * Makefile.in (posix-strerror.o): New rule.
1511 (mingw-strerror.o): Likewise.
1512 * configure: Regenerated.
1513 * configure.ac: Source file ../common/common.host. Initialize new
1514 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1515
1516 2015-01-14 Yao Qi <yao@codesourcery.com>
1517
1518 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1519 (ppc-linux.o): New rule.
1520 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1521 * configure.ac: AC_CHECK_FUNCS(getauxval).
1522 * config.in: Re-generated.
1523 * configure: Re-generated.
1524 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1525 ppc64_64bit_inferior_p
1526
1527 2015-01-14 Yao Qi <yao@codesourcery.com>
1528
1529 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1530 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1531 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1532 (PT_ORIG_R3, PT_TRAP): Likewise.
1533 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1534 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1535 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1536
1537 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1538
1539 * i387-fp.c (i387_cache_to_xsave): In look over
1540 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1541 zmmh_low_space field by use of zmmh_high_space.
1542
1543 2015-01-09 Pedro Alves <palves@redhat.com>
1544
1545 * linux-low.c (step_over_bkpt): Move higher up in the file.
1546 (handle_extended_wait): Don't store the stop_pc here.
1547 (get_stop_pc): Adjust comments and rename to ...
1548 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1549 stopped for a software breakpoint or hardware breakpoint.
1550 (thread_still_has_status_pending_p): New function.
1551 (status_pending_p_callback): Use
1552 thread_still_has_status_pending_p. If the event is no longer
1553 interesting, resume the LWP.
1554 (handle_tracepoints): Add assert.
1555 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1556 (wstatus_maybe_breakpoint): New function.
1557 (cancel_breakpoint): Delete function.
1558 (check_stopped_by_watchpoint): New function, factored out from
1559 linux_low_filter_event.
1560 (lp_status_maybe_breakpoint): Delete function.
1561 (linux_low_filter_event): Remove filter_ptid argument.
1562 Leave thread group exits pending here. Store the LWP's stop PC.
1563 Always leave events pending.
1564 (linux_wait_for_event_filtered): Pull all events out of the
1565 kernel, and leave them all pending.
1566 (count_events_callback, select_event_lwp_callback): Consider all
1567 events.
1568 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1569 (select_event_lwp): Only give preference to the stepping LWP in
1570 all-stop mode. Adjust comments.
1571 (ignore_event): New function.
1572 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1573 references to cancel_breakpoints. Adjust to renames. Also give
1574 equal priority to all LWPs that have had events in non-stop mode.
1575 If reporting a software breakpoint event, unadjust the LWP's PC.
1576 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1577 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1578 Adjust.
1579 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1580 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1581 (linux_stopped_by_watchpoint): Adjust.
1582 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1583 * linux-low.h (enum lwp_stop_reason): New.
1584 (struct lwp_info) <stop_pc>: Adjust comment.
1585 <stopped_by_watchpoint>: Delete field.
1586 <stop_reason>: New field.
1587 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1588 * mem-break.c (software_breakpoint_inserted_here)
1589 (hardware_breakpoint_inserted_here): New function.
1590 * mem-break.h (software_breakpoint_inserted_here)
1591 (hardware_breakpoint_inserted_here): Declare.
1592 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1593 (cancel_breakpoints): Delete.
1594 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1595 (upload_fast_traceframes): Remove references to
1596 cancel_breakpoints.
1597
1598 2015-01-09 Pedro Alves <palves@redhat.com>
1599
1600 * thread-db.c (find_new_threads_callback): Ignore thread if the
1601 kernel thread ID is -1.
1602
1603 2015-01-09 Pedro Alves <palves@redhat.com>
1604
1605 * linux-low.c (linux_attach_fail_reason_string): Move to
1606 nat/linux-ptrace.c, and rename.
1607 (linux_attach_lwp): Update comment.
1608 (attach_proc_task_lwp_callback): New function.
1609 (linux_attach): Adjust to rename and use
1610 linux_proc_attach_tgid_threads.
1611 (linux_attach_fail_reason_string): Delete declaration.
1612
1613 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1614
1615 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1616 * server.c (gdbserver_version): Likewise.
1617
1618 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1619
1620 * remote-utils.c: Include ctype.h.
1621 (input_interrupt): Explicitly handle the case when the char
1622 received is the NUL byte. Improve the printing of non-ASCII
1623 characters.
1624
1625 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1626
1627 * linux-low.c (linux_low_filter_event): Update call to
1628 linux_enable_event_reporting following the addition of
1629 a new parameter to that function.
1630
1631 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1632
1633 PR server/17457
1634 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1635 (AARCH64_FPCR_REGNO): Likewise.
1636 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1637 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1638 (aarch64_store_fpregset): Likewise.
1639
1640 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1641
1642 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1643 Remove FIXME comment about assumption about N.
1644
1645 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1646
1647 * configure.ac: If large-file support is disabled in GDBserver,
1648 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1649 * configure: Regenerate.
1650
1651 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1652
1653 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1654 warning upon ENODATA from ptrace.
1655 * linux-s390-low.c (s390_store_tdb): New.
1656 (s390_regsets): Add regset for NT_S390_TDB.
1657
1658 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1659
1660 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1661 without a fill_function.
1662 * linux-s390-low.c (s390_fill_last_break): Remove.
1663 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1664 (s390_arch_setup): Use regset's size instead of fill_function for
1665 loop end condition.
1666
1667 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1668
1669 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1670 the regset's store function when ptrace returned an error.
1671 * regcache.c (get_thread_regcache): Invalidate register cache
1672 before fetching inferior's registers.
1673
1674 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1675
1676 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1677 while-loop as for-loop.
1678 (regsets_store_inferior_registers): Likewise.
1679
1680 2014-11-28 Yao Qi <yao@codesourcery.com>
1681
1682 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1683 * config.in, configure: Re-generate.
1684 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1685 is defined.
1686
1687 2014-11-21 Yao Qi <yao@codesourcery.com>
1688
1689 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1690 (AC_CHECK_HEADERS): Remove malloc.h.
1691 * configure: Re-generated.
1692 * config.in: Re-generated.
1693 * server.h: Don't include alloca.h and malloc.h.
1694 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1695 Don't include malloc.h.
1696
1697 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1698
1699 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1700 corresponding ERRNO check in same block.
1701
1702 2014-11-12 Pedro Alves <palves@redhat.com>
1703
1704 * server.c (cont_thread): Update comment.
1705 (start_inferior, attach_inferior): No longer clear cont_thread.
1706 (handle_v_cont): No longer set cont_thread.
1707 (captured_main): Clear cont_thread each time a GDB connects.
1708
1709 2014-11-12 Pedro Alves <palves@redhat.com>
1710
1711 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1712 thread, and don't resume all threads if the Hc thread has exited.
1713
1714 2014-11-12 Pedro Alves <palves@redhat.com>
1715
1716 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1717 the process group instead of to a specific LWP.
1718
1719 2014-10-15 Pedro Alves <palves@redhat.com>
1720
1721 PR server/17487
1722 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1723 parameter.
1724 (arm_set_thread_context): Delete.
1725 (the_low_target): Adjust.
1726 * win32-i386-low.c (debug_registers_changed)
1727 (debug_registers_used): Delete.
1728 (update_debug_registers_callback): New function.
1729 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1730 needing to update their debug registers.
1731 (win32_get_current_dr): New function.
1732 (x86_dr_low_get_addr, x86_dr_low_get_control)
1733 (x86_dr_low_get_status): Fetch the debug register from the thread
1734 record's context.
1735 (i386_initial_stuff): Adjust.
1736 (i386_get_thread_context): Remove current_event parameter. Don't
1737 clear debug_registers_changed nor copy DR values to
1738 debug_reg_state.
1739 (i386_set_thread_context): Delete.
1740 (i386_prepare_to_resume): New function.
1741 (i386_thread_added): Mark the thread as needing to update irs
1742 debug registers.
1743 (the_low_target): Remove i386_set_thread_context and install
1744 i386_prepare_to_resume.
1745 * win32-low.c (win32_get_thread_context): Adjust.
1746 (win32_set_thread_context): Use SetThreadContext
1747 directly.
1748 (win32_prepare_to_resume): New function.
1749 (win32_require_context): New function, factored out from ...
1750 (thread_rec): ... this.
1751 (continue_one_thread): Call win32_prepare_to_resume on each thread
1752 we're about to continue.
1753 (win32_resume): Call win32_prepare_to_resume on the event thread.
1754 * win32-low.h (struct win32_thread_info)
1755 <debug_registers_changed>: New field.
1756 (struct win32_target_ops): Change prototype of set_thread_context,
1757 delete set_thread_context and add prepare_to_resume.
1758 (win32_require_context): New declaration.
1759
1760 2014-10-08 Gary Benson <gbenson@redhat.com>
1761
1762 * server.h: Do not include common-exceptions.h.
1763
1764 2014-10-08 Gary Benson <gbenson@redhat.com>
1765
1766 * server.h: Do not include cleanups.h.
1767
1768 2014-09-30 James Hogan <james.hogan@imgtec.com>
1769
1770 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1771 mips64-dsp-linux.c.
1772
1773 2014-09-23 Yao Qi <yao@codesourcery.com>
1774
1775 * linux-low.c (lp_status_maybe_breakpoint): New function.
1776 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1777 (count_events_callback): Likewise.
1778 (select_event_lwp_callback): Likewise.
1779 (cancel_breakpoints_callback): Likewise.
1780
1781 2014-09-19 Don Breazeal <donb@codesourcery.com>
1782
1783 * linux-low.c (handle_extended_wait): Call
1784 linux_ptrace_get_extended_event.
1785 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1786 linux_is_extended_waitstatus.
1787
1788 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1789
1790 * Makefile.in (CPPFLAGS): Define.
1791 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1792 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1793
1794 2014-09-16 Gary Benson <gbenson@redhat.com>
1795
1796 * inferiors.h (current_inferior): Renamed as...
1797 (current_thread): New variable. All uses updated.
1798 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1799 (maybe_move_out_of_jump_pad): Likewise.
1800 (cancel_breakpoint): Likewise.
1801 (linux_low_filter_event): Likewise.
1802 (wait_for_sigstop): Likewise.
1803 (linux_resume_one_lwp): Likewise.
1804 (need_step_over_p): Likewise.
1805 (start_step_over): Likewise.
1806 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1807 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1808 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1809 and save_inferior as saved_thread.
1810 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1811 saved_thread.
1812 (regcache_invalidate_thread): Likewise.
1813 * remote-utils.c (prepare_resume_reply): Likewise.
1814 * thread-db.c (thread_db_get_tls_address): Likewise.
1815 (disable_thread_event_reporting): Likewise.
1816 (remove_thread_event_breakpoints): Likewise.
1817 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1818 as saved_thread.
1819 * target.h (set_desired_inferior): Renamed as...
1820 (set_desired_thread): New declaration. All uses updated.
1821 * server.c (myresume): Updated comment to reference thread instead
1822 of inferior.
1823 (handle_serial_event): Likewise.
1824 (handle_target_event): Likewise.
1825
1826 2014-09-12 Tom Tromey <tromey@redhat.com>
1827 Gary Benson <gbenson@redhat.com>
1828
1829 * regcache.h: Include common-regcache.h.
1830 (regcache_read_pc): Don't declare.
1831 * regcache.c (get_thread_regcache_for_ptid): New function.
1832
1833 2014-09-11 Tom Tromey <tromey@redhat.com>
1834 Gary Benson <gbenson@redhat.com>
1835
1836 * symbol.c: New file.
1837 * Makefile.in (SFILES): Add symbol.c.
1838 (OBS): Add symbol.o.
1839
1840 2014-09-11 Gary Benson <gbenson@redhat.com>
1841
1842 * target.c (target_stop_ptid, target_continue_ptid): New
1843 functions.
1844
1845 2014-09-11 Tom Tromey <tromey@redhat.com>
1846 Gary Benson <gbenson@redhat.com>
1847
1848 * target.h: Include target/target.h.
1849 * target.c (target_read_memory, target_read_uint32)
1850 (target_write_memory): New functions.
1851
1852 2014-09-11 Gary Benson <gbenson@redhat.com>
1853
1854 * server.h (debug_hw_points): Don't declare.
1855 * server.c (debug_hw_points): Don't define. Replace all uses
1856 with show_debug_regs.
1857 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1858 all uses with show_debug_regs.
1859
1860 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1861
1862 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1863 endianness into account.
1864 (ppc_supply_ptrace_register): Likewise.
1865
1866 2014-09-03 James Hogan <james.hogan@imgtec.com>
1867
1868 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1869 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1870
1871 2014-09-03 Gary Benson <gbenson@redhat.com>
1872
1873 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1874 ALL_DEBUG_ADDRESS_REGISTERS.
1875
1876 2014-09-02 Gary Benson <gbenson@redhat.com>
1877
1878 * i386-low.h: Renamed as...
1879 * x86-low.h: New file. All type, function and variable name
1880 prefixes changed from "i386_" to "x86_". All references updated.
1881 * i386-low.c: Renamed as...
1882 * x86-low.c: New file. All type, function and variable name
1883 prefixes changed from "i386_" to "x86_". All references updated.
1884
1885 2014-09-02 Gary Benson <gbenson@redhat.com>
1886
1887 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1888 (x86_linux_new_thread): Likewise.
1889
1890 2014-08-29 Gary Benson <gbenson@redhat.com>
1891
1892 * server.h (setjmp.h): Do not include.
1893 (toplevel): Do not declare.
1894 (common-exceptions.h): Include.
1895 (cleanups.h): Likewise.
1896 * server.c (toplevel): Do not define.
1897 (exit_code): New static global.
1898 (detach_or_kill_for_exit_cleanup): New function.
1899 (main): New function. Original main renamed to...
1900 (captured_main): New function.
1901 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1902
1903 2014-08-29 Gary Benson <gbenson@redhat.com>
1904
1905 * Makefile.in (SFILES): Add common/common-exceptions.c.
1906 (OBS): Add common-exceptions.o.
1907 (common-exceptions.o): New rule.
1908 * utils.c (prepare_to_throw_exception): New function.
1909
1910 2014-08-29 Gary Benson <gbenson@redhat.com>
1911
1912 * config.in: Regenerate.
1913 * configure: Likewise.
1914
1915 2014-08-29 Gary Benson <gbenson@redhat.com>
1916
1917 * Makefile.in (SFILES): Add common/cleanups.c.
1918 (OBS): cleanups.o.
1919 (cleanups.o): New rule.
1920
1921 2014-08-29 Gary Benson <gbenson@redhat.com>
1922
1923 * utils.c (internal_vwarning): New function.
1924
1925 2014-08-28 Gary Benson <gbenson@redhat.com>
1926
1927 * utils.h (fatal): Remove declaration.
1928 * utils.c (fatal): Remove function.
1929
1930 2014-08-28 Gary Benson <gbenson@redhat.com>
1931
1932 * tracepoint.c (gdb_agent_init): Replace fatal with
1933 perror_with_name.
1934 (initialize_tracepoint): Likewise.
1935
1936 2014-08-28 Gary Benson <gbenson@redhat.com>
1937
1938 * remote-utils.c (remote_prepare): Replace fatal with error.
1939
1940 2014-08-28 Gary Benson <gbenson@redhat.com>
1941
1942 * linux-low.c (linux_async): Replace fatal with warning.
1943 Tidy up and return.
1944 (linux_start_non_stop): Return -1 if linux_async failed.
1945
1946 2014-08-28 Gary Benson <gbenson@redhat.com>
1947
1948 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1949 gdb_assert.
1950 (i386_dr_low_get_addr): Remove vague comment.
1951 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1952 gdb_assert.
1953
1954 2014-08-28 Gary Benson <gbenson@redhat.com>
1955
1956 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1957 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1958 internal_error.
1959 (linux_resume_one_lwp): Likewise.
1960 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1961 gdb_assert.
1962 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1963 with internal_error.
1964 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1965 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1966 (find_register_by_name): Replace fatal with internal_error.
1967 (find_regno): Likewise.
1968 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1969 * thread-db.c (thread_db_create_event): Likewise.
1970 (thread_db_load_search): Likewise.
1971 (try_thread_db_load_1): Likewise.
1972 * tracepoint.c (get_jump_space_head): Replace fatal with
1973 internal_error.
1974 (claim_trampoline_space): Likewise.
1975 (have_fast_tracepoint_trampoline_buffer): Likewise.
1976 (cmd_qtstart): Likewise.
1977 (stop_tracing): Likewise.
1978 (fast_tracepoint_collecting): Likewise.
1979 (target_malloc): Likewise.
1980 (download_tracepoint): Likewise.
1981 (download_trace_state_variables): Replace check with gdb_assert.
1982 (upload_fast_traceframes): Replace fatal with internal_error.
1983
1984 2014-08-19 Tom Tromey <tromey@redhat.com>
1985 Gary Benson <gbenson@redhat.com>
1986
1987 * Makefile.in (SFILES): Add common/common-debug.c.
1988 (OBS): Add common-debug.o.
1989 (common-debug.o): New rule.
1990 * debug.h (debug_printf): Don't declare.
1991 * debug.c (debug_printf): Renamed and rewritten as...
1992 (debug_vprintf): New function.
1993
1994 2014-08-19 Gary Benson <gbenson@redhat.com>
1995
1996 * utils.h: Do not include print-utils.h.
1997
1998 2014-08-19 Tom Tromey <tromey@redhat.com>
1999 Gary Benson <gbenson@redhat.com>
2000
2001 * server.h: Add static assertion.
2002 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2003
2004 2014-08-19 Tom Tromey <tromey@redhat.com>
2005 Gary Benson <gbenson@redhat.com>
2006
2007 * Makefile.in (SFILES): Add common/errors.c.
2008 (OBS): Add errors.o.
2009 (IPA_OBS): Add errors-ipa.o.
2010 (errors.o): New rule.
2011 (errors-ipa.o): Likewise.
2012 * utils.h (perror_with_name, error, warning): Don't declare.
2013 * utils.c (warning): Renamed and rewritten as...
2014 (vwarning): New function.
2015 (error): Renamed and rewritten as...
2016 (verror): New function.
2017 (internal_error): Renamed and rewritten as...
2018 (internal_verror): New function.
2019
2020 2014-08-07 Gary Benson <gbenson@redhat.com>
2021
2022 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2023 * configure: Regenerate.
2024 * config.in: Likewise.
2025 * server.h: Do not include errno.h.
2026 * event-loop.c: Likewise.
2027 * hostio-errno.c: Likewise.
2028 * linux-low.c: Likewise.
2029 * remote-utils.c: Likewise.
2030 * spu-low.c: Likewise.
2031 * utils.c: Likewise.
2032 * gdbreplay.c: Unconditionally include errno.h.
2033
2034 2014-08-07 Gary Benson <gbenson@redhat.com>
2035
2036 * server.h: Do not include string.h.
2037 * event-loop.c: Likewise.
2038 * linux-low.c: Likewise.
2039 * regcache.c: Likewise.
2040 * remote-utils.c: Likewise.
2041 * spu-low.c: Likewise.
2042 * utils.c: Likewise.
2043
2044 2014-08-07 Gary Benson <gbenson@redhat.com>
2045
2046 * server.h: Do not include gdb_assert.h.
2047
2048 2014-08-07 Gary Benson <gbenson@redhat.com>
2049
2050 * server.h: Do not include common-utils.h.
2051
2052 2014-08-07 Gary Benson <gbenson@redhat.com>
2053
2054 * server.h: Do not include ptid.h.
2055 * notif.h: Likewise.
2056
2057 2014-08-07 Gary Benson <gbenson@redhat.com>
2058
2059 * server.h: Do not include gdb_locale.h.
2060
2061 2014-08-07 Gary Benson <gbenson@redhat.com>
2062
2063 * server.h: Do not include gdb/signals.h.
2064 * win32-low.c: Likewise.
2065
2066 2014-08-07 Gary Benson <gbenson@redhat.com>
2067
2068 * server.h: Do not include pathmax.h.
2069
2070 2014-08-07 Gary Benson <gbenson@redhat.com>
2071
2072 * server.h: Do not include libiberty.h.
2073 * linux-bfin-low.c: Likewise.
2074
2075 2014-08-07 Gary Benson <gbenson@redhat.com>
2076
2077 * server.h: Do not include ansidecl.h.
2078
2079 2014-08-07 Gary Benson <gbenson@redhat.com>
2080
2081 * linux-x86-low.c: Do not include stddef.h.
2082 * lynx-ppc-low.c: Likewise.
2083 * tracepoint.c: Likewise.
2084
2085 2014-08-07 Gary Benson <gbenson@redhat.com>
2086
2087 * server.h: Do not include stdarg.h.
2088 * nto-low.c: Likewise.
2089
2090 2014-08-07 Gary Benson <gbenson@redhat.com>
2091
2092 * server.h: Do not include stdlib.h.
2093 * inferiors.c: Likewise.
2094 * linux-low.c: Likewise.
2095 * regcache.c: Likewise.
2096 * spu-low.c: Likewise.
2097 * tracepoint.c: Likewise.
2098 * utils.c: Likewise.
2099
2100 2014-08-07 Gary Benson <gbenson@redhat.com>
2101
2102 * server.h: Do not include stdio.h.
2103 * linux-low.c: Likewise.
2104 * remote-utils.c: Likewise.
2105 * spu-low.c: Likewise.
2106 * utils.c: Likewise.
2107 * wincecompat.c: Likewise.
2108
2109 2014-08-06 Gary Benson <gbenson@redhat.com>
2110
2111 * regcache.c (init_register_cache): Move conditionals inside if.
2112
2113 2014-08-06 Gary Benson <gbenson@redhat.com>
2114
2115 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2116
2117 2014-07-31 Gary Benson <gbenson@redhat.com>
2118
2119 * ax.h: Do not include server.h.
2120 * gdbthread.h: Likewise.
2121 * lynx-low.h: Likewise.
2122 * notif.h: Likewise.
2123
2124 2014-07-30 Gary Benson <gbenson@redhat.com>
2125
2126 * server.h: Include common-defs.h.
2127 Do not include config.h or build-gnulib-gdbserver/config.h.
2128
2129 2014-07-30 Gary Benson <gbenson@redhat.com>
2130
2131 * hostio-errno.c: Move server.h to top of includes list.
2132 * inferiors.c: Likewise.
2133 * linux-x86-low.c: Likewise.
2134 * notif.c: Include server.h.
2135
2136 2014-07-24 Tom Tromey <tromey@redhat.com>
2137 Gary Benson <gbenson@redhat.com>
2138
2139 * server.h (CORE_ADDR): Now unsigned.
2140
2141 2014-07-16 Pedro Alves <palves@redhat.com>
2142
2143 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2144
2145 2014-07-15 Pedro Alves <palves@redhat.com>
2146
2147 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2148 copy.
2149
2150 2014-07-11 Pedro Alves <palves@redhat.com>
2151
2152 * linux-low.c (kill_wait_lwp): New function, based on
2153 kill_one_lwp_callback, but use my_waitpid directly.
2154 (kill_one_lwp_callback, linux_kill): Use it.
2155
2156 2014-06-23 Pedro Alves <palves@redhat.com>
2157
2158 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2159 before setting DR0..DR3.
2160
2161 2014-06-20 Gary Benson <gbenson@redhat.com>
2162
2163 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2164 * configure: Regenerated.
2165 * config.in: Likewise.
2166
2167 2014-06-20 Gary Benson <gbenson@redhat.com>
2168
2169 * Makefile.in (SFILES): Update locations for files moved
2170 from common to nat.
2171 (object file files): Reordered.
2172
2173 2014-06-20 Gary Benson <gbenson@redhat.com>
2174
2175 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2176 (i386_dr_low_set_addr): Likewise.
2177 (i386_dr_low_get_addr): Likewise.
2178 (i386_dr_low_can_set_control): Likewise.
2179 (i386_dr_low_set_control): Likewise.
2180 (i386_dr_low_get_control): Likewise.
2181 (i386_dr_low_get_status): Likewise.
2182 (i386_get_debug_register_length): Likewise.
2183 * linux-x86-low.c (i386_dr_low_set_addr):
2184 Changed signature. Made static.
2185 (i386_dr_low_get_addr): Likewise.
2186 (i386_dr_low_set_control): Likewise.
2187 (i386_dr_low_get_control): Likewise.
2188 (i386_dr_low_get_status): Likewise.
2189 (i386_dr_low): New global variable.
2190 * win32-i386-low.c (i386_dr_low_set_addr):
2191 Changed signature. Made static.
2192 (i386_dr_low_get_addr): Likewise.
2193 (i386_dr_low_set_control): Likewise.
2194 (i386_dr_low_get_control): Likewise.
2195 (i386_dr_low_get_status): Likewise.
2196 (i386_dr_low): New global variable.
2197
2198 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2199
2200 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2201 * Makefile.in (AR, AR_FLAGS): Define.
2202 * configure: Regenerate.
2203
2204 2014-06-19 Gary Benson <gbenson@redhat.com>
2205
2206 * Makefile.in (i386-dregs.o): New rule.
2207 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2208 * i386-low.c (target.h): Remove include.
2209 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2210 (DR_CONTROL_SHIFT): Likewise.
2211 (DR_CONTROL_SIZE): Likewise.
2212 (DR_RW_EXECUTE): Likewise.
2213 (DR_RW_WRITE): Likewise.
2214 (DR_RW_READ): Likewise.
2215 (DR_RW_IORW): Likewise.
2216 (DR_LEN_1): Likewise.
2217 (DR_LEN_2): Likewise.
2218 (DR_LEN_4): Likewise.
2219 (DR_LEN_8): Likewise.
2220 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2221 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2222 (DR_ENABLE_SIZE): Likewise.
2223 (DR_LOCAL_SLOWDOWN): Likewise.
2224 (DR_GLOBAL_SLOWDOWN): Likewise.
2225 (DR_CONTROL_RESERVED): Likewise.
2226 (I386_DR_CONTROL_MASK): Likewise.
2227 (I386_DR_VACANT): Likewise.
2228 (I386_DR_LOCAL_ENABLE): Likewise.
2229 (I386_DR_GLOBAL_ENABLE): Likewise.
2230 (I386_DR_DISABLE): Likewise.
2231 (I386_DR_SET_RW_LEN): Likewise.
2232 (I386_DR_GET_RW_LEN): Likewise.
2233 (I386_DR_WATCH_HIT): Likewise.
2234 (i386_wp_op_t): Likewise.
2235 (i386_show_dr): Likewise.
2236 (i386_length_and_rw_bits): Likewise.
2237 (i386_insert_aligned_watchpoint): Likewise.
2238 (i386_remove_aligned_watchpoint): Likewise.
2239 (i386_handle_nonaligned_watchpoint): Likewise.
2240 i386_update_inferior_debug_regs(): Likewise.
2241 (i386_dr_insert_watchpoint): Likewise.
2242 (i386_dr_remove_watchpoint): Likewise.
2243 (i386_dr_region_ok_for_watchpoint): Likewise.
2244 (i386_dr_stopped_data_address): Likewise.
2245 (i386_dr_stopped_by_watchpoint): Likewise.
2246
2247 2014-06-19 Gary Benson <gbenson@redhat.com>
2248
2249 * i386-low.c (i386_dr_show): Renamed to
2250 i386_show_dr and made static. All uses updated.
2251 (i386_dr_length_and_rw_bits): Renamed to
2252 i386_length_and_rw_bits and made static.
2253 All uses updated.
2254 (i386_dr_insert_aligned_watchpoint): Renamed to
2255 i386_insert_aligned_watchpoint and made static.
2256 All uses updated.
2257 (i386_dr_remove_aligned_watchpoint): Renamed to
2258 i386_remove_aligned_watchpoint and made static.
2259 All uses updated.
2260 (i386_dr_update_inferior_debug_regs): Renamed to
2261 i386_update_inferior_debug_regs and made static.
2262 All uses updated.
2263
2264 2014-06-18 Gary Benson <gbenson@redhat.com>
2265
2266 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2267 (i386_dr_low_can_set_control): Likewise.
2268 (i386_get_debug_register_length): Likewise.
2269 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2270 (i386_dr_low_can_set_control): Likewise.
2271 (i386_get_debug_register_length): Likewise.
2272
2273 2014-06-17 Gary Benson <gbenson@redhat.com>
2274
2275 * i386-low.h (i386-dregs.h): New include.
2276 (DR_FIRSTADDR): Now in i386-dregs.h.
2277 (DR_LASTADDR): Likewise.
2278 (DR_NADDR): Likewise.
2279 (DR_STATUS): Likewise.
2280 (DR_CONTROL): Likewise.
2281 (i386_debug_reg_state): Likewise.
2282 (i386_dr_insert_watchpoint): Likewise.
2283 (i386_dr_remove_watchpoint): Likewise.
2284 (i386_dr_region_ok_for_watchpoint): Likewise.
2285 (i386_dr_stopped_data_address): Likewise.
2286 (i386_dr_stopped_by_watchpoint): Likewise.
2287 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2288
2289 2014-06-18 Gary Benson <gbenson@redhat.com>
2290
2291 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2292 i386_dr_insert_watchpoint.
2293 (i386_low_remove_watchpoint): Renamed to
2294 i386_dr_remove_watchpoint.
2295 (i386_low_region_ok_for_watchpoint): Renamed to
2296 i386_dr_region_ok_for_watchpoint.
2297 (i386_low_stopped_data_address): Renamed to
2298 i386_dr_stopped_data_address.
2299 (i386_low_stopped_by_watchpoint): Renamed to
2300 i386_dr_stopped_by_watchpoint.
2301 * i386-low.c (i386_show_dr): Renamed to
2302 i386_dr_show and made nonstatic. All uses updated.
2303 (i386_length_and_rw_bits): Renamed to
2304 i386_dr_length_and_rw_bits and made nonstatic.
2305 All uses updated.
2306 (i386_insert_aligned_watchpoint): Renamed to
2307 i386_dr_insert_aligned_watchpoint and made nonstatic.
2308 All uses updated.
2309 (i386_remove_aligned_watchpoint): Renamed to
2310 i386_dr_remove_aligned_watchpoint and made nonstatic.
2311 All uses updated.
2312 (i386_update_inferior_debug_regs): Renamed to
2313 i386_dr_update_inferior_debug_regs and made nonstatic.
2314 All uses updated.
2315 (i386_low_insert_watchpoint): Renamed to
2316 i386_dr_insert_watchpoint. All uses updated.
2317 (i386_low_remove_watchpoint): Renamed to
2318 i386_dr_remove_watchpoint. All uses updated.
2319 (i386_low_region_ok_for_watchpoint): Renamed to
2320 i386_dr_region_ok_for_watchpoint. All uses updated.
2321 (i386_low_stopped_data_address): Renamed to
2322 i386_dr_stopped_data_address. All uses updated.
2323 (i386_low_stopped_by_watchpoint): Renamed to
2324 i386_dr_stopped_by_watchpoint. All uses updated.
2325
2326 2014-06-18 Gary Benson <gbenson@redhat.com>
2327
2328 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2329 (i386_dr_low_can_set_control): Likewise.
2330 (i386_insert_aligned_watchpoint): New check.
2331
2332 2014-06-18 Gary Benson <gbenson@redhat.com>
2333
2334 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2335 Renamed to state.
2336
2337 2014-06-18 Gary Benson <gbenson@redhat.com>
2338
2339 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2340 instead of fatal and error.
2341 (i386_handle_nonaligned_watchpoint): Likewise.
2342
2343 2014-06-18 Gary Benson <gbenson@redhat.com>
2344
2345 * i386-low.c (i386_get_debug_register_length): New macro.
2346 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2347 (i386_show_dr): Use debug_printf instead of fprintf. Use
2348 phex to format values.
2349
2350 2014-06-18 Gary Benson <gbenson@redhat.com>
2351
2352 * i386-low.h: Comment changes.
2353 * i386-low.c: Likewise.
2354
2355 2014-06-18 Gary Benson <gbenson@redhat.com>
2356
2357 * i386-low.c: Whitespace changes.
2358
2359 2014-06-12 Tom Tromey <tromey@redhat.com>
2360
2361 * utils.c (freeargv): Remove.
2362
2363 2014-06-12 Tom Tromey <tromey@redhat.com>
2364
2365 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2366 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2367 (parse_debug_format_options): Likewise.
2368 (gdbserver_usage): Likewise.
2369 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2370 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2371 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2372 against libiberty.
2373 ($(LIBGNU)): Depend on libiberty.
2374 (all-lib): Recurse into all subdirs.
2375 (install-only): Invoke "install" target in subdirs.
2376 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2377 targets.
2378 * configure: Rebuild.
2379 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2380 for vasprintf, vsnprintf, or gettimeofday.
2381 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2382 srv_tgtobj.
2383
2384 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2385
2386 * development.sh: Delete.
2387 * Makefile.in (config.status): Adjust dependency on development.sh.
2388 * configure.ac: Adjust development.sh source call.
2389 * configure: Regenerate.
2390
2391 2014-06-02 Pedro Alves <palves@redhat.com>
2392
2393 * ax.c (gdb_free_agent_expr): New function.
2394 * ax.h (gdb_free_agent_expr): New declaration.
2395 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2396 list.
2397 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2398 static.
2399 (clear_breakpoint_conditions_and_commands): New function.
2400 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2401 (clear_breakpoint_conditions_and_commands): New declaration.
2402
2403 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2404
2405 * linux-aarch64-low.c (asm/ptrace.h): Include.
2406
2407 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2408
2409 Fix TLS access for -static -pthread.
2410 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2411 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2412 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2413
2414 2014-05-20 Pedro Alves <palves@redhat.com>
2415
2416 * linux-aarch64-low.c (aarch64_insert_point)
2417 (aarch64_remove_point): No longer check whether the type is
2418 supported here. Adjust to new interface.
2419 (the_low_target): Install aarch64_supports_z_point_type as
2420 supports_z_point_type method.
2421 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2422 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2423 instead of a Z packet char. Adjust.
2424 (arm_supports_z_point_type): New function.
2425 (arm_insert_point, arm_remove_point): Adjust to new interface.
2426 (the_low_target): Install arm_supports_z_point_type.
2427 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2428 (cris_insert_point, cris_remove_point): Adjust to new interface.
2429 Don't check whether the type is supported here.
2430 (the_low_target): Install cris_supports_z_point_type.
2431 * linux-low.c (linux_supports_z_point_type): New function.
2432 (linux_insert_point, linux_remove_point): Adjust to new interface.
2433 * linux-low.h (struct linux_target_ops) <insert_point,
2434 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2435 raw_breakpoint pointer parameter.
2436 <supports_z_point_type>: New method.
2437 * linux-mips-low.c (mips_supports_z_point_type): New function.
2438 (mips_insert_point, mips_remove_point): Adjust to new interface.
2439 Use mips_supports_z_point_type.
2440 (the_low_target): Install mips_supports_z_point_type.
2441 * linux-ppc-low.c (the_low_target): Install NULL as
2442 supports_z_point_type method.
2443 * linux-s390-low.c (the_low_target): Install NULL as
2444 supports_z_point_type method.
2445 * linux-sparc-low.c (the_low_target): Install NULL as
2446 supports_z_point_type method.
2447 * linux-x86-low.c (x86_supports_z_point_type): New function.
2448 (x86_insert_point): Adjust to new insert_point interface. Use
2449 insert_memory_breakpoint. Adjust to new
2450 i386_low_insert_watchpoint interface.
2451 (x86_remove_point): Adjust to remove_point interface. Use
2452 remove_memory_breakpoint. Adjust to new
2453 i386_low_remove_watchpoint interface.
2454 (the_low_target): Install x86_supports_z_point_type.
2455 * lynx-low.c (lynx_target_ops): Install NULL as
2456 supports_z_point_type callback.
2457 * nto-low.c (nto_supports_z_point_type): New.
2458 (nto_insert_point, nto_remove_point): Adjust to new interface.
2459 (nto_target_ops): Install nto_supports_z_point_type.
2460 * mem-break.c: Adjust intro comment.
2461 (struct raw_breakpoint) <raw_type, size>: New fields.
2462 <inserted>: Update comment.
2463 <shlib_disabled>: Delete field.
2464 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2465 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2466 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2467 (raw_bkpt_type_to_target_hw_bp_type): New function.
2468 (find_enabled_raw_code_breakpoint_at): New function.
2469 (find_raw_breakpoint_at): New type and size parameters. Use them.
2470 (insert_memory_breakpoint): New function, based off
2471 set_raw_breakpoint_at.
2472 (remove_memory_breakpoint): New function.
2473 (set_raw_breakpoint_at): Reimplement.
2474 (set_breakpoint): New, based on set_breakpoint_at.
2475 (set_breakpoint_at): Reimplement.
2476 (delete_raw_breakpoint): Go through the_target->remove_point
2477 instead of assuming memory breakpoints.
2478 (find_gdb_breakpoint_at): Delete.
2479 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2480 (find_gdb_breakpoint): New function.
2481 (set_gdb_breakpoint_at): Delete.
2482 (z_type_supported): New function.
2483 (set_gdb_breakpoint_1): New function, loosely based off
2484 set_gdb_breakpoint_at.
2485 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2486 (delete_gdb_breakpoint_at): Delete.
2487 (delete_gdb_breakpoint_1): New function, loosely based off
2488 delete_gdb_breakpoint_at.
2489 (delete_gdb_breakpoint): New function.
2490 (clear_gdb_breakpoint_conditions): Rename to ...
2491 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2492 breakpoint.
2493 (add_condition_to_breakpoint): Make static.
2494 (add_breakpoint_condition): Take a struct breakpoint pointer
2495 instead of an address. Adjust.
2496 (gdb_condition_true_at_breakpoint): Rename to ...
2497 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2498 z_type parameter.
2499 (gdb_condition_true_at_breakpoint): Reimplement.
2500 (add_breakpoint_commands): Take a struct breakpoint pointer
2501 instead of an address. Adjust.
2502 (gdb_no_commands_at_breakpoint): Rename to ...
2503 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2504 parameter. Return true if no breakpoint was found. Change debug
2505 output.
2506 (gdb_no_commands_at_breakpoint): Reimplement.
2507 (run_breakpoint_commands): Rename to ...
2508 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2509 and change return type to boolean.
2510 (run_breakpoint_commands): New function.
2511 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2512 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2513 breakpoint. Go through the_target->remove_point instead of
2514 assuming memory breakpoint.
2515 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2516 software and hardware breakpoints.
2517 (reinsert_raw_breakpoint): Go through the_target->insert_point
2518 instead of assuming memory breakpoint.
2519 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2520 software and hardware breakpoints.
2521 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2522 Check both software and hardware breakpoints.
2523 (validate_inserted_breakpoint): Assert the breakpoint is a
2524 software breakpoint. Set the inserted flag to -1 instead of
2525 setting shlib_disabled.
2526 (delete_disabled_breakpoints): Adjust.
2527 (validate_breakpoints): Only validate software breakpoints.
2528 Adjust to inserted flag change.
2529 (check_mem_read, check_mem_write): Skip breakpoint types other
2530 than software breakpoints. Adjust to inserted flag change.
2531 * mem-break.h (enum raw_bkpt_type): New enum.
2532 (raw_breakpoint, struct process_info): Forward declare.
2533 (Z_packet_to_target_hw_bp_type): Delete declaration.
2534 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2535 (set_gdb_breakpoint, delete_gdb_breakpoint)
2536 (clear_breakpoint_conditions): New declarations.
2537 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2538 (breakpoint_inserted_here): Update comment.
2539 (add_breakpoint_condition, add_breakpoint_commands): Replace
2540 address parameter with a breakpoint pointer parameter.
2541 (gdb_breakpoint_here): Update comment.
2542 (delete_gdb_breakpoint_at): Delete.
2543 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2544 * server.c (process_point_options): Take a struct breakpoint
2545 pointer instead of an address. Adjust.
2546 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2547 delete_gdb_breakpoint.
2548 * spu-low.c (spu_target_ops): Install NULL as
2549 supports_z_point_type method.
2550 * target.h: Include mem-break.h.
2551 (struct target_ops) <prepare_to_access_memory>: Update comment.
2552 <supports_z_point_type>: New field.
2553 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2554 instead of a char. Also take a raw breakpoint pointer.
2555 * win32-arm-low.c (the_low_target): Install NULL as
2556 supports_z_point_type.
2557 * win32-i386-low.c (i386_supports_z_point_type): New function.
2558 (i386_insert_point, i386_remove_point): Adjust to new interface.
2559 (the_low_target): Install i386_supports_z_point_type.
2560 * win32-low.c (win32_supports_z_point_type): New function.
2561 (win32_insert_point, win32_remove_point): Adjust to new interface.
2562 (win32_target_ops): Install win32_supports_z_point_type.
2563 * win32-low.h (struct win32_target_ops):
2564 <supports_z_point_type>: New method.
2565 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2566 instead of a char. Also take a raw breakpoint pointer.
2567
2568 2014-05-20 Pedro Alves <palves@redhat.com>
2569
2570 * mem-break.h: Include break-common.h.
2571 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2572 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2573 (Z_packet_to_target_hw_bp_type): New declaration.
2574 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2575 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2576 (Z_PACKET_ACCESS_WP): Delete macros.
2577 (Z_packet_to_hw_type): Delete function.
2578 * i386-low.h: Don't include break-common.h here.
2579 (Z_packet_to_hw_type): Delete declaration.
2580 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2581 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2582 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2583 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2584 * linux-aarch64-low.c: Don't include break-common.h here.
2585 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2586 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2587 (Z_packet_to_target_hw_bp_type): Delete function.
2588 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2589 function.
2590 (mips_insert_point, mips_remove_point): Use
2591 Z_packet_to_target_hw_bp_type.
2592
2593 2014-05-20 Pedro Alves <palves@redhat.com>
2594
2595 * linux-aarch64-low.c: Include break-common.h.
2596 (enum target_point_type): Delete.
2597 (Z_packet_to_point_type): Rename to ...
2598 (Z_packet_to_target_hw_bp_type): ... this, and return a
2599 target_hw_bp_type instead.
2600 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2601 instead of an enum target_point_type.
2602 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2603 breakpoint type.
2604 (aarch64_dr_state_insert_one_point)
2605 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2606 (aarch64_handle_aligned_watchpoint)
2607 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2608 Take an enum target_hw_bp_type instead of an enum
2609 target_point_type.
2610 (aarch64_supports_z_point_type): New function.
2611 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2612 use Z_packet_to_target_hw_bp_type.
2613
2614 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2615
2616 * configure.ac: Only use -Werror by default when DEVELOPMENT
2617 is true.
2618 * configure: Regenerate.
2619
2620 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2621
2622 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2623 * linux-x86-low.c (X86_64_USER_REGS): New.
2624 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2625
2626 2014-04-28 Yao Qi <yao@codesourcery.com>
2627
2628 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2629 name.
2630
2631 2014-04-25 Pedro Alves <palves@redhat.com>
2632
2633 PR server/16255
2634 * linux-low.c (linux_attach_fail_reason_string): New function.
2635 (linux_attach_lwp): Delete.
2636 (linux_attach_lwp_1): Rename to ...
2637 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2638 argument. Remove "initial" parameter. Return int instead of
2639 void. Don't error or warn here.
2640 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2641 failure to attach to the tgid. Call warning when failing to
2642 attach to an lwp.
2643 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2644 argument. Remove "initial" parameter. Return int instead of
2645 void. Don't error or warn here.
2646 (linux_attach_fail_reason_string): New declaration.
2647 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2648 interface change. Use linux_attach_fail_reason_string.
2649
2650 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2651 Walfred Tedeschi <walfred.tedeschi@intel.com>
2652
2653 * Makefile.in: Added rules to handle new files
2654 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2655 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2656 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2657 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2658 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2659 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2660 x32-avx512-linux.o.
2661 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2662 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2663 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2664 i386/x32-avx512.xml.
2665 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2666 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2667 i386/x32-avx512-linux.xml.
2668 * i387-fp.c (num_avx512_k_registers): New constant for number
2669 of K registers.
2670 (num_avx512_zmmh_low_registers): New constant for number of
2671 lower ZMM registers (0-15).
2672 (num_avx512_zmmh_high_registers): New constant for number of
2673 higher ZMM registers (16-31).
2674 (num_avx512_ymmh_registers): New contant for number of higher
2675 YMM registers (ymm16-31 added by avx521 on x86_64).
2676 (num_avx512_xmm_registers): New constant for number of higher
2677 XMM registers (xmm16-31 added by AVX512 on x86_64).
2678 (struct i387_xsave): Add space for AVX512 registers.
2679 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2680 Add code to handle AVX512 registers.
2681 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2682 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2683 prototypei from generated file.
2684 (tdesc_amd64_avx512_linux): Likewise.
2685 (init_registers_x32_avx512_linux): Likewise.
2686 (tdesc_x32_avx512_linux): Likewise.
2687 (init_registers_i386_avx512_linux): Likewise.
2688 (tdesc_i386_avx512_linux): Likewise.
2689 (x86_64_regmap): Add AVX512 registers.
2690 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2691 mask.
2692 (initialize_low_arch): Add code to initialize AVX512 registers.
2693
2694 2014-04-23 Pedro Alves <palves@redhat.com>
2695
2696 * mem-break.c (find_gdb_breakpoint_at): Make static.
2697 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2698
2699 2014-04-23 Pedro Alves <palves@redhat.com>
2700
2701 * i386-low.c: Don't include break-common.h here.
2702 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2703 prototype to take target_hw_bp_type as argument instead of a Z
2704 packet char.
2705 * i386-low.h: Include break-common.h here.
2706 (Z_packet_to_hw_type): Declare.
2707 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2708 prototypes.
2709 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2710 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2711 (x86_remove_point): Convert the packet number to a
2712 target_hw_bp_type before calling i386_low_remove_watchpoint.
2713 * win32-i386-low.c (i386_insert_point): Convert the packet number
2714 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2715 (i386_remove_point): Convert the packet number to a
2716 target_hw_bp_type before calling i386_low_remove_watchpoint.
2717
2718 2014-04-23 Pedro Alves <palves@redhat.com>
2719
2720 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2721
2722 2014-04-10 Pedro Alves <palves@redhat.com>
2723
2724 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2725 Check if the condition or command is NULL before checking if the
2726 breakpoint is known. On success, return true.
2727 * mem-break.h (add_breakpoint_condition): Document return.
2728 (add_breakpoint_commands): Add describing comment.
2729 * server.c (skip_to_semicolon): New function.
2730 (process_point_options): Use it.
2731
2732 2014-04-09 Pedro Alves <palves@redhat.com>
2733
2734 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2735 to lwpid_of.
2736
2737 2014-02-27 Pedro Alves <palves@redhat.com>
2738
2739 PR 12702
2740 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2741 macros.
2742 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2743 output.
2744 (last_thread_of_process_p): Take a PID argument instead of a
2745 thread pointer.
2746 (linux_wait_for_lwp): Delete.
2747 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2748 functions.
2749 (linux_low_filter_event): New function, party factored out from
2750 linux_wait_for_event.
2751 (linux_wait_for_event): Rename to ...
2752 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2753 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2754 sigsuspend. Check for zombie leaders.
2755 (linux_wait_for_event): Reimplement as wrapper around
2756 linux_wait_for_event_filtered.
2757 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2758 a normal or signal exit is seen, it's the whole process exiting.
2759 (wait_for_sigstop): No longer a for_each_inferior callback.
2760 Rewrite on top of linux_wait_for_event_filtered.
2761 (stop_all_lwps): Call wait_for_sigstop directly.
2762 * server.c (resume, handle_target_event): Handle
2763 TARGET_WAITKIND_NO_RESUMED.
2764
2765 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2766
2767 * win32-low.c (psapi_get_dll_name,
2768 * win32_CreateToolhelp32Snapshot): Delete.
2769 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2770 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2771 Delete.
2772 (handle_load_dll): Add function description.
2773 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2774
2775 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2776
2777 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2778 Add comment.
2779 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2780 base address when calling win32_add_one_solib.
2781 (handle_load_dll): Delete local variable load_addr.
2782 Remove 0x1000 offset applied to DLL base address when calling
2783 win32_add_one_solib.
2784 (handle_unload_dll): Add comment.
2785
2786 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2787
2788 * win32-low.c (win32_add_all_dlls): Renames
2789 win32_ensure_ntdll_loaded. Rewrite function documentation.
2790 Adjust implementation to always load all DLLs.
2791 Add 0x1000 offset to DLL base address when calling
2792 win32_add_one_solib.
2793 (child_initialization_done): New static global.
2794 (do_initial_child_stuff): Set child_initialization_done to
2795 zero during child initialization, and 1 after. Replace call
2796 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2797 Add comment.
2798 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2799 (handle_unload_dll): Add function documentation.
2800 (get_child_debug_event): Ignore load and unload DLL events
2801 during child initialization.
2802
2803 2014-02-20 Doug Evans <dje@google.com>
2804
2805 Remove global all_lwps.
2806 * inferiors.h (ptid_of): Move here from linux-low.h.
2807 (pid_of, lwpid_of): Ditto.
2808 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2809 parameter is a struct thread_info * now.
2810 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2811 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2812 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2813 directly.
2814 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2815 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2816 * linux-arm-low.c (update_registers_callback): Update, "entry"
2817 parameter is a struct thread_info * now.
2818 Fetch lwpid from current_inferior directly.
2819 (arm_insert_point): Pass &all_threads to find_inferior instead of
2820 &all_lwps.
2821 (arm_remove_point): Ditto.
2822 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2823 (arm_prepare_to_resume): Fetch pid from thread.
2824 (arm_read_description): Fetch lwpid from current_inferior directly.
2825 * linux-low.c (all_lwps): Delete.
2826 (delete_lwp): Delete call to remove_inferior.
2827 (handle_extended_wait): Fetch lwpid from thread.
2828 (add_lwp): Don't set lwp->entry.id. Remove call to
2829 add_inferior_to_list.
2830 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2831 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2832 (kill_one_lwp_callback): Ditto.
2833 (linux_kill): Don't dereference NULL pointer.
2834 Fetch ptid,lwpid from thread.
2835 (get_detach_signal): Fetch ptid from thread.
2836 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2837 Simplify call to regcache_invalidate_thread.
2838 (delete_lwp_callback): Update, "entry" parameter is a
2839 struct thread_info * now. Fetch pid from thread.
2840 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2841 (status_pending_p_callback): Update, "entry" parameter is a
2842 struct thread_info * now. Fetch ptid from thread.
2843 (find_lwp_pid): Update, "entry" parameter is a
2844 struct thread_info * now.
2845 (linux_wait_for_lwp): Fetch pid from thread.
2846 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2847 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2848 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2849 (dequeue_one_deferred_signal): Ditto.
2850 (cancel_breakpoint): Fetch ptid from current_inferior.
2851 (linux_wait_for_event): Pass &all_threads to find_inferior,
2852 not &all_lwps. Fetch ptid, lwpid from thread.
2853 (count_events_callback): Update, "entry" parameter is a
2854 struct thread_info * now.
2855 (select_singlestep_lwp_callback): Ditto.
2856 (select_event_lwp_callback): Ditto.
2857 (cancel_breakpoints_callback): Ditto.
2858 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2859 not &all_lwps.
2860 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2861 (unsuspend_one_lwp): Update, "entry" parameter is a
2862 struct thread_info * now.
2863 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2864 not &all_lwps.
2865 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2866 Fetch lwpid from thread, not lwp.
2867 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2868 Pass &all_threads to find_inferior, not &all_lwps.
2869 (send_sigstop): Fetch lwpid from thread, not lwp.
2870 (send_sigstop_callback): Update, "entry" parameter is a
2871 struct thread_info * now.
2872 (suspend_and_send_sigstop_callback): Ditto.
2873 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2874 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2875 struct thread_info * now.
2876 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2877 from thread, lwp.
2878 (lwp_running): Update, "entry" parameter is a
2879 struct thread_info * now.
2880 (stop_all_lwps): Fetch ptid from thread.
2881 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2882 (linux_resume_one_lwp): Fetch lwpid from thread.
2883 (linux_set_resume_request): Update, "entry" parameter is a
2884 struct thread_info * now. Fetch pid, lwpid from thread.
2885 (resume_status_pending_p): Update, "entry" parameter is a
2886 struct thread_info * now.
2887 (need_step_over_p): Ditto. Fetch lwpid from thread.
2888 (start_step_over): Fetch lwpid from thread.
2889 (linux_resume_one_thread): Update, "entry" parameter is a
2890 struct thread_info * now. Fetch lwpid from thread.
2891 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2892 (proceed_one_lwp): Update, "entry" parameter is a
2893 struct thread_info * now. Fetch lwpid from thread.
2894 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2895 struct thread_info * now.
2896 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2897 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2898 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2899 directly.
2900 (regsets_store_inferior_registers): Ditto.
2901 (fetch_register, store_register): Ditto.
2902 (linux_read_memory, linux_write_memory): Ditto.
2903 (linux_request_interrupt): Ditto.
2904 (linux_read_auxv): Ditto.
2905 (linux_xfer_siginfo): Ditto.
2906 (linux_qxfer_spu): Ditto.
2907 (linux_qxfer_libraries_svr4): Ditto.
2908 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2909 moved to inferiors.h.
2910 (get_lwp): Delete.
2911 (get_thread_lwp): Update.
2912 (struct lwp_info): Delete member "entry". Simplify comment for
2913 member "thread".
2914 (all_lwps): Delete.
2915 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2916 current_inferior directly.
2917 (update_watch_registers_callback): Update, "entry" parameter is a
2918 struct thread_info * now. Fetch pid from thread.
2919 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2920 (mips_insert_point): Fetch lwpid from current_inferior.
2921 Pass &all_threads to find_inferior, not &all_lwps.
2922 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2923 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2924 directly.
2925 (mips_stopped_data_address): Ditto.
2926 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2927 directly.
2928 * linux-tile-low.c (tile_arch_setup): Ditto.
2929 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2930 (update_debug_registers_callback): Update, "entry" parameter is a
2931 struct thread_info * now. Fetch pid from thread.
2932 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2933 Pass &all_threads to find_inferior, not &all_lwps.
2934 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2935 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2936 Pass &all_threads to find_inferior, not &all_lwps.
2937 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2938 (i386_dr_low_get_status): Ditto.
2939 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2940 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2941 (x86_linux_read_description): Ditto.
2942 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2943
2944 2014-02-20 Doug Evans <dje@google.com>
2945
2946 * inferiors.c (get_first_inferior): Fix buglet.
2947
2948 2014-02-19 Doug Evans <dje@google.com>
2949
2950 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2951 * inferiors.c (add_thread): Change result type to struct thread_info *.
2952 All callers updated.
2953 (add_lwp): Call add_thread here instead of in callers.
2954 All callers updated.
2955 * linux-low.h (get_lwp_thread): Rewrite.
2956 (struct lwp_info): New member "thread".
2957
2958 2014-02-19 Doug Evans <dje@google.com>
2959
2960 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2961 All callers updated.
2962
2963 2014-02-19 Doug Evans <dje@google.com>
2964
2965 * inferiors.c (add_thread): Fix whitespace.
2966
2967 2014-02-19 Doug Evans <dje@google.com>
2968
2969 * dll.c (clear_dlls): Replace accessing list implemention details
2970 with API function.
2971 * gdbthread.h (get_first_thread): Declare.
2972 * inferiors.c (for_each_inferior_with_data): New function.
2973 (get_first_thread): New function.
2974 (find_thread_ptid): Simplify.
2975 (get_first_inferior): New function.
2976 (clear_list): Delete.
2977 (one_inferior_p): New function.
2978 (clear_inferior_list): New function.
2979 (clear_inferiors): Update.
2980 * inferiors.h (for_each_inferior_with_data): Declare.
2981 (clear_inferior_list): Declare.
2982 (one_inferior_p): Declare.
2983 (get_first_inferior): Declare.
2984 * linux-low.c (linux_wait_for_event): Replace accessing list
2985 implemention details with API function.
2986 * server.c (target_running): Ditto.
2987 (accumulate_file_name_length): New function.
2988 (emit_dll_description): New function.
2989 (handle_qxfer_libraries): Replace accessing list implemention
2990 details with API function.
2991 (handle_qxfer_threads_worker): New function.
2992 (handle_qxfer_threads_proper): Replace accessing list implemention
2993 details with API function.
2994 (handle_query): Ditto.
2995 (visit_actioned_threads_callback_ftype): New typedef.
2996 (visit_actioned_threads_data): New struct.
2997 (visit_actioned_threads): Rewrite to be find_inferior callback.
2998 (resume): Call find_inferior.
2999 (handle_status): Replace accessing list implemention
3000 details with API function.
3001 (process_serial_event): Replace accessing list implemention details
3002 with API function.
3003 * target.c (set_desired_inferior): Replace accessing list implemention
3004 details with API function.
3005 * tracepoint.c (same_process_p): New function.
3006 (gdb_agent_about_to_close): Replace accessing list implemention
3007 details with API function.
3008 * win32-low.c (child_delete_thread): Replace accessing list
3009 implemention details with API function.
3010 (match_dll_by_basename): New function.
3011 (dll_is_loaded_by_basename): New function.
3012 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3013 details call to dll_is_loaded_by_basename.
3014
3015 2014-02-19 Doug Evans <dje@google.com>
3016
3017 * dll.h (struct dll_info): Add comment.
3018 * gdbthread.h (struct thread_info): Add comment.
3019 (current_ptid): Simplify.
3020 * inferiors.c (add_process): Update.
3021 (remove_process): Update.
3022 * inferiors.h (struct process_info): Rename member "head" to "entry".
3023 * linux-low.c (delete_lwp): Update.
3024 (add_lwp): Update.
3025 (last_thread_of_process_p): Update.
3026 (kill_one_lwp_callback, linux_kill): Update.
3027 (status_pending_p_callback): Update.
3028 (wait_for_sigstop): Update. Simplify read of ptid.
3029 (start_step_over): Update.
3030 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3031 (get_lwp_thread): Update.
3032 (struct lwp_info): Rename member "head" to "entry".
3033 * regcache.h (inferior_list_entry): Delete.
3034 * server.c (kill_inferior_callback): Update.
3035 (detach_or_kill_inferior_callback): Update.
3036 (print_started_pid): Update.
3037 (print_attached_pid): Update.
3038 (process_serial_event): Simplify read of ptid.
3039 * thread-db.c (thread_db_create_event): Update.
3040 (thread_db_get_tls_address): Update.
3041 * win32-low.c (current_inferior_ptid): Simplify.
3042
3043 2014-02-19 Tom Tromey <tromey@redhat.com>
3044
3045 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3046 argument.
3047 (target_supports_btrace): Update.
3048
3049 2014-02-14 Yao Qi <yao@codesourcery.com>
3050
3051 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3052 (rsp-low-ipa.o): New target.
3053
3054 2014-02-12 Tom Tromey <tromey@redhat.com>
3055
3056 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3057 convert_ascii_to_int.
3058 * regcache.c (registers_to_string): Likewise.
3059 * remote-utils.c (decode_M_packet): Likewise.
3060 * server.c (process_serial_event): Likewise.
3061
3062 2014-02-12 Tom Tromey <tromey@redhat.com>
3063
3064 * server.c (handle_query, handle_v_run): Use hex2bin, not
3065 unhexify.
3066 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3067
3068 2014-02-12 Tom Tromey <tromey@redhat.com>
3069
3070 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3071 convert_int_to_ascii.
3072 * regcache.c (registers_to_string, collect_register_as_string):
3073 Likewise.
3074 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3075 Likewise.
3076 * server.c (process_serial_event): Likewise.
3077 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3078 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3079
3080 2014-02-12 Tom Tromey <tromey@redhat.com>
3081
3082 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3083 bin2hex, not hexify.
3084 * tracepoint.c (cmd_qtstatus): Likewise.
3085
3086 2014-02-12 Tom Tromey <tromey@redhat.com>
3087
3088 * remote-utils.c (monitor_output): Pass explicit length to
3089 hexify.
3090
3091 2014-02-12 Tom Tromey <tromey@redhat.com>
3092
3093 * tracepoint.c: Include rsp-low.h.
3094 * server.c: Include rsp-low.h.
3095 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3096 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3097 declare.
3098 * remote-utils.c: Include rsp-low.h.
3099 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3100 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3101 (convert_int_to_ascii, convert_ascii_to_int): Move to
3102 common/rsp-low.c.
3103 * regcache.c: Include rsp-low.h.
3104 * ax.c: Include rsp-low.h.
3105 * Makefile.in (SFILES): Add common/rsp-low.c.
3106 (OBS): Add rsp-low.o.
3107 (rsp-low.o): New target.
3108
3109 2014-02-12 Tom Tromey <tromey@redhat.com>
3110
3111 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3112 Include print-utils.h.
3113 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3114 (plongest, thirty_two, phex_nz): Remove.
3115 * Makefile.in (SFILES): Add common/print-utils.c.
3116 (OBS): Add print-utils.o.
3117 (print-utils-ipa.o): New target.
3118 (print-utils.o): New target.
3119 (IPA_OBJS): Add print-utils-ipa.o.
3120
3121 2014-02-06 Tom Tromey <tromey@redhat.com>
3122
3123 * Makefile.in (SFILES): Fix indentation.
3124
3125 2014-02-05 Doug Evans <dje@google.com>
3126
3127 * linux-low.c (linux_wait_for_event): Improve comment.
3128 (linux_wait_1): Keep current_inferior in sync with event_child.
3129
3130 2014-01-22 Doug Evans <dje@google.com>
3131
3132 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3133
3134 2014-01-22 Doug Evans <dje@google.com>
3135
3136 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3137 * configure: Regenerate.
3138 * config.in: Regenerate.
3139 * Makefile.in (SFILES): Add debug.c.
3140 (OBS): Add debug.o.
3141 * debug.c: New file.
3142 * debug.h: New file.
3143 * linux-aarch64-low.c (*): Update all debugging printfs to use
3144 debug_printf instead of fprintf.
3145 * linux-arm-low.c (*): Ditto.
3146 * linux-cris-low.c (*): Ditto.
3147 * linux-crisv32-low.c (*): Ditto.
3148 * linux-m32r-low.c (*): Ditto.
3149 * linux-sparc-low.c (*): Ditto.
3150 * linux-x86.c (*): Ditto.
3151 * linux-low.c (*): Ditto.
3152 (linux_wait_1): Add calls to debug_enter, debug_exit.
3153 (linux_wait): Remove redundant debugging printf.
3154 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3155 (linux_resume, unstop_all_lwps): Ditto.
3156 * mem-break.c (*): Update all debugging printfs to use
3157 debug_printf instead of fprintf.
3158 * remote-utils.c (*): Ditto.
3159 * thread-db.c (*): Ditto.
3160 * server.c #include <ctype.h>, "gdb_vecs.h".
3161 (debug_threads): Moved to debug.c.
3162 (*): Update all debugging printfs to use debug_printf instead of
3163 fprintf.
3164 (start_inferior): Replace call to fflush with call to debug_flush.
3165 (monitor_show_help): Mention set debug-format.
3166 (parse_debug_format_options): New function.
3167 (handle_monitor_command): Handle "monitor set debug-format".
3168 (gdbserver_usage): Mention --debug-format.
3169 (main): Parse --debug-format.
3170 * server.h (debug_threads): Declaration moved to debug.h.
3171 #include "debug.h".
3172 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3173 trace_debug_1 that uses debug_printf.
3174 (tracepoint_look_up_symbols): Update all debugging printfs to use
3175 debug_printf instead of fprintf.
3176
3177 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3178
3179 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3180 sys/ptrace.h.
3181
3182 2014-01-17 Pedro Alves <palves@redhat.com>
3183
3184 PR build/16445
3185 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3186 defined after including gdb_proc_service.h.
3187
3188 2014-01-16 Doug Evans <dje@google.com>
3189
3190 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3191 (match_dll): Use it.
3192
3193 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3194
3195 * target.h (target_ops) <read_btrace>: Change parameters and
3196 return type to allow error reporting.
3197 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3198 trace reading errors on.
3199 * linux-low.c (linux_low_read_btrace): Pass trace reading
3200 errors on.
3201 (linux_low_disable_btrace): New.
3202
3203 2014-01-15 Doug Evans <dje@google.com>
3204
3205 * inferiors.c (thread_id_to_gdb_id): Delete.
3206 * inferiors.h (thread_id_to_gdb_id): Delete.
3207
3208 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3209
3210 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3211 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3212 versions.
3213
3214 2014-01-08 Pedro Alves <palves@redhat.com>
3215
3216 * server.c (handle_status): Don't discard previous queued stop
3217 replies or thread's pending status here.
3218 (main) <disconnection>: Do it here instead.
3219
3220 2014-01-08 Pedro Alves <palves@redhat.com>
3221
3222 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3223 * server.c (visit_actioned_threads, handle_pending_status): New
3224 function.
3225 (handle_v_cont): Factor out parts to ...
3226 (resume): ... this new function. If in all-stop, and a thread
3227 being resumed has a pending status, report it without actually
3228 resuming.
3229 (myresume): Adjust to use the new 'resume' function.
3230 (clear_pending_status_callback, set_pending_status_callback)
3231 (find_status_pending_thread_callback): New functions.
3232 (handle_status): Handle the case of multiple threads having
3233 interesting statuses to report. Report threads' real last signal
3234 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3235 with an interesting thread to report the status for, instead of
3236 always reporting the status of the first thread.
3237
3238 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3239
3240 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3241 * gdbreplay.c (gdbreplay_version): Likewise.
3242
3243 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3244
3245 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3246 iov.iov_len with the real length in use.
3247
3248 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3249
3250 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3251 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3252 for all targets that use win32-low.c.
3253 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3254 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3255
3256 2013-12-13 Pedro Alves <palves@redhat.com>
3257
3258 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3259 if equal to TARGET_WAITKIND_LOADED.
3260 * win32-low.c (cached_status): New static global.
3261 (win32_wait): Add declaration.
3262 (do_initial_child_stuff): Flush all initial pending debug events
3263 up to the initial breakpoint.
3264 (win32_wait): If CACHED_STATUS was set, return that instead
3265 of doing a real wait. Remove the code resuming the execution
3266 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3267 during the initial phase. Also remove the code changing
3268 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3269 TARGET_WAITKIND_STOPPED.
3270
3271 2013-12-11 Yao Qi <yao@codesourcery.com>
3272
3273 * notif.c (handle_notif_ack): Return 0 if no notification
3274 matches.
3275
3276 2013-11-20 Doug Evans <dje@google.com>
3277
3278 * linux-low.c (linux_set_resume_request): Fix comment.
3279
3280 2013-11-20 Doug Evans <dje@google.com>
3281
3282 * linux-low.c (resume_status_pending_p): Tweak comment.
3283
3284 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3285
3286 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3287 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3288 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3289 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3290 (srv_amd64_regobj): Add amd64-mpx.o.
3291 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3292 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3293 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3294 * i387-fp.c (num_pl_bnd_register) Added constant.
3295 (num_pl_bnd_cfg_registers) Added constant.
3296 (struct i387_xsave) Added reserved area and MPX fields.
3297 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3298 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3299 function.
3300 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3301 (init_registers_amd64_mpx_linux): Declare new function.
3302 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3303 (x86_64_regmap): Add MPX registers.
3304 (x86_linux_read_description): Add MPX case.
3305 (initialize_low_arch): Initialize MPX targets.
3306
3307 2013-11-18 Tom Tromey <tromey@redhat.com>
3308
3309 * configure: Rebuild.
3310 * configure.ac: Don't check for stdlib.h.
3311 * gdbreplay.c: Unconditionally include stdlib.h.
3312
3313 2013-11-18 Tom Tromey <tromey@redhat.com>
3314
3315 * config.in: Rebuild.
3316 * configure: Rebuild.
3317 * configure.ac: Don't use AC_HEADER_DIRENT.
3318
3319 2013-11-18 Tom Tromey <tromey@redhat.com>
3320
3321 * server.h: Don't check HAVE_STRING_H.
3322 * gdbreplay.c: Don't check HAVE_STRING_H.
3323 * configure: Rebuild.
3324
3325 2013-11-18 Tom Tromey <tromey@redhat.com>
3326
3327 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3328 LIBGNU.
3329
3330 2013-11-08 Tom Tromey <tromey@redhat.com>
3331
3332 * configure, config.in: Rebuild.
3333 * configure.ac: Remove unused configury.
3334
3335 2013-11-08 Tom Tromey <tromey@redhat.com>
3336
3337 * acinclude.m4: Include common.m4, codeset.m4.
3338 * configure, config.in: Rebuild.
3339 * configure.ac: Use GDB_AC_COMMON.
3340
3341 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3342
3343 * linux-s390-low.c (HWCAP_S390_TE): New define.
3344 (s390_arch_setup): Consider the TE field in the HWCAP for
3345 determining 'have_regset_tdb'.
3346
3347 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3348
3349 PR gdb/16014
3350 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3351 call to sizeof.
3352
3353 2013-10-02 Pedro Alves <palves@redhat.com>
3354
3355 * server.c (process_serial_event): Don't output "GDBserver
3356 exiting" if GDB is connected through stdio.
3357 * target.c (mywait): Likewise, be silent if GDB is connected
3358 through stdio.
3359
3360 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3361
3362 * lynx-low.c (lynx_add_threads_after_attach): New function.
3363 (lynx_attach): Remove call to add_thread. Add call to
3364 lynx_add_threads_after_attach instead.
3365
3366 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3367
3368 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3369 * config.in, configure: Regenerated.
3370
3371 2013-09-18 Yao Qi <yao@codesourcery.com>
3372
3373 PR server/15959
3374 * server.c (start_inferior): Clear 'resume_info'.
3375
3376 2013-09-16 Jiong Wang <jiwang@tilera.com>
3377
3378 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3379 for each register.
3380
3381 2013-09-16 Jiong Wang <jiwang@tilera.com>
3382
3383 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3384 linux-tile-low.o to srv_tgtobj.
3385
3386 2013-09-16 Will Newton <will.newton@linaro.org>
3387
3388 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3389 out regs.
3390
3391 2013-09-06 Pedro Alves <palves@redhat.com>
3392
3393 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3394 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3395 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3396 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3397 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3398 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3399
3400 2013-09-06 Pedro Alves <palves@redhat.com>
3401
3402 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3403 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3404
3405 2013-09-06 Pedro Alves <palves@redhat.com>
3406
3407 * linux-amd64-ipa.c: Include tracepoint.h.
3408 * linux-i386-ipa.c: Include tracepoint.h.
3409
3410 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3411
3412 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3413 (ps_get_thread_area): New function.
3414
3415 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3416
3417 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3418 (initialize_low_arch): Call init_registers_crisv32 rather than
3419 init_register_crisv32.
3420
3421 2013-09-05 Pedro Alves <palves@redhat.com>
3422
3423 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3424 to ...
3425 * hostio.h: ... this new file.
3426 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3427 win32-low.c: Include hostio.h.
3428
3429 2013-09-05 Pedro Alves <palves@redhat.com>
3430
3431 * server.h (gdb_client_data, handler_func, callback_handler_func)
3432 (delete_file_handler, add_file_handler, append_callback_event)
3433 (delete_callback_event, start_event_loop, initialize_event_loop):
3434 Move to event-loop.h and include it.
3435 * event-loop.h: New file.
3436
3437 2013-09-05 Pedro Alves <palves@redhat.com>
3438
3439 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3440 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3441 (loaded_dll, unloaded_dll): Move to ...
3442 * dll.h: ... this new file.
3443 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3444
3445 2013-09-05 Pedro Alves <palves@redhat.com>
3446
3447 * server.h (current_process, get_thread_process, all_processes)
3448 (add_inferior_to_list, for_each_inferior, current_inferior)
3449 (remove_inferior, add_process, remove_process, find_process_pid)
3450 (have_started_inferiors_p, have_attached_inferiors_p)
3451 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3452 (clear_inferiors, find_inferior, find_inferior_id)
3453 (inferior_target_data, set_inferior_target_data)
3454 (inferior_regcache_data, set_inferior_regcache_data): Move to
3455 inferiors.h, and include it.
3456 * inferiors.h: New file.
3457
3458 2013-09-05 Pedro Alves <palves@redhat.com>
3459
3460 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3461 Move ...
3462 * ax.h: ... here.
3463
3464 2013-09-05 Pedro Alves <palves@redhat.com>
3465
3466 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3467 tracepoint.h.
3468 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3469 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3470 (handle_tracepoint_general_set, handle_tracepoint_query)
3471 (tracepoint_finished_step, tracepoint_was_hit)
3472 (release_while_stepping_state_list, current_traceframe)
3473 (in_readonly_region, traceframe_read_mem)
3474 (fetch_traceframe_registers, traceframe_read_sdata)
3475 (traceframe_read_info, struct fast_tpoint_collect_status)
3476 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3477 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3478 (supply_fast_tracepoint_registers)
3479 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3480 (ipa_tdesc, claim_trampoline_space)
3481 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3482 (agent_mem_read, agent_get_trace_state_variable_value)
3483 (agent_set_trace_state_variable_value, agent_tsv_read)
3484 (agent_mem_read_string, get_raw_reg_func_addr)
3485 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3486 * tracepoint.h: ... this new file.
3487
3488 2013-09-05 Pedro Alves <palves@redhat.com>
3489
3490 * server.h (perror_with_name, error, fatal, warning, paddress)
3491 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3492 include it.
3493 * utils.h: New file.
3494
3495 2013-09-05 Pedro Alves <palves@redhat.com>
3496
3497 * server.h (remote_debug, noack_mode, transport_is_reliable)
3498 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3499 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3500 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3501 (write_enn, initialize_async_io, enable_async_io)
3502 (disable_async_io, check_remote_input_interrupt_request)
3503 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3504 (dead_thread_notify, prepare_resume_reply)
3505 (decode_address_to_semicolon, decode_address, decode_m_packet)
3506 (decode_M_packet, decode_X_packet, decode_xfer_write)
3507 (decode_search_memory_packet, unhexify, hexify)
3508 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3509 (look_up_one_symbol, relocate_instruction)
3510 (monitor_output): Move to remote-utils.h, and include it.
3511 * remote-utils.h: New file.
3512
3513 2013-09-05 Pedro Alves <palves@redhat.com>
3514
3515 * server.h (_): Delete.
3516
3517 2013-09-02 Pedro Alves <palves@redhat.com>
3518
3519 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3520 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3521 allocated.
3522 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3523
3524 2013-09-02 Pierre Muller <muller@sourceware.org>
3525
3526 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3527 or WriteProcessMemory complete successfully and handle
3528 ERROR_PARTIAL_COPY error.
3529
3530 2013-09-02 Pedro Alves <palves@redhat.com>
3531
3532 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3533 error instead of EIO.
3534
3535 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3536
3537 PR server/15604
3538 * linux-low.c: Include filestuff.h.
3539 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3540 * lynx-low.c: Include filestuff.h.
3541 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3542 * server.c: Include filestuff.h.
3543 (main): Call notice_open_fds.
3544 * spu-low.c: Include filestuff.h.
3545 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3546
3547 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3548
3549 * Makefile.in: Explain why ../target and ../nat are not
3550 listed as include file search paths.
3551 (linux-waitpid.o): New object file rule.
3552 * configure.srv (srv_native_linux_obj): New variable.
3553 Replace all occurrences of linux native object files with
3554 $srv_native_linux_obj.
3555 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3556 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3557 (linux_enable_event_reporting): Remove declaration.
3558 (my_waitpid): Moved to common/linux-waitpid.c.
3559 (linux_wait_for_event): Pass ptid when calling
3560 linux_enable_event_reporting.
3561 (linux_supports_tracefork_flag): Remove.
3562 (linux_enable_event_reporting): Likewise.
3563 (linux_tracefork_grandchild): Remove.
3564 (STACK_SIZE): Moved to common/linux-ptrace.c.
3565 (linux_tracefork_child): Remove.
3566 (linux_test_for_tracefork): Remove.
3567 (linux_look_up_symbols): Call linux_supports_traceclone.
3568 (initialize_low): Remove call to linux_test_for_tracefork.
3569 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3570 common/linux-ptrace.h.
3571 (PTRACE_TYPE_ARG4): Likewise.
3572 Include linux-ptrace.h.
3573
3574 2013-08-21 Pedro Alves <palves@redhat.com>
3575
3576 * config.in: Renegerate.
3577
3578 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3579
3580 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3581 (SFILES): Remove $(srcdir)/common/target-common.c and
3582 add $(srcdir)/target/waitstatus.c.
3583 (OBS): Remove target-common.o and add waitstatus.o.
3584 (server_h): Remove $(srcdir)/../common/target-common.h and
3585 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3586 and $(srcdir)/../target/waitstatus.h.
3587 (target-common.o): Remove.
3588 (waitstatus.o): New target object file.
3589 * target.h: Do not include target-common.h and
3590 include target/resume.h, target/wait.h and
3591 target/waitstatus.h.
3592
3593 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3594
3595 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3596 to PTRACE_TYPE_ARG3.
3597 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3598 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3599 PTRACE_TYPE_ARG4.
3600 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3601 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3602
3603 2013-07-27 Jie Zhang <jie@codesourcery.com>
3604 Daniel Jacobowitz <dan@codesourcery.com>
3605 Yao Qi <yao@codesourcery.com>
3606
3607 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3608 (mips-linux-watch.o): New rule.
3609 (mips_linux_watch_h): New variable.
3610 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3611 srv_tgtobj.
3612 * linux-mips-low.c: Include mips-linux-watch.h.
3613 (struct arch_process_info, struct arch_lwp_info): New.
3614 (update_watch_registers_callback): New function.
3615 (mips_linux_new_process, mips_linux_new_thread) New functions.
3616 (mips_linux_prepare_to_resume, mips_insert_point): New
3617 functions.
3618 (mips_remove_point, mips_stopped_by_watchpoint): New
3619 functions.
3620 (rsp_bp_type_to_target_hw_bp_type): New function.
3621 (mips_stopped_data_address): New function.
3622 (the_low_target): Add watchpoint support functions.
3623
3624 2013-07-27 Yao Qi <yao@codesourcery.com>
3625
3626 * i386-low.c: Include break-common.h.
3627 (enum target_hw_bp_type): Remove.
3628
3629 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3630
3631 * Makefile.in (SFILES): /common/target-common.c.
3632 (OBS): Add target-common.o.
3633 (server_h): Add $(srcdir)/../common/target-common.h.
3634 (target-common.o): New target.
3635 * server.c (queue_stop_reply_callback): Free
3636 status string after use.
3637 * target.c (target_waitstatus_to_string): Remove.
3638 * target.h: Include target-common.h.
3639 (resume_kind): Likewise.
3640 (target_waitkind): Likewise.
3641 (target_waitstatus): Likewise.
3642 (TARGET_WNOHANG): Likewise.
3643
3644 2013-07-04 Yao Qi <yao@codesourcery.com>
3645
3646 * Makefile.in (host_alias): Use @host_noncanonical@.
3647 (target_alias): Use @target_noncanonical@.
3648 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3649 ACX_NONCANONICAL_HOST.
3650 * configure: Regenerated.
3651
3652 Revert:
3653 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3654
3655 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3656 * configure: Rebuild.
3657 * Makefile.in (version_host, version_target): Get from configure.
3658 (version.c): Use $(version_host) and $(version_target).
3659
3660 2013-07-03 Pedro Alves <palves@redhat.com>
3661
3662 * Makefile.in (config.status): Depend on development.sh.
3663 * acinclude.m4: Include libmcheck.m4.
3664 * configure: Regenerate.
3665
3666 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3667
3668 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3669 attribute inside the parentheses.
3670 (winapi_DebugSetProcessKillOnExit): Ditto.
3671 (winapi_DebugBreakProcess): Ditto.
3672 (winapi_GenerateConsoleCtrlEvent): Ditto.
3673
3674 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3675
3676 * notif.h (notif_event): Add a dummy member to avoid compiler
3677 errors.
3678
3679 2013-07-01 Pedro Alves <palves@redhat.com>
3680
3681 * hostio.c (HOSTIO_PATH_MAX): Define.
3682 (require_filename, handle_open, handle_unlink, handle_readlink):
3683 Use it.
3684
3685 2013-07-01 Pedro Alves <palves@redhat.com>
3686
3687 * server.h: Include "pathmax.h".
3688 * linux-low.c: Don't include sys/param.h.
3689 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3690 MAXPATHLEN.
3691 * win32-low.c: Don't include sys/param.h.
3692 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3693
3694 2013-07-01 Pedro Alves <palves@redhat.com>
3695
3696 * event-loop.c: Don't check HAVE_UNISTD_H before including
3697 <unistd.h>.
3698 * gdbreplay.c: Likewise.
3699 * remote-utils.c: Likewise.
3700 * server.c: Likewise.
3701 * configure.ac: Don't check for unistd.h.
3702 * configure: Regenerate.
3703
3704 2013-06-28 Tom Tromey <tromey@redhat.com>
3705
3706 * Makefile.in (version.c): Use version.in, not
3707 common/version.in.
3708
3709 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3710
3711 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3712 * configure: Rebuild.
3713 * Makefile.in (version_host, version_target): Get from configure.
3714 (version.c): Use $(version_host) and $(version_target).
3715
3716 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3717
3718 Fix trace-status to output user name without trailing colon.
3719 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3720
3721 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3722
3723 Fix trace-status to output proper start-time and stop-time.
3724 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3725 output start time and stop time in hex as gdb expects.
3726
3727 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3728
3729 * tracepoint.c (build_traceframe_info_xml): Output trace state
3730 variables present in the trace buffer.
3731
3732 2013-06-24 Tom Tromey <tromey@redhat.com>
3733
3734 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3735 create-version.sh.
3736 (version.o): Remove.
3737 * gdbreplay.c: Include version.h.
3738 (version, host_name): Don't declare.
3739 * server.h: Include version.h.
3740 (version, host_name): Don't declare.
3741
3742 2013-06-12 Pedro Alves <palves@redhat.com>
3743
3744 * linux-x86-low.c (linux_is_elf64): Delete global.
3745 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3746 with local linux_pid_exe_is_elf_64_file use.
3747
3748 2013-06-11 Pedro Alves <palves@redhat.com>
3749
3750 * linux-low.c (regset_disabled, disable_regset): New functions.
3751 (regsets_fetch_inferior_registers)
3752 (regsets_store_inferior_registers): Use them.
3753 (initialize_regsets_info); Don't allocate the disabled_regsets
3754 array here.
3755 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3756 comment.
3757
3758 2013-06-11 Pedro Alves <palves@redhat.com>
3759
3760 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3761 xmalloc.
3762
3763 2013-06-11 Pedro Alves <palves@redhat.com>
3764
3765 * linux-x86-low.c (initialize_low_arch): Call
3766 init_registers_x32_avx_linux.
3767
3768 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3769
3770 Fix compatibility with Android Bionic.
3771 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3772 it is not empty.
3773
3774 2013-06-07 Pedro Alves <palves@redhat.com>
3775
3776 PR server/14823
3777 * Makefile.in (OBS): Add tdesc.o.
3778 (IPA_OBJS): Add tdesc-ipa.o.
3779 (tdesc-ipa.o): New rule.
3780 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3781 interface.
3782 * linux-low.c (new_inferior): Delete.
3783 (disabled_regsets, num_regsets): Delete.
3784 (linux_add_process): Adjust to set the new per-process
3785 new_inferior flag.
3786 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3787 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3788 was a stop. When calling arch_setup, switch the current inferior
3789 to the thread that got an event.
3790 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3791 (regsets_fetch_inferior_registers)
3792 (regsets_store_inferior_registers): New regsets_info parameter.
3793 Adjust to use it.
3794 (linux_register_in_regsets): New regs_info parameter. Adjust to
3795 use it.
3796 (register_addr, fetch_register, store_register): New usrregs_info
3797 parameter. Adjust to use it.
3798 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3799 parameter regs_info. Adjust to use it.
3800 (linux_fetch_registers): Get the current inferior's regs_info, and
3801 adjust to use it.
3802 (linux_store_registers): Ditto.
3803 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3804 (initialize_low): Don't initialize the target_regsets here. Call
3805 initialize_low_arch.
3806 * linux-low.h (target_regsets): Delete declaration.
3807 (struct regsets_info): New.
3808 (struct usrregs_info): New.
3809 (struct regs_info): New.
3810 (struct process_info_private) <new_inferior>: New field.
3811 (struct linux_target_ops): Delete the num_regs, regmap, and
3812 regset_bitmap fields. New field regs_info.
3813 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3814 * i387-fp.c (num_xmm_registers): Delete.
3815 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3816 calls to new interface.
3817 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3818 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3819 Infer the number of xmm registers from the regcache's target
3820 description.
3821 * i387-fp.h (num_xmm_registers): Delete.
3822 * inferiors.c (add_thread): Don't install the thread's regcache
3823 here.
3824 * proc-service.c (gregset_info): Fetch the current inferior's
3825 regs_info. Adjust to use it.
3826 * regcache.c: Include tdesc.h.
3827 (register_bytes, reg_defs, num_registers)
3828 (gdbserver_expedite_regs): Delete.
3829 (get_thread_regcache): If the thread doesn't have a regcache yet,
3830 create one, instead of aborting gdbserver.
3831 (regcache_invalidate_one): Rename to ...
3832 (regcache_invalidate_thread): ... this.
3833 (regcache_invalidate_one): New.
3834 (regcache_invalidate): Only invalidate registers of the current
3835 process.
3836 (init_register_cache): Add target_desc parameter, and use it.
3837 (new_register_cache): Ditto. Assert the target description has a
3838 non zero registers_size.
3839 (regcache_cpy): Add assertions. Adjust.
3840 (realloc_register_cache, set_register_cache): Delete.
3841 (registers_to_string, registers_from_string): Adjust.
3842 (find_register_by_name, find_regno, find_register_by_number)
3843 (register_cache_size): Add target_desc parameter, and use it.
3844 (free_register_cache_thread, free_register_cache_thread_one)
3845 (regcache_release, register_cache_size): New.
3846 (register_size): Add target_desc parameter, and use it.
3847 (register_data, supply_register, supply_register_zeroed)
3848 (supply_regblock, supply_register_by_name, collect_register)
3849 (collect_register_as_string, collect_register_by_name): Adjust.
3850 * regcache.h (struct target_desc): Forward declare.
3851 (struct regcache) <tdesc>: New field.
3852 (init_register_cache, new_register_cache): Add target_desc
3853 parameter.
3854 (regcache_invalidate_thread): Declare.
3855 (regcache_invalidate_one): Delete declaration.
3856 (regcache_release): Declare.
3857 (find_register_by_number, register_cache_size, register_size)
3858 (find_regno): Add target_desc parameter.
3859 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3860 declarations.
3861 * remote-utils.c: Include tdesc.h.
3862 (outreg, prepare_resume_reply): Adjust.
3863 * server.c: Include tdesc.h.
3864 (gdbserver_xmltarget): Delete declaration.
3865 (get_features_xml, process_serial_event): Adjust.
3866 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3867 declare.
3868 (struct process_info) <tdesc>: New field.
3869 (ipa_tdesc): Declare.
3870 * tdesc.c: New file.
3871 * tdesc.h: New file.
3872 * tracepoint.c: Include tdesc.h.
3873 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3874 (get_context_regcache): Adjust to pass ipa_tdesc down.
3875 (do_action_at_tracepoint): Adjust to get the register cache size
3876 from the context regcache's description.
3877 (traceframe_walk_blocks): Adjust to get the register cache size
3878 from the current trace frame's description.
3879 (traceframe_get_pc): Adjust to get current trace frame's
3880 description and pass it down.
3881 (gdb_collect): Adjust to get the register cache size from the
3882 IPA's description.
3883 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3884 (gdbserver_xmltarget): Delete.
3885 (initialize_low_tracepoint): Set the ipa's target description.
3886 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3887 (initialize_low_tracepoint): Set the ipa's target description.
3888 * linux-x86-low.c: Include tdesc.h.
3889 [__x86_64__] (is_64bit_tdesc): New.
3890 (ps_get_thread_area, x86_get_thread_area): Use it.
3891 (i386_cannot_store_register): Rename to ...
3892 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3893 (i386_cannot_fetch_register): Rename to ...
3894 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3895 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3896 to new interface.
3897 (target_regsets): Rename to ...
3898 (x86_regsets): ... this.
3899 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3900 interface.
3901 (x86_siginfo_fixup): Use is_64bit_tdesc.
3902 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3903 (tdesc_x32_avx_linux, tdesc_x32_linux)
3904 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3905 Declare.
3906 (x86_linux_update_xmltarget): Delete.
3907 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3908 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3909 (AMD64_LINUX_USER64_CS): New.
3910 (x86_linux_read_description): New, based on
3911 x86_linux_update_xmltarget.
3912 (same_process_callback): New.
3913 (x86_arch_setup_process_callback): New.
3914 (x86_linux_update_xmltarget): New.
3915 (x86_regsets_info): New.
3916 (amd64_linux_regs_info): New.
3917 (i386_linux_usrregs_info): New.
3918 (i386_linux_regs_info): New.
3919 (x86_linux_regs_info): New.
3920 (x86_arch_setup): Reimplement.
3921 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3922 (x86_emit_ops): Ditto.
3923 (the_low_target): Adjust. Install x86_linux_regs_info,
3924 x86_cannot_fetch_register, and x86_cannot_store_register.
3925 (initialize_low_arch): New.
3926 * linux-ia64-low.c (tdesc_ia64): Declare.
3927 (ia64_fetch_register): Adjust.
3928 (ia64_usrregs_info, regs_info): New globals.
3929 (ia64_regs_info): New function.
3930 (the_low_target): Adjust.
3931 (initialize_low_arch): New function.
3932 * linux-sparc-low.c (tdesc_sparc64): Declare.
3933 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3934 Adjust.
3935 (sparc_arch_setup): New function.
3936 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3937 (the_low_target): Adjust.
3938 (initialize_low_arch): New function.
3939 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3940 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3941 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3942 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3943 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3944 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3945 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3946 (tdesc_powerpc_isa205_vsx64l): Declare.
3947 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3948 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3949 (ppc_set_pc, ppc_get_hwcap): Adjust.
3950 (ppc_usrregs_info): Forward declare.
3951 (!__powerpc64__) ppc_regmap_adjusted: New global.
3952 (ppc_arch_setup): Adjust to the current process'es target
3953 description.
3954 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3955 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3956 (ppc_store_evrregset): Adjust.
3957 (target_regsets): Rename to ...
3958 (ppc_regsets): ... this, and make static.
3959 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3960 (ppc_regs_info): New function.
3961 (the_low_target): Adjust.
3962 (initialize_low_arch): New function.
3963 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3964 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3965 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3966 (tdesc_s390x_linux64v2): Declare.
3967 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3968 (s390_fill_gregset, s390_store_last_break): Adjust.
3969 (target_regsets): Rename to ...
3970 (s390_regsets): ... this, and make static.
3971 (s390_get_pc, s390_set_pc): Adjust.
3972 (s390_get_hwcap): New target_desc parameter, and use it.
3973 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3974 (s390_arch_setup): Adjust to set the current process'es target
3975 description. Don't adjust the regmap.
3976 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3977 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3978 (regs_info_3264): New globals.
3979 (s390_regs_info): New function.
3980 (the_low_target): Adjust.
3981 (initialize_low_arch): New function.
3982 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3983 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3984 [__mips64] (init_registers_mips_linux)
3985 (init_registers_mips_dsp_linux): Delete defines.
3986 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3987 (have_dsp): New global.
3988 (mips_read_description): New, based on mips_arch_setup.
3989 (mips_arch_setup): Reimplement.
3990 (get_usrregs_info): New function.
3991 (mips_cannot_fetch_register, mips_cannot_store_register)
3992 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3993 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3994 (target_regsets): Rename to ...
3995 (mips_regsets): ... this, and make static.
3996 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3997 (dsp_regs_info, regs_info): New globals.
3998 (mips_regs_info): New function.
3999 (the_low_target): Adjust.
4000 (initialize_low_arch): New function.
4001 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4002 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4003 Declare.
4004 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4005 (arm_read_description): New, with bits factored from
4006 arm_arch_setup.
4007 (arm_arch_setup): Reimplement.
4008 (target_regsets): Rename to ...
4009 (arm_regsets): ... this, and make static.
4010 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4011 (arm_regs_info): New function.
4012 (the_low_target): Adjust.
4013 (initialize_low_arch): New function.
4014 * linux-m68k-low.c (tdesc_m68k): Declare.
4015 (target_regsets): Rename to ...
4016 (m68k_regsets): ... this, and make static.
4017 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4018 (m68k_regs_info): New function.
4019 (m68k_arch_setup): New function.
4020 (the_low_target): Adjust.
4021 (initialize_low_arch): New function.
4022 * linux-sh-low.c (tdesc_sharch): Declare.
4023 (target_regsets): Rename to ...
4024 (sh_regsets): ... this, and make static.
4025 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4026 (sh_regs_info, sh_arch_setup): New functions.
4027 (the_low_target): Adjust.
4028 (initialize_low_arch): New function.
4029 * linux-bfin-low.c (tdesc_bfin): Declare.
4030 (bfin_arch_setup): New function.
4031 (bfin_usrregs_info, regs_info): New globals.
4032 (bfin_regs_info): New function.
4033 (the_low_target): Adjust.
4034 (initialize_low_arch): New function.
4035 * linux-cris-low.c (tdesc_cris): Declare.
4036 (cris_arch_setup): New function.
4037 (cris_usrregs_info, regs_info): New globals.
4038 (cris_regs_info): New function.
4039 (the_low_target): Adjust.
4040 (initialize_low_arch): New function.
4041 * linux-cris-low.c (tdesc_crisv32): Declare.
4042 (cris_arch_setup): New function.
4043 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4044 (cris_regs_info): New function.
4045 (the_low_target): Adjust.
4046 (initialize_low_arch): New function.
4047 * linux-m32r-low.c (tdesc_m32r): Declare.
4048 (m32r_arch_setup): New function.
4049 (m32r_usrregs_info, regs_info): New globals.
4050 (m32r_regs_info): Adjust.
4051 (initialize_low_arch): New function.
4052 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4053 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4054 (tic6x_usrregs_info): Forward declare.
4055 (tic6x_read_description): New function, based on ...
4056 (tic6x_arch_setup): ... this. Reimplement.
4057 (target_regsets): Rename to ...
4058 (tic6x_regsets): ... this, and make static.
4059 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4060 (tic6x_regs_info): New function.
4061 (the_low_target): Adjust.
4062 (initialize_low_arch): New function.
4063 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4064 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4065 (target_regsets): Rename to ...
4066 (xtensa_regsets): ... this, and make static.
4067 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4068 globals.
4069 (xtensa_arch_setup, xtensa_regs_info): New functions.
4070 (the_low_target): Adjust.
4071 (initialize_low_arch): New function.
4072 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4073 (nios2_arch_setup): Set the current process'es tdesc.
4074 (target_regsets): Rename to ...
4075 (nios2_regsets): ... this.
4076 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4077 (nios2_regs_info): New function.
4078 (the_low_target): Adjust.
4079 (initialize_low_arch): New function.
4080 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4081 (aarch64_arch_setup): Set the current process'es tdesc.
4082 (target_regsets): Rename to ...
4083 (aarch64_regsets): ... this.
4084 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4085 (aarch64_regs_info): New function.
4086 (the_low_target): Adjust.
4087 (initialize_low_arch): New function.
4088 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4089 globals.
4090 (target_regsets): Rename to ...
4091 (tile_regsets): ... this.
4092 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4093 (tile_regs_info): New function.
4094 (tile_arch_setup): Set the current process'es tdesc.
4095 (the_low_target): Adjust.
4096 (initialize_low_arch): New function.
4097 * spu-low.c (tdesc_spu): Declare.
4098 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4099 * win32-arm-low.c (tdesc_arm): Declare.
4100 (arm_arch_setup): New function.
4101 (the_low_target): Install arm_arch_setup instead of
4102 init_registers_arm.
4103 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4104 (init_windows_x86): Rename to ...
4105 (i386_arch_setup): ... this. Set `win32_tdesc'.
4106 (the_low_target): Adjust.
4107 * win32-low.c (win32_tdesc): New global.
4108 (child_add_thread): Don't create the thread cache here.
4109 (do_initial_child_stuff): Set the new process'es tdesc.
4110 * win32-low.h (struct target_desc): Forward declare.
4111 (win32_tdesc): Declare.
4112 * lynx-i386-low.c (tdesc_i386): Declare global.
4113 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4114 * lynx-low.c (lynx_tdesc): New global.
4115 (lynx_add_process): Set the new process'es tdesc.
4116 * lynx-low.h (struct target_desc): Forward declare.
4117 (lynx_tdesc): Declare global.
4118 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4119 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4120 * nto-low.c (nto_tdesc): New global.
4121 (do_attach): Set the new process'es tdesc.
4122 * nto-low.h (struct target_desc): Forward declare.
4123 (nto_tdesc): Declare.
4124 * nto-x86-low.c (tdesc_i386): Declare.
4125 (nto_x86_arch_setup): Set `nto_tdesc'.
4126
4127 2013-06-04 Gary Benson <gbenson@redhat.com>
4128
4129 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4130 to qSupported response when appropriate.
4131 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4132 with nonzero-length annex.
4133 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4134 arguments supplied in annex.
4135
4136 2013-05-31 Doug Evans <dje@google.com>
4137
4138 PR server/15594
4139 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4140 64 bits in 64-cross-32 environment.
4141
4142 2013-05-28 Pedro Alves <palves@redhat.com>
4143
4144 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4145 (aarch64-without-fpu.c): Delete rule.
4146 * configure.srv (aarch64*-*-linux*): Remove references to
4147 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4148 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4149 declaration.
4150
4151 2013-05-24 Pedro Alves <palves@redhat.com>
4152
4153 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4154 instead of strchr/decode_address. Error if the range isn't split
4155 with a ','. Don't assume there's be a ':' in the action.
4156
4157 2013-05-23 Yao Qi <yao@codesourcery.com>
4158 Pedro Alves <palves@redhat.com>
4159
4160 * linux-low.c (lwp_in_step_range): New function.
4161 (linux_wait_1): If the thread was range stepping and stopped
4162 outside the stepping range, report the stop to GDB. Otherwise,
4163 continue stepping. Add range stepping debug output.
4164 (linux_set_resume_request): Copy the step range from the resume
4165 request to the lwp.
4166 (linux_supports_range_stepping): New.
4167 (linux_target_ops) <supports_range_stepping>: Set to
4168 linux_supports_range_stepping.
4169 * linux-low.h (struct linux_target_ops)
4170 <supports_range_stepping>: New field.
4171 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4172 * linux-x86-low.c (x86_supports_range_stepping): New.
4173 (the_low_target) <supports_range_stepping>: Set to
4174 x86_supports_range_stepping.
4175 * server.c (handle_v_cont): Handle 'r' action.
4176 (handle_v_requests): Append ";r" if the target supports range
4177 stepping.
4178 * target.h (struct thread_resume) <step_range_start,
4179 step_range_end>: New fields.
4180 (struct target_ops) <supports_range_stepping>:
4181 New field.
4182 (target_supports_range_stepping): New macro.
4183
4184 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4185
4186 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4187 confusion in comment.
4188
4189 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4190
4191 * lynx-low.c (struct process_info_private): New type.
4192 (lynx_add_process): New function.
4193 (lynx_create_inferior, lynx_attach): Replace calls to
4194 add_process by calls to lynx_add_process.
4195 (lynx_resume): If PTID is null, then try using
4196 current_process()->private->last_wait_event_ptid.
4197 Add comments.
4198 (lynx_clear_inferiors): Delete. The contents of that function
4199 has been inlined in lynx_mourn;
4200 (lynx_wait_1): Save the ptid in the process's private data.
4201 (lynx_mourn): Free the process' private data. Replace call
4202 to lynx_clear_inferiors by call to clear_inferiors.
4203
4204 2013-05-17 Yao Qi <yao@codesourcery.com>
4205
4206 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4207 the right place.
4208
4209 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4210
4211 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4212 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4213 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4214 PT_TEXT_END_ADDR guards. Update comments.
4215 (linux_target_op) <read_offsets>: Conditionally define to
4216 linux_read_offsets if the target is UCLIBC and if it defines
4217 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4218
4219 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4220 Andrew Jenner <andrew@codesourcery.com>
4221
4222 * Makefile.in (SFILES): Add linux-nios2-low.c.
4223 (clean): Add action to delete nios2-linux.c.
4224 (nios2-linux.c): New rule.
4225 * configure.srv: Add nios2*-*-linux*.
4226 * linux-nios2-low.c: New.
4227
4228 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4229
4230 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4231
4232 2013-04-25 Hui Zhu <hui@codesourcery.com>
4233
4234 PR gdb/15186
4235 * ax.c (ax_printf): Add fflush.
4236
4237 2013-04-22 Tom Tromey <tromey@redhat.com>
4238
4239 * Makefile.in (SFILES): Add filestuff.c.
4240 (OBS): Add filestuff.o.
4241 (filestuff.o): New target.
4242 * config.in, configure: Rebuild.
4243 * configure.ac: Check for fdwalk, pipe2.
4244
4245 2013-04-17 Pedro Alves <palves@redhat.com>
4246
4247 * configure.ac (USE_THREAD_DB): Delete variable.
4248 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4249 Don't AC_SUBST USE_THREAD_DB.
4250 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4251 * config.in, configure: Regenerate.
4252
4253 2013-04-16 Pedro Alves <palves@redhat.com>
4254
4255 * linux-low.h (struct lwp_info) <thread_known>: Move under
4256 the USE_THREAD_DB #ifdef.
4257
4258 2013-04-16 Pedro Alves <palves@redhat.com>
4259
4260 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4261 (linux-low.o): Delete rule.
4262 * linux-low.h: Always include "gdb_thread_db.h" instead of
4263 conditionally including thread_db.h.
4264 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4265 HAVE_THREAD_DB_H.
4266
4267 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4268
4269 * Makefile.in (install-only): Fix make install regression.
4270
4271 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4272
4273 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4274 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4275 installation.
4276 * gdbserver.1: Remove.
4277
4278 2013-03-22 Pedro Alves <palves@redhat.com>
4279
4280 * linux-low.c (handle_extended_wait): Don't call
4281 linux_enable_event_reporting.
4282
4283 2013-03-15 Tony Theodore <tonyt@logyst.com>
4284
4285 PR build/9098:
4286 * Makefile.in (SHELL): Use @SHELL@.
4287
4288 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4289
4290 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4291 compiler warning.
4292
4293 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4294
4295 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4296 Remove extraneous NULL element.
4297
4298 2013-03-13 Yao Qi <yao@codesourcery.com>
4299
4300 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4301 'V' block in trace frame.
4302
4303 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4304
4305 * target.h (struct target_ops): Add btrace ops.
4306 (target_supports_btrace): New macro.
4307 (target_enable_btrace): New macro.
4308 (target_disable_btrace): New macro.
4309 (target_read_btrace): New macro.
4310 * gdbthread.h (struct thread_info): Add btrace field.
4311 * server.c: Include btrace-common.h.
4312 (handle_btrace_general_set): New function.
4313 (handle_btrace_enable): New function.
4314 (handle_btrace_disable): New function.
4315 (handle_general_set): Call handle_btrace_general_set.
4316 (handle_qxfer_btrace): New function.
4317 (struct qxfer qxfer_packets[]): Add btrace entry.
4318 * inferiors.c (remove_thread): Disable btrace.
4319 * linux-low: Include linux-btrace.h.
4320 (linux_low_enable_btrace): New function.
4321 (linux_low_read_btrace): New function.
4322 (linux_target_ops): Add btrace ops.
4323 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4324 Add srv_linux_btrace=yes.
4325 (x86_64-*-linux*): Add linux-btrace.o.
4326 Add srv_linux_btrace=yes.
4327 * configure.ac: Define HAVE_LINUX_BTRACE.
4328 * config.in: Regenerated.
4329 * configure: Regenerated.
4330
4331 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4332
4333 * server.c (handle_qxfer): Preserve error message if -3 is
4334 returned.
4335 (qxfer): Document the -3 return value.
4336
4337 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4338
4339 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4340 (linux_btrace_h): New variable.
4341 (linux-btrace.o): New rule.
4342
4343 2013-03-08 Stan Shebs <stan@codesourcery.com>
4344 Hafiz Abid Qadeer <abidh@codesourcery.com>
4345
4346 * tracepoint.c (trace_buffer_size): New global.
4347 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4348 (init_trace_buffer): Change to one-argument function. Allocate
4349 trace buffer memory.
4350 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4351 handle QTBuffer:size packet.
4352 (cmd_bigqtbuffer_size): New function.
4353 (initialize_tracepoint): Call init_trace_buffer with
4354 DEFAULT_TRACE_BUFFER_SIZE.
4355 * server.c (handle_query): Add QTBuffer:size in the
4356 supported packets.
4357
4358 2013-03-07 Yao Qi <yao@codesourcery.com>
4359
4360 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4361 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4362 of -1.
4363 (cmd_qtsp): Adjust condition. Do post increment.
4364 Set cur_action and cur_step_action back to 0.
4365
4366 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4367
4368 PR server/15236
4369 * linux-low.c (linux_write_memory): Return early success if LEN is
4370 zero.
4371
4372 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4373
4374 * configure.srv: Add x86_64-*-cygwin* as target.
4375
4376 2013-02-28 Tom Tromey <tromey@redhat.com>
4377
4378 * configure.ac: Invoke AC_SYS_LARGEFILE.
4379 * configure, config.in: Rebuild.
4380
4381 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4382
4383 * win32-low.c: Throughout, fix format strings and casts of
4384 printf-like functions to avoid type related warnings on all
4385 platforms.
4386 (get_child_debug_event): Print dwDebugEventCode as hex since
4387 that's how it's usually documented.
4388
4389 2013-02-28 Yao Qi <yao@codesourcery.com>
4390
4391 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4392 pulongest.
4393
4394 2013-02-27 Jiong Wang <jiwang@tilera.com>
4395
4396 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4397 (reg-tilegx32.c): New rule.
4398 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4399 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4400 different register info initializer according to elf class.
4401 (init_registers_tilgx32): New function. The tilegx32 register info
4402 initializer.
4403 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4404 (tile_store_gregset): Likewise.
4405
4406 2013-02-27 Yao Qi <yao@codesourcery.com>
4407
4408 * server.c (process_point_options): Print debug message when
4409 debug_threads is true.
4410
4411 2013-02-26 Yao Qi <yao@codesourcery.com>
4412
4413 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4414
4415 2013-02-19 Pedro Alves <palves@redhat.com>
4416 Kai Tietz <ktietz@redhat.com>
4417
4418 PR gdb/15161
4419
4420 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4421 instead of strtoul to extract address from packet.
4422 (process_serial_event) <'z'>: Likewise.
4423
4424 2013-02-18 Yao Qi <yao@codesourcery.com>
4425
4426 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4427
4428 2013-02-14 Pedro Alves <palves@redhat.com>
4429
4430 Plug memory leak.
4431
4432 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4433 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4434
4435 2013-02-14 Pedro Alves <palves@redhat.com>
4436
4437 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4438
4439 2013-02-14 Pedro Alves <palves@redhat.com>
4440
4441 * tracepoint.c (save_string): Delete.
4442 (add_tracepoint_action): Use savestring instead of save_string.
4443
4444 2013-02-12 Pedro Alves <palves@redhat.com>
4445
4446 * linux-xtensa-low.c: Ditto.
4447 * xtensa-xtregs.c: Ditto.
4448
4449 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4450
4451 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4452 thread_db.
4453
4454 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4455
4456 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4457 aarch64_num_wp_regs and aarch64_num_bp_regs to
4458 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4459
4460 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4461
4462 * linux-aarch64-low.c (ps_get_thread_area): Replace
4463 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4464
4465 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4466 Marcus Shawcroft <marcus.shawcroft@arm.com>
4467 Nigel Stephens <nigel.stephens@arm.com>
4468 Yufeng Zhang <yufeng.zhang@arm.com>
4469
4470 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4471 (aarch64.c, aarch64-without-fpu.c): New targets.
4472 * configure.srv (aarch64*-*-linux*): New.
4473 * linux-aarch64-low.c: New file.
4474
4475 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4476
4477 * linux-low.c (handle_extended_wait, linux_create_inferior)
4478 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4479 (dequeue_one_deferred_signal, linux_resume_one_thread)
4480 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4481 (linux_tracefork_grandchild, linux_test_for_tracefork)
4482 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4483 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4484 where the argument is 0.
4485
4486 2013-01-25 Yao Qi <yao@codesourcery.com>
4487
4488 * event-loop.c: Include "queue.h".
4489 (gdb_event_p): New typedef.
4490 (struct gdb_event) <next_event>: Remove.
4491 (event_queue): Change to QUEUE(gdb_event_p).
4492 (async_queue_event): Remove.
4493 (gdb_event_xfree): New.
4494 (initialize_event_loop): New.
4495 (process_event): Use API from QUEUE.
4496 (wait_for_event): Likewise.
4497 * server.c (main): Call initialize_event_loop.
4498 * server.h (initialize_event_loop): Declare.
4499
4500 2013-01-18 Yao Qi <yao@codesourcery.com>
4501
4502 * ax.h (struct eval_agent_expr_context): New.
4503 (gdb_eval_agent_expr): Update declaration.
4504 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4505 TFRAME. Add new argument CTX.
4506 * server.h (struct eval_agent_expr_context): Declare.
4507 (agent_mem_read, agent_tsv_read): Update declaration.
4508 (agent_mem_read_string): Likewise.
4509 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4510 (add_traceframe_block): Add new argument TPOINT.
4511 Increase TPOINT->traceframe_usage.
4512 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4513 eval_tracepoint_agent_expr.
4514 (condition_true_at_tracepoint): Likewise.
4515 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4516 (agent_mem_read_string, agent_tsv_read): Likewise.
4517
4518 2013-01-16 Yao Qi <yao@codesourcery.com>
4519
4520 * linux-low.c (linux_resume_one_lwp): Don't check
4521 'lwp->bp_reinsert != 0'.
4522
4523 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4524 Pedro Alves <palves@redhat.com>
4525
4526 * lynx-low.c (ptrace_request_to_str): Define a temporary
4527 macro and use it to simplify this function's implementation.
4528
4529 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4530
4531 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4532 sets errno.
4533
4534 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4535
4536 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4537
4538 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4539
4540 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4541
4542 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4543
4544 * lynx-low.c (lynx_resume): Use the resume_info parameter
4545 to determine the ptid for the lynx_ptrace call, unless
4546 it is equal to minus_one_ptid, in which case we use the
4547 ptid of the current_inferior.
4548 (lynx_wait_1): After having received a thread create/exit
4549 event, resume the inferior's execution using the signaling
4550 thread's ptid, rather than the old ptid.
4551
4552 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4553
4554 * lynx-low.c (lynx_resume): Delete variable ret.
4555
4556 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4557
4558 * gdbreplay.c (gdbreplay_version): Update copyright year.
4559 * server.c (gdbserver_version): Likewise.
4560
4561 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4562
4563 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4564 new thread.
4565
4566 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4567
4568 * lynx-low.c (ptrace_request_to_str): Add handling for
4569 PTRACE_GETTRACESIG.
4570
4571 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4572
4573 * lynx-low.c (lynx_attach): Delete variable new_process.
4574
4575 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4576
4577 * lynx-low.c (lynx_create_inferior): Delete variable
4578 new_process.
4579
4580 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4581
4582 * lynx-low.c (ptrace_request_to_str): Do not handle
4583 PTRACE_GETTHREADLIST if this macro does not exist.
4584
4585 2012-12-15 Yao Qi <yao@codesourcery.com>
4586
4587 * Makefile.in (OBS): Add notif.o.
4588 * notif.c, notif.h: New.
4589 * server.c: Include "notif.h".
4590 (struct vstop_notif) <next>: Remove.
4591 <base>: New field.
4592 (queue_stop_reply): Update.
4593 (push_event, send_next_stop_reply): Remove.
4594 (discard_queued_stop_replies): Update.
4595 (notif_stop): New variable.
4596 (handle_v_stopped): Remove.
4597 (handle_v_requests): Don't call handle_v_stopped. Call
4598 handle_ack_notif instead.
4599 (queue_stop_reply_callback): Call notif_event_enque instead
4600 of queue_stop_reply.
4601 (handle_status): Don't call send_next_stop_reply, call
4602 notif_write_event instead.
4603 (kill_inferior_callback): Likewise.
4604 (detach_or_kill_inferior_callback): Likewise.
4605 (main): Call initialize_notif.
4606 (process_serial_event): Call QUEUE_is_empty.
4607 (handle_target_event): Call notif_push instead of push event.
4608 * server.h (push_event): Remove declaration.
4609
4610 2012-12-10 Tom Tromey <tromey@redhat.com>
4611
4612 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4613 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4614 macros.
4615 (.c.o): Rewrite.
4616 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4617 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4618 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4619 (amd64-linux-ipa.o, ax.o): Rewrite.
4620 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4621 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4622 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4623 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4624 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4625 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4626 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4627 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4628 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4629 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4630 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4631 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4632 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4633 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4634 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4635 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4636 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4637 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4638 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4639 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4640 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4641 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4642 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4643 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4644 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4645 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4646 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4647 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4648 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4649 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4650 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4651 (reg-tilegx.o): Remove.
4652 (all_object_files): New macro.
4653 Include .deps files.
4654 * aclocal.m4, configure: Rebuild.
4655 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4656 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4657 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4658
4659 2012-12-05 Tom Tromey <tromey@redhat.com>
4660
4661 PR gdb/14917:
4662 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4663
4664 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4665
4666 * configure.ac: Check for linux/perf_event.h.
4667 * config.in: Regenerated.
4668 * configure: Regenerated.
4669
4670 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4671
4672 * hostio.c (handle_readlink): Decrease buffer size
4673 parameter passed to readlink by one byte.
4674
4675 2012-11-26 Yao Qi <yao@codesourcery.com>
4676
4677 * configure.ac (build_warnings): Append '-Wempty-body'.
4678 * configure: Regenerated.
4679 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4680 body.
4681
4682 2012-11-15 Pierre Muller <muller@sourceware.org>
4683
4684 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4685 * config.in: Regenerate.
4686 * configure: Regenerate.
4687 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4688 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4689 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4690 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4691 header.
4692 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4693 instead of <sys/wait.h> header.
4694 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4695
4696 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4697
4698 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4699 (various make rules): Remove -DGDBSERVER
4700
4701 2012-11-09 Yao Qi <yao@codesourcery.com>
4702
4703 * spu-low.c (current_ptid): Move it to ..
4704 * gdbthread.h: ... here. New.
4705 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4706 * server.c (myresume, process_serial_event): Likewise.
4707 * thread-db.c (thread_db_find_new_threads): Likewise.
4708 * tracepoint.c (run_inferior_command): Likewise.
4709
4710 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4711
4712 * server.c (handle_search_memory_1): Include access length in
4713 warning message.
4714
4715 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4716
4717 * linux-crisv32-low.c: Fix compile errors.
4718
4719 2012-09-04 Yao Qi <yao@codesourcery.com>
4720
4721 * tracepoint.c (cmd_qtsv): Adjust debug message.
4722 Don't check CUR_TPOINT.
4723
4724 2012-08-28 Yao Qi <yao@codesourcery.com>
4725
4726 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4727 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4728 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4729 Remove declarations of xmalloc, xreallloc, xstrdup and
4730 freeargv.
4731 * Makefile.in (libiberty_h): New.
4732 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4733 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4734
4735 2012-08-23 Yao Qi <yao@codesourcery.com>
4736
4737 * server.h: Remove declaration of 'xsnprintf'.
4738
4739 2012-08-22 Keith Seitz <keiths@redhat.com>
4740
4741 * server.h: Include build-gnulib-gbserver/config.h.
4742 * gdbreplay.c: Likewise.
4743
4744 2012-08-08 Doug Evans <dje@google.com>
4745
4746 * Makefile.in (SFILES): Add gdb_vecs.c.
4747 (OBS): Add gdb_vecs.o.
4748 (gdb_vecs_h, host_defs_h): New variables.
4749 (thread-db.o): Add $(gdb_vecs_h) dependency.
4750 (gdb_vecs.o): New rule.
4751 * thread-db.c: #include "gdb_vecs.h".
4752 (thread_db_load_search): Use a vector to iterate over path elements.
4753 Handle text appearing after "$pdir".
4754
4755 * configure.ac: Add check for strstr.
4756 * config.in: Regenerate.
4757 * configure: Regenerate.
4758
4759 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4760
4761 * hostio.c (handle_pread): If pread fails, fall back to attempting
4762 lseek/read.
4763 (handle_pwrite): Likewise for pwrite.
4764
4765 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4766
4767 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4768 between unsupported TYPE and unimplementable ADDR/LEN combination.
4769 (arm_insert_point): Act on new return value.
4770
4771 2012-07-31 Pedro Alves <palves@redhat.com>
4772
4773 * server.c (process_point_options): Only skip tokens if we find
4774 one that is unrecognized. Don't treat 'X' specially while
4775 skipping unrecognized tokens.
4776
4777 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4778
4779 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4780 to 4-byte-align HW breakpoint addresses for Thumb.
4781
4782 2012-07-27 Yao Qi <yao@codesourcery.com>
4783
4784 PR remote/14161.
4785
4786 * server.h: Declare gdb_agent_about_to_close.
4787 * target.c (kill_inferior): Include "agent.h".
4788 New. Send command 'kill'.
4789 * target.h (kill_inferior): Removed macro.
4790 * tracepoint.c (gdb_agent_about_to_close): New.
4791 (gdb_agent_helper_thread): Handle command 'close'.
4792 Wait endlessly until the inferior stops.
4793 Install gdb_agent_remove_socket to atexit hook.
4794 (agent_socket_name): New static variable.
4795 (gdb_agent_socket_init): Replace local variable 'name' with
4796 'agent_socket_name'.
4797 (gdb_agent_remove_socket): New.
4798
4799 2012-07-27 Yao Qi <yao@codesourcery.com>
4800
4801 * server.c (process_point_options): Stop at 'X' when parsing.
4802
4803 2012-07-19 Michael Eager <eager@eagercon.com>
4804
4805 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4806 to hw_execute.
4807 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4808 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4809 hardware breakpoint.
4810
4811 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4812
4813 * gdbserver/linux-low.c (initialize_low): Call
4814 linux_ptrace_init_warnings.
4815
4816 2012-07-02 Doug Evans <dje@google.com>
4817
4818 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4819 pointer to int.
4820
4821 2012-07-02 Stan Shebs <stan@codesourcery.com>
4822
4823 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4824 (ax.o): Add it to build rule.
4825 (ax-ipa.o): Ditto.
4826 (OBS): Add format.o.
4827 (IPA_OBS): Add format.o.
4828 * server.c (handle_query): Claim support for breakpoint commands.
4829 (process_point_options): Add command case.
4830 (process_serial_event): Leave running if there are printfs in
4831 effect.
4832 * mem-break.h (any_persistent_commands): Declare.
4833 (add_breakpoint_commands): Declare.
4834 (gdb_no_commands_at_breakpoint): Declare.
4835 (run_breakpoint_commands): Declare.
4836 * mem-break.c (struct point_command_list): New struct.
4837 (struct breakpoint): New field command_list.
4838 (any_persistent_commands): New function.
4839 (add_commands_to_breakpoint): New function.
4840 (add_breakpoint_commands): New function.
4841 (gdb_no_commands_at_breakpoint): New function.
4842 (run_breakpoint_commands): New function.
4843 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4844 locally.
4845 * ax.c: Include format.h.
4846 (ax_printf): New function.
4847 (gdb_eval_agent_expr): Add printf opcode.
4848
4849 2012-06-13 Yao Qi <yao@codesourcery.com>
4850
4851 * server.c (start_inferior): Remove duplicated writes to fields
4852 'last_resume_kind' and 'last_status' of 'current_inferior'.
4853
4854 2012-06-12 Yao Qi <yao@codesourcery.com>
4855 Pedro Alves <palves@redhat.com>
4856
4857 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4858 comment.
4859 * server.c (handle_v_cont): Extend comment.
4860
4861 2012-06-11 Yao Qi <yao@codesourcery.com>
4862
4863 * linux-low.c (linux_attach): Add 'static'.
4864
4865 2012-06-06 Yao Qi <yao@codesourcery.com>
4866
4867 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4868
4869 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4870
4871 Fix gcc -flto compilation warning.
4872 * server.c (main): Make variable multi_mode and attach volatile.
4873
4874 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4875
4876 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4877 if the platform doesn't know about it.
4878
4879 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4880
4881 * Makefile.in (SFILES): Add linux-tile-low.c.
4882 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4883 * configure.srv: Handle tilegx-*-linux*.
4884 * linux-tile-low.c: New file.
4885
4886 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4887
4888 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4889
4890 2012-05-24 Pedro Alves <palves@redhat.com>
4891
4892 PR gdb/7205
4893
4894 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4895
4896 2012-05-24 Pedro Alves <palves@redhat.com>
4897
4898 PR gdb/7205
4899
4900 Replace target_signal with gdb_signal throughout.
4901
4902 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4903
4904 * linux-low.c (linux_store_registers): Avoid the copying sequence
4905 when no data has been retrieved by ptrace.
4906
4907 2012-05-22 Will Deacon <will.deacon@arm.com>
4908
4909 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4910 Include asm/ptrace.h.
4911 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4912 already defined.
4913
4914 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4915
4916 * linux-low.c (linux_store_registers): Don't re-retrieve data
4917 with ptrace that has already been obtained from /proc. Always
4918 copy any data retrieved with ptrace to the buffer supplied.
4919
4920 2012-05-11 Yao Qi <yao@codesourcery.com>
4921 Pedro Alves <palves@redhat.com>
4922
4923 * linux-low.c (enum stopping_threads_kind): New.
4924 (stopping_threads): Change type to `enum stopping_threads_kind'.
4925 (handle_extended_wait): If stopping and suspending threads, leave
4926 the new_lwp suspended too.
4927 (linux_wait_for_event): Adjust.
4928 (stop_all_lwps): Set `stopping_threads' to
4929 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4930 whether we're suspending threads or just stopping them. Assert no
4931 recursion happens.
4932
4933 2012-04-29 Yao Qi <yao@codesourcery.com>
4934
4935 * server.h: Move some code to ...
4936 * gdbthread.h: ... here. New.
4937 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4938 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4939 (nto-low.o, win32-low.o): Likewise.
4940 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4941 * regcache.c, remote-utils.c, server.c: Likewise.
4942 * target.c, tracepoint.c, win32-low.c: Likewise.
4943
4944 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4945
4946 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4947 (PTRACE_ARG4_TYPE): Likewise.
4948 (PTRACE_XFER_TYPE): Likewise.
4949 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4950 ptrace to PTRACE_ARG3_TYPE.
4951 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4952 (PTRACE_ARG4_TYPE): Likewise.
4953 (PTRACE_XFER_TYPE): Likewise.
4954 (linux_detach_one_lwp): Cast fourth argument of
4955 ptrace to long then PTRACE_ARG4_TYPE.
4956 (regsets_fetch_inferior_registers): Cast third argument of
4957 ptrace to long then PTRACE_ARG3_TYPE.
4958 (regsets_store_inferior_registers): Likewise.
4959
4960 2012-04-20 Pedro Alves <palves@redhat.com>
4961
4962 * configure: Regenerate.
4963
4964 2012-04-19 Pedro Alves <palves@redhat.com>
4965
4966 * Makefile.in (GNULIB_BUILDDIR): New.
4967 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4968 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4969 (all, install-only, uninstall, clean-info, all-lib, clean): No
4970 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4971 (maintainer-clean realclean distclean): Use subdir_do.
4972 (subdir_do): New.
4973 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4974 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4975 * acinclude.m4: Include acx_configure_dir.m4.
4976 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4977 calls. Call AC_PROG_RANLIB. Configure gnulib using
4978 ACX_CONFIGURE_DIR.
4979 (GNULIB): New.
4980 (GNULIB_STDINT_H): Adjust.
4981 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4982 * gdbreplay.c: Include build-gnulib/config.h.
4983 * server.h: Likewise.
4984 * aclocal.m4: Regenerate.
4985 * config.in: Regenerate.
4986 * configure: Regenerate.
4987
4988 2012-04-19 Pedro Alves <palves@redhat.com>
4989
4990 * Makefile.in (LIBGNU, INCGNU): Adjust.
4991 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4992 (all, install-only, uninstall, clean-info, all-lib, clean)
4993 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4994 * configure.ac: Adjust AC_OUTPUT output.
4995 * aclocal.m4: Regenerate.
4996 * configure: Regenerate.
4997
4998 2012-04-19 Pedro Alves <palves@redhat.com>
4999
5000 * Makefile.in (generated_files): New.
5001 (server_h): Remove the explicit dependency on config.h, and depend
5002 on $generated_files.
5003
5004 2012-04-19 Pedro Alves <palves@redhat.com>
5005
5006 * Makefile.in (INCGNU): Add -Ignulib.
5007
5008 2012-04-19 Pedro Alves <palves@redhat.com>
5009
5010 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5011 (INCGNU): ... this, and spell out -I here.
5012 (GNULIB_LIB): Rename to ...
5013 (LIBGNU): ... this.
5014 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5015
5016 2012-04-19 Pedro Alves <palves@redhat.com>
5017
5018 * config.in: Regenerate.
5019
5020 2012-04-19 Pedro Alves <palves@redhat.com>
5021
5022 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5023 * server.h (memmem): Remove declaration.
5024 * config.in: Regenerate.
5025 * configure: Regenerate.
5026
5027 2012-04-19 Yao Qi <yao@codesourcery.com>
5028
5029 * Makefile.in (SFILES): Add common/vec.c.
5030 (OBS): Add vec.o.
5031 (vec.o): New rule.
5032
5033 2012-04-19 Yao Qi <yao@codesourcery.com>
5034
5035 * remote-utils.c (prepare_resume_reply): Replace with macro
5036 target_core_of_thread.
5037 * server.c (handle_qxfer_threads_proper): Likewise.
5038 * target.h (traget_core_of_thread): New macro.
5039
5040 2012-04-18 Pedro Alves <palves@redhat.com>
5041
5042 * aclocal.m4: Regenerate.
5043 * configure: Regenerate.
5044
5045 2012-04-16 Yao Qi <yao@codesourcery.com>
5046
5047 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5048 duplicated on address.
5049
5050 2012-04-16 Yao Qi <yao@codesourcery.com>
5051
5052 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5053 (struct tracepoint_action_ops) <send>: New field.
5054 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5055 (agent_expr_send, x_tracepoint_action_send): New.
5056 (l_tracepoint_action_send): New.
5057 (cmd_qtdp): Download and install tracepoint
5058 according to `use_agent'.
5059 (run_inferior_command): Add one more parameter `len'.
5060 Update callers.
5061 (tracepoint_send_agent): New.
5062 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5063
5064 2012-04-16 Yao Qi <yao@codesourcery.com>
5065
5066 * tracepoint.c (download_tracepoints): Moved to ...
5067 (cmd_qtstart): ... here.
5068
5069 2012-04-14 Yao Qi <yao@codesourcery.com>
5070
5071 * tracepoint.c: Include inttypes.h.
5072 (struct collect_memory_action): Use sized types.
5073 (struct tracepoint): Likewise.
5074 (cmd_qtdp, stop_tracing): Update print specifiers.
5075 (cmd_qtp, response_tracepoint): Likewise.
5076 (collect_data_at_tracepoint): Likewise.
5077 (collect_data_at_step): Likewise.
5078
5079 2012-04-14 Yao Qi <yao@codesourcery.com>
5080
5081 Import gnulib module inttypes.
5082 * aclocal.m4, config.in, configure: Regenerated.
5083
5084 2012-04-14 Yao Qi <yao@codesourcery.com>
5085
5086 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5087 Makefile and config.status at last.
5088
5089 2012-04-13 Yao Qi <yao@codesourcery.com>
5090
5091 * tracepoint.c: Include stdint.h unconditionally.
5092
5093 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5094
5095 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5096 on BFD_HAVE_SYS_PROCFS_TYPE.
5097 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5098 * configure: Regenerate.
5099 * config.in: Likewise.
5100
5101 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5102
5103 * Makefile.in (clean): Also remove x32.c x32-linux.c
5104 x32-avx.c x32-avx-linux.c.
5105 (x32.o): New target.
5106 (x32.c): Likewise.
5107 (x32-linux.o): Likewise.
5108 (x32-linux.c): Likewise.
5109 (x32-avx.o): Likewise.
5110 (x32-avx.c): Likewise.
5111 (x32-avx-linux.o): Likewise.
5112 (x32-avx-linux.c): Likewise.
5113
5114 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5115 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5116 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5117 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5118 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5119 i386/x32-avx-linux.xml.
5120
5121 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5122 (init_registers_x32_avx_linux): Likwise.
5123 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5124 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5125
5126 2012-04-13 Pedro Alves <palves@redhat.com>
5127
5128 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5129 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5130 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5131 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5132 the sub-make.
5133
5134 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5135
5136 * linux-x86-low.c (compat_x32_clock_t): New.
5137 (compat_x32_siginfo_t): Likewise.
5138 (compat_x32_siginfo_from_siginfo): Likewise.
5139 (siginfo_from_compat_x32_siginfo): Likewise.
5140 (linux_is_elf64): Likewise.
5141 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5142 and siginfo_from_compat_x32_siginfo for x32.
5143 (x86_arch_setup): Set linux_is_elf64.
5144
5145 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5146
5147 PR gdb/13969
5148 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5149 e_machine field.
5150 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5151 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5152 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5153 compatible with process.
5154
5155 2012-04-12 Yao Qi <yao@codesourcery.com>
5156
5157 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5158 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5159 (install-only, install-info, clean): Handle sub dir gnulib.
5160 (all-lib, am--refresh): New targets.
5161 (memmem.o): Remove target.
5162 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5163 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5164 (AC_REPLACE_FUNCS): Remove memmem.
5165 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5166 (AC_OUTPUT): Generate Makefile in gnulib/.
5167 * aclocal.m4, config.in, configure: Regenerated.
5168
5169 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5170
5171 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5172
5173 2012-04-05 Pedro Alves <palves@redhat.com>
5174
5175 -Werror=strict-aliasing
5176
5177 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5178 pointer.
5179
5180 2012-04-04 Pedro Alves <palves@redhat.com>
5181
5182 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5183 (sparc_store_gregset_from_stack, sparc_store_gregset)
5184 (sparc_breakpoint_at): Fix formatting.
5185
5186 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5187
5188 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5189 are available.
5190 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5191 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5192 * config.in: Regenerate.
5193 * configure: Likewise.
5194
5195 2012-03-29 Pedro Alves <palves@redhat.com>
5196
5197 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5198 Correct ptrace arguments.
5199
5200 2012-03-28 Pedro Alves <palves@redhat.com>
5201
5202 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5203 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5204 (IA64_FR1_REGNUM): New defines.
5205 (ia64_fetch_register): New.
5206 (the_low_target): Install it.
5207 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5208 field.
5209 * linux-low.c (linux_fetch_registers): Try the
5210 the_low_target.fetch_register hook first.
5211
5212 * linux-arm-low.c (the_low_target): Adjust.
5213 * linux-bfin-low.c (the_low_target): Adjust.
5214 * linux-cris-low.c (the_low_target): Adjust.
5215 * linux-crisv32-low.c (the_low_target): Adjust.
5216 * linux-m32r-low.c (the_low_target): Adjust.
5217 * linux-m68k-low.c (the_low_target): Adjust.
5218 * linux-mips-low.c (the_low_target): Adjust.
5219 * linux-ppc-low.c (the_low_target): Adjust.
5220 * linux-s390-low.c (the_low_target): Adjust.
5221 * linux-sh-low.c (the_low_target): Adjust.
5222 * linux-sparc-low.c (the_low_target): Adjust.
5223 * linux-tic6x-low.c (the_low_target): Adjust.
5224 * linux-x86-low.c (the_low_target): Adjust.
5225 * linux-xtensa-low.c (the_low_target): Adjust.
5226
5227 2012-03-26 Pedro Alves <palves@redhat.com>
5228
5229 * server.c (handle_qxfer_libraries): Don't bail early if
5230 the_target->qxfer_libraries_svr4 is not NULL.
5231
5232 2012-03-26 Pedro Alves <palves@redhat.com>
5233
5234 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5235
5236 2012-03-23 Pedro Alves <palves@redhat.com>
5237
5238 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5239 "library-list-svr4" element's start tag when the the DSO list is
5240 empty.
5241
5242 2012-03-23 Pedro Alves <palves@redhat.com>
5243
5244 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5245 a variable whose type size is the same as the inferior's pointer
5246 size.
5247
5248 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5249
5250 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5251 struct siginfo.
5252 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5253 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5254 * linux-low.h: Include <signal.h>.
5255 (struct siginfo): Remove forward declaration.
5256 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5257 struct siginfo.
5258
5259 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5260
5261 * .gitignore: Ignore more files.
5262
5263 2012-03-19 Pedro Alves <palves@redhat.com>
5264 Jan Kratochvil <jan.kratochvil@redhat.com>
5265
5266 * server.c (cont_thread, general_thread): Add describing comments.
5267 (start_inferior): Clear `cont_thread'.
5268 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5269 of a process.
5270
5271 2012-03-15 Yao Qi <yao@codesourcery.com>
5272
5273 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5274 handling to ...
5275 (cmd_qtdp): ... here.
5276
5277 2012-03-15 Yao Qi <yao@codesourcery.com>
5278
5279 * tracepoint.c (struct tracepoint_action_ops): New.
5280 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5281 (m_tracepoint_action_download): New.
5282 (r_tracepoint_action_download): New.
5283 (x_tracepoint_action_download): New.
5284 (l_tracepoint_action_download): New.
5285 (add_tracepoint_action): Install `action->ops' according type.
5286 (download_tracepoint_1): Move code `download' function pointer
5287 of various tracepoint_action_ops.
5288
5289 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5290
5291 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5292 linux_ptrace_attach_warnings.
5293
5294 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5295
5296 * Makefile.in (linux-ptrace.o): New.
5297 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5298 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5299 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5300 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5301 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5302 of these targets.
5303 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5304
5305 2012-03-08 Yao Qi <yao@codesourcery.com>
5306 Pedro Alves <palves@redhat.com>
5307
5308 Fix PR server/13392.
5309 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5310 offset of JMP insn.
5311 * tracepoint.c (remove_tracepoint): New.
5312 (cmd_qtdp): Call remove_tracepoint when failed to install.
5313
5314 2012-03-07 Pedro Alves <palves@redhat.com>
5315
5316 * linux-low.c (get_detach_signal): New.
5317 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5318 Pass on pending signals to PTRACE_DETACH. Check the result of the
5319 ptrace call.
5320 * server.c (program_signals, program_signals_p): New.
5321 (handle_general_set): Handle QProgramSignals.
5322 * server.h (program_signals, program_signals_p): Declare.
5323
5324 2012-03-05 Pedro Alves <palves@redhat.com>
5325 Jan Kratochvil <jan.kratochvil@redhat.com>
5326
5327 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5328 New comment why.
5329
5330 2012-03-03 Yao Qi <yao@codesourcery.com>
5331
5332 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5333 agent_look_up_symbols.
5334
5335 2012-03-03 Yao Qi <yao@codesourcery.com>
5336
5337 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5338 (linux-x86-low.o): Likewise.
5339 * server.h: Remove in_process_agent_loaded.
5340 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5341 common/agent.c.
5342 Update callers.
5343
5344 2012-03-03 Yao Qi <yao@codesourcery.com>
5345
5346 * tracepoint.c (gdb_agent_capability): New global.
5347 (in_process_agent_loaded_ust): Renamed to
5348 `in_process_agent_supports_ust'.
5349 Update callers.
5350 (in_process_agent_supports_ust): Call agent_capability_check.
5351 (clear_installed_tracepoints): Assert that agent supports
5352 agent.
5353
5354 2012-03-03 Yao Qi <yao@codesourcery.com>
5355
5356 * linux-low.c (linux_supports_agent): New.
5357 (linux_target_ops): Initialize field `supports_agent' with
5358 linux_supports_agent.
5359 * target.h (struct target_ops) <supports_agent>: New.
5360 (target_supports_agent): New macro.
5361 * server.c (handle_general_set): Handle packet 'QAgent'.
5362 (handle_query): Send `QAgent+'.
5363 * Makefile.in (server.o): Depends on agent.h.
5364
5365 2012-03-03 Yao Qi <yao@codesourcery.com>
5366
5367 * Makefile.in (OBS): Add agent.o.
5368 Add new rule for agent.o.
5369 Track dependence of tracepoint.c on agent.h.
5370 * tracepoint.c (run_inferior_command_1):
5371 (run_inferior_command): Call agent_run_command.
5372 (gdb_ust_connect_sync_socket): Deleted. Move it to
5373 common/agent.c.
5374 (resume_thread, stop_thread): Likewise.
5375 (gdb_ust_socket_init): Renamed to ...
5376 (gdb_agent_socket_init): ... New.
5377 (gdb_ust_thread): Renamed to ...
5378 (gdb_agent_helper_thread): ... New.
5379 (gdb_ust_init): Move some code to ...
5380 (gdb_agent_init): ... here. New.
5381 [HAVE_UST]: Call gdb_ust_init.
5382 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5383 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5384 * config.in, configure: Regenerated.
5385
5386 2012-03-02 Pedro Alves <palves@redhat.com>
5387
5388 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5389 * linux-low.c (struct simple_pid_list): New.
5390 (stopped_pids): New a struct simple_pid_list pointer.
5391 (add_to_pid_list, pull_pid_from_list): New.
5392 (handle_extended_wait): Don't assume the first signal new children
5393 report is SIGSTOP. Adjust call to pull_pid_from_list.
5394 (linux_wait_for_lwp): Adjust.
5395
5396 2012-03-02 Yao Qi <yao@codesourcery.com>
5397
5398 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5399 debug log.
5400
5401 2012-03-02 Yao Qi <yao@codesourcery.com>
5402
5403 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5404 `stop_pc' and `tpoint'. Update caller.
5405
5406 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5407
5408 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5409 * linux-low.c (use_linux_regsets): New macro.
5410 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5411 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5412 (linux_register_in_regsets): New function.
5413 (usr_fetch_inferior_registers): Skip registers covered by
5414 regsets.
5415 (usr_store_inferior_registers): Likewise.
5416 (usr_fetch_inferior_registers): New macro.
5417 (usr_store_inferior_registers): Likewise.
5418 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5419 (linux_store_registers): Likewise.
5420 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5421 prototype.
5422 (init_registers_mips64_dsp_linux): Likewise.
5423 (init_registers_mips_linux): New macro.
5424 (init_registers_mips_dsp_linux): Likewise.
5425 (mips_dsp_num_regs): Likewise.
5426 (DSP_BASE, DSP_CONTROL): New fallback macros.
5427 (mips_base_regs): New macro.
5428 (mips_regmap): Use it. Fix the size.
5429 (mips_dsp_regmap): New variable.
5430 (mips_dsp_regset_bitmap): Likewise.
5431 (mips_arch_setup): New function.
5432 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5433 than mips_regmap.
5434 (mips_cannot_store_register): Likewise.
5435 (the_low_target): Update .arch_setup, .num_regs and .regmap
5436 initializers. Add .regset_bitmap initializer.
5437 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5438 initializer.
5439 * linux-bfin-low.c (the_low_target): Likewise.
5440 * linux-cris-low.c (the_low_target): Likewise.
5441 * linux-crisv32-low.c (the_low_target): Likewise.
5442 * linux-ia64-low.c (the_low_target): Likewise.
5443 * linux-m32r-low.c (the_low_target): Likewise.
5444 * linux-m68k-low.c (the_low_target): Likewise.
5445 * linux-ppc-low.c (the_low_target): Likewise.
5446 * linux-s390-low.c (the_low_target): Likewise.
5447 * linux-sh-low.c (the_low_target): Likewise.
5448 * linux-sparc-low.c (the_low_target): Likewise.
5449 * linux-tic6x-low.c (the_low_target): Likewise.
5450 * linux-x86-low.c (the_low_target): Likewise.
5451 * linux-xtensa-low.c (the_low_target): Likewise.
5452 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5453 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5454 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5455 srv_xmlfiles.
5456 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5457 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5458
5459 2012-02-29 Yao Qi <yao@codesourcery.com>
5460 Pedro Alves <palves@redhat.com>
5461
5462 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5463 `step_over_finished' is true.
5464
5465 2012-02-27 Pedro Alves <palves@redhat.com>
5466
5467 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5468 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5469
5470 2012-02-27 Pedro Alves <palves@redhat.com>
5471
5472 PR server/9684
5473 * linux-low.c (pid_is_stopped): New.
5474 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5475
5476 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5477
5478 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5479 of conditions.
5480
5481 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5482
5483 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5484
5485 2012-02-24 Luis Machado <lgustavo@codesourcery>
5486
5487 * server.c (handle_query): Advertise support for target-side
5488 breakpoint condition evaluation.
5489 (process_point_options): New function.
5490 (process_serial_event): When inserting a breakpoint, check for
5491 a target-side condition that should be evaluated.
5492
5493 * mem-break.c: Include regcache.h and ax.h.
5494 (point_cond_list_t): New data structure.
5495 (breakpoint) <cond_list>: New field.
5496 (find_gdb_breakpoint_at): Make non-static.
5497 (delete_gdb_breakpoint_at): Clear any target-side
5498 conditions.
5499 (clear_gdb_breakpoint_conditions): New function.
5500 (add_condition_to_breakpoint): Likewise.
5501 (add_breakpoint_condition): Likewise.
5502 (gdb_condition_true_at_breakpoint): Likewise.
5503 (gdb_breakpoint_here): Return result directly instead
5504 of going through a local variable.
5505
5506 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5507 (clear_gdb_breakpoint_conditions): Likewise.
5508 (add_breakpoint_condition): Likewise.
5509 (gdb_condition_true_at_breakpoint): Likewise.
5510
5511 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5512 (need_step_over_p): Take target-side breakpoint condition into
5513 consideration.
5514
5515 2012-02-24 Luis Machado <lgustavo@codesourcery>
5516
5517 * server.h: Include tracepoint.h.
5518 (agent_mem_read, agent_get_trace_state_variable_value,
5519 agent_set_trace_state_variable_value,
5520 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5521 get_set_tsv_func_addr): New prototypes.
5522
5523 * ax.h: New include file.
5524 * ax.c: New source file.
5525
5526 * tracepoint.c: Include ax.h.
5527 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5528 agent_expr, eval_result_type): Move to ax.h.
5529 (parse_agent_expr): Rename to ...
5530 (gdb_parse_agent_expr): ... this, make it non-static and move
5531 to ax.h.
5532 (unparse_agent_expr) Rename to ...
5533 (gdb_unparse_agent_expr): ... this, make it non-static and move
5534 to ax.h.
5535 (eval_agent_expr): Rename to ...
5536 (eval_tracepoint_agent_expr): ... this.
5537 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5538 forward declarations.
5539 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5540 (agent_get_trace_state_variable_value): New function.
5541 (agent_set_trace_state_variable_value): New function.
5542 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5543 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5544 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5545 (condition_true_at_tracepoint): Likewise.
5546 (parse_agent_expr): Rename to ...
5547 (gdb_parse_agent_expr): ... this and move to ax.c.
5548 (unparse_agent_expr): Rename to ...
5549 (gdb_unparse_agent_expr): ... this and move to ax.c.
5550 (gdb_agent_op_name): Move to ax.c.
5551 (eval_agent_expr): Rename to ...
5552 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5553 and move to ax.c.
5554 (eval_tracepoint_agent_expr): New function.
5555 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5556 non-static.
5557 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5558 ax.c.
5559 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5560 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5561 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5562 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5563 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5564 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5565 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5566 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5567 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5568 (compile_bytecodes): Remove forward declaration.
5569 (is_goto_target): Move to ax.c.
5570 (compile_bytecodes): Move to ax.c and call
5571 agent_get_trace_state_variable_value (...) and
5572 agent_set_trace_state_variable_value (...).
5573
5574 * Makefile.in: Update ax.c and IPA dependencies.
5575
5576 2012-02-24 Pedro Alves <palves@redhat.com>
5577
5578 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5579 (cmd_bigqtbuffer_circular): ... this. Only handle
5580 'QTBuffer:circular:'.
5581 (handle_tracepoint_general_set): Adjust.
5582
5583 2012-02-16 Yao Qi <yao@codesourcery.com>
5584
5585 * inferiors.c: Move code to ...
5586 * dll.c: .... here. New.
5587 * server.h: Declare clear_dlls.
5588 * Makefile.in (SFILES): Add dll.c.
5589 (OBS): Add dll.o
5590 (dll.o): New rule.
5591
5592 2012-02-11 Yao Qi <yao@codesourcery.com>
5593
5594 * server.c: (handle_monitor_command): Add a new parameter
5595 `own_buf'.
5596 (handle_query): Update caller.
5597
5598 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5599
5600 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5601 * configure, config.in: Regenerate.
5602 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5603 is not defined.
5604
5605 2012-02-02 Pedro Alves <palves@redhat.com>
5606
5607 Try SIGKILL first, then PTRACE_KILL.
5608 * linux-low.c (linux_kill_one_lwp): New.
5609 (linux_kill_one_lwp): Rename to ...
5610 (kill_one_lwp_callback): ... this. Use the new
5611 linux_kill_one_lwp.
5612
5613 2012-02-02 Pedro Alves <palves@redhat.com>
5614
5615 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5616 inferior.
5617
5618 2012-01-27 Pedro Alves <palves@redhat.com>
5619
5620 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5621 (elf_64_file_p): Make static.
5622 (linux_pid_exe_is_elf_64_file): New.
5623 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5624 Delete declarations.
5625 (linux_pid_exe_is_elf_64_file): Declare.
5626 * linux-x86-low.c (x86_arch_setup): Use
5627 linux_pid_exe_is_elf_64_file.
5628
5629 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5630
5631 * linux-low.c (linux_wait_for_event_1): Rename to ...
5632 (linux_wait_for_event): ... here and merge it with former
5633 linux_wait_for_event - new variable wait_ptid, use it.
5634 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5635
5636 2012-01-23 Pedro Alves <palves@redhat.com>
5637
5638 * server.c (main): Avoid yet another case of infinite loop while
5639 detaching/killing after a longjmp.
5640
5641 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5642
5643 Code cleanup.
5644 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5645
5646 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5647
5648 * hostio.c (handle_readlink): New function.
5649 (handle_vFile): Call it to handle "vFile:readlink" packets.
5650
5651 2012-01-20 Pedro Alves <palves@redhat.com>
5652 Ulrich Weigand <ulrich.weigand@linaro.org>
5653
5654 * server.c (handle_v_requests): Only support vAttach and vRun to
5655 start multiple processes when in extended protocol mode.
5656
5657 2012-01-17 Pedro Alves <palves@redhat.com>
5658
5659 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5660 memalign plus mprotect to allocate the scratch buffer.
5661
5662 2012-01-13 Pedro Alves <palves@redhat.com>
5663
5664 * server.c (attach_inferior): Clear `cont_thread'.
5665
5666 2012-01-13 Pedro Alves <palves@redhat.com>
5667
5668 * server.c (main): Avoid infinite loop while detaching/killing
5669 after a longjmp.
5670
5671 2012-01-09 Doug Evans <dje@google.com>
5672
5673 * server.c (start_inferior): Set last_ptid in --wrapper case.
5674
5675 2012-01-06 Yao Qi <yao@codesourcery.com>
5676
5677 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5678 defined.
5679 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5680
5681 2012-01-04 Yao Qi <yao@codesourcery.com>
5682
5683 * tracepoint.c (cmd_qtdp): Print debug message
5684 for static tracepoint.
5685
5686 2012-01-04 Yao Qi <yao@codesourcery.com>
5687
5688 * tracepoint.c (trace_vdebug): Differentiate debug message
5689 between gdbserver and IPA.
5690
5691 2012-01-03 Yao Qi <yao@codesourcery.com>
5692
5693 * tracepoint.c (tracepoint_was_hit): Don't collect for
5694 static tracepoint.
5695
5696 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5697
5698 * terminal.h: Reformat copyright header.
5699
5700 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5701
5702 * server.c (gdbserver_version): Update copyright year.
5703 * gdbreplay.c (gdbreplay_version): Likewise.
5704
5705 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5706
5707 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5708
5709 Revert:
5710 2011-12-18 Hui Zhu <teawater@gmail.com>
5711 * linux-low.c (linux_create_inferior): Save return value to ret.
5712
5713 2011-12-18 Hui Zhu <teawater@gmail.com>
5714
5715 * linux-low.c (linux_create_inferior): Save return value to ret.
5716
5717 2011-12-16 Doug Evans <dje@google.com>
5718
5719 * linux-low.c (linux_create_inferior): If stdio connection,
5720 redirect stdin from /dev/null, stdout to stderr.
5721 * remote-utils.c (remote_is_stdio): New static global.
5722 (remote_connection_is_stdio): New function.
5723 (remote_prepare): Handle stdio connection.
5724 (remote_open): Ditto.
5725 (remote_close): Don't close stdin for stdio connections.
5726 (read_prim,write_prim): New functions. Replace all calls to
5727 read/write to these.
5728 * server.c (main): Watch for "-" argument. Move call to
5729 remote_prepare before start_inferior.
5730 * server.h (STDIO_CONNECTION_NAME): New macro.
5731 (remote_connection_is_stdio): Declare.
5732
5733 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5734 in debugging output.
5735
5736 2011-12-15 Yao Qi <yao@codesourcery.com>
5737
5738 * tracepoint.c: Include sys/syscall.h.
5739 (gdb_ust_thread): Remove preprocessor conditional.
5740
5741 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5742
5743 * linux-low.c (linux_detach_one_lwp): Call
5744 the_low_target.prepare_to_resume before detaching.
5745
5746 2011-12-14 Yao Qi <yao@codesourcery.com>
5747
5748 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5749 of write.
5750
5751 2011-12-14 Yao Qi <yao@codesourcery.com>
5752
5753 * i386-low.c (i386_low_stopped_data_address): Initialize local
5754 variable `control'.
5755
5756 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5757
5758 PR remote/13492
5759
5760 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5761 DR_CONTROL unless necessary. Extend comments.
5762 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5763 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5764
5765 2011-12-13 Yao Qi <yao@codesourcery.com>
5766
5767 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5768 macros.
5769 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5770
5771 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5772
5773 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5774 Print new debug message for such case.
5775
5776 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5777
5778 Fix overlapping memcpy.
5779 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5780 the read_inferior_memory transfer.
5781 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5782 write_inferior_memory transfer.
5783 (set_fast_tracepoint_jump): New variable buf. Use it for the
5784 read_inferior_memory and write_inferior_memory transfers.
5785 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5786 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5787 Use it for the write_inferior_memory transfer.
5788 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5789 buffers.
5790
5791 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5792
5793 * linux-low.c (fetch_register, store_register): Make code
5794 consistent, fix formatting.
5795
5796 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5797
5798 * linux-low.c (usr_store_inferior_registers): Factor out code
5799 to handle individual registers into...
5800 (store_register): ... this new function.
5801
5802 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5803
5804 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5805 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5806 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5807 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5808 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5809 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5810 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5811 (srv_xmlfiles): Add new XML files.
5812
5813 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5814 and <sys/uio.h>.
5815 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5816 (init_registers_s390_linux32v1): Add prototype.
5817 (init_registers_s390_linux32v2): Likewise.
5818 (init_registers_s390_linux64v1): Likewise.
5819 (init_registers_s390_linux64v2): Likewise.
5820 (init_registers_s390x_linux64v1): Likewise.
5821 (init_registers_s390x_linux64v2): Likewise.
5822 (s390_num_regs): Increment to 52.
5823 (s390_regmap): Add orig_r2 register.
5824 (s390_num_regs_3264): Increment to 68.
5825 (s390_regmap_3264): Add orig_r2 register.
5826 (s390_collect_ptrace_register): Handle orig_r2 register.
5827 (s390_supply_ptrace_register): Likewise.
5828 (s390_fill_last_break): New function.
5829 (s390_store_last_break): Likewise.
5830 (s390_fill_system_call): New function.
5831 (s390_store_system_call): Likewise.
5832 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5833 register sets.
5834 (s390_check_regset): New function.
5835 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5836 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5837 Update target_regsets for available register sets.
5838
5839 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5840 Jan Kratochvil <jan.kratochvil@redhat.com>
5841
5842 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5843 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5844 New.
5845 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5846 * linux-low.h (struct process_info_private): New member r_debug.
5847 * server.c (handle_qxfer_libraries): Call
5848 the_target->qxfer_libraries_svr4.
5849 (handle_qxfer_libraries_svr4): New function.
5850 (qxfer_packets): New entry "libraries-svr4".
5851 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5852 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5853 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5854 PACKET_qXfer_libraries_svr4.
5855
5856 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5857
5858 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5859 PSW address/mask between 8-byte and 16-byte formats.
5860 (s390_supply_ptrace_register): Likewise.
5861 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5862 basic addressing mode bit.
5863
5864 2011-11-24 Stan Shebs <stan@codesourcery.com>
5865
5866 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5867
5868 2011-11-17 Stan Shebs <stan@codesourcery.com>
5869
5870 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5871 (tracing_start_time): New global.
5872 (tracing_stop_time): New global.
5873 (tracing_user_name): New global.
5874 (tracing_notes): New global.
5875 (tracing_stop_note): New global.
5876 (cmd_qtstart): Set traceframe_usage, start_time.
5877 (stop_tracing): Set stop_time.
5878 (cmd_qtstatus): Report additional status.
5879 (cmd_qtp): New function.
5880 (handle_tracepoint_query): Call it.
5881 (cmd_qtnotes): New function.
5882 (handle_tracepoint_general_set): Call it.
5883 (get_timestamp): Rename from tsv_get_timestamp.
5884
5885 2011-11-14 Stan Shebs <stan@codesourcery.com>
5886 Kwok Cheung Yeung <kcy@codesourcery.com>
5887
5888 * linux-x86-low.c (small_jump_insn): New.
5889 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5890 trampoline and error message, build a trampoline and issue a small
5891 jump instruction to it.
5892 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5893 trampoline and error message.
5894 (x86_get_min_fast_tracepoint_insn_len): New.
5895 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5896 * linux-low.h (struct linux_target_ops): Add arguments to
5897 install_fast_tracepoint_jump_pad operation, add new operation.
5898 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5899 arguments.
5900 (linux_get_min_fast_tracepoint_insn_len): New function.
5901 (linux_target_op): Add new operation.
5902 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5903 (gdb_trampoline_buffer_end): Ditto.
5904 (gdb_trampoline_buffer_error): Ditto.
5905 (struct ipa_sym_addresses): Add fields for new IPA variables.
5906 (symbol_list): Add entries for new IPA variables.
5907 (struct tracepoint): Add fields to hold the address range of the
5908 trampoline used by the tracepoint.
5909 (trampoline_buffer_head): New static variable.
5910 (trampoline_buffer_tail): Ditto.
5911 (claim_trampoline_space): New function.
5912 (have_fast_tracepoint_trampoline_buffer): New function.
5913 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5914 structure.
5915 (install_fast_tracepoint): Ditto, also add error buffer argument.
5916 (cmd_qtminftpilen): New function.
5917 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5918 (fast_tracepoint_from_trampoline_address): New function.
5919 (fast_tracepoint_collecting): Handle trampoline as part of jump
5920 pad space.
5921 (set_trampoline_buffer_space): New function.
5922 (initialize_tracepoint): Initialize new IPA variables.
5923 * target.h (struct target_ops): Add arguments to
5924 install_fast_tracepoint_jump_pad operation, add new
5925 get_min_fast_tracepoint_insn_len operation.
5926 (target_get_min_fast_tracepoint_insn_len): New.
5927 (install_fast_tracepoint_jump_pad): Add arguments.
5928 * server.h (IPA_BUFSIZ): Define.
5929 * linux-i386-ipa.c: Include extra header files.
5930 (initialize_fast_tracepoint_trampoline_buffer): New function.
5931 (initialize_low_tracepoint): Call it.
5932 * server.h (set_trampoline_buffer_space): Declare.
5933 (claim_trampoline_space): Ditto.
5934 (have_fast_tracepoint_trampoline_buffer): Ditto.
5935
5936 2011-11-14 Yao Qi <yao@codesourcery.com>
5937
5938 * server.c (handle_query): Handle InstallInTrace for qSupported.
5939 * tracepoint.c (add_tracepoint): Sort list.
5940 (install_tracepoint, download_tracepoint): New.
5941 (cmd_qtdp): Call them to install and download tracepoints.
5942 (sort_tracepoints): Removed.
5943 (cmd_qtstart): Update.
5944
5945 2011-11-14 Yao Qi <yao@codesourcery.com>
5946
5947 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5948 * mem-break.h: Declare.
5949 * tracepoint.c (cmd_qtstart): Move some code to ...
5950 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5951 New.
5952 (download_tracepoints): Move some code to ...
5953 (download_tracepoint_1): ... here. New.
5954
5955 2011-11-08 Yao Qi <yao@codesourcery.com>
5956
5957 * remote-utils.c (relocate_instruction): A comment fix.
5958
5959 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5960
5961 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5962 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5963 dr_status_mirror and dr_control_mirror from debug_reg_state.
5964 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5965 (i386_initial_stuff): Remove use of deleted globals.
5966 (i386_get_thread_context, i386_set_thread_context,
5967 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5968 from debug_reg_state.
5969
5970 2011-11-05 Yao Qi <yao@codesourcery.com>
5971
5972 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5973 address as TPOINT's.
5974
5975 2011-11-02 Stan Shebs <stan@codesourcery.com>
5976
5977 * tracepoint.c (agent_mem_read_string): New function.
5978 (eval_agent_expr): Call it for tracenz.
5979 * server.c (handle_query): Report support for tracenz.
5980
5981 2011-11-02 Yao Qi <yao@codesourcery.com>
5982
5983 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5984
5985 2011-11-02 Yao Qi <yao@codesourcery.com>
5986
5987 * target.h: Fix a typo in comment.
5988
5989 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5990
5991 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5992 clobber the breakpoints' shadows with fast tracepoint jumps.
5993 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5994 * target.c (write_inferior_memory): Also pass MYADDR down to
5995 check_mem_write.
5996
5997 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5998
5999 * configure.ac: Check support for personality routine.
6000 * configure: Regenerate.
6001 * config.in: Likewise.
6002 * linux-low.c: Include <sys/personality.h>.
6003 Define ADDR_NO_RANDOMIZE if necessary.
6004 (linux_create_inferior): Disable address space randomization when
6005 forking inferior, if requested.
6006 (linux_supports_disable_randomization): New function.
6007 (linux_target_ops): Install it.
6008 * server.h (disable_randomization): Declare.
6009 * server.c (disable_randomization): New global variable.
6010 (handle_general_set): Handle QDisableRandomization.
6011 (handle_query): Likewise for qSupported.
6012 (main): Support --disable-randomization and --no-disable-randomization
6013 command line arguments.
6014 * target.h (struct target_ops): Add supports_disable_randomization.
6015 (target_supports_disable_randomization): New macro.
6016
6017 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6018
6019 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6020 ifdef check.
6021 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6022 [!PT_GETDSBT] (target_loadmap): New definition.
6023 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6024 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6025 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6026 and PT_GETDSBT to LINUX_LOADMAP.
6027 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6028 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6029
6030 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6031
6032 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6033 (arm_linux_hwbp_cap): New static variable.
6034 (arm_linux_get_hwbp_cap): Replace by ...
6035 (arm_linux_init_hwbp_cap): ... this new function.
6036 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6037 (arm_linux_get_hw_watchpoint_count): Likewise.
6038 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6039 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6040 (arm_prepare_to_resume): Use perror_with_name instead of error.
6041
6042 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6043
6044 * linux-arm-low.c: Include <signal.h>.
6045 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6046 (struct arm_linux_hwbp_cap): New data type.
6047 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6048 (struct arm_linux_hw_breakpoint): New data type.
6049 (MAX_BPTS, MAX_WPTS): Define.
6050 (struct arch_process_info, struct arch_lwp_info): New data types.
6051 (arm_linux_get_hwbp_cap): New function.
6052 (arm_linux_get_hw_breakpoint_count): Likewise.
6053 (arm_linux_get_hw_watchpoint_count): Likewise.
6054 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6055 (arm_hwbp_control_initialize): Likewise.
6056 (arm_hwbp_control_is_enabled): Likewise.
6057 (arm_hwbp_control_is_initialized): Likewise.
6058 (arm_hwbp_control_disable): Likewise.
6059 (arm_linux_hw_breakpoint_equal): Likewise.
6060 (arm_linux_hw_point_initialize): Likewise.
6061 (struct update_registers_data): New data structure.
6062 (update_registers_callback: New function.
6063 (arm_insert_point): Likewise.
6064 (arm_remove_point): Likewise.
6065 (arm_stopped_by_watchpoint): Likewise.
6066 (arm_stopped_data_address): Likewise.
6067 (arm_new_process): Likewise.
6068 (arm_new_thread): Likewise.
6069 (arm_prepare_to_resume): Likewise.
6070 (the_low_target): Register arm_insert_point, arm_remove_point,
6071 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6072 arm_new_thread, and arm_prepare_to_resume.
6073
6074 2011-09-15 Stan Shebs <stan@codesourcery.com>
6075
6076 * server.h (struct emit_ops): Add compare-goto fields.
6077 * tracepoint.c (gdb_agent_op_sizes): New table.
6078 (emit_eq_goto): New function.
6079 (emit_ne_goto): New function.
6080 (emit_lt_goto): New function.
6081 (emit_le_goto): New function.
6082 (emit_gt_goto): New function.
6083 (emit_ge_goto): New function.
6084 (is_goto_target): New function.
6085 (compile_bytecodes): Recognize special cases of compare-goto
6086 combinations and call specialized emitters for them.
6087 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6088 (amd64_emit_ne_goto): New function.
6089 (amd64_emit_lt_goto): New function.
6090 (amd64_emit_le_goto): New function.
6091 (amd64_emit_gt_goto): New function.
6092 (amd64_emit_ge_goto): New function.
6093 (amd64_emit_ops): Add the new functions.
6094 (i386_emit_eq_goto): New function.
6095 (i386_emit_ne_goto): New function.
6096 (i386_emit_lt_goto): New function.
6097 (i386_emit_le_goto): New function.
6098 (i386_emit_gt_goto): New function.
6099 (i386_emit_ge_goto): New function.
6100 (i386_emit_ops): Add the new functions.
6101
6102 2011-09-08 Stan Shebs <stan@codesourcery.com>
6103
6104 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6105 (i386_emit_epilogue): Restore %ebx.
6106
6107 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6108
6109 * server.c (step_thread): Remove definition.
6110 (process_serial_event): Don't handle Hs.
6111 * server.h (step_thread): Remove declaration.
6112 * target.c (set_desired_inferior): Remove use of step_thread.
6113
6114 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6115
6116 * linux-low.c: Include linux-procfs.h.
6117 (linux_attach_lwp_1): Update comments.
6118 (linux_attach): Scan for existing threads when attaching to a
6119 process that is the tgid.
6120 * Makefile.in: Update dependencies.
6121
6122 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6123
6124 * configure.srv: Add linux-procfs.o dependencies.
6125
6126 2011-08-14 Yao Qi <yao@codesourcery.com>
6127
6128 * target.h (struct target_ops): Fix indent.
6129 * win32-low.c (win32_target_ops): Fix comment.
6130
6131 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6132 Yao Qi <yao@codesourcery.com>
6133
6134 * Makefile.in (clean): Remove tic6x-*.c files.
6135 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6136 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6137 (tic6x-c64xp-linux.c): Likewise.
6138 * configure.srv: Add support for tic6x-*-uclinux.
6139 * linux-tic6x-low.c: New.
6140 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6141
6142 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6143 Yao Qi <yao@codesourcery.com>
6144
6145 * target.h (struct target_ops): Add read_loadmap.
6146 * linux-low.c (struct target_loadseg): New type.
6147 (struct target_loadmap): New type.
6148 (linux_read_loadmap): New function.
6149 (linux_target_ops): Add linux_read_loadmap.
6150 * server.c (handle_query): Support qXfer:fdpic:read packet.
6151 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6152 to NULL.
6153
6154 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6155
6156 * win32-low.c: Include <stdint.h>.
6157
6158 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6159
6160 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6161 to the inferior here.
6162 (i386_remove_aligned_watchpoint): Ditto.
6163 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6164 fit part of the watchpoint in the debug registers.
6165 (i386_update_inferior_debug_regs): New.
6166 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6167 registers, and only update the inferior on success.
6168 (i386_low_remove_watchpoint): Ditto.
6169
6170 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6171
6172 * linux-low.c (compare_ints, unique, list_threads, show_process,
6173 linux_core_of_thread): Delete.
6174 (linux_target_ops): Change linux_core_of_thread to
6175 linux_common_core_of_thread.
6176 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6177 * utils.c (malloc_failure): Change type of argument.
6178 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6179 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6180 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6181 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6182 (IPA_OBJS): Add common-utils-ipa.o.
6183 (ptid_h, linux_osdata_h): New macros.
6184 (server_h): Add common/common-utils.h, common/xml-utils.h,
6185 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6186 common/ptid.h.
6187 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6188 ptid.o, buffer.o): New rules.
6189 (linux-low.o): Add common/linux-osdata.h as a dependency.
6190 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6191 * configure.ac: Add AC_HEADER_DIRENT check.
6192 * config.in: Regenerate.
6193 * configure: Regenerate.
6194 * remote-utils.c (xml_escape_text): Delete.
6195 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6196 buffer_xml_printf): Move to common/buffer.c.
6197 * server.c (main): Remove call to initialize_inferiors.
6198 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6199 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6200 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6201 internal_error, gdb_assert, gdb_assert_fail): Delete.
6202 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6203 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6204 common/buffer.h.
6205 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6206 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6207 initialize_inferiors): Delete.
6208
6209 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6210
6211 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6212 symbol error.
6213
6214 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6215
6216 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6217 assertion.
6218 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6219
6220 2011-05-26 Yao Qi <yao@codesourcery.com>
6221
6222 * Makefile.in (thread-db.o): Track dependence to
6223 common/gdb_thread_db.h.
6224 * thread-db.c: include gdb_thread_db.h from right place.
6225
6226 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6227
6228 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6229 __FILE__ and __LINE__ to internal_error.
6230
6231 2011-05-13 Doug Evans <dje@google.com>
6232
6233 * thread-db.c (try_thread_db_load_from_sdir): New function.
6234 (try_thread_db_load_from_dir): New function.
6235 (thread_db_load_search): Handle $sdir, ignore $pdir.
6236 Remove trying of system directories if search of
6237 libthread-db-search-path fails, that is now done via $sdir.
6238
6239 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6240
6241 * server.c (handle_query): Add EnableDisableTracepoints to the list
6242 of supported features.
6243 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6244 tracepoints.
6245 (cmd_qtenable_disable): New.
6246 (cmd_qtstart): Install tracepoints even if disabled.
6247 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6248 receiving a QTEnable or QTDisable packet.
6249 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6250 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6251 tracepoints.
6252 (gdb_probe): Skip data collection if static tracepoint is disabled.
6253
6254 2011-05-10 Doug Evans <dje@google.com>
6255
6256 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6257
6258 2011-05-04 Doug Evans <dje@google.com>
6259
6260 * linux-low.c (linux_join): Skip process lookup.
6261 * spu-low.c (spu_join): Ditto.
6262 * server.c (join_inferiors_callback): Delete.
6263 (process_serial_event): For 'D' packet (detach) call join_inferior
6264 directly.
6265
6266 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6267
6268 * README: Don't mention xscale*-*-linux*.
6269 * configure.srv (xscale*-*-linux*): Don't handle target.
6270
6271 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6272
6273 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6274 casting pointers.
6275 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6276 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6277 (i386_emit_void_call_2): Likewise.
6278
6279 2011-04-26 Yao Qi <yao@codesourcery.com>
6280
6281 * linux-low.c: Move common macros to linux-ptrace.h.
6282 Include linux-ptrace.h.
6283 * Makefile.in (linux_ptrace_h): New.
6284 (linux-low.o): Depends on linux-ptrace.h.
6285
6286 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6287
6288 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6289 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6290 (remote_prepare): New function with most of the TCP code from ...
6291 (remote_open): ... here. Detect PORT here unconditionally. Move also
6292 setting transport_is_reliable.
6293 * server.c (run_once): New variable.
6294 (gdbserver_usage): Document it.
6295 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6296 the first run if RUN_ONCE.
6297 * server.h (run_once, remote_prepare): New declarations.
6298
6299 2011-04-19 Tom Tromey <tromey@redhat.com>
6300
6301 * win32-low.c (handle_load_dll): Remove duplicate "the".
6302
6303 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6304
6305 Remove support for old Cygwin 1.5 versions.
6306 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6307 function to avoid warning.
6308 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6309 warning.
6310
6311 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6312
6313 * gdbserver/server.h (Macro _): Define it if not available.
6314
6315 2011-03-14 Michael Snyder <msnyder@vmware.com>
6316
6317 * hostio.c (handle_close): Remove unnecessary null test.
6318
6319 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6320
6321 * Makefile.in (maintainer-clean realclean distclean): Remove
6322 "make ... subdir_do" command.
6323
6324 2011-03-10 Michael Snyder <msnyder@vmware.com>
6325
6326 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6327
6328 * server.c (handle_v_run): Free alloced buffer on early return.
6329
6330 2011-03-09 Yao Qi <yao@codesourcery.com>
6331
6332 Revert:
6333 2011-03-04 Yao Qi <yao@codesourcery.com>
6334
6335 * Makefile.in: Remove GNU make feature --directory.
6336
6337 2011-03-05 Yao Qi <yao@codesourcery.com>
6338
6339 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6340 (subdir_do): New make target. Copied from gdb/Makefile.
6341 (maintainer-clean, realclean, distclean, clean): Call corresponding
6342 make targets in common/Makefile.
6343
6344 2011-02-11 Yao Qi <yao@codesourcery.com>
6345
6346 * configure.ac: Call AC_PROG_RANLIB.
6347 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6348 * configure: Regenerate.
6349
6350 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6351
6352 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6353
6354 2011-03-06 Yao Qi <yao@codesourcery.com>
6355
6356 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6357
6358 2011-03-05 Yao Qi <yao@codesourcery.com>
6359
6360 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6361 (subdir_do): New make target. Copied from gdb/Makefile.
6362 (maintainer-clean, realclean, distclean, clean): Call corresponding
6363 make targets in common/Makefile.
6364
6365 2011-03-04 Yao Qi <yao@codesourcery.com>
6366
6367 * Makefile.in: Remove GNU make feature --directory.
6368
6369 2011-03-04 Michael Snyder <msnyder@vmware.com>
6370
6371 * server.c (queue_stop_reply): Call xmalloc not malloc.
6372
6373 2011-03-02 Michael Snyder <msnyder@vmware.com>
6374
6375 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6376
6377 2011-02-28 Michael Snyder <msnyder@vmware.com>
6378
6379 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6380 (cmd_qtframe): Ditto.
6381 (cmd_qtbuffer): Ditto.
6382 (cmd_bigqtbuffer): Ditto.
6383
6384 * utils.c (decimal2str): Initialize 'width' to nine, then
6385 don't mess with it.
6386
6387 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6388
6389 * hostio.c (require_data): Free *data, not data.
6390
6391 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6392
6393 * hostio.c (require_data): Use free, not xfree.
6394
6395 2011-02-27 Michael Snyder <msnyder@vmware.com>
6396
6397 * server.c (handle_query): Discard unused value.
6398
6399 * hostio.c (require_data): Free malloc memory before returning
6400 error.
6401
6402 2011-02-26 Michael Snyder <msnyder@vmware.com>
6403
6404 * linux-low.c (list_threads): Call closedir for dirent.
6405
6406 2011-02-27 Michael Snyder <msnyder@vmware.com>
6407
6408 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6409 a case statement falls through.
6410
6411 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6412
6413 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6414 in comparison.
6415
6416 2011-02-26 Michael Snyder <msnyder@vmware.com>
6417
6418 * utils.c (decimal2str): Eliminate dead code and dead param.
6419 (pulongest): Drop dead param from call to decimal2str.
6420 (plongest): Ditto.
6421
6422 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6423
6424 Revert the following patch (not approved yet):
6425 2011-02-21 Hui Zhu <teawater@gmail.com>
6426 * tracepoint.c (tp_printf): New function.
6427 (eval_agent_expr): Handle gdb_agent_op_printf.
6428
6429 2011-02-21 Hui Zhu <teawater@gmail.com>
6430
6431 * tracepoint.c (tp_printf): New function.
6432 (eval_agent_expr): Handle gdb_agent_op_printf.
6433
6434 2011-02-18 Tom Tromey <tromey@redhat.com>
6435
6436 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6437 (tracepoint.o): Likewise.
6438 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6439 (gdb_agent_op_names): Likewise.
6440
6441 2011-02-18 Tom Tromey <tromey@redhat.com>
6442
6443 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6444 gdb_agent_op_rot>: New constants.
6445 (gdb_agent_op_names): Add pick and roll.
6446 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6447 cases.
6448
6449 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6450
6451 * aclocal.m4: Regenerated with aclocal-1.11.1.
6452
6453 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6454
6455 * server.c (handle_qxfer_traceframe_info): New.
6456 (qxfer_packets): Register "traceframe-info".
6457 (handle_query): Report support for qXfer:traceframe-info:read+.
6458 * tracepoint.c (match_blocktype): New.
6459 (traceframe_find_block_type): Rename to ...
6460 (traceframe_walk_blocks): ... this. Add callback filter argument,
6461 and use it.
6462 (traceframe_find_block_type): New, reimplemented on top of
6463 traceframe_walk_blocks.
6464 (build_traceframe_info_xml): New.
6465 (traceframe_read_info): New.
6466 * server.h (traceframe_read_info): Declare.
6467
6468 2011-02-11 Yao Qi <yao@codesourcery.com>
6469
6470 * configure.ac: Call AC_PROG_RANLIB.
6471 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6472 * configure: Regenerate.
6473
6474 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6475
6476 * server.c (gdb_read_memory): Change return semantics to allow
6477 partial transfers.
6478 (handle_search_memory_1): Adjust.
6479 (process_serial_event) <'m' packet>: Handle partial transfers.
6480 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6481
6482 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6483
6484 * regcache.c (init_register_cache): Initialize
6485 regcache->register_status.
6486 (free_register_cache): Release regcache->register_status.
6487 (regcache_cpy): Copy register_status.
6488 (registers_to_string): Print 'x's for unavailable registers.
6489 (supply_register): Mark the register's status valid or
6490 unavailable, depending on whether a buffer was passed in or not.
6491 (supply_register_zeroed): New.
6492 (supply_regblock): Mark the registers' status valid or
6493 unavailable, depending on whether a buffer was passed in or not.
6494 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6495 (struct regcache): New `register_status' field.
6496 (supply_register_zeroed): Declare.
6497 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6498 supply_register_zeroed, rather than passing a NULL buffer to
6499 supply_register.
6500 * tracepoint.c (fetch_traceframe_registers): Update comment.
6501
6502 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6503
6504 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6505 buffer explicit.
6506
6507 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6508
6509 * server.h (decode_xfer_write): Change prototype.
6510 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6511 and don't extract the annex here.
6512 * server.c (decode_xfer_read): Remove `annex' parameter,
6513 and don't extract the annex here.
6514 (decode_xfer): New.
6515 (struct qxfer): New.
6516 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6517 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6518 (handle_qxfer_statictrace): New functions, abstracted out from
6519 handle_query, and made to use the struct qxfer interface.
6520 (handle_threads_qxfer_proper): Rename to ...
6521 (handle_qxfer_threads_proper): ... this.
6522 (handle_threads_qxfer): Rename to ...
6523 (handle_qxfer_threads): ... this. Adjust.
6524 (qxfer_packets): New array.
6525 (handle_qxfer): New function.
6526 (handle_query): Use handle_qxfer.
6527
6528 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6529
6530 * gdbreplay.c: Shorten lines of >= 80 columns.
6531 * linux-low.c: Ditto.
6532 * linux-ppc-low.c: Ditto.
6533 * linux-s390-low.c: Ditto.
6534 * linux-sparc-low.c: Ditto.
6535 * linux-x86-low.c: Ditto.
6536 * linux-xtensa-low.c: Ditto.
6537 * mem-break.c: Ditto.
6538 * nto-low.c: Ditto.
6539 * regcache.h: Ditto.
6540 * remote-utils.c: Ditto.
6541 * server.c: Ditto.
6542 * server.h: Ditto.
6543 * thread-db.c: Ditto.
6544 * tracepoint.c: Ditto.
6545 * utils.c: Ditto.
6546 * win32-low.h: Ditto.
6547
6548 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6549
6550 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6551 update.
6552
6553 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6554
6555 * server.c (gdbserver_version): Update copyright year in version
6556 output.
6557 * gdbreplay.c (gdbreplay_version): Ditto.
6558
6559 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6560
6561 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6562 * linux-bfin-low.c: New file.
6563 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6564 PT_DATA_ADDR for BFIN targets.
6565 * Makefile.in (SFILES): Add linux-bfin-low.c.
6566 (clean): Remove reg-bfin.c.
6567 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6568 * README: Mention supported Blackfin targets.
6569
6570 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6571
6572 * .gitignore: New file.
6573
6574 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6575
6576 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6577
6578 2010-10-22 Jie Zhang <jie@codesourcery.com>
6579
6580 * Makefile.in: Add FLAGS_TO_PASS variable.
6581 (install): Remove dependency of install-only and recursively
6582 invoke make for install-only.
6583
6584 2010-10-04 Doug Evans <dje@google.com>
6585
6586 * Makefile.in (uninstall): Use $(DESTDIR).
6587
6588 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6589
6590 PR gdb/11842
6591
6592 * linux-x86-low.c (compat_siginfo_from_siginfo)
6593 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6594 si_code is < 0. Check for si_code == SI_TIMER before checking for
6595 si_code < 0.
6596
6597 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6598
6599 * lynx-i386-low.c: New file.
6600 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6601
6602 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6603
6604 * lynx-low.c (ptrace_request_to_str): Remove handling for
6605 request values that have been removed in LynxOS 5.x.
6606
6607 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6608
6609 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6610 <ptrace.h>
6611
6612 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6613
6614 * configure.ac: Add --enable-inprocess-agent option.
6615 * configure: Rebuilt.
6616
6617 2010-09-06 Yao Qi <yao@codesourcery.com>
6618
6619 * linux-low.c (linux_kill): Remove unused variable.
6620 (linux_stabilize_threads): Likewise.
6621 * server.c (start_inferior): Likewise.
6622 (queue_stop_reply_callback): Likewise.
6623 * tracepoint.c (do_action_at_tracepoint): Likewise.
6624
6625 2010-09-06 Yao Qi <yao@codesourcery.com>
6626
6627 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6628 on return.
6629
6630 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6631
6632 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6633
6634 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6635
6636 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6637 "$(IPA_DEPFILES)".
6638
6639 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6640
6641 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6642 gdbserver/lynx-ppc-low.c: New files.
6643 * Makefile.in (lynx_low_h): New variable.
6644 (lynx-low.o, lynx-ppc-low.o): New rules.
6645 * configure.ac: On LynxOS, link with -lnetinet.
6646 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6647 * configure: regenerate.
6648
6649 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6650
6651 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6652 * configure.ac: Add check for vasprintf and vsnprintf.
6653 * configure, config.in: Regenerate.
6654 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6655
6656 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6657
6658 * gdbreplay.c: Move include of alloca.h up, next to include of
6659 malloc.h.
6660 * server.h: Add include of malloc.h.
6661 * mem-break.c: Remove include of malloc.h.
6662 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6663
6664 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6665
6666 * Makefile.in (memmem.o): Build with -Wno-error.
6667
6668 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6669
6670 * utils.c (xsnprintf): Make non-static.
6671 * server.h: Add xsnprintf declaration.
6672 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6673 replace calls to snprintf by calls to xsnprintf throughout.
6674
6675 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6676
6677 * configure.ac: Add configure check for alloca.
6678 * configure, config.in: Regenerate.
6679 * server.h: Include alloca.h if it exists.
6680 * gdbreplay.c: Include alloca.h if it exists.
6681
6682 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6683
6684 * linux-low.c (__SIGRTMIN): Define if not already defined.
6685 (linux_create_inferior): Check for __ANDROID__ rather than
6686 __SIGRTMIN.
6687 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6688 are already deferred.
6689 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6690 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6691 stopped and already has a pending signal to report.
6692 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6693 a pending signal to report or is moving out of a jump pad.
6694 (linux_init_signals): Check for __ANDROID__ rather than
6695 __SIGRTMIN.
6696
6697 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6698
6699 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6700 debug_threads check. Avoid a linear search when not doing debug
6701 output.
6702
6703 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6704
6705 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6706 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6707 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6708 (process_event): Change local fd's type to gdb_fildes_t.
6709 (create_file_handler): Adjust prototype.
6710 (delete_file_handler): Adjust prototype.
6711 (handle_file_event): Adjust prototype. Use pfildes.
6712 (create_file_event): Adjsut prototype.
6713 * remote-utils.c (remote_desc, listen_desc): Change type to
6714 gdb_fildes_t.
6715 * server.h: New gdb_fildes_t typedef.
6716 [USE_WIN32API]: Include winsock2.h.
6717 (delete_file_handler, add_file_handler): Adjust prototypes.
6718 (pfildes): Declare.
6719 * utils.c (pfildes): New.
6720
6721 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6722
6723 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6724 * configure: Regenerate.
6725
6726 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6727
6728 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6729 (linux_done_accessing_memory): ... this.
6730 (linux_target_ops): Adjust.
6731 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6732 * nto-low.c (nto_target_ops): Adjust comment.
6733 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6734 * spu-low.c (spu_target_ops): Adjust comment.
6735 * target.h (target_ops): Rename unprepare_to_access_memory field
6736 to done_accessing_memory.
6737 (unprepare_to_access_memory): Rename to ...
6738 (done_accessing_memory): ... this.
6739
6740 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6741
6742 * linux-low.c (linux_prepare_to_access_memory): New.
6743 (linux_unprepare_to_access_memory): New.
6744 (linux_target_ops): Install them.
6745 * server.c (read_memory): Rename to ...
6746 (gdb_read_memory): ... this. Use
6747 prepare_to_access_memory/prepare_to_access_memory.
6748 (write_memory): Rename to ...
6749 (gdb_write_memory): ... this. Use
6750 prepare_to_access_memory/prepare_to_access_memory.
6751 (handle_search_memory_1): Adjust.
6752 (process_serial_event): Adjust.
6753 * target.h (struct target_ops): New fields
6754 prepare_to_access_memory and unprepare_to_access_memory.
6755 (prepare_to_access_memory, unprepare_to_access_memory): New.
6756 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6757 prepare_to_access_memory/prepare_to_access_memory.
6758 * nto-low.c (nto_target_ops): Adjust.
6759 * spu-low.c (spu_target_ops): Adjust.
6760 * win32-low.c (win32_target_ops): Adjust.
6761
6762 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6763
6764 * Makefile.in (WARN_CFLAGS): Get it from configure.
6765 (WERROR_CFLAGS): New.
6766 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6767 * configure.ac: Introduce --enable-werror, which adds -Werror to
6768 the compiler command line. Enabled by default. Disable with
6769 --disable-werror. Add -Wdeclaration-after-statement
6770 Wpointer-arith and -Wformat-nonliteral to warning flags.
6771 * configure: Regenerate.
6772
6773 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6774
6775 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6776
6777 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6778
6779 * gdbreplay.c (remote_error): New.
6780 (gdbchar): New.
6781 (expect): Use gdbchar. Check for error reading from GDB.
6782 Clarify sync error output.
6783 (play): Check for errors writing to GDB.
6784 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6785 * remote-utils.c (getpkt): Check for errors writing to the remote
6786 descriptor.
6787
6788 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6789
6790 * linux-low.c (linux_wait_1): Move non-debugging code out of
6791 `debug_threads' control.
6792
6793 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6794
6795 * linux-low.c (linux_wait_1): Don't set last_status here.
6796 * server.c (push_event, queue_stop_reply_callback): Assert we're
6797 not pushing a TARGET_WAITKIND_IGNORE event.
6798 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6799 (myresume, handle_target_event): Set the thread's last_resume_kind
6800 and last_status from the target returned status.
6801
6802 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6803
6804 PR threads/10729
6805
6806 * linux-x86-low.c (update_debug_registers_callback): New.
6807 (i386_dr_low_set_addr): Use it.
6808 (i386_dr_low_get_addr): New.
6809 (i386_dr_low_set_control): Use update_debug_registers_callback.
6810 (i386_dr_low_get_control): New.
6811 (i386_dr_low_get_status): Adjust.
6812 * linux-low.c (linux_stop_lwp): New.
6813 * linux-low.h (linux_stop_lwp): Declare.
6814
6815 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6816 argument instead of a i386_debug_reg_state.
6817 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6818 a i386_debug_reg_state.
6819 (i386_insert_aligned_watchpoint): Adjust.
6820 (i386_remove_aligned_watchpoint): Adjust.
6821 (i386_low_stopped_data_address): Read the debug registers from the
6822 inferior instead of from the mirrors.
6823 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6824 (i386_dr_low_get_addr): Declare.
6825 (i386_dr_low_get_control): Declare.
6826 (i386_dr_low_get_status): Change prototype.
6827
6828 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6829 (i386_dr_low_get_addr): New.
6830 (i386_dr_low_get_control): New.
6831 (i386_dr_low_get_status): Adjust prototype. Return
6832 dr_status_mirror.
6833 (i386_initial_stuff): Clear dr_status_mirror and
6834 dr_control_mirror.
6835 (i386_get_thread_context): Adjust.
6836 (i386_set_thread_context): Adjust.
6837 (i386_thread_added): Adjust.
6838
6839 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6840
6841 * linux-low.h (linux_thread_area): Delete declaration.
6842
6843 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6844
6845 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6846 after its termination.
6847
6848 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6849
6850 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6851 (gdb_wants_all_stopped): Delete.
6852 (linux_wait_1): Don't call them.
6853 * server.c (handle_v_cont): Tag all threads as want-stopped.
6854 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6855 stopped as "client-wants-stopped".
6856
6857 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6858
6859 * Makefile.in (signals_h): New.
6860 (server_h): Depend on it.
6861 (server.o): Don't depend on $(signals_def).
6862 (signals.o): Depend on $(signals_def).
6863
6864 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6865
6866 * Makefile.in (signals_def): New.
6867 (server_h): Append include/gdb/signals.h and signals_def.
6868 (server.o): Append signals_def.
6869
6870 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6871
6872 * server.c (handle_target_event): Use target_signal_to_host for
6873 resume_info.sig initialization.
6874 * target.h (struct thread_resume) <sig>: New comment.
6875
6876 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6877
6878 * server.c (handle_query): strcpy() the returned string from paddress()
6879 instead of sprintf().
6880 * utils.c (paddress): Return phex_nz().
6881
6882 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6883
6884 * server.c (handle_v_cont): Call mourn_inferior if process
6885 just exited.
6886 (myresume): Likewise.
6887
6888 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6889
6890 Static tracepoints, and integration with UST.
6891
6892 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6893 * mem-break.c (uninsert_all_breakpoints)
6894 (reinsert_all_breakpoints): New.
6895 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6896 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6897 (gdb_agent_ust_loaded, helper_thread_id)
6898 (gdb_agent_helper_thread_id): New macros.
6899 (struct ipa_sym_addresses): Add addr_ust_loaded,
6900 addr_helper_thread_id, addr_cmd_buf.
6901 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6902 (in_process_agent_loaded_ust): New.
6903 (write_e_ust_not_loaded): New.
6904 (maybe_write_ipa_ust_not_loaded): New.
6905 (struct collect_static_trace_data_action): New.
6906 (enum tracepoint_type) <static_tracepoint>: New.
6907 (struct tracepoint) <handle>: Mention static tracepoints.
6908 (struct static_tracepoint_ctx): New.
6909 (CMD_BUF_SIZE): New.
6910 (add_tracepoint_action): Handle static tracepoint actions.
6911 (unprobe_marker_at): New.
6912 (clear_installed_tracepoints): Handle static tracepoints.
6913 (cmd_qtdp): Handle static tracepoints.
6914 (probe_marker_at): New.
6915 (cmd_qtstart): Handle static tracepoints.
6916 (response_tracepoint): Handle static tracepoints.
6917 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6918 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6919 (get_context_regcache): Handle static tracepoints.
6920 (do_action_at_tracepoint): Handle static tracepoint actions.
6921 (traceframe_find_block_type): Handle static trace data blocks.
6922 (traceframe_read_sdata): New.
6923 (download_tracepoints): Download static tracepoint actions.
6924 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6925 (GDB_PROBE_NAME): New.
6926 (ust_ops): New.
6927 (GET_UST_SYM): New.
6928 (USTF): New.
6929 (dlsym_ust): New.
6930 (ust_marker_to_static_tracepoint): New.
6931 (gdb_probe): New.
6932 (collect_ust_data_at_tracepoint): New.
6933 (gdb_ust_probe): New.
6934 (UNIX_PATH_MAX, SOCK_DIR): New.
6935 (gdb_ust_connect_sync_socket): New.
6936 (resume_thread, stop_thread): New.
6937 (run_inferior_command): New.
6938 (init_named_socket): New.
6939 (gdb_ust_socket_init): New.
6940 (cstr_to_hexstr): New.
6941 (next_st): New.
6942 (first_marker, next_marker): New.
6943 (response_ust_marker): New.
6944 (cmd_qtfstm, cmd_qtsstm): New.
6945 (unprobe_marker_at, probe_marker_at): New.
6946 (cmd_qtstmat, gdb_ust_thread): New.
6947 (gdb_ust_init): New.
6948 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6949 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6950 (ST_REGENTRY): New.
6951 (x86_64_st_collect_regmap): New.
6952 (X86_64_NUM_ST_COLLECT_GREGS): New.
6953 (AMD64_RIP_REGNUM): New.
6954 (supply_static_tracepoint_registers): New.
6955 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6956 (ST_REGENTRY): New.
6957 (i386_st_collect_regmap): New.
6958 (i386_NUM_ST_COLLECT_GREGS): New.
6959 (supply_static_tracepoint_registers): New.
6960 * server.c (handle_query): Handle qXfer:statictrace:read.
6961 <qSupported>: Report support for StaticTracepoints, and
6962 qXfer:statictrace:read features.
6963 * server.h (traceframe_read_sdata)
6964 (supply_static_tracepoint_registers): Declare.
6965 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6966 (unpack_varlen_hex): Include in IPA build.
6967 * Makefile.in (ustlibs, ustinc): New.
6968 (IPA_OBJS): Add remote-utils-ipa.o.
6969 ($(IPA_LIB)): Link -ldl and -lpthread.
6970 (UST_CFLAGS): New.
6971 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6972 * config.in, configure: Regenerate.
6973
6974 2010-06-20 Ian Lance Taylor <iant@google.com>
6975 Pedro Alves <pedro@codesourcery.com>
6976
6977 * linux-x86-low.c (always_true): Delete.
6978 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6979 trying to fool the compiler with always_true.
6980
6981 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6982
6983 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6984 conditions in gdbserver.
6985
6986 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6987
6988 * spu-low.c (spu_read_memory): Wrap around local store limit.
6989 (spu_write_memory): Likewise.
6990
6991 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6992
6993 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6994 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6995 LONGEST uses.
6996 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6997 uses.
6998 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6999 uses with LONGEST uses.
7000
7001 2010-06-14 Stan Shebs <stan@codesourcery.com>
7002 Pedro Alves <pedro@codesourcery.com>
7003
7004 Bytecode compiler.
7005
7006 * linux-x86-low.c: Include limits.h.
7007 (add_insns): New.
7008 (always_true): New.
7009 (EMIT_ASM): New.
7010 (EMIT_ASM32): New.
7011 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7012 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7013 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7014 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7015 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7016 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7017 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7018 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7019 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7020 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7021 (amd64_emit_void_call_2): New.
7022 (amd64_emit_ops): New.
7023 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7024 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7025 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7026 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7027 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7028 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7029 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7030 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7031 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7032 (i386_emit_stack_adjust, i386_emit_int_call_1)
7033 (i386_emit_void_call_2): New.
7034 (i386_emit_ops): New.
7035 (x86_emit_ops): New.
7036 (the_low_target): Install x86_emit_ops.
7037 * server.h (struct emit_ops): New.
7038 (get_raw_reg_func_addr): Declare.
7039 (current_insn_ptr, emit_error): Declare.
7040 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7041 (set_trace_state_variable_value): New defines.
7042 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7043 addr_get_trace_state_variable_value and
7044 addr_set_trace_state_variable_value.
7045 (symbol_list): New fields for get_raw_reg,
7046 get_trace_state_variable_value and set_trace_state_variable_value.
7047 (condfn): New typedef.
7048 (struct tracepoint): New field `compiled_cond'.
7049 (do_action_at_tracepoint): Clear compiled_cond.
7050 (get_trace_state_variable_value, set_trace_state_variable_value):
7051 Export in the IPA.
7052 (condition_true_at_tracepoint): If there's a compiled condition,
7053 run that.
7054 (current_insn_ptr, emit_error): New globals.
7055 (struct bytecode_address): New.
7056 (get_raw_reg_func_addr): New.
7057 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7058 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7059 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7060 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7061 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7062 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7063 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7064 (compile_tracepoint_condition, compile_bytecodes): New.
7065 * target.h (emit_ops): Forward declare.
7066 (struct target_ops): New field emit_ops.
7067 (target_emit_ops): New.
7068 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7069 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7070 * linux-low.c (linux_emit_ops): New.
7071 (linux_target_ops): Install it.
7072 * linux-low.h (struct linux_target_ops): New field emit_ops.
7073
7074 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7075
7076 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7077 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7078
7079 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7080 Stan Shebs <stan@codesourcery.com>
7081
7082 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7083 (all): Depend on $(extra_libraries).
7084 (install-only): Install the IPA.
7085 (IPA_OBJS, IPA_LIB): New.
7086 (clean): Remove the IPA lib.
7087 (IPAGENT_CFLAGS): New.
7088 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7089 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7090 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7091 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7092 * configure.ac: Check for atomic builtins support in the compiler.
7093 (IPA_DEPFILES, extra_libraries): Define.
7094 * configure.srv (ipa_obj): Add description.
7095 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7096 (i[34567]86-*-linux*): Set ipa_obj.
7097 (x86_64-*-linux*): Set ipa_obj.
7098 * linux-low.c (stabilizing_threads): New.
7099 (supports_fast_tracepoints): New.
7100 (linux_detach): Stabilize threads before detaching.
7101 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7102 the lwp is either not stabilizing, or is moving out of a jump pad.
7103 (linux_fast_tracepoint_collecting): New.
7104 (maybe_move_out_of_jump_pad): New.
7105 (enqueue_one_deferred_signal): New.
7106 (dequeue_one_deferred_signal): New.
7107 (linux_wait_for_event_1): If moving out of a jump pad, defer
7108 pending signals to later.
7109 (linux_stabilize_threads): New.
7110 (linux_wait_1): Check if threads need moving out of jump pads, and
7111 do it if so.
7112 (stuck_in_jump_pad_callback): New.
7113 (move_out_of_jump_pad_callback): New.
7114 (lwp_running): New.
7115 (linux_resume_one_lwp): Handle moving out of jump pads.
7116 (linux_set_resume_request): Dequeue deferred signals.
7117 (need_step_over_p): Also step over fast tracepoint jumps.
7118 (start_step_over): Also uninsert fast tracepoint jumps.
7119 (finish_step_over): Also reinsert fast tracepoint jumps.
7120 (linux_install_fast_tracepoint_jump): New.
7121 (linux_target_ops): Install linux_stabilize_threads and
7122 linux_install_fast_tracepoint_jump_pad.
7123 * linux-low.h (linux_target_ops) <get_thread_area,
7124 install_fast_tracepoint_jump_pad>: New fields.
7125 (struct lwp_info) <collecting_fast_tracepoint,
7126 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7127 (linux_get_thread_area): Declare.
7128 * linux-x86-low.c (jump_insn): New.
7129 (x86_get_thread_area): New.
7130 (append_insns): New.
7131 (push_opcode): New.
7132 (amd64_install_fast_tracepoint_jump_pad): New.
7133 (i386_install_fast_tracepoint_jump_pad): New.
7134 (x86_install_fast_tracepoint_jump_pad): New.
7135 (the_low_target): Install x86_get_thread_area and
7136 x86_install_fast_tracepoint_jump_pad.
7137 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7138 (struct fast_tracepoint_jump): New.
7139 (fast_tracepoint_jump_insn): New.
7140 (fast_tracepoint_jump_shadow): New.
7141 (find_fast_tracepoint_jump_at): New.
7142 (fast_tracepoint_jump_here): New.
7143 (delete_fast_tracepoint_jump): New.
7144 (set_fast_tracepoint_jump): New.
7145 (uninsert_fast_tracepoint_jumps_at): New.
7146 (reinsert_fast_tracepoint_jumps_at): New.
7147 (set_breakpoint_at): Use write_inferior_memory.
7148 (uninsert_raw_breakpoint): Use write_inferior_memory.
7149 (check_mem_read): Mask out fast tracepoint jumps.
7150 (check_mem_write): Mask out fast tracepoint jumps.
7151 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7152 (set_fast_tracepoint_jump): Declare.
7153 (delete_fast_tracepoint_jump)
7154 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7155 (reinsert_fast_tracepoint_jumps_at): Declare.
7156 * regcache.c: Don't compile many functions when building the
7157 in-process agent library.
7158 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7159 the register buffer in the heap.
7160 (free_register_cache): If the register buffer isn't owned by the
7161 regcache, don't free it.
7162 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7163 pre-existing register caches.
7164 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7165 type.
7166 (convert_ascii_to_int): : Constify `from' parameter type.
7167 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7168 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7169 the needed buffer in-place.
7170 (relocate_instruction): New.
7171 * server.c (handle_query) <qSymbols>: If the target supports
7172 tracepoints, give it a chance of looking up symbols. Report
7173 support for fast tracepoints.
7174 (handle_status): Stabilize threads.
7175 (process_serial_event): Adjust.
7176 * server.h (struct fast_tracepoint_jump): Forward declare.
7177 (struct process_info) <fast_tracepoint_jumps>: New field.
7178 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7179 (decode_X_packet, decode_M_packet): Adjust.
7180 (relocate_instruction): Declare.
7181 (in_process_agent_loaded): Declare.
7182 (tracepoint_look_up_symbols): Declare.
7183 (struct fast_tpoint_collect_status): Declare.
7184 (fast_tracepoint_collecting): Declare.
7185 (force_unlock_trace_buffer): Declare.
7186 (handle_tracepoint_bkpts): Declare.
7187 (initialize_low_tracepoint)
7188 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7189 * target.h (struct target_ops) <stabilize_threads,
7190 install_fast_tracepoint_jump_pad>: New fields.
7191 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7192 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7193 [HAVE_STDINT_H]: Include stdint.h.
7194 (trace_debug_1): Rename to ...
7195 (trace_vdebug): ... this.
7196 (trace_debug): Rename to ...
7197 (trace_debug_1): ... this. Add `level' parameter.
7198 (trace_debug): New.
7199 (ATTR_USED, ATTR_NOINLINE): New.
7200 (IP_AGENT_EXPORT): New.
7201 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7202 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7203 (about_to_request_buffer_space, trace_buffer_is_full)
7204 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7205 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7206 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7207 (traceframe_write_count, traceframes_created)
7208 (trace_state_variables)
7209 New renaming defines.
7210 (struct ipa_sym_addresses): New.
7211 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7212 (symbol_list): New.
7213 (ipa_sym_addrs): New.
7214 (all_tracepoint_symbols_looked_up): New.
7215 (in_process_agent_loaded): New.
7216 (write_e_ipa_not_loaded): New.
7217 (maybe_write_ipa_not_loaded): New.
7218 (tracepoint_look_up_symbols): New.
7219 (debug_threads) [IN_PROCESS_AGENT]: New.
7220 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7221 (UNKNOWN_SIDE_EFFECTS): New.
7222 (stop_tracing): New.
7223 (flush_trace_buffer): New.
7224 (stop_tracing_bkpt): New.
7225 (flush_trace_buffer_bkpt): New.
7226 (read_inferior_integer): New.
7227 (read_inferior_uinteger): New.
7228 (read_inferior_data_pointer): New.
7229 (write_inferior_data_pointer): New.
7230 (write_inferior_integer): New.
7231 (write_inferior_uinteger): New.
7232 (struct collect_static_trace_data_action): Delete.
7233 (enum tracepoint_type): New.
7234 (struct tracepoint) <type>: New field `type'.
7235 <actions_str, step_actions, step_actions_str>: Only include in
7236 GDBserver.
7237 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7238 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7239 (tracepoints): Use IP_AGENT_EXPORT.
7240 (last_tracepoint): Don't include in the IPA.
7241 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7242 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7243 (alloced_trace_state_variables): New.
7244 (trace_state_variables): Use IP_AGENT_EXPORT.
7245 (traceframe_t): Delete unused variable.
7246 (circular_trace_buffer): Don't include in the IPA.
7247 (trace_buffer_start): Delete.
7248 (struct trace_buffer_control): New.
7249 (trace_buffer_free): Delete.
7250 (struct ipa_trace_buffer_control): New.
7251 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7252 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7253 New.
7254 (trace_buffer_ctrl): New.
7255 (TRACE_BUFFER_CTRL_CURR): New.
7256 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7257 Reimplement as macros.
7258 (trace_buffer_wrap): Delete.
7259 (traceframe_write_count, traceframe_read_count)
7260 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7261 (struct tracepoint_hit_ctx) <type>: New field.
7262 (struct fast_tracepoint_ctx): New.
7263 (memory_barrier): New.
7264 (cmpxchg): New.
7265 (record_tracepoint_error): Update atomically in the IPA.
7266 (clear_inferior_trace_buffer): New.
7267 (about_to_request_buffer_space): New.
7268 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7269 updating the same buffer.
7270 (add_tracepoint): Default the tracepoint's type to trap
7271 tracepoint, and orig_size to -1.
7272 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7273 internal variables.
7274 (create_trace_state_variable): New parameter `gdb'. Handle it.
7275 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7276 (cmd_qtdp): Handle fast tracepoints.
7277 (cmd_qtdv): Adjust.
7278 (max_jump_pad_size): New.
7279 (gdb_jump_pad_head): New.
7280 (get_jump_space_head): New.
7281 (claim_jump_space): New.
7282 (sort_tracepoints): New.
7283 (MAX_JUMP_SIZE): New.
7284 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7285 IPA.
7286 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7287 support. Upload fast traceframes, and delete internal IPA
7288 breakpoints.
7289 (stop_tracing_handler): New.
7290 (flush_trace_buffer_handler): New.
7291 (cmd_qtstop): Upload fast tracepoints.
7292 (response_tracepoint): Handle fast tracepoints.
7293 (tracepoint_finished_step): Upload fast traceframes. Set the
7294 tracepoint hit context's tracepoint type.
7295 (handle_tracepoint_bkpts): New.
7296 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7297 type. Add comment about fast tracepoints.
7298 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7299 non-existing action_str field.
7300 (get_context_regcache): Handle fast tracepoints.
7301 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7302 to the regcache.
7303 (fast_tracepoint_from_jump_pad_address): New.
7304 (fast_tracepoint_from_ipa_tpoint_address): New.
7305 (collecting_t): New.
7306 (force_unlock_trace_buffer): New.
7307 (fast_tracepoint_collecting): New.
7308 (collecting): New.
7309 (gdb_collect): New.
7310 (write_inferior_data_ptr): New.
7311 (target_tp_heap): New.
7312 (target_malloc): New.
7313 (download_agent_expr): New.
7314 (UALIGN): New.
7315 (download_tracepoints): New.
7316 (download_trace_state_variables): New.
7317 (upload_fast_traceframes): New.
7318 (IPA_FIRST_TRACEFRAME): New.
7319 (IPA_NEXT_TRACEFRAME_1): New.
7320 (IPA_NEXT_TRACEFRAME): New.
7321 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7322 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7323 (gdb_jump_pad_buffer_end): New.
7324 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7325 (initialize_tracepoint): Adjust.
7326 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7327 buffer. Initialize the low module.
7328 * utils.c (PREFIX, TOOLNAME): New.
7329 (malloc_failure): Use PREFIX.
7330 (error): In the IPA, an error causes an exit.
7331 (fatal, warning): Use PREFIX.
7332 (internal_error): Use TOOLNAME.
7333 (NUMCELLS): Increase to 10.
7334 * configure, config.in: Regenerate.
7335
7336 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7337
7338 * server.c (handle_query) <qSupported>: Do two passes over the
7339 qSupported string to avoid nesting strtok.
7340
7341 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7342
7343 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7344 (CDEPS): New.
7345 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7346 -Wl,--dynamic-list.
7347 * configure: Regenerate.
7348 * proc-service.list: New.
7349
7350 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7351
7352 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7353 New comment.
7354
7355 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7356
7357 * gdbreplay.c (remote_open): Check error return from socket() call by
7358 its equality to -1 not by it being negative.
7359 * remote-utils.c (remote_open): Likewise.
7360
7361 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7362
7363 * config.h: Regenerate.
7364
7365 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7366
7367 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7368 doesn't provide PTRACE_GET_THREAD_AREA.
7369
7370 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7371
7372 * linux-m68k-low.c: Include <asm/ptrace.h>
7373 (ps_get_thread_area): Implement.
7374
7375 2010-05-03 Doug Evans <dje@google.com>
7376
7377 * event-loop.c (struct callback_event): New struct.
7378 (callback_list): New global.
7379 (append_callback_event, delete_callback_event): New functions.
7380 (process_callback): New function.
7381 (start_event_loop): Call it.
7382 * remote-utils.c (NOT_SCHEDULED): Define.
7383 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7384 moved out of readchar.
7385 (readchar): Rewrite. Call reschedule before returning.
7386 (reset_readchar): New function.
7387 (remote_close): Call it.
7388 (process_remaining, reschedule): New functions.
7389 * server.h (callback_handler_func): New typedef.
7390 (append_callback_event, delete_callback_event): Declare.
7391
7392 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7393
7394 * proc-service.c (ps_pglobal_lookup): Use
7395 thread_db_look_up_one_symbol.
7396 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7397 parameter. Use it instead of all_symbols_looked_up.
7398 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7399 field.
7400 (all_symbols_looked_up): Don't declare.
7401 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7402 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7403 field.
7404 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7405 Set all_symbols_looked_up here.
7406 (thread_db_look_up_one_symbol): New.
7407 (thread_db_get_tls_address): Adjust.
7408 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7409 thread_db object on the heap, and tentatively set it in the
7410 process structure.
7411 (thread_db_init): Don't set all_symbols_looked_up here.
7412 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7413
7414 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7415
7416 * linux-low.c (linux_kill, linux_detach): Adjust.
7417 (status_pending_p_callback): Remove redundant statement. Check
7418 for !TARGET_WAITIKIND_IGNORE, instead of
7419 TARGET_WAITKIND_STOPPED.
7420 (handle_tracepoints): Make sure LWP is locked. Adjust.
7421 (linux_wait_for_event_1): Adjust.
7422 (linux_cancel_breakpoints): New.
7423 (unsuspend_one_lwp): New.
7424 (unsuspend_all_lwps): New.
7425 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7426 (send_sigstop_callback): Change return type to int, add new
7427 `except' parameter and handle it.
7428 (suspend_and_send_sigstop_callback): New.
7429 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7430 pass them down. If SUSPEND, also increment the lwp's suspend
7431 count.
7432 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7433 (need_step_over_p): Don't consider suspended LWPs.
7434 (start_step_over): Adjust.
7435 (proceed_one_lwp): Change return type to int, add new `except'
7436 parameter and handle it.
7437 (unsuspend_and_proceed_one_lwp): New.
7438 (proceed_all_lwps): Use find_inferior instead of
7439 for_each_inferior.
7440 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7441 also decrement the suspend count of LWPs. Pass `except' down,
7442 instead of hacking its suspend count.
7443 (linux_pause_all): Add `freeze' parameter. Adjust.
7444 (linux_unpause_all): New.
7445 (linux_target_ops): Install linux_unpause_all.
7446 * server.c (handle_status): Adjust.
7447 * target.h (struct target_ops): New fields `unpause_all' and
7448 `cancel_breakpoints'. Add new parameter to `pause_all'.
7449 (pause_all): Add new `freeze' parameter.
7450 (unpause_all): New.
7451 (cancel_breakpoints): New.
7452 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7453 cancel breakpoints.
7454 (cmd_qtstart): Pause threads.
7455 (stop_tracing): Pause threads, and cancel breakpoints.
7456 * win32-low.c (win32_target_ops): Adjust.
7457
7458 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7459
7460 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7461 the inferior right away from here...
7462 (linux_wait_1): ... to here, and adjust to check the thread's
7463 last_resume_kind instead of the lwp's step or stop_expected flags.
7464
7465 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7466
7467 * README: Use consistent `GDB' and `GDBserver' spellings.
7468
7469 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7470
7471 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7472 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7473 (linux_detach_one_lwp): Assume the lwp is stopped.
7474 (any_thread_of): Delete.
7475 (linux_detach): Stop all lwps here. Don't blindly delete all
7476 breakpoints.
7477 (delete_lwp_callback): New.
7478 (linux_mourn): Delete all lwps of the process that is gone.
7479 (linux_wait_1): Don't delete the last lwp of the process here.
7480 * mem-break.h (mark_breakpoints_out): Declare.
7481 * mem-break.c (mark_breakpoints_out): New.
7482 (free_all_breakpoints): Use it.
7483 * server.c (handle_target_event): If the process is gone, mark
7484 breakpoints out.
7485 * thread-db.c (struct thread_db) <create_bp>: New field.
7486 (thread_db_enable_reporting): Fix prototype. Store a thread event
7487 breakpoint reference in the thread_db struct.
7488 (thread_db_load_search): Clear the thread_db object.
7489 (try_thread_db_load_1): Ditto.
7490 (switch_to_process): New.
7491 (disable_thread_event_reporting): Use it.
7492 (remove_thread_event_breakpoints): New.
7493 (thread_db_detach, thread_db_mourn): Use it.
7494
7495 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7496
7497 * linux-low.c (linux_enable_event_reporting): New.
7498 (linux_wait_for_event_1, handle_extended_wait): Use it.
7499
7500 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7501
7502 * linux-low.c (linux_kill_one_lwp, linux_kill)
7503 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7504 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7505 SIGSTOP even if the LWP is stopped.
7506 (send_sigstop_callback): New.
7507 (stop_all_lwps): Use send_sigstop_callback instead.
7508 (linux_resume_one_thread): Adjust.
7509 (proceed_one_lwp): Still proceed an LWP that the client has
7510 requested to stop, if we haven't reported it as stopped yet. Make
7511 sure that LWPs the client want stopped, have a pending SIGSTOP.
7512
7513 2010-04-26 Doug Evans <dje@google.com>
7514
7515 * server.c (handle_general_set): Make static.
7516
7517 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7518 Print received char after testing for error/eof instead of before.
7519 (input_interrupt): Tweak comment.
7520
7521 2010-04-23 Doug Evans <dje@google.com>
7522
7523 * server.c (start_inferior): Print inferior argv if --debug.
7524
7525 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7526
7527 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7528 * nto-x86-low.c: Include server.h
7529
7530 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7531
7532 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7533 be consistent with other sources of this directory.
7534 (init_registers_amd64): Correct name of source file of this function
7535 in the comment.
7536
7537 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7538
7539 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7540 64-bit executables.
7541
7542 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7543
7544 * win32-i386-low.c: Add 64-bit support.
7545 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7546 (init_registers_amd64): Declare.
7547 (mappings): Add 64-bit version of array.
7548 (init_windows_x86): New function.
7549 (the_low_target): Change init_arch field to init_windows_x86.
7550
7551 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7552
7553 * win32-low.c: Adapt to support also 64-bit architecture.
7554 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7555 (get_image_name): Use SIZE_T type for local variable `done'.
7556 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7557 (toolhelp_get_dll_name): Idem.
7558 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7559 Use uintptr_t typecast to avoid warning.
7560 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7561 (handle_exception): Use phex_nz to avoid warning.
7562 (win32_wait): Remove unused local variable `process'.
7563
7564 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7565
7566 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7567 `amd64-avx.o'.
7568
7569 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7570
7571 * configure.ac: Use `ws2_32' library for srv_mingw.
7572 * configure: Regenerate.
7573 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7574 * remote-utils.c: Likewise.
7575
7576 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7577
7578 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7579 if __x86_64__ is defined.
7580
7581 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7582
7583 * configure: Regenerate.
7584
7585 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7586
7587 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7588 * target.h (target_ops): New get_tib_address field.
7589 * win32-low.h (win32_thread_info): Add thread_local_base field.
7590 * win32-low.c (child_add_thread): Add tlb argument.
7591 Set thread_local_base field to TLB.
7592 (get_child_debug_event): Adapt to child_add_thread change.
7593 (win32_get_tib_address): New function.
7594 (win32_target_ops): Set get_tib_address field to
7595 win32_get_tib_address.
7596 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7597
7598 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7599
7600 * linux-low.c (linux_mourn): Also remove the process.
7601 * server.c (handle_target_event): Don't remove the process here.
7602 * nto-low.c (nto_mourn): New.
7603 (nto_target_ops): Install it.
7604 * spu-low.c (spu_mourn): New.
7605 (spu_target_ops): Install it.
7606 * win32-low.c (win32_mourn): New.
7607 (win32_target_ops): Install it.
7608
7609 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7610
7611 * server.h (buffer_xml_printf): Remove redundant `;'.
7612
7613 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7614
7615 * regcache.c (set_register_cache): Invalidate regcaches before
7616 changing the register cache layout.
7617 (regcache_invalidate_one): Allow a NULL regcache.
7618 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7619 regcaches before changing the register cache layout or the target
7620 regsets.
7621
7622 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7623
7624 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7625 variable warning on Linux/x86-64.
7626
7627 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7628
7629 GDBserver disconnected tracing support.
7630
7631 * linux-low.c (linux_remove_process): Delete.
7632 (add_lwp): Don't set last_resume_kind here.
7633 (linux_kill): Use `mourn'.
7634 (linux_detach): Use `thread_db_detach', and `mourn'.
7635 (linux_mourn): New.
7636 (linux_attach_lwp_1): Adjust comment.
7637 (linux_attach): last_resume_kind moved the thread_info; adjust.
7638 (status_pending_p_callback): Adjust.
7639 (linux_wait_for_event_1): Adjust.
7640 (count_events_callback, select_singlestep_lwp_callback)
7641 (select_event_lwp_callback, cancel_breakpoints_callback)
7642 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7643 (proceed_one_lwp): Adjust.
7644 (linux_async): Add debug output.
7645 (linux_thread_stopped): New.
7646 (linux_pause_all): New.
7647 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7648 linux_pause_all.
7649 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7650 (thread_db_free): Delete declaration.
7651 (thread_db_detach, thread_db_mourn): Declare.
7652 * thread-db.c (thread_db_init): Use thread_db_mourn.
7653 (thread_db_free): Delete, split in two.
7654 (disable_thread_event_reporting): New.
7655 (thread_db_detach): New.
7656 (thread_db_mourn): New.
7657
7658 * server.h (struct thread_info) <last_resume_kind>: New field.
7659 <attached>: Add comment.
7660 <gdb_detached>: New field.
7661 (handler_func): Change return type to int.
7662 (handle_serial_event, handle_target_event): Ditto.
7663 (gdb_connected): Declare.
7664 (tracing): Delete.
7665 (disconnected_tracing): Declare.
7666 (stop_tracing): Declare.
7667
7668 * server.c (handle_query) <qSupported>: Report support for
7669 disconnected tracing.
7670 (queue_stop_reply_callback): Account for running threads.
7671 (gdb_wants_thread_stopped): New.
7672 (gdb_wants_all_threads_stopped): New.
7673 (gdb_reattached_process): New.
7674 (handle_status): Clear the `gdb_detached' flag of all processes.
7675 In all-stop, stop all threads.
7676 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7677 (process_serial_event): If the remote connection breaks, or if an
7678 exit was forced with "monitor exit", force an event loop exit.
7679 Handle disconnected tracing on detach.
7680 (handle_serial_event): Adjust.
7681 (handle_target_event): If GDB isn't connected, forward events back
7682 to the inferior, unless the last process exited, in which case,
7683 exit gdbserver. Adjust interface.
7684
7685 * remote-utils.c (remote_open): Don't block in accept. Instead
7686 register an event loop source on the listen socket file
7687 descriptor. Refactor bits into ...
7688 (listen_desc): ... this new global.
7689 (gdb_connected): ... this new function.
7690 (enable_async_notification): ... this new function.
7691 (handle_accept_event): ... this new function.
7692 (remote_close): Clear remote_desc.
7693
7694 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7695
7696 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7697 New fields.
7698 (mourn_inferior): Define.
7699 (target_process_qsupported): Avoid the dangling else problem.
7700 (thread_stopped): Define.
7701 (pause_all): Define.
7702 (target_waitstatus_to_string): Declare.
7703 * target.c (target_waitstatus_to_string): New.
7704
7705 * tracepoint.c (tracing): Make extern.
7706 (disconnected_tracing): New.
7707 (stop_tracing): Make extern. Handle tracing stops due to GDB
7708 disconnecting.
7709 (cmd_qtdisconnected): New.
7710 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7711 (handle_tracepoint_general_set): Handle QTDisconnected.
7712
7713 * event-loop.c (event_handler_func): Change return type to int.
7714 (process_event): Bail out if the event handler wants the event
7715 loop to stop.
7716 (handle_file_event): Ditto.
7717 (start_event_loop): Bail out if the event handler wants the event
7718 loop to stop.
7719
7720 * nto-low.c (nto_target_ops): Adjust.
7721 * spu-low.c (spu_wait): Don't remove the process here.
7722 (spu_target_ops): Adjust.
7723 * win32-low.c (win32_wait): Don't remove the process here.
7724 (win32_target_ops): Adjust.
7725
7726 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7727
7728 * regcache.c (realloc_register_cache): Invalidate inferior's
7729 regcache before recreating it.
7730
7731 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7732
7733 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7734
7735 2010-04-09 Stan Shebs <stan@codesourcery.com>
7736 Pedro Alves <pedro@codesourcery.com>
7737
7738 * server.h (LONGEST): New.
7739 (struct thread_info) <while_stepping>: New field.
7740 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7741 Declare.
7742 (initialize_tracepoint, handle_tracepoint_general_set)
7743 (handle_tracepoint_query, tracepoint_finished_step)
7744 (tracepoint_was_hit, release_while_stepping_state_list):
7745 (current_traceframe): Declare.
7746 * server.c (handle_general_set): Handle tracepoint packets.
7747 (read_memory): New.
7748 (write_memory): New.
7749 (handle_search_memory_1): Use read_memory.
7750 (handle_query): Report support for conditional tracepoints, trace
7751 state variables, and tracepoint sources. Handle tracepoint
7752 queries.
7753 (main): Initialize the tracepoints module.
7754 (process_serial_event): Handle traceframe reads/writes.
7755
7756 * linux-low.c (handle_tracepoints): New.
7757 (linux_wait_1): Call it.
7758 (linux_resume_one_lwp): Handle while-stepping.
7759 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7760 (linux_target_ops): Install them.
7761 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7762 New field.
7763 * linux-x86-low.c (x86_supports_tracepoints): New.
7764 (the_low_target). Install it.
7765
7766 * mem-break.h (delete_breakpoint): Declare.
7767 * mem-break.c (delete_breakpoint): Make external.
7768
7769 * target.h (struct target_ops): Add `supports_tracepoints',
7770 `read_pc', and `write_pc' fields.
7771 (target_supports_tracepoints): Define.
7772 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7773 (phex_nz): New.
7774
7775 * regcache.h (struct regcache) <registers_owned>: New field.
7776 (init_register_cache, regcache_cpy): Declare.
7777 (regcache_read_pc, regcache_write_pc): Declare.
7778 (register_cache_size): Declare.
7779 (supply_regblock): Declare.
7780 * regcache.c (init_register_cache): New.
7781 (new_register_cache): Use it.
7782 (regcache_cpy): New.
7783 (register_cache_size): New.
7784 (supply_regblock): New.
7785 (regcache_read_pc, regcache_write_pc): New.
7786
7787 * tracepoint.c: New.
7788
7789 * Makefile.in (OBS): Add tracepoint.o.
7790 (tracepoint.o): New rule.
7791
7792 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7793
7794 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7795 (i386-mmx.o): New.
7796 (i386-mmx.c): Likewise.
7797 (i386-mmx-linux.o): Likewise.
7798 (i386-mmx-linux.c): Likewise.
7799
7800 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7801 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7802 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7803 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7804
7805 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7806 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7807 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7808
7809 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7810
7811 * Makefile.in (clean): Updated.
7812 (i386-avx.o): New.
7813 (i386-avx.c): Likewise.
7814 (i386-avx-linux.o): Likewise.
7815 (i386-avx-linux.c): Likewise.
7816 (amd64-avx.o): Likewise.
7817 (amd64-avx.c): Likewise.
7818 (amd64-avx-linux.o): Likewise.
7819 (amd64-avx-linux.c): Likewise.
7820
7821 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7822 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7823 (srv_amd64_regobj): Add amd64-avx.o.
7824 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7825 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7826 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7827 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7828 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7829 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7830 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7831
7832 * i387-fp.c: Include "i386-xstate.h".
7833 (i387_xsave): New.
7834 (i387_cache_to_xsave): Likewise.
7835 (i387_xsave_to_cache): Likewise.
7836 (x86_xcr0): Likewise.
7837
7838 * i387-fp.h (i387_cache_to_xsave): Likewise.
7839 (i387_xsave_to_cache): Likewise.
7840 (x86_xcr0): Likewise.
7841
7842 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7843 * linux-crisv32-low.c (target_regsets): Likewise.
7844 * linux-m68k-low.c (target_regsets): Likewise.
7845 * linux-mips-low.c (target_regsets): Likewise.
7846 * linux-ppc-low.c (target_regsets): Likewise.
7847 * linux-s390-low.c (target_regsets): Likewise.
7848 * linux-sh-low.c (target_regsets): Likewise.
7849 * linux-sparc-low.c (target_regsets): Likewise.
7850 * linux-xtensa-low.c (target_regsets): Likewise.
7851
7852 * linux-low.c: Include <sys/uio.h>.
7853 (regsets_fetch_inferior_registers): Support nt_type.
7854 (regsets_store_inferior_registers): Likewise.
7855 (linux_process_qsupported): New.
7856 (linux_target_ops): Add linux_process_qsupported.
7857
7858 * linux-low.h (regset_info): Add nt_type.
7859 (linux_target_ops): Add process_qsupported.
7860
7861 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7862 and <sys/uio.h>.
7863 (init_registers_i386_avx_linux): New.
7864 (init_registers_amd64_avx_linux): Likewise.
7865 (xmltarget_i386_linux_no_xml): Likewise.
7866 (xmltarget_amd64_linux_no_xml): Likewise.
7867 (PTRACE_GETREGSET): Likewise.
7868 (PTRACE_SETREGSET): Likewise.
7869 (x86_fill_xstateregset): Likewise.
7870 (x86_store_xstateregset): Likewise.
7871 (use_xml): Likewise.
7872 (x86_linux_update_xmltarget): Likewise.
7873 (x86_linux_process_qsupported): Likewise.
7874 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7875 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7876 init_registers_i386_linux here. Call
7877 x86_linux_update_xmltarget.
7878 (the_low_target): Add x86_linux_process_qsupported.
7879
7880 * server.c (handle_query): Call target_process_qsupported.
7881
7882 * target.h (target_ops): Add process_qsupported.
7883 (target_process_qsupported): New.
7884
7885 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7886
7887 * inferiors.c (add_thread): Set last_status kind to
7888 TARGET_WAITKIND_IGNORE.
7889 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7890 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7891 (linux_wait_1): Move `thread' local definition to block that uses
7892 it. Don't NULL initialize `event_child'.
7893 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7894 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7895 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7896
7897 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7898
7899 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7900 an extended waitstatus, or by a watchpoint.
7901 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7902 thread was stepping or has been stopped by a watchpoint.
7903
7904 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7905
7906 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7907 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7908 of another, then delete the previous, and validate all
7909 breakpoints.
7910 (validate_inserted_breakpoint): New.
7911 (delete_disabled_breakpoints): New.
7912 (validate_breakpoints): New.
7913 (check_mem_read): Validate breakpoints before trusting their
7914 shadow. Delete disabled breakpoints.
7915 (check_mem_write): Validate breakpoints before trusting they
7916 should be inserted. Delete disabled breakpoints.
7917 * mem-break.h (validate_breakpoints):
7918 * server.c (handle_query): Validate breakpoints when we see a
7919 qSymbol query.
7920
7921 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7922
7923 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7924 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7925 if we could tell there's a GDB breakpoint at stop_pc.
7926 (need_step_over_p): Don't do a step over if we find a GDB
7927 breakpoint at the resume PC.
7928
7929 * mem-break.c (struct raw_breakpoint): New.
7930 (enum bkpt_type): New type `gdb_breakpoint'.
7931 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7932 fields. New field `raw'.
7933 (find_raw_breakpoint_at): New.
7934 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7935 breakpoint instead.
7936 (set_breakpoint_at): Adjust.
7937 (delete_raw_breakpoint): New.
7938 (release_breakpoint): New.
7939 (delete_breakpoint): Rename to...
7940 (delete_breakpoint_1): ... this. Add proc parameter. Use
7941 release_breakpoint. Return ENOENT.
7942 (delete_breakpoint): Reimplement.
7943 (find_breakpoint_at): Delete.
7944 (find_gdb_breakpoint_at): New.
7945 (delete_breakpoint_at): Delete.
7946 (set_gdb_breakpoint_at): New.
7947 (delete_gdb_breakpoint_at): New.
7948 (gdb_breakpoint_here): New.
7949 (set_reinsert_breakpoint): Use release_breakpoint.
7950 (uninsert_breakpoint): Rename to ...
7951 (uninsert_raw_breakpoint): ... this.
7952 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7953 (reinsert_raw_breakpoint): Change parameter type to
7954 raw_breakpoint.
7955 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7956 instead.
7957 (check_breakpoints): Adjust. Use release_breakpoint.
7958 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7959 (breakpoint_inserted_here): Ditto.
7960 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7961 Don't trust the breakpoint's shadow if it is not inserted.
7962 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7963 (delete_all_breakpoints): Adjust.
7964 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7965 use delete_breakpoint_1.
7966
7967 * mem-break.h (breakpoints_supported): Delete declaration.
7968 (set_gdb_breakpoint_at): Declare.
7969 (gdb_breakpoint_here): Declare.
7970 (delete_breakpoint_at): Delete.
7971 (delete_gdb_breakpoint_at): Declare.
7972
7973 * server.h (struct raw_breakpoint): Forward declare.
7974 (struct process_info): New field `raw_breakpoints'.
7975
7976 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7977 breakpoints.
7978
7979 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7980
7981 * linux-low.c (status_pending_p_callback): Fix comment.
7982 (linux_wait_for_event_1): Move most of the internal breakpoint
7983 handling from here...
7984 (linux_wait_1): ... to here.
7985 (count_events_callback): New.
7986 (select_singlestep_lwp_callback): New.
7987 (select_event_lwp_callback): New.
7988 (cancel_breakpoints_callback): New.
7989 (select_event_lwp): New.
7990 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7991 priority to all LWPs that have had events that should be reported
7992 to the client. Cancel breakpoints when about to reporting the
7993 event to the client, not while stopping lwps. No longer cancel
7994 finished single-steps here.
7995 (cancel_finished_single_step): Delete.
7996 (cancel_finished_single_steps): Delete.
7997
7998 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7999
8000 * mem-break.c (enum bkpt_type): New.
8001 (struct breakpoint): New field `type'.
8002 (set_breakpoint_at): Change return type to struct breakpoint
8003 pointer. Set type to `other_breakpoint' by default.
8004 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8005 in the breakpoint list.
8006 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8007 (reinsert_breakpoint): Rename to ...
8008 (reinsert_raw_breakpoint): ... this.
8009 (reinsert_breakpoints_at): Adjust.
8010 * mem-break.h (struct breakpoint): Declare.
8011 (set_breakpoint_at): Change return type to struct breakpoint
8012 pointer.
8013
8014 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8015
8016 * server.c (handle_query): Assign, not compare.
8017
8018 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8019
8020 Teach linux gdbserver to step-over-breakpoints.
8021
8022 * linux-low.c (can_hardware_single_step): New.
8023 (supports_breakpoints): New.
8024 (handle_extended_wait): If stopping threads, read the stop pc of
8025 the new cloned LWP.
8026 (get_pc): New.
8027 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8028 low target doesn't support retrieving the PC.
8029 (add_lwp): Set last_resume_kind to resume_continue.
8030 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8031 (linux_attach): Don't clear stop_expected. Set the lwp's
8032 last_resume_kind to resume_stop.
8033 (linux_detach_one_lwp): Don't check for removed breakpoints.
8034 (check_removed_breakpoint): Delete.
8035 (status_pending_p): Rename to ...
8036 (status_pending_p_callback): ... this. Don't check for removed
8037 breakpoints. Don't consider threads that are stopped from GDB's
8038 perspective.
8039 (linux_wait_for_lwp): Always read the stop_pc here.
8040 (cancel_breakpoint): New.
8041 (step_over_bkpt): New global.
8042 (linux_wait_for_event_1): Implement stepping over breakpoints.
8043 (gdb_wants_lwp_stopped): New.
8044 (gdb_wants_all_stopped): New.
8045 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8046 single-step traps here. Store the thread's last reported target
8047 wait status.
8048 (send_sigstop): Don't clear stop_expected. Always set it,
8049 instead.
8050 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8051 (cancel_finished_single_step): New.
8052 (cancel_finished_single_steps): New.
8053 (wait_for_sigstop): Don't cancel finished single-step traps here.
8054 (linux_resume_one_lwp): Don't check for removed breakpoints.
8055 Don't set `step' on non-hardware step archs.
8056 (linux_set_resume_request): Ignore resume_stop requests if already
8057 stopping or stopped. Set the lwp's last_resume_kind.
8058 (resume_status_pending_p): Don't check for removed breakpoints.
8059 (need_step_over_p): New.
8060 (start_step_over): New.
8061 (finish_step_over): New.
8062 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8063 requests. Clear the thread's last reported target waitstatus.
8064 Don't use the `suspended' flag. Don't consider pending breakpoints.
8065 (linux_resume): Start a step-over if necessary.
8066 (proceed_one_lwp): New.
8067 (proceed_all_lwps): New.
8068 (unstop_all_lwps): New.
8069 * linux-low.h (struct lwp_info): Rewrite comment for the
8070 `suspended' flag. Add the `stop_pc' field. Delete the
8071 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8072 Add `'last_resume_kind' and `need_step_over' fields.
8073 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8074 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8075 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8076 (set_raw_breakpoint_at): New.
8077 (set_breakpoint_at): Rewrite to use it.
8078 (reinsert_breakpoint_handler): Delete.
8079 (set_reinsert_breakpoint): New.
8080 (reinsert_breakpoint_by_bp): Delete.
8081 (delete_reinsert_breakpoints): New.
8082 (uninsert_breakpoint): Rewrite.
8083 (uninsert_breakpoints_at): New.
8084 (reinsert_breakpoint): Rewrite.
8085 (reinsert_breakpoints_at): New.
8086 (check_breakpoints): Rewrite.
8087 (breakpoint_here): New.
8088 (breakpoint_inserted_here): New.
8089 (check_mem_read): Adjust.
8090 * mem-break.h (breakpoints_supported, breakpoint_here)
8091 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8092 (reinsert_breakpoint_by_bp): Delete declaration.
8093 (delete_reinsert_breakpoints): Declare.
8094 (reinsert_breakpoint): Delete declaration.
8095 (reinsert_breakpoints_at): Declare.
8096 (uninsert_breakpoint): Delete declaration.
8097 (uninsert_breakpoints_at): Declare.
8098 (check_breakpoints): Adjust prototype.
8099 * server.h: Adjust include order.
8100 (struct thread_info): Declare here. Add a `last_status' field.
8101
8102 2010-03-23 Michael Snyder <msnyder@vmware.com>
8103
8104 * server.c (crc32): New function.
8105 (handle_query): Add handling for 'qCRC:' request.
8106
8107 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8108
8109 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8110 lwp had been stopped by a watchpoint.
8111
8112 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8113
8114 * server.h (internal_error): Declare.
8115 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8116 * utils.c (internal_error): New function.
8117
8118 2010-03-15 Andreas Schwab <schwab@redhat.com>
8119
8120 * configure.srv: Fix typo setting srv_regobj.
8121
8122 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8123
8124 * linux-low.c (fetch_register): Avoid passing a non string literal
8125 format to `error'.
8126 (usr_store_inferior_registers): Ditto.
8127
8128 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8129
8130 * linux-low.c (linux_write_memory): Bail out early if peeking
8131 memory failed.
8132
8133 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8134
8135 * linux-low.h (struct lwp_info): New fields
8136 `stopped_by_watchpoint' and `stopped_data_address'.
8137 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8138 here, and cache them in the lwp object.
8139 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8140 directly.
8141 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8142 field.
8143 (linux_stopped_by_watchpoint): Rewrite.
8144 (linux_stopped_data_address): Rewrite.
8145
8146 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8147
8148 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8149 switching the current inferior, not before.
8150
8151 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8152
8153 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8154 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8155 i386-linux.c and amd64-linux.c.
8156 (reg-i386.o): Removed.
8157 (reg-i386.c): Likewise.
8158 (reg-i386-linux.o): Likewise.
8159 (reg-i386-linux.c): Likewise.
8160 (reg-x86-64.o): Likewise.
8161 (reg-x86-64.c): Likewise.
8162 (reg-x86-64-linux.o): Likewise.
8163 (reg-x86-64-linux.c): Likewise.
8164 (i386.o): New.
8165 (i386.c): Likewise.
8166 (i386-linux.o): Likewise.
8167 (i386-linux.c): Likewise.
8168 (amd64.o): Likewise.
8169 (amd64.c): Likewise.
8170 (amd64-linux.o): Likewise.
8171 (amd64-linux.c): Likewise.
8172
8173 * configure.srv (srv_i386_regobj): New.
8174 (srv_i386_linux_regobj): Likewise.
8175 (srv_amd64_regobj): Likewise.
8176 (srv_amd64_linux_regobj): Likewise.
8177 (srv_i386_32bit_xmlfiles): Likewise.
8178 (srv_i386_64bit_xmlfiles): Likewise.
8179 (srv_i386_xmlfiles): Likewise.
8180 (srv_amd64_xmlfiles): Likewise.
8181 (srv_i386_linux_xmlfiles): Likewise.
8182 (srv_amd64_linux_xmlfiles): Likewise.
8183 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8184 srv_xmlfiles to $srv_i386_xmlfiles.
8185 (i[34567]86-*-mingw32ce*): Likewise.
8186 (i[34567]86-*-mingw*): Likewise.
8187 (i[34567]86-*-nto*): Likewise.
8188 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8189 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8190 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8191 (x86_64-*-linux*): Likewise.
8192
8193 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8194 (init_registers_amd64_linux): New.
8195 (x86_arch_setup): Replace init_registers_x86_64_linux with
8196 init_registers_amd64_linux.
8197
8198 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8199
8200 * configure.ac: Check for libdl. If it is not available link against
8201 static libthread_db.
8202 * configure: Regenerate.
8203
8204 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8205
8206 PR9605
8207
8208 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8209 handing a read watchpoint.
8210 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8211
8212 2010-02-12 Doug Evans <dje@google.com>
8213
8214 * linux-low.c (linux_supports_tracefork_flag): Document.
8215 (linux_look_up_symbols): Add comment.
8216
8217 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8218
8219 * regcache.c (supply_register): Clear regcache if buf is NULL.
8220
8221 2010-02-02 Nicolas Roche <roche@sourceware.org>
8222 Joel Brobecker <brobecker@adacore.com>
8223
8224 * inferiors.c (find_inferior): Add function documentation.
8225 (unloaded_dll): Handle the case where the unloaded dll has not
8226 been previously registered in the dll list.
8227
8228 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8229
8230 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8231 (thumb2_breakpoint): New.
8232 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8233
8234 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8235
8236 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8237 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8238 breakpoints.
8239
8240 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8241
8242 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8243
8244 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8245
8246 * linux-s390-low.c (s390_collect_ptrace_register)
8247 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8248
8249 2010-01-21 Doug Evans <dje@google.com>
8250
8251 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8252 (PTRACE_ARG4_TYPE): New macro.
8253 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8254 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8255 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8256 (usr_store_inferior_registers): Ditto.
8257 (linux_read_memory, linux_write_memory): Ditto.
8258 (linux_test_for_tracefork): Ditto.
8259
8260 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8261 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8262
8263 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8264
8265 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8266 target.
8267
8268 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8269
8270 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8271 prototype to take a regcache. Adjust.
8272
8273 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8274
8275 * regcache.h (struct thread_info): Forward declare.
8276 (struct regcache): New.
8277 (new_register_cache): Adjust prototype.
8278 (get_thread_regcache): Declare.
8279 (free_register_cache): Adjust prototype.
8280 (registers_to_string, registers_from_string): Ditto.
8281 (supply_register, supply_register_by_name, collect_register)
8282 (collect_register_as_string, collect_register_by_name): Ditto.
8283 * regcache.c (struct inferior_regcache_data): Delete.
8284 (get_regcache): Rename to ...
8285 (get_thread_regcache): ... this. Adjust. Switch inferior before
8286 fetching registers.
8287 (regcache_invalidate_one): Adjust.
8288 (regcache_invalidate): Fix prototype.
8289 (new_register_cache): Return the new register cache.
8290 (free_register_cache): Change prototype.
8291 (realloc_register_cache): Adjust.
8292 (registers_to_string): Change prototype to take a regcache. Adjust.
8293 (registers_from_string): Ditto.
8294 (register_data): Ditto.
8295 (supply_register): Ditto.
8296 (supply_register_by_name): Ditto.
8297 (collect_register): Ditto.
8298 (collect_register_as_string): Ditto.
8299 (collect_register_by_name): Ditto.
8300 * server.c (process_serial_event): Adjust.
8301 * linux-low.h (regset_fill_func, regset_store_func): Change
8302 prototype.
8303 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8304 Change prototype.
8305 * linux-low.c (get_stop_pc): Adjust.
8306 (check_removed_breakpoint): Adjust.
8307 (linux_wait_for_event): Adjust.
8308 (linux_resume_one_lwp): Adjust.
8309 (fetch_register): Add regcache parameter. Adjust.
8310 (usr_store_inferior_registers): Ditto.
8311 (regsets_fetch_inferior_registers): Ditto.
8312 (regsets_store_inferior_registers): Ditto.
8313 (linux_fetch_registers, linux_store_registers): Ditto.
8314 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8315 regcache. Adjust.
8316 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8317 Ditto.
8318 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8319 prototype to take a regcache.
8320 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8321 * remote-utils.c (convert_ascii_to_int, outreg)
8322 (prepare_resume_reply): Change prototype to take a regcache.
8323 Adjust.
8324 * target.h (struct target_ops) <fetch_registers, store_registers>:
8325 Change prototype to take a regcache.
8326 (fetch_inferior_registers, store_inferior_registers): Change
8327 prototype to take a regcache. Adjust.
8328 * proc-service.c (ps_lgetregs): Adjust.
8329 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8330 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8331 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8332 take a regcache. Adjust.
8333 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8334 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8335 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8336 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8337 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8338 (cris_cannot_fetch_register):
8339 (cris_breakpoint_at): Change prototype to take a regcache.
8340 Adjust.
8341 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8342 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8343 to take a regcache. Adjust.
8344 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8345 Adjust.
8346 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8347 take a regcache. Adjust.
8348 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8349 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8350 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8351 * linux-mips-low.c (mips_get_pc):
8352 (mips_set_pc): Change prototype to take a regcache. Adjust.
8353 (mips_reinsert_addr): Adjust.
8354 (mips_collect_register): Change prototype to take a regcache.
8355 Adjust.
8356 (mips_supply_register):
8357 (mips_collect_register_32bit, mips_supply_register_32bit)
8358 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8359 (mips_store_fpregset): Ditto.
8360 * linux-ppc-low.c (ppc_supply_ptrace_register)
8361 (ppc_supply_ptrace_register): Ditto.
8362 (parse_spufs_run): Adjust.
8363 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8364 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8365 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8366 take a regcache. Adjust.
8367 * linux-s390-low.c (s390_collect_ptrace_register)
8368 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8369 (s390_set_pc): Change prototype to take a regcache. Adjust.
8370 (s390_arch_setup): Adjust.
8371 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8372 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8373 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8374 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8375 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8376 regcache. Adjust.
8377 (sparc_breakpoint_at): Adjust.
8378 * linux-xtensa-low.c (xtensa_fill_gregset):
8379 (xtensa_store_gregset):
8380 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8381 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8382 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8383 prototype to take a regcache. Adjust.
8384 * win32-arm-low.c (arm_fetch_inferior_register)
8385 (arm_store_inferior_register): Change prototype to take a
8386 regcache. Adjust.
8387 * win32-i386-low.c (i386_fetch_inferior_register)
8388 (i386_store_inferior_register): Change prototype to take a
8389 regcache. Adjust.
8390 * win32-low.c (child_fetch_inferior_registers)
8391 (child_store_inferior_registers): Change prototype to take a
8392 regcache. Adjust.
8393 (win32_wait): Adjust.
8394 (win32_fetch_inferior_registers): Change prototype to take a
8395 regcache. Adjust.
8396 (win32_store_inferior_registers): Adjust.
8397 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8398 store_inferior_register>: Change prototype to take a regcache.
8399
8400 2010-01-20 Doug Evans <dje@google.com>
8401
8402 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8403 #ifdef.
8404 (linux_wait_for_event1, linux_init_signals): Ditto.
8405 (W_STOPCODE): Provide definition if missing.
8406
8407 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8408
8409 * linux-low.c (linux_core_of_thread): New.
8410 (compare_ints, show_process, list_threads): New.
8411 (linux_qxfer_osdata): Report threads and cores.
8412 (linux_target_op): Register linux_core_of_thread.
8413 * remote-utils.c (prepare_resume_reply): Report the core.
8414 (buffer_xml_printf): Support %d specifier.
8415 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8416 New.
8417 (handle_query): Handle qXfer:threads. Announce availability
8418 thereof.
8419 * target.h (struct target_ops): New field core_of_thread.
8420
8421 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8422
8423 * Makefile.in (clean): Remove new generated files.
8424 (reg-s390.o, reg-s390.c): Remove rules.
8425 (reg-s390x.o, reg-s390x.c): Likewise.
8426 (s390-linux32.o, s390-linux32.c): Add rules.
8427 (s390-linux64.o, s390-linux64.c): Likewise.
8428 (s390x-linux64.o, s390x-linux64.c): Likewise.
8429 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8430 * linux-s390-low.c: Include <elf.h>.
8431 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8432 (init_registers_s390): Remove prototype.
8433 (init_registers_s390x): Likewise.
8434 (init_registers_s390_linux32): Add prototype.
8435 (init_registers_s390_linux64): Likewise.
8436 (init_registers_s390x_linux64): Likewise.
8437 (s390_num_regs_3264): New define.
8438 (s390_regmap_3264): New global variable.
8439 (s390_cannot_fetch_register): Remove obsolete check.
8440 (s390_cannot_store_register): Likewise.
8441 (s390_collect_ptrace_register): Handle upper/lower register halves.
8442 (s390_supply_ptrace_register): Likewise.
8443 (s390_fill_gregset): Update to register number changes.
8444 (s390_get_hwcap): New routine.
8445 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8446 Install appropriate regmap and register set.
8447
8448 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8449
8450 * server.c (gdbserver_version): Update copyright year to 2010.
8451 * gdbreplay.c (gdbreplay_version): Likewise.
8452
8453 2009-12-28 Doug Evans <dje@google.com>
8454
8455 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8456 elf/external.h. Include <elf.h> instead but only if necessary.
8457
8458 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8459
8460 * linux-low.c (linux_remove_process): Remove `detaching'
8461 parameter. Don't release/detach from thread_db here.
8462 (linux_kill): Release/detach from thread_db here, ...
8463 (linux_detach): ... and here, before actually detaching.
8464 (linux_wait_1): ... and here, when a process exits.
8465 * thread-db.c (any_thread_of): New.
8466 (thread_db_free): Switch the current inferior to a thread of the
8467 passed in process.
8468
8469 2009-12-21 Doug Evans <dje@google.com>
8470
8471 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8472
8473 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8474 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8475 warning ifndef __NR_tkill. Move setting of errno there too.
8476 Delete unnecessary resetting of errno after syscall.
8477 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8478
8479 * configure.ac: Check for dladdr.
8480 * config.in: Regenerate.
8481 * configure: Regenerate.
8482 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8483 (try_thread_db_load): Update.
8484
8485 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8486
8487 2009-12-18 Doug Evans <dje@google.com>
8488
8489 * event-loop.c: Include unistd.h if it exists.
8490
8491 * linux-low.c (my_waitpid): Move definition away from being in
8492 between linux_tracefork_child/linux_test_for_tracefork.
8493
8494 * gdb_proc_service.h (psaddr_t): Fix type.
8495 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8496 signature to match glibc.
8497
8498 2009-12-16 Doug Evans <dje@google.com>
8499
8500 * linux-low.c (linux_read_memory): Fix argument to read.
8501
8502 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8503
8504 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8505 events, don't leave current_inferior pointing at null.
8506
8507 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8508
8509 * win32-low.c (LOG): Delete.
8510 (OUTMSG): Output to stderr.
8511 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8512 on compile time LOG macro.
8513 (win32_wait): Fix debug output.
8514
8515 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8516
8517 * win32-low.c (win32_add_one_solib): If the dll name is
8518 "ntdll.dll", prepend the system directory to the dll path.
8519
8520 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8521
8522 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8523
8524 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8525 Vladimir Prus <vladimir@codesourcery.com>
8526
8527 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8528 * configure.ac: Check for __mcoldfire__ and set
8529 gdb_cv_m68k_is_coldfire.
8530 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8531 reg-cf.o and reg-m68k.o.
8532 * configure: Regenerated.
8533
8534 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8535
8536 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8537 Pass it to thread_db_free.
8538 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8539 proper `detaching' argument to linux_remove_process.
8540 * linux-low.h (thread_db_free): Add `detaching' parameter.
8541 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8542 to thread_db_free.
8543 (thread_db_free): Add `detaching' parameter. Only
8544 call td_ta_clear_event if detaching from process.
8545
8546 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8547
8548 * thread-db.c (thread_db_free): Fix typo.
8549
8550 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8551
8552 PR gdb/10838
8553 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8554
8555 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8556
8557 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8558 with an i686 compiler.
8559 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8560 needed.
8561 * configure: Rebuilt.
8562
8563 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8564
8565 PR gdb/10783
8566
8567 * server.c (handle_search_memory_1): Correct read_addr initialization
8568 in loop for searching subsequent chunks.
8569
8570 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8571
8572 * configure.ac: New --with-libthread-db option.
8573 * thread-db.c: Allow direct dependence on libthread_db.
8574 (thread_db_free): Adjust.
8575 * config.in: Regenerate.
8576 * configure: Likewise.
8577
8578 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8579
8580 PR gdb/10757
8581 * thread-db.c (attach_thread): New function.
8582 (maybe_attach_thread): Return success/failure.
8583 (find_new_threads_callback): Adjust.
8584 (thread_db_find_new_threads): Loop until no new threads.
8585
8586 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8587
8588 * proc-service.c (ps_lgetregs): Formatting.
8589
8590 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8591
8592 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8593 * configure.ac: Adjust.
8594 * linux-low.h (struct process_info_private): Move members to struct
8595 thread_db.
8596 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8597 * linux-low.c (linux_remove_process): Adjust.
8598 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8599 * server.c (handle_query): Move code ...
8600 (handle_monitor_command): ... here. New function.
8601 * target.h (struct target_ops): New member.
8602 * thread-db.c (struct thread_db): New.
8603 (libthread_db_search_path): New variable.
8604 (thread_db_create_event, thread_db_enable_reporting)
8605 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8606 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8607 (try_thread_db_load_1, dladdr_to_soname): New functions.
8608 (try_thread_db_load, thread_db_load_search): New functions.
8609 (thread_db_init): Search for libthread_db.
8610 (thread_db_free): New function.
8611 (thread_db_handle_monitor_command): Likewise.
8612 * config.in: Regenerate.
8613 * configure: Regenerate.
8614
8615 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8616
8617 * spu-low.c (spu_kill): Wait for inferior to terminate.
8618 Call clear_inferiors.
8619 (spu_detach): Call clear_inferiors.
8620
8621 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8622
8623 * aclocal.m4: Regenerate.
8624 * config.in: Likewise.
8625 * configure: Likewise.
8626
8627 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8628
8629 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8630 (parse_spufs_run): New function.
8631 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8632 (ppc_breakpoint_at): Handle SPU breakpoints.
8633
8634 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8635
8636 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8637 (SPUFS_MAGIC): Define.
8638 (spu_enumerate_spu_ids): New function.
8639 (linux_qxfer_spu): New function.
8640 (linux_target_ops): Install linux_qxfer_spu.
8641
8642 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8643
8644 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8645 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8646 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8647 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8648 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8649 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8650 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8651 (init_registers_powerpc_cell32l): Add prototype.
8652 (init_registers_powerpc_cell64l): Likewise.
8653 (ppc_arch_setup): Detect Cell/B.E. architecture.
8654
8655 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8656
8657 * Makefile.in (datarootdir): New variable.
8658
8659 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8660
8661 * linux-low.c (linux_write_memory): Update debugging output.
8662 * Makefile.in (clean): Add new descriptions.
8663 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8664 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8665 * configure.srv: Add new files for arm*-*-linux*.
8666 * linux-arm-low.c: Add new declarations.
8667 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8668 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8669 (HWCAP_VFPv3D16): New.
8670 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8671 instead of __IWMMXT__.
8672 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8673 (arm_arch_setup): New.
8674 (target_regsets): Remove #ifdef. Add VFP regset.
8675 (the_low_target): Use arm_arch_setup.
8676
8677 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8678
8679 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8680 the main thread again.
8681
8682 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8683
8684 Adding Neutrino gdbserver.
8685 * configure: Regenerated.
8686 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8687 * configure.srv (i[34567]86-*-nto*): New target.
8688 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8689 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8690 (nto_comctrl) [__QNX__]: New function.
8691 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8692
8693 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8694
8695 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8696 srv_tgtobj.
8697
8698 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8699 Pedro Alves <pedro@codesourcery.com>
8700
8701 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8702 don't support CONTEXT_EXTENDED_REGISTERS.
8703 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8704 (the_low_target): Install them.
8705 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8706 failing with ERROR_PIPE_NOT_CONNECTED.
8707
8708 2009-06-30 Doug Evans <dje@google.com>
8709 Pierre Muller <muller@ics.u-strasbg.fr>
8710
8711 Add h/w watchpoint support to x86-linux, win32-i386.
8712 * Makefile.in (SFILES): Add i386-low.c
8713 (i386_low_h): Define.
8714 (i386-low.o): Add dependencies.
8715 (linux-x86-low.o): Add i386-low.h dependency.
8716 (win32-i386-low.o): Ditto.
8717 * i386-low.c: New file.
8718 * i386-low.h: New file.
8719 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8720 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8721 * linux-low.c (linux_add_process): Initialize arch_private.
8722 (linux_remove_process): Free arch_private.
8723 (add_lwp): Initialize arch_private.
8724 (delete_lwp): Free arch_private.
8725 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8726 provided.
8727 * linux-low.h (process_info_private): New member arch_private.
8728 (lwp_info): New member arch_private.
8729 (linux_target_ops): New members new_process, new_thread,
8730 prepare_to_resume.
8731 (ptid_of): New macro.
8732 * linux-x86-low.c: Include stddef.h, i386-low.h.
8733 (arch_process_info): New struct.
8734 (arch_lwp_info): New struct.
8735 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8736 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8737 (i386_dr_low_get_status): New function.
8738 (x86_insert_point, x86_remove_point): New functions.
8739 (x86_stopped_by_watchpoint): New function.
8740 (x86_stopped_data_address): New function.
8741 (x86_linux_new_process, x86_linux_new_thread): New functions.
8742 (x86_linux_prepare_to_resume): New function.
8743 (the_low_target): Add entries for insert_point, remove_point,
8744 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8745 prepare_to_resume.
8746 * server.c (debug_hw_points): New global.
8747 (monitor_show_help): Document set debug-hw-points.
8748 (handle_query): Process "set debug-hw-points".
8749 * server.h (debug_hw_points): Declare.
8750 (paddress): Declare.
8751 * utils.c (NUMCELLS, CELLSIZE): New macros.
8752 (get_sell, xsnprintf, paddress): New functions.
8753 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8754 remove_point, stopped_by_watchpoint, stopped_data_address.
8755 * win32-i386-low.c: Include i386-low.h.
8756 (debug_reg_state): Replaces dr.
8757 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8758 (i386_dr_low_get_status): New function.
8759 (i386_insert_point, i386_remove_point): New functions.
8760 (i386_stopped_by_watchpoint): New function.
8761 (i386_stopped_data_address): New function.
8762 (i386_initial_stuff): Update.
8763 (get_thread_context,set_thread_context,i386_thread_added): Update.
8764 (the_low_target): Add entries for insert_point,
8765 remove_point, stopped_by_watchpoint, stopped_data_address.
8766 * win32-low.c (win32_insert_watchpoint): New function.
8767 (win32_remove_watchpoint): New function.
8768 (win32_stopped_by_watchpoint): New function.
8769 (win32_stopped_data_address): New function.
8770 (win32_target_ops): Add entries for insert_watchpoint,
8771 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8772 * win32-low.h (win32_target_ops): New members insert_point,
8773 remove_point, stopped_by_watchpoint, stopped_data_address.
8774
8775 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8776
8777 * server.c (process_serial_event): Re-return unsupported, not
8778 error, if the type isn't recognized. Re-allow supporting only
8779 insert or remove packets. Also call require_running for
8780 breakpoints. Add missing break statement to default case. Tidy.
8781 * target.h (struct target_ops): Rename insert_watchpoint to
8782 insert_point, and remove_watchpoint to remove_point.
8783
8784 * linux-low.h (struct linux_target_ops): Likewise.
8785 * linux-low.c (linux_insert_watchpoint): Rename to ...
8786 (linux_insert_point): ... this. Adjust.
8787 (linux_remove_watchpoint): Rename to ...
8788 (linux_remove_point): ... this. Adjust.
8789 (linux_target_ops): Adjust.
8790 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8791 (cris_insert_point): ... this.
8792 (cris_remove_watchpoint): Rename to ...
8793 (cris_remove_point): ... this.
8794 (the_low_target): Adjust.
8795
8796 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8797
8798 * server.c (handle_v_kill): Pass signal_pid to
8799 kill_inferior if multi_process is zero.
8800
8801 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8802
8803 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8804 * target.h (target_ops): Comment for *_watchpoint to make it clear
8805 the functions can get types '0' and '1'.
8806
8807 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8808
8809 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8810 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8811 * regcache.c (get_regcache): Likewise.
8812 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8813 * win32-low.c (child_fetch_inferior_registers): Remove check for
8814 regno 0.
8815
8816 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8817 Pedro Alves <pedro@codesourcery.com>
8818
8819 * target.h (struct target_ops) <supports_multi_process>: New
8820 callback.
8821 (target_supports_multi_process): New.
8822 * server.c (handle_query): Even if GDB reports support, only
8823 enable multi-process if the target also supports it. Report
8824 multi-process support only if the target backend supports it.
8825 * linux-low.c (linux_supports_multi_process): New function.
8826 (linux_target_ops): Install it as target_supports_multi_process
8827 callback.
8828
8829 2009-05-24 Doug Evans <dje@google.com>
8830
8831 Global renaming of find_thread_pid to find_thread_ptid.
8832 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8833 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8834 All callers updated.
8835
8836 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8837 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8838 directly.
8839
8840 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8841 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8842 (linux_resume_one_lwp): Ditto.
8843
8844 2009-05-23 Doug Evans <dje@google.com>
8845
8846 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8847 from struct inferior_list_entry * to struct lwp_info *.
8848 All callers updated.
8849
8850 2009-05-13 Doug Evans <dje@google.com>
8851
8852 * linux-x86-low.c: Don't include assert.h.
8853 (x86_siginfo_fixup): Use fatal, not assert.
8854 (x86_arch_setup): Fix comment.
8855
8856 2009-05-12 Doug Evans <dje@google.com>
8857
8858 Biarch support for i386/amd64 gdbserver.
8859 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8860 Add linux-x86-low.c.
8861 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8862 (linux-x86-low.o): Add.
8863 * linux-x86-64-low.c: Delete.
8864 * linux-i386-low.c: Delete.
8865 * linux-x86-low.c: New file.
8866 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8867 linux-x86-low.o.
8868 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8869 linux-x86-low.o.
8870 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8871 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8872 (linux_child_pid_to_exec_file): New function.
8873 (elf_64_header_p, elf_64_file_p): New functions.
8874 (siginfo_fixup): New function.
8875 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8876 give target a chance to convert layout.
8877 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8878 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8879
8880 2009-05-07 Doug Evans <dje@google.com>
8881
8882 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8883 (regsets_store_inferior_registers): Ditto.
8884
8885 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8886
8887 PR server/10048
8888
8889 * linux-low.c (must_set_ptrace_flags): Delete.
8890 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8891 of the global.
8892 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8893 `lwp->must_set_ptrace_flags' instead.
8894 (linux_wait_for_event_1): Set ptrace options here.
8895 (linux_wait_1): ... not here.
8896
8897 2009-04-30 Doug Evans <dje@google.com>
8898
8899 * inferiors.c (started_inferior_callback): New function.
8900 (attached_inferior_callback): New function.
8901 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8902 * server.c (print_started_pid, print_attached_pid): New functions.
8903 (detach_or_kill_for_exit): New function.
8904 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8905 * server.h (have_started_inferiors_p): Declare.
8906 (have_attached_inferiors_p): Declare.
8907
8908 * inferiors.c (remove_process): Fix memory leak, free process.
8909 * linux-low.c (linux_remove_process): New function.
8910 (linux_kill): Call it instead of remove_process.
8911 (linux_detach, linux_wait_1): Ditto.
8912
8913 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8914
8915 * configure.srv: Add x86 Windows CE target.
8916
8917 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8918
8919 * inferiors.c (get_thread_process): Make global.
8920 * server.h (get_thread_process): Add prototype.
8921 * thread-db.c (find_one_thread): Use get_thread_process
8922 instead of current_process.
8923 (thread_db_get_tls_address): Do not crash if called when
8924 thread layer is not yet initialized.
8925
8926 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8927
8928 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8929 * spu-low.c (current_tid): Rename to ...
8930 (current_ptid): ... this.
8931 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8932 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8933 ptid_get_lwp (current_ptid) instead of current_tid.
8934 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8935 instead of current_tid. Use find_process_pid to verify pid
8936 argument is valid. Pass proper argument to remove_process.
8937 (spu_thread_alive): Compare current_ptid instead of current_tid.
8938 (spu_resume): Likewise.
8939
8940 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8941
8942 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8943 variable.
8944
8945 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8946
8947 Implement the multiprocess extensions, and add linux multiprocess
8948 support.
8949
8950 * server.h (ULONGEST): Declare.
8951 (struct ptid, ptid_t): New.
8952 (minus_one_ptid, null_ptid): Declare.
8953 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8954 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8955 (struct inferior_list_entry): Change `id' type from unsigned from
8956 to ptid_t.
8957 (struct sym_cache, struct breakpoint, struct
8958 process_info_private): Forward declare.
8959 (struct process_info): Declare.
8960 (current_process): Declare.
8961 (all_processes): Declare.
8962 (initialize_inferiors): Declare.
8963 (add_thread): Adjust to use ptid_t.
8964 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8965 (add_process, remove_process, find_thread_pid): Declare.
8966 (find_inferior_id): Adjust to use ptid_t.
8967 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8968 (multi_process): Declare.
8969 (push_event): Adjust to use ptid_t.
8970 (read_ptid, write_ptid): Declare.
8971 (prepare_resume_reply): Adjust to use ptid_t.
8972 (clear_symbol_cache): Declare.
8973 * inferiors.c (all_processes): New.
8974 (null_ptid, minus_one_ptid): New.
8975 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8976 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8977 (add_thread): Change unsigned long to ptid. Remove gdb_id
8978 parameter. Adjust.
8979 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8980 (gdb_id_to_thread): Rename to ...
8981 (find_thread_pid): ... this. Change unsigned long to ptid.
8982 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8983 (loaded_dll, pull_pid_from_list): Adjust.
8984 (add_process, remove_process, find_process_pid)
8985 (get_thread_process, current_process, initialize_inferiors): New.
8986 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8987 (struct target_waitstatus) <related_pid>: Ditto.
8988 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8989 return type to int.
8990 (struct target_ops) <join>: Add `pid' argument.
8991 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8992 (struct target_ops) <wait>: Add `ptid' field. Change return type
8993 to ptid.
8994 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8995 (mywait): Add `ptid' argument. Change return type to ptid_t.
8996 (target_pid_to_str): Declare.
8997 * target.c (set_desired_inferior): Adjust to use ptids.
8998 (mywait): Add new `ptid' argument. Adjust.
8999 (target_pid_to_str): New.
9000 * mem-break.h (free_all_breakpoints): Declare.
9001 * mem-break.c (breakpoints): Delelete.
9002 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9003 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9004 to use per-process breakpoint list.
9005 (free_all_breakpoints): New.
9006 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9007 (symbol_cache, all_symbols_looked_up): Delete.
9008 (hexchars): New.
9009 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9010 read_ptid): New.
9011 (prepare_resume_reply): Change ptid argument's type from unsigned
9012 long to ptid_t. Adjust. Implement W;process and X;process.
9013 (free_sym_cache, clear_symbol_cache): New.
9014 (look_up_one_symbol): Adjust to per-process symbol cache. *
9015 * server.c (cont_thread, general_thread, step_thread): Change type
9016 to ptid_t.
9017 (attached): Delete.
9018 (multi_process): New.
9019 (last_ptid): Change type to ptid_t.
9020 (struct vstop_notif) <ptid>: Change type to ptid_t.
9021 (queue_stop_reply, push_event): Change `ptid' argument's type to
9022 ptid_t.
9023 (discard_queued_stop_replies): Add `pid' argument.
9024 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9025 changes. Don't reference the `attached' global.
9026 (attach_inferior): Adjust to mywait interface changes.
9027 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9028 features. Handle and report "multiprocess+". Handle
9029 "qAttached:PID".
9030 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9031 changes.
9032 (handle_v_kill): New.
9033 (handle_v_stopped): Adjust to use target_pid_to_str.
9034 (handle_v_requests): Allow multiple attaches and runs when
9035 multiprocess extensions are in effect. Handle "vKill".
9036 (myresume): Adjust to use ptids.
9037 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9038 (handle_status): Adjust to discard_queued_stop_replies interface
9039 change.
9040 (first_thread_of, kill_inferior_callback)
9041 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9042 (main): Call initialize_inferiors. Adjust to use ptids, killing
9043 and detaching from all inferiors. Handle multiprocess packet
9044 variants.
9045 * linux-low.h: Include gdb_proc_service.h.
9046 (struct process_info_private): New.
9047 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9048 <lwpid_of>: Use ptid_get_lwp.
9049 (get_lwp_thread): Adjust.
9050 (struct lwp_info): Add `dead' member.
9051 (find_lwp_pid): Declare.
9052 * linux-low.c (thread_db_active): Delete.
9053 (new_inferior): Adjust comment.
9054 (inferior_pid): Delete.
9055 (linux_add_process): New.
9056 (handle_extended_wait): Adjust.
9057 (add_lwp): Change unsigned long to ptid.
9058 (linux_create_inferior): Add process to processes table. Adjust
9059 to use ptids. Don't set new_inferior here.
9060 (linux_attach_lwp): Rename to ...
9061 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9062 it. Adjust to use ptids.
9063 (linux_attach_lwp): New.
9064 (linux_attach): Add process to processes table. Don't set
9065 new_inferior here.
9066 (struct counter): New.
9067 (second_thread_of_pid_p, last_thread_of_process_p): New.
9068 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9069 multiple processes.
9070 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9071 processes. Remove process from process table.
9072 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9073 to multiple processes.
9074 (any_thread_of): New.
9075 (linux_detach): Add `pid' argument, and handle it. Remove process
9076 from processes table.
9077 (linux_join): Add `pid' argument. Handle it.
9078 (linux_thread_alive): Change unsighed long argument to ptid_t.
9079 Consider dead lwps as not being alive.
9080 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9081 threads we're not interested in.
9082 (same_lwp, find_lwp_pid): New.
9083 (linux_wait_for_lwp): Change `pid' argument's type from int to
9084 ptid_t. Adjust.
9085 (linux_wait_for_event): Rename to ...
9086 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9087 from int to ptid_t. Adjust.
9088 (linux_wait_for_event): New.
9089 (linux_wait_1): Add `ptid' argument. Change return type to
9090 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9091 that exit from the process table.
9092 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9093 Adjust.
9094 (mark_lwp_dead): New.
9095 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9096 stopping all threads, mark its main lwp as dead.
9097 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9098 ptids.
9099 (fetch_register, usr_store_inferior_registers)
9100 (regsets_fetch_inferior_registers)
9101 (regsets_store_inferior_registers, linux_read_memory)
9102 (linux_write_memory): Inline `inferior_pid'.
9103 (linux_look_up_symbols): Adjust to use per-process
9104 `thread_db_active'.
9105 (linux_request_interrupt): Adjust to use ptids.
9106 (linux_read_auxv): Inline `inferior_pid'.
9107 (initialize_low): Don't reference thread_db_active.
9108 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9109 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9110 (ps_getpid): Return the pid of the current inferior.
9111 * thread-db.c (proc_handle, thread_agent): Delete.
9112 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9113 per-process data.
9114 (find_one_thread): Change argument type to ptid_t. Adjust to
9115 per-process data.
9116 (maybe_attach_thread): Adjust to per-process data and ptids.
9117 (thread_db_find_new_threads): Ditto.
9118 (thread_db_init): Ditto.
9119 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9120 processes table. Adjust to use ptids.
9121 (spu_kill, spu_detach): Adjust interface. Remove process from
9122 processes table.
9123 (spu_join, spu_thread_alive): Adjust interface.
9124 (spu_wait): Adjust interface. Remove process from processes
9125 table. Adjust to use ptids.
9126 * win32-low.c (current_inferior_tid): Delete.
9127 (current_inferior_ptid): New.
9128 (debug_event_ptid): New.
9129 (thread_rec): Take a ptid. Adjust.
9130 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9131 (child_delete_thread): Ditto.
9132 (do_initial_child_stuff): Add `attached' argument. Add process to
9133 processes table.
9134 (child_fetch_inferior_registers, child_store_inferior_registers):
9135 Adjust.
9136 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9137 (win32_attach): Pass 1 to do_initial_child_stuff.
9138 (win32_kill): Adjust interface. Remove process from processes
9139 table.
9140 (win32_detach): Ditto.
9141 (win32_join): Adjust interface.
9142 (win32_thread_alive): Take a ptid.
9143 (win32_resume): Adjust to use ptids.
9144 (get_child_debug_event): Ditto.
9145 (win32_wait): Adjust interface. Remove exiting process from
9146 processes table.
9147
9148 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9149
9150 Non-stop mode support.
9151
9152 * server.h (non_stop): Declare.
9153 (gdb_client_data, handler_func): Declare.
9154 (delete_file_handler, add_file_handler, start_event_loop):
9155 Declare.
9156 (handle_serial_event, handle_target_event, push_event)
9157 (putpkt_notif): Declare.
9158 * target.h (enum resume_kind): New.
9159 (struct thread_resume): Replace `step' field by `kind' field.
9160 (TARGET_WNOHANG): Define.
9161 (struct target_ops) <wait>: Add `options' argument.
9162 <supports_non_stop, async, start_non_stop>: New fields.
9163 (target_supports_non_stop, target_async): New.
9164 (start_non_stop): Declare.
9165 (mywait): Add `options' argument.
9166 * target.c (mywait): Add `options' argument. Print child exit
9167 notifications here.
9168 (start_non_stop): New.
9169 * server.c (non_stop, own_buf, mem_buf): New globals.
9170 (struct vstop_notif): New.
9171 (notif_queue): New global.
9172 (queue_stop_reply, push_event, discard_queued_stop_replies)
9173 (send_next_stop_reply): New.
9174 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9175 interface changes.
9176 (attach_inferior): In non-stop mode, don't wait for the target
9177 here.
9178 (handle_general_set): Handle QNonStop.
9179 (handle_query): When handling qC, return the current general
9180 thread, instead of the first thread of the list.
9181 (handle_query): If the backend supports non-stop mode, include
9182 QNonStop+ in the qSupported query response.
9183 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9184 and non-stop mode.
9185 (handle_v_attach, handle_v_run): Handle non-stop mode.
9186 (handle_v_stopped): New.
9187 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9188 (myresume): Adjust to use resume_kind. Handle non-stop.
9189 (queue_stop_reply_callback): New.
9190 (handle_status): Handle non-stop mode.
9191 (main): Clear non_stop flag on reconnection. Use the event-loop.
9192 Refactor serial protocol handling from here ...
9193 (process_serial_event): ... to this new function. When GDB
9194 selects any thread, select one here. In non-stop mode, wait until
9195 GDB acks all pending events before exiting.
9196 (handle_serial_event, handle_target_event): New.
9197 * remote-utils.c (remote_open): Install remote_desc in the event
9198 loop.
9199 (remote_close): Remove remote_desc from the event loop.
9200 (putpkt_binary): Rename to...
9201 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9202 (putpkt_binary): New as wrapper around putpkt_binary_1.
9203 (putpkt_notif): New.
9204 (prepare_resume_reply): In non-stop mode, don't change the
9205 general_thread.
9206 * event-loop.c: New.
9207 * Makefile.in (OBJ): Add event-loop.o.
9208 (event-loop.o): New rule.
9209
9210 * linux-low.h (pid_of): Moved here.
9211 (lwpid_of): New.
9212 (get_lwp_thread): Use lwpid_of.
9213 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9214 * linux-low.c (pid_of): Delete.
9215 (inferior_pid): Use lwpid_of.
9216 (linux_event_pipe): New.
9217 (target_is_async_p): New.
9218 (delete_lwp): New.
9219 (handle_extended_wait): Use lwpid_of.
9220 (add_lwp): Don't set lwpid field.
9221 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9222 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9223 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9224 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9225 first. Adjust to linux_wait_for_event interface changes. Use
9226 lwpid_of.
9227 (linux_detach): Don't delete the main lwp here.
9228 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9229 (status_pending_p): Don't consider explicitly suspended lwps.
9230 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9231 pointer. Add OPTIONS argument. Change return type to int. Use
9232 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9233 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9234 pointer. Add status pointer argument. Return a pid instead of a
9235 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9236 changes. In non-stop mode, don't switch to a random thread.
9237 (linux_wait): Rename to...
9238 (linux_wait_1): ... this. Add target_options argument, and handle
9239 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9240 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9241 clean exit and signal exit code. Don't stop all threads in
9242 non-stop mode. In all-stop mode, only stop all threads when
9243 reporting a stop to GDB. Handle explicit thread stop requests.
9244 (async_file_flush, async_file_mark): New.
9245 (linux_wait): New.
9246 (send_sigstop): Use lwpid_of.
9247 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9248 interface changes. In non-stop mode, don't switch to a random
9249 thread.
9250 (linux_resume_one_lwp): Use lwpid_of.
9251 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9252 (linux_resume_one_thread): ... this. Handle resume_stop. In
9253 non-stop mode, don't look for pending flag in all threads.
9254 (resume_status_pending_p): Don't consider explicitly suspended
9255 threads.
9256 (my_waitpid): Reimplement. Emulate __WALL.
9257 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9258 Use lwpid_of.
9259 (sigchld_handler, linux_supports_non_stop, linux_async)
9260 (linux_start_non_stop): New.
9261 (linux_target_ops): Register linux_supports_non_stop, linux_async
9262 and linux_start_non_stop.
9263 (initialize_low): Install SIGCHLD handler.
9264 * thread-db.c (thread_db_create_event, find_one_thread)
9265 (thread_db_get_tls_address): Use lwpid_of.
9266 * win32-low.c (win32_detach): Adjust to use resume_kind.
9267 (win32_wait): Add `options' argument.
9268 * spu-low.c (spu_resume): Adjust to use resume_kind.
9269 (spu_wait): Add `options' argument.
9270
9271 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9272
9273 Decouple target code from remote protocol.
9274
9275 * target.h (enum target_waitkind): New.
9276 (struct target_waitstatus): New.
9277 (struct target_ops) <wait>: Return an unsigned long. Take a
9278 target_waitstatus pointer instead of a char pointer.
9279 (mywait): Likewise.
9280 * target.c (mywait): Change prototype to return an unsigned long.
9281 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9282 * server.h (thread_from_wait, old_thread_from_wait): Delete
9283 declarations.
9284 (prepare_resume_reply): Change prototype to take a
9285 target_waitstatus.
9286 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9287 (last_status, last_ptid): New.
9288 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9289 pid instead of a signal.
9290 (attach_inferior): Remove "status" and "signal" parameters.
9291 Adjust.
9292 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9293 not as an address.
9294 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9295 (handle_v_requests, myresume): Remove "status" and "signal"
9296 parameters. Adjust.
9297 (handle_status): New.
9298 (main): Delete local `status'. Adjust.
9299 * remote-utils.c: Include target.h.
9300 (prepare_resume_reply): Change prototype to take a
9301 target_waitstatus. Adjust.
9302
9303 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9304 interface.
9305 * spu-low.c (spu_wait): Adjust.
9306 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9307 Delete.
9308 (win32_wait): Adjust.
9309
9310 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9311
9312 * target.h (struct thread_resume): Delete leave_stopped member.
9313 (struct target_ops): Add a `n' argument to the `resume' callback.
9314 * server.c (start_inferior): Adjust.
9315 (handle_v_cont, myresume): Adjust.
9316 * linux-low.c (check_removed_breakpoint): Adjust to resume
9317 interface change, and to removed leave_stopped field.
9318 (resume_ptr): Delete.
9319 (struct thread_resume_array): New.
9320 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9321 resume interface change.
9322 (linux_continue_one_thread, linux_queue_one_thread)
9323 (resume_status_pending_p): Check if the resume field is NULL
9324 instead of checking the leave_stopped member.
9325 (linux_resume): Adjust to the target resume interface change.
9326 * spu-low.c (spu_resume): Adjust to the target resume interface
9327 change.
9328 * win32-low.c (win32_detach, win32_resume): Ditto.
9329
9330 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9331
9332 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9333 flag.
9334 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9335 pending.
9336 (linux_continue_one_thread): Only preserve the stepping flag if
9337 there's a pending breakpoint.
9338
9339 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9340
9341 * server.c (main): After the inferior having exited, call
9342 remote_close before exiting gdbserver.
9343
9344 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9345
9346 Fix size of FPSCR in Power 7 processors.
9347 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9348 (PPC_FEATURE_HAS_DFP): New #define.
9349 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9350 size of the FPSCR.
9351
9352 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9353
9354 * server.c (handle_query) Whitespace and formatting.
9355
9356 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9357
9358 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9359 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9360 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9361 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9362 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9363 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9364 Makefile.in, configure.ac: Fix whitespace throughout.
9365 * configure: Regenerate.
9366
9367 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9368
9369 * inferiors.c (find_inferior): Make it safe for the callback
9370 function to delete the currently iterated inferior.
9371
9372 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9373
9374 * Makefile.in (linuw_low_h): Move higher.
9375 (thread-db.o): Depend on $(linux_low_h).
9376
9377 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9378
9379 Rename "process" to "lwp" throughout.
9380
9381 * linux-low.c (all_processes): Rename to...
9382 (all_lwps): ... this.
9383 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9384 (add_process): Rename to ...
9385 (add_lwp): ... this. Adjust.
9386 (linux_create_inferior): Adjust.
9387 (linux_attach_lwp): Adjust.
9388 (linux_attach): Adjust.
9389 (linux_kill_one_process): Rename to ...
9390 (linux_kill_one_lwp): ... this. Adjust.
9391 (linux_kill): Adjust.
9392 (linux_detach_one_process): Rename to ...
9393 (linux_detach_one_lwp): ... this. Adjust.
9394 (linux_detach): Adjust.
9395 (check_removed_breakpoint): Adjust.
9396 (status_pending_p): Adjust.
9397 (linux_wait_for_process): Rename to ...
9398 (linux_wait_for_lwp): ... this. Adjust.
9399 (linux_wait_for_event): Adjust.
9400 (send_sigstop): Adjust.
9401 (wait_for_sigstop): Adjust.
9402 (stop_all_processes): Rename to ...
9403 (stop_all_lwps): ... this.
9404 (linux_resume_one_process): Rename to ...
9405 (linux_resume_one_lwp): ... this. Adjust.
9406 (linux_set_resume_request, linux_continue_one_thread)
9407 (linux_queue_one_thread, resume_status_pending_p)
9408 (usr_store_inferior_registers, regsets_store_inferior_registers)
9409 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9410 Adjust.
9411 * linux-low.h (get_process): Rename to ...
9412 (get_lwp): ... this. Adjust.
9413 (get_thread_process): Rename to ...
9414 (get_thread_lwp): ... this. Adjust.
9415 (get_process_thread): Rename to ...
9416 (get_lwp_thread): ... this. Adjust.
9417 (struct process_info): Rename to ...
9418 (struct lwp_info): ... this.
9419 (all_processes): Rename to ...
9420 (all_lwps): ... this.
9421 * proc-service.c (ps_lgetregs): Adjust.
9422 * thread-db.c (thread_db_create_event, find_one_thread)
9423 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9424
9425 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9426
9427 * server.c (handle_query): Handle "qAttached".
9428
9429 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9430
9431 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9432 GPLv3, update license URL.
9433
9434 2009-03-01 Doug Evans <dje@google.com>
9435
9436 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9437 (server_h): Add gdb_signals.h.
9438 (signals.o): Update.
9439 * server.h (target_signal_from_host,target_signal_to_host_p)
9440 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9441
9442 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9443
9444 * remote-utils.c (getpkt): Also generate remote-debug
9445 information if noack_mode is set.
9446
9447 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9448
9449 * server.c (handle_query): Report qXfer:siginfo:read and
9450 qXfer:siginfo:write as supported and handle them.
9451 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9452 * linux-low.c (linux_xfer_siginfo): New.
9453 (linux_target_ops): Set it.
9454
9455 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9456
9457 * server.c (gdbserver_usage): Mention --remote-debug.
9458 (main): Accept '--remote-debug' switch.
9459
9460 2009-01-18 Doug Evans <dje@google.com>
9461
9462 * regcache.c (new_register_cache): No need to check result of xcalloc.
9463 * server.c (handle_search_memory): Back out calls to xmalloc,
9464 result is checked and error is returned to user upon failure.
9465 (handle_query): Ditto. Add more checks for result of malloc.
9466 (handle_v_cont): Check result of malloc, report error back to
9467 user upon failure.
9468 (handle_v_run): Ditto. Call freeargv.
9469 * server.h (freeargv): Declare.
9470 * utils.c (freeargv): New fn.
9471
9472 2009-01-15 Doug Evans <dje@google.com>
9473
9474 * gdbreplay.c (perror_with_name): Make arg const char *.
9475 * server.h (target_signal_to_name): Make return type const char *.
9476 * thread-db.c (thread_db_err_str): Make return type const char *.
9477 * utils.c (perror_with_name): Make arg const char *.
9478
9479 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9480
9481 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9482 when handling a EXIT_PROCESS_DEBUG_EVENT.
9483
9484 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9485
9486 * gdbreplay.c (gdbreplay_version): Update copyright year.
9487 * server.c (gdbserver_version): Likewise.
9488
9489 2009-01-05 Doug Evans <dje@google.com>
9490
9491 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9492 (handle_extended_wait): Improve comment.
9493
9494 2008-12-13 Doug Evans <dje@google.com>
9495
9496 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9497 * server.h (ATTR_MALLOC): New macro.
9498 (xmalloc,xcalloc,xstrdup): Declare.
9499 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9500 * inferiors.c: Ditto.
9501 * linux-low.c: Ditto.
9502 * mem-break.c: Ditto.
9503 * regcache.c: Ditto.
9504 * remote-utils.c: Ditto.
9505 * server.c: Ditto.
9506 * target.c: Ditto.
9507 * win32-low.c: Ditto.
9508
9509 2008-12-12 Doug Evans <dje@google.com>
9510
9511 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9512 in debugging printf.
9513
9514 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9515
9516 2008-12-09 Doug Evans <dje@google.com>
9517
9518 * linux-low.h (struct process_info): Delete member tid, unused.
9519 * thread-db.c (find_one_thread): Update.
9520 (maybe_attach_thread): Update.
9521
9522 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9523
9524 * target.h (struct target_ops): Add qxfer_osdata member.
9525 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9526 and dirent.h.
9527 (linux_qxfer_osdata): New functions.
9528 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9529 callback.
9530 * server.c (handle_query): Handle "qXfer:osdata:read:".
9531 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9532 (buffer_xml_printf): New functions.
9533 * server.h (struct buffer): New.
9534 (buffer_grow_str, buffer_grow_str0): New macros.
9535 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9536 (buffer_xml_printf): Declare.
9537
9538 2008-11-24 Doug Evans <dje@google.com>
9539
9540 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9541
9542 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9543
9544 * server.c (handle_v_run): Always use the supplied argument list.
9545
9546 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9547
9548 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9549 (xtensa_regmap_table): Add entry for scompare1.
9550
9551 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9552
9553 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9554 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9555 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9556 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9557 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9558 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9559 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9560 XML target descriptions.
9561 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9562 when inferior is running on an ISA 2.05 or later processor. Add
9563 special case to return offset for full 64-bit slot of FPSCR when
9564 in 32-bits.
9565
9566 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9567
9568 * Makefile.in (SFILES, clean): Added sparc64 files.
9569 (reg-sparc64.o, reg-sparc64.c): New.
9570 * configure.srv (sparc*-*-linux*): New configuration.
9571 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9572 syscall arguments for SPARC.
9573 (regsets_store_inferior_registers): Likewise.
9574 * linux-sparc-low.c: New file.
9575
9576 2008-10-21 Doug Evans <dje@google.com>
9577
9578 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9579 (READLINE_DIR,READLINE_DEP): Delete.
9580 (INTERNAL_CFLAGS): Update.
9581 (LINTFLAGS): Update.
9582
9583 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9584
9585 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9586 whole argv from the last run, not just argv[0].
9587
9588 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9589
9590 * regcache.c (new_register_cache): Return NULL if the register
9591 cache size isn't known yet.
9592 (free_register_cache): Avoid dereferencing a NULL regcache.
9593
9594 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9595
9596 * configure.srv: Merge MIPS and MIPS64.
9597
9598 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9599
9600 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9601
9602 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9603
9604 * Makefile.in: Add required vsx dependencies.
9605
9606 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9607 Declare init_registers_powerpc_vsx32l.
9608 Declare init_registers_powerpc_vsx64l.
9609 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9610 (ppc_arch_setup): Check for VSX in hwcap.
9611 (ppc_fill_vsxregset): New function.
9612 (ppc_store_vsxregset): New function.
9613 Add new VSX entry in regset_info target_regsets.
9614
9615 * configure.srv: Add new VSX dependencies.
9616
9617 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9618
9619 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9620 (remote_open): Set or clear transport_is_reliable.
9621 (putpkt_binary): Don't expect acks in noack mode.
9622 (getpkt): Don't send ack/nac in noack mode.
9623 * server.c (handle_general_set): Handle QStartNoAckMode.
9624 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9625 qSupported.
9626 (main): Reset noack_mode on every connection.
9627 * server.h (noack_mode): Declare.
9628
9629 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9630
9631 * Makefile.in (GDBREPLAY_OBS): New variable.
9632 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9633
9634 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9635 Daniel Jacobowitz <dan@codesourcery.com>
9636
9637 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9638 (usr_store_inferior_registers): Likewise.
9639 (regsets_store_inferior_registers): Likewise.
9640
9641 2008-07-31 Rolf Jansen <rj@surtec.com>
9642 Pedro Alves <pedro@codesourcery.com>
9643
9644 * configure.ac: Check for memmem declaration.
9645 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9646 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9647 (disable_packet_qfThreadInfo): Unconditionally compile.
9648 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9649 * configure, config.in: Regenerate.
9650
9651 2008-07-28 Doug Kwan <dougkwan@google.com>
9652
9653 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9654 (linux_write_memory): Remove declaration of errno.
9655
9656 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9657
9658 * linux-low.c (handle_extended_wait): Do not use "status"
9659 variable uninitialized.
9660
9661 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9662
9663 * server.c (handle_v_attach): Inhibit reporting dll changes.
9664
9665 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9666
9667 * remote-utils.c (prepare_resume_reply): If requested, don't
9668 output "thread:TID" in the T stop reply.
9669
9670 * server.c (disable_packet_vCont, disable_packet_Tthread)
9671 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9672 (handle_query): If requested, disable support for qC, qfThreadInfo
9673 and qsThreadInfo.
9674 (handle_v_requests): If requested, disable support for vCont.
9675 (gdbserver_show_disableable): New.
9676 (main): Handle --disable-packet and --disable-packet=LIST.
9677
9678 * server.h (disable_packet_vCont, disable_packet_Tthread)
9679 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9680
9681 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9682
9683 * server.c (gdbserver_usage): Mention --version.
9684
9685 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9686
9687 * Makefile.in (gdbreplay.o): New rule.
9688
9689 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9690
9691 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9692 message, not gdbserver.
9693
9694 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9695 Nathan Sidwell <nathan@codesourcery.com>
9696 Joseph Myers <joseph@codesourcery.com>
9697
9698 * acinclude.m4: Include ../../config/acx.m4.
9699 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9700 * configure, config.in: Regenerate.
9701 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9702 * server.c (gdbserver_version): Print PKGVERSION.
9703 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9704 (main): Adjust gdbserver_usage calls.
9705 * gdbreplay.c (version, host_name): Add declarations.
9706 (gdbreplay_version, gdbreplay_usage): New.
9707 (main): Accept --version and --help options.
9708
9709 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9710
9711 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9712 (arm_breakpoint_at): Handle Thumb.
9713 (the_low_target): Add comment.
9714
9715 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9716
9717 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9718
9719 2008-05-09 Doug Evans <dje@google.com>
9720
9721 * server.h (decode_search_memory_packet): Declare.
9722 * remote-utils.c (decode_search_memory_packet): New fn.
9723 * server.c (handle_search_memory_1): New fn.
9724 (handle_search_memory): New fn.
9725 (handle_query): Process qSearch:memory packets.
9726
9727 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9728
9729 * regcache.c (registers_length): Remove.
9730 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9731 full register packet.
9732 * regcache.h (registers_length): Remove prototype.
9733 * server.h (PBUFSIZ): Define to 16384.
9734
9735 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9736
9737 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9738 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9739 powerpc-64l.o, and powerpc-altivec64l.o.
9740 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9741 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9742 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9743 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9744 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9745 to srv_xmlfiles.
9746
9747 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9748 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9749 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9750 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9751 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9752 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9753 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9754 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9755 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9756 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9757 (clean): Update.
9758
9759 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9760 (init_registers_powerpc_32l): ... this new prototype.
9761 (init_registers_powerpc_32): Remove, replace by ...
9762 (init_registers_powerpc_altivec32l): ... this new prototype.
9763 (init_registers_powerpc_e500): Remove, replace by ...
9764 (init_registers_powerpc_e500l): ... this new prototype.
9765 (init_registers_ppc64): Remove, replace by ...
9766 (init_registers_powerpc_64l): ... this new prototype.
9767 (init_registers_powerpc_64): Remove, replace by ...
9768 (init_registers_powerpc_altivec64l): ... this new prototype.
9769 (ppc_num_regs): Set to 73.
9770 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9771 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9772 (ppc_cannot_store_register): Handle orig_r3 and trap.
9773 (ppc_arch_setup): Update init_registers_... calls.
9774 (ppc_fill_gregset): Handle orig_r3 and trap.
9775
9776 * inferiors.c (clear_inferiors): Reset current_inferior.
9777
9778 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9779
9780 * acinclude.m4: Add override.m4.
9781 * configure: Regenerate.
9782
9783 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9784
9785 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9786 initial call to init_register_ppc64.
9787
9788 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9789
9790 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9791 single powerpc*-*-linux* case.
9792 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9793
9794 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9795
9796 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9797 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9798 from reg_xmlfiles.
9799 * linux-ppc-low.c: Include <elf.h>.
9800 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9801 (ppc_hwcap): New global variable.
9802 (ppc_regmap): Remove __SPE__ #ifdef sections.
9803 (ppc_regmap_e500): New global variable.
9804 (ppc_cannot_store_register): Update __SPE__ special case.
9805 (ppc_get_hwcap): New function.
9806 (ppc_arch_setup): Use it to determine whether inferior supports
9807 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9808 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9809 Do not access registers if target does not support AltiVec.
9810 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9811 Do not access registers if target does not support SPE.
9812 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9813
9814 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9815
9816 * linux-low.c (disabled_regsets, num_regsets): New.
9817 (use_regsets_p): Delete.
9818 (linux_wait_for_process): Clear disabled_regsets.
9819 (regsets_fetch_inferior_registers): Check and set it.
9820 (regsets_store_inferior_registers): Likewise.
9821 (linux_fetch_registers, linux_store_registers): Do not use
9822 use_regsets_p.
9823 (initialize_low): Allocate disabled_regsets.
9824
9825 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9826
9827 * Makefile.in (LIBOBJS): New.
9828 (OBS): Use LIBOBJS.
9829 (memmem.o): New rule.
9830 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9831 * configure: Regenerated.
9832
9833 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9834
9835 * server.c (handle_query): Never return "unsupported" for
9836 qXfer:features:read queries.
9837
9838 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9839
9840 * server.c (get_features_xml): Fix inverted condition.
9841 (handle_query): Always support qXfer:feature:read.
9842
9843 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9844
9845 * server.c (wrapper_argv): New.
9846 (start_inferior): Handle wrapper_argv. If set, expect an extra
9847 trap.
9848 (gdbserver_usage): Document --wrapper.
9849 (main): Parse --wrapper.
9850
9851 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9852
9853 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9854 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9855 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9856 (ppc_set_pc): Likewise.
9857 (ppc_arch_setup): New function.
9858 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9859 of collect_register.
9860 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9861
9862 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9863
9864 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9865 instead of linux-ppc64-low.o.
9866 * linux-ppc64-low.c: Remove file.
9867 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9868 (linux-ppc64-low.o): Remove rule.
9869
9870 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9871 (init_registers_powerpc_64): Likewise.
9872 (ppc_regmap): Conditionally define depending on __powerpc64__.
9873 (ppc_cannot_store_register): Do not special-case "fpscr" when
9874 compiled on __powerpc64__.
9875 (ppc_collect_ptrace_register): New function.
9876 (ppc_supply_ptrace_register): New function.
9877 (ppc_breakpoint): Change type to "unsigned int".
9878 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9879 (the_low_target): Conditionally provide initializers for the
9880 arch_setup member depending on __powerpc64__. Install
9881 collect_ptrace_register and supply_ptrace_register members.
9882
9883 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9884
9885 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9886 * server.c (gdbserver_xmltarget): Define.
9887 (get_features_xml): Use it to replace "target.xml" and arch_string.
9888
9889 * configure.srv: Remove srv_xmltarget. Add XML files that were
9890 mentioned there to srv_xmlfiles instead. Remove conditional tests
9891 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9892 srv_xmlfiles and srv_regobj to include all possible choices.
9893 * configure.ac (srv_xmltarget): Remove.
9894 (srv_xmlfiles): Do not add "target.xml".
9895 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9896 checks for supplementary target information.
9897 * configure: Regenerate.
9898 * Makefile.in (XML_TARGET): Remove.
9899 (target.xml): Remove rule.
9900 (clean): Do not clean up target.xml.
9901 (.PRECIOUS): Do not mention target.xml.
9902
9903 * target.h (struct target_ops): Remove arch_string member.
9904 * linux-low.c (linux_arch_string): Remove.
9905 (linux_target_ops): Remove arch_string initializer.
9906 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9907 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9908 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9909 * spu-low.c (spu_arch_string): Remove.
9910 (spu_target_ops): Remove arch_string initializer.
9911 * win32-low.c (win32_arch_string): Remove.
9912 (win32_target_ops): Remove arch_string initializer.
9913 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9914 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9915 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9916
9917 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9918
9919 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9920 by collect_ptrace_register and supply_ptrace_register hooks.
9921 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9922 instead of checking for the_low_target.left_pad_xfer.
9923 (usr_store_inferior_registers): Use collect_ptrace_register callback
9924 instead of checking for the_low_target.left_pad_xfer.
9925
9926 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9927 (s390_supply_ptrace_register): Likewise.
9928 (s390_fill_gregset): Call s390_collect_ptrace_register.
9929 (the_low_target): Update.
9930
9931 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9932 (ppc_supply_ptrace_register): Likewise.
9933 (the_low_target): Update.
9934
9935 * linux-i386-low.c (the_low_target): Update.
9936 * linux-x86-64-low.c (the_low_target): Update.
9937
9938 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9939
9940 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9941 reg-s390.o and reg-s390x.o.
9942
9943 * linux-low.c (new_inferior): New global variable.
9944 (linux_create_inferior, linux_attach): Set it.
9945 (linux_wait_for_process): Call the_low_target.arch_setup after the
9946 target has stopped for the first time.
9947 (initialize_low): Do not call the_low_target.arch_setup.
9948
9949 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9950 (s390_set_pc): Likewise.
9951 (s390_arch_setup): New function.
9952 (the_low_target): Use s390_arch_setup as arch_setup routine.
9953
9954 * regcache.c (realloc_register_cache): New function.
9955 (set_register_cache): Call it for each existing regcache.
9956
9957 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9958
9959 * server.h (init_registers): Remove prototype.
9960
9961 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9962 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9963 instead of init_registers ().
9964 * linux-arm-low.c (init_registers_arm): Add prototype.
9965 (init_registers_arm_with_iwmmxt): Likewise.
9966 (the_low_target): Add initializer for arch_setup field.
9967 * linux-cris-low.c (init_registers_cris): Add prototype.
9968 (the_low_target): Add initializer for arch_setup field.
9969 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9970 (the_low_target): Add initializer for arch_setup field.
9971 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9972 (the_low_target): Add initializer for arch_setup field.
9973 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9974 (the_low_target): Add initializer for arch_setup field.
9975 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9976 (the_low_target): Add initializer for arch_setup field.
9977 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9978 (the_low_target): Add initializer for arch_setup field.
9979 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9980 (init_registers_mips64_linux): Likewise.
9981 (the_low_target): Add initializer for arch_setup field.
9982 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9983 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9984 (the_low_target): Add initializer for arch_setup field.
9985 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9986 (init_registers_powerpc_64): Likewise.
9987 (the_low_target): Add initializer for arch_setup field.
9988 * linux-s390-low.c (init_registers_s390): Add prototype.
9989 (init_registers_s390x): Likewise.
9990 (the_low_target): Add initializer for arch_setup field.
9991 * linux-sh-low.c (init_registers_sh): Add prototype.
9992 (the_low_target): Add initializer for arch_setup field.
9993 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9994 (the_low_target): Add initializer for arch_setup field.
9995 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9996 (the_low_target): Add initializer for arch_setup field.
9997
9998 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9999 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10000 instead of init_registers ().
10001 * win32-arm-low.c (init_registers_arm): Add prototype.
10002 (the_low_target): Add initializer for arch_setup field.
10003 * win32-i386-low.c (init_registers_i386): Add prototype.
10004 (the_low_target): Add initializer for arch_setup field.
10005
10006 * spu-low.c (init_registers_spu): Add prototype.
10007 (initialize_low): Call initialie_registers_spu () instead of
10008 initialize_registers ().
10009
10010 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10011
10012 * server.c (handle_v_requests): When handling the vRun and vAttach
10013 packets, if already debugging a process, don't kill it. Return an
10014 error instead.
10015
10016 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10017
10018 * server.c (handle_query): Correct length check.
10019
10020 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10021
10022 * win32-low.c (do_initial_child_stuff): Add process handle
10023 parameter. Set current_process_handle and current_process_id from the
10024 parameters. Clear globals.
10025 (win32_create_inferior): Don't set current_process_handle and
10026 current_process_id here. Instead pass them on the call to
10027 do_initial_child_stuff.
10028 (win32_attach): Likewise.
10029 (win32_clear_inferiors): New.
10030 (win32_kill): Don't close the current process handle or the
10031 current thread handle here. Instead call win32_clear_inferiors.
10032 (win32_detach): Don't open a new handle to the process. Call
10033 win32_clear_inferiors.
10034 (win32_join): Don't rely on current_process_handle; open a new
10035 handle using the process id.
10036 (win32_wait): Call win32_clear_inferiors when the inferior process
10037 has exited.
10038
10039 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10040
10041 * server.c (monitor_show_help): Add "exit".
10042
10043 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10044
10045 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10046 (clean): Add reg-xtensa.c.
10047 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10048 * configure.srv (xtensa*-*-linux*) New target.
10049 * linux-xtensa-low.c: New.
10050 * xtensa-xtregs.c: New.
10051
10052 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10053
10054 * hostio.c: Don't include errno.h.
10055 (errno_to_fileio_errno): Move to hostio-errno.
10056 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10057 error number outputting to the target->hostio_last_error callback.
10058 (hostio_packet_error): Use FILEIO_EINVAL directly.
10059 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10060 calls to hostio_error.
10061 * hostio-errno.c: New.
10062 * server.h (hostio_last_error_from_errno): Declare.
10063 * target.h (target_ops): Add hostio_last_error member.
10064 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10065 as hostio_last_error handler.
10066 * spu-low.c (spu_target_ops): Likewise.
10067 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10068 (wince_hostio_last_error): New functions.
10069 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10070 as hostio_last_error handler.
10071 (win32_target_ops) [!_WIN32_WCE]: Register
10072 hostio_last_error_from_errno as hostio_last_error handler.
10073 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10074 (hostio-errno.o): New rule.
10075 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10076 * configure.srv (srv_hostio_err_objs): New variable. Default to
10077 hostio-errno.o.
10078 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10079 * configure: Regenerate.
10080
10081 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10082
10083 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10084 (linux_kill, linux_detach): Clean up the process list.
10085 * remote-utils.c (remote_open): Improve port number parsing.
10086 (putpkt_binary, input_interrupt): Only send interrupts if the target
10087 is running.
10088 * server.c (extended_protocol): Make static.
10089 (attached): Define earlier.
10090 (exit_requested, response_needed, program_argv): New variables.
10091 (target_running): New.
10092 (start_inferior): Clear attached here.
10093 (attach_inferior): Set attached here.
10094 (require_running): Define.
10095 (handle_query): Use require_running and target_running. Implement
10096 "monitor exit".
10097 (handle_v_attach, handle_v_run): New.
10098 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10099 (gdbserver_usage): Update.
10100 (main): Redo argument parsing. Handle --debug and --multi. Handle
10101 --attach along with other options or after the port. Save
10102 program_argv. Support no initial program. Resynchronize
10103 communication with GDB after an error. Handle "monitor exit".
10104 Use require_running and target_running. Always allow the extended
10105 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10106 restart in extended mode.
10107 * README: Refer to the GDB manual. Update --attach usage.
10108
10109 2007-12-20 Andreas Schwab <schwab@suse.de>
10110
10111 * linux-low.c (STACK_SIZE): Define.
10112 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10113 (linux_test_for_tracefork): Likewise.
10114
10115 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10116
10117 * linux-low.c (linux_wait_for_event): Update messages. Do not
10118 reinsert auto-delete breakpoints.
10119 * mem-break.c (struct breakpoint): Change return type of handler to
10120 int.
10121 (set_breakpoint_at): Update handler type.
10122 (reinsert_breakpoint_handler): Return 1 instead of calling
10123 delete_breakpoint.
10124 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10125 setting a new one.
10126 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10127 * mem-break.h (set_breakpoint_at): Update handler type.
10128 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10129 * win32-low.c (auto_delete_breakpoint): New.
10130 (get_child_debug_event): Use it.
10131
10132 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10133
10134 * configure.ac: Check for pread and pwrite.
10135 * hostio.c (handle_pread): Fall back to lseek and read.
10136 (handle_pwrite): Fall back to lseek and write.
10137 * config.in, configure: Regenerated.
10138
10139 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10140
10141 * server.c (myresume): Add own_buf argument.
10142 (main): Update calls.
10143
10144 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10145
10146 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10147 * remote-utils.c (remote_open): Do not call disable_async_io.
10148 (block_async_io): Delete.
10149 (unblock_async_io): Make static.
10150 (initialize_async_io): New.
10151 * server.c (handle_v_cont): Handle async I/O here.
10152 (myresume): Likewise. Move other common resume tasks here...
10153 (main): ... from here. Call initialize_async_io. Disable async
10154 I/O before the main loop.
10155 * server.h (initialize_async_io): Declare.
10156 (block_async_io, unblock_async_io): Delete prototypes.
10157 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10158
10159 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10160
10161 * remote-utils.c (readchar): Allow binary data in received messages.
10162
10163 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10164
10165 * win32-low.c (attaching): New global.
10166 (win32_create_inferior): Clear the `attaching' global.
10167 (win32_attach): Set the `attaching' global.
10168 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10169 attaching. Only set a breakpoint at the entry point if not
10170 attaching.
10171
10172 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10173
10174 * server.c (main): Don't report dll events on the initial
10175 connection on attaches.
10176
10177 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10178
10179 * server.c (main): Relax numerical bases supported for the pid of
10180 the --attach command line argument.
10181
10182 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10183
10184 * win32-low.c (win32_attach): Call OpenProcess before
10185 DebugActiveProcess, not after. Add last error output to error
10186 call.
10187
10188 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10189
10190 * win32-low.c (win32_get_thread_context)
10191 (win32_set_thread_context): New functions.
10192 (thread_rec): Use win32_get_thread_context.
10193 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10194 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10195 field.
10196
10197 2007-12-03 Leo Zayas
10198 Pedro Alves <pedro_alves@portugalmail.pt>
10199
10200 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10201 global variables.
10202 (child_add_thread): Minor cleanup.
10203 (child_continue): Resume artificially suspended threads before
10204 calling ContinueDebugEvent.
10205 (suspend_one_thread): New.
10206 (fake_breakpoint_event): New.
10207 (get_child_debug_event): Change return type to int. Check here if
10208 gdb sent an interrupt request. If a soft interrupt was requested,
10209 fake a breakpoint event. Return 0 if there is no event to handle,
10210 and 1 otherwise.
10211 (win32_wait): Don't check here if gdb sent an interrupt request.
10212 Ensure there is a valid event to handle.
10213 (win32_request_interrupt): Add soft interruption method as last
10214 resort.
10215
10216 2007-12-03 Leo Zayas
10217 Pedro Alves <pedro_alves@portugalmail.pt>
10218
10219 * win32-low.h (win32_thread_info): Add descriptions to the
10220 structure members. Replace `suspend_count' counter by a
10221 `suspended' flag.
10222 * win32-low.c (thread_rec): Update condition of when to get the
10223 context from the inferior. Rely on ContextFlags being set if it
10224 has already been retrieved. Only suspend the inferior thread if
10225 we haven't already. Warn if that fails.
10226 (continue_one_thread): s/suspend_count/suspended/. Only call
10227 ResumeThread once. Warn if that fails.
10228
10229 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10230
10231 * win32-low.c (win32_wait): Don't read from the inferior when it
10232 has already exited.
10233
10234 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10235
10236 * Makefile.in (win32_low_h): New variable.
10237 (win32-low.o): Add dependency on $(win32_low_h).
10238 (win32-arm-low.o, win32-i386-low.o): New rules.
10239
10240 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10241
10242 * hostio.c: Correct copyright year.
10243
10244 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10245
10246 * Makefile.in (OBS): Add hostio.o.
10247 (hostio.o): New rule.
10248 * server.h (handle_vFile): Declare.
10249 * hostio.c: New file.
10250 * server.c (handle_v_requests): Take packet_len and new_packet_len
10251 for binary packets. Call handle_vFile.
10252 (main): Update call to handle_v_requests.
10253
10254 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10255
10256 * linux-low.c: Include <sched.h>.
10257
10258 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10259
10260 * linux-low.c (linux_tracefork_grandchild): New.
10261 (linux_tracefork_child): Use clone.
10262 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10263
10264 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10265
10266 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10267
10268 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10269
10270 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10271
10272 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10273
10274 * inferiors.c (change_inferior_id): Delete.
10275 (add_pid_to_list, pull_pid_from_list): New.
10276 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10277 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10278 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10279 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10280 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10281 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10282 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10283 (using_threads): Always set to 1.
10284 (handle_extended_wait): New.
10285 (add_process): Do not set TID.
10286 (linux_create_inferior): Set must_set_ptrace_flags.
10287 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10288 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10289 (linux_thread_alive): Rename TID argument to LWPID.
10290 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10291 (linux_wait_for_event): Do not use TID or check using_threads. Update
10292 call to dead_thread_notify. Call handle_extended_wait.
10293 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10294 (send_sigstop): Delete sigstop_sent.
10295 (wait_for_sigstop): Avoid TID.
10296 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10297 (linux_test_for_tracefork): New.
10298 (linux_lookup_signals): Use thread_db_active and
10299 linux_supports_tracefork_flag.
10300 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10301 * linux-low.h (get_process_thread): Avoid TID.
10302 (struct process_ifo): Move thread_known and tid to the end. Remove
10303 sigstop_sent.
10304 (linux_attach_lwp, thread_db_init): Update prototypes.
10305 * server.h (change_inferior_id): Delete prototype.
10306 (add_pid_to_list, pull_pid_from_list): New prototypes.
10307 * thread-db.c (thread_db_use_events): New.
10308 (find_first_thread): Rename to...
10309 (find_one_thread): ...this. Update callers and messages. Do not
10310 call fatal. Check thread_db_use_events. Do not call
10311 change_inferior_id or new_thread_notify.
10312 (maybe_attach_thread): Update. Do not call new_thread_notify.
10313 (thread_db_init): Set thread_db_use_events. Check use_events.
10314 * utils.c (fatal, warning): Correct message prefix.
10315
10316 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10317
10318 * Makefile.in (clean): Remove new files.
10319 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10320 (powerpc-64.o, powerpc-64.c): New rules.
10321 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10322 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10323 with SPE.
10324 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10325 SPE targets.
10326 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10327 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10328 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10329 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10330 (target_regsets): Add AltiVec and SPE register sets.
10331 * configure.ac: Check for AltiVec and SPE.
10332 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10333 (ppc_fill_vrregset, ppc_store_vrregset): New.
10334 (target_regsets): Add AltiVec register set.
10335 * configure: Regenerated.
10336
10337 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10338
10339 * linux-low.c (O_LARGEFILE): Define.
10340 (linux_read_memory): Use /proc/PID/mem.
10341 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10342 * configure, config.in: Regenerated.
10343
10344 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10345
10346 * linux-low.c (linux_wait_for_event): Do not pass signals while
10347 single-stepping.
10348
10349 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10350
10351 * win32-low.c (create_process): New.
10352 (win32_create_inferior): Use create_process instead of
10353 CreateProcess. If create_process failed retry appending an ".exe"
10354 suffix. Store the GetLastError result immediatelly after
10355 create_process calls and use it on the call to error.
10356
10357 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10358
10359 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10360
10361 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10362
10363 * configure.ac: Switch license to GPLv3.
10364
10365 2007-08-01 Michael Snyder <msnyder@access-company.com>
10366
10367 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10368
10369 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10370
10371 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10372 typedef.
10373 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10374 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10375 CloseToolhelp32Snapshot.
10376 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10377 CloseToolhelp32Snapshot.
10378
10379 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10380
10381 * server.c (main): Check for inferior exit before main loop.
10382
10383 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10384
10385 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10386 instead of on tmp_desc.
10387
10388 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10389 Daniel Jacobowitz <dan@codesourcery.com>
10390
10391 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10392 (add_thread): Minor cleanups.
10393 (clear_inferiors): Move lower in the file. Clear the DLL
10394 list.
10395 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10396 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10397 (xml_escape_text): New.
10398 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10399 for qSupported.
10400 (handle_v_cont): Report errors.
10401 (gdbserver_version): Update.
10402 (main): Correct size of own_buf. Do not report initial DLL events.
10403 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10404 (unloaded_dll, xml_escape_text): New.
10405 * win32-low.c (enum target_waitkind): Update comments.
10406 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10407 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10408 (win32_EnumProcessModules, win32_GetModuleInformation)
10409 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10410 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10411 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10412 (win32_Module32First, win32_Module32Next, load_toolhelp)
10413 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10414 (get_child_debug_event): Handle DLL events.
10415 (win32_wait): Likewise.
10416
10417 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10418
10419 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10420 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10421
10422 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10423
10424 * win32-low.c (handle_output_debug_string): Ignore event if not
10425 waiting.
10426
10427 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10428
10429 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10430
10431 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10432
10433 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10434
10435 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10436
10437 * inferiors.c (change_inferior_id): Add comment.
10438 * linux-low.c (check_removed_breakpoint): Add an early
10439 prototype. Improve debug output.
10440 (linux_attach): Doc update.
10441 (linux_detach_one_process, linux_detach): Clean up before releasing
10442 each process.
10443 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10444 * linux-low.h (struct process_info): Doc improvement.
10445 * mem-break.c (delete_all_breakpoints): New.
10446 * mem-break.h (delete_all_breakpoints): New prototype.
10447 * thread-db.c (find_first_thread): New.
10448 (thread_db_create_event): Call it instead of
10449 thread_db_find_new_threads. Clean up unused variables.
10450 (maybe_attach_thread): Remove first thread handling.
10451 (thread_db_find_new_threads): Use find_first_thread.
10452 (thread_db_get_tls_address): Likewise.
10453
10454 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10455
10456 * thread-db.c (thread_db_find_new_threads): Add prototype.
10457 (thread_db_create_event): Check for the main thread before adding
10458 a new thread.
10459 (maybe_attach_thread): Only enable event reporting if TID == 0.
10460 (thread_db_get_tls_address): Check for new threads.
10461
10462 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10463
10464 * linux-low.c (linux_create_inferior): Try execv before execvp.
10465 * spu-low.c (spu_create_inferior): Likewise.
10466
10467 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10468
10469 * linux-low.c (linux_create_inferior): Change execv to execvp.
10470 * spu-low.c (spu_create_inferior): Likewies.
10471
10472 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10473
10474 * Makefile.in (clean): Clean new files instead of deleted ones.
10475 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10476 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10477 rules.
10478 * configure.srv: Specify XML files and new regformats for MIPS and
10479 MIPS64 GNU/Linux.
10480 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10481 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10482 an entry for the restart register.
10483 (mips_cannot_fetch_register, mips_cannot_store_register)
10484 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10485 register names to match the XML descriptions.
10486 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10487 restart register instead of $0.
10488
10489 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10490 Markus Deuling <deuling@de.ibm.com>
10491
10492 * remote-utils.c (decode_xfer_write): New function.
10493 * server.h (decode_xfer_write): Add prototype.
10494 * server.c (handle_query): Add PACKET_LEN argument. Support
10495 qXfer:spu:read and qXfer:spu:write packets.
10496 (main): Pass packet_len to handle_query.
10497 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10498 * target.h (target_ops): Add qxfer_spu.
10499
10500 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10501
10502 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10503 accessing non-seekable spufs files.
10504
10505 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10506
10507 * server.c (handle_query): Add reply for qC packet.
10508
10509 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10510 Leo Zayas <lerele@champenstudios@com>
10511
10512 * server.h (check_remote_input_interrupt_request): New function.
10513 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10514 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10515 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10516 (check_remote_input_interrupt_request): New function.
10517 * server.h (check_remote_input_interrupt_request): Declare.
10518 * win32-low.c (winapi_DebugBreakProcess,
10519 winapi_GenerateConsoleCtrlEvent): New typedefs.
10520 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10521 to 250 ms.
10522 (win32_wait): Check for remote interrupt request
10523 with check_remote_input_interrupt_request.
10524 (win32_request_interrupt): New function.
10525 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10526
10527 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10528
10529 * win32-low.c (debug_registers_changed,
10530 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10531 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10532 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10533 (thread_rec): Get context using the low target.
10534 (child_add_thread): Call thread_added on the low target,
10535 which does the same thing.
10536 (regptr): Delete.
10537 (do_initial_child_stuff): Remove debug registers references.
10538 Set context using the low target. Resume threads after
10539 setting the contexts.
10540 (child_continue): Remove dead variable. Remove debug
10541 registers references.
10542 (child_fetch_inferior_registers): Go through the low target.
10543 (do_child_store_inferior_registers): Remove.
10544 (child_store_inferior_registers): Go through the low target.
10545 (win32_resume): Remove debug registers references.
10546 Set context using the low target.
10547 (handle_exception): Change return type to void. Don't record
10548 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10549 first chance exception.
10550 (get_child_debug_event): Change return type to void. Remove
10551 goto loop. Always return after waiting for debug event.
10552 (win32_wait): Convert to switch statement. Handle spurious
10553 events.
10554
10555 * win32-i386-low.c (debug_registers_changed,
10556 debug_registers_used): New.
10557 (initial_stuff): Rename to ...
10558 (i386_initial_stuff): ... this. Clear debug registers
10559 state variables.
10560 (store_debug_registers): Delete.
10561 (i386_get_thread_context): New.
10562 (load_debug_registers): Delete.
10563 (i386_set_thread_context): New.
10564 (i386_thread_added): New.
10565 (single_step): Rename to ...
10566 (i386_single_step): ... this.
10567 (do_fetch_inferior_registers): Rename to ...
10568 (i386_fetch_inferior_register): ... this.
10569 (i386_store_inferior_register): New.
10570 (the_low_target): Adapt to new interface.
10571
10572 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10573 (arm_get_thread_context): New.
10574 (arm_set_thread_context): New.
10575 (regptr): New.
10576 (do_fetch_inferior_registers): Rename to ...
10577 (arm_fetch_inferior_register): ... this.
10578 (arm_store_inferior_register): New.
10579 (arm_wince_breakpoint): Reimplement as unsigned long.
10580 (arm_wince_breakpoint_len): Define.
10581 (the_low_target): Adapt to new interface.
10582
10583 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10584 load_debug_registers. Add get_thread_context, set_thread_context,
10585 thread_added and store_inferior_register. Rename
10586 fetch_inferior_registers to fetch_inferior_register.
10587 (regptr): Remove declaration.
10588
10589 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10590
10591 * linux-low.c (linux_detach): Change return type to int. Return 0.
10592 * spu-low.c (spu_detach): Likewise.
10593
10594 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10595
10596 * target.h (target_ops): Change return type of detach to int.
10597 Add join.
10598 (join_inferior): New.
10599 * server.c (main): Don't skip detach support on mingw32.
10600 If the inferior doesn't support detaching return error.
10601 Call join_inferior instead of using waitpid.
10602 * linux-low.c (linux_join): New.
10603 (linux_target_op): Add linux_join.
10604 * spu-low.c (spu_join): New.
10605 (spu_target_ops): Add spu_join.
10606 * win32-low.c (win32_detach): Adapt to new interface.
10607 Reopen current_process_handle before detaching. Issue a child
10608 resume before detaching.
10609 (win32_join): New.
10610 (win32_target_op): Add win32_join.
10611
10612 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10613
10614 * win32-low.c (win32-attach): Fix return value.
10615 * target.h (target_ops): Describe ATTACH return values.
10616
10617 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10618
10619 * win32-low.c (GETPROCADDRESS): Define.
10620 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10621 (winapi_DebugSetProcessKillOnExit): Likewise.
10622 (win32_create_inferior): Force usage of ansi CreateProcessA.
10623 (win32_attach): Use GETPROCADDRESS.
10624 (win32_detach): Likewise.
10625
10626 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10627
10628 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10629
10630 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10631
10632 * win32-low.c: Commit leftover changes from 2007-03-29.
10633
10634 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10635
10636 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10637 fields short instead of int. Add explicit padding.
10638 (i387_cache_to_fsave): Remove unnecessary casts.
10639 (i387_fsave_to_cache): Doc fix.
10640 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10641
10642 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10643
10644 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10645 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10646
10647 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10648
10649 * configure.srv (arm*-*-mingw32ce*): Move near the other
10650 arm targets.
10651
10652 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10653
10654 * configure.ac: Add errno checking.
10655 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10656 sys/file.h and malloc.h.
10657 (AC_CHECK_DECLS): Add perror.
10658 (srv_mingwce): Handle.
10659 * configure.srv (i[34567]86-*-cygwin*): Add
10660 win32-i386-low.o to srv_tgtobj.
10661 (i[34567]86-*-mingw*): Likewise.
10662 (arm*-*-mingw32ce*): Add case.
10663 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10664 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10665 [__MINGW32CE__] (strerror): New function.
10666 [__MINGW32CE__] (errno): Define to GetLastError.
10667 [__MINGW32CE__] (COUNTOF): New macro.
10668 (remote_open): Remove extra close call.
10669 * mem-break.c (delete_breakpoint_at): New function.
10670 * mem-break.h (delete_breakpoint_at): Declare.
10671 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10672 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10673 [USE_WIN32API] (read, write): Add char* casts.
10674 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10675 * server.h: Include wincecompat.h on Windows CE.
10676 [HAVE_ERRNO_H]: Check.
10677 (perror): Declare if not declared.
10678 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10679 (perror_with_name): Remove errno declaration.
10680 * wincecompat.h: New.
10681 * wincecompat.c: New.
10682 * win32-low.h: New.
10683 * win32-arm-low.c: New.
10684 * win32-i386-low.c: New.
10685 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10686 (OUTMSG2): Make it safe.
10687 (_T): New macro.
10688 (COUNTOF): New macro.
10689 (NUM_REGS): Get it from the low target.
10690 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10691 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10692 (thread_rec): Let low target handle debug registers.
10693 (child_add_thread): Likewise.
10694 (child_init_thread_list): Likewise.
10695 (continue_one_thread): Likewise.
10696 (regptr): New.
10697 (do_child_fetch_inferior_registers): Move to ...
10698 * win32-i386-low.c: ... here, and rename to ...
10699 (do_fetch_inferior_registers): ... this.
10700 * win32-low.c (child_fetch_inferior_registers):
10701 Go through the low target.
10702 (do_child_store_inferior_registers): Use regptr.
10703 (strwinerror): New function.
10704 (win32_create_inferior): Handle Windows CE.
10705 Use strwinerror instead of strerror on Windows error
10706 codes. Add program to the error output.
10707 Don't close the main thread handle on Windows CE.
10708 (win32_attach): Use coredll.dll on Windows CE.
10709 (win32_kill): Close current process and current
10710 thread handles.
10711 (win32_detach): Use coredll.dll on Windows CE.
10712 (win32_resume): Let low target handle debug registers, and
10713 step request.
10714 (handle_exception): Add/Remove initial breakpoint. Avoid
10715 non-existant WSTOPSIG on Windows CE.
10716 (win32_read_inferior_memory): Cast to remove warning.
10717 (win32_arch_string): Go through the low target.
10718 (initialize_low): Call set_breakpoint_data with the low
10719 target's breakpoint.
10720 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10721 FOP_REGNUM, mappings): Move to ...
10722 * win32-i386-low.c: ... here.
10723 * win32-low.c (win32_thread_info): Move to ...
10724 * win32-low.h: ... here.
10725 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10726 win32-arm-low.c and wincecompat.c.
10727 (all:): Add $EXEEXT.
10728 (install-only:): Likewise.
10729 (gdbserver:): Likewise.
10730 (gdbreplay:): Likewise.
10731 * config.in: Regenerate.
10732 * configure: Regenerate.
10733
10734 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10735
10736 * win32-low.c: Rename typedef thread_info to
10737 win32_thread_info throughout.
10738
10739 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10740
10741 * win32-i386-low.c: Rename to ...
10742 * win32-low.c: ... this.
10743 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10744 * Makefile.in: Likewise.
10745
10746 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10747
10748 * remote-utils.c (monitor_output): Constify msg parameter.
10749 * server.h (monitor_output): Likewise.
10750 * win32-i386-low.c (handle_output_debug_string): New.
10751 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10752 handle_output_debug_string.
10753 (get_child_debug_event): Likewise.
10754
10755 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10756
10757 * server.c (main): Correct strtoul check.
10758
10759 2007-03-27 Jon Ringle <jon@ringle.org>
10760
10761 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10762
10763 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10764
10765 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10766
10767 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10768
10769 * terminal.h: Check HAVE_SGTTY_H.
10770
10771 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10772
10773 * remote-utils.c (remote_open): Print out the assigned port number.
10774
10775 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10776
10777 * remote-utils.c (monitor_output): New function.
10778 * server.c (debug_threads): Define here.
10779 (monitor_show_help): New function.
10780 (handle_query): Handle qRcmd.
10781 (main): Do not handle 'd' packet.
10782 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10783 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10784 of debug_threads.
10785
10786 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10787
10788 * Makefile.in (EXEEXT): New.
10789 (clean): Use $(EXEEXT).
10790
10791 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10792
10793 * target.h (target_ops): Rename send_signal to request_interrupt,
10794 and remove enum target_signal parameter.
10795 * linux-low.c (linux_request_interrupt): Rename from
10796 linux_send_signal, and always send SIGINT.
10797 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10798 and always send SIGINT.
10799 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10800 of send_signal.
10801 (input_interrupt): Likewise.
10802
10803 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10804
10805 * server.c (get_features_xml): Check if target implemented
10806 arch_string.
10807 * win32-i386-low.c (win32_arch_string): New.
10808 (win32_target_ops): Add win32_arch_string as arch_string member.
10809
10810 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10811
10812 * spu-low.c (spu_arch_string): New.
10813 (spu_target_ops): Add spu_arch_string.
10814
10815 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10816
10817 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10818 * configure.ac: Do not check for terminal.h.
10819 * configure, config.in: Regenerated.
10820
10821 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10822
10823 * Makefile.in (OBS): Add $(XML_BUILTIN).
10824 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10825 (clean): Update.
10826 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10827 (arm-with-iwmmxt.c): New.
10828 * config.in, configure: Regenerate.
10829 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10830 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10831 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10832 (arm*-*-linux*): Add iWMMXt and regset support.
10833 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10834 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10835 (arm_store_wmmxregset, target_regsets): New.
10836 * server.c (get_features_xml): Take annex argument. Check builtin
10837 XML documents.
10838 (handle_query): Handle multiple annexes.
10839
10840 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10841
10842 * remote-utils.c [USE_WIN32API] (read, write): Define.
10843 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10844 write.
10845
10846 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10847
10848 * linux-i386-low.c (the_low_target): Set arch_string.
10849 * linux-x86-64-low.c (the_low_target): Likewise.
10850 * linux-low.c (linux_arch_string): New.
10851 (linux_target_ops): Add it.
10852 * linux-low.h (struct linux_target_ops): Add arch_string.
10853 * server.c (write_qxfer_response): Use const void * for DATA.
10854 (get_features_xml): New.
10855 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10856 * target.h (struct target_ops): Add arch_string method.
10857
10858 2007-01-03 Denis Pilat <denis.pilat@st.com>
10859 Daniel Jacobowitz <dan@codesourcery.com>
10860
10861 * linux-low.c (linux_kill): Handle being called with no threads.
10862 * win32-i386-low.c (win32_kill): Likewise.
10863 (get_child_debug_event): Clear current_process_handle.
10864
10865 2006-12-30 Denis PILAT <denis.pilat@st.com>
10866 Daniel Jacobowitz <dan@codesourcery.com>
10867
10868 * remote-utils.c (remote_open): Check the type of specified
10869 serial port devices before opening them.
10870 * server.c (main): Kill the inferior if an error occurs during
10871 the first remote_open.
10872
10873 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10874
10875 * README: Update supported targets.
10876
10877 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10878
10879 * Makefile.in (clean): Remove reg-mips64.c.
10880 (reg-mips64.c, reg-mips64.o): New rules.
10881 * configure.srv: Handle mips64. Include regset support for mips.
10882 * linux-mips-low.c (union mips_register): New.
10883 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10884 (mips_breakpoint, mips_breakpoint_at): Use int.
10885 (mips_collect_register, mips_supply_register)
10886 (mips_collect_register_32bit, mips_supply_register_32bit)
10887 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10888 (mips_store_fpregset, target_regsets): New.
10889 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10890
10891 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10892
10893 * configure.srv: Add target "spu*-*-*".
10894 * Makefile.in (clean): Remove reg-spu.c.
10895 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10896 * spu-low.c: New file.
10897
10898 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10899
10900 * configure.ac: Correct td_thr_tls_get_addr test.
10901 * configure: Regenerated.
10902
10903 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10904
10905 * linux-low.c (linux_wait_for_event): Reformat. Use the
10906 pass_signals array.
10907 * remote-utils.c (decode_address_to_semicolon): New.
10908 * server.c (pass_signals, handle_general_set): New.
10909 (handle_query): Mention QPassSignals for qSupported.
10910 (main): Call handle_general_set.
10911 * server.h (pass_signals, decode_address_to_semicolon): New.
10912
10913 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10914
10915 * server.c (handle_query): Correct error handling for read_auxv.
10916
10917 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10918
10919 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10920 and srv_linux_thread_db to yes.
10921 * linux-s390-low.c (s390_fill_gregset): New function.
10922 (target_regsets): Define data structure.
10923
10924 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10925
10926 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10927 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10928 * config.in, configure: Regenerated.
10929 * inferiors.c (gdb_id_to_thread): New function.
10930 (gdb_id_to_thread_id): Use it.
10931 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10932 * linux-low.h (struct process_info): Add th member.
10933 (thread_db_get_tls_address): New prototype.
10934 * remote-utils.c (decode_address): Make non-static.
10935 * server.c (handle_query): Handle qGetTLSAddr.
10936 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10937 * target.h (struct target_ops): Add get_tls_address.
10938 * thread-db.c (maybe_attach_thread): Save the thread handle.
10939 (thread_db_get_tls_address): New.
10940
10941 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10942
10943 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10944 (linux_resume_one_process): Take a siginfo_t *. Update all
10945 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10946 (struct pending_signals): Add a siginfo_t.
10947 (linux_wait_for_process): Always set last_status.
10948 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10949 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10950 * linux-low.h (struct process_info): Add last_status.
10951
10952 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10953
10954 * remote-utils.c (try_rle): New function.
10955 (putpkt_binary): Use it.
10956
10957 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10958
10959 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10960 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10961 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10962 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10963 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10964 point registers.
10965
10966 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10967
10968 * server.c (terminal_fd): New variable.
10969 (old_foreground_pgrp): Likewise.
10970 (restore_old_foreground_pgrp): New function.
10971 (start_inferior): Record the terminal file descriptor in terminal_fd
10972 and its original foreground group in old_foreground_pgrp. Register
10973 restore_old_foreground_pgrp with atexit().
10974
10975 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10976
10977 * server.c (handle_query): Correct qPart to qXfer.
10978
10979 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10980
10981 * configure.ac: Check for more headers which are missing on
10982 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10983 * configure.srv: Add Cygwin and mingw32.
10984 * remote-utils.c: Don't include headers unconditionally which
10985 are missing on mingw32. Include <winsock.h> for mingw32.
10986 (remote_open): Adjust for mingw32 support. Flush
10987 standard error after writing to it.
10988 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10989 (unblock_async_io, enable_async_io, disable_async_io)
10990 (readchar, getpkt): Update for Winsock support.
10991 (prepare_resume_reply): Expect a protocol signal number.
10992 * server.c: Disable <sys/wait.h> on mingw32.
10993 (start_inferior): Adjust for mingw32 support. Flush
10994 standard error after writing to it.
10995 (attach_inferior): Likewise. Use protocol signal
10996 numbers.
10997 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10998 and names.
10999 * win32-i386-low.c: New file.
11000 * Makefile.in (XM_CLIBS): Set.
11001 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11002 (win32-i386-low.o): New dependency rule.
11003 * linux-low.c (linux_wait): Use target signal numbers.
11004 * target.h (struct target_ops): Doc fix.
11005 * server.h (target_signal_to_name): New prototype.
11006 * gdbreplay.c: Don't include headers unconditionally which
11007 are missing on mingw32. Include <winsock.h> for mingw32.
11008 (remote_close, remote_open): Adjust for Winsock support.
11009 * configure, config.in: Regenerated.
11010
11011 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11012
11013 * server.c (decode_xfer_read, write_qxfer_response): New.
11014 (handle_query): Take a packet length argument. Handle
11015 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11016 the qSupported response.
11017 (main): Update call to handle_query.
11018
11019 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11020
11021 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11022 (putpkt_binary): Renamed from putpkt and adjusted for binary
11023 data.
11024 (putpkt): New wrapper for putpkt_binary.
11025 (readchar): Don't mask off the high bit.
11026 (decode_X_packet): New function.
11027 * server.c (main): Call putpkt_binary if a handler sets the packet
11028 length. Save the length of the incoming packet. Handle 'X'.
11029 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11030
11031 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11032
11033 * server.c (handle_query): Handle qSupported.
11034
11035 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11036
11037 * remote-utils.c (all_symbols_looked_up): New variable.
11038 (look_up_one_symbol): Check it.
11039 * server.h (look_up_one_symbol): New declaration.
11040 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11041
11042 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11043
11044 * Makefile.in (linux-arm-low.o): Update dependencies.
11045 * linux-arm-low.c: Include "gdb_proc_service.h".
11046 (PTRACE_GET_THREAD_AREA): Define.
11047 (ps_get_thread_area): New function.
11048
11049 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11050
11051 * configure.srv (m68k*-*-uclinux*): New target.
11052 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11053 (linux_resume_one_process): Remove extraneous cast.
11054 (linux_read_offsets): New.
11055 (linux_target_op): Add linux_read_offsets on mmuless systems.
11056 * server.c (handle_query): Add qOffsets logic.
11057 * target.h (struct target_ops): Add read_offsets.
11058
11059 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11060
11061 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11062 (PTRACE_GET_THREAD_AREA): Define.
11063 (ps_get_thread_area): New function.
11064 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11065 (linux-x86-64-low.o): Update.
11066
11067 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11068
11069 * configure.ac: Remove checks for prfpregset_t.
11070 * gdb_proc_service.h: New file.
11071 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11072 new "gdb_proc_service.h".
11073 * proc-service.c: Likewise.
11074 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11075 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11076 * Makefile.in (gdb_proc_service_h): Updated.
11077 * configure, config.in: Regenerated.
11078
11079 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11080
11081 * remote-utils.c (prepare_resume_reply): Move declaration
11082 of gdb_id_from_wait to the top of the block.
11083
11084 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11085
11086 * linux-low.c (regsets_store_inferior_registers): Read the regset
11087 from the target before filling it.
11088
11089 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11090
11091 * server.c (attach_inferior): Return SIGTRAP for a successful
11092 attach.
11093
11094 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11095
11096 * Makefile.in (OBS): Add version.o.
11097 (STAGESTUFF): Delete.
11098 (version.o): Add dependencies.
11099 (version.c): Replace rule.
11100 (clean): Remove version.c.
11101 * server.c (gdbserver_version): New.
11102 (gdbserver_usage): Use printf.
11103 (main): Handle --version and --help.
11104 * server.h (version, host_name): Add declarations.
11105
11106 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11107
11108 * linux-arm-low.c:
11109 * linux-arm-low.c:
11110 * inferiors.c:
11111 * i387-fp.h:
11112 * i387-fp.c:
11113 * gdbreplay.c:
11114 * regcache.c:
11115 * proc-service.c:
11116 * mem-break.h:
11117 * mem-break.c:
11118 * linux-x86-64-low.c:
11119 * linux-sh-low.c:
11120 * linux-s390-low.c:
11121 * linux-ppc64-low.c:
11122 * linux-ppc-low.c:
11123 * linux-mips-low.c:
11124 * linux-m68k-low.c:
11125 * linux-m32r-low.c:
11126 * linux-low.h:
11127 * linux-low.c:
11128 * linux-ia64-low.c:
11129 * linux-i386-low.c:
11130 * linux-crisv32-low.c:
11131 * thread-db.c:
11132 * terminal.h:
11133 * target.h:
11134 * target.c:
11135 * server.h:
11136 * server.c:
11137 * remote-utils.c:
11138 * regcache.h:
11139 * utils.c:
11140 * Makefile.in:
11141 * configure.ac:
11142 * gdbserver.1: Add (C) after Copyright. Update the FSF
11143 address.
11144
11145 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11146
11147 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11148 (arm_breakpoint_at): Recognize both breakpoints.
11149 (the_low_target): Use the correct breakpoint instruction.
11150
11151 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11152
11153 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11154 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11155 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11156 (the_low_target): Update.
11157
11158 2005-10-25 Andreas Schwab <schwab@suse.de>
11159
11160 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11161
11162 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11163 (ia64_num_regs): Reduce to 462.
11164
11165 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11166
11167 * acinclude.m4: Correct quoting.
11168 * aclocal.m4: Regenerated.
11169
11170 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11171 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11172 (thread_db_init): Call thread_db_err_str.
11173 * configure.ac: Check for TD_VERSION.
11174 * config.in, configure: Regenerated.
11175
11176 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11177
11178 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11179
11180 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11181
11182 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11183 is not available. Define HAVE_PTRACE_GETREGS if it is.
11184 * config.in, configure: Regenerated.
11185 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11186 * linux-i386-low.c, linux-m68k-low.c: Update to use
11187 HAVE_PTRACE_GETREGS.
11188 * linux-low.c (regsets_fetch_inferior_registers)
11189 (regsets_store_inferior_registers): Only return 0 if we processed
11190 GENERAL_REGS.
11191 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11192 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11193
11194 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11195
11196 * inferiors.c (struct thread_info): Add gdb_id.
11197 (add_thread): Add gdb_id argument.
11198 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11199 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11200 calls to add_thread.
11201 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11202 * server.c (handle_query): Use thread_to_gdb_id.
11203 (handle_v_cont, main): Use gdb_id_to_thread_id.
11204 * server.h (add_thread): Update prototype.
11205 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11206 prototypes.
11207
11208 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11209
11210 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11211 left-padded registers.
11212 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11213 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11214
11215 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11216
11217 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11218 * configure: Regenerate.
11219 * config.in: Regenerate.
11220 * server.h (NEED_DECLARATION_STRERROR):
11221 Replace with !HAVE_DECL_STRERROR.
11222
11223 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11224
11225 * linux-low.c (linux_wait, linux_send_signal): Don't test
11226 an unsigned long variable for > 0 if it could be MAX_ULONG.
11227 * server.c (myresume): Likewise.
11228 * target.c (set_desired_inferior): Likewise.
11229
11230 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11231
11232 * configure.ac: Simplify and improve check for socklen_t.
11233 * configure, config.in: Regenerate.
11234
11235 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11236
11237 * acconfig.h: Remove.
11238 * configure.ac: Add a test for socklen_t. Use three-argument
11239 AC_DEFINE throughout.
11240 * config.in: Regenerated using autoheader 2.59.
11241 * configure: Regenerated.
11242
11243 * gdbreplay.c (socklen_t): Provide a default.
11244 (remote_open): Use socklen_t.
11245 * remote-utils.c (socklen_t): Provide a default.
11246 (remote_open): Use socklen_t.
11247 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11248 unsigned char.
11249
11250 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11251 char for buffers.
11252 * linux-low.c (linux_read_memory, linux_write_memory)
11253 (linux_read_auxv): Likewise.
11254 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11255 (check_mem_write): Likewise.
11256 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11257 Likewise.
11258 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11259 (registers_from_string, register_data): Likewise.
11260 * server.c (handle_query, main): Likewise.
11261 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11262 (decode_M_packet): Likewise.
11263 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11264 * target.h (struct target_ops): Update read_memory, write_memory,
11265 and read_auxv.
11266 (read_inferior_memory, write_inferior_memory): Update.
11267 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11268 to unsigned char *.
11269 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11270 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11271 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11272 linux-s390-low.c, linux-sh-low.c: Update for changes in
11273 read_inferior_memory and the_low_target->breakpoint.
11274
11275 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11276
11277 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11278 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11279 * configure.srv: Add powerpc64-*-linux*.
11280 * linux-ppc64-low.c: New file.
11281
11282 2005-05-23 Orjan Friberg <orjanf@axis.com>
11283
11284 * linux-cris-low.c: New file with support for CRIS.
11285 * linux-crisv32-low.c: Ditto for CRISv32.
11286 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11287 (clean): Add reg-cris.c and reg-crisv32.c.
11288 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11289 reg-crisv32.o, and reg-crisv32.c to make rules.
11290 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11291 recognized targets.
11292
11293 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11294
11295 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11296 of sizeof (PTRACE_XFER_TYPE).
11297 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11298
11299 2005-05-12 Orjan Friberg <orjanf@axis.com>
11300
11301 * target.h (struct target_ops): Add insert_watchpoint,
11302 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11303 pointers for hardware watchpoint support.
11304 * linux-low.h (struct linux_target_ops): Ditto.
11305 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11306 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11307 to linux_target_ops.
11308 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11309 reply packet.
11310 * server.c (main): Recognize 'Z' and 'z' packets.
11311
11312 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11313
11314 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11315 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11316 (the_low_target): Add new members.
11317
11318 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11319
11320 * proc-service.c (ps_lgetregs): Search all_processes instead of
11321 all_threads.
11322
11323 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11324
11325 * server.c (start_inferior): Change return type to int.
11326 (attach_inferior): Change sigptr to int *.
11327 (handle_v_cont, handle_v_requests): Change signal to int *.
11328 (main): Change signal to int.
11329
11330 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11331
11332 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11333 * configure.srv: Add m32r*-*-linux*.
11334 * linux-m32r-low.c: New file.
11335
11336 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11337
11338 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11339
11340 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11341
11342 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11343 Take unsigned long arguments for PIDs.
11344 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11345 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11346 (wait_for_sigstop, linux_resume_one_process)
11347 (regsets_fetch_inferior_registers, linux_send_signal)
11348 (linux_read_auxv): Likewise. Update the types of variables holding
11349 PIDs. Update format string specifiers.
11350 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11351 * remote-utils.c (prepare_resume_reply): Likewise.
11352 * server.c (cont_thread, general_thread, step_thread)
11353 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11354 unsigned long.
11355 (handle_query): Update format specifiers.
11356 (handle_v_cont, main): Use strtoul for thread IDs.
11357 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11358 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11359 (general_thread, step_thread, thread_from_wait)
11360 (old_thread_from_wait): Update.
11361 * target.h (struct thread_resume): Use unsigned long for THREAD.
11362 (struct target_ops): Use unsigned long for arguments to attach and
11363 thread_alive.
11364
11365 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11366
11367 * acinclude.m4: Include bfd/bfd.m4 directly.
11368 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11369 <agriffis@toolchain.org>.
11370 * aclocal.m4, configure: Regenerated.
11371
11372 2005-01-07 Andrew Cagney <cagney@gnu.org>
11373
11374 * configure.ac: Rename configure.in, require autoconf 2.59.
11375 * configure: Re-generate.
11376
11377 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11378
11379 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11380 LIBS when finished.
11381 * aclocal.m4: Regenerated.
11382 * configure: Regenerated.
11383
11384 2004-11-21 Andreas Schwab <schwab@suse.de>
11385
11386 * linux-m68k-low.c (m68k_num_gregs): Define.
11387 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11388 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11389 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11390 (m68k_breakpoint_at): New. Add to the_low_target.
11391
11392 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11393 srv_linux_thread_db to yes.
11394
11395 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11396
11397 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11398 (ARCH_SET_FS): Likewise.
11399 (ARCH_GET_FS): Likewise.
11400 (ARCH_GET_GS): Likewise.
11401
11402 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11403
11404 * linux-i386-low.c (ps_get_thread_area): New.
11405 * linux-x86-64-low.c (ps_get_thread_area): New.
11406 * linux-low.c: Include <sys/syscall.h>.
11407 (linux_kill_one_process): Don't kill the first thread here.
11408 (linux_kill): Kill the first thread here.
11409 (kill_lwp): New function.
11410 (send_sigstop, linux_send_signal): Use it.
11411 * proc-service.c: Clean up #ifdefs.
11412 (fpregset_info): Delete.
11413 (ps_lgetregs): Update and enable implementation.
11414 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11415 implementations.
11416 * remote-utils.c (struct sym_cache, symbol_cache): New.
11417 (input_interrupt): Print a clearer message.
11418 (async_io_enabled): New variable.
11419 (enable_async_io, disable_async_io): Use it. Update comments.
11420 (look_up_one_symbol): Use the symbol cache.
11421 * thread-db.c (thread_db_look_up_symbols): New function.
11422 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11423
11424 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11425
11426 * configure.in: Test for -rdynamic.
11427 * configure: Regenerated.
11428 * Makefile (INTERNAL_LDFLAGS): New.
11429 (gdbserver, gdbreplay): Use it.
11430
11431 2004-09-02 Andrew Cagney <cagney@gnu.org>
11432
11433 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11434
11435 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11436
11437 * linux-low.c (linux_wait): Clear all_processes list also.
11438
11439 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11440
11441 * linux-low.c: Include <errno.h>. Remove extern declaration of
11442 errno.
11443
11444 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11445
11446 * gdbreplay.c, server.h, utils.c: Update copyright years.
11447
11448 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11449
11450 * server.c (main): Print child status or termination signal from
11451 variable 'signal', not 'sig'.
11452
11453 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11454
11455 * linux-low.c (linux_read_memory): Change return type to
11456 int. Check for and return error from ptrace().
11457 * target.c (read_inferior_memory): Change return type to int. Pass
11458 back return status from the_target->read_memory().
11459 * target.h (struct target_ops): Adapt *read_memory() prototype.
11460 Update comment.
11461 (read_inferior_memory): Adapt prototype.
11462 * server.c (main): Return an error packet if
11463 read_inferior_memory() returns an error.
11464
11465 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11466
11467 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11468 Unify with other clean targets.
11469
11470 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11471
11472 * server.c (handle_v_cont): Call set_desired_inferior.
11473
11474 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11475
11476 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11477
11478 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11479
11480 * linux-low.c (linux_wait): Unblock async I/O.
11481 (linux_resume): Block and enable async I/O.
11482 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11483 * server.h (block_async_io, unblock_async_io): Add prototypes.
11484
11485 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11486
11487 * remote-utils.c (remote_open): Print a status notice after
11488 opening a TCP port.
11489 * server.c (attach_inferior): Print a status notice after
11490 attaching.
11491
11492 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11493
11494 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11495
11496 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11497
11498 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11499 error packet.
11500 * server.c, target.h: Update copyright years.
11501
11502 2004-02-25 Roland McGrath <roland@redhat.com>
11503
11504 * target.h (struct target_ops): New member `read_auxv'.
11505 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11506 * linux-low.c (linux_read_auxv): New function.
11507 (linux_target_ops): Initialize `read_auxv' member to that.
11508
11509 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11510
11511 Committed by Jim Blandy <jimb@redhat.com>.
11512
11513 * linux-s390-low.c (s390_num_regs): Update.
11514 (s390_regmap): Remove control registers. Use __s390x__ predefine
11515 instead of GPR_SIZE to distiguish s390 and s390x targets.
11516
11517 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11518
11519 * linux-low.c: Update copyright year.
11520 (check_removed_breakpoint): Clear pending_is_breakpoint.
11521 (linux_set_resume_request, linux_queue_one_thread)
11522 (resume_status_pending_p): New functions.
11523 (linux_continue_one_thread): Use process->resume.
11524 (linux_resume): Only resume threads if there are no pending events.
11525 * linux-low.h (struct process_info): Add resume request
11526 pointer.
11527
11528 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11529
11530 * regcache.c (new_register_cache): Clear the allocated register
11531 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11532
11533 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11534
11535 * linux-low.c (linux_resume): Take a struct thread_resume *
11536 argument.
11537 (linux_wait): Update call.
11538 (resume_ptr): New static variable.
11539 (linux_continue_one_thread): Renamed from
11540 linux_continue_one_process. Use resume_ptr.
11541 (linux_resume): Use linux_continue_one_thread.
11542 * server.c (handle_v_cont, handle_v_requests): New functions.
11543 (myresume): New function.
11544 (main): Handle 'v' case.
11545 * target.h (struct thread_resume): New type.
11546 (struct target_ops): Change argument of "resume" to struct
11547 thread_resume *.
11548 (myresume): Delete macro.
11549
11550 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11551
11552 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11553 (uninstall): Support DESTDIR.
11554
11555 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11556
11557 * configure.srv: Add xscale*linux copy of arm*linux entry.
11558
11559 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11560
11561 * linux-arm-low.c (arm_reinsert_addr): New function.
11562 (the_low_target): Add arm_reinsert_addr.
11563
11564 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11565
11566 * mem-break.c: Remove whitespace at end of file.
11567
11568 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11569
11570 * configure.in: Check whether we need to prototype strerror.
11571 * server.h: Optionally prototype strerror.
11572 * gdbreplay.c (perror_with_name): Use strerror.
11573 * linux-low.c (linux_attach_lwp): Use strerror.
11574 * utils.c (perror_with_name): Use strerror.
11575 * config.in, configure: Regenerated.
11576
11577 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11578
11579 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11580 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11581
11582 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11583
11584 * Makefile.in (SFILES): Update.
11585 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11586 low-sun3.c: Remove files.
11587
11588 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11589
11590 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11591 (linux_detach_one_process, linux_detach): New functions.
11592 (linux_target_ops): Add linux_detach.
11593 * server.c (main): Handle 'D' packet.
11594 * target.h (struct target_ops): Add "detach" member.
11595 (detach_inferior): Define.
11596
11597 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11598
11599 From Kelley Cook <kelleycook@wideopenwest.com>:
11600 * configure.srv: Accept i[34567]86 variants.
11601
11602 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11603
11604 * linux-low.c (linux_wait_for_event): Correct comment typos.
11605 (linux_resume_one_process): Call check_removed_breakpoint.
11606 (linux_send_signal): New function.
11607 (linux_target_ops): Add linux_send_signal.
11608 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11609 of kill.
11610 * target.h (struct target_ops): Add send_signal.
11611
11612 2003-05-29 Jim Blandy <jimb@redhat.com>
11613
11614 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11615 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11616 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11617 away part of the register's value.
11618
11619 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11620
11621 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11622 (linux_wait_for_event, linux_init_signals): Likewise.
11623
11624 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11625
11626 * configure.in: Check for stdlib.h.
11627 * configure: Regenerated.
11628 * config.in: Regenerated.
11629
11630 2003-01-04 Andreas Schwab <schwab@suse.de>
11631
11632 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11633
11634 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11635
11636 * Makefile.in: Remove obsolete code.
11637
11638 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11639
11640 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11641 defined(PT_FPR0_HI).
11642
11643 2002-11-17 Stuart Hughes <seh@zee2.com>
11644
11645 * linux-arm-low.c (arm_num_regs): Increase.
11646 (arm_regmap): Include status register.
11647
11648 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11649
11650 * linux-low.c (register_addr): Remove incorrect -1 check.
11651
11652 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11653
11654 * linux-low.c (linux_create_inferior): Call setpgid. Return
11655 the new PID.
11656 (unstopped_p, linux_signal_pid): Remove.
11657 (linux_target_ops): Remove linux_signal_pid.
11658 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11659 global instead of target method.
11660 * target.h (struct target_ops): Remove signal_pid. Update comment
11661 for create_inferior.
11662 * server.c (signal_pid): New variable.
11663 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11664 gdbserver. Set the child to be the foreground process group.
11665 (attach_inferior): Set signal_pid.
11666
11667 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11668
11669 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11670
11671 2002-08-20 Jim Blandy <jimb@redhat.com>
11672
11673 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11674 default for this.
11675
11676 2002-08-01 Andrew Cagney <cagney@redhat.com>
11677
11678 * Makefile.in: Make chill references obsolete.
11679
11680 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11681
11682 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11683 * configure: Regenerate.
11684 * config.in: Regenerate.
11685
11686 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11687
11688 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11689 (perror_with_name, remote_close, remote_open, expect, play): Static.
11690
11691 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11692
11693 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11694 byte offsets instead of an array of indexes.
11695 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11696
11697 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11698
11699 * regcache.c: Add comment.
11700
11701 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11702
11703 * thread-db.c: New file.
11704 * proc-service.c: New file.
11705 * acinclude.m4: New file.
11706 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11707 proc-service.o, and thread-db.o.
11708 (linux-low.o): Add USE_THREAD_DB.
11709 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11710 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11711 * aclocal.m4: Regenerated.
11712 * config.in: Regenerated.
11713 * configure: Regenerated.
11714 * configure.in: Check for proc_service.h, sys/procfs.h,
11715 thread_db.h, and linux/elf.h headrs.
11716 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11717 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11718 Check for -lthread_db and thread support.
11719 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11720 PowerPC, and SuperH.
11721 * i387-fp.c: Constify arguments.
11722 * i387-fp.h: Likewise.
11723 * inferiors.c: (struct thread_info): Renamed from
11724 `struct inferior_info'. Remove PID member. Use generic inferior
11725 list header. All uses updated.
11726 (inferiors, signal_pid): Removed.
11727 (all_threads): New variable.
11728 (get_thread): Define.
11729 (add_inferior_to_list): New function.
11730 (for_each_inferior): New function.
11731 (change_inferior_id): New function.
11732 (add_inferior): Removed.
11733 (remove_inferior): New function.
11734 (add_thread): New function.
11735 (free_one_thread): New function.
11736 (remove_thread): New function.
11737 (clear_inferiors): Use for_each_inferior and free_one_thread.
11738 (find_inferior): New function.
11739 (find_inferior_id): New function.
11740 (inferior_target_data): Update argument type.
11741 (set_inferior_target_data): Likewise.
11742 (inferior_regcache_data): Likewise.
11743 (set_inferior_regcache_data): Likewise.
11744 * linux-low.c (linux_bp_reinsert): Remove.
11745 (all_processes, stopping_threads, using_thrads)
11746 (struct pending_signals, debug_threads, pid_of): New.
11747 (inferior_pid): Replace with macro.
11748 (struct inferior_linux_data): Remove.
11749 (get_stop_pc, add_process): New functions.
11750 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11751 Use add_process and add_thread.
11752 (linux_attach_lwp): New function, based on old linux_attach. Use
11753 add_process and add_thread. Set stop_expected for new threads.
11754 (linux_attach): New function.
11755 (linux_kill_one_process): New function.
11756 (linux_kill): Kill all LWPs.
11757 (linux_thread_alive): Use find_inferior_id.
11758 (check_removed_breakpoints, status_pending_p): New functions.
11759 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11760 Update. Use WNOHANG. Wait for cloned processes also. Update process
11761 struct for the found process.
11762 (linux_wait_for_event): New function.
11763 (linux_wait): Use it. Support LWPs.
11764 (send_sigstop, wait_for_sigstop, stop_all_processes)
11765 (linux_resume_one_process, linux_continue_one_process): New functions.
11766 (linux_resume): Support LWPs.
11767 (REGISTER_RAW_SIZE): Remove.
11768 (fetch_register): Use register_size instead. Call supply_register.
11769 (usr_store_inferior_registers): Likewise. Call collect_register.
11770 Fix recursive case.
11771 (regsets_fetch_inferior_registers): Improve error message.
11772 (regsets_store_inferior_registers): Add debugging.
11773 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11774 (unstopped_p, linux_signal_pid): New functions.
11775 (linux_target_ops): Add linux_signal_pid.
11776 (linux_init_signals): New function.
11777 (initialize_low): Call it. Initialize using_threads.
11778 * regcache.c (inferior_regcache_data): Add valid
11779 flag.
11780 (get_regcache): Fetch registers lazily. Add fetch argument
11781 and update all callers.
11782 (regcache_invalidate_one, regcache_invalidate): New
11783 functions.
11784 (new_register_cache): Renamed from create_register_cache.
11785 Return the new regcache.
11786 (free_register_cache): Change argument to a void *.
11787 (registers_to_string, registers_from_string): Call get_regcache
11788 with fetch flag set.
11789 (register_data): Make static. Pass fetch flag to get_regcache.
11790 (supply_register): Call get_regcache with fetch flag clear.
11791 (collect_register): Call get_regcache with fetch flag set.
11792 (collect_register_as_string): New function.
11793 * regcache.h: Update.
11794 * remote-utils.c (putpkt): Flush after debug output and use
11795 stderr.
11796 Handle input interrupts while waiting for an ACK.
11797 (input_interrupt): Use signal_pid method.
11798 (getpkt): Flush after debug output and use stderr.
11799 (outreg): Use collect_register_as_string.
11800 (new_thread_notify, dead_thread_notify): New functions.
11801 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11802 and general_thread.
11803 (look_up_one_symbol): Flush after debug output.
11804 * server.c (step_thread, server_waiting): New variables.
11805 (start_inferior): Don't use signal_pid. Update call to mywait.
11806 (attach_inferior): Update call to mywait.
11807 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11808 (main): Don't fetch/store registers explicitly. Use
11809 set_desired_inferior. Support proposed ``Hs'' packet. Update
11810 calls to mywait.
11811 * server.h: Update.
11812 (struct inferior_list, struct_inferior_list_entry): New.
11813 * target.c (set_desired_inferior): New.
11814 (write_inferior_memory): Constify.
11815 (mywait): New function.
11816 * target.h: Update.
11817 (struct target_ops): New signal_pid method.
11818 (mywait): Removed macro, added prototype.
11819
11820 * linux-low.h (regset_func): Removed.
11821 (regset_fill_func, regset_store_func): New.
11822 (enum regset_type): New.
11823 (struct regset_info): Add type field. Use new operation types.
11824 (struct linux_target_ops): stop_pc renamed to get_pc.
11825 Add decr_pc_after_break and breakpoint_at.
11826 (get_process, get_thread_proess, get_process_thread)
11827 (strut process_info, all_processes, linux_attach_lwp)
11828 (thread_db_init): New.
11829
11830 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11831 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11832 (the_low_target): Add new members.
11833 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11834 (i386_store_fpxregset): Constify.
11835 (target_regsets): Add new kind identifier.
11836 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11837 (i386_set_pc): Add debugging.
11838 (i386_breakpoint_at): New function.
11839 (the_low_target): Add new members.
11840 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11841 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11842 (mips_breakpoint_at): New.
11843 (the_low_target): Add new members.
11844 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11845 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11846 (the_low_target): Add new members.
11847 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11848 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11849 (the_low_target): Add new members.
11850 * linux-x86-64-low.c (target_regsets): Add new kind
11851 identifier.
11852
11853 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11854
11855 From Martin Pool <mbp@samba.org>:
11856 * server.c (gdbserver_usage): New function.
11857 (main): Call it.
11858
11859 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11860
11861 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11862 stop_at -> stop_pc.
11863
11864 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11865
11866 * Makefile.in: Remove obsolete code.
11867
11868 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11869
11870 * linux-low.c (regsets_fetch_inferior_registers),
11871 (regsets_store_inferior_registers): Removed cast to int from
11872 ptrace() calls.
11873 * regcache.h: Added declaration of struct inferior_info.
11874
11875 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11876
11877 * inferiors.c (struct inferior_info): Add regcache_data.
11878 (add_inferior): Call create_register_cache.
11879 (clear_inferiors): Call free_register_cache.
11880 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11881 * regcache.c (struct inferior_regcache_data): New.
11882 (registers): Remove.
11883 (get_regcache): New function.
11884 (create_register_cache, free_register_cache): New functions.
11885 (set_register_cache): Don't initialize the register cache here.
11886 (registers_to_string, registers_from_string, register_data): Call
11887 get_regcache.
11888 * regcache.h: Add prototypes.
11889 * server.h: Likewise.
11890
11891 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11892
11893 * mem-break.c: New file.
11894 * mem-break.h: New file.
11895 * Makefile.in: Add mem-break.o rule; update server.h
11896 dependencies.
11897 * inferiors.c (struct inferior_info): Add target_data
11898 member.
11899 (clear_inferiors): Free target_data member if set.
11900 (inferior_target_data, set_inferior_target_data): New functions.
11901 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11902 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11903 * linux-low.c (linux_bp_reinsert): New variable.
11904 (struct inferior_linux_data): New.
11905 (linux_create_inferior): Use set_inferior_target_data.
11906 (linux_attach): Likewise. Call add_inferior.
11907 (linux_wait_for_one_inferior): New function.
11908 (linux_wait): Call it.
11909 (linux_write_memory): Add const.
11910 (initialize_low): Call set_breakpoint_data.
11911 * linux-low.h (struct linux_target_ops): Add breakpoint
11912 handling members.
11913 * server.c (attach_inferior): Remove extra add_inferior
11914 call.
11915 * server.h: Include mem-break.h. Update inferior.c
11916 prototypes.
11917 * target.c (read_inferior_memory)
11918 (write_inferior_memory): New functions.
11919 * target.h (read_inferior_memory)
11920 (write_inferior_memory): Change macros to prototypes.
11921 (struct target_ops): Update comments. Add const to write_memory
11922 definition.
11923
11924 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11925
11926 * linux-low.c (usr_store_inferior_registers): Support
11927 registers which are allowed to fail to store.
11928 * linux-low.h (linux_target_ops): Likewise.
11929 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11930 (ppc_cannot_store_register): FPSCR may not be storable.
11931
11932 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11933
11934 * server.h: Include <string.h> if HAVE_STRING_H.
11935 * ChangeLog: Correct paths in last ChangeLog entry.
11936
11937 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11938
11939 * linux-low.h: Remove obsolete prototypes.
11940 (struct linux_target_ops): New.
11941 (extern the_low_target): New.
11942 * linux-low.c (num_regs, regmap): Remove declarations.
11943 (register_addr): Use the_low_target explicitly.
11944 (fetch_register): Likewise.
11945 (usr_fetch_inferior_registers): Likewise.
11946 (usr_store_inferior_registers): Likewise.
11947 * linux-arm-low.c (num_regs): Remove.
11948 (arm_num_regs): Define.
11949 (arm_regmap): Renamed from regmap, made static.
11950 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11951 made static.
11952 (arm_cannot_store_register): Renamed from cannot_store_register,
11953 made static.
11954 (the_low_target): New.
11955 * linux-i386-low.c (num_regs): Remove.
11956 (i386_num_regs): Define.
11957 (i386_regmap): Renamed from regmap, made static.
11958 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11959 made static.
11960 (i386_cannot_store_register): Renamed from cannot_store_register,
11961 made static.
11962 (the_low_target): New.
11963 * linux-ia64-low.c (num_regs): Remove.
11964 (ia64_num_regs): Define.
11965 (ia64_regmap): Renamed from regmap, made static.
11966 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11967 made static.
11968 (ia64_cannot_store_register): Renamed from cannot_store_register,
11969 made static.
11970 (the_low_target): New.
11971 * linux-m68k-low.c (num_regs): Remove.
11972 (m68k_num_regs): Define.
11973 (m68k_regmap): Renamed from regmap, made static.
11974 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11975 made static.
11976 (m68k_cannot_store_register): Renamed from cannot_store_register,
11977 made static.
11978 (the_low_target): New.
11979 * linux-mips-low.c (num_regs): Remove.
11980 (mips_num_regs): Define.
11981 (mips_regmap): Renamed from regmap, made static.
11982 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11983 made static.
11984 (mips_cannot_store_register): Renamed from cannot_store_register,
11985 made static.
11986 (the_low_target): New.
11987 * linux-ppc-low.c (num_regs): Remove.
11988 (ppc_num_regs): Define.
11989 (ppc_regmap): Renamed from regmap, made static.
11990 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11991 made static.
11992 (ppc_cannot_store_register): Renamed from cannot_store_register,
11993 made static.
11994 (the_low_target): New.
11995 * linux-s390-low.c (num_regs): Remove.
11996 (s390_num_regs): Define.
11997 (s390_regmap): Renamed from regmap, made static.
11998 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11999 made static.
12000 (s390_cannot_store_register): Renamed from cannot_store_register,
12001 made static.
12002 (the_low_target): New.
12003 * linux-sh-low.c (num_regs): Remove.
12004 (sh_num_regs): Define.
12005 (sh_regmap): Renamed from regmap, made static.
12006 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12007 made static.
12008 (sh_cannot_store_register): Renamed from cannot_store_register,
12009 made static.
12010 (the_low_target): New.
12011 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12012 (the_low_target): New.
12013
12014 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12015
12016 * Makefile.in: Add stamp-h target.
12017 * configure.in: Create stamp-h.
12018 * configure: Regenerated.
12019
12020 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12021
12022 * inferiors.c: New file.
12023 * target.c: New file.
12024 * target.h: New file.
12025 * Makefile.in: Add target.o and inferiors.o. Update
12026 dependencies.
12027 * linux-low.c (inferior_pid): New static variable,
12028 moved from server.c.
12029 (linux_create_inferior): Renamed from create_inferior.
12030 Call add_inferior. Return 0 on success instead of a PID.
12031 (linux_attach): Renamed from myattach.
12032 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12033 (linux_thread_alive): Renamed from mythread_alive.
12034 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12035 child dies.
12036 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12037 (regsets_store_inferior_registers): Correct error message.
12038 Add missing ``return 0''.
12039 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12040 (linux_store_registers): Renamed from store_inferior_registers.
12041 (linux_read_memory): Renamed from read_inferior_memory.
12042 (linux_write_memory): Renamed from write_inferior_memory.
12043 (linux_target_ops): New structure.
12044 (initialize_low): Call set_target_ops ().
12045 * remote-utils.c (unhexify): New function.
12046 (hexify): New function.
12047 (input_interrupt): Send signals to ``signal_pid''.
12048 * server.c (inferior_pid): Remove.
12049 (start_inferior): Update create_inferior call.
12050 (attach_inferior): Call add_inferior.
12051 (handle_query): New function.
12052 (main): Call handle_query for `q' packets.
12053 * server.h: Include "target.h". Remove obsolete prototypes.
12054 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12055
12056 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12057
12058 * Makefile.in: Add WARN_CFLAGS. Update configury
12059 dependencies.
12060 * configure.in: Check for <string.h>
12061 * configure: Regenerate.
12062 * config.in: Regenerate.
12063 * gdbreplay.c: Include needed system headers.
12064 (remote_open): Remove strchr prototype.
12065 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12066 * regcache.c (supply_register): Change buf argument to const void *.
12067 (supply_register_by_name): Likewise.
12068 (collect_register): Change buf argument to void *.
12069 (collect_register_by_name): Likewise.
12070 * regcache.h: Add missing prototypes.
12071 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12072 * server.c (handle_query): New function.
12073 (attached): New static variable, moved out of main.
12074 (main): Quiet longjmp clobber warnings.
12075 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12076 * utils.c (error): Remove NORETURN.
12077 (fatal): Likewise.
This page took 0.340938 seconds and 4 git commands to generate.