gdbserver: Use debug_printf for debug output
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2016-11-23 Pedro Alves <palves@redhat.com>
2
3 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4 output.
5 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
6 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7 debug_printf and debug_flush for debug output.
8 * server.c (handle_general_set): Likewise.
9 * thread-db.c (try_thread_db_load): Use debug_printf for debug
10 output.
11
12 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
13
14 * Makefile.in (.c.o): Replace rule with ...
15 (%.o: %.c): ... this one.
16
17 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
18
19 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
20 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
21 make.
22 * configure.ac: Remove checks for the make program.
23 * configure: Re-generate.
24
25 2016-10-28 Pedro Alves <palves@redhat.com>
26
27 * Makefile.in (CXX_DIALECT): Get from configure.
28 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
29 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
30 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
31 * config.in: Regenerate.
32 * configure: Regenerate.
33
34 2016-10-27 Yao Qi <yao.qi@linaro.org>
35
36 * linux-low.c (linux_supports_range_stepping): Return true if
37 can_software_single_step return true.
38
39 2016-10-27 Yao Qi <yao.qi@linaro.org>
40
41 * inferiors.c (find_inferior_in_random): New function.
42 * inferiors.h (find_inferior_in_random): Declare.
43 * linux-low.c (linux_wait_for_event_filtered): Call
44 find_inferior_in_random instead of find_inferior.
45
46 2016-10-27 Yao Qi <yao.qi@linaro.org>
47
48 * linux-low.c (linux_wait_1): If single-step breakpoints are
49 inserted, remove them.
50
51 2016-10-26 Pedro Alves <palves@redhat.com>
52
53 * linux-low.c (handle_extended_wait): Link parent/child fork
54 threads.
55 (linux_wait_1): Unlink them.
56 (linux_set_resume_request): Ignore resume requests for
57 already-resumed and unhandled fork child threads.
58 * linux-low.h (struct lwp_info) <fork_relative>: New field.
59 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
60 New functions.
61 (handle_v_requests) <vCont>: Don't call require_running.
62 * server.h (in_queued_stop_replies): New declaration.
63
64 2016-10-24 Yao Qi <yao.qi@linaro.org>
65
66 PR server/20733
67 * linux-aarch64-low.c (append_insns): Cast the return value to
68 'uint32_t *'.
69
70 2016-10-10 Yao Qi <yao.qi@linaro.org>
71
72 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
73
74 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
75
76 * target.c (target_supports_multi_process): New function, moved
77 from...
78 * target.h (target_supports_multi_process): ... here. Remove
79 macro.
80
81 2016-10-05 Tom Tromey <tom@tromey.com>
82
83 PR remote/20655:
84 * tracepoint.c (handle_tracepoint_bkpts): Check
85 ipa_error_tracepoint, not ipa_stopping_tracepoint.
86
87 2016-10-05 Yao Qi <yao.qi@linaro.org>
88
89 * configure.srv: Update the path of arm-*.xml files.
90
91 2016-10-05 Terry Guo <terry.guo@arm.com>
92 Yao Qi <yao.qi@linaro.org>
93
94 * Makefile.in: Adjust the path of rules.
95 * configure.srv: Update the path of xml files.
96 * regformats/arm-with-iwmmxt.dat: Regenerated.
97 * regformats/arm-with-neon.dat: Likewise.
98 * regformats/arm-with-vfpv2.dat: Likewise.
99 * regformats/arm-with-vfpv3.dat Likewise.
100
101 2016-09-30 Yao Qi <yao.qi@linaro.org>
102
103 PR gdbserver/20627
104 * target.c (target_stop_and_wait): Don't call
105 target_continue_no_signal, use resume_stop instead.
106
107 2016-09-26 Yao Qi <yao.qi@linaro.org>
108
109 * linux-low.c (linux_wait_1): Call debug_exit.
110
111 2016-09-23 Pedro Alves <palves@redhat.com>
112
113 * Makefile.in (SFILES): Add common/new-op.c.
114 (OBS): Add common/new-op.o.
115 (new-op.o): New rule.
116
117 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
118
119 * .gitinore: Ignore more files.
120
121 2016-09-21 Yao Qi <yao.qi@linaro.org>
122
123 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
124 23.
125
126 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
127
128 * server.c (start_inferior): Call target_mourn_inferior instead of
129 mourn_inferior; pass ptid_t argument to it.
130 (resume): Likewise.
131 (handle_target_event): Likewise.
132 * target.c (target_mourn_inferior): New function.
133 * target.h (mourn_inferior): Delete macro.
134
135 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
136
137 * linux-low.c (lwp_is_stepping): New function.
138
139 2016-09-06 Carl Love <cel@us.ibm.com>
140
141 * server.c (start_inferior): Fixed comment, requested comment change
142 didn't get updated correctly. Removed reference to ptrace () call as
143 it is only true on Linux systems.
144
145 2016-09-06 Carl Love <cel@us.ibm.com>
146
147 * server.c (start_inferior): Do not call
148 function target_post_create_inferior () if the
149 inferior process has already exited.
150
151 2016-09-05 Pedro Alves <palves@redhat.com>
152
153 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
154 (COMPILE.pre, CC_LD): Use CXX directly.
155 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
156 * acinclude.m4: Don't include build-with-cxx.m4.
157 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
158 * configure: Regenerate.
159
160 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
161
162 PR gdb/19495
163 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
164 call writing data to own_buf.
165
166 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
167
168 * target.c (mywait): Call target_wait instead of
169 the_target->wait.
170 (target_wait): New function.
171
172 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
173
174 * server.c (start_inferior): New variable 'ptid'. Replace calls
175 to the_target->resume by target_continue{,_no_signal}, depending
176 on the case.
177 * target.c (target_stop_and_wait): Call target_continue_no_signal
178 instead of the_target->resume.
179 (target_continue): New function.
180
181 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
182
183 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
184
185 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
186
187 PR server/20491
188 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
189 ps_prochandle.
190 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
191 * linux-arm-low.c (ps_get_thread_area): Likewise.
192 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
193 * linux-m68k-low.c (ps_get_thread_area): Likewise.
194 * linux-mips-low.c (ps_get_thread_area): Likewise.
195 * linux-nios2-low.c (ps_get_thread_area): Likewise.
196 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
197 * linux-x86-low.c (ps_get_thread_area): Likewise.
198 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
199
200 2016-08-19 Pedro Alves <palves@redhat.com>
201
202 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
203
204 2016-08-19 Pedro Alves <palves@redhat.com>
205
206 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
207 comment. Use memcpy instead of casting through unsigned long.
208
209 2016-08-19 Pedro Alves <palves@redhat.com>
210
211 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
212 allocating around 0x80000000.
213
214 2016-08-19 Pedro Alves <palves@redhat.com>
215
216 PR gdb/20415
217 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
218 (x32-avx512-linux-ipa.o): New rules.
219 * configure.ac (x86_64-*-linux*): New x32 check.
220 * configure.srv (ipa_x32_linux_regobj): New.
221 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
222 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
223 descriptions.
224 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
225 descriptions.
226 * configure: Regenerate.
227
228 2016-08-09 Pedro Alves <palves@redhat.com>
229
230 PR gdb/18653
231 * Makefile.in (OBS): Add signals-state-save-restore.o.
232 (signals-state-save-restore.o): New rule.
233 * config.in: Regenerate.
234 * configure: Regenerate.
235 * linux-low.c: Include "signals-state-save-restore.h".
236 (linux_create_inferior): Call
237 restore_original_signals_state.
238 * server.c: Include "dispositions-save-restore.h".
239 (captured_main): Call save_original_signals_state.
240
241 2016-08-05 Pedro Alves <palves@redhat.com>
242
243 * configure: Regenerate.
244
245 2016-08-04 Yao Qi <yao.qi@linaro.org>
246
247 * linux-low.c (regsets_fetch_inferior_registers): Check
248 errno is ESRCH or not.
249
250 2016-08-02 Yao Qi <yao.qi@linaro.org>
251
252 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
253 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
254 (thread_db_load_search): Update.
255 (try_thread_db_load_1): Don't look for td_ta_event_addr,
256 td_ta_set_event and td_ta_event_getmsg.
257
258 2016-07-26 Pedro Alves <palves@redhat.com>
259
260 PR server/20414
261 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
262 of unsigned long for 64-bit registers and use uint32_t instead of
263 unsigned int for 32-bit registers.
264
265 2016-07-26 Pedro Alves <palves@redhat.com>
266
267 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
268 to 'ptrace'.
269
270 2016-07-21 Tom Tromey <tom@tromey.com>
271
272 * configure: Rebuild.
273
274 2016-07-21 Yao Qi <yao.qi@linaro.org>
275
276 * mem-break.c (find_gdb_breakpoint): Cast bp to
277 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
278
279 2016-07-21 Yao Qi <yao.qi@linaro.org>
280
281 * server.c (handle_v_requests): Support s and S actions
282 if target_supports_software_single_step return true.
283
284 2016-07-21 Yao Qi <yao.qi@linaro.org>
285
286 * linux-low.c (resume_stopped_resumed_lwps): If resume request
287 is resume_step, call maybe_hw_step.
288 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
289 and unstop them.
290 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
291 breakpoints or not.
292 (proceed_one_lwp): If resume request is resume_step, install
293 reinsert breakpoints and call maybe_hw_step.
294
295 2016-07-21 Yao Qi <yao.qi@linaro.org>
296
297 * linux-low.c (proceed_one_lwp): Declare.
298 (linux_resume_one_thread): Remove local variable 'step'.
299 Lift code enqueue signal. Call proceed_one_lwp instead of
300 linux_resume_one_lwp.
301
302 2016-07-21 Yao Qi <yao.qi@linaro.org>
303
304 * linux-low.c (linux_resume_one_thread): Call
305 enqueue_pending_signal.
306
307 2016-07-21 Yao Qi <yao.qi@linaro.org>
308
309 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
310 * inferiors.c (do_restore_current_thread_cleanup): New function.
311 (make_cleanup_restore_current_thread): Likewise.
312 * linux-low.c (install_software_single_step_breakpoints): Call
313 make_cleanup_restore_current_thread. Switch current_thread to
314 thread.
315
316 2016-07-21 Yao Qi <yao.qi@linaro.org>
317
318 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
319 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
320 (clone_one_breakpoint): Likewise.
321 (delete_reinsert_breakpoints): Change parameter to thread.
322 Callers updated.
323 (has_reinsert_breakpoints): Likewise.
324 (uninsert_reinsert_breakpoints): Likewise.
325 (reinsert_reinsert_breakpoints): Likewise.
326 * mem-break.h (set_reinsert_breakpoint): Update declaration.
327 (delete_reinsert_breakpoints): Likewise.
328 (reinsert_reinsert_breakpoints): Likewise.
329 (uninsert_reinsert_breakpoints): Likewise.
330 (has_reinsert_breakpoints): Likewise.
331
332 2016-07-21 Yao Qi <yao.qi@linaro.org>
333
334 * inferiors.c (get_thread_process): Make parameter const.
335 * inferiors.h (get_thread_process): Update declaration.
336 * mem-break.c (clone_all_breakpoints): Remove all parameters.
337 Add new parameters child_thread and parent_thread. Callers
338 updated.
339 * mem-break.h (clone_all_breakpoints): Update declaration.
340
341 2016-07-21 Yao Qi <yao.qi@linaro.org>
342
343 * mem-break.c (struct breakpoint) <cond_list>: Remove.
344 <command_list, handler>: Remove.
345 (struct gdb_breakpoint): New.
346 (struct other_breakpoint): New.
347 (struct reinsert_breakpoint): New.
348 (is_gdb_breakpoint): New function.
349 (any_persistent_commands): Update command_list if
350 is_gdb_breakpoint returns true.
351 (set_breakpoint): Create breakpoints according to their types.
352 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
353 (set_gdb_breakpoint_1): Likewise.
354 (set_gdb_breakpoint): Likewise.
355 (clear_breakpoint_conditions): Change parameter type to
356 'struct gdb_breakpoint *'.
357 (clear_breakpoint_commands): Likewise.
358 (clear_breakpoint_conditions_and_commands): Likewise.
359 (add_condition_to_breakpoint): Likewise.
360 (add_breakpoint_condition): Likewise.
361 (add_commands_to_breakpoint): Likewise.
362 (check_breakpoints): Check other_breakpoint.
363 (clone_one_breakpoint): Clone breakpopint according to its type.
364 * mem-break.h (struct gdb_breakpoint): Declare.
365 (set_gdb_breakpoint): Update declaration.
366 (clear_breakpoint_conditions_and_commands): Likewise.
367 (add_breakpoint_condition): Likewise.
368 (add_breakpoint_commands): Likewise.
369 * server.c (process_point_options): Change parameter type to
370 'struct gdb_breakpoint *'.
371
372 2016-07-21 Yao Qi <yao.qi@linaro.org>
373
374 * mem-break.c (set_breakpoint_at): Rename it to ...
375 (set_breakpoint_type_at): ... it.
376 (set_breakpoint_at): Call set_breakpoint_type_at.
377 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
378 * mem-break.h (set_breakpoint_at): Update comments.
379
380 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
381
382 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
383 to buf parameter.
384 (nios2_store_gregset): Likewise.
385
386 2016-07-01 Pedro Alves <palves@redhat.com>
387 Antoine Tremblay <antoine.tremblay@ericsson.com>
388
389 * linux-low.c: Change interface to take the target lwp_info
390 pointer directly and return void. Handle detaching from a zombie
391 thread.
392 (linux_detach_lwp_callback): New function.
393 (linux_detach): Detach from the leader thread after detaching from
394 the clone threads.
395
396 2016-06-28 Yao Qi <yao.qi@linaro.org>
397
398 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
399 for variable new_offset.
400 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
401 (aarch64_ftrace_insn_reloc_cb): Likewise.
402 (aarch64_ftrace_insn_reloc_tb): Likewise.
403 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
404 PRIx64 instead of PRIx32.
405
406 2016-06-28 Yao Qi <yao.qi@linaro.org>
407
408 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
409 (the_low_target): Install arm_get_syscall_trapinfo.
410
411 2016-06-28 Yao Qi <yao.qi@linaro.org>
412
413 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
414 function.
415 (the_low_target): Install aarch64_get_syscall_trapinfo.
416
417 2016-06-28 Yao Qi <yao.qi@linaro.org>
418
419 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
420 Callers updated.
421 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
422 Remove parameter sysno.
423 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
424 sysret.
425
426 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
427
428 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
429 (s390_emit_ne_goto): Likewise.
430 (s390_emit_lt_goto): Likewise.
431 (s390_emit_le_goto): Likewise.
432 (s390_emit_gt_goto): Likewise.
433 (s390_emit_ge_goto): Likewise.
434 (s390x_emit_eq_goto): Likewise.
435 (s390x_emit_ne_goto): Likewise.
436 (s390x_emit_lt_goto): Likewise.
437 (s390x_emit_le_goto): Likewise.
438 (s390x_emit_gt_goto): Likewise.
439 (s390x_emit_ge_goto): Likewise.
440 (s390_emit_ops_impl): Mark variable static.
441 (s390x_emit_ops): Likewise.
442
443 2016-06-17 Yao Qi <yao.qi@linaro.org>
444
445 * linux-low.c (handle_extended_wait): Call
446 uninsert_reinsert_breakpoints for the parent process. Remove
447 reinsert breakpoints from the child process. Reinsert them to
448 the parent process when vfork is done.
449 * mem-break.c (uninsert_reinsert_breakpoints): New function.
450 (reinsert_reinsert_breakpoints): New function.
451 * mem-break.h (uninsert_reinsert_breakpoints): Declare
452 (reinsert_reinsert_breakpoints): Declare.
453
454 2016-06-17 Yao Qi <yao.qi@linaro.org>
455
456 * linux-low.c (handle_extended_wait): If the parent is doing
457 step-over, remove the reinsert breakpoints from the forked child.
458
459 2016-06-17 Yao Qi <yao.qi@linaro.org>
460
461 * linux-low.c (unsuspend_all_lwps): Declare.
462 (linux_low_filter_event): If thread exited, call finish_step_over.
463 If step-over is finished, unsuspend other threads.
464
465 2016-06-17 Yao Qi <yao.qi@linaro.org>
466
467 * linux-low.c (linux_resume_one_lwp_throw): Assert
468 has_reinsert_breakpoints returns false.
469 * mem-break.c (delete_disabled_breakpoints): Assert
470 bp type isn't reinsert_breakpoint.
471
472 2016-06-17 Yao Qi <yao.qi@linaro.org>
473
474 * linux-low.c (maybe_hw_step): New function.
475 (linux_resume_one_lwp_throw): Call maybe_hw_step.
476 (finish_step_over): Switch current_thread to lwp temporarily,
477 and assert has_reinsert_breakpoints returns true.
478 (proceed_one_lwp): Call maybe_hw_step.
479 * mem-break.c (has_reinsert_breakpoints): New function.
480 * mem-break.h (has_reinsert_breakpoints): Declare.
481
482 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
483
484 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
485
486 2016-05-17 Yao Qi <yao.qi@linaro.org>
487
488 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
489 instead of find_inferior.
490
491 2016-05-05 Yao Qi <yao.qi@linaro.org>
492
493 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
494 Initialize res to zero.
495
496 2016-05-05 Yao Qi <yao.qi@linaro.org>
497
498 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
499 to uint32_t.
500
501 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
502
503 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
504 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
505 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
506
507 2016-04-28 Par Olsson <par.olsson@windriver.com>
508 Simon Marchi <simon.marchi@ericsson.com>
509
510 * tracepoint.c (write_inferior_int8): New function.
511 (cmd_qtenable_disable): Write enable flag using
512 write_inferior_int8.
513
514 2016-04-25 Yao Qi <yao.qi@linaro.org>
515
516 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
517 (need_step_over_p): Return zero if the LWP has pending signals
518 can be delivered on software single step target.
519
520 2016-04-25 Yao Qi <yao.qi@linaro.org>
521
522 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
523 return instead of error.
524
525 2016-04-22 Yao Qi <yao.qi@linaro.org>
526
527 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
528 to 23.
529
530 2016-04-22 Yao Qi <yao.qi@linaro.org>
531
532 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
533 signal when stepping over breakpoint with software single
534 step.
535
536 2016-04-21 Pedro Alves <palves@redhat.com>
537
538 * linux-s390-low.c (s390_collect_ptrace_register)
539 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
540 add casts.
541 (s390_check_regset): Use void * instead of gdb_byte *.
542
543 2016-04-20 Pedro Alves <palves@redhat.com>
544
545 * configure: Renegerate.
546
547 2016-04-20 Yao Qi <yao.qi@linaro.org>
548
549 * linux-aarch32-low.c: Include "arch/arm-linux.h".
550 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
551 number 16.
552 (arm_store_gregset): Likewise.
553
554 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
555
556 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
557 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
558 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
559 (amd64-avx-mpx-linux.c): New rules.
560 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
561 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
562 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
563 (srv_amd64_regobj): Add amd64-avx-mpx.o.
564 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
565 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
566 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
567 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
568 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
569 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
570 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
571 * linux-x86-low.c (x86_linux_read_description): Add case for
572 X86_XSTATE_AVX_MPX_MASK.
573 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
574 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
575 init_registers_i386_avx_mpx_linux.
576 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
577 (initialize_low_tracepoint): Call
578 init_registers_i386_avx_mpx_linux.
579 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
580 (initialize_low_tracepoint): Call
581 init_registers_amd64_avx_mpx_linux.
582 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
583 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
584 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
585 declarations.
586
587 2016-04-18 Pedro Alves <palves@redhat.com>
588
589 * configure: Regenerate.
590
591 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
592
593 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
594 (aarch64_emit_sub): Likewise.
595
596 2016-04-12 Pedro Alves <palves@redhat.com>
597
598 * utils.c (prepare_to_throw_exception): Delete.
599
600 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
601
602 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
603
604 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
605
606 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
607
608 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
609
610 * linux-aarch64-ipa.c: Add <elf.h> include.
611 * linux-ppc-ipa.c: Add <elf.h> include.
612 * linux-s390-ipa.c: Add <elf.h> include.
613
614 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
615
616 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
617 (get_raw_reg_ptr): Likewise.
618 (get_trace_state_variable_value_ptr): Likewise.
619 (set_trace_state_variable_value_ptr): Likewise.
620 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
621 char *.
622
623 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
624 Marcin Kościelnicki <koriakin@0x04.net>
625
626 PR/17221
627 * linux-ppc-low.c (emit_insns): New function.
628 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
629 (ppc_emit_prologue): New function.
630 (ppc_emit_epilogue): New function.
631 (ppc_emit_add): New function.
632 (ppc_emit_sub): New function.
633 (ppc_emit_mul): New function.
634 (ppc_emit_lsh): New function.
635 (ppc_emit_rsh_signed): New function.
636 (ppc_emit_rsh_unsigned): New function.
637 (ppc_emit_ext): New function.
638 (ppc_emit_zero_ext): New function.
639 (ppc_emit_log_not): New function.
640 (ppc_emit_bit_and): New function.
641 (ppc_emit_bit_or): New function.
642 (ppc_emit_bit_xor): New function.
643 (ppc_emit_bit_not): New function.
644 (ppc_emit_equal): New function.
645 (ppc_emit_less_signed): New function.
646 (ppc_emit_less_unsigned): New function.
647 (ppc_emit_ref): New function.
648 (ppc_emit_const): New function.
649 (ppc_emit_reg): New function.
650 (ppc_emit_pop): New function.
651 (ppc_emit_stack_flush): New function.
652 (ppc_emit_swap): New function.
653 (ppc_emit_stack_adjust): New function.
654 (ppc_emit_call): New function.
655 (ppc_emit_int_call_1): New function.
656 (ppc_emit_void_call_2): New function.
657 (ppc_emit_if_goto): New function.
658 (ppc_emit_goto): New function.
659 (ppc_emit_eq_goto): New function.
660 (ppc_emit_ne_goto): New function.
661 (ppc_emit_lt_goto): New function.
662 (ppc_emit_le_goto): New function.
663 (ppc_emit_gt_goto): New function.
664 (ppc_emit_ge_goto): New function.
665 (ppc_write_goto_address): New function.
666 (ppc_emit_ops_impl): New static variable.
667 (ppc64v1_emit_prologue): New function.
668 (ppc64v2_emit_prologue): New function.
669 (ppc64_emit_epilogue): New function.
670 (ppc64_emit_add): New function.
671 (ppc64_emit_sub): New function.
672 (ppc64_emit_mul): New function.
673 (ppc64_emit_lsh): New function.
674 (ppc64_emit_rsh_signed): New function.
675 (ppc64_emit_rsh_unsigned): New function.
676 (ppc64_emit_ext): New function.
677 (ppc64_emit_zero_ext): New function.
678 (ppc64_emit_log_not): New function.
679 (ppc64_emit_bit_and): New function.
680 (ppc64_emit_bit_or): New function.
681 (ppc64_emit_bit_xor): New function.
682 (ppc64_emit_bit_not): New function.
683 (ppc64_emit_equal): New function.
684 (ppc64_emit_less_signed): New function.
685 (ppc64_emit_less_unsigned): New function.
686 (ppc64_emit_ref): New function.
687 (ppc64_emit_const): New function.
688 (ppc64v1_emit_reg): New function.
689 (ppc64v2_emit_reg): New function.
690 (ppc64_emit_pop): New function.
691 (ppc64_emit_stack_flush): New function.
692 (ppc64_emit_swap): New function.
693 (ppc64v1_emit_call): New function.
694 (ppc64v2_emit_call): New function.
695 (ppc64v1_emit_int_call_1): New function.
696 (ppc64v2_emit_int_call_1): New function.
697 (ppc64v1_emit_void_call_2): New function.
698 (ppc64v2_emit_void_call_2): New function.
699 (ppc64_emit_if_goto): New function.
700 (ppc64_emit_eq_goto): New function.
701 (ppc64_emit_ne_goto): New function.
702 (ppc64_emit_lt_goto): New function.
703 (ppc64_emit_le_goto): New function.
704 (ppc64_emit_gt_goto): New function.
705 (ppc64_emit_ge_goto): New function.
706 (ppc64v1_emit_ops_impl): New static variable.
707 (ppc64v2_emit_ops_impl): New static variable.
708 (ppc_emit_ops): New function.
709 (linux_low_target): Wire in ppc_emit_ops.
710
711 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
712 Marcin Kościelnicki <koriakin@0x04.net>
713
714 PR/17221
715 * Makefile.in: Add powerpc-*-ipa.o
716 * configure.srv: Add ipa_obj for powerpc*-linux.
717 * linux-ppc-ipa.c: New file.
718 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
719 includes.
720 (PPC_FIELD): New macro.
721 (PPC_SEXT): New macro.
722 (PPC_OP6): New macro.
723 (PPC_BO): New macro.
724 (PPC_LI): New macro.
725 (PPC_BD): New macro.
726 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
727 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
728 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
729 (ppc_get_thread_area): New function.
730 (is_elfv2_inferior): New function.
731 (gen_ds_form): New function.
732 (GEN_STD): New macro.
733 (GEN_STDU): New macro.
734 (GEN_LD): New macro.
735 (GEN_LDU): New macro.
736 (gen_d_form): New function.
737 (GEN_ADDI): New macro.
738 (GEN_ADDIS): New macro.
739 (GEN_LI): New macro.
740 (GEN_LIS): New macro.
741 (GEN_ORI): New macro.
742 (GEN_ORIS): New macro.
743 (GEN_LWZ): New macro.
744 (GEN_STW): New macro.
745 (GEN_STWU): New macro.
746 (gen_xfx_form): New function.
747 (GEN_MFSPR): New macro.
748 (GEN_MTSPR): New macro.
749 (GEN_MFCR): New macro.
750 (GEN_MTCR): New macro.
751 (GEN_SYNC): New macro.
752 (GEN_LWSYNC): New macro.
753 (gen_x_form): New function.
754 (GEN_OR): New macro.
755 (GEN_MR): New macro.
756 (GEN_LWARX): New macro.
757 (GEN_STWCX): New macro.
758 (GEN_CMPW): New macro.
759 (gen_md_form): New function.
760 (GEN_RLDICL): New macro.
761 (GEN_RLDICR): New macro.
762 (gen_i_form): New function.
763 (GEN_B): New macro.
764 (GEN_BL): New macro.
765 (gen_b_form): New function.
766 (GEN_BNE): New macro.
767 (GEN_LOAD): New macro.
768 (GEN_STORE): New macro.
769 (gen_limm): New function.
770 (gen_atomic_xchg): New function.
771 (gen_call): New function.
772 (ppc_relocate_instruction): New function.
773 (ppc_install_fast_tracepoint_jump_pad): New function.
774 (ppc_get_min_fast_tracepoint_insn_len): New function.
775 (ppc_get_ipa_tdesc_idx): New function.
776 (the_low_target): Wire in the new functions.
777 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
778 tdescs.
779 * linux-ppc-tdesc.h: New file.
780
781 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
782
783 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
784 (alloc_jump_pad_buffer): New function.
785 * linux-amd64-ipa.c: Add <sys/mman.h> include.
786 (alloc_jump_pad_buffer): New function.
787 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
788 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
789 (alloc_jump_pad_buffer): New function.
790 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
791 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
792 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
793 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
794
795 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
796
797 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
798 * linux-amd64-ipa.c: Likewise.
799 * linux-i386-ipa.c: Likewise.
800 * linux-s390-ipa.c: Likewise.
801 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
802 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
803 set_trace_state_variable_value_ptr.
804 (struct ipa_sym_addresses): Likewise.
805 (symbol_list): Likewise.
806 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
807 accessing gdb_collect directly.
808 (gdb_collect_ptr_type): New typedef.
809 (get_raw_reg_ptr_type): New typedef.
810 (get_trace_state_variable_value_ptr_type): New typedef.
811 (set_trace_state_variable_value_ptr_type): New typedef.
812 (gdb_collect_ptr): New global.
813 (get_raw_reg_ptr): New global.
814 (get_trace_state_variable_value_ptr): New global.
815 (set_trace_state_variable_value_ptr): New global.
816 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
817 accessing get_raw_reg directly.
818 (get_get_tsv_func_addr): Likewise for
819 get_trace_state_variable_value_ptr.
820 (get_set_tsv_func_addr): Likewise for
821 set_trace_state_variable_value_ptr.
822 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
823
824 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
825
826 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
827
828 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
829
830 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
831 packets.
832 (relocate_instruction): Remove own_buf.
833 * server.c (own_buf): Make global.
834 (handle_v_requests): Make global.
835 * server.h (own_buf): New declaration.
836 (handle_v_requests): New prototype.
837
838 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
839
840 PR 18377
841 * linux-s390-low.c (add_insns): New function.
842 (s390_emit_prologue): New function.
843 (s390_emit_epilogue): New function.
844 (s390_emit_add): New function.
845 (s390_emit_sub): New function.
846 (s390_emit_mul): New function.
847 (s390_emit_lsh): New function.
848 (s390_emit_rsh_signed): New function.
849 (s390_emit_rsh_unsigned): New function.
850 (s390_emit_ext): New function.
851 (s390_emit_log_not): New function.
852 (s390_emit_bit_and): New function.
853 (s390_emit_bit_or): New function.
854 (s390_emit_bit_xor): New function.
855 (s390_emit_bit_not): New function.
856 (s390_emit_equal): New function.
857 (s390_emit_less_signed): New function.
858 (s390_emit_less_unsigned): New function.
859 (s390_emit_ref): New function.
860 (s390_emit_if_goto): New function.
861 (s390_emit_goto): New function.
862 (s390_write_goto_address): New function.
863 (s390_emit_litpool): New function.
864 (s390_emit_const): New function.
865 (s390_emit_call): New function.
866 (s390_emit_reg): New function.
867 (s390_emit_pop): New function.
868 (s390_emit_stack_flush): New function.
869 (s390_emit_zero_ext): New function.
870 (s390_emit_swap): New function.
871 (s390_emit_stack_adjust): New function.
872 (s390_emit_set_r2): New function.
873 (s390_emit_int_call_1): New function.
874 (s390_emit_void_call_2): New function.
875 (s390_emit_eq_goto): New function.
876 (s390_emit_ne_goto): New function.
877 (s390_emit_lt_goto): New function.
878 (s390_emit_le_goto): New function.
879 (s390_emit_gt_goto): New function.
880 (s390_emit_ge_goto): New function.
881 (s390x_emit_prologue): New function.
882 (s390x_emit_epilogue): New function.
883 (s390x_emit_add): New function.
884 (s390x_emit_sub): New function.
885 (s390x_emit_mul): New function.
886 (s390x_emit_lsh): New function.
887 (s390x_emit_rsh_signed): New function.
888 (s390x_emit_rsh_unsigned): New function.
889 (s390x_emit_ext): New function.
890 (s390x_emit_log_not): New function.
891 (s390x_emit_bit_and): New function.
892 (s390x_emit_bit_or): New function.
893 (s390x_emit_bit_xor): New function.
894 (s390x_emit_bit_not): New function.
895 (s390x_emit_equal): New function.
896 (s390x_emit_less_signed): New function.
897 (s390x_emit_less_unsigned): New function.
898 (s390x_emit_ref): New function.
899 (s390x_emit_if_goto): New function.
900 (s390x_emit_const): New function.
901 (s390x_emit_call): New function.
902 (s390x_emit_reg): New function.
903 (s390x_emit_pop): New function.
904 (s390x_emit_stack_flush): New function.
905 (s390x_emit_zero_ext): New function.
906 (s390x_emit_swap): New function.
907 (s390x_emit_stack_adjust): New function.
908 (s390x_emit_int_call_1): New function.
909 (s390x_emit_void_call_2): New function.
910 (s390x_emit_eq_goto): New function.
911 (s390x_emit_ne_goto): New function.
912 (s390x_emit_lt_goto): New function.
913 (s390x_emit_le_goto): New function.
914 (s390x_emit_gt_goto): New function.
915 (s390x_emit_ge_goto): New function.
916 (s390_emit_ops): New function.
917 (struct linux_target_ops): Fill in emit_ops hook.
918
919 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
920
921 PR 18377
922 * Makefile.in: Add s390 IPA files.
923 * configure.srv: Build IPA for s390.
924 * linux-s390-ipa.c: New file.
925 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
926 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
927 (tdesc_s390_linux32): Likewise.
928 (init_registers_s390_linux32v1): Likewise.
929 (tdesc_s390_linux32v1): Likewise.
930 (init_registers_s390_linux32v2): Likewise.
931 (tdesc_s390_linux32v2): Likewise.
932 (init_registers_s390_linux64): Likewise.
933 (tdesc_s390_linux64): Likewise.
934 (init_registers_s390_linux64v1): Likewise.
935 (tdesc_s390_linux64v1): Likewise.
936 (init_registers_s390_linux64v2): Likewise.
937 (tdesc_s390_linux64v2): Likewise.
938 (init_registers_s390_te_linux64): Likewise.
939 (tdesc_s390_te_linux64): Likewise.
940 (init_registers_s390_vx_linux64): Likewise.
941 (tdesc_s390_vx_linux64): Likewise.
942 (init_registers_s390_tevx_linux64): Likewise.
943 (tdesc_s390_tevx_linux64): Likewise.
944 (init_registers_s390x_linux64): Likewise.
945 (tdesc_s390x_linux64): Likewise.
946 (init_registers_s390x_linux64v1): Likewise.
947 (tdesc_s390x_linux64v1): Likewise.
948 (init_registers_s390x_linux64v2): Likewise.
949 (tdesc_s390x_linux64v2): Likewise.
950 (init_registers_s390x_te_linux64): Likewise.
951 (tdesc_s390x_te_linux64): Likewise.
952 (init_registers_s390x_vx_linux64): Likewise.
953 (tdesc_s390x_vx_linux64): Likewise.
954 (init_registers_s390x_tevx_linux64): Likewise.
955 (tdesc_s390x_tevx_linux64): Likewise.
956 (have_hwcap_s390_vx): New static variable.
957 (s390_arch_setup): Fill have_hwcap_s390_vx.
958 (s390_get_thread_area): New function.
959 (s390_ft_entry_gpr_esa): New const.
960 (s390_ft_entry_gpr_zarch): New const.
961 (s390_ft_entry_misc): New const.
962 (s390_ft_entry_fr): New const.
963 (s390_ft_entry_vr): New const.
964 (s390_ft_main_31): New const.
965 (s390_ft_main_64): New const.
966 (s390_ft_exit_fr): New const.
967 (s390_ft_exit_vr): New const.
968 (s390_ft_exit_misc): New const.
969 (s390_ft_exit_gpr_esa): New const.
970 (s390_ft_exit_gpr_zarch): New const.
971 (append_insns): New function.
972 (s390_relocate_instruction): New function.
973 (s390_install_fast_tracepoint_jump_pad): New function.
974 (s390_get_min_fast_tracepoint_insn_len): New function.
975 (s390_get_ipa_tdesc_idx): New function.
976 (struct linux_target_ops): Wire in the above functions.
977 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
978 * linux-s390-tdesc.h: New file.
979
980 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
981
982 * linux-s390-low.c (s390_supports_tracepoints): New function.
983 (struct linux_target_ops): Fill supports_tracepoints hook.
984
985 2016-03-18 Yao Qi <yao.qi@linaro.org>
986
987 * linux-low.c (lwp_signal_can_be_delivered): New function.
988 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
989
990 2016-03-18 Yao Qi <yao.qi@linaro.org>
991
992 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
993 0 if signal is enqueued. Remove 'signal' from one debugging
994 message. Move one debugging message to some lines below.
995 Remove code setting 'signal' to 0.
996
997 2016-03-18 Yao Qi <yao.qi@linaro.org>
998
999 * linux-low.c (linux_low_filter_event): Remove redundant
1000 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1001
1002 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1003
1004 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1005 (struct linux_target_ops): Wire in the above.
1006
1007 2016-03-03 Yao Qi <yao.qi@linaro.org>
1008
1009 * linux-low.c: Update comments to start_step_over.
1010
1011 2016-03-03 Yao Qi <yao.qi@linaro.org>
1012
1013 PR server/19736
1014 * linux-low.c (handle_extended_wait): Set child suspended
1015 if event_lwp->bp_reinsert isn't zero.
1016
1017 2016-03-02 Yao Qi <yao.qi@linaro.org>
1018
1019 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1020 enqueue_pending_signal.
1021
1022 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1023
1024 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1025 is actually loaded.
1026
1027 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1028
1029 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1030 (s390_regmap_3264) [!__s390x__]: New global.
1031 (s390_collect_ptrace_register): Skip map entries containing -1.
1032 (s390_supply_ptrace_register): Ditto.
1033 (s390_fill_gprs_high): New function.
1034 (s390_store_gprs_high): New function.
1035 (s390_regsets): Add NT_S390_HIGH_GPRS.
1036 (s390_get_hwcap): Enable on 31-bit.
1037 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1038 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1039 Detect NT_S390_HIGH_GPRS.
1040 (s390_usrregs_info_3264): Enable on 31-bit.
1041 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1042 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1043
1044 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1045
1046 PR gdb/13808
1047 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1048 * configure.srv: Ditto.
1049 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1050 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1051 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1052 (init_registers_amd64_linux): Remove prototype.
1053 (tdesc_amd64_linux): Remove declaration.
1054 (get_ipa_tdesc): New function.
1055 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1056 initialize remaining tdescs.
1057 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1058 (init_registers_i386_linux): Remove prototype.
1059 (tdesc_i386_linux): Remove declaration.
1060 (get_ipa_tdesc): New function.
1061 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1062 initialize remaining tdescs.
1063 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1064 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1065 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1066 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1067 (x86_get_ipa_tdesc_idx): New function.
1068 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1069 * linux-x86-tdesc.h: New file.
1070 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1071 (target_get_ipa_tdesc_idx): New macro.
1072 * tracepoint.c (ipa_tdesc_idx): New macro.
1073 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1074 (symbol_list): Add ipa_tdesc_idx.
1075 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1076 (ipa_tdesc): Remove.
1077 (ipa_tdesc_idx): New variable.
1078 (get_context_regcache): Use get_ipa_tdesc.
1079 (gdb_collect): Ditto.
1080 (gdb_probe): Ditto.
1081 * tracepoint.h (get_ipa_tdesc): New prototype.
1082 (ipa_tdesc): Remove.
1083
1084 2016-02-24 Pedro Alves <palves@redhat.com>
1085
1086 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1087 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1088 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1089 Factor out common code between the USE_SIGTRAP_SIGINFO and
1090 !USE_SIGTRAP_SIGINFO blocks.
1091 (linux_low_filter_event): Call save_stop_reason instead of
1092 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1093 Update comments.
1094 (linux_wait_1): Update comments.
1095
1096 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1097
1098 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1099 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1100 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1101 ppc_insert_point, ppc_remove_point.
1102
1103 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1104
1105 * linux-s390-low.c (s390_supports_z_point_type): New function.
1106 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1107
1108 2016-02-16 Yao Qi <yao.qi@linaro.org>
1109
1110 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1111 PC. Get pc from regcache_read_pc.
1112
1113 2016-02-12 Yao Qi <yao.qi@linaro.org>
1114
1115 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1116 or linux_get_pc_32bit.
1117 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1118
1119 2016-02-12 Yao Qi <yao.qi@linaro.org>
1120
1121 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1122 arm_linux_get_next_pcs_fixup.
1123
1124 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1125
1126 * tracepoint.c (x_tracepoint_action_download): Change
1127 write_inferior_data_ptr to write_inferior_data_pointer.
1128 (cmd_qtstart): Likewise.
1129 (write_inferior_data_ptr): Remove.
1130 (download_agent_expr): Change write_inferior_data_ptr to
1131 write_inferior_data_pointer.
1132 (download_tracepoint_1): Likewise.
1133 (download_tracepoint): Likewise.
1134 (download_trace_state_variables): Likewise.
1135
1136 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1137 Marcin Kościelnicki <koriakin@0x04.net>
1138
1139 * tracepoint.c (struct tracepoint_action_ops): Remove.
1140 (struct tracepoint_action): Remove ops.
1141 (m_tracepoint_action_download, r_tracepoint_action_download)
1142 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1143 size and offset accordingly.
1144 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1145 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1146 (tracepoint_action_send, tracepoint_action_download): New functions.
1147 Helpers for trace action handlers.
1148 (add_tracepoint_action): Remove setup actions ops.
1149 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1150
1151 2016-02-10 Yao Qi <yao.qi@linaro.org>
1152
1153 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1154
1155 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1156
1157 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1158 to AC_OUTPUT.
1159 * configure: Regenerate.
1160
1161 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1162
1163 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1164 void * to gdb_byte *.
1165 * linux-low.c (siginfo_fixup): Likewise.
1166 (linux_xfer_siginfo): Likewise.
1167 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1168 Likewise.
1169 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1170
1171 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1172
1173 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1174 to srv_tgtobj.
1175 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1176 to srv_tgtobj.
1177 * linux-x86-low.c [__x86_64__]: Include
1178 "nat/amd64-linux-siginfo.h".
1179 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1180 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1181 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1182 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1183 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1184 (cpt_si_fd, si_timerid, si_overrun): Move from
1185 nat/amd64-linux-siginfo.c.
1186 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1187
1188 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1189
1190 * server.c (skip_to_semicolon): Remove.
1191 (process_point_options): Use strchrnul instead of
1192 skip_to_semicolon.
1193
1194 2016-01-26 Yao Qi <yao.qi@linaro.org>
1195
1196 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1197 * linux-low.c (install_software_single_step_breakpoints): Don't
1198 call regcache_read_pc.
1199 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1200 argument pc.
1201
1202 2016-01-26 Yao Qi <yao.qi@linaro.org>
1203
1204 * linux-low.c (install_software_single_step_breakpoints): Call
1205 regcache_read_pc instead of get_pc.
1206
1207 2016-01-26 Yao Qi <yao.qi@linaro.org>
1208
1209 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1210 (unblock_async_io): Rename to ...
1211 (block_unblock_async_io): ... it. New function.
1212 (enable_async_io): Don't install SIGIO handler. Unblock it
1213 instead.
1214 (disable_async_io): Don't ignore SIGIO. Block it instead.
1215 (initialize_async_io): Install SIGIO handler. Don't call
1216 unblock_async_io.
1217
1218 2016-01-26 Yao Qi <yao.qi@linaro.org>
1219
1220 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1221 first character is '\003', call *the_target->request_interrupt.
1222
1223 2016-01-25 Yao Qi <yao.qi@linaro.org>
1224
1225 * remote-utils.c (new_thread_notify): Remove.
1226 (dead_thread_notify): Likewise.
1227 * remote-utils.h (new_thread_notify): Remove declaration.
1228 (dead_thread_notify): Likewise.
1229
1230 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1231
1232 * gdb.trace/pending.exp: Fix expected message on continue.
1233
1234 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1235
1236 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1237 it works properly on big-endian machines where sizeof (CORE_ADDR)
1238 != sizeof (void *).
1239
1240 2016-01-21 Pedro Alves <palves@redhat.com>
1241
1242 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1243 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1244 * configure: Regenerate.
1245
1246 2016-01-21 Yao Qi <yao.qi@linaro.org>
1247
1248 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1249 is_thumb and set it according to CPSR saved on the stack.
1250 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1251 arm_sigreturn_next_pc.
1252
1253 2016-01-18 Yao Qi <yao.qi@linaro.org>
1254
1255 * linux-low.c (linux_set_pc_64bit): New function.
1256 (linux_get_pc_64bit): New function.
1257 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1258 Declare.
1259 * linux-sparc-low.c (debug_threads): Remove declaration.
1260 (sparc_get_pc): Remove.
1261 (the_low_target): Use linux_get_pc_64bit instead of
1262 sparc_get_pc.
1263 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1264 (the_low_target): Use linux_get_pc_64bit and
1265 linux_set_pc_64bit.
1266
1267 2016-01-18 Yao Qi <yao.qi@linaro.org>
1268
1269 * linux-arm-low.c (debug_threads): Remove declaration.
1270 (arm_get_pc, arm_set_pc): Remove.
1271 (the_low_target): Use linux_get_pc_32bit and
1272 linux_set_pc_32bit.
1273 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1274 (the_low_target): Use linux_get_pc_32bit and
1275 linux_set_pc_32bit.
1276 * linux-cris-low.c (debug_threads): Remove declaration.
1277 (cris_get_pc, cris_set_pc,): Remove.
1278 (the_low_target): Use linux_get_pc_32bit and
1279 linux_set_pc_32bit.
1280 * linux-crisv32-low.c (debug_threads): Remove declaration.
1281 (cris_get_pc, cris_set_pc): Remove.
1282 (the_low_target): Use linux_get_pc_32bit and
1283 linux_set_pc_32bit.
1284 * linux-low.c: Include inttypes.h.
1285 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1286 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1287 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1288 (the_low_target): Use linux_get_pc_32bit and
1289 linux_set_pc_32bit.
1290 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1291 (the_low_target): Use linux_get_pc_32bit and
1292 linux_set_pc_32bit.
1293 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1294 (the_low_target): Use linux_get_pc_32bit and
1295 linux_set_pc_32bit.
1296 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1297 (the_low_target): Use linux_get_pc_32bit and
1298 linux_set_pc_32bit.
1299 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1300 (the_low_target): Use linux_get_pc_32bit and
1301 linux_set_pc_32bit.
1302
1303 2016-01-18 Gary Benson <gbenson@redhat.com>
1304
1305 * configure.ac (AC_FUNC_FORK): New check.
1306 * config.in: Regenerate.
1307 * configure: Likewise.
1308
1309 2016-01-14 Yao Qi <yao.qi@linaro.org>
1310
1311 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1312 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1313 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1314 arm_get_next_pcs_ctor.
1315
1316 2016-01-12 Josh Stone <jistone@redhat.com>
1317 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1318
1319 * inferiors.h: Include "gdb_vecs.h".
1320 (struct process_info): Add syscalls_to_catch.
1321 * inferiors.c (remove_process): Free syscalls_to_catch.
1322 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1323 syscall_return stops.
1324 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1325 * server.c (handle_general_set): Handle QCatchSyscalls.
1326 (handle_query): Report support for QCatchSyscalls.
1327 * target.h (struct target_ops): Add supports_catch_syscall.
1328 (target_supports_catch_syscall): New macro.
1329 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1330 (struct lwp_info): Add syscall_state.
1331 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1332 Maintain syscall_state and syscalls_to_catch across exec.
1333 (get_syscall_trapinfo): New function, proxy to the_low_target.
1334 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1335 (linux_low_filter_event): Toggle syscall_state entry/return for
1336 syscall traps, and set it ignored for all others.
1337 (gdb_catching_syscalls_p): New function.
1338 (gdb_catch_this_syscall_p): New function.
1339 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1340 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1341 (linux_supports_catch_syscall): New function.
1342 (linux_target_ops): Install it.
1343 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1344 (the_low_target): Install it.
1345
1346 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1347
1348 * acinclude.m4: Include new ../warning.m4 file.
1349 * configure: Regenerated.
1350 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1351
1352 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1353
1354 * ax.c (is_goto_target): Mark static.
1355 * linux-low.c (register_addr): Likewise.
1356 (linux_fetch_registers, linux_store_registers): Likewise.
1357 * mem-break.c (any_persistent_commands): Fix old prototype.
1358 (add_commands_to_breakpoint): Mark static.
1359 * regcache.c (find_register_by_name): Delete unused func.
1360 * remote-utils.c (hex_or_minus_one): Mark static.
1361 * server.c (monitor_show_help): Mark static.
1362 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1363 handle_v_requests): Likewise.
1364
1365 2016-01-12 Pedro Alves <palves@redhat.com>
1366
1367 Remove use of the registered trademark symbol throughout.
1368
1369 2016-01-08 Yao Qi <yao.qi@linaro.org>
1370
1371 * remote-utils.c (getpkt): If c is '\003', call target hook
1372 request_interrupt.
1373
1374 2016-01-06 Yao Qi <yao.qi@linaro.org>
1375
1376 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1377 linux-aarch32-low.c.
1378 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1379 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1380 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1381 (thumb2_breakpoint): Declare.
1382 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1383 linux-aarch32-low.h.
1384 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1385 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1386 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1387
1388 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1389
1390 * gdbreplay.c (gdbreplay_version): Change copyright year in
1391 version message.
1392 * server.c (gdbserver_version): Likewise.
1393
1394 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1395
1396 * server.c (crc32_table): Delete.
1397 (crc32): Use libiberty's xcrc32 function.
1398
1399 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1400
1401 * lynx-low.c (lynx_delete_thread_callback): New function.
1402 (lynx_mourn): Properly delete our process and all of its
1403 threads. Remove call to clear_inferiors.
1404
1405 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1406
1407 * target.c (thread_search_callback): Add check that
1408 the thread_stopped target callback is not NULL before
1409 calling it.
1410
1411 2015-12-21 Yao Qi <yao.qi@linaro.org>
1412
1413 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1414 arm breakpoint.
1415
1416 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1417
1418 * server.c (handle_query): Call target_supports_software_single_step.
1419
1420 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1421
1422 * linux-low.c (single_step): New function.
1423 (linux_resume_one_lwp_throw): Call single_step.
1424 (start_step_over): Likewise.
1425
1426 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1427
1428 * Makefile.in (SFILES): Append arch/arm-linux.c,
1429 arch/arm-get-next-pcs.c.
1430 (arm-linux.o): New rule.
1431 (arm-get-next-pcs.o): New rule.
1432 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1433 arm-linux.o.
1434 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1435 to linux-aarch32-low.c.
1436 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1437 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1438 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1439 (thumb2_breakpoint_len): Likewise.
1440 (arm_is_thumb_mode): Make non-static.
1441 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1442 from linux-aarch32-low.c.
1443 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1444 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1445 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1446 (thumb2_breakpoint_len): Likewise.
1447 (arm_is_thumb_mode): New declaration.
1448 * linux-arm-low.c: Include arch/arm-linux.h
1449 aarch/arm-get-next-pcs.h, sys/syscall.h.
1450 (get_next_pcs_ops): New struct.
1451 (get_next_pcs_addr_bits_remove): New function.
1452 (get_next_pcs_is_thumb): New function.
1453 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1454 (arm_sigreturn_next_pc): Likewise.
1455 (get_next_pcs_syscall_next_pc): Likewise.
1456 (arm_gdbserver_get_next_pcs): Likewise.
1457 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1458 Initialize.
1459 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1460 * server.h: Include gdb_vecs.h.
1461
1462 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1463
1464 * Makefile.in (SFILES): Append common/common-regcache.c.
1465 (OBS): Append common-regcache.o.
1466 (common-regcache.o): New rule.
1467 * regcache.c (init_register_cache): Initialize cache to
1468 REG_UNAVAILABLE.
1469 (regcache_raw_read_unsigned): New function.
1470 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1471 register_status enum.
1472
1473 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1474
1475 * linux-aarch64-low.c (the_low_targets): Rename
1476 breakpoint_reinsert_addr to get_next_pcs.
1477 * linux-arm-low.c (the_low_targets): Likewise.
1478 * linux-bfin-low.c (the_low_targets): Likewise.
1479 * linux-cris-low.c (the_low_targets): Likewise.
1480 * linux-crisv32-low.c (the_low_targets): Likewise.
1481 * linux-low.c (can_software_single_step): Likewise.
1482 (install_software_single_step_breakpoints): New function.
1483 (start_step_over): Use install_software_single_step_breakpoints.
1484 * linux-low.h: New CORE_ADDR vector.
1485 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1486 get_next_pcs.
1487 * linux-mips-low.c (the_low_targets): Likewise.
1488 * linux-nios2-low.c (the_low_targets): Likewise.
1489 * linux-sparc-low.c (the_low_targets): Likewise.
1490
1491 2015-12-17 Pedro Alves <palves@redhat.com>
1492
1493 * linux-low.c (linux_kill_one_lwp): Remove references to
1494 LinuxThreads.
1495 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1496 to 'kill'.
1497 (linux_init_signals): Delete.
1498 (initialize_low): Adjust.
1499 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1500
1501 2015-12-16 Pedro Alves <palves@redhat.com>
1502
1503 * configure.ac (compiler warning flags): When testing a
1504 -Wno-foo option, check whether -Wfoo works instead.
1505 * configure: Regenerate.
1506
1507 2015-12-11 Don Breazeal <donb@codesourcery.com>
1508
1509 * server.c (process_serial_event): Don't exit from gdbserver
1510 in remote mode if there are still active inferiors.
1511
1512 2015-12-11 Yao Qi <yao.qi@linaro.org>
1513
1514 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1515 arm_breakpoint_at if the process is 32-bit.
1516
1517 2015-12-11 Yao Qi <yao.qi@linaro.org>
1518
1519 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1520 arm breakpoint.
1521
1522 2015-12-07 Yao Qi <yao.qi@linaro.org>
1523
1524 * configure.srv: Append arm.o to srv_tgtobj for
1525 aarch64*-*-linux* target.
1526 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1527 from linux-arm-low.c.
1528 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1529 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1530 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1531 (thumb2_breakpoint_len): Likewise.
1532 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1533 (arm_breakpoint_kinds): Likewise.
1534 (arm_breakpoint_kind_from_pc): Likewise.
1535 (arm_sw_breakpoint_from_kind): Likewise.
1536 (arm_breakpoint_kind_from_current_state): Likewise.
1537 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1538 (arm_sw_breakpoint_from_kind): Declare.
1539 (arm_breakpoint_kind_from_current_state): Declare.
1540 (arm_breakpoint_at): Declare.
1541 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1542 arm_sw_breakpoint_from_kind if process is 32-bit.
1543 (aarch64_breakpoint_kind_from_pc): New function.
1544 (aarch64_breakpoint_kind_from_current_state): New function.
1545 (the_low_target): Initialize fields breakpoint_kind_from_pc
1546 and breakpoint_kind_from_current_state.
1547 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1548 linux-aarch32-low.c.
1549 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1550 (arm_breakpoint, arm_breakpoint_len): Likewise.
1551 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1552 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1553 (arm_is_thumb_mode): Likewise.
1554 (arm_breakpoint_at): Likewise.
1555 (arm_breakpoint_kind_from_pc): Likewise.
1556 (arm_sw_breakpoint_from_kind): Likewise.
1557 (arm_breakpoint_kind_from_current_state): Likewise.
1558
1559 Revert:
1560 2015-08-04 Yao Qi <yao.qi@linaro.org>
1561
1562 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1563 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1564 * server.c (extended_protocol): Remove "static".
1565 * server.h (extended_protocol): Declare it.
1566
1567 2015-12-04 Josh Stone <jistone@redhat.com>
1568
1569 * target.h (struct target_ops) <arch_setup>: Rename to ...
1570 (struct target_ops) <post_create_inferior>: ... this.
1571 (target_arch_setup): Rename to ...
1572 (target_post_create_inferior): ... this, calling post_create_inferior.
1573 * server.c (start_inferior): Update target_arch_setup calls to
1574 target_post_create_inferior.
1575 * linux-low.c (linux_low_ptrace_options): Forward declare.
1576 (linux_arch_setup): Update its comment for general use.
1577 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1578 (struct linux_target_ops): Use linux_post_create_inferior.
1579 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1580 to post_create_inferior.
1581 * nto-low.c (struct nto_target_ops): Likewise.
1582 * spu-low.c (struct spu_target_ops): Likewise.
1583 * win32-low.c (struct win32_target_ops): Likewise.
1584
1585 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1586
1587 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1588
1589 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1590
1591 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1592 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1593 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1594 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1595 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1596 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1597 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1598 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1599 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1600 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1601 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1602 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1603
1604 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1605
1606 * linux-low.c (linux_look_up_symbols): Don't call
1607 linux_supports_traceclone.
1608 * linux-low.h (thread_db_init): Remove use_events argument.
1609 * thread-db.c (thread_db_use_event): Remove global variable.
1610 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1611 (struct thread_db) <td_create_bp>: Remove field.
1612 (thread_db_create_event): Remove function.
1613 (thread_db_enable_reporting): Likewise.
1614 (find_one_thread): Don't check for thread_db_use_events.
1615 (attach_thread): Likewise.
1616 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1617 (try_thread_db_load_1): Don't check for thread_db_use_events.
1618 (thread_db_init): Remove use_events argument and thread events
1619 handling.
1620 (remove_thread_event_breakpoints): Remove function.
1621 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1622
1623 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1624
1625 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1626 New function.
1627 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1628 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1629 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1630 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1631 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1632 Initialize.
1633 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1634 New function.
1635 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1636 * linux-low.c (can_hardware_single_step): Use
1637 supports_hardware_single_step.
1638 (can_software_single_step): New function.
1639 (start_step_over): Call can_software_single_step.
1640 (linux_supports_hardware_single_step): New function.
1641 (struct target_ops) <supports_software_single_step>: Initialize.
1642 * linux-low.h (struct linux_target_ops)
1643 <supports_hardware_single_step>: Initialize.
1644 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1645 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1646 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1647 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1648 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1649 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1650 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1651 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1652 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1653 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1654 Initialize.
1655 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1656 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1657 Initialize.
1658 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1659 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1660 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1661 New function.
1662 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1663 * target.h (struct target_ops): <supports_software_single_step>:
1664 New field.
1665 (target_supports_software_single_step): New macro.
1666
1667 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1668
1669 * linux-low.c (linux_wait_1): Fix pc advance condition.
1670 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1671 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1672
1673 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1674
1675 * linux-arm-low.c (arm_is_thumb_mode): New function.
1676 (arm_breakpoint_at): Use arm_is_thumb_mode.
1677 (arm_breakpoint_kind_from_current_state): New function.
1678 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1679 Initialize.
1680 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1681 (linux_breakpoint_kind_from_current_state): New function.
1682 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1683 * linux-low.h (struct linux_target_ops)
1684 <breakpoint_kind_from_current_state>: New field.
1685 * target.h (struct target_ops): Likewise.
1686 (target_breakpoint_kind_from_current_state): New macro.
1687
1688 2015-11-30 Pedro Alves <palves@redhat.com>
1689
1690 * linux-low.c (linux_resume): Wake up the event loop before
1691 returning.
1692
1693 2015-11-30 Pedro Alves <palves@redhat.com>
1694
1695 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1696 check.
1697 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1698 to -1.
1699 * target.c (struct thread_search): New structure.
1700 (thread_search_callback): New function.
1701 (prev_general_thread): New global.
1702 (prepare_to_access_memory, done_accessing_memory): New functions.
1703 * target.h (prepare_to_access_memory, done_accessing_memory):
1704 Replace macros with function declarations.
1705
1706 2015-11-30 Pedro Alves <palves@redhat.com>
1707
1708 PR 14618
1709 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1710 report TARGET_WAITKIND_NO_RESUMED.
1711 * remote-utils.c (prepare_resume_reply): Handle
1712 TARGET_WAITKIND_NO_RESUMED.
1713 * server.c (report_no_resumed): New global.
1714 (handle_query) <qSupported>: Handle "no-resumed+". Report
1715 "no-resumed+" support.
1716 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1717 return error if the client doesn't support no-resumed events.
1718 (push_stop_notification): New function.
1719 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1720 events if the client supports them.
1721
1722 2015-11-30 Pedro Alves <palves@redhat.com>
1723
1724 * linux-low.c (thread_still_has_status_pending_p): Don't check
1725 vCont;t here.
1726 (lwp_resumed): New function.
1727 (status_pending_p_callback): Return early if the LWP is not
1728 supposed to be resumed.
1729
1730 2015-11-30 Pedro Alves <palves@redhat.com>
1731
1732 * linux-low.c (handle_extended_wait): Assert that the LWP's
1733 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1734 thread create events, leave the new child's status pending.
1735 (linux_low_filter_event): If GDB wants to hear about thread exit
1736 events, leave the LWP marked dead and don't delete it.
1737 (linux_wait_for_event_filtered): Don't check for thread exit.
1738 (filter_exit_event): New function.
1739 (linux_wait_1): Use it, when returning an exit event.
1740 (linux_resume_one_lwp_throw): Assert that the LWP's
1741 waitstatus is TARGET_WAITKIND_IGNORE.
1742 * remote-utils.c (prepare_resume_reply): Handle
1743 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1744 * server.c (report_thread_events): New global.
1745 (handle_general_set): Handle QThreadEvents.
1746 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1747 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1748 TARGET_WAITKIND_THREAD_EXITED.
1749 * server.h (report_thread_events): Declare.
1750
1751 2015-11-30 Pedro Alves <palves@redhat.com>
1752
1753 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1754 the thread's last_resume_kind was resume_stop.
1755
1756 2015-11-30 Pedro Alves <palves@redhat.com>
1757
1758 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1759 before returning.
1760
1761 2015-11-30 Pedro Alves <palves@redhat.com>
1762
1763 * server.c (handle_v_requests): Handle vCtrlC.
1764
1765 2015-11-30 Pedro Alves <palves@redhat.com>
1766
1767 * gdbthread.h (find_any_thread_of_pid): Declare.
1768 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1769 functions.
1770 * server.c (handle_query): If current_thread is NULL, look for
1771 another thread of the selected process.
1772
1773 2015-11-26 Daniel Colascione <dancol@dancol.org>
1774 Simon Marchi <simon.marchi@ericsson.com>
1775
1776 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1777 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1778 name in reply.
1779 * target.h (struct target_ops) <thread_name>: New field.
1780 (target_thread_name): New macro.
1781
1782 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1783
1784 * regcache.h (regcache_invalidate_pid): Add declaration.
1785 * regcache.c (regcache_invalidate_pid): New function, extracted
1786 from regcache_invalidate.
1787 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1788 Add trivial documentation comment.
1789 * lynx-low.c: Use regcache_invalidate_pid instead of
1790 regcache_invalidate.
1791
1792 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1793
1794 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1795 and Elf64_auxv_t if the target is Android.
1796
1797 2015-11-22 Doug Evans <xdje42@gmail.com>
1798
1799 * target.h: #include <sys/types.h>.
1800
1801 2015-11-19 Pedro Alves <palves@redhat.com>
1802
1803 * linux-low.c (linux_process_qsupported): Change prototype.
1804 Adjust.
1805 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1806 Change prototype.
1807 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1808 and adjust to loop over all features.
1809 * server.c (handle_query) <qSupported>: Adjust to call
1810 target_process_qsupported once, passing it a vector of unprocessed
1811 features.
1812 * target.h (struct target_ops) <process_qsupported>: Change
1813 prototype.
1814 (target_process_qsupported): Adjust.
1815
1816 2015-11-19 Pedro Alves <palves@redhat.com>
1817
1818 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1819 mode.
1820 * configure: Regenerate.
1821
1822 2015-11-19 Pedro Alves <palves@redhat.com>
1823
1824 * configure: Regenerate.
1825
1826 2015-11-19 Yao Qi <yao.qi@linaro.org>
1827
1828 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1829 type to uint32_t.
1830
1831 2015-11-19 Yao Qi <yao.qi@linaro.org>
1832
1833 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1834 (struct aarch64_operand): Move enum out.
1835
1836 2015-11-19 Yao Qi <yao.qi@linaro.org>
1837
1838 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1839 struct user_fpsimd_state *.
1840 (aarch64_store_fpregset): Likewise.
1841
1842 2015-11-19 Yao Qi <yao.qi@linaro.org>
1843
1844 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1845 struct user_pt_regs *.
1846 (aarch64_store_gregset): Likewise.
1847
1848 2015-11-18 Pedro Alves <palves@redhat.com>
1849
1850 * Makefile.in (all_object_files): Add $IPA_OBJS.
1851
1852 2015-11-17 Pedro Alves <palves@redhat.com>
1853
1854 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1855 GDB_SIGNAL_0 and gdb_signal_to_string.
1856
1857 2015-11-17 Pedro Alves <palves@redhat.com>
1858
1859 * win32-low.c (handle_output_debug_string): Remove parameter.
1860 (win32_kill): Remove our_status local and adjust call to
1861 handle_output_debug_string.
1862 (get_child_debug_event): Adjust call to
1863 handle_output_debug_string.
1864
1865 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1866
1867 * linux-mips-low.c (mips_fill_gregset): Add cast.
1868 (mips_store_gregset): Likewise.
1869 (mips_fill_fpregset): Likewise.
1870 (mips_store_fpregset): Likewise.
1871
1872 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1873
1874 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1875 priv.
1876
1877 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1878
1879 * linux-mips-low.c (mips_linux_new_thread): Change type of
1880 watch_type to enum target_hw_bp_type.
1881
1882 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1883
1884 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1885 Change return type to arm_hwbp_type.
1886
1887 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1888
1889 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1890 (arm_store_gregset): Likewise.
1891 * linux-arm-low.c (arm_get_hwcap): Likewise.
1892 (arm_read_description): Likewise.
1893
1894 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1895
1896 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1897
1898 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1899
1900 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1901 (ppc_fill_vsxregset): Likewise.
1902 (ppc_store_vsxregset): Likewise.
1903 (ppc_fill_vrregset): Likewise.
1904 (ppc_store_vrregset): Likewise.
1905 (ppc_fill_evrregset): Likewise.
1906 (ppc_store_evrregset): Likewise.
1907
1908 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1909
1910 * linux-ppc-low.c (ppc_usrregs_info): Remove
1911 forward-declaration.
1912 (ppc_arch_setup): Move lower in file.
1913
1914 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1915
1916 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1917 (ps_pdwrite): Likewise.
1918
1919 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1920
1921 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1922 to after assert checks.
1923
1924 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1925
1926 * proc-service.c (ps_pdread): Add/adjust casts.
1927 (ps_pdwrite): Add/adjust casts.
1928
1929 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1930
1931 * server.c (handle_search_memory_1): Cast return value of
1932 memmem.
1933
1934 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1935
1936 * server.c (write_qxfer_response): Change type of data to
1937 gdb_byte *.
1938
1939 2015-10-29 Pedro Alves <palves@redhat.com>
1940
1941 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1942
1943 2015-10-29 Pedro Alves <palves@redhat.com>
1944
1945 * tracepoint.c (clear_installed_tracepoints): Add casts.
1946
1947 2015-10-29 Pedro Alves <palves@redhat.com>
1948
1949 * server.c (handle_v_cont, process_serial_event): Add enum
1950 gdb_signal casts to signal parsing code.
1951
1952 2015-10-29 Pedro Alves <palves@redhat.com>
1953
1954 * linux-low.h (NULL_REGSET): Define.
1955 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1956 * linux-arm-low.c (arm_regsets): Likewise.
1957 * linux-crisv32-low.c (cris_regsets): Likewise.
1958 * linux-m68k-low.c (m68k_regsets): Likewise.
1959 * linux-mips-low.c (mips_regsets): Likewise.
1960 * linux-nios2-low.c (nios2_regsets): Likewise.
1961 * linux-ppc-low.c (ppc_regsets): Likewise.
1962 * linux-s390-low.c (s390_regsets): Likewise.
1963 * linux-sh-low.c (sh_regsets): Likewise.
1964 * linux-sparc-low.c (sparc_regsets): Likewise.
1965 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1966 * linux-tile-low.c (tile_regsets): Likewise.
1967 * linux-x86-low.c (x86_regsets): Likewise.
1968 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1969
1970 2015-10-29 Pedro Alves <palves@redhat.com>
1971
1972 * linux-low.h (NULL_REGSET): Define.
1973 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1974 * linux-arm-low.c (arm_regsets): Likewise.
1975 * linux-crisv32-low.c (cris_regsets): Likewise.
1976 * linux-m68k-low.c (m68k_regsets): Likewise.
1977 * linux-mips-low.c (mips_regsets): Likewise.
1978 * linux-nios2-low.c (nios2_regsets): Likewise.
1979 * linux-ppc-low.c (ppc_regsets): Likewise.
1980 * linux-s390-low.c (s390_regsets): Likewise.
1981 * linux-sh-low.c (sh_regsets): Likewise.
1982 * linux-sparc-low.c (sparc_regsets): Likewise.
1983 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1984 * linux-tile-low.c (tile_regsets): Likewise.
1985 * linux-x86-low.c (x86_regsets): Likewise.
1986 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1987
1988 2015-10-26 Doug Evans <dje@google.com>
1989
1990 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1991
1992 2015-10-26 Doug Evans <dje@google.com>
1993
1994 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1995
1996 2015-10-26 Doug Evans <dje@google.com>
1997
1998 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1999 for debug_printf.
2000 (attach_thread, find_new_threads_callback): Ditto.
2001
2002 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2003
2004 * mem-break.h (set_breakpoint_data): Remove.
2005
2006 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2007
2008 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2009 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2010 (initialize_low): Remove set_breakpoint_data call.
2011 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2012 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2013 (initialize_low): Remove set_breakpoint_data call.
2014 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2015 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2016 (initialize_low): Remove set_breakpoint_data call.
2017
2018 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2019
2020 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2021 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2022 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2023 * target.h (target_breakpoint_kind_from_pc): New macro.
2024
2025 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2026
2027 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2028 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2029 the default breakpoint kind.
2030
2031 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2032
2033 * linux-arm-low.c (arm_supports_z_point_type): Add software
2034 breakpoint support.
2035
2036 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2037
2038 * linux-arm-low.c: Refactor breakpoint definitions.
2039 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2040 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2041
2042 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2043
2044 * Makefile.in: Add arm.c/o.
2045 * configure.srv: Likewise.
2046 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2047 (arm_breakpoint_kind_from_pc): New function.
2048 (arm_sw_breakpoint_from_kind): Return proper kind.
2049 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2050
2051 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2052
2053 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2054 removal.
2055 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2056 (struct raw_breakpoint) <size>: Remove.
2057 (struct raw_breakpoint) <kind>: Add.
2058 (bp_size): New function.
2059 (bp_opcode): Likewise.
2060 (find_raw_breakpoint_at): Adjust for kind.
2061 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2062 (remove_memory_breakpoint): Adjust for kind call bp_size.
2063 (set_raw_breakpoint_at): Adjust for kind.
2064 (set_breakpoint): Likewise.
2065 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2066 (delete_raw_breakpoint): Adjust for kind.
2067 (delete_breakpoint): Likewise.
2068 (find_gdb_breakpoint): Likewise.
2069 (set_gdb_breakpoint_1): Likewise.
2070 (set_gdb_breakpoint): Likewise.
2071 (delete_gdb_breakpoint_1): Likewise.
2072 (delete_gdb_breakpoint): Likewise.
2073 (uninsert_raw_breakpoint): Likewise.
2074 (reinsert_raw_breakpoint): Likewise.
2075 (set_breakpoint_data): Remove.
2076 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2077 (check_mem_read): Adjust for kind call bp_size.
2078 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2079 (clone_one_breakpoint): Adjust for kind.
2080 * mem-break.h (set_gdb_breakpoint): Likewise.
2081 (delete_gdb_breakpoint): Likewise.
2082 * server.c (process_serial_event): Likewise.
2083
2084 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2085
2086 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2087 (struct linux_target_ops) <breakpoint>: Remove.
2088 (struct linux_target_ops) <breakpoint_len>: Remove.
2089 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2090 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2091 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2092 (arm_sw_breakpoint_from_kind): New function.
2093 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2094 (struct linux_target_ops) <breakpoint>: Remove.
2095 (struct linux_target_ops) <breakpoint_len>: Remove.
2096 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2097 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2098 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2099 (struct linux_target_ops) <breakpoint>: Remove.
2100 (struct linux_target_ops) <breakpoint_len>: Remove.
2101 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2102 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2103 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2104 (struct linux_target_ops) <breakpoint>: Remove.
2105 (struct linux_target_ops) <breakpoint_len>: Remove.
2106 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2107 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2108 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2109 and sw_breakpoint_from_kind to increment the pc.
2110 (linux_breakpoint_kind_from_pc): New function.
2111 (linux_sw_breakpoint_from_kind): New function.
2112 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2113 (initialize_low): Call breakpoint_kind_from_pc and
2114 sw_breakpoint_from_kind to replace breakpoint_data/len.
2115 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2116 New field.
2117 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2118 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2119 (struct linux_target_ops) <breakpoint>: Remove.
2120 (struct linux_target_ops) <breakpoint_len>: Remove.
2121 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2122 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2123 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2124 (struct linux_target_ops) <breakpoint>: Remove.
2125 (struct linux_target_ops) <breakpoint_len>: Remove.
2126 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2127 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2128 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2129 (struct linux_target_ops) <breakpoint>: Remove.
2130 (struct linux_target_ops) <breakpoint_len>: Remove.
2131 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2132 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2133 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2134 (struct linux_target_ops) <breakpoint>: Remove.
2135 (struct linux_target_ops) <breakpoint_len>: Remove.
2136 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2137 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2138 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2139 (struct linux_target_ops) <breakpoint>: Remove.
2140 (struct linux_target_ops) <breakpoint_len>: Remove.
2141 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2142 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2143 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2144 (struct linux_target_ops) <breakpoint>: Remove.
2145 (struct linux_target_ops) <breakpoint_len>: Remove.
2146 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2147 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2148 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2149 (struct linux_target_ops) <breakpoint>: Remove.
2150 (struct linux_target_ops) <breakpoint_len>: Remove.
2151 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2152 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2153 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2154 (struct linux_target_ops) <breakpoint>: Remove.
2155 (struct linux_target_ops) <breakpoint_len>: Remove.
2156 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2157 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2158 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2159 (struct linux_target_ops) <breakpoint>: Remove.
2160 (struct linux_target_ops) <breakpoint_len>: Remove.
2161 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2162 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2163 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2164 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2165 (struct linux_target_ops) <breakpoint>: Remove.
2166 (struct linux_target_ops) <breakpoint_len>: Remove.
2167 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2168 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2169 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2170 (struct linux_target_ops) <breakpoint>: Remove.
2171 (struct linux_target_ops) <breakpoint_len>: Remove.
2172 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2173 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2174
2175 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2176
2177 * linux-cris-low.c (cris_get_pc): Remove void arg.
2178
2179 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2180
2181 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2182 variable name.
2183
2184 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2185
2186 * inferiors.c (thread_pid_matches_callback): New function.
2187 (find_thread_process): New function.
2188 (remove_thread): Reset current_thread.
2189 (remove_process): Assert threads have been removed first.
2190
2191 2015-10-15 Yao Qi <yao.qi@linaro.org>
2192
2193 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2194 if it is 3.
2195 (aarch64_remove_point): Likewise.
2196 * regcache.c (regcache_register_size): New function.
2197
2198 2015-10-12 Yao Qi <yao.qi@linaro.org>
2199
2200 * linux-aarch64-low.c: Update all callers as emit_load_store
2201 is renamed to aarch64_emit_load_store.
2202
2203 2015-10-12 Yao Qi <yao.qi@linaro.org>
2204
2205 * linux-aarch64-low.c: Update all callers of function renaming
2206 from emit_insn to aarch64_emit_insn.
2207
2208 2015-10-12 Yao Qi <yao.qi@linaro.org>
2209
2210 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2211 arch/aarch64-insn.h.
2212 (struct aarch64_memory_operand): Likewise.
2213 (ENCODE): Likewise.
2214 (emit_insn): Move to arch/aarch64-insn.c.
2215 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2216 (emit_load_store): Move to arch/aarch64-insn.c.
2217 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2218 (can_encode_int32): Remove.
2219
2220 2015-10-12 Yao Qi <yao.qi@linaro.org>
2221
2222 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2223 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2224 (aarch64_relocate_instruction): Likewise.
2225 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2226 (struct aarch64_insn_visitor): Likewise.
2227
2228 2015-10-12 Yao Qi <yao.qi@linaro.org>
2229
2230 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2231 (struct aarch64_insn_visitor): New.
2232 (struct aarch64_insn_relocation_data): New.
2233 (aarch64_ftrace_insn_reloc_b): New function.
2234 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2235 (aarch64_ftrace_insn_reloc_cb): Likewise.
2236 (aarch64_ftrace_insn_reloc_tb): Likewise.
2237 (aarch64_ftrace_insn_reloc_adr): Likewise.
2238 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2239 (aarch64_ftrace_insn_reloc_others): Likewise.
2240 (visitor): New.
2241 (aarch64_relocate_instruction): Use visitor.
2242
2243 2015-10-12 Yao Qi <yao.qi@linaro.org>
2244
2245 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2246 int. Add argument buf.
2247 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2248 aarch64_relocate_instruction.
2249
2250 2015-10-12 Yao Qi <yao.qi@linaro.org>
2251
2252 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2253 argument insn. Remove local variable insn. Don't call
2254 target_read_uint32.
2255 (aarch64_install_fast_tracepoint_jump_pad): Call
2256 target_read_uint32.
2257
2258 2015-09-30 Yao Qi <yao.qi@linaro.org>
2259
2260 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2261 (emit_load_store_pair): Likewise.
2262
2263 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2264
2265 * dll.c (match_dll): Add cast(s).
2266 (unloaded_dll): Likewise.
2267 * linux-low.c (second_thread_of_pid_p): Likewise.
2268 (delete_lwp_callback): Likewise.
2269 (count_events_callback): Likewise.
2270 (select_event_lwp_callback): Likewise.
2271 (linux_set_resume_request): Likewise.
2272 * server.c (accumulate_file_name_length): Likewise.
2273 (emit_dll_description): Likewise.
2274 (handle_qxfer_threads_worker): Likewise.
2275 (visit_actioned_threads): Likewise.
2276 * thread-db.c (any_thread_of): Likewise.
2277 * tracepoint.c (same_process_p): Likewise.
2278 (match_blocktype): Likewise.
2279 (build_traceframe_info_xml): Likewise.
2280
2281 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2282
2283 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2284 assignment.
2285 (gdb_unparse_agent_expr): Likewise.
2286 * hostio.c (require_data): Likewise.
2287 (handle_pread): Likewise.
2288 * linux-low.c (disable_regset): Likewise.
2289 (fetch_register): Likewise.
2290 (store_register): Likewise.
2291 (get_dynamic): Likewise.
2292 (linux_qxfer_libraries_svr4): Likewise.
2293 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2294 (set_fast_tracepoint_jump): Likewise.
2295 (uninsert_fast_tracepoint_jumps_at): Likewise.
2296 (reinsert_fast_tracepoint_jumps_at): Likewise.
2297 (validate_inserted_breakpoint): Likewise.
2298 (clone_agent_expr): Likewise.
2299 * regcache.c (init_register_cache): Likewise.
2300 * remote-utils.c (putpkt_binary_1): Likewise.
2301 (decode_M_packet): Likewise.
2302 (decode_X_packet): Likewise.
2303 (look_up_one_symbol): Likewise.
2304 (relocate_instruction): Likewise.
2305 (monitor_output): Likewise.
2306 * server.c (handle_search_memory): Likewise.
2307 (handle_qxfer_exec_file): Likewise.
2308 (handle_qxfer_libraries): Likewise.
2309 (handle_qxfer): Likewise.
2310 (handle_query): Likewise.
2311 (handle_v_cont): Likewise.
2312 (handle_v_run): Likewise.
2313 (captured_main): Likewise.
2314 * target.c (write_inferior_memory): Likewise.
2315 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2316 * tracepoint.c (init_trace_buffer): Likewise.
2317 (add_tracepoint_action): Likewise.
2318 (add_traceframe): Likewise.
2319 (add_traceframe_block): Likewise.
2320 (cmd_qtdpsrc): Likewise.
2321 (cmd_qtdv): Likewise.
2322 (cmd_qtstatus): Likewise.
2323 (response_source): Likewise.
2324 (response_tsv): Likewise.
2325 (cmd_qtnotes): Likewise.
2326 (gdb_collect): Likewise.
2327 (initialize_tracepoint): Likewise.
2328
2329 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2330
2331 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2332 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2333 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2334 <NOP>: New.
2335 (enum aarch64_condition_codes): New enum.
2336 (w0): New static global.
2337 (fp): Likewise.
2338 (lr): Likewise.
2339 (struct aarch64_memory_operand) <type>: New
2340 MEMORY_OPERAND_POSTINDEX type.
2341 (postindex_memory_operand): New helper function.
2342 (emit_ret): New function.
2343 (emit_load_store_pair): New function, factored out of emit_stp
2344 with support for MEMORY_OPERAND_POSTINDEX.
2345 (emit_stp): Rewrite using emit_load_store_pair.
2346 (emit_ldp): New function.
2347 (emit_load_store): Likewise.
2348 (emit_ldr): Mention post-index instruction in comment.
2349 (emit_ldrh): New function.
2350 (emit_ldrb): New function.
2351 (emit_ldrsw): Mention post-index instruction in comment.
2352 (emit_str): Likewise.
2353 (emit_subs): New function.
2354 (emit_cmp): Likewise.
2355 (emit_and): Likewise.
2356 (emit_orr): Likewise.
2357 (emit_orn): Likewise.
2358 (emit_eor): Likewise.
2359 (emit_mvn): Likewise.
2360 (emit_lslv): Likewise.
2361 (emit_lsrv): Likewise.
2362 (emit_asrv): Likewise.
2363 (emit_mul): Likewise.
2364 (emit_sbfm): Likewise.
2365 (emit_sbfx): Likewise.
2366 (emit_ubfm): Likewise.
2367 (emit_ubfx): Likewise.
2368 (emit_csinc): Likewise.
2369 (emit_cset): Likewise.
2370 (emit_nop): Likewise.
2371 (emit_ops_insns): New helper function.
2372 (emit_pop): Likewise.
2373 (emit_push): Likewise.
2374 (aarch64_emit_prologue): New function.
2375 (aarch64_emit_epilogue): Likewise.
2376 (aarch64_emit_add): Likewise.
2377 (aarch64_emit_sub): Likewise.
2378 (aarch64_emit_mul): Likewise.
2379 (aarch64_emit_lsh): Likewise.
2380 (aarch64_emit_rsh_signed): Likewise.
2381 (aarch64_emit_rsh_unsigned): Likewise.
2382 (aarch64_emit_ext): Likewise.
2383 (aarch64_emit_log_not): Likewise.
2384 (aarch64_emit_bit_and): Likewise.
2385 (aarch64_emit_bit_or): Likewise.
2386 (aarch64_emit_bit_xor): Likewise.
2387 (aarch64_emit_bit_not): Likewise.
2388 (aarch64_emit_equal): Likewise.
2389 (aarch64_emit_less_signed): Likewise.
2390 (aarch64_emit_less_unsigned): Likewise.
2391 (aarch64_emit_ref): Likewise.
2392 (aarch64_emit_if_goto): Likewise.
2393 (aarch64_emit_goto): Likewise.
2394 (aarch64_write_goto_address): Likewise.
2395 (aarch64_emit_const): Likewise.
2396 (aarch64_emit_call): Likewise.
2397 (aarch64_emit_reg): Likewise.
2398 (aarch64_emit_pop): Likewise.
2399 (aarch64_emit_stack_flush): Likewise.
2400 (aarch64_emit_zero_ext): Likewise.
2401 (aarch64_emit_swap): Likewise.
2402 (aarch64_emit_stack_adjust): Likewise.
2403 (aarch64_emit_int_call_1): Likewise.
2404 (aarch64_emit_void_call_2): Likewise.
2405 (aarch64_emit_eq_goto): Likewise.
2406 (aarch64_emit_ne_goto): Likewise.
2407 (aarch64_emit_lt_goto): Likewise.
2408 (aarch64_emit_le_goto): Likewise.
2409 (aarch64_emit_gt_goto): Likewise.
2410 (aarch64_emit_ge_got): Likewise.
2411 (aarch64_emit_ops_impl): New static global variable.
2412 (aarch64_emit_ops): New target function, return
2413 &aarch64_emit_ops_impl.
2414 (struct linux_target_ops): Install it.
2415
2416 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2417
2418 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2419 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2420 aarch64-ipa.o.
2421 * linux-aarch64-ipa.c: New file.
2422 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2423 and endian.h.
2424 (aarch64_get_thread_area): New target method.
2425 (extract_signed_bitfield): New helper function.
2426 (aarch64_decode_ldr_literal): New function.
2427 (enum aarch64_opcodes): New enum.
2428 (struct aarch64_register): New struct.
2429 (struct aarch64_operand): New struct.
2430 (x0): New static global.
2431 (x1): Likewise.
2432 (x2): Likewise.
2433 (x3): Likewise.
2434 (x4): Likewise.
2435 (w2): Likewise.
2436 (ip0): Likewise.
2437 (sp): Likewise.
2438 (xzr): Likewise.
2439 (aarch64_register): New helper function.
2440 (register_operand): Likewise.
2441 (immediate_operand): Likewise.
2442 (struct aarch64_memory_operand): New struct.
2443 (offset_memory_operand): New helper function.
2444 (preindex_memory_operand): Likewise.
2445 (enum aarch64_system_control_registers): New enum.
2446 (ENCODE): New macro.
2447 (emit_insn): New helper function.
2448 (emit_b): New function.
2449 (emit_bcond): Likewise.
2450 (emit_cb): Likewise.
2451 (emit_tb): Likewise.
2452 (emit_blr): Likewise.
2453 (emit_stp): Likewise.
2454 (emit_ldp_q_offset): Likewise.
2455 (emit_stp_q_offset): Likewise.
2456 (emit_load_store): Likewise.
2457 (emit_ldr): Likewise.
2458 (emit_ldrsw): Likewise.
2459 (emit_str): Likewise.
2460 (emit_ldaxr): Likewise.
2461 (emit_stxr): Likewise.
2462 (emit_stlr): Likewise.
2463 (emit_data_processing_reg): Likewise.
2464 (emit_data_processing): Likewise.
2465 (emit_add): Likewise.
2466 (emit_sub): Likewise.
2467 (emit_mov): Likewise.
2468 (emit_movk): Likewise.
2469 (emit_mov_addr): Likewise.
2470 (emit_mrs): Likewise.
2471 (emit_msr): Likewise.
2472 (emit_sevl): Likewise.
2473 (emit_wfe): Likewise.
2474 (append_insns): Likewise.
2475 (can_encode_int32_in): New helper function.
2476 (aarch64_relocate_instruction): New function.
2477 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2478 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2479 (struct linux_target_ops): Install aarch64_get_thread_area,
2480 aarch64_install_fast_tracepoint_jump_pad and
2481 aarch64_get_min_fast_tracepoint_insn_len.
2482
2483 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2484
2485 * Makefile.in (aarch64-insn.o): New rule.
2486 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2487
2488 2015-09-21 Yao Qi <yao.qi@linaro.org>
2489
2490 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2491
2492 2015-09-21 Yao Qi <yao.qi@linaro.org>
2493
2494 * tracepoint.c (max_jump_pad_size): Remove.
2495
2496 2015-09-18 Yao Qi <yao.qi@linaro.org>
2497
2498 * linux-aarch64-low.c: Don't include sys/uio.h.
2499 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2500
2501 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2502
2503 * tracepoint.c (eval_result_type): Change prototype.
2504 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2505
2506 2015-09-15 Pedro Alves <palves@redhat.com>
2507
2508 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2509 Check whether to report exec events instead of checking whether
2510 multiprocess is enabled.
2511
2512 2015-09-15 Pedro Alves <palves@redhat.com>
2513
2514 PR remote/18965
2515 * remote-utils.c (prepare_resume_reply): Merge
2516 TARGET_WAITKIND_VFORK_DONE switch case with the
2517 TARGET_WAITKIND_FORKED case.
2518
2519 2015-09-15 Yao Qi <yao.qi@linaro.org>
2520
2521 * server.c (handle_query): Check string comparison using
2522 "else if" instead of "if".
2523
2524 2015-09-15 Yao Qi <yao.qi@linaro.org>
2525
2526 * server.c (vCont_supported): New global variable.
2527 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2528 matches. Append ";vContSupported+" to own_buf.
2529 (handle_v_requests): Append ";s;S" to own_buf if target supports
2530 hardware single step or vCont_supported is false.
2531 (capture_main): Set vCont_supported to zero.
2532
2533 2015-09-15 Yao Qi <yao.qi@linaro.org>
2534
2535 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2536 it to ...
2537 (linux_supports_hardware_single_step): ... New function.
2538 (linux_target_ops): Update.
2539 * lynx-low.c (lynx_target_ops): Set field
2540 supports_hardware_single_step to target_can_do_hardware_single_step.
2541 * nto-low.c (nto_target_ops): Likewise.
2542 * spu-low.c (spu_target_ops): Likewise.
2543 * win32-low.c (win32_target_ops): Likewise.
2544 * target.c (target_can_do_hardware_single_step): New function.
2545 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2546 Remove. <supports_hardware_single_step>: New field.
2547 (target_supports_conditional_breakpoints): Remove.
2548 (target_supports_hardware_single_step): New macro.
2549 (target_can_do_hardware_single_step): Declare.
2550 * server.c (handle_query): Use target_supports_hardware_single_step
2551 instead of target_supports_conditional_breakpoints.
2552
2553 2015-09-15 Yao Qi <yao.qi@linaro.org>
2554
2555 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2556 function.
2557 (struct linux_target_ops the_low_target): Install
2558 aarch64_linux_siginfo_fixup.
2559
2560 2015-09-11 Don Breazeal <donb@codesourcery.com>
2561 Luis Machado <lgustavo@codesourcery.com>
2562
2563 * linux-low.c (linux_mourn): Static declaration.
2564 (linux_arch_setup): Move in front of
2565 handle_extended_wait.
2566 (linux_arch_setup_thread): New function.
2567 (handle_extended_wait): Handle exec events. Call
2568 linux_arch_setup_thread. Make event_lwp argument a
2569 pointer-to-a-pointer.
2570 (check_zombie_leaders): Do not check stopped threads.
2571 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2572 (linux_low_filter_event): Add lwp and thread for exec'ing
2573 non-leader thread if leader thread has been deleted.
2574 Refactor code into linux_arch_setup_thread and call it.
2575 Pass child lwp pointer by reference to handle_extended_wait.
2576 (linux_wait_for_event_filtered): Update comment.
2577 (linux_wait_1): Prevent clobbering exec event status.
2578 (linux_supports_exec_events): New function.
2579 (linux_target_ops) <supports_exec_events>: Initialize new member.
2580 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2581 new member.
2582 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2583 * server.c (report_exec_events): New global variable.
2584 (handle_query): Handle qSupported query for exec-events feature.
2585 (captured_main): Initialize report_exec_events.
2586 * server.h (report_exec_events): Declare new global variable.
2587 * target.h (struct target_ops) <supports_exec_events>: New
2588 member.
2589 (target_supports_exec_events): New macro.
2590 * win32-low.c (win32_target_ops) <supports_exec_events>:
2591 Initialize new member.
2592
2593 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2594
2595 * linux-low.c (linux_low_enable_btrace): Remove.
2596 (linux_target_ops): Replace linux_low_enable_btrace with
2597 linux_enable_btrace.
2598
2599 2015-09-03 Yao Qi <yao.qi@linaro.org>
2600
2601 * linux-aarch64-low.c (aarch64_insert_point): Call
2602 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2603 returns true.
2604
2605 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2606
2607 * linux-low.c (check_stopped_by_breakpoint): Use
2608 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2609
2610 2015-08-27 Pedro Alves <palves@redhat.com>
2611
2612 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2613
2614 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2615
2616 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2617 the XNEW-family equivalent.
2618 (compile_bytecodes): Likewise.
2619 * dll.c (loaded_dll): Likewise.
2620 * event-loop.c (append_callback_event): Likewise.
2621 (create_file_handler): Likewise.
2622 (create_file_event): Likewise.
2623 * hostio.c (handle_open): Likewise.
2624 * inferiors.c (add_thread): Likewise.
2625 (add_process): Likewise.
2626 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2627 * linux-arm-low.c (arm_new_process): Likewise.
2628 (arm_new_thread): Likewise.
2629 * linux-low.c (add_to_pid_list): Likewise.
2630 (linux_add_process): Likewise.
2631 (handle_extended_wait): Likewise.
2632 (add_lwp): Likewise.
2633 (enqueue_one_deferred_signal): Likewise.
2634 (enqueue_pending_signal): Likewise.
2635 (linux_resume_one_lwp_throw): Likewise.
2636 (linux_resume_one_thread): Likewise.
2637 (linux_read_memory): Likewise.
2638 (linux_write_memory): Likewise.
2639 * linux-mips-low.c (mips_linux_new_process): Likewise.
2640 (mips_linux_new_thread): Likewise.
2641 (mips_add_watchpoint): Likewise.
2642 * linux-x86-low.c (initialize_low_arch): Likewise.
2643 * lynx-low.c (lynx_add_process): Likewise.
2644 * mem-break.c (set_raw_breakpoint_at): Likewise.
2645 (set_breakpoint): Likewise.
2646 (add_condition_to_breakpoint): Likewise.
2647 (add_commands_to_breakpoint): Likewise.
2648 (clone_agent_expr): Likewise.
2649 (clone_one_breakpoint): Likewise.
2650 * regcache.c (new_register_cache): Likewise.
2651 * remote-utils.c (look_up_one_symbol): Likewise.
2652 * server.c (queue_stop_reply): Likewise.
2653 (start_inferior): Likewise.
2654 (queue_stop_reply_callback): Likewise.
2655 (handle_target_event): Likewise.
2656 * spu-low.c (fetch_ppc_memory): Likewise.
2657 (store_ppc_memory): Likewise.
2658 * target.c (set_target_ops): Likewise.
2659 * thread-db.c (thread_db_load_search): Likewise.
2660 (try_thread_db_load_1): Likewise.
2661 * tracepoint.c (add_tracepoint): Likewise.
2662 (add_tracepoint_action): Likewise.
2663 (create_trace_state_variable): Likewise.
2664 (cmd_qtdpsrc): Likewise.
2665 (cmd_qtro): Likewise.
2666 (add_while_stepping_state): Likewise.
2667 * win32-low.c (child_add_thread): Likewise.
2668 (get_image_name): Likewise.
2669
2670 2015-08-25 Yao Qi <yao.qi@linaro.org>
2671
2672 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2673
2674 2015-08-25 Yao Qi <yao.qi@linaro.org>
2675
2676 * Makefile.in (aarch64-linux.o): New rule.
2677 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2678 srv_tgtobj.
2679 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2680 (aarch64_init_debug_reg_state): Make it extern.
2681 (aarch64_linux_prepare_to_resume): Remove.
2682
2683 2015-08-25 Yao Qi <yao.qi@linaro.org>
2684
2685 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2686 lwp_arch_private_info and ptid_of_lwp.
2687
2688 2015-08-25 Yao Qi <yao.qi@linaro.org>
2689
2690 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2691 Find proc_info by find_process_pid. All callers updated.
2692
2693 2015-08-25 Yao Qi <yao.qi@linaro.org>
2694
2695 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2696 Remove.
2697 (debug_reg_change_callback): Remove.
2698 (aarch64_notify_debug_reg_change): Remove.
2699
2700 2015-08-25 Yao Qi <yao.qi@linaro.org>
2701
2702 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2703 Call current_lwp_ptid.
2704
2705 2015-08-25 Yao Qi <yao.qi@linaro.org>
2706
2707 * linux-aarch64-low.c (debug_reg_change_callback): Use
2708 debug_printf.
2709
2710 2015-08-25 Yao Qi <yao.qi@linaro.org>
2711
2712 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2713
2714 2015-08-25 Yao Qi <yao.qi@linaro.org>
2715
2716 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2717
2718 2015-08-25 Yao Qi <yao.qi@linaro.org>
2719
2720 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2721 the code.
2722
2723 2015-08-25 Yao Qi <yao.qi@linaro.org>
2724
2725 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2726 Remove.
2727 (debug_reg_change_callback): Remove argument entry and add argument
2728 lwp. Remove local variable thread. Don't print thread id in the
2729 debugging output. Don't check whether pid of thread equals to pid.
2730 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2731 iterate_over_lwps instead find_inferior.
2732
2733 2015-08-24 Pedro Alves <palves@redhat.com>
2734
2735 * inferiors.c (get_first_process): New function.
2736 * inferiors.h (get_first_process): New declaration.
2737 * remote-utils.c (read_ptid): Default to the first process in the
2738 list, instead of to the current thread's process.
2739
2740 2015-08-24 Pedro Alves <palves@redhat.com>
2741
2742 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2743 * event-loop.c: Likewise.
2744 * remote-utils.c: Likewise.
2745 * tracepoint.c: Likewise.
2746
2747 2015-08-24 Pedro Alves <palves@redhat.com>
2748
2749 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2750 ptid_get_lwp.
2751
2752 2015-08-21 Pedro Alves <palves@redhat.com>
2753
2754 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2755 instead of literal 1.
2756
2757 2015-08-21 Pedro Alves <palves@redhat.com>
2758
2759 * tdesc.c (default_description): Explicitly zero-initialize.
2760
2761 2015-08-21 Pedro Alves <palves@redhat.com>
2762
2763 PR gdb/18749
2764 * inferiors.c (remove_thread): Discard any pending stop reply for
2765 this thread.
2766 * server.c (remove_all_on_match_pid): Rename to ...
2767 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2768 instead of a pid.
2769 (discard_queued_stop_replies): Change parameter to a ptid. Now
2770 extern.
2771 (handle_v_kill, kill_inferior_callback, captured_main)
2772 (process_serial_event): Adjust.
2773 * server.h (discard_queued_stop_replies): Declare.
2774
2775 2015-08-21 Pedro Alves <palves@redhat.com>
2776
2777 * linux-low.c (wait_for_sigstop): Always switch to no thread
2778 selected if the previously current thread dies.
2779 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2780 process instead of the current thread's.
2781 * remote-utils.c (input_interrupt): Don't check if there's no
2782 current thread.
2783 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2784 current thread to the general thread fails, error out.
2785 (handle_qxfer_auxv, handle_qxfer_libraries)
2786 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2787 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2788 (handle_query): Check if there's a thread selected instead of
2789 checking whether there's any thread in the thread list.
2790 (handle_qxfer_threads, handle_qxfer_btrace)
2791 (handle_qxfer_btrace_conf): Don't error out early if there's no
2792 thread in the thread list.
2793 (handle_v_cont, myresume): Don't set the current thread to the
2794 continue thread.
2795 (process_serial_event) <Hg handling>: Also set thread_id if the
2796 previous general thread is still alive.
2797 (process_serial_event) <g/G handling>: If setting the current
2798 thread to the general thread fails, error out.
2799 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2800 thread's lwp instead of the current thread's.
2801 * target.c (set_desired_thread): If the desired thread was not
2802 found, leave the current thread pointing to NULL. Return an int
2803 (boolean) indicating success.
2804 * target.h (set_desired_thread): Change return type to int.
2805
2806 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2807
2808 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2809 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2810 #includes.
2811 (ps_get_thread_area): New function.
2812
2813 2015-08-19 Gary Benson <gbenson@redhat.com>
2814
2815 * hostio.c (handle_pread): Do not attempt to read more data
2816 than hostio_reply_with_data can fit in a packet.
2817
2818 2015-08-18 Joel Brobecker <brobecker@adacore.com>
2819
2820 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2821
2822 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2823
2824 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2825
2826 2015-08-06 Pedro Alves <palves@redhat.com>
2827
2828 * tracepoint.c (expr_eval_result): Now an int.
2829
2830 2015-08-06 Pedro Alves <palves@redhat.com>
2831
2832 * gdbthread.h (struct regcache): Forward declare.
2833 (struct thread_info) <regcache_data>: Now a struct regcache
2834 pointer.
2835 * inferiors.c (inferior_regcache_data)
2836 (set_inferior_regcache_data): Now work with struct regcache
2837 pointers.
2838 * inferiors.h (struct regcache): Forward declare.
2839 (inferior_regcache_data, set_inferior_regcache_data): Now work
2840 with struct regcache pointers.
2841 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2842 (free_register_cache_thread): Remove struct regcache pointer
2843 casts.
2844
2845 2015-08-06 Pedro Alves <palves@redhat.com>
2846
2847 * server.c (captured_main): On error, print the exception message
2848 to stderr, and if run_once is set, throw a quit.
2849
2850 2015-08-06 Pedro Alves <palves@redhat.com>
2851
2852 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2853 the current thread.
2854
2855 2015-08-06 Pedro Alves <palves@redhat.com>
2856
2857 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2858 reading beyond the passed in buffer length.
2859
2860 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2861
2862 * tracepoint.c (symbol_list) <required>: Remove.
2863
2864 2015-08-06 Pedro Alves <palves@redhat.com>
2865
2866 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2867 count if stopping and suspending threads.
2868 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2869 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2870 (linux_detach): Complete an ongoing step-over.
2871 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2872 throughout.
2873 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2874 (linux_wait_1): If passing a signal to the inferior after
2875 finishing a step-over, unsuspend and re-resume all lwps. If we
2876 see a single-step event but the thread should be continuing, don't
2877 pass the trap to gdb.
2878 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2879 internal_error instead of gdb_assert.
2880 (enqueue_pending_signal): New function.
2881 (check_ptrace_stopped_lwp_gone): Add debug output.
2882 (start_step_over): Use internal_error instead of gdb_assert.
2883 (complete_ongoing_step_over): New function.
2884 (linux_resume_one_thread): Don't resume a suspended thread.
2885 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2886 it stepping.
2887
2888 2015-08-06 Pedro Alves <palves@redhat.com>
2889
2890 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2891 (linux_thread_alive): Use lwp_is_marked_dead.
2892 (extended_event_reported): Delete.
2893 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2894 instead of extended_event_reported.
2895 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2896 as well.
2897 (lwp_is_marked_dead): New function.
2898 (lwp_running): Use lwp_is_marked_dead.
2899 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2900 comment.
2901
2902 2015-08-06 Pedro Alves <palves@redhat.com>
2903
2904 * linux-low.c (linux_wait_1): Move fork event output out of the
2905 !report_to_gdb check. Pass event_child->waitstatus to
2906 target_waitstatus_to_string instead of ourstatus.
2907
2908 2015-08-04 Yao Qi <yao.qi@linaro.org>
2909
2910 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2911 if current_thread is 32 bit.
2912
2913 2015-08-04 Yao Qi <yao.qi@linaro.org>
2914
2915 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2916 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2917 * server.c (extended_protocol): Remove "static".
2918 * server.h (extended_protocol): Declare it.
2919
2920 2015-08-04 Yao Qi <yao.qi@linaro.org>
2921
2922 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2923 both aarch64 and aarch32.
2924 (aarch64_set_pc): Likewise.
2925
2926 2015-08-04 Yao Qi <yao.qi@linaro.org>
2927
2928 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2929 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2930 arm-with-neon.xml to srv_xmlfiles.
2931 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2932 (is_64bit_tdesc): New function.
2933 (aarch64_linux_read_description): New function.
2934 (aarch64_arch_setup): Call aarch64_linux_read_description.
2935 (regs_info): Rename to regs_info_aarch64.
2936 (aarch64_regs_info): Return right regs_info.
2937 (initialize_low_arch): Call initialize_low_arch_aarch32.
2938
2939 2015-08-04 Yao Qi <yao.qi@linaro.org>
2940
2941 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2942 * linux-aarch32-low.c: New file.
2943 * linux-aarch32-low.h: New file.
2944 * linux-arm-low.c (arm_fill_gregset): Move it to
2945 linux-aarch32-low.c.
2946 (arm_store_gregset): Likewise.
2947 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2948 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2949 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2950 (regs_info): Rename to regs_info_arm.
2951 (arm_regs_info): Return regs_info_aarch32 if
2952 have_ptrace_getregset is 1 and target description is
2953 arm_with_neon or arm_with_vfpv3.
2954 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2955 Call initialize_low_arch_aarch32 instead.
2956
2957 2015-08-04 Yao Qi <yao.qi@linaro.org>
2958
2959 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2960 * linux-low.c: ... here.
2961 * linux-low.h (have_ptrace_getregset): Declare it.
2962
2963 2015-08-04 Pedro Alves <palves@redhat.com>
2964
2965 * thread-db.c (struct thread_db): Use new typedefs.
2966 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2967 CHK calls.
2968 (disable_thread_event_reporting): Cast result of dlsym to
2969 destination function pointer type.
2970 (thread_db_mourn): Use td_ta_delete_ftype.
2971
2972 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2973
2974 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2975 arch variant.
2976 (CDX_BREAKPOINT): Define for R2.
2977 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2978 (the_low_target): Add comments.
2979
2980 2015-07-30 Yao Qi <yao.qi@linaro.org>
2981
2982 * linux-arm-low.c (arm_hwcap): Remove it.
2983 (arm_read_description): New local variable arm_hwcap. Don't
2984 set arm_hwcap to zero.
2985
2986 2015-07-30 Yao Qi <yao.qi@linaro.org>
2987
2988 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2989 Use regcache->tdesc instead.
2990 (arm_store_wmmxregset): Likewise.
2991 (arm_fill_vfpregset): Likewise.
2992 (arm_store_vfpregset): Likewise.
2993
2994 2015-07-30 Yao Qi <yao.qi@linaro.org>
2995
2996 * linux-arm-low.c: Include arch/arm.h.
2997 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2998 (arm_store_gregset): Likewise.
2999
3000 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3001
3002 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3003 ptrace's 4th parameter.
3004
3005 2015-07-27 Yao Qi <yao.qi@linaro.org>
3006
3007 * configure.srv (case aarch64*-*-linux*): Don't set
3008 srv_linux_usrregs.
3009
3010 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3011
3012 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3013 sys/ptrace.h.
3014 * linux-arm-low.c: Likewise.
3015 * linux-cris-low.c: Likewise.
3016 * linux-crisv32-low.c: Likewise.
3017 * linux-low.c: Likewise.
3018 * linux-m68k-low.c: Likewise.
3019 * linux-mips-low.c: Likewise.
3020 * linux-nios2-low.c: Likewise.
3021 * linux-s390-low.c: Likewise.
3022 * linux-sparc-low.c: Likewise.
3023 * linux-tic6x-low.c: Likewise.
3024 * linux-tile-low.c: Likewise.
3025 * linux-x86-low.c: Likewise.
3026
3027 2015-07-24 Pedro Alves <palves@redhat.com>
3028
3029 * config.in: Regenerate.
3030 * configure: Regenerate.
3031
3032 2015-07-24 Pedro Alves <palves@redhat.com>
3033
3034 * acinclude.m4: Include ../ptrace.m4.
3035 * configure.ac: Call GDB_AC_PTRACE.
3036 * config.in, configure: Regenerate.
3037
3038 2015-07-24 Yao Qi <yao.qi@linaro.org>
3039
3040 * linux-low.c (linux_create_inferior): Remove setting to
3041 proc->priv->new_inferior.
3042 (linux_attach): Likewise.
3043 (linux_low_filter_event): Likewise.
3044 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3045
3046 2015-07-24 Yao Qi <yao.qi@linaro.org>
3047
3048 * linux-low.c (linux_arch_setup): New function.
3049 (linux_low_filter_event): If proc->tdesc is NULL and
3050 proc->attached is true, call the_low_target.arch_setup.
3051 Otherwise, keep status pending, and return.
3052 (linux_resume_one_lwp_throw): Don't call get_pc if
3053 thread->while_stepping isn't NULL. Don't call
3054 get_thread_regcache if proc->tdesc is NULL.
3055 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3056 (linux_target_ops): Install arch_setup.
3057 * server.c (start_inferior): Call the_target->arch_setup.
3058 * target.h (struct target_ops) <arch_setup>: New field.
3059 (target_arch_setup): New marco.
3060 * lynx-low.c (lynx_target_ops): Update.
3061 * nto-low.c (nto_target_ops): Update.
3062 * spu-low.c (spu_target_ops): Update.
3063 * win32-low.c (win32_target_ops): Update.
3064
3065 2015-07-24 Yao Qi <yao.qi@linaro.org>
3066
3067 * linux-low.c (linux_add_process): Don't set
3068 proc->priv->new_inferior.
3069 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3070 (linux_attach): Likewise.
3071
3072 2015-07-24 Yao Qi <yao.qi@linaro.org>
3073
3074 * server.c (start_inferior): Code refactor.
3075
3076 2015-07-24 Yao Qi <yao.qi@linaro.org>
3077
3078 * server.c (process_serial_event): Set general_thread.
3079
3080 2015-07-21 Yao Qi <yao.qi@linaro.org>
3081
3082 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3083 aarch64_linux_get_debug_reg_capacity.
3084
3085 2015-07-17 Yao Qi <yao.qi@linaro.org>
3086
3087 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3088 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3089 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3090 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3091 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3092 (AARCH64_HWP_ALIGNMENT): Likewise.
3093 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3094 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3095 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3096 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3097 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3098 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3099 (struct aarch64_debug_reg_state): Likewise.
3100 (struct arch_lwp_info): Likewise.
3101 (aarch64_align_watchpoint): Likewise.
3102 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3103 (aarch64_watchpoint_length): Likewise.
3104 (aarch64_point_encode_ctrl_reg): Likewise
3105 (aarch64_point_is_aligned): Likewise.
3106 (aarch64_align_watchpoint): Likewise.
3107 (aarch64_linux_set_debug_regs):
3108 (aarch64_dr_state_insert_one_point): Likewise.
3109 (aarch64_dr_state_remove_one_point): Likewise.
3110 (aarch64_handle_breakpoint): Likewise.
3111 (aarch64_handle_aligned_watchpoint): Likewise.
3112 (aarch64_handle_unaligned_watchpoint): Likewise.
3113 (aarch64_handle_watchpoint): Likewise.
3114
3115 2015-07-17 Yao Qi <yao.qi@linaro.org>
3116
3117 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3118 and don't aarch64_get_debug_reg_state. All callers update.
3119 (aarch64_handle_aligned_watchpoint): Likewise.
3120 (aarch64_handle_unaligned_watchpoint): Likewise.
3121 (aarch64_handle_watchpoint): Likewise.
3122 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3123 (aarch64_remove_point): Likewise.
3124
3125 2015-07-17 Yao Qi <yao.qi@linaro.org>
3126
3127 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3128 debug_printf.
3129 (aarch64_handle_unaligned_watchpoint): Likewise.
3130
3131 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3132
3133 Revert the previous 3 commits:
3134 Move gdb_regex* to common/
3135 Move linux_find_memory_regions_full & co.
3136 gdbserver build-id attribute generator
3137
3138 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3139 Jan Kratochvil <jan.kratochvil@redhat.com>
3140
3141 gdbserver build-id attribute generator.
3142 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3143 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3144 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3145 (find_phdr): New.
3146 (get_dynamic): Use find_pdhr to traverse program headers.
3147 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3148 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3149 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3150 (get_hex_build_id): New.
3151 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3152 to reply XML document.
3153
3154 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3155 Jan Kratochvil <jan.kratochvil@redhat.com>
3156
3157 * target.c: Include target/target-utils.h and fcntl.h.
3158 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3159 (target_fileio_read_stralloc): New functions.
3160
3161 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3162
3163 * Makefile.in (OBS): Add gdb_regex.o.
3164 (gdb_regex.o): New.
3165 * config.in: Rebuilt.
3166 * configure: Rebuilt.
3167
3168 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3169 Jan Kratochvil <jan.kratochvil@redhat.com>
3170
3171 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3172 * Makefile.in (OBS): Add target-utils.o.
3173 (linux-maps.o, target-utils.o): New.
3174 * configure.srv (srv_linux_obj): Add linux-maps.o.
3175
3176 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3177
3178 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3179 function, return 1.
3180 (the_low_target): Install it.
3181
3182 2015-07-14 Pedro Alves <palves@redhat.com>
3183
3184 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3185 Instead, ignore ECHILD, and throw an error for other errnos.
3186
3187 2015-07-10 Pedro Alves <palves@redhat.com>
3188
3189 * event-loop.c (struct callback_event) <data>: Change type to
3190 gdb_client_data instance instead of gdb_client_data pointer.
3191 (append_callback_event): Adjust.
3192
3193 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3194
3195 * linux-aarch64-low.c: Add comments for each linux_target_ops
3196 method. Remove comments already covered in target_ops and
3197 linux_target_ops definitions.
3198 (the_low_target): Add comments for each unimplemented method.
3199
3200 2015-07-09 Yao Qi <yao.qi@linaro.org>
3201
3202 * linux-aarch64-low.c (aarch64_regmap): Remove.
3203 (aarch64_usrregs_info): Remove.
3204 (regs_info): Set field usrregs to NULL.
3205
3206 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3207
3208 * linux-low.c: Include "rsp-low.h"
3209 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3210 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3211 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3212 (handle_btrace_enable_pt): New.
3213 (handle_btrace_general_set): Support "pt".
3214 (handle_btrace_conf_general_set): Support "pt:size".
3215
3216 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3217
3218 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3219 Z_PACKET_SW_BP.
3220
3221 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3222
3223 * linux-aarch64-low.c: Remove comment about endianness.
3224 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3225 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3226 memcmp.
3227
3228 2015-06-24 Gary Benson <gbenson@redhat.com>
3229
3230 * linux-i386-ipa.c (stdint.h): Do not include.
3231 * lynx-i386-low.c (stdint.h): Likewise.
3232 * lynx-ppc-low.c (stdint.h): Likewise.
3233 * mem-break.c (stdint.h): Likewise.
3234 * thread-db.c (stdint.h): Likewise.
3235 * tracepoint.c (stdint.h): Likewise.
3236 * win32-low.c (stdint.h): Likewise.
3237
3238 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3239
3240 * server.c (write_qxfer_response): Update call to
3241 remote_escape_output.
3242
3243 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3244 Jan Kratochvil <jan.kratochvil@redhat.com>
3245
3246 Merge multiple hex conversions.
3247 * gdbreplay.c (tohex): Rename to 'fromhex'.
3248 (logchar): Use fromhex.
3249
3250 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3251
3252 * server.c (handle_qxfer_libraries): Set `version' attribute for
3253 <library-list>.
3254
3255 2015-06-10 Gary Benson <gbenson@redhat.com>
3256
3257 * target.h (struct target_ops) <multifs_open>: New field.
3258 <multifs_unlink>: Likewise.
3259 <multifs_readlink>: Likewise.
3260 * linux-low.c (nat/linux-namespaces.h): New include.
3261 (linux_target_ops): Initialize the_target->multifs_open,
3262 the_target->multifs_unlink and the_target->multifs_readlink.
3263 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3264 * hostio.c (hostio_fs_pid): New static variable.
3265 (hostio_handle_new_gdb_connection): New function.
3266 (handle_setfs): Likewise.
3267 (handle_open): Use the_target->multifs_open as appropriate.
3268 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3269 (handle_readlink): Use the_target->multifs_readlink as
3270 appropriate.
3271 (handle_vFile): Handle vFile:setfs packets.
3272 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3273 after target_handle_new_gdb_connection.
3274
3275 2015-06-10 Gary Benson <gbenson@redhat.com>
3276
3277 * configure.ac (AC_CHECK_FUNCS): Add setns.
3278 * config.in: Regenerate.
3279 * configure: Likewise.
3280 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3281 (linux-namespaces.o): New rule.
3282 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3283
3284 2015-06-09 Gary Benson <gbenson@redhat.com>
3285
3286 * hostio.c (handle_open): Process mode argument with
3287 fileio_to_host_mode.
3288
3289 2015-06-01 Yao Qi <yao.qi@linaro.org>
3290
3291 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3292 * linux-x86-low.c: Likewise.
3293
3294 2015-05-28 Don Breazeal <donb@codesourcery.com>
3295
3296 * linux-low.c (handle_extended_wait): Initialize
3297 thread_info.last_resume_kind for new fork children.
3298
3299 2015-05-15 Pedro Alves <palves@redhat.com>
3300
3301 * target.h (target_handle_new_gdb_connection): Rewrite using if
3302 wrapped in do/while.
3303
3304 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3305
3306 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3307 * configure, config.in: Regenerate.
3308 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3309 Declare typedef.
3310
3311 2015-05-12 Don Breazeal <donb@codesourcery.com>
3312
3313 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3314 PTRACE_EVENT_VFORK_DONE.
3315 (linux_low_ptrace_options, extended_event_reported): Add vfork
3316 events.
3317 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3318 and "vforkdone" for RSP 'T' Stop Reply Packet.
3319 * server.h (report_vfork_events): Declare
3320 global variable.
3321
3322 2015-05-12 Don Breazeal <donb@codesourcery.com>
3323
3324 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3325 (the_low_target) <new_fork>: Initialize new member.
3326 * linux-arm-low.c (arm_new_fork): New function.
3327 (the_low_target) <new_fork>: Initialize new member.
3328 * linux-low.c (handle_extended_wait): Call new target function
3329 new_fork.
3330 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3331 * linux-mips-low.c (mips_add_watchpoint): New function
3332 extracted from mips_insert_point.
3333 (the_low_target) <new_fork>: Initialize new member.
3334 (mips_linux_new_fork): New function.
3335 (mips_insert_point): Call mips_add_watchpoint.
3336 * linux-x86-low.c (x86_linux_new_fork): New function.
3337 (the_low_target) <new_fork>: Initialize new member.
3338
3339 2015-05-12 Don Breazeal <donb@codesourcery.com>
3340
3341 * linux-low.c (handle_extended_wait): Implement return value,
3342 rename argument 'event_child' to 'event_lwp', handle
3343 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3344 (linux_low_ptrace_options): New function.
3345 (linux_low_filter_event): Call linux_low_ptrace_options,
3346 use different argument fo linux_enable_event_reporting,
3347 use return value from handle_extended_wait.
3348 (extended_event_reported): New function.
3349 (linux_wait_1): Call extended_event_reported and set
3350 status to report fork events.
3351 (linux_write_memory): Add pid to debug message.
3352 (reset_lwp_ptrace_options_callback): New function.
3353 (linux_handle_new_gdb_connection): New function.
3354 (linux_target_ops): Initialize new structure member.
3355 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3356 * lynx-low.c: Initialize new structure member.
3357 * remote-utils.c (prepare_resume_reply): Implement stop reason
3358 "fork" for "T" stop message.
3359 * server.c (handle_query): Call handle_new_gdb_connection.
3360 * server.h (report_fork_events): Declare global flag.
3361 * target.h (struct target_ops) <handle_new_gdb_connection>:
3362 New member.
3363 (target_handle_new_gdb_connection): New macro.
3364 * win32-low.c: Initialize new structure member.
3365
3366 2015-05-12 Don Breazeal <donb@codesourcery.com>
3367
3368 * mem-break.c (APPEND_TO_LIST): Define macro.
3369 (clone_agent_expr): New function.
3370 (clone_one_breakpoint): New function.
3371 (clone_all_breakpoints): New function.
3372 * mem-break.h: Declare new functions.
3373
3374 2015-05-12 Don Breazeal <donb@codesourcery.com>
3375
3376 * linux-low.c (linux_supports_fork_events): New function.
3377 (linux_supports_vfork_events): New function.
3378 (linux_target_ops): Initialize new structure members.
3379 (initialize_low): Call linux_check_ptrace_features.
3380 * lynx-low.c (lynx_target_ops): Initialize new structure
3381 members.
3382 * server.c (report_fork_events, report_vfork_events):
3383 New global flags.
3384 (handle_query): Add new features to qSupported packet and
3385 response.
3386 (captured_main): Initialize new global variables.
3387 * target.h (struct target_ops) <supports_fork_events>:
3388 New member.
3389 <supports_vfork_events>: New member.
3390 (target_supports_fork_events): New macro.
3391 (target_supports_vfork_events): New macro.
3392 * win32-low.c (win32_target_ops): Initialize new structure
3393 members.
3394
3395 2015-05-12 Gary Benson <gbenson@redhat.com>
3396
3397 * server.c (handle_qxfer_exec_file): Use current process
3398 if annex is empty.
3399
3400 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3401
3402 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3403 Remove HAVE_PTRACE_GETREGS conditionals.
3404 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3405 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3406
3407 2015-05-08 Yao Qi <yao.qi@linaro.org>
3408
3409 * linux-low.c (linux_supports_conditional_breakpoints): New
3410 function.
3411 (linux_target_ops): Install new target method.
3412 * lynx-low.c (lynx_target_ops): Install NULL hook for
3413 supports_conditional_breakpoints.
3414 * nto-low.c (nto_target_ops): Likewise.
3415 * spu-low.c (spu_target_ops): Likewise.
3416 * win32-low.c (win32_target_ops): Likewise.
3417 * server.c (handle_query): Check
3418 target_supports_conditional_breakpoints.
3419 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3420 New field.
3421 (target_supports_conditional_breakpoints): New macro.
3422
3423 2015-05-06 Pedro Alves <palves@redhat.com>
3424
3425 PR server/18081
3426 * server.c (start_inferior): If the process exits, mourn it.
3427
3428 2015-04-21 Gary Benson <gbenson@redhat.com>
3429
3430 * hostio.c (fileio_open_flags_to_host): Factored out to
3431 fileio_to_host_openflags in common/fileio.c. Single use
3432 updated.
3433
3434 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3435
3436 * linux-xtensa-low.c (xtensa_fill_gregset)
3437 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3438 XCHAL_HAVE_LOOP.
3439
3440 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3441
3442 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3443 (regs_info): Replace usrregs pointer with NULL.
3444
3445 2015-04-17 Gary Benson <gbenson@redhat.com>
3446
3447 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3448 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3449 * server.c (handle_qxfer_exec_file): New function.
3450 (qxfer_packets): Add exec-file entry.
3451 (handle_query): Report qXfer:exec-file:read as supported packet.
3452
3453 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3454
3455 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3456
3457 2015-04-09 Gary Benson <gbenson@redhat.com>
3458
3459 * hostio-errno.c (errno_to_fileio_error): Remove function.
3460 Update caller to use remote_fileio_to_fio_error.
3461
3462 2015-04-09 Yao Qi <yao.qi@linaro.org>
3463
3464 * linux-low.c (linux_insert_point): Call
3465 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3466 (linux_remove_point): Call remove_memory_breakpoint if type is
3467 raw_bkpt_type_sw.
3468 * linux-x86-low.c (x86_insert_point): Don't call
3469 insert_memory_breakpoint.
3470 (x86_remove_point): Don't call remove_memory_breakpoint.
3471
3472 2015-04-01 Pedro Alves <palves@redhat.com>
3473 Cleber Rosa <crosa@redhat.com>
3474
3475 * server.c (gdbserver_usage): Reorganize and extend the usage
3476 message.
3477
3478 2015-03-24 Pedro Alves <palves@redhat.com>
3479
3480 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3481 output. Also dump TRAP_TRACE.
3482 (linux_low_filter_event): In debug output, distinguish a
3483 resume_stop SIGSTOP from a delayed SIGSTOP.
3484
3485 2015-03-24 Gary Benson <gbenson@redhat.com>
3486
3487 * linux-x86-low.c (x86_linux_new_thread): Moved to
3488 nat/x86-linux.c.
3489 (x86_linux_prepare_to_resume): Likewise.
3490
3491 2015-03-24 Gary Benson <gbenson@redhat.com>
3492
3493 * Makefile.in (x86-linux-dregs.o): New rule.
3494 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3495 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3496 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3497 (x86_linux_dr_get): Likewise.
3498 (x86_linux_dr_set): Likewise.
3499 (update_debug_registers_callback): Likewise.
3500 (x86_linux_dr_set_addr): Likewise.
3501 (x86_linux_dr_get_addr): Likewise.
3502 (x86_linux_dr_set_control): Likewise.
3503 (x86_linux_dr_get_control): Likewise.
3504 (x86_linux_dr_get_status): Likewise.
3505 (x86_linux_update_debug_registers): Likewise.
3506
3507 2015-03-24 Gary Benson <gbenson@redhat.com>
3508
3509 * linux-x86-low.c (x86_linux_update_debug_registers):
3510 New function, factored out from...
3511 (x86_linux_prepare_to_resume): ...this.
3512
3513 2015-03-24 Gary Benson <gbenson@redhat.com>
3514
3515 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3516 (x86_linux_dr_set): Likewise.
3517 (update_debug_registers_callback): Likewise.
3518 (x86_linux_dr_set_addr): Likewise.
3519 (x86_linux_dr_get_addr): Likewise.
3520 (x86_linux_dr_set_control): Likewise.
3521 (x86_linux_dr_get_control): Likewise.
3522 (x86_linux_dr_get_status): Likewise.
3523 (x86_linux_prepare_to_resume): Likewise.
3524
3525 2015-03-24 Gary Benson <gbenson@redhat.com>
3526
3527 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3528 Use perror_with_name. Pass string through gettext.
3529 (x86_linux_dr_set): Likewise.
3530
3531 2015-03-24 Gary Benson <gbenson@redhat.com>
3532
3533 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3534 (x86_linux_dr_set_addr): ...this.
3535 (x86_dr_low_get_addr): Rename to...
3536 (x86_linux_dr_get_addr): ...this.
3537 (x86_dr_low_set_control): Rename to...
3538 (x86_linux_dr_set_control): ...this.
3539 (x86_dr_low_get_control): Rename to...
3540 (x86_linux_dr_get_control): ...this.
3541 (x86_dr_low_get_status): Rename to...
3542 (x86_linux_dr_get_status): ...this.
3543 (x86_dr_low): Update with new function names.
3544
3545 2015-03-24 Gary Benson <gbenson@redhat.com>
3546
3547 * Makefile.in (x86-linux.o): New rule.
3548 * configure.srv: Add x86-linux.o to relevant targets.
3549 * linux-low.c (lwp_set_arch_private_info): New function.
3550 (lwp_arch_private_info): Likewise.
3551 * linux-x86-low.c: Include nat/x86-linux.h.
3552 (arch_lwp_info): Removed structure.
3553 (update_debug_registers_callback):
3554 Use lwp_set_debug_registers_changed.
3555 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3556 and lwp_set_debug_registers_changed.
3557 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3558
3559 2015-03-24 Gary Benson <gbenson@redhat.com>
3560
3561 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3562 * linux-arm-low.c (arm_new_thread): Likewise.
3563 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3564 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3565 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3566 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3567
3568 2015-03-24 Gary Benson <gbenson@redhat.com>
3569
3570 * linux-low.c (ptid_of_lwp): New function.
3571 (lwp_is_stopped): Likewise.
3572 (lwp_stop_reason): Likewise.
3573 * linux-x86-low.c (update_debug_registers_callback):
3574 Use lwp_is_stopped.
3575 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3576 lwp_stop_reason.
3577
3578 2015-03-24 Gary Benson <gbenson@redhat.com>
3579
3580 * linux-low.h (linux_stop_lwp): Remove declaration.
3581
3582 2015-03-24 Gary Benson <gbenson@redhat.com>
3583
3584 * linux-low.h: Include nat/linux-nat.h.
3585 * linux-low.c (iterate_over_lwps_args): New structure.
3586 (iterate_over_lwps_filter): New function.
3587 (iterate_over_lwps): Likewise.
3588 * linux-x86-low.c (update_debug_registers_callback):
3589 Update signature to what iterate_over_lwps expects.
3590 Remove PID check that iterate_over_lwps now performs.
3591 (x86_dr_low_set_addr): Use iterate_over_lwps.
3592 (x86_dr_low_set_control): Likewise.
3593
3594 2015-03-24 Gary Benson <gbenson@redhat.com>
3595
3596 * linux-x86-low.c (x86_debug_reg_state): New function.
3597 (x86_linux_prepare_to_resume): Use the above.
3598
3599 2015-03-24 Gary Benson <gbenson@redhat.com>
3600
3601 * linux-low.c (current_lwp_ptid): New function.
3602 * linux-x86-low.c: Include nat/linux-nat.h.
3603 (x86_dr_low_get_addr): Use current_lwp_ptid.
3604 (x86_dr_low_get_control): Likewise.
3605 (x86_dr_low_get_status): Likewise.
3606
3607 2015-03-20 Pedro Alves <palves@redhat.com>
3608
3609 * tracepoint.c (cmd_qtstatus): Make "str" const.
3610
3611 2015-03-20 Pedro Alves <palves@redhat.com>
3612
3613 * server.c (handle_general_set): Make "req_str" const.
3614
3615 2015-03-19 Pedro Alves <palves@redhat.com>
3616
3617 * linux-low.c (linux_resume_one_lwp): Rename to ...
3618 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3619 instead call perror_with_name.
3620 (check_ptrace_stopped_lwp_gone): New function.
3621 (linux_resume_one_lwp): Reimplement as wrapper around
3622 linux_resume_one_lwp_throw that swallows errors if the LWP is
3623 gone.
3624
3625 2015-03-19 Pedro Alves <palves@redhat.com>
3626
3627 * linux-low.c (count_events_callback, select_event_lwp_callback):
3628 No longer check whether the thread has resume_stop as last resume
3629 kind.
3630
3631 2015-03-19 Pedro Alves <palves@redhat.com>
3632
3633 * linux-low.c (count_events_callback, select_event_lwp_callback):
3634 Use the lwp's status_pending_p field, not the thread's.
3635
3636 2015-03-19 Pedro Alves <palves@redhat.com>
3637
3638 * linux-low.c (select_event_lwp_callback): Update comments to
3639 no longer mention SIGTRAP.
3640
3641 2015-03-18 Gary Benson <gbenson@redhat.com>
3642
3643 * server.c (handle_query): Do not report vFile:fstat as supported.
3644
3645 2015-03-11 Gary Benson <gbenson@redhat.com>
3646
3647 * hostio.c (sys/types.h): New include.
3648 (sys/stat.h): Likewise.
3649 (common-remote-fileio.h): Likewise.
3650 (handle_fstat): New function.
3651 (handle_vFile): Handle vFile:fstat packets.
3652
3653 2015-03-11 Gary Benson <gbenson@redhat.com>
3654
3655 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3656 struct stat.st_blocks and struct stat.st_blksize.
3657 * configure: Regenerate.
3658 * config.in: Likewise.
3659 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3660 (OBS): Add common-remote-fileio.o.
3661 (common-remote-fileio.o): New rule.
3662
3663 2015-03-09 Pedro Alves <palves@redhat.com>
3664
3665 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3666 'struct sockaddr' pointer in 'accept' call.
3667
3668 2015-03-09 Pedro Alves <palves@redhat.com>
3669
3670 Revert:
3671 2015-03-07 Pedro Alves <palves@redhat.com>
3672 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3673 or <winsock2.h> here. Instead include "gdb_socket.h".
3674 (remote_open): Use union gdb_sockaddr_u.
3675 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3676 or <winsock2.h> here. Instead include "gdb_socket.h".
3677 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3678 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3679 or <sys/un.h>.
3680 (init_named_socket, gdb_agent_helper_thread): Use union
3681 gdb_sockaddr_u.
3682
3683 2015-03-07 Pedro Alves <palves@redhat.com>
3684
3685 * configure.ac (build_warnings): Move
3686 -Wdeclaration-after-statement to the C-specific set.
3687 * configure: Regenerate.
3688
3689 2015-03-07 Pedro Alves <palves@redhat.com>
3690
3691 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3692 or <winsock2.h> here. Instead include "gdb_socket.h".
3693 (remote_open): Use union gdb_sockaddr_u.
3694 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3695 or <winsock2.h> here. Instead include "gdb_socket.h".
3696 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3697 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3698 or <sys/un.h>.
3699 (init_named_socket, gdb_agent_helper_thread): Use union
3700 gdb_sockaddr_u.
3701
3702 2015-03-07 Pedro Alves <palves@redhat.com>
3703
3704 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3705 instead.
3706
3707 2015-03-06 Yao Qi <yao.qi@linaro.org>
3708
3709 * linux-aarch64-low.c (aarch64_insert_point): Use
3710 show_debug_regs as a boolean.
3711 (aarch64_remove_point): Likewise.
3712
3713 2015-03-05 Pedro Alves <palves@redhat.com>
3714
3715 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3716 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3717 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3718 * nto-low.c (nto_target_ops): Likewise.
3719 * spu-low.c (spu_target_ops): Likewise.
3720 * win32-low.c (win32_target_ops): Likewise.
3721
3722 2015-03-04 Pedro Alves <palves@redhat.com>
3723
3724 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3725 Decide whether a breakpoint triggered based on the SIGTRAP's
3726 siginfo.si_code.
3727 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3728 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3729 (linux_low_filter_event): Check for breakpoints before checking
3730 watchpoints.
3731 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3732 siginfo.si_code.
3733 (linux_stopped_by_sw_breakpoint)
3734 (linux_supports_stopped_by_sw_breakpoint)
3735 (linux_stopped_by_hw_breakpoint)
3736 (linux_supports_stopped_by_hw_breakpoint): New functions.
3737 (linux_target_ops): Install new target methods.
3738
3739 2015-03-04 Pedro Alves <palves@redhat.com>
3740
3741 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3742 * server.c (swbreak_feature, hwbreak_feature): New globals.
3743 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3744 (captured_main): Clear swbreak_feature and hwbreak_feature.
3745 * server.h (swbreak_feature, hwbreak_feature): Declare.
3746 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3747 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3748 supports_stopped_by_hw_breakpoint>: New fields.
3749 (target_supports_stopped_by_sw_breakpoint)
3750 (target_stopped_by_sw_breakpoint)
3751 (target_supports_stopped_by_hw_breakpoint)
3752 (target_stopped_by_hw_breakpoint): Declare.
3753
3754 2015-03-04 Pedro Alves <palves@redhat.com>
3755
3756 enum lwp_stop_reason -> enum target_stop_reason
3757 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3758 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3759 (linux_wait_1, stuck_in_jump_pad_callback)
3760 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3761 (linux_stopped_by_watchpoint):
3762 * linux-low.h (enum lwp_stop_reason): Delete.
3763 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3764 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3765
3766 2015-03-04 Yao Qi <yao.qi@linaro.org>
3767
3768 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3769
3770 2015-03-03 Gary Benson <gbenson@redhat.com>
3771
3772 * hostio.c (handle_vFile): Fix prefix lengths.
3773
3774 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3775
3776 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3777 ptr_bits.
3778
3779 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3780
3781 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3782 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3783 (clean): Add "rm -f" for above C files.
3784 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3785 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3786 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3787 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3788 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3789 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3790 (init_registers_s390x_vx_linux64)
3791 (init_registers_s390x_tevx_linux64)
3792 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3793 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3794 declarations.
3795 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3796 (s390_store_vxrs_high): New functions.
3797 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3798 NT_S390_VXRS_HIGH.
3799 (s390_arch_setup): Add logic for selecting one of the new target
3800 descriptions. Activate the new vector regsets if applicable.
3801 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3802 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3803 and init_registers_s390x_tevx_linux64.
3804
3805 2015-03-01 Pedro Alves <palves@redhat.com>
3806
3807 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3808 parameter.
3809
3810 2015-02-27 Pedro Alves <palves@redhat.com>
3811
3812 * linux-x86-low.c (u_debugreg_offset): New function.
3813 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3814
3815 2015-02-27 Pedro Alves <palves@redhat.com>
3816
3817 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3818 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3819 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3820 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3821 (ps_lsetfpregs, ps_getpid)
3822 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3823 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3824 (ps_lsetxregs, ps_plog): Declare.
3825
3826 2015-02-27 Pedro Alves <palves@redhat.com>
3827
3828 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3829 IP_AGENT_EXPORT_FUNC.
3830 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3831 IP_AGENT_EXPORT_FUNC.
3832 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3833 (IP_AGENT_EXPORT): Delete.
3834 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3835 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3836 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3837 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3838 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3839 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3840 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3841 (traceframe_read_count, traceframe_write_count)
3842 (traceframes_created, trace_state_variables, get_raw_reg)
3843 (get_trace_state_variable_value, set_trace_state_variable_value)
3844 (ust_loaded, helper_thread_id, cmd_buf): Use
3845 IPA_SYM_EXPORTED_NAME.
3846 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3847 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3848 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3849 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3850 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3851 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3852 EXTERN_C_PUSH/EXTERN_C_POP.
3853 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3854 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3855 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3856 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3857 (traceframe_write_count, traceframe_read_count)
3858 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3859 (about_to_request_buffer_space, get_trace_state_variable_value)
3860 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3861 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3862 EXTERN_C_PUSH/EXTERN_C_POP.
3863 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3864 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3865 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3866 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3867 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3868 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3869 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3870 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3871 Define.
3872 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3873 (IP_AGENT_EXPORT_VAR_DECL): Define.
3874 (tracing): Declare.
3875 (gdb_agent_get_raw_reg): Declare.
3876
3877 2015-02-27 Tom Tromey <tromey@redhat.com>
3878 Pedro Alves <palves@redhat.com>
3879
3880 Rename symbols whose names are reserved C++ keywords throughout.
3881
3882 2015-02-27 Pedro Alves <palves@redhat.com>
3883
3884 * Makefile.in (COMPILER): New, get it from autoconf.
3885 (CXX): Get from autoconf instead.
3886 (COMPILE.pre): Use COMPILER.
3887 (CC-LD): Rename to ...
3888 (CC_LD): ... this. Use COMPILER.
3889 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3890 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3891 * acinclude.m4: Include build-with-cxx.m4.
3892 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3893 Disable -Werror by default if building in C++ mode.
3894 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3895 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3896 the C++ compiler. Save/restore CXXFLAGS too.
3897 * configure: Regenerate.
3898
3899 2015-02-27 Pedro Alves <palves@redhat.com>
3900
3901 * acinclude.m4: Include libiberty.m4.
3902 * configure.ac: Call libiberty_INIT.
3903 * config.in, configure: Regenerate.
3904
3905 2015-02-26 Pedro Alves <palves@redhat.com>
3906
3907 * linux-low.c (linux_wait_1): When incrementing the PC past a
3908 program breakpoint always use the_low_target.breakpoint_len as
3909 increment, rather than the maximum between that and
3910 the_low_target.decr_pc_after_break.
3911
3912 2015-02-23 Pedro Alves <palves@redhat.com>
3913
3914 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3915 thread was doing a step-over; always adjust the PC if
3916 we stepped over a permanent breakpoint.
3917 (linux_wait_1): If we stepped over breakpoint that was on top of a
3918 permanent breakpoint, manually advance the PC past it.
3919
3920 2015-02-23 Pedro Alves <palves@redhat.com>
3921
3922 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3923 modes.
3924 (x86_fill_gregset, x86_store_gregset): Use it when handling
3925 $orig_eax.
3926
3927 2015-02-20 Pedro Alves <palves@redhat.com>
3928
3929 * thread-db.c: Include "nat/linux-procfs.h".
3930 (thread_db_init): Skip listing new threads if the kernel supports
3931 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3932
3933 2015-02-20 Pedro Alves <palves@redhat.com>
3934
3935 * linux-low.c (status_pending_p_callback): Use ptid_match.
3936
3937 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3938
3939 PR breakpoints/16812
3940 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3941 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3942 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3943
3944 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3945
3946 PR breakpoints/15956
3947 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3948
3949 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3950
3951 * linux-low.c (linux_low_btrace_conf): Print size.
3952 * server.c (handle_btrace_conf_general_set): New.
3953 (hanle_general_set): Call handle_btrace_conf_general_set.
3954 (handle_query): Report Qbtrace-conf:bts:size as supported.
3955
3956 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3957
3958 * linux-low.c (linux_low_enable_btrace): Update parameters.
3959 (linux_low_btrace_conf): New.
3960 (linux_target_ops)<to_btrace_conf>: Initialize.
3961 * server.c (current_btrace_conf): New.
3962 (handle_btrace_enable): Rename to ...
3963 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3964 to target_enable_btrace. Update comment. Update users.
3965 (handle_qxfer_btrace_conf): New.
3966 (qxfer_packets): Add btrace-conf entry.
3967 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3968 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3969 (target_ops)<read_btrace_conf>: New.
3970 (target_enable_btrace): Update parameters.
3971 (target_read_btrace_conf): New.
3972
3973 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3974
3975 * server.c (handle_btrace_general_set): Remove call to
3976 target_supports_btrace.
3977 (supported_btrace_packets): New.
3978 (handle_query): Call supported_btrace_packets.
3979 * target.h: include btrace-common.h.
3980 (btrace_target_info): Removed.
3981 (supports_btrace, target_supports_btrace): Update parameters.
3982
3983 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3984
3985 * Makefile.in (SFILES): Add common/btrace-common.c.
3986 (OBS): Add common/btrace-common.o.
3987 (btrace-common.o): Add build rules.
3988 * linux-low: Include btrace-common.h.
3989 (linux_low_read_btrace): Use struct btrace_data. Call
3990 btrace_data_init and btrace_data_fini.
3991
3992 2015-02-06 Pedro Alves <palves@redhat.com>
3993
3994 * thread-db.c (find_new_threads_callback): Add debug output.
3995
3996 2015-02-04 Pedro Alves <palves@redhat.com>
3997
3998 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3999 (resume_stopped_resumed_lwps): New function.
4000 (linux_wait_for_event_filtered): Use it.
4001
4002 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4003
4004 * Makefile.in (SFILES): Add linux-personality.c.
4005 (linux-personality.o): New rule.
4006 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4007 list of objects to be built.
4008 * linux-low.c: Include nat/linux-personality.h.
4009 (linux_create_inferior): Remove code to disable address space
4010 randomization (moved to ../nat/linux-personality.c). Create
4011 cleanup to disable address space randomization.
4012
4013 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4014
4015 * Makefile.in (posix-strerror.o): New rule.
4016 (mingw-strerror.o): Likewise.
4017 * configure: Regenerated.
4018 * configure.ac: Source file ../common/common.host. Initialize new
4019 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4020
4021 2015-01-14 Yao Qi <yao@codesourcery.com>
4022
4023 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4024 (ppc-linux.o): New rule.
4025 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4026 * configure.ac: AC_CHECK_FUNCS(getauxval).
4027 * config.in: Re-generated.
4028 * configure: Re-generated.
4029 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4030 ppc64_64bit_inferior_p
4031
4032 2015-01-14 Yao Qi <yao@codesourcery.com>
4033
4034 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4035 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4036 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4037 (PT_ORIG_R3, PT_TRAP): Likewise.
4038 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4039 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4040 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4041
4042 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4043
4044 * i387-fp.c (i387_cache_to_xsave): In look over
4045 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4046 zmmh_low_space field by use of zmmh_high_space.
4047
4048 2015-01-09 Pedro Alves <palves@redhat.com>
4049
4050 * linux-low.c (step_over_bkpt): Move higher up in the file.
4051 (handle_extended_wait): Don't store the stop_pc here.
4052 (get_stop_pc): Adjust comments and rename to ...
4053 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4054 stopped for a software breakpoint or hardware breakpoint.
4055 (thread_still_has_status_pending_p): New function.
4056 (status_pending_p_callback): Use
4057 thread_still_has_status_pending_p. If the event is no longer
4058 interesting, resume the LWP.
4059 (handle_tracepoints): Add assert.
4060 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4061 (wstatus_maybe_breakpoint): New function.
4062 (cancel_breakpoint): Delete function.
4063 (check_stopped_by_watchpoint): New function, factored out from
4064 linux_low_filter_event.
4065 (lp_status_maybe_breakpoint): Delete function.
4066 (linux_low_filter_event): Remove filter_ptid argument.
4067 Leave thread group exits pending here. Store the LWP's stop PC.
4068 Always leave events pending.
4069 (linux_wait_for_event_filtered): Pull all events out of the
4070 kernel, and leave them all pending.
4071 (count_events_callback, select_event_lwp_callback): Consider all
4072 events.
4073 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4074 (select_event_lwp): Only give preference to the stepping LWP in
4075 all-stop mode. Adjust comments.
4076 (ignore_event): New function.
4077 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4078 references to cancel_breakpoints. Adjust to renames. Also give
4079 equal priority to all LWPs that have had events in non-stop mode.
4080 If reporting a software breakpoint event, unadjust the LWP's PC.
4081 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4082 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4083 Adjust.
4084 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4085 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4086 (linux_stopped_by_watchpoint): Adjust.
4087 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4088 * linux-low.h (enum lwp_stop_reason): New.
4089 (struct lwp_info) <stop_pc>: Adjust comment.
4090 <stopped_by_watchpoint>: Delete field.
4091 <stop_reason>: New field.
4092 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4093 * mem-break.c (software_breakpoint_inserted_here)
4094 (hardware_breakpoint_inserted_here): New function.
4095 * mem-break.h (software_breakpoint_inserted_here)
4096 (hardware_breakpoint_inserted_here): Declare.
4097 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4098 (cancel_breakpoints): Delete.
4099 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4100 (upload_fast_traceframes): Remove references to
4101 cancel_breakpoints.
4102
4103 2015-01-09 Pedro Alves <palves@redhat.com>
4104
4105 * thread-db.c (find_new_threads_callback): Ignore thread if the
4106 kernel thread ID is -1.
4107
4108 2015-01-09 Pedro Alves <palves@redhat.com>
4109
4110 * linux-low.c (linux_attach_fail_reason_string): Move to
4111 nat/linux-ptrace.c, and rename.
4112 (linux_attach_lwp): Update comment.
4113 (attach_proc_task_lwp_callback): New function.
4114 (linux_attach): Adjust to rename and use
4115 linux_proc_attach_tgid_threads.
4116 (linux_attach_fail_reason_string): Delete declaration.
4117
4118 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4119
4120 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4121 * server.c (gdbserver_version): Likewise.
4122
4123 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4124
4125 * remote-utils.c: Include ctype.h.
4126 (input_interrupt): Explicitly handle the case when the char
4127 received is the NUL byte. Improve the printing of non-ASCII
4128 characters.
4129
4130 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4131
4132 * linux-low.c (linux_low_filter_event): Update call to
4133 linux_enable_event_reporting following the addition of
4134 a new parameter to that function.
4135
4136 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4137
4138 PR server/17457
4139 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4140 (AARCH64_FPCR_REGNO): Likewise.
4141 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4142 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4143 (aarch64_store_fpregset): Likewise.
4144
4145 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4146
4147 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4148 Remove FIXME comment about assumption about N.
4149
4150 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4151
4152 * configure.ac: If large-file support is disabled in GDBserver,
4153 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4154 * configure: Regenerate.
4155
4156 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4157
4158 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4159 warning upon ENODATA from ptrace.
4160 * linux-s390-low.c (s390_store_tdb): New.
4161 (s390_regsets): Add regset for NT_S390_TDB.
4162
4163 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4164
4165 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4166 without a fill_function.
4167 * linux-s390-low.c (s390_fill_last_break): Remove.
4168 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4169 (s390_arch_setup): Use regset's size instead of fill_function for
4170 loop end condition.
4171
4172 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4173
4174 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4175 the regset's store function when ptrace returned an error.
4176 * regcache.c (get_thread_regcache): Invalidate register cache
4177 before fetching inferior's registers.
4178
4179 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4180
4181 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4182 while-loop as for-loop.
4183 (regsets_store_inferior_registers): Likewise.
4184
4185 2014-11-28 Yao Qi <yao@codesourcery.com>
4186
4187 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4188 * config.in, configure: Re-generate.
4189 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4190 is defined.
4191
4192 2014-11-21 Yao Qi <yao@codesourcery.com>
4193
4194 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4195 (AC_CHECK_HEADERS): Remove malloc.h.
4196 * configure: Re-generated.
4197 * config.in: Re-generated.
4198 * server.h: Don't include alloca.h and malloc.h.
4199 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4200 Don't include malloc.h.
4201
4202 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4203
4204 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4205 corresponding ERRNO check in same block.
4206
4207 2014-11-12 Pedro Alves <palves@redhat.com>
4208
4209 * server.c (cont_thread): Update comment.
4210 (start_inferior, attach_inferior): No longer clear cont_thread.
4211 (handle_v_cont): No longer set cont_thread.
4212 (captured_main): Clear cont_thread each time a GDB connects.
4213
4214 2014-11-12 Pedro Alves <palves@redhat.com>
4215
4216 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4217 thread, and don't resume all threads if the Hc thread has exited.
4218
4219 2014-11-12 Pedro Alves <palves@redhat.com>
4220
4221 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4222 the process group instead of to a specific LWP.
4223
4224 2014-10-15 Pedro Alves <palves@redhat.com>
4225
4226 PR server/17487
4227 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4228 parameter.
4229 (arm_set_thread_context): Delete.
4230 (the_low_target): Adjust.
4231 * win32-i386-low.c (debug_registers_changed)
4232 (debug_registers_used): Delete.
4233 (update_debug_registers_callback): New function.
4234 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4235 needing to update their debug registers.
4236 (win32_get_current_dr): New function.
4237 (x86_dr_low_get_addr, x86_dr_low_get_control)
4238 (x86_dr_low_get_status): Fetch the debug register from the thread
4239 record's context.
4240 (i386_initial_stuff): Adjust.
4241 (i386_get_thread_context): Remove current_event parameter. Don't
4242 clear debug_registers_changed nor copy DR values to
4243 debug_reg_state.
4244 (i386_set_thread_context): Delete.
4245 (i386_prepare_to_resume): New function.
4246 (i386_thread_added): Mark the thread as needing to update irs
4247 debug registers.
4248 (the_low_target): Remove i386_set_thread_context and install
4249 i386_prepare_to_resume.
4250 * win32-low.c (win32_get_thread_context): Adjust.
4251 (win32_set_thread_context): Use SetThreadContext
4252 directly.
4253 (win32_prepare_to_resume): New function.
4254 (win32_require_context): New function, factored out from ...
4255 (thread_rec): ... this.
4256 (continue_one_thread): Call win32_prepare_to_resume on each thread
4257 we're about to continue.
4258 (win32_resume): Call win32_prepare_to_resume on the event thread.
4259 * win32-low.h (struct win32_thread_info)
4260 <debug_registers_changed>: New field.
4261 (struct win32_target_ops): Change prototype of set_thread_context,
4262 delete set_thread_context and add prepare_to_resume.
4263 (win32_require_context): New declaration.
4264
4265 2014-10-08 Gary Benson <gbenson@redhat.com>
4266
4267 * server.h: Do not include common-exceptions.h.
4268
4269 2014-10-08 Gary Benson <gbenson@redhat.com>
4270
4271 * server.h: Do not include cleanups.h.
4272
4273 2014-09-30 James Hogan <james.hogan@imgtec.com>
4274
4275 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4276 mips64-dsp-linux.c.
4277
4278 2014-09-23 Yao Qi <yao@codesourcery.com>
4279
4280 * linux-low.c (lp_status_maybe_breakpoint): New function.
4281 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4282 (count_events_callback): Likewise.
4283 (select_event_lwp_callback): Likewise.
4284 (cancel_breakpoints_callback): Likewise.
4285
4286 2014-09-19 Don Breazeal <donb@codesourcery.com>
4287
4288 * linux-low.c (handle_extended_wait): Call
4289 linux_ptrace_get_extended_event.
4290 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4291 linux_is_extended_waitstatus.
4292
4293 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4294
4295 * Makefile.in (CPPFLAGS): Define.
4296 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4297 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4298
4299 2014-09-16 Gary Benson <gbenson@redhat.com>
4300
4301 * inferiors.h (current_inferior): Renamed as...
4302 (current_thread): New variable. All uses updated.
4303 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4304 (maybe_move_out_of_jump_pad): Likewise.
4305 (cancel_breakpoint): Likewise.
4306 (linux_low_filter_event): Likewise.
4307 (wait_for_sigstop): Likewise.
4308 (linux_resume_one_lwp): Likewise.
4309 (need_step_over_p): Likewise.
4310 (start_step_over): Likewise.
4311 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4312 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4313 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4314 and save_inferior as saved_thread.
4315 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4316 saved_thread.
4317 (regcache_invalidate_thread): Likewise.
4318 * remote-utils.c (prepare_resume_reply): Likewise.
4319 * thread-db.c (thread_db_get_tls_address): Likewise.
4320 (disable_thread_event_reporting): Likewise.
4321 (remove_thread_event_breakpoints): Likewise.
4322 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4323 as saved_thread.
4324 * target.h (set_desired_inferior): Renamed as...
4325 (set_desired_thread): New declaration. All uses updated.
4326 * server.c (myresume): Updated comment to reference thread instead
4327 of inferior.
4328 (handle_serial_event): Likewise.
4329 (handle_target_event): Likewise.
4330
4331 2014-09-12 Tom Tromey <tromey@redhat.com>
4332 Gary Benson <gbenson@redhat.com>
4333
4334 * regcache.h: Include common-regcache.h.
4335 (regcache_read_pc): Don't declare.
4336 * regcache.c (get_thread_regcache_for_ptid): New function.
4337
4338 2014-09-11 Tom Tromey <tromey@redhat.com>
4339 Gary Benson <gbenson@redhat.com>
4340
4341 * symbol.c: New file.
4342 * Makefile.in (SFILES): Add symbol.c.
4343 (OBS): Add symbol.o.
4344
4345 2014-09-11 Gary Benson <gbenson@redhat.com>
4346
4347 * target.c (target_stop_ptid, target_continue_ptid): New
4348 functions.
4349
4350 2014-09-11 Tom Tromey <tromey@redhat.com>
4351 Gary Benson <gbenson@redhat.com>
4352
4353 * target.h: Include target/target.h.
4354 * target.c (target_read_memory, target_read_uint32)
4355 (target_write_memory): New functions.
4356
4357 2014-09-11 Gary Benson <gbenson@redhat.com>
4358
4359 * server.h (debug_hw_points): Don't declare.
4360 * server.c (debug_hw_points): Don't define. Replace all uses
4361 with show_debug_regs.
4362 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4363 all uses with show_debug_regs.
4364
4365 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4366
4367 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4368 endianness into account.
4369 (ppc_supply_ptrace_register): Likewise.
4370
4371 2014-09-03 James Hogan <james.hogan@imgtec.com>
4372
4373 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4374 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4375
4376 2014-09-03 Gary Benson <gbenson@redhat.com>
4377
4378 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4379 ALL_DEBUG_ADDRESS_REGISTERS.
4380
4381 2014-09-02 Gary Benson <gbenson@redhat.com>
4382
4383 * i386-low.h: Renamed as...
4384 * x86-low.h: New file. All type, function and variable name
4385 prefixes changed from "i386_" to "x86_". All references updated.
4386 * i386-low.c: Renamed as...
4387 * x86-low.c: New file. All type, function and variable name
4388 prefixes changed from "i386_" to "x86_". All references updated.
4389
4390 2014-09-02 Gary Benson <gbenson@redhat.com>
4391
4392 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4393 (x86_linux_new_thread): Likewise.
4394
4395 2014-08-29 Gary Benson <gbenson@redhat.com>
4396
4397 * server.h (setjmp.h): Do not include.
4398 (toplevel): Do not declare.
4399 (common-exceptions.h): Include.
4400 (cleanups.h): Likewise.
4401 * server.c (toplevel): Do not define.
4402 (exit_code): New static global.
4403 (detach_or_kill_for_exit_cleanup): New function.
4404 (main): New function. Original main renamed to...
4405 (captured_main): New function.
4406 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4407
4408 2014-08-29 Gary Benson <gbenson@redhat.com>
4409
4410 * Makefile.in (SFILES): Add common/common-exceptions.c.
4411 (OBS): Add common-exceptions.o.
4412 (common-exceptions.o): New rule.
4413 * utils.c (prepare_to_throw_exception): New function.
4414
4415 2014-08-29 Gary Benson <gbenson@redhat.com>
4416
4417 * config.in: Regenerate.
4418 * configure: Likewise.
4419
4420 2014-08-29 Gary Benson <gbenson@redhat.com>
4421
4422 * Makefile.in (SFILES): Add common/cleanups.c.
4423 (OBS): cleanups.o.
4424 (cleanups.o): New rule.
4425
4426 2014-08-29 Gary Benson <gbenson@redhat.com>
4427
4428 * utils.c (internal_vwarning): New function.
4429
4430 2014-08-28 Gary Benson <gbenson@redhat.com>
4431
4432 * utils.h (fatal): Remove declaration.
4433 * utils.c (fatal): Remove function.
4434
4435 2014-08-28 Gary Benson <gbenson@redhat.com>
4436
4437 * tracepoint.c (gdb_agent_init): Replace fatal with
4438 perror_with_name.
4439 (initialize_tracepoint): Likewise.
4440
4441 2014-08-28 Gary Benson <gbenson@redhat.com>
4442
4443 * remote-utils.c (remote_prepare): Replace fatal with error.
4444
4445 2014-08-28 Gary Benson <gbenson@redhat.com>
4446
4447 * linux-low.c (linux_async): Replace fatal with warning.
4448 Tidy up and return.
4449 (linux_start_non_stop): Return -1 if linux_async failed.
4450
4451 2014-08-28 Gary Benson <gbenson@redhat.com>
4452
4453 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4454 gdb_assert.
4455 (i386_dr_low_get_addr): Remove vague comment.
4456 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4457 gdb_assert.
4458
4459 2014-08-28 Gary Benson <gbenson@redhat.com>
4460
4461 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4462 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4463 internal_error.
4464 (linux_resume_one_lwp): Likewise.
4465 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4466 gdb_assert.
4467 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4468 with internal_error.
4469 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4470 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4471 (find_register_by_name): Replace fatal with internal_error.
4472 (find_regno): Likewise.
4473 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4474 * thread-db.c (thread_db_create_event): Likewise.
4475 (thread_db_load_search): Likewise.
4476 (try_thread_db_load_1): Likewise.
4477 * tracepoint.c (get_jump_space_head): Replace fatal with
4478 internal_error.
4479 (claim_trampoline_space): Likewise.
4480 (have_fast_tracepoint_trampoline_buffer): Likewise.
4481 (cmd_qtstart): Likewise.
4482 (stop_tracing): Likewise.
4483 (fast_tracepoint_collecting): Likewise.
4484 (target_malloc): Likewise.
4485 (download_tracepoint): Likewise.
4486 (download_trace_state_variables): Replace check with gdb_assert.
4487 (upload_fast_traceframes): Replace fatal with internal_error.
4488
4489 2014-08-19 Tom Tromey <tromey@redhat.com>
4490 Gary Benson <gbenson@redhat.com>
4491
4492 * Makefile.in (SFILES): Add common/common-debug.c.
4493 (OBS): Add common-debug.o.
4494 (common-debug.o): New rule.
4495 * debug.h (debug_printf): Don't declare.
4496 * debug.c (debug_printf): Renamed and rewritten as...
4497 (debug_vprintf): New function.
4498
4499 2014-08-19 Gary Benson <gbenson@redhat.com>
4500
4501 * utils.h: Do not include print-utils.h.
4502
4503 2014-08-19 Tom Tromey <tromey@redhat.com>
4504 Gary Benson <gbenson@redhat.com>
4505
4506 * server.h: Add static assertion.
4507 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4508
4509 2014-08-19 Tom Tromey <tromey@redhat.com>
4510 Gary Benson <gbenson@redhat.com>
4511
4512 * Makefile.in (SFILES): Add common/errors.c.
4513 (OBS): Add errors.o.
4514 (IPA_OBS): Add errors-ipa.o.
4515 (errors.o): New rule.
4516 (errors-ipa.o): Likewise.
4517 * utils.h (perror_with_name, error, warning): Don't declare.
4518 * utils.c (warning): Renamed and rewritten as...
4519 (vwarning): New function.
4520 (error): Renamed and rewritten as...
4521 (verror): New function.
4522 (internal_error): Renamed and rewritten as...
4523 (internal_verror): New function.
4524
4525 2014-08-07 Gary Benson <gbenson@redhat.com>
4526
4527 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4528 * configure: Regenerate.
4529 * config.in: Likewise.
4530 * server.h: Do not include errno.h.
4531 * event-loop.c: Likewise.
4532 * hostio-errno.c: Likewise.
4533 * linux-low.c: Likewise.
4534 * remote-utils.c: Likewise.
4535 * spu-low.c: Likewise.
4536 * utils.c: Likewise.
4537 * gdbreplay.c: Unconditionally include errno.h.
4538
4539 2014-08-07 Gary Benson <gbenson@redhat.com>
4540
4541 * server.h: Do not include string.h.
4542 * event-loop.c: Likewise.
4543 * linux-low.c: Likewise.
4544 * regcache.c: Likewise.
4545 * remote-utils.c: Likewise.
4546 * spu-low.c: Likewise.
4547 * utils.c: Likewise.
4548
4549 2014-08-07 Gary Benson <gbenson@redhat.com>
4550
4551 * server.h: Do not include gdb_assert.h.
4552
4553 2014-08-07 Gary Benson <gbenson@redhat.com>
4554
4555 * server.h: Do not include common-utils.h.
4556
4557 2014-08-07 Gary Benson <gbenson@redhat.com>
4558
4559 * server.h: Do not include ptid.h.
4560 * notif.h: Likewise.
4561
4562 2014-08-07 Gary Benson <gbenson@redhat.com>
4563
4564 * server.h: Do not include gdb_locale.h.
4565
4566 2014-08-07 Gary Benson <gbenson@redhat.com>
4567
4568 * server.h: Do not include gdb/signals.h.
4569 * win32-low.c: Likewise.
4570
4571 2014-08-07 Gary Benson <gbenson@redhat.com>
4572
4573 * server.h: Do not include pathmax.h.
4574
4575 2014-08-07 Gary Benson <gbenson@redhat.com>
4576
4577 * server.h: Do not include libiberty.h.
4578 * linux-bfin-low.c: Likewise.
4579
4580 2014-08-07 Gary Benson <gbenson@redhat.com>
4581
4582 * server.h: Do not include ansidecl.h.
4583
4584 2014-08-07 Gary Benson <gbenson@redhat.com>
4585
4586 * linux-x86-low.c: Do not include stddef.h.
4587 * lynx-ppc-low.c: Likewise.
4588 * tracepoint.c: Likewise.
4589
4590 2014-08-07 Gary Benson <gbenson@redhat.com>
4591
4592 * server.h: Do not include stdarg.h.
4593 * nto-low.c: Likewise.
4594
4595 2014-08-07 Gary Benson <gbenson@redhat.com>
4596
4597 * server.h: Do not include stdlib.h.
4598 * inferiors.c: Likewise.
4599 * linux-low.c: Likewise.
4600 * regcache.c: Likewise.
4601 * spu-low.c: Likewise.
4602 * tracepoint.c: Likewise.
4603 * utils.c: Likewise.
4604
4605 2014-08-07 Gary Benson <gbenson@redhat.com>
4606
4607 * server.h: Do not include stdio.h.
4608 * linux-low.c: Likewise.
4609 * remote-utils.c: Likewise.
4610 * spu-low.c: Likewise.
4611 * utils.c: Likewise.
4612 * wincecompat.c: Likewise.
4613
4614 2014-08-06 Gary Benson <gbenson@redhat.com>
4615
4616 * regcache.c (init_register_cache): Move conditionals inside if.
4617
4618 2014-08-06 Gary Benson <gbenson@redhat.com>
4619
4620 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4621
4622 2014-07-31 Gary Benson <gbenson@redhat.com>
4623
4624 * ax.h: Do not include server.h.
4625 * gdbthread.h: Likewise.
4626 * lynx-low.h: Likewise.
4627 * notif.h: Likewise.
4628
4629 2014-07-30 Gary Benson <gbenson@redhat.com>
4630
4631 * server.h: Include common-defs.h.
4632 Do not include config.h or build-gnulib-gdbserver/config.h.
4633
4634 2014-07-30 Gary Benson <gbenson@redhat.com>
4635
4636 * hostio-errno.c: Move server.h to top of includes list.
4637 * inferiors.c: Likewise.
4638 * linux-x86-low.c: Likewise.
4639 * notif.c: Include server.h.
4640
4641 2014-07-24 Tom Tromey <tromey@redhat.com>
4642 Gary Benson <gbenson@redhat.com>
4643
4644 * server.h (CORE_ADDR): Now unsigned.
4645
4646 2014-07-16 Pedro Alves <palves@redhat.com>
4647
4648 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4649
4650 2014-07-15 Pedro Alves <palves@redhat.com>
4651
4652 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4653 copy.
4654
4655 2014-07-11 Pedro Alves <palves@redhat.com>
4656
4657 * linux-low.c (kill_wait_lwp): New function, based on
4658 kill_one_lwp_callback, but use my_waitpid directly.
4659 (kill_one_lwp_callback, linux_kill): Use it.
4660
4661 2014-06-23 Pedro Alves <palves@redhat.com>
4662
4663 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4664 before setting DR0..DR3.
4665
4666 2014-06-20 Gary Benson <gbenson@redhat.com>
4667
4668 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4669 * configure: Regenerated.
4670 * config.in: Likewise.
4671
4672 2014-06-20 Gary Benson <gbenson@redhat.com>
4673
4674 * Makefile.in (SFILES): Update locations for files moved
4675 from common to nat.
4676 (object file files): Reordered.
4677
4678 2014-06-20 Gary Benson <gbenson@redhat.com>
4679
4680 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4681 (i386_dr_low_set_addr): Likewise.
4682 (i386_dr_low_get_addr): Likewise.
4683 (i386_dr_low_can_set_control): Likewise.
4684 (i386_dr_low_set_control): Likewise.
4685 (i386_dr_low_get_control): Likewise.
4686 (i386_dr_low_get_status): Likewise.
4687 (i386_get_debug_register_length): Likewise.
4688 * linux-x86-low.c (i386_dr_low_set_addr):
4689 Changed signature. Made static.
4690 (i386_dr_low_get_addr): Likewise.
4691 (i386_dr_low_set_control): Likewise.
4692 (i386_dr_low_get_control): Likewise.
4693 (i386_dr_low_get_status): Likewise.
4694 (i386_dr_low): New global variable.
4695 * win32-i386-low.c (i386_dr_low_set_addr):
4696 Changed signature. Made static.
4697 (i386_dr_low_get_addr): Likewise.
4698 (i386_dr_low_set_control): Likewise.
4699 (i386_dr_low_get_control): Likewise.
4700 (i386_dr_low_get_status): Likewise.
4701 (i386_dr_low): New global variable.
4702
4703 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4704
4705 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4706 * Makefile.in (AR, AR_FLAGS): Define.
4707 * configure: Regenerate.
4708
4709 2014-06-19 Gary Benson <gbenson@redhat.com>
4710
4711 * Makefile.in (i386-dregs.o): New rule.
4712 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4713 * i386-low.c (target.h): Remove include.
4714 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4715 (DR_CONTROL_SHIFT): Likewise.
4716 (DR_CONTROL_SIZE): Likewise.
4717 (DR_RW_EXECUTE): Likewise.
4718 (DR_RW_WRITE): Likewise.
4719 (DR_RW_READ): Likewise.
4720 (DR_RW_IORW): Likewise.
4721 (DR_LEN_1): Likewise.
4722 (DR_LEN_2): Likewise.
4723 (DR_LEN_4): Likewise.
4724 (DR_LEN_8): Likewise.
4725 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4726 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4727 (DR_ENABLE_SIZE): Likewise.
4728 (DR_LOCAL_SLOWDOWN): Likewise.
4729 (DR_GLOBAL_SLOWDOWN): Likewise.
4730 (DR_CONTROL_RESERVED): Likewise.
4731 (I386_DR_CONTROL_MASK): Likewise.
4732 (I386_DR_VACANT): Likewise.
4733 (I386_DR_LOCAL_ENABLE): Likewise.
4734 (I386_DR_GLOBAL_ENABLE): Likewise.
4735 (I386_DR_DISABLE): Likewise.
4736 (I386_DR_SET_RW_LEN): Likewise.
4737 (I386_DR_GET_RW_LEN): Likewise.
4738 (I386_DR_WATCH_HIT): Likewise.
4739 (i386_wp_op_t): Likewise.
4740 (i386_show_dr): Likewise.
4741 (i386_length_and_rw_bits): Likewise.
4742 (i386_insert_aligned_watchpoint): Likewise.
4743 (i386_remove_aligned_watchpoint): Likewise.
4744 (i386_handle_nonaligned_watchpoint): Likewise.
4745 i386_update_inferior_debug_regs(): Likewise.
4746 (i386_dr_insert_watchpoint): Likewise.
4747 (i386_dr_remove_watchpoint): Likewise.
4748 (i386_dr_region_ok_for_watchpoint): Likewise.
4749 (i386_dr_stopped_data_address): Likewise.
4750 (i386_dr_stopped_by_watchpoint): Likewise.
4751
4752 2014-06-19 Gary Benson <gbenson@redhat.com>
4753
4754 * i386-low.c (i386_dr_show): Renamed to
4755 i386_show_dr and made static. All uses updated.
4756 (i386_dr_length_and_rw_bits): Renamed to
4757 i386_length_and_rw_bits and made static.
4758 All uses updated.
4759 (i386_dr_insert_aligned_watchpoint): Renamed to
4760 i386_insert_aligned_watchpoint and made static.
4761 All uses updated.
4762 (i386_dr_remove_aligned_watchpoint): Renamed to
4763 i386_remove_aligned_watchpoint and made static.
4764 All uses updated.
4765 (i386_dr_update_inferior_debug_regs): Renamed to
4766 i386_update_inferior_debug_regs and made static.
4767 All uses updated.
4768
4769 2014-06-18 Gary Benson <gbenson@redhat.com>
4770
4771 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4772 (i386_dr_low_can_set_control): Likewise.
4773 (i386_get_debug_register_length): Likewise.
4774 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4775 (i386_dr_low_can_set_control): Likewise.
4776 (i386_get_debug_register_length): Likewise.
4777
4778 2014-06-17 Gary Benson <gbenson@redhat.com>
4779
4780 * i386-low.h (i386-dregs.h): New include.
4781 (DR_FIRSTADDR): Now in i386-dregs.h.
4782 (DR_LASTADDR): Likewise.
4783 (DR_NADDR): Likewise.
4784 (DR_STATUS): Likewise.
4785 (DR_CONTROL): Likewise.
4786 (i386_debug_reg_state): Likewise.
4787 (i386_dr_insert_watchpoint): Likewise.
4788 (i386_dr_remove_watchpoint): Likewise.
4789 (i386_dr_region_ok_for_watchpoint): Likewise.
4790 (i386_dr_stopped_data_address): Likewise.
4791 (i386_dr_stopped_by_watchpoint): Likewise.
4792 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4793
4794 2014-06-18 Gary Benson <gbenson@redhat.com>
4795
4796 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4797 i386_dr_insert_watchpoint.
4798 (i386_low_remove_watchpoint): Renamed to
4799 i386_dr_remove_watchpoint.
4800 (i386_low_region_ok_for_watchpoint): Renamed to
4801 i386_dr_region_ok_for_watchpoint.
4802 (i386_low_stopped_data_address): Renamed to
4803 i386_dr_stopped_data_address.
4804 (i386_low_stopped_by_watchpoint): Renamed to
4805 i386_dr_stopped_by_watchpoint.
4806 * i386-low.c (i386_show_dr): Renamed to
4807 i386_dr_show and made nonstatic. All uses updated.
4808 (i386_length_and_rw_bits): Renamed to
4809 i386_dr_length_and_rw_bits and made nonstatic.
4810 All uses updated.
4811 (i386_insert_aligned_watchpoint): Renamed to
4812 i386_dr_insert_aligned_watchpoint and made nonstatic.
4813 All uses updated.
4814 (i386_remove_aligned_watchpoint): Renamed to
4815 i386_dr_remove_aligned_watchpoint and made nonstatic.
4816 All uses updated.
4817 (i386_update_inferior_debug_regs): Renamed to
4818 i386_dr_update_inferior_debug_regs and made nonstatic.
4819 All uses updated.
4820 (i386_low_insert_watchpoint): Renamed to
4821 i386_dr_insert_watchpoint. All uses updated.
4822 (i386_low_remove_watchpoint): Renamed to
4823 i386_dr_remove_watchpoint. All uses updated.
4824 (i386_low_region_ok_for_watchpoint): Renamed to
4825 i386_dr_region_ok_for_watchpoint. All uses updated.
4826 (i386_low_stopped_data_address): Renamed to
4827 i386_dr_stopped_data_address. All uses updated.
4828 (i386_low_stopped_by_watchpoint): Renamed to
4829 i386_dr_stopped_by_watchpoint. All uses updated.
4830
4831 2014-06-18 Gary Benson <gbenson@redhat.com>
4832
4833 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4834 (i386_dr_low_can_set_control): Likewise.
4835 (i386_insert_aligned_watchpoint): New check.
4836
4837 2014-06-18 Gary Benson <gbenson@redhat.com>
4838
4839 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4840 Renamed to state.
4841
4842 2014-06-18 Gary Benson <gbenson@redhat.com>
4843
4844 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4845 instead of fatal and error.
4846 (i386_handle_nonaligned_watchpoint): Likewise.
4847
4848 2014-06-18 Gary Benson <gbenson@redhat.com>
4849
4850 * i386-low.c (i386_get_debug_register_length): New macro.
4851 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4852 (i386_show_dr): Use debug_printf instead of fprintf. Use
4853 phex to format values.
4854
4855 2014-06-18 Gary Benson <gbenson@redhat.com>
4856
4857 * i386-low.h: Comment changes.
4858 * i386-low.c: Likewise.
4859
4860 2014-06-18 Gary Benson <gbenson@redhat.com>
4861
4862 * i386-low.c: Whitespace changes.
4863
4864 2014-06-12 Tom Tromey <tromey@redhat.com>
4865
4866 * utils.c (freeargv): Remove.
4867
4868 2014-06-12 Tom Tromey <tromey@redhat.com>
4869
4870 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4871 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4872 (parse_debug_format_options): Likewise.
4873 (gdbserver_usage): Likewise.
4874 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4875 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4876 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4877 against libiberty.
4878 ($(LIBGNU)): Depend on libiberty.
4879 (all-lib): Recurse into all subdirs.
4880 (install-only): Invoke "install" target in subdirs.
4881 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4882 targets.
4883 * configure: Rebuild.
4884 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4885 for vasprintf, vsnprintf, or gettimeofday.
4886 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4887 srv_tgtobj.
4888
4889 2014-06-05 Joel Brobecker <brobecker@adacore.com>
4890
4891 * development.sh: Delete.
4892 * Makefile.in (config.status): Adjust dependency on development.sh.
4893 * configure.ac: Adjust development.sh source call.
4894 * configure: Regenerate.
4895
4896 2014-06-02 Pedro Alves <palves@redhat.com>
4897
4898 * ax.c (gdb_free_agent_expr): New function.
4899 * ax.h (gdb_free_agent_expr): New declaration.
4900 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4901 list.
4902 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4903 static.
4904 (clear_breakpoint_conditions_and_commands): New function.
4905 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4906 (clear_breakpoint_conditions_and_commands): New declaration.
4907
4908 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4909
4910 * linux-aarch64-low.c (asm/ptrace.h): Include.
4911
4912 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4913
4914 Fix TLS access for -static -pthread.
4915 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4916 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4917 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4918
4919 2014-05-20 Pedro Alves <palves@redhat.com>
4920
4921 * linux-aarch64-low.c (aarch64_insert_point)
4922 (aarch64_remove_point): No longer check whether the type is
4923 supported here. Adjust to new interface.
4924 (the_low_target): Install aarch64_supports_z_point_type as
4925 supports_z_point_type method.
4926 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4927 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4928 instead of a Z packet char. Adjust.
4929 (arm_supports_z_point_type): New function.
4930 (arm_insert_point, arm_remove_point): Adjust to new interface.
4931 (the_low_target): Install arm_supports_z_point_type.
4932 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4933 (cris_insert_point, cris_remove_point): Adjust to new interface.
4934 Don't check whether the type is supported here.
4935 (the_low_target): Install cris_supports_z_point_type.
4936 * linux-low.c (linux_supports_z_point_type): New function.
4937 (linux_insert_point, linux_remove_point): Adjust to new interface.
4938 * linux-low.h (struct linux_target_ops) <insert_point,
4939 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4940 raw_breakpoint pointer parameter.
4941 <supports_z_point_type>: New method.
4942 * linux-mips-low.c (mips_supports_z_point_type): New function.
4943 (mips_insert_point, mips_remove_point): Adjust to new interface.
4944 Use mips_supports_z_point_type.
4945 (the_low_target): Install mips_supports_z_point_type.
4946 * linux-ppc-low.c (the_low_target): Install NULL as
4947 supports_z_point_type method.
4948 * linux-s390-low.c (the_low_target): Install NULL as
4949 supports_z_point_type method.
4950 * linux-sparc-low.c (the_low_target): Install NULL as
4951 supports_z_point_type method.
4952 * linux-x86-low.c (x86_supports_z_point_type): New function.
4953 (x86_insert_point): Adjust to new insert_point interface. Use
4954 insert_memory_breakpoint. Adjust to new
4955 i386_low_insert_watchpoint interface.
4956 (x86_remove_point): Adjust to remove_point interface. Use
4957 remove_memory_breakpoint. Adjust to new
4958 i386_low_remove_watchpoint interface.
4959 (the_low_target): Install x86_supports_z_point_type.
4960 * lynx-low.c (lynx_target_ops): Install NULL as
4961 supports_z_point_type callback.
4962 * nto-low.c (nto_supports_z_point_type): New.
4963 (nto_insert_point, nto_remove_point): Adjust to new interface.
4964 (nto_target_ops): Install nto_supports_z_point_type.
4965 * mem-break.c: Adjust intro comment.
4966 (struct raw_breakpoint) <raw_type, size>: New fields.
4967 <inserted>: Update comment.
4968 <shlib_disabled>: Delete field.
4969 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4970 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4971 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4972 (raw_bkpt_type_to_target_hw_bp_type): New function.
4973 (find_enabled_raw_code_breakpoint_at): New function.
4974 (find_raw_breakpoint_at): New type and size parameters. Use them.
4975 (insert_memory_breakpoint): New function, based off
4976 set_raw_breakpoint_at.
4977 (remove_memory_breakpoint): New function.
4978 (set_raw_breakpoint_at): Reimplement.
4979 (set_breakpoint): New, based on set_breakpoint_at.
4980 (set_breakpoint_at): Reimplement.
4981 (delete_raw_breakpoint): Go through the_target->remove_point
4982 instead of assuming memory breakpoints.
4983 (find_gdb_breakpoint_at): Delete.
4984 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4985 (find_gdb_breakpoint): New function.
4986 (set_gdb_breakpoint_at): Delete.
4987 (z_type_supported): New function.
4988 (set_gdb_breakpoint_1): New function, loosely based off
4989 set_gdb_breakpoint_at.
4990 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4991 (delete_gdb_breakpoint_at): Delete.
4992 (delete_gdb_breakpoint_1): New function, loosely based off
4993 delete_gdb_breakpoint_at.
4994 (delete_gdb_breakpoint): New function.
4995 (clear_gdb_breakpoint_conditions): Rename to ...
4996 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4997 breakpoint.
4998 (add_condition_to_breakpoint): Make static.
4999 (add_breakpoint_condition): Take a struct breakpoint pointer
5000 instead of an address. Adjust.
5001 (gdb_condition_true_at_breakpoint): Rename to ...
5002 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5003 z_type parameter.
5004 (gdb_condition_true_at_breakpoint): Reimplement.
5005 (add_breakpoint_commands): Take a struct breakpoint pointer
5006 instead of an address. Adjust.
5007 (gdb_no_commands_at_breakpoint): Rename to ...
5008 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5009 parameter. Return true if no breakpoint was found. Change debug
5010 output.
5011 (gdb_no_commands_at_breakpoint): Reimplement.
5012 (run_breakpoint_commands): Rename to ...
5013 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5014 and change return type to boolean.
5015 (run_breakpoint_commands): New function.
5016 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5017 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5018 breakpoint. Go through the_target->remove_point instead of
5019 assuming memory breakpoint.
5020 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5021 software and hardware breakpoints.
5022 (reinsert_raw_breakpoint): Go through the_target->insert_point
5023 instead of assuming memory breakpoint.
5024 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5025 software and hardware breakpoints.
5026 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5027 Check both software and hardware breakpoints.
5028 (validate_inserted_breakpoint): Assert the breakpoint is a
5029 software breakpoint. Set the inserted flag to -1 instead of
5030 setting shlib_disabled.
5031 (delete_disabled_breakpoints): Adjust.
5032 (validate_breakpoints): Only validate software breakpoints.
5033 Adjust to inserted flag change.
5034 (check_mem_read, check_mem_write): Skip breakpoint types other
5035 than software breakpoints. Adjust to inserted flag change.
5036 * mem-break.h (enum raw_bkpt_type): New enum.
5037 (raw_breakpoint, struct process_info): Forward declare.
5038 (Z_packet_to_target_hw_bp_type): Delete declaration.
5039 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5040 (set_gdb_breakpoint, delete_gdb_breakpoint)
5041 (clear_breakpoint_conditions): New declarations.
5042 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5043 (breakpoint_inserted_here): Update comment.
5044 (add_breakpoint_condition, add_breakpoint_commands): Replace
5045 address parameter with a breakpoint pointer parameter.
5046 (gdb_breakpoint_here): Update comment.
5047 (delete_gdb_breakpoint_at): Delete.
5048 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5049 * server.c (process_point_options): Take a struct breakpoint
5050 pointer instead of an address. Adjust.
5051 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5052 delete_gdb_breakpoint.
5053 * spu-low.c (spu_target_ops): Install NULL as
5054 supports_z_point_type method.
5055 * target.h: Include mem-break.h.
5056 (struct target_ops) <prepare_to_access_memory>: Update comment.
5057 <supports_z_point_type>: New field.
5058 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5059 instead of a char. Also take a raw breakpoint pointer.
5060 * win32-arm-low.c (the_low_target): Install NULL as
5061 supports_z_point_type.
5062 * win32-i386-low.c (i386_supports_z_point_type): New function.
5063 (i386_insert_point, i386_remove_point): Adjust to new interface.
5064 (the_low_target): Install i386_supports_z_point_type.
5065 * win32-low.c (win32_supports_z_point_type): New function.
5066 (win32_insert_point, win32_remove_point): Adjust to new interface.
5067 (win32_target_ops): Install win32_supports_z_point_type.
5068 * win32-low.h (struct win32_target_ops):
5069 <supports_z_point_type>: New method.
5070 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5071 instead of a char. Also take a raw breakpoint pointer.
5072
5073 2014-05-20 Pedro Alves <palves@redhat.com>
5074
5075 * mem-break.h: Include break-common.h.
5076 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5077 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5078 (Z_packet_to_target_hw_bp_type): New declaration.
5079 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5080 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5081 (Z_PACKET_ACCESS_WP): Delete macros.
5082 (Z_packet_to_hw_type): Delete function.
5083 * i386-low.h: Don't include break-common.h here.
5084 (Z_packet_to_hw_type): Delete declaration.
5085 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5086 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5087 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5088 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5089 * linux-aarch64-low.c: Don't include break-common.h here.
5090 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5091 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5092 (Z_packet_to_target_hw_bp_type): Delete function.
5093 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5094 function.
5095 (mips_insert_point, mips_remove_point): Use
5096 Z_packet_to_target_hw_bp_type.
5097
5098 2014-05-20 Pedro Alves <palves@redhat.com>
5099
5100 * linux-aarch64-low.c: Include break-common.h.
5101 (enum target_point_type): Delete.
5102 (Z_packet_to_point_type): Rename to ...
5103 (Z_packet_to_target_hw_bp_type): ... this, and return a
5104 target_hw_bp_type instead.
5105 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5106 instead of an enum target_point_type.
5107 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5108 breakpoint type.
5109 (aarch64_dr_state_insert_one_point)
5110 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5111 (aarch64_handle_aligned_watchpoint)
5112 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5113 Take an enum target_hw_bp_type instead of an enum
5114 target_point_type.
5115 (aarch64_supports_z_point_type): New function.
5116 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5117 use Z_packet_to_target_hw_bp_type.
5118
5119 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5120
5121 * configure.ac: Only use -Werror by default when DEVELOPMENT
5122 is true.
5123 * configure: Regenerate.
5124
5125 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5126
5127 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5128 * linux-x86-low.c (X86_64_USER_REGS): New.
5129 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5130
5131 2014-04-28 Yao Qi <yao@codesourcery.com>
5132
5133 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5134 name.
5135
5136 2014-04-25 Pedro Alves <palves@redhat.com>
5137
5138 PR server/16255
5139 * linux-low.c (linux_attach_fail_reason_string): New function.
5140 (linux_attach_lwp): Delete.
5141 (linux_attach_lwp_1): Rename to ...
5142 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5143 argument. Remove "initial" parameter. Return int instead of
5144 void. Don't error or warn here.
5145 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5146 failure to attach to the tgid. Call warning when failing to
5147 attach to an lwp.
5148 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5149 argument. Remove "initial" parameter. Return int instead of
5150 void. Don't error or warn here.
5151 (linux_attach_fail_reason_string): New declaration.
5152 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5153 interface change. Use linux_attach_fail_reason_string.
5154
5155 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5156 Walfred Tedeschi <walfred.tedeschi@intel.com>
5157
5158 * Makefile.in: Added rules to handle new files
5159 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5160 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5161 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5162 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5163 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5164 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5165 x32-avx512-linux.o.
5166 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5167 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5168 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5169 i386/x32-avx512.xml.
5170 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5171 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5172 i386/x32-avx512-linux.xml.
5173 * i387-fp.c (num_avx512_k_registers): New constant for number
5174 of K registers.
5175 (num_avx512_zmmh_low_registers): New constant for number of
5176 lower ZMM registers (0-15).
5177 (num_avx512_zmmh_high_registers): New constant for number of
5178 higher ZMM registers (16-31).
5179 (num_avx512_ymmh_registers): New contant for number of higher
5180 YMM registers (ymm16-31 added by avx521 on x86_64).
5181 (num_avx512_xmm_registers): New constant for number of higher
5182 XMM registers (xmm16-31 added by AVX512 on x86_64).
5183 (struct i387_xsave): Add space for AVX512 registers.
5184 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5185 Add code to handle AVX512 registers.
5186 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5187 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5188 prototypei from generated file.
5189 (tdesc_amd64_avx512_linux): Likewise.
5190 (init_registers_x32_avx512_linux): Likewise.
5191 (tdesc_x32_avx512_linux): Likewise.
5192 (init_registers_i386_avx512_linux): Likewise.
5193 (tdesc_i386_avx512_linux): Likewise.
5194 (x86_64_regmap): Add AVX512 registers.
5195 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5196 mask.
5197 (initialize_low_arch): Add code to initialize AVX512 registers.
5198
5199 2014-04-23 Pedro Alves <palves@redhat.com>
5200
5201 * mem-break.c (find_gdb_breakpoint_at): Make static.
5202 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5203
5204 2014-04-23 Pedro Alves <palves@redhat.com>
5205
5206 * i386-low.c: Don't include break-common.h here.
5207 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5208 prototype to take target_hw_bp_type as argument instead of a Z
5209 packet char.
5210 * i386-low.h: Include break-common.h here.
5211 (Z_packet_to_hw_type): Declare.
5212 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5213 prototypes.
5214 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5215 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5216 (x86_remove_point): Convert the packet number to a
5217 target_hw_bp_type before calling i386_low_remove_watchpoint.
5218 * win32-i386-low.c (i386_insert_point): Convert the packet number
5219 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5220 (i386_remove_point): Convert the packet number to a
5221 target_hw_bp_type before calling i386_low_remove_watchpoint.
5222
5223 2014-04-23 Pedro Alves <palves@redhat.com>
5224
5225 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5226
5227 2014-04-10 Pedro Alves <palves@redhat.com>
5228
5229 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5230 Check if the condition or command is NULL before checking if the
5231 breakpoint is known. On success, return true.
5232 * mem-break.h (add_breakpoint_condition): Document return.
5233 (add_breakpoint_commands): Add describing comment.
5234 * server.c (skip_to_semicolon): New function.
5235 (process_point_options): Use it.
5236
5237 2014-04-09 Pedro Alves <palves@redhat.com>
5238
5239 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5240 to lwpid_of.
5241
5242 2014-02-27 Pedro Alves <palves@redhat.com>
5243
5244 PR 12702
5245 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5246 macros.
5247 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5248 output.
5249 (last_thread_of_process_p): Take a PID argument instead of a
5250 thread pointer.
5251 (linux_wait_for_lwp): Delete.
5252 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5253 functions.
5254 (linux_low_filter_event): New function, party factored out from
5255 linux_wait_for_event.
5256 (linux_wait_for_event): Rename to ...
5257 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5258 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5259 sigsuspend. Check for zombie leaders.
5260 (linux_wait_for_event): Reimplement as wrapper around
5261 linux_wait_for_event_filtered.
5262 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5263 a normal or signal exit is seen, it's the whole process exiting.
5264 (wait_for_sigstop): No longer a for_each_inferior callback.
5265 Rewrite on top of linux_wait_for_event_filtered.
5266 (stop_all_lwps): Call wait_for_sigstop directly.
5267 * server.c (resume, handle_target_event): Handle
5268 TARGET_WAITKIND_NO_RESUMED.
5269
5270 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5271
5272 * win32-low.c (psapi_get_dll_name,
5273 * win32_CreateToolhelp32Snapshot): Delete.
5274 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5275 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5276 Delete.
5277 (handle_load_dll): Add function description.
5278 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5279
5280 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5281
5282 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5283 Add comment.
5284 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5285 base address when calling win32_add_one_solib.
5286 (handle_load_dll): Delete local variable load_addr.
5287 Remove 0x1000 offset applied to DLL base address when calling
5288 win32_add_one_solib.
5289 (handle_unload_dll): Add comment.
5290
5291 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5292
5293 * win32-low.c (win32_add_all_dlls): Renames
5294 win32_ensure_ntdll_loaded. Rewrite function documentation.
5295 Adjust implementation to always load all DLLs.
5296 Add 0x1000 offset to DLL base address when calling
5297 win32_add_one_solib.
5298 (child_initialization_done): New static global.
5299 (do_initial_child_stuff): Set child_initialization_done to
5300 zero during child initialization, and 1 after. Replace call
5301 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5302 Add comment.
5303 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5304 (handle_unload_dll): Add function documentation.
5305 (get_child_debug_event): Ignore load and unload DLL events
5306 during child initialization.
5307
5308 2014-02-20 Doug Evans <dje@google.com>
5309
5310 Remove global all_lwps.
5311 * inferiors.h (ptid_of): Move here from linux-low.h.
5312 (pid_of, lwpid_of): Ditto.
5313 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5314 parameter is a struct thread_info * now.
5315 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5316 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5317 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5318 directly.
5319 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5320 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5321 * linux-arm-low.c (update_registers_callback): Update, "entry"
5322 parameter is a struct thread_info * now.
5323 Fetch lwpid from current_inferior directly.
5324 (arm_insert_point): Pass &all_threads to find_inferior instead of
5325 &all_lwps.
5326 (arm_remove_point): Ditto.
5327 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5328 (arm_prepare_to_resume): Fetch pid from thread.
5329 (arm_read_description): Fetch lwpid from current_inferior directly.
5330 * linux-low.c (all_lwps): Delete.
5331 (delete_lwp): Delete call to remove_inferior.
5332 (handle_extended_wait): Fetch lwpid from thread.
5333 (add_lwp): Don't set lwp->entry.id. Remove call to
5334 add_inferior_to_list.
5335 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5336 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5337 (kill_one_lwp_callback): Ditto.
5338 (linux_kill): Don't dereference NULL pointer.
5339 Fetch ptid,lwpid from thread.
5340 (get_detach_signal): Fetch ptid from thread.
5341 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5342 Simplify call to regcache_invalidate_thread.
5343 (delete_lwp_callback): Update, "entry" parameter is a
5344 struct thread_info * now. Fetch pid from thread.
5345 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5346 (status_pending_p_callback): Update, "entry" parameter is a
5347 struct thread_info * now. Fetch ptid from thread.
5348 (find_lwp_pid): Update, "entry" parameter is a
5349 struct thread_info * now.
5350 (linux_wait_for_lwp): Fetch pid from thread.
5351 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5352 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5353 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5354 (dequeue_one_deferred_signal): Ditto.
5355 (cancel_breakpoint): Fetch ptid from current_inferior.
5356 (linux_wait_for_event): Pass &all_threads to find_inferior,
5357 not &all_lwps. Fetch ptid, lwpid from thread.
5358 (count_events_callback): Update, "entry" parameter is a
5359 struct thread_info * now.
5360 (select_singlestep_lwp_callback): Ditto.
5361 (select_event_lwp_callback): Ditto.
5362 (cancel_breakpoints_callback): Ditto.
5363 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5364 not &all_lwps.
5365 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5366 (unsuspend_one_lwp): Update, "entry" parameter is a
5367 struct thread_info * now.
5368 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5369 not &all_lwps.
5370 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5371 Fetch lwpid from thread, not lwp.
5372 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5373 Pass &all_threads to find_inferior, not &all_lwps.
5374 (send_sigstop): Fetch lwpid from thread, not lwp.
5375 (send_sigstop_callback): Update, "entry" parameter is a
5376 struct thread_info * now.
5377 (suspend_and_send_sigstop_callback): Ditto.
5378 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5379 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5380 struct thread_info * now.
5381 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5382 from thread, lwp.
5383 (lwp_running): Update, "entry" parameter is a
5384 struct thread_info * now.
5385 (stop_all_lwps): Fetch ptid from thread.
5386 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5387 (linux_resume_one_lwp): Fetch lwpid from thread.
5388 (linux_set_resume_request): Update, "entry" parameter is a
5389 struct thread_info * now. Fetch pid, lwpid from thread.
5390 (resume_status_pending_p): Update, "entry" parameter is a
5391 struct thread_info * now.
5392 (need_step_over_p): Ditto. Fetch lwpid from thread.
5393 (start_step_over): Fetch lwpid from thread.
5394 (linux_resume_one_thread): Update, "entry" parameter is a
5395 struct thread_info * now. Fetch lwpid from thread.
5396 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5397 (proceed_one_lwp): Update, "entry" parameter is a
5398 struct thread_info * now. Fetch lwpid from thread.
5399 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5400 struct thread_info * now.
5401 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5402 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5403 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5404 directly.
5405 (regsets_store_inferior_registers): Ditto.
5406 (fetch_register, store_register): Ditto.
5407 (linux_read_memory, linux_write_memory): Ditto.
5408 (linux_request_interrupt): Ditto.
5409 (linux_read_auxv): Ditto.
5410 (linux_xfer_siginfo): Ditto.
5411 (linux_qxfer_spu): Ditto.
5412 (linux_qxfer_libraries_svr4): Ditto.
5413 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5414 moved to inferiors.h.
5415 (get_lwp): Delete.
5416 (get_thread_lwp): Update.
5417 (struct lwp_info): Delete member "entry". Simplify comment for
5418 member "thread".
5419 (all_lwps): Delete.
5420 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5421 current_inferior directly.
5422 (update_watch_registers_callback): Update, "entry" parameter is a
5423 struct thread_info * now. Fetch pid from thread.
5424 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5425 (mips_insert_point): Fetch lwpid from current_inferior.
5426 Pass &all_threads to find_inferior, not &all_lwps.
5427 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5428 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5429 directly.
5430 (mips_stopped_data_address): Ditto.
5431 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5432 directly.
5433 * linux-tile-low.c (tile_arch_setup): Ditto.
5434 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5435 (update_debug_registers_callback): Update, "entry" parameter is a
5436 struct thread_info * now. Fetch pid from thread.
5437 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5438 Pass &all_threads to find_inferior, not &all_lwps.
5439 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5440 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5441 Pass &all_threads to find_inferior, not &all_lwps.
5442 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5443 (i386_dr_low_get_status): Ditto.
5444 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5445 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5446 (x86_linux_read_description): Ditto.
5447 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5448
5449 2014-02-20 Doug Evans <dje@google.com>
5450
5451 * inferiors.c (get_first_inferior): Fix buglet.
5452
5453 2014-02-19 Doug Evans <dje@google.com>
5454
5455 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5456 * inferiors.c (add_thread): Change result type to struct thread_info *.
5457 All callers updated.
5458 (add_lwp): Call add_thread here instead of in callers.
5459 All callers updated.
5460 * linux-low.h (get_lwp_thread): Rewrite.
5461 (struct lwp_info): New member "thread".
5462
5463 2014-02-19 Doug Evans <dje@google.com>
5464
5465 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5466 All callers updated.
5467
5468 2014-02-19 Doug Evans <dje@google.com>
5469
5470 * inferiors.c (add_thread): Fix whitespace.
5471
5472 2014-02-19 Doug Evans <dje@google.com>
5473
5474 * dll.c (clear_dlls): Replace accessing list implemention details
5475 with API function.
5476 * gdbthread.h (get_first_thread): Declare.
5477 * inferiors.c (for_each_inferior_with_data): New function.
5478 (get_first_thread): New function.
5479 (find_thread_ptid): Simplify.
5480 (get_first_inferior): New function.
5481 (clear_list): Delete.
5482 (one_inferior_p): New function.
5483 (clear_inferior_list): New function.
5484 (clear_inferiors): Update.
5485 * inferiors.h (for_each_inferior_with_data): Declare.
5486 (clear_inferior_list): Declare.
5487 (one_inferior_p): Declare.
5488 (get_first_inferior): Declare.
5489 * linux-low.c (linux_wait_for_event): Replace accessing list
5490 implemention details with API function.
5491 * server.c (target_running): Ditto.
5492 (accumulate_file_name_length): New function.
5493 (emit_dll_description): New function.
5494 (handle_qxfer_libraries): Replace accessing list implemention
5495 details with API function.
5496 (handle_qxfer_threads_worker): New function.
5497 (handle_qxfer_threads_proper): Replace accessing list implemention
5498 details with API function.
5499 (handle_query): Ditto.
5500 (visit_actioned_threads_callback_ftype): New typedef.
5501 (visit_actioned_threads_data): New struct.
5502 (visit_actioned_threads): Rewrite to be find_inferior callback.
5503 (resume): Call find_inferior.
5504 (handle_status): Replace accessing list implemention
5505 details with API function.
5506 (process_serial_event): Replace accessing list implemention details
5507 with API function.
5508 * target.c (set_desired_inferior): Replace accessing list implemention
5509 details with API function.
5510 * tracepoint.c (same_process_p): New function.
5511 (gdb_agent_about_to_close): Replace accessing list implemention
5512 details with API function.
5513 * win32-low.c (child_delete_thread): Replace accessing list
5514 implemention details with API function.
5515 (match_dll_by_basename): New function.
5516 (dll_is_loaded_by_basename): New function.
5517 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5518 details call to dll_is_loaded_by_basename.
5519
5520 2014-02-19 Doug Evans <dje@google.com>
5521
5522 * dll.h (struct dll_info): Add comment.
5523 * gdbthread.h (struct thread_info): Add comment.
5524 (current_ptid): Simplify.
5525 * inferiors.c (add_process): Update.
5526 (remove_process): Update.
5527 * inferiors.h (struct process_info): Rename member "head" to "entry".
5528 * linux-low.c (delete_lwp): Update.
5529 (add_lwp): Update.
5530 (last_thread_of_process_p): Update.
5531 (kill_one_lwp_callback, linux_kill): Update.
5532 (status_pending_p_callback): Update.
5533 (wait_for_sigstop): Update. Simplify read of ptid.
5534 (start_step_over): Update.
5535 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5536 (get_lwp_thread): Update.
5537 (struct lwp_info): Rename member "head" to "entry".
5538 * regcache.h (inferior_list_entry): Delete.
5539 * server.c (kill_inferior_callback): Update.
5540 (detach_or_kill_inferior_callback): Update.
5541 (print_started_pid): Update.
5542 (print_attached_pid): Update.
5543 (process_serial_event): Simplify read of ptid.
5544 * thread-db.c (thread_db_create_event): Update.
5545 (thread_db_get_tls_address): Update.
5546 * win32-low.c (current_inferior_ptid): Simplify.
5547
5548 2014-02-19 Tom Tromey <tromey@redhat.com>
5549
5550 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5551 argument.
5552 (target_supports_btrace): Update.
5553
5554 2014-02-14 Yao Qi <yao@codesourcery.com>
5555
5556 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5557 (rsp-low-ipa.o): New target.
5558
5559 2014-02-12 Tom Tromey <tromey@redhat.com>
5560
5561 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5562 convert_ascii_to_int.
5563 * regcache.c (registers_to_string): Likewise.
5564 * remote-utils.c (decode_M_packet): Likewise.
5565 * server.c (process_serial_event): Likewise.
5566
5567 2014-02-12 Tom Tromey <tromey@redhat.com>
5568
5569 * server.c (handle_query, handle_v_run): Use hex2bin, not
5570 unhexify.
5571 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5572
5573 2014-02-12 Tom Tromey <tromey@redhat.com>
5574
5575 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5576 convert_int_to_ascii.
5577 * regcache.c (registers_to_string, collect_register_as_string):
5578 Likewise.
5579 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5580 Likewise.
5581 * server.c (process_serial_event): Likewise.
5582 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5583 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5584
5585 2014-02-12 Tom Tromey <tromey@redhat.com>
5586
5587 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5588 bin2hex, not hexify.
5589 * tracepoint.c (cmd_qtstatus): Likewise.
5590
5591 2014-02-12 Tom Tromey <tromey@redhat.com>
5592
5593 * remote-utils.c (monitor_output): Pass explicit length to
5594 hexify.
5595
5596 2014-02-12 Tom Tromey <tromey@redhat.com>
5597
5598 * tracepoint.c: Include rsp-low.h.
5599 * server.c: Include rsp-low.h.
5600 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5601 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5602 declare.
5603 * remote-utils.c: Include rsp-low.h.
5604 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5605 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5606 (convert_int_to_ascii, convert_ascii_to_int): Move to
5607 common/rsp-low.c.
5608 * regcache.c: Include rsp-low.h.
5609 * ax.c: Include rsp-low.h.
5610 * Makefile.in (SFILES): Add common/rsp-low.c.
5611 (OBS): Add rsp-low.o.
5612 (rsp-low.o): New target.
5613
5614 2014-02-12 Tom Tromey <tromey@redhat.com>
5615
5616 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5617 Include print-utils.h.
5618 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5619 (plongest, thirty_two, phex_nz): Remove.
5620 * Makefile.in (SFILES): Add common/print-utils.c.
5621 (OBS): Add print-utils.o.
5622 (print-utils-ipa.o): New target.
5623 (print-utils.o): New target.
5624 (IPA_OBJS): Add print-utils-ipa.o.
5625
5626 2014-02-06 Tom Tromey <tromey@redhat.com>
5627
5628 * Makefile.in (SFILES): Fix indentation.
5629
5630 2014-02-05 Doug Evans <dje@google.com>
5631
5632 * linux-low.c (linux_wait_for_event): Improve comment.
5633 (linux_wait_1): Keep current_inferior in sync with event_child.
5634
5635 2014-01-22 Doug Evans <dje@google.com>
5636
5637 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5638
5639 2014-01-22 Doug Evans <dje@google.com>
5640
5641 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5642 * configure: Regenerate.
5643 * config.in: Regenerate.
5644 * Makefile.in (SFILES): Add debug.c.
5645 (OBS): Add debug.o.
5646 * debug.c: New file.
5647 * debug.h: New file.
5648 * linux-aarch64-low.c (*): Update all debugging printfs to use
5649 debug_printf instead of fprintf.
5650 * linux-arm-low.c (*): Ditto.
5651 * linux-cris-low.c (*): Ditto.
5652 * linux-crisv32-low.c (*): Ditto.
5653 * linux-m32r-low.c (*): Ditto.
5654 * linux-sparc-low.c (*): Ditto.
5655 * linux-x86.c (*): Ditto.
5656 * linux-low.c (*): Ditto.
5657 (linux_wait_1): Add calls to debug_enter, debug_exit.
5658 (linux_wait): Remove redundant debugging printf.
5659 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5660 (linux_resume, unstop_all_lwps): Ditto.
5661 * mem-break.c (*): Update all debugging printfs to use
5662 debug_printf instead of fprintf.
5663 * remote-utils.c (*): Ditto.
5664 * thread-db.c (*): Ditto.
5665 * server.c #include <ctype.h>, "gdb_vecs.h".
5666 (debug_threads): Moved to debug.c.
5667 (*): Update all debugging printfs to use debug_printf instead of
5668 fprintf.
5669 (start_inferior): Replace call to fflush with call to debug_flush.
5670 (monitor_show_help): Mention set debug-format.
5671 (parse_debug_format_options): New function.
5672 (handle_monitor_command): Handle "monitor set debug-format".
5673 (gdbserver_usage): Mention --debug-format.
5674 (main): Parse --debug-format.
5675 * server.h (debug_threads): Declaration moved to debug.h.
5676 #include "debug.h".
5677 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5678 trace_debug_1 that uses debug_printf.
5679 (tracepoint_look_up_symbols): Update all debugging printfs to use
5680 debug_printf instead of fprintf.
5681
5682 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5683
5684 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5685 sys/ptrace.h.
5686
5687 2014-01-17 Pedro Alves <palves@redhat.com>
5688
5689 PR build/16445
5690 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5691 defined after including gdb_proc_service.h.
5692
5693 2014-01-16 Doug Evans <dje@google.com>
5694
5695 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5696 (match_dll): Use it.
5697
5698 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5699
5700 * target.h (target_ops) <read_btrace>: Change parameters and
5701 return type to allow error reporting.
5702 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5703 trace reading errors on.
5704 * linux-low.c (linux_low_read_btrace): Pass trace reading
5705 errors on.
5706 (linux_low_disable_btrace): New.
5707
5708 2014-01-15 Doug Evans <dje@google.com>
5709
5710 * inferiors.c (thread_id_to_gdb_id): Delete.
5711 * inferiors.h (thread_id_to_gdb_id): Delete.
5712
5713 2014-01-13 Eli Zaretskii <eliz@gnu.org>
5714
5715 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5716 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5717 versions.
5718
5719 2014-01-08 Pedro Alves <palves@redhat.com>
5720
5721 * server.c (handle_status): Don't discard previous queued stop
5722 replies or thread's pending status here.
5723 (main) <disconnection>: Do it here instead.
5724
5725 2014-01-08 Pedro Alves <palves@redhat.com>
5726
5727 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5728 * server.c (visit_actioned_threads, handle_pending_status): New
5729 function.
5730 (handle_v_cont): Factor out parts to ...
5731 (resume): ... this new function. If in all-stop, and a thread
5732 being resumed has a pending status, report it without actually
5733 resuming.
5734 (myresume): Adjust to use the new 'resume' function.
5735 (clear_pending_status_callback, set_pending_status_callback)
5736 (find_status_pending_thread_callback): New functions.
5737 (handle_status): Handle the case of multiple threads having
5738 interesting statuses to report. Report threads' real last signal
5739 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5740 with an interesting thread to report the status for, instead of
5741 always reporting the status of the first thread.
5742
5743 2014-01-01 Joel Brobecker <brobecker@adacore.com>
5744
5745 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5746 * gdbreplay.c (gdbreplay_version): Likewise.
5747
5748 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5749
5750 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5751 iov.iov_len with the real length in use.
5752
5753 2013-12-13 Joel Brobecker <brobecker@adacore.com>
5754
5755 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5756 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5757 for all targets that use win32-low.c.
5758 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5759 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5760
5761 2013-12-13 Pedro Alves <palves@redhat.com>
5762
5763 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5764 if equal to TARGET_WAITKIND_LOADED.
5765 * win32-low.c (cached_status): New static global.
5766 (win32_wait): Add declaration.
5767 (do_initial_child_stuff): Flush all initial pending debug events
5768 up to the initial breakpoint.
5769 (win32_wait): If CACHED_STATUS was set, return that instead
5770 of doing a real wait. Remove the code resuming the execution
5771 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5772 during the initial phase. Also remove the code changing
5773 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5774 TARGET_WAITKIND_STOPPED.
5775
5776 2013-12-11 Yao Qi <yao@codesourcery.com>
5777
5778 * notif.c (handle_notif_ack): Return 0 if no notification
5779 matches.
5780
5781 2013-11-20 Doug Evans <dje@google.com>
5782
5783 * linux-low.c (linux_set_resume_request): Fix comment.
5784
5785 2013-11-20 Doug Evans <dje@google.com>
5786
5787 * linux-low.c (resume_status_pending_p): Tweak comment.
5788
5789 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5790
5791 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5792 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5793 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5794 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5795 (srv_amd64_regobj): Add amd64-mpx.o.
5796 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5797 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5798 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5799 * i387-fp.c (num_pl_bnd_register) Added constant.
5800 (num_pl_bnd_cfg_registers) Added constant.
5801 (struct i387_xsave) Added reserved area and MPX fields.
5802 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5803 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5804 function.
5805 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5806 (init_registers_amd64_mpx_linux): Declare new function.
5807 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5808 (x86_64_regmap): Add MPX registers.
5809 (x86_linux_read_description): Add MPX case.
5810 (initialize_low_arch): Initialize MPX targets.
5811
5812 2013-11-18 Tom Tromey <tromey@redhat.com>
5813
5814 * configure: Rebuild.
5815 * configure.ac: Don't check for stdlib.h.
5816 * gdbreplay.c: Unconditionally include stdlib.h.
5817
5818 2013-11-18 Tom Tromey <tromey@redhat.com>
5819
5820 * config.in: Rebuild.
5821 * configure: Rebuild.
5822 * configure.ac: Don't use AC_HEADER_DIRENT.
5823
5824 2013-11-18 Tom Tromey <tromey@redhat.com>
5825
5826 * server.h: Don't check HAVE_STRING_H.
5827 * gdbreplay.c: Don't check HAVE_STRING_H.
5828 * configure: Rebuild.
5829
5830 2013-11-18 Tom Tromey <tromey@redhat.com>
5831
5832 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5833 LIBGNU.
5834
5835 2013-11-08 Tom Tromey <tromey@redhat.com>
5836
5837 * configure, config.in: Rebuild.
5838 * configure.ac: Remove unused configury.
5839
5840 2013-11-08 Tom Tromey <tromey@redhat.com>
5841
5842 * acinclude.m4: Include common.m4, codeset.m4.
5843 * configure, config.in: Rebuild.
5844 * configure.ac: Use GDB_AC_COMMON.
5845
5846 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5847
5848 * linux-s390-low.c (HWCAP_S390_TE): New define.
5849 (s390_arch_setup): Consider the TE field in the HWCAP for
5850 determining 'have_regset_tdb'.
5851
5852 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5853
5854 PR gdb/16014
5855 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5856 call to sizeof.
5857
5858 2013-10-02 Pedro Alves <palves@redhat.com>
5859
5860 * server.c (process_serial_event): Don't output "GDBserver
5861 exiting" if GDB is connected through stdio.
5862 * target.c (mywait): Likewise, be silent if GDB is connected
5863 through stdio.
5864
5865 2013-10-01 Joel Brobecker <brobecker@adacore.com>
5866
5867 * lynx-low.c (lynx_add_threads_after_attach): New function.
5868 (lynx_attach): Remove call to add_thread. Add call to
5869 lynx_add_threads_after_attach instead.
5870
5871 2013-09-28 Mike Frysinger <vapier@gentoo.org>
5872
5873 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5874 * config.in, configure: Regenerated.
5875
5876 2013-09-18 Yao Qi <yao@codesourcery.com>
5877
5878 PR server/15959
5879 * server.c (start_inferior): Clear 'resume_info'.
5880
5881 2013-09-16 Jiong Wang <jiwang@tilera.com>
5882
5883 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5884 for each register.
5885
5886 2013-09-16 Jiong Wang <jiwang@tilera.com>
5887
5888 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5889 linux-tile-low.o to srv_tgtobj.
5890
5891 2013-09-16 Will Newton <will.newton@linaro.org>
5892
5893 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5894 out regs.
5895
5896 2013-09-06 Pedro Alves <palves@redhat.com>
5897
5898 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5899 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5900 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5901 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5902 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5903 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5904
5905 2013-09-06 Pedro Alves <palves@redhat.com>
5906
5907 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5908 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5909
5910 2013-09-06 Pedro Alves <palves@redhat.com>
5911
5912 * linux-amd64-ipa.c: Include tracepoint.h.
5913 * linux-i386-ipa.c: Include tracepoint.h.
5914
5915 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5916
5917 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5918 (ps_get_thread_area): New function.
5919
5920 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5921
5922 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5923 (initialize_low_arch): Call init_registers_crisv32 rather than
5924 init_register_crisv32.
5925
5926 2013-09-05 Pedro Alves <palves@redhat.com>
5927
5928 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5929 to ...
5930 * hostio.h: ... this new file.
5931 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5932 win32-low.c: Include hostio.h.
5933
5934 2013-09-05 Pedro Alves <palves@redhat.com>
5935
5936 * server.h (gdb_client_data, handler_func, callback_handler_func)
5937 (delete_file_handler, add_file_handler, append_callback_event)
5938 (delete_callback_event, start_event_loop, initialize_event_loop):
5939 Move to event-loop.h and include it.
5940 * event-loop.h: New file.
5941
5942 2013-09-05 Pedro Alves <palves@redhat.com>
5943
5944 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5945 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5946 (loaded_dll, unloaded_dll): Move to ...
5947 * dll.h: ... this new file.
5948 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5949
5950 2013-09-05 Pedro Alves <palves@redhat.com>
5951
5952 * server.h (current_process, get_thread_process, all_processes)
5953 (add_inferior_to_list, for_each_inferior, current_inferior)
5954 (remove_inferior, add_process, remove_process, find_process_pid)
5955 (have_started_inferiors_p, have_attached_inferiors_p)
5956 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5957 (clear_inferiors, find_inferior, find_inferior_id)
5958 (inferior_target_data, set_inferior_target_data)
5959 (inferior_regcache_data, set_inferior_regcache_data): Move to
5960 inferiors.h, and include it.
5961 * inferiors.h: New file.
5962
5963 2013-09-05 Pedro Alves <palves@redhat.com>
5964
5965 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5966 Move ...
5967 * ax.h: ... here.
5968
5969 2013-09-05 Pedro Alves <palves@redhat.com>
5970
5971 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5972 tracepoint.h.
5973 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5974 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5975 (handle_tracepoint_general_set, handle_tracepoint_query)
5976 (tracepoint_finished_step, tracepoint_was_hit)
5977 (release_while_stepping_state_list, current_traceframe)
5978 (in_readonly_region, traceframe_read_mem)
5979 (fetch_traceframe_registers, traceframe_read_sdata)
5980 (traceframe_read_info, struct fast_tpoint_collect_status)
5981 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5982 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5983 (supply_fast_tracepoint_registers)
5984 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5985 (ipa_tdesc, claim_trampoline_space)
5986 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5987 (agent_mem_read, agent_get_trace_state_variable_value)
5988 (agent_set_trace_state_variable_value, agent_tsv_read)
5989 (agent_mem_read_string, get_raw_reg_func_addr)
5990 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5991 * tracepoint.h: ... this new file.
5992
5993 2013-09-05 Pedro Alves <palves@redhat.com>
5994
5995 * server.h (perror_with_name, error, fatal, warning, paddress)
5996 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5997 include it.
5998 * utils.h: New file.
5999
6000 2013-09-05 Pedro Alves <palves@redhat.com>
6001
6002 * server.h (remote_debug, noack_mode, transport_is_reliable)
6003 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6004 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6005 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6006 (write_enn, initialize_async_io, enable_async_io)
6007 (disable_async_io, check_remote_input_interrupt_request)
6008 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6009 (dead_thread_notify, prepare_resume_reply)
6010 (decode_address_to_semicolon, decode_address, decode_m_packet)
6011 (decode_M_packet, decode_X_packet, decode_xfer_write)
6012 (decode_search_memory_packet, unhexify, hexify)
6013 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6014 (look_up_one_symbol, relocate_instruction)
6015 (monitor_output): Move to remote-utils.h, and include it.
6016 * remote-utils.h: New file.
6017
6018 2013-09-05 Pedro Alves <palves@redhat.com>
6019
6020 * server.h (_): Delete.
6021
6022 2013-09-02 Pedro Alves <palves@redhat.com>
6023
6024 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6025 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6026 allocated.
6027 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6028
6029 2013-09-02 Pierre Muller <muller@sourceware.org>
6030
6031 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6032 or WriteProcessMemory complete successfully and handle
6033 ERROR_PARTIAL_COPY error.
6034
6035 2013-09-02 Pedro Alves <palves@redhat.com>
6036
6037 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6038 error instead of EIO.
6039
6040 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6041
6042 PR server/15604
6043 * linux-low.c: Include filestuff.h.
6044 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6045 * lynx-low.c: Include filestuff.h.
6046 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6047 * server.c: Include filestuff.h.
6048 (main): Call notice_open_fds.
6049 * spu-low.c: Include filestuff.h.
6050 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6051
6052 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6053
6054 * Makefile.in: Explain why ../target and ../nat are not
6055 listed as include file search paths.
6056 (linux-waitpid.o): New object file rule.
6057 * configure.srv (srv_native_linux_obj): New variable.
6058 Replace all occurrences of linux native object files with
6059 $srv_native_linux_obj.
6060 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6061 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6062 (linux_enable_event_reporting): Remove declaration.
6063 (my_waitpid): Moved to common/linux-waitpid.c.
6064 (linux_wait_for_event): Pass ptid when calling
6065 linux_enable_event_reporting.
6066 (linux_supports_tracefork_flag): Remove.
6067 (linux_enable_event_reporting): Likewise.
6068 (linux_tracefork_grandchild): Remove.
6069 (STACK_SIZE): Moved to common/linux-ptrace.c.
6070 (linux_tracefork_child): Remove.
6071 (linux_test_for_tracefork): Remove.
6072 (linux_look_up_symbols): Call linux_supports_traceclone.
6073 (initialize_low): Remove call to linux_test_for_tracefork.
6074 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6075 common/linux-ptrace.h.
6076 (PTRACE_TYPE_ARG4): Likewise.
6077 Include linux-ptrace.h.
6078
6079 2013-08-21 Pedro Alves <palves@redhat.com>
6080
6081 * config.in: Renegerate.
6082
6083 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6084
6085 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6086 (SFILES): Remove $(srcdir)/common/target-common.c and
6087 add $(srcdir)/target/waitstatus.c.
6088 (OBS): Remove target-common.o and add waitstatus.o.
6089 (server_h): Remove $(srcdir)/../common/target-common.h and
6090 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6091 and $(srcdir)/../target/waitstatus.h.
6092 (target-common.o): Remove.
6093 (waitstatus.o): New target object file.
6094 * target.h: Do not include target-common.h and
6095 include target/resume.h, target/wait.h and
6096 target/waitstatus.h.
6097
6098 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6099
6100 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6101 to PTRACE_TYPE_ARG3.
6102 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6103 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6104 PTRACE_TYPE_ARG4.
6105 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6106 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6107
6108 2013-07-27 Jie Zhang <jie@codesourcery.com>
6109 Daniel Jacobowitz <dan@codesourcery.com>
6110 Yao Qi <yao@codesourcery.com>
6111
6112 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6113 (mips-linux-watch.o): New rule.
6114 (mips_linux_watch_h): New variable.
6115 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6116 srv_tgtobj.
6117 * linux-mips-low.c: Include mips-linux-watch.h.
6118 (struct arch_process_info, struct arch_lwp_info): New.
6119 (update_watch_registers_callback): New function.
6120 (mips_linux_new_process, mips_linux_new_thread) New functions.
6121 (mips_linux_prepare_to_resume, mips_insert_point): New
6122 functions.
6123 (mips_remove_point, mips_stopped_by_watchpoint): New
6124 functions.
6125 (rsp_bp_type_to_target_hw_bp_type): New function.
6126 (mips_stopped_data_address): New function.
6127 (the_low_target): Add watchpoint support functions.
6128
6129 2013-07-27 Yao Qi <yao@codesourcery.com>
6130
6131 * i386-low.c: Include break-common.h.
6132 (enum target_hw_bp_type): Remove.
6133
6134 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6135
6136 * Makefile.in (SFILES): /common/target-common.c.
6137 (OBS): Add target-common.o.
6138 (server_h): Add $(srcdir)/../common/target-common.h.
6139 (target-common.o): New target.
6140 * server.c (queue_stop_reply_callback): Free
6141 status string after use.
6142 * target.c (target_waitstatus_to_string): Remove.
6143 * target.h: Include target-common.h.
6144 (resume_kind): Likewise.
6145 (target_waitkind): Likewise.
6146 (target_waitstatus): Likewise.
6147 (TARGET_WNOHANG): Likewise.
6148
6149 2013-07-04 Yao Qi <yao@codesourcery.com>
6150
6151 * Makefile.in (host_alias): Use @host_noncanonical@.
6152 (target_alias): Use @target_noncanonical@.
6153 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6154 ACX_NONCANONICAL_HOST.
6155 * configure: Regenerated.
6156
6157 Revert:
6158 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6159
6160 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6161 * configure: Rebuild.
6162 * Makefile.in (version_host, version_target): Get from configure.
6163 (version.c): Use $(version_host) and $(version_target).
6164
6165 2013-07-03 Pedro Alves <palves@redhat.com>
6166
6167 * Makefile.in (config.status): Depend on development.sh.
6168 * acinclude.m4: Include libmcheck.m4.
6169 * configure: Regenerate.
6170
6171 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6172
6173 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6174 attribute inside the parentheses.
6175 (winapi_DebugSetProcessKillOnExit): Ditto.
6176 (winapi_DebugBreakProcess): Ditto.
6177 (winapi_GenerateConsoleCtrlEvent): Ditto.
6178
6179 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6180
6181 * notif.h (notif_event): Add a dummy member to avoid compiler
6182 errors.
6183
6184 2013-07-01 Pedro Alves <palves@redhat.com>
6185
6186 * hostio.c (HOSTIO_PATH_MAX): Define.
6187 (require_filename, handle_open, handle_unlink, handle_readlink):
6188 Use it.
6189
6190 2013-07-01 Pedro Alves <palves@redhat.com>
6191
6192 * server.h: Include "pathmax.h".
6193 * linux-low.c: Don't include sys/param.h.
6194 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6195 MAXPATHLEN.
6196 * win32-low.c: Don't include sys/param.h.
6197 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6198
6199 2013-07-01 Pedro Alves <palves@redhat.com>
6200
6201 * event-loop.c: Don't check HAVE_UNISTD_H before including
6202 <unistd.h>.
6203 * gdbreplay.c: Likewise.
6204 * remote-utils.c: Likewise.
6205 * server.c: Likewise.
6206 * configure.ac: Don't check for unistd.h.
6207 * configure: Regenerate.
6208
6209 2013-06-28 Tom Tromey <tromey@redhat.com>
6210
6211 * Makefile.in (version.c): Use version.in, not
6212 common/version.in.
6213
6214 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6215
6216 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6217 * configure: Rebuild.
6218 * Makefile.in (version_host, version_target): Get from configure.
6219 (version.c): Use $(version_host) and $(version_target).
6220
6221 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6222
6223 Fix trace-status to output user name without trailing colon.
6224 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6225
6226 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6227
6228 Fix trace-status to output proper start-time and stop-time.
6229 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6230 output start time and stop time in hex as gdb expects.
6231
6232 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6233
6234 * tracepoint.c (build_traceframe_info_xml): Output trace state
6235 variables present in the trace buffer.
6236
6237 2013-06-24 Tom Tromey <tromey@redhat.com>
6238
6239 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6240 create-version.sh.
6241 (version.o): Remove.
6242 * gdbreplay.c: Include version.h.
6243 (version, host_name): Don't declare.
6244 * server.h: Include version.h.
6245 (version, host_name): Don't declare.
6246
6247 2013-06-12 Pedro Alves <palves@redhat.com>
6248
6249 * linux-x86-low.c (linux_is_elf64): Delete global.
6250 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6251 with local linux_pid_exe_is_elf_64_file use.
6252
6253 2013-06-11 Pedro Alves <palves@redhat.com>
6254
6255 * linux-low.c (regset_disabled, disable_regset): New functions.
6256 (regsets_fetch_inferior_registers)
6257 (regsets_store_inferior_registers): Use them.
6258 (initialize_regsets_info); Don't allocate the disabled_regsets
6259 array here.
6260 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6261 comment.
6262
6263 2013-06-11 Pedro Alves <palves@redhat.com>
6264
6265 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6266 xmalloc.
6267
6268 2013-06-11 Pedro Alves <palves@redhat.com>
6269
6270 * linux-x86-low.c (initialize_low_arch): Call
6271 init_registers_x32_avx_linux.
6272
6273 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6274
6275 Fix compatibility with Android Bionic.
6276 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6277 it is not empty.
6278
6279 2013-06-07 Pedro Alves <palves@redhat.com>
6280
6281 PR server/14823
6282 * Makefile.in (OBS): Add tdesc.o.
6283 (IPA_OBJS): Add tdesc-ipa.o.
6284 (tdesc-ipa.o): New rule.
6285 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6286 interface.
6287 * linux-low.c (new_inferior): Delete.
6288 (disabled_regsets, num_regsets): Delete.
6289 (linux_add_process): Adjust to set the new per-process
6290 new_inferior flag.
6291 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6292 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6293 was a stop. When calling arch_setup, switch the current inferior
6294 to the thread that got an event.
6295 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6296 (regsets_fetch_inferior_registers)
6297 (regsets_store_inferior_registers): New regsets_info parameter.
6298 Adjust to use it.
6299 (linux_register_in_regsets): New regs_info parameter. Adjust to
6300 use it.
6301 (register_addr, fetch_register, store_register): New usrregs_info
6302 parameter. Adjust to use it.
6303 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6304 parameter regs_info. Adjust to use it.
6305 (linux_fetch_registers): Get the current inferior's regs_info, and
6306 adjust to use it.
6307 (linux_store_registers): Ditto.
6308 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6309 (initialize_low): Don't initialize the target_regsets here. Call
6310 initialize_low_arch.
6311 * linux-low.h (target_regsets): Delete declaration.
6312 (struct regsets_info): New.
6313 (struct usrregs_info): New.
6314 (struct regs_info): New.
6315 (struct process_info_private) <new_inferior>: New field.
6316 (struct linux_target_ops): Delete the num_regs, regmap, and
6317 regset_bitmap fields. New field regs_info.
6318 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6319 * i387-fp.c (num_xmm_registers): Delete.
6320 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6321 calls to new interface.
6322 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6323 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6324 Infer the number of xmm registers from the regcache's target
6325 description.
6326 * i387-fp.h (num_xmm_registers): Delete.
6327 * inferiors.c (add_thread): Don't install the thread's regcache
6328 here.
6329 * proc-service.c (gregset_info): Fetch the current inferior's
6330 regs_info. Adjust to use it.
6331 * regcache.c: Include tdesc.h.
6332 (register_bytes, reg_defs, num_registers)
6333 (gdbserver_expedite_regs): Delete.
6334 (get_thread_regcache): If the thread doesn't have a regcache yet,
6335 create one, instead of aborting gdbserver.
6336 (regcache_invalidate_one): Rename to ...
6337 (regcache_invalidate_thread): ... this.
6338 (regcache_invalidate_one): New.
6339 (regcache_invalidate): Only invalidate registers of the current
6340 process.
6341 (init_register_cache): Add target_desc parameter, and use it.
6342 (new_register_cache): Ditto. Assert the target description has a
6343 non zero registers_size.
6344 (regcache_cpy): Add assertions. Adjust.
6345 (realloc_register_cache, set_register_cache): Delete.
6346 (registers_to_string, registers_from_string): Adjust.
6347 (find_register_by_name, find_regno, find_register_by_number)
6348 (register_cache_size): Add target_desc parameter, and use it.
6349 (free_register_cache_thread, free_register_cache_thread_one)
6350 (regcache_release, register_cache_size): New.
6351 (register_size): Add target_desc parameter, and use it.
6352 (register_data, supply_register, supply_register_zeroed)
6353 (supply_regblock, supply_register_by_name, collect_register)
6354 (collect_register_as_string, collect_register_by_name): Adjust.
6355 * regcache.h (struct target_desc): Forward declare.
6356 (struct regcache) <tdesc>: New field.
6357 (init_register_cache, new_register_cache): Add target_desc
6358 parameter.
6359 (regcache_invalidate_thread): Declare.
6360 (regcache_invalidate_one): Delete declaration.
6361 (regcache_release): Declare.
6362 (find_register_by_number, register_cache_size, register_size)
6363 (find_regno): Add target_desc parameter.
6364 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6365 declarations.
6366 * remote-utils.c: Include tdesc.h.
6367 (outreg, prepare_resume_reply): Adjust.
6368 * server.c: Include tdesc.h.
6369 (gdbserver_xmltarget): Delete declaration.
6370 (get_features_xml, process_serial_event): Adjust.
6371 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6372 declare.
6373 (struct process_info) <tdesc>: New field.
6374 (ipa_tdesc): Declare.
6375 * tdesc.c: New file.
6376 * tdesc.h: New file.
6377 * tracepoint.c: Include tdesc.h.
6378 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6379 (get_context_regcache): Adjust to pass ipa_tdesc down.
6380 (do_action_at_tracepoint): Adjust to get the register cache size
6381 from the context regcache's description.
6382 (traceframe_walk_blocks): Adjust to get the register cache size
6383 from the current trace frame's description.
6384 (traceframe_get_pc): Adjust to get current trace frame's
6385 description and pass it down.
6386 (gdb_collect): Adjust to get the register cache size from the
6387 IPA's description.
6388 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6389 (gdbserver_xmltarget): Delete.
6390 (initialize_low_tracepoint): Set the ipa's target description.
6391 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6392 (initialize_low_tracepoint): Set the ipa's target description.
6393 * linux-x86-low.c: Include tdesc.h.
6394 [__x86_64__] (is_64bit_tdesc): New.
6395 (ps_get_thread_area, x86_get_thread_area): Use it.
6396 (i386_cannot_store_register): Rename to ...
6397 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6398 (i386_cannot_fetch_register): Rename to ...
6399 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6400 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6401 to new interface.
6402 (target_regsets): Rename to ...
6403 (x86_regsets): ... this.
6404 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6405 interface.
6406 (x86_siginfo_fixup): Use is_64bit_tdesc.
6407 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6408 (tdesc_x32_avx_linux, tdesc_x32_linux)
6409 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6410 Declare.
6411 (x86_linux_update_xmltarget): Delete.
6412 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6413 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6414 (AMD64_LINUX_USER64_CS): New.
6415 (x86_linux_read_description): New, based on
6416 x86_linux_update_xmltarget.
6417 (same_process_callback): New.
6418 (x86_arch_setup_process_callback): New.
6419 (x86_linux_update_xmltarget): New.
6420 (x86_regsets_info): New.
6421 (amd64_linux_regs_info): New.
6422 (i386_linux_usrregs_info): New.
6423 (i386_linux_regs_info): New.
6424 (x86_linux_regs_info): New.
6425 (x86_arch_setup): Reimplement.
6426 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6427 (x86_emit_ops): Ditto.
6428 (the_low_target): Adjust. Install x86_linux_regs_info,
6429 x86_cannot_fetch_register, and x86_cannot_store_register.
6430 (initialize_low_arch): New.
6431 * linux-ia64-low.c (tdesc_ia64): Declare.
6432 (ia64_fetch_register): Adjust.
6433 (ia64_usrregs_info, regs_info): New globals.
6434 (ia64_regs_info): New function.
6435 (the_low_target): Adjust.
6436 (initialize_low_arch): New function.
6437 * linux-sparc-low.c (tdesc_sparc64): Declare.
6438 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6439 Adjust.
6440 (sparc_arch_setup): New function.
6441 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6442 (the_low_target): Adjust.
6443 (initialize_low_arch): New function.
6444 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6445 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6446 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6447 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6448 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6449 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6450 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6451 (tdesc_powerpc_isa205_vsx64l): Declare.
6452 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6453 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6454 (ppc_set_pc, ppc_get_hwcap): Adjust.
6455 (ppc_usrregs_info): Forward declare.
6456 (!__powerpc64__) ppc_regmap_adjusted: New global.
6457 (ppc_arch_setup): Adjust to the current process'es target
6458 description.
6459 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6460 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6461 (ppc_store_evrregset): Adjust.
6462 (target_regsets): Rename to ...
6463 (ppc_regsets): ... this, and make static.
6464 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6465 (ppc_regs_info): New function.
6466 (the_low_target): Adjust.
6467 (initialize_low_arch): New function.
6468 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6469 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6470 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6471 (tdesc_s390x_linux64v2): Declare.
6472 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6473 (s390_fill_gregset, s390_store_last_break): Adjust.
6474 (target_regsets): Rename to ...
6475 (s390_regsets): ... this, and make static.
6476 (s390_get_pc, s390_set_pc): Adjust.
6477 (s390_get_hwcap): New target_desc parameter, and use it.
6478 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6479 (s390_arch_setup): Adjust to set the current process'es target
6480 description. Don't adjust the regmap.
6481 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6482 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6483 (regs_info_3264): New globals.
6484 (s390_regs_info): New function.
6485 (the_low_target): Adjust.
6486 (initialize_low_arch): New function.
6487 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6488 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6489 [__mips64] (init_registers_mips_linux)
6490 (init_registers_mips_dsp_linux): Delete defines.
6491 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6492 (have_dsp): New global.
6493 (mips_read_description): New, based on mips_arch_setup.
6494 (mips_arch_setup): Reimplement.
6495 (get_usrregs_info): New function.
6496 (mips_cannot_fetch_register, mips_cannot_store_register)
6497 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6498 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6499 (target_regsets): Rename to ...
6500 (mips_regsets): ... this, and make static.
6501 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6502 (dsp_regs_info, regs_info): New globals.
6503 (mips_regs_info): New function.
6504 (the_low_target): Adjust.
6505 (initialize_low_arch): New function.
6506 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6507 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6508 Declare.
6509 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6510 (arm_read_description): New, with bits factored from
6511 arm_arch_setup.
6512 (arm_arch_setup): Reimplement.
6513 (target_regsets): Rename to ...
6514 (arm_regsets): ... this, and make static.
6515 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6516 (arm_regs_info): New function.
6517 (the_low_target): Adjust.
6518 (initialize_low_arch): New function.
6519 * linux-m68k-low.c (tdesc_m68k): Declare.
6520 (target_regsets): Rename to ...
6521 (m68k_regsets): ... this, and make static.
6522 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6523 (m68k_regs_info): New function.
6524 (m68k_arch_setup): New function.
6525 (the_low_target): Adjust.
6526 (initialize_low_arch): New function.
6527 * linux-sh-low.c (tdesc_sharch): Declare.
6528 (target_regsets): Rename to ...
6529 (sh_regsets): ... this, and make static.
6530 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6531 (sh_regs_info, sh_arch_setup): New functions.
6532 (the_low_target): Adjust.
6533 (initialize_low_arch): New function.
6534 * linux-bfin-low.c (tdesc_bfin): Declare.
6535 (bfin_arch_setup): New function.
6536 (bfin_usrregs_info, regs_info): New globals.
6537 (bfin_regs_info): New function.
6538 (the_low_target): Adjust.
6539 (initialize_low_arch): New function.
6540 * linux-cris-low.c (tdesc_cris): Declare.
6541 (cris_arch_setup): New function.
6542 (cris_usrregs_info, regs_info): New globals.
6543 (cris_regs_info): New function.
6544 (the_low_target): Adjust.
6545 (initialize_low_arch): New function.
6546 * linux-cris-low.c (tdesc_crisv32): Declare.
6547 (cris_arch_setup): New function.
6548 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6549 (cris_regs_info): New function.
6550 (the_low_target): Adjust.
6551 (initialize_low_arch): New function.
6552 * linux-m32r-low.c (tdesc_m32r): Declare.
6553 (m32r_arch_setup): New function.
6554 (m32r_usrregs_info, regs_info): New globals.
6555 (m32r_regs_info): Adjust.
6556 (initialize_low_arch): New function.
6557 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6558 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6559 (tic6x_usrregs_info): Forward declare.
6560 (tic6x_read_description): New function, based on ...
6561 (tic6x_arch_setup): ... this. Reimplement.
6562 (target_regsets): Rename to ...
6563 (tic6x_regsets): ... this, and make static.
6564 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6565 (tic6x_regs_info): New function.
6566 (the_low_target): Adjust.
6567 (initialize_low_arch): New function.
6568 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6569 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6570 (target_regsets): Rename to ...
6571 (xtensa_regsets): ... this, and make static.
6572 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6573 globals.
6574 (xtensa_arch_setup, xtensa_regs_info): New functions.
6575 (the_low_target): Adjust.
6576 (initialize_low_arch): New function.
6577 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6578 (nios2_arch_setup): Set the current process'es tdesc.
6579 (target_regsets): Rename to ...
6580 (nios2_regsets): ... this.
6581 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6582 (nios2_regs_info): New function.
6583 (the_low_target): Adjust.
6584 (initialize_low_arch): New function.
6585 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6586 (aarch64_arch_setup): Set the current process'es tdesc.
6587 (target_regsets): Rename to ...
6588 (aarch64_regsets): ... this.
6589 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6590 (aarch64_regs_info): New function.
6591 (the_low_target): Adjust.
6592 (initialize_low_arch): New function.
6593 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6594 globals.
6595 (target_regsets): Rename to ...
6596 (tile_regsets): ... this.
6597 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6598 (tile_regs_info): New function.
6599 (tile_arch_setup): Set the current process'es tdesc.
6600 (the_low_target): Adjust.
6601 (initialize_low_arch): New function.
6602 * spu-low.c (tdesc_spu): Declare.
6603 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6604 * win32-arm-low.c (tdesc_arm): Declare.
6605 (arm_arch_setup): New function.
6606 (the_low_target): Install arm_arch_setup instead of
6607 init_registers_arm.
6608 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6609 (init_windows_x86): Rename to ...
6610 (i386_arch_setup): ... this. Set `win32_tdesc'.
6611 (the_low_target): Adjust.
6612 * win32-low.c (win32_tdesc): New global.
6613 (child_add_thread): Don't create the thread cache here.
6614 (do_initial_child_stuff): Set the new process'es tdesc.
6615 * win32-low.h (struct target_desc): Forward declare.
6616 (win32_tdesc): Declare.
6617 * lynx-i386-low.c (tdesc_i386): Declare global.
6618 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6619 * lynx-low.c (lynx_tdesc): New global.
6620 (lynx_add_process): Set the new process'es tdesc.
6621 * lynx-low.h (struct target_desc): Forward declare.
6622 (lynx_tdesc): Declare global.
6623 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6624 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6625 * nto-low.c (nto_tdesc): New global.
6626 (do_attach): Set the new process'es tdesc.
6627 * nto-low.h (struct target_desc): Forward declare.
6628 (nto_tdesc): Declare.
6629 * nto-x86-low.c (tdesc_i386): Declare.
6630 (nto_x86_arch_setup): Set `nto_tdesc'.
6631
6632 2013-06-04 Gary Benson <gbenson@redhat.com>
6633
6634 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6635 to qSupported response when appropriate.
6636 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6637 with nonzero-length annex.
6638 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6639 arguments supplied in annex.
6640
6641 2013-05-31 Doug Evans <dje@google.com>
6642
6643 PR server/15594
6644 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6645 64 bits in 64-cross-32 environment.
6646
6647 2013-05-28 Pedro Alves <palves@redhat.com>
6648
6649 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6650 (aarch64-without-fpu.c): Delete rule.
6651 * configure.srv (aarch64*-*-linux*): Remove references to
6652 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6653 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6654 declaration.
6655
6656 2013-05-24 Pedro Alves <palves@redhat.com>
6657
6658 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6659 instead of strchr/decode_address. Error if the range isn't split
6660 with a ','. Don't assume there's be a ':' in the action.
6661
6662 2013-05-23 Yao Qi <yao@codesourcery.com>
6663 Pedro Alves <palves@redhat.com>
6664
6665 * linux-low.c (lwp_in_step_range): New function.
6666 (linux_wait_1): If the thread was range stepping and stopped
6667 outside the stepping range, report the stop to GDB. Otherwise,
6668 continue stepping. Add range stepping debug output.
6669 (linux_set_resume_request): Copy the step range from the resume
6670 request to the lwp.
6671 (linux_supports_range_stepping): New.
6672 (linux_target_ops) <supports_range_stepping>: Set to
6673 linux_supports_range_stepping.
6674 * linux-low.h (struct linux_target_ops)
6675 <supports_range_stepping>: New field.
6676 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6677 * linux-x86-low.c (x86_supports_range_stepping): New.
6678 (the_low_target) <supports_range_stepping>: Set to
6679 x86_supports_range_stepping.
6680 * server.c (handle_v_cont): Handle 'r' action.
6681 (handle_v_requests): Append ";r" if the target supports range
6682 stepping.
6683 * target.h (struct thread_resume) <step_range_start,
6684 step_range_end>: New fields.
6685 (struct target_ops) <supports_range_stepping>:
6686 New field.
6687 (target_supports_range_stepping): New macro.
6688
6689 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6690
6691 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6692 confusion in comment.
6693
6694 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6695
6696 * lynx-low.c (struct process_info_private): New type.
6697 (lynx_add_process): New function.
6698 (lynx_create_inferior, lynx_attach): Replace calls to
6699 add_process by calls to lynx_add_process.
6700 (lynx_resume): If PTID is null, then try using
6701 current_process()->private->last_wait_event_ptid.
6702 Add comments.
6703 (lynx_clear_inferiors): Delete. The contents of that function
6704 has been inlined in lynx_mourn;
6705 (lynx_wait_1): Save the ptid in the process's private data.
6706 (lynx_mourn): Free the process' private data. Replace call
6707 to lynx_clear_inferiors by call to clear_inferiors.
6708
6709 2013-05-17 Yao Qi <yao@codesourcery.com>
6710
6711 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6712 the right place.
6713
6714 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
6715
6716 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6717 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6718 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6719 PT_TEXT_END_ADDR guards. Update comments.
6720 (linux_target_op) <read_offsets>: Conditionally define to
6721 linux_read_offsets if the target is UCLIBC and if it defines
6722 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6723
6724 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6725 Andrew Jenner <andrew@codesourcery.com>
6726
6727 * Makefile.in (SFILES): Add linux-nios2-low.c.
6728 (clean): Add action to delete nios2-linux.c.
6729 (nios2-linux.c): New rule.
6730 * configure.srv: Add nios2*-*-linux*.
6731 * linux-nios2-low.c: New.
6732
6733 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6734
6735 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6736
6737 2013-04-25 Hui Zhu <hui@codesourcery.com>
6738
6739 PR gdb/15186
6740 * ax.c (ax_printf): Add fflush.
6741
6742 2013-04-22 Tom Tromey <tromey@redhat.com>
6743
6744 * Makefile.in (SFILES): Add filestuff.c.
6745 (OBS): Add filestuff.o.
6746 (filestuff.o): New target.
6747 * config.in, configure: Rebuild.
6748 * configure.ac: Check for fdwalk, pipe2.
6749
6750 2013-04-17 Pedro Alves <palves@redhat.com>
6751
6752 * configure.ac (USE_THREAD_DB): Delete variable.
6753 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6754 Don't AC_SUBST USE_THREAD_DB.
6755 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6756 * config.in, configure: Regenerate.
6757
6758 2013-04-16 Pedro Alves <palves@redhat.com>
6759
6760 * linux-low.h (struct lwp_info) <thread_known>: Move under
6761 the USE_THREAD_DB #ifdef.
6762
6763 2013-04-16 Pedro Alves <palves@redhat.com>
6764
6765 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6766 (linux-low.o): Delete rule.
6767 * linux-low.h: Always include "gdb_thread_db.h" instead of
6768 conditionally including thread_db.h.
6769 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6770 HAVE_THREAD_DB_H.
6771
6772 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6773
6774 * Makefile.in (install-only): Fix make install regression.
6775
6776 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6777
6778 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6779 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6780 installation.
6781 * gdbserver.1: Remove.
6782
6783 2013-03-22 Pedro Alves <palves@redhat.com>
6784
6785 * linux-low.c (handle_extended_wait): Don't call
6786 linux_enable_event_reporting.
6787
6788 2013-03-15 Tony Theodore <tonyt@logyst.com>
6789
6790 PR build/9098:
6791 * Makefile.in (SHELL): Use @SHELL@.
6792
6793 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6794
6795 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6796 compiler warning.
6797
6798 2013-03-13 Joel Brobecker <brobecker@adacore.com>
6799
6800 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6801 Remove extraneous NULL element.
6802
6803 2013-03-13 Yao Qi <yao@codesourcery.com>
6804
6805 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6806 'V' block in trace frame.
6807
6808 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6809
6810 * target.h (struct target_ops): Add btrace ops.
6811 (target_supports_btrace): New macro.
6812 (target_enable_btrace): New macro.
6813 (target_disable_btrace): New macro.
6814 (target_read_btrace): New macro.
6815 * gdbthread.h (struct thread_info): Add btrace field.
6816 * server.c: Include btrace-common.h.
6817 (handle_btrace_general_set): New function.
6818 (handle_btrace_enable): New function.
6819 (handle_btrace_disable): New function.
6820 (handle_general_set): Call handle_btrace_general_set.
6821 (handle_qxfer_btrace): New function.
6822 (struct qxfer qxfer_packets[]): Add btrace entry.
6823 * inferiors.c (remove_thread): Disable btrace.
6824 * linux-low: Include linux-btrace.h.
6825 (linux_low_enable_btrace): New function.
6826 (linux_low_read_btrace): New function.
6827 (linux_target_ops): Add btrace ops.
6828 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6829 Add srv_linux_btrace=yes.
6830 (x86_64-*-linux*): Add linux-btrace.o.
6831 Add srv_linux_btrace=yes.
6832 * configure.ac: Define HAVE_LINUX_BTRACE.
6833 * config.in: Regenerated.
6834 * configure: Regenerated.
6835
6836 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6837
6838 * server.c (handle_qxfer): Preserve error message if -3 is
6839 returned.
6840 (qxfer): Document the -3 return value.
6841
6842 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6843
6844 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6845 (linux_btrace_h): New variable.
6846 (linux-btrace.o): New rule.
6847
6848 2013-03-08 Stan Shebs <stan@codesourcery.com>
6849 Hafiz Abid Qadeer <abidh@codesourcery.com>
6850
6851 * tracepoint.c (trace_buffer_size): New global.
6852 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6853 (init_trace_buffer): Change to one-argument function. Allocate
6854 trace buffer memory.
6855 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6856 handle QTBuffer:size packet.
6857 (cmd_bigqtbuffer_size): New function.
6858 (initialize_tracepoint): Call init_trace_buffer with
6859 DEFAULT_TRACE_BUFFER_SIZE.
6860 * server.c (handle_query): Add QTBuffer:size in the
6861 supported packets.
6862
6863 2013-03-07 Yao Qi <yao@codesourcery.com>
6864
6865 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6866 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6867 of -1.
6868 (cmd_qtsp): Adjust condition. Do post increment.
6869 Set cur_action and cur_step_action back to 0.
6870
6871 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6872
6873 PR server/15236
6874 * linux-low.c (linux_write_memory): Return early success if LEN is
6875 zero.
6876
6877 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
6878
6879 * configure.srv: Add x86_64-*-cygwin* as target.
6880
6881 2013-02-28 Tom Tromey <tromey@redhat.com>
6882
6883 * configure.ac: Invoke AC_SYS_LARGEFILE.
6884 * configure, config.in: Rebuild.
6885
6886 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
6887
6888 * win32-low.c: Throughout, fix format strings and casts of
6889 printf-like functions to avoid type related warnings on all
6890 platforms.
6891 (get_child_debug_event): Print dwDebugEventCode as hex since
6892 that's how it's usually documented.
6893
6894 2013-02-28 Yao Qi <yao@codesourcery.com>
6895
6896 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6897 pulongest.
6898
6899 2013-02-27 Jiong Wang <jiwang@tilera.com>
6900
6901 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6902 (reg-tilegx32.c): New rule.
6903 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6904 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6905 different register info initializer according to elf class.
6906 (init_registers_tilgx32): New function. The tilegx32 register info
6907 initializer.
6908 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6909 (tile_store_gregset): Likewise.
6910
6911 2013-02-27 Yao Qi <yao@codesourcery.com>
6912
6913 * server.c (process_point_options): Print debug message when
6914 debug_threads is true.
6915
6916 2013-02-26 Yao Qi <yao@codesourcery.com>
6917
6918 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6919
6920 2013-02-19 Pedro Alves <palves@redhat.com>
6921 Kai Tietz <ktietz@redhat.com>
6922
6923 PR gdb/15161
6924
6925 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6926 instead of strtoul to extract address from packet.
6927 (process_serial_event) <'z'>: Likewise.
6928
6929 2013-02-18 Yao Qi <yao@codesourcery.com>
6930
6931 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6932
6933 2013-02-14 Pedro Alves <palves@redhat.com>
6934
6935 Plug memory leak.
6936
6937 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6938 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6939
6940 2013-02-14 Pedro Alves <palves@redhat.com>
6941
6942 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6943
6944 2013-02-14 Pedro Alves <palves@redhat.com>
6945
6946 * tracepoint.c (save_string): Delete.
6947 (add_tracepoint_action): Use savestring instead of save_string.
6948
6949 2013-02-12 Pedro Alves <palves@redhat.com>
6950
6951 * linux-xtensa-low.c: Ditto.
6952 * xtensa-xtregs.c: Ditto.
6953
6954 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6955
6956 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6957 thread_db.
6958
6959 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6960
6961 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6962 aarch64_num_wp_regs and aarch64_num_bp_regs to
6963 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6964
6965 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6966
6967 * linux-aarch64-low.c (ps_get_thread_area): Replace
6968 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6969
6970 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6971 Marcus Shawcroft <marcus.shawcroft@arm.com>
6972 Nigel Stephens <nigel.stephens@arm.com>
6973 Yufeng Zhang <yufeng.zhang@arm.com>
6974
6975 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6976 (aarch64.c, aarch64-without-fpu.c): New targets.
6977 * configure.srv (aarch64*-*-linux*): New.
6978 * linux-aarch64-low.c: New file.
6979
6980 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6981
6982 * linux-low.c (handle_extended_wait, linux_create_inferior)
6983 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6984 (dequeue_one_deferred_signal, linux_resume_one_thread)
6985 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6986 (linux_tracefork_grandchild, linux_test_for_tracefork)
6987 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6988 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6989 where the argument is 0.
6990
6991 2013-01-25 Yao Qi <yao@codesourcery.com>
6992
6993 * event-loop.c: Include "queue.h".
6994 (gdb_event_p): New typedef.
6995 (struct gdb_event) <next_event>: Remove.
6996 (event_queue): Change to QUEUE(gdb_event_p).
6997 (async_queue_event): Remove.
6998 (gdb_event_xfree): New.
6999 (initialize_event_loop): New.
7000 (process_event): Use API from QUEUE.
7001 (wait_for_event): Likewise.
7002 * server.c (main): Call initialize_event_loop.
7003 * server.h (initialize_event_loop): Declare.
7004
7005 2013-01-18 Yao Qi <yao@codesourcery.com>
7006
7007 * ax.h (struct eval_agent_expr_context): New.
7008 (gdb_eval_agent_expr): Update declaration.
7009 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7010 TFRAME. Add new argument CTX.
7011 * server.h (struct eval_agent_expr_context): Declare.
7012 (agent_mem_read, agent_tsv_read): Update declaration.
7013 (agent_mem_read_string): Likewise.
7014 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7015 (add_traceframe_block): Add new argument TPOINT.
7016 Increase TPOINT->traceframe_usage.
7017 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7018 eval_tracepoint_agent_expr.
7019 (condition_true_at_tracepoint): Likewise.
7020 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7021 (agent_mem_read_string, agent_tsv_read): Likewise.
7022
7023 2013-01-16 Yao Qi <yao@codesourcery.com>
7024
7025 * linux-low.c (linux_resume_one_lwp): Don't check
7026 'lwp->bp_reinsert != 0'.
7027
7028 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7029 Pedro Alves <palves@redhat.com>
7030
7031 * lynx-low.c (ptrace_request_to_str): Define a temporary
7032 macro and use it to simplify this function's implementation.
7033
7034 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7035
7036 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7037 sets errno.
7038
7039 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7040
7041 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7042
7043 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7044
7045 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7046
7047 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7048
7049 * lynx-low.c (lynx_resume): Use the resume_info parameter
7050 to determine the ptid for the lynx_ptrace call, unless
7051 it is equal to minus_one_ptid, in which case we use the
7052 ptid of the current_inferior.
7053 (lynx_wait_1): After having received a thread create/exit
7054 event, resume the inferior's execution using the signaling
7055 thread's ptid, rather than the old ptid.
7056
7057 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7058
7059 * lynx-low.c (lynx_resume): Delete variable ret.
7060
7061 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7062
7063 * gdbreplay.c (gdbreplay_version): Update copyright year.
7064 * server.c (gdbserver_version): Likewise.
7065
7066 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7067
7068 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7069 new thread.
7070
7071 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7072
7073 * lynx-low.c (ptrace_request_to_str): Add handling for
7074 PTRACE_GETTRACESIG.
7075
7076 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7077
7078 * lynx-low.c (lynx_attach): Delete variable new_process.
7079
7080 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7081
7082 * lynx-low.c (lynx_create_inferior): Delete variable
7083 new_process.
7084
7085 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7086
7087 * lynx-low.c (ptrace_request_to_str): Do not handle
7088 PTRACE_GETTHREADLIST if this macro does not exist.
7089
7090 2012-12-15 Yao Qi <yao@codesourcery.com>
7091
7092 * Makefile.in (OBS): Add notif.o.
7093 * notif.c, notif.h: New.
7094 * server.c: Include "notif.h".
7095 (struct vstop_notif) <next>: Remove.
7096 <base>: New field.
7097 (queue_stop_reply): Update.
7098 (push_event, send_next_stop_reply): Remove.
7099 (discard_queued_stop_replies): Update.
7100 (notif_stop): New variable.
7101 (handle_v_stopped): Remove.
7102 (handle_v_requests): Don't call handle_v_stopped. Call
7103 handle_ack_notif instead.
7104 (queue_stop_reply_callback): Call notif_event_enque instead
7105 of queue_stop_reply.
7106 (handle_status): Don't call send_next_stop_reply, call
7107 notif_write_event instead.
7108 (kill_inferior_callback): Likewise.
7109 (detach_or_kill_inferior_callback): Likewise.
7110 (main): Call initialize_notif.
7111 (process_serial_event): Call QUEUE_is_empty.
7112 (handle_target_event): Call notif_push instead of push event.
7113 * server.h (push_event): Remove declaration.
7114
7115 2012-12-10 Tom Tromey <tromey@redhat.com>
7116
7117 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7118 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7119 macros.
7120 (.c.o): Rewrite.
7121 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7122 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7123 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7124 (amd64-linux-ipa.o, ax.o): Rewrite.
7125 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7126 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7127 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7128 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7129 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7130 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7131 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7132 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7133 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7134 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7135 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7136 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7137 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7138 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7139 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7140 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7141 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7142 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7143 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7144 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7145 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7146 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7147 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7148 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7149 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7150 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7151 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7152 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7153 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7154 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7155 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7156 (reg-tilegx.o): Remove.
7157 (all_object_files): New macro.
7158 Include .deps files.
7159 * aclocal.m4, configure: Rebuild.
7160 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7161 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7162 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7163
7164 2012-12-05 Tom Tromey <tromey@redhat.com>
7165
7166 PR gdb/14917:
7167 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7168
7169 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7170
7171 * configure.ac: Check for linux/perf_event.h.
7172 * config.in: Regenerated.
7173 * configure: Regenerated.
7174
7175 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7176
7177 * hostio.c (handle_readlink): Decrease buffer size
7178 parameter passed to readlink by one byte.
7179
7180 2012-11-26 Yao Qi <yao@codesourcery.com>
7181
7182 * configure.ac (build_warnings): Append '-Wempty-body'.
7183 * configure: Regenerated.
7184 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7185 body.
7186
7187 2012-11-15 Pierre Muller <muller@sourceware.org>
7188
7189 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7190 * config.in: Regenerate.
7191 * configure: Regenerate.
7192 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7193 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7194 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7195 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7196 header.
7197 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7198 instead of <sys/wait.h> header.
7199 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7200
7201 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7202
7203 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7204 (various make rules): Remove -DGDBSERVER
7205
7206 2012-11-09 Yao Qi <yao@codesourcery.com>
7207
7208 * spu-low.c (current_ptid): Move it to ..
7209 * gdbthread.h: ... here. New.
7210 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7211 * server.c (myresume, process_serial_event): Likewise.
7212 * thread-db.c (thread_db_find_new_threads): Likewise.
7213 * tracepoint.c (run_inferior_command): Likewise.
7214
7215 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7216
7217 * server.c (handle_search_memory_1): Include access length in
7218 warning message.
7219
7220 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7221
7222 * linux-crisv32-low.c: Fix compile errors.
7223
7224 2012-09-04 Yao Qi <yao@codesourcery.com>
7225
7226 * tracepoint.c (cmd_qtsv): Adjust debug message.
7227 Don't check CUR_TPOINT.
7228
7229 2012-08-28 Yao Qi <yao@codesourcery.com>
7230
7231 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7232 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7233 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7234 Remove declarations of xmalloc, xreallloc, xstrdup and
7235 freeargv.
7236 * Makefile.in (libiberty_h): New.
7237 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7238 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7239
7240 2012-08-23 Yao Qi <yao@codesourcery.com>
7241
7242 * server.h: Remove declaration of 'xsnprintf'.
7243
7244 2012-08-22 Keith Seitz <keiths@redhat.com>
7245
7246 * server.h: Include build-gnulib-gbserver/config.h.
7247 * gdbreplay.c: Likewise.
7248
7249 2012-08-08 Doug Evans <dje@google.com>
7250
7251 * Makefile.in (SFILES): Add gdb_vecs.c.
7252 (OBS): Add gdb_vecs.o.
7253 (gdb_vecs_h, host_defs_h): New variables.
7254 (thread-db.o): Add $(gdb_vecs_h) dependency.
7255 (gdb_vecs.o): New rule.
7256 * thread-db.c: #include "gdb_vecs.h".
7257 (thread_db_load_search): Use a vector to iterate over path elements.
7258 Handle text appearing after "$pdir".
7259
7260 * configure.ac: Add check for strstr.
7261 * config.in: Regenerate.
7262 * configure: Regenerate.
7263
7264 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7265
7266 * hostio.c (handle_pread): If pread fails, fall back to attempting
7267 lseek/read.
7268 (handle_pwrite): Likewise for pwrite.
7269
7270 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7271
7272 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7273 between unsupported TYPE and unimplementable ADDR/LEN combination.
7274 (arm_insert_point): Act on new return value.
7275
7276 2012-07-31 Pedro Alves <palves@redhat.com>
7277
7278 * server.c (process_point_options): Only skip tokens if we find
7279 one that is unrecognized. Don't treat 'X' specially while
7280 skipping unrecognized tokens.
7281
7282 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7283
7284 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7285 to 4-byte-align HW breakpoint addresses for Thumb.
7286
7287 2012-07-27 Yao Qi <yao@codesourcery.com>
7288
7289 PR remote/14161.
7290
7291 * server.h: Declare gdb_agent_about_to_close.
7292 * target.c (kill_inferior): Include "agent.h".
7293 New. Send command 'kill'.
7294 * target.h (kill_inferior): Removed macro.
7295 * tracepoint.c (gdb_agent_about_to_close): New.
7296 (gdb_agent_helper_thread): Handle command 'close'.
7297 Wait endlessly until the inferior stops.
7298 Install gdb_agent_remove_socket to atexit hook.
7299 (agent_socket_name): New static variable.
7300 (gdb_agent_socket_init): Replace local variable 'name' with
7301 'agent_socket_name'.
7302 (gdb_agent_remove_socket): New.
7303
7304 2012-07-27 Yao Qi <yao@codesourcery.com>
7305
7306 * server.c (process_point_options): Stop at 'X' when parsing.
7307
7308 2012-07-19 Michael Eager <eager@eagercon.com>
7309
7310 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7311 to hw_execute.
7312 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7313 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7314 hardware breakpoint.
7315
7316 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7317
7318 * gdbserver/linux-low.c (initialize_low): Call
7319 linux_ptrace_init_warnings.
7320
7321 2012-07-02 Doug Evans <dje@google.com>
7322
7323 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7324 pointer to int.
7325
7326 2012-07-02 Stan Shebs <stan@codesourcery.com>
7327
7328 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7329 (ax.o): Add it to build rule.
7330 (ax-ipa.o): Ditto.
7331 (OBS): Add format.o.
7332 (IPA_OBS): Add format.o.
7333 * server.c (handle_query): Claim support for breakpoint commands.
7334 (process_point_options): Add command case.
7335 (process_serial_event): Leave running if there are printfs in
7336 effect.
7337 * mem-break.h (any_persistent_commands): Declare.
7338 (add_breakpoint_commands): Declare.
7339 (gdb_no_commands_at_breakpoint): Declare.
7340 (run_breakpoint_commands): Declare.
7341 * mem-break.c (struct point_command_list): New struct.
7342 (struct breakpoint): New field command_list.
7343 (any_persistent_commands): New function.
7344 (add_commands_to_breakpoint): New function.
7345 (add_breakpoint_commands): New function.
7346 (gdb_no_commands_at_breakpoint): New function.
7347 (run_breakpoint_commands): New function.
7348 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7349 locally.
7350 * ax.c: Include format.h.
7351 (ax_printf): New function.
7352 (gdb_eval_agent_expr): Add printf opcode.
7353
7354 2012-06-13 Yao Qi <yao@codesourcery.com>
7355
7356 * server.c (start_inferior): Remove duplicated writes to fields
7357 'last_resume_kind' and 'last_status' of 'current_inferior'.
7358
7359 2012-06-12 Yao Qi <yao@codesourcery.com>
7360 Pedro Alves <palves@redhat.com>
7361
7362 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7363 comment.
7364 * server.c (handle_v_cont): Extend comment.
7365
7366 2012-06-11 Yao Qi <yao@codesourcery.com>
7367
7368 * linux-low.c (linux_attach): Add 'static'.
7369
7370 2012-06-06 Yao Qi <yao@codesourcery.com>
7371
7372 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7373
7374 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7375
7376 Fix gcc -flto compilation warning.
7377 * server.c (main): Make variable multi_mode and attach volatile.
7378
7379 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7380
7381 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7382 if the platform doesn't know about it.
7383
7384 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7385
7386 * Makefile.in (SFILES): Add linux-tile-low.c.
7387 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7388 * configure.srv: Handle tilegx-*-linux*.
7389 * linux-tile-low.c: New file.
7390
7391 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7392
7393 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7394
7395 2012-05-24 Pedro Alves <palves@redhat.com>
7396
7397 PR gdb/7205
7398
7399 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7400
7401 2012-05-24 Pedro Alves <palves@redhat.com>
7402
7403 PR gdb/7205
7404
7405 Replace target_signal with gdb_signal throughout.
7406
7407 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7408
7409 * linux-low.c (linux_store_registers): Avoid the copying sequence
7410 when no data has been retrieved by ptrace.
7411
7412 2012-05-22 Will Deacon <will.deacon@arm.com>
7413
7414 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7415 Include asm/ptrace.h.
7416 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7417 already defined.
7418
7419 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7420
7421 * linux-low.c (linux_store_registers): Don't re-retrieve data
7422 with ptrace that has already been obtained from /proc. Always
7423 copy any data retrieved with ptrace to the buffer supplied.
7424
7425 2012-05-11 Yao Qi <yao@codesourcery.com>
7426 Pedro Alves <palves@redhat.com>
7427
7428 * linux-low.c (enum stopping_threads_kind): New.
7429 (stopping_threads): Change type to `enum stopping_threads_kind'.
7430 (handle_extended_wait): If stopping and suspending threads, leave
7431 the new_lwp suspended too.
7432 (linux_wait_for_event): Adjust.
7433 (stop_all_lwps): Set `stopping_threads' to
7434 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7435 whether we're suspending threads or just stopping them. Assert no
7436 recursion happens.
7437
7438 2012-04-29 Yao Qi <yao@codesourcery.com>
7439
7440 * server.h: Move some code to ...
7441 * gdbthread.h: ... here. New.
7442 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7443 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7444 (nto-low.o, win32-low.o): Likewise.
7445 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7446 * regcache.c, remote-utils.c, server.c: Likewise.
7447 * target.c, tracepoint.c, win32-low.c: Likewise.
7448
7449 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7450
7451 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7452 (PTRACE_ARG4_TYPE): Likewise.
7453 (PTRACE_XFER_TYPE): Likewise.
7454 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7455 ptrace to PTRACE_ARG3_TYPE.
7456 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7457 (PTRACE_ARG4_TYPE): Likewise.
7458 (PTRACE_XFER_TYPE): Likewise.
7459 (linux_detach_one_lwp): Cast fourth argument of
7460 ptrace to long then PTRACE_ARG4_TYPE.
7461 (regsets_fetch_inferior_registers): Cast third argument of
7462 ptrace to long then PTRACE_ARG3_TYPE.
7463 (regsets_store_inferior_registers): Likewise.
7464
7465 2012-04-20 Pedro Alves <palves@redhat.com>
7466
7467 * configure: Regenerate.
7468
7469 2012-04-19 Pedro Alves <palves@redhat.com>
7470
7471 * Makefile.in (GNULIB_BUILDDIR): New.
7472 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7473 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7474 (all, install-only, uninstall, clean-info, all-lib, clean): No
7475 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7476 (maintainer-clean realclean distclean): Use subdir_do.
7477 (subdir_do): New.
7478 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7479 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7480 * acinclude.m4: Include acx_configure_dir.m4.
7481 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7482 calls. Call AC_PROG_RANLIB. Configure gnulib using
7483 ACX_CONFIGURE_DIR.
7484 (GNULIB): New.
7485 (GNULIB_STDINT_H): Adjust.
7486 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7487 * gdbreplay.c: Include build-gnulib/config.h.
7488 * server.h: Likewise.
7489 * aclocal.m4: Regenerate.
7490 * config.in: Regenerate.
7491 * configure: Regenerate.
7492
7493 2012-04-19 Pedro Alves <palves@redhat.com>
7494
7495 * Makefile.in (LIBGNU, INCGNU): Adjust.
7496 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7497 (all, install-only, uninstall, clean-info, all-lib, clean)
7498 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7499 * configure.ac: Adjust AC_OUTPUT output.
7500 * aclocal.m4: Regenerate.
7501 * configure: Regenerate.
7502
7503 2012-04-19 Pedro Alves <palves@redhat.com>
7504
7505 * Makefile.in (generated_files): New.
7506 (server_h): Remove the explicit dependency on config.h, and depend
7507 on $generated_files.
7508
7509 2012-04-19 Pedro Alves <palves@redhat.com>
7510
7511 * Makefile.in (INCGNU): Add -Ignulib.
7512
7513 2012-04-19 Pedro Alves <palves@redhat.com>
7514
7515 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7516 (INCGNU): ... this, and spell out -I here.
7517 (GNULIB_LIB): Rename to ...
7518 (LIBGNU): ... this.
7519 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7520
7521 2012-04-19 Pedro Alves <palves@redhat.com>
7522
7523 * config.in: Regenerate.
7524
7525 2012-04-19 Pedro Alves <palves@redhat.com>
7526
7527 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7528 * server.h (memmem): Remove declaration.
7529 * config.in: Regenerate.
7530 * configure: Regenerate.
7531
7532 2012-04-19 Yao Qi <yao@codesourcery.com>
7533
7534 * Makefile.in (SFILES): Add common/vec.c.
7535 (OBS): Add vec.o.
7536 (vec.o): New rule.
7537
7538 2012-04-19 Yao Qi <yao@codesourcery.com>
7539
7540 * remote-utils.c (prepare_resume_reply): Replace with macro
7541 target_core_of_thread.
7542 * server.c (handle_qxfer_threads_proper): Likewise.
7543 * target.h (traget_core_of_thread): New macro.
7544
7545 2012-04-18 Pedro Alves <palves@redhat.com>
7546
7547 * aclocal.m4: Regenerate.
7548 * configure: Regenerate.
7549
7550 2012-04-16 Yao Qi <yao@codesourcery.com>
7551
7552 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7553 duplicated on address.
7554
7555 2012-04-16 Yao Qi <yao@codesourcery.com>
7556
7557 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7558 (struct tracepoint_action_ops) <send>: New field.
7559 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7560 (agent_expr_send, x_tracepoint_action_send): New.
7561 (l_tracepoint_action_send): New.
7562 (cmd_qtdp): Download and install tracepoint
7563 according to `use_agent'.
7564 (run_inferior_command): Add one more parameter `len'.
7565 Update callers.
7566 (tracepoint_send_agent): New.
7567 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7568
7569 2012-04-16 Yao Qi <yao@codesourcery.com>
7570
7571 * tracepoint.c (download_tracepoints): Moved to ...
7572 (cmd_qtstart): ... here.
7573
7574 2012-04-14 Yao Qi <yao@codesourcery.com>
7575
7576 * tracepoint.c: Include inttypes.h.
7577 (struct collect_memory_action): Use sized types.
7578 (struct tracepoint): Likewise.
7579 (cmd_qtdp, stop_tracing): Update print specifiers.
7580 (cmd_qtp, response_tracepoint): Likewise.
7581 (collect_data_at_tracepoint): Likewise.
7582 (collect_data_at_step): Likewise.
7583
7584 2012-04-14 Yao Qi <yao@codesourcery.com>
7585
7586 Import gnulib module inttypes.
7587 * aclocal.m4, config.in, configure: Regenerated.
7588
7589 2012-04-14 Yao Qi <yao@codesourcery.com>
7590
7591 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7592 Makefile and config.status at last.
7593
7594 2012-04-13 Yao Qi <yao@codesourcery.com>
7595
7596 * tracepoint.c: Include stdint.h unconditionally.
7597
7598 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7599
7600 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7601 on BFD_HAVE_SYS_PROCFS_TYPE.
7602 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7603 * configure: Regenerate.
7604 * config.in: Likewise.
7605
7606 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7607
7608 * Makefile.in (clean): Also remove x32.c x32-linux.c
7609 x32-avx.c x32-avx-linux.c.
7610 (x32.o): New target.
7611 (x32.c): Likewise.
7612 (x32-linux.o): Likewise.
7613 (x32-linux.c): Likewise.
7614 (x32-avx.o): Likewise.
7615 (x32-avx.c): Likewise.
7616 (x32-avx-linux.o): Likewise.
7617 (x32-avx-linux.c): Likewise.
7618
7619 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7620 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7621 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7622 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7623 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7624 i386/x32-avx-linux.xml.
7625
7626 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7627 (init_registers_x32_avx_linux): Likwise.
7628 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7629 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7630
7631 2012-04-13 Pedro Alves <palves@redhat.com>
7632
7633 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7634 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7635 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7636 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7637 the sub-make.
7638
7639 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7640
7641 * linux-x86-low.c (compat_x32_clock_t): New.
7642 (compat_x32_siginfo_t): Likewise.
7643 (compat_x32_siginfo_from_siginfo): Likewise.
7644 (siginfo_from_compat_x32_siginfo): Likewise.
7645 (linux_is_elf64): Likewise.
7646 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7647 and siginfo_from_compat_x32_siginfo for x32.
7648 (x86_arch_setup): Set linux_is_elf64.
7649
7650 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7651
7652 PR gdb/13969
7653 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7654 e_machine field.
7655 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7656 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7657 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7658 compatible with process.
7659
7660 2012-04-12 Yao Qi <yao@codesourcery.com>
7661
7662 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7663 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7664 (install-only, install-info, clean): Handle sub dir gnulib.
7665 (all-lib, am--refresh): New targets.
7666 (memmem.o): Remove target.
7667 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7668 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7669 (AC_REPLACE_FUNCS): Remove memmem.
7670 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7671 (AC_OUTPUT): Generate Makefile in gnulib/.
7672 * aclocal.m4, config.in, configure: Regenerated.
7673
7674 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7675
7676 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7677
7678 2012-04-05 Pedro Alves <palves@redhat.com>
7679
7680 -Werror=strict-aliasing
7681
7682 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7683 pointer.
7684
7685 2012-04-04 Pedro Alves <palves@redhat.com>
7686
7687 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7688 (sparc_store_gregset_from_stack, sparc_store_gregset)
7689 (sparc_breakpoint_at): Fix formatting.
7690
7691 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7692
7693 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7694 are available.
7695 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7696 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7697 * config.in: Regenerate.
7698 * configure: Likewise.
7699
7700 2012-03-29 Pedro Alves <palves@redhat.com>
7701
7702 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7703 Correct ptrace arguments.
7704
7705 2012-03-28 Pedro Alves <palves@redhat.com>
7706
7707 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7708 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7709 (IA64_FR1_REGNUM): New defines.
7710 (ia64_fetch_register): New.
7711 (the_low_target): Install it.
7712 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7713 field.
7714 * linux-low.c (linux_fetch_registers): Try the
7715 the_low_target.fetch_register hook first.
7716
7717 * linux-arm-low.c (the_low_target): Adjust.
7718 * linux-bfin-low.c (the_low_target): Adjust.
7719 * linux-cris-low.c (the_low_target): Adjust.
7720 * linux-crisv32-low.c (the_low_target): Adjust.
7721 * linux-m32r-low.c (the_low_target): Adjust.
7722 * linux-m68k-low.c (the_low_target): Adjust.
7723 * linux-mips-low.c (the_low_target): Adjust.
7724 * linux-ppc-low.c (the_low_target): Adjust.
7725 * linux-s390-low.c (the_low_target): Adjust.
7726 * linux-sh-low.c (the_low_target): Adjust.
7727 * linux-sparc-low.c (the_low_target): Adjust.
7728 * linux-tic6x-low.c (the_low_target): Adjust.
7729 * linux-x86-low.c (the_low_target): Adjust.
7730 * linux-xtensa-low.c (the_low_target): Adjust.
7731
7732 2012-03-26 Pedro Alves <palves@redhat.com>
7733
7734 * server.c (handle_qxfer_libraries): Don't bail early if
7735 the_target->qxfer_libraries_svr4 is not NULL.
7736
7737 2012-03-26 Pedro Alves <palves@redhat.com>
7738
7739 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7740
7741 2012-03-23 Pedro Alves <palves@redhat.com>
7742
7743 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7744 "library-list-svr4" element's start tag when the the DSO list is
7745 empty.
7746
7747 2012-03-23 Pedro Alves <palves@redhat.com>
7748
7749 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7750 a variable whose type size is the same as the inferior's pointer
7751 size.
7752
7753 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7754
7755 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7756 struct siginfo.
7757 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7758 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7759 * linux-low.h: Include <signal.h>.
7760 (struct siginfo): Remove forward declaration.
7761 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7762 struct siginfo.
7763
7764 2012-03-21 Mike Frysinger <vapier@gentoo.org>
7765
7766 * .gitignore: Ignore more files.
7767
7768 2012-03-19 Pedro Alves <palves@redhat.com>
7769 Jan Kratochvil <jan.kratochvil@redhat.com>
7770
7771 * server.c (cont_thread, general_thread): Add describing comments.
7772 (start_inferior): Clear `cont_thread'.
7773 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7774 of a process.
7775
7776 2012-03-15 Yao Qi <yao@codesourcery.com>
7777
7778 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7779 handling to ...
7780 (cmd_qtdp): ... here.
7781
7782 2012-03-15 Yao Qi <yao@codesourcery.com>
7783
7784 * tracepoint.c (struct tracepoint_action_ops): New.
7785 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7786 (m_tracepoint_action_download): New.
7787 (r_tracepoint_action_download): New.
7788 (x_tracepoint_action_download): New.
7789 (l_tracepoint_action_download): New.
7790 (add_tracepoint_action): Install `action->ops' according type.
7791 (download_tracepoint_1): Move code `download' function pointer
7792 of various tracepoint_action_ops.
7793
7794 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7795
7796 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7797 linux_ptrace_attach_warnings.
7798
7799 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7800
7801 * Makefile.in (linux-ptrace.o): New.
7802 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7803 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7804 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7805 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7806 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7807 of these targets.
7808 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7809
7810 2012-03-08 Yao Qi <yao@codesourcery.com>
7811 Pedro Alves <palves@redhat.com>
7812
7813 Fix PR server/13392.
7814 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7815 offset of JMP insn.
7816 * tracepoint.c (remove_tracepoint): New.
7817 (cmd_qtdp): Call remove_tracepoint when failed to install.
7818
7819 2012-03-07 Pedro Alves <palves@redhat.com>
7820
7821 * linux-low.c (get_detach_signal): New.
7822 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7823 Pass on pending signals to PTRACE_DETACH. Check the result of the
7824 ptrace call.
7825 * server.c (program_signals, program_signals_p): New.
7826 (handle_general_set): Handle QProgramSignals.
7827 * server.h (program_signals, program_signals_p): Declare.
7828
7829 2012-03-05 Pedro Alves <palves@redhat.com>
7830 Jan Kratochvil <jan.kratochvil@redhat.com>
7831
7832 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7833 New comment why.
7834
7835 2012-03-03 Yao Qi <yao@codesourcery.com>
7836
7837 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7838 agent_look_up_symbols.
7839
7840 2012-03-03 Yao Qi <yao@codesourcery.com>
7841
7842 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7843 (linux-x86-low.o): Likewise.
7844 * server.h: Remove in_process_agent_loaded.
7845 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7846 common/agent.c.
7847 Update callers.
7848
7849 2012-03-03 Yao Qi <yao@codesourcery.com>
7850
7851 * tracepoint.c (gdb_agent_capability): New global.
7852 (in_process_agent_loaded_ust): Renamed to
7853 `in_process_agent_supports_ust'.
7854 Update callers.
7855 (in_process_agent_supports_ust): Call agent_capability_check.
7856 (clear_installed_tracepoints): Assert that agent supports
7857 agent.
7858
7859 2012-03-03 Yao Qi <yao@codesourcery.com>
7860
7861 * linux-low.c (linux_supports_agent): New.
7862 (linux_target_ops): Initialize field `supports_agent' with
7863 linux_supports_agent.
7864 * target.h (struct target_ops) <supports_agent>: New.
7865 (target_supports_agent): New macro.
7866 * server.c (handle_general_set): Handle packet 'QAgent'.
7867 (handle_query): Send `QAgent+'.
7868 * Makefile.in (server.o): Depends on agent.h.
7869
7870 2012-03-03 Yao Qi <yao@codesourcery.com>
7871
7872 * Makefile.in (OBS): Add agent.o.
7873 Add new rule for agent.o.
7874 Track dependence of tracepoint.c on agent.h.
7875 * tracepoint.c (run_inferior_command_1):
7876 (run_inferior_command): Call agent_run_command.
7877 (gdb_ust_connect_sync_socket): Deleted. Move it to
7878 common/agent.c.
7879 (resume_thread, stop_thread): Likewise.
7880 (gdb_ust_socket_init): Renamed to ...
7881 (gdb_agent_socket_init): ... New.
7882 (gdb_ust_thread): Renamed to ...
7883 (gdb_agent_helper_thread): ... New.
7884 (gdb_ust_init): Move some code to ...
7885 (gdb_agent_init): ... here. New.
7886 [HAVE_UST]: Call gdb_ust_init.
7887 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7888 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7889 * config.in, configure: Regenerated.
7890
7891 2012-03-02 Pedro Alves <palves@redhat.com>
7892
7893 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7894 * linux-low.c (struct simple_pid_list): New.
7895 (stopped_pids): New a struct simple_pid_list pointer.
7896 (add_to_pid_list, pull_pid_from_list): New.
7897 (handle_extended_wait): Don't assume the first signal new children
7898 report is SIGSTOP. Adjust call to pull_pid_from_list.
7899 (linux_wait_for_lwp): Adjust.
7900
7901 2012-03-02 Yao Qi <yao@codesourcery.com>
7902
7903 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7904 debug log.
7905
7906 2012-03-02 Yao Qi <yao@codesourcery.com>
7907
7908 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7909 `stop_pc' and `tpoint'. Update caller.
7910
7911 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7912
7913 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7914 * linux-low.c (use_linux_regsets): New macro.
7915 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7916 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7917 (linux_register_in_regsets): New function.
7918 (usr_fetch_inferior_registers): Skip registers covered by
7919 regsets.
7920 (usr_store_inferior_registers): Likewise.
7921 (usr_fetch_inferior_registers): New macro.
7922 (usr_store_inferior_registers): Likewise.
7923 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7924 (linux_store_registers): Likewise.
7925 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7926 prototype.
7927 (init_registers_mips64_dsp_linux): Likewise.
7928 (init_registers_mips_linux): New macro.
7929 (init_registers_mips_dsp_linux): Likewise.
7930 (mips_dsp_num_regs): Likewise.
7931 (DSP_BASE, DSP_CONTROL): New fallback macros.
7932 (mips_base_regs): New macro.
7933 (mips_regmap): Use it. Fix the size.
7934 (mips_dsp_regmap): New variable.
7935 (mips_dsp_regset_bitmap): Likewise.
7936 (mips_arch_setup): New function.
7937 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7938 than mips_regmap.
7939 (mips_cannot_store_register): Likewise.
7940 (the_low_target): Update .arch_setup, .num_regs and .regmap
7941 initializers. Add .regset_bitmap initializer.
7942 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7943 initializer.
7944 * linux-bfin-low.c (the_low_target): Likewise.
7945 * linux-cris-low.c (the_low_target): Likewise.
7946 * linux-crisv32-low.c (the_low_target): Likewise.
7947 * linux-ia64-low.c (the_low_target): Likewise.
7948 * linux-m32r-low.c (the_low_target): Likewise.
7949 * linux-m68k-low.c (the_low_target): Likewise.
7950 * linux-ppc-low.c (the_low_target): Likewise.
7951 * linux-s390-low.c (the_low_target): Likewise.
7952 * linux-sh-low.c (the_low_target): Likewise.
7953 * linux-sparc-low.c (the_low_target): Likewise.
7954 * linux-tic6x-low.c (the_low_target): Likewise.
7955 * linux-x86-low.c (the_low_target): Likewise.
7956 * linux-xtensa-low.c (the_low_target): Likewise.
7957 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7958 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7959 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7960 srv_xmlfiles.
7961 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7962 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7963
7964 2012-02-29 Yao Qi <yao@codesourcery.com>
7965 Pedro Alves <palves@redhat.com>
7966
7967 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7968 `step_over_finished' is true.
7969
7970 2012-02-27 Pedro Alves <palves@redhat.com>
7971
7972 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7973 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7974
7975 2012-02-27 Pedro Alves <palves@redhat.com>
7976
7977 PR server/9684
7978 * linux-low.c (pid_is_stopped): New.
7979 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7980
7981 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
7982
7983 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7984 of conditions.
7985
7986 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7987
7988 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7989
7990 2012-02-24 Luis Machado <lgustavo@codesourcery>
7991
7992 * server.c (handle_query): Advertise support for target-side
7993 breakpoint condition evaluation.
7994 (process_point_options): New function.
7995 (process_serial_event): When inserting a breakpoint, check for
7996 a target-side condition that should be evaluated.
7997
7998 * mem-break.c: Include regcache.h and ax.h.
7999 (point_cond_list_t): New data structure.
8000 (breakpoint) <cond_list>: New field.
8001 (find_gdb_breakpoint_at): Make non-static.
8002 (delete_gdb_breakpoint_at): Clear any target-side
8003 conditions.
8004 (clear_gdb_breakpoint_conditions): New function.
8005 (add_condition_to_breakpoint): Likewise.
8006 (add_breakpoint_condition): Likewise.
8007 (gdb_condition_true_at_breakpoint): Likewise.
8008 (gdb_breakpoint_here): Return result directly instead
8009 of going through a local variable.
8010
8011 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8012 (clear_gdb_breakpoint_conditions): Likewise.
8013 (add_breakpoint_condition): Likewise.
8014 (gdb_condition_true_at_breakpoint): Likewise.
8015
8016 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8017 (need_step_over_p): Take target-side breakpoint condition into
8018 consideration.
8019
8020 2012-02-24 Luis Machado <lgustavo@codesourcery>
8021
8022 * server.h: Include tracepoint.h.
8023 (agent_mem_read, agent_get_trace_state_variable_value,
8024 agent_set_trace_state_variable_value,
8025 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8026 get_set_tsv_func_addr): New prototypes.
8027
8028 * ax.h: New include file.
8029 * ax.c: New source file.
8030
8031 * tracepoint.c: Include ax.h.
8032 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8033 agent_expr, eval_result_type): Move to ax.h.
8034 (parse_agent_expr): Rename to ...
8035 (gdb_parse_agent_expr): ... this, make it non-static and move
8036 to ax.h.
8037 (unparse_agent_expr) Rename to ...
8038 (gdb_unparse_agent_expr): ... this, make it non-static and move
8039 to ax.h.
8040 (eval_agent_expr): Rename to ...
8041 (eval_tracepoint_agent_expr): ... this.
8042 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8043 forward declarations.
8044 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8045 (agent_get_trace_state_variable_value): New function.
8046 (agent_set_trace_state_variable_value): New function.
8047 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8048 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8049 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8050 (condition_true_at_tracepoint): Likewise.
8051 (parse_agent_expr): Rename to ...
8052 (gdb_parse_agent_expr): ... this and move to ax.c.
8053 (unparse_agent_expr): Rename to ...
8054 (gdb_unparse_agent_expr): ... this and move to ax.c.
8055 (gdb_agent_op_name): Move to ax.c.
8056 (eval_agent_expr): Rename to ...
8057 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8058 and move to ax.c.
8059 (eval_tracepoint_agent_expr): New function.
8060 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8061 non-static.
8062 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8063 ax.c.
8064 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8065 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8066 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8067 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8068 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8069 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8070 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8071 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8072 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8073 (compile_bytecodes): Remove forward declaration.
8074 (is_goto_target): Move to ax.c.
8075 (compile_bytecodes): Move to ax.c and call
8076 agent_get_trace_state_variable_value (...) and
8077 agent_set_trace_state_variable_value (...).
8078
8079 * Makefile.in: Update ax.c and IPA dependencies.
8080
8081 2012-02-24 Pedro Alves <palves@redhat.com>
8082
8083 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8084 (cmd_bigqtbuffer_circular): ... this. Only handle
8085 'QTBuffer:circular:'.
8086 (handle_tracepoint_general_set): Adjust.
8087
8088 2012-02-16 Yao Qi <yao@codesourcery.com>
8089
8090 * inferiors.c: Move code to ...
8091 * dll.c: .... here. New.
8092 * server.h: Declare clear_dlls.
8093 * Makefile.in (SFILES): Add dll.c.
8094 (OBS): Add dll.o
8095 (dll.o): New rule.
8096
8097 2012-02-11 Yao Qi <yao@codesourcery.com>
8098
8099 * server.c: (handle_monitor_command): Add a new parameter
8100 `own_buf'.
8101 (handle_query): Update caller.
8102
8103 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8104
8105 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8106 * configure, config.in: Regenerate.
8107 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8108 is not defined.
8109
8110 2012-02-02 Pedro Alves <palves@redhat.com>
8111
8112 Try SIGKILL first, then PTRACE_KILL.
8113 * linux-low.c (linux_kill_one_lwp): New.
8114 (linux_kill_one_lwp): Rename to ...
8115 (kill_one_lwp_callback): ... this. Use the new
8116 linux_kill_one_lwp.
8117
8118 2012-02-02 Pedro Alves <palves@redhat.com>
8119
8120 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8121 inferior.
8122
8123 2012-01-27 Pedro Alves <palves@redhat.com>
8124
8125 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8126 (elf_64_file_p): Make static.
8127 (linux_pid_exe_is_elf_64_file): New.
8128 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8129 Delete declarations.
8130 (linux_pid_exe_is_elf_64_file): Declare.
8131 * linux-x86-low.c (x86_arch_setup): Use
8132 linux_pid_exe_is_elf_64_file.
8133
8134 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8135
8136 * linux-low.c (linux_wait_for_event_1): Rename to ...
8137 (linux_wait_for_event): ... here and merge it with former
8138 linux_wait_for_event - new variable wait_ptid, use it.
8139 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8140
8141 2012-01-23 Pedro Alves <palves@redhat.com>
8142
8143 * server.c (main): Avoid yet another case of infinite loop while
8144 detaching/killing after a longjmp.
8145
8146 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8147
8148 Code cleanup.
8149 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8150
8151 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8152
8153 * hostio.c (handle_readlink): New function.
8154 (handle_vFile): Call it to handle "vFile:readlink" packets.
8155
8156 2012-01-20 Pedro Alves <palves@redhat.com>
8157 Ulrich Weigand <ulrich.weigand@linaro.org>
8158
8159 * server.c (handle_v_requests): Only support vAttach and vRun to
8160 start multiple processes when in extended protocol mode.
8161
8162 2012-01-17 Pedro Alves <palves@redhat.com>
8163
8164 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8165 memalign plus mprotect to allocate the scratch buffer.
8166
8167 2012-01-13 Pedro Alves <palves@redhat.com>
8168
8169 * server.c (attach_inferior): Clear `cont_thread'.
8170
8171 2012-01-13 Pedro Alves <palves@redhat.com>
8172
8173 * server.c (main): Avoid infinite loop while detaching/killing
8174 after a longjmp.
8175
8176 2012-01-09 Doug Evans <dje@google.com>
8177
8178 * server.c (start_inferior): Set last_ptid in --wrapper case.
8179
8180 2012-01-06 Yao Qi <yao@codesourcery.com>
8181
8182 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8183 defined.
8184 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8185
8186 2012-01-04 Yao Qi <yao@codesourcery.com>
8187
8188 * tracepoint.c (cmd_qtdp): Print debug message
8189 for static tracepoint.
8190
8191 2012-01-04 Yao Qi <yao@codesourcery.com>
8192
8193 * tracepoint.c (trace_vdebug): Differentiate debug message
8194 between gdbserver and IPA.
8195
8196 2012-01-03 Yao Qi <yao@codesourcery.com>
8197
8198 * tracepoint.c (tracepoint_was_hit): Don't collect for
8199 static tracepoint.
8200
8201 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8202
8203 * terminal.h: Reformat copyright header.
8204
8205 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8206
8207 * server.c (gdbserver_version): Update copyright year.
8208 * gdbreplay.c (gdbreplay_version): Likewise.
8209
8210 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8211
8212 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8213
8214 Revert:
8215 2011-12-18 Hui Zhu <teawater@gmail.com>
8216 * linux-low.c (linux_create_inferior): Save return value to ret.
8217
8218 2011-12-18 Hui Zhu <teawater@gmail.com>
8219
8220 * linux-low.c (linux_create_inferior): Save return value to ret.
8221
8222 2011-12-16 Doug Evans <dje@google.com>
8223
8224 * linux-low.c (linux_create_inferior): If stdio connection,
8225 redirect stdin from /dev/null, stdout to stderr.
8226 * remote-utils.c (remote_is_stdio): New static global.
8227 (remote_connection_is_stdio): New function.
8228 (remote_prepare): Handle stdio connection.
8229 (remote_open): Ditto.
8230 (remote_close): Don't close stdin for stdio connections.
8231 (read_prim,write_prim): New functions. Replace all calls to
8232 read/write to these.
8233 * server.c (main): Watch for "-" argument. Move call to
8234 remote_prepare before start_inferior.
8235 * server.h (STDIO_CONNECTION_NAME): New macro.
8236 (remote_connection_is_stdio): Declare.
8237
8238 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8239 in debugging output.
8240
8241 2011-12-15 Yao Qi <yao@codesourcery.com>
8242
8243 * tracepoint.c: Include sys/syscall.h.
8244 (gdb_ust_thread): Remove preprocessor conditional.
8245
8246 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8247
8248 * linux-low.c (linux_detach_one_lwp): Call
8249 the_low_target.prepare_to_resume before detaching.
8250
8251 2011-12-14 Yao Qi <yao@codesourcery.com>
8252
8253 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8254 of write.
8255
8256 2011-12-14 Yao Qi <yao@codesourcery.com>
8257
8258 * i386-low.c (i386_low_stopped_data_address): Initialize local
8259 variable `control'.
8260
8261 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8262
8263 PR remote/13492
8264
8265 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8266 DR_CONTROL unless necessary. Extend comments.
8267 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8268 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8269
8270 2011-12-13 Yao Qi <yao@codesourcery.com>
8271
8272 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8273 macros.
8274 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8275
8276 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8277
8278 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8279 Print new debug message for such case.
8280
8281 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8282
8283 Fix overlapping memcpy.
8284 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8285 the read_inferior_memory transfer.
8286 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8287 write_inferior_memory transfer.
8288 (set_fast_tracepoint_jump): New variable buf. Use it for the
8289 read_inferior_memory and write_inferior_memory transfers.
8290 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8291 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8292 Use it for the write_inferior_memory transfer.
8293 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8294 buffers.
8295
8296 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8297
8298 * linux-low.c (fetch_register, store_register): Make code
8299 consistent, fix formatting.
8300
8301 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8302
8303 * linux-low.c (usr_store_inferior_registers): Factor out code
8304 to handle individual registers into...
8305 (store_register): ... this new function.
8306
8307 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8308
8309 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8310 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8311 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8312 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8313 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8314 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8315 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8316 (srv_xmlfiles): Add new XML files.
8317
8318 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8319 and <sys/uio.h>.
8320 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8321 (init_registers_s390_linux32v1): Add prototype.
8322 (init_registers_s390_linux32v2): Likewise.
8323 (init_registers_s390_linux64v1): Likewise.
8324 (init_registers_s390_linux64v2): Likewise.
8325 (init_registers_s390x_linux64v1): Likewise.
8326 (init_registers_s390x_linux64v2): Likewise.
8327 (s390_num_regs): Increment to 52.
8328 (s390_regmap): Add orig_r2 register.
8329 (s390_num_regs_3264): Increment to 68.
8330 (s390_regmap_3264): Add orig_r2 register.
8331 (s390_collect_ptrace_register): Handle orig_r2 register.
8332 (s390_supply_ptrace_register): Likewise.
8333 (s390_fill_last_break): New function.
8334 (s390_store_last_break): Likewise.
8335 (s390_fill_system_call): New function.
8336 (s390_store_system_call): Likewise.
8337 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8338 register sets.
8339 (s390_check_regset): New function.
8340 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8341 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8342 Update target_regsets for available register sets.
8343
8344 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8345 Jan Kratochvil <jan.kratochvil@redhat.com>
8346
8347 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8348 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8349 New.
8350 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8351 * linux-low.h (struct process_info_private): New member r_debug.
8352 * server.c (handle_qxfer_libraries): Call
8353 the_target->qxfer_libraries_svr4.
8354 (handle_qxfer_libraries_svr4): New function.
8355 (qxfer_packets): New entry "libraries-svr4".
8356 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8357 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8358 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8359 PACKET_qXfer_libraries_svr4.
8360
8361 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8362
8363 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8364 PSW address/mask between 8-byte and 16-byte formats.
8365 (s390_supply_ptrace_register): Likewise.
8366 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8367 basic addressing mode bit.
8368
8369 2011-11-24 Stan Shebs <stan@codesourcery.com>
8370
8371 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8372
8373 2011-11-17 Stan Shebs <stan@codesourcery.com>
8374
8375 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8376 (tracing_start_time): New global.
8377 (tracing_stop_time): New global.
8378 (tracing_user_name): New global.
8379 (tracing_notes): New global.
8380 (tracing_stop_note): New global.
8381 (cmd_qtstart): Set traceframe_usage, start_time.
8382 (stop_tracing): Set stop_time.
8383 (cmd_qtstatus): Report additional status.
8384 (cmd_qtp): New function.
8385 (handle_tracepoint_query): Call it.
8386 (cmd_qtnotes): New function.
8387 (handle_tracepoint_general_set): Call it.
8388 (get_timestamp): Rename from tsv_get_timestamp.
8389
8390 2011-11-14 Stan Shebs <stan@codesourcery.com>
8391 Kwok Cheung Yeung <kcy@codesourcery.com>
8392
8393 * linux-x86-low.c (small_jump_insn): New.
8394 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8395 trampoline and error message, build a trampoline and issue a small
8396 jump instruction to it.
8397 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8398 trampoline and error message.
8399 (x86_get_min_fast_tracepoint_insn_len): New.
8400 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8401 * linux-low.h (struct linux_target_ops): Add arguments to
8402 install_fast_tracepoint_jump_pad operation, add new operation.
8403 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8404 arguments.
8405 (linux_get_min_fast_tracepoint_insn_len): New function.
8406 (linux_target_op): Add new operation.
8407 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8408 (gdb_trampoline_buffer_end): Ditto.
8409 (gdb_trampoline_buffer_error): Ditto.
8410 (struct ipa_sym_addresses): Add fields for new IPA variables.
8411 (symbol_list): Add entries for new IPA variables.
8412 (struct tracepoint): Add fields to hold the address range of the
8413 trampoline used by the tracepoint.
8414 (trampoline_buffer_head): New static variable.
8415 (trampoline_buffer_tail): Ditto.
8416 (claim_trampoline_space): New function.
8417 (have_fast_tracepoint_trampoline_buffer): New function.
8418 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8419 structure.
8420 (install_fast_tracepoint): Ditto, also add error buffer argument.
8421 (cmd_qtminftpilen): New function.
8422 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8423 (fast_tracepoint_from_trampoline_address): New function.
8424 (fast_tracepoint_collecting): Handle trampoline as part of jump
8425 pad space.
8426 (set_trampoline_buffer_space): New function.
8427 (initialize_tracepoint): Initialize new IPA variables.
8428 * target.h (struct target_ops): Add arguments to
8429 install_fast_tracepoint_jump_pad operation, add new
8430 get_min_fast_tracepoint_insn_len operation.
8431 (target_get_min_fast_tracepoint_insn_len): New.
8432 (install_fast_tracepoint_jump_pad): Add arguments.
8433 * server.h (IPA_BUFSIZ): Define.
8434 * linux-i386-ipa.c: Include extra header files.
8435 (initialize_fast_tracepoint_trampoline_buffer): New function.
8436 (initialize_low_tracepoint): Call it.
8437 * server.h (set_trampoline_buffer_space): Declare.
8438 (claim_trampoline_space): Ditto.
8439 (have_fast_tracepoint_trampoline_buffer): Ditto.
8440
8441 2011-11-14 Yao Qi <yao@codesourcery.com>
8442
8443 * server.c (handle_query): Handle InstallInTrace for qSupported.
8444 * tracepoint.c (add_tracepoint): Sort list.
8445 (install_tracepoint, download_tracepoint): New.
8446 (cmd_qtdp): Call them to install and download tracepoints.
8447 (sort_tracepoints): Removed.
8448 (cmd_qtstart): Update.
8449
8450 2011-11-14 Yao Qi <yao@codesourcery.com>
8451
8452 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8453 * mem-break.h: Declare.
8454 * tracepoint.c (cmd_qtstart): Move some code to ...
8455 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8456 New.
8457 (download_tracepoints): Move some code to ...
8458 (download_tracepoint_1): ... here. New.
8459
8460 2011-11-08 Yao Qi <yao@codesourcery.com>
8461
8462 * remote-utils.c (relocate_instruction): A comment fix.
8463
8464 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8465
8466 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8467 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8468 dr_status_mirror and dr_control_mirror from debug_reg_state.
8469 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8470 (i386_initial_stuff): Remove use of deleted globals.
8471 (i386_get_thread_context, i386_set_thread_context,
8472 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8473 from debug_reg_state.
8474
8475 2011-11-05 Yao Qi <yao@codesourcery.com>
8476
8477 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8478 address as TPOINT's.
8479
8480 2011-11-02 Stan Shebs <stan@codesourcery.com>
8481
8482 * tracepoint.c (agent_mem_read_string): New function.
8483 (eval_agent_expr): Call it for tracenz.
8484 * server.c (handle_query): Report support for tracenz.
8485
8486 2011-11-02 Yao Qi <yao@codesourcery.com>
8487
8488 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8489
8490 2011-11-02 Yao Qi <yao@codesourcery.com>
8491
8492 * target.h: Fix a typo in comment.
8493
8494 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8495
8496 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8497 clobber the breakpoints' shadows with fast tracepoint jumps.
8498 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8499 * target.c (write_inferior_memory): Also pass MYADDR down to
8500 check_mem_write.
8501
8502 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8503
8504 * configure.ac: Check support for personality routine.
8505 * configure: Regenerate.
8506 * config.in: Likewise.
8507 * linux-low.c: Include <sys/personality.h>.
8508 Define ADDR_NO_RANDOMIZE if necessary.
8509 (linux_create_inferior): Disable address space randomization when
8510 forking inferior, if requested.
8511 (linux_supports_disable_randomization): New function.
8512 (linux_target_ops): Install it.
8513 * server.h (disable_randomization): Declare.
8514 * server.c (disable_randomization): New global variable.
8515 (handle_general_set): Handle QDisableRandomization.
8516 (handle_query): Likewise for qSupported.
8517 (main): Support --disable-randomization and --no-disable-randomization
8518 command line arguments.
8519 * target.h (struct target_ops): Add supports_disable_randomization.
8520 (target_supports_disable_randomization): New macro.
8521
8522 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8523
8524 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8525 ifdef check.
8526 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8527 [!PT_GETDSBT] (target_loadmap): New definition.
8528 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8529 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8530 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8531 and PT_GETDSBT to LINUX_LOADMAP.
8532 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8533 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8534
8535 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8536
8537 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8538 (arm_linux_hwbp_cap): New static variable.
8539 (arm_linux_get_hwbp_cap): Replace by ...
8540 (arm_linux_init_hwbp_cap): ... this new function.
8541 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8542 (arm_linux_get_hw_watchpoint_count): Likewise.
8543 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8544 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8545 (arm_prepare_to_resume): Use perror_with_name instead of error.
8546
8547 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8548
8549 * linux-arm-low.c: Include <signal.h>.
8550 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8551 (struct arm_linux_hwbp_cap): New data type.
8552 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8553 (struct arm_linux_hw_breakpoint): New data type.
8554 (MAX_BPTS, MAX_WPTS): Define.
8555 (struct arch_process_info, struct arch_lwp_info): New data types.
8556 (arm_linux_get_hwbp_cap): New function.
8557 (arm_linux_get_hw_breakpoint_count): Likewise.
8558 (arm_linux_get_hw_watchpoint_count): Likewise.
8559 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8560 (arm_hwbp_control_initialize): Likewise.
8561 (arm_hwbp_control_is_enabled): Likewise.
8562 (arm_hwbp_control_is_initialized): Likewise.
8563 (arm_hwbp_control_disable): Likewise.
8564 (arm_linux_hw_breakpoint_equal): Likewise.
8565 (arm_linux_hw_point_initialize): Likewise.
8566 (struct update_registers_data): New data structure.
8567 (update_registers_callback: New function.
8568 (arm_insert_point): Likewise.
8569 (arm_remove_point): Likewise.
8570 (arm_stopped_by_watchpoint): Likewise.
8571 (arm_stopped_data_address): Likewise.
8572 (arm_new_process): Likewise.
8573 (arm_new_thread): Likewise.
8574 (arm_prepare_to_resume): Likewise.
8575 (the_low_target): Register arm_insert_point, arm_remove_point,
8576 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8577 arm_new_thread, and arm_prepare_to_resume.
8578
8579 2011-09-15 Stan Shebs <stan@codesourcery.com>
8580
8581 * server.h (struct emit_ops): Add compare-goto fields.
8582 * tracepoint.c (gdb_agent_op_sizes): New table.
8583 (emit_eq_goto): New function.
8584 (emit_ne_goto): New function.
8585 (emit_lt_goto): New function.
8586 (emit_le_goto): New function.
8587 (emit_gt_goto): New function.
8588 (emit_ge_goto): New function.
8589 (is_goto_target): New function.
8590 (compile_bytecodes): Recognize special cases of compare-goto
8591 combinations and call specialized emitters for them.
8592 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8593 (amd64_emit_ne_goto): New function.
8594 (amd64_emit_lt_goto): New function.
8595 (amd64_emit_le_goto): New function.
8596 (amd64_emit_gt_goto): New function.
8597 (amd64_emit_ge_goto): New function.
8598 (amd64_emit_ops): Add the new functions.
8599 (i386_emit_eq_goto): New function.
8600 (i386_emit_ne_goto): New function.
8601 (i386_emit_lt_goto): New function.
8602 (i386_emit_le_goto): New function.
8603 (i386_emit_gt_goto): New function.
8604 (i386_emit_ge_goto): New function.
8605 (i386_emit_ops): Add the new functions.
8606
8607 2011-09-08 Stan Shebs <stan@codesourcery.com>
8608
8609 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8610 (i386_emit_epilogue): Restore %ebx.
8611
8612 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8613
8614 * server.c (step_thread): Remove definition.
8615 (process_serial_event): Don't handle Hs.
8616 * server.h (step_thread): Remove declaration.
8617 * target.c (set_desired_inferior): Remove use of step_thread.
8618
8619 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8620
8621 * linux-low.c: Include linux-procfs.h.
8622 (linux_attach_lwp_1): Update comments.
8623 (linux_attach): Scan for existing threads when attaching to a
8624 process that is the tgid.
8625 * Makefile.in: Update dependencies.
8626
8627 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8628
8629 * configure.srv: Add linux-procfs.o dependencies.
8630
8631 2011-08-14 Yao Qi <yao@codesourcery.com>
8632
8633 * target.h (struct target_ops): Fix indent.
8634 * win32-low.c (win32_target_ops): Fix comment.
8635
8636 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8637 Yao Qi <yao@codesourcery.com>
8638
8639 * Makefile.in (clean): Remove tic6x-*.c files.
8640 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8641 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8642 (tic6x-c64xp-linux.c): Likewise.
8643 * configure.srv: Add support for tic6x-*-uclinux.
8644 * linux-tic6x-low.c: New.
8645 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8646
8647 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8648 Yao Qi <yao@codesourcery.com>
8649
8650 * target.h (struct target_ops): Add read_loadmap.
8651 * linux-low.c (struct target_loadseg): New type.
8652 (struct target_loadmap): New type.
8653 (linux_read_loadmap): New function.
8654 (linux_target_ops): Add linux_read_loadmap.
8655 * server.c (handle_query): Support qXfer:fdpic:read packet.
8656 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8657 to NULL.
8658
8659 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8660
8661 * win32-low.c: Include <stdint.h>.
8662
8663 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8664
8665 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8666 to the inferior here.
8667 (i386_remove_aligned_watchpoint): Ditto.
8668 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8669 fit part of the watchpoint in the debug registers.
8670 (i386_update_inferior_debug_regs): New.
8671 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8672 registers, and only update the inferior on success.
8673 (i386_low_remove_watchpoint): Ditto.
8674
8675 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8676
8677 * linux-low.c (compare_ints, unique, list_threads, show_process,
8678 linux_core_of_thread): Delete.
8679 (linux_target_ops): Change linux_core_of_thread to
8680 linux_common_core_of_thread.
8681 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8682 * utils.c (malloc_failure): Change type of argument.
8683 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8684 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8685 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8686 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8687 (IPA_OBJS): Add common-utils-ipa.o.
8688 (ptid_h, linux_osdata_h): New macros.
8689 (server_h): Add common/common-utils.h, common/xml-utils.h,
8690 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8691 common/ptid.h.
8692 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8693 ptid.o, buffer.o): New rules.
8694 (linux-low.o): Add common/linux-osdata.h as a dependency.
8695 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8696 * configure.ac: Add AC_HEADER_DIRENT check.
8697 * config.in: Regenerate.
8698 * configure: Regenerate.
8699 * remote-utils.c (xml_escape_text): Delete.
8700 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8701 buffer_xml_printf): Move to common/buffer.c.
8702 * server.c (main): Remove call to initialize_inferiors.
8703 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8704 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8705 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8706 internal_error, gdb_assert, gdb_assert_fail): Delete.
8707 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8708 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8709 common/buffer.h.
8710 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8711 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8712 initialize_inferiors): Delete.
8713
8714 2011-07-20 Pedro Alves <pedro@codesourcery.com>
8715
8716 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8717 symbol error.
8718
8719 2011-05-31 Pedro Alves <pedro@codesourcery.com>
8720
8721 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8722 assertion.
8723 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8724
8725 2011-05-26 Yao Qi <yao@codesourcery.com>
8726
8727 * Makefile.in (thread-db.o): Track dependence to
8728 common/gdb_thread_db.h.
8729 * thread-db.c: include gdb_thread_db.h from right place.
8730
8731 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8732
8733 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8734 __FILE__ and __LINE__ to internal_error.
8735
8736 2011-05-13 Doug Evans <dje@google.com>
8737
8738 * thread-db.c (try_thread_db_load_from_sdir): New function.
8739 (try_thread_db_load_from_dir): New function.
8740 (thread_db_load_search): Handle $sdir, ignore $pdir.
8741 Remove trying of system directories if search of
8742 libthread-db-search-path fails, that is now done via $sdir.
8743
8744 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8745
8746 * server.c (handle_query): Add EnableDisableTracepoints to the list
8747 of supported features.
8748 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8749 tracepoints.
8750 (cmd_qtenable_disable): New.
8751 (cmd_qtstart): Install tracepoints even if disabled.
8752 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8753 receiving a QTEnable or QTDisable packet.
8754 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8755 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8756 tracepoints.
8757 (gdb_probe): Skip data collection if static tracepoint is disabled.
8758
8759 2011-05-10 Doug Evans <dje@google.com>
8760
8761 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8762
8763 2011-05-04 Doug Evans <dje@google.com>
8764
8765 * linux-low.c (linux_join): Skip process lookup.
8766 * spu-low.c (spu_join): Ditto.
8767 * server.c (join_inferiors_callback): Delete.
8768 (process_serial_event): For 'D' packet (detach) call join_inferior
8769 directly.
8770
8771 2011-05-04 Joseph Myers <joseph@codesourcery.com>
8772
8773 * README: Don't mention xscale*-*-linux*.
8774 * configure.srv (xscale*-*-linux*): Don't handle target.
8775
8776 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8777
8778 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8779 casting pointers.
8780 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8781 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8782 (i386_emit_void_call_2): Likewise.
8783
8784 2011-04-26 Yao Qi <yao@codesourcery.com>
8785
8786 * linux-low.c: Move common macros to linux-ptrace.h.
8787 Include linux-ptrace.h.
8788 * Makefile.in (linux_ptrace_h): New.
8789 (linux-low.o): Depends on linux-ptrace.h.
8790
8791 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8792
8793 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8794 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8795 (remote_prepare): New function with most of the TCP code from ...
8796 (remote_open): ... here. Detect PORT here unconditionally. Move also
8797 setting transport_is_reliable.
8798 * server.c (run_once): New variable.
8799 (gdbserver_usage): Document it.
8800 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8801 the first run if RUN_ONCE.
8802 * server.h (run_once, remote_prepare): New declarations.
8803
8804 2011-04-19 Tom Tromey <tromey@redhat.com>
8805
8806 * win32-low.c (handle_load_dll): Remove duplicate "the".
8807
8808 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8809
8810 Remove support for old Cygwin 1.5 versions.
8811 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8812 function to avoid warning.
8813 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8814 warning.
8815
8816 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8817
8818 * gdbserver/server.h (Macro _): Define it if not available.
8819
8820 2011-03-14 Michael Snyder <msnyder@vmware.com>
8821
8822 * hostio.c (handle_close): Remove unnecessary null test.
8823
8824 2011-03-10 Joel Brobecker <brobecker@adacore.com>
8825
8826 * Makefile.in (maintainer-clean realclean distclean): Remove
8827 "make ... subdir_do" command.
8828
8829 2011-03-10 Michael Snyder <msnyder@vmware.com>
8830
8831 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8832
8833 * server.c (handle_v_run): Free alloced buffer on early return.
8834
8835 2011-03-09 Yao Qi <yao@codesourcery.com>
8836
8837 Revert:
8838 2011-03-04 Yao Qi <yao@codesourcery.com>
8839
8840 * Makefile.in: Remove GNU make feature --directory.
8841
8842 2011-03-05 Yao Qi <yao@codesourcery.com>
8843
8844 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8845 (subdir_do): New make target. Copied from gdb/Makefile.
8846 (maintainer-clean, realclean, distclean, clean): Call corresponding
8847 make targets in common/Makefile.
8848
8849 2011-02-11 Yao Qi <yao@codesourcery.com>
8850
8851 * configure.ac: Call AC_PROG_RANLIB.
8852 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8853 * configure: Regenerate.
8854
8855 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8856
8857 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8858
8859 2011-03-06 Yao Qi <yao@codesourcery.com>
8860
8861 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8862
8863 2011-03-05 Yao Qi <yao@codesourcery.com>
8864
8865 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8866 (subdir_do): New make target. Copied from gdb/Makefile.
8867 (maintainer-clean, realclean, distclean, clean): Call corresponding
8868 make targets in common/Makefile.
8869
8870 2011-03-04 Yao Qi <yao@codesourcery.com>
8871
8872 * Makefile.in: Remove GNU make feature --directory.
8873
8874 2011-03-04 Michael Snyder <msnyder@vmware.com>
8875
8876 * server.c (queue_stop_reply): Call xmalloc not malloc.
8877
8878 2011-03-02 Michael Snyder <msnyder@vmware.com>
8879
8880 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8881
8882 2011-02-28 Michael Snyder <msnyder@vmware.com>
8883
8884 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8885 (cmd_qtframe): Ditto.
8886 (cmd_qtbuffer): Ditto.
8887 (cmd_bigqtbuffer): Ditto.
8888
8889 * utils.c (decimal2str): Initialize 'width' to nine, then
8890 don't mess with it.
8891
8892 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8893
8894 * hostio.c (require_data): Free *data, not data.
8895
8896 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8897
8898 * hostio.c (require_data): Use free, not xfree.
8899
8900 2011-02-27 Michael Snyder <msnyder@vmware.com>
8901
8902 * server.c (handle_query): Discard unused value.
8903
8904 * hostio.c (require_data): Free malloc memory before returning
8905 error.
8906
8907 2011-02-26 Michael Snyder <msnyder@vmware.com>
8908
8909 * linux-low.c (list_threads): Call closedir for dirent.
8910
8911 2011-02-27 Michael Snyder <msnyder@vmware.com>
8912
8913 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8914 a case statement falls through.
8915
8916 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8917
8918 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8919 in comparison.
8920
8921 2011-02-26 Michael Snyder <msnyder@vmware.com>
8922
8923 * utils.c (decimal2str): Eliminate dead code and dead param.
8924 (pulongest): Drop dead param from call to decimal2str.
8925 (plongest): Ditto.
8926
8927 2011-02-24 Joel Brobecker <brobecker@adacore.com>
8928
8929 Revert the following patch (not approved yet):
8930 2011-02-21 Hui Zhu <teawater@gmail.com>
8931 * tracepoint.c (tp_printf): New function.
8932 (eval_agent_expr): Handle gdb_agent_op_printf.
8933
8934 2011-02-21 Hui Zhu <teawater@gmail.com>
8935
8936 * tracepoint.c (tp_printf): New function.
8937 (eval_agent_expr): Handle gdb_agent_op_printf.
8938
8939 2011-02-18 Tom Tromey <tromey@redhat.com>
8940
8941 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8942 (tracepoint.o): Likewise.
8943 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8944 (gdb_agent_op_names): Likewise.
8945
8946 2011-02-18 Tom Tromey <tromey@redhat.com>
8947
8948 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8949 gdb_agent_op_rot>: New constants.
8950 (gdb_agent_op_names): Add pick and roll.
8951 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8952 cases.
8953
8954 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8955
8956 * aclocal.m4: Regenerated with aclocal-1.11.1.
8957
8958 2011-02-14 Pedro Alves <pedro@codesourcery.com>
8959
8960 * server.c (handle_qxfer_traceframe_info): New.
8961 (qxfer_packets): Register "traceframe-info".
8962 (handle_query): Report support for qXfer:traceframe-info:read+.
8963 * tracepoint.c (match_blocktype): New.
8964 (traceframe_find_block_type): Rename to ...
8965 (traceframe_walk_blocks): ... this. Add callback filter argument,
8966 and use it.
8967 (traceframe_find_block_type): New, reimplemented on top of
8968 traceframe_walk_blocks.
8969 (build_traceframe_info_xml): New.
8970 (traceframe_read_info): New.
8971 * server.h (traceframe_read_info): Declare.
8972
8973 2011-02-11 Yao Qi <yao@codesourcery.com>
8974
8975 * configure.ac: Call AC_PROG_RANLIB.
8976 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8977 * configure: Regenerate.
8978
8979 2011-02-07 Pedro Alves <pedro@codesourcery.com>
8980
8981 * server.c (gdb_read_memory): Change return semantics to allow
8982 partial transfers.
8983 (handle_search_memory_1): Adjust.
8984 (process_serial_event) <'m' packet>: Handle partial transfers.
8985 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8986
8987 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8988
8989 * regcache.c (init_register_cache): Initialize
8990 regcache->register_status.
8991 (free_register_cache): Release regcache->register_status.
8992 (regcache_cpy): Copy register_status.
8993 (registers_to_string): Print 'x's for unavailable registers.
8994 (supply_register): Mark the register's status valid or
8995 unavailable, depending on whether a buffer was passed in or not.
8996 (supply_register_zeroed): New.
8997 (supply_regblock): Mark the registers' status valid or
8998 unavailable, depending on whether a buffer was passed in or not.
8999 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9000 (struct regcache): New `register_status' field.
9001 (supply_register_zeroed): Declare.
9002 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9003 supply_register_zeroed, rather than passing a NULL buffer to
9004 supply_register.
9005 * tracepoint.c (fetch_traceframe_registers): Update comment.
9006
9007 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9008
9009 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9010 buffer explicit.
9011
9012 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9013
9014 * server.h (decode_xfer_write): Change prototype.
9015 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9016 and don't extract the annex here.
9017 * server.c (decode_xfer_read): Remove `annex' parameter,
9018 and don't extract the annex here.
9019 (decode_xfer): New.
9020 (struct qxfer): New.
9021 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9022 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9023 (handle_qxfer_statictrace): New functions, abstracted out from
9024 handle_query, and made to use the struct qxfer interface.
9025 (handle_threads_qxfer_proper): Rename to ...
9026 (handle_qxfer_threads_proper): ... this.
9027 (handle_threads_qxfer): Rename to ...
9028 (handle_qxfer_threads): ... this. Adjust.
9029 (qxfer_packets): New array.
9030 (handle_qxfer): New function.
9031 (handle_query): Use handle_qxfer.
9032
9033 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9034
9035 * gdbreplay.c: Shorten lines of >= 80 columns.
9036 * linux-low.c: Ditto.
9037 * linux-ppc-low.c: Ditto.
9038 * linux-s390-low.c: Ditto.
9039 * linux-sparc-low.c: Ditto.
9040 * linux-x86-low.c: Ditto.
9041 * linux-xtensa-low.c: Ditto.
9042 * mem-break.c: Ditto.
9043 * nto-low.c: Ditto.
9044 * regcache.h: Ditto.
9045 * remote-utils.c: Ditto.
9046 * server.c: Ditto.
9047 * server.h: Ditto.
9048 * thread-db.c: Ditto.
9049 * tracepoint.c: Ditto.
9050 * utils.c: Ditto.
9051 * win32-low.h: Ditto.
9052
9053 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9054
9055 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9056 update.
9057
9058 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9059
9060 * server.c (gdbserver_version): Update copyright year in version
9061 output.
9062 * gdbreplay.c (gdbreplay_version): Ditto.
9063
9064 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9065
9066 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9067 * linux-bfin-low.c: New file.
9068 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9069 PT_DATA_ADDR for BFIN targets.
9070 * Makefile.in (SFILES): Add linux-bfin-low.c.
9071 (clean): Remove reg-bfin.c.
9072 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9073 * README: Mention supported Blackfin targets.
9074
9075 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9076
9077 * .gitignore: New file.
9078
9079 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9080
9081 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9082
9083 2010-10-22 Jie Zhang <jie@codesourcery.com>
9084
9085 * Makefile.in: Add FLAGS_TO_PASS variable.
9086 (install): Remove dependency of install-only and recursively
9087 invoke make for install-only.
9088
9089 2010-10-04 Doug Evans <dje@google.com>
9090
9091 * Makefile.in (uninstall): Use $(DESTDIR).
9092
9093 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9094
9095 PR gdb/11842
9096
9097 * linux-x86-low.c (compat_siginfo_from_siginfo)
9098 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9099 si_code is < 0. Check for si_code == SI_TIMER before checking for
9100 si_code < 0.
9101
9102 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9103
9104 * lynx-i386-low.c: New file.
9105 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9106
9107 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9108
9109 * lynx-low.c (ptrace_request_to_str): Remove handling for
9110 request values that have been removed in LynxOS 5.x.
9111
9112 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9113
9114 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9115 <ptrace.h>
9116
9117 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9118
9119 * configure.ac: Add --enable-inprocess-agent option.
9120 * configure: Rebuilt.
9121
9122 2010-09-06 Yao Qi <yao@codesourcery.com>
9123
9124 * linux-low.c (linux_kill): Remove unused variable.
9125 (linux_stabilize_threads): Likewise.
9126 * server.c (start_inferior): Likewise.
9127 (queue_stop_reply_callback): Likewise.
9128 * tracepoint.c (do_action_at_tracepoint): Likewise.
9129
9130 2010-09-06 Yao Qi <yao@codesourcery.com>
9131
9132 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9133 on return.
9134
9135 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9136
9137 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9138
9139 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9140
9141 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9142 "$(IPA_DEPFILES)".
9143
9144 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9145
9146 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9147 gdbserver/lynx-ppc-low.c: New files.
9148 * Makefile.in (lynx_low_h): New variable.
9149 (lynx-low.o, lynx-ppc-low.o): New rules.
9150 * configure.ac: On LynxOS, link with -lnetinet.
9151 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9152 * configure: regenerate.
9153
9154 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9155
9156 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9157 * configure.ac: Add check for vasprintf and vsnprintf.
9158 * configure, config.in: Regenerate.
9159 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9160
9161 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9162
9163 * gdbreplay.c: Move include of alloca.h up, next to include of
9164 malloc.h.
9165 * server.h: Add include of malloc.h.
9166 * mem-break.c: Remove include of malloc.h.
9167 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9168
9169 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9170
9171 * Makefile.in (memmem.o): Build with -Wno-error.
9172
9173 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9174
9175 * utils.c (xsnprintf): Make non-static.
9176 * server.h: Add xsnprintf declaration.
9177 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9178 replace calls to snprintf by calls to xsnprintf throughout.
9179
9180 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9181
9182 * configure.ac: Add configure check for alloca.
9183 * configure, config.in: Regenerate.
9184 * server.h: Include alloca.h if it exists.
9185 * gdbreplay.c: Include alloca.h if it exists.
9186
9187 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9188
9189 * linux-low.c (__SIGRTMIN): Define if not already defined.
9190 (linux_create_inferior): Check for __ANDROID__ rather than
9191 __SIGRTMIN.
9192 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9193 are already deferred.
9194 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9195 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9196 stopped and already has a pending signal to report.
9197 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9198 a pending signal to report or is moving out of a jump pad.
9199 (linux_init_signals): Check for __ANDROID__ rather than
9200 __SIGRTMIN.
9201
9202 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9203
9204 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9205 debug_threads check. Avoid a linear search when not doing debug
9206 output.
9207
9208 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9209
9210 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9211 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9212 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9213 (process_event): Change local fd's type to gdb_fildes_t.
9214 (create_file_handler): Adjust prototype.
9215 (delete_file_handler): Adjust prototype.
9216 (handle_file_event): Adjust prototype. Use pfildes.
9217 (create_file_event): Adjsut prototype.
9218 * remote-utils.c (remote_desc, listen_desc): Change type to
9219 gdb_fildes_t.
9220 * server.h: New gdb_fildes_t typedef.
9221 [USE_WIN32API]: Include winsock2.h.
9222 (delete_file_handler, add_file_handler): Adjust prototypes.
9223 (pfildes): Declare.
9224 * utils.c (pfildes): New.
9225
9226 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9227
9228 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9229 * configure: Regenerate.
9230
9231 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9232
9233 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9234 (linux_done_accessing_memory): ... this.
9235 (linux_target_ops): Adjust.
9236 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9237 * nto-low.c (nto_target_ops): Adjust comment.
9238 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9239 * spu-low.c (spu_target_ops): Adjust comment.
9240 * target.h (target_ops): Rename unprepare_to_access_memory field
9241 to done_accessing_memory.
9242 (unprepare_to_access_memory): Rename to ...
9243 (done_accessing_memory): ... this.
9244
9245 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9246
9247 * linux-low.c (linux_prepare_to_access_memory): New.
9248 (linux_unprepare_to_access_memory): New.
9249 (linux_target_ops): Install them.
9250 * server.c (read_memory): Rename to ...
9251 (gdb_read_memory): ... this. Use
9252 prepare_to_access_memory/prepare_to_access_memory.
9253 (write_memory): Rename to ...
9254 (gdb_write_memory): ... this. Use
9255 prepare_to_access_memory/prepare_to_access_memory.
9256 (handle_search_memory_1): Adjust.
9257 (process_serial_event): Adjust.
9258 * target.h (struct target_ops): New fields
9259 prepare_to_access_memory and unprepare_to_access_memory.
9260 (prepare_to_access_memory, unprepare_to_access_memory): New.
9261 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9262 prepare_to_access_memory/prepare_to_access_memory.
9263 * nto-low.c (nto_target_ops): Adjust.
9264 * spu-low.c (spu_target_ops): Adjust.
9265 * win32-low.c (win32_target_ops): Adjust.
9266
9267 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9268
9269 * Makefile.in (WARN_CFLAGS): Get it from configure.
9270 (WERROR_CFLAGS): New.
9271 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9272 * configure.ac: Introduce --enable-werror, which adds -Werror to
9273 the compiler command line. Enabled by default. Disable with
9274 --disable-werror. Add -Wdeclaration-after-statement
9275 Wpointer-arith and -Wformat-nonliteral to warning flags.
9276 * configure: Regenerate.
9277
9278 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9279
9280 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9281
9282 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9283
9284 * gdbreplay.c (remote_error): New.
9285 (gdbchar): New.
9286 (expect): Use gdbchar. Check for error reading from GDB.
9287 Clarify sync error output.
9288 (play): Check for errors writing to GDB.
9289 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9290 * remote-utils.c (getpkt): Check for errors writing to the remote
9291 descriptor.
9292
9293 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9294
9295 * linux-low.c (linux_wait_1): Move non-debugging code out of
9296 `debug_threads' control.
9297
9298 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9299
9300 * linux-low.c (linux_wait_1): Don't set last_status here.
9301 * server.c (push_event, queue_stop_reply_callback): Assert we're
9302 not pushing a TARGET_WAITKIND_IGNORE event.
9303 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9304 (myresume, handle_target_event): Set the thread's last_resume_kind
9305 and last_status from the target returned status.
9306
9307 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9308
9309 PR threads/10729
9310
9311 * linux-x86-low.c (update_debug_registers_callback): New.
9312 (i386_dr_low_set_addr): Use it.
9313 (i386_dr_low_get_addr): New.
9314 (i386_dr_low_set_control): Use update_debug_registers_callback.
9315 (i386_dr_low_get_control): New.
9316 (i386_dr_low_get_status): Adjust.
9317 * linux-low.c (linux_stop_lwp): New.
9318 * linux-low.h (linux_stop_lwp): Declare.
9319
9320 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9321 argument instead of a i386_debug_reg_state.
9322 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9323 a i386_debug_reg_state.
9324 (i386_insert_aligned_watchpoint): Adjust.
9325 (i386_remove_aligned_watchpoint): Adjust.
9326 (i386_low_stopped_data_address): Read the debug registers from the
9327 inferior instead of from the mirrors.
9328 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9329 (i386_dr_low_get_addr): Declare.
9330 (i386_dr_low_get_control): Declare.
9331 (i386_dr_low_get_status): Change prototype.
9332
9333 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9334 (i386_dr_low_get_addr): New.
9335 (i386_dr_low_get_control): New.
9336 (i386_dr_low_get_status): Adjust prototype. Return
9337 dr_status_mirror.
9338 (i386_initial_stuff): Clear dr_status_mirror and
9339 dr_control_mirror.
9340 (i386_get_thread_context): Adjust.
9341 (i386_set_thread_context): Adjust.
9342 (i386_thread_added): Adjust.
9343
9344 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9345
9346 * linux-low.h (linux_thread_area): Delete declaration.
9347
9348 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9349
9350 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9351 after its termination.
9352
9353 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9354
9355 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9356 (gdb_wants_all_stopped): Delete.
9357 (linux_wait_1): Don't call them.
9358 * server.c (handle_v_cont): Tag all threads as want-stopped.
9359 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9360 stopped as "client-wants-stopped".
9361
9362 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9363
9364 * Makefile.in (signals_h): New.
9365 (server_h): Depend on it.
9366 (server.o): Don't depend on $(signals_def).
9367 (signals.o): Depend on $(signals_def).
9368
9369 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9370
9371 * Makefile.in (signals_def): New.
9372 (server_h): Append include/gdb/signals.h and signals_def.
9373 (server.o): Append signals_def.
9374
9375 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9376
9377 * server.c (handle_target_event): Use target_signal_to_host for
9378 resume_info.sig initialization.
9379 * target.h (struct thread_resume) <sig>: New comment.
9380
9381 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9382
9383 * server.c (handle_query): strcpy() the returned string from paddress()
9384 instead of sprintf().
9385 * utils.c (paddress): Return phex_nz().
9386
9387 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9388
9389 * server.c (handle_v_cont): Call mourn_inferior if process
9390 just exited.
9391 (myresume): Likewise.
9392
9393 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9394
9395 Static tracepoints, and integration with UST.
9396
9397 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9398 * mem-break.c (uninsert_all_breakpoints)
9399 (reinsert_all_breakpoints): New.
9400 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9401 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9402 (gdb_agent_ust_loaded, helper_thread_id)
9403 (gdb_agent_helper_thread_id): New macros.
9404 (struct ipa_sym_addresses): Add addr_ust_loaded,
9405 addr_helper_thread_id, addr_cmd_buf.
9406 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9407 (in_process_agent_loaded_ust): New.
9408 (write_e_ust_not_loaded): New.
9409 (maybe_write_ipa_ust_not_loaded): New.
9410 (struct collect_static_trace_data_action): New.
9411 (enum tracepoint_type) <static_tracepoint>: New.
9412 (struct tracepoint) <handle>: Mention static tracepoints.
9413 (struct static_tracepoint_ctx): New.
9414 (CMD_BUF_SIZE): New.
9415 (add_tracepoint_action): Handle static tracepoint actions.
9416 (unprobe_marker_at): New.
9417 (clear_installed_tracepoints): Handle static tracepoints.
9418 (cmd_qtdp): Handle static tracepoints.
9419 (probe_marker_at): New.
9420 (cmd_qtstart): Handle static tracepoints.
9421 (response_tracepoint): Handle static tracepoints.
9422 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9423 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9424 (get_context_regcache): Handle static tracepoints.
9425 (do_action_at_tracepoint): Handle static tracepoint actions.
9426 (traceframe_find_block_type): Handle static trace data blocks.
9427 (traceframe_read_sdata): New.
9428 (download_tracepoints): Download static tracepoint actions.
9429 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9430 (GDB_PROBE_NAME): New.
9431 (ust_ops): New.
9432 (GET_UST_SYM): New.
9433 (USTF): New.
9434 (dlsym_ust): New.
9435 (ust_marker_to_static_tracepoint): New.
9436 (gdb_probe): New.
9437 (collect_ust_data_at_tracepoint): New.
9438 (gdb_ust_probe): New.
9439 (UNIX_PATH_MAX, SOCK_DIR): New.
9440 (gdb_ust_connect_sync_socket): New.
9441 (resume_thread, stop_thread): New.
9442 (run_inferior_command): New.
9443 (init_named_socket): New.
9444 (gdb_ust_socket_init): New.
9445 (cstr_to_hexstr): New.
9446 (next_st): New.
9447 (first_marker, next_marker): New.
9448 (response_ust_marker): New.
9449 (cmd_qtfstm, cmd_qtsstm): New.
9450 (unprobe_marker_at, probe_marker_at): New.
9451 (cmd_qtstmat, gdb_ust_thread): New.
9452 (gdb_ust_init): New.
9453 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9454 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9455 (ST_REGENTRY): New.
9456 (x86_64_st_collect_regmap): New.
9457 (X86_64_NUM_ST_COLLECT_GREGS): New.
9458 (AMD64_RIP_REGNUM): New.
9459 (supply_static_tracepoint_registers): New.
9460 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9461 (ST_REGENTRY): New.
9462 (i386_st_collect_regmap): New.
9463 (i386_NUM_ST_COLLECT_GREGS): New.
9464 (supply_static_tracepoint_registers): New.
9465 * server.c (handle_query): Handle qXfer:statictrace:read.
9466 <qSupported>: Report support for StaticTracepoints, and
9467 qXfer:statictrace:read features.
9468 * server.h (traceframe_read_sdata)
9469 (supply_static_tracepoint_registers): Declare.
9470 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9471 (unpack_varlen_hex): Include in IPA build.
9472 * Makefile.in (ustlibs, ustinc): New.
9473 (IPA_OBJS): Add remote-utils-ipa.o.
9474 ($(IPA_LIB)): Link -ldl and -lpthread.
9475 (UST_CFLAGS): New.
9476 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9477 * config.in, configure: Regenerate.
9478
9479 2010-06-20 Ian Lance Taylor <iant@google.com>
9480 Pedro Alves <pedro@codesourcery.com>
9481
9482 * linux-x86-low.c (always_true): Delete.
9483 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9484 trying to fool the compiler with always_true.
9485
9486 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9487
9488 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9489 conditions in gdbserver.
9490
9491 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9492
9493 * spu-low.c (spu_read_memory): Wrap around local store limit.
9494 (spu_write_memory): Likewise.
9495
9496 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9497
9498 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9499 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9500 LONGEST uses.
9501 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9502 uses.
9503 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9504 uses with LONGEST uses.
9505
9506 2010-06-14 Stan Shebs <stan@codesourcery.com>
9507 Pedro Alves <pedro@codesourcery.com>
9508
9509 Bytecode compiler.
9510
9511 * linux-x86-low.c: Include limits.h.
9512 (add_insns): New.
9513 (always_true): New.
9514 (EMIT_ASM): New.
9515 (EMIT_ASM32): New.
9516 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9517 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9518 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9519 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9520 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9521 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9522 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9523 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9524 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9525 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9526 (amd64_emit_void_call_2): New.
9527 (amd64_emit_ops): New.
9528 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9529 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9530 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9531 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9532 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9533 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9534 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9535 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9536 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9537 (i386_emit_stack_adjust, i386_emit_int_call_1)
9538 (i386_emit_void_call_2): New.
9539 (i386_emit_ops): New.
9540 (x86_emit_ops): New.
9541 (the_low_target): Install x86_emit_ops.
9542 * server.h (struct emit_ops): New.
9543 (get_raw_reg_func_addr): Declare.
9544 (current_insn_ptr, emit_error): Declare.
9545 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9546 (set_trace_state_variable_value): New defines.
9547 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9548 addr_get_trace_state_variable_value and
9549 addr_set_trace_state_variable_value.
9550 (symbol_list): New fields for get_raw_reg,
9551 get_trace_state_variable_value and set_trace_state_variable_value.
9552 (condfn): New typedef.
9553 (struct tracepoint): New field `compiled_cond'.
9554 (do_action_at_tracepoint): Clear compiled_cond.
9555 (get_trace_state_variable_value, set_trace_state_variable_value):
9556 Export in the IPA.
9557 (condition_true_at_tracepoint): If there's a compiled condition,
9558 run that.
9559 (current_insn_ptr, emit_error): New globals.
9560 (struct bytecode_address): New.
9561 (get_raw_reg_func_addr): New.
9562 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9563 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9564 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9565 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9566 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9567 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9568 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9569 (compile_tracepoint_condition, compile_bytecodes): New.
9570 * target.h (emit_ops): Forward declare.
9571 (struct target_ops): New field emit_ops.
9572 (target_emit_ops): New.
9573 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9574 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9575 * linux-low.c (linux_emit_ops): New.
9576 (linux_target_ops): Install it.
9577 * linux-low.h (struct linux_target_ops): New field emit_ops.
9578
9579 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9580
9581 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9582 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9583
9584 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9585 Stan Shebs <stan@codesourcery.com>
9586
9587 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9588 (all): Depend on $(extra_libraries).
9589 (install-only): Install the IPA.
9590 (IPA_OBJS, IPA_LIB): New.
9591 (clean): Remove the IPA lib.
9592 (IPAGENT_CFLAGS): New.
9593 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9594 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9595 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9596 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9597 * configure.ac: Check for atomic builtins support in the compiler.
9598 (IPA_DEPFILES, extra_libraries): Define.
9599 * configure.srv (ipa_obj): Add description.
9600 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9601 (i[34567]86-*-linux*): Set ipa_obj.
9602 (x86_64-*-linux*): Set ipa_obj.
9603 * linux-low.c (stabilizing_threads): New.
9604 (supports_fast_tracepoints): New.
9605 (linux_detach): Stabilize threads before detaching.
9606 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9607 the lwp is either not stabilizing, or is moving out of a jump pad.
9608 (linux_fast_tracepoint_collecting): New.
9609 (maybe_move_out_of_jump_pad): New.
9610 (enqueue_one_deferred_signal): New.
9611 (dequeue_one_deferred_signal): New.
9612 (linux_wait_for_event_1): If moving out of a jump pad, defer
9613 pending signals to later.
9614 (linux_stabilize_threads): New.
9615 (linux_wait_1): Check if threads need moving out of jump pads, and
9616 do it if so.
9617 (stuck_in_jump_pad_callback): New.
9618 (move_out_of_jump_pad_callback): New.
9619 (lwp_running): New.
9620 (linux_resume_one_lwp): Handle moving out of jump pads.
9621 (linux_set_resume_request): Dequeue deferred signals.
9622 (need_step_over_p): Also step over fast tracepoint jumps.
9623 (start_step_over): Also uninsert fast tracepoint jumps.
9624 (finish_step_over): Also reinsert fast tracepoint jumps.
9625 (linux_install_fast_tracepoint_jump): New.
9626 (linux_target_ops): Install linux_stabilize_threads and
9627 linux_install_fast_tracepoint_jump_pad.
9628 * linux-low.h (linux_target_ops) <get_thread_area,
9629 install_fast_tracepoint_jump_pad>: New fields.
9630 (struct lwp_info) <collecting_fast_tracepoint,
9631 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9632 (linux_get_thread_area): Declare.
9633 * linux-x86-low.c (jump_insn): New.
9634 (x86_get_thread_area): New.
9635 (append_insns): New.
9636 (push_opcode): New.
9637 (amd64_install_fast_tracepoint_jump_pad): New.
9638 (i386_install_fast_tracepoint_jump_pad): New.
9639 (x86_install_fast_tracepoint_jump_pad): New.
9640 (the_low_target): Install x86_get_thread_area and
9641 x86_install_fast_tracepoint_jump_pad.
9642 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9643 (struct fast_tracepoint_jump): New.
9644 (fast_tracepoint_jump_insn): New.
9645 (fast_tracepoint_jump_shadow): New.
9646 (find_fast_tracepoint_jump_at): New.
9647 (fast_tracepoint_jump_here): New.
9648 (delete_fast_tracepoint_jump): New.
9649 (set_fast_tracepoint_jump): New.
9650 (uninsert_fast_tracepoint_jumps_at): New.
9651 (reinsert_fast_tracepoint_jumps_at): New.
9652 (set_breakpoint_at): Use write_inferior_memory.
9653 (uninsert_raw_breakpoint): Use write_inferior_memory.
9654 (check_mem_read): Mask out fast tracepoint jumps.
9655 (check_mem_write): Mask out fast tracepoint jumps.
9656 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9657 (set_fast_tracepoint_jump): Declare.
9658 (delete_fast_tracepoint_jump)
9659 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9660 (reinsert_fast_tracepoint_jumps_at): Declare.
9661 * regcache.c: Don't compile many functions when building the
9662 in-process agent library.
9663 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9664 the register buffer in the heap.
9665 (free_register_cache): If the register buffer isn't owned by the
9666 regcache, don't free it.
9667 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9668 pre-existing register caches.
9669 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9670 type.
9671 (convert_ascii_to_int): : Constify `from' parameter type.
9672 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9673 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9674 the needed buffer in-place.
9675 (relocate_instruction): New.
9676 * server.c (handle_query) <qSymbols>: If the target supports
9677 tracepoints, give it a chance of looking up symbols. Report
9678 support for fast tracepoints.
9679 (handle_status): Stabilize threads.
9680 (process_serial_event): Adjust.
9681 * server.h (struct fast_tracepoint_jump): Forward declare.
9682 (struct process_info) <fast_tracepoint_jumps>: New field.
9683 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9684 (decode_X_packet, decode_M_packet): Adjust.
9685 (relocate_instruction): Declare.
9686 (in_process_agent_loaded): Declare.
9687 (tracepoint_look_up_symbols): Declare.
9688 (struct fast_tpoint_collect_status): Declare.
9689 (fast_tracepoint_collecting): Declare.
9690 (force_unlock_trace_buffer): Declare.
9691 (handle_tracepoint_bkpts): Declare.
9692 (initialize_low_tracepoint)
9693 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9694 * target.h (struct target_ops) <stabilize_threads,
9695 install_fast_tracepoint_jump_pad>: New fields.
9696 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9697 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9698 [HAVE_STDINT_H]: Include stdint.h.
9699 (trace_debug_1): Rename to ...
9700 (trace_vdebug): ... this.
9701 (trace_debug): Rename to ...
9702 (trace_debug_1): ... this. Add `level' parameter.
9703 (trace_debug): New.
9704 (ATTR_USED, ATTR_NOINLINE): New.
9705 (IP_AGENT_EXPORT): New.
9706 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9707 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9708 (about_to_request_buffer_space, trace_buffer_is_full)
9709 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9710 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9711 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9712 (traceframe_write_count, traceframes_created)
9713 (trace_state_variables)
9714 New renaming defines.
9715 (struct ipa_sym_addresses): New.
9716 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9717 (symbol_list): New.
9718 (ipa_sym_addrs): New.
9719 (all_tracepoint_symbols_looked_up): New.
9720 (in_process_agent_loaded): New.
9721 (write_e_ipa_not_loaded): New.
9722 (maybe_write_ipa_not_loaded): New.
9723 (tracepoint_look_up_symbols): New.
9724 (debug_threads) [IN_PROCESS_AGENT]: New.
9725 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9726 (UNKNOWN_SIDE_EFFECTS): New.
9727 (stop_tracing): New.
9728 (flush_trace_buffer): New.
9729 (stop_tracing_bkpt): New.
9730 (flush_trace_buffer_bkpt): New.
9731 (read_inferior_integer): New.
9732 (read_inferior_uinteger): New.
9733 (read_inferior_data_pointer): New.
9734 (write_inferior_data_pointer): New.
9735 (write_inferior_integer): New.
9736 (write_inferior_uinteger): New.
9737 (struct collect_static_trace_data_action): Delete.
9738 (enum tracepoint_type): New.
9739 (struct tracepoint) <type>: New field `type'.
9740 <actions_str, step_actions, step_actions_str>: Only include in
9741 GDBserver.
9742 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9743 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9744 (tracepoints): Use IP_AGENT_EXPORT.
9745 (last_tracepoint): Don't include in the IPA.
9746 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9747 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9748 (alloced_trace_state_variables): New.
9749 (trace_state_variables): Use IP_AGENT_EXPORT.
9750 (traceframe_t): Delete unused variable.
9751 (circular_trace_buffer): Don't include in the IPA.
9752 (trace_buffer_start): Delete.
9753 (struct trace_buffer_control): New.
9754 (trace_buffer_free): Delete.
9755 (struct ipa_trace_buffer_control): New.
9756 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9757 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9758 New.
9759 (trace_buffer_ctrl): New.
9760 (TRACE_BUFFER_CTRL_CURR): New.
9761 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9762 Reimplement as macros.
9763 (trace_buffer_wrap): Delete.
9764 (traceframe_write_count, traceframe_read_count)
9765 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9766 (struct tracepoint_hit_ctx) <type>: New field.
9767 (struct fast_tracepoint_ctx): New.
9768 (memory_barrier): New.
9769 (cmpxchg): New.
9770 (record_tracepoint_error): Update atomically in the IPA.
9771 (clear_inferior_trace_buffer): New.
9772 (about_to_request_buffer_space): New.
9773 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9774 updating the same buffer.
9775 (add_tracepoint): Default the tracepoint's type to trap
9776 tracepoint, and orig_size to -1.
9777 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9778 internal variables.
9779 (create_trace_state_variable): New parameter `gdb'. Handle it.
9780 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9781 (cmd_qtdp): Handle fast tracepoints.
9782 (cmd_qtdv): Adjust.
9783 (max_jump_pad_size): New.
9784 (gdb_jump_pad_head): New.
9785 (get_jump_space_head): New.
9786 (claim_jump_space): New.
9787 (sort_tracepoints): New.
9788 (MAX_JUMP_SIZE): New.
9789 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9790 IPA.
9791 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9792 support. Upload fast traceframes, and delete internal IPA
9793 breakpoints.
9794 (stop_tracing_handler): New.
9795 (flush_trace_buffer_handler): New.
9796 (cmd_qtstop): Upload fast tracepoints.
9797 (response_tracepoint): Handle fast tracepoints.
9798 (tracepoint_finished_step): Upload fast traceframes. Set the
9799 tracepoint hit context's tracepoint type.
9800 (handle_tracepoint_bkpts): New.
9801 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9802 type. Add comment about fast tracepoints.
9803 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9804 non-existing action_str field.
9805 (get_context_regcache): Handle fast tracepoints.
9806 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9807 to the regcache.
9808 (fast_tracepoint_from_jump_pad_address): New.
9809 (fast_tracepoint_from_ipa_tpoint_address): New.
9810 (collecting_t): New.
9811 (force_unlock_trace_buffer): New.
9812 (fast_tracepoint_collecting): New.
9813 (collecting): New.
9814 (gdb_collect): New.
9815 (write_inferior_data_ptr): New.
9816 (target_tp_heap): New.
9817 (target_malloc): New.
9818 (download_agent_expr): New.
9819 (UALIGN): New.
9820 (download_tracepoints): New.
9821 (download_trace_state_variables): New.
9822 (upload_fast_traceframes): New.
9823 (IPA_FIRST_TRACEFRAME): New.
9824 (IPA_NEXT_TRACEFRAME_1): New.
9825 (IPA_NEXT_TRACEFRAME): New.
9826 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9827 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9828 (gdb_jump_pad_buffer_end): New.
9829 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9830 (initialize_tracepoint): Adjust.
9831 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9832 buffer. Initialize the low module.
9833 * utils.c (PREFIX, TOOLNAME): New.
9834 (malloc_failure): Use PREFIX.
9835 (error): In the IPA, an error causes an exit.
9836 (fatal, warning): Use PREFIX.
9837 (internal_error): Use TOOLNAME.
9838 (NUMCELLS): Increase to 10.
9839 * configure, config.in: Regenerate.
9840
9841 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9842
9843 * server.c (handle_query) <qSupported>: Do two passes over the
9844 qSupported string to avoid nesting strtok.
9845
9846 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9847
9848 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9849 (CDEPS): New.
9850 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9851 -Wl,--dynamic-list.
9852 * configure: Regenerate.
9853 * proc-service.list: New.
9854
9855 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9856
9857 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9858 New comment.
9859
9860 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9861
9862 * gdbreplay.c (remote_open): Check error return from socket() call by
9863 its equality to -1 not by it being negative.
9864 * remote-utils.c (remote_open): Likewise.
9865
9866 2010-05-23 Pedro Alves <pedro@codesourcery.com>
9867
9868 * config.h: Regenerate.
9869
9870 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9871
9872 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9873 doesn't provide PTRACE_GET_THREAD_AREA.
9874
9875 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9876
9877 * linux-m68k-low.c: Include <asm/ptrace.h>
9878 (ps_get_thread_area): Implement.
9879
9880 2010-05-03 Doug Evans <dje@google.com>
9881
9882 * event-loop.c (struct callback_event): New struct.
9883 (callback_list): New global.
9884 (append_callback_event, delete_callback_event): New functions.
9885 (process_callback): New function.
9886 (start_event_loop): Call it.
9887 * remote-utils.c (NOT_SCHEDULED): Define.
9888 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9889 moved out of readchar.
9890 (readchar): Rewrite. Call reschedule before returning.
9891 (reset_readchar): New function.
9892 (remote_close): Call it.
9893 (process_remaining, reschedule): New functions.
9894 * server.h (callback_handler_func): New typedef.
9895 (append_callback_event, delete_callback_event): Declare.
9896
9897 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9898
9899 * proc-service.c (ps_pglobal_lookup): Use
9900 thread_db_look_up_one_symbol.
9901 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9902 parameter. Use it instead of all_symbols_looked_up.
9903 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9904 field.
9905 (all_symbols_looked_up): Don't declare.
9906 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9907 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9908 field.
9909 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9910 Set all_symbols_looked_up here.
9911 (thread_db_look_up_one_symbol): New.
9912 (thread_db_get_tls_address): Adjust.
9913 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9914 thread_db object on the heap, and tentatively set it in the
9915 process structure.
9916 (thread_db_init): Don't set all_symbols_looked_up here.
9917 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9918
9919 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9920
9921 * linux-low.c (linux_kill, linux_detach): Adjust.
9922 (status_pending_p_callback): Remove redundant statement. Check
9923 for !TARGET_WAITIKIND_IGNORE, instead of
9924 TARGET_WAITKIND_STOPPED.
9925 (handle_tracepoints): Make sure LWP is locked. Adjust.
9926 (linux_wait_for_event_1): Adjust.
9927 (linux_cancel_breakpoints): New.
9928 (unsuspend_one_lwp): New.
9929 (unsuspend_all_lwps): New.
9930 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9931 (send_sigstop_callback): Change return type to int, add new
9932 `except' parameter and handle it.
9933 (suspend_and_send_sigstop_callback): New.
9934 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9935 pass them down. If SUSPEND, also increment the lwp's suspend
9936 count.
9937 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9938 (need_step_over_p): Don't consider suspended LWPs.
9939 (start_step_over): Adjust.
9940 (proceed_one_lwp): Change return type to int, add new `except'
9941 parameter and handle it.
9942 (unsuspend_and_proceed_one_lwp): New.
9943 (proceed_all_lwps): Use find_inferior instead of
9944 for_each_inferior.
9945 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9946 also decrement the suspend count of LWPs. Pass `except' down,
9947 instead of hacking its suspend count.
9948 (linux_pause_all): Add `freeze' parameter. Adjust.
9949 (linux_unpause_all): New.
9950 (linux_target_ops): Install linux_unpause_all.
9951 * server.c (handle_status): Adjust.
9952 * target.h (struct target_ops): New fields `unpause_all' and
9953 `cancel_breakpoints'. Add new parameter to `pause_all'.
9954 (pause_all): Add new `freeze' parameter.
9955 (unpause_all): New.
9956 (cancel_breakpoints): New.
9957 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9958 cancel breakpoints.
9959 (cmd_qtstart): Pause threads.
9960 (stop_tracing): Pause threads, and cancel breakpoints.
9961 * win32-low.c (win32_target_ops): Adjust.
9962
9963 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9964
9965 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9966 the inferior right away from here...
9967 (linux_wait_1): ... to here, and adjust to check the thread's
9968 last_resume_kind instead of the lwp's step or stop_expected flags.
9969
9970 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9971
9972 * README: Use consistent `GDB' and `GDBserver' spellings.
9973
9974 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9975
9976 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9977 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9978 (linux_detach_one_lwp): Assume the lwp is stopped.
9979 (any_thread_of): Delete.
9980 (linux_detach): Stop all lwps here. Don't blindly delete all
9981 breakpoints.
9982 (delete_lwp_callback): New.
9983 (linux_mourn): Delete all lwps of the process that is gone.
9984 (linux_wait_1): Don't delete the last lwp of the process here.
9985 * mem-break.h (mark_breakpoints_out): Declare.
9986 * mem-break.c (mark_breakpoints_out): New.
9987 (free_all_breakpoints): Use it.
9988 * server.c (handle_target_event): If the process is gone, mark
9989 breakpoints out.
9990 * thread-db.c (struct thread_db) <create_bp>: New field.
9991 (thread_db_enable_reporting): Fix prototype. Store a thread event
9992 breakpoint reference in the thread_db struct.
9993 (thread_db_load_search): Clear the thread_db object.
9994 (try_thread_db_load_1): Ditto.
9995 (switch_to_process): New.
9996 (disable_thread_event_reporting): Use it.
9997 (remove_thread_event_breakpoints): New.
9998 (thread_db_detach, thread_db_mourn): Use it.
9999
10000 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10001
10002 * linux-low.c (linux_enable_event_reporting): New.
10003 (linux_wait_for_event_1, handle_extended_wait): Use it.
10004
10005 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10006
10007 * linux-low.c (linux_kill_one_lwp, linux_kill)
10008 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10009 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10010 SIGSTOP even if the LWP is stopped.
10011 (send_sigstop_callback): New.
10012 (stop_all_lwps): Use send_sigstop_callback instead.
10013 (linux_resume_one_thread): Adjust.
10014 (proceed_one_lwp): Still proceed an LWP that the client has
10015 requested to stop, if we haven't reported it as stopped yet. Make
10016 sure that LWPs the client want stopped, have a pending SIGSTOP.
10017
10018 2010-04-26 Doug Evans <dje@google.com>
10019
10020 * server.c (handle_general_set): Make static.
10021
10022 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10023 Print received char after testing for error/eof instead of before.
10024 (input_interrupt): Tweak comment.
10025
10026 2010-04-23 Doug Evans <dje@google.com>
10027
10028 * server.c (start_inferior): Print inferior argv if --debug.
10029
10030 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10031
10032 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10033 * nto-x86-low.c: Include server.h
10034
10035 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10036
10037 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10038 be consistent with other sources of this directory.
10039 (init_registers_amd64): Correct name of source file of this function
10040 in the comment.
10041
10042 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10043
10044 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10045 64-bit executables.
10046
10047 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10048
10049 * win32-i386-low.c: Add 64-bit support.
10050 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10051 (init_registers_amd64): Declare.
10052 (mappings): Add 64-bit version of array.
10053 (init_windows_x86): New function.
10054 (the_low_target): Change init_arch field to init_windows_x86.
10055
10056 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10057
10058 * win32-low.c: Adapt to support also 64-bit architecture.
10059 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10060 (get_image_name): Use SIZE_T type for local variable `done'.
10061 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10062 (toolhelp_get_dll_name): Idem.
10063 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10064 Use uintptr_t typecast to avoid warning.
10065 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10066 (handle_exception): Use phex_nz to avoid warning.
10067 (win32_wait): Remove unused local variable `process'.
10068
10069 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10070
10071 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10072 `amd64-avx.o'.
10073
10074 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10075
10076 * configure.ac: Use `ws2_32' library for srv_mingw.
10077 * configure: Regenerate.
10078 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10079 * remote-utils.c: Likewise.
10080
10081 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10082
10083 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10084 if __x86_64__ is defined.
10085
10086 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10087
10088 * configure: Regenerate.
10089
10090 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10091
10092 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10093 * target.h (target_ops): New get_tib_address field.
10094 * win32-low.h (win32_thread_info): Add thread_local_base field.
10095 * win32-low.c (child_add_thread): Add tlb argument.
10096 Set thread_local_base field to TLB.
10097 (get_child_debug_event): Adapt to child_add_thread change.
10098 (win32_get_tib_address): New function.
10099 (win32_target_ops): Set get_tib_address field to
10100 win32_get_tib_address.
10101 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10102
10103 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10104
10105 * linux-low.c (linux_mourn): Also remove the process.
10106 * server.c (handle_target_event): Don't remove the process here.
10107 * nto-low.c (nto_mourn): New.
10108 (nto_target_ops): Install it.
10109 * spu-low.c (spu_mourn): New.
10110 (spu_target_ops): Install it.
10111 * win32-low.c (win32_mourn): New.
10112 (win32_target_ops): Install it.
10113
10114 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10115
10116 * server.h (buffer_xml_printf): Remove redundant `;'.
10117
10118 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10119
10120 * regcache.c (set_register_cache): Invalidate regcaches before
10121 changing the register cache layout.
10122 (regcache_invalidate_one): Allow a NULL regcache.
10123 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10124 regcaches before changing the register cache layout or the target
10125 regsets.
10126
10127 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10128
10129 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10130 variable warning on Linux/x86-64.
10131
10132 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10133
10134 GDBserver disconnected tracing support.
10135
10136 * linux-low.c (linux_remove_process): Delete.
10137 (add_lwp): Don't set last_resume_kind here.
10138 (linux_kill): Use `mourn'.
10139 (linux_detach): Use `thread_db_detach', and `mourn'.
10140 (linux_mourn): New.
10141 (linux_attach_lwp_1): Adjust comment.
10142 (linux_attach): last_resume_kind moved the thread_info; adjust.
10143 (status_pending_p_callback): Adjust.
10144 (linux_wait_for_event_1): Adjust.
10145 (count_events_callback, select_singlestep_lwp_callback)
10146 (select_event_lwp_callback, cancel_breakpoints_callback)
10147 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10148 (proceed_one_lwp): Adjust.
10149 (linux_async): Add debug output.
10150 (linux_thread_stopped): New.
10151 (linux_pause_all): New.
10152 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10153 linux_pause_all.
10154 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10155 (thread_db_free): Delete declaration.
10156 (thread_db_detach, thread_db_mourn): Declare.
10157 * thread-db.c (thread_db_init): Use thread_db_mourn.
10158 (thread_db_free): Delete, split in two.
10159 (disable_thread_event_reporting): New.
10160 (thread_db_detach): New.
10161 (thread_db_mourn): New.
10162
10163 * server.h (struct thread_info) <last_resume_kind>: New field.
10164 <attached>: Add comment.
10165 <gdb_detached>: New field.
10166 (handler_func): Change return type to int.
10167 (handle_serial_event, handle_target_event): Ditto.
10168 (gdb_connected): Declare.
10169 (tracing): Delete.
10170 (disconnected_tracing): Declare.
10171 (stop_tracing): Declare.
10172
10173 * server.c (handle_query) <qSupported>: Report support for
10174 disconnected tracing.
10175 (queue_stop_reply_callback): Account for running threads.
10176 (gdb_wants_thread_stopped): New.
10177 (gdb_wants_all_threads_stopped): New.
10178 (gdb_reattached_process): New.
10179 (handle_status): Clear the `gdb_detached' flag of all processes.
10180 In all-stop, stop all threads.
10181 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10182 (process_serial_event): If the remote connection breaks, or if an
10183 exit was forced with "monitor exit", force an event loop exit.
10184 Handle disconnected tracing on detach.
10185 (handle_serial_event): Adjust.
10186 (handle_target_event): If GDB isn't connected, forward events back
10187 to the inferior, unless the last process exited, in which case,
10188 exit gdbserver. Adjust interface.
10189
10190 * remote-utils.c (remote_open): Don't block in accept. Instead
10191 register an event loop source on the listen socket file
10192 descriptor. Refactor bits into ...
10193 (listen_desc): ... this new global.
10194 (gdb_connected): ... this new function.
10195 (enable_async_notification): ... this new function.
10196 (handle_accept_event): ... this new function.
10197 (remote_close): Clear remote_desc.
10198
10199 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10200
10201 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10202 New fields.
10203 (mourn_inferior): Define.
10204 (target_process_qsupported): Avoid the dangling else problem.
10205 (thread_stopped): Define.
10206 (pause_all): Define.
10207 (target_waitstatus_to_string): Declare.
10208 * target.c (target_waitstatus_to_string): New.
10209
10210 * tracepoint.c (tracing): Make extern.
10211 (disconnected_tracing): New.
10212 (stop_tracing): Make extern. Handle tracing stops due to GDB
10213 disconnecting.
10214 (cmd_qtdisconnected): New.
10215 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10216 (handle_tracepoint_general_set): Handle QTDisconnected.
10217
10218 * event-loop.c (event_handler_func): Change return type to int.
10219 (process_event): Bail out if the event handler wants the event
10220 loop to stop.
10221 (handle_file_event): Ditto.
10222 (start_event_loop): Bail out if the event handler wants the event
10223 loop to stop.
10224
10225 * nto-low.c (nto_target_ops): Adjust.
10226 * spu-low.c (spu_wait): Don't remove the process here.
10227 (spu_target_ops): Adjust.
10228 * win32-low.c (win32_wait): Don't remove the process here.
10229 (win32_target_ops): Adjust.
10230
10231 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10232
10233 * regcache.c (realloc_register_cache): Invalidate inferior's
10234 regcache before recreating it.
10235
10236 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10237
10238 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10239
10240 2010-04-09 Stan Shebs <stan@codesourcery.com>
10241 Pedro Alves <pedro@codesourcery.com>
10242
10243 * server.h (LONGEST): New.
10244 (struct thread_info) <while_stepping>: New field.
10245 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10246 Declare.
10247 (initialize_tracepoint, handle_tracepoint_general_set)
10248 (handle_tracepoint_query, tracepoint_finished_step)
10249 (tracepoint_was_hit, release_while_stepping_state_list):
10250 (current_traceframe): Declare.
10251 * server.c (handle_general_set): Handle tracepoint packets.
10252 (read_memory): New.
10253 (write_memory): New.
10254 (handle_search_memory_1): Use read_memory.
10255 (handle_query): Report support for conditional tracepoints, trace
10256 state variables, and tracepoint sources. Handle tracepoint
10257 queries.
10258 (main): Initialize the tracepoints module.
10259 (process_serial_event): Handle traceframe reads/writes.
10260
10261 * linux-low.c (handle_tracepoints): New.
10262 (linux_wait_1): Call it.
10263 (linux_resume_one_lwp): Handle while-stepping.
10264 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10265 (linux_target_ops): Install them.
10266 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10267 New field.
10268 * linux-x86-low.c (x86_supports_tracepoints): New.
10269 (the_low_target). Install it.
10270
10271 * mem-break.h (delete_breakpoint): Declare.
10272 * mem-break.c (delete_breakpoint): Make external.
10273
10274 * target.h (struct target_ops): Add `supports_tracepoints',
10275 `read_pc', and `write_pc' fields.
10276 (target_supports_tracepoints): Define.
10277 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10278 (phex_nz): New.
10279
10280 * regcache.h (struct regcache) <registers_owned>: New field.
10281 (init_register_cache, regcache_cpy): Declare.
10282 (regcache_read_pc, regcache_write_pc): Declare.
10283 (register_cache_size): Declare.
10284 (supply_regblock): Declare.
10285 * regcache.c (init_register_cache): New.
10286 (new_register_cache): Use it.
10287 (regcache_cpy): New.
10288 (register_cache_size): New.
10289 (supply_regblock): New.
10290 (regcache_read_pc, regcache_write_pc): New.
10291
10292 * tracepoint.c: New.
10293
10294 * Makefile.in (OBS): Add tracepoint.o.
10295 (tracepoint.o): New rule.
10296
10297 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10298
10299 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10300 (i386-mmx.o): New.
10301 (i386-mmx.c): Likewise.
10302 (i386-mmx-linux.o): Likewise.
10303 (i386-mmx-linux.c): Likewise.
10304
10305 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10306 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10307 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10308 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10309
10310 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10311 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10312 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10313
10314 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10315
10316 * Makefile.in (clean): Updated.
10317 (i386-avx.o): New.
10318 (i386-avx.c): Likewise.
10319 (i386-avx-linux.o): Likewise.
10320 (i386-avx-linux.c): Likewise.
10321 (amd64-avx.o): Likewise.
10322 (amd64-avx.c): Likewise.
10323 (amd64-avx-linux.o): Likewise.
10324 (amd64-avx-linux.c): Likewise.
10325
10326 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10327 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10328 (srv_amd64_regobj): Add amd64-avx.o.
10329 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10330 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10331 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10332 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10333 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10334 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10335 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10336
10337 * i387-fp.c: Include "i386-xstate.h".
10338 (i387_xsave): New.
10339 (i387_cache_to_xsave): Likewise.
10340 (i387_xsave_to_cache): Likewise.
10341 (x86_xcr0): Likewise.
10342
10343 * i387-fp.h (i387_cache_to_xsave): Likewise.
10344 (i387_xsave_to_cache): Likewise.
10345 (x86_xcr0): Likewise.
10346
10347 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10348 * linux-crisv32-low.c (target_regsets): Likewise.
10349 * linux-m68k-low.c (target_regsets): Likewise.
10350 * linux-mips-low.c (target_regsets): Likewise.
10351 * linux-ppc-low.c (target_regsets): Likewise.
10352 * linux-s390-low.c (target_regsets): Likewise.
10353 * linux-sh-low.c (target_regsets): Likewise.
10354 * linux-sparc-low.c (target_regsets): Likewise.
10355 * linux-xtensa-low.c (target_regsets): Likewise.
10356
10357 * linux-low.c: Include <sys/uio.h>.
10358 (regsets_fetch_inferior_registers): Support nt_type.
10359 (regsets_store_inferior_registers): Likewise.
10360 (linux_process_qsupported): New.
10361 (linux_target_ops): Add linux_process_qsupported.
10362
10363 * linux-low.h (regset_info): Add nt_type.
10364 (linux_target_ops): Add process_qsupported.
10365
10366 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10367 and <sys/uio.h>.
10368 (init_registers_i386_avx_linux): New.
10369 (init_registers_amd64_avx_linux): Likewise.
10370 (xmltarget_i386_linux_no_xml): Likewise.
10371 (xmltarget_amd64_linux_no_xml): Likewise.
10372 (PTRACE_GETREGSET): Likewise.
10373 (PTRACE_SETREGSET): Likewise.
10374 (x86_fill_xstateregset): Likewise.
10375 (x86_store_xstateregset): Likewise.
10376 (use_xml): Likewise.
10377 (x86_linux_update_xmltarget): Likewise.
10378 (x86_linux_process_qsupported): Likewise.
10379 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10380 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10381 init_registers_i386_linux here. Call
10382 x86_linux_update_xmltarget.
10383 (the_low_target): Add x86_linux_process_qsupported.
10384
10385 * server.c (handle_query): Call target_process_qsupported.
10386
10387 * target.h (target_ops): Add process_qsupported.
10388 (target_process_qsupported): New.
10389
10390 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10391
10392 * inferiors.c (add_thread): Set last_status kind to
10393 TARGET_WAITKIND_IGNORE.
10394 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10395 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10396 (linux_wait_1): Move `thread' local definition to block that uses
10397 it. Don't NULL initialize `event_child'.
10398 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10399 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10400 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10401
10402 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10403
10404 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10405 an extended waitstatus, or by a watchpoint.
10406 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10407 thread was stepping or has been stopped by a watchpoint.
10408
10409 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10410
10411 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10412 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10413 of another, then delete the previous, and validate all
10414 breakpoints.
10415 (validate_inserted_breakpoint): New.
10416 (delete_disabled_breakpoints): New.
10417 (validate_breakpoints): New.
10418 (check_mem_read): Validate breakpoints before trusting their
10419 shadow. Delete disabled breakpoints.
10420 (check_mem_write): Validate breakpoints before trusting they
10421 should be inserted. Delete disabled breakpoints.
10422 * mem-break.h (validate_breakpoints):
10423 * server.c (handle_query): Validate breakpoints when we see a
10424 qSymbol query.
10425
10426 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10427
10428 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10429 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10430 if we could tell there's a GDB breakpoint at stop_pc.
10431 (need_step_over_p): Don't do a step over if we find a GDB
10432 breakpoint at the resume PC.
10433
10434 * mem-break.c (struct raw_breakpoint): New.
10435 (enum bkpt_type): New type `gdb_breakpoint'.
10436 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10437 fields. New field `raw'.
10438 (find_raw_breakpoint_at): New.
10439 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10440 breakpoint instead.
10441 (set_breakpoint_at): Adjust.
10442 (delete_raw_breakpoint): New.
10443 (release_breakpoint): New.
10444 (delete_breakpoint): Rename to...
10445 (delete_breakpoint_1): ... this. Add proc parameter. Use
10446 release_breakpoint. Return ENOENT.
10447 (delete_breakpoint): Reimplement.
10448 (find_breakpoint_at): Delete.
10449 (find_gdb_breakpoint_at): New.
10450 (delete_breakpoint_at): Delete.
10451 (set_gdb_breakpoint_at): New.
10452 (delete_gdb_breakpoint_at): New.
10453 (gdb_breakpoint_here): New.
10454 (set_reinsert_breakpoint): Use release_breakpoint.
10455 (uninsert_breakpoint): Rename to ...
10456 (uninsert_raw_breakpoint): ... this.
10457 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10458 (reinsert_raw_breakpoint): Change parameter type to
10459 raw_breakpoint.
10460 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10461 instead.
10462 (check_breakpoints): Adjust. Use release_breakpoint.
10463 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10464 (breakpoint_inserted_here): Ditto.
10465 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10466 Don't trust the breakpoint's shadow if it is not inserted.
10467 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10468 (delete_all_breakpoints): Adjust.
10469 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10470 use delete_breakpoint_1.
10471
10472 * mem-break.h (breakpoints_supported): Delete declaration.
10473 (set_gdb_breakpoint_at): Declare.
10474 (gdb_breakpoint_here): Declare.
10475 (delete_breakpoint_at): Delete.
10476 (delete_gdb_breakpoint_at): Declare.
10477
10478 * server.h (struct raw_breakpoint): Forward declare.
10479 (struct process_info): New field `raw_breakpoints'.
10480
10481 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10482 breakpoints.
10483
10484 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10485
10486 * linux-low.c (status_pending_p_callback): Fix comment.
10487 (linux_wait_for_event_1): Move most of the internal breakpoint
10488 handling from here...
10489 (linux_wait_1): ... to here.
10490 (count_events_callback): New.
10491 (select_singlestep_lwp_callback): New.
10492 (select_event_lwp_callback): New.
10493 (cancel_breakpoints_callback): New.
10494 (select_event_lwp): New.
10495 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10496 priority to all LWPs that have had events that should be reported
10497 to the client. Cancel breakpoints when about to reporting the
10498 event to the client, not while stopping lwps. No longer cancel
10499 finished single-steps here.
10500 (cancel_finished_single_step): Delete.
10501 (cancel_finished_single_steps): Delete.
10502
10503 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10504
10505 * mem-break.c (enum bkpt_type): New.
10506 (struct breakpoint): New field `type'.
10507 (set_breakpoint_at): Change return type to struct breakpoint
10508 pointer. Set type to `other_breakpoint' by default.
10509 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10510 in the breakpoint list.
10511 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10512 (reinsert_breakpoint): Rename to ...
10513 (reinsert_raw_breakpoint): ... this.
10514 (reinsert_breakpoints_at): Adjust.
10515 * mem-break.h (struct breakpoint): Declare.
10516 (set_breakpoint_at): Change return type to struct breakpoint
10517 pointer.
10518
10519 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10520
10521 * server.c (handle_query): Assign, not compare.
10522
10523 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10524
10525 Teach linux gdbserver to step-over-breakpoints.
10526
10527 * linux-low.c (can_hardware_single_step): New.
10528 (supports_breakpoints): New.
10529 (handle_extended_wait): If stopping threads, read the stop pc of
10530 the new cloned LWP.
10531 (get_pc): New.
10532 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10533 low target doesn't support retrieving the PC.
10534 (add_lwp): Set last_resume_kind to resume_continue.
10535 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10536 (linux_attach): Don't clear stop_expected. Set the lwp's
10537 last_resume_kind to resume_stop.
10538 (linux_detach_one_lwp): Don't check for removed breakpoints.
10539 (check_removed_breakpoint): Delete.
10540 (status_pending_p): Rename to ...
10541 (status_pending_p_callback): ... this. Don't check for removed
10542 breakpoints. Don't consider threads that are stopped from GDB's
10543 perspective.
10544 (linux_wait_for_lwp): Always read the stop_pc here.
10545 (cancel_breakpoint): New.
10546 (step_over_bkpt): New global.
10547 (linux_wait_for_event_1): Implement stepping over breakpoints.
10548 (gdb_wants_lwp_stopped): New.
10549 (gdb_wants_all_stopped): New.
10550 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10551 single-step traps here. Store the thread's last reported target
10552 wait status.
10553 (send_sigstop): Don't clear stop_expected. Always set it,
10554 instead.
10555 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10556 (cancel_finished_single_step): New.
10557 (cancel_finished_single_steps): New.
10558 (wait_for_sigstop): Don't cancel finished single-step traps here.
10559 (linux_resume_one_lwp): Don't check for removed breakpoints.
10560 Don't set `step' on non-hardware step archs.
10561 (linux_set_resume_request): Ignore resume_stop requests if already
10562 stopping or stopped. Set the lwp's last_resume_kind.
10563 (resume_status_pending_p): Don't check for removed breakpoints.
10564 (need_step_over_p): New.
10565 (start_step_over): New.
10566 (finish_step_over): New.
10567 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10568 requests. Clear the thread's last reported target waitstatus.
10569 Don't use the `suspended' flag. Don't consider pending breakpoints.
10570 (linux_resume): Start a step-over if necessary.
10571 (proceed_one_lwp): New.
10572 (proceed_all_lwps): New.
10573 (unstop_all_lwps): New.
10574 * linux-low.h (struct lwp_info): Rewrite comment for the
10575 `suspended' flag. Add the `stop_pc' field. Delete the
10576 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10577 Add `'last_resume_kind' and `need_step_over' fields.
10578 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10579 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10580 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10581 (set_raw_breakpoint_at): New.
10582 (set_breakpoint_at): Rewrite to use it.
10583 (reinsert_breakpoint_handler): Delete.
10584 (set_reinsert_breakpoint): New.
10585 (reinsert_breakpoint_by_bp): Delete.
10586 (delete_reinsert_breakpoints): New.
10587 (uninsert_breakpoint): Rewrite.
10588 (uninsert_breakpoints_at): New.
10589 (reinsert_breakpoint): Rewrite.
10590 (reinsert_breakpoints_at): New.
10591 (check_breakpoints): Rewrite.
10592 (breakpoint_here): New.
10593 (breakpoint_inserted_here): New.
10594 (check_mem_read): Adjust.
10595 * mem-break.h (breakpoints_supported, breakpoint_here)
10596 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10597 (reinsert_breakpoint_by_bp): Delete declaration.
10598 (delete_reinsert_breakpoints): Declare.
10599 (reinsert_breakpoint): Delete declaration.
10600 (reinsert_breakpoints_at): Declare.
10601 (uninsert_breakpoint): Delete declaration.
10602 (uninsert_breakpoints_at): Declare.
10603 (check_breakpoints): Adjust prototype.
10604 * server.h: Adjust include order.
10605 (struct thread_info): Declare here. Add a `last_status' field.
10606
10607 2010-03-23 Michael Snyder <msnyder@vmware.com>
10608
10609 * server.c (crc32): New function.
10610 (handle_query): Add handling for 'qCRC:' request.
10611
10612 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10613
10614 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10615 lwp had been stopped by a watchpoint.
10616
10617 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10618
10619 * server.h (internal_error): Declare.
10620 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10621 * utils.c (internal_error): New function.
10622
10623 2010-03-15 Andreas Schwab <schwab@redhat.com>
10624
10625 * configure.srv: Fix typo setting srv_regobj.
10626
10627 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10628
10629 * linux-low.c (fetch_register): Avoid passing a non string literal
10630 format to `error'.
10631 (usr_store_inferior_registers): Ditto.
10632
10633 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10634
10635 * linux-low.c (linux_write_memory): Bail out early if peeking
10636 memory failed.
10637
10638 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10639
10640 * linux-low.h (struct lwp_info): New fields
10641 `stopped_by_watchpoint' and `stopped_data_address'.
10642 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10643 here, and cache them in the lwp object.
10644 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10645 directly.
10646 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10647 field.
10648 (linux_stopped_by_watchpoint): Rewrite.
10649 (linux_stopped_data_address): Rewrite.
10650
10651 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10652
10653 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10654 switching the current inferior, not before.
10655
10656 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10657
10658 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10659 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10660 i386-linux.c and amd64-linux.c.
10661 (reg-i386.o): Removed.
10662 (reg-i386.c): Likewise.
10663 (reg-i386-linux.o): Likewise.
10664 (reg-i386-linux.c): Likewise.
10665 (reg-x86-64.o): Likewise.
10666 (reg-x86-64.c): Likewise.
10667 (reg-x86-64-linux.o): Likewise.
10668 (reg-x86-64-linux.c): Likewise.
10669 (i386.o): New.
10670 (i386.c): Likewise.
10671 (i386-linux.o): Likewise.
10672 (i386-linux.c): Likewise.
10673 (amd64.o): Likewise.
10674 (amd64.c): Likewise.
10675 (amd64-linux.o): Likewise.
10676 (amd64-linux.c): Likewise.
10677
10678 * configure.srv (srv_i386_regobj): New.
10679 (srv_i386_linux_regobj): Likewise.
10680 (srv_amd64_regobj): Likewise.
10681 (srv_amd64_linux_regobj): Likewise.
10682 (srv_i386_32bit_xmlfiles): Likewise.
10683 (srv_i386_64bit_xmlfiles): Likewise.
10684 (srv_i386_xmlfiles): Likewise.
10685 (srv_amd64_xmlfiles): Likewise.
10686 (srv_i386_linux_xmlfiles): Likewise.
10687 (srv_amd64_linux_xmlfiles): Likewise.
10688 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10689 srv_xmlfiles to $srv_i386_xmlfiles.
10690 (i[34567]86-*-mingw32ce*): Likewise.
10691 (i[34567]86-*-mingw*): Likewise.
10692 (i[34567]86-*-nto*): Likewise.
10693 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10694 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10695 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10696 (x86_64-*-linux*): Likewise.
10697
10698 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10699 (init_registers_amd64_linux): New.
10700 (x86_arch_setup): Replace init_registers_x86_64_linux with
10701 init_registers_amd64_linux.
10702
10703 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10704
10705 * configure.ac: Check for libdl. If it is not available link against
10706 static libthread_db.
10707 * configure: Regenerate.
10708
10709 2010-02-22 Pedro Alves <pedro@codesourcery.com>
10710
10711 PR9605
10712
10713 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10714 handing a read watchpoint.
10715 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10716
10717 2010-02-12 Doug Evans <dje@google.com>
10718
10719 * linux-low.c (linux_supports_tracefork_flag): Document.
10720 (linux_look_up_symbols): Add comment.
10721
10722 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10723
10724 * regcache.c (supply_register): Clear regcache if buf is NULL.
10725
10726 2010-02-02 Nicolas Roche <roche@sourceware.org>
10727 Joel Brobecker <brobecker@adacore.com>
10728
10729 * inferiors.c (find_inferior): Add function documentation.
10730 (unloaded_dll): Handle the case where the unloaded dll has not
10731 been previously registered in the dll list.
10732
10733 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10734
10735 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10736 (thumb2_breakpoint): New.
10737 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10738
10739 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10740
10741 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10742 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10743 breakpoints.
10744
10745 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10746
10747 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10748
10749 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10750
10751 * linux-s390-low.c (s390_collect_ptrace_register)
10752 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10753
10754 2010-01-21 Doug Evans <dje@google.com>
10755
10756 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10757 (PTRACE_ARG4_TYPE): New macro.
10758 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10759 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10760 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10761 (usr_store_inferior_registers): Ditto.
10762 (linux_read_memory, linux_write_memory): Ditto.
10763 (linux_test_for_tracefork): Ditto.
10764
10765 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10766 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10767
10768 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10769
10770 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10771 target.
10772
10773 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10774
10775 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10776 prototype to take a regcache. Adjust.
10777
10778 2010-01-20 Pedro Alves <pedro@codesourcery.com>
10779
10780 * regcache.h (struct thread_info): Forward declare.
10781 (struct regcache): New.
10782 (new_register_cache): Adjust prototype.
10783 (get_thread_regcache): Declare.
10784 (free_register_cache): Adjust prototype.
10785 (registers_to_string, registers_from_string): Ditto.
10786 (supply_register, supply_register_by_name, collect_register)
10787 (collect_register_as_string, collect_register_by_name): Ditto.
10788 * regcache.c (struct inferior_regcache_data): Delete.
10789 (get_regcache): Rename to ...
10790 (get_thread_regcache): ... this. Adjust. Switch inferior before
10791 fetching registers.
10792 (regcache_invalidate_one): Adjust.
10793 (regcache_invalidate): Fix prototype.
10794 (new_register_cache): Return the new register cache.
10795 (free_register_cache): Change prototype.
10796 (realloc_register_cache): Adjust.
10797 (registers_to_string): Change prototype to take a regcache. Adjust.
10798 (registers_from_string): Ditto.
10799 (register_data): Ditto.
10800 (supply_register): Ditto.
10801 (supply_register_by_name): Ditto.
10802 (collect_register): Ditto.
10803 (collect_register_as_string): Ditto.
10804 (collect_register_by_name): Ditto.
10805 * server.c (process_serial_event): Adjust.
10806 * linux-low.h (regset_fill_func, regset_store_func): Change
10807 prototype.
10808 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10809 Change prototype.
10810 * linux-low.c (get_stop_pc): Adjust.
10811 (check_removed_breakpoint): Adjust.
10812 (linux_wait_for_event): Adjust.
10813 (linux_resume_one_lwp): Adjust.
10814 (fetch_register): Add regcache parameter. Adjust.
10815 (usr_store_inferior_registers): Ditto.
10816 (regsets_fetch_inferior_registers): Ditto.
10817 (regsets_store_inferior_registers): Ditto.
10818 (linux_fetch_registers, linux_store_registers): Ditto.
10819 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10820 regcache. Adjust.
10821 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10822 Ditto.
10823 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10824 prototype to take a regcache.
10825 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10826 * remote-utils.c (convert_ascii_to_int, outreg)
10827 (prepare_resume_reply): Change prototype to take a regcache.
10828 Adjust.
10829 * target.h (struct target_ops) <fetch_registers, store_registers>:
10830 Change prototype to take a regcache.
10831 (fetch_inferior_registers, store_inferior_registers): Change
10832 prototype to take a regcache. Adjust.
10833 * proc-service.c (ps_lgetregs): Adjust.
10834 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10835 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10836 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10837 take a regcache. Adjust.
10838 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10839 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10840 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10841 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10842 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10843 (cris_cannot_fetch_register):
10844 (cris_breakpoint_at): Change prototype to take a regcache.
10845 Adjust.
10846 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10847 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10848 to take a regcache. Adjust.
10849 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10850 Adjust.
10851 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10852 take a regcache. Adjust.
10853 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10854 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10855 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10856 * linux-mips-low.c (mips_get_pc):
10857 (mips_set_pc): Change prototype to take a regcache. Adjust.
10858 (mips_reinsert_addr): Adjust.
10859 (mips_collect_register): Change prototype to take a regcache.
10860 Adjust.
10861 (mips_supply_register):
10862 (mips_collect_register_32bit, mips_supply_register_32bit)
10863 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10864 (mips_store_fpregset): Ditto.
10865 * linux-ppc-low.c (ppc_supply_ptrace_register)
10866 (ppc_supply_ptrace_register): Ditto.
10867 (parse_spufs_run): Adjust.
10868 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10869 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10870 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10871 take a regcache. Adjust.
10872 * linux-s390-low.c (s390_collect_ptrace_register)
10873 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10874 (s390_set_pc): Change prototype to take a regcache. Adjust.
10875 (s390_arch_setup): Adjust.
10876 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10877 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10878 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10879 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10880 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10881 regcache. Adjust.
10882 (sparc_breakpoint_at): Adjust.
10883 * linux-xtensa-low.c (xtensa_fill_gregset):
10884 (xtensa_store_gregset):
10885 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10886 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10887 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10888 prototype to take a regcache. Adjust.
10889 * win32-arm-low.c (arm_fetch_inferior_register)
10890 (arm_store_inferior_register): Change prototype to take a
10891 regcache. Adjust.
10892 * win32-i386-low.c (i386_fetch_inferior_register)
10893 (i386_store_inferior_register): Change prototype to take a
10894 regcache. Adjust.
10895 * win32-low.c (child_fetch_inferior_registers)
10896 (child_store_inferior_registers): Change prototype to take a
10897 regcache. Adjust.
10898 (win32_wait): Adjust.
10899 (win32_fetch_inferior_registers): Change prototype to take a
10900 regcache. Adjust.
10901 (win32_store_inferior_registers): Adjust.
10902 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10903 store_inferior_register>: Change prototype to take a regcache.
10904
10905 2010-01-20 Doug Evans <dje@google.com>
10906
10907 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10908 #ifdef.
10909 (linux_wait_for_event1, linux_init_signals): Ditto.
10910 (W_STOPCODE): Provide definition if missing.
10911
10912 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10913
10914 * linux-low.c (linux_core_of_thread): New.
10915 (compare_ints, show_process, list_threads): New.
10916 (linux_qxfer_osdata): Report threads and cores.
10917 (linux_target_op): Register linux_core_of_thread.
10918 * remote-utils.c (prepare_resume_reply): Report the core.
10919 (buffer_xml_printf): Support %d specifier.
10920 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10921 New.
10922 (handle_query): Handle qXfer:threads. Announce availability
10923 thereof.
10924 * target.h (struct target_ops): New field core_of_thread.
10925
10926 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10927
10928 * Makefile.in (clean): Remove new generated files.
10929 (reg-s390.o, reg-s390.c): Remove rules.
10930 (reg-s390x.o, reg-s390x.c): Likewise.
10931 (s390-linux32.o, s390-linux32.c): Add rules.
10932 (s390-linux64.o, s390-linux64.c): Likewise.
10933 (s390x-linux64.o, s390x-linux64.c): Likewise.
10934 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10935 * linux-s390-low.c: Include <elf.h>.
10936 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10937 (init_registers_s390): Remove prototype.
10938 (init_registers_s390x): Likewise.
10939 (init_registers_s390_linux32): Add prototype.
10940 (init_registers_s390_linux64): Likewise.
10941 (init_registers_s390x_linux64): Likewise.
10942 (s390_num_regs_3264): New define.
10943 (s390_regmap_3264): New global variable.
10944 (s390_cannot_fetch_register): Remove obsolete check.
10945 (s390_cannot_store_register): Likewise.
10946 (s390_collect_ptrace_register): Handle upper/lower register halves.
10947 (s390_supply_ptrace_register): Likewise.
10948 (s390_fill_gregset): Update to register number changes.
10949 (s390_get_hwcap): New routine.
10950 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10951 Install appropriate regmap and register set.
10952
10953 2010-01-01 Joel Brobecker <brobecker@adacore.com>
10954
10955 * server.c (gdbserver_version): Update copyright year to 2010.
10956 * gdbreplay.c (gdbreplay_version): Likewise.
10957
10958 2009-12-28 Doug Evans <dje@google.com>
10959
10960 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10961 elf/external.h. Include <elf.h> instead but only if necessary.
10962
10963 2009-12-28 Pedro Alves <pedro@codesourcery.com>
10964
10965 * linux-low.c (linux_remove_process): Remove `detaching'
10966 parameter. Don't release/detach from thread_db here.
10967 (linux_kill): Release/detach from thread_db here, ...
10968 (linux_detach): ... and here, before actually detaching.
10969 (linux_wait_1): ... and here, when a process exits.
10970 * thread-db.c (any_thread_of): New.
10971 (thread_db_free): Switch the current inferior to a thread of the
10972 passed in process.
10973
10974 2009-12-21 Doug Evans <dje@google.com>
10975
10976 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10977
10978 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10979 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10980 warning ifndef __NR_tkill. Move setting of errno there too.
10981 Delete unnecessary resetting of errno after syscall.
10982 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10983
10984 * configure.ac: Check for dladdr.
10985 * config.in: Regenerate.
10986 * configure: Regenerate.
10987 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10988 (try_thread_db_load): Update.
10989
10990 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10991
10992 2009-12-18 Doug Evans <dje@google.com>
10993
10994 * event-loop.c: Include unistd.h if it exists.
10995
10996 * linux-low.c (my_waitpid): Move definition away from being in
10997 between linux_tracefork_child/linux_test_for_tracefork.
10998
10999 * gdb_proc_service.h (psaddr_t): Fix type.
11000 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11001 signature to match glibc.
11002
11003 2009-12-16 Doug Evans <dje@google.com>
11004
11005 * linux-low.c (linux_read_memory): Fix argument to read.
11006
11007 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11008
11009 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11010 events, don't leave current_inferior pointing at null.
11011
11012 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11013
11014 * win32-low.c (LOG): Delete.
11015 (OUTMSG): Output to stderr.
11016 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11017 on compile time LOG macro.
11018 (win32_wait): Fix debug output.
11019
11020 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11021
11022 * win32-low.c (win32_add_one_solib): If the dll name is
11023 "ntdll.dll", prepend the system directory to the dll path.
11024
11025 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11026
11027 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11028
11029 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11030 Vladimir Prus <vladimir@codesourcery.com>
11031
11032 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11033 * configure.ac: Check for __mcoldfire__ and set
11034 gdb_cv_m68k_is_coldfire.
11035 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11036 reg-cf.o and reg-m68k.o.
11037 * configure: Regenerated.
11038
11039 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11040
11041 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11042 Pass it to thread_db_free.
11043 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11044 proper `detaching' argument to linux_remove_process.
11045 * linux-low.h (thread_db_free): Add `detaching' parameter.
11046 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11047 to thread_db_free.
11048 (thread_db_free): Add `detaching' parameter. Only
11049 call td_ta_clear_event if detaching from process.
11050
11051 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11052
11053 * thread-db.c (thread_db_free): Fix typo.
11054
11055 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11056
11057 PR gdb/10838
11058 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11059
11060 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11061
11062 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11063 with an i686 compiler.
11064 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11065 needed.
11066 * configure: Rebuilt.
11067
11068 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11069
11070 PR gdb/10783
11071
11072 * server.c (handle_search_memory_1): Correct read_addr initialization
11073 in loop for searching subsequent chunks.
11074
11075 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11076
11077 * configure.ac: New --with-libthread-db option.
11078 * thread-db.c: Allow direct dependence on libthread_db.
11079 (thread_db_free): Adjust.
11080 * config.in: Regenerate.
11081 * configure: Likewise.
11082
11083 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11084
11085 PR gdb/10757
11086 * thread-db.c (attach_thread): New function.
11087 (maybe_attach_thread): Return success/failure.
11088 (find_new_threads_callback): Adjust.
11089 (thread_db_find_new_threads): Loop until no new threads.
11090
11091 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11092
11093 * proc-service.c (ps_lgetregs): Formatting.
11094
11095 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11096
11097 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11098 * configure.ac: Adjust.
11099 * linux-low.h (struct process_info_private): Move members to struct
11100 thread_db.
11101 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11102 * linux-low.c (linux_remove_process): Adjust.
11103 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11104 * server.c (handle_query): Move code ...
11105 (handle_monitor_command): ... here. New function.
11106 * target.h (struct target_ops): New member.
11107 * thread-db.c (struct thread_db): New.
11108 (libthread_db_search_path): New variable.
11109 (thread_db_create_event, thread_db_enable_reporting)
11110 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11111 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11112 (try_thread_db_load_1, dladdr_to_soname): New functions.
11113 (try_thread_db_load, thread_db_load_search): New functions.
11114 (thread_db_init): Search for libthread_db.
11115 (thread_db_free): New function.
11116 (thread_db_handle_monitor_command): Likewise.
11117 * config.in: Regenerate.
11118 * configure: Regenerate.
11119
11120 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11121
11122 * spu-low.c (spu_kill): Wait for inferior to terminate.
11123 Call clear_inferiors.
11124 (spu_detach): Call clear_inferiors.
11125
11126 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11127
11128 * aclocal.m4: Regenerate.
11129 * config.in: Likewise.
11130 * configure: Likewise.
11131
11132 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11133
11134 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11135 (parse_spufs_run): New function.
11136 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11137 (ppc_breakpoint_at): Handle SPU breakpoints.
11138
11139 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11140
11141 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11142 (SPUFS_MAGIC): Define.
11143 (spu_enumerate_spu_ids): New function.
11144 (linux_qxfer_spu): New function.
11145 (linux_target_ops): Install linux_qxfer_spu.
11146
11147 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11148
11149 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11150 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11151 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11152 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11153 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11154 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11155 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11156 (init_registers_powerpc_cell32l): Add prototype.
11157 (init_registers_powerpc_cell64l): Likewise.
11158 (ppc_arch_setup): Detect Cell/B.E. architecture.
11159
11160 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11161
11162 * Makefile.in (datarootdir): New variable.
11163
11164 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11165
11166 * linux-low.c (linux_write_memory): Update debugging output.
11167 * Makefile.in (clean): Add new descriptions.
11168 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11169 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11170 * configure.srv: Add new files for arm*-*-linux*.
11171 * linux-arm-low.c: Add new declarations.
11172 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11173 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11174 (HWCAP_VFPv3D16): New.
11175 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11176 instead of __IWMMXT__.
11177 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11178 (arm_arch_setup): New.
11179 (target_regsets): Remove #ifdef. Add VFP regset.
11180 (the_low_target): Use arm_arch_setup.
11181
11182 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11183
11184 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11185 the main thread again.
11186
11187 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11188
11189 Adding Neutrino gdbserver.
11190 * configure: Regenerated.
11191 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11192 * configure.srv (i[34567]86-*-nto*): New target.
11193 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11194 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11195 (nto_comctrl) [__QNX__]: New function.
11196 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11197
11198 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11199
11200 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11201 srv_tgtobj.
11202
11203 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11204 Pedro Alves <pedro@codesourcery.com>
11205
11206 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11207 don't support CONTEXT_EXTENDED_REGISTERS.
11208 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11209 (the_low_target): Install them.
11210 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11211 failing with ERROR_PIPE_NOT_CONNECTED.
11212
11213 2009-06-30 Doug Evans <dje@google.com>
11214 Pierre Muller <muller@ics.u-strasbg.fr>
11215
11216 Add h/w watchpoint support to x86-linux, win32-i386.
11217 * Makefile.in (SFILES): Add i386-low.c
11218 (i386_low_h): Define.
11219 (i386-low.o): Add dependencies.
11220 (linux-x86-low.o): Add i386-low.h dependency.
11221 (win32-i386-low.o): Ditto.
11222 * i386-low.c: New file.
11223 * i386-low.h: New file.
11224 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11225 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11226 * linux-low.c (linux_add_process): Initialize arch_private.
11227 (linux_remove_process): Free arch_private.
11228 (add_lwp): Initialize arch_private.
11229 (delete_lwp): Free arch_private.
11230 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11231 provided.
11232 * linux-low.h (process_info_private): New member arch_private.
11233 (lwp_info): New member arch_private.
11234 (linux_target_ops): New members new_process, new_thread,
11235 prepare_to_resume.
11236 (ptid_of): New macro.
11237 * linux-x86-low.c: Include stddef.h, i386-low.h.
11238 (arch_process_info): New struct.
11239 (arch_lwp_info): New struct.
11240 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11241 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11242 (i386_dr_low_get_status): New function.
11243 (x86_insert_point, x86_remove_point): New functions.
11244 (x86_stopped_by_watchpoint): New function.
11245 (x86_stopped_data_address): New function.
11246 (x86_linux_new_process, x86_linux_new_thread): New functions.
11247 (x86_linux_prepare_to_resume): New function.
11248 (the_low_target): Add entries for insert_point, remove_point,
11249 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11250 prepare_to_resume.
11251 * server.c (debug_hw_points): New global.
11252 (monitor_show_help): Document set debug-hw-points.
11253 (handle_query): Process "set debug-hw-points".
11254 * server.h (debug_hw_points): Declare.
11255 (paddress): Declare.
11256 * utils.c (NUMCELLS, CELLSIZE): New macros.
11257 (get_sell, xsnprintf, paddress): New functions.
11258 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11259 remove_point, stopped_by_watchpoint, stopped_data_address.
11260 * win32-i386-low.c: Include i386-low.h.
11261 (debug_reg_state): Replaces dr.
11262 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11263 (i386_dr_low_get_status): New function.
11264 (i386_insert_point, i386_remove_point): New functions.
11265 (i386_stopped_by_watchpoint): New function.
11266 (i386_stopped_data_address): New function.
11267 (i386_initial_stuff): Update.
11268 (get_thread_context,set_thread_context,i386_thread_added): Update.
11269 (the_low_target): Add entries for insert_point,
11270 remove_point, stopped_by_watchpoint, stopped_data_address.
11271 * win32-low.c (win32_insert_watchpoint): New function.
11272 (win32_remove_watchpoint): New function.
11273 (win32_stopped_by_watchpoint): New function.
11274 (win32_stopped_data_address): New function.
11275 (win32_target_ops): Add entries for insert_watchpoint,
11276 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11277 * win32-low.h (win32_target_ops): New members insert_point,
11278 remove_point, stopped_by_watchpoint, stopped_data_address.
11279
11280 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11281
11282 * server.c (process_serial_event): Re-return unsupported, not
11283 error, if the type isn't recognized. Re-allow supporting only
11284 insert or remove packets. Also call require_running for
11285 breakpoints. Add missing break statement to default case. Tidy.
11286 * target.h (struct target_ops): Rename insert_watchpoint to
11287 insert_point, and remove_watchpoint to remove_point.
11288
11289 * linux-low.h (struct linux_target_ops): Likewise.
11290 * linux-low.c (linux_insert_watchpoint): Rename to ...
11291 (linux_insert_point): ... this. Adjust.
11292 (linux_remove_watchpoint): Rename to ...
11293 (linux_remove_point): ... this. Adjust.
11294 (linux_target_ops): Adjust.
11295 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11296 (cris_insert_point): ... this.
11297 (cris_remove_watchpoint): Rename to ...
11298 (cris_remove_point): ... this.
11299 (the_low_target): Adjust.
11300
11301 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11302
11303 * server.c (handle_v_kill): Pass signal_pid to
11304 kill_inferior if multi_process is zero.
11305
11306 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11307
11308 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11309 * target.h (target_ops): Comment for *_watchpoint to make it clear
11310 the functions can get types '0' and '1'.
11311
11312 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11313
11314 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11315 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11316 * regcache.c (get_regcache): Likewise.
11317 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11318 * win32-low.c (child_fetch_inferior_registers): Remove check for
11319 regno 0.
11320
11321 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11322 Pedro Alves <pedro@codesourcery.com>
11323
11324 * target.h (struct target_ops) <supports_multi_process>: New
11325 callback.
11326 (target_supports_multi_process): New.
11327 * server.c (handle_query): Even if GDB reports support, only
11328 enable multi-process if the target also supports it. Report
11329 multi-process support only if the target backend supports it.
11330 * linux-low.c (linux_supports_multi_process): New function.
11331 (linux_target_ops): Install it as target_supports_multi_process
11332 callback.
11333
11334 2009-05-24 Doug Evans <dje@google.com>
11335
11336 Global renaming of find_thread_pid to find_thread_ptid.
11337 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11338 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11339 All callers updated.
11340
11341 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11342 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11343 directly.
11344
11345 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11346 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11347 (linux_resume_one_lwp): Ditto.
11348
11349 2009-05-23 Doug Evans <dje@google.com>
11350
11351 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11352 from struct inferior_list_entry * to struct lwp_info *.
11353 All callers updated.
11354
11355 2009-05-13 Doug Evans <dje@google.com>
11356
11357 * linux-x86-low.c: Don't include assert.h.
11358 (x86_siginfo_fixup): Use fatal, not assert.
11359 (x86_arch_setup): Fix comment.
11360
11361 2009-05-12 Doug Evans <dje@google.com>
11362
11363 Biarch support for i386/amd64 gdbserver.
11364 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11365 Add linux-x86-low.c.
11366 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11367 (linux-x86-low.o): Add.
11368 * linux-x86-64-low.c: Delete.
11369 * linux-i386-low.c: Delete.
11370 * linux-x86-low.c: New file.
11371 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11372 linux-x86-low.o.
11373 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11374 linux-x86-low.o.
11375 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11376 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11377 (linux_child_pid_to_exec_file): New function.
11378 (elf_64_header_p, elf_64_file_p): New functions.
11379 (siginfo_fixup): New function.
11380 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11381 give target a chance to convert layout.
11382 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11383 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11384
11385 2009-05-07 Doug Evans <dje@google.com>
11386
11387 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11388 (regsets_store_inferior_registers): Ditto.
11389
11390 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11391
11392 PR server/10048
11393
11394 * linux-low.c (must_set_ptrace_flags): Delete.
11395 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11396 of the global.
11397 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11398 `lwp->must_set_ptrace_flags' instead.
11399 (linux_wait_for_event_1): Set ptrace options here.
11400 (linux_wait_1): ... not here.
11401
11402 2009-04-30 Doug Evans <dje@google.com>
11403
11404 * inferiors.c (started_inferior_callback): New function.
11405 (attached_inferior_callback): New function.
11406 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11407 * server.c (print_started_pid, print_attached_pid): New functions.
11408 (detach_or_kill_for_exit): New function.
11409 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11410 * server.h (have_started_inferiors_p): Declare.
11411 (have_attached_inferiors_p): Declare.
11412
11413 * inferiors.c (remove_process): Fix memory leak, free process.
11414 * linux-low.c (linux_remove_process): New function.
11415 (linux_kill): Call it instead of remove_process.
11416 (linux_detach, linux_wait_1): Ditto.
11417
11418 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11419
11420 * configure.srv: Add x86 Windows CE target.
11421
11422 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11423
11424 * inferiors.c (get_thread_process): Make global.
11425 * server.h (get_thread_process): Add prototype.
11426 * thread-db.c (find_one_thread): Use get_thread_process
11427 instead of current_process.
11428 (thread_db_get_tls_address): Do not crash if called when
11429 thread layer is not yet initialized.
11430
11431 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11432
11433 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11434 * spu-low.c (current_tid): Rename to ...
11435 (current_ptid): ... this.
11436 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11437 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11438 ptid_get_lwp (current_ptid) instead of current_tid.
11439 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11440 instead of current_tid. Use find_process_pid to verify pid
11441 argument is valid. Pass proper argument to remove_process.
11442 (spu_thread_alive): Compare current_ptid instead of current_tid.
11443 (spu_resume): Likewise.
11444
11445 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11446
11447 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11448 variable.
11449
11450 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11451
11452 Implement the multiprocess extensions, and add linux multiprocess
11453 support.
11454
11455 * server.h (ULONGEST): Declare.
11456 (struct ptid, ptid_t): New.
11457 (minus_one_ptid, null_ptid): Declare.
11458 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11459 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11460 (struct inferior_list_entry): Change `id' type from unsigned from
11461 to ptid_t.
11462 (struct sym_cache, struct breakpoint, struct
11463 process_info_private): Forward declare.
11464 (struct process_info): Declare.
11465 (current_process): Declare.
11466 (all_processes): Declare.
11467 (initialize_inferiors): Declare.
11468 (add_thread): Adjust to use ptid_t.
11469 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11470 (add_process, remove_process, find_thread_pid): Declare.
11471 (find_inferior_id): Adjust to use ptid_t.
11472 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11473 (multi_process): Declare.
11474 (push_event): Adjust to use ptid_t.
11475 (read_ptid, write_ptid): Declare.
11476 (prepare_resume_reply): Adjust to use ptid_t.
11477 (clear_symbol_cache): Declare.
11478 * inferiors.c (all_processes): New.
11479 (null_ptid, minus_one_ptid): New.
11480 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11481 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11482 (add_thread): Change unsigned long to ptid. Remove gdb_id
11483 parameter. Adjust.
11484 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11485 (gdb_id_to_thread): Rename to ...
11486 (find_thread_pid): ... this. Change unsigned long to ptid.
11487 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11488 (loaded_dll, pull_pid_from_list): Adjust.
11489 (add_process, remove_process, find_process_pid)
11490 (get_thread_process, current_process, initialize_inferiors): New.
11491 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11492 (struct target_waitstatus) <related_pid>: Ditto.
11493 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11494 return type to int.
11495 (struct target_ops) <join>: Add `pid' argument.
11496 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11497 (struct target_ops) <wait>: Add `ptid' field. Change return type
11498 to ptid.
11499 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11500 (mywait): Add `ptid' argument. Change return type to ptid_t.
11501 (target_pid_to_str): Declare.
11502 * target.c (set_desired_inferior): Adjust to use ptids.
11503 (mywait): Add new `ptid' argument. Adjust.
11504 (target_pid_to_str): New.
11505 * mem-break.h (free_all_breakpoints): Declare.
11506 * mem-break.c (breakpoints): Delelete.
11507 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11508 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11509 to use per-process breakpoint list.
11510 (free_all_breakpoints): New.
11511 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11512 (symbol_cache, all_symbols_looked_up): Delete.
11513 (hexchars): New.
11514 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11515 read_ptid): New.
11516 (prepare_resume_reply): Change ptid argument's type from unsigned
11517 long to ptid_t. Adjust. Implement W;process and X;process.
11518 (free_sym_cache, clear_symbol_cache): New.
11519 (look_up_one_symbol): Adjust to per-process symbol cache. *
11520 * server.c (cont_thread, general_thread, step_thread): Change type
11521 to ptid_t.
11522 (attached): Delete.
11523 (multi_process): New.
11524 (last_ptid): Change type to ptid_t.
11525 (struct vstop_notif) <ptid>: Change type to ptid_t.
11526 (queue_stop_reply, push_event): Change `ptid' argument's type to
11527 ptid_t.
11528 (discard_queued_stop_replies): Add `pid' argument.
11529 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11530 changes. Don't reference the `attached' global.
11531 (attach_inferior): Adjust to mywait interface changes.
11532 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11533 features. Handle and report "multiprocess+". Handle
11534 "qAttached:PID".
11535 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11536 changes.
11537 (handle_v_kill): New.
11538 (handle_v_stopped): Adjust to use target_pid_to_str.
11539 (handle_v_requests): Allow multiple attaches and runs when
11540 multiprocess extensions are in effect. Handle "vKill".
11541 (myresume): Adjust to use ptids.
11542 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11543 (handle_status): Adjust to discard_queued_stop_replies interface
11544 change.
11545 (first_thread_of, kill_inferior_callback)
11546 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11547 (main): Call initialize_inferiors. Adjust to use ptids, killing
11548 and detaching from all inferiors. Handle multiprocess packet
11549 variants.
11550 * linux-low.h: Include gdb_proc_service.h.
11551 (struct process_info_private): New.
11552 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11553 <lwpid_of>: Use ptid_get_lwp.
11554 (get_lwp_thread): Adjust.
11555 (struct lwp_info): Add `dead' member.
11556 (find_lwp_pid): Declare.
11557 * linux-low.c (thread_db_active): Delete.
11558 (new_inferior): Adjust comment.
11559 (inferior_pid): Delete.
11560 (linux_add_process): New.
11561 (handle_extended_wait): Adjust.
11562 (add_lwp): Change unsigned long to ptid.
11563 (linux_create_inferior): Add process to processes table. Adjust
11564 to use ptids. Don't set new_inferior here.
11565 (linux_attach_lwp): Rename to ...
11566 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11567 it. Adjust to use ptids.
11568 (linux_attach_lwp): New.
11569 (linux_attach): Add process to processes table. Don't set
11570 new_inferior here.
11571 (struct counter): New.
11572 (second_thread_of_pid_p, last_thread_of_process_p): New.
11573 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11574 multiple processes.
11575 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11576 processes. Remove process from process table.
11577 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11578 to multiple processes.
11579 (any_thread_of): New.
11580 (linux_detach): Add `pid' argument, and handle it. Remove process
11581 from processes table.
11582 (linux_join): Add `pid' argument. Handle it.
11583 (linux_thread_alive): Change unsighed long argument to ptid_t.
11584 Consider dead lwps as not being alive.
11585 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11586 threads we're not interested in.
11587 (same_lwp, find_lwp_pid): New.
11588 (linux_wait_for_lwp): Change `pid' argument's type from int to
11589 ptid_t. Adjust.
11590 (linux_wait_for_event): Rename to ...
11591 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11592 from int to ptid_t. Adjust.
11593 (linux_wait_for_event): New.
11594 (linux_wait_1): Add `ptid' argument. Change return type to
11595 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11596 that exit from the process table.
11597 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11598 Adjust.
11599 (mark_lwp_dead): New.
11600 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11601 stopping all threads, mark its main lwp as dead.
11602 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11603 ptids.
11604 (fetch_register, usr_store_inferior_registers)
11605 (regsets_fetch_inferior_registers)
11606 (regsets_store_inferior_registers, linux_read_memory)
11607 (linux_write_memory): Inline `inferior_pid'.
11608 (linux_look_up_symbols): Adjust to use per-process
11609 `thread_db_active'.
11610 (linux_request_interrupt): Adjust to use ptids.
11611 (linux_read_auxv): Inline `inferior_pid'.
11612 (initialize_low): Don't reference thread_db_active.
11613 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11614 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11615 (ps_getpid): Return the pid of the current inferior.
11616 * thread-db.c (proc_handle, thread_agent): Delete.
11617 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11618 per-process data.
11619 (find_one_thread): Change argument type to ptid_t. Adjust to
11620 per-process data.
11621 (maybe_attach_thread): Adjust to per-process data and ptids.
11622 (thread_db_find_new_threads): Ditto.
11623 (thread_db_init): Ditto.
11624 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11625 processes table. Adjust to use ptids.
11626 (spu_kill, spu_detach): Adjust interface. Remove process from
11627 processes table.
11628 (spu_join, spu_thread_alive): Adjust interface.
11629 (spu_wait): Adjust interface. Remove process from processes
11630 table. Adjust to use ptids.
11631 * win32-low.c (current_inferior_tid): Delete.
11632 (current_inferior_ptid): New.
11633 (debug_event_ptid): New.
11634 (thread_rec): Take a ptid. Adjust.
11635 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11636 (child_delete_thread): Ditto.
11637 (do_initial_child_stuff): Add `attached' argument. Add process to
11638 processes table.
11639 (child_fetch_inferior_registers, child_store_inferior_registers):
11640 Adjust.
11641 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11642 (win32_attach): Pass 1 to do_initial_child_stuff.
11643 (win32_kill): Adjust interface. Remove process from processes
11644 table.
11645 (win32_detach): Ditto.
11646 (win32_join): Adjust interface.
11647 (win32_thread_alive): Take a ptid.
11648 (win32_resume): Adjust to use ptids.
11649 (get_child_debug_event): Ditto.
11650 (win32_wait): Adjust interface. Remove exiting process from
11651 processes table.
11652
11653 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11654
11655 Non-stop mode support.
11656
11657 * server.h (non_stop): Declare.
11658 (gdb_client_data, handler_func): Declare.
11659 (delete_file_handler, add_file_handler, start_event_loop):
11660 Declare.
11661 (handle_serial_event, handle_target_event, push_event)
11662 (putpkt_notif): Declare.
11663 * target.h (enum resume_kind): New.
11664 (struct thread_resume): Replace `step' field by `kind' field.
11665 (TARGET_WNOHANG): Define.
11666 (struct target_ops) <wait>: Add `options' argument.
11667 <supports_non_stop, async, start_non_stop>: New fields.
11668 (target_supports_non_stop, target_async): New.
11669 (start_non_stop): Declare.
11670 (mywait): Add `options' argument.
11671 * target.c (mywait): Add `options' argument. Print child exit
11672 notifications here.
11673 (start_non_stop): New.
11674 * server.c (non_stop, own_buf, mem_buf): New globals.
11675 (struct vstop_notif): New.
11676 (notif_queue): New global.
11677 (queue_stop_reply, push_event, discard_queued_stop_replies)
11678 (send_next_stop_reply): New.
11679 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11680 interface changes.
11681 (attach_inferior): In non-stop mode, don't wait for the target
11682 here.
11683 (handle_general_set): Handle QNonStop.
11684 (handle_query): When handling qC, return the current general
11685 thread, instead of the first thread of the list.
11686 (handle_query): If the backend supports non-stop mode, include
11687 QNonStop+ in the qSupported query response.
11688 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11689 and non-stop mode.
11690 (handle_v_attach, handle_v_run): Handle non-stop mode.
11691 (handle_v_stopped): New.
11692 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11693 (myresume): Adjust to use resume_kind. Handle non-stop.
11694 (queue_stop_reply_callback): New.
11695 (handle_status): Handle non-stop mode.
11696 (main): Clear non_stop flag on reconnection. Use the event-loop.
11697 Refactor serial protocol handling from here ...
11698 (process_serial_event): ... to this new function. When GDB
11699 selects any thread, select one here. In non-stop mode, wait until
11700 GDB acks all pending events before exiting.
11701 (handle_serial_event, handle_target_event): New.
11702 * remote-utils.c (remote_open): Install remote_desc in the event
11703 loop.
11704 (remote_close): Remove remote_desc from the event loop.
11705 (putpkt_binary): Rename to...
11706 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11707 (putpkt_binary): New as wrapper around putpkt_binary_1.
11708 (putpkt_notif): New.
11709 (prepare_resume_reply): In non-stop mode, don't change the
11710 general_thread.
11711 * event-loop.c: New.
11712 * Makefile.in (OBJ): Add event-loop.o.
11713 (event-loop.o): New rule.
11714
11715 * linux-low.h (pid_of): Moved here.
11716 (lwpid_of): New.
11717 (get_lwp_thread): Use lwpid_of.
11718 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11719 * linux-low.c (pid_of): Delete.
11720 (inferior_pid): Use lwpid_of.
11721 (linux_event_pipe): New.
11722 (target_is_async_p): New.
11723 (delete_lwp): New.
11724 (handle_extended_wait): Use lwpid_of.
11725 (add_lwp): Don't set lwpid field.
11726 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11727 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11728 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11729 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11730 first. Adjust to linux_wait_for_event interface changes. Use
11731 lwpid_of.
11732 (linux_detach): Don't delete the main lwp here.
11733 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11734 (status_pending_p): Don't consider explicitly suspended lwps.
11735 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11736 pointer. Add OPTIONS argument. Change return type to int. Use
11737 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11738 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11739 pointer. Add status pointer argument. Return a pid instead of a
11740 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11741 changes. In non-stop mode, don't switch to a random thread.
11742 (linux_wait): Rename to...
11743 (linux_wait_1): ... this. Add target_options argument, and handle
11744 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11745 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11746 clean exit and signal exit code. Don't stop all threads in
11747 non-stop mode. In all-stop mode, only stop all threads when
11748 reporting a stop to GDB. Handle explicit thread stop requests.
11749 (async_file_flush, async_file_mark): New.
11750 (linux_wait): New.
11751 (send_sigstop): Use lwpid_of.
11752 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11753 interface changes. In non-stop mode, don't switch to a random
11754 thread.
11755 (linux_resume_one_lwp): Use lwpid_of.
11756 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11757 (linux_resume_one_thread): ... this. Handle resume_stop. In
11758 non-stop mode, don't look for pending flag in all threads.
11759 (resume_status_pending_p): Don't consider explicitly suspended
11760 threads.
11761 (my_waitpid): Reimplement. Emulate __WALL.
11762 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11763 Use lwpid_of.
11764 (sigchld_handler, linux_supports_non_stop, linux_async)
11765 (linux_start_non_stop): New.
11766 (linux_target_ops): Register linux_supports_non_stop, linux_async
11767 and linux_start_non_stop.
11768 (initialize_low): Install SIGCHLD handler.
11769 * thread-db.c (thread_db_create_event, find_one_thread)
11770 (thread_db_get_tls_address): Use lwpid_of.
11771 * win32-low.c (win32_detach): Adjust to use resume_kind.
11772 (win32_wait): Add `options' argument.
11773 * spu-low.c (spu_resume): Adjust to use resume_kind.
11774 (spu_wait): Add `options' argument.
11775
11776 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11777
11778 Decouple target code from remote protocol.
11779
11780 * target.h (enum target_waitkind): New.
11781 (struct target_waitstatus): New.
11782 (struct target_ops) <wait>: Return an unsigned long. Take a
11783 target_waitstatus pointer instead of a char pointer.
11784 (mywait): Likewise.
11785 * target.c (mywait): Change prototype to return an unsigned long.
11786 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11787 * server.h (thread_from_wait, old_thread_from_wait): Delete
11788 declarations.
11789 (prepare_resume_reply): Change prototype to take a
11790 target_waitstatus.
11791 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11792 (last_status, last_ptid): New.
11793 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11794 pid instead of a signal.
11795 (attach_inferior): Remove "status" and "signal" parameters.
11796 Adjust.
11797 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11798 not as an address.
11799 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11800 (handle_v_requests, myresume): Remove "status" and "signal"
11801 parameters. Adjust.
11802 (handle_status): New.
11803 (main): Delete local `status'. Adjust.
11804 * remote-utils.c: Include target.h.
11805 (prepare_resume_reply): Change prototype to take a
11806 target_waitstatus. Adjust.
11807
11808 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11809 interface.
11810 * spu-low.c (spu_wait): Adjust.
11811 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11812 Delete.
11813 (win32_wait): Adjust.
11814
11815 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11816
11817 * target.h (struct thread_resume): Delete leave_stopped member.
11818 (struct target_ops): Add a `n' argument to the `resume' callback.
11819 * server.c (start_inferior): Adjust.
11820 (handle_v_cont, myresume): Adjust.
11821 * linux-low.c (check_removed_breakpoint): Adjust to resume
11822 interface change, and to removed leave_stopped field.
11823 (resume_ptr): Delete.
11824 (struct thread_resume_array): New.
11825 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11826 resume interface change.
11827 (linux_continue_one_thread, linux_queue_one_thread)
11828 (resume_status_pending_p): Check if the resume field is NULL
11829 instead of checking the leave_stopped member.
11830 (linux_resume): Adjust to the target resume interface change.
11831 * spu-low.c (spu_resume): Adjust to the target resume interface
11832 change.
11833 * win32-low.c (win32_detach, win32_resume): Ditto.
11834
11835 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11836
11837 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11838 flag.
11839 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11840 pending.
11841 (linux_continue_one_thread): Only preserve the stepping flag if
11842 there's a pending breakpoint.
11843
11844 2009-03-31 Pedro Alves <pedro@codesourcery.com>
11845
11846 * server.c (main): After the inferior having exited, call
11847 remote_close before exiting gdbserver.
11848
11849 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11850
11851 Fix size of FPSCR in Power 7 processors.
11852 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11853 (PPC_FEATURE_HAS_DFP): New #define.
11854 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11855 size of the FPSCR.
11856
11857 2009-03-23 Pedro Alves <pedro@codesourcery.com>
11858
11859 * server.c (handle_query) Whitespace and formatting.
11860
11861 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11862
11863 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11864 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11865 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11866 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11867 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11868 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11869 Makefile.in, configure.ac: Fix whitespace throughout.
11870 * configure: Regenerate.
11871
11872 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11873
11874 * inferiors.c (find_inferior): Make it safe for the callback
11875 function to delete the currently iterated inferior.
11876
11877 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11878
11879 * Makefile.in (linuw_low_h): Move higher.
11880 (thread-db.o): Depend on $(linux_low_h).
11881
11882 2009-03-17 Pedro Alves <pedro@codesourcery.com>
11883
11884 Rename "process" to "lwp" throughout.
11885
11886 * linux-low.c (all_processes): Rename to...
11887 (all_lwps): ... this.
11888 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11889 (add_process): Rename to ...
11890 (add_lwp): ... this. Adjust.
11891 (linux_create_inferior): Adjust.
11892 (linux_attach_lwp): Adjust.
11893 (linux_attach): Adjust.
11894 (linux_kill_one_process): Rename to ...
11895 (linux_kill_one_lwp): ... this. Adjust.
11896 (linux_kill): Adjust.
11897 (linux_detach_one_process): Rename to ...
11898 (linux_detach_one_lwp): ... this. Adjust.
11899 (linux_detach): Adjust.
11900 (check_removed_breakpoint): Adjust.
11901 (status_pending_p): Adjust.
11902 (linux_wait_for_process): Rename to ...
11903 (linux_wait_for_lwp): ... this. Adjust.
11904 (linux_wait_for_event): Adjust.
11905 (send_sigstop): Adjust.
11906 (wait_for_sigstop): Adjust.
11907 (stop_all_processes): Rename to ...
11908 (stop_all_lwps): ... this.
11909 (linux_resume_one_process): Rename to ...
11910 (linux_resume_one_lwp): ... this. Adjust.
11911 (linux_set_resume_request, linux_continue_one_thread)
11912 (linux_queue_one_thread, resume_status_pending_p)
11913 (usr_store_inferior_registers, regsets_store_inferior_registers)
11914 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11915 Adjust.
11916 * linux-low.h (get_process): Rename to ...
11917 (get_lwp): ... this. Adjust.
11918 (get_thread_process): Rename to ...
11919 (get_thread_lwp): ... this. Adjust.
11920 (get_process_thread): Rename to ...
11921 (get_lwp_thread): ... this. Adjust.
11922 (struct process_info): Rename to ...
11923 (struct lwp_info): ... this.
11924 (all_processes): Rename to ...
11925 (all_lwps): ... this.
11926 * proc-service.c (ps_lgetregs): Adjust.
11927 * thread-db.c (thread_db_create_event, find_one_thread)
11928 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11929
11930 2009-03-14 Pedro Alves <pedro@codesourcery.com>
11931
11932 * server.c (handle_query): Handle "qAttached".
11933
11934 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11935
11936 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11937 GPLv3, update license URL.
11938
11939 2009-03-01 Doug Evans <dje@google.com>
11940
11941 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11942 (server_h): Add gdb_signals.h.
11943 (signals.o): Update.
11944 * server.h (target_signal_from_host,target_signal_to_host_p)
11945 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11946
11947 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11948
11949 * remote-utils.c (getpkt): Also generate remote-debug
11950 information if noack_mode is set.
11951
11952 2009-02-06 Pedro Alves <pedro@codesourcery.com>
11953
11954 * server.c (handle_query): Report qXfer:siginfo:read and
11955 qXfer:siginfo:write as supported and handle them.
11956 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11957 * linux-low.c (linux_xfer_siginfo): New.
11958 (linux_target_ops): Set it.
11959
11960 2009-01-26 Pedro Alves <pedro@codesourcery.com>
11961
11962 * server.c (gdbserver_usage): Mention --remote-debug.
11963 (main): Accept '--remote-debug' switch.
11964
11965 2009-01-18 Doug Evans <dje@google.com>
11966
11967 * regcache.c (new_register_cache): No need to check result of xcalloc.
11968 * server.c (handle_search_memory): Back out calls to xmalloc,
11969 result is checked and error is returned to user upon failure.
11970 (handle_query): Ditto. Add more checks for result of malloc.
11971 (handle_v_cont): Check result of malloc, report error back to
11972 user upon failure.
11973 (handle_v_run): Ditto. Call freeargv.
11974 * server.h (freeargv): Declare.
11975 * utils.c (freeargv): New fn.
11976
11977 2009-01-15 Doug Evans <dje@google.com>
11978
11979 * gdbreplay.c (perror_with_name): Make arg const char *.
11980 * server.h (target_signal_to_name): Make return type const char *.
11981 * thread-db.c (thread_db_err_str): Make return type const char *.
11982 * utils.c (perror_with_name): Make arg const char *.
11983
11984 2009-01-14 Pedro Alves <pedro@codesourcery.com>
11985
11986 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11987 when handling a EXIT_PROCESS_DEBUG_EVENT.
11988
11989 2009-01-06 Joel Brobecker <brobecker@adacore.com>
11990
11991 * gdbreplay.c (gdbreplay_version): Update copyright year.
11992 * server.c (gdbserver_version): Likewise.
11993
11994 2009-01-05 Doug Evans <dje@google.com>
11995
11996 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11997 (handle_extended_wait): Improve comment.
11998
11999 2008-12-13 Doug Evans <dje@google.com>
12000
12001 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12002 * server.h (ATTR_MALLOC): New macro.
12003 (xmalloc,xcalloc,xstrdup): Declare.
12004 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12005 * inferiors.c: Ditto.
12006 * linux-low.c: Ditto.
12007 * mem-break.c: Ditto.
12008 * regcache.c: Ditto.
12009 * remote-utils.c: Ditto.
12010 * server.c: Ditto.
12011 * target.c: Ditto.
12012 * win32-low.c: Ditto.
12013
12014 2008-12-12 Doug Evans <dje@google.com>
12015
12016 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12017 in debugging printf.
12018
12019 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12020
12021 2008-12-09 Doug Evans <dje@google.com>
12022
12023 * linux-low.h (struct process_info): Delete member tid, unused.
12024 * thread-db.c (find_one_thread): Update.
12025 (maybe_attach_thread): Update.
12026
12027 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12028
12029 * target.h (struct target_ops): Add qxfer_osdata member.
12030 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12031 and dirent.h.
12032 (linux_qxfer_osdata): New functions.
12033 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12034 callback.
12035 * server.c (handle_query): Handle "qXfer:osdata:read:".
12036 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12037 (buffer_xml_printf): New functions.
12038 * server.h (struct buffer): New.
12039 (buffer_grow_str, buffer_grow_str0): New macros.
12040 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12041 (buffer_xml_printf): Declare.
12042
12043 2008-11-24 Doug Evans <dje@google.com>
12044
12045 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12046
12047 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12048
12049 * server.c (handle_v_run): Always use the supplied argument list.
12050
12051 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12052
12053 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12054 (xtensa_regmap_table): Add entry for scompare1.
12055
12056 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12057
12058 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12059 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12060 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12061 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12062 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12063 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12064 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12065 XML target descriptions.
12066 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12067 when inferior is running on an ISA 2.05 or later processor. Add
12068 special case to return offset for full 64-bit slot of FPSCR when
12069 in 32-bits.
12070
12071 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12072
12073 * Makefile.in (SFILES, clean): Added sparc64 files.
12074 (reg-sparc64.o, reg-sparc64.c): New.
12075 * configure.srv (sparc*-*-linux*): New configuration.
12076 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12077 syscall arguments for SPARC.
12078 (regsets_store_inferior_registers): Likewise.
12079 * linux-sparc-low.c: New file.
12080
12081 2008-10-21 Doug Evans <dje@google.com>
12082
12083 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12084 (READLINE_DIR,READLINE_DEP): Delete.
12085 (INTERNAL_CFLAGS): Update.
12086 (LINTFLAGS): Update.
12087
12088 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12089
12090 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12091 whole argv from the last run, not just argv[0].
12092
12093 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12094
12095 * regcache.c (new_register_cache): Return NULL if the register
12096 cache size isn't known yet.
12097 (free_register_cache): Avoid dereferencing a NULL regcache.
12098
12099 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12100
12101 * configure.srv: Merge MIPS and MIPS64.
12102
12103 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12104
12105 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12106
12107 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12108
12109 * Makefile.in: Add required vsx dependencies.
12110
12111 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12112 Declare init_registers_powerpc_vsx32l.
12113 Declare init_registers_powerpc_vsx64l.
12114 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12115 (ppc_arch_setup): Check for VSX in hwcap.
12116 (ppc_fill_vsxregset): New function.
12117 (ppc_store_vsxregset): New function.
12118 Add new VSX entry in regset_info target_regsets.
12119
12120 * configure.srv: Add new VSX dependencies.
12121
12122 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12123
12124 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12125 (remote_open): Set or clear transport_is_reliable.
12126 (putpkt_binary): Don't expect acks in noack mode.
12127 (getpkt): Don't send ack/nac in noack mode.
12128 * server.c (handle_general_set): Handle QStartNoAckMode.
12129 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12130 qSupported.
12131 (main): Reset noack_mode on every connection.
12132 * server.h (noack_mode): Declare.
12133
12134 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12135
12136 * Makefile.in (GDBREPLAY_OBS): New variable.
12137 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12138
12139 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12140 Daniel Jacobowitz <dan@codesourcery.com>
12141
12142 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12143 (usr_store_inferior_registers): Likewise.
12144 (regsets_store_inferior_registers): Likewise.
12145
12146 2008-07-31 Rolf Jansen <rj@surtec.com>
12147 Pedro Alves <pedro@codesourcery.com>
12148
12149 * configure.ac: Check for memmem declaration.
12150 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12151 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12152 (disable_packet_qfThreadInfo): Unconditionally compile.
12153 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12154 * configure, config.in: Regenerate.
12155
12156 2008-07-28 Doug Kwan <dougkwan@google.com>
12157
12158 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12159 (linux_write_memory): Remove declaration of errno.
12160
12161 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12162
12163 * linux-low.c (handle_extended_wait): Do not use "status"
12164 variable uninitialized.
12165
12166 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12167
12168 * server.c (handle_v_attach): Inhibit reporting dll changes.
12169
12170 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12171
12172 * remote-utils.c (prepare_resume_reply): If requested, don't
12173 output "thread:TID" in the T stop reply.
12174
12175 * server.c (disable_packet_vCont, disable_packet_Tthread)
12176 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12177 (handle_query): If requested, disable support for qC, qfThreadInfo
12178 and qsThreadInfo.
12179 (handle_v_requests): If requested, disable support for vCont.
12180 (gdbserver_show_disableable): New.
12181 (main): Handle --disable-packet and --disable-packet=LIST.
12182
12183 * server.h (disable_packet_vCont, disable_packet_Tthread)
12184 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12185
12186 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12187
12188 * server.c (gdbserver_usage): Mention --version.
12189
12190 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12191
12192 * Makefile.in (gdbreplay.o): New rule.
12193
12194 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12195
12196 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12197 message, not gdbserver.
12198
12199 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12200 Nathan Sidwell <nathan@codesourcery.com>
12201 Joseph Myers <joseph@codesourcery.com>
12202
12203 * acinclude.m4: Include ../../config/acx.m4.
12204 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12205 * configure, config.in: Regenerate.
12206 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12207 * server.c (gdbserver_version): Print PKGVERSION.
12208 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12209 (main): Adjust gdbserver_usage calls.
12210 * gdbreplay.c (version, host_name): Add declarations.
12211 (gdbreplay_version, gdbreplay_usage): New.
12212 (main): Accept --version and --help options.
12213
12214 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12215
12216 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12217 (arm_breakpoint_at): Handle Thumb.
12218 (the_low_target): Add comment.
12219
12220 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12221
12222 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12223
12224 2008-05-09 Doug Evans <dje@google.com>
12225
12226 * server.h (decode_search_memory_packet): Declare.
12227 * remote-utils.c (decode_search_memory_packet): New fn.
12228 * server.c (handle_search_memory_1): New fn.
12229 (handle_search_memory): New fn.
12230 (handle_query): Process qSearch:memory packets.
12231
12232 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12233
12234 * regcache.c (registers_length): Remove.
12235 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12236 full register packet.
12237 * regcache.h (registers_length): Remove prototype.
12238 * server.h (PBUFSIZ): Define to 16384.
12239
12240 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12241
12242 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12243 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12244 powerpc-64l.o, and powerpc-altivec64l.o.
12245 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12246 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12247 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12248 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12249 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12250 to srv_xmlfiles.
12251
12252 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12253 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12254 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12255 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12256 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12257 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12258 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12259 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12260 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12261 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12262 (clean): Update.
12263
12264 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12265 (init_registers_powerpc_32l): ... this new prototype.
12266 (init_registers_powerpc_32): Remove, replace by ...
12267 (init_registers_powerpc_altivec32l): ... this new prototype.
12268 (init_registers_powerpc_e500): Remove, replace by ...
12269 (init_registers_powerpc_e500l): ... this new prototype.
12270 (init_registers_ppc64): Remove, replace by ...
12271 (init_registers_powerpc_64l): ... this new prototype.
12272 (init_registers_powerpc_64): Remove, replace by ...
12273 (init_registers_powerpc_altivec64l): ... this new prototype.
12274 (ppc_num_regs): Set to 73.
12275 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12276 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12277 (ppc_cannot_store_register): Handle orig_r3 and trap.
12278 (ppc_arch_setup): Update init_registers_... calls.
12279 (ppc_fill_gregset): Handle orig_r3 and trap.
12280
12281 * inferiors.c (clear_inferiors): Reset current_inferior.
12282
12283 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12284
12285 * acinclude.m4: Add override.m4.
12286 * configure: Regenerate.
12287
12288 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12289
12290 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12291 initial call to init_register_ppc64.
12292
12293 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12294
12295 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12296 single powerpc*-*-linux* case.
12297 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12298
12299 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12300
12301 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12302 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12303 from reg_xmlfiles.
12304 * linux-ppc-low.c: Include <elf.h>.
12305 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12306 (ppc_hwcap): New global variable.
12307 (ppc_regmap): Remove __SPE__ #ifdef sections.
12308 (ppc_regmap_e500): New global variable.
12309 (ppc_cannot_store_register): Update __SPE__ special case.
12310 (ppc_get_hwcap): New function.
12311 (ppc_arch_setup): Use it to determine whether inferior supports
12312 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12313 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12314 Do not access registers if target does not support AltiVec.
12315 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12316 Do not access registers if target does not support SPE.
12317 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12318
12319 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12320
12321 * linux-low.c (disabled_regsets, num_regsets): New.
12322 (use_regsets_p): Delete.
12323 (linux_wait_for_process): Clear disabled_regsets.
12324 (regsets_fetch_inferior_registers): Check and set it.
12325 (regsets_store_inferior_registers): Likewise.
12326 (linux_fetch_registers, linux_store_registers): Do not use
12327 use_regsets_p.
12328 (initialize_low): Allocate disabled_regsets.
12329
12330 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12331
12332 * Makefile.in (LIBOBJS): New.
12333 (OBS): Use LIBOBJS.
12334 (memmem.o): New rule.
12335 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12336 * configure: Regenerated.
12337
12338 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12339
12340 * server.c (handle_query): Never return "unsupported" for
12341 qXfer:features:read queries.
12342
12343 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12344
12345 * server.c (get_features_xml): Fix inverted condition.
12346 (handle_query): Always support qXfer:feature:read.
12347
12348 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12349
12350 * server.c (wrapper_argv): New.
12351 (start_inferior): Handle wrapper_argv. If set, expect an extra
12352 trap.
12353 (gdbserver_usage): Document --wrapper.
12354 (main): Parse --wrapper.
12355
12356 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12357
12358 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12359 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12360 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12361 (ppc_set_pc): Likewise.
12362 (ppc_arch_setup): New function.
12363 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12364 of collect_register.
12365 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12366
12367 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12368
12369 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12370 instead of linux-ppc64-low.o.
12371 * linux-ppc64-low.c: Remove file.
12372 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12373 (linux-ppc64-low.o): Remove rule.
12374
12375 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12376 (init_registers_powerpc_64): Likewise.
12377 (ppc_regmap): Conditionally define depending on __powerpc64__.
12378 (ppc_cannot_store_register): Do not special-case "fpscr" when
12379 compiled on __powerpc64__.
12380 (ppc_collect_ptrace_register): New function.
12381 (ppc_supply_ptrace_register): New function.
12382 (ppc_breakpoint): Change type to "unsigned int".
12383 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12384 (the_low_target): Conditionally provide initializers for the
12385 arch_setup member depending on __powerpc64__. Install
12386 collect_ptrace_register and supply_ptrace_register members.
12387
12388 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12389
12390 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12391 * server.c (gdbserver_xmltarget): Define.
12392 (get_features_xml): Use it to replace "target.xml" and arch_string.
12393
12394 * configure.srv: Remove srv_xmltarget. Add XML files that were
12395 mentioned there to srv_xmlfiles instead. Remove conditional tests
12396 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12397 srv_xmlfiles and srv_regobj to include all possible choices.
12398 * configure.ac (srv_xmltarget): Remove.
12399 (srv_xmlfiles): Do not add "target.xml".
12400 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12401 checks for supplementary target information.
12402 * configure: Regenerate.
12403 * Makefile.in (XML_TARGET): Remove.
12404 (target.xml): Remove rule.
12405 (clean): Do not clean up target.xml.
12406 (.PRECIOUS): Do not mention target.xml.
12407
12408 * target.h (struct target_ops): Remove arch_string member.
12409 * linux-low.c (linux_arch_string): Remove.
12410 (linux_target_ops): Remove arch_string initializer.
12411 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12412 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12413 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12414 * spu-low.c (spu_arch_string): Remove.
12415 (spu_target_ops): Remove arch_string initializer.
12416 * win32-low.c (win32_arch_string): Remove.
12417 (win32_target_ops): Remove arch_string initializer.
12418 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12419 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12420 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12421
12422 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12423
12424 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12425 by collect_ptrace_register and supply_ptrace_register hooks.
12426 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12427 instead of checking for the_low_target.left_pad_xfer.
12428 (usr_store_inferior_registers): Use collect_ptrace_register callback
12429 instead of checking for the_low_target.left_pad_xfer.
12430
12431 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12432 (s390_supply_ptrace_register): Likewise.
12433 (s390_fill_gregset): Call s390_collect_ptrace_register.
12434 (the_low_target): Update.
12435
12436 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12437 (ppc_supply_ptrace_register): Likewise.
12438 (the_low_target): Update.
12439
12440 * linux-i386-low.c (the_low_target): Update.
12441 * linux-x86-64-low.c (the_low_target): Update.
12442
12443 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12444
12445 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12446 reg-s390.o and reg-s390x.o.
12447
12448 * linux-low.c (new_inferior): New global variable.
12449 (linux_create_inferior, linux_attach): Set it.
12450 (linux_wait_for_process): Call the_low_target.arch_setup after the
12451 target has stopped for the first time.
12452 (initialize_low): Do not call the_low_target.arch_setup.
12453
12454 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12455 (s390_set_pc): Likewise.
12456 (s390_arch_setup): New function.
12457 (the_low_target): Use s390_arch_setup as arch_setup routine.
12458
12459 * regcache.c (realloc_register_cache): New function.
12460 (set_register_cache): Call it for each existing regcache.
12461
12462 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12463
12464 * server.h (init_registers): Remove prototype.
12465
12466 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12467 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12468 instead of init_registers ().
12469 * linux-arm-low.c (init_registers_arm): Add prototype.
12470 (init_registers_arm_with_iwmmxt): Likewise.
12471 (the_low_target): Add initializer for arch_setup field.
12472 * linux-cris-low.c (init_registers_cris): Add prototype.
12473 (the_low_target): Add initializer for arch_setup field.
12474 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12475 (the_low_target): Add initializer for arch_setup field.
12476 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12477 (the_low_target): Add initializer for arch_setup field.
12478 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12479 (the_low_target): Add initializer for arch_setup field.
12480 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12481 (the_low_target): Add initializer for arch_setup field.
12482 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12483 (the_low_target): Add initializer for arch_setup field.
12484 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12485 (init_registers_mips64_linux): Likewise.
12486 (the_low_target): Add initializer for arch_setup field.
12487 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12488 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12489 (the_low_target): Add initializer for arch_setup field.
12490 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12491 (init_registers_powerpc_64): Likewise.
12492 (the_low_target): Add initializer for arch_setup field.
12493 * linux-s390-low.c (init_registers_s390): Add prototype.
12494 (init_registers_s390x): Likewise.
12495 (the_low_target): Add initializer for arch_setup field.
12496 * linux-sh-low.c (init_registers_sh): Add prototype.
12497 (the_low_target): Add initializer for arch_setup field.
12498 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12499 (the_low_target): Add initializer for arch_setup field.
12500 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12501 (the_low_target): Add initializer for arch_setup field.
12502
12503 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12504 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12505 instead of init_registers ().
12506 * win32-arm-low.c (init_registers_arm): Add prototype.
12507 (the_low_target): Add initializer for arch_setup field.
12508 * win32-i386-low.c (init_registers_i386): Add prototype.
12509 (the_low_target): Add initializer for arch_setup field.
12510
12511 * spu-low.c (init_registers_spu): Add prototype.
12512 (initialize_low): Call initialie_registers_spu () instead of
12513 initialize_registers ().
12514
12515 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12516
12517 * server.c (handle_v_requests): When handling the vRun and vAttach
12518 packets, if already debugging a process, don't kill it. Return an
12519 error instead.
12520
12521 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12522
12523 * server.c (handle_query): Correct length check.
12524
12525 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12526
12527 * win32-low.c (do_initial_child_stuff): Add process handle
12528 parameter. Set current_process_handle and current_process_id from the
12529 parameters. Clear globals.
12530 (win32_create_inferior): Don't set current_process_handle and
12531 current_process_id here. Instead pass them on the call to
12532 do_initial_child_stuff.
12533 (win32_attach): Likewise.
12534 (win32_clear_inferiors): New.
12535 (win32_kill): Don't close the current process handle or the
12536 current thread handle here. Instead call win32_clear_inferiors.
12537 (win32_detach): Don't open a new handle to the process. Call
12538 win32_clear_inferiors.
12539 (win32_join): Don't rely on current_process_handle; open a new
12540 handle using the process id.
12541 (win32_wait): Call win32_clear_inferiors when the inferior process
12542 has exited.
12543
12544 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12545
12546 * server.c (monitor_show_help): Add "exit".
12547
12548 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12549
12550 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12551 (clean): Add reg-xtensa.c.
12552 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12553 * configure.srv (xtensa*-*-linux*) New target.
12554 * linux-xtensa-low.c: New.
12555 * xtensa-xtregs.c: New.
12556
12557 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12558
12559 * hostio.c: Don't include errno.h.
12560 (errno_to_fileio_errno): Move to hostio-errno.
12561 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12562 error number outputting to the target->hostio_last_error callback.
12563 (hostio_packet_error): Use FILEIO_EINVAL directly.
12564 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12565 calls to hostio_error.
12566 * hostio-errno.c: New.
12567 * server.h (hostio_last_error_from_errno): Declare.
12568 * target.h (target_ops): Add hostio_last_error member.
12569 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12570 as hostio_last_error handler.
12571 * spu-low.c (spu_target_ops): Likewise.
12572 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12573 (wince_hostio_last_error): New functions.
12574 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12575 as hostio_last_error handler.
12576 (win32_target_ops) [!_WIN32_WCE]: Register
12577 hostio_last_error_from_errno as hostio_last_error handler.
12578 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12579 (hostio-errno.o): New rule.
12580 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12581 * configure.srv (srv_hostio_err_objs): New variable. Default to
12582 hostio-errno.o.
12583 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12584 * configure: Regenerate.
12585
12586 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12587
12588 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12589 (linux_kill, linux_detach): Clean up the process list.
12590 * remote-utils.c (remote_open): Improve port number parsing.
12591 (putpkt_binary, input_interrupt): Only send interrupts if the target
12592 is running.
12593 * server.c (extended_protocol): Make static.
12594 (attached): Define earlier.
12595 (exit_requested, response_needed, program_argv): New variables.
12596 (target_running): New.
12597 (start_inferior): Clear attached here.
12598 (attach_inferior): Set attached here.
12599 (require_running): Define.
12600 (handle_query): Use require_running and target_running. Implement
12601 "monitor exit".
12602 (handle_v_attach, handle_v_run): New.
12603 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12604 (gdbserver_usage): Update.
12605 (main): Redo argument parsing. Handle --debug and --multi. Handle
12606 --attach along with other options or after the port. Save
12607 program_argv. Support no initial program. Resynchronize
12608 communication with GDB after an error. Handle "monitor exit".
12609 Use require_running and target_running. Always allow the extended
12610 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12611 restart in extended mode.
12612 * README: Refer to the GDB manual. Update --attach usage.
12613
12614 2007-12-20 Andreas Schwab <schwab@suse.de>
12615
12616 * linux-low.c (STACK_SIZE): Define.
12617 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12618 (linux_test_for_tracefork): Likewise.
12619
12620 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12621
12622 * linux-low.c (linux_wait_for_event): Update messages. Do not
12623 reinsert auto-delete breakpoints.
12624 * mem-break.c (struct breakpoint): Change return type of handler to
12625 int.
12626 (set_breakpoint_at): Update handler type.
12627 (reinsert_breakpoint_handler): Return 1 instead of calling
12628 delete_breakpoint.
12629 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12630 setting a new one.
12631 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12632 * mem-break.h (set_breakpoint_at): Update handler type.
12633 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12634 * win32-low.c (auto_delete_breakpoint): New.
12635 (get_child_debug_event): Use it.
12636
12637 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12638
12639 * configure.ac: Check for pread and pwrite.
12640 * hostio.c (handle_pread): Fall back to lseek and read.
12641 (handle_pwrite): Fall back to lseek and write.
12642 * config.in, configure: Regenerated.
12643
12644 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12645
12646 * server.c (myresume): Add own_buf argument.
12647 (main): Update calls.
12648
12649 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12650
12651 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12652 * remote-utils.c (remote_open): Do not call disable_async_io.
12653 (block_async_io): Delete.
12654 (unblock_async_io): Make static.
12655 (initialize_async_io): New.
12656 * server.c (handle_v_cont): Handle async I/O here.
12657 (myresume): Likewise. Move other common resume tasks here...
12658 (main): ... from here. Call initialize_async_io. Disable async
12659 I/O before the main loop.
12660 * server.h (initialize_async_io): Declare.
12661 (block_async_io, unblock_async_io): Delete prototypes.
12662 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12663
12664 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12665
12666 * remote-utils.c (readchar): Allow binary data in received messages.
12667
12668 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12669
12670 * win32-low.c (attaching): New global.
12671 (win32_create_inferior): Clear the `attaching' global.
12672 (win32_attach): Set the `attaching' global.
12673 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12674 attaching. Only set a breakpoint at the entry point if not
12675 attaching.
12676
12677 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12678
12679 * server.c (main): Don't report dll events on the initial
12680 connection on attaches.
12681
12682 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12683
12684 * server.c (main): Relax numerical bases supported for the pid of
12685 the --attach command line argument.
12686
12687 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12688
12689 * win32-low.c (win32_attach): Call OpenProcess before
12690 DebugActiveProcess, not after. Add last error output to error
12691 call.
12692
12693 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12694
12695 * win32-low.c (win32_get_thread_context)
12696 (win32_set_thread_context): New functions.
12697 (thread_rec): Use win32_get_thread_context.
12698 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12699 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12700 field.
12701
12702 2007-12-03 Leo Zayas
12703 Pedro Alves <pedro_alves@portugalmail.pt>
12704
12705 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12706 global variables.
12707 (child_add_thread): Minor cleanup.
12708 (child_continue): Resume artificially suspended threads before
12709 calling ContinueDebugEvent.
12710 (suspend_one_thread): New.
12711 (fake_breakpoint_event): New.
12712 (get_child_debug_event): Change return type to int. Check here if
12713 gdb sent an interrupt request. If a soft interrupt was requested,
12714 fake a breakpoint event. Return 0 if there is no event to handle,
12715 and 1 otherwise.
12716 (win32_wait): Don't check here if gdb sent an interrupt request.
12717 Ensure there is a valid event to handle.
12718 (win32_request_interrupt): Add soft interruption method as last
12719 resort.
12720
12721 2007-12-03 Leo Zayas
12722 Pedro Alves <pedro_alves@portugalmail.pt>
12723
12724 * win32-low.h (win32_thread_info): Add descriptions to the
12725 structure members. Replace `suspend_count' counter by a
12726 `suspended' flag.
12727 * win32-low.c (thread_rec): Update condition of when to get the
12728 context from the inferior. Rely on ContextFlags being set if it
12729 has already been retrieved. Only suspend the inferior thread if
12730 we haven't already. Warn if that fails.
12731 (continue_one_thread): s/suspend_count/suspended/. Only call
12732 ResumeThread once. Warn if that fails.
12733
12734 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12735
12736 * win32-low.c (win32_wait): Don't read from the inferior when it
12737 has already exited.
12738
12739 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12740
12741 * Makefile.in (win32_low_h): New variable.
12742 (win32-low.o): Add dependency on $(win32_low_h).
12743 (win32-arm-low.o, win32-i386-low.o): New rules.
12744
12745 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12746
12747 * hostio.c: Correct copyright year.
12748
12749 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12750
12751 * Makefile.in (OBS): Add hostio.o.
12752 (hostio.o): New rule.
12753 * server.h (handle_vFile): Declare.
12754 * hostio.c: New file.
12755 * server.c (handle_v_requests): Take packet_len and new_packet_len
12756 for binary packets. Call handle_vFile.
12757 (main): Update call to handle_v_requests.
12758
12759 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12760
12761 * linux-low.c: Include <sched.h>.
12762
12763 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12764
12765 * linux-low.c (linux_tracefork_grandchild): New.
12766 (linux_tracefork_child): Use clone.
12767 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12768
12769 2007-10-31 Joel Brobecker <brobecker@adacore.com>
12770
12771 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12772
12773 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12774
12775 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12776
12777 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12778
12779 * inferiors.c (change_inferior_id): Delete.
12780 (add_pid_to_list, pull_pid_from_list): New.
12781 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12782 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12783 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12784 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12785 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12786 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12787 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12788 (using_threads): Always set to 1.
12789 (handle_extended_wait): New.
12790 (add_process): Do not set TID.
12791 (linux_create_inferior): Set must_set_ptrace_flags.
12792 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12793 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12794 (linux_thread_alive): Rename TID argument to LWPID.
12795 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12796 (linux_wait_for_event): Do not use TID or check using_threads. Update
12797 call to dead_thread_notify. Call handle_extended_wait.
12798 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12799 (send_sigstop): Delete sigstop_sent.
12800 (wait_for_sigstop): Avoid TID.
12801 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12802 (linux_test_for_tracefork): New.
12803 (linux_lookup_signals): Use thread_db_active and
12804 linux_supports_tracefork_flag.
12805 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12806 * linux-low.h (get_process_thread): Avoid TID.
12807 (struct process_ifo): Move thread_known and tid to the end. Remove
12808 sigstop_sent.
12809 (linux_attach_lwp, thread_db_init): Update prototypes.
12810 * server.h (change_inferior_id): Delete prototype.
12811 (add_pid_to_list, pull_pid_from_list): New prototypes.
12812 * thread-db.c (thread_db_use_events): New.
12813 (find_first_thread): Rename to...
12814 (find_one_thread): ...this. Update callers and messages. Do not
12815 call fatal. Check thread_db_use_events. Do not call
12816 change_inferior_id or new_thread_notify.
12817 (maybe_attach_thread): Update. Do not call new_thread_notify.
12818 (thread_db_init): Set thread_db_use_events. Check use_events.
12819 * utils.c (fatal, warning): Correct message prefix.
12820
12821 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12822
12823 * Makefile.in (clean): Remove new files.
12824 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12825 (powerpc-64.o, powerpc-64.c): New rules.
12826 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12827 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12828 with SPE.
12829 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12830 SPE targets.
12831 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12832 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12833 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12834 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12835 (target_regsets): Add AltiVec and SPE register sets.
12836 * configure.ac: Check for AltiVec and SPE.
12837 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12838 (ppc_fill_vrregset, ppc_store_vrregset): New.
12839 (target_regsets): Add AltiVec register set.
12840 * configure: Regenerated.
12841
12842 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12843
12844 * linux-low.c (O_LARGEFILE): Define.
12845 (linux_read_memory): Use /proc/PID/mem.
12846 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12847 * configure, config.in: Regenerated.
12848
12849 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12850
12851 * linux-low.c (linux_wait_for_event): Do not pass signals while
12852 single-stepping.
12853
12854 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12855
12856 * win32-low.c (create_process): New.
12857 (win32_create_inferior): Use create_process instead of
12858 CreateProcess. If create_process failed retry appending an ".exe"
12859 suffix. Store the GetLastError result immediatelly after
12860 create_process calls and use it on the call to error.
12861
12862 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12863
12864 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12865
12866 2007-08-23 Joel Brobecker <brobecker@adacore.com>
12867
12868 * configure.ac: Switch license to GPLv3.
12869
12870 2007-08-01 Michael Snyder <msnyder@access-company.com>
12871
12872 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12873
12874 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12875
12876 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12877 typedef.
12878 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12879 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12880 CloseToolhelp32Snapshot.
12881 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12882 CloseToolhelp32Snapshot.
12883
12884 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
12885
12886 * server.c (main): Check for inferior exit before main loop.
12887
12888 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12889
12890 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12891 instead of on tmp_desc.
12892
12893 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12894 Daniel Jacobowitz <dan@codesourcery.com>
12895
12896 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12897 (add_thread): Minor cleanups.
12898 (clear_inferiors): Move lower in the file. Clear the DLL
12899 list.
12900 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12901 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12902 (xml_escape_text): New.
12903 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12904 for qSupported.
12905 (handle_v_cont): Report errors.
12906 (gdbserver_version): Update.
12907 (main): Correct size of own_buf. Do not report initial DLL events.
12908 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12909 (unloaded_dll, xml_escape_text): New.
12910 * win32-low.c (enum target_waitkind): Update comments.
12911 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12912 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12913 (win32_EnumProcessModules, win32_GetModuleInformation)
12914 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12915 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12916 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12917 (win32_Module32First, win32_Module32Next, load_toolhelp)
12918 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12919 (get_child_debug_event): Handle DLL events.
12920 (win32_wait): Likewise.
12921
12922 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12923
12924 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12925 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12926
12927 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12928
12929 * win32-low.c (handle_output_debug_string): Ignore event if not
12930 waiting.
12931
12932 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12933
12934 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12935
12936 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12937
12938 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12939
12940 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12941
12942 * inferiors.c (change_inferior_id): Add comment.
12943 * linux-low.c (check_removed_breakpoint): Add an early
12944 prototype. Improve debug output.
12945 (linux_attach): Doc update.
12946 (linux_detach_one_process, linux_detach): Clean up before releasing
12947 each process.
12948 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12949 * linux-low.h (struct process_info): Doc improvement.
12950 * mem-break.c (delete_all_breakpoints): New.
12951 * mem-break.h (delete_all_breakpoints): New prototype.
12952 * thread-db.c (find_first_thread): New.
12953 (thread_db_create_event): Call it instead of
12954 thread_db_find_new_threads. Clean up unused variables.
12955 (maybe_attach_thread): Remove first thread handling.
12956 (thread_db_find_new_threads): Use find_first_thread.
12957 (thread_db_get_tls_address): Likewise.
12958
12959 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12960
12961 * thread-db.c (thread_db_find_new_threads): Add prototype.
12962 (thread_db_create_event): Check for the main thread before adding
12963 a new thread.
12964 (maybe_attach_thread): Only enable event reporting if TID == 0.
12965 (thread_db_get_tls_address): Check for new threads.
12966
12967 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12968
12969 * linux-low.c (linux_create_inferior): Try execv before execvp.
12970 * spu-low.c (spu_create_inferior): Likewise.
12971
12972 2007-06-13 Mike Frysinger <vapier@gentoo.org>
12973
12974 * linux-low.c (linux_create_inferior): Change execv to execvp.
12975 * spu-low.c (spu_create_inferior): Likewies.
12976
12977 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12978
12979 * Makefile.in (clean): Clean new files instead of deleted ones.
12980 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12981 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12982 rules.
12983 * configure.srv: Specify XML files and new regformats for MIPS and
12984 MIPS64 GNU/Linux.
12985 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12986 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12987 an entry for the restart register.
12988 (mips_cannot_fetch_register, mips_cannot_store_register)
12989 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12990 register names to match the XML descriptions.
12991 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12992 restart register instead of $0.
12993
12994 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12995 Markus Deuling <deuling@de.ibm.com>
12996
12997 * remote-utils.c (decode_xfer_write): New function.
12998 * server.h (decode_xfer_write): Add prototype.
12999 * server.c (handle_query): Add PACKET_LEN argument. Support
13000 qXfer:spu:read and qXfer:spu:write packets.
13001 (main): Pass packet_len to handle_query.
13002 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13003 * target.h (target_ops): Add qxfer_spu.
13004
13005 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13006
13007 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13008 accessing non-seekable spufs files.
13009
13010 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13011
13012 * server.c (handle_query): Add reply for qC packet.
13013
13014 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13015 Leo Zayas <lerele@champenstudios@com>
13016
13017 * server.h (check_remote_input_interrupt_request): New function.
13018 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13019 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13020 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13021 (check_remote_input_interrupt_request): New function.
13022 * server.h (check_remote_input_interrupt_request): Declare.
13023 * win32-low.c (winapi_DebugBreakProcess,
13024 winapi_GenerateConsoleCtrlEvent): New typedefs.
13025 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13026 to 250 ms.
13027 (win32_wait): Check for remote interrupt request
13028 with check_remote_input_interrupt_request.
13029 (win32_request_interrupt): New function.
13030 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13031
13032 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13033
13034 * win32-low.c (debug_registers_changed,
13035 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13036 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13037 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13038 (thread_rec): Get context using the low target.
13039 (child_add_thread): Call thread_added on the low target,
13040 which does the same thing.
13041 (regptr): Delete.
13042 (do_initial_child_stuff): Remove debug registers references.
13043 Set context using the low target. Resume threads after
13044 setting the contexts.
13045 (child_continue): Remove dead variable. Remove debug
13046 registers references.
13047 (child_fetch_inferior_registers): Go through the low target.
13048 (do_child_store_inferior_registers): Remove.
13049 (child_store_inferior_registers): Go through the low target.
13050 (win32_resume): Remove debug registers references.
13051 Set context using the low target.
13052 (handle_exception): Change return type to void. Don't record
13053 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13054 first chance exception.
13055 (get_child_debug_event): Change return type to void. Remove
13056 goto loop. Always return after waiting for debug event.
13057 (win32_wait): Convert to switch statement. Handle spurious
13058 events.
13059
13060 * win32-i386-low.c (debug_registers_changed,
13061 debug_registers_used): New.
13062 (initial_stuff): Rename to ...
13063 (i386_initial_stuff): ... this. Clear debug registers
13064 state variables.
13065 (store_debug_registers): Delete.
13066 (i386_get_thread_context): New.
13067 (load_debug_registers): Delete.
13068 (i386_set_thread_context): New.
13069 (i386_thread_added): New.
13070 (single_step): Rename to ...
13071 (i386_single_step): ... this.
13072 (do_fetch_inferior_registers): Rename to ...
13073 (i386_fetch_inferior_register): ... this.
13074 (i386_store_inferior_register): New.
13075 (the_low_target): Adapt to new interface.
13076
13077 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13078 (arm_get_thread_context): New.
13079 (arm_set_thread_context): New.
13080 (regptr): New.
13081 (do_fetch_inferior_registers): Rename to ...
13082 (arm_fetch_inferior_register): ... this.
13083 (arm_store_inferior_register): New.
13084 (arm_wince_breakpoint): Reimplement as unsigned long.
13085 (arm_wince_breakpoint_len): Define.
13086 (the_low_target): Adapt to new interface.
13087
13088 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13089 load_debug_registers. Add get_thread_context, set_thread_context,
13090 thread_added and store_inferior_register. Rename
13091 fetch_inferior_registers to fetch_inferior_register.
13092 (regptr): Remove declaration.
13093
13094 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13095
13096 * linux-low.c (linux_detach): Change return type to int. Return 0.
13097 * spu-low.c (spu_detach): Likewise.
13098
13099 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13100
13101 * target.h (target_ops): Change return type of detach to int.
13102 Add join.
13103 (join_inferior): New.
13104 * server.c (main): Don't skip detach support on mingw32.
13105 If the inferior doesn't support detaching return error.
13106 Call join_inferior instead of using waitpid.
13107 * linux-low.c (linux_join): New.
13108 (linux_target_op): Add linux_join.
13109 * spu-low.c (spu_join): New.
13110 (spu_target_ops): Add spu_join.
13111 * win32-low.c (win32_detach): Adapt to new interface.
13112 Reopen current_process_handle before detaching. Issue a child
13113 resume before detaching.
13114 (win32_join): New.
13115 (win32_target_op): Add win32_join.
13116
13117 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13118
13119 * win32-low.c (win32-attach): Fix return value.
13120 * target.h (target_ops): Describe ATTACH return values.
13121
13122 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13123
13124 * win32-low.c (GETPROCADDRESS): Define.
13125 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13126 (winapi_DebugSetProcessKillOnExit): Likewise.
13127 (win32_create_inferior): Force usage of ansi CreateProcessA.
13128 (win32_attach): Use GETPROCADDRESS.
13129 (win32_detach): Likewise.
13130
13131 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13132
13133 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13134
13135 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13136
13137 * win32-low.c: Commit leftover changes from 2007-03-29.
13138
13139 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13140
13141 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13142 fields short instead of int. Add explicit padding.
13143 (i387_cache_to_fsave): Remove unnecessary casts.
13144 (i387_fsave_to_cache): Doc fix.
13145 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13146
13147 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13148
13149 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13150 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13151
13152 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13153
13154 * configure.srv (arm*-*-mingw32ce*): Move near the other
13155 arm targets.
13156
13157 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13158
13159 * configure.ac: Add errno checking.
13160 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13161 sys/file.h and malloc.h.
13162 (AC_CHECK_DECLS): Add perror.
13163 (srv_mingwce): Handle.
13164 * configure.srv (i[34567]86-*-cygwin*): Add
13165 win32-i386-low.o to srv_tgtobj.
13166 (i[34567]86-*-mingw*): Likewise.
13167 (arm*-*-mingw32ce*): Add case.
13168 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13169 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13170 [__MINGW32CE__] (strerror): New function.
13171 [__MINGW32CE__] (errno): Define to GetLastError.
13172 [__MINGW32CE__] (COUNTOF): New macro.
13173 (remote_open): Remove extra close call.
13174 * mem-break.c (delete_breakpoint_at): New function.
13175 * mem-break.h (delete_breakpoint_at): Declare.
13176 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13177 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13178 [USE_WIN32API] (read, write): Add char* casts.
13179 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13180 * server.h: Include wincecompat.h on Windows CE.
13181 [HAVE_ERRNO_H]: Check.
13182 (perror): Declare if not declared.
13183 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13184 (perror_with_name): Remove errno declaration.
13185 * wincecompat.h: New.
13186 * wincecompat.c: New.
13187 * win32-low.h: New.
13188 * win32-arm-low.c: New.
13189 * win32-i386-low.c: New.
13190 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13191 (OUTMSG2): Make it safe.
13192 (_T): New macro.
13193 (COUNTOF): New macro.
13194 (NUM_REGS): Get it from the low target.
13195 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13196 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13197 (thread_rec): Let low target handle debug registers.
13198 (child_add_thread): Likewise.
13199 (child_init_thread_list): Likewise.
13200 (continue_one_thread): Likewise.
13201 (regptr): New.
13202 (do_child_fetch_inferior_registers): Move to ...
13203 * win32-i386-low.c: ... here, and rename to ...
13204 (do_fetch_inferior_registers): ... this.
13205 * win32-low.c (child_fetch_inferior_registers):
13206 Go through the low target.
13207 (do_child_store_inferior_registers): Use regptr.
13208 (strwinerror): New function.
13209 (win32_create_inferior): Handle Windows CE.
13210 Use strwinerror instead of strerror on Windows error
13211 codes. Add program to the error output.
13212 Don't close the main thread handle on Windows CE.
13213 (win32_attach): Use coredll.dll on Windows CE.
13214 (win32_kill): Close current process and current
13215 thread handles.
13216 (win32_detach): Use coredll.dll on Windows CE.
13217 (win32_resume): Let low target handle debug registers, and
13218 step request.
13219 (handle_exception): Add/Remove initial breakpoint. Avoid
13220 non-existant WSTOPSIG on Windows CE.
13221 (win32_read_inferior_memory): Cast to remove warning.
13222 (win32_arch_string): Go through the low target.
13223 (initialize_low): Call set_breakpoint_data with the low
13224 target's breakpoint.
13225 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13226 FOP_REGNUM, mappings): Move to ...
13227 * win32-i386-low.c: ... here.
13228 * win32-low.c (win32_thread_info): Move to ...
13229 * win32-low.h: ... here.
13230 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13231 win32-arm-low.c and wincecompat.c.
13232 (all:): Add $EXEEXT.
13233 (install-only:): Likewise.
13234 (gdbserver:): Likewise.
13235 (gdbreplay:): Likewise.
13236 * config.in: Regenerate.
13237 * configure: Regenerate.
13238
13239 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13240
13241 * win32-low.c: Rename typedef thread_info to
13242 win32_thread_info throughout.
13243
13244 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13245
13246 * win32-i386-low.c: Rename to ...
13247 * win32-low.c: ... this.
13248 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13249 * Makefile.in: Likewise.
13250
13251 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13252
13253 * remote-utils.c (monitor_output): Constify msg parameter.
13254 * server.h (monitor_output): Likewise.
13255 * win32-i386-low.c (handle_output_debug_string): New.
13256 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13257 handle_output_debug_string.
13258 (get_child_debug_event): Likewise.
13259
13260 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13261
13262 * server.c (main): Correct strtoul check.
13263
13264 2007-03-27 Jon Ringle <jon@ringle.org>
13265
13266 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13267
13268 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13269
13270 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13271
13272 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13273
13274 * terminal.h: Check HAVE_SGTTY_H.
13275
13276 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13277
13278 * remote-utils.c (remote_open): Print out the assigned port number.
13279
13280 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13281
13282 * remote-utils.c (monitor_output): New function.
13283 * server.c (debug_threads): Define here.
13284 (monitor_show_help): New function.
13285 (handle_query): Handle qRcmd.
13286 (main): Do not handle 'd' packet.
13287 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13288 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13289 of debug_threads.
13290
13291 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13292
13293 * Makefile.in (EXEEXT): New.
13294 (clean): Use $(EXEEXT).
13295
13296 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13297
13298 * target.h (target_ops): Rename send_signal to request_interrupt,
13299 and remove enum target_signal parameter.
13300 * linux-low.c (linux_request_interrupt): Rename from
13301 linux_send_signal, and always send SIGINT.
13302 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13303 and always send SIGINT.
13304 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13305 of send_signal.
13306 (input_interrupt): Likewise.
13307
13308 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13309
13310 * server.c (get_features_xml): Check if target implemented
13311 arch_string.
13312 * win32-i386-low.c (win32_arch_string): New.
13313 (win32_target_ops): Add win32_arch_string as arch_string member.
13314
13315 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13316
13317 * spu-low.c (spu_arch_string): New.
13318 (spu_target_ops): Add spu_arch_string.
13319
13320 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13321
13322 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13323 * configure.ac: Do not check for terminal.h.
13324 * configure, config.in: Regenerated.
13325
13326 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13327
13328 * Makefile.in (OBS): Add $(XML_BUILTIN).
13329 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13330 (clean): Update.
13331 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13332 (arm-with-iwmmxt.c): New.
13333 * config.in, configure: Regenerate.
13334 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13335 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13336 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13337 (arm*-*-linux*): Add iWMMXt and regset support.
13338 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13339 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13340 (arm_store_wmmxregset, target_regsets): New.
13341 * server.c (get_features_xml): Take annex argument. Check builtin
13342 XML documents.
13343 (handle_query): Handle multiple annexes.
13344
13345 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13346
13347 * remote-utils.c [USE_WIN32API] (read, write): Define.
13348 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13349 write.
13350
13351 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13352
13353 * linux-i386-low.c (the_low_target): Set arch_string.
13354 * linux-x86-64-low.c (the_low_target): Likewise.
13355 * linux-low.c (linux_arch_string): New.
13356 (linux_target_ops): Add it.
13357 * linux-low.h (struct linux_target_ops): Add arch_string.
13358 * server.c (write_qxfer_response): Use const void * for DATA.
13359 (get_features_xml): New.
13360 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13361 * target.h (struct target_ops): Add arch_string method.
13362
13363 2007-01-03 Denis Pilat <denis.pilat@st.com>
13364 Daniel Jacobowitz <dan@codesourcery.com>
13365
13366 * linux-low.c (linux_kill): Handle being called with no threads.
13367 * win32-i386-low.c (win32_kill): Likewise.
13368 (get_child_debug_event): Clear current_process_handle.
13369
13370 2006-12-30 Denis PILAT <denis.pilat@st.com>
13371 Daniel Jacobowitz <dan@codesourcery.com>
13372
13373 * remote-utils.c (remote_open): Check the type of specified
13374 serial port devices before opening them.
13375 * server.c (main): Kill the inferior if an error occurs during
13376 the first remote_open.
13377
13378 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13379
13380 * README: Update supported targets.
13381
13382 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13383
13384 * Makefile.in (clean): Remove reg-mips64.c.
13385 (reg-mips64.c, reg-mips64.o): New rules.
13386 * configure.srv: Handle mips64. Include regset support for mips.
13387 * linux-mips-low.c (union mips_register): New.
13388 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13389 (mips_breakpoint, mips_breakpoint_at): Use int.
13390 (mips_collect_register, mips_supply_register)
13391 (mips_collect_register_32bit, mips_supply_register_32bit)
13392 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13393 (mips_store_fpregset, target_regsets): New.
13394 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13395
13396 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13397
13398 * configure.srv: Add target "spu*-*-*".
13399 * Makefile.in (clean): Remove reg-spu.c.
13400 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13401 * spu-low.c: New file.
13402
13403 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13404
13405 * configure.ac: Correct td_thr_tls_get_addr test.
13406 * configure: Regenerated.
13407
13408 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13409
13410 * linux-low.c (linux_wait_for_event): Reformat. Use the
13411 pass_signals array.
13412 * remote-utils.c (decode_address_to_semicolon): New.
13413 * server.c (pass_signals, handle_general_set): New.
13414 (handle_query): Mention QPassSignals for qSupported.
13415 (main): Call handle_general_set.
13416 * server.h (pass_signals, decode_address_to_semicolon): New.
13417
13418 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13419
13420 * server.c (handle_query): Correct error handling for read_auxv.
13421
13422 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13423
13424 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13425 and srv_linux_thread_db to yes.
13426 * linux-s390-low.c (s390_fill_gregset): New function.
13427 (target_regsets): Define data structure.
13428
13429 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13430
13431 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13432 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13433 * config.in, configure: Regenerated.
13434 * inferiors.c (gdb_id_to_thread): New function.
13435 (gdb_id_to_thread_id): Use it.
13436 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13437 * linux-low.h (struct process_info): Add th member.
13438 (thread_db_get_tls_address): New prototype.
13439 * remote-utils.c (decode_address): Make non-static.
13440 * server.c (handle_query): Handle qGetTLSAddr.
13441 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13442 * target.h (struct target_ops): Add get_tls_address.
13443 * thread-db.c (maybe_attach_thread): Save the thread handle.
13444 (thread_db_get_tls_address): New.
13445
13446 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13447
13448 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13449 (linux_resume_one_process): Take a siginfo_t *. Update all
13450 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13451 (struct pending_signals): Add a siginfo_t.
13452 (linux_wait_for_process): Always set last_status.
13453 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13454 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13455 * linux-low.h (struct process_info): Add last_status.
13456
13457 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13458
13459 * remote-utils.c (try_rle): New function.
13460 (putpkt_binary): Use it.
13461
13462 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13463
13464 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13465 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13466 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13467 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13468 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13469 point registers.
13470
13471 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13472
13473 * server.c (terminal_fd): New variable.
13474 (old_foreground_pgrp): Likewise.
13475 (restore_old_foreground_pgrp): New function.
13476 (start_inferior): Record the terminal file descriptor in terminal_fd
13477 and its original foreground group in old_foreground_pgrp. Register
13478 restore_old_foreground_pgrp with atexit().
13479
13480 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13481
13482 * server.c (handle_query): Correct qPart to qXfer.
13483
13484 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13485
13486 * configure.ac: Check for more headers which are missing on
13487 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13488 * configure.srv: Add Cygwin and mingw32.
13489 * remote-utils.c: Don't include headers unconditionally which
13490 are missing on mingw32. Include <winsock.h> for mingw32.
13491 (remote_open): Adjust for mingw32 support. Flush
13492 standard error after writing to it.
13493 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13494 (unblock_async_io, enable_async_io, disable_async_io)
13495 (readchar, getpkt): Update for Winsock support.
13496 (prepare_resume_reply): Expect a protocol signal number.
13497 * server.c: Disable <sys/wait.h> on mingw32.
13498 (start_inferior): Adjust for mingw32 support. Flush
13499 standard error after writing to it.
13500 (attach_inferior): Likewise. Use protocol signal
13501 numbers.
13502 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13503 and names.
13504 * win32-i386-low.c: New file.
13505 * Makefile.in (XM_CLIBS): Set.
13506 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13507 (win32-i386-low.o): New dependency rule.
13508 * linux-low.c (linux_wait): Use target signal numbers.
13509 * target.h (struct target_ops): Doc fix.
13510 * server.h (target_signal_to_name): New prototype.
13511 * gdbreplay.c: Don't include headers unconditionally which
13512 are missing on mingw32. Include <winsock.h> for mingw32.
13513 (remote_close, remote_open): Adjust for Winsock support.
13514 * configure, config.in: Regenerated.
13515
13516 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13517
13518 * server.c (decode_xfer_read, write_qxfer_response): New.
13519 (handle_query): Take a packet length argument. Handle
13520 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13521 the qSupported response.
13522 (main): Update call to handle_query.
13523
13524 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13525
13526 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13527 (putpkt_binary): Renamed from putpkt and adjusted for binary
13528 data.
13529 (putpkt): New wrapper for putpkt_binary.
13530 (readchar): Don't mask off the high bit.
13531 (decode_X_packet): New function.
13532 * server.c (main): Call putpkt_binary if a handler sets the packet
13533 length. Save the length of the incoming packet. Handle 'X'.
13534 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13535
13536 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13537
13538 * server.c (handle_query): Handle qSupported.
13539
13540 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13541
13542 * remote-utils.c (all_symbols_looked_up): New variable.
13543 (look_up_one_symbol): Check it.
13544 * server.h (look_up_one_symbol): New declaration.
13545 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13546
13547 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13548
13549 * Makefile.in (linux-arm-low.o): Update dependencies.
13550 * linux-arm-low.c: Include "gdb_proc_service.h".
13551 (PTRACE_GET_THREAD_AREA): Define.
13552 (ps_get_thread_area): New function.
13553
13554 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13555
13556 * configure.srv (m68k*-*-uclinux*): New target.
13557 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13558 (linux_resume_one_process): Remove extraneous cast.
13559 (linux_read_offsets): New.
13560 (linux_target_op): Add linux_read_offsets on mmuless systems.
13561 * server.c (handle_query): Add qOffsets logic.
13562 * target.h (struct target_ops): Add read_offsets.
13563
13564 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13565
13566 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13567 (PTRACE_GET_THREAD_AREA): Define.
13568 (ps_get_thread_area): New function.
13569 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13570 (linux-x86-64-low.o): Update.
13571
13572 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13573
13574 * configure.ac: Remove checks for prfpregset_t.
13575 * gdb_proc_service.h: New file.
13576 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13577 new "gdb_proc_service.h".
13578 * proc-service.c: Likewise.
13579 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13580 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13581 * Makefile.in (gdb_proc_service_h): Updated.
13582 * configure, config.in: Regenerated.
13583
13584 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13585
13586 * remote-utils.c (prepare_resume_reply): Move declaration
13587 of gdb_id_from_wait to the top of the block.
13588
13589 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13590
13591 * linux-low.c (regsets_store_inferior_registers): Read the regset
13592 from the target before filling it.
13593
13594 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13595
13596 * server.c (attach_inferior): Return SIGTRAP for a successful
13597 attach.
13598
13599 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13600
13601 * Makefile.in (OBS): Add version.o.
13602 (STAGESTUFF): Delete.
13603 (version.o): Add dependencies.
13604 (version.c): Replace rule.
13605 (clean): Remove version.c.
13606 * server.c (gdbserver_version): New.
13607 (gdbserver_usage): Use printf.
13608 (main): Handle --version and --help.
13609 * server.h (version, host_name): Add declarations.
13610
13611 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13612
13613 * linux-arm-low.c:
13614 * linux-arm-low.c:
13615 * inferiors.c:
13616 * i387-fp.h:
13617 * i387-fp.c:
13618 * gdbreplay.c:
13619 * regcache.c:
13620 * proc-service.c:
13621 * mem-break.h:
13622 * mem-break.c:
13623 * linux-x86-64-low.c:
13624 * linux-sh-low.c:
13625 * linux-s390-low.c:
13626 * linux-ppc64-low.c:
13627 * linux-ppc-low.c:
13628 * linux-mips-low.c:
13629 * linux-m68k-low.c:
13630 * linux-m32r-low.c:
13631 * linux-low.h:
13632 * linux-low.c:
13633 * linux-ia64-low.c:
13634 * linux-i386-low.c:
13635 * linux-crisv32-low.c:
13636 * thread-db.c:
13637 * terminal.h:
13638 * target.h:
13639 * target.c:
13640 * server.h:
13641 * server.c:
13642 * remote-utils.c:
13643 * regcache.h:
13644 * utils.c:
13645 * Makefile.in:
13646 * configure.ac:
13647 * gdbserver.1: Add (C) after Copyright. Update the FSF
13648 address.
13649
13650 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13651
13652 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13653 (arm_breakpoint_at): Recognize both breakpoints.
13654 (the_low_target): Use the correct breakpoint instruction.
13655
13656 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13657
13658 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13659 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13660 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13661 (the_low_target): Update.
13662
13663 2005-10-25 Andreas Schwab <schwab@suse.de>
13664
13665 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13666
13667 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13668 (ia64_num_regs): Reduce to 462.
13669
13670 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13671
13672 * acinclude.m4: Correct quoting.
13673 * aclocal.m4: Regenerated.
13674
13675 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13676 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13677 (thread_db_init): Call thread_db_err_str.
13678 * configure.ac: Check for TD_VERSION.
13679 * config.in, configure: Regenerated.
13680
13681 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13682
13683 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13684
13685 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13686
13687 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13688 is not available. Define HAVE_PTRACE_GETREGS if it is.
13689 * config.in, configure: Regenerated.
13690 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13691 * linux-i386-low.c, linux-m68k-low.c: Update to use
13692 HAVE_PTRACE_GETREGS.
13693 * linux-low.c (regsets_fetch_inferior_registers)
13694 (regsets_store_inferior_registers): Only return 0 if we processed
13695 GENERAL_REGS.
13696 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13697 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13698
13699 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13700
13701 * inferiors.c (struct thread_info): Add gdb_id.
13702 (add_thread): Add gdb_id argument.
13703 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13704 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13705 calls to add_thread.
13706 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13707 * server.c (handle_query): Use thread_to_gdb_id.
13708 (handle_v_cont, main): Use gdb_id_to_thread_id.
13709 * server.h (add_thread): Update prototype.
13710 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13711 prototypes.
13712
13713 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13714
13715 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13716 left-padded registers.
13717 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13718 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13719
13720 2005-07-01 Steve Ellcey <sje@cup.hp.com>
13721
13722 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13723 * configure: Regenerate.
13724 * config.in: Regenerate.
13725 * server.h (NEED_DECLARATION_STRERROR):
13726 Replace with !HAVE_DECL_STRERROR.
13727
13728 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13729
13730 * linux-low.c (linux_wait, linux_send_signal): Don't test
13731 an unsigned long variable for > 0 if it could be MAX_ULONG.
13732 * server.c (myresume): Likewise.
13733 * target.c (set_desired_inferior): Likewise.
13734
13735 2005-06-13 Mark Kettenis <kettenis@gnu.org>
13736
13737 * configure.ac: Simplify and improve check for socklen_t.
13738 * configure, config.in: Regenerate.
13739
13740 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13741
13742 * acconfig.h: Remove.
13743 * configure.ac: Add a test for socklen_t. Use three-argument
13744 AC_DEFINE throughout.
13745 * config.in: Regenerated using autoheader 2.59.
13746 * configure: Regenerated.
13747
13748 * gdbreplay.c (socklen_t): Provide a default.
13749 (remote_open): Use socklen_t.
13750 * remote-utils.c (socklen_t): Provide a default.
13751 (remote_open): Use socklen_t.
13752 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13753 unsigned char.
13754
13755 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13756 char for buffers.
13757 * linux-low.c (linux_read_memory, linux_write_memory)
13758 (linux_read_auxv): Likewise.
13759 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13760 (check_mem_write): Likewise.
13761 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13762 Likewise.
13763 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13764 (registers_from_string, register_data): Likewise.
13765 * server.c (handle_query, main): Likewise.
13766 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13767 (decode_M_packet): Likewise.
13768 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13769 * target.h (struct target_ops): Update read_memory, write_memory,
13770 and read_auxv.
13771 (read_inferior_memory, write_inferior_memory): Update.
13772 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13773 to unsigned char *.
13774 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13775 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13776 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13777 linux-s390-low.c, linux-sh-low.c: Update for changes in
13778 read_inferior_memory and the_low_target->breakpoint.
13779
13780 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13781
13782 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13783 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13784 * configure.srv: Add powerpc64-*-linux*.
13785 * linux-ppc64-low.c: New file.
13786
13787 2005-05-23 Orjan Friberg <orjanf@axis.com>
13788
13789 * linux-cris-low.c: New file with support for CRIS.
13790 * linux-crisv32-low.c: Ditto for CRISv32.
13791 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13792 (clean): Add reg-cris.c and reg-crisv32.c.
13793 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13794 reg-crisv32.o, and reg-crisv32.c to make rules.
13795 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13796 recognized targets.
13797
13798 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13799
13800 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13801 of sizeof (PTRACE_XFER_TYPE).
13802 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13803
13804 2005-05-12 Orjan Friberg <orjanf@axis.com>
13805
13806 * target.h (struct target_ops): Add insert_watchpoint,
13807 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13808 pointers for hardware watchpoint support.
13809 * linux-low.h (struct linux_target_ops): Ditto.
13810 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13811 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13812 to linux_target_ops.
13813 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13814 reply packet.
13815 * server.c (main): Recognize 'Z' and 'z' packets.
13816
13817 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13818
13819 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13820 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13821 (the_low_target): Add new members.
13822
13823 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13824
13825 * proc-service.c (ps_lgetregs): Search all_processes instead of
13826 all_threads.
13827
13828 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13829
13830 * server.c (start_inferior): Change return type to int.
13831 (attach_inferior): Change sigptr to int *.
13832 (handle_v_cont, handle_v_requests): Change signal to int *.
13833 (main): Change signal to int.
13834
13835 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
13836
13837 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13838 * configure.srv: Add m32r*-*-linux*.
13839 * linux-m32r-low.c: New file.
13840
13841 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13842
13843 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13844
13845 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13846
13847 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13848 Take unsigned long arguments for PIDs.
13849 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13850 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13851 (wait_for_sigstop, linux_resume_one_process)
13852 (regsets_fetch_inferior_registers, linux_send_signal)
13853 (linux_read_auxv): Likewise. Update the types of variables holding
13854 PIDs. Update format string specifiers.
13855 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13856 * remote-utils.c (prepare_resume_reply): Likewise.
13857 * server.c (cont_thread, general_thread, step_thread)
13858 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13859 unsigned long.
13860 (handle_query): Update format specifiers.
13861 (handle_v_cont, main): Use strtoul for thread IDs.
13862 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13863 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13864 (general_thread, step_thread, thread_from_wait)
13865 (old_thread_from_wait): Update.
13866 * target.h (struct thread_resume): Use unsigned long for THREAD.
13867 (struct target_ops): Use unsigned long for arguments to attach and
13868 thread_alive.
13869
13870 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13871
13872 * acinclude.m4: Include bfd/bfd.m4 directly.
13873 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13874 <agriffis@toolchain.org>.
13875 * aclocal.m4, configure: Regenerated.
13876
13877 2005-01-07 Andrew Cagney <cagney@gnu.org>
13878
13879 * configure.ac: Rename configure.in, require autoconf 2.59.
13880 * configure: Re-generate.
13881
13882 2004-12-08 Daniel Jacobowitz <dan@debian.org>
13883
13884 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13885 LIBS when finished.
13886 * aclocal.m4: Regenerated.
13887 * configure: Regenerated.
13888
13889 2004-11-21 Andreas Schwab <schwab@suse.de>
13890
13891 * linux-m68k-low.c (m68k_num_gregs): Define.
13892 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13893 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13894 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13895 (m68k_breakpoint_at): New. Add to the_low_target.
13896
13897 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13898 srv_linux_thread_db to yes.
13899
13900 2004-10-20 Joel Brobecker <brobecker@gnat.com>
13901
13902 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13903 (ARCH_SET_FS): Likewise.
13904 (ARCH_GET_FS): Likewise.
13905 (ARCH_GET_GS): Likewise.
13906
13907 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13908
13909 * linux-i386-low.c (ps_get_thread_area): New.
13910 * linux-x86-64-low.c (ps_get_thread_area): New.
13911 * linux-low.c: Include <sys/syscall.h>.
13912 (linux_kill_one_process): Don't kill the first thread here.
13913 (linux_kill): Kill the first thread here.
13914 (kill_lwp): New function.
13915 (send_sigstop, linux_send_signal): Use it.
13916 * proc-service.c: Clean up #ifdefs.
13917 (fpregset_info): Delete.
13918 (ps_lgetregs): Update and enable implementation.
13919 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13920 implementations.
13921 * remote-utils.c (struct sym_cache, symbol_cache): New.
13922 (input_interrupt): Print a clearer message.
13923 (async_io_enabled): New variable.
13924 (enable_async_io, disable_async_io): Use it. Update comments.
13925 (look_up_one_symbol): Use the symbol cache.
13926 * thread-db.c (thread_db_look_up_symbols): New function.
13927 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13928
13929 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13930
13931 * configure.in: Test for -rdynamic.
13932 * configure: Regenerated.
13933 * Makefile (INTERNAL_LDFLAGS): New.
13934 (gdbserver, gdbreplay): Use it.
13935
13936 2004-09-02 Andrew Cagney <cagney@gnu.org>
13937
13938 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13939
13940 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
13941
13942 * linux-low.c (linux_wait): Clear all_processes list also.
13943
13944 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13945
13946 * linux-low.c: Include <errno.h>. Remove extern declaration of
13947 errno.
13948
13949 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13950
13951 * gdbreplay.c, server.h, utils.c: Update copyright years.
13952
13953 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13954
13955 * server.c (main): Print child status or termination signal from
13956 variable 'signal', not 'sig'.
13957
13958 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13959
13960 * linux-low.c (linux_read_memory): Change return type to
13961 int. Check for and return error from ptrace().
13962 * target.c (read_inferior_memory): Change return type to int. Pass
13963 back return status from the_target->read_memory().
13964 * target.h (struct target_ops): Adapt *read_memory() prototype.
13965 Update comment.
13966 (read_inferior_memory): Adapt prototype.
13967 * server.c (main): Return an error packet if
13968 read_inferior_memory() returns an error.
13969
13970 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
13971
13972 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13973 Unify with other clean targets.
13974
13975 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13976
13977 * server.c (handle_v_cont): Call set_desired_inferior.
13978
13979 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13980
13981 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13982
13983 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13984
13985 * linux-low.c (linux_wait): Unblock async I/O.
13986 (linux_resume): Block and enable async I/O.
13987 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13988 * server.h (block_async_io, unblock_async_io): Add prototypes.
13989
13990 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13991
13992 * remote-utils.c (remote_open): Print a status notice after
13993 opening a TCP port.
13994 * server.c (attach_inferior): Print a status notice after
13995 attaching.
13996
13997 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13998
13999 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14000
14001 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14002
14003 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14004 error packet.
14005 * server.c, target.h: Update copyright years.
14006
14007 2004-02-25 Roland McGrath <roland@redhat.com>
14008
14009 * target.h (struct target_ops): New member `read_auxv'.
14010 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14011 * linux-low.c (linux_read_auxv): New function.
14012 (linux_target_ops): Initialize `read_auxv' member to that.
14013
14014 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14015
14016 Committed by Jim Blandy <jimb@redhat.com>.
14017
14018 * linux-s390-low.c (s390_num_regs): Update.
14019 (s390_regmap): Remove control registers. Use __s390x__ predefine
14020 instead of GPR_SIZE to distiguish s390 and s390x targets.
14021
14022 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14023
14024 * linux-low.c: Update copyright year.
14025 (check_removed_breakpoint): Clear pending_is_breakpoint.
14026 (linux_set_resume_request, linux_queue_one_thread)
14027 (resume_status_pending_p): New functions.
14028 (linux_continue_one_thread): Use process->resume.
14029 (linux_resume): Only resume threads if there are no pending events.
14030 * linux-low.h (struct process_info): Add resume request
14031 pointer.
14032
14033 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14034
14035 * regcache.c (new_register_cache): Clear the allocated register
14036 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14037
14038 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14039
14040 * linux-low.c (linux_resume): Take a struct thread_resume *
14041 argument.
14042 (linux_wait): Update call.
14043 (resume_ptr): New static variable.
14044 (linux_continue_one_thread): Renamed from
14045 linux_continue_one_process. Use resume_ptr.
14046 (linux_resume): Use linux_continue_one_thread.
14047 * server.c (handle_v_cont, handle_v_requests): New functions.
14048 (myresume): New function.
14049 (main): Handle 'v' case.
14050 * target.h (struct thread_resume): New type.
14051 (struct target_ops): Change argument of "resume" to struct
14052 thread_resume *.
14053 (myresume): Delete macro.
14054
14055 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14056
14057 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14058 (uninstall): Support DESTDIR.
14059
14060 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14061
14062 * configure.srv: Add xscale*linux copy of arm*linux entry.
14063
14064 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14065
14066 * linux-arm-low.c (arm_reinsert_addr): New function.
14067 (the_low_target): Add arm_reinsert_addr.
14068
14069 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14070
14071 * mem-break.c: Remove whitespace at end of file.
14072
14073 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14074
14075 * configure.in: Check whether we need to prototype strerror.
14076 * server.h: Optionally prototype strerror.
14077 * gdbreplay.c (perror_with_name): Use strerror.
14078 * linux-low.c (linux_attach_lwp): Use strerror.
14079 * utils.c (perror_with_name): Use strerror.
14080 * config.in, configure: Regenerated.
14081
14082 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14083
14084 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14085 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14086
14087 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14088
14089 * Makefile.in (SFILES): Update.
14090 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14091 low-sun3.c: Remove files.
14092
14093 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14094
14095 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14096 (linux_detach_one_process, linux_detach): New functions.
14097 (linux_target_ops): Add linux_detach.
14098 * server.c (main): Handle 'D' packet.
14099 * target.h (struct target_ops): Add "detach" member.
14100 (detach_inferior): Define.
14101
14102 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14103
14104 From Kelley Cook <kelleycook@wideopenwest.com>:
14105 * configure.srv: Accept i[34567]86 variants.
14106
14107 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14108
14109 * linux-low.c (linux_wait_for_event): Correct comment typos.
14110 (linux_resume_one_process): Call check_removed_breakpoint.
14111 (linux_send_signal): New function.
14112 (linux_target_ops): Add linux_send_signal.
14113 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14114 of kill.
14115 * target.h (struct target_ops): Add send_signal.
14116
14117 2003-05-29 Jim Blandy <jimb@redhat.com>
14118
14119 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14120 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14121 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14122 away part of the register's value.
14123
14124 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14125
14126 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14127 (linux_wait_for_event, linux_init_signals): Likewise.
14128
14129 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14130
14131 * configure.in: Check for stdlib.h.
14132 * configure: Regenerated.
14133 * config.in: Regenerated.
14134
14135 2003-01-04 Andreas Schwab <schwab@suse.de>
14136
14137 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14138
14139 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14140
14141 * Makefile.in: Remove obsolete code.
14142
14143 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14144
14145 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14146 defined(PT_FPR0_HI).
14147
14148 2002-11-17 Stuart Hughes <seh@zee2.com>
14149
14150 * linux-arm-low.c (arm_num_regs): Increase.
14151 (arm_regmap): Include status register.
14152
14153 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14154
14155 * linux-low.c (register_addr): Remove incorrect -1 check.
14156
14157 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14158
14159 * linux-low.c (linux_create_inferior): Call setpgid. Return
14160 the new PID.
14161 (unstopped_p, linux_signal_pid): Remove.
14162 (linux_target_ops): Remove linux_signal_pid.
14163 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14164 global instead of target method.
14165 * target.h (struct target_ops): Remove signal_pid. Update comment
14166 for create_inferior.
14167 * server.c (signal_pid): New variable.
14168 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14169 gdbserver. Set the child to be the foreground process group.
14170 (attach_inferior): Set signal_pid.
14171
14172 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14173
14174 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14175
14176 2002-08-20 Jim Blandy <jimb@redhat.com>
14177
14178 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14179 default for this.
14180
14181 2002-08-01 Andrew Cagney <cagney@redhat.com>
14182
14183 * Makefile.in: Make chill references obsolete.
14184
14185 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14186
14187 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14188 * configure: Regenerate.
14189 * config.in: Regenerate.
14190
14191 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14192
14193 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14194 (perror_with_name, remote_close, remote_open, expect, play): Static.
14195
14196 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14197
14198 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14199 byte offsets instead of an array of indexes.
14200 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14201
14202 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14203
14204 * regcache.c: Add comment.
14205
14206 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14207
14208 * thread-db.c: New file.
14209 * proc-service.c: New file.
14210 * acinclude.m4: New file.
14211 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14212 proc-service.o, and thread-db.o.
14213 (linux-low.o): Add USE_THREAD_DB.
14214 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14215 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14216 * aclocal.m4: Regenerated.
14217 * config.in: Regenerated.
14218 * configure: Regenerated.
14219 * configure.in: Check for proc_service.h, sys/procfs.h,
14220 thread_db.h, and linux/elf.h headrs.
14221 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14222 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14223 Check for -lthread_db and thread support.
14224 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14225 PowerPC, and SuperH.
14226 * i387-fp.c: Constify arguments.
14227 * i387-fp.h: Likewise.
14228 * inferiors.c: (struct thread_info): Renamed from
14229 `struct inferior_info'. Remove PID member. Use generic inferior
14230 list header. All uses updated.
14231 (inferiors, signal_pid): Removed.
14232 (all_threads): New variable.
14233 (get_thread): Define.
14234 (add_inferior_to_list): New function.
14235 (for_each_inferior): New function.
14236 (change_inferior_id): New function.
14237 (add_inferior): Removed.
14238 (remove_inferior): New function.
14239 (add_thread): New function.
14240 (free_one_thread): New function.
14241 (remove_thread): New function.
14242 (clear_inferiors): Use for_each_inferior and free_one_thread.
14243 (find_inferior): New function.
14244 (find_inferior_id): New function.
14245 (inferior_target_data): Update argument type.
14246 (set_inferior_target_data): Likewise.
14247 (inferior_regcache_data): Likewise.
14248 (set_inferior_regcache_data): Likewise.
14249 * linux-low.c (linux_bp_reinsert): Remove.
14250 (all_processes, stopping_threads, using_thrads)
14251 (struct pending_signals, debug_threads, pid_of): New.
14252 (inferior_pid): Replace with macro.
14253 (struct inferior_linux_data): Remove.
14254 (get_stop_pc, add_process): New functions.
14255 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14256 Use add_process and add_thread.
14257 (linux_attach_lwp): New function, based on old linux_attach. Use
14258 add_process and add_thread. Set stop_expected for new threads.
14259 (linux_attach): New function.
14260 (linux_kill_one_process): New function.
14261 (linux_kill): Kill all LWPs.
14262 (linux_thread_alive): Use find_inferior_id.
14263 (check_removed_breakpoints, status_pending_p): New functions.
14264 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14265 Update. Use WNOHANG. Wait for cloned processes also. Update process
14266 struct for the found process.
14267 (linux_wait_for_event): New function.
14268 (linux_wait): Use it. Support LWPs.
14269 (send_sigstop, wait_for_sigstop, stop_all_processes)
14270 (linux_resume_one_process, linux_continue_one_process): New functions.
14271 (linux_resume): Support LWPs.
14272 (REGISTER_RAW_SIZE): Remove.
14273 (fetch_register): Use register_size instead. Call supply_register.
14274 (usr_store_inferior_registers): Likewise. Call collect_register.
14275 Fix recursive case.
14276 (regsets_fetch_inferior_registers): Improve error message.
14277 (regsets_store_inferior_registers): Add debugging.
14278 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14279 (unstopped_p, linux_signal_pid): New functions.
14280 (linux_target_ops): Add linux_signal_pid.
14281 (linux_init_signals): New function.
14282 (initialize_low): Call it. Initialize using_threads.
14283 * regcache.c (inferior_regcache_data): Add valid
14284 flag.
14285 (get_regcache): Fetch registers lazily. Add fetch argument
14286 and update all callers.
14287 (regcache_invalidate_one, regcache_invalidate): New
14288 functions.
14289 (new_register_cache): Renamed from create_register_cache.
14290 Return the new regcache.
14291 (free_register_cache): Change argument to a void *.
14292 (registers_to_string, registers_from_string): Call get_regcache
14293 with fetch flag set.
14294 (register_data): Make static. Pass fetch flag to get_regcache.
14295 (supply_register): Call get_regcache with fetch flag clear.
14296 (collect_register): Call get_regcache with fetch flag set.
14297 (collect_register_as_string): New function.
14298 * regcache.h: Update.
14299 * remote-utils.c (putpkt): Flush after debug output and use
14300 stderr.
14301 Handle input interrupts while waiting for an ACK.
14302 (input_interrupt): Use signal_pid method.
14303 (getpkt): Flush after debug output and use stderr.
14304 (outreg): Use collect_register_as_string.
14305 (new_thread_notify, dead_thread_notify): New functions.
14306 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14307 and general_thread.
14308 (look_up_one_symbol): Flush after debug output.
14309 * server.c (step_thread, server_waiting): New variables.
14310 (start_inferior): Don't use signal_pid. Update call to mywait.
14311 (attach_inferior): Update call to mywait.
14312 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14313 (main): Don't fetch/store registers explicitly. Use
14314 set_desired_inferior. Support proposed ``Hs'' packet. Update
14315 calls to mywait.
14316 * server.h: Update.
14317 (struct inferior_list, struct_inferior_list_entry): New.
14318 * target.c (set_desired_inferior): New.
14319 (write_inferior_memory): Constify.
14320 (mywait): New function.
14321 * target.h: Update.
14322 (struct target_ops): New signal_pid method.
14323 (mywait): Removed macro, added prototype.
14324
14325 * linux-low.h (regset_func): Removed.
14326 (regset_fill_func, regset_store_func): New.
14327 (enum regset_type): New.
14328 (struct regset_info): Add type field. Use new operation types.
14329 (struct linux_target_ops): stop_pc renamed to get_pc.
14330 Add decr_pc_after_break and breakpoint_at.
14331 (get_process, get_thread_proess, get_process_thread)
14332 (strut process_info, all_processes, linux_attach_lwp)
14333 (thread_db_init): New.
14334
14335 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14336 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14337 (the_low_target): Add new members.
14338 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14339 (i386_store_fpxregset): Constify.
14340 (target_regsets): Add new kind identifier.
14341 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14342 (i386_set_pc): Add debugging.
14343 (i386_breakpoint_at): New function.
14344 (the_low_target): Add new members.
14345 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14346 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14347 (mips_breakpoint_at): New.
14348 (the_low_target): Add new members.
14349 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14350 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14351 (the_low_target): Add new members.
14352 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14353 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14354 (the_low_target): Add new members.
14355 * linux-x86-64-low.c (target_regsets): Add new kind
14356 identifier.
14357
14358 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14359
14360 From Martin Pool <mbp@samba.org>:
14361 * server.c (gdbserver_usage): New function.
14362 (main): Call it.
14363
14364 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14365
14366 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14367 stop_at -> stop_pc.
14368
14369 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14370
14371 * Makefile.in: Remove obsolete code.
14372
14373 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14374
14375 * linux-low.c (regsets_fetch_inferior_registers),
14376 (regsets_store_inferior_registers): Removed cast to int from
14377 ptrace() calls.
14378 * regcache.h: Added declaration of struct inferior_info.
14379
14380 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14381
14382 * inferiors.c (struct inferior_info): Add regcache_data.
14383 (add_inferior): Call create_register_cache.
14384 (clear_inferiors): Call free_register_cache.
14385 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14386 * regcache.c (struct inferior_regcache_data): New.
14387 (registers): Remove.
14388 (get_regcache): New function.
14389 (create_register_cache, free_register_cache): New functions.
14390 (set_register_cache): Don't initialize the register cache here.
14391 (registers_to_string, registers_from_string, register_data): Call
14392 get_regcache.
14393 * regcache.h: Add prototypes.
14394 * server.h: Likewise.
14395
14396 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14397
14398 * mem-break.c: New file.
14399 * mem-break.h: New file.
14400 * Makefile.in: Add mem-break.o rule; update server.h
14401 dependencies.
14402 * inferiors.c (struct inferior_info): Add target_data
14403 member.
14404 (clear_inferiors): Free target_data member if set.
14405 (inferior_target_data, set_inferior_target_data): New functions.
14406 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14407 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14408 * linux-low.c (linux_bp_reinsert): New variable.
14409 (struct inferior_linux_data): New.
14410 (linux_create_inferior): Use set_inferior_target_data.
14411 (linux_attach): Likewise. Call add_inferior.
14412 (linux_wait_for_one_inferior): New function.
14413 (linux_wait): Call it.
14414 (linux_write_memory): Add const.
14415 (initialize_low): Call set_breakpoint_data.
14416 * linux-low.h (struct linux_target_ops): Add breakpoint
14417 handling members.
14418 * server.c (attach_inferior): Remove extra add_inferior
14419 call.
14420 * server.h: Include mem-break.h. Update inferior.c
14421 prototypes.
14422 * target.c (read_inferior_memory)
14423 (write_inferior_memory): New functions.
14424 * target.h (read_inferior_memory)
14425 (write_inferior_memory): Change macros to prototypes.
14426 (struct target_ops): Update comments. Add const to write_memory
14427 definition.
14428
14429 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14430
14431 * linux-low.c (usr_store_inferior_registers): Support
14432 registers which are allowed to fail to store.
14433 * linux-low.h (linux_target_ops): Likewise.
14434 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14435 (ppc_cannot_store_register): FPSCR may not be storable.
14436
14437 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14438
14439 * server.h: Include <string.h> if HAVE_STRING_H.
14440 * ChangeLog: Correct paths in last ChangeLog entry.
14441
14442 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14443
14444 * linux-low.h: Remove obsolete prototypes.
14445 (struct linux_target_ops): New.
14446 (extern the_low_target): New.
14447 * linux-low.c (num_regs, regmap): Remove declarations.
14448 (register_addr): Use the_low_target explicitly.
14449 (fetch_register): Likewise.
14450 (usr_fetch_inferior_registers): Likewise.
14451 (usr_store_inferior_registers): Likewise.
14452 * linux-arm-low.c (num_regs): Remove.
14453 (arm_num_regs): Define.
14454 (arm_regmap): Renamed from regmap, made static.
14455 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14456 made static.
14457 (arm_cannot_store_register): Renamed from cannot_store_register,
14458 made static.
14459 (the_low_target): New.
14460 * linux-i386-low.c (num_regs): Remove.
14461 (i386_num_regs): Define.
14462 (i386_regmap): Renamed from regmap, made static.
14463 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14464 made static.
14465 (i386_cannot_store_register): Renamed from cannot_store_register,
14466 made static.
14467 (the_low_target): New.
14468 * linux-ia64-low.c (num_regs): Remove.
14469 (ia64_num_regs): Define.
14470 (ia64_regmap): Renamed from regmap, made static.
14471 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14472 made static.
14473 (ia64_cannot_store_register): Renamed from cannot_store_register,
14474 made static.
14475 (the_low_target): New.
14476 * linux-m68k-low.c (num_regs): Remove.
14477 (m68k_num_regs): Define.
14478 (m68k_regmap): Renamed from regmap, made static.
14479 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14480 made static.
14481 (m68k_cannot_store_register): Renamed from cannot_store_register,
14482 made static.
14483 (the_low_target): New.
14484 * linux-mips-low.c (num_regs): Remove.
14485 (mips_num_regs): Define.
14486 (mips_regmap): Renamed from regmap, made static.
14487 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14488 made static.
14489 (mips_cannot_store_register): Renamed from cannot_store_register,
14490 made static.
14491 (the_low_target): New.
14492 * linux-ppc-low.c (num_regs): Remove.
14493 (ppc_num_regs): Define.
14494 (ppc_regmap): Renamed from regmap, made static.
14495 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14496 made static.
14497 (ppc_cannot_store_register): Renamed from cannot_store_register,
14498 made static.
14499 (the_low_target): New.
14500 * linux-s390-low.c (num_regs): Remove.
14501 (s390_num_regs): Define.
14502 (s390_regmap): Renamed from regmap, made static.
14503 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14504 made static.
14505 (s390_cannot_store_register): Renamed from cannot_store_register,
14506 made static.
14507 (the_low_target): New.
14508 * linux-sh-low.c (num_regs): Remove.
14509 (sh_num_regs): Define.
14510 (sh_regmap): Renamed from regmap, made static.
14511 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14512 made static.
14513 (sh_cannot_store_register): Renamed from cannot_store_register,
14514 made static.
14515 (the_low_target): New.
14516 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14517 (the_low_target): New.
14518
14519 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14520
14521 * Makefile.in: Add stamp-h target.
14522 * configure.in: Create stamp-h.
14523 * configure: Regenerated.
14524
14525 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14526
14527 * inferiors.c: New file.
14528 * target.c: New file.
14529 * target.h: New file.
14530 * Makefile.in: Add target.o and inferiors.o. Update
14531 dependencies.
14532 * linux-low.c (inferior_pid): New static variable,
14533 moved from server.c.
14534 (linux_create_inferior): Renamed from create_inferior.
14535 Call add_inferior. Return 0 on success instead of a PID.
14536 (linux_attach): Renamed from myattach.
14537 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14538 (linux_thread_alive): Renamed from mythread_alive.
14539 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14540 child dies.
14541 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14542 (regsets_store_inferior_registers): Correct error message.
14543 Add missing ``return 0''.
14544 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14545 (linux_store_registers): Renamed from store_inferior_registers.
14546 (linux_read_memory): Renamed from read_inferior_memory.
14547 (linux_write_memory): Renamed from write_inferior_memory.
14548 (linux_target_ops): New structure.
14549 (initialize_low): Call set_target_ops ().
14550 * remote-utils.c (unhexify): New function.
14551 (hexify): New function.
14552 (input_interrupt): Send signals to ``signal_pid''.
14553 * server.c (inferior_pid): Remove.
14554 (start_inferior): Update create_inferior call.
14555 (attach_inferior): Call add_inferior.
14556 (handle_query): New function.
14557 (main): Call handle_query for `q' packets.
14558 * server.h: Include "target.h". Remove obsolete prototypes.
14559 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14560
14561 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14562
14563 * Makefile.in: Add WARN_CFLAGS. Update configury
14564 dependencies.
14565 * configure.in: Check for <string.h>
14566 * configure: Regenerate.
14567 * config.in: Regenerate.
14568 * gdbreplay.c: Include needed system headers.
14569 (remote_open): Remove strchr prototype.
14570 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14571 * regcache.c (supply_register): Change buf argument to const void *.
14572 (supply_register_by_name): Likewise.
14573 (collect_register): Change buf argument to void *.
14574 (collect_register_by_name): Likewise.
14575 * regcache.h: Add missing prototypes.
14576 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14577 * server.c (handle_query): New function.
14578 (attached): New static variable, moved out of main.
14579 (main): Quiet longjmp clobber warnings.
14580 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14581 * utils.c (error): Remove NORETURN.
14582 (fatal): Likewise.
This page took 0.471503 seconds and 4 git commands to generate.