x32: gdbserver's agent bytecode JIT: fix "call" emission
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2016-08-19 Pedro Alves <palves@redhat.com>
2
3 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4
5 2016-08-19 Pedro Alves <palves@redhat.com>
6
7 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
8 comment. Use memcpy instead of casting through unsigned long.
9
10 2016-08-19 Pedro Alves <palves@redhat.com>
11
12 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
13 allocating around 0x80000000.
14
15 2016-08-19 Pedro Alves <palves@redhat.com>
16
17 PR gdb/20415
18 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
19 (x32-avx512-linux-ipa.o): New rules.
20 * configure.ac (x86_64-*-linux*): New x32 check.
21 * configure.srv (ipa_x32_linux_regobj): New.
22 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
23 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
24 descriptions.
25 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
26 descriptions.
27 * configure: Regenerate.
28
29 2016-08-09 Pedro Alves <palves@redhat.com>
30
31 PR gdb/18653
32 * Makefile.in (OBS): Add signals-state-save-restore.o.
33 (signals-state-save-restore.o): New rule.
34 * config.in: Regenerate.
35 * configure: Regenerate.
36 * linux-low.c: Include "signals-state-save-restore.h".
37 (linux_create_inferior): Call
38 restore_original_signals_state.
39 * server.c: Include "dispositions-save-restore.h".
40 (captured_main): Call save_original_signals_state.
41
42 2016-08-05 Pedro Alves <palves@redhat.com>
43
44 * configure: Regenerate.
45
46 2016-08-04 Yao Qi <yao.qi@linaro.org>
47
48 * linux-low.c (regsets_fetch_inferior_registers): Check
49 errno is ESRCH or not.
50
51 2016-08-02 Yao Qi <yao.qi@linaro.org>
52
53 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
54 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
55 (thread_db_load_search): Update.
56 (try_thread_db_load_1): Don't look for td_ta_event_addr,
57 td_ta_set_event and td_ta_event_getmsg.
58
59 2016-07-26 Pedro Alves <palves@redhat.com>
60
61 PR server/20414
62 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
63 of unsigned long for 64-bit registers and use uint32_t instead of
64 unsigned int for 32-bit registers.
65
66 2016-07-26 Pedro Alves <palves@redhat.com>
67
68 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
69 to 'ptrace'.
70
71 2016-07-21 Tom Tromey <tom@tromey.com>
72
73 * configure: Rebuild.
74
75 2016-07-21 Yao Qi <yao.qi@linaro.org>
76
77 * mem-break.c (find_gdb_breakpoint): Cast bp to
78 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
79
80 2016-07-21 Yao Qi <yao.qi@linaro.org>
81
82 * server.c (handle_v_requests): Support s and S actions
83 if target_supports_software_single_step return true.
84
85 2016-07-21 Yao Qi <yao.qi@linaro.org>
86
87 * linux-low.c (resume_stopped_resumed_lwps): If resume request
88 is resume_step, call maybe_hw_step.
89 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
90 and unstop them.
91 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
92 breakpoints or not.
93 (proceed_one_lwp): If resume request is resume_step, install
94 reinsert breakpoints and call maybe_hw_step.
95
96 2016-07-21 Yao Qi <yao.qi@linaro.org>
97
98 * linux-low.c (proceed_one_lwp): Declare.
99 (linux_resume_one_thread): Remove local variable 'step'.
100 Lift code enqueue signal. Call proceed_one_lwp instead of
101 linux_resume_one_lwp.
102
103 2016-07-21 Yao Qi <yao.qi@linaro.org>
104
105 * linux-low.c (linux_resume_one_thread): Call
106 enqueue_pending_signal.
107
108 2016-07-21 Yao Qi <yao.qi@linaro.org>
109
110 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
111 * inferiors.c (do_restore_current_thread_cleanup): New function.
112 (make_cleanup_restore_current_thread): Likewise.
113 * linux-low.c (install_software_single_step_breakpoints): Call
114 make_cleanup_restore_current_thread. Switch current_thread to
115 thread.
116
117 2016-07-21 Yao Qi <yao.qi@linaro.org>
118
119 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
120 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
121 (clone_one_breakpoint): Likewise.
122 (delete_reinsert_breakpoints): Change parameter to thread.
123 Callers updated.
124 (has_reinsert_breakpoints): Likewise.
125 (uninsert_reinsert_breakpoints): Likewise.
126 (reinsert_reinsert_breakpoints): Likewise.
127 * mem-break.h (set_reinsert_breakpoint): Update declaration.
128 (delete_reinsert_breakpoints): Likewise.
129 (reinsert_reinsert_breakpoints): Likewise.
130 (uninsert_reinsert_breakpoints): Likewise.
131 (has_reinsert_breakpoints): Likewise.
132
133 2016-07-21 Yao Qi <yao.qi@linaro.org>
134
135 * inferiors.c (get_thread_process): Make parameter const.
136 * inferiors.h (get_thread_process): Update declaration.
137 * mem-break.c (clone_all_breakpoints): Remove all parameters.
138 Add new parameters child_thread and parent_thread. Callers
139 updated.
140 * mem-break.h (clone_all_breakpoints): Update declaration.
141
142 2016-07-21 Yao Qi <yao.qi@linaro.org>
143
144 * mem-break.c (struct breakpoint) <cond_list>: Remove.
145 <command_list, handler>: Remove.
146 (struct gdb_breakpoint): New.
147 (struct other_breakpoint): New.
148 (struct reinsert_breakpoint): New.
149 (is_gdb_breakpoint): New function.
150 (any_persistent_commands): Update command_list if
151 is_gdb_breakpoint returns true.
152 (set_breakpoint): Create breakpoints according to their types.
153 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
154 (set_gdb_breakpoint_1): Likewise.
155 (set_gdb_breakpoint): Likewise.
156 (clear_breakpoint_conditions): Change parameter type to
157 'struct gdb_breakpoint *'.
158 (clear_breakpoint_commands): Likewise.
159 (clear_breakpoint_conditions_and_commands): Likewise.
160 (add_condition_to_breakpoint): Likewise.
161 (add_breakpoint_condition): Likewise.
162 (add_commands_to_breakpoint): Likewise.
163 (check_breakpoints): Check other_breakpoint.
164 (clone_one_breakpoint): Clone breakpopint according to its type.
165 * mem-break.h (struct gdb_breakpoint): Declare.
166 (set_gdb_breakpoint): Update declaration.
167 (clear_breakpoint_conditions_and_commands): Likewise.
168 (add_breakpoint_condition): Likewise.
169 (add_breakpoint_commands): Likewise.
170 * server.c (process_point_options): Change parameter type to
171 'struct gdb_breakpoint *'.
172
173 2016-07-21 Yao Qi <yao.qi@linaro.org>
174
175 * mem-break.c (set_breakpoint_at): Rename it to ...
176 (set_breakpoint_type_at): ... it.
177 (set_breakpoint_at): Call set_breakpoint_type_at.
178 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
179 * mem-break.h (set_breakpoint_at): Update comments.
180
181 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
182
183 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
184 to buf parameter.
185 (nios2_store_gregset): Likewise.
186
187 2016-07-01 Pedro Alves <palves@redhat.com>
188 Antoine Tremblay <antoine.tremblay@ericsson.com>
189
190 * linux-low.c: Change interface to take the target lwp_info
191 pointer directly and return void. Handle detaching from a zombie
192 thread.
193 (linux_detach_lwp_callback): New function.
194 (linux_detach): Detach from the leader thread after detaching from
195 the clone threads.
196
197 2016-06-28 Yao Qi <yao.qi@linaro.org>
198
199 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
200 for variable new_offset.
201 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
202 (aarch64_ftrace_insn_reloc_cb): Likewise.
203 (aarch64_ftrace_insn_reloc_tb): Likewise.
204 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
205 PRIx64 instead of PRIx32.
206
207 2016-06-28 Yao Qi <yao.qi@linaro.org>
208
209 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
210 (the_low_target): Install arm_get_syscall_trapinfo.
211
212 2016-06-28 Yao Qi <yao.qi@linaro.org>
213
214 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
215 function.
216 (the_low_target): Install aarch64_get_syscall_trapinfo.
217
218 2016-06-28 Yao Qi <yao.qi@linaro.org>
219
220 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
221 Callers updated.
222 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
223 Remove parameter sysno.
224 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
225 sysret.
226
227 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
228
229 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
230 (s390_emit_ne_goto): Likewise.
231 (s390_emit_lt_goto): Likewise.
232 (s390_emit_le_goto): Likewise.
233 (s390_emit_gt_goto): Likewise.
234 (s390_emit_ge_goto): Likewise.
235 (s390x_emit_eq_goto): Likewise.
236 (s390x_emit_ne_goto): Likewise.
237 (s390x_emit_lt_goto): Likewise.
238 (s390x_emit_le_goto): Likewise.
239 (s390x_emit_gt_goto): Likewise.
240 (s390x_emit_ge_goto): Likewise.
241 (s390_emit_ops_impl): Mark variable static.
242 (s390x_emit_ops): Likewise.
243
244 2016-06-17 Yao Qi <yao.qi@linaro.org>
245
246 * linux-low.c (handle_extended_wait): Call
247 uninsert_reinsert_breakpoints for the parent process. Remove
248 reinsert breakpoints from the child process. Reinsert them to
249 the parent process when vfork is done.
250 * mem-break.c (uninsert_reinsert_breakpoints): New function.
251 (reinsert_reinsert_breakpoints): New function.
252 * mem-break.h (uninsert_reinsert_breakpoints): Declare
253 (reinsert_reinsert_breakpoints): Declare.
254
255 2016-06-17 Yao Qi <yao.qi@linaro.org>
256
257 * linux-low.c (handle_extended_wait): If the parent is doing
258 step-over, remove the reinsert breakpoints from the forked child.
259
260 2016-06-17 Yao Qi <yao.qi@linaro.org>
261
262 * linux-low.c (unsuspend_all_lwps): Declare.
263 (linux_low_filter_event): If thread exited, call finish_step_over.
264 If step-over is finished, unsuspend other threads.
265
266 2016-06-17 Yao Qi <yao.qi@linaro.org>
267
268 * linux-low.c (linux_resume_one_lwp_throw): Assert
269 has_reinsert_breakpoints returns false.
270 * mem-break.c (delete_disabled_breakpoints): Assert
271 bp type isn't reinsert_breakpoint.
272
273 2016-06-17 Yao Qi <yao.qi@linaro.org>
274
275 * linux-low.c (maybe_hw_step): New function.
276 (linux_resume_one_lwp_throw): Call maybe_hw_step.
277 (finish_step_over): Switch current_thread to lwp temporarily,
278 and assert has_reinsert_breakpoints returns true.
279 (proceed_one_lwp): Call maybe_hw_step.
280 * mem-break.c (has_reinsert_breakpoints): New function.
281 * mem-break.h (has_reinsert_breakpoints): Declare.
282
283 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
284
285 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
286
287 2016-05-17 Yao Qi <yao.qi@linaro.org>
288
289 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
290 instead of find_inferior.
291
292 2016-05-05 Yao Qi <yao.qi@linaro.org>
293
294 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
295 Initialize res to zero.
296
297 2016-05-05 Yao Qi <yao.qi@linaro.org>
298
299 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
300 to uint32_t.
301
302 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
303
304 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
305 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
306 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
307
308 2016-04-28 Par Olsson <par.olsson@windriver.com>
309 Simon Marchi <simon.marchi@ericsson.com>
310
311 * tracepoint.c (write_inferior_int8): New function.
312 (cmd_qtenable_disable): Write enable flag using
313 write_inferior_int8.
314
315 2016-04-25 Yao Qi <yao.qi@linaro.org>
316
317 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
318 (need_step_over_p): Return zero if the LWP has pending signals
319 can be delivered on software single step target.
320
321 2016-04-25 Yao Qi <yao.qi@linaro.org>
322
323 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
324 return instead of error.
325
326 2016-04-22 Yao Qi <yao.qi@linaro.org>
327
328 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
329 to 23.
330
331 2016-04-22 Yao Qi <yao.qi@linaro.org>
332
333 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
334 signal when stepping over breakpoint with software single
335 step.
336
337 2016-04-21 Pedro Alves <palves@redhat.com>
338
339 * linux-s390-low.c (s390_collect_ptrace_register)
340 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
341 add casts.
342 (s390_check_regset): Use void * instead of gdb_byte *.
343
344 2016-04-20 Pedro Alves <palves@redhat.com>
345
346 * configure: Renegerate.
347
348 2016-04-20 Yao Qi <yao.qi@linaro.org>
349
350 * linux-aarch32-low.c: Include "arch/arm-linux.h".
351 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
352 number 16.
353 (arm_store_gregset): Likewise.
354
355 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
356
357 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
358 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
359 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
360 (amd64-avx-mpx-linux.c): New rules.
361 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
362 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
363 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
364 (srv_amd64_regobj): Add amd64-avx-mpx.o.
365 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
366 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
367 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
368 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
369 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
370 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
371 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
372 * linux-x86-low.c (x86_linux_read_description): Add case for
373 X86_XSTATE_AVX_MPX_MASK.
374 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
375 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
376 init_registers_i386_avx_mpx_linux.
377 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
378 (initialize_low_tracepoint): Call
379 init_registers_i386_avx_mpx_linux.
380 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
381 (initialize_low_tracepoint): Call
382 init_registers_amd64_avx_mpx_linux.
383 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
384 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
385 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
386 declarations.
387
388 2016-04-18 Pedro Alves <palves@redhat.com>
389
390 * configure: Regenerate.
391
392 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
393
394 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
395 (aarch64_emit_sub): Likewise.
396
397 2016-04-12 Pedro Alves <palves@redhat.com>
398
399 * utils.c (prepare_to_throw_exception): Delete.
400
401 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
402
403 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
404
405 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
406
407 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
408
409 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
410
411 * linux-aarch64-ipa.c: Add <elf.h> include.
412 * linux-ppc-ipa.c: Add <elf.h> include.
413 * linux-s390-ipa.c: Add <elf.h> include.
414
415 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
416
417 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
418 (get_raw_reg_ptr): Likewise.
419 (get_trace_state_variable_value_ptr): Likewise.
420 (set_trace_state_variable_value_ptr): Likewise.
421 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
422 char *.
423
424 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
425 Marcin Kościelnicki <koriakin@0x04.net>
426
427 PR/17221
428 * linux-ppc-low.c (emit_insns): New function.
429 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
430 (ppc_emit_prologue): New function.
431 (ppc_emit_epilogue): New function.
432 (ppc_emit_add): New function.
433 (ppc_emit_sub): New function.
434 (ppc_emit_mul): New function.
435 (ppc_emit_lsh): New function.
436 (ppc_emit_rsh_signed): New function.
437 (ppc_emit_rsh_unsigned): New function.
438 (ppc_emit_ext): New function.
439 (ppc_emit_zero_ext): New function.
440 (ppc_emit_log_not): New function.
441 (ppc_emit_bit_and): New function.
442 (ppc_emit_bit_or): New function.
443 (ppc_emit_bit_xor): New function.
444 (ppc_emit_bit_not): New function.
445 (ppc_emit_equal): New function.
446 (ppc_emit_less_signed): New function.
447 (ppc_emit_less_unsigned): New function.
448 (ppc_emit_ref): New function.
449 (ppc_emit_const): New function.
450 (ppc_emit_reg): New function.
451 (ppc_emit_pop): New function.
452 (ppc_emit_stack_flush): New function.
453 (ppc_emit_swap): New function.
454 (ppc_emit_stack_adjust): New function.
455 (ppc_emit_call): New function.
456 (ppc_emit_int_call_1): New function.
457 (ppc_emit_void_call_2): New function.
458 (ppc_emit_if_goto): New function.
459 (ppc_emit_goto): New function.
460 (ppc_emit_eq_goto): New function.
461 (ppc_emit_ne_goto): New function.
462 (ppc_emit_lt_goto): New function.
463 (ppc_emit_le_goto): New function.
464 (ppc_emit_gt_goto): New function.
465 (ppc_emit_ge_goto): New function.
466 (ppc_write_goto_address): New function.
467 (ppc_emit_ops_impl): New static variable.
468 (ppc64v1_emit_prologue): New function.
469 (ppc64v2_emit_prologue): New function.
470 (ppc64_emit_epilogue): New function.
471 (ppc64_emit_add): New function.
472 (ppc64_emit_sub): New function.
473 (ppc64_emit_mul): New function.
474 (ppc64_emit_lsh): New function.
475 (ppc64_emit_rsh_signed): New function.
476 (ppc64_emit_rsh_unsigned): New function.
477 (ppc64_emit_ext): New function.
478 (ppc64_emit_zero_ext): New function.
479 (ppc64_emit_log_not): New function.
480 (ppc64_emit_bit_and): New function.
481 (ppc64_emit_bit_or): New function.
482 (ppc64_emit_bit_xor): New function.
483 (ppc64_emit_bit_not): New function.
484 (ppc64_emit_equal): New function.
485 (ppc64_emit_less_signed): New function.
486 (ppc64_emit_less_unsigned): New function.
487 (ppc64_emit_ref): New function.
488 (ppc64_emit_const): New function.
489 (ppc64v1_emit_reg): New function.
490 (ppc64v2_emit_reg): New function.
491 (ppc64_emit_pop): New function.
492 (ppc64_emit_stack_flush): New function.
493 (ppc64_emit_swap): New function.
494 (ppc64v1_emit_call): New function.
495 (ppc64v2_emit_call): New function.
496 (ppc64v1_emit_int_call_1): New function.
497 (ppc64v2_emit_int_call_1): New function.
498 (ppc64v1_emit_void_call_2): New function.
499 (ppc64v2_emit_void_call_2): New function.
500 (ppc64_emit_if_goto): New function.
501 (ppc64_emit_eq_goto): New function.
502 (ppc64_emit_ne_goto): New function.
503 (ppc64_emit_lt_goto): New function.
504 (ppc64_emit_le_goto): New function.
505 (ppc64_emit_gt_goto): New function.
506 (ppc64_emit_ge_goto): New function.
507 (ppc64v1_emit_ops_impl): New static variable.
508 (ppc64v2_emit_ops_impl): New static variable.
509 (ppc_emit_ops): New function.
510 (linux_low_target): Wire in ppc_emit_ops.
511
512 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
513 Marcin Kościelnicki <koriakin@0x04.net>
514
515 PR/17221
516 * Makefile.in: Add powerpc-*-ipa.o
517 * configure.srv: Add ipa_obj for powerpc*-linux.
518 * linux-ppc-ipa.c: New file.
519 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
520 includes.
521 (PPC_FIELD): New macro.
522 (PPC_SEXT): New macro.
523 (PPC_OP6): New macro.
524 (PPC_BO): New macro.
525 (PPC_LI): New macro.
526 (PPC_BD): New macro.
527 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
528 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
529 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
530 (ppc_get_thread_area): New function.
531 (is_elfv2_inferior): New function.
532 (gen_ds_form): New function.
533 (GEN_STD): New macro.
534 (GEN_STDU): New macro.
535 (GEN_LD): New macro.
536 (GEN_LDU): New macro.
537 (gen_d_form): New function.
538 (GEN_ADDI): New macro.
539 (GEN_ADDIS): New macro.
540 (GEN_LI): New macro.
541 (GEN_LIS): New macro.
542 (GEN_ORI): New macro.
543 (GEN_ORIS): New macro.
544 (GEN_LWZ): New macro.
545 (GEN_STW): New macro.
546 (GEN_STWU): New macro.
547 (gen_xfx_form): New function.
548 (GEN_MFSPR): New macro.
549 (GEN_MTSPR): New macro.
550 (GEN_MFCR): New macro.
551 (GEN_MTCR): New macro.
552 (GEN_SYNC): New macro.
553 (GEN_LWSYNC): New macro.
554 (gen_x_form): New function.
555 (GEN_OR): New macro.
556 (GEN_MR): New macro.
557 (GEN_LWARX): New macro.
558 (GEN_STWCX): New macro.
559 (GEN_CMPW): New macro.
560 (gen_md_form): New function.
561 (GEN_RLDICL): New macro.
562 (GEN_RLDICR): New macro.
563 (gen_i_form): New function.
564 (GEN_B): New macro.
565 (GEN_BL): New macro.
566 (gen_b_form): New function.
567 (GEN_BNE): New macro.
568 (GEN_LOAD): New macro.
569 (GEN_STORE): New macro.
570 (gen_limm): New function.
571 (gen_atomic_xchg): New function.
572 (gen_call): New function.
573 (ppc_relocate_instruction): New function.
574 (ppc_install_fast_tracepoint_jump_pad): New function.
575 (ppc_get_min_fast_tracepoint_insn_len): New function.
576 (ppc_get_ipa_tdesc_idx): New function.
577 (the_low_target): Wire in the new functions.
578 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
579 tdescs.
580 * linux-ppc-tdesc.h: New file.
581
582 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
583
584 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
585 (alloc_jump_pad_buffer): New function.
586 * linux-amd64-ipa.c: Add <sys/mman.h> include.
587 (alloc_jump_pad_buffer): New function.
588 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
589 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
590 (alloc_jump_pad_buffer): New function.
591 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
592 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
593 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
594 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
595
596 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
597
598 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
599 * linux-amd64-ipa.c: Likewise.
600 * linux-i386-ipa.c: Likewise.
601 * linux-s390-ipa.c: Likewise.
602 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
603 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
604 set_trace_state_variable_value_ptr.
605 (struct ipa_sym_addresses): Likewise.
606 (symbol_list): Likewise.
607 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
608 accessing gdb_collect directly.
609 (gdb_collect_ptr_type): New typedef.
610 (get_raw_reg_ptr_type): New typedef.
611 (get_trace_state_variable_value_ptr_type): New typedef.
612 (set_trace_state_variable_value_ptr_type): New typedef.
613 (gdb_collect_ptr): New global.
614 (get_raw_reg_ptr): New global.
615 (get_trace_state_variable_value_ptr): New global.
616 (set_trace_state_variable_value_ptr): New global.
617 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
618 accessing get_raw_reg directly.
619 (get_get_tsv_func_addr): Likewise for
620 get_trace_state_variable_value_ptr.
621 (get_set_tsv_func_addr): Likewise for
622 set_trace_state_variable_value_ptr.
623 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
624
625 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
626
627 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
628
629 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
630
631 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
632 packets.
633 (relocate_instruction): Remove own_buf.
634 * server.c (own_buf): Make global.
635 (handle_v_requests): Make global.
636 * server.h (own_buf): New declaration.
637 (handle_v_requests): New prototype.
638
639 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
640
641 PR 18377
642 * linux-s390-low.c (add_insns): New function.
643 (s390_emit_prologue): New function.
644 (s390_emit_epilogue): New function.
645 (s390_emit_add): New function.
646 (s390_emit_sub): New function.
647 (s390_emit_mul): New function.
648 (s390_emit_lsh): New function.
649 (s390_emit_rsh_signed): New function.
650 (s390_emit_rsh_unsigned): New function.
651 (s390_emit_ext): New function.
652 (s390_emit_log_not): New function.
653 (s390_emit_bit_and): New function.
654 (s390_emit_bit_or): New function.
655 (s390_emit_bit_xor): New function.
656 (s390_emit_bit_not): New function.
657 (s390_emit_equal): New function.
658 (s390_emit_less_signed): New function.
659 (s390_emit_less_unsigned): New function.
660 (s390_emit_ref): New function.
661 (s390_emit_if_goto): New function.
662 (s390_emit_goto): New function.
663 (s390_write_goto_address): New function.
664 (s390_emit_litpool): New function.
665 (s390_emit_const): New function.
666 (s390_emit_call): New function.
667 (s390_emit_reg): New function.
668 (s390_emit_pop): New function.
669 (s390_emit_stack_flush): New function.
670 (s390_emit_zero_ext): New function.
671 (s390_emit_swap): New function.
672 (s390_emit_stack_adjust): New function.
673 (s390_emit_set_r2): New function.
674 (s390_emit_int_call_1): New function.
675 (s390_emit_void_call_2): New function.
676 (s390_emit_eq_goto): New function.
677 (s390_emit_ne_goto): New function.
678 (s390_emit_lt_goto): New function.
679 (s390_emit_le_goto): New function.
680 (s390_emit_gt_goto): New function.
681 (s390_emit_ge_goto): New function.
682 (s390x_emit_prologue): New function.
683 (s390x_emit_epilogue): New function.
684 (s390x_emit_add): New function.
685 (s390x_emit_sub): New function.
686 (s390x_emit_mul): New function.
687 (s390x_emit_lsh): New function.
688 (s390x_emit_rsh_signed): New function.
689 (s390x_emit_rsh_unsigned): New function.
690 (s390x_emit_ext): New function.
691 (s390x_emit_log_not): New function.
692 (s390x_emit_bit_and): New function.
693 (s390x_emit_bit_or): New function.
694 (s390x_emit_bit_xor): New function.
695 (s390x_emit_bit_not): New function.
696 (s390x_emit_equal): New function.
697 (s390x_emit_less_signed): New function.
698 (s390x_emit_less_unsigned): New function.
699 (s390x_emit_ref): New function.
700 (s390x_emit_if_goto): New function.
701 (s390x_emit_const): New function.
702 (s390x_emit_call): New function.
703 (s390x_emit_reg): New function.
704 (s390x_emit_pop): New function.
705 (s390x_emit_stack_flush): New function.
706 (s390x_emit_zero_ext): New function.
707 (s390x_emit_swap): New function.
708 (s390x_emit_stack_adjust): New function.
709 (s390x_emit_int_call_1): New function.
710 (s390x_emit_void_call_2): New function.
711 (s390x_emit_eq_goto): New function.
712 (s390x_emit_ne_goto): New function.
713 (s390x_emit_lt_goto): New function.
714 (s390x_emit_le_goto): New function.
715 (s390x_emit_gt_goto): New function.
716 (s390x_emit_ge_goto): New function.
717 (s390_emit_ops): New function.
718 (struct linux_target_ops): Fill in emit_ops hook.
719
720 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
721
722 PR 18377
723 * Makefile.in: Add s390 IPA files.
724 * configure.srv: Build IPA for s390.
725 * linux-s390-ipa.c: New file.
726 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
727 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
728 (tdesc_s390_linux32): Likewise.
729 (init_registers_s390_linux32v1): Likewise.
730 (tdesc_s390_linux32v1): Likewise.
731 (init_registers_s390_linux32v2): Likewise.
732 (tdesc_s390_linux32v2): Likewise.
733 (init_registers_s390_linux64): Likewise.
734 (tdesc_s390_linux64): Likewise.
735 (init_registers_s390_linux64v1): Likewise.
736 (tdesc_s390_linux64v1): Likewise.
737 (init_registers_s390_linux64v2): Likewise.
738 (tdesc_s390_linux64v2): Likewise.
739 (init_registers_s390_te_linux64): Likewise.
740 (tdesc_s390_te_linux64): Likewise.
741 (init_registers_s390_vx_linux64): Likewise.
742 (tdesc_s390_vx_linux64): Likewise.
743 (init_registers_s390_tevx_linux64): Likewise.
744 (tdesc_s390_tevx_linux64): Likewise.
745 (init_registers_s390x_linux64): Likewise.
746 (tdesc_s390x_linux64): Likewise.
747 (init_registers_s390x_linux64v1): Likewise.
748 (tdesc_s390x_linux64v1): Likewise.
749 (init_registers_s390x_linux64v2): Likewise.
750 (tdesc_s390x_linux64v2): Likewise.
751 (init_registers_s390x_te_linux64): Likewise.
752 (tdesc_s390x_te_linux64): Likewise.
753 (init_registers_s390x_vx_linux64): Likewise.
754 (tdesc_s390x_vx_linux64): Likewise.
755 (init_registers_s390x_tevx_linux64): Likewise.
756 (tdesc_s390x_tevx_linux64): Likewise.
757 (have_hwcap_s390_vx): New static variable.
758 (s390_arch_setup): Fill have_hwcap_s390_vx.
759 (s390_get_thread_area): New function.
760 (s390_ft_entry_gpr_esa): New const.
761 (s390_ft_entry_gpr_zarch): New const.
762 (s390_ft_entry_misc): New const.
763 (s390_ft_entry_fr): New const.
764 (s390_ft_entry_vr): New const.
765 (s390_ft_main_31): New const.
766 (s390_ft_main_64): New const.
767 (s390_ft_exit_fr): New const.
768 (s390_ft_exit_vr): New const.
769 (s390_ft_exit_misc): New const.
770 (s390_ft_exit_gpr_esa): New const.
771 (s390_ft_exit_gpr_zarch): New const.
772 (append_insns): New function.
773 (s390_relocate_instruction): New function.
774 (s390_install_fast_tracepoint_jump_pad): New function.
775 (s390_get_min_fast_tracepoint_insn_len): New function.
776 (s390_get_ipa_tdesc_idx): New function.
777 (struct linux_target_ops): Wire in the above functions.
778 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
779 * linux-s390-tdesc.h: New file.
780
781 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
782
783 * linux-s390-low.c (s390_supports_tracepoints): New function.
784 (struct linux_target_ops): Fill supports_tracepoints hook.
785
786 2016-03-18 Yao Qi <yao.qi@linaro.org>
787
788 * linux-low.c (lwp_signal_can_be_delivered): New function.
789 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
790
791 2016-03-18 Yao Qi <yao.qi@linaro.org>
792
793 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
794 0 if signal is enqueued. Remove 'signal' from one debugging
795 message. Move one debugging message to some lines below.
796 Remove code setting 'signal' to 0.
797
798 2016-03-18 Yao Qi <yao.qi@linaro.org>
799
800 * linux-low.c (linux_low_filter_event): Remove redundant
801 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
802
803 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
804
805 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
806 (struct linux_target_ops): Wire in the above.
807
808 2016-03-03 Yao Qi <yao.qi@linaro.org>
809
810 * linux-low.c: Update comments to start_step_over.
811
812 2016-03-03 Yao Qi <yao.qi@linaro.org>
813
814 PR server/19736
815 * linux-low.c (handle_extended_wait): Set child suspended
816 if event_lwp->bp_reinsert isn't zero.
817
818 2016-03-02 Yao Qi <yao.qi@linaro.org>
819
820 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
821 enqueue_pending_signal.
822
823 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
824
825 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
826 is actually loaded.
827
828 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
829
830 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
831 (s390_regmap_3264) [!__s390x__]: New global.
832 (s390_collect_ptrace_register): Skip map entries containing -1.
833 (s390_supply_ptrace_register): Ditto.
834 (s390_fill_gprs_high): New function.
835 (s390_store_gprs_high): New function.
836 (s390_regsets): Add NT_S390_HIGH_GPRS.
837 (s390_get_hwcap): Enable on 31-bit.
838 (have_hwcap_s390_high_gprs): Enable on 31-bit.
839 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
840 Detect NT_S390_HIGH_GPRS.
841 (s390_usrregs_info_3264): Enable on 31-bit.
842 (s390_regs_info): Enable regs_info_3264 on 31-bit.
843 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
844
845 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
846
847 PR gdb/13808
848 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
849 * configure.srv: Ditto.
850 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
851 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
852 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
853 (init_registers_amd64_linux): Remove prototype.
854 (tdesc_amd64_linux): Remove declaration.
855 (get_ipa_tdesc): New function.
856 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
857 initialize remaining tdescs.
858 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
859 (init_registers_i386_linux): Remove prototype.
860 (tdesc_i386_linux): Remove declaration.
861 (get_ipa_tdesc): New function.
862 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
863 initialize remaining tdescs.
864 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
865 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
866 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
867 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
868 (x86_get_ipa_tdesc_idx): New function.
869 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
870 * linux-x86-tdesc.h: New file.
871 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
872 (target_get_ipa_tdesc_idx): New macro.
873 * tracepoint.c (ipa_tdesc_idx): New macro.
874 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
875 (symbol_list): Add ipa_tdesc_idx.
876 (cmd_qtstart): Write ipa_tdesc_idx in the target.
877 (ipa_tdesc): Remove.
878 (ipa_tdesc_idx): New variable.
879 (get_context_regcache): Use get_ipa_tdesc.
880 (gdb_collect): Ditto.
881 (gdb_probe): Ditto.
882 * tracepoint.h (get_ipa_tdesc): New prototype.
883 (ipa_tdesc): Remove.
884
885 2016-02-24 Pedro Alves <palves@redhat.com>
886
887 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
888 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
889 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
890 Factor out common code between the USE_SIGTRAP_SIGINFO and
891 !USE_SIGTRAP_SIGINFO blocks.
892 (linux_low_filter_event): Call save_stop_reason instead of
893 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
894 Update comments.
895 (linux_wait_1): Update comments.
896
897 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
898
899 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
900 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
901 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
902 ppc_insert_point, ppc_remove_point.
903
904 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
905
906 * linux-s390-low.c (s390_supports_z_point_type): New function.
907 (struct linux_target_ops): Wire s390_supports_z_point_type in.
908
909 2016-02-16 Yao Qi <yao.qi@linaro.org>
910
911 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
912 PC. Get pc from regcache_read_pc.
913
914 2016-02-12 Yao Qi <yao.qi@linaro.org>
915
916 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
917 or linux_get_pc_32bit.
918 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
919
920 2016-02-12 Yao Qi <yao.qi@linaro.org>
921
922 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
923 arm_linux_get_next_pcs_fixup.
924
925 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
926
927 * tracepoint.c (x_tracepoint_action_download): Change
928 write_inferior_data_ptr to write_inferior_data_pointer.
929 (cmd_qtstart): Likewise.
930 (write_inferior_data_ptr): Remove.
931 (download_agent_expr): Change write_inferior_data_ptr to
932 write_inferior_data_pointer.
933 (download_tracepoint_1): Likewise.
934 (download_tracepoint): Likewise.
935 (download_trace_state_variables): Likewise.
936
937 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
938 Marcin Kościelnicki <koriakin@0x04.net>
939
940 * tracepoint.c (struct tracepoint_action_ops): Remove.
941 (struct tracepoint_action): Remove ops.
942 (m_tracepoint_action_download, r_tracepoint_action_download)
943 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
944 size and offset accordingly.
945 (m_tracepoint_action_ops, r_tracepoint_action_ops)
946 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
947 (tracepoint_action_send, tracepoint_action_download): New functions.
948 Helpers for trace action handlers.
949 (add_tracepoint_action): Remove setup actions ops.
950 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
951
952 2016-02-10 Yao Qi <yao.qi@linaro.org>
953
954 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
955
956 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
957
958 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
959 to AC_OUTPUT.
960 * configure: Regenerate.
961
962 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
963
964 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
965 void * to gdb_byte *.
966 * linux-low.c (siginfo_fixup): Likewise.
967 (linux_xfer_siginfo): Likewise.
968 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
969 Likewise.
970 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
971
972 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
973
974 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
975 to srv_tgtobj.
976 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
977 to srv_tgtobj.
978 * linux-x86-low.c [__x86_64__]: Include
979 "nat/amd64-linux-siginfo.h".
980 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
981 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
982 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
983 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
984 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
985 (cpt_si_fd, si_timerid, si_overrun): Move from
986 nat/amd64-linux-siginfo.c.
987 * Makefile.in (amd64-linux-siginfo.o:): New rule.
988
989 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
990
991 * server.c (skip_to_semicolon): Remove.
992 (process_point_options): Use strchrnul instead of
993 skip_to_semicolon.
994
995 2016-01-26 Yao Qi <yao.qi@linaro.org>
996
997 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
998 * linux-low.c (install_software_single_step_breakpoints): Don't
999 call regcache_read_pc.
1000 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1001 argument pc.
1002
1003 2016-01-26 Yao Qi <yao.qi@linaro.org>
1004
1005 * linux-low.c (install_software_single_step_breakpoints): Call
1006 regcache_read_pc instead of get_pc.
1007
1008 2016-01-26 Yao Qi <yao.qi@linaro.org>
1009
1010 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1011 (unblock_async_io): Rename to ...
1012 (block_unblock_async_io): ... it. New function.
1013 (enable_async_io): Don't install SIGIO handler. Unblock it
1014 instead.
1015 (disable_async_io): Don't ignore SIGIO. Block it instead.
1016 (initialize_async_io): Install SIGIO handler. Don't call
1017 unblock_async_io.
1018
1019 2016-01-26 Yao Qi <yao.qi@linaro.org>
1020
1021 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1022 first character is '\003', call *the_target->request_interrupt.
1023
1024 2016-01-25 Yao Qi <yao.qi@linaro.org>
1025
1026 * remote-utils.c (new_thread_notify): Remove.
1027 (dead_thread_notify): Likewise.
1028 * remote-utils.h (new_thread_notify): Remove declaration.
1029 (dead_thread_notify): Likewise.
1030
1031 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1032
1033 * gdb.trace/pending.exp: Fix expected message on continue.
1034
1035 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1036
1037 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1038 it works properly on big-endian machines where sizeof (CORE_ADDR)
1039 != sizeof (void *).
1040
1041 2016-01-21 Pedro Alves <palves@redhat.com>
1042
1043 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1044 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1045 * configure: Regenerate.
1046
1047 2016-01-21 Yao Qi <yao.qi@linaro.org>
1048
1049 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1050 is_thumb and set it according to CPSR saved on the stack.
1051 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1052 arm_sigreturn_next_pc.
1053
1054 2016-01-18 Yao Qi <yao.qi@linaro.org>
1055
1056 * linux-low.c (linux_set_pc_64bit): New function.
1057 (linux_get_pc_64bit): New function.
1058 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1059 Declare.
1060 * linux-sparc-low.c (debug_threads): Remove declaration.
1061 (sparc_get_pc): Remove.
1062 (the_low_target): Use linux_get_pc_64bit instead of
1063 sparc_get_pc.
1064 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1065 (the_low_target): Use linux_get_pc_64bit and
1066 linux_set_pc_64bit.
1067
1068 2016-01-18 Yao Qi <yao.qi@linaro.org>
1069
1070 * linux-arm-low.c (debug_threads): Remove declaration.
1071 (arm_get_pc, arm_set_pc): Remove.
1072 (the_low_target): Use linux_get_pc_32bit and
1073 linux_set_pc_32bit.
1074 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1075 (the_low_target): Use linux_get_pc_32bit and
1076 linux_set_pc_32bit.
1077 * linux-cris-low.c (debug_threads): Remove declaration.
1078 (cris_get_pc, cris_set_pc,): Remove.
1079 (the_low_target): Use linux_get_pc_32bit and
1080 linux_set_pc_32bit.
1081 * linux-crisv32-low.c (debug_threads): Remove declaration.
1082 (cris_get_pc, cris_set_pc): Remove.
1083 (the_low_target): Use linux_get_pc_32bit and
1084 linux_set_pc_32bit.
1085 * linux-low.c: Include inttypes.h.
1086 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1087 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1088 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1089 (the_low_target): Use linux_get_pc_32bit and
1090 linux_set_pc_32bit.
1091 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1092 (the_low_target): Use linux_get_pc_32bit and
1093 linux_set_pc_32bit.
1094 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1095 (the_low_target): Use linux_get_pc_32bit and
1096 linux_set_pc_32bit.
1097 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1098 (the_low_target): Use linux_get_pc_32bit and
1099 linux_set_pc_32bit.
1100 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1101 (the_low_target): Use linux_get_pc_32bit and
1102 linux_set_pc_32bit.
1103
1104 2016-01-18 Gary Benson <gbenson@redhat.com>
1105
1106 * configure.ac (AC_FUNC_FORK): New check.
1107 * config.in: Regenerate.
1108 * configure: Likewise.
1109
1110 2016-01-14 Yao Qi <yao.qi@linaro.org>
1111
1112 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1113 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1114 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1115 arm_get_next_pcs_ctor.
1116
1117 2016-01-12 Josh Stone <jistone@redhat.com>
1118 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1119
1120 * inferiors.h: Include "gdb_vecs.h".
1121 (struct process_info): Add syscalls_to_catch.
1122 * inferiors.c (remove_process): Free syscalls_to_catch.
1123 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1124 syscall_return stops.
1125 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1126 * server.c (handle_general_set): Handle QCatchSyscalls.
1127 (handle_query): Report support for QCatchSyscalls.
1128 * target.h (struct target_ops): Add supports_catch_syscall.
1129 (target_supports_catch_syscall): New macro.
1130 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1131 (struct lwp_info): Add syscall_state.
1132 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1133 Maintain syscall_state and syscalls_to_catch across exec.
1134 (get_syscall_trapinfo): New function, proxy to the_low_target.
1135 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1136 (linux_low_filter_event): Toggle syscall_state entry/return for
1137 syscall traps, and set it ignored for all others.
1138 (gdb_catching_syscalls_p): New function.
1139 (gdb_catch_this_syscall_p): New function.
1140 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1141 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1142 (linux_supports_catch_syscall): New function.
1143 (linux_target_ops): Install it.
1144 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1145 (the_low_target): Install it.
1146
1147 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1148
1149 * acinclude.m4: Include new ../warning.m4 file.
1150 * configure: Regenerated.
1151 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1152
1153 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1154
1155 * ax.c (is_goto_target): Mark static.
1156 * linux-low.c (register_addr): Likewise.
1157 (linux_fetch_registers, linux_store_registers): Likewise.
1158 * mem-break.c (any_persistent_commands): Fix old prototype.
1159 (add_commands_to_breakpoint): Mark static.
1160 * regcache.c (find_register_by_name): Delete unused func.
1161 * remote-utils.c (hex_or_minus_one): Mark static.
1162 * server.c (monitor_show_help): Mark static.
1163 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1164 handle_v_requests): Likewise.
1165
1166 2016-01-12 Pedro Alves <palves@redhat.com>
1167
1168 Remove use of the registered trademark symbol throughout.
1169
1170 2016-01-08 Yao Qi <yao.qi@linaro.org>
1171
1172 * remote-utils.c (getpkt): If c is '\003', call target hook
1173 request_interrupt.
1174
1175 2016-01-06 Yao Qi <yao.qi@linaro.org>
1176
1177 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1178 linux-aarch32-low.c.
1179 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1180 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1181 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1182 (thumb2_breakpoint): Declare.
1183 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1184 linux-aarch32-low.h.
1185 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1186 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1187 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1188
1189 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1190
1191 * gdbreplay.c (gdbreplay_version): Change copyright year in
1192 version message.
1193 * server.c (gdbserver_version): Likewise.
1194
1195 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1196
1197 * server.c (crc32_table): Delete.
1198 (crc32): Use libiberty's xcrc32 function.
1199
1200 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1201
1202 * lynx-low.c (lynx_delete_thread_callback): New function.
1203 (lynx_mourn): Properly delete our process and all of its
1204 threads. Remove call to clear_inferiors.
1205
1206 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1207
1208 * target.c (thread_search_callback): Add check that
1209 the thread_stopped target callback is not NULL before
1210 calling it.
1211
1212 2015-12-21 Yao Qi <yao.qi@linaro.org>
1213
1214 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1215 arm breakpoint.
1216
1217 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1218
1219 * server.c (handle_query): Call target_supports_software_single_step.
1220
1221 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1222
1223 * linux-low.c (single_step): New function.
1224 (linux_resume_one_lwp_throw): Call single_step.
1225 (start_step_over): Likewise.
1226
1227 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1228
1229 * Makefile.in (SFILES): Append arch/arm-linux.c,
1230 arch/arm-get-next-pcs.c.
1231 (arm-linux.o): New rule.
1232 (arm-get-next-pcs.o): New rule.
1233 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1234 arm-linux.o.
1235 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1236 to linux-aarch32-low.c.
1237 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1238 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1239 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1240 (thumb2_breakpoint_len): Likewise.
1241 (arm_is_thumb_mode): Make non-static.
1242 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1243 from linux-aarch32-low.c.
1244 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1245 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1246 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1247 (thumb2_breakpoint_len): Likewise.
1248 (arm_is_thumb_mode): New declaration.
1249 * linux-arm-low.c: Include arch/arm-linux.h
1250 aarch/arm-get-next-pcs.h, sys/syscall.h.
1251 (get_next_pcs_ops): New struct.
1252 (get_next_pcs_addr_bits_remove): New function.
1253 (get_next_pcs_is_thumb): New function.
1254 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1255 (arm_sigreturn_next_pc): Likewise.
1256 (get_next_pcs_syscall_next_pc): Likewise.
1257 (arm_gdbserver_get_next_pcs): Likewise.
1258 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1259 Initialize.
1260 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1261 * server.h: Include gdb_vecs.h.
1262
1263 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1264
1265 * Makefile.in (SFILES): Append common/common-regcache.c.
1266 (OBS): Append common-regcache.o.
1267 (common-regcache.o): New rule.
1268 * regcache.c (init_register_cache): Initialize cache to
1269 REG_UNAVAILABLE.
1270 (regcache_raw_read_unsigned): New function.
1271 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1272 register_status enum.
1273
1274 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1275
1276 * linux-aarch64-low.c (the_low_targets): Rename
1277 breakpoint_reinsert_addr to get_next_pcs.
1278 * linux-arm-low.c (the_low_targets): Likewise.
1279 * linux-bfin-low.c (the_low_targets): Likewise.
1280 * linux-cris-low.c (the_low_targets): Likewise.
1281 * linux-crisv32-low.c (the_low_targets): Likewise.
1282 * linux-low.c (can_software_single_step): Likewise.
1283 (install_software_single_step_breakpoints): New function.
1284 (start_step_over): Use install_software_single_step_breakpoints.
1285 * linux-low.h: New CORE_ADDR vector.
1286 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1287 get_next_pcs.
1288 * linux-mips-low.c (the_low_targets): Likewise.
1289 * linux-nios2-low.c (the_low_targets): Likewise.
1290 * linux-sparc-low.c (the_low_targets): Likewise.
1291
1292 2015-12-17 Pedro Alves <palves@redhat.com>
1293
1294 * linux-low.c (linux_kill_one_lwp): Remove references to
1295 LinuxThreads.
1296 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1297 to 'kill'.
1298 (linux_init_signals): Delete.
1299 (initialize_low): Adjust.
1300 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1301
1302 2015-12-16 Pedro Alves <palves@redhat.com>
1303
1304 * configure.ac (compiler warning flags): When testing a
1305 -Wno-foo option, check whether -Wfoo works instead.
1306 * configure: Regenerate.
1307
1308 2015-12-11 Don Breazeal <donb@codesourcery.com>
1309
1310 * server.c (process_serial_event): Don't exit from gdbserver
1311 in remote mode if there are still active inferiors.
1312
1313 2015-12-11 Yao Qi <yao.qi@linaro.org>
1314
1315 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1316 arm_breakpoint_at if the process is 32-bit.
1317
1318 2015-12-11 Yao Qi <yao.qi@linaro.org>
1319
1320 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1321 arm breakpoint.
1322
1323 2015-12-07 Yao Qi <yao.qi@linaro.org>
1324
1325 * configure.srv: Append arm.o to srv_tgtobj for
1326 aarch64*-*-linux* target.
1327 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1328 from linux-arm-low.c.
1329 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1330 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1331 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1332 (thumb2_breakpoint_len): Likewise.
1333 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1334 (arm_breakpoint_kinds): Likewise.
1335 (arm_breakpoint_kind_from_pc): Likewise.
1336 (arm_sw_breakpoint_from_kind): Likewise.
1337 (arm_breakpoint_kind_from_current_state): Likewise.
1338 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1339 (arm_sw_breakpoint_from_kind): Declare.
1340 (arm_breakpoint_kind_from_current_state): Declare.
1341 (arm_breakpoint_at): Declare.
1342 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1343 arm_sw_breakpoint_from_kind if process is 32-bit.
1344 (aarch64_breakpoint_kind_from_pc): New function.
1345 (aarch64_breakpoint_kind_from_current_state): New function.
1346 (the_low_target): Initialize fields breakpoint_kind_from_pc
1347 and breakpoint_kind_from_current_state.
1348 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1349 linux-aarch32-low.c.
1350 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1351 (arm_breakpoint, arm_breakpoint_len): Likewise.
1352 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1353 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1354 (arm_is_thumb_mode): Likewise.
1355 (arm_breakpoint_at): Likewise.
1356 (arm_breakpoint_kind_from_pc): Likewise.
1357 (arm_sw_breakpoint_from_kind): Likewise.
1358 (arm_breakpoint_kind_from_current_state): Likewise.
1359
1360 Revert:
1361 2015-08-04 Yao Qi <yao.qi@linaro.org>
1362
1363 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1364 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1365 * server.c (extended_protocol): Remove "static".
1366 * server.h (extended_protocol): Declare it.
1367
1368 2015-12-04 Josh Stone <jistone@redhat.com>
1369
1370 * target.h (struct target_ops) <arch_setup>: Rename to ...
1371 (struct target_ops) <post_create_inferior>: ... this.
1372 (target_arch_setup): Rename to ...
1373 (target_post_create_inferior): ... this, calling post_create_inferior.
1374 * server.c (start_inferior): Update target_arch_setup calls to
1375 target_post_create_inferior.
1376 * linux-low.c (linux_low_ptrace_options): Forward declare.
1377 (linux_arch_setup): Update its comment for general use.
1378 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1379 (struct linux_target_ops): Use linux_post_create_inferior.
1380 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1381 to post_create_inferior.
1382 * nto-low.c (struct nto_target_ops): Likewise.
1383 * spu-low.c (struct spu_target_ops): Likewise.
1384 * win32-low.c (struct win32_target_ops): Likewise.
1385
1386 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1387
1388 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1389
1390 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1391
1392 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1393 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1394 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1395 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1396 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1397 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1398 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1399 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1400 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1401 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1402 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1403 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1404
1405 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1406
1407 * linux-low.c (linux_look_up_symbols): Don't call
1408 linux_supports_traceclone.
1409 * linux-low.h (thread_db_init): Remove use_events argument.
1410 * thread-db.c (thread_db_use_event): Remove global variable.
1411 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1412 (struct thread_db) <td_create_bp>: Remove field.
1413 (thread_db_create_event): Remove function.
1414 (thread_db_enable_reporting): Likewise.
1415 (find_one_thread): Don't check for thread_db_use_events.
1416 (attach_thread): Likewise.
1417 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1418 (try_thread_db_load_1): Don't check for thread_db_use_events.
1419 (thread_db_init): Remove use_events argument and thread events
1420 handling.
1421 (remove_thread_event_breakpoints): Remove function.
1422 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1423
1424 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1425
1426 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1427 New function.
1428 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1429 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1430 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1431 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1432 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1433 Initialize.
1434 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1435 New function.
1436 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1437 * linux-low.c (can_hardware_single_step): Use
1438 supports_hardware_single_step.
1439 (can_software_single_step): New function.
1440 (start_step_over): Call can_software_single_step.
1441 (linux_supports_hardware_single_step): New function.
1442 (struct target_ops) <supports_software_single_step>: Initialize.
1443 * linux-low.h (struct linux_target_ops)
1444 <supports_hardware_single_step>: Initialize.
1445 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1446 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1447 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1448 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1449 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1450 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1451 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1452 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1453 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1454 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1455 Initialize.
1456 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1457 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1458 Initialize.
1459 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1460 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1461 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1462 New function.
1463 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1464 * target.h (struct target_ops): <supports_software_single_step>:
1465 New field.
1466 (target_supports_software_single_step): New macro.
1467
1468 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1469
1470 * linux-low.c (linux_wait_1): Fix pc advance condition.
1471 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1472 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1473
1474 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1475
1476 * linux-arm-low.c (arm_is_thumb_mode): New function.
1477 (arm_breakpoint_at): Use arm_is_thumb_mode.
1478 (arm_breakpoint_kind_from_current_state): New function.
1479 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1480 Initialize.
1481 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1482 (linux_breakpoint_kind_from_current_state): New function.
1483 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1484 * linux-low.h (struct linux_target_ops)
1485 <breakpoint_kind_from_current_state>: New field.
1486 * target.h (struct target_ops): Likewise.
1487 (target_breakpoint_kind_from_current_state): New macro.
1488
1489 2015-11-30 Pedro Alves <palves@redhat.com>
1490
1491 * linux-low.c (linux_resume): Wake up the event loop before
1492 returning.
1493
1494 2015-11-30 Pedro Alves <palves@redhat.com>
1495
1496 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1497 check.
1498 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1499 to -1.
1500 * target.c (struct thread_search): New structure.
1501 (thread_search_callback): New function.
1502 (prev_general_thread): New global.
1503 (prepare_to_access_memory, done_accessing_memory): New functions.
1504 * target.h (prepare_to_access_memory, done_accessing_memory):
1505 Replace macros with function declarations.
1506
1507 2015-11-30 Pedro Alves <palves@redhat.com>
1508
1509 PR 14618
1510 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1511 report TARGET_WAITKIND_NO_RESUMED.
1512 * remote-utils.c (prepare_resume_reply): Handle
1513 TARGET_WAITKIND_NO_RESUMED.
1514 * server.c (report_no_resumed): New global.
1515 (handle_query) <qSupported>: Handle "no-resumed+". Report
1516 "no-resumed+" support.
1517 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1518 return error if the client doesn't support no-resumed events.
1519 (push_stop_notification): New function.
1520 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1521 events if the client supports them.
1522
1523 2015-11-30 Pedro Alves <palves@redhat.com>
1524
1525 * linux-low.c (thread_still_has_status_pending_p): Don't check
1526 vCont;t here.
1527 (lwp_resumed): New function.
1528 (status_pending_p_callback): Return early if the LWP is not
1529 supposed to be resumed.
1530
1531 2015-11-30 Pedro Alves <palves@redhat.com>
1532
1533 * linux-low.c (handle_extended_wait): Assert that the LWP's
1534 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1535 thread create events, leave the new child's status pending.
1536 (linux_low_filter_event): If GDB wants to hear about thread exit
1537 events, leave the LWP marked dead and don't delete it.
1538 (linux_wait_for_event_filtered): Don't check for thread exit.
1539 (filter_exit_event): New function.
1540 (linux_wait_1): Use it, when returning an exit event.
1541 (linux_resume_one_lwp_throw): Assert that the LWP's
1542 waitstatus is TARGET_WAITKIND_IGNORE.
1543 * remote-utils.c (prepare_resume_reply): Handle
1544 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1545 * server.c (report_thread_events): New global.
1546 (handle_general_set): Handle QThreadEvents.
1547 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1548 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1549 TARGET_WAITKIND_THREAD_EXITED.
1550 * server.h (report_thread_events): Declare.
1551
1552 2015-11-30 Pedro Alves <palves@redhat.com>
1553
1554 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1555 the thread's last_resume_kind was resume_stop.
1556
1557 2015-11-30 Pedro Alves <palves@redhat.com>
1558
1559 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1560 before returning.
1561
1562 2015-11-30 Pedro Alves <palves@redhat.com>
1563
1564 * server.c (handle_v_requests): Handle vCtrlC.
1565
1566 2015-11-30 Pedro Alves <palves@redhat.com>
1567
1568 * gdbthread.h (find_any_thread_of_pid): Declare.
1569 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1570 functions.
1571 * server.c (handle_query): If current_thread is NULL, look for
1572 another thread of the selected process.
1573
1574 2015-11-26 Daniel Colascione <dancol@dancol.org>
1575 Simon Marchi <simon.marchi@ericsson.com>
1576
1577 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1578 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1579 name in reply.
1580 * target.h (struct target_ops) <thread_name>: New field.
1581 (target_thread_name): New macro.
1582
1583 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1584
1585 * regcache.h (regcache_invalidate_pid): Add declaration.
1586 * regcache.c (regcache_invalidate_pid): New function, extracted
1587 from regcache_invalidate.
1588 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1589 Add trivial documentation comment.
1590 * lynx-low.c: Use regcache_invalidate_pid instead of
1591 regcache_invalidate.
1592
1593 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1594
1595 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1596 and Elf64_auxv_t if the target is Android.
1597
1598 2015-11-22 Doug Evans <xdje42@gmail.com>
1599
1600 * target.h: #include <sys/types.h>.
1601
1602 2015-11-19 Pedro Alves <palves@redhat.com>
1603
1604 * linux-low.c (linux_process_qsupported): Change prototype.
1605 Adjust.
1606 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1607 Change prototype.
1608 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1609 and adjust to loop over all features.
1610 * server.c (handle_query) <qSupported>: Adjust to call
1611 target_process_qsupported once, passing it a vector of unprocessed
1612 features.
1613 * target.h (struct target_ops) <process_qsupported>: Change
1614 prototype.
1615 (target_process_qsupported): Adjust.
1616
1617 2015-11-19 Pedro Alves <palves@redhat.com>
1618
1619 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1620 mode.
1621 * configure: Regenerate.
1622
1623 2015-11-19 Pedro Alves <palves@redhat.com>
1624
1625 * configure: Regenerate.
1626
1627 2015-11-19 Yao Qi <yao.qi@linaro.org>
1628
1629 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1630 type to uint32_t.
1631
1632 2015-11-19 Yao Qi <yao.qi@linaro.org>
1633
1634 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1635 (struct aarch64_operand): Move enum out.
1636
1637 2015-11-19 Yao Qi <yao.qi@linaro.org>
1638
1639 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1640 struct user_fpsimd_state *.
1641 (aarch64_store_fpregset): Likewise.
1642
1643 2015-11-19 Yao Qi <yao.qi@linaro.org>
1644
1645 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1646 struct user_pt_regs *.
1647 (aarch64_store_gregset): Likewise.
1648
1649 2015-11-18 Pedro Alves <palves@redhat.com>
1650
1651 * Makefile.in (all_object_files): Add $IPA_OBJS.
1652
1653 2015-11-17 Pedro Alves <palves@redhat.com>
1654
1655 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1656 GDB_SIGNAL_0 and gdb_signal_to_string.
1657
1658 2015-11-17 Pedro Alves <palves@redhat.com>
1659
1660 * win32-low.c (handle_output_debug_string): Remove parameter.
1661 (win32_kill): Remove our_status local and adjust call to
1662 handle_output_debug_string.
1663 (get_child_debug_event): Adjust call to
1664 handle_output_debug_string.
1665
1666 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1667
1668 * linux-mips-low.c (mips_fill_gregset): Add cast.
1669 (mips_store_gregset): Likewise.
1670 (mips_fill_fpregset): Likewise.
1671 (mips_store_fpregset): Likewise.
1672
1673 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1674
1675 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1676 priv.
1677
1678 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1679
1680 * linux-mips-low.c (mips_linux_new_thread): Change type of
1681 watch_type to enum target_hw_bp_type.
1682
1683 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1684
1685 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1686 Change return type to arm_hwbp_type.
1687
1688 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1689
1690 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1691 (arm_store_gregset): Likewise.
1692 * linux-arm-low.c (arm_get_hwcap): Likewise.
1693 (arm_read_description): Likewise.
1694
1695 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1696
1697 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1698
1699 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1700
1701 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1702 (ppc_fill_vsxregset): Likewise.
1703 (ppc_store_vsxregset): Likewise.
1704 (ppc_fill_vrregset): Likewise.
1705 (ppc_store_vrregset): Likewise.
1706 (ppc_fill_evrregset): Likewise.
1707 (ppc_store_evrregset): Likewise.
1708
1709 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1710
1711 * linux-ppc-low.c (ppc_usrregs_info): Remove
1712 forward-declaration.
1713 (ppc_arch_setup): Move lower in file.
1714
1715 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1716
1717 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1718 (ps_pdwrite): Likewise.
1719
1720 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1721
1722 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1723 to after assert checks.
1724
1725 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1726
1727 * proc-service.c (ps_pdread): Add/adjust casts.
1728 (ps_pdwrite): Add/adjust casts.
1729
1730 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1731
1732 * server.c (handle_search_memory_1): Cast return value of
1733 memmem.
1734
1735 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1736
1737 * server.c (write_qxfer_response): Change type of data to
1738 gdb_byte *.
1739
1740 2015-10-29 Pedro Alves <palves@redhat.com>
1741
1742 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1743
1744 2015-10-29 Pedro Alves <palves@redhat.com>
1745
1746 * tracepoint.c (clear_installed_tracepoints): Add casts.
1747
1748 2015-10-29 Pedro Alves <palves@redhat.com>
1749
1750 * server.c (handle_v_cont, process_serial_event): Add enum
1751 gdb_signal casts to signal parsing code.
1752
1753 2015-10-29 Pedro Alves <palves@redhat.com>
1754
1755 * linux-low.h (NULL_REGSET): Define.
1756 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1757 * linux-arm-low.c (arm_regsets): Likewise.
1758 * linux-crisv32-low.c (cris_regsets): Likewise.
1759 * linux-m68k-low.c (m68k_regsets): Likewise.
1760 * linux-mips-low.c (mips_regsets): Likewise.
1761 * linux-nios2-low.c (nios2_regsets): Likewise.
1762 * linux-ppc-low.c (ppc_regsets): Likewise.
1763 * linux-s390-low.c (s390_regsets): Likewise.
1764 * linux-sh-low.c (sh_regsets): Likewise.
1765 * linux-sparc-low.c (sparc_regsets): Likewise.
1766 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1767 * linux-tile-low.c (tile_regsets): Likewise.
1768 * linux-x86-low.c (x86_regsets): Likewise.
1769 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1770
1771 2015-10-29 Pedro Alves <palves@redhat.com>
1772
1773 * linux-low.h (NULL_REGSET): Define.
1774 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1775 * linux-arm-low.c (arm_regsets): Likewise.
1776 * linux-crisv32-low.c (cris_regsets): Likewise.
1777 * linux-m68k-low.c (m68k_regsets): Likewise.
1778 * linux-mips-low.c (mips_regsets): Likewise.
1779 * linux-nios2-low.c (nios2_regsets): Likewise.
1780 * linux-ppc-low.c (ppc_regsets): Likewise.
1781 * linux-s390-low.c (s390_regsets): Likewise.
1782 * linux-sh-low.c (sh_regsets): Likewise.
1783 * linux-sparc-low.c (sparc_regsets): Likewise.
1784 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1785 * linux-tile-low.c (tile_regsets): Likewise.
1786 * linux-x86-low.c (x86_regsets): Likewise.
1787 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1788
1789 2015-10-26 Doug Evans <dje@google.com>
1790
1791 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1792
1793 2015-10-26 Doug Evans <dje@google.com>
1794
1795 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1796
1797 2015-10-26 Doug Evans <dje@google.com>
1798
1799 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1800 for debug_printf.
1801 (attach_thread, find_new_threads_callback): Ditto.
1802
1803 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1804
1805 * mem-break.h (set_breakpoint_data): Remove.
1806
1807 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1808
1809 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1810 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1811 (initialize_low): Remove set_breakpoint_data call.
1812 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1813 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1814 (initialize_low): Remove set_breakpoint_data call.
1815 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1816 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1817 (initialize_low): Remove set_breakpoint_data call.
1818
1819 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1820
1821 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1822 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1823 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1824 * target.h (target_breakpoint_kind_from_pc): New macro.
1825
1826 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1827
1828 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1829 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1830 the default breakpoint kind.
1831
1832 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1833
1834 * linux-arm-low.c (arm_supports_z_point_type): Add software
1835 breakpoint support.
1836
1837 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1838
1839 * linux-arm-low.c: Refactor breakpoint definitions.
1840 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1841 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1842
1843 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1844
1845 * Makefile.in: Add arm.c/o.
1846 * configure.srv: Likewise.
1847 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1848 (arm_breakpoint_kind_from_pc): New function.
1849 (arm_sw_breakpoint_from_kind): Return proper kind.
1850 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1851
1852 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1853
1854 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1855 removal.
1856 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1857 (struct raw_breakpoint) <size>: Remove.
1858 (struct raw_breakpoint) <kind>: Add.
1859 (bp_size): New function.
1860 (bp_opcode): Likewise.
1861 (find_raw_breakpoint_at): Adjust for kind.
1862 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1863 (remove_memory_breakpoint): Adjust for kind call bp_size.
1864 (set_raw_breakpoint_at): Adjust for kind.
1865 (set_breakpoint): Likewise.
1866 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1867 (delete_raw_breakpoint): Adjust for kind.
1868 (delete_breakpoint): Likewise.
1869 (find_gdb_breakpoint): Likewise.
1870 (set_gdb_breakpoint_1): Likewise.
1871 (set_gdb_breakpoint): Likewise.
1872 (delete_gdb_breakpoint_1): Likewise.
1873 (delete_gdb_breakpoint): Likewise.
1874 (uninsert_raw_breakpoint): Likewise.
1875 (reinsert_raw_breakpoint): Likewise.
1876 (set_breakpoint_data): Remove.
1877 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1878 (check_mem_read): Adjust for kind call bp_size.
1879 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1880 (clone_one_breakpoint): Adjust for kind.
1881 * mem-break.h (set_gdb_breakpoint): Likewise.
1882 (delete_gdb_breakpoint): Likewise.
1883 * server.c (process_serial_event): Likewise.
1884
1885 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1886
1887 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1888 (struct linux_target_ops) <breakpoint>: Remove.
1889 (struct linux_target_ops) <breakpoint_len>: Remove.
1890 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1891 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1892 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1893 (arm_sw_breakpoint_from_kind): New function.
1894 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1895 (struct linux_target_ops) <breakpoint>: Remove.
1896 (struct linux_target_ops) <breakpoint_len>: Remove.
1897 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1898 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1899 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1900 (struct linux_target_ops) <breakpoint>: Remove.
1901 (struct linux_target_ops) <breakpoint_len>: Remove.
1902 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1903 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1904 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1905 (struct linux_target_ops) <breakpoint>: Remove.
1906 (struct linux_target_ops) <breakpoint_len>: Remove.
1907 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1908 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1909 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1910 and sw_breakpoint_from_kind to increment the pc.
1911 (linux_breakpoint_kind_from_pc): New function.
1912 (linux_sw_breakpoint_from_kind): New function.
1913 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1914 (initialize_low): Call breakpoint_kind_from_pc and
1915 sw_breakpoint_from_kind to replace breakpoint_data/len.
1916 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1917 New field.
1918 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1919 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1920 (struct linux_target_ops) <breakpoint>: Remove.
1921 (struct linux_target_ops) <breakpoint_len>: Remove.
1922 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1923 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1924 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1925 (struct linux_target_ops) <breakpoint>: Remove.
1926 (struct linux_target_ops) <breakpoint_len>: Remove.
1927 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1928 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1929 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1930 (struct linux_target_ops) <breakpoint>: Remove.
1931 (struct linux_target_ops) <breakpoint_len>: Remove.
1932 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1933 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1934 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1935 (struct linux_target_ops) <breakpoint>: Remove.
1936 (struct linux_target_ops) <breakpoint_len>: Remove.
1937 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1938 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1939 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1940 (struct linux_target_ops) <breakpoint>: Remove.
1941 (struct linux_target_ops) <breakpoint_len>: Remove.
1942 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1943 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1944 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1945 (struct linux_target_ops) <breakpoint>: Remove.
1946 (struct linux_target_ops) <breakpoint_len>: Remove.
1947 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1948 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1949 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1950 (struct linux_target_ops) <breakpoint>: Remove.
1951 (struct linux_target_ops) <breakpoint_len>: Remove.
1952 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1953 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1954 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1955 (struct linux_target_ops) <breakpoint>: Remove.
1956 (struct linux_target_ops) <breakpoint_len>: Remove.
1957 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1958 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1959 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1960 (struct linux_target_ops) <breakpoint>: Remove.
1961 (struct linux_target_ops) <breakpoint_len>: Remove.
1962 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1963 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1964 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1965 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1966 (struct linux_target_ops) <breakpoint>: Remove.
1967 (struct linux_target_ops) <breakpoint_len>: Remove.
1968 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1969 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1970 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1971 (struct linux_target_ops) <breakpoint>: Remove.
1972 (struct linux_target_ops) <breakpoint_len>: Remove.
1973 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1974 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1975
1976 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1977
1978 * linux-cris-low.c (cris_get_pc): Remove void arg.
1979
1980 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1981
1982 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1983 variable name.
1984
1985 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1986
1987 * inferiors.c (thread_pid_matches_callback): New function.
1988 (find_thread_process): New function.
1989 (remove_thread): Reset current_thread.
1990 (remove_process): Assert threads have been removed first.
1991
1992 2015-10-15 Yao Qi <yao.qi@linaro.org>
1993
1994 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1995 if it is 3.
1996 (aarch64_remove_point): Likewise.
1997 * regcache.c (regcache_register_size): New function.
1998
1999 2015-10-12 Yao Qi <yao.qi@linaro.org>
2000
2001 * linux-aarch64-low.c: Update all callers as emit_load_store
2002 is renamed to aarch64_emit_load_store.
2003
2004 2015-10-12 Yao Qi <yao.qi@linaro.org>
2005
2006 * linux-aarch64-low.c: Update all callers of function renaming
2007 from emit_insn to aarch64_emit_insn.
2008
2009 2015-10-12 Yao Qi <yao.qi@linaro.org>
2010
2011 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2012 arch/aarch64-insn.h.
2013 (struct aarch64_memory_operand): Likewise.
2014 (ENCODE): Likewise.
2015 (emit_insn): Move to arch/aarch64-insn.c.
2016 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2017 (emit_load_store): Move to arch/aarch64-insn.c.
2018 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2019 (can_encode_int32): Remove.
2020
2021 2015-10-12 Yao Qi <yao.qi@linaro.org>
2022
2023 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2024 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2025 (aarch64_relocate_instruction): Likewise.
2026 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2027 (struct aarch64_insn_visitor): Likewise.
2028
2029 2015-10-12 Yao Qi <yao.qi@linaro.org>
2030
2031 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2032 (struct aarch64_insn_visitor): New.
2033 (struct aarch64_insn_relocation_data): New.
2034 (aarch64_ftrace_insn_reloc_b): New function.
2035 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2036 (aarch64_ftrace_insn_reloc_cb): Likewise.
2037 (aarch64_ftrace_insn_reloc_tb): Likewise.
2038 (aarch64_ftrace_insn_reloc_adr): Likewise.
2039 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2040 (aarch64_ftrace_insn_reloc_others): Likewise.
2041 (visitor): New.
2042 (aarch64_relocate_instruction): Use visitor.
2043
2044 2015-10-12 Yao Qi <yao.qi@linaro.org>
2045
2046 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2047 int. Add argument buf.
2048 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2049 aarch64_relocate_instruction.
2050
2051 2015-10-12 Yao Qi <yao.qi@linaro.org>
2052
2053 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2054 argument insn. Remove local variable insn. Don't call
2055 target_read_uint32.
2056 (aarch64_install_fast_tracepoint_jump_pad): Call
2057 target_read_uint32.
2058
2059 2015-09-30 Yao Qi <yao.qi@linaro.org>
2060
2061 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2062 (emit_load_store_pair): Likewise.
2063
2064 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2065
2066 * dll.c (match_dll): Add cast(s).
2067 (unloaded_dll): Likewise.
2068 * linux-low.c (second_thread_of_pid_p): Likewise.
2069 (delete_lwp_callback): Likewise.
2070 (count_events_callback): Likewise.
2071 (select_event_lwp_callback): Likewise.
2072 (linux_set_resume_request): Likewise.
2073 * server.c (accumulate_file_name_length): Likewise.
2074 (emit_dll_description): Likewise.
2075 (handle_qxfer_threads_worker): Likewise.
2076 (visit_actioned_threads): Likewise.
2077 * thread-db.c (any_thread_of): Likewise.
2078 * tracepoint.c (same_process_p): Likewise.
2079 (match_blocktype): Likewise.
2080 (build_traceframe_info_xml): Likewise.
2081
2082 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2083
2084 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2085 assignment.
2086 (gdb_unparse_agent_expr): Likewise.
2087 * hostio.c (require_data): Likewise.
2088 (handle_pread): Likewise.
2089 * linux-low.c (disable_regset): Likewise.
2090 (fetch_register): Likewise.
2091 (store_register): Likewise.
2092 (get_dynamic): Likewise.
2093 (linux_qxfer_libraries_svr4): Likewise.
2094 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2095 (set_fast_tracepoint_jump): Likewise.
2096 (uninsert_fast_tracepoint_jumps_at): Likewise.
2097 (reinsert_fast_tracepoint_jumps_at): Likewise.
2098 (validate_inserted_breakpoint): Likewise.
2099 (clone_agent_expr): Likewise.
2100 * regcache.c (init_register_cache): Likewise.
2101 * remote-utils.c (putpkt_binary_1): Likewise.
2102 (decode_M_packet): Likewise.
2103 (decode_X_packet): Likewise.
2104 (look_up_one_symbol): Likewise.
2105 (relocate_instruction): Likewise.
2106 (monitor_output): Likewise.
2107 * server.c (handle_search_memory): Likewise.
2108 (handle_qxfer_exec_file): Likewise.
2109 (handle_qxfer_libraries): Likewise.
2110 (handle_qxfer): Likewise.
2111 (handle_query): Likewise.
2112 (handle_v_cont): Likewise.
2113 (handle_v_run): Likewise.
2114 (captured_main): Likewise.
2115 * target.c (write_inferior_memory): Likewise.
2116 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2117 * tracepoint.c (init_trace_buffer): Likewise.
2118 (add_tracepoint_action): Likewise.
2119 (add_traceframe): Likewise.
2120 (add_traceframe_block): Likewise.
2121 (cmd_qtdpsrc): Likewise.
2122 (cmd_qtdv): Likewise.
2123 (cmd_qtstatus): Likewise.
2124 (response_source): Likewise.
2125 (response_tsv): Likewise.
2126 (cmd_qtnotes): Likewise.
2127 (gdb_collect): Likewise.
2128 (initialize_tracepoint): Likewise.
2129
2130 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2131
2132 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2133 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2134 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2135 <NOP>: New.
2136 (enum aarch64_condition_codes): New enum.
2137 (w0): New static global.
2138 (fp): Likewise.
2139 (lr): Likewise.
2140 (struct aarch64_memory_operand) <type>: New
2141 MEMORY_OPERAND_POSTINDEX type.
2142 (postindex_memory_operand): New helper function.
2143 (emit_ret): New function.
2144 (emit_load_store_pair): New function, factored out of emit_stp
2145 with support for MEMORY_OPERAND_POSTINDEX.
2146 (emit_stp): Rewrite using emit_load_store_pair.
2147 (emit_ldp): New function.
2148 (emit_load_store): Likewise.
2149 (emit_ldr): Mention post-index instruction in comment.
2150 (emit_ldrh): New function.
2151 (emit_ldrb): New function.
2152 (emit_ldrsw): Mention post-index instruction in comment.
2153 (emit_str): Likewise.
2154 (emit_subs): New function.
2155 (emit_cmp): Likewise.
2156 (emit_and): Likewise.
2157 (emit_orr): Likewise.
2158 (emit_orn): Likewise.
2159 (emit_eor): Likewise.
2160 (emit_mvn): Likewise.
2161 (emit_lslv): Likewise.
2162 (emit_lsrv): Likewise.
2163 (emit_asrv): Likewise.
2164 (emit_mul): Likewise.
2165 (emit_sbfm): Likewise.
2166 (emit_sbfx): Likewise.
2167 (emit_ubfm): Likewise.
2168 (emit_ubfx): Likewise.
2169 (emit_csinc): Likewise.
2170 (emit_cset): Likewise.
2171 (emit_nop): Likewise.
2172 (emit_ops_insns): New helper function.
2173 (emit_pop): Likewise.
2174 (emit_push): Likewise.
2175 (aarch64_emit_prologue): New function.
2176 (aarch64_emit_epilogue): Likewise.
2177 (aarch64_emit_add): Likewise.
2178 (aarch64_emit_sub): Likewise.
2179 (aarch64_emit_mul): Likewise.
2180 (aarch64_emit_lsh): Likewise.
2181 (aarch64_emit_rsh_signed): Likewise.
2182 (aarch64_emit_rsh_unsigned): Likewise.
2183 (aarch64_emit_ext): Likewise.
2184 (aarch64_emit_log_not): Likewise.
2185 (aarch64_emit_bit_and): Likewise.
2186 (aarch64_emit_bit_or): Likewise.
2187 (aarch64_emit_bit_xor): Likewise.
2188 (aarch64_emit_bit_not): Likewise.
2189 (aarch64_emit_equal): Likewise.
2190 (aarch64_emit_less_signed): Likewise.
2191 (aarch64_emit_less_unsigned): Likewise.
2192 (aarch64_emit_ref): Likewise.
2193 (aarch64_emit_if_goto): Likewise.
2194 (aarch64_emit_goto): Likewise.
2195 (aarch64_write_goto_address): Likewise.
2196 (aarch64_emit_const): Likewise.
2197 (aarch64_emit_call): Likewise.
2198 (aarch64_emit_reg): Likewise.
2199 (aarch64_emit_pop): Likewise.
2200 (aarch64_emit_stack_flush): Likewise.
2201 (aarch64_emit_zero_ext): Likewise.
2202 (aarch64_emit_swap): Likewise.
2203 (aarch64_emit_stack_adjust): Likewise.
2204 (aarch64_emit_int_call_1): Likewise.
2205 (aarch64_emit_void_call_2): Likewise.
2206 (aarch64_emit_eq_goto): Likewise.
2207 (aarch64_emit_ne_goto): Likewise.
2208 (aarch64_emit_lt_goto): Likewise.
2209 (aarch64_emit_le_goto): Likewise.
2210 (aarch64_emit_gt_goto): Likewise.
2211 (aarch64_emit_ge_got): Likewise.
2212 (aarch64_emit_ops_impl): New static global variable.
2213 (aarch64_emit_ops): New target function, return
2214 &aarch64_emit_ops_impl.
2215 (struct linux_target_ops): Install it.
2216
2217 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2218
2219 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2220 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2221 aarch64-ipa.o.
2222 * linux-aarch64-ipa.c: New file.
2223 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2224 and endian.h.
2225 (aarch64_get_thread_area): New target method.
2226 (extract_signed_bitfield): New helper function.
2227 (aarch64_decode_ldr_literal): New function.
2228 (enum aarch64_opcodes): New enum.
2229 (struct aarch64_register): New struct.
2230 (struct aarch64_operand): New struct.
2231 (x0): New static global.
2232 (x1): Likewise.
2233 (x2): Likewise.
2234 (x3): Likewise.
2235 (x4): Likewise.
2236 (w2): Likewise.
2237 (ip0): Likewise.
2238 (sp): Likewise.
2239 (xzr): Likewise.
2240 (aarch64_register): New helper function.
2241 (register_operand): Likewise.
2242 (immediate_operand): Likewise.
2243 (struct aarch64_memory_operand): New struct.
2244 (offset_memory_operand): New helper function.
2245 (preindex_memory_operand): Likewise.
2246 (enum aarch64_system_control_registers): New enum.
2247 (ENCODE): New macro.
2248 (emit_insn): New helper function.
2249 (emit_b): New function.
2250 (emit_bcond): Likewise.
2251 (emit_cb): Likewise.
2252 (emit_tb): Likewise.
2253 (emit_blr): Likewise.
2254 (emit_stp): Likewise.
2255 (emit_ldp_q_offset): Likewise.
2256 (emit_stp_q_offset): Likewise.
2257 (emit_load_store): Likewise.
2258 (emit_ldr): Likewise.
2259 (emit_ldrsw): Likewise.
2260 (emit_str): Likewise.
2261 (emit_ldaxr): Likewise.
2262 (emit_stxr): Likewise.
2263 (emit_stlr): Likewise.
2264 (emit_data_processing_reg): Likewise.
2265 (emit_data_processing): Likewise.
2266 (emit_add): Likewise.
2267 (emit_sub): Likewise.
2268 (emit_mov): Likewise.
2269 (emit_movk): Likewise.
2270 (emit_mov_addr): Likewise.
2271 (emit_mrs): Likewise.
2272 (emit_msr): Likewise.
2273 (emit_sevl): Likewise.
2274 (emit_wfe): Likewise.
2275 (append_insns): Likewise.
2276 (can_encode_int32_in): New helper function.
2277 (aarch64_relocate_instruction): New function.
2278 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2279 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2280 (struct linux_target_ops): Install aarch64_get_thread_area,
2281 aarch64_install_fast_tracepoint_jump_pad and
2282 aarch64_get_min_fast_tracepoint_insn_len.
2283
2284 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2285
2286 * Makefile.in (aarch64-insn.o): New rule.
2287 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2288
2289 2015-09-21 Yao Qi <yao.qi@linaro.org>
2290
2291 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2292
2293 2015-09-21 Yao Qi <yao.qi@linaro.org>
2294
2295 * tracepoint.c (max_jump_pad_size): Remove.
2296
2297 2015-09-18 Yao Qi <yao.qi@linaro.org>
2298
2299 * linux-aarch64-low.c: Don't include sys/uio.h.
2300 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2301
2302 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2303
2304 * tracepoint.c (eval_result_type): Change prototype.
2305 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2306
2307 2015-09-15 Pedro Alves <palves@redhat.com>
2308
2309 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2310 Check whether to report exec events instead of checking whether
2311 multiprocess is enabled.
2312
2313 2015-09-15 Pedro Alves <palves@redhat.com>
2314
2315 PR remote/18965
2316 * remote-utils.c (prepare_resume_reply): Merge
2317 TARGET_WAITKIND_VFORK_DONE switch case with the
2318 TARGET_WAITKIND_FORKED case.
2319
2320 2015-09-15 Yao Qi <yao.qi@linaro.org>
2321
2322 * server.c (handle_query): Check string comparison using
2323 "else if" instead of "if".
2324
2325 2015-09-15 Yao Qi <yao.qi@linaro.org>
2326
2327 * server.c (vCont_supported): New global variable.
2328 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2329 matches. Append ";vContSupported+" to own_buf.
2330 (handle_v_requests): Append ";s;S" to own_buf if target supports
2331 hardware single step or vCont_supported is false.
2332 (capture_main): Set vCont_supported to zero.
2333
2334 2015-09-15 Yao Qi <yao.qi@linaro.org>
2335
2336 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2337 it to ...
2338 (linux_supports_hardware_single_step): ... New function.
2339 (linux_target_ops): Update.
2340 * lynx-low.c (lynx_target_ops): Set field
2341 supports_hardware_single_step to target_can_do_hardware_single_step.
2342 * nto-low.c (nto_target_ops): Likewise.
2343 * spu-low.c (spu_target_ops): Likewise.
2344 * win32-low.c (win32_target_ops): Likewise.
2345 * target.c (target_can_do_hardware_single_step): New function.
2346 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2347 Remove. <supports_hardware_single_step>: New field.
2348 (target_supports_conditional_breakpoints): Remove.
2349 (target_supports_hardware_single_step): New macro.
2350 (target_can_do_hardware_single_step): Declare.
2351 * server.c (handle_query): Use target_supports_hardware_single_step
2352 instead of target_supports_conditional_breakpoints.
2353
2354 2015-09-15 Yao Qi <yao.qi@linaro.org>
2355
2356 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2357 function.
2358 (struct linux_target_ops the_low_target): Install
2359 aarch64_linux_siginfo_fixup.
2360
2361 2015-09-11 Don Breazeal <donb@codesourcery.com>
2362 Luis Machado <lgustavo@codesourcery.com>
2363
2364 * linux-low.c (linux_mourn): Static declaration.
2365 (linux_arch_setup): Move in front of
2366 handle_extended_wait.
2367 (linux_arch_setup_thread): New function.
2368 (handle_extended_wait): Handle exec events. Call
2369 linux_arch_setup_thread. Make event_lwp argument a
2370 pointer-to-a-pointer.
2371 (check_zombie_leaders): Do not check stopped threads.
2372 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2373 (linux_low_filter_event): Add lwp and thread for exec'ing
2374 non-leader thread if leader thread has been deleted.
2375 Refactor code into linux_arch_setup_thread and call it.
2376 Pass child lwp pointer by reference to handle_extended_wait.
2377 (linux_wait_for_event_filtered): Update comment.
2378 (linux_wait_1): Prevent clobbering exec event status.
2379 (linux_supports_exec_events): New function.
2380 (linux_target_ops) <supports_exec_events>: Initialize new member.
2381 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2382 new member.
2383 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2384 * server.c (report_exec_events): New global variable.
2385 (handle_query): Handle qSupported query for exec-events feature.
2386 (captured_main): Initialize report_exec_events.
2387 * server.h (report_exec_events): Declare new global variable.
2388 * target.h (struct target_ops) <supports_exec_events>: New
2389 member.
2390 (target_supports_exec_events): New macro.
2391 * win32-low.c (win32_target_ops) <supports_exec_events>:
2392 Initialize new member.
2393
2394 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2395
2396 * linux-low.c (linux_low_enable_btrace): Remove.
2397 (linux_target_ops): Replace linux_low_enable_btrace with
2398 linux_enable_btrace.
2399
2400 2015-09-03 Yao Qi <yao.qi@linaro.org>
2401
2402 * linux-aarch64-low.c (aarch64_insert_point): Call
2403 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2404 returns true.
2405
2406 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2407
2408 * linux-low.c (check_stopped_by_breakpoint): Use
2409 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2410
2411 2015-08-27 Pedro Alves <palves@redhat.com>
2412
2413 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2414
2415 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2416
2417 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2418 the XNEW-family equivalent.
2419 (compile_bytecodes): Likewise.
2420 * dll.c (loaded_dll): Likewise.
2421 * event-loop.c (append_callback_event): Likewise.
2422 (create_file_handler): Likewise.
2423 (create_file_event): Likewise.
2424 * hostio.c (handle_open): Likewise.
2425 * inferiors.c (add_thread): Likewise.
2426 (add_process): Likewise.
2427 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2428 * linux-arm-low.c (arm_new_process): Likewise.
2429 (arm_new_thread): Likewise.
2430 * linux-low.c (add_to_pid_list): Likewise.
2431 (linux_add_process): Likewise.
2432 (handle_extended_wait): Likewise.
2433 (add_lwp): Likewise.
2434 (enqueue_one_deferred_signal): Likewise.
2435 (enqueue_pending_signal): Likewise.
2436 (linux_resume_one_lwp_throw): Likewise.
2437 (linux_resume_one_thread): Likewise.
2438 (linux_read_memory): Likewise.
2439 (linux_write_memory): Likewise.
2440 * linux-mips-low.c (mips_linux_new_process): Likewise.
2441 (mips_linux_new_thread): Likewise.
2442 (mips_add_watchpoint): Likewise.
2443 * linux-x86-low.c (initialize_low_arch): Likewise.
2444 * lynx-low.c (lynx_add_process): Likewise.
2445 * mem-break.c (set_raw_breakpoint_at): Likewise.
2446 (set_breakpoint): Likewise.
2447 (add_condition_to_breakpoint): Likewise.
2448 (add_commands_to_breakpoint): Likewise.
2449 (clone_agent_expr): Likewise.
2450 (clone_one_breakpoint): Likewise.
2451 * regcache.c (new_register_cache): Likewise.
2452 * remote-utils.c (look_up_one_symbol): Likewise.
2453 * server.c (queue_stop_reply): Likewise.
2454 (start_inferior): Likewise.
2455 (queue_stop_reply_callback): Likewise.
2456 (handle_target_event): Likewise.
2457 * spu-low.c (fetch_ppc_memory): Likewise.
2458 (store_ppc_memory): Likewise.
2459 * target.c (set_target_ops): Likewise.
2460 * thread-db.c (thread_db_load_search): Likewise.
2461 (try_thread_db_load_1): Likewise.
2462 * tracepoint.c (add_tracepoint): Likewise.
2463 (add_tracepoint_action): Likewise.
2464 (create_trace_state_variable): Likewise.
2465 (cmd_qtdpsrc): Likewise.
2466 (cmd_qtro): Likewise.
2467 (add_while_stepping_state): Likewise.
2468 * win32-low.c (child_add_thread): Likewise.
2469 (get_image_name): Likewise.
2470
2471 2015-08-25 Yao Qi <yao.qi@linaro.org>
2472
2473 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2474
2475 2015-08-25 Yao Qi <yao.qi@linaro.org>
2476
2477 * Makefile.in (aarch64-linux.o): New rule.
2478 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2479 srv_tgtobj.
2480 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2481 (aarch64_init_debug_reg_state): Make it extern.
2482 (aarch64_linux_prepare_to_resume): Remove.
2483
2484 2015-08-25 Yao Qi <yao.qi@linaro.org>
2485
2486 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2487 lwp_arch_private_info and ptid_of_lwp.
2488
2489 2015-08-25 Yao Qi <yao.qi@linaro.org>
2490
2491 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2492 Find proc_info by find_process_pid. All callers updated.
2493
2494 2015-08-25 Yao Qi <yao.qi@linaro.org>
2495
2496 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2497 Remove.
2498 (debug_reg_change_callback): Remove.
2499 (aarch64_notify_debug_reg_change): Remove.
2500
2501 2015-08-25 Yao Qi <yao.qi@linaro.org>
2502
2503 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2504 Call current_lwp_ptid.
2505
2506 2015-08-25 Yao Qi <yao.qi@linaro.org>
2507
2508 * linux-aarch64-low.c (debug_reg_change_callback): Use
2509 debug_printf.
2510
2511 2015-08-25 Yao Qi <yao.qi@linaro.org>
2512
2513 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2514
2515 2015-08-25 Yao Qi <yao.qi@linaro.org>
2516
2517 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2518
2519 2015-08-25 Yao Qi <yao.qi@linaro.org>
2520
2521 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2522 the code.
2523
2524 2015-08-25 Yao Qi <yao.qi@linaro.org>
2525
2526 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2527 Remove.
2528 (debug_reg_change_callback): Remove argument entry and add argument
2529 lwp. Remove local variable thread. Don't print thread id in the
2530 debugging output. Don't check whether pid of thread equals to pid.
2531 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2532 iterate_over_lwps instead find_inferior.
2533
2534 2015-08-24 Pedro Alves <palves@redhat.com>
2535
2536 * inferiors.c (get_first_process): New function.
2537 * inferiors.h (get_first_process): New declaration.
2538 * remote-utils.c (read_ptid): Default to the first process in the
2539 list, instead of to the current thread's process.
2540
2541 2015-08-24 Pedro Alves <palves@redhat.com>
2542
2543 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2544 * event-loop.c: Likewise.
2545 * remote-utils.c: Likewise.
2546 * tracepoint.c: Likewise.
2547
2548 2015-08-24 Pedro Alves <palves@redhat.com>
2549
2550 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2551 ptid_get_lwp.
2552
2553 2015-08-21 Pedro Alves <palves@redhat.com>
2554
2555 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2556 instead of literal 1.
2557
2558 2015-08-21 Pedro Alves <palves@redhat.com>
2559
2560 * tdesc.c (default_description): Explicitly zero-initialize.
2561
2562 2015-08-21 Pedro Alves <palves@redhat.com>
2563
2564 PR gdb/18749
2565 * inferiors.c (remove_thread): Discard any pending stop reply for
2566 this thread.
2567 * server.c (remove_all_on_match_pid): Rename to ...
2568 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2569 instead of a pid.
2570 (discard_queued_stop_replies): Change parameter to a ptid. Now
2571 extern.
2572 (handle_v_kill, kill_inferior_callback, captured_main)
2573 (process_serial_event): Adjust.
2574 * server.h (discard_queued_stop_replies): Declare.
2575
2576 2015-08-21 Pedro Alves <palves@redhat.com>
2577
2578 * linux-low.c (wait_for_sigstop): Always switch to no thread
2579 selected if the previously current thread dies.
2580 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2581 process instead of the current thread's.
2582 * remote-utils.c (input_interrupt): Don't check if there's no
2583 current thread.
2584 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2585 current thread to the general thread fails, error out.
2586 (handle_qxfer_auxv, handle_qxfer_libraries)
2587 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2588 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2589 (handle_query): Check if there's a thread selected instead of
2590 checking whether there's any thread in the thread list.
2591 (handle_qxfer_threads, handle_qxfer_btrace)
2592 (handle_qxfer_btrace_conf): Don't error out early if there's no
2593 thread in the thread list.
2594 (handle_v_cont, myresume): Don't set the current thread to the
2595 continue thread.
2596 (process_serial_event) <Hg handling>: Also set thread_id if the
2597 previous general thread is still alive.
2598 (process_serial_event) <g/G handling>: If setting the current
2599 thread to the general thread fails, error out.
2600 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2601 thread's lwp instead of the current thread's.
2602 * target.c (set_desired_thread): If the desired thread was not
2603 found, leave the current thread pointing to NULL. Return an int
2604 (boolean) indicating success.
2605 * target.h (set_desired_thread): Change return type to int.
2606
2607 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2608
2609 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2610 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2611 #includes.
2612 (ps_get_thread_area): New function.
2613
2614 2015-08-19 Gary Benson <gbenson@redhat.com>
2615
2616 * hostio.c (handle_pread): Do not attempt to read more data
2617 than hostio_reply_with_data can fit in a packet.
2618
2619 2015-08-18 Joel Brobecker <brobecker@adacore.com>
2620
2621 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2622
2623 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2624
2625 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2626
2627 2015-08-06 Pedro Alves <palves@redhat.com>
2628
2629 * tracepoint.c (expr_eval_result): Now an int.
2630
2631 2015-08-06 Pedro Alves <palves@redhat.com>
2632
2633 * gdbthread.h (struct regcache): Forward declare.
2634 (struct thread_info) <regcache_data>: Now a struct regcache
2635 pointer.
2636 * inferiors.c (inferior_regcache_data)
2637 (set_inferior_regcache_data): Now work with struct regcache
2638 pointers.
2639 * inferiors.h (struct regcache): Forward declare.
2640 (inferior_regcache_data, set_inferior_regcache_data): Now work
2641 with struct regcache pointers.
2642 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2643 (free_register_cache_thread): Remove struct regcache pointer
2644 casts.
2645
2646 2015-08-06 Pedro Alves <palves@redhat.com>
2647
2648 * server.c (captured_main): On error, print the exception message
2649 to stderr, and if run_once is set, throw a quit.
2650
2651 2015-08-06 Pedro Alves <palves@redhat.com>
2652
2653 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2654 the current thread.
2655
2656 2015-08-06 Pedro Alves <palves@redhat.com>
2657
2658 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2659 reading beyond the passed in buffer length.
2660
2661 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2662
2663 * tracepoint.c (symbol_list) <required>: Remove.
2664
2665 2015-08-06 Pedro Alves <palves@redhat.com>
2666
2667 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2668 count if stopping and suspending threads.
2669 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2670 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2671 (linux_detach): Complete an ongoing step-over.
2672 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2673 throughout.
2674 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2675 (linux_wait_1): If passing a signal to the inferior after
2676 finishing a step-over, unsuspend and re-resume all lwps. If we
2677 see a single-step event but the thread should be continuing, don't
2678 pass the trap to gdb.
2679 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2680 internal_error instead of gdb_assert.
2681 (enqueue_pending_signal): New function.
2682 (check_ptrace_stopped_lwp_gone): Add debug output.
2683 (start_step_over): Use internal_error instead of gdb_assert.
2684 (complete_ongoing_step_over): New function.
2685 (linux_resume_one_thread): Don't resume a suspended thread.
2686 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2687 it stepping.
2688
2689 2015-08-06 Pedro Alves <palves@redhat.com>
2690
2691 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2692 (linux_thread_alive): Use lwp_is_marked_dead.
2693 (extended_event_reported): Delete.
2694 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2695 instead of extended_event_reported.
2696 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2697 as well.
2698 (lwp_is_marked_dead): New function.
2699 (lwp_running): Use lwp_is_marked_dead.
2700 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2701 comment.
2702
2703 2015-08-06 Pedro Alves <palves@redhat.com>
2704
2705 * linux-low.c (linux_wait_1): Move fork event output out of the
2706 !report_to_gdb check. Pass event_child->waitstatus to
2707 target_waitstatus_to_string instead of ourstatus.
2708
2709 2015-08-04 Yao Qi <yao.qi@linaro.org>
2710
2711 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2712 if current_thread is 32 bit.
2713
2714 2015-08-04 Yao Qi <yao.qi@linaro.org>
2715
2716 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2717 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2718 * server.c (extended_protocol): Remove "static".
2719 * server.h (extended_protocol): Declare it.
2720
2721 2015-08-04 Yao Qi <yao.qi@linaro.org>
2722
2723 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2724 both aarch64 and aarch32.
2725 (aarch64_set_pc): Likewise.
2726
2727 2015-08-04 Yao Qi <yao.qi@linaro.org>
2728
2729 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2730 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2731 arm-with-neon.xml to srv_xmlfiles.
2732 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2733 (is_64bit_tdesc): New function.
2734 (aarch64_linux_read_description): New function.
2735 (aarch64_arch_setup): Call aarch64_linux_read_description.
2736 (regs_info): Rename to regs_info_aarch64.
2737 (aarch64_regs_info): Return right regs_info.
2738 (initialize_low_arch): Call initialize_low_arch_aarch32.
2739
2740 2015-08-04 Yao Qi <yao.qi@linaro.org>
2741
2742 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2743 * linux-aarch32-low.c: New file.
2744 * linux-aarch32-low.h: New file.
2745 * linux-arm-low.c (arm_fill_gregset): Move it to
2746 linux-aarch32-low.c.
2747 (arm_store_gregset): Likewise.
2748 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2749 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2750 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2751 (regs_info): Rename to regs_info_arm.
2752 (arm_regs_info): Return regs_info_aarch32 if
2753 have_ptrace_getregset is 1 and target description is
2754 arm_with_neon or arm_with_vfpv3.
2755 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2756 Call initialize_low_arch_aarch32 instead.
2757
2758 2015-08-04 Yao Qi <yao.qi@linaro.org>
2759
2760 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2761 * linux-low.c: ... here.
2762 * linux-low.h (have_ptrace_getregset): Declare it.
2763
2764 2015-08-04 Pedro Alves <palves@redhat.com>
2765
2766 * thread-db.c (struct thread_db): Use new typedefs.
2767 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2768 CHK calls.
2769 (disable_thread_event_reporting): Cast result of dlsym to
2770 destination function pointer type.
2771 (thread_db_mourn): Use td_ta_delete_ftype.
2772
2773 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2774
2775 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2776 arch variant.
2777 (CDX_BREAKPOINT): Define for R2.
2778 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2779 (the_low_target): Add comments.
2780
2781 2015-07-30 Yao Qi <yao.qi@linaro.org>
2782
2783 * linux-arm-low.c (arm_hwcap): Remove it.
2784 (arm_read_description): New local variable arm_hwcap. Don't
2785 set arm_hwcap to zero.
2786
2787 2015-07-30 Yao Qi <yao.qi@linaro.org>
2788
2789 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2790 Use regcache->tdesc instead.
2791 (arm_store_wmmxregset): Likewise.
2792 (arm_fill_vfpregset): Likewise.
2793 (arm_store_vfpregset): Likewise.
2794
2795 2015-07-30 Yao Qi <yao.qi@linaro.org>
2796
2797 * linux-arm-low.c: Include arch/arm.h.
2798 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2799 (arm_store_gregset): Likewise.
2800
2801 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2802
2803 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2804 ptrace's 4th parameter.
2805
2806 2015-07-27 Yao Qi <yao.qi@linaro.org>
2807
2808 * configure.srv (case aarch64*-*-linux*): Don't set
2809 srv_linux_usrregs.
2810
2811 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2812
2813 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2814 sys/ptrace.h.
2815 * linux-arm-low.c: Likewise.
2816 * linux-cris-low.c: Likewise.
2817 * linux-crisv32-low.c: Likewise.
2818 * linux-low.c: Likewise.
2819 * linux-m68k-low.c: Likewise.
2820 * linux-mips-low.c: Likewise.
2821 * linux-nios2-low.c: Likewise.
2822 * linux-s390-low.c: Likewise.
2823 * linux-sparc-low.c: Likewise.
2824 * linux-tic6x-low.c: Likewise.
2825 * linux-tile-low.c: Likewise.
2826 * linux-x86-low.c: Likewise.
2827
2828 2015-07-24 Pedro Alves <palves@redhat.com>
2829
2830 * config.in: Regenerate.
2831 * configure: Regenerate.
2832
2833 2015-07-24 Pedro Alves <palves@redhat.com>
2834
2835 * acinclude.m4: Include ../ptrace.m4.
2836 * configure.ac: Call GDB_AC_PTRACE.
2837 * config.in, configure: Regenerate.
2838
2839 2015-07-24 Yao Qi <yao.qi@linaro.org>
2840
2841 * linux-low.c (linux_create_inferior): Remove setting to
2842 proc->priv->new_inferior.
2843 (linux_attach): Likewise.
2844 (linux_low_filter_event): Likewise.
2845 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2846
2847 2015-07-24 Yao Qi <yao.qi@linaro.org>
2848
2849 * linux-low.c (linux_arch_setup): New function.
2850 (linux_low_filter_event): If proc->tdesc is NULL and
2851 proc->attached is true, call the_low_target.arch_setup.
2852 Otherwise, keep status pending, and return.
2853 (linux_resume_one_lwp_throw): Don't call get_pc if
2854 thread->while_stepping isn't NULL. Don't call
2855 get_thread_regcache if proc->tdesc is NULL.
2856 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2857 (linux_target_ops): Install arch_setup.
2858 * server.c (start_inferior): Call the_target->arch_setup.
2859 * target.h (struct target_ops) <arch_setup>: New field.
2860 (target_arch_setup): New marco.
2861 * lynx-low.c (lynx_target_ops): Update.
2862 * nto-low.c (nto_target_ops): Update.
2863 * spu-low.c (spu_target_ops): Update.
2864 * win32-low.c (win32_target_ops): Update.
2865
2866 2015-07-24 Yao Qi <yao.qi@linaro.org>
2867
2868 * linux-low.c (linux_add_process): Don't set
2869 proc->priv->new_inferior.
2870 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2871 (linux_attach): Likewise.
2872
2873 2015-07-24 Yao Qi <yao.qi@linaro.org>
2874
2875 * server.c (start_inferior): Code refactor.
2876
2877 2015-07-24 Yao Qi <yao.qi@linaro.org>
2878
2879 * server.c (process_serial_event): Set general_thread.
2880
2881 2015-07-21 Yao Qi <yao.qi@linaro.org>
2882
2883 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2884 aarch64_linux_get_debug_reg_capacity.
2885
2886 2015-07-17 Yao Qi <yao.qi@linaro.org>
2887
2888 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2889 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2890 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2891 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2892 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2893 (AARCH64_HWP_ALIGNMENT): Likewise.
2894 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2895 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2896 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2897 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2898 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2899 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2900 (struct aarch64_debug_reg_state): Likewise.
2901 (struct arch_lwp_info): Likewise.
2902 (aarch64_align_watchpoint): Likewise.
2903 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2904 (aarch64_watchpoint_length): Likewise.
2905 (aarch64_point_encode_ctrl_reg): Likewise
2906 (aarch64_point_is_aligned): Likewise.
2907 (aarch64_align_watchpoint): Likewise.
2908 (aarch64_linux_set_debug_regs):
2909 (aarch64_dr_state_insert_one_point): Likewise.
2910 (aarch64_dr_state_remove_one_point): Likewise.
2911 (aarch64_handle_breakpoint): Likewise.
2912 (aarch64_handle_aligned_watchpoint): Likewise.
2913 (aarch64_handle_unaligned_watchpoint): Likewise.
2914 (aarch64_handle_watchpoint): Likewise.
2915
2916 2015-07-17 Yao Qi <yao.qi@linaro.org>
2917
2918 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2919 and don't aarch64_get_debug_reg_state. All callers update.
2920 (aarch64_handle_aligned_watchpoint): Likewise.
2921 (aarch64_handle_unaligned_watchpoint): Likewise.
2922 (aarch64_handle_watchpoint): Likewise.
2923 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2924 (aarch64_remove_point): Likewise.
2925
2926 2015-07-17 Yao Qi <yao.qi@linaro.org>
2927
2928 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2929 debug_printf.
2930 (aarch64_handle_unaligned_watchpoint): Likewise.
2931
2932 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2933
2934 Revert the previous 3 commits:
2935 Move gdb_regex* to common/
2936 Move linux_find_memory_regions_full & co.
2937 gdbserver build-id attribute generator
2938
2939 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2940 Jan Kratochvil <jan.kratochvil@redhat.com>
2941
2942 gdbserver build-id attribute generator.
2943 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2944 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2945 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2946 (find_phdr): New.
2947 (get_dynamic): Use find_pdhr to traverse program headers.
2948 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2949 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2950 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2951 (get_hex_build_id): New.
2952 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2953 to reply XML document.
2954
2955 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2956 Jan Kratochvil <jan.kratochvil@redhat.com>
2957
2958 * target.c: Include target/target-utils.h and fcntl.h.
2959 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2960 (target_fileio_read_stralloc): New functions.
2961
2962 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2963
2964 * Makefile.in (OBS): Add gdb_regex.o.
2965 (gdb_regex.o): New.
2966 * config.in: Rebuilt.
2967 * configure: Rebuilt.
2968
2969 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2970 Jan Kratochvil <jan.kratochvil@redhat.com>
2971
2972 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2973 * Makefile.in (OBS): Add target-utils.o.
2974 (linux-maps.o, target-utils.o): New.
2975 * configure.srv (srv_linux_obj): Add linux-maps.o.
2976
2977 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2978
2979 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2980 function, return 1.
2981 (the_low_target): Install it.
2982
2983 2015-07-14 Pedro Alves <palves@redhat.com>
2984
2985 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2986 Instead, ignore ECHILD, and throw an error for other errnos.
2987
2988 2015-07-10 Pedro Alves <palves@redhat.com>
2989
2990 * event-loop.c (struct callback_event) <data>: Change type to
2991 gdb_client_data instance instead of gdb_client_data pointer.
2992 (append_callback_event): Adjust.
2993
2994 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2995
2996 * linux-aarch64-low.c: Add comments for each linux_target_ops
2997 method. Remove comments already covered in target_ops and
2998 linux_target_ops definitions.
2999 (the_low_target): Add comments for each unimplemented method.
3000
3001 2015-07-09 Yao Qi <yao.qi@linaro.org>
3002
3003 * linux-aarch64-low.c (aarch64_regmap): Remove.
3004 (aarch64_usrregs_info): Remove.
3005 (regs_info): Set field usrregs to NULL.
3006
3007 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3008
3009 * linux-low.c: Include "rsp-low.h"
3010 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3011 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3012 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3013 (handle_btrace_enable_pt): New.
3014 (handle_btrace_general_set): Support "pt".
3015 (handle_btrace_conf_general_set): Support "pt:size".
3016
3017 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3018
3019 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3020 Z_PACKET_SW_BP.
3021
3022 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3023
3024 * linux-aarch64-low.c: Remove comment about endianness.
3025 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3026 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3027 memcmp.
3028
3029 2015-06-24 Gary Benson <gbenson@redhat.com>
3030
3031 * linux-i386-ipa.c (stdint.h): Do not include.
3032 * lynx-i386-low.c (stdint.h): Likewise.
3033 * lynx-ppc-low.c (stdint.h): Likewise.
3034 * mem-break.c (stdint.h): Likewise.
3035 * thread-db.c (stdint.h): Likewise.
3036 * tracepoint.c (stdint.h): Likewise.
3037 * win32-low.c (stdint.h): Likewise.
3038
3039 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3040
3041 * server.c (write_qxfer_response): Update call to
3042 remote_escape_output.
3043
3044 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3045 Jan Kratochvil <jan.kratochvil@redhat.com>
3046
3047 Merge multiple hex conversions.
3048 * gdbreplay.c (tohex): Rename to 'fromhex'.
3049 (logchar): Use fromhex.
3050
3051 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3052
3053 * server.c (handle_qxfer_libraries): Set `version' attribute for
3054 <library-list>.
3055
3056 2015-06-10 Gary Benson <gbenson@redhat.com>
3057
3058 * target.h (struct target_ops) <multifs_open>: New field.
3059 <multifs_unlink>: Likewise.
3060 <multifs_readlink>: Likewise.
3061 * linux-low.c (nat/linux-namespaces.h): New include.
3062 (linux_target_ops): Initialize the_target->multifs_open,
3063 the_target->multifs_unlink and the_target->multifs_readlink.
3064 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3065 * hostio.c (hostio_fs_pid): New static variable.
3066 (hostio_handle_new_gdb_connection): New function.
3067 (handle_setfs): Likewise.
3068 (handle_open): Use the_target->multifs_open as appropriate.
3069 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3070 (handle_readlink): Use the_target->multifs_readlink as
3071 appropriate.
3072 (handle_vFile): Handle vFile:setfs packets.
3073 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3074 after target_handle_new_gdb_connection.
3075
3076 2015-06-10 Gary Benson <gbenson@redhat.com>
3077
3078 * configure.ac (AC_CHECK_FUNCS): Add setns.
3079 * config.in: Regenerate.
3080 * configure: Likewise.
3081 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3082 (linux-namespaces.o): New rule.
3083 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3084
3085 2015-06-09 Gary Benson <gbenson@redhat.com>
3086
3087 * hostio.c (handle_open): Process mode argument with
3088 fileio_to_host_mode.
3089
3090 2015-06-01 Yao Qi <yao.qi@linaro.org>
3091
3092 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3093 * linux-x86-low.c: Likewise.
3094
3095 2015-05-28 Don Breazeal <donb@codesourcery.com>
3096
3097 * linux-low.c (handle_extended_wait): Initialize
3098 thread_info.last_resume_kind for new fork children.
3099
3100 2015-05-15 Pedro Alves <palves@redhat.com>
3101
3102 * target.h (target_handle_new_gdb_connection): Rewrite using if
3103 wrapped in do/while.
3104
3105 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3106
3107 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3108 * configure, config.in: Regenerate.
3109 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3110 Declare typedef.
3111
3112 2015-05-12 Don Breazeal <donb@codesourcery.com>
3113
3114 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3115 PTRACE_EVENT_VFORK_DONE.
3116 (linux_low_ptrace_options, extended_event_reported): Add vfork
3117 events.
3118 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3119 and "vforkdone" for RSP 'T' Stop Reply Packet.
3120 * server.h (report_vfork_events): Declare
3121 global variable.
3122
3123 2015-05-12 Don Breazeal <donb@codesourcery.com>
3124
3125 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3126 (the_low_target) <new_fork>: Initialize new member.
3127 * linux-arm-low.c (arm_new_fork): New function.
3128 (the_low_target) <new_fork>: Initialize new member.
3129 * linux-low.c (handle_extended_wait): Call new target function
3130 new_fork.
3131 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3132 * linux-mips-low.c (mips_add_watchpoint): New function
3133 extracted from mips_insert_point.
3134 (the_low_target) <new_fork>: Initialize new member.
3135 (mips_linux_new_fork): New function.
3136 (mips_insert_point): Call mips_add_watchpoint.
3137 * linux-x86-low.c (x86_linux_new_fork): New function.
3138 (the_low_target) <new_fork>: Initialize new member.
3139
3140 2015-05-12 Don Breazeal <donb@codesourcery.com>
3141
3142 * linux-low.c (handle_extended_wait): Implement return value,
3143 rename argument 'event_child' to 'event_lwp', handle
3144 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3145 (linux_low_ptrace_options): New function.
3146 (linux_low_filter_event): Call linux_low_ptrace_options,
3147 use different argument fo linux_enable_event_reporting,
3148 use return value from handle_extended_wait.
3149 (extended_event_reported): New function.
3150 (linux_wait_1): Call extended_event_reported and set
3151 status to report fork events.
3152 (linux_write_memory): Add pid to debug message.
3153 (reset_lwp_ptrace_options_callback): New function.
3154 (linux_handle_new_gdb_connection): New function.
3155 (linux_target_ops): Initialize new structure member.
3156 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3157 * lynx-low.c: Initialize new structure member.
3158 * remote-utils.c (prepare_resume_reply): Implement stop reason
3159 "fork" for "T" stop message.
3160 * server.c (handle_query): Call handle_new_gdb_connection.
3161 * server.h (report_fork_events): Declare global flag.
3162 * target.h (struct target_ops) <handle_new_gdb_connection>:
3163 New member.
3164 (target_handle_new_gdb_connection): New macro.
3165 * win32-low.c: Initialize new structure member.
3166
3167 2015-05-12 Don Breazeal <donb@codesourcery.com>
3168
3169 * mem-break.c (APPEND_TO_LIST): Define macro.
3170 (clone_agent_expr): New function.
3171 (clone_one_breakpoint): New function.
3172 (clone_all_breakpoints): New function.
3173 * mem-break.h: Declare new functions.
3174
3175 2015-05-12 Don Breazeal <donb@codesourcery.com>
3176
3177 * linux-low.c (linux_supports_fork_events): New function.
3178 (linux_supports_vfork_events): New function.
3179 (linux_target_ops): Initialize new structure members.
3180 (initialize_low): Call linux_check_ptrace_features.
3181 * lynx-low.c (lynx_target_ops): Initialize new structure
3182 members.
3183 * server.c (report_fork_events, report_vfork_events):
3184 New global flags.
3185 (handle_query): Add new features to qSupported packet and
3186 response.
3187 (captured_main): Initialize new global variables.
3188 * target.h (struct target_ops) <supports_fork_events>:
3189 New member.
3190 <supports_vfork_events>: New member.
3191 (target_supports_fork_events): New macro.
3192 (target_supports_vfork_events): New macro.
3193 * win32-low.c (win32_target_ops): Initialize new structure
3194 members.
3195
3196 2015-05-12 Gary Benson <gbenson@redhat.com>
3197
3198 * server.c (handle_qxfer_exec_file): Use current process
3199 if annex is empty.
3200
3201 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3202
3203 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3204 Remove HAVE_PTRACE_GETREGS conditionals.
3205 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3206 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3207
3208 2015-05-08 Yao Qi <yao.qi@linaro.org>
3209
3210 * linux-low.c (linux_supports_conditional_breakpoints): New
3211 function.
3212 (linux_target_ops): Install new target method.
3213 * lynx-low.c (lynx_target_ops): Install NULL hook for
3214 supports_conditional_breakpoints.
3215 * nto-low.c (nto_target_ops): Likewise.
3216 * spu-low.c (spu_target_ops): Likewise.
3217 * win32-low.c (win32_target_ops): Likewise.
3218 * server.c (handle_query): Check
3219 target_supports_conditional_breakpoints.
3220 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3221 New field.
3222 (target_supports_conditional_breakpoints): New macro.
3223
3224 2015-05-06 Pedro Alves <palves@redhat.com>
3225
3226 PR server/18081
3227 * server.c (start_inferior): If the process exits, mourn it.
3228
3229 2015-04-21 Gary Benson <gbenson@redhat.com>
3230
3231 * hostio.c (fileio_open_flags_to_host): Factored out to
3232 fileio_to_host_openflags in common/fileio.c. Single use
3233 updated.
3234
3235 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3236
3237 * linux-xtensa-low.c (xtensa_fill_gregset)
3238 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3239 XCHAL_HAVE_LOOP.
3240
3241 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3242
3243 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3244 (regs_info): Replace usrregs pointer with NULL.
3245
3246 2015-04-17 Gary Benson <gbenson@redhat.com>
3247
3248 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3249 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3250 * server.c (handle_qxfer_exec_file): New function.
3251 (qxfer_packets): Add exec-file entry.
3252 (handle_query): Report qXfer:exec-file:read as supported packet.
3253
3254 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3255
3256 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3257
3258 2015-04-09 Gary Benson <gbenson@redhat.com>
3259
3260 * hostio-errno.c (errno_to_fileio_error): Remove function.
3261 Update caller to use remote_fileio_to_fio_error.
3262
3263 2015-04-09 Yao Qi <yao.qi@linaro.org>
3264
3265 * linux-low.c (linux_insert_point): Call
3266 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3267 (linux_remove_point): Call remove_memory_breakpoint if type is
3268 raw_bkpt_type_sw.
3269 * linux-x86-low.c (x86_insert_point): Don't call
3270 insert_memory_breakpoint.
3271 (x86_remove_point): Don't call remove_memory_breakpoint.
3272
3273 2015-04-01 Pedro Alves <palves@redhat.com>
3274 Cleber Rosa <crosa@redhat.com>
3275
3276 * server.c (gdbserver_usage): Reorganize and extend the usage
3277 message.
3278
3279 2015-03-24 Pedro Alves <palves@redhat.com>
3280
3281 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3282 output. Also dump TRAP_TRACE.
3283 (linux_low_filter_event): In debug output, distinguish a
3284 resume_stop SIGSTOP from a delayed SIGSTOP.
3285
3286 2015-03-24 Gary Benson <gbenson@redhat.com>
3287
3288 * linux-x86-low.c (x86_linux_new_thread): Moved to
3289 nat/x86-linux.c.
3290 (x86_linux_prepare_to_resume): Likewise.
3291
3292 2015-03-24 Gary Benson <gbenson@redhat.com>
3293
3294 * Makefile.in (x86-linux-dregs.o): New rule.
3295 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3296 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3297 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3298 (x86_linux_dr_get): Likewise.
3299 (x86_linux_dr_set): Likewise.
3300 (update_debug_registers_callback): Likewise.
3301 (x86_linux_dr_set_addr): Likewise.
3302 (x86_linux_dr_get_addr): Likewise.
3303 (x86_linux_dr_set_control): Likewise.
3304 (x86_linux_dr_get_control): Likewise.
3305 (x86_linux_dr_get_status): Likewise.
3306 (x86_linux_update_debug_registers): Likewise.
3307
3308 2015-03-24 Gary Benson <gbenson@redhat.com>
3309
3310 * linux-x86-low.c (x86_linux_update_debug_registers):
3311 New function, factored out from...
3312 (x86_linux_prepare_to_resume): ...this.
3313
3314 2015-03-24 Gary Benson <gbenson@redhat.com>
3315
3316 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3317 (x86_linux_dr_set): Likewise.
3318 (update_debug_registers_callback): Likewise.
3319 (x86_linux_dr_set_addr): Likewise.
3320 (x86_linux_dr_get_addr): Likewise.
3321 (x86_linux_dr_set_control): Likewise.
3322 (x86_linux_dr_get_control): Likewise.
3323 (x86_linux_dr_get_status): Likewise.
3324 (x86_linux_prepare_to_resume): Likewise.
3325
3326 2015-03-24 Gary Benson <gbenson@redhat.com>
3327
3328 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3329 Use perror_with_name. Pass string through gettext.
3330 (x86_linux_dr_set): Likewise.
3331
3332 2015-03-24 Gary Benson <gbenson@redhat.com>
3333
3334 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3335 (x86_linux_dr_set_addr): ...this.
3336 (x86_dr_low_get_addr): Rename to...
3337 (x86_linux_dr_get_addr): ...this.
3338 (x86_dr_low_set_control): Rename to...
3339 (x86_linux_dr_set_control): ...this.
3340 (x86_dr_low_get_control): Rename to...
3341 (x86_linux_dr_get_control): ...this.
3342 (x86_dr_low_get_status): Rename to...
3343 (x86_linux_dr_get_status): ...this.
3344 (x86_dr_low): Update with new function names.
3345
3346 2015-03-24 Gary Benson <gbenson@redhat.com>
3347
3348 * Makefile.in (x86-linux.o): New rule.
3349 * configure.srv: Add x86-linux.o to relevant targets.
3350 * linux-low.c (lwp_set_arch_private_info): New function.
3351 (lwp_arch_private_info): Likewise.
3352 * linux-x86-low.c: Include nat/x86-linux.h.
3353 (arch_lwp_info): Removed structure.
3354 (update_debug_registers_callback):
3355 Use lwp_set_debug_registers_changed.
3356 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3357 and lwp_set_debug_registers_changed.
3358 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3359
3360 2015-03-24 Gary Benson <gbenson@redhat.com>
3361
3362 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3363 * linux-arm-low.c (arm_new_thread): Likewise.
3364 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3365 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3366 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3367 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3368
3369 2015-03-24 Gary Benson <gbenson@redhat.com>
3370
3371 * linux-low.c (ptid_of_lwp): New function.
3372 (lwp_is_stopped): Likewise.
3373 (lwp_stop_reason): Likewise.
3374 * linux-x86-low.c (update_debug_registers_callback):
3375 Use lwp_is_stopped.
3376 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3377 lwp_stop_reason.
3378
3379 2015-03-24 Gary Benson <gbenson@redhat.com>
3380
3381 * linux-low.h (linux_stop_lwp): Remove declaration.
3382
3383 2015-03-24 Gary Benson <gbenson@redhat.com>
3384
3385 * linux-low.h: Include nat/linux-nat.h.
3386 * linux-low.c (iterate_over_lwps_args): New structure.
3387 (iterate_over_lwps_filter): New function.
3388 (iterate_over_lwps): Likewise.
3389 * linux-x86-low.c (update_debug_registers_callback):
3390 Update signature to what iterate_over_lwps expects.
3391 Remove PID check that iterate_over_lwps now performs.
3392 (x86_dr_low_set_addr): Use iterate_over_lwps.
3393 (x86_dr_low_set_control): Likewise.
3394
3395 2015-03-24 Gary Benson <gbenson@redhat.com>
3396
3397 * linux-x86-low.c (x86_debug_reg_state): New function.
3398 (x86_linux_prepare_to_resume): Use the above.
3399
3400 2015-03-24 Gary Benson <gbenson@redhat.com>
3401
3402 * linux-low.c (current_lwp_ptid): New function.
3403 * linux-x86-low.c: Include nat/linux-nat.h.
3404 (x86_dr_low_get_addr): Use current_lwp_ptid.
3405 (x86_dr_low_get_control): Likewise.
3406 (x86_dr_low_get_status): Likewise.
3407
3408 2015-03-20 Pedro Alves <palves@redhat.com>
3409
3410 * tracepoint.c (cmd_qtstatus): Make "str" const.
3411
3412 2015-03-20 Pedro Alves <palves@redhat.com>
3413
3414 * server.c (handle_general_set): Make "req_str" const.
3415
3416 2015-03-19 Pedro Alves <palves@redhat.com>
3417
3418 * linux-low.c (linux_resume_one_lwp): Rename to ...
3419 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3420 instead call perror_with_name.
3421 (check_ptrace_stopped_lwp_gone): New function.
3422 (linux_resume_one_lwp): Reimplement as wrapper around
3423 linux_resume_one_lwp_throw that swallows errors if the LWP is
3424 gone.
3425
3426 2015-03-19 Pedro Alves <palves@redhat.com>
3427
3428 * linux-low.c (count_events_callback, select_event_lwp_callback):
3429 No longer check whether the thread has resume_stop as last resume
3430 kind.
3431
3432 2015-03-19 Pedro Alves <palves@redhat.com>
3433
3434 * linux-low.c (count_events_callback, select_event_lwp_callback):
3435 Use the lwp's status_pending_p field, not the thread's.
3436
3437 2015-03-19 Pedro Alves <palves@redhat.com>
3438
3439 * linux-low.c (select_event_lwp_callback): Update comments to
3440 no longer mention SIGTRAP.
3441
3442 2015-03-18 Gary Benson <gbenson@redhat.com>
3443
3444 * server.c (handle_query): Do not report vFile:fstat as supported.
3445
3446 2015-03-11 Gary Benson <gbenson@redhat.com>
3447
3448 * hostio.c (sys/types.h): New include.
3449 (sys/stat.h): Likewise.
3450 (common-remote-fileio.h): Likewise.
3451 (handle_fstat): New function.
3452 (handle_vFile): Handle vFile:fstat packets.
3453
3454 2015-03-11 Gary Benson <gbenson@redhat.com>
3455
3456 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3457 struct stat.st_blocks and struct stat.st_blksize.
3458 * configure: Regenerate.
3459 * config.in: Likewise.
3460 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3461 (OBS): Add common-remote-fileio.o.
3462 (common-remote-fileio.o): New rule.
3463
3464 2015-03-09 Pedro Alves <palves@redhat.com>
3465
3466 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3467 'struct sockaddr' pointer in 'accept' call.
3468
3469 2015-03-09 Pedro Alves <palves@redhat.com>
3470
3471 Revert:
3472 2015-03-07 Pedro Alves <palves@redhat.com>
3473 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3474 or <winsock2.h> here. Instead include "gdb_socket.h".
3475 (remote_open): Use union gdb_sockaddr_u.
3476 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3477 or <winsock2.h> here. Instead include "gdb_socket.h".
3478 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3479 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3480 or <sys/un.h>.
3481 (init_named_socket, gdb_agent_helper_thread): Use union
3482 gdb_sockaddr_u.
3483
3484 2015-03-07 Pedro Alves <palves@redhat.com>
3485
3486 * configure.ac (build_warnings): Move
3487 -Wdeclaration-after-statement to the C-specific set.
3488 * configure: Regenerate.
3489
3490 2015-03-07 Pedro Alves <palves@redhat.com>
3491
3492 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3493 or <winsock2.h> here. Instead include "gdb_socket.h".
3494 (remote_open): Use union gdb_sockaddr_u.
3495 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3496 or <winsock2.h> here. Instead include "gdb_socket.h".
3497 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3498 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3499 or <sys/un.h>.
3500 (init_named_socket, gdb_agent_helper_thread): Use union
3501 gdb_sockaddr_u.
3502
3503 2015-03-07 Pedro Alves <palves@redhat.com>
3504
3505 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3506 instead.
3507
3508 2015-03-06 Yao Qi <yao.qi@linaro.org>
3509
3510 * linux-aarch64-low.c (aarch64_insert_point): Use
3511 show_debug_regs as a boolean.
3512 (aarch64_remove_point): Likewise.
3513
3514 2015-03-05 Pedro Alves <palves@redhat.com>
3515
3516 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3517 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3518 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3519 * nto-low.c (nto_target_ops): Likewise.
3520 * spu-low.c (spu_target_ops): Likewise.
3521 * win32-low.c (win32_target_ops): Likewise.
3522
3523 2015-03-04 Pedro Alves <palves@redhat.com>
3524
3525 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3526 Decide whether a breakpoint triggered based on the SIGTRAP's
3527 siginfo.si_code.
3528 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3529 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3530 (linux_low_filter_event): Check for breakpoints before checking
3531 watchpoints.
3532 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3533 siginfo.si_code.
3534 (linux_stopped_by_sw_breakpoint)
3535 (linux_supports_stopped_by_sw_breakpoint)
3536 (linux_stopped_by_hw_breakpoint)
3537 (linux_supports_stopped_by_hw_breakpoint): New functions.
3538 (linux_target_ops): Install new target methods.
3539
3540 2015-03-04 Pedro Alves <palves@redhat.com>
3541
3542 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3543 * server.c (swbreak_feature, hwbreak_feature): New globals.
3544 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3545 (captured_main): Clear swbreak_feature and hwbreak_feature.
3546 * server.h (swbreak_feature, hwbreak_feature): Declare.
3547 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3548 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3549 supports_stopped_by_hw_breakpoint>: New fields.
3550 (target_supports_stopped_by_sw_breakpoint)
3551 (target_stopped_by_sw_breakpoint)
3552 (target_supports_stopped_by_hw_breakpoint)
3553 (target_stopped_by_hw_breakpoint): Declare.
3554
3555 2015-03-04 Pedro Alves <palves@redhat.com>
3556
3557 enum lwp_stop_reason -> enum target_stop_reason
3558 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3559 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3560 (linux_wait_1, stuck_in_jump_pad_callback)
3561 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3562 (linux_stopped_by_watchpoint):
3563 * linux-low.h (enum lwp_stop_reason): Delete.
3564 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3565 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3566
3567 2015-03-04 Yao Qi <yao.qi@linaro.org>
3568
3569 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3570
3571 2015-03-03 Gary Benson <gbenson@redhat.com>
3572
3573 * hostio.c (handle_vFile): Fix prefix lengths.
3574
3575 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3576
3577 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3578 ptr_bits.
3579
3580 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3581
3582 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3583 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3584 (clean): Add "rm -f" for above C files.
3585 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3586 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3587 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3588 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3589 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3590 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3591 (init_registers_s390x_vx_linux64)
3592 (init_registers_s390x_tevx_linux64)
3593 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3594 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3595 declarations.
3596 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3597 (s390_store_vxrs_high): New functions.
3598 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3599 NT_S390_VXRS_HIGH.
3600 (s390_arch_setup): Add logic for selecting one of the new target
3601 descriptions. Activate the new vector regsets if applicable.
3602 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3603 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3604 and init_registers_s390x_tevx_linux64.
3605
3606 2015-03-01 Pedro Alves <palves@redhat.com>
3607
3608 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3609 parameter.
3610
3611 2015-02-27 Pedro Alves <palves@redhat.com>
3612
3613 * linux-x86-low.c (u_debugreg_offset): New function.
3614 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3615
3616 2015-02-27 Pedro Alves <palves@redhat.com>
3617
3618 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3619 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3620 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3621 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3622 (ps_lsetfpregs, ps_getpid)
3623 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3624 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3625 (ps_lsetxregs, ps_plog): Declare.
3626
3627 2015-02-27 Pedro Alves <palves@redhat.com>
3628
3629 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3630 IP_AGENT_EXPORT_FUNC.
3631 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3632 IP_AGENT_EXPORT_FUNC.
3633 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3634 (IP_AGENT_EXPORT): Delete.
3635 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3636 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3637 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3638 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3639 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3640 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3641 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3642 (traceframe_read_count, traceframe_write_count)
3643 (traceframes_created, trace_state_variables, get_raw_reg)
3644 (get_trace_state_variable_value, set_trace_state_variable_value)
3645 (ust_loaded, helper_thread_id, cmd_buf): Use
3646 IPA_SYM_EXPORTED_NAME.
3647 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3648 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3649 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3650 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3651 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3652 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3653 EXTERN_C_PUSH/EXTERN_C_POP.
3654 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3655 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3656 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3657 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3658 (traceframe_write_count, traceframe_read_count)
3659 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3660 (about_to_request_buffer_space, get_trace_state_variable_value)
3661 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3662 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3663 EXTERN_C_PUSH/EXTERN_C_POP.
3664 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3665 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3666 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3667 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3668 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3669 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3670 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3671 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3672 Define.
3673 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3674 (IP_AGENT_EXPORT_VAR_DECL): Define.
3675 (tracing): Declare.
3676 (gdb_agent_get_raw_reg): Declare.
3677
3678 2015-02-27 Tom Tromey <tromey@redhat.com>
3679 Pedro Alves <palves@redhat.com>
3680
3681 Rename symbols whose names are reserved C++ keywords throughout.
3682
3683 2015-02-27 Pedro Alves <palves@redhat.com>
3684
3685 * Makefile.in (COMPILER): New, get it from autoconf.
3686 (CXX): Get from autoconf instead.
3687 (COMPILE.pre): Use COMPILER.
3688 (CC-LD): Rename to ...
3689 (CC_LD): ... this. Use COMPILER.
3690 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3691 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3692 * acinclude.m4: Include build-with-cxx.m4.
3693 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3694 Disable -Werror by default if building in C++ mode.
3695 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3696 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3697 the C++ compiler. Save/restore CXXFLAGS too.
3698 * configure: Regenerate.
3699
3700 2015-02-27 Pedro Alves <palves@redhat.com>
3701
3702 * acinclude.m4: Include libiberty.m4.
3703 * configure.ac: Call libiberty_INIT.
3704 * config.in, configure: Regenerate.
3705
3706 2015-02-26 Pedro Alves <palves@redhat.com>
3707
3708 * linux-low.c (linux_wait_1): When incrementing the PC past a
3709 program breakpoint always use the_low_target.breakpoint_len as
3710 increment, rather than the maximum between that and
3711 the_low_target.decr_pc_after_break.
3712
3713 2015-02-23 Pedro Alves <palves@redhat.com>
3714
3715 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3716 thread was doing a step-over; always adjust the PC if
3717 we stepped over a permanent breakpoint.
3718 (linux_wait_1): If we stepped over breakpoint that was on top of a
3719 permanent breakpoint, manually advance the PC past it.
3720
3721 2015-02-23 Pedro Alves <palves@redhat.com>
3722
3723 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3724 modes.
3725 (x86_fill_gregset, x86_store_gregset): Use it when handling
3726 $orig_eax.
3727
3728 2015-02-20 Pedro Alves <palves@redhat.com>
3729
3730 * thread-db.c: Include "nat/linux-procfs.h".
3731 (thread_db_init): Skip listing new threads if the kernel supports
3732 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3733
3734 2015-02-20 Pedro Alves <palves@redhat.com>
3735
3736 * linux-low.c (status_pending_p_callback): Use ptid_match.
3737
3738 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3739
3740 PR breakpoints/16812
3741 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3742 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3743 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3744
3745 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3746
3747 PR breakpoints/15956
3748 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3749
3750 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3751
3752 * linux-low.c (linux_low_btrace_conf): Print size.
3753 * server.c (handle_btrace_conf_general_set): New.
3754 (hanle_general_set): Call handle_btrace_conf_general_set.
3755 (handle_query): Report Qbtrace-conf:bts:size as supported.
3756
3757 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3758
3759 * linux-low.c (linux_low_enable_btrace): Update parameters.
3760 (linux_low_btrace_conf): New.
3761 (linux_target_ops)<to_btrace_conf>: Initialize.
3762 * server.c (current_btrace_conf): New.
3763 (handle_btrace_enable): Rename to ...
3764 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3765 to target_enable_btrace. Update comment. Update users.
3766 (handle_qxfer_btrace_conf): New.
3767 (qxfer_packets): Add btrace-conf entry.
3768 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3769 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3770 (target_ops)<read_btrace_conf>: New.
3771 (target_enable_btrace): Update parameters.
3772 (target_read_btrace_conf): New.
3773
3774 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3775
3776 * server.c (handle_btrace_general_set): Remove call to
3777 target_supports_btrace.
3778 (supported_btrace_packets): New.
3779 (handle_query): Call supported_btrace_packets.
3780 * target.h: include btrace-common.h.
3781 (btrace_target_info): Removed.
3782 (supports_btrace, target_supports_btrace): Update parameters.
3783
3784 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3785
3786 * Makefile.in (SFILES): Add common/btrace-common.c.
3787 (OBS): Add common/btrace-common.o.
3788 (btrace-common.o): Add build rules.
3789 * linux-low: Include btrace-common.h.
3790 (linux_low_read_btrace): Use struct btrace_data. Call
3791 btrace_data_init and btrace_data_fini.
3792
3793 2015-02-06 Pedro Alves <palves@redhat.com>
3794
3795 * thread-db.c (find_new_threads_callback): Add debug output.
3796
3797 2015-02-04 Pedro Alves <palves@redhat.com>
3798
3799 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3800 (resume_stopped_resumed_lwps): New function.
3801 (linux_wait_for_event_filtered): Use it.
3802
3803 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3804
3805 * Makefile.in (SFILES): Add linux-personality.c.
3806 (linux-personality.o): New rule.
3807 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3808 list of objects to be built.
3809 * linux-low.c: Include nat/linux-personality.h.
3810 (linux_create_inferior): Remove code to disable address space
3811 randomization (moved to ../nat/linux-personality.c). Create
3812 cleanup to disable address space randomization.
3813
3814 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3815
3816 * Makefile.in (posix-strerror.o): New rule.
3817 (mingw-strerror.o): Likewise.
3818 * configure: Regenerated.
3819 * configure.ac: Source file ../common/common.host. Initialize new
3820 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3821
3822 2015-01-14 Yao Qi <yao@codesourcery.com>
3823
3824 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3825 (ppc-linux.o): New rule.
3826 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3827 * configure.ac: AC_CHECK_FUNCS(getauxval).
3828 * config.in: Re-generated.
3829 * configure: Re-generated.
3830 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3831 ppc64_64bit_inferior_p
3832
3833 2015-01-14 Yao Qi <yao@codesourcery.com>
3834
3835 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3836 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3837 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3838 (PT_ORIG_R3, PT_TRAP): Likewise.
3839 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3840 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3841 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3842
3843 2015-01-10 Joel Brobecker <brobecker@adacore.com>
3844
3845 * i387-fp.c (i387_cache_to_xsave): In look over
3846 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3847 zmmh_low_space field by use of zmmh_high_space.
3848
3849 2015-01-09 Pedro Alves <palves@redhat.com>
3850
3851 * linux-low.c (step_over_bkpt): Move higher up in the file.
3852 (handle_extended_wait): Don't store the stop_pc here.
3853 (get_stop_pc): Adjust comments and rename to ...
3854 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3855 stopped for a software breakpoint or hardware breakpoint.
3856 (thread_still_has_status_pending_p): New function.
3857 (status_pending_p_callback): Use
3858 thread_still_has_status_pending_p. If the event is no longer
3859 interesting, resume the LWP.
3860 (handle_tracepoints): Add assert.
3861 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3862 (wstatus_maybe_breakpoint): New function.
3863 (cancel_breakpoint): Delete function.
3864 (check_stopped_by_watchpoint): New function, factored out from
3865 linux_low_filter_event.
3866 (lp_status_maybe_breakpoint): Delete function.
3867 (linux_low_filter_event): Remove filter_ptid argument.
3868 Leave thread group exits pending here. Store the LWP's stop PC.
3869 Always leave events pending.
3870 (linux_wait_for_event_filtered): Pull all events out of the
3871 kernel, and leave them all pending.
3872 (count_events_callback, select_event_lwp_callback): Consider all
3873 events.
3874 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3875 (select_event_lwp): Only give preference to the stepping LWP in
3876 all-stop mode. Adjust comments.
3877 (ignore_event): New function.
3878 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3879 references to cancel_breakpoints. Adjust to renames. Also give
3880 equal priority to all LWPs that have had events in non-stop mode.
3881 If reporting a software breakpoint event, unadjust the LWP's PC.
3882 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3883 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3884 Adjust.
3885 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3886 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3887 (linux_stopped_by_watchpoint): Adjust.
3888 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3889 * linux-low.h (enum lwp_stop_reason): New.
3890 (struct lwp_info) <stop_pc>: Adjust comment.
3891 <stopped_by_watchpoint>: Delete field.
3892 <stop_reason>: New field.
3893 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3894 * mem-break.c (software_breakpoint_inserted_here)
3895 (hardware_breakpoint_inserted_here): New function.
3896 * mem-break.h (software_breakpoint_inserted_here)
3897 (hardware_breakpoint_inserted_here): Declare.
3898 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3899 (cancel_breakpoints): Delete.
3900 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3901 (upload_fast_traceframes): Remove references to
3902 cancel_breakpoints.
3903
3904 2015-01-09 Pedro Alves <palves@redhat.com>
3905
3906 * thread-db.c (find_new_threads_callback): Ignore thread if the
3907 kernel thread ID is -1.
3908
3909 2015-01-09 Pedro Alves <palves@redhat.com>
3910
3911 * linux-low.c (linux_attach_fail_reason_string): Move to
3912 nat/linux-ptrace.c, and rename.
3913 (linux_attach_lwp): Update comment.
3914 (attach_proc_task_lwp_callback): New function.
3915 (linux_attach): Adjust to rename and use
3916 linux_proc_attach_tgid_threads.
3917 (linux_attach_fail_reason_string): Delete declaration.
3918
3919 2015-01-01 Joel Brobecker <brobecker@adacore.com>
3920
3921 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3922 * server.c (gdbserver_version): Likewise.
3923
3924 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3925
3926 * remote-utils.c: Include ctype.h.
3927 (input_interrupt): Explicitly handle the case when the char
3928 received is the NUL byte. Improve the printing of non-ASCII
3929 characters.
3930
3931 2014-12-16 Joel Brobecker <brobecker@adacore.com>
3932
3933 * linux-low.c (linux_low_filter_event): Update call to
3934 linux_enable_event_reporting following the addition of
3935 a new parameter to that function.
3936
3937 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
3938
3939 PR server/17457
3940 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3941 (AARCH64_FPCR_REGNO): Likewise.
3942 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3943 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3944 (aarch64_store_fpregset): Likewise.
3945
3946 2014-12-15 Joel Brobecker <brobecker@adacore.com>
3947
3948 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3949 Remove FIXME comment about assumption about N.
3950
3951 2014-12-13 Joel Brobecker <brobecker@adacore.com>
3952
3953 * configure.ac: If large-file support is disabled in GDBserver,
3954 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3955 * configure: Regenerate.
3956
3957 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3958
3959 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3960 warning upon ENODATA from ptrace.
3961 * linux-s390-low.c (s390_store_tdb): New.
3962 (s390_regsets): Add regset for NT_S390_TDB.
3963
3964 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3965
3966 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3967 without a fill_function.
3968 * linux-s390-low.c (s390_fill_last_break): Remove.
3969 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3970 (s390_arch_setup): Use regset's size instead of fill_function for
3971 loop end condition.
3972
3973 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3974
3975 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3976 the regset's store function when ptrace returned an error.
3977 * regcache.c (get_thread_regcache): Invalidate register cache
3978 before fetching inferior's registers.
3979
3980 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3981
3982 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3983 while-loop as for-loop.
3984 (regsets_store_inferior_registers): Likewise.
3985
3986 2014-11-28 Yao Qi <yao@codesourcery.com>
3987
3988 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3989 * config.in, configure: Re-generate.
3990 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3991 is defined.
3992
3993 2014-11-21 Yao Qi <yao@codesourcery.com>
3994
3995 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3996 (AC_CHECK_HEADERS): Remove malloc.h.
3997 * configure: Re-generated.
3998 * config.in: Re-generated.
3999 * server.h: Don't include alloca.h and malloc.h.
4000 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4001 Don't include malloc.h.
4002
4003 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4004
4005 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4006 corresponding ERRNO check in same block.
4007
4008 2014-11-12 Pedro Alves <palves@redhat.com>
4009
4010 * server.c (cont_thread): Update comment.
4011 (start_inferior, attach_inferior): No longer clear cont_thread.
4012 (handle_v_cont): No longer set cont_thread.
4013 (captured_main): Clear cont_thread each time a GDB connects.
4014
4015 2014-11-12 Pedro Alves <palves@redhat.com>
4016
4017 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4018 thread, and don't resume all threads if the Hc thread has exited.
4019
4020 2014-11-12 Pedro Alves <palves@redhat.com>
4021
4022 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4023 the process group instead of to a specific LWP.
4024
4025 2014-10-15 Pedro Alves <palves@redhat.com>
4026
4027 PR server/17487
4028 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4029 parameter.
4030 (arm_set_thread_context): Delete.
4031 (the_low_target): Adjust.
4032 * win32-i386-low.c (debug_registers_changed)
4033 (debug_registers_used): Delete.
4034 (update_debug_registers_callback): New function.
4035 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4036 needing to update their debug registers.
4037 (win32_get_current_dr): New function.
4038 (x86_dr_low_get_addr, x86_dr_low_get_control)
4039 (x86_dr_low_get_status): Fetch the debug register from the thread
4040 record's context.
4041 (i386_initial_stuff): Adjust.
4042 (i386_get_thread_context): Remove current_event parameter. Don't
4043 clear debug_registers_changed nor copy DR values to
4044 debug_reg_state.
4045 (i386_set_thread_context): Delete.
4046 (i386_prepare_to_resume): New function.
4047 (i386_thread_added): Mark the thread as needing to update irs
4048 debug registers.
4049 (the_low_target): Remove i386_set_thread_context and install
4050 i386_prepare_to_resume.
4051 * win32-low.c (win32_get_thread_context): Adjust.
4052 (win32_set_thread_context): Use SetThreadContext
4053 directly.
4054 (win32_prepare_to_resume): New function.
4055 (win32_require_context): New function, factored out from ...
4056 (thread_rec): ... this.
4057 (continue_one_thread): Call win32_prepare_to_resume on each thread
4058 we're about to continue.
4059 (win32_resume): Call win32_prepare_to_resume on the event thread.
4060 * win32-low.h (struct win32_thread_info)
4061 <debug_registers_changed>: New field.
4062 (struct win32_target_ops): Change prototype of set_thread_context,
4063 delete set_thread_context and add prepare_to_resume.
4064 (win32_require_context): New declaration.
4065
4066 2014-10-08 Gary Benson <gbenson@redhat.com>
4067
4068 * server.h: Do not include common-exceptions.h.
4069
4070 2014-10-08 Gary Benson <gbenson@redhat.com>
4071
4072 * server.h: Do not include cleanups.h.
4073
4074 2014-09-30 James Hogan <james.hogan@imgtec.com>
4075
4076 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4077 mips64-dsp-linux.c.
4078
4079 2014-09-23 Yao Qi <yao@codesourcery.com>
4080
4081 * linux-low.c (lp_status_maybe_breakpoint): New function.
4082 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4083 (count_events_callback): Likewise.
4084 (select_event_lwp_callback): Likewise.
4085 (cancel_breakpoints_callback): Likewise.
4086
4087 2014-09-19 Don Breazeal <donb@codesourcery.com>
4088
4089 * linux-low.c (handle_extended_wait): Call
4090 linux_ptrace_get_extended_event.
4091 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4092 linux_is_extended_waitstatus.
4093
4094 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4095
4096 * Makefile.in (CPPFLAGS): Define.
4097 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4098 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4099
4100 2014-09-16 Gary Benson <gbenson@redhat.com>
4101
4102 * inferiors.h (current_inferior): Renamed as...
4103 (current_thread): New variable. All uses updated.
4104 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4105 (maybe_move_out_of_jump_pad): Likewise.
4106 (cancel_breakpoint): Likewise.
4107 (linux_low_filter_event): Likewise.
4108 (wait_for_sigstop): Likewise.
4109 (linux_resume_one_lwp): Likewise.
4110 (need_step_over_p): Likewise.
4111 (start_step_over): Likewise.
4112 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4113 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4114 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4115 and save_inferior as saved_thread.
4116 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4117 saved_thread.
4118 (regcache_invalidate_thread): Likewise.
4119 * remote-utils.c (prepare_resume_reply): Likewise.
4120 * thread-db.c (thread_db_get_tls_address): Likewise.
4121 (disable_thread_event_reporting): Likewise.
4122 (remove_thread_event_breakpoints): Likewise.
4123 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4124 as saved_thread.
4125 * target.h (set_desired_inferior): Renamed as...
4126 (set_desired_thread): New declaration. All uses updated.
4127 * server.c (myresume): Updated comment to reference thread instead
4128 of inferior.
4129 (handle_serial_event): Likewise.
4130 (handle_target_event): Likewise.
4131
4132 2014-09-12 Tom Tromey <tromey@redhat.com>
4133 Gary Benson <gbenson@redhat.com>
4134
4135 * regcache.h: Include common-regcache.h.
4136 (regcache_read_pc): Don't declare.
4137 * regcache.c (get_thread_regcache_for_ptid): New function.
4138
4139 2014-09-11 Tom Tromey <tromey@redhat.com>
4140 Gary Benson <gbenson@redhat.com>
4141
4142 * symbol.c: New file.
4143 * Makefile.in (SFILES): Add symbol.c.
4144 (OBS): Add symbol.o.
4145
4146 2014-09-11 Gary Benson <gbenson@redhat.com>
4147
4148 * target.c (target_stop_ptid, target_continue_ptid): New
4149 functions.
4150
4151 2014-09-11 Tom Tromey <tromey@redhat.com>
4152 Gary Benson <gbenson@redhat.com>
4153
4154 * target.h: Include target/target.h.
4155 * target.c (target_read_memory, target_read_uint32)
4156 (target_write_memory): New functions.
4157
4158 2014-09-11 Gary Benson <gbenson@redhat.com>
4159
4160 * server.h (debug_hw_points): Don't declare.
4161 * server.c (debug_hw_points): Don't define. Replace all uses
4162 with show_debug_regs.
4163 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4164 all uses with show_debug_regs.
4165
4166 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4167
4168 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4169 endianness into account.
4170 (ppc_supply_ptrace_register): Likewise.
4171
4172 2014-09-03 James Hogan <james.hogan@imgtec.com>
4173
4174 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4175 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4176
4177 2014-09-03 Gary Benson <gbenson@redhat.com>
4178
4179 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4180 ALL_DEBUG_ADDRESS_REGISTERS.
4181
4182 2014-09-02 Gary Benson <gbenson@redhat.com>
4183
4184 * i386-low.h: Renamed as...
4185 * x86-low.h: New file. All type, function and variable name
4186 prefixes changed from "i386_" to "x86_". All references updated.
4187 * i386-low.c: Renamed as...
4188 * x86-low.c: New file. All type, function and variable name
4189 prefixes changed from "i386_" to "x86_". All references updated.
4190
4191 2014-09-02 Gary Benson <gbenson@redhat.com>
4192
4193 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4194 (x86_linux_new_thread): Likewise.
4195
4196 2014-08-29 Gary Benson <gbenson@redhat.com>
4197
4198 * server.h (setjmp.h): Do not include.
4199 (toplevel): Do not declare.
4200 (common-exceptions.h): Include.
4201 (cleanups.h): Likewise.
4202 * server.c (toplevel): Do not define.
4203 (exit_code): New static global.
4204 (detach_or_kill_for_exit_cleanup): New function.
4205 (main): New function. Original main renamed to...
4206 (captured_main): New function.
4207 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4208
4209 2014-08-29 Gary Benson <gbenson@redhat.com>
4210
4211 * Makefile.in (SFILES): Add common/common-exceptions.c.
4212 (OBS): Add common-exceptions.o.
4213 (common-exceptions.o): New rule.
4214 * utils.c (prepare_to_throw_exception): New function.
4215
4216 2014-08-29 Gary Benson <gbenson@redhat.com>
4217
4218 * config.in: Regenerate.
4219 * configure: Likewise.
4220
4221 2014-08-29 Gary Benson <gbenson@redhat.com>
4222
4223 * Makefile.in (SFILES): Add common/cleanups.c.
4224 (OBS): cleanups.o.
4225 (cleanups.o): New rule.
4226
4227 2014-08-29 Gary Benson <gbenson@redhat.com>
4228
4229 * utils.c (internal_vwarning): New function.
4230
4231 2014-08-28 Gary Benson <gbenson@redhat.com>
4232
4233 * utils.h (fatal): Remove declaration.
4234 * utils.c (fatal): Remove function.
4235
4236 2014-08-28 Gary Benson <gbenson@redhat.com>
4237
4238 * tracepoint.c (gdb_agent_init): Replace fatal with
4239 perror_with_name.
4240 (initialize_tracepoint): Likewise.
4241
4242 2014-08-28 Gary Benson <gbenson@redhat.com>
4243
4244 * remote-utils.c (remote_prepare): Replace fatal with error.
4245
4246 2014-08-28 Gary Benson <gbenson@redhat.com>
4247
4248 * linux-low.c (linux_async): Replace fatal with warning.
4249 Tidy up and return.
4250 (linux_start_non_stop): Return -1 if linux_async failed.
4251
4252 2014-08-28 Gary Benson <gbenson@redhat.com>
4253
4254 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4255 gdb_assert.
4256 (i386_dr_low_get_addr): Remove vague comment.
4257 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4258 gdb_assert.
4259
4260 2014-08-28 Gary Benson <gbenson@redhat.com>
4261
4262 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4263 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4264 internal_error.
4265 (linux_resume_one_lwp): Likewise.
4266 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4267 gdb_assert.
4268 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4269 with internal_error.
4270 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4271 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4272 (find_register_by_name): Replace fatal with internal_error.
4273 (find_regno): Likewise.
4274 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4275 * thread-db.c (thread_db_create_event): Likewise.
4276 (thread_db_load_search): Likewise.
4277 (try_thread_db_load_1): Likewise.
4278 * tracepoint.c (get_jump_space_head): Replace fatal with
4279 internal_error.
4280 (claim_trampoline_space): Likewise.
4281 (have_fast_tracepoint_trampoline_buffer): Likewise.
4282 (cmd_qtstart): Likewise.
4283 (stop_tracing): Likewise.
4284 (fast_tracepoint_collecting): Likewise.
4285 (target_malloc): Likewise.
4286 (download_tracepoint): Likewise.
4287 (download_trace_state_variables): Replace check with gdb_assert.
4288 (upload_fast_traceframes): Replace fatal with internal_error.
4289
4290 2014-08-19 Tom Tromey <tromey@redhat.com>
4291 Gary Benson <gbenson@redhat.com>
4292
4293 * Makefile.in (SFILES): Add common/common-debug.c.
4294 (OBS): Add common-debug.o.
4295 (common-debug.o): New rule.
4296 * debug.h (debug_printf): Don't declare.
4297 * debug.c (debug_printf): Renamed and rewritten as...
4298 (debug_vprintf): New function.
4299
4300 2014-08-19 Gary Benson <gbenson@redhat.com>
4301
4302 * utils.h: Do not include print-utils.h.
4303
4304 2014-08-19 Tom Tromey <tromey@redhat.com>
4305 Gary Benson <gbenson@redhat.com>
4306
4307 * server.h: Add static assertion.
4308 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4309
4310 2014-08-19 Tom Tromey <tromey@redhat.com>
4311 Gary Benson <gbenson@redhat.com>
4312
4313 * Makefile.in (SFILES): Add common/errors.c.
4314 (OBS): Add errors.o.
4315 (IPA_OBS): Add errors-ipa.o.
4316 (errors.o): New rule.
4317 (errors-ipa.o): Likewise.
4318 * utils.h (perror_with_name, error, warning): Don't declare.
4319 * utils.c (warning): Renamed and rewritten as...
4320 (vwarning): New function.
4321 (error): Renamed and rewritten as...
4322 (verror): New function.
4323 (internal_error): Renamed and rewritten as...
4324 (internal_verror): New function.
4325
4326 2014-08-07 Gary Benson <gbenson@redhat.com>
4327
4328 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4329 * configure: Regenerate.
4330 * config.in: Likewise.
4331 * server.h: Do not include errno.h.
4332 * event-loop.c: Likewise.
4333 * hostio-errno.c: Likewise.
4334 * linux-low.c: Likewise.
4335 * remote-utils.c: Likewise.
4336 * spu-low.c: Likewise.
4337 * utils.c: Likewise.
4338 * gdbreplay.c: Unconditionally include errno.h.
4339
4340 2014-08-07 Gary Benson <gbenson@redhat.com>
4341
4342 * server.h: Do not include string.h.
4343 * event-loop.c: Likewise.
4344 * linux-low.c: Likewise.
4345 * regcache.c: Likewise.
4346 * remote-utils.c: Likewise.
4347 * spu-low.c: Likewise.
4348 * utils.c: Likewise.
4349
4350 2014-08-07 Gary Benson <gbenson@redhat.com>
4351
4352 * server.h: Do not include gdb_assert.h.
4353
4354 2014-08-07 Gary Benson <gbenson@redhat.com>
4355
4356 * server.h: Do not include common-utils.h.
4357
4358 2014-08-07 Gary Benson <gbenson@redhat.com>
4359
4360 * server.h: Do not include ptid.h.
4361 * notif.h: Likewise.
4362
4363 2014-08-07 Gary Benson <gbenson@redhat.com>
4364
4365 * server.h: Do not include gdb_locale.h.
4366
4367 2014-08-07 Gary Benson <gbenson@redhat.com>
4368
4369 * server.h: Do not include gdb/signals.h.
4370 * win32-low.c: Likewise.
4371
4372 2014-08-07 Gary Benson <gbenson@redhat.com>
4373
4374 * server.h: Do not include pathmax.h.
4375
4376 2014-08-07 Gary Benson <gbenson@redhat.com>
4377
4378 * server.h: Do not include libiberty.h.
4379 * linux-bfin-low.c: Likewise.
4380
4381 2014-08-07 Gary Benson <gbenson@redhat.com>
4382
4383 * server.h: Do not include ansidecl.h.
4384
4385 2014-08-07 Gary Benson <gbenson@redhat.com>
4386
4387 * linux-x86-low.c: Do not include stddef.h.
4388 * lynx-ppc-low.c: Likewise.
4389 * tracepoint.c: Likewise.
4390
4391 2014-08-07 Gary Benson <gbenson@redhat.com>
4392
4393 * server.h: Do not include stdarg.h.
4394 * nto-low.c: Likewise.
4395
4396 2014-08-07 Gary Benson <gbenson@redhat.com>
4397
4398 * server.h: Do not include stdlib.h.
4399 * inferiors.c: Likewise.
4400 * linux-low.c: Likewise.
4401 * regcache.c: Likewise.
4402 * spu-low.c: Likewise.
4403 * tracepoint.c: Likewise.
4404 * utils.c: Likewise.
4405
4406 2014-08-07 Gary Benson <gbenson@redhat.com>
4407
4408 * server.h: Do not include stdio.h.
4409 * linux-low.c: Likewise.
4410 * remote-utils.c: Likewise.
4411 * spu-low.c: Likewise.
4412 * utils.c: Likewise.
4413 * wincecompat.c: Likewise.
4414
4415 2014-08-06 Gary Benson <gbenson@redhat.com>
4416
4417 * regcache.c (init_register_cache): Move conditionals inside if.
4418
4419 2014-08-06 Gary Benson <gbenson@redhat.com>
4420
4421 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4422
4423 2014-07-31 Gary Benson <gbenson@redhat.com>
4424
4425 * ax.h: Do not include server.h.
4426 * gdbthread.h: Likewise.
4427 * lynx-low.h: Likewise.
4428 * notif.h: Likewise.
4429
4430 2014-07-30 Gary Benson <gbenson@redhat.com>
4431
4432 * server.h: Include common-defs.h.
4433 Do not include config.h or build-gnulib-gdbserver/config.h.
4434
4435 2014-07-30 Gary Benson <gbenson@redhat.com>
4436
4437 * hostio-errno.c: Move server.h to top of includes list.
4438 * inferiors.c: Likewise.
4439 * linux-x86-low.c: Likewise.
4440 * notif.c: Include server.h.
4441
4442 2014-07-24 Tom Tromey <tromey@redhat.com>
4443 Gary Benson <gbenson@redhat.com>
4444
4445 * server.h (CORE_ADDR): Now unsigned.
4446
4447 2014-07-16 Pedro Alves <palves@redhat.com>
4448
4449 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4450
4451 2014-07-15 Pedro Alves <palves@redhat.com>
4452
4453 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4454 copy.
4455
4456 2014-07-11 Pedro Alves <palves@redhat.com>
4457
4458 * linux-low.c (kill_wait_lwp): New function, based on
4459 kill_one_lwp_callback, but use my_waitpid directly.
4460 (kill_one_lwp_callback, linux_kill): Use it.
4461
4462 2014-06-23 Pedro Alves <palves@redhat.com>
4463
4464 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4465 before setting DR0..DR3.
4466
4467 2014-06-20 Gary Benson <gbenson@redhat.com>
4468
4469 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4470 * configure: Regenerated.
4471 * config.in: Likewise.
4472
4473 2014-06-20 Gary Benson <gbenson@redhat.com>
4474
4475 * Makefile.in (SFILES): Update locations for files moved
4476 from common to nat.
4477 (object file files): Reordered.
4478
4479 2014-06-20 Gary Benson <gbenson@redhat.com>
4480
4481 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4482 (i386_dr_low_set_addr): Likewise.
4483 (i386_dr_low_get_addr): Likewise.
4484 (i386_dr_low_can_set_control): Likewise.
4485 (i386_dr_low_set_control): Likewise.
4486 (i386_dr_low_get_control): Likewise.
4487 (i386_dr_low_get_status): Likewise.
4488 (i386_get_debug_register_length): Likewise.
4489 * linux-x86-low.c (i386_dr_low_set_addr):
4490 Changed signature. Made static.
4491 (i386_dr_low_get_addr): Likewise.
4492 (i386_dr_low_set_control): Likewise.
4493 (i386_dr_low_get_control): Likewise.
4494 (i386_dr_low_get_status): Likewise.
4495 (i386_dr_low): New global variable.
4496 * win32-i386-low.c (i386_dr_low_set_addr):
4497 Changed signature. Made static.
4498 (i386_dr_low_get_addr): Likewise.
4499 (i386_dr_low_set_control): Likewise.
4500 (i386_dr_low_get_control): Likewise.
4501 (i386_dr_low_get_status): Likewise.
4502 (i386_dr_low): New global variable.
4503
4504 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4505
4506 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4507 * Makefile.in (AR, AR_FLAGS): Define.
4508 * configure: Regenerate.
4509
4510 2014-06-19 Gary Benson <gbenson@redhat.com>
4511
4512 * Makefile.in (i386-dregs.o): New rule.
4513 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4514 * i386-low.c (target.h): Remove include.
4515 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4516 (DR_CONTROL_SHIFT): Likewise.
4517 (DR_CONTROL_SIZE): Likewise.
4518 (DR_RW_EXECUTE): Likewise.
4519 (DR_RW_WRITE): Likewise.
4520 (DR_RW_READ): Likewise.
4521 (DR_RW_IORW): Likewise.
4522 (DR_LEN_1): Likewise.
4523 (DR_LEN_2): Likewise.
4524 (DR_LEN_4): Likewise.
4525 (DR_LEN_8): Likewise.
4526 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4527 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4528 (DR_ENABLE_SIZE): Likewise.
4529 (DR_LOCAL_SLOWDOWN): Likewise.
4530 (DR_GLOBAL_SLOWDOWN): Likewise.
4531 (DR_CONTROL_RESERVED): Likewise.
4532 (I386_DR_CONTROL_MASK): Likewise.
4533 (I386_DR_VACANT): Likewise.
4534 (I386_DR_LOCAL_ENABLE): Likewise.
4535 (I386_DR_GLOBAL_ENABLE): Likewise.
4536 (I386_DR_DISABLE): Likewise.
4537 (I386_DR_SET_RW_LEN): Likewise.
4538 (I386_DR_GET_RW_LEN): Likewise.
4539 (I386_DR_WATCH_HIT): Likewise.
4540 (i386_wp_op_t): Likewise.
4541 (i386_show_dr): Likewise.
4542 (i386_length_and_rw_bits): Likewise.
4543 (i386_insert_aligned_watchpoint): Likewise.
4544 (i386_remove_aligned_watchpoint): Likewise.
4545 (i386_handle_nonaligned_watchpoint): Likewise.
4546 i386_update_inferior_debug_regs(): Likewise.
4547 (i386_dr_insert_watchpoint): Likewise.
4548 (i386_dr_remove_watchpoint): Likewise.
4549 (i386_dr_region_ok_for_watchpoint): Likewise.
4550 (i386_dr_stopped_data_address): Likewise.
4551 (i386_dr_stopped_by_watchpoint): Likewise.
4552
4553 2014-06-19 Gary Benson <gbenson@redhat.com>
4554
4555 * i386-low.c (i386_dr_show): Renamed to
4556 i386_show_dr and made static. All uses updated.
4557 (i386_dr_length_and_rw_bits): Renamed to
4558 i386_length_and_rw_bits and made static.
4559 All uses updated.
4560 (i386_dr_insert_aligned_watchpoint): Renamed to
4561 i386_insert_aligned_watchpoint and made static.
4562 All uses updated.
4563 (i386_dr_remove_aligned_watchpoint): Renamed to
4564 i386_remove_aligned_watchpoint and made static.
4565 All uses updated.
4566 (i386_dr_update_inferior_debug_regs): Renamed to
4567 i386_update_inferior_debug_regs and made static.
4568 All uses updated.
4569
4570 2014-06-18 Gary Benson <gbenson@redhat.com>
4571
4572 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4573 (i386_dr_low_can_set_control): Likewise.
4574 (i386_get_debug_register_length): Likewise.
4575 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4576 (i386_dr_low_can_set_control): Likewise.
4577 (i386_get_debug_register_length): Likewise.
4578
4579 2014-06-17 Gary Benson <gbenson@redhat.com>
4580
4581 * i386-low.h (i386-dregs.h): New include.
4582 (DR_FIRSTADDR): Now in i386-dregs.h.
4583 (DR_LASTADDR): Likewise.
4584 (DR_NADDR): Likewise.
4585 (DR_STATUS): Likewise.
4586 (DR_CONTROL): Likewise.
4587 (i386_debug_reg_state): Likewise.
4588 (i386_dr_insert_watchpoint): Likewise.
4589 (i386_dr_remove_watchpoint): Likewise.
4590 (i386_dr_region_ok_for_watchpoint): Likewise.
4591 (i386_dr_stopped_data_address): Likewise.
4592 (i386_dr_stopped_by_watchpoint): Likewise.
4593 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4594
4595 2014-06-18 Gary Benson <gbenson@redhat.com>
4596
4597 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4598 i386_dr_insert_watchpoint.
4599 (i386_low_remove_watchpoint): Renamed to
4600 i386_dr_remove_watchpoint.
4601 (i386_low_region_ok_for_watchpoint): Renamed to
4602 i386_dr_region_ok_for_watchpoint.
4603 (i386_low_stopped_data_address): Renamed to
4604 i386_dr_stopped_data_address.
4605 (i386_low_stopped_by_watchpoint): Renamed to
4606 i386_dr_stopped_by_watchpoint.
4607 * i386-low.c (i386_show_dr): Renamed to
4608 i386_dr_show and made nonstatic. All uses updated.
4609 (i386_length_and_rw_bits): Renamed to
4610 i386_dr_length_and_rw_bits and made nonstatic.
4611 All uses updated.
4612 (i386_insert_aligned_watchpoint): Renamed to
4613 i386_dr_insert_aligned_watchpoint and made nonstatic.
4614 All uses updated.
4615 (i386_remove_aligned_watchpoint): Renamed to
4616 i386_dr_remove_aligned_watchpoint and made nonstatic.
4617 All uses updated.
4618 (i386_update_inferior_debug_regs): Renamed to
4619 i386_dr_update_inferior_debug_regs and made nonstatic.
4620 All uses updated.
4621 (i386_low_insert_watchpoint): Renamed to
4622 i386_dr_insert_watchpoint. All uses updated.
4623 (i386_low_remove_watchpoint): Renamed to
4624 i386_dr_remove_watchpoint. All uses updated.
4625 (i386_low_region_ok_for_watchpoint): Renamed to
4626 i386_dr_region_ok_for_watchpoint. All uses updated.
4627 (i386_low_stopped_data_address): Renamed to
4628 i386_dr_stopped_data_address. All uses updated.
4629 (i386_low_stopped_by_watchpoint): Renamed to
4630 i386_dr_stopped_by_watchpoint. All uses updated.
4631
4632 2014-06-18 Gary Benson <gbenson@redhat.com>
4633
4634 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4635 (i386_dr_low_can_set_control): Likewise.
4636 (i386_insert_aligned_watchpoint): New check.
4637
4638 2014-06-18 Gary Benson <gbenson@redhat.com>
4639
4640 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4641 Renamed to state.
4642
4643 2014-06-18 Gary Benson <gbenson@redhat.com>
4644
4645 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4646 instead of fatal and error.
4647 (i386_handle_nonaligned_watchpoint): Likewise.
4648
4649 2014-06-18 Gary Benson <gbenson@redhat.com>
4650
4651 * i386-low.c (i386_get_debug_register_length): New macro.
4652 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4653 (i386_show_dr): Use debug_printf instead of fprintf. Use
4654 phex to format values.
4655
4656 2014-06-18 Gary Benson <gbenson@redhat.com>
4657
4658 * i386-low.h: Comment changes.
4659 * i386-low.c: Likewise.
4660
4661 2014-06-18 Gary Benson <gbenson@redhat.com>
4662
4663 * i386-low.c: Whitespace changes.
4664
4665 2014-06-12 Tom Tromey <tromey@redhat.com>
4666
4667 * utils.c (freeargv): Remove.
4668
4669 2014-06-12 Tom Tromey <tromey@redhat.com>
4670
4671 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4672 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4673 (parse_debug_format_options): Likewise.
4674 (gdbserver_usage): Likewise.
4675 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4676 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4677 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4678 against libiberty.
4679 ($(LIBGNU)): Depend on libiberty.
4680 (all-lib): Recurse into all subdirs.
4681 (install-only): Invoke "install" target in subdirs.
4682 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4683 targets.
4684 * configure: Rebuild.
4685 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4686 for vasprintf, vsnprintf, or gettimeofday.
4687 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4688 srv_tgtobj.
4689
4690 2014-06-05 Joel Brobecker <brobecker@adacore.com>
4691
4692 * development.sh: Delete.
4693 * Makefile.in (config.status): Adjust dependency on development.sh.
4694 * configure.ac: Adjust development.sh source call.
4695 * configure: Regenerate.
4696
4697 2014-06-02 Pedro Alves <palves@redhat.com>
4698
4699 * ax.c (gdb_free_agent_expr): New function.
4700 * ax.h (gdb_free_agent_expr): New declaration.
4701 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4702 list.
4703 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4704 static.
4705 (clear_breakpoint_conditions_and_commands): New function.
4706 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4707 (clear_breakpoint_conditions_and_commands): New declaration.
4708
4709 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4710
4711 * linux-aarch64-low.c (asm/ptrace.h): Include.
4712
4713 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4714
4715 Fix TLS access for -static -pthread.
4716 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4717 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4718 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4719
4720 2014-05-20 Pedro Alves <palves@redhat.com>
4721
4722 * linux-aarch64-low.c (aarch64_insert_point)
4723 (aarch64_remove_point): No longer check whether the type is
4724 supported here. Adjust to new interface.
4725 (the_low_target): Install aarch64_supports_z_point_type as
4726 supports_z_point_type method.
4727 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4728 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4729 instead of a Z packet char. Adjust.
4730 (arm_supports_z_point_type): New function.
4731 (arm_insert_point, arm_remove_point): Adjust to new interface.
4732 (the_low_target): Install arm_supports_z_point_type.
4733 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4734 (cris_insert_point, cris_remove_point): Adjust to new interface.
4735 Don't check whether the type is supported here.
4736 (the_low_target): Install cris_supports_z_point_type.
4737 * linux-low.c (linux_supports_z_point_type): New function.
4738 (linux_insert_point, linux_remove_point): Adjust to new interface.
4739 * linux-low.h (struct linux_target_ops) <insert_point,
4740 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4741 raw_breakpoint pointer parameter.
4742 <supports_z_point_type>: New method.
4743 * linux-mips-low.c (mips_supports_z_point_type): New function.
4744 (mips_insert_point, mips_remove_point): Adjust to new interface.
4745 Use mips_supports_z_point_type.
4746 (the_low_target): Install mips_supports_z_point_type.
4747 * linux-ppc-low.c (the_low_target): Install NULL as
4748 supports_z_point_type method.
4749 * linux-s390-low.c (the_low_target): Install NULL as
4750 supports_z_point_type method.
4751 * linux-sparc-low.c (the_low_target): Install NULL as
4752 supports_z_point_type method.
4753 * linux-x86-low.c (x86_supports_z_point_type): New function.
4754 (x86_insert_point): Adjust to new insert_point interface. Use
4755 insert_memory_breakpoint. Adjust to new
4756 i386_low_insert_watchpoint interface.
4757 (x86_remove_point): Adjust to remove_point interface. Use
4758 remove_memory_breakpoint. Adjust to new
4759 i386_low_remove_watchpoint interface.
4760 (the_low_target): Install x86_supports_z_point_type.
4761 * lynx-low.c (lynx_target_ops): Install NULL as
4762 supports_z_point_type callback.
4763 * nto-low.c (nto_supports_z_point_type): New.
4764 (nto_insert_point, nto_remove_point): Adjust to new interface.
4765 (nto_target_ops): Install nto_supports_z_point_type.
4766 * mem-break.c: Adjust intro comment.
4767 (struct raw_breakpoint) <raw_type, size>: New fields.
4768 <inserted>: Update comment.
4769 <shlib_disabled>: Delete field.
4770 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4771 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4772 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4773 (raw_bkpt_type_to_target_hw_bp_type): New function.
4774 (find_enabled_raw_code_breakpoint_at): New function.
4775 (find_raw_breakpoint_at): New type and size parameters. Use them.
4776 (insert_memory_breakpoint): New function, based off
4777 set_raw_breakpoint_at.
4778 (remove_memory_breakpoint): New function.
4779 (set_raw_breakpoint_at): Reimplement.
4780 (set_breakpoint): New, based on set_breakpoint_at.
4781 (set_breakpoint_at): Reimplement.
4782 (delete_raw_breakpoint): Go through the_target->remove_point
4783 instead of assuming memory breakpoints.
4784 (find_gdb_breakpoint_at): Delete.
4785 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4786 (find_gdb_breakpoint): New function.
4787 (set_gdb_breakpoint_at): Delete.
4788 (z_type_supported): New function.
4789 (set_gdb_breakpoint_1): New function, loosely based off
4790 set_gdb_breakpoint_at.
4791 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4792 (delete_gdb_breakpoint_at): Delete.
4793 (delete_gdb_breakpoint_1): New function, loosely based off
4794 delete_gdb_breakpoint_at.
4795 (delete_gdb_breakpoint): New function.
4796 (clear_gdb_breakpoint_conditions): Rename to ...
4797 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4798 breakpoint.
4799 (add_condition_to_breakpoint): Make static.
4800 (add_breakpoint_condition): Take a struct breakpoint pointer
4801 instead of an address. Adjust.
4802 (gdb_condition_true_at_breakpoint): Rename to ...
4803 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4804 z_type parameter.
4805 (gdb_condition_true_at_breakpoint): Reimplement.
4806 (add_breakpoint_commands): Take a struct breakpoint pointer
4807 instead of an address. Adjust.
4808 (gdb_no_commands_at_breakpoint): Rename to ...
4809 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4810 parameter. Return true if no breakpoint was found. Change debug
4811 output.
4812 (gdb_no_commands_at_breakpoint): Reimplement.
4813 (run_breakpoint_commands): Rename to ...
4814 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4815 and change return type to boolean.
4816 (run_breakpoint_commands): New function.
4817 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4818 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4819 breakpoint. Go through the_target->remove_point instead of
4820 assuming memory breakpoint.
4821 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4822 software and hardware breakpoints.
4823 (reinsert_raw_breakpoint): Go through the_target->insert_point
4824 instead of assuming memory breakpoint.
4825 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4826 software and hardware breakpoints.
4827 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4828 Check both software and hardware breakpoints.
4829 (validate_inserted_breakpoint): Assert the breakpoint is a
4830 software breakpoint. Set the inserted flag to -1 instead of
4831 setting shlib_disabled.
4832 (delete_disabled_breakpoints): Adjust.
4833 (validate_breakpoints): Only validate software breakpoints.
4834 Adjust to inserted flag change.
4835 (check_mem_read, check_mem_write): Skip breakpoint types other
4836 than software breakpoints. Adjust to inserted flag change.
4837 * mem-break.h (enum raw_bkpt_type): New enum.
4838 (raw_breakpoint, struct process_info): Forward declare.
4839 (Z_packet_to_target_hw_bp_type): Delete declaration.
4840 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4841 (set_gdb_breakpoint, delete_gdb_breakpoint)
4842 (clear_breakpoint_conditions): New declarations.
4843 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4844 (breakpoint_inserted_here): Update comment.
4845 (add_breakpoint_condition, add_breakpoint_commands): Replace
4846 address parameter with a breakpoint pointer parameter.
4847 (gdb_breakpoint_here): Update comment.
4848 (delete_gdb_breakpoint_at): Delete.
4849 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4850 * server.c (process_point_options): Take a struct breakpoint
4851 pointer instead of an address. Adjust.
4852 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4853 delete_gdb_breakpoint.
4854 * spu-low.c (spu_target_ops): Install NULL as
4855 supports_z_point_type method.
4856 * target.h: Include mem-break.h.
4857 (struct target_ops) <prepare_to_access_memory>: Update comment.
4858 <supports_z_point_type>: New field.
4859 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4860 instead of a char. Also take a raw breakpoint pointer.
4861 * win32-arm-low.c (the_low_target): Install NULL as
4862 supports_z_point_type.
4863 * win32-i386-low.c (i386_supports_z_point_type): New function.
4864 (i386_insert_point, i386_remove_point): Adjust to new interface.
4865 (the_low_target): Install i386_supports_z_point_type.
4866 * win32-low.c (win32_supports_z_point_type): New function.
4867 (win32_insert_point, win32_remove_point): Adjust to new interface.
4868 (win32_target_ops): Install win32_supports_z_point_type.
4869 * win32-low.h (struct win32_target_ops):
4870 <supports_z_point_type>: New method.
4871 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4872 instead of a char. Also take a raw breakpoint pointer.
4873
4874 2014-05-20 Pedro Alves <palves@redhat.com>
4875
4876 * mem-break.h: Include break-common.h.
4877 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4878 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4879 (Z_packet_to_target_hw_bp_type): New declaration.
4880 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4881 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4882 (Z_PACKET_ACCESS_WP): Delete macros.
4883 (Z_packet_to_hw_type): Delete function.
4884 * i386-low.h: Don't include break-common.h here.
4885 (Z_packet_to_hw_type): Delete declaration.
4886 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4887 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4888 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4889 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4890 * linux-aarch64-low.c: Don't include break-common.h here.
4891 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4892 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4893 (Z_packet_to_target_hw_bp_type): Delete function.
4894 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4895 function.
4896 (mips_insert_point, mips_remove_point): Use
4897 Z_packet_to_target_hw_bp_type.
4898
4899 2014-05-20 Pedro Alves <palves@redhat.com>
4900
4901 * linux-aarch64-low.c: Include break-common.h.
4902 (enum target_point_type): Delete.
4903 (Z_packet_to_point_type): Rename to ...
4904 (Z_packet_to_target_hw_bp_type): ... this, and return a
4905 target_hw_bp_type instead.
4906 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4907 instead of an enum target_point_type.
4908 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4909 breakpoint type.
4910 (aarch64_dr_state_insert_one_point)
4911 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4912 (aarch64_handle_aligned_watchpoint)
4913 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4914 Take an enum target_hw_bp_type instead of an enum
4915 target_point_type.
4916 (aarch64_supports_z_point_type): New function.
4917 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4918 use Z_packet_to_target_hw_bp_type.
4919
4920 2014-05-20 Joel Brobecker <brobecker@adacore.com>
4921
4922 * configure.ac: Only use -Werror by default when DEVELOPMENT
4923 is true.
4924 * configure: Regenerate.
4925
4926 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4927
4928 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4929 * linux-x86-low.c (X86_64_USER_REGS): New.
4930 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4931
4932 2014-04-28 Yao Qi <yao@codesourcery.com>
4933
4934 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4935 name.
4936
4937 2014-04-25 Pedro Alves <palves@redhat.com>
4938
4939 PR server/16255
4940 * linux-low.c (linux_attach_fail_reason_string): New function.
4941 (linux_attach_lwp): Delete.
4942 (linux_attach_lwp_1): Rename to ...
4943 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4944 argument. Remove "initial" parameter. Return int instead of
4945 void. Don't error or warn here.
4946 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4947 failure to attach to the tgid. Call warning when failing to
4948 attach to an lwp.
4949 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4950 argument. Remove "initial" parameter. Return int instead of
4951 void. Don't error or warn here.
4952 (linux_attach_fail_reason_string): New declaration.
4953 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4954 interface change. Use linux_attach_fail_reason_string.
4955
4956 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
4957 Walfred Tedeschi <walfred.tedeschi@intel.com>
4958
4959 * Makefile.in: Added rules to handle new files
4960 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4961 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4962 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4963 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4964 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4965 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4966 x32-avx512-linux.o.
4967 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4968 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4969 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4970 i386/x32-avx512.xml.
4971 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4972 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4973 i386/x32-avx512-linux.xml.
4974 * i387-fp.c (num_avx512_k_registers): New constant for number
4975 of K registers.
4976 (num_avx512_zmmh_low_registers): New constant for number of
4977 lower ZMM registers (0-15).
4978 (num_avx512_zmmh_high_registers): New constant for number of
4979 higher ZMM registers (16-31).
4980 (num_avx512_ymmh_registers): New contant for number of higher
4981 YMM registers (ymm16-31 added by avx521 on x86_64).
4982 (num_avx512_xmm_registers): New constant for number of higher
4983 XMM registers (xmm16-31 added by AVX512 on x86_64).
4984 (struct i387_xsave): Add space for AVX512 registers.
4985 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4986 Add code to handle AVX512 registers.
4987 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4988 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4989 prototypei from generated file.
4990 (tdesc_amd64_avx512_linux): Likewise.
4991 (init_registers_x32_avx512_linux): Likewise.
4992 (tdesc_x32_avx512_linux): Likewise.
4993 (init_registers_i386_avx512_linux): Likewise.
4994 (tdesc_i386_avx512_linux): Likewise.
4995 (x86_64_regmap): Add AVX512 registers.
4996 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4997 mask.
4998 (initialize_low_arch): Add code to initialize AVX512 registers.
4999
5000 2014-04-23 Pedro Alves <palves@redhat.com>
5001
5002 * mem-break.c (find_gdb_breakpoint_at): Make static.
5003 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5004
5005 2014-04-23 Pedro Alves <palves@redhat.com>
5006
5007 * i386-low.c: Don't include break-common.h here.
5008 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5009 prototype to take target_hw_bp_type as argument instead of a Z
5010 packet char.
5011 * i386-low.h: Include break-common.h here.
5012 (Z_packet_to_hw_type): Declare.
5013 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5014 prototypes.
5015 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5016 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5017 (x86_remove_point): Convert the packet number to a
5018 target_hw_bp_type before calling i386_low_remove_watchpoint.
5019 * win32-i386-low.c (i386_insert_point): Convert the packet number
5020 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5021 (i386_remove_point): Convert the packet number to a
5022 target_hw_bp_type before calling i386_low_remove_watchpoint.
5023
5024 2014-04-23 Pedro Alves <palves@redhat.com>
5025
5026 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5027
5028 2014-04-10 Pedro Alves <palves@redhat.com>
5029
5030 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5031 Check if the condition or command is NULL before checking if the
5032 breakpoint is known. On success, return true.
5033 * mem-break.h (add_breakpoint_condition): Document return.
5034 (add_breakpoint_commands): Add describing comment.
5035 * server.c (skip_to_semicolon): New function.
5036 (process_point_options): Use it.
5037
5038 2014-04-09 Pedro Alves <palves@redhat.com>
5039
5040 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5041 to lwpid_of.
5042
5043 2014-02-27 Pedro Alves <palves@redhat.com>
5044
5045 PR 12702
5046 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5047 macros.
5048 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5049 output.
5050 (last_thread_of_process_p): Take a PID argument instead of a
5051 thread pointer.
5052 (linux_wait_for_lwp): Delete.
5053 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5054 functions.
5055 (linux_low_filter_event): New function, party factored out from
5056 linux_wait_for_event.
5057 (linux_wait_for_event): Rename to ...
5058 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5059 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5060 sigsuspend. Check for zombie leaders.
5061 (linux_wait_for_event): Reimplement as wrapper around
5062 linux_wait_for_event_filtered.
5063 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5064 a normal or signal exit is seen, it's the whole process exiting.
5065 (wait_for_sigstop): No longer a for_each_inferior callback.
5066 Rewrite on top of linux_wait_for_event_filtered.
5067 (stop_all_lwps): Call wait_for_sigstop directly.
5068 * server.c (resume, handle_target_event): Handle
5069 TARGET_WAITKIND_NO_RESUMED.
5070
5071 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5072
5073 * win32-low.c (psapi_get_dll_name,
5074 * win32_CreateToolhelp32Snapshot): Delete.
5075 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5076 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5077 Delete.
5078 (handle_load_dll): Add function description.
5079 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5080
5081 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5082
5083 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5084 Add comment.
5085 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5086 base address when calling win32_add_one_solib.
5087 (handle_load_dll): Delete local variable load_addr.
5088 Remove 0x1000 offset applied to DLL base address when calling
5089 win32_add_one_solib.
5090 (handle_unload_dll): Add comment.
5091
5092 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5093
5094 * win32-low.c (win32_add_all_dlls): Renames
5095 win32_ensure_ntdll_loaded. Rewrite function documentation.
5096 Adjust implementation to always load all DLLs.
5097 Add 0x1000 offset to DLL base address when calling
5098 win32_add_one_solib.
5099 (child_initialization_done): New static global.
5100 (do_initial_child_stuff): Set child_initialization_done to
5101 zero during child initialization, and 1 after. Replace call
5102 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5103 Add comment.
5104 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5105 (handle_unload_dll): Add function documentation.
5106 (get_child_debug_event): Ignore load and unload DLL events
5107 during child initialization.
5108
5109 2014-02-20 Doug Evans <dje@google.com>
5110
5111 Remove global all_lwps.
5112 * inferiors.h (ptid_of): Move here from linux-low.h.
5113 (pid_of, lwpid_of): Ditto.
5114 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5115 parameter is a struct thread_info * now.
5116 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5117 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5118 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5119 directly.
5120 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5121 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5122 * linux-arm-low.c (update_registers_callback): Update, "entry"
5123 parameter is a struct thread_info * now.
5124 Fetch lwpid from current_inferior directly.
5125 (arm_insert_point): Pass &all_threads to find_inferior instead of
5126 &all_lwps.
5127 (arm_remove_point): Ditto.
5128 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5129 (arm_prepare_to_resume): Fetch pid from thread.
5130 (arm_read_description): Fetch lwpid from current_inferior directly.
5131 * linux-low.c (all_lwps): Delete.
5132 (delete_lwp): Delete call to remove_inferior.
5133 (handle_extended_wait): Fetch lwpid from thread.
5134 (add_lwp): Don't set lwp->entry.id. Remove call to
5135 add_inferior_to_list.
5136 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5137 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5138 (kill_one_lwp_callback): Ditto.
5139 (linux_kill): Don't dereference NULL pointer.
5140 Fetch ptid,lwpid from thread.
5141 (get_detach_signal): Fetch ptid from thread.
5142 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5143 Simplify call to regcache_invalidate_thread.
5144 (delete_lwp_callback): Update, "entry" parameter is a
5145 struct thread_info * now. Fetch pid from thread.
5146 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5147 (status_pending_p_callback): Update, "entry" parameter is a
5148 struct thread_info * now. Fetch ptid from thread.
5149 (find_lwp_pid): Update, "entry" parameter is a
5150 struct thread_info * now.
5151 (linux_wait_for_lwp): Fetch pid from thread.
5152 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5153 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5154 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5155 (dequeue_one_deferred_signal): Ditto.
5156 (cancel_breakpoint): Fetch ptid from current_inferior.
5157 (linux_wait_for_event): Pass &all_threads to find_inferior,
5158 not &all_lwps. Fetch ptid, lwpid from thread.
5159 (count_events_callback): Update, "entry" parameter is a
5160 struct thread_info * now.
5161 (select_singlestep_lwp_callback): Ditto.
5162 (select_event_lwp_callback): Ditto.
5163 (cancel_breakpoints_callback): Ditto.
5164 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5165 not &all_lwps.
5166 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5167 (unsuspend_one_lwp): Update, "entry" parameter is a
5168 struct thread_info * now.
5169 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5170 not &all_lwps.
5171 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5172 Fetch lwpid from thread, not lwp.
5173 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5174 Pass &all_threads to find_inferior, not &all_lwps.
5175 (send_sigstop): Fetch lwpid from thread, not lwp.
5176 (send_sigstop_callback): Update, "entry" parameter is a
5177 struct thread_info * now.
5178 (suspend_and_send_sigstop_callback): Ditto.
5179 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5180 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5181 struct thread_info * now.
5182 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5183 from thread, lwp.
5184 (lwp_running): Update, "entry" parameter is a
5185 struct thread_info * now.
5186 (stop_all_lwps): Fetch ptid from thread.
5187 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5188 (linux_resume_one_lwp): Fetch lwpid from thread.
5189 (linux_set_resume_request): Update, "entry" parameter is a
5190 struct thread_info * now. Fetch pid, lwpid from thread.
5191 (resume_status_pending_p): Update, "entry" parameter is a
5192 struct thread_info * now.
5193 (need_step_over_p): Ditto. Fetch lwpid from thread.
5194 (start_step_over): Fetch lwpid from thread.
5195 (linux_resume_one_thread): Update, "entry" parameter is a
5196 struct thread_info * now. Fetch lwpid from thread.
5197 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5198 (proceed_one_lwp): Update, "entry" parameter is a
5199 struct thread_info * now. Fetch lwpid from thread.
5200 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5201 struct thread_info * now.
5202 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5203 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5204 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5205 directly.
5206 (regsets_store_inferior_registers): Ditto.
5207 (fetch_register, store_register): Ditto.
5208 (linux_read_memory, linux_write_memory): Ditto.
5209 (linux_request_interrupt): Ditto.
5210 (linux_read_auxv): Ditto.
5211 (linux_xfer_siginfo): Ditto.
5212 (linux_qxfer_spu): Ditto.
5213 (linux_qxfer_libraries_svr4): Ditto.
5214 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5215 moved to inferiors.h.
5216 (get_lwp): Delete.
5217 (get_thread_lwp): Update.
5218 (struct lwp_info): Delete member "entry". Simplify comment for
5219 member "thread".
5220 (all_lwps): Delete.
5221 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5222 current_inferior directly.
5223 (update_watch_registers_callback): Update, "entry" parameter is a
5224 struct thread_info * now. Fetch pid from thread.
5225 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5226 (mips_insert_point): Fetch lwpid from current_inferior.
5227 Pass &all_threads to find_inferior, not &all_lwps.
5228 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5229 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5230 directly.
5231 (mips_stopped_data_address): Ditto.
5232 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5233 directly.
5234 * linux-tile-low.c (tile_arch_setup): Ditto.
5235 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5236 (update_debug_registers_callback): Update, "entry" parameter is a
5237 struct thread_info * now. Fetch pid from thread.
5238 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5239 Pass &all_threads to find_inferior, not &all_lwps.
5240 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5241 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5242 Pass &all_threads to find_inferior, not &all_lwps.
5243 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5244 (i386_dr_low_get_status): Ditto.
5245 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5246 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5247 (x86_linux_read_description): Ditto.
5248 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5249
5250 2014-02-20 Doug Evans <dje@google.com>
5251
5252 * inferiors.c (get_first_inferior): Fix buglet.
5253
5254 2014-02-19 Doug Evans <dje@google.com>
5255
5256 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5257 * inferiors.c (add_thread): Change result type to struct thread_info *.
5258 All callers updated.
5259 (add_lwp): Call add_thread here instead of in callers.
5260 All callers updated.
5261 * linux-low.h (get_lwp_thread): Rewrite.
5262 (struct lwp_info): New member "thread".
5263
5264 2014-02-19 Doug Evans <dje@google.com>
5265
5266 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5267 All callers updated.
5268
5269 2014-02-19 Doug Evans <dje@google.com>
5270
5271 * inferiors.c (add_thread): Fix whitespace.
5272
5273 2014-02-19 Doug Evans <dje@google.com>
5274
5275 * dll.c (clear_dlls): Replace accessing list implemention details
5276 with API function.
5277 * gdbthread.h (get_first_thread): Declare.
5278 * inferiors.c (for_each_inferior_with_data): New function.
5279 (get_first_thread): New function.
5280 (find_thread_ptid): Simplify.
5281 (get_first_inferior): New function.
5282 (clear_list): Delete.
5283 (one_inferior_p): New function.
5284 (clear_inferior_list): New function.
5285 (clear_inferiors): Update.
5286 * inferiors.h (for_each_inferior_with_data): Declare.
5287 (clear_inferior_list): Declare.
5288 (one_inferior_p): Declare.
5289 (get_first_inferior): Declare.
5290 * linux-low.c (linux_wait_for_event): Replace accessing list
5291 implemention details with API function.
5292 * server.c (target_running): Ditto.
5293 (accumulate_file_name_length): New function.
5294 (emit_dll_description): New function.
5295 (handle_qxfer_libraries): Replace accessing list implemention
5296 details with API function.
5297 (handle_qxfer_threads_worker): New function.
5298 (handle_qxfer_threads_proper): Replace accessing list implemention
5299 details with API function.
5300 (handle_query): Ditto.
5301 (visit_actioned_threads_callback_ftype): New typedef.
5302 (visit_actioned_threads_data): New struct.
5303 (visit_actioned_threads): Rewrite to be find_inferior callback.
5304 (resume): Call find_inferior.
5305 (handle_status): Replace accessing list implemention
5306 details with API function.
5307 (process_serial_event): Replace accessing list implemention details
5308 with API function.
5309 * target.c (set_desired_inferior): Replace accessing list implemention
5310 details with API function.
5311 * tracepoint.c (same_process_p): New function.
5312 (gdb_agent_about_to_close): Replace accessing list implemention
5313 details with API function.
5314 * win32-low.c (child_delete_thread): Replace accessing list
5315 implemention details with API function.
5316 (match_dll_by_basename): New function.
5317 (dll_is_loaded_by_basename): New function.
5318 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5319 details call to dll_is_loaded_by_basename.
5320
5321 2014-02-19 Doug Evans <dje@google.com>
5322
5323 * dll.h (struct dll_info): Add comment.
5324 * gdbthread.h (struct thread_info): Add comment.
5325 (current_ptid): Simplify.
5326 * inferiors.c (add_process): Update.
5327 (remove_process): Update.
5328 * inferiors.h (struct process_info): Rename member "head" to "entry".
5329 * linux-low.c (delete_lwp): Update.
5330 (add_lwp): Update.
5331 (last_thread_of_process_p): Update.
5332 (kill_one_lwp_callback, linux_kill): Update.
5333 (status_pending_p_callback): Update.
5334 (wait_for_sigstop): Update. Simplify read of ptid.
5335 (start_step_over): Update.
5336 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5337 (get_lwp_thread): Update.
5338 (struct lwp_info): Rename member "head" to "entry".
5339 * regcache.h (inferior_list_entry): Delete.
5340 * server.c (kill_inferior_callback): Update.
5341 (detach_or_kill_inferior_callback): Update.
5342 (print_started_pid): Update.
5343 (print_attached_pid): Update.
5344 (process_serial_event): Simplify read of ptid.
5345 * thread-db.c (thread_db_create_event): Update.
5346 (thread_db_get_tls_address): Update.
5347 * win32-low.c (current_inferior_ptid): Simplify.
5348
5349 2014-02-19 Tom Tromey <tromey@redhat.com>
5350
5351 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5352 argument.
5353 (target_supports_btrace): Update.
5354
5355 2014-02-14 Yao Qi <yao@codesourcery.com>
5356
5357 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5358 (rsp-low-ipa.o): New target.
5359
5360 2014-02-12 Tom Tromey <tromey@redhat.com>
5361
5362 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5363 convert_ascii_to_int.
5364 * regcache.c (registers_to_string): Likewise.
5365 * remote-utils.c (decode_M_packet): Likewise.
5366 * server.c (process_serial_event): Likewise.
5367
5368 2014-02-12 Tom Tromey <tromey@redhat.com>
5369
5370 * server.c (handle_query, handle_v_run): Use hex2bin, not
5371 unhexify.
5372 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5373
5374 2014-02-12 Tom Tromey <tromey@redhat.com>
5375
5376 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5377 convert_int_to_ascii.
5378 * regcache.c (registers_to_string, collect_register_as_string):
5379 Likewise.
5380 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5381 Likewise.
5382 * server.c (process_serial_event): Likewise.
5383 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5384 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5385
5386 2014-02-12 Tom Tromey <tromey@redhat.com>
5387
5388 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5389 bin2hex, not hexify.
5390 * tracepoint.c (cmd_qtstatus): Likewise.
5391
5392 2014-02-12 Tom Tromey <tromey@redhat.com>
5393
5394 * remote-utils.c (monitor_output): Pass explicit length to
5395 hexify.
5396
5397 2014-02-12 Tom Tromey <tromey@redhat.com>
5398
5399 * tracepoint.c: Include rsp-low.h.
5400 * server.c: Include rsp-low.h.
5401 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5402 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5403 declare.
5404 * remote-utils.c: Include rsp-low.h.
5405 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5406 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5407 (convert_int_to_ascii, convert_ascii_to_int): Move to
5408 common/rsp-low.c.
5409 * regcache.c: Include rsp-low.h.
5410 * ax.c: Include rsp-low.h.
5411 * Makefile.in (SFILES): Add common/rsp-low.c.
5412 (OBS): Add rsp-low.o.
5413 (rsp-low.o): New target.
5414
5415 2014-02-12 Tom Tromey <tromey@redhat.com>
5416
5417 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5418 Include print-utils.h.
5419 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5420 (plongest, thirty_two, phex_nz): Remove.
5421 * Makefile.in (SFILES): Add common/print-utils.c.
5422 (OBS): Add print-utils.o.
5423 (print-utils-ipa.o): New target.
5424 (print-utils.o): New target.
5425 (IPA_OBJS): Add print-utils-ipa.o.
5426
5427 2014-02-06 Tom Tromey <tromey@redhat.com>
5428
5429 * Makefile.in (SFILES): Fix indentation.
5430
5431 2014-02-05 Doug Evans <dje@google.com>
5432
5433 * linux-low.c (linux_wait_for_event): Improve comment.
5434 (linux_wait_1): Keep current_inferior in sync with event_child.
5435
5436 2014-01-22 Doug Evans <dje@google.com>
5437
5438 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5439
5440 2014-01-22 Doug Evans <dje@google.com>
5441
5442 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5443 * configure: Regenerate.
5444 * config.in: Regenerate.
5445 * Makefile.in (SFILES): Add debug.c.
5446 (OBS): Add debug.o.
5447 * debug.c: New file.
5448 * debug.h: New file.
5449 * linux-aarch64-low.c (*): Update all debugging printfs to use
5450 debug_printf instead of fprintf.
5451 * linux-arm-low.c (*): Ditto.
5452 * linux-cris-low.c (*): Ditto.
5453 * linux-crisv32-low.c (*): Ditto.
5454 * linux-m32r-low.c (*): Ditto.
5455 * linux-sparc-low.c (*): Ditto.
5456 * linux-x86.c (*): Ditto.
5457 * linux-low.c (*): Ditto.
5458 (linux_wait_1): Add calls to debug_enter, debug_exit.
5459 (linux_wait): Remove redundant debugging printf.
5460 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5461 (linux_resume, unstop_all_lwps): Ditto.
5462 * mem-break.c (*): Update all debugging printfs to use
5463 debug_printf instead of fprintf.
5464 * remote-utils.c (*): Ditto.
5465 * thread-db.c (*): Ditto.
5466 * server.c #include <ctype.h>, "gdb_vecs.h".
5467 (debug_threads): Moved to debug.c.
5468 (*): Update all debugging printfs to use debug_printf instead of
5469 fprintf.
5470 (start_inferior): Replace call to fflush with call to debug_flush.
5471 (monitor_show_help): Mention set debug-format.
5472 (parse_debug_format_options): New function.
5473 (handle_monitor_command): Handle "monitor set debug-format".
5474 (gdbserver_usage): Mention --debug-format.
5475 (main): Parse --debug-format.
5476 * server.h (debug_threads): Declaration moved to debug.h.
5477 #include "debug.h".
5478 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5479 trace_debug_1 that uses debug_printf.
5480 (tracepoint_look_up_symbols): Update all debugging printfs to use
5481 debug_printf instead of fprintf.
5482
5483 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5484
5485 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5486 sys/ptrace.h.
5487
5488 2014-01-17 Pedro Alves <palves@redhat.com>
5489
5490 PR build/16445
5491 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5492 defined after including gdb_proc_service.h.
5493
5494 2014-01-16 Doug Evans <dje@google.com>
5495
5496 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5497 (match_dll): Use it.
5498
5499 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5500
5501 * target.h (target_ops) <read_btrace>: Change parameters and
5502 return type to allow error reporting.
5503 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5504 trace reading errors on.
5505 * linux-low.c (linux_low_read_btrace): Pass trace reading
5506 errors on.
5507 (linux_low_disable_btrace): New.
5508
5509 2014-01-15 Doug Evans <dje@google.com>
5510
5511 * inferiors.c (thread_id_to_gdb_id): Delete.
5512 * inferiors.h (thread_id_to_gdb_id): Delete.
5513
5514 2014-01-13 Eli Zaretskii <eliz@gnu.org>
5515
5516 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5517 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5518 versions.
5519
5520 2014-01-08 Pedro Alves <palves@redhat.com>
5521
5522 * server.c (handle_status): Don't discard previous queued stop
5523 replies or thread's pending status here.
5524 (main) <disconnection>: Do it here instead.
5525
5526 2014-01-08 Pedro Alves <palves@redhat.com>
5527
5528 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5529 * server.c (visit_actioned_threads, handle_pending_status): New
5530 function.
5531 (handle_v_cont): Factor out parts to ...
5532 (resume): ... this new function. If in all-stop, and a thread
5533 being resumed has a pending status, report it without actually
5534 resuming.
5535 (myresume): Adjust to use the new 'resume' function.
5536 (clear_pending_status_callback, set_pending_status_callback)
5537 (find_status_pending_thread_callback): New functions.
5538 (handle_status): Handle the case of multiple threads having
5539 interesting statuses to report. Report threads' real last signal
5540 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5541 with an interesting thread to report the status for, instead of
5542 always reporting the status of the first thread.
5543
5544 2014-01-01 Joel Brobecker <brobecker@adacore.com>
5545
5546 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5547 * gdbreplay.c (gdbreplay_version): Likewise.
5548
5549 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5550
5551 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5552 iov.iov_len with the real length in use.
5553
5554 2013-12-13 Joel Brobecker <brobecker@adacore.com>
5555
5556 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5557 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5558 for all targets that use win32-low.c.
5559 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5560 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5561
5562 2013-12-13 Pedro Alves <palves@redhat.com>
5563
5564 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5565 if equal to TARGET_WAITKIND_LOADED.
5566 * win32-low.c (cached_status): New static global.
5567 (win32_wait): Add declaration.
5568 (do_initial_child_stuff): Flush all initial pending debug events
5569 up to the initial breakpoint.
5570 (win32_wait): If CACHED_STATUS was set, return that instead
5571 of doing a real wait. Remove the code resuming the execution
5572 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5573 during the initial phase. Also remove the code changing
5574 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5575 TARGET_WAITKIND_STOPPED.
5576
5577 2013-12-11 Yao Qi <yao@codesourcery.com>
5578
5579 * notif.c (handle_notif_ack): Return 0 if no notification
5580 matches.
5581
5582 2013-11-20 Doug Evans <dje@google.com>
5583
5584 * linux-low.c (linux_set_resume_request): Fix comment.
5585
5586 2013-11-20 Doug Evans <dje@google.com>
5587
5588 * linux-low.c (resume_status_pending_p): Tweak comment.
5589
5590 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5591
5592 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5593 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5594 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5595 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5596 (srv_amd64_regobj): Add amd64-mpx.o.
5597 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5598 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5599 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5600 * i387-fp.c (num_pl_bnd_register) Added constant.
5601 (num_pl_bnd_cfg_registers) Added constant.
5602 (struct i387_xsave) Added reserved area and MPX fields.
5603 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5604 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5605 function.
5606 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5607 (init_registers_amd64_mpx_linux): Declare new function.
5608 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5609 (x86_64_regmap): Add MPX registers.
5610 (x86_linux_read_description): Add MPX case.
5611 (initialize_low_arch): Initialize MPX targets.
5612
5613 2013-11-18 Tom Tromey <tromey@redhat.com>
5614
5615 * configure: Rebuild.
5616 * configure.ac: Don't check for stdlib.h.
5617 * gdbreplay.c: Unconditionally include stdlib.h.
5618
5619 2013-11-18 Tom Tromey <tromey@redhat.com>
5620
5621 * config.in: Rebuild.
5622 * configure: Rebuild.
5623 * configure.ac: Don't use AC_HEADER_DIRENT.
5624
5625 2013-11-18 Tom Tromey <tromey@redhat.com>
5626
5627 * server.h: Don't check HAVE_STRING_H.
5628 * gdbreplay.c: Don't check HAVE_STRING_H.
5629 * configure: Rebuild.
5630
5631 2013-11-18 Tom Tromey <tromey@redhat.com>
5632
5633 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5634 LIBGNU.
5635
5636 2013-11-08 Tom Tromey <tromey@redhat.com>
5637
5638 * configure, config.in: Rebuild.
5639 * configure.ac: Remove unused configury.
5640
5641 2013-11-08 Tom Tromey <tromey@redhat.com>
5642
5643 * acinclude.m4: Include common.m4, codeset.m4.
5644 * configure, config.in: Rebuild.
5645 * configure.ac: Use GDB_AC_COMMON.
5646
5647 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5648
5649 * linux-s390-low.c (HWCAP_S390_TE): New define.
5650 (s390_arch_setup): Consider the TE field in the HWCAP for
5651 determining 'have_regset_tdb'.
5652
5653 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5654
5655 PR gdb/16014
5656 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5657 call to sizeof.
5658
5659 2013-10-02 Pedro Alves <palves@redhat.com>
5660
5661 * server.c (process_serial_event): Don't output "GDBserver
5662 exiting" if GDB is connected through stdio.
5663 * target.c (mywait): Likewise, be silent if GDB is connected
5664 through stdio.
5665
5666 2013-10-01 Joel Brobecker <brobecker@adacore.com>
5667
5668 * lynx-low.c (lynx_add_threads_after_attach): New function.
5669 (lynx_attach): Remove call to add_thread. Add call to
5670 lynx_add_threads_after_attach instead.
5671
5672 2013-09-28 Mike Frysinger <vapier@gentoo.org>
5673
5674 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5675 * config.in, configure: Regenerated.
5676
5677 2013-09-18 Yao Qi <yao@codesourcery.com>
5678
5679 PR server/15959
5680 * server.c (start_inferior): Clear 'resume_info'.
5681
5682 2013-09-16 Jiong Wang <jiwang@tilera.com>
5683
5684 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5685 for each register.
5686
5687 2013-09-16 Jiong Wang <jiwang@tilera.com>
5688
5689 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5690 linux-tile-low.o to srv_tgtobj.
5691
5692 2013-09-16 Will Newton <will.newton@linaro.org>
5693
5694 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5695 out regs.
5696
5697 2013-09-06 Pedro Alves <palves@redhat.com>
5698
5699 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5700 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5701 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5702 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5703 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5704 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5705
5706 2013-09-06 Pedro Alves <palves@redhat.com>
5707
5708 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5709 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5710
5711 2013-09-06 Pedro Alves <palves@redhat.com>
5712
5713 * linux-amd64-ipa.c: Include tracepoint.h.
5714 * linux-i386-ipa.c: Include tracepoint.h.
5715
5716 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5717
5718 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5719 (ps_get_thread_area): New function.
5720
5721 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5722
5723 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5724 (initialize_low_arch): Call init_registers_crisv32 rather than
5725 init_register_crisv32.
5726
5727 2013-09-05 Pedro Alves <palves@redhat.com>
5728
5729 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5730 to ...
5731 * hostio.h: ... this new file.
5732 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5733 win32-low.c: Include hostio.h.
5734
5735 2013-09-05 Pedro Alves <palves@redhat.com>
5736
5737 * server.h (gdb_client_data, handler_func, callback_handler_func)
5738 (delete_file_handler, add_file_handler, append_callback_event)
5739 (delete_callback_event, start_event_loop, initialize_event_loop):
5740 Move to event-loop.h and include it.
5741 * event-loop.h: New file.
5742
5743 2013-09-05 Pedro Alves <palves@redhat.com>
5744
5745 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5746 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5747 (loaded_dll, unloaded_dll): Move to ...
5748 * dll.h: ... this new file.
5749 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5750
5751 2013-09-05 Pedro Alves <palves@redhat.com>
5752
5753 * server.h (current_process, get_thread_process, all_processes)
5754 (add_inferior_to_list, for_each_inferior, current_inferior)
5755 (remove_inferior, add_process, remove_process, find_process_pid)
5756 (have_started_inferiors_p, have_attached_inferiors_p)
5757 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5758 (clear_inferiors, find_inferior, find_inferior_id)
5759 (inferior_target_data, set_inferior_target_data)
5760 (inferior_regcache_data, set_inferior_regcache_data): Move to
5761 inferiors.h, and include it.
5762 * inferiors.h: New file.
5763
5764 2013-09-05 Pedro Alves <palves@redhat.com>
5765
5766 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5767 Move ...
5768 * ax.h: ... here.
5769
5770 2013-09-05 Pedro Alves <palves@redhat.com>
5771
5772 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5773 tracepoint.h.
5774 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5775 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5776 (handle_tracepoint_general_set, handle_tracepoint_query)
5777 (tracepoint_finished_step, tracepoint_was_hit)
5778 (release_while_stepping_state_list, current_traceframe)
5779 (in_readonly_region, traceframe_read_mem)
5780 (fetch_traceframe_registers, traceframe_read_sdata)
5781 (traceframe_read_info, struct fast_tpoint_collect_status)
5782 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5783 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5784 (supply_fast_tracepoint_registers)
5785 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5786 (ipa_tdesc, claim_trampoline_space)
5787 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5788 (agent_mem_read, agent_get_trace_state_variable_value)
5789 (agent_set_trace_state_variable_value, agent_tsv_read)
5790 (agent_mem_read_string, get_raw_reg_func_addr)
5791 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5792 * tracepoint.h: ... this new file.
5793
5794 2013-09-05 Pedro Alves <palves@redhat.com>
5795
5796 * server.h (perror_with_name, error, fatal, warning, paddress)
5797 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5798 include it.
5799 * utils.h: New file.
5800
5801 2013-09-05 Pedro Alves <palves@redhat.com>
5802
5803 * server.h (remote_debug, noack_mode, transport_is_reliable)
5804 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5805 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5806 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5807 (write_enn, initialize_async_io, enable_async_io)
5808 (disable_async_io, check_remote_input_interrupt_request)
5809 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5810 (dead_thread_notify, prepare_resume_reply)
5811 (decode_address_to_semicolon, decode_address, decode_m_packet)
5812 (decode_M_packet, decode_X_packet, decode_xfer_write)
5813 (decode_search_memory_packet, unhexify, hexify)
5814 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5815 (look_up_one_symbol, relocate_instruction)
5816 (monitor_output): Move to remote-utils.h, and include it.
5817 * remote-utils.h: New file.
5818
5819 2013-09-05 Pedro Alves <palves@redhat.com>
5820
5821 * server.h (_): Delete.
5822
5823 2013-09-02 Pedro Alves <palves@redhat.com>
5824
5825 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5826 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5827 allocated.
5828 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5829
5830 2013-09-02 Pierre Muller <muller@sourceware.org>
5831
5832 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5833 or WriteProcessMemory complete successfully and handle
5834 ERROR_PARTIAL_COPY error.
5835
5836 2013-09-02 Pedro Alves <palves@redhat.com>
5837
5838 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5839 error instead of EIO.
5840
5841 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5842
5843 PR server/15604
5844 * linux-low.c: Include filestuff.h.
5845 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5846 * lynx-low.c: Include filestuff.h.
5847 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5848 * server.c: Include filestuff.h.
5849 (main): Call notice_open_fds.
5850 * spu-low.c: Include filestuff.h.
5851 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5852
5853 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
5854
5855 * Makefile.in: Explain why ../target and ../nat are not
5856 listed as include file search paths.
5857 (linux-waitpid.o): New object file rule.
5858 * configure.srv (srv_native_linux_obj): New variable.
5859 Replace all occurrences of linux native object files with
5860 $srv_native_linux_obj.
5861 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5862 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5863 (linux_enable_event_reporting): Remove declaration.
5864 (my_waitpid): Moved to common/linux-waitpid.c.
5865 (linux_wait_for_event): Pass ptid when calling
5866 linux_enable_event_reporting.
5867 (linux_supports_tracefork_flag): Remove.
5868 (linux_enable_event_reporting): Likewise.
5869 (linux_tracefork_grandchild): Remove.
5870 (STACK_SIZE): Moved to common/linux-ptrace.c.
5871 (linux_tracefork_child): Remove.
5872 (linux_test_for_tracefork): Remove.
5873 (linux_look_up_symbols): Call linux_supports_traceclone.
5874 (initialize_low): Remove call to linux_test_for_tracefork.
5875 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5876 common/linux-ptrace.h.
5877 (PTRACE_TYPE_ARG4): Likewise.
5878 Include linux-ptrace.h.
5879
5880 2013-08-21 Pedro Alves <palves@redhat.com>
5881
5882 * config.in: Renegerate.
5883
5884 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
5885
5886 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5887 (SFILES): Remove $(srcdir)/common/target-common.c and
5888 add $(srcdir)/target/waitstatus.c.
5889 (OBS): Remove target-common.o and add waitstatus.o.
5890 (server_h): Remove $(srcdir)/../common/target-common.h and
5891 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5892 and $(srcdir)/../target/waitstatus.h.
5893 (target-common.o): Remove.
5894 (waitstatus.o): New target object file.
5895 * target.h: Do not include target-common.h and
5896 include target/resume.h, target/wait.h and
5897 target/waitstatus.h.
5898
5899 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
5900
5901 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5902 to PTRACE_TYPE_ARG3.
5903 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5904 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5905 PTRACE_TYPE_ARG4.
5906 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5907 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5908
5909 2013-07-27 Jie Zhang <jie@codesourcery.com>
5910 Daniel Jacobowitz <dan@codesourcery.com>
5911 Yao Qi <yao@codesourcery.com>
5912
5913 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5914 (mips-linux-watch.o): New rule.
5915 (mips_linux_watch_h): New variable.
5916 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5917 srv_tgtobj.
5918 * linux-mips-low.c: Include mips-linux-watch.h.
5919 (struct arch_process_info, struct arch_lwp_info): New.
5920 (update_watch_registers_callback): New function.
5921 (mips_linux_new_process, mips_linux_new_thread) New functions.
5922 (mips_linux_prepare_to_resume, mips_insert_point): New
5923 functions.
5924 (mips_remove_point, mips_stopped_by_watchpoint): New
5925 functions.
5926 (rsp_bp_type_to_target_hw_bp_type): New function.
5927 (mips_stopped_data_address): New function.
5928 (the_low_target): Add watchpoint support functions.
5929
5930 2013-07-27 Yao Qi <yao@codesourcery.com>
5931
5932 * i386-low.c: Include break-common.h.
5933 (enum target_hw_bp_type): Remove.
5934
5935 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
5936
5937 * Makefile.in (SFILES): /common/target-common.c.
5938 (OBS): Add target-common.o.
5939 (server_h): Add $(srcdir)/../common/target-common.h.
5940 (target-common.o): New target.
5941 * server.c (queue_stop_reply_callback): Free
5942 status string after use.
5943 * target.c (target_waitstatus_to_string): Remove.
5944 * target.h: Include target-common.h.
5945 (resume_kind): Likewise.
5946 (target_waitkind): Likewise.
5947 (target_waitstatus): Likewise.
5948 (TARGET_WNOHANG): Likewise.
5949
5950 2013-07-04 Yao Qi <yao@codesourcery.com>
5951
5952 * Makefile.in (host_alias): Use @host_noncanonical@.
5953 (target_alias): Use @target_noncanonical@.
5954 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5955 ACX_NONCANONICAL_HOST.
5956 * configure: Regenerated.
5957
5958 Revert:
5959 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5960
5961 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5962 * configure: Rebuild.
5963 * Makefile.in (version_host, version_target): Get from configure.
5964 (version.c): Use $(version_host) and $(version_target).
5965
5966 2013-07-03 Pedro Alves <palves@redhat.com>
5967
5968 * Makefile.in (config.status): Depend on development.sh.
5969 * acinclude.m4: Include libmcheck.m4.
5970 * configure: Regenerate.
5971
5972 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5973
5974 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5975 attribute inside the parentheses.
5976 (winapi_DebugSetProcessKillOnExit): Ditto.
5977 (winapi_DebugBreakProcess): Ditto.
5978 (winapi_GenerateConsoleCtrlEvent): Ditto.
5979
5980 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5981
5982 * notif.h (notif_event): Add a dummy member to avoid compiler
5983 errors.
5984
5985 2013-07-01 Pedro Alves <palves@redhat.com>
5986
5987 * hostio.c (HOSTIO_PATH_MAX): Define.
5988 (require_filename, handle_open, handle_unlink, handle_readlink):
5989 Use it.
5990
5991 2013-07-01 Pedro Alves <palves@redhat.com>
5992
5993 * server.h: Include "pathmax.h".
5994 * linux-low.c: Don't include sys/param.h.
5995 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5996 MAXPATHLEN.
5997 * win32-low.c: Don't include sys/param.h.
5998 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5999
6000 2013-07-01 Pedro Alves <palves@redhat.com>
6001
6002 * event-loop.c: Don't check HAVE_UNISTD_H before including
6003 <unistd.h>.
6004 * gdbreplay.c: Likewise.
6005 * remote-utils.c: Likewise.
6006 * server.c: Likewise.
6007 * configure.ac: Don't check for unistd.h.
6008 * configure: Regenerate.
6009
6010 2013-06-28 Tom Tromey <tromey@redhat.com>
6011
6012 * Makefile.in (version.c): Use version.in, not
6013 common/version.in.
6014
6015 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6016
6017 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6018 * configure: Rebuild.
6019 * Makefile.in (version_host, version_target): Get from configure.
6020 (version.c): Use $(version_host) and $(version_target).
6021
6022 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6023
6024 Fix trace-status to output user name without trailing colon.
6025 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6026
6027 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6028
6029 Fix trace-status to output proper start-time and stop-time.
6030 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6031 output start time and stop time in hex as gdb expects.
6032
6033 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6034
6035 * tracepoint.c (build_traceframe_info_xml): Output trace state
6036 variables present in the trace buffer.
6037
6038 2013-06-24 Tom Tromey <tromey@redhat.com>
6039
6040 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6041 create-version.sh.
6042 (version.o): Remove.
6043 * gdbreplay.c: Include version.h.
6044 (version, host_name): Don't declare.
6045 * server.h: Include version.h.
6046 (version, host_name): Don't declare.
6047
6048 2013-06-12 Pedro Alves <palves@redhat.com>
6049
6050 * linux-x86-low.c (linux_is_elf64): Delete global.
6051 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6052 with local linux_pid_exe_is_elf_64_file use.
6053
6054 2013-06-11 Pedro Alves <palves@redhat.com>
6055
6056 * linux-low.c (regset_disabled, disable_regset): New functions.
6057 (regsets_fetch_inferior_registers)
6058 (regsets_store_inferior_registers): Use them.
6059 (initialize_regsets_info); Don't allocate the disabled_regsets
6060 array here.
6061 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6062 comment.
6063
6064 2013-06-11 Pedro Alves <palves@redhat.com>
6065
6066 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6067 xmalloc.
6068
6069 2013-06-11 Pedro Alves <palves@redhat.com>
6070
6071 * linux-x86-low.c (initialize_low_arch): Call
6072 init_registers_x32_avx_linux.
6073
6074 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6075
6076 Fix compatibility with Android Bionic.
6077 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6078 it is not empty.
6079
6080 2013-06-07 Pedro Alves <palves@redhat.com>
6081
6082 PR server/14823
6083 * Makefile.in (OBS): Add tdesc.o.
6084 (IPA_OBJS): Add tdesc-ipa.o.
6085 (tdesc-ipa.o): New rule.
6086 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6087 interface.
6088 * linux-low.c (new_inferior): Delete.
6089 (disabled_regsets, num_regsets): Delete.
6090 (linux_add_process): Adjust to set the new per-process
6091 new_inferior flag.
6092 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6093 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6094 was a stop. When calling arch_setup, switch the current inferior
6095 to the thread that got an event.
6096 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6097 (regsets_fetch_inferior_registers)
6098 (regsets_store_inferior_registers): New regsets_info parameter.
6099 Adjust to use it.
6100 (linux_register_in_regsets): New regs_info parameter. Adjust to
6101 use it.
6102 (register_addr, fetch_register, store_register): New usrregs_info
6103 parameter. Adjust to use it.
6104 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6105 parameter regs_info. Adjust to use it.
6106 (linux_fetch_registers): Get the current inferior's regs_info, and
6107 adjust to use it.
6108 (linux_store_registers): Ditto.
6109 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6110 (initialize_low): Don't initialize the target_regsets here. Call
6111 initialize_low_arch.
6112 * linux-low.h (target_regsets): Delete declaration.
6113 (struct regsets_info): New.
6114 (struct usrregs_info): New.
6115 (struct regs_info): New.
6116 (struct process_info_private) <new_inferior>: New field.
6117 (struct linux_target_ops): Delete the num_regs, regmap, and
6118 regset_bitmap fields. New field regs_info.
6119 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6120 * i387-fp.c (num_xmm_registers): Delete.
6121 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6122 calls to new interface.
6123 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6124 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6125 Infer the number of xmm registers from the regcache's target
6126 description.
6127 * i387-fp.h (num_xmm_registers): Delete.
6128 * inferiors.c (add_thread): Don't install the thread's regcache
6129 here.
6130 * proc-service.c (gregset_info): Fetch the current inferior's
6131 regs_info. Adjust to use it.
6132 * regcache.c: Include tdesc.h.
6133 (register_bytes, reg_defs, num_registers)
6134 (gdbserver_expedite_regs): Delete.
6135 (get_thread_regcache): If the thread doesn't have a regcache yet,
6136 create one, instead of aborting gdbserver.
6137 (regcache_invalidate_one): Rename to ...
6138 (regcache_invalidate_thread): ... this.
6139 (regcache_invalidate_one): New.
6140 (regcache_invalidate): Only invalidate registers of the current
6141 process.
6142 (init_register_cache): Add target_desc parameter, and use it.
6143 (new_register_cache): Ditto. Assert the target description has a
6144 non zero registers_size.
6145 (regcache_cpy): Add assertions. Adjust.
6146 (realloc_register_cache, set_register_cache): Delete.
6147 (registers_to_string, registers_from_string): Adjust.
6148 (find_register_by_name, find_regno, find_register_by_number)
6149 (register_cache_size): Add target_desc parameter, and use it.
6150 (free_register_cache_thread, free_register_cache_thread_one)
6151 (regcache_release, register_cache_size): New.
6152 (register_size): Add target_desc parameter, and use it.
6153 (register_data, supply_register, supply_register_zeroed)
6154 (supply_regblock, supply_register_by_name, collect_register)
6155 (collect_register_as_string, collect_register_by_name): Adjust.
6156 * regcache.h (struct target_desc): Forward declare.
6157 (struct regcache) <tdesc>: New field.
6158 (init_register_cache, new_register_cache): Add target_desc
6159 parameter.
6160 (regcache_invalidate_thread): Declare.
6161 (regcache_invalidate_one): Delete declaration.
6162 (regcache_release): Declare.
6163 (find_register_by_number, register_cache_size, register_size)
6164 (find_regno): Add target_desc parameter.
6165 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6166 declarations.
6167 * remote-utils.c: Include tdesc.h.
6168 (outreg, prepare_resume_reply): Adjust.
6169 * server.c: Include tdesc.h.
6170 (gdbserver_xmltarget): Delete declaration.
6171 (get_features_xml, process_serial_event): Adjust.
6172 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6173 declare.
6174 (struct process_info) <tdesc>: New field.
6175 (ipa_tdesc): Declare.
6176 * tdesc.c: New file.
6177 * tdesc.h: New file.
6178 * tracepoint.c: Include tdesc.h.
6179 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6180 (get_context_regcache): Adjust to pass ipa_tdesc down.
6181 (do_action_at_tracepoint): Adjust to get the register cache size
6182 from the context regcache's description.
6183 (traceframe_walk_blocks): Adjust to get the register cache size
6184 from the current trace frame's description.
6185 (traceframe_get_pc): Adjust to get current trace frame's
6186 description and pass it down.
6187 (gdb_collect): Adjust to get the register cache size from the
6188 IPA's description.
6189 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6190 (gdbserver_xmltarget): Delete.
6191 (initialize_low_tracepoint): Set the ipa's target description.
6192 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6193 (initialize_low_tracepoint): Set the ipa's target description.
6194 * linux-x86-low.c: Include tdesc.h.
6195 [__x86_64__] (is_64bit_tdesc): New.
6196 (ps_get_thread_area, x86_get_thread_area): Use it.
6197 (i386_cannot_store_register): Rename to ...
6198 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6199 (i386_cannot_fetch_register): Rename to ...
6200 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6201 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6202 to new interface.
6203 (target_regsets): Rename to ...
6204 (x86_regsets): ... this.
6205 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6206 interface.
6207 (x86_siginfo_fixup): Use is_64bit_tdesc.
6208 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6209 (tdesc_x32_avx_linux, tdesc_x32_linux)
6210 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6211 Declare.
6212 (x86_linux_update_xmltarget): Delete.
6213 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6214 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6215 (AMD64_LINUX_USER64_CS): New.
6216 (x86_linux_read_description): New, based on
6217 x86_linux_update_xmltarget.
6218 (same_process_callback): New.
6219 (x86_arch_setup_process_callback): New.
6220 (x86_linux_update_xmltarget): New.
6221 (x86_regsets_info): New.
6222 (amd64_linux_regs_info): New.
6223 (i386_linux_usrregs_info): New.
6224 (i386_linux_regs_info): New.
6225 (x86_linux_regs_info): New.
6226 (x86_arch_setup): Reimplement.
6227 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6228 (x86_emit_ops): Ditto.
6229 (the_low_target): Adjust. Install x86_linux_regs_info,
6230 x86_cannot_fetch_register, and x86_cannot_store_register.
6231 (initialize_low_arch): New.
6232 * linux-ia64-low.c (tdesc_ia64): Declare.
6233 (ia64_fetch_register): Adjust.
6234 (ia64_usrregs_info, regs_info): New globals.
6235 (ia64_regs_info): New function.
6236 (the_low_target): Adjust.
6237 (initialize_low_arch): New function.
6238 * linux-sparc-low.c (tdesc_sparc64): Declare.
6239 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6240 Adjust.
6241 (sparc_arch_setup): New function.
6242 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6243 (the_low_target): Adjust.
6244 (initialize_low_arch): New function.
6245 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6246 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6247 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6248 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6249 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6250 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6251 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6252 (tdesc_powerpc_isa205_vsx64l): Declare.
6253 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6254 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6255 (ppc_set_pc, ppc_get_hwcap): Adjust.
6256 (ppc_usrregs_info): Forward declare.
6257 (!__powerpc64__) ppc_regmap_adjusted: New global.
6258 (ppc_arch_setup): Adjust to the current process'es target
6259 description.
6260 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6261 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6262 (ppc_store_evrregset): Adjust.
6263 (target_regsets): Rename to ...
6264 (ppc_regsets): ... this, and make static.
6265 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6266 (ppc_regs_info): New function.
6267 (the_low_target): Adjust.
6268 (initialize_low_arch): New function.
6269 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6270 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6271 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6272 (tdesc_s390x_linux64v2): Declare.
6273 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6274 (s390_fill_gregset, s390_store_last_break): Adjust.
6275 (target_regsets): Rename to ...
6276 (s390_regsets): ... this, and make static.
6277 (s390_get_pc, s390_set_pc): Adjust.
6278 (s390_get_hwcap): New target_desc parameter, and use it.
6279 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6280 (s390_arch_setup): Adjust to set the current process'es target
6281 description. Don't adjust the regmap.
6282 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6283 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6284 (regs_info_3264): New globals.
6285 (s390_regs_info): New function.
6286 (the_low_target): Adjust.
6287 (initialize_low_arch): New function.
6288 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6289 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6290 [__mips64] (init_registers_mips_linux)
6291 (init_registers_mips_dsp_linux): Delete defines.
6292 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6293 (have_dsp): New global.
6294 (mips_read_description): New, based on mips_arch_setup.
6295 (mips_arch_setup): Reimplement.
6296 (get_usrregs_info): New function.
6297 (mips_cannot_fetch_register, mips_cannot_store_register)
6298 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6299 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6300 (target_regsets): Rename to ...
6301 (mips_regsets): ... this, and make static.
6302 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6303 (dsp_regs_info, regs_info): New globals.
6304 (mips_regs_info): New function.
6305 (the_low_target): Adjust.
6306 (initialize_low_arch): New function.
6307 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6308 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6309 Declare.
6310 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6311 (arm_read_description): New, with bits factored from
6312 arm_arch_setup.
6313 (arm_arch_setup): Reimplement.
6314 (target_regsets): Rename to ...
6315 (arm_regsets): ... this, and make static.
6316 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6317 (arm_regs_info): New function.
6318 (the_low_target): Adjust.
6319 (initialize_low_arch): New function.
6320 * linux-m68k-low.c (tdesc_m68k): Declare.
6321 (target_regsets): Rename to ...
6322 (m68k_regsets): ... this, and make static.
6323 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6324 (m68k_regs_info): New function.
6325 (m68k_arch_setup): New function.
6326 (the_low_target): Adjust.
6327 (initialize_low_arch): New function.
6328 * linux-sh-low.c (tdesc_sharch): Declare.
6329 (target_regsets): Rename to ...
6330 (sh_regsets): ... this, and make static.
6331 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6332 (sh_regs_info, sh_arch_setup): New functions.
6333 (the_low_target): Adjust.
6334 (initialize_low_arch): New function.
6335 * linux-bfin-low.c (tdesc_bfin): Declare.
6336 (bfin_arch_setup): New function.
6337 (bfin_usrregs_info, regs_info): New globals.
6338 (bfin_regs_info): New function.
6339 (the_low_target): Adjust.
6340 (initialize_low_arch): New function.
6341 * linux-cris-low.c (tdesc_cris): Declare.
6342 (cris_arch_setup): New function.
6343 (cris_usrregs_info, regs_info): New globals.
6344 (cris_regs_info): New function.
6345 (the_low_target): Adjust.
6346 (initialize_low_arch): New function.
6347 * linux-cris-low.c (tdesc_crisv32): Declare.
6348 (cris_arch_setup): New function.
6349 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6350 (cris_regs_info): New function.
6351 (the_low_target): Adjust.
6352 (initialize_low_arch): New function.
6353 * linux-m32r-low.c (tdesc_m32r): Declare.
6354 (m32r_arch_setup): New function.
6355 (m32r_usrregs_info, regs_info): New globals.
6356 (m32r_regs_info): Adjust.
6357 (initialize_low_arch): New function.
6358 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6359 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6360 (tic6x_usrregs_info): Forward declare.
6361 (tic6x_read_description): New function, based on ...
6362 (tic6x_arch_setup): ... this. Reimplement.
6363 (target_regsets): Rename to ...
6364 (tic6x_regsets): ... this, and make static.
6365 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6366 (tic6x_regs_info): New function.
6367 (the_low_target): Adjust.
6368 (initialize_low_arch): New function.
6369 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6370 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6371 (target_regsets): Rename to ...
6372 (xtensa_regsets): ... this, and make static.
6373 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6374 globals.
6375 (xtensa_arch_setup, xtensa_regs_info): New functions.
6376 (the_low_target): Adjust.
6377 (initialize_low_arch): New function.
6378 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6379 (nios2_arch_setup): Set the current process'es tdesc.
6380 (target_regsets): Rename to ...
6381 (nios2_regsets): ... this.
6382 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6383 (nios2_regs_info): New function.
6384 (the_low_target): Adjust.
6385 (initialize_low_arch): New function.
6386 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6387 (aarch64_arch_setup): Set the current process'es tdesc.
6388 (target_regsets): Rename to ...
6389 (aarch64_regsets): ... this.
6390 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6391 (aarch64_regs_info): New function.
6392 (the_low_target): Adjust.
6393 (initialize_low_arch): New function.
6394 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6395 globals.
6396 (target_regsets): Rename to ...
6397 (tile_regsets): ... this.
6398 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6399 (tile_regs_info): New function.
6400 (tile_arch_setup): Set the current process'es tdesc.
6401 (the_low_target): Adjust.
6402 (initialize_low_arch): New function.
6403 * spu-low.c (tdesc_spu): Declare.
6404 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6405 * win32-arm-low.c (tdesc_arm): Declare.
6406 (arm_arch_setup): New function.
6407 (the_low_target): Install arm_arch_setup instead of
6408 init_registers_arm.
6409 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6410 (init_windows_x86): Rename to ...
6411 (i386_arch_setup): ... this. Set `win32_tdesc'.
6412 (the_low_target): Adjust.
6413 * win32-low.c (win32_tdesc): New global.
6414 (child_add_thread): Don't create the thread cache here.
6415 (do_initial_child_stuff): Set the new process'es tdesc.
6416 * win32-low.h (struct target_desc): Forward declare.
6417 (win32_tdesc): Declare.
6418 * lynx-i386-low.c (tdesc_i386): Declare global.
6419 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6420 * lynx-low.c (lynx_tdesc): New global.
6421 (lynx_add_process): Set the new process'es tdesc.
6422 * lynx-low.h (struct target_desc): Forward declare.
6423 (lynx_tdesc): Declare global.
6424 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6425 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6426 * nto-low.c (nto_tdesc): New global.
6427 (do_attach): Set the new process'es tdesc.
6428 * nto-low.h (struct target_desc): Forward declare.
6429 (nto_tdesc): Declare.
6430 * nto-x86-low.c (tdesc_i386): Declare.
6431 (nto_x86_arch_setup): Set `nto_tdesc'.
6432
6433 2013-06-04 Gary Benson <gbenson@redhat.com>
6434
6435 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6436 to qSupported response when appropriate.
6437 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6438 with nonzero-length annex.
6439 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6440 arguments supplied in annex.
6441
6442 2013-05-31 Doug Evans <dje@google.com>
6443
6444 PR server/15594
6445 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6446 64 bits in 64-cross-32 environment.
6447
6448 2013-05-28 Pedro Alves <palves@redhat.com>
6449
6450 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6451 (aarch64-without-fpu.c): Delete rule.
6452 * configure.srv (aarch64*-*-linux*): Remove references to
6453 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6454 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6455 declaration.
6456
6457 2013-05-24 Pedro Alves <palves@redhat.com>
6458
6459 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6460 instead of strchr/decode_address. Error if the range isn't split
6461 with a ','. Don't assume there's be a ':' in the action.
6462
6463 2013-05-23 Yao Qi <yao@codesourcery.com>
6464 Pedro Alves <palves@redhat.com>
6465
6466 * linux-low.c (lwp_in_step_range): New function.
6467 (linux_wait_1): If the thread was range stepping and stopped
6468 outside the stepping range, report the stop to GDB. Otherwise,
6469 continue stepping. Add range stepping debug output.
6470 (linux_set_resume_request): Copy the step range from the resume
6471 request to the lwp.
6472 (linux_supports_range_stepping): New.
6473 (linux_target_ops) <supports_range_stepping>: Set to
6474 linux_supports_range_stepping.
6475 * linux-low.h (struct linux_target_ops)
6476 <supports_range_stepping>: New field.
6477 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6478 * linux-x86-low.c (x86_supports_range_stepping): New.
6479 (the_low_target) <supports_range_stepping>: Set to
6480 x86_supports_range_stepping.
6481 * server.c (handle_v_cont): Handle 'r' action.
6482 (handle_v_requests): Append ";r" if the target supports range
6483 stepping.
6484 * target.h (struct thread_resume) <step_range_start,
6485 step_range_end>: New fields.
6486 (struct target_ops) <supports_range_stepping>:
6487 New field.
6488 (target_supports_range_stepping): New macro.
6489
6490 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6491
6492 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6493 confusion in comment.
6494
6495 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6496
6497 * lynx-low.c (struct process_info_private): New type.
6498 (lynx_add_process): New function.
6499 (lynx_create_inferior, lynx_attach): Replace calls to
6500 add_process by calls to lynx_add_process.
6501 (lynx_resume): If PTID is null, then try using
6502 current_process()->private->last_wait_event_ptid.
6503 Add comments.
6504 (lynx_clear_inferiors): Delete. The contents of that function
6505 has been inlined in lynx_mourn;
6506 (lynx_wait_1): Save the ptid in the process's private data.
6507 (lynx_mourn): Free the process' private data. Replace call
6508 to lynx_clear_inferiors by call to clear_inferiors.
6509
6510 2013-05-17 Yao Qi <yao@codesourcery.com>
6511
6512 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6513 the right place.
6514
6515 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
6516
6517 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6518 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6519 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6520 PT_TEXT_END_ADDR guards. Update comments.
6521 (linux_target_op) <read_offsets>: Conditionally define to
6522 linux_read_offsets if the target is UCLIBC and if it defines
6523 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6524
6525 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6526 Andrew Jenner <andrew@codesourcery.com>
6527
6528 * Makefile.in (SFILES): Add linux-nios2-low.c.
6529 (clean): Add action to delete nios2-linux.c.
6530 (nios2-linux.c): New rule.
6531 * configure.srv: Add nios2*-*-linux*.
6532 * linux-nios2-low.c: New.
6533
6534 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6535
6536 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6537
6538 2013-04-25 Hui Zhu <hui@codesourcery.com>
6539
6540 PR gdb/15186
6541 * ax.c (ax_printf): Add fflush.
6542
6543 2013-04-22 Tom Tromey <tromey@redhat.com>
6544
6545 * Makefile.in (SFILES): Add filestuff.c.
6546 (OBS): Add filestuff.o.
6547 (filestuff.o): New target.
6548 * config.in, configure: Rebuild.
6549 * configure.ac: Check for fdwalk, pipe2.
6550
6551 2013-04-17 Pedro Alves <palves@redhat.com>
6552
6553 * configure.ac (USE_THREAD_DB): Delete variable.
6554 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6555 Don't AC_SUBST USE_THREAD_DB.
6556 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6557 * config.in, configure: Regenerate.
6558
6559 2013-04-16 Pedro Alves <palves@redhat.com>
6560
6561 * linux-low.h (struct lwp_info) <thread_known>: Move under
6562 the USE_THREAD_DB #ifdef.
6563
6564 2013-04-16 Pedro Alves <palves@redhat.com>
6565
6566 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6567 (linux-low.o): Delete rule.
6568 * linux-low.h: Always include "gdb_thread_db.h" instead of
6569 conditionally including thread_db.h.
6570 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6571 HAVE_THREAD_DB_H.
6572
6573 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6574
6575 * Makefile.in (install-only): Fix make install regression.
6576
6577 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6578
6579 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6580 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6581 installation.
6582 * gdbserver.1: Remove.
6583
6584 2013-03-22 Pedro Alves <palves@redhat.com>
6585
6586 * linux-low.c (handle_extended_wait): Don't call
6587 linux_enable_event_reporting.
6588
6589 2013-03-15 Tony Theodore <tonyt@logyst.com>
6590
6591 PR build/9098:
6592 * Makefile.in (SHELL): Use @SHELL@.
6593
6594 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6595
6596 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6597 compiler warning.
6598
6599 2013-03-13 Joel Brobecker <brobecker@adacore.com>
6600
6601 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6602 Remove extraneous NULL element.
6603
6604 2013-03-13 Yao Qi <yao@codesourcery.com>
6605
6606 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6607 'V' block in trace frame.
6608
6609 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6610
6611 * target.h (struct target_ops): Add btrace ops.
6612 (target_supports_btrace): New macro.
6613 (target_enable_btrace): New macro.
6614 (target_disable_btrace): New macro.
6615 (target_read_btrace): New macro.
6616 * gdbthread.h (struct thread_info): Add btrace field.
6617 * server.c: Include btrace-common.h.
6618 (handle_btrace_general_set): New function.
6619 (handle_btrace_enable): New function.
6620 (handle_btrace_disable): New function.
6621 (handle_general_set): Call handle_btrace_general_set.
6622 (handle_qxfer_btrace): New function.
6623 (struct qxfer qxfer_packets[]): Add btrace entry.
6624 * inferiors.c (remove_thread): Disable btrace.
6625 * linux-low: Include linux-btrace.h.
6626 (linux_low_enable_btrace): New function.
6627 (linux_low_read_btrace): New function.
6628 (linux_target_ops): Add btrace ops.
6629 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6630 Add srv_linux_btrace=yes.
6631 (x86_64-*-linux*): Add linux-btrace.o.
6632 Add srv_linux_btrace=yes.
6633 * configure.ac: Define HAVE_LINUX_BTRACE.
6634 * config.in: Regenerated.
6635 * configure: Regenerated.
6636
6637 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6638
6639 * server.c (handle_qxfer): Preserve error message if -3 is
6640 returned.
6641 (qxfer): Document the -3 return value.
6642
6643 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6644
6645 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6646 (linux_btrace_h): New variable.
6647 (linux-btrace.o): New rule.
6648
6649 2013-03-08 Stan Shebs <stan@codesourcery.com>
6650 Hafiz Abid Qadeer <abidh@codesourcery.com>
6651
6652 * tracepoint.c (trace_buffer_size): New global.
6653 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6654 (init_trace_buffer): Change to one-argument function. Allocate
6655 trace buffer memory.
6656 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6657 handle QTBuffer:size packet.
6658 (cmd_bigqtbuffer_size): New function.
6659 (initialize_tracepoint): Call init_trace_buffer with
6660 DEFAULT_TRACE_BUFFER_SIZE.
6661 * server.c (handle_query): Add QTBuffer:size in the
6662 supported packets.
6663
6664 2013-03-07 Yao Qi <yao@codesourcery.com>
6665
6666 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6667 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6668 of -1.
6669 (cmd_qtsp): Adjust condition. Do post increment.
6670 Set cur_action and cur_step_action back to 0.
6671
6672 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6673
6674 PR server/15236
6675 * linux-low.c (linux_write_memory): Return early success if LEN is
6676 zero.
6677
6678 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
6679
6680 * configure.srv: Add x86_64-*-cygwin* as target.
6681
6682 2013-02-28 Tom Tromey <tromey@redhat.com>
6683
6684 * configure.ac: Invoke AC_SYS_LARGEFILE.
6685 * configure, config.in: Rebuild.
6686
6687 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
6688
6689 * win32-low.c: Throughout, fix format strings and casts of
6690 printf-like functions to avoid type related warnings on all
6691 platforms.
6692 (get_child_debug_event): Print dwDebugEventCode as hex since
6693 that's how it's usually documented.
6694
6695 2013-02-28 Yao Qi <yao@codesourcery.com>
6696
6697 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6698 pulongest.
6699
6700 2013-02-27 Jiong Wang <jiwang@tilera.com>
6701
6702 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6703 (reg-tilegx32.c): New rule.
6704 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6705 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6706 different register info initializer according to elf class.
6707 (init_registers_tilgx32): New function. The tilegx32 register info
6708 initializer.
6709 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6710 (tile_store_gregset): Likewise.
6711
6712 2013-02-27 Yao Qi <yao@codesourcery.com>
6713
6714 * server.c (process_point_options): Print debug message when
6715 debug_threads is true.
6716
6717 2013-02-26 Yao Qi <yao@codesourcery.com>
6718
6719 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6720
6721 2013-02-19 Pedro Alves <palves@redhat.com>
6722 Kai Tietz <ktietz@redhat.com>
6723
6724 PR gdb/15161
6725
6726 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6727 instead of strtoul to extract address from packet.
6728 (process_serial_event) <'z'>: Likewise.
6729
6730 2013-02-18 Yao Qi <yao@codesourcery.com>
6731
6732 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6733
6734 2013-02-14 Pedro Alves <palves@redhat.com>
6735
6736 Plug memory leak.
6737
6738 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6739 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6740
6741 2013-02-14 Pedro Alves <palves@redhat.com>
6742
6743 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6744
6745 2013-02-14 Pedro Alves <palves@redhat.com>
6746
6747 * tracepoint.c (save_string): Delete.
6748 (add_tracepoint_action): Use savestring instead of save_string.
6749
6750 2013-02-12 Pedro Alves <palves@redhat.com>
6751
6752 * linux-xtensa-low.c: Ditto.
6753 * xtensa-xtregs.c: Ditto.
6754
6755 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6756
6757 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6758 thread_db.
6759
6760 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6761
6762 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6763 aarch64_num_wp_regs and aarch64_num_bp_regs to
6764 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6765
6766 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6767
6768 * linux-aarch64-low.c (ps_get_thread_area): Replace
6769 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6770
6771 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6772 Marcus Shawcroft <marcus.shawcroft@arm.com>
6773 Nigel Stephens <nigel.stephens@arm.com>
6774 Yufeng Zhang <yufeng.zhang@arm.com>
6775
6776 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6777 (aarch64.c, aarch64-without-fpu.c): New targets.
6778 * configure.srv (aarch64*-*-linux*): New.
6779 * linux-aarch64-low.c: New file.
6780
6781 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6782
6783 * linux-low.c (handle_extended_wait, linux_create_inferior)
6784 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6785 (dequeue_one_deferred_signal, linux_resume_one_thread)
6786 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6787 (linux_tracefork_grandchild, linux_test_for_tracefork)
6788 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6789 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6790 where the argument is 0.
6791
6792 2013-01-25 Yao Qi <yao@codesourcery.com>
6793
6794 * event-loop.c: Include "queue.h".
6795 (gdb_event_p): New typedef.
6796 (struct gdb_event) <next_event>: Remove.
6797 (event_queue): Change to QUEUE(gdb_event_p).
6798 (async_queue_event): Remove.
6799 (gdb_event_xfree): New.
6800 (initialize_event_loop): New.
6801 (process_event): Use API from QUEUE.
6802 (wait_for_event): Likewise.
6803 * server.c (main): Call initialize_event_loop.
6804 * server.h (initialize_event_loop): Declare.
6805
6806 2013-01-18 Yao Qi <yao@codesourcery.com>
6807
6808 * ax.h (struct eval_agent_expr_context): New.
6809 (gdb_eval_agent_expr): Update declaration.
6810 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6811 TFRAME. Add new argument CTX.
6812 * server.h (struct eval_agent_expr_context): Declare.
6813 (agent_mem_read, agent_tsv_read): Update declaration.
6814 (agent_mem_read_string): Likewise.
6815 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6816 (add_traceframe_block): Add new argument TPOINT.
6817 Increase TPOINT->traceframe_usage.
6818 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6819 eval_tracepoint_agent_expr.
6820 (condition_true_at_tracepoint): Likewise.
6821 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6822 (agent_mem_read_string, agent_tsv_read): Likewise.
6823
6824 2013-01-16 Yao Qi <yao@codesourcery.com>
6825
6826 * linux-low.c (linux_resume_one_lwp): Don't check
6827 'lwp->bp_reinsert != 0'.
6828
6829 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6830 Pedro Alves <palves@redhat.com>
6831
6832 * lynx-low.c (ptrace_request_to_str): Define a temporary
6833 macro and use it to simplify this function's implementation.
6834
6835 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6836
6837 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6838 sets errno.
6839
6840 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6841
6842 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6843
6844 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6845
6846 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6847
6848 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6849
6850 * lynx-low.c (lynx_resume): Use the resume_info parameter
6851 to determine the ptid for the lynx_ptrace call, unless
6852 it is equal to minus_one_ptid, in which case we use the
6853 ptid of the current_inferior.
6854 (lynx_wait_1): After having received a thread create/exit
6855 event, resume the inferior's execution using the signaling
6856 thread's ptid, rather than the old ptid.
6857
6858 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6859
6860 * lynx-low.c (lynx_resume): Delete variable ret.
6861
6862 2013-01-01 Joel Brobecker <brobecker@adacore.com>
6863
6864 * gdbreplay.c (gdbreplay_version): Update copyright year.
6865 * server.c (gdbserver_version): Likewise.
6866
6867 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6868
6869 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6870 new thread.
6871
6872 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6873
6874 * lynx-low.c (ptrace_request_to_str): Add handling for
6875 PTRACE_GETTRACESIG.
6876
6877 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6878
6879 * lynx-low.c (lynx_attach): Delete variable new_process.
6880
6881 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6882
6883 * lynx-low.c (lynx_create_inferior): Delete variable
6884 new_process.
6885
6886 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6887
6888 * lynx-low.c (ptrace_request_to_str): Do not handle
6889 PTRACE_GETTHREADLIST if this macro does not exist.
6890
6891 2012-12-15 Yao Qi <yao@codesourcery.com>
6892
6893 * Makefile.in (OBS): Add notif.o.
6894 * notif.c, notif.h: New.
6895 * server.c: Include "notif.h".
6896 (struct vstop_notif) <next>: Remove.
6897 <base>: New field.
6898 (queue_stop_reply): Update.
6899 (push_event, send_next_stop_reply): Remove.
6900 (discard_queued_stop_replies): Update.
6901 (notif_stop): New variable.
6902 (handle_v_stopped): Remove.
6903 (handle_v_requests): Don't call handle_v_stopped. Call
6904 handle_ack_notif instead.
6905 (queue_stop_reply_callback): Call notif_event_enque instead
6906 of queue_stop_reply.
6907 (handle_status): Don't call send_next_stop_reply, call
6908 notif_write_event instead.
6909 (kill_inferior_callback): Likewise.
6910 (detach_or_kill_inferior_callback): Likewise.
6911 (main): Call initialize_notif.
6912 (process_serial_event): Call QUEUE_is_empty.
6913 (handle_target_event): Call notif_push instead of push event.
6914 * server.h (push_event): Remove declaration.
6915
6916 2012-12-10 Tom Tromey <tromey@redhat.com>
6917
6918 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6919 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6920 macros.
6921 (.c.o): Rewrite.
6922 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6923 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6924 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6925 (amd64-linux-ipa.o, ax.o): Rewrite.
6926 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6927 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6928 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6929 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6930 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6931 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6932 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6933 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6934 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6935 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6936 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6937 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6938 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6939 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6940 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6941 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6942 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6943 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6944 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6945 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6946 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6947 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6948 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6949 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6950 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6951 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6952 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6953 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6954 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6955 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6956 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6957 (reg-tilegx.o): Remove.
6958 (all_object_files): New macro.
6959 Include .deps files.
6960 * aclocal.m4, configure: Rebuild.
6961 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6962 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6963 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6964
6965 2012-12-05 Tom Tromey <tromey@redhat.com>
6966
6967 PR gdb/14917:
6968 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6969
6970 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
6971
6972 * configure.ac: Check for linux/perf_event.h.
6973 * config.in: Regenerated.
6974 * configure: Regenerated.
6975
6976 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6977
6978 * hostio.c (handle_readlink): Decrease buffer size
6979 parameter passed to readlink by one byte.
6980
6981 2012-11-26 Yao Qi <yao@codesourcery.com>
6982
6983 * configure.ac (build_warnings): Append '-Wempty-body'.
6984 * configure: Regenerated.
6985 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6986 body.
6987
6988 2012-11-15 Pierre Muller <muller@sourceware.org>
6989
6990 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6991 * config.in: Regenerate.
6992 * configure: Regenerate.
6993 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6994 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6995 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6996 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6997 header.
6998 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6999 instead of <sys/wait.h> header.
7000 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7001
7002 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7003
7004 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7005 (various make rules): Remove -DGDBSERVER
7006
7007 2012-11-09 Yao Qi <yao@codesourcery.com>
7008
7009 * spu-low.c (current_ptid): Move it to ..
7010 * gdbthread.h: ... here. New.
7011 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7012 * server.c (myresume, process_serial_event): Likewise.
7013 * thread-db.c (thread_db_find_new_threads): Likewise.
7014 * tracepoint.c (run_inferior_command): Likewise.
7015
7016 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7017
7018 * server.c (handle_search_memory_1): Include access length in
7019 warning message.
7020
7021 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7022
7023 * linux-crisv32-low.c: Fix compile errors.
7024
7025 2012-09-04 Yao Qi <yao@codesourcery.com>
7026
7027 * tracepoint.c (cmd_qtsv): Adjust debug message.
7028 Don't check CUR_TPOINT.
7029
7030 2012-08-28 Yao Qi <yao@codesourcery.com>
7031
7032 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7033 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7034 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7035 Remove declarations of xmalloc, xreallloc, xstrdup and
7036 freeargv.
7037 * Makefile.in (libiberty_h): New.
7038 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7039 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7040
7041 2012-08-23 Yao Qi <yao@codesourcery.com>
7042
7043 * server.h: Remove declaration of 'xsnprintf'.
7044
7045 2012-08-22 Keith Seitz <keiths@redhat.com>
7046
7047 * server.h: Include build-gnulib-gbserver/config.h.
7048 * gdbreplay.c: Likewise.
7049
7050 2012-08-08 Doug Evans <dje@google.com>
7051
7052 * Makefile.in (SFILES): Add gdb_vecs.c.
7053 (OBS): Add gdb_vecs.o.
7054 (gdb_vecs_h, host_defs_h): New variables.
7055 (thread-db.o): Add $(gdb_vecs_h) dependency.
7056 (gdb_vecs.o): New rule.
7057 * thread-db.c: #include "gdb_vecs.h".
7058 (thread_db_load_search): Use a vector to iterate over path elements.
7059 Handle text appearing after "$pdir".
7060
7061 * configure.ac: Add check for strstr.
7062 * config.in: Regenerate.
7063 * configure: Regenerate.
7064
7065 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7066
7067 * hostio.c (handle_pread): If pread fails, fall back to attempting
7068 lseek/read.
7069 (handle_pwrite): Likewise for pwrite.
7070
7071 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7072
7073 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7074 between unsupported TYPE and unimplementable ADDR/LEN combination.
7075 (arm_insert_point): Act on new return value.
7076
7077 2012-07-31 Pedro Alves <palves@redhat.com>
7078
7079 * server.c (process_point_options): Only skip tokens if we find
7080 one that is unrecognized. Don't treat 'X' specially while
7081 skipping unrecognized tokens.
7082
7083 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7084
7085 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7086 to 4-byte-align HW breakpoint addresses for Thumb.
7087
7088 2012-07-27 Yao Qi <yao@codesourcery.com>
7089
7090 PR remote/14161.
7091
7092 * server.h: Declare gdb_agent_about_to_close.
7093 * target.c (kill_inferior): Include "agent.h".
7094 New. Send command 'kill'.
7095 * target.h (kill_inferior): Removed macro.
7096 * tracepoint.c (gdb_agent_about_to_close): New.
7097 (gdb_agent_helper_thread): Handle command 'close'.
7098 Wait endlessly until the inferior stops.
7099 Install gdb_agent_remove_socket to atexit hook.
7100 (agent_socket_name): New static variable.
7101 (gdb_agent_socket_init): Replace local variable 'name' with
7102 'agent_socket_name'.
7103 (gdb_agent_remove_socket): New.
7104
7105 2012-07-27 Yao Qi <yao@codesourcery.com>
7106
7107 * server.c (process_point_options): Stop at 'X' when parsing.
7108
7109 2012-07-19 Michael Eager <eager@eagercon.com>
7110
7111 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7112 to hw_execute.
7113 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7114 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7115 hardware breakpoint.
7116
7117 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7118
7119 * gdbserver/linux-low.c (initialize_low): Call
7120 linux_ptrace_init_warnings.
7121
7122 2012-07-02 Doug Evans <dje@google.com>
7123
7124 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7125 pointer to int.
7126
7127 2012-07-02 Stan Shebs <stan@codesourcery.com>
7128
7129 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7130 (ax.o): Add it to build rule.
7131 (ax-ipa.o): Ditto.
7132 (OBS): Add format.o.
7133 (IPA_OBS): Add format.o.
7134 * server.c (handle_query): Claim support for breakpoint commands.
7135 (process_point_options): Add command case.
7136 (process_serial_event): Leave running if there are printfs in
7137 effect.
7138 * mem-break.h (any_persistent_commands): Declare.
7139 (add_breakpoint_commands): Declare.
7140 (gdb_no_commands_at_breakpoint): Declare.
7141 (run_breakpoint_commands): Declare.
7142 * mem-break.c (struct point_command_list): New struct.
7143 (struct breakpoint): New field command_list.
7144 (any_persistent_commands): New function.
7145 (add_commands_to_breakpoint): New function.
7146 (add_breakpoint_commands): New function.
7147 (gdb_no_commands_at_breakpoint): New function.
7148 (run_breakpoint_commands): New function.
7149 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7150 locally.
7151 * ax.c: Include format.h.
7152 (ax_printf): New function.
7153 (gdb_eval_agent_expr): Add printf opcode.
7154
7155 2012-06-13 Yao Qi <yao@codesourcery.com>
7156
7157 * server.c (start_inferior): Remove duplicated writes to fields
7158 'last_resume_kind' and 'last_status' of 'current_inferior'.
7159
7160 2012-06-12 Yao Qi <yao@codesourcery.com>
7161 Pedro Alves <palves@redhat.com>
7162
7163 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7164 comment.
7165 * server.c (handle_v_cont): Extend comment.
7166
7167 2012-06-11 Yao Qi <yao@codesourcery.com>
7168
7169 * linux-low.c (linux_attach): Add 'static'.
7170
7171 2012-06-06 Yao Qi <yao@codesourcery.com>
7172
7173 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7174
7175 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7176
7177 Fix gcc -flto compilation warning.
7178 * server.c (main): Make variable multi_mode and attach volatile.
7179
7180 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7181
7182 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7183 if the platform doesn't know about it.
7184
7185 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7186
7187 * Makefile.in (SFILES): Add linux-tile-low.c.
7188 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7189 * configure.srv: Handle tilegx-*-linux*.
7190 * linux-tile-low.c: New file.
7191
7192 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7193
7194 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7195
7196 2012-05-24 Pedro Alves <palves@redhat.com>
7197
7198 PR gdb/7205
7199
7200 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7201
7202 2012-05-24 Pedro Alves <palves@redhat.com>
7203
7204 PR gdb/7205
7205
7206 Replace target_signal with gdb_signal throughout.
7207
7208 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7209
7210 * linux-low.c (linux_store_registers): Avoid the copying sequence
7211 when no data has been retrieved by ptrace.
7212
7213 2012-05-22 Will Deacon <will.deacon@arm.com>
7214
7215 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7216 Include asm/ptrace.h.
7217 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7218 already defined.
7219
7220 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7221
7222 * linux-low.c (linux_store_registers): Don't re-retrieve data
7223 with ptrace that has already been obtained from /proc. Always
7224 copy any data retrieved with ptrace to the buffer supplied.
7225
7226 2012-05-11 Yao Qi <yao@codesourcery.com>
7227 Pedro Alves <palves@redhat.com>
7228
7229 * linux-low.c (enum stopping_threads_kind): New.
7230 (stopping_threads): Change type to `enum stopping_threads_kind'.
7231 (handle_extended_wait): If stopping and suspending threads, leave
7232 the new_lwp suspended too.
7233 (linux_wait_for_event): Adjust.
7234 (stop_all_lwps): Set `stopping_threads' to
7235 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7236 whether we're suspending threads or just stopping them. Assert no
7237 recursion happens.
7238
7239 2012-04-29 Yao Qi <yao@codesourcery.com>
7240
7241 * server.h: Move some code to ...
7242 * gdbthread.h: ... here. New.
7243 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7244 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7245 (nto-low.o, win32-low.o): Likewise.
7246 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7247 * regcache.c, remote-utils.c, server.c: Likewise.
7248 * target.c, tracepoint.c, win32-low.c: Likewise.
7249
7250 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7251
7252 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7253 (PTRACE_ARG4_TYPE): Likewise.
7254 (PTRACE_XFER_TYPE): Likewise.
7255 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7256 ptrace to PTRACE_ARG3_TYPE.
7257 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7258 (PTRACE_ARG4_TYPE): Likewise.
7259 (PTRACE_XFER_TYPE): Likewise.
7260 (linux_detach_one_lwp): Cast fourth argument of
7261 ptrace to long then PTRACE_ARG4_TYPE.
7262 (regsets_fetch_inferior_registers): Cast third argument of
7263 ptrace to long then PTRACE_ARG3_TYPE.
7264 (regsets_store_inferior_registers): Likewise.
7265
7266 2012-04-20 Pedro Alves <palves@redhat.com>
7267
7268 * configure: Regenerate.
7269
7270 2012-04-19 Pedro Alves <palves@redhat.com>
7271
7272 * Makefile.in (GNULIB_BUILDDIR): New.
7273 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7274 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7275 (all, install-only, uninstall, clean-info, all-lib, clean): No
7276 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7277 (maintainer-clean realclean distclean): Use subdir_do.
7278 (subdir_do): New.
7279 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7280 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7281 * acinclude.m4: Include acx_configure_dir.m4.
7282 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7283 calls. Call AC_PROG_RANLIB. Configure gnulib using
7284 ACX_CONFIGURE_DIR.
7285 (GNULIB): New.
7286 (GNULIB_STDINT_H): Adjust.
7287 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7288 * gdbreplay.c: Include build-gnulib/config.h.
7289 * server.h: Likewise.
7290 * aclocal.m4: Regenerate.
7291 * config.in: Regenerate.
7292 * configure: Regenerate.
7293
7294 2012-04-19 Pedro Alves <palves@redhat.com>
7295
7296 * Makefile.in (LIBGNU, INCGNU): Adjust.
7297 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7298 (all, install-only, uninstall, clean-info, all-lib, clean)
7299 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7300 * configure.ac: Adjust AC_OUTPUT output.
7301 * aclocal.m4: Regenerate.
7302 * configure: Regenerate.
7303
7304 2012-04-19 Pedro Alves <palves@redhat.com>
7305
7306 * Makefile.in (generated_files): New.
7307 (server_h): Remove the explicit dependency on config.h, and depend
7308 on $generated_files.
7309
7310 2012-04-19 Pedro Alves <palves@redhat.com>
7311
7312 * Makefile.in (INCGNU): Add -Ignulib.
7313
7314 2012-04-19 Pedro Alves <palves@redhat.com>
7315
7316 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7317 (INCGNU): ... this, and spell out -I here.
7318 (GNULIB_LIB): Rename to ...
7319 (LIBGNU): ... this.
7320 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7321
7322 2012-04-19 Pedro Alves <palves@redhat.com>
7323
7324 * config.in: Regenerate.
7325
7326 2012-04-19 Pedro Alves <palves@redhat.com>
7327
7328 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7329 * server.h (memmem): Remove declaration.
7330 * config.in: Regenerate.
7331 * configure: Regenerate.
7332
7333 2012-04-19 Yao Qi <yao@codesourcery.com>
7334
7335 * Makefile.in (SFILES): Add common/vec.c.
7336 (OBS): Add vec.o.
7337 (vec.o): New rule.
7338
7339 2012-04-19 Yao Qi <yao@codesourcery.com>
7340
7341 * remote-utils.c (prepare_resume_reply): Replace with macro
7342 target_core_of_thread.
7343 * server.c (handle_qxfer_threads_proper): Likewise.
7344 * target.h (traget_core_of_thread): New macro.
7345
7346 2012-04-18 Pedro Alves <palves@redhat.com>
7347
7348 * aclocal.m4: Regenerate.
7349 * configure: Regenerate.
7350
7351 2012-04-16 Yao Qi <yao@codesourcery.com>
7352
7353 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7354 duplicated on address.
7355
7356 2012-04-16 Yao Qi <yao@codesourcery.com>
7357
7358 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7359 (struct tracepoint_action_ops) <send>: New field.
7360 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7361 (agent_expr_send, x_tracepoint_action_send): New.
7362 (l_tracepoint_action_send): New.
7363 (cmd_qtdp): Download and install tracepoint
7364 according to `use_agent'.
7365 (run_inferior_command): Add one more parameter `len'.
7366 Update callers.
7367 (tracepoint_send_agent): New.
7368 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7369
7370 2012-04-16 Yao Qi <yao@codesourcery.com>
7371
7372 * tracepoint.c (download_tracepoints): Moved to ...
7373 (cmd_qtstart): ... here.
7374
7375 2012-04-14 Yao Qi <yao@codesourcery.com>
7376
7377 * tracepoint.c: Include inttypes.h.
7378 (struct collect_memory_action): Use sized types.
7379 (struct tracepoint): Likewise.
7380 (cmd_qtdp, stop_tracing): Update print specifiers.
7381 (cmd_qtp, response_tracepoint): Likewise.
7382 (collect_data_at_tracepoint): Likewise.
7383 (collect_data_at_step): Likewise.
7384
7385 2012-04-14 Yao Qi <yao@codesourcery.com>
7386
7387 Import gnulib module inttypes.
7388 * aclocal.m4, config.in, configure: Regenerated.
7389
7390 2012-04-14 Yao Qi <yao@codesourcery.com>
7391
7392 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7393 Makefile and config.status at last.
7394
7395 2012-04-13 Yao Qi <yao@codesourcery.com>
7396
7397 * tracepoint.c: Include stdint.h unconditionally.
7398
7399 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7400
7401 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7402 on BFD_HAVE_SYS_PROCFS_TYPE.
7403 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7404 * configure: Regenerate.
7405 * config.in: Likewise.
7406
7407 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7408
7409 * Makefile.in (clean): Also remove x32.c x32-linux.c
7410 x32-avx.c x32-avx-linux.c.
7411 (x32.o): New target.
7412 (x32.c): Likewise.
7413 (x32-linux.o): Likewise.
7414 (x32-linux.c): Likewise.
7415 (x32-avx.o): Likewise.
7416 (x32-avx.c): Likewise.
7417 (x32-avx-linux.o): Likewise.
7418 (x32-avx-linux.c): Likewise.
7419
7420 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7421 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7422 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7423 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7424 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7425 i386/x32-avx-linux.xml.
7426
7427 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7428 (init_registers_x32_avx_linux): Likwise.
7429 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7430 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7431
7432 2012-04-13 Pedro Alves <palves@redhat.com>
7433
7434 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7435 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7436 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7437 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7438 the sub-make.
7439
7440 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7441
7442 * linux-x86-low.c (compat_x32_clock_t): New.
7443 (compat_x32_siginfo_t): Likewise.
7444 (compat_x32_siginfo_from_siginfo): Likewise.
7445 (siginfo_from_compat_x32_siginfo): Likewise.
7446 (linux_is_elf64): Likewise.
7447 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7448 and siginfo_from_compat_x32_siginfo for x32.
7449 (x86_arch_setup): Set linux_is_elf64.
7450
7451 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7452
7453 PR gdb/13969
7454 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7455 e_machine field.
7456 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7457 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7458 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7459 compatible with process.
7460
7461 2012-04-12 Yao Qi <yao@codesourcery.com>
7462
7463 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7464 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7465 (install-only, install-info, clean): Handle sub dir gnulib.
7466 (all-lib, am--refresh): New targets.
7467 (memmem.o): Remove target.
7468 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7469 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7470 (AC_REPLACE_FUNCS): Remove memmem.
7471 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7472 (AC_OUTPUT): Generate Makefile in gnulib/.
7473 * aclocal.m4, config.in, configure: Regenerated.
7474
7475 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7476
7477 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7478
7479 2012-04-05 Pedro Alves <palves@redhat.com>
7480
7481 -Werror=strict-aliasing
7482
7483 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7484 pointer.
7485
7486 2012-04-04 Pedro Alves <palves@redhat.com>
7487
7488 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7489 (sparc_store_gregset_from_stack, sparc_store_gregset)
7490 (sparc_breakpoint_at): Fix formatting.
7491
7492 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7493
7494 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7495 are available.
7496 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7497 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7498 * config.in: Regenerate.
7499 * configure: Likewise.
7500
7501 2012-03-29 Pedro Alves <palves@redhat.com>
7502
7503 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7504 Correct ptrace arguments.
7505
7506 2012-03-28 Pedro Alves <palves@redhat.com>
7507
7508 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7509 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7510 (IA64_FR1_REGNUM): New defines.
7511 (ia64_fetch_register): New.
7512 (the_low_target): Install it.
7513 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7514 field.
7515 * linux-low.c (linux_fetch_registers): Try the
7516 the_low_target.fetch_register hook first.
7517
7518 * linux-arm-low.c (the_low_target): Adjust.
7519 * linux-bfin-low.c (the_low_target): Adjust.
7520 * linux-cris-low.c (the_low_target): Adjust.
7521 * linux-crisv32-low.c (the_low_target): Adjust.
7522 * linux-m32r-low.c (the_low_target): Adjust.
7523 * linux-m68k-low.c (the_low_target): Adjust.
7524 * linux-mips-low.c (the_low_target): Adjust.
7525 * linux-ppc-low.c (the_low_target): Adjust.
7526 * linux-s390-low.c (the_low_target): Adjust.
7527 * linux-sh-low.c (the_low_target): Adjust.
7528 * linux-sparc-low.c (the_low_target): Adjust.
7529 * linux-tic6x-low.c (the_low_target): Adjust.
7530 * linux-x86-low.c (the_low_target): Adjust.
7531 * linux-xtensa-low.c (the_low_target): Adjust.
7532
7533 2012-03-26 Pedro Alves <palves@redhat.com>
7534
7535 * server.c (handle_qxfer_libraries): Don't bail early if
7536 the_target->qxfer_libraries_svr4 is not NULL.
7537
7538 2012-03-26 Pedro Alves <palves@redhat.com>
7539
7540 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7541
7542 2012-03-23 Pedro Alves <palves@redhat.com>
7543
7544 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7545 "library-list-svr4" element's start tag when the the DSO list is
7546 empty.
7547
7548 2012-03-23 Pedro Alves <palves@redhat.com>
7549
7550 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7551 a variable whose type size is the same as the inferior's pointer
7552 size.
7553
7554 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7555
7556 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7557 struct siginfo.
7558 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7559 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7560 * linux-low.h: Include <signal.h>.
7561 (struct siginfo): Remove forward declaration.
7562 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7563 struct siginfo.
7564
7565 2012-03-21 Mike Frysinger <vapier@gentoo.org>
7566
7567 * .gitignore: Ignore more files.
7568
7569 2012-03-19 Pedro Alves <palves@redhat.com>
7570 Jan Kratochvil <jan.kratochvil@redhat.com>
7571
7572 * server.c (cont_thread, general_thread): Add describing comments.
7573 (start_inferior): Clear `cont_thread'.
7574 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7575 of a process.
7576
7577 2012-03-15 Yao Qi <yao@codesourcery.com>
7578
7579 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7580 handling to ...
7581 (cmd_qtdp): ... here.
7582
7583 2012-03-15 Yao Qi <yao@codesourcery.com>
7584
7585 * tracepoint.c (struct tracepoint_action_ops): New.
7586 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7587 (m_tracepoint_action_download): New.
7588 (r_tracepoint_action_download): New.
7589 (x_tracepoint_action_download): New.
7590 (l_tracepoint_action_download): New.
7591 (add_tracepoint_action): Install `action->ops' according type.
7592 (download_tracepoint_1): Move code `download' function pointer
7593 of various tracepoint_action_ops.
7594
7595 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7596
7597 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7598 linux_ptrace_attach_warnings.
7599
7600 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7601
7602 * Makefile.in (linux-ptrace.o): New.
7603 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7604 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7605 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7606 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7607 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7608 of these targets.
7609 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7610
7611 2012-03-08 Yao Qi <yao@codesourcery.com>
7612 Pedro Alves <palves@redhat.com>
7613
7614 Fix PR server/13392.
7615 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7616 offset of JMP insn.
7617 * tracepoint.c (remove_tracepoint): New.
7618 (cmd_qtdp): Call remove_tracepoint when failed to install.
7619
7620 2012-03-07 Pedro Alves <palves@redhat.com>
7621
7622 * linux-low.c (get_detach_signal): New.
7623 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7624 Pass on pending signals to PTRACE_DETACH. Check the result of the
7625 ptrace call.
7626 * server.c (program_signals, program_signals_p): New.
7627 (handle_general_set): Handle QProgramSignals.
7628 * server.h (program_signals, program_signals_p): Declare.
7629
7630 2012-03-05 Pedro Alves <palves@redhat.com>
7631 Jan Kratochvil <jan.kratochvil@redhat.com>
7632
7633 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7634 New comment why.
7635
7636 2012-03-03 Yao Qi <yao@codesourcery.com>
7637
7638 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7639 agent_look_up_symbols.
7640
7641 2012-03-03 Yao Qi <yao@codesourcery.com>
7642
7643 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7644 (linux-x86-low.o): Likewise.
7645 * server.h: Remove in_process_agent_loaded.
7646 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7647 common/agent.c.
7648 Update callers.
7649
7650 2012-03-03 Yao Qi <yao@codesourcery.com>
7651
7652 * tracepoint.c (gdb_agent_capability): New global.
7653 (in_process_agent_loaded_ust): Renamed to
7654 `in_process_agent_supports_ust'.
7655 Update callers.
7656 (in_process_agent_supports_ust): Call agent_capability_check.
7657 (clear_installed_tracepoints): Assert that agent supports
7658 agent.
7659
7660 2012-03-03 Yao Qi <yao@codesourcery.com>
7661
7662 * linux-low.c (linux_supports_agent): New.
7663 (linux_target_ops): Initialize field `supports_agent' with
7664 linux_supports_agent.
7665 * target.h (struct target_ops) <supports_agent>: New.
7666 (target_supports_agent): New macro.
7667 * server.c (handle_general_set): Handle packet 'QAgent'.
7668 (handle_query): Send `QAgent+'.
7669 * Makefile.in (server.o): Depends on agent.h.
7670
7671 2012-03-03 Yao Qi <yao@codesourcery.com>
7672
7673 * Makefile.in (OBS): Add agent.o.
7674 Add new rule for agent.o.
7675 Track dependence of tracepoint.c on agent.h.
7676 * tracepoint.c (run_inferior_command_1):
7677 (run_inferior_command): Call agent_run_command.
7678 (gdb_ust_connect_sync_socket): Deleted. Move it to
7679 common/agent.c.
7680 (resume_thread, stop_thread): Likewise.
7681 (gdb_ust_socket_init): Renamed to ...
7682 (gdb_agent_socket_init): ... New.
7683 (gdb_ust_thread): Renamed to ...
7684 (gdb_agent_helper_thread): ... New.
7685 (gdb_ust_init): Move some code to ...
7686 (gdb_agent_init): ... here. New.
7687 [HAVE_UST]: Call gdb_ust_init.
7688 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7689 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7690 * config.in, configure: Regenerated.
7691
7692 2012-03-02 Pedro Alves <palves@redhat.com>
7693
7694 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7695 * linux-low.c (struct simple_pid_list): New.
7696 (stopped_pids): New a struct simple_pid_list pointer.
7697 (add_to_pid_list, pull_pid_from_list): New.
7698 (handle_extended_wait): Don't assume the first signal new children
7699 report is SIGSTOP. Adjust call to pull_pid_from_list.
7700 (linux_wait_for_lwp): Adjust.
7701
7702 2012-03-02 Yao Qi <yao@codesourcery.com>
7703
7704 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7705 debug log.
7706
7707 2012-03-02 Yao Qi <yao@codesourcery.com>
7708
7709 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7710 `stop_pc' and `tpoint'. Update caller.
7711
7712 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7713
7714 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7715 * linux-low.c (use_linux_regsets): New macro.
7716 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7717 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7718 (linux_register_in_regsets): New function.
7719 (usr_fetch_inferior_registers): Skip registers covered by
7720 regsets.
7721 (usr_store_inferior_registers): Likewise.
7722 (usr_fetch_inferior_registers): New macro.
7723 (usr_store_inferior_registers): Likewise.
7724 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7725 (linux_store_registers): Likewise.
7726 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7727 prototype.
7728 (init_registers_mips64_dsp_linux): Likewise.
7729 (init_registers_mips_linux): New macro.
7730 (init_registers_mips_dsp_linux): Likewise.
7731 (mips_dsp_num_regs): Likewise.
7732 (DSP_BASE, DSP_CONTROL): New fallback macros.
7733 (mips_base_regs): New macro.
7734 (mips_regmap): Use it. Fix the size.
7735 (mips_dsp_regmap): New variable.
7736 (mips_dsp_regset_bitmap): Likewise.
7737 (mips_arch_setup): New function.
7738 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7739 than mips_regmap.
7740 (mips_cannot_store_register): Likewise.
7741 (the_low_target): Update .arch_setup, .num_regs and .regmap
7742 initializers. Add .regset_bitmap initializer.
7743 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7744 initializer.
7745 * linux-bfin-low.c (the_low_target): Likewise.
7746 * linux-cris-low.c (the_low_target): Likewise.
7747 * linux-crisv32-low.c (the_low_target): Likewise.
7748 * linux-ia64-low.c (the_low_target): Likewise.
7749 * linux-m32r-low.c (the_low_target): Likewise.
7750 * linux-m68k-low.c (the_low_target): Likewise.
7751 * linux-ppc-low.c (the_low_target): Likewise.
7752 * linux-s390-low.c (the_low_target): Likewise.
7753 * linux-sh-low.c (the_low_target): Likewise.
7754 * linux-sparc-low.c (the_low_target): Likewise.
7755 * linux-tic6x-low.c (the_low_target): Likewise.
7756 * linux-x86-low.c (the_low_target): Likewise.
7757 * linux-xtensa-low.c (the_low_target): Likewise.
7758 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7759 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7760 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7761 srv_xmlfiles.
7762 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7763 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7764
7765 2012-02-29 Yao Qi <yao@codesourcery.com>
7766 Pedro Alves <palves@redhat.com>
7767
7768 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7769 `step_over_finished' is true.
7770
7771 2012-02-27 Pedro Alves <palves@redhat.com>
7772
7773 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7774 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7775
7776 2012-02-27 Pedro Alves <palves@redhat.com>
7777
7778 PR server/9684
7779 * linux-low.c (pid_is_stopped): New.
7780 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7781
7782 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
7783
7784 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7785 of conditions.
7786
7787 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7788
7789 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7790
7791 2012-02-24 Luis Machado <lgustavo@codesourcery>
7792
7793 * server.c (handle_query): Advertise support for target-side
7794 breakpoint condition evaluation.
7795 (process_point_options): New function.
7796 (process_serial_event): When inserting a breakpoint, check for
7797 a target-side condition that should be evaluated.
7798
7799 * mem-break.c: Include regcache.h and ax.h.
7800 (point_cond_list_t): New data structure.
7801 (breakpoint) <cond_list>: New field.
7802 (find_gdb_breakpoint_at): Make non-static.
7803 (delete_gdb_breakpoint_at): Clear any target-side
7804 conditions.
7805 (clear_gdb_breakpoint_conditions): New function.
7806 (add_condition_to_breakpoint): Likewise.
7807 (add_breakpoint_condition): Likewise.
7808 (gdb_condition_true_at_breakpoint): Likewise.
7809 (gdb_breakpoint_here): Return result directly instead
7810 of going through a local variable.
7811
7812 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7813 (clear_gdb_breakpoint_conditions): Likewise.
7814 (add_breakpoint_condition): Likewise.
7815 (gdb_condition_true_at_breakpoint): Likewise.
7816
7817 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7818 (need_step_over_p): Take target-side breakpoint condition into
7819 consideration.
7820
7821 2012-02-24 Luis Machado <lgustavo@codesourcery>
7822
7823 * server.h: Include tracepoint.h.
7824 (agent_mem_read, agent_get_trace_state_variable_value,
7825 agent_set_trace_state_variable_value,
7826 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7827 get_set_tsv_func_addr): New prototypes.
7828
7829 * ax.h: New include file.
7830 * ax.c: New source file.
7831
7832 * tracepoint.c: Include ax.h.
7833 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7834 agent_expr, eval_result_type): Move to ax.h.
7835 (parse_agent_expr): Rename to ...
7836 (gdb_parse_agent_expr): ... this, make it non-static and move
7837 to ax.h.
7838 (unparse_agent_expr) Rename to ...
7839 (gdb_unparse_agent_expr): ... this, make it non-static and move
7840 to ax.h.
7841 (eval_agent_expr): Rename to ...
7842 (eval_tracepoint_agent_expr): ... this.
7843 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7844 forward declarations.
7845 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7846 (agent_get_trace_state_variable_value): New function.
7847 (agent_set_trace_state_variable_value): New function.
7848 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7849 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7850 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7851 (condition_true_at_tracepoint): Likewise.
7852 (parse_agent_expr): Rename to ...
7853 (gdb_parse_agent_expr): ... this and move to ax.c.
7854 (unparse_agent_expr): Rename to ...
7855 (gdb_unparse_agent_expr): ... this and move to ax.c.
7856 (gdb_agent_op_name): Move to ax.c.
7857 (eval_agent_expr): Rename to ...
7858 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7859 and move to ax.c.
7860 (eval_tracepoint_agent_expr): New function.
7861 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7862 non-static.
7863 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7864 ax.c.
7865 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7866 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7867 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7868 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7869 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7870 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7871 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7872 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7873 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7874 (compile_bytecodes): Remove forward declaration.
7875 (is_goto_target): Move to ax.c.
7876 (compile_bytecodes): Move to ax.c and call
7877 agent_get_trace_state_variable_value (...) and
7878 agent_set_trace_state_variable_value (...).
7879
7880 * Makefile.in: Update ax.c and IPA dependencies.
7881
7882 2012-02-24 Pedro Alves <palves@redhat.com>
7883
7884 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7885 (cmd_bigqtbuffer_circular): ... this. Only handle
7886 'QTBuffer:circular:'.
7887 (handle_tracepoint_general_set): Adjust.
7888
7889 2012-02-16 Yao Qi <yao@codesourcery.com>
7890
7891 * inferiors.c: Move code to ...
7892 * dll.c: .... here. New.
7893 * server.h: Declare clear_dlls.
7894 * Makefile.in (SFILES): Add dll.c.
7895 (OBS): Add dll.o
7896 (dll.o): New rule.
7897
7898 2012-02-11 Yao Qi <yao@codesourcery.com>
7899
7900 * server.c: (handle_monitor_command): Add a new parameter
7901 `own_buf'.
7902 (handle_query): Update caller.
7903
7904 2012-02-09 Joel Brobecker <brobecker@adacore.com>
7905
7906 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7907 * configure, config.in: Regenerate.
7908 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7909 is not defined.
7910
7911 2012-02-02 Pedro Alves <palves@redhat.com>
7912
7913 Try SIGKILL first, then PTRACE_KILL.
7914 * linux-low.c (linux_kill_one_lwp): New.
7915 (linux_kill_one_lwp): Rename to ...
7916 (kill_one_lwp_callback): ... this. Use the new
7917 linux_kill_one_lwp.
7918
7919 2012-02-02 Pedro Alves <palves@redhat.com>
7920
7921 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7922 inferior.
7923
7924 2012-01-27 Pedro Alves <palves@redhat.com>
7925
7926 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7927 (elf_64_file_p): Make static.
7928 (linux_pid_exe_is_elf_64_file): New.
7929 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7930 Delete declarations.
7931 (linux_pid_exe_is_elf_64_file): Declare.
7932 * linux-x86-low.c (x86_arch_setup): Use
7933 linux_pid_exe_is_elf_64_file.
7934
7935 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7936
7937 * linux-low.c (linux_wait_for_event_1): Rename to ...
7938 (linux_wait_for_event): ... here and merge it with former
7939 linux_wait_for_event - new variable wait_ptid, use it.
7940 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7941
7942 2012-01-23 Pedro Alves <palves@redhat.com>
7943
7944 * server.c (main): Avoid yet another case of infinite loop while
7945 detaching/killing after a longjmp.
7946
7947 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7948
7949 Code cleanup.
7950 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7951
7952 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7953
7954 * hostio.c (handle_readlink): New function.
7955 (handle_vFile): Call it to handle "vFile:readlink" packets.
7956
7957 2012-01-20 Pedro Alves <palves@redhat.com>
7958 Ulrich Weigand <ulrich.weigand@linaro.org>
7959
7960 * server.c (handle_v_requests): Only support vAttach and vRun to
7961 start multiple processes when in extended protocol mode.
7962
7963 2012-01-17 Pedro Alves <palves@redhat.com>
7964
7965 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7966 memalign plus mprotect to allocate the scratch buffer.
7967
7968 2012-01-13 Pedro Alves <palves@redhat.com>
7969
7970 * server.c (attach_inferior): Clear `cont_thread'.
7971
7972 2012-01-13 Pedro Alves <palves@redhat.com>
7973
7974 * server.c (main): Avoid infinite loop while detaching/killing
7975 after a longjmp.
7976
7977 2012-01-09 Doug Evans <dje@google.com>
7978
7979 * server.c (start_inferior): Set last_ptid in --wrapper case.
7980
7981 2012-01-06 Yao Qi <yao@codesourcery.com>
7982
7983 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7984 defined.
7985 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7986
7987 2012-01-04 Yao Qi <yao@codesourcery.com>
7988
7989 * tracepoint.c (cmd_qtdp): Print debug message
7990 for static tracepoint.
7991
7992 2012-01-04 Yao Qi <yao@codesourcery.com>
7993
7994 * tracepoint.c (trace_vdebug): Differentiate debug message
7995 between gdbserver and IPA.
7996
7997 2012-01-03 Yao Qi <yao@codesourcery.com>
7998
7999 * tracepoint.c (tracepoint_was_hit): Don't collect for
8000 static tracepoint.
8001
8002 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8003
8004 * terminal.h: Reformat copyright header.
8005
8006 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8007
8008 * server.c (gdbserver_version): Update copyright year.
8009 * gdbreplay.c (gdbreplay_version): Likewise.
8010
8011 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8012
8013 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8014
8015 Revert:
8016 2011-12-18 Hui Zhu <teawater@gmail.com>
8017 * linux-low.c (linux_create_inferior): Save return value to ret.
8018
8019 2011-12-18 Hui Zhu <teawater@gmail.com>
8020
8021 * linux-low.c (linux_create_inferior): Save return value to ret.
8022
8023 2011-12-16 Doug Evans <dje@google.com>
8024
8025 * linux-low.c (linux_create_inferior): If stdio connection,
8026 redirect stdin from /dev/null, stdout to stderr.
8027 * remote-utils.c (remote_is_stdio): New static global.
8028 (remote_connection_is_stdio): New function.
8029 (remote_prepare): Handle stdio connection.
8030 (remote_open): Ditto.
8031 (remote_close): Don't close stdin for stdio connections.
8032 (read_prim,write_prim): New functions. Replace all calls to
8033 read/write to these.
8034 * server.c (main): Watch for "-" argument. Move call to
8035 remote_prepare before start_inferior.
8036 * server.h (STDIO_CONNECTION_NAME): New macro.
8037 (remote_connection_is_stdio): Declare.
8038
8039 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8040 in debugging output.
8041
8042 2011-12-15 Yao Qi <yao@codesourcery.com>
8043
8044 * tracepoint.c: Include sys/syscall.h.
8045 (gdb_ust_thread): Remove preprocessor conditional.
8046
8047 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8048
8049 * linux-low.c (linux_detach_one_lwp): Call
8050 the_low_target.prepare_to_resume before detaching.
8051
8052 2011-12-14 Yao Qi <yao@codesourcery.com>
8053
8054 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8055 of write.
8056
8057 2011-12-14 Yao Qi <yao@codesourcery.com>
8058
8059 * i386-low.c (i386_low_stopped_data_address): Initialize local
8060 variable `control'.
8061
8062 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8063
8064 PR remote/13492
8065
8066 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8067 DR_CONTROL unless necessary. Extend comments.
8068 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8069 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8070
8071 2011-12-13 Yao Qi <yao@codesourcery.com>
8072
8073 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8074 macros.
8075 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8076
8077 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8078
8079 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8080 Print new debug message for such case.
8081
8082 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8083
8084 Fix overlapping memcpy.
8085 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8086 the read_inferior_memory transfer.
8087 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8088 write_inferior_memory transfer.
8089 (set_fast_tracepoint_jump): New variable buf. Use it for the
8090 read_inferior_memory and write_inferior_memory transfers.
8091 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8092 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8093 Use it for the write_inferior_memory transfer.
8094 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8095 buffers.
8096
8097 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8098
8099 * linux-low.c (fetch_register, store_register): Make code
8100 consistent, fix formatting.
8101
8102 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8103
8104 * linux-low.c (usr_store_inferior_registers): Factor out code
8105 to handle individual registers into...
8106 (store_register): ... this new function.
8107
8108 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8109
8110 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8111 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8112 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8113 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8114 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8115 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8116 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8117 (srv_xmlfiles): Add new XML files.
8118
8119 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8120 and <sys/uio.h>.
8121 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8122 (init_registers_s390_linux32v1): Add prototype.
8123 (init_registers_s390_linux32v2): Likewise.
8124 (init_registers_s390_linux64v1): Likewise.
8125 (init_registers_s390_linux64v2): Likewise.
8126 (init_registers_s390x_linux64v1): Likewise.
8127 (init_registers_s390x_linux64v2): Likewise.
8128 (s390_num_regs): Increment to 52.
8129 (s390_regmap): Add orig_r2 register.
8130 (s390_num_regs_3264): Increment to 68.
8131 (s390_regmap_3264): Add orig_r2 register.
8132 (s390_collect_ptrace_register): Handle orig_r2 register.
8133 (s390_supply_ptrace_register): Likewise.
8134 (s390_fill_last_break): New function.
8135 (s390_store_last_break): Likewise.
8136 (s390_fill_system_call): New function.
8137 (s390_store_system_call): Likewise.
8138 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8139 register sets.
8140 (s390_check_regset): New function.
8141 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8142 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8143 Update target_regsets for available register sets.
8144
8145 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8146 Jan Kratochvil <jan.kratochvil@redhat.com>
8147
8148 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8149 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8150 New.
8151 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8152 * linux-low.h (struct process_info_private): New member r_debug.
8153 * server.c (handle_qxfer_libraries): Call
8154 the_target->qxfer_libraries_svr4.
8155 (handle_qxfer_libraries_svr4): New function.
8156 (qxfer_packets): New entry "libraries-svr4".
8157 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8158 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8159 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8160 PACKET_qXfer_libraries_svr4.
8161
8162 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8163
8164 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8165 PSW address/mask between 8-byte and 16-byte formats.
8166 (s390_supply_ptrace_register): Likewise.
8167 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8168 basic addressing mode bit.
8169
8170 2011-11-24 Stan Shebs <stan@codesourcery.com>
8171
8172 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8173
8174 2011-11-17 Stan Shebs <stan@codesourcery.com>
8175
8176 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8177 (tracing_start_time): New global.
8178 (tracing_stop_time): New global.
8179 (tracing_user_name): New global.
8180 (tracing_notes): New global.
8181 (tracing_stop_note): New global.
8182 (cmd_qtstart): Set traceframe_usage, start_time.
8183 (stop_tracing): Set stop_time.
8184 (cmd_qtstatus): Report additional status.
8185 (cmd_qtp): New function.
8186 (handle_tracepoint_query): Call it.
8187 (cmd_qtnotes): New function.
8188 (handle_tracepoint_general_set): Call it.
8189 (get_timestamp): Rename from tsv_get_timestamp.
8190
8191 2011-11-14 Stan Shebs <stan@codesourcery.com>
8192 Kwok Cheung Yeung <kcy@codesourcery.com>
8193
8194 * linux-x86-low.c (small_jump_insn): New.
8195 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8196 trampoline and error message, build a trampoline and issue a small
8197 jump instruction to it.
8198 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8199 trampoline and error message.
8200 (x86_get_min_fast_tracepoint_insn_len): New.
8201 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8202 * linux-low.h (struct linux_target_ops): Add arguments to
8203 install_fast_tracepoint_jump_pad operation, add new operation.
8204 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8205 arguments.
8206 (linux_get_min_fast_tracepoint_insn_len): New function.
8207 (linux_target_op): Add new operation.
8208 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8209 (gdb_trampoline_buffer_end): Ditto.
8210 (gdb_trampoline_buffer_error): Ditto.
8211 (struct ipa_sym_addresses): Add fields for new IPA variables.
8212 (symbol_list): Add entries for new IPA variables.
8213 (struct tracepoint): Add fields to hold the address range of the
8214 trampoline used by the tracepoint.
8215 (trampoline_buffer_head): New static variable.
8216 (trampoline_buffer_tail): Ditto.
8217 (claim_trampoline_space): New function.
8218 (have_fast_tracepoint_trampoline_buffer): New function.
8219 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8220 structure.
8221 (install_fast_tracepoint): Ditto, also add error buffer argument.
8222 (cmd_qtminftpilen): New function.
8223 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8224 (fast_tracepoint_from_trampoline_address): New function.
8225 (fast_tracepoint_collecting): Handle trampoline as part of jump
8226 pad space.
8227 (set_trampoline_buffer_space): New function.
8228 (initialize_tracepoint): Initialize new IPA variables.
8229 * target.h (struct target_ops): Add arguments to
8230 install_fast_tracepoint_jump_pad operation, add new
8231 get_min_fast_tracepoint_insn_len operation.
8232 (target_get_min_fast_tracepoint_insn_len): New.
8233 (install_fast_tracepoint_jump_pad): Add arguments.
8234 * server.h (IPA_BUFSIZ): Define.
8235 * linux-i386-ipa.c: Include extra header files.
8236 (initialize_fast_tracepoint_trampoline_buffer): New function.
8237 (initialize_low_tracepoint): Call it.
8238 * server.h (set_trampoline_buffer_space): Declare.
8239 (claim_trampoline_space): Ditto.
8240 (have_fast_tracepoint_trampoline_buffer): Ditto.
8241
8242 2011-11-14 Yao Qi <yao@codesourcery.com>
8243
8244 * server.c (handle_query): Handle InstallInTrace for qSupported.
8245 * tracepoint.c (add_tracepoint): Sort list.
8246 (install_tracepoint, download_tracepoint): New.
8247 (cmd_qtdp): Call them to install and download tracepoints.
8248 (sort_tracepoints): Removed.
8249 (cmd_qtstart): Update.
8250
8251 2011-11-14 Yao Qi <yao@codesourcery.com>
8252
8253 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8254 * mem-break.h: Declare.
8255 * tracepoint.c (cmd_qtstart): Move some code to ...
8256 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8257 New.
8258 (download_tracepoints): Move some code to ...
8259 (download_tracepoint_1): ... here. New.
8260
8261 2011-11-08 Yao Qi <yao@codesourcery.com>
8262
8263 * remote-utils.c (relocate_instruction): A comment fix.
8264
8265 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8266
8267 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8268 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8269 dr_status_mirror and dr_control_mirror from debug_reg_state.
8270 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8271 (i386_initial_stuff): Remove use of deleted globals.
8272 (i386_get_thread_context, i386_set_thread_context,
8273 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8274 from debug_reg_state.
8275
8276 2011-11-05 Yao Qi <yao@codesourcery.com>
8277
8278 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8279 address as TPOINT's.
8280
8281 2011-11-02 Stan Shebs <stan@codesourcery.com>
8282
8283 * tracepoint.c (agent_mem_read_string): New function.
8284 (eval_agent_expr): Call it for tracenz.
8285 * server.c (handle_query): Report support for tracenz.
8286
8287 2011-11-02 Yao Qi <yao@codesourcery.com>
8288
8289 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8290
8291 2011-11-02 Yao Qi <yao@codesourcery.com>
8292
8293 * target.h: Fix a typo in comment.
8294
8295 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8296
8297 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8298 clobber the breakpoints' shadows with fast tracepoint jumps.
8299 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8300 * target.c (write_inferior_memory): Also pass MYADDR down to
8301 check_mem_write.
8302
8303 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8304
8305 * configure.ac: Check support for personality routine.
8306 * configure: Regenerate.
8307 * config.in: Likewise.
8308 * linux-low.c: Include <sys/personality.h>.
8309 Define ADDR_NO_RANDOMIZE if necessary.
8310 (linux_create_inferior): Disable address space randomization when
8311 forking inferior, if requested.
8312 (linux_supports_disable_randomization): New function.
8313 (linux_target_ops): Install it.
8314 * server.h (disable_randomization): Declare.
8315 * server.c (disable_randomization): New global variable.
8316 (handle_general_set): Handle QDisableRandomization.
8317 (handle_query): Likewise for qSupported.
8318 (main): Support --disable-randomization and --no-disable-randomization
8319 command line arguments.
8320 * target.h (struct target_ops): Add supports_disable_randomization.
8321 (target_supports_disable_randomization): New macro.
8322
8323 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8324
8325 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8326 ifdef check.
8327 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8328 [!PT_GETDSBT] (target_loadmap): New definition.
8329 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8330 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8331 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8332 and PT_GETDSBT to LINUX_LOADMAP.
8333 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8334 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8335
8336 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8337
8338 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8339 (arm_linux_hwbp_cap): New static variable.
8340 (arm_linux_get_hwbp_cap): Replace by ...
8341 (arm_linux_init_hwbp_cap): ... this new function.
8342 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8343 (arm_linux_get_hw_watchpoint_count): Likewise.
8344 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8345 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8346 (arm_prepare_to_resume): Use perror_with_name instead of error.
8347
8348 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8349
8350 * linux-arm-low.c: Include <signal.h>.
8351 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8352 (struct arm_linux_hwbp_cap): New data type.
8353 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8354 (struct arm_linux_hw_breakpoint): New data type.
8355 (MAX_BPTS, MAX_WPTS): Define.
8356 (struct arch_process_info, struct arch_lwp_info): New data types.
8357 (arm_linux_get_hwbp_cap): New function.
8358 (arm_linux_get_hw_breakpoint_count): Likewise.
8359 (arm_linux_get_hw_watchpoint_count): Likewise.
8360 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8361 (arm_hwbp_control_initialize): Likewise.
8362 (arm_hwbp_control_is_enabled): Likewise.
8363 (arm_hwbp_control_is_initialized): Likewise.
8364 (arm_hwbp_control_disable): Likewise.
8365 (arm_linux_hw_breakpoint_equal): Likewise.
8366 (arm_linux_hw_point_initialize): Likewise.
8367 (struct update_registers_data): New data structure.
8368 (update_registers_callback: New function.
8369 (arm_insert_point): Likewise.
8370 (arm_remove_point): Likewise.
8371 (arm_stopped_by_watchpoint): Likewise.
8372 (arm_stopped_data_address): Likewise.
8373 (arm_new_process): Likewise.
8374 (arm_new_thread): Likewise.
8375 (arm_prepare_to_resume): Likewise.
8376 (the_low_target): Register arm_insert_point, arm_remove_point,
8377 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8378 arm_new_thread, and arm_prepare_to_resume.
8379
8380 2011-09-15 Stan Shebs <stan@codesourcery.com>
8381
8382 * server.h (struct emit_ops): Add compare-goto fields.
8383 * tracepoint.c (gdb_agent_op_sizes): New table.
8384 (emit_eq_goto): New function.
8385 (emit_ne_goto): New function.
8386 (emit_lt_goto): New function.
8387 (emit_le_goto): New function.
8388 (emit_gt_goto): New function.
8389 (emit_ge_goto): New function.
8390 (is_goto_target): New function.
8391 (compile_bytecodes): Recognize special cases of compare-goto
8392 combinations and call specialized emitters for them.
8393 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8394 (amd64_emit_ne_goto): New function.
8395 (amd64_emit_lt_goto): New function.
8396 (amd64_emit_le_goto): New function.
8397 (amd64_emit_gt_goto): New function.
8398 (amd64_emit_ge_goto): New function.
8399 (amd64_emit_ops): Add the new functions.
8400 (i386_emit_eq_goto): New function.
8401 (i386_emit_ne_goto): New function.
8402 (i386_emit_lt_goto): New function.
8403 (i386_emit_le_goto): New function.
8404 (i386_emit_gt_goto): New function.
8405 (i386_emit_ge_goto): New function.
8406 (i386_emit_ops): Add the new functions.
8407
8408 2011-09-08 Stan Shebs <stan@codesourcery.com>
8409
8410 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8411 (i386_emit_epilogue): Restore %ebx.
8412
8413 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8414
8415 * server.c (step_thread): Remove definition.
8416 (process_serial_event): Don't handle Hs.
8417 * server.h (step_thread): Remove declaration.
8418 * target.c (set_desired_inferior): Remove use of step_thread.
8419
8420 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8421
8422 * linux-low.c: Include linux-procfs.h.
8423 (linux_attach_lwp_1): Update comments.
8424 (linux_attach): Scan for existing threads when attaching to a
8425 process that is the tgid.
8426 * Makefile.in: Update dependencies.
8427
8428 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8429
8430 * configure.srv: Add linux-procfs.o dependencies.
8431
8432 2011-08-14 Yao Qi <yao@codesourcery.com>
8433
8434 * target.h (struct target_ops): Fix indent.
8435 * win32-low.c (win32_target_ops): Fix comment.
8436
8437 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8438 Yao Qi <yao@codesourcery.com>
8439
8440 * Makefile.in (clean): Remove tic6x-*.c files.
8441 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8442 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8443 (tic6x-c64xp-linux.c): Likewise.
8444 * configure.srv: Add support for tic6x-*-uclinux.
8445 * linux-tic6x-low.c: New.
8446 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8447
8448 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8449 Yao Qi <yao@codesourcery.com>
8450
8451 * target.h (struct target_ops): Add read_loadmap.
8452 * linux-low.c (struct target_loadseg): New type.
8453 (struct target_loadmap): New type.
8454 (linux_read_loadmap): New function.
8455 (linux_target_ops): Add linux_read_loadmap.
8456 * server.c (handle_query): Support qXfer:fdpic:read packet.
8457 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8458 to NULL.
8459
8460 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8461
8462 * win32-low.c: Include <stdint.h>.
8463
8464 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8465
8466 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8467 to the inferior here.
8468 (i386_remove_aligned_watchpoint): Ditto.
8469 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8470 fit part of the watchpoint in the debug registers.
8471 (i386_update_inferior_debug_regs): New.
8472 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8473 registers, and only update the inferior on success.
8474 (i386_low_remove_watchpoint): Ditto.
8475
8476 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8477
8478 * linux-low.c (compare_ints, unique, list_threads, show_process,
8479 linux_core_of_thread): Delete.
8480 (linux_target_ops): Change linux_core_of_thread to
8481 linux_common_core_of_thread.
8482 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8483 * utils.c (malloc_failure): Change type of argument.
8484 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8485 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8486 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8487 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8488 (IPA_OBJS): Add common-utils-ipa.o.
8489 (ptid_h, linux_osdata_h): New macros.
8490 (server_h): Add common/common-utils.h, common/xml-utils.h,
8491 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8492 common/ptid.h.
8493 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8494 ptid.o, buffer.o): New rules.
8495 (linux-low.o): Add common/linux-osdata.h as a dependency.
8496 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8497 * configure.ac: Add AC_HEADER_DIRENT check.
8498 * config.in: Regenerate.
8499 * configure: Regenerate.
8500 * remote-utils.c (xml_escape_text): Delete.
8501 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8502 buffer_xml_printf): Move to common/buffer.c.
8503 * server.c (main): Remove call to initialize_inferiors.
8504 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8505 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8506 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8507 internal_error, gdb_assert, gdb_assert_fail): Delete.
8508 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8509 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8510 common/buffer.h.
8511 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8512 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8513 initialize_inferiors): Delete.
8514
8515 2011-07-20 Pedro Alves <pedro@codesourcery.com>
8516
8517 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8518 symbol error.
8519
8520 2011-05-31 Pedro Alves <pedro@codesourcery.com>
8521
8522 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8523 assertion.
8524 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8525
8526 2011-05-26 Yao Qi <yao@codesourcery.com>
8527
8528 * Makefile.in (thread-db.o): Track dependence to
8529 common/gdb_thread_db.h.
8530 * thread-db.c: include gdb_thread_db.h from right place.
8531
8532 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8533
8534 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8535 __FILE__ and __LINE__ to internal_error.
8536
8537 2011-05-13 Doug Evans <dje@google.com>
8538
8539 * thread-db.c (try_thread_db_load_from_sdir): New function.
8540 (try_thread_db_load_from_dir): New function.
8541 (thread_db_load_search): Handle $sdir, ignore $pdir.
8542 Remove trying of system directories if search of
8543 libthread-db-search-path fails, that is now done via $sdir.
8544
8545 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8546
8547 * server.c (handle_query): Add EnableDisableTracepoints to the list
8548 of supported features.
8549 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8550 tracepoints.
8551 (cmd_qtenable_disable): New.
8552 (cmd_qtstart): Install tracepoints even if disabled.
8553 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8554 receiving a QTEnable or QTDisable packet.
8555 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8556 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8557 tracepoints.
8558 (gdb_probe): Skip data collection if static tracepoint is disabled.
8559
8560 2011-05-10 Doug Evans <dje@google.com>
8561
8562 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8563
8564 2011-05-04 Doug Evans <dje@google.com>
8565
8566 * linux-low.c (linux_join): Skip process lookup.
8567 * spu-low.c (spu_join): Ditto.
8568 * server.c (join_inferiors_callback): Delete.
8569 (process_serial_event): For 'D' packet (detach) call join_inferior
8570 directly.
8571
8572 2011-05-04 Joseph Myers <joseph@codesourcery.com>
8573
8574 * README: Don't mention xscale*-*-linux*.
8575 * configure.srv (xscale*-*-linux*): Don't handle target.
8576
8577 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8578
8579 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8580 casting pointers.
8581 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8582 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8583 (i386_emit_void_call_2): Likewise.
8584
8585 2011-04-26 Yao Qi <yao@codesourcery.com>
8586
8587 * linux-low.c: Move common macros to linux-ptrace.h.
8588 Include linux-ptrace.h.
8589 * Makefile.in (linux_ptrace_h): New.
8590 (linux-low.o): Depends on linux-ptrace.h.
8591
8592 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8593
8594 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8595 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8596 (remote_prepare): New function with most of the TCP code from ...
8597 (remote_open): ... here. Detect PORT here unconditionally. Move also
8598 setting transport_is_reliable.
8599 * server.c (run_once): New variable.
8600 (gdbserver_usage): Document it.
8601 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8602 the first run if RUN_ONCE.
8603 * server.h (run_once, remote_prepare): New declarations.
8604
8605 2011-04-19 Tom Tromey <tromey@redhat.com>
8606
8607 * win32-low.c (handle_load_dll): Remove duplicate "the".
8608
8609 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8610
8611 Remove support for old Cygwin 1.5 versions.
8612 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8613 function to avoid warning.
8614 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8615 warning.
8616
8617 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8618
8619 * gdbserver/server.h (Macro _): Define it if not available.
8620
8621 2011-03-14 Michael Snyder <msnyder@vmware.com>
8622
8623 * hostio.c (handle_close): Remove unnecessary null test.
8624
8625 2011-03-10 Joel Brobecker <brobecker@adacore.com>
8626
8627 * Makefile.in (maintainer-clean realclean distclean): Remove
8628 "make ... subdir_do" command.
8629
8630 2011-03-10 Michael Snyder <msnyder@vmware.com>
8631
8632 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8633
8634 * server.c (handle_v_run): Free alloced buffer on early return.
8635
8636 2011-03-09 Yao Qi <yao@codesourcery.com>
8637
8638 Revert:
8639 2011-03-04 Yao Qi <yao@codesourcery.com>
8640
8641 * Makefile.in: Remove GNU make feature --directory.
8642
8643 2011-03-05 Yao Qi <yao@codesourcery.com>
8644
8645 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8646 (subdir_do): New make target. Copied from gdb/Makefile.
8647 (maintainer-clean, realclean, distclean, clean): Call corresponding
8648 make targets in common/Makefile.
8649
8650 2011-02-11 Yao Qi <yao@codesourcery.com>
8651
8652 * configure.ac: Call AC_PROG_RANLIB.
8653 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8654 * configure: Regenerate.
8655
8656 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8657
8658 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8659
8660 2011-03-06 Yao Qi <yao@codesourcery.com>
8661
8662 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8663
8664 2011-03-05 Yao Qi <yao@codesourcery.com>
8665
8666 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8667 (subdir_do): New make target. Copied from gdb/Makefile.
8668 (maintainer-clean, realclean, distclean, clean): Call corresponding
8669 make targets in common/Makefile.
8670
8671 2011-03-04 Yao Qi <yao@codesourcery.com>
8672
8673 * Makefile.in: Remove GNU make feature --directory.
8674
8675 2011-03-04 Michael Snyder <msnyder@vmware.com>
8676
8677 * server.c (queue_stop_reply): Call xmalloc not malloc.
8678
8679 2011-03-02 Michael Snyder <msnyder@vmware.com>
8680
8681 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8682
8683 2011-02-28 Michael Snyder <msnyder@vmware.com>
8684
8685 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8686 (cmd_qtframe): Ditto.
8687 (cmd_qtbuffer): Ditto.
8688 (cmd_bigqtbuffer): Ditto.
8689
8690 * utils.c (decimal2str): Initialize 'width' to nine, then
8691 don't mess with it.
8692
8693 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8694
8695 * hostio.c (require_data): Free *data, not data.
8696
8697 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8698
8699 * hostio.c (require_data): Use free, not xfree.
8700
8701 2011-02-27 Michael Snyder <msnyder@vmware.com>
8702
8703 * server.c (handle_query): Discard unused value.
8704
8705 * hostio.c (require_data): Free malloc memory before returning
8706 error.
8707
8708 2011-02-26 Michael Snyder <msnyder@vmware.com>
8709
8710 * linux-low.c (list_threads): Call closedir for dirent.
8711
8712 2011-02-27 Michael Snyder <msnyder@vmware.com>
8713
8714 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8715 a case statement falls through.
8716
8717 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8718
8719 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8720 in comparison.
8721
8722 2011-02-26 Michael Snyder <msnyder@vmware.com>
8723
8724 * utils.c (decimal2str): Eliminate dead code and dead param.
8725 (pulongest): Drop dead param from call to decimal2str.
8726 (plongest): Ditto.
8727
8728 2011-02-24 Joel Brobecker <brobecker@adacore.com>
8729
8730 Revert the following patch (not approved yet):
8731 2011-02-21 Hui Zhu <teawater@gmail.com>
8732 * tracepoint.c (tp_printf): New function.
8733 (eval_agent_expr): Handle gdb_agent_op_printf.
8734
8735 2011-02-21 Hui Zhu <teawater@gmail.com>
8736
8737 * tracepoint.c (tp_printf): New function.
8738 (eval_agent_expr): Handle gdb_agent_op_printf.
8739
8740 2011-02-18 Tom Tromey <tromey@redhat.com>
8741
8742 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8743 (tracepoint.o): Likewise.
8744 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8745 (gdb_agent_op_names): Likewise.
8746
8747 2011-02-18 Tom Tromey <tromey@redhat.com>
8748
8749 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8750 gdb_agent_op_rot>: New constants.
8751 (gdb_agent_op_names): Add pick and roll.
8752 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8753 cases.
8754
8755 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8756
8757 * aclocal.m4: Regenerated with aclocal-1.11.1.
8758
8759 2011-02-14 Pedro Alves <pedro@codesourcery.com>
8760
8761 * server.c (handle_qxfer_traceframe_info): New.
8762 (qxfer_packets): Register "traceframe-info".
8763 (handle_query): Report support for qXfer:traceframe-info:read+.
8764 * tracepoint.c (match_blocktype): New.
8765 (traceframe_find_block_type): Rename to ...
8766 (traceframe_walk_blocks): ... this. Add callback filter argument,
8767 and use it.
8768 (traceframe_find_block_type): New, reimplemented on top of
8769 traceframe_walk_blocks.
8770 (build_traceframe_info_xml): New.
8771 (traceframe_read_info): New.
8772 * server.h (traceframe_read_info): Declare.
8773
8774 2011-02-11 Yao Qi <yao@codesourcery.com>
8775
8776 * configure.ac: Call AC_PROG_RANLIB.
8777 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8778 * configure: Regenerate.
8779
8780 2011-02-07 Pedro Alves <pedro@codesourcery.com>
8781
8782 * server.c (gdb_read_memory): Change return semantics to allow
8783 partial transfers.
8784 (handle_search_memory_1): Adjust.
8785 (process_serial_event) <'m' packet>: Handle partial transfers.
8786 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8787
8788 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8789
8790 * regcache.c (init_register_cache): Initialize
8791 regcache->register_status.
8792 (free_register_cache): Release regcache->register_status.
8793 (regcache_cpy): Copy register_status.
8794 (registers_to_string): Print 'x's for unavailable registers.
8795 (supply_register): Mark the register's status valid or
8796 unavailable, depending on whether a buffer was passed in or not.
8797 (supply_register_zeroed): New.
8798 (supply_regblock): Mark the registers' status valid or
8799 unavailable, depending on whether a buffer was passed in or not.
8800 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8801 (struct regcache): New `register_status' field.
8802 (supply_register_zeroed): Declare.
8803 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8804 supply_register_zeroed, rather than passing a NULL buffer to
8805 supply_register.
8806 * tracepoint.c (fetch_traceframe_registers): Update comment.
8807
8808 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8809
8810 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8811 buffer explicit.
8812
8813 2011-01-25 Pedro Alves <pedro@codesourcery.com>
8814
8815 * server.h (decode_xfer_write): Change prototype.
8816 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8817 and don't extract the annex here.
8818 * server.c (decode_xfer_read): Remove `annex' parameter,
8819 and don't extract the annex here.
8820 (decode_xfer): New.
8821 (struct qxfer): New.
8822 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8823 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8824 (handle_qxfer_statictrace): New functions, abstracted out from
8825 handle_query, and made to use the struct qxfer interface.
8826 (handle_threads_qxfer_proper): Rename to ...
8827 (handle_qxfer_threads_proper): ... this.
8828 (handle_threads_qxfer): Rename to ...
8829 (handle_qxfer_threads): ... this. Adjust.
8830 (qxfer_packets): New array.
8831 (handle_qxfer): New function.
8832 (handle_query): Use handle_qxfer.
8833
8834 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8835
8836 * gdbreplay.c: Shorten lines of >= 80 columns.
8837 * linux-low.c: Ditto.
8838 * linux-ppc-low.c: Ditto.
8839 * linux-s390-low.c: Ditto.
8840 * linux-sparc-low.c: Ditto.
8841 * linux-x86-low.c: Ditto.
8842 * linux-xtensa-low.c: Ditto.
8843 * mem-break.c: Ditto.
8844 * nto-low.c: Ditto.
8845 * regcache.h: Ditto.
8846 * remote-utils.c: Ditto.
8847 * server.c: Ditto.
8848 * server.h: Ditto.
8849 * thread-db.c: Ditto.
8850 * tracepoint.c: Ditto.
8851 * utils.c: Ditto.
8852 * win32-low.h: Ditto.
8853
8854 2011-01-05 Joel Brobecker <brobecker@adacore.com>
8855
8856 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8857 update.
8858
8859 2011-01-01 Joel Brobecker <brobecker@adacore.com>
8860
8861 * server.c (gdbserver_version): Update copyright year in version
8862 output.
8863 * gdbreplay.c (gdbreplay_version): Ditto.
8864
8865 2010-12-29 Jie Zhang <jie.zhang@analog.com>
8866
8867 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8868 * linux-bfin-low.c: New file.
8869 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8870 PT_DATA_ADDR for BFIN targets.
8871 * Makefile.in (SFILES): Add linux-bfin-low.c.
8872 (clean): Remove reg-bfin.c.
8873 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8874 * README: Mention supported Blackfin targets.
8875
8876 2010-12-23 Mike Frysinger <vapier@gentoo.org>
8877
8878 * .gitignore: New file.
8879
8880 2010-11-16 Mike Frysinger <vapier@gentoo.org>
8881
8882 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8883
8884 2010-10-22 Jie Zhang <jie@codesourcery.com>
8885
8886 * Makefile.in: Add FLAGS_TO_PASS variable.
8887 (install): Remove dependency of install-only and recursively
8888 invoke make for install-only.
8889
8890 2010-10-04 Doug Evans <dje@google.com>
8891
8892 * Makefile.in (uninstall): Use $(DESTDIR).
8893
8894 2010-09-24 Pedro Alves <pedro@codesourcery.com>
8895
8896 PR gdb/11842
8897
8898 * linux-x86-low.c (compat_siginfo_from_siginfo)
8899 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8900 si_code is < 0. Check for si_code == SI_TIMER before checking for
8901 si_code < 0.
8902
8903 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8904
8905 * lynx-i386-low.c: New file.
8906 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8907
8908 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8909
8910 * lynx-low.c (ptrace_request_to_str): Remove handling for
8911 request values that have been removed in LynxOS 5.x.
8912
8913 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8914
8915 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8916 <ptrace.h>
8917
8918 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8919
8920 * configure.ac: Add --enable-inprocess-agent option.
8921 * configure: Rebuilt.
8922
8923 2010-09-06 Yao Qi <yao@codesourcery.com>
8924
8925 * linux-low.c (linux_kill): Remove unused variable.
8926 (linux_stabilize_threads): Likewise.
8927 * server.c (start_inferior): Likewise.
8928 (queue_stop_reply_callback): Likewise.
8929 * tracepoint.c (do_action_at_tracepoint): Likewise.
8930
8931 2010-09-06 Yao Qi <yao@codesourcery.com>
8932
8933 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8934 on return.
8935
8936 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8937
8938 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8939
8940 2010-09-06 Pedro Alves <pedro@codesourcery.com>
8941
8942 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8943 "$(IPA_DEPFILES)".
8944
8945 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8946
8947 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8948 gdbserver/lynx-ppc-low.c: New files.
8949 * Makefile.in (lynx_low_h): New variable.
8950 (lynx-low.o, lynx-ppc-low.o): New rules.
8951 * configure.ac: On LynxOS, link with -lnetinet.
8952 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8953 * configure: regenerate.
8954
8955 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8956
8957 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8958 * configure.ac: Add check for vasprintf and vsnprintf.
8959 * configure, config.in: Regenerate.
8960 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8961
8962 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8963
8964 * gdbreplay.c: Move include of alloca.h up, next to include of
8965 malloc.h.
8966 * server.h: Add include of malloc.h.
8967 * mem-break.c: Remove include of malloc.h.
8968 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8969
8970 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8971
8972 * Makefile.in (memmem.o): Build with -Wno-error.
8973
8974 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8975
8976 * utils.c (xsnprintf): Make non-static.
8977 * server.h: Add xsnprintf declaration.
8978 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8979 replace calls to snprintf by calls to xsnprintf throughout.
8980
8981 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8982
8983 * configure.ac: Add configure check for alloca.
8984 * configure, config.in: Regenerate.
8985 * server.h: Include alloca.h if it exists.
8986 * gdbreplay.c: Include alloca.h if it exists.
8987
8988 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8989
8990 * linux-low.c (__SIGRTMIN): Define if not already defined.
8991 (linux_create_inferior): Check for __ANDROID__ rather than
8992 __SIGRTMIN.
8993 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8994 are already deferred.
8995 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8996 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8997 stopped and already has a pending signal to report.
8998 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8999 a pending signal to report or is moving out of a jump pad.
9000 (linux_init_signals): Check for __ANDROID__ rather than
9001 __SIGRTMIN.
9002
9003 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9004
9005 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9006 debug_threads check. Avoid a linear search when not doing debug
9007 output.
9008
9009 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9010
9011 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9012 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9013 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9014 (process_event): Change local fd's type to gdb_fildes_t.
9015 (create_file_handler): Adjust prototype.
9016 (delete_file_handler): Adjust prototype.
9017 (handle_file_event): Adjust prototype. Use pfildes.
9018 (create_file_event): Adjsut prototype.
9019 * remote-utils.c (remote_desc, listen_desc): Change type to
9020 gdb_fildes_t.
9021 * server.h: New gdb_fildes_t typedef.
9022 [USE_WIN32API]: Include winsock2.h.
9023 (delete_file_handler, add_file_handler): Adjust prototypes.
9024 (pfildes): Declare.
9025 * utils.c (pfildes): New.
9026
9027 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9028
9029 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9030 * configure: Regenerate.
9031
9032 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9033
9034 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9035 (linux_done_accessing_memory): ... this.
9036 (linux_target_ops): Adjust.
9037 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9038 * nto-low.c (nto_target_ops): Adjust comment.
9039 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9040 * spu-low.c (spu_target_ops): Adjust comment.
9041 * target.h (target_ops): Rename unprepare_to_access_memory field
9042 to done_accessing_memory.
9043 (unprepare_to_access_memory): Rename to ...
9044 (done_accessing_memory): ... this.
9045
9046 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9047
9048 * linux-low.c (linux_prepare_to_access_memory): New.
9049 (linux_unprepare_to_access_memory): New.
9050 (linux_target_ops): Install them.
9051 * server.c (read_memory): Rename to ...
9052 (gdb_read_memory): ... this. Use
9053 prepare_to_access_memory/prepare_to_access_memory.
9054 (write_memory): Rename to ...
9055 (gdb_write_memory): ... this. Use
9056 prepare_to_access_memory/prepare_to_access_memory.
9057 (handle_search_memory_1): Adjust.
9058 (process_serial_event): Adjust.
9059 * target.h (struct target_ops): New fields
9060 prepare_to_access_memory and unprepare_to_access_memory.
9061 (prepare_to_access_memory, unprepare_to_access_memory): New.
9062 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9063 prepare_to_access_memory/prepare_to_access_memory.
9064 * nto-low.c (nto_target_ops): Adjust.
9065 * spu-low.c (spu_target_ops): Adjust.
9066 * win32-low.c (win32_target_ops): Adjust.
9067
9068 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9069
9070 * Makefile.in (WARN_CFLAGS): Get it from configure.
9071 (WERROR_CFLAGS): New.
9072 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9073 * configure.ac: Introduce --enable-werror, which adds -Werror to
9074 the compiler command line. Enabled by default. Disable with
9075 --disable-werror. Add -Wdeclaration-after-statement
9076 Wpointer-arith and -Wformat-nonliteral to warning flags.
9077 * configure: Regenerate.
9078
9079 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9080
9081 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9082
9083 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9084
9085 * gdbreplay.c (remote_error): New.
9086 (gdbchar): New.
9087 (expect): Use gdbchar. Check for error reading from GDB.
9088 Clarify sync error output.
9089 (play): Check for errors writing to GDB.
9090 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9091 * remote-utils.c (getpkt): Check for errors writing to the remote
9092 descriptor.
9093
9094 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9095
9096 * linux-low.c (linux_wait_1): Move non-debugging code out of
9097 `debug_threads' control.
9098
9099 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9100
9101 * linux-low.c (linux_wait_1): Don't set last_status here.
9102 * server.c (push_event, queue_stop_reply_callback): Assert we're
9103 not pushing a TARGET_WAITKIND_IGNORE event.
9104 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9105 (myresume, handle_target_event): Set the thread's last_resume_kind
9106 and last_status from the target returned status.
9107
9108 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9109
9110 PR threads/10729
9111
9112 * linux-x86-low.c (update_debug_registers_callback): New.
9113 (i386_dr_low_set_addr): Use it.
9114 (i386_dr_low_get_addr): New.
9115 (i386_dr_low_set_control): Use update_debug_registers_callback.
9116 (i386_dr_low_get_control): New.
9117 (i386_dr_low_get_status): Adjust.
9118 * linux-low.c (linux_stop_lwp): New.
9119 * linux-low.h (linux_stop_lwp): Declare.
9120
9121 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9122 argument instead of a i386_debug_reg_state.
9123 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9124 a i386_debug_reg_state.
9125 (i386_insert_aligned_watchpoint): Adjust.
9126 (i386_remove_aligned_watchpoint): Adjust.
9127 (i386_low_stopped_data_address): Read the debug registers from the
9128 inferior instead of from the mirrors.
9129 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9130 (i386_dr_low_get_addr): Declare.
9131 (i386_dr_low_get_control): Declare.
9132 (i386_dr_low_get_status): Change prototype.
9133
9134 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9135 (i386_dr_low_get_addr): New.
9136 (i386_dr_low_get_control): New.
9137 (i386_dr_low_get_status): Adjust prototype. Return
9138 dr_status_mirror.
9139 (i386_initial_stuff): Clear dr_status_mirror and
9140 dr_control_mirror.
9141 (i386_get_thread_context): Adjust.
9142 (i386_set_thread_context): Adjust.
9143 (i386_thread_added): Adjust.
9144
9145 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9146
9147 * linux-low.h (linux_thread_area): Delete declaration.
9148
9149 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9150
9151 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9152 after its termination.
9153
9154 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9155
9156 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9157 (gdb_wants_all_stopped): Delete.
9158 (linux_wait_1): Don't call them.
9159 * server.c (handle_v_cont): Tag all threads as want-stopped.
9160 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9161 stopped as "client-wants-stopped".
9162
9163 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9164
9165 * Makefile.in (signals_h): New.
9166 (server_h): Depend on it.
9167 (server.o): Don't depend on $(signals_def).
9168 (signals.o): Depend on $(signals_def).
9169
9170 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9171
9172 * Makefile.in (signals_def): New.
9173 (server_h): Append include/gdb/signals.h and signals_def.
9174 (server.o): Append signals_def.
9175
9176 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9177
9178 * server.c (handle_target_event): Use target_signal_to_host for
9179 resume_info.sig initialization.
9180 * target.h (struct thread_resume) <sig>: New comment.
9181
9182 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9183
9184 * server.c (handle_query): strcpy() the returned string from paddress()
9185 instead of sprintf().
9186 * utils.c (paddress): Return phex_nz().
9187
9188 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9189
9190 * server.c (handle_v_cont): Call mourn_inferior if process
9191 just exited.
9192 (myresume): Likewise.
9193
9194 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9195
9196 Static tracepoints, and integration with UST.
9197
9198 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9199 * mem-break.c (uninsert_all_breakpoints)
9200 (reinsert_all_breakpoints): New.
9201 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9202 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9203 (gdb_agent_ust_loaded, helper_thread_id)
9204 (gdb_agent_helper_thread_id): New macros.
9205 (struct ipa_sym_addresses): Add addr_ust_loaded,
9206 addr_helper_thread_id, addr_cmd_buf.
9207 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9208 (in_process_agent_loaded_ust): New.
9209 (write_e_ust_not_loaded): New.
9210 (maybe_write_ipa_ust_not_loaded): New.
9211 (struct collect_static_trace_data_action): New.
9212 (enum tracepoint_type) <static_tracepoint>: New.
9213 (struct tracepoint) <handle>: Mention static tracepoints.
9214 (struct static_tracepoint_ctx): New.
9215 (CMD_BUF_SIZE): New.
9216 (add_tracepoint_action): Handle static tracepoint actions.
9217 (unprobe_marker_at): New.
9218 (clear_installed_tracepoints): Handle static tracepoints.
9219 (cmd_qtdp): Handle static tracepoints.
9220 (probe_marker_at): New.
9221 (cmd_qtstart): Handle static tracepoints.
9222 (response_tracepoint): Handle static tracepoints.
9223 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9224 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9225 (get_context_regcache): Handle static tracepoints.
9226 (do_action_at_tracepoint): Handle static tracepoint actions.
9227 (traceframe_find_block_type): Handle static trace data blocks.
9228 (traceframe_read_sdata): New.
9229 (download_tracepoints): Download static tracepoint actions.
9230 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9231 (GDB_PROBE_NAME): New.
9232 (ust_ops): New.
9233 (GET_UST_SYM): New.
9234 (USTF): New.
9235 (dlsym_ust): New.
9236 (ust_marker_to_static_tracepoint): New.
9237 (gdb_probe): New.
9238 (collect_ust_data_at_tracepoint): New.
9239 (gdb_ust_probe): New.
9240 (UNIX_PATH_MAX, SOCK_DIR): New.
9241 (gdb_ust_connect_sync_socket): New.
9242 (resume_thread, stop_thread): New.
9243 (run_inferior_command): New.
9244 (init_named_socket): New.
9245 (gdb_ust_socket_init): New.
9246 (cstr_to_hexstr): New.
9247 (next_st): New.
9248 (first_marker, next_marker): New.
9249 (response_ust_marker): New.
9250 (cmd_qtfstm, cmd_qtsstm): New.
9251 (unprobe_marker_at, probe_marker_at): New.
9252 (cmd_qtstmat, gdb_ust_thread): New.
9253 (gdb_ust_init): New.
9254 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9255 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9256 (ST_REGENTRY): New.
9257 (x86_64_st_collect_regmap): New.
9258 (X86_64_NUM_ST_COLLECT_GREGS): New.
9259 (AMD64_RIP_REGNUM): New.
9260 (supply_static_tracepoint_registers): New.
9261 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9262 (ST_REGENTRY): New.
9263 (i386_st_collect_regmap): New.
9264 (i386_NUM_ST_COLLECT_GREGS): New.
9265 (supply_static_tracepoint_registers): New.
9266 * server.c (handle_query): Handle qXfer:statictrace:read.
9267 <qSupported>: Report support for StaticTracepoints, and
9268 qXfer:statictrace:read features.
9269 * server.h (traceframe_read_sdata)
9270 (supply_static_tracepoint_registers): Declare.
9271 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9272 (unpack_varlen_hex): Include in IPA build.
9273 * Makefile.in (ustlibs, ustinc): New.
9274 (IPA_OBJS): Add remote-utils-ipa.o.
9275 ($(IPA_LIB)): Link -ldl and -lpthread.
9276 (UST_CFLAGS): New.
9277 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9278 * config.in, configure: Regenerate.
9279
9280 2010-06-20 Ian Lance Taylor <iant@google.com>
9281 Pedro Alves <pedro@codesourcery.com>
9282
9283 * linux-x86-low.c (always_true): Delete.
9284 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9285 trying to fool the compiler with always_true.
9286
9287 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9288
9289 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9290 conditions in gdbserver.
9291
9292 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9293
9294 * spu-low.c (spu_read_memory): Wrap around local store limit.
9295 (spu_write_memory): Likewise.
9296
9297 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9298
9299 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9300 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9301 LONGEST uses.
9302 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9303 uses.
9304 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9305 uses with LONGEST uses.
9306
9307 2010-06-14 Stan Shebs <stan@codesourcery.com>
9308 Pedro Alves <pedro@codesourcery.com>
9309
9310 Bytecode compiler.
9311
9312 * linux-x86-low.c: Include limits.h.
9313 (add_insns): New.
9314 (always_true): New.
9315 (EMIT_ASM): New.
9316 (EMIT_ASM32): New.
9317 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9318 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9319 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9320 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9321 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9322 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9323 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9324 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9325 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9326 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9327 (amd64_emit_void_call_2): New.
9328 (amd64_emit_ops): New.
9329 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9330 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9331 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9332 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9333 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9334 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9335 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9336 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9337 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9338 (i386_emit_stack_adjust, i386_emit_int_call_1)
9339 (i386_emit_void_call_2): New.
9340 (i386_emit_ops): New.
9341 (x86_emit_ops): New.
9342 (the_low_target): Install x86_emit_ops.
9343 * server.h (struct emit_ops): New.
9344 (get_raw_reg_func_addr): Declare.
9345 (current_insn_ptr, emit_error): Declare.
9346 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9347 (set_trace_state_variable_value): New defines.
9348 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9349 addr_get_trace_state_variable_value and
9350 addr_set_trace_state_variable_value.
9351 (symbol_list): New fields for get_raw_reg,
9352 get_trace_state_variable_value and set_trace_state_variable_value.
9353 (condfn): New typedef.
9354 (struct tracepoint): New field `compiled_cond'.
9355 (do_action_at_tracepoint): Clear compiled_cond.
9356 (get_trace_state_variable_value, set_trace_state_variable_value):
9357 Export in the IPA.
9358 (condition_true_at_tracepoint): If there's a compiled condition,
9359 run that.
9360 (current_insn_ptr, emit_error): New globals.
9361 (struct bytecode_address): New.
9362 (get_raw_reg_func_addr): New.
9363 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9364 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9365 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9366 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9367 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9368 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9369 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9370 (compile_tracepoint_condition, compile_bytecodes): New.
9371 * target.h (emit_ops): Forward declare.
9372 (struct target_ops): New field emit_ops.
9373 (target_emit_ops): New.
9374 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9375 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9376 * linux-low.c (linux_emit_ops): New.
9377 (linux_target_ops): Install it.
9378 * linux-low.h (struct linux_target_ops): New field emit_ops.
9379
9380 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9381
9382 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9383 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9384
9385 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9386 Stan Shebs <stan@codesourcery.com>
9387
9388 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9389 (all): Depend on $(extra_libraries).
9390 (install-only): Install the IPA.
9391 (IPA_OBJS, IPA_LIB): New.
9392 (clean): Remove the IPA lib.
9393 (IPAGENT_CFLAGS): New.
9394 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9395 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9396 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9397 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9398 * configure.ac: Check for atomic builtins support in the compiler.
9399 (IPA_DEPFILES, extra_libraries): Define.
9400 * configure.srv (ipa_obj): Add description.
9401 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9402 (i[34567]86-*-linux*): Set ipa_obj.
9403 (x86_64-*-linux*): Set ipa_obj.
9404 * linux-low.c (stabilizing_threads): New.
9405 (supports_fast_tracepoints): New.
9406 (linux_detach): Stabilize threads before detaching.
9407 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9408 the lwp is either not stabilizing, or is moving out of a jump pad.
9409 (linux_fast_tracepoint_collecting): New.
9410 (maybe_move_out_of_jump_pad): New.
9411 (enqueue_one_deferred_signal): New.
9412 (dequeue_one_deferred_signal): New.
9413 (linux_wait_for_event_1): If moving out of a jump pad, defer
9414 pending signals to later.
9415 (linux_stabilize_threads): New.
9416 (linux_wait_1): Check if threads need moving out of jump pads, and
9417 do it if so.
9418 (stuck_in_jump_pad_callback): New.
9419 (move_out_of_jump_pad_callback): New.
9420 (lwp_running): New.
9421 (linux_resume_one_lwp): Handle moving out of jump pads.
9422 (linux_set_resume_request): Dequeue deferred signals.
9423 (need_step_over_p): Also step over fast tracepoint jumps.
9424 (start_step_over): Also uninsert fast tracepoint jumps.
9425 (finish_step_over): Also reinsert fast tracepoint jumps.
9426 (linux_install_fast_tracepoint_jump): New.
9427 (linux_target_ops): Install linux_stabilize_threads and
9428 linux_install_fast_tracepoint_jump_pad.
9429 * linux-low.h (linux_target_ops) <get_thread_area,
9430 install_fast_tracepoint_jump_pad>: New fields.
9431 (struct lwp_info) <collecting_fast_tracepoint,
9432 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9433 (linux_get_thread_area): Declare.
9434 * linux-x86-low.c (jump_insn): New.
9435 (x86_get_thread_area): New.
9436 (append_insns): New.
9437 (push_opcode): New.
9438 (amd64_install_fast_tracepoint_jump_pad): New.
9439 (i386_install_fast_tracepoint_jump_pad): New.
9440 (x86_install_fast_tracepoint_jump_pad): New.
9441 (the_low_target): Install x86_get_thread_area and
9442 x86_install_fast_tracepoint_jump_pad.
9443 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9444 (struct fast_tracepoint_jump): New.
9445 (fast_tracepoint_jump_insn): New.
9446 (fast_tracepoint_jump_shadow): New.
9447 (find_fast_tracepoint_jump_at): New.
9448 (fast_tracepoint_jump_here): New.
9449 (delete_fast_tracepoint_jump): New.
9450 (set_fast_tracepoint_jump): New.
9451 (uninsert_fast_tracepoint_jumps_at): New.
9452 (reinsert_fast_tracepoint_jumps_at): New.
9453 (set_breakpoint_at): Use write_inferior_memory.
9454 (uninsert_raw_breakpoint): Use write_inferior_memory.
9455 (check_mem_read): Mask out fast tracepoint jumps.
9456 (check_mem_write): Mask out fast tracepoint jumps.
9457 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9458 (set_fast_tracepoint_jump): Declare.
9459 (delete_fast_tracepoint_jump)
9460 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9461 (reinsert_fast_tracepoint_jumps_at): Declare.
9462 * regcache.c: Don't compile many functions when building the
9463 in-process agent library.
9464 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9465 the register buffer in the heap.
9466 (free_register_cache): If the register buffer isn't owned by the
9467 regcache, don't free it.
9468 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9469 pre-existing register caches.
9470 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9471 type.
9472 (convert_ascii_to_int): : Constify `from' parameter type.
9473 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9474 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9475 the needed buffer in-place.
9476 (relocate_instruction): New.
9477 * server.c (handle_query) <qSymbols>: If the target supports
9478 tracepoints, give it a chance of looking up symbols. Report
9479 support for fast tracepoints.
9480 (handle_status): Stabilize threads.
9481 (process_serial_event): Adjust.
9482 * server.h (struct fast_tracepoint_jump): Forward declare.
9483 (struct process_info) <fast_tracepoint_jumps>: New field.
9484 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9485 (decode_X_packet, decode_M_packet): Adjust.
9486 (relocate_instruction): Declare.
9487 (in_process_agent_loaded): Declare.
9488 (tracepoint_look_up_symbols): Declare.
9489 (struct fast_tpoint_collect_status): Declare.
9490 (fast_tracepoint_collecting): Declare.
9491 (force_unlock_trace_buffer): Declare.
9492 (handle_tracepoint_bkpts): Declare.
9493 (initialize_low_tracepoint)
9494 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9495 * target.h (struct target_ops) <stabilize_threads,
9496 install_fast_tracepoint_jump_pad>: New fields.
9497 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9498 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9499 [HAVE_STDINT_H]: Include stdint.h.
9500 (trace_debug_1): Rename to ...
9501 (trace_vdebug): ... this.
9502 (trace_debug): Rename to ...
9503 (trace_debug_1): ... this. Add `level' parameter.
9504 (trace_debug): New.
9505 (ATTR_USED, ATTR_NOINLINE): New.
9506 (IP_AGENT_EXPORT): New.
9507 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9508 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9509 (about_to_request_buffer_space, trace_buffer_is_full)
9510 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9511 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9512 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9513 (traceframe_write_count, traceframes_created)
9514 (trace_state_variables)
9515 New renaming defines.
9516 (struct ipa_sym_addresses): New.
9517 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9518 (symbol_list): New.
9519 (ipa_sym_addrs): New.
9520 (all_tracepoint_symbols_looked_up): New.
9521 (in_process_agent_loaded): New.
9522 (write_e_ipa_not_loaded): New.
9523 (maybe_write_ipa_not_loaded): New.
9524 (tracepoint_look_up_symbols): New.
9525 (debug_threads) [IN_PROCESS_AGENT]: New.
9526 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9527 (UNKNOWN_SIDE_EFFECTS): New.
9528 (stop_tracing): New.
9529 (flush_trace_buffer): New.
9530 (stop_tracing_bkpt): New.
9531 (flush_trace_buffer_bkpt): New.
9532 (read_inferior_integer): New.
9533 (read_inferior_uinteger): New.
9534 (read_inferior_data_pointer): New.
9535 (write_inferior_data_pointer): New.
9536 (write_inferior_integer): New.
9537 (write_inferior_uinteger): New.
9538 (struct collect_static_trace_data_action): Delete.
9539 (enum tracepoint_type): New.
9540 (struct tracepoint) <type>: New field `type'.
9541 <actions_str, step_actions, step_actions_str>: Only include in
9542 GDBserver.
9543 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9544 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9545 (tracepoints): Use IP_AGENT_EXPORT.
9546 (last_tracepoint): Don't include in the IPA.
9547 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9548 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9549 (alloced_trace_state_variables): New.
9550 (trace_state_variables): Use IP_AGENT_EXPORT.
9551 (traceframe_t): Delete unused variable.
9552 (circular_trace_buffer): Don't include in the IPA.
9553 (trace_buffer_start): Delete.
9554 (struct trace_buffer_control): New.
9555 (trace_buffer_free): Delete.
9556 (struct ipa_trace_buffer_control): New.
9557 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9558 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9559 New.
9560 (trace_buffer_ctrl): New.
9561 (TRACE_BUFFER_CTRL_CURR): New.
9562 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9563 Reimplement as macros.
9564 (trace_buffer_wrap): Delete.
9565 (traceframe_write_count, traceframe_read_count)
9566 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9567 (struct tracepoint_hit_ctx) <type>: New field.
9568 (struct fast_tracepoint_ctx): New.
9569 (memory_barrier): New.
9570 (cmpxchg): New.
9571 (record_tracepoint_error): Update atomically in the IPA.
9572 (clear_inferior_trace_buffer): New.
9573 (about_to_request_buffer_space): New.
9574 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9575 updating the same buffer.
9576 (add_tracepoint): Default the tracepoint's type to trap
9577 tracepoint, and orig_size to -1.
9578 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9579 internal variables.
9580 (create_trace_state_variable): New parameter `gdb'. Handle it.
9581 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9582 (cmd_qtdp): Handle fast tracepoints.
9583 (cmd_qtdv): Adjust.
9584 (max_jump_pad_size): New.
9585 (gdb_jump_pad_head): New.
9586 (get_jump_space_head): New.
9587 (claim_jump_space): New.
9588 (sort_tracepoints): New.
9589 (MAX_JUMP_SIZE): New.
9590 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9591 IPA.
9592 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9593 support. Upload fast traceframes, and delete internal IPA
9594 breakpoints.
9595 (stop_tracing_handler): New.
9596 (flush_trace_buffer_handler): New.
9597 (cmd_qtstop): Upload fast tracepoints.
9598 (response_tracepoint): Handle fast tracepoints.
9599 (tracepoint_finished_step): Upload fast traceframes. Set the
9600 tracepoint hit context's tracepoint type.
9601 (handle_tracepoint_bkpts): New.
9602 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9603 type. Add comment about fast tracepoints.
9604 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9605 non-existing action_str field.
9606 (get_context_regcache): Handle fast tracepoints.
9607 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9608 to the regcache.
9609 (fast_tracepoint_from_jump_pad_address): New.
9610 (fast_tracepoint_from_ipa_tpoint_address): New.
9611 (collecting_t): New.
9612 (force_unlock_trace_buffer): New.
9613 (fast_tracepoint_collecting): New.
9614 (collecting): New.
9615 (gdb_collect): New.
9616 (write_inferior_data_ptr): New.
9617 (target_tp_heap): New.
9618 (target_malloc): New.
9619 (download_agent_expr): New.
9620 (UALIGN): New.
9621 (download_tracepoints): New.
9622 (download_trace_state_variables): New.
9623 (upload_fast_traceframes): New.
9624 (IPA_FIRST_TRACEFRAME): New.
9625 (IPA_NEXT_TRACEFRAME_1): New.
9626 (IPA_NEXT_TRACEFRAME): New.
9627 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9628 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9629 (gdb_jump_pad_buffer_end): New.
9630 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9631 (initialize_tracepoint): Adjust.
9632 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9633 buffer. Initialize the low module.
9634 * utils.c (PREFIX, TOOLNAME): New.
9635 (malloc_failure): Use PREFIX.
9636 (error): In the IPA, an error causes an exit.
9637 (fatal, warning): Use PREFIX.
9638 (internal_error): Use TOOLNAME.
9639 (NUMCELLS): Increase to 10.
9640 * configure, config.in: Regenerate.
9641
9642 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9643
9644 * server.c (handle_query) <qSupported>: Do two passes over the
9645 qSupported string to avoid nesting strtok.
9646
9647 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9648
9649 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9650 (CDEPS): New.
9651 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9652 -Wl,--dynamic-list.
9653 * configure: Regenerate.
9654 * proc-service.list: New.
9655
9656 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9657
9658 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9659 New comment.
9660
9661 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9662
9663 * gdbreplay.c (remote_open): Check error return from socket() call by
9664 its equality to -1 not by it being negative.
9665 * remote-utils.c (remote_open): Likewise.
9666
9667 2010-05-23 Pedro Alves <pedro@codesourcery.com>
9668
9669 * config.h: Regenerate.
9670
9671 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9672
9673 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9674 doesn't provide PTRACE_GET_THREAD_AREA.
9675
9676 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9677
9678 * linux-m68k-low.c: Include <asm/ptrace.h>
9679 (ps_get_thread_area): Implement.
9680
9681 2010-05-03 Doug Evans <dje@google.com>
9682
9683 * event-loop.c (struct callback_event): New struct.
9684 (callback_list): New global.
9685 (append_callback_event, delete_callback_event): New functions.
9686 (process_callback): New function.
9687 (start_event_loop): Call it.
9688 * remote-utils.c (NOT_SCHEDULED): Define.
9689 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9690 moved out of readchar.
9691 (readchar): Rewrite. Call reschedule before returning.
9692 (reset_readchar): New function.
9693 (remote_close): Call it.
9694 (process_remaining, reschedule): New functions.
9695 * server.h (callback_handler_func): New typedef.
9696 (append_callback_event, delete_callback_event): Declare.
9697
9698 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9699
9700 * proc-service.c (ps_pglobal_lookup): Use
9701 thread_db_look_up_one_symbol.
9702 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9703 parameter. Use it instead of all_symbols_looked_up.
9704 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9705 field.
9706 (all_symbols_looked_up): Don't declare.
9707 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9708 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9709 field.
9710 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9711 Set all_symbols_looked_up here.
9712 (thread_db_look_up_one_symbol): New.
9713 (thread_db_get_tls_address): Adjust.
9714 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9715 thread_db object on the heap, and tentatively set it in the
9716 process structure.
9717 (thread_db_init): Don't set all_symbols_looked_up here.
9718 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9719
9720 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9721
9722 * linux-low.c (linux_kill, linux_detach): Adjust.
9723 (status_pending_p_callback): Remove redundant statement. Check
9724 for !TARGET_WAITIKIND_IGNORE, instead of
9725 TARGET_WAITKIND_STOPPED.
9726 (handle_tracepoints): Make sure LWP is locked. Adjust.
9727 (linux_wait_for_event_1): Adjust.
9728 (linux_cancel_breakpoints): New.
9729 (unsuspend_one_lwp): New.
9730 (unsuspend_all_lwps): New.
9731 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9732 (send_sigstop_callback): Change return type to int, add new
9733 `except' parameter and handle it.
9734 (suspend_and_send_sigstop_callback): New.
9735 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9736 pass them down. If SUSPEND, also increment the lwp's suspend
9737 count.
9738 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9739 (need_step_over_p): Don't consider suspended LWPs.
9740 (start_step_over): Adjust.
9741 (proceed_one_lwp): Change return type to int, add new `except'
9742 parameter and handle it.
9743 (unsuspend_and_proceed_one_lwp): New.
9744 (proceed_all_lwps): Use find_inferior instead of
9745 for_each_inferior.
9746 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9747 also decrement the suspend count of LWPs. Pass `except' down,
9748 instead of hacking its suspend count.
9749 (linux_pause_all): Add `freeze' parameter. Adjust.
9750 (linux_unpause_all): New.
9751 (linux_target_ops): Install linux_unpause_all.
9752 * server.c (handle_status): Adjust.
9753 * target.h (struct target_ops): New fields `unpause_all' and
9754 `cancel_breakpoints'. Add new parameter to `pause_all'.
9755 (pause_all): Add new `freeze' parameter.
9756 (unpause_all): New.
9757 (cancel_breakpoints): New.
9758 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9759 cancel breakpoints.
9760 (cmd_qtstart): Pause threads.
9761 (stop_tracing): Pause threads, and cancel breakpoints.
9762 * win32-low.c (win32_target_ops): Adjust.
9763
9764 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9765
9766 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9767 the inferior right away from here...
9768 (linux_wait_1): ... to here, and adjust to check the thread's
9769 last_resume_kind instead of the lwp's step or stop_expected flags.
9770
9771 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9772
9773 * README: Use consistent `GDB' and `GDBserver' spellings.
9774
9775 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9776
9777 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9778 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9779 (linux_detach_one_lwp): Assume the lwp is stopped.
9780 (any_thread_of): Delete.
9781 (linux_detach): Stop all lwps here. Don't blindly delete all
9782 breakpoints.
9783 (delete_lwp_callback): New.
9784 (linux_mourn): Delete all lwps of the process that is gone.
9785 (linux_wait_1): Don't delete the last lwp of the process here.
9786 * mem-break.h (mark_breakpoints_out): Declare.
9787 * mem-break.c (mark_breakpoints_out): New.
9788 (free_all_breakpoints): Use it.
9789 * server.c (handle_target_event): If the process is gone, mark
9790 breakpoints out.
9791 * thread-db.c (struct thread_db) <create_bp>: New field.
9792 (thread_db_enable_reporting): Fix prototype. Store a thread event
9793 breakpoint reference in the thread_db struct.
9794 (thread_db_load_search): Clear the thread_db object.
9795 (try_thread_db_load_1): Ditto.
9796 (switch_to_process): New.
9797 (disable_thread_event_reporting): Use it.
9798 (remove_thread_event_breakpoints): New.
9799 (thread_db_detach, thread_db_mourn): Use it.
9800
9801 2010-05-01 Pedro Alves <pedro@codesourcery.com>
9802
9803 * linux-low.c (linux_enable_event_reporting): New.
9804 (linux_wait_for_event_1, handle_extended_wait): Use it.
9805
9806 2010-04-30 Pedro Alves <pedro@codesourcery.com>
9807
9808 * linux-low.c (linux_kill_one_lwp, linux_kill)
9809 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9810 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9811 SIGSTOP even if the LWP is stopped.
9812 (send_sigstop_callback): New.
9813 (stop_all_lwps): Use send_sigstop_callback instead.
9814 (linux_resume_one_thread): Adjust.
9815 (proceed_one_lwp): Still proceed an LWP that the client has
9816 requested to stop, if we haven't reported it as stopped yet. Make
9817 sure that LWPs the client want stopped, have a pending SIGSTOP.
9818
9819 2010-04-26 Doug Evans <dje@google.com>
9820
9821 * server.c (handle_general_set): Make static.
9822
9823 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9824 Print received char after testing for error/eof instead of before.
9825 (input_interrupt): Tweak comment.
9826
9827 2010-04-23 Doug Evans <dje@google.com>
9828
9829 * server.c (start_inferior): Print inferior argv if --debug.
9830
9831 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9832
9833 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9834 * nto-x86-low.c: Include server.h
9835
9836 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9837
9838 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9839 be consistent with other sources of this directory.
9840 (init_registers_amd64): Correct name of source file of this function
9841 in the comment.
9842
9843 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9844
9845 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9846 64-bit executables.
9847
9848 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9849
9850 * win32-i386-low.c: Add 64-bit support.
9851 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9852 (init_registers_amd64): Declare.
9853 (mappings): Add 64-bit version of array.
9854 (init_windows_x86): New function.
9855 (the_low_target): Change init_arch field to init_windows_x86.
9856
9857 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9858
9859 * win32-low.c: Adapt to support also 64-bit architecture.
9860 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9861 (get_image_name): Use SIZE_T type for local variable `done'.
9862 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9863 (toolhelp_get_dll_name): Idem.
9864 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9865 Use uintptr_t typecast to avoid warning.
9866 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9867 (handle_exception): Use phex_nz to avoid warning.
9868 (win32_wait): Remove unused local variable `process'.
9869
9870 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9871
9872 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9873 `amd64-avx.o'.
9874
9875 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9876
9877 * configure.ac: Use `ws2_32' library for srv_mingw.
9878 * configure: Regenerate.
9879 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9880 * remote-utils.c: Likewise.
9881
9882 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9883
9884 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9885 if __x86_64__ is defined.
9886
9887 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9888
9889 * configure: Regenerate.
9890
9891 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9892
9893 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9894 * target.h (target_ops): New get_tib_address field.
9895 * win32-low.h (win32_thread_info): Add thread_local_base field.
9896 * win32-low.c (child_add_thread): Add tlb argument.
9897 Set thread_local_base field to TLB.
9898 (get_child_debug_event): Adapt to child_add_thread change.
9899 (win32_get_tib_address): New function.
9900 (win32_target_ops): Set get_tib_address field to
9901 win32_get_tib_address.
9902 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9903
9904 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9905
9906 * linux-low.c (linux_mourn): Also remove the process.
9907 * server.c (handle_target_event): Don't remove the process here.
9908 * nto-low.c (nto_mourn): New.
9909 (nto_target_ops): Install it.
9910 * spu-low.c (spu_mourn): New.
9911 (spu_target_ops): Install it.
9912 * win32-low.c (win32_mourn): New.
9913 (win32_target_ops): Install it.
9914
9915 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9916
9917 * server.h (buffer_xml_printf): Remove redundant `;'.
9918
9919 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9920
9921 * regcache.c (set_register_cache): Invalidate regcaches before
9922 changing the register cache layout.
9923 (regcache_invalidate_one): Allow a NULL regcache.
9924 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9925 regcaches before changing the register cache layout or the target
9926 regsets.
9927
9928 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9929
9930 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9931 variable warning on Linux/x86-64.
9932
9933 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9934
9935 GDBserver disconnected tracing support.
9936
9937 * linux-low.c (linux_remove_process): Delete.
9938 (add_lwp): Don't set last_resume_kind here.
9939 (linux_kill): Use `mourn'.
9940 (linux_detach): Use `thread_db_detach', and `mourn'.
9941 (linux_mourn): New.
9942 (linux_attach_lwp_1): Adjust comment.
9943 (linux_attach): last_resume_kind moved the thread_info; adjust.
9944 (status_pending_p_callback): Adjust.
9945 (linux_wait_for_event_1): Adjust.
9946 (count_events_callback, select_singlestep_lwp_callback)
9947 (select_event_lwp_callback, cancel_breakpoints_callback)
9948 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9949 (proceed_one_lwp): Adjust.
9950 (linux_async): Add debug output.
9951 (linux_thread_stopped): New.
9952 (linux_pause_all): New.
9953 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9954 linux_pause_all.
9955 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9956 (thread_db_free): Delete declaration.
9957 (thread_db_detach, thread_db_mourn): Declare.
9958 * thread-db.c (thread_db_init): Use thread_db_mourn.
9959 (thread_db_free): Delete, split in two.
9960 (disable_thread_event_reporting): New.
9961 (thread_db_detach): New.
9962 (thread_db_mourn): New.
9963
9964 * server.h (struct thread_info) <last_resume_kind>: New field.
9965 <attached>: Add comment.
9966 <gdb_detached>: New field.
9967 (handler_func): Change return type to int.
9968 (handle_serial_event, handle_target_event): Ditto.
9969 (gdb_connected): Declare.
9970 (tracing): Delete.
9971 (disconnected_tracing): Declare.
9972 (stop_tracing): Declare.
9973
9974 * server.c (handle_query) <qSupported>: Report support for
9975 disconnected tracing.
9976 (queue_stop_reply_callback): Account for running threads.
9977 (gdb_wants_thread_stopped): New.
9978 (gdb_wants_all_threads_stopped): New.
9979 (gdb_reattached_process): New.
9980 (handle_status): Clear the `gdb_detached' flag of all processes.
9981 In all-stop, stop all threads.
9982 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9983 (process_serial_event): If the remote connection breaks, or if an
9984 exit was forced with "monitor exit", force an event loop exit.
9985 Handle disconnected tracing on detach.
9986 (handle_serial_event): Adjust.
9987 (handle_target_event): If GDB isn't connected, forward events back
9988 to the inferior, unless the last process exited, in which case,
9989 exit gdbserver. Adjust interface.
9990
9991 * remote-utils.c (remote_open): Don't block in accept. Instead
9992 register an event loop source on the listen socket file
9993 descriptor. Refactor bits into ...
9994 (listen_desc): ... this new global.
9995 (gdb_connected): ... this new function.
9996 (enable_async_notification): ... this new function.
9997 (handle_accept_event): ... this new function.
9998 (remote_close): Clear remote_desc.
9999
10000 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10001
10002 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10003 New fields.
10004 (mourn_inferior): Define.
10005 (target_process_qsupported): Avoid the dangling else problem.
10006 (thread_stopped): Define.
10007 (pause_all): Define.
10008 (target_waitstatus_to_string): Declare.
10009 * target.c (target_waitstatus_to_string): New.
10010
10011 * tracepoint.c (tracing): Make extern.
10012 (disconnected_tracing): New.
10013 (stop_tracing): Make extern. Handle tracing stops due to GDB
10014 disconnecting.
10015 (cmd_qtdisconnected): New.
10016 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10017 (handle_tracepoint_general_set): Handle QTDisconnected.
10018
10019 * event-loop.c (event_handler_func): Change return type to int.
10020 (process_event): Bail out if the event handler wants the event
10021 loop to stop.
10022 (handle_file_event): Ditto.
10023 (start_event_loop): Bail out if the event handler wants the event
10024 loop to stop.
10025
10026 * nto-low.c (nto_target_ops): Adjust.
10027 * spu-low.c (spu_wait): Don't remove the process here.
10028 (spu_target_ops): Adjust.
10029 * win32-low.c (win32_wait): Don't remove the process here.
10030 (win32_target_ops): Adjust.
10031
10032 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10033
10034 * regcache.c (realloc_register_cache): Invalidate inferior's
10035 regcache before recreating it.
10036
10037 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10038
10039 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10040
10041 2010-04-09 Stan Shebs <stan@codesourcery.com>
10042 Pedro Alves <pedro@codesourcery.com>
10043
10044 * server.h (LONGEST): New.
10045 (struct thread_info) <while_stepping>: New field.
10046 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10047 Declare.
10048 (initialize_tracepoint, handle_tracepoint_general_set)
10049 (handle_tracepoint_query, tracepoint_finished_step)
10050 (tracepoint_was_hit, release_while_stepping_state_list):
10051 (current_traceframe): Declare.
10052 * server.c (handle_general_set): Handle tracepoint packets.
10053 (read_memory): New.
10054 (write_memory): New.
10055 (handle_search_memory_1): Use read_memory.
10056 (handle_query): Report support for conditional tracepoints, trace
10057 state variables, and tracepoint sources. Handle tracepoint
10058 queries.
10059 (main): Initialize the tracepoints module.
10060 (process_serial_event): Handle traceframe reads/writes.
10061
10062 * linux-low.c (handle_tracepoints): New.
10063 (linux_wait_1): Call it.
10064 (linux_resume_one_lwp): Handle while-stepping.
10065 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10066 (linux_target_ops): Install them.
10067 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10068 New field.
10069 * linux-x86-low.c (x86_supports_tracepoints): New.
10070 (the_low_target). Install it.
10071
10072 * mem-break.h (delete_breakpoint): Declare.
10073 * mem-break.c (delete_breakpoint): Make external.
10074
10075 * target.h (struct target_ops): Add `supports_tracepoints',
10076 `read_pc', and `write_pc' fields.
10077 (target_supports_tracepoints): Define.
10078 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10079 (phex_nz): New.
10080
10081 * regcache.h (struct regcache) <registers_owned>: New field.
10082 (init_register_cache, regcache_cpy): Declare.
10083 (regcache_read_pc, regcache_write_pc): Declare.
10084 (register_cache_size): Declare.
10085 (supply_regblock): Declare.
10086 * regcache.c (init_register_cache): New.
10087 (new_register_cache): Use it.
10088 (regcache_cpy): New.
10089 (register_cache_size): New.
10090 (supply_regblock): New.
10091 (regcache_read_pc, regcache_write_pc): New.
10092
10093 * tracepoint.c: New.
10094
10095 * Makefile.in (OBS): Add tracepoint.o.
10096 (tracepoint.o): New rule.
10097
10098 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10099
10100 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10101 (i386-mmx.o): New.
10102 (i386-mmx.c): Likewise.
10103 (i386-mmx-linux.o): Likewise.
10104 (i386-mmx-linux.c): Likewise.
10105
10106 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10107 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10108 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10109 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10110
10111 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10112 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10113 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10114
10115 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10116
10117 * Makefile.in (clean): Updated.
10118 (i386-avx.o): New.
10119 (i386-avx.c): Likewise.
10120 (i386-avx-linux.o): Likewise.
10121 (i386-avx-linux.c): Likewise.
10122 (amd64-avx.o): Likewise.
10123 (amd64-avx.c): Likewise.
10124 (amd64-avx-linux.o): Likewise.
10125 (amd64-avx-linux.c): Likewise.
10126
10127 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10128 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10129 (srv_amd64_regobj): Add amd64-avx.o.
10130 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10131 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10132 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10133 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10134 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10135 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10136 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10137
10138 * i387-fp.c: Include "i386-xstate.h".
10139 (i387_xsave): New.
10140 (i387_cache_to_xsave): Likewise.
10141 (i387_xsave_to_cache): Likewise.
10142 (x86_xcr0): Likewise.
10143
10144 * i387-fp.h (i387_cache_to_xsave): Likewise.
10145 (i387_xsave_to_cache): Likewise.
10146 (x86_xcr0): Likewise.
10147
10148 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10149 * linux-crisv32-low.c (target_regsets): Likewise.
10150 * linux-m68k-low.c (target_regsets): Likewise.
10151 * linux-mips-low.c (target_regsets): Likewise.
10152 * linux-ppc-low.c (target_regsets): Likewise.
10153 * linux-s390-low.c (target_regsets): Likewise.
10154 * linux-sh-low.c (target_regsets): Likewise.
10155 * linux-sparc-low.c (target_regsets): Likewise.
10156 * linux-xtensa-low.c (target_regsets): Likewise.
10157
10158 * linux-low.c: Include <sys/uio.h>.
10159 (regsets_fetch_inferior_registers): Support nt_type.
10160 (regsets_store_inferior_registers): Likewise.
10161 (linux_process_qsupported): New.
10162 (linux_target_ops): Add linux_process_qsupported.
10163
10164 * linux-low.h (regset_info): Add nt_type.
10165 (linux_target_ops): Add process_qsupported.
10166
10167 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10168 and <sys/uio.h>.
10169 (init_registers_i386_avx_linux): New.
10170 (init_registers_amd64_avx_linux): Likewise.
10171 (xmltarget_i386_linux_no_xml): Likewise.
10172 (xmltarget_amd64_linux_no_xml): Likewise.
10173 (PTRACE_GETREGSET): Likewise.
10174 (PTRACE_SETREGSET): Likewise.
10175 (x86_fill_xstateregset): Likewise.
10176 (x86_store_xstateregset): Likewise.
10177 (use_xml): Likewise.
10178 (x86_linux_update_xmltarget): Likewise.
10179 (x86_linux_process_qsupported): Likewise.
10180 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10181 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10182 init_registers_i386_linux here. Call
10183 x86_linux_update_xmltarget.
10184 (the_low_target): Add x86_linux_process_qsupported.
10185
10186 * server.c (handle_query): Call target_process_qsupported.
10187
10188 * target.h (target_ops): Add process_qsupported.
10189 (target_process_qsupported): New.
10190
10191 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10192
10193 * inferiors.c (add_thread): Set last_status kind to
10194 TARGET_WAITKIND_IGNORE.
10195 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10196 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10197 (linux_wait_1): Move `thread' local definition to block that uses
10198 it. Don't NULL initialize `event_child'.
10199 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10200 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10201 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10202
10203 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10204
10205 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10206 an extended waitstatus, or by a watchpoint.
10207 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10208 thread was stepping or has been stopped by a watchpoint.
10209
10210 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10211
10212 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10213 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10214 of another, then delete the previous, and validate all
10215 breakpoints.
10216 (validate_inserted_breakpoint): New.
10217 (delete_disabled_breakpoints): New.
10218 (validate_breakpoints): New.
10219 (check_mem_read): Validate breakpoints before trusting their
10220 shadow. Delete disabled breakpoints.
10221 (check_mem_write): Validate breakpoints before trusting they
10222 should be inserted. Delete disabled breakpoints.
10223 * mem-break.h (validate_breakpoints):
10224 * server.c (handle_query): Validate breakpoints when we see a
10225 qSymbol query.
10226
10227 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10228
10229 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10230 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10231 if we could tell there's a GDB breakpoint at stop_pc.
10232 (need_step_over_p): Don't do a step over if we find a GDB
10233 breakpoint at the resume PC.
10234
10235 * mem-break.c (struct raw_breakpoint): New.
10236 (enum bkpt_type): New type `gdb_breakpoint'.
10237 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10238 fields. New field `raw'.
10239 (find_raw_breakpoint_at): New.
10240 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10241 breakpoint instead.
10242 (set_breakpoint_at): Adjust.
10243 (delete_raw_breakpoint): New.
10244 (release_breakpoint): New.
10245 (delete_breakpoint): Rename to...
10246 (delete_breakpoint_1): ... this. Add proc parameter. Use
10247 release_breakpoint. Return ENOENT.
10248 (delete_breakpoint): Reimplement.
10249 (find_breakpoint_at): Delete.
10250 (find_gdb_breakpoint_at): New.
10251 (delete_breakpoint_at): Delete.
10252 (set_gdb_breakpoint_at): New.
10253 (delete_gdb_breakpoint_at): New.
10254 (gdb_breakpoint_here): New.
10255 (set_reinsert_breakpoint): Use release_breakpoint.
10256 (uninsert_breakpoint): Rename to ...
10257 (uninsert_raw_breakpoint): ... this.
10258 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10259 (reinsert_raw_breakpoint): Change parameter type to
10260 raw_breakpoint.
10261 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10262 instead.
10263 (check_breakpoints): Adjust. Use release_breakpoint.
10264 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10265 (breakpoint_inserted_here): Ditto.
10266 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10267 Don't trust the breakpoint's shadow if it is not inserted.
10268 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10269 (delete_all_breakpoints): Adjust.
10270 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10271 use delete_breakpoint_1.
10272
10273 * mem-break.h (breakpoints_supported): Delete declaration.
10274 (set_gdb_breakpoint_at): Declare.
10275 (gdb_breakpoint_here): Declare.
10276 (delete_breakpoint_at): Delete.
10277 (delete_gdb_breakpoint_at): Declare.
10278
10279 * server.h (struct raw_breakpoint): Forward declare.
10280 (struct process_info): New field `raw_breakpoints'.
10281
10282 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10283 breakpoints.
10284
10285 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10286
10287 * linux-low.c (status_pending_p_callback): Fix comment.
10288 (linux_wait_for_event_1): Move most of the internal breakpoint
10289 handling from here...
10290 (linux_wait_1): ... to here.
10291 (count_events_callback): New.
10292 (select_singlestep_lwp_callback): New.
10293 (select_event_lwp_callback): New.
10294 (cancel_breakpoints_callback): New.
10295 (select_event_lwp): New.
10296 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10297 priority to all LWPs that have had events that should be reported
10298 to the client. Cancel breakpoints when about to reporting the
10299 event to the client, not while stopping lwps. No longer cancel
10300 finished single-steps here.
10301 (cancel_finished_single_step): Delete.
10302 (cancel_finished_single_steps): Delete.
10303
10304 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10305
10306 * mem-break.c (enum bkpt_type): New.
10307 (struct breakpoint): New field `type'.
10308 (set_breakpoint_at): Change return type to struct breakpoint
10309 pointer. Set type to `other_breakpoint' by default.
10310 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10311 in the breakpoint list.
10312 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10313 (reinsert_breakpoint): Rename to ...
10314 (reinsert_raw_breakpoint): ... this.
10315 (reinsert_breakpoints_at): Adjust.
10316 * mem-break.h (struct breakpoint): Declare.
10317 (set_breakpoint_at): Change return type to struct breakpoint
10318 pointer.
10319
10320 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10321
10322 * server.c (handle_query): Assign, not compare.
10323
10324 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10325
10326 Teach linux gdbserver to step-over-breakpoints.
10327
10328 * linux-low.c (can_hardware_single_step): New.
10329 (supports_breakpoints): New.
10330 (handle_extended_wait): If stopping threads, read the stop pc of
10331 the new cloned LWP.
10332 (get_pc): New.
10333 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10334 low target doesn't support retrieving the PC.
10335 (add_lwp): Set last_resume_kind to resume_continue.
10336 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10337 (linux_attach): Don't clear stop_expected. Set the lwp's
10338 last_resume_kind to resume_stop.
10339 (linux_detach_one_lwp): Don't check for removed breakpoints.
10340 (check_removed_breakpoint): Delete.
10341 (status_pending_p): Rename to ...
10342 (status_pending_p_callback): ... this. Don't check for removed
10343 breakpoints. Don't consider threads that are stopped from GDB's
10344 perspective.
10345 (linux_wait_for_lwp): Always read the stop_pc here.
10346 (cancel_breakpoint): New.
10347 (step_over_bkpt): New global.
10348 (linux_wait_for_event_1): Implement stepping over breakpoints.
10349 (gdb_wants_lwp_stopped): New.
10350 (gdb_wants_all_stopped): New.
10351 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10352 single-step traps here. Store the thread's last reported target
10353 wait status.
10354 (send_sigstop): Don't clear stop_expected. Always set it,
10355 instead.
10356 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10357 (cancel_finished_single_step): New.
10358 (cancel_finished_single_steps): New.
10359 (wait_for_sigstop): Don't cancel finished single-step traps here.
10360 (linux_resume_one_lwp): Don't check for removed breakpoints.
10361 Don't set `step' on non-hardware step archs.
10362 (linux_set_resume_request): Ignore resume_stop requests if already
10363 stopping or stopped. Set the lwp's last_resume_kind.
10364 (resume_status_pending_p): Don't check for removed breakpoints.
10365 (need_step_over_p): New.
10366 (start_step_over): New.
10367 (finish_step_over): New.
10368 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10369 requests. Clear the thread's last reported target waitstatus.
10370 Don't use the `suspended' flag. Don't consider pending breakpoints.
10371 (linux_resume): Start a step-over if necessary.
10372 (proceed_one_lwp): New.
10373 (proceed_all_lwps): New.
10374 (unstop_all_lwps): New.
10375 * linux-low.h (struct lwp_info): Rewrite comment for the
10376 `suspended' flag. Add the `stop_pc' field. Delete the
10377 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10378 Add `'last_resume_kind' and `need_step_over' fields.
10379 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10380 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10381 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10382 (set_raw_breakpoint_at): New.
10383 (set_breakpoint_at): Rewrite to use it.
10384 (reinsert_breakpoint_handler): Delete.
10385 (set_reinsert_breakpoint): New.
10386 (reinsert_breakpoint_by_bp): Delete.
10387 (delete_reinsert_breakpoints): New.
10388 (uninsert_breakpoint): Rewrite.
10389 (uninsert_breakpoints_at): New.
10390 (reinsert_breakpoint): Rewrite.
10391 (reinsert_breakpoints_at): New.
10392 (check_breakpoints): Rewrite.
10393 (breakpoint_here): New.
10394 (breakpoint_inserted_here): New.
10395 (check_mem_read): Adjust.
10396 * mem-break.h (breakpoints_supported, breakpoint_here)
10397 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10398 (reinsert_breakpoint_by_bp): Delete declaration.
10399 (delete_reinsert_breakpoints): Declare.
10400 (reinsert_breakpoint): Delete declaration.
10401 (reinsert_breakpoints_at): Declare.
10402 (uninsert_breakpoint): Delete declaration.
10403 (uninsert_breakpoints_at): Declare.
10404 (check_breakpoints): Adjust prototype.
10405 * server.h: Adjust include order.
10406 (struct thread_info): Declare here. Add a `last_status' field.
10407
10408 2010-03-23 Michael Snyder <msnyder@vmware.com>
10409
10410 * server.c (crc32): New function.
10411 (handle_query): Add handling for 'qCRC:' request.
10412
10413 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10414
10415 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10416 lwp had been stopped by a watchpoint.
10417
10418 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10419
10420 * server.h (internal_error): Declare.
10421 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10422 * utils.c (internal_error): New function.
10423
10424 2010-03-15 Andreas Schwab <schwab@redhat.com>
10425
10426 * configure.srv: Fix typo setting srv_regobj.
10427
10428 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10429
10430 * linux-low.c (fetch_register): Avoid passing a non string literal
10431 format to `error'.
10432 (usr_store_inferior_registers): Ditto.
10433
10434 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10435
10436 * linux-low.c (linux_write_memory): Bail out early if peeking
10437 memory failed.
10438
10439 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10440
10441 * linux-low.h (struct lwp_info): New fields
10442 `stopped_by_watchpoint' and `stopped_data_address'.
10443 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10444 here, and cache them in the lwp object.
10445 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10446 directly.
10447 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10448 field.
10449 (linux_stopped_by_watchpoint): Rewrite.
10450 (linux_stopped_data_address): Rewrite.
10451
10452 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10453
10454 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10455 switching the current inferior, not before.
10456
10457 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10458
10459 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10460 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10461 i386-linux.c and amd64-linux.c.
10462 (reg-i386.o): Removed.
10463 (reg-i386.c): Likewise.
10464 (reg-i386-linux.o): Likewise.
10465 (reg-i386-linux.c): Likewise.
10466 (reg-x86-64.o): Likewise.
10467 (reg-x86-64.c): Likewise.
10468 (reg-x86-64-linux.o): Likewise.
10469 (reg-x86-64-linux.c): Likewise.
10470 (i386.o): New.
10471 (i386.c): Likewise.
10472 (i386-linux.o): Likewise.
10473 (i386-linux.c): Likewise.
10474 (amd64.o): Likewise.
10475 (amd64.c): Likewise.
10476 (amd64-linux.o): Likewise.
10477 (amd64-linux.c): Likewise.
10478
10479 * configure.srv (srv_i386_regobj): New.
10480 (srv_i386_linux_regobj): Likewise.
10481 (srv_amd64_regobj): Likewise.
10482 (srv_amd64_linux_regobj): Likewise.
10483 (srv_i386_32bit_xmlfiles): Likewise.
10484 (srv_i386_64bit_xmlfiles): Likewise.
10485 (srv_i386_xmlfiles): Likewise.
10486 (srv_amd64_xmlfiles): Likewise.
10487 (srv_i386_linux_xmlfiles): Likewise.
10488 (srv_amd64_linux_xmlfiles): Likewise.
10489 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10490 srv_xmlfiles to $srv_i386_xmlfiles.
10491 (i[34567]86-*-mingw32ce*): Likewise.
10492 (i[34567]86-*-mingw*): Likewise.
10493 (i[34567]86-*-nto*): Likewise.
10494 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10495 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10496 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10497 (x86_64-*-linux*): Likewise.
10498
10499 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10500 (init_registers_amd64_linux): New.
10501 (x86_arch_setup): Replace init_registers_x86_64_linux with
10502 init_registers_amd64_linux.
10503
10504 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10505
10506 * configure.ac: Check for libdl. If it is not available link against
10507 static libthread_db.
10508 * configure: Regenerate.
10509
10510 2010-02-22 Pedro Alves <pedro@codesourcery.com>
10511
10512 PR9605
10513
10514 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10515 handing a read watchpoint.
10516 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10517
10518 2010-02-12 Doug Evans <dje@google.com>
10519
10520 * linux-low.c (linux_supports_tracefork_flag): Document.
10521 (linux_look_up_symbols): Add comment.
10522
10523 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10524
10525 * regcache.c (supply_register): Clear regcache if buf is NULL.
10526
10527 2010-02-02 Nicolas Roche <roche@sourceware.org>
10528 Joel Brobecker <brobecker@adacore.com>
10529
10530 * inferiors.c (find_inferior): Add function documentation.
10531 (unloaded_dll): Handle the case where the unloaded dll has not
10532 been previously registered in the dll list.
10533
10534 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10535
10536 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10537 (thumb2_breakpoint): New.
10538 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10539
10540 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10541
10542 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10543 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10544 breakpoints.
10545
10546 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10547
10548 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10549
10550 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10551
10552 * linux-s390-low.c (s390_collect_ptrace_register)
10553 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10554
10555 2010-01-21 Doug Evans <dje@google.com>
10556
10557 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10558 (PTRACE_ARG4_TYPE): New macro.
10559 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10560 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10561 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10562 (usr_store_inferior_registers): Ditto.
10563 (linux_read_memory, linux_write_memory): Ditto.
10564 (linux_test_for_tracefork): Ditto.
10565
10566 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10567 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10568
10569 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10570
10571 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10572 target.
10573
10574 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10575
10576 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10577 prototype to take a regcache. Adjust.
10578
10579 2010-01-20 Pedro Alves <pedro@codesourcery.com>
10580
10581 * regcache.h (struct thread_info): Forward declare.
10582 (struct regcache): New.
10583 (new_register_cache): Adjust prototype.
10584 (get_thread_regcache): Declare.
10585 (free_register_cache): Adjust prototype.
10586 (registers_to_string, registers_from_string): Ditto.
10587 (supply_register, supply_register_by_name, collect_register)
10588 (collect_register_as_string, collect_register_by_name): Ditto.
10589 * regcache.c (struct inferior_regcache_data): Delete.
10590 (get_regcache): Rename to ...
10591 (get_thread_regcache): ... this. Adjust. Switch inferior before
10592 fetching registers.
10593 (regcache_invalidate_one): Adjust.
10594 (regcache_invalidate): Fix prototype.
10595 (new_register_cache): Return the new register cache.
10596 (free_register_cache): Change prototype.
10597 (realloc_register_cache): Adjust.
10598 (registers_to_string): Change prototype to take a regcache. Adjust.
10599 (registers_from_string): Ditto.
10600 (register_data): Ditto.
10601 (supply_register): Ditto.
10602 (supply_register_by_name): Ditto.
10603 (collect_register): Ditto.
10604 (collect_register_as_string): Ditto.
10605 (collect_register_by_name): Ditto.
10606 * server.c (process_serial_event): Adjust.
10607 * linux-low.h (regset_fill_func, regset_store_func): Change
10608 prototype.
10609 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10610 Change prototype.
10611 * linux-low.c (get_stop_pc): Adjust.
10612 (check_removed_breakpoint): Adjust.
10613 (linux_wait_for_event): Adjust.
10614 (linux_resume_one_lwp): Adjust.
10615 (fetch_register): Add regcache parameter. Adjust.
10616 (usr_store_inferior_registers): Ditto.
10617 (regsets_fetch_inferior_registers): Ditto.
10618 (regsets_store_inferior_registers): Ditto.
10619 (linux_fetch_registers, linux_store_registers): Ditto.
10620 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10621 regcache. Adjust.
10622 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10623 Ditto.
10624 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10625 prototype to take a regcache.
10626 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10627 * remote-utils.c (convert_ascii_to_int, outreg)
10628 (prepare_resume_reply): Change prototype to take a regcache.
10629 Adjust.
10630 * target.h (struct target_ops) <fetch_registers, store_registers>:
10631 Change prototype to take a regcache.
10632 (fetch_inferior_registers, store_inferior_registers): Change
10633 prototype to take a regcache. Adjust.
10634 * proc-service.c (ps_lgetregs): Adjust.
10635 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10636 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10637 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10638 take a regcache. Adjust.
10639 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10640 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10641 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10642 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10643 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10644 (cris_cannot_fetch_register):
10645 (cris_breakpoint_at): Change prototype to take a regcache.
10646 Adjust.
10647 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10648 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10649 to take a regcache. Adjust.
10650 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10651 Adjust.
10652 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10653 take a regcache. Adjust.
10654 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10655 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10656 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10657 * linux-mips-low.c (mips_get_pc):
10658 (mips_set_pc): Change prototype to take a regcache. Adjust.
10659 (mips_reinsert_addr): Adjust.
10660 (mips_collect_register): Change prototype to take a regcache.
10661 Adjust.
10662 (mips_supply_register):
10663 (mips_collect_register_32bit, mips_supply_register_32bit)
10664 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10665 (mips_store_fpregset): Ditto.
10666 * linux-ppc-low.c (ppc_supply_ptrace_register)
10667 (ppc_supply_ptrace_register): Ditto.
10668 (parse_spufs_run): Adjust.
10669 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10670 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10671 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10672 take a regcache. Adjust.
10673 * linux-s390-low.c (s390_collect_ptrace_register)
10674 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10675 (s390_set_pc): Change prototype to take a regcache. Adjust.
10676 (s390_arch_setup): Adjust.
10677 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10678 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10679 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10680 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10681 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10682 regcache. Adjust.
10683 (sparc_breakpoint_at): Adjust.
10684 * linux-xtensa-low.c (xtensa_fill_gregset):
10685 (xtensa_store_gregset):
10686 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10687 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10688 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10689 prototype to take a regcache. Adjust.
10690 * win32-arm-low.c (arm_fetch_inferior_register)
10691 (arm_store_inferior_register): Change prototype to take a
10692 regcache. Adjust.
10693 * win32-i386-low.c (i386_fetch_inferior_register)
10694 (i386_store_inferior_register): Change prototype to take a
10695 regcache. Adjust.
10696 * win32-low.c (child_fetch_inferior_registers)
10697 (child_store_inferior_registers): Change prototype to take a
10698 regcache. Adjust.
10699 (win32_wait): Adjust.
10700 (win32_fetch_inferior_registers): Change prototype to take a
10701 regcache. Adjust.
10702 (win32_store_inferior_registers): Adjust.
10703 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10704 store_inferior_register>: Change prototype to take a regcache.
10705
10706 2010-01-20 Doug Evans <dje@google.com>
10707
10708 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10709 #ifdef.
10710 (linux_wait_for_event1, linux_init_signals): Ditto.
10711 (W_STOPCODE): Provide definition if missing.
10712
10713 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10714
10715 * linux-low.c (linux_core_of_thread): New.
10716 (compare_ints, show_process, list_threads): New.
10717 (linux_qxfer_osdata): Report threads and cores.
10718 (linux_target_op): Register linux_core_of_thread.
10719 * remote-utils.c (prepare_resume_reply): Report the core.
10720 (buffer_xml_printf): Support %d specifier.
10721 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10722 New.
10723 (handle_query): Handle qXfer:threads. Announce availability
10724 thereof.
10725 * target.h (struct target_ops): New field core_of_thread.
10726
10727 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10728
10729 * Makefile.in (clean): Remove new generated files.
10730 (reg-s390.o, reg-s390.c): Remove rules.
10731 (reg-s390x.o, reg-s390x.c): Likewise.
10732 (s390-linux32.o, s390-linux32.c): Add rules.
10733 (s390-linux64.o, s390-linux64.c): Likewise.
10734 (s390x-linux64.o, s390x-linux64.c): Likewise.
10735 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10736 * linux-s390-low.c: Include <elf.h>.
10737 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10738 (init_registers_s390): Remove prototype.
10739 (init_registers_s390x): Likewise.
10740 (init_registers_s390_linux32): Add prototype.
10741 (init_registers_s390_linux64): Likewise.
10742 (init_registers_s390x_linux64): Likewise.
10743 (s390_num_regs_3264): New define.
10744 (s390_regmap_3264): New global variable.
10745 (s390_cannot_fetch_register): Remove obsolete check.
10746 (s390_cannot_store_register): Likewise.
10747 (s390_collect_ptrace_register): Handle upper/lower register halves.
10748 (s390_supply_ptrace_register): Likewise.
10749 (s390_fill_gregset): Update to register number changes.
10750 (s390_get_hwcap): New routine.
10751 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10752 Install appropriate regmap and register set.
10753
10754 2010-01-01 Joel Brobecker <brobecker@adacore.com>
10755
10756 * server.c (gdbserver_version): Update copyright year to 2010.
10757 * gdbreplay.c (gdbreplay_version): Likewise.
10758
10759 2009-12-28 Doug Evans <dje@google.com>
10760
10761 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10762 elf/external.h. Include <elf.h> instead but only if necessary.
10763
10764 2009-12-28 Pedro Alves <pedro@codesourcery.com>
10765
10766 * linux-low.c (linux_remove_process): Remove `detaching'
10767 parameter. Don't release/detach from thread_db here.
10768 (linux_kill): Release/detach from thread_db here, ...
10769 (linux_detach): ... and here, before actually detaching.
10770 (linux_wait_1): ... and here, when a process exits.
10771 * thread-db.c (any_thread_of): New.
10772 (thread_db_free): Switch the current inferior to a thread of the
10773 passed in process.
10774
10775 2009-12-21 Doug Evans <dje@google.com>
10776
10777 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10778
10779 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10780 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10781 warning ifndef __NR_tkill. Move setting of errno there too.
10782 Delete unnecessary resetting of errno after syscall.
10783 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10784
10785 * configure.ac: Check for dladdr.
10786 * config.in: Regenerate.
10787 * configure: Regenerate.
10788 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10789 (try_thread_db_load): Update.
10790
10791 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10792
10793 2009-12-18 Doug Evans <dje@google.com>
10794
10795 * event-loop.c: Include unistd.h if it exists.
10796
10797 * linux-low.c (my_waitpid): Move definition away from being in
10798 between linux_tracefork_child/linux_test_for_tracefork.
10799
10800 * gdb_proc_service.h (psaddr_t): Fix type.
10801 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10802 signature to match glibc.
10803
10804 2009-12-16 Doug Evans <dje@google.com>
10805
10806 * linux-low.c (linux_read_memory): Fix argument to read.
10807
10808 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10809
10810 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10811 events, don't leave current_inferior pointing at null.
10812
10813 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10814
10815 * win32-low.c (LOG): Delete.
10816 (OUTMSG): Output to stderr.
10817 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10818 on compile time LOG macro.
10819 (win32_wait): Fix debug output.
10820
10821 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10822
10823 * win32-low.c (win32_add_one_solib): If the dll name is
10824 "ntdll.dll", prepend the system directory to the dll path.
10825
10826 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10827
10828 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10829
10830 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
10831 Vladimir Prus <vladimir@codesourcery.com>
10832
10833 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10834 * configure.ac: Check for __mcoldfire__ and set
10835 gdb_cv_m68k_is_coldfire.
10836 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10837 reg-cf.o and reg-m68k.o.
10838 * configure: Regenerated.
10839
10840 2009-11-16 Pedro Alves <pedro@codesourcery.com>
10841
10842 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10843 Pass it to thread_db_free.
10844 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10845 proper `detaching' argument to linux_remove_process.
10846 * linux-low.h (thread_db_free): Add `detaching' parameter.
10847 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10848 to thread_db_free.
10849 (thread_db_free): Add `detaching' parameter. Only
10850 call td_ta_clear_event if detaching from process.
10851
10852 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10853
10854 * thread-db.c (thread_db_free): Fix typo.
10855
10856 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10857
10858 PR gdb/10838
10859 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10860
10861 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10862
10863 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10864 with an i686 compiler.
10865 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10866 needed.
10867 * configure: Rebuilt.
10868
10869 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10870
10871 PR gdb/10783
10872
10873 * server.c (handle_search_memory_1): Correct read_addr initialization
10874 in loop for searching subsequent chunks.
10875
10876 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10877
10878 * configure.ac: New --with-libthread-db option.
10879 * thread-db.c: Allow direct dependence on libthread_db.
10880 (thread_db_free): Adjust.
10881 * config.in: Regenerate.
10882 * configure: Likewise.
10883
10884 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10885
10886 PR gdb/10757
10887 * thread-db.c (attach_thread): New function.
10888 (maybe_attach_thread): Return success/failure.
10889 (find_new_threads_callback): Adjust.
10890 (thread_db_find_new_threads): Loop until no new threads.
10891
10892 2009-10-13 Pedro Alves <pedro@codesourcery.com>
10893
10894 * proc-service.c (ps_lgetregs): Formatting.
10895
10896 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10897
10898 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10899 * configure.ac: Adjust.
10900 * linux-low.h (struct process_info_private): Move members to struct
10901 thread_db.
10902 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10903 * linux-low.c (linux_remove_process): Adjust.
10904 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10905 * server.c (handle_query): Move code ...
10906 (handle_monitor_command): ... here. New function.
10907 * target.h (struct target_ops): New member.
10908 * thread-db.c (struct thread_db): New.
10909 (libthread_db_search_path): New variable.
10910 (thread_db_create_event, thread_db_enable_reporting)
10911 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10912 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10913 (try_thread_db_load_1, dladdr_to_soname): New functions.
10914 (try_thread_db_load, thread_db_load_search): New functions.
10915 (thread_db_init): Search for libthread_db.
10916 (thread_db_free): New function.
10917 (thread_db_handle_monitor_command): Likewise.
10918 * config.in: Regenerate.
10919 * configure: Regenerate.
10920
10921 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10922
10923 * spu-low.c (spu_kill): Wait for inferior to terminate.
10924 Call clear_inferiors.
10925 (spu_detach): Call clear_inferiors.
10926
10927 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10928
10929 * aclocal.m4: Regenerate.
10930 * config.in: Likewise.
10931 * configure: Likewise.
10932
10933 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10934
10935 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10936 (parse_spufs_run): New function.
10937 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10938 (ppc_breakpoint_at): Handle SPU breakpoints.
10939
10940 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10941
10942 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10943 (SPUFS_MAGIC): Define.
10944 (spu_enumerate_spu_ids): New function.
10945 (linux_qxfer_spu): New function.
10946 (linux_target_ops): Install linux_qxfer_spu.
10947
10948 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10949
10950 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10951 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10952 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10953 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10954 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10955 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10956 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10957 (init_registers_powerpc_cell32l): Add prototype.
10958 (init_registers_powerpc_cell64l): Likewise.
10959 (ppc_arch_setup): Detect Cell/B.E. architecture.
10960
10961 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10962
10963 * Makefile.in (datarootdir): New variable.
10964
10965 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10966
10967 * linux-low.c (linux_write_memory): Update debugging output.
10968 * Makefile.in (clean): Add new descriptions.
10969 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10970 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10971 * configure.srv: Add new files for arm*-*-linux*.
10972 * linux-arm-low.c: Add new declarations.
10973 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10974 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10975 (HWCAP_VFPv3D16): New.
10976 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10977 instead of __IWMMXT__.
10978 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10979 (arm_arch_setup): New.
10980 (target_regsets): Remove #ifdef. Add VFP regset.
10981 (the_low_target): Use arm_arch_setup.
10982
10983 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10984
10985 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10986 the main thread again.
10987
10988 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10989
10990 Adding Neutrino gdbserver.
10991 * configure: Regenerated.
10992 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10993 * configure.srv (i[34567]86-*-nto*): New target.
10994 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10995 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10996 (nto_comctrl) [__QNX__]: New function.
10997 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10998
10999 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11000
11001 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11002 srv_tgtobj.
11003
11004 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11005 Pedro Alves <pedro@codesourcery.com>
11006
11007 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11008 don't support CONTEXT_EXTENDED_REGISTERS.
11009 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11010 (the_low_target): Install them.
11011 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11012 failing with ERROR_PIPE_NOT_CONNECTED.
11013
11014 2009-06-30 Doug Evans <dje@google.com>
11015 Pierre Muller <muller@ics.u-strasbg.fr>
11016
11017 Add h/w watchpoint support to x86-linux, win32-i386.
11018 * Makefile.in (SFILES): Add i386-low.c
11019 (i386_low_h): Define.
11020 (i386-low.o): Add dependencies.
11021 (linux-x86-low.o): Add i386-low.h dependency.
11022 (win32-i386-low.o): Ditto.
11023 * i386-low.c: New file.
11024 * i386-low.h: New file.
11025 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11026 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11027 * linux-low.c (linux_add_process): Initialize arch_private.
11028 (linux_remove_process): Free arch_private.
11029 (add_lwp): Initialize arch_private.
11030 (delete_lwp): Free arch_private.
11031 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11032 provided.
11033 * linux-low.h (process_info_private): New member arch_private.
11034 (lwp_info): New member arch_private.
11035 (linux_target_ops): New members new_process, new_thread,
11036 prepare_to_resume.
11037 (ptid_of): New macro.
11038 * linux-x86-low.c: Include stddef.h, i386-low.h.
11039 (arch_process_info): New struct.
11040 (arch_lwp_info): New struct.
11041 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11042 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11043 (i386_dr_low_get_status): New function.
11044 (x86_insert_point, x86_remove_point): New functions.
11045 (x86_stopped_by_watchpoint): New function.
11046 (x86_stopped_data_address): New function.
11047 (x86_linux_new_process, x86_linux_new_thread): New functions.
11048 (x86_linux_prepare_to_resume): New function.
11049 (the_low_target): Add entries for insert_point, remove_point,
11050 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11051 prepare_to_resume.
11052 * server.c (debug_hw_points): New global.
11053 (monitor_show_help): Document set debug-hw-points.
11054 (handle_query): Process "set debug-hw-points".
11055 * server.h (debug_hw_points): Declare.
11056 (paddress): Declare.
11057 * utils.c (NUMCELLS, CELLSIZE): New macros.
11058 (get_sell, xsnprintf, paddress): New functions.
11059 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11060 remove_point, stopped_by_watchpoint, stopped_data_address.
11061 * win32-i386-low.c: Include i386-low.h.
11062 (debug_reg_state): Replaces dr.
11063 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11064 (i386_dr_low_get_status): New function.
11065 (i386_insert_point, i386_remove_point): New functions.
11066 (i386_stopped_by_watchpoint): New function.
11067 (i386_stopped_data_address): New function.
11068 (i386_initial_stuff): Update.
11069 (get_thread_context,set_thread_context,i386_thread_added): Update.
11070 (the_low_target): Add entries for insert_point,
11071 remove_point, stopped_by_watchpoint, stopped_data_address.
11072 * win32-low.c (win32_insert_watchpoint): New function.
11073 (win32_remove_watchpoint): New function.
11074 (win32_stopped_by_watchpoint): New function.
11075 (win32_stopped_data_address): New function.
11076 (win32_target_ops): Add entries for insert_watchpoint,
11077 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11078 * win32-low.h (win32_target_ops): New members insert_point,
11079 remove_point, stopped_by_watchpoint, stopped_data_address.
11080
11081 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11082
11083 * server.c (process_serial_event): Re-return unsupported, not
11084 error, if the type isn't recognized. Re-allow supporting only
11085 insert or remove packets. Also call require_running for
11086 breakpoints. Add missing break statement to default case. Tidy.
11087 * target.h (struct target_ops): Rename insert_watchpoint to
11088 insert_point, and remove_watchpoint to remove_point.
11089
11090 * linux-low.h (struct linux_target_ops): Likewise.
11091 * linux-low.c (linux_insert_watchpoint): Rename to ...
11092 (linux_insert_point): ... this. Adjust.
11093 (linux_remove_watchpoint): Rename to ...
11094 (linux_remove_point): ... this. Adjust.
11095 (linux_target_ops): Adjust.
11096 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11097 (cris_insert_point): ... this.
11098 (cris_remove_watchpoint): Rename to ...
11099 (cris_remove_point): ... this.
11100 (the_low_target): Adjust.
11101
11102 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11103
11104 * server.c (handle_v_kill): Pass signal_pid to
11105 kill_inferior if multi_process is zero.
11106
11107 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11108
11109 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11110 * target.h (target_ops): Comment for *_watchpoint to make it clear
11111 the functions can get types '0' and '1'.
11112
11113 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11114
11115 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11116 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11117 * regcache.c (get_regcache): Likewise.
11118 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11119 * win32-low.c (child_fetch_inferior_registers): Remove check for
11120 regno 0.
11121
11122 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11123 Pedro Alves <pedro@codesourcery.com>
11124
11125 * target.h (struct target_ops) <supports_multi_process>: New
11126 callback.
11127 (target_supports_multi_process): New.
11128 * server.c (handle_query): Even if GDB reports support, only
11129 enable multi-process if the target also supports it. Report
11130 multi-process support only if the target backend supports it.
11131 * linux-low.c (linux_supports_multi_process): New function.
11132 (linux_target_ops): Install it as target_supports_multi_process
11133 callback.
11134
11135 2009-05-24 Doug Evans <dje@google.com>
11136
11137 Global renaming of find_thread_pid to find_thread_ptid.
11138 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11139 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11140 All callers updated.
11141
11142 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11143 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11144 directly.
11145
11146 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11147 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11148 (linux_resume_one_lwp): Ditto.
11149
11150 2009-05-23 Doug Evans <dje@google.com>
11151
11152 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11153 from struct inferior_list_entry * to struct lwp_info *.
11154 All callers updated.
11155
11156 2009-05-13 Doug Evans <dje@google.com>
11157
11158 * linux-x86-low.c: Don't include assert.h.
11159 (x86_siginfo_fixup): Use fatal, not assert.
11160 (x86_arch_setup): Fix comment.
11161
11162 2009-05-12 Doug Evans <dje@google.com>
11163
11164 Biarch support for i386/amd64 gdbserver.
11165 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11166 Add linux-x86-low.c.
11167 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11168 (linux-x86-low.o): Add.
11169 * linux-x86-64-low.c: Delete.
11170 * linux-i386-low.c: Delete.
11171 * linux-x86-low.c: New file.
11172 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11173 linux-x86-low.o.
11174 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11175 linux-x86-low.o.
11176 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11177 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11178 (linux_child_pid_to_exec_file): New function.
11179 (elf_64_header_p, elf_64_file_p): New functions.
11180 (siginfo_fixup): New function.
11181 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11182 give target a chance to convert layout.
11183 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11184 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11185
11186 2009-05-07 Doug Evans <dje@google.com>
11187
11188 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11189 (regsets_store_inferior_registers): Ditto.
11190
11191 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11192
11193 PR server/10048
11194
11195 * linux-low.c (must_set_ptrace_flags): Delete.
11196 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11197 of the global.
11198 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11199 `lwp->must_set_ptrace_flags' instead.
11200 (linux_wait_for_event_1): Set ptrace options here.
11201 (linux_wait_1): ... not here.
11202
11203 2009-04-30 Doug Evans <dje@google.com>
11204
11205 * inferiors.c (started_inferior_callback): New function.
11206 (attached_inferior_callback): New function.
11207 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11208 * server.c (print_started_pid, print_attached_pid): New functions.
11209 (detach_or_kill_for_exit): New function.
11210 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11211 * server.h (have_started_inferiors_p): Declare.
11212 (have_attached_inferiors_p): Declare.
11213
11214 * inferiors.c (remove_process): Fix memory leak, free process.
11215 * linux-low.c (linux_remove_process): New function.
11216 (linux_kill): Call it instead of remove_process.
11217 (linux_detach, linux_wait_1): Ditto.
11218
11219 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11220
11221 * configure.srv: Add x86 Windows CE target.
11222
11223 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11224
11225 * inferiors.c (get_thread_process): Make global.
11226 * server.h (get_thread_process): Add prototype.
11227 * thread-db.c (find_one_thread): Use get_thread_process
11228 instead of current_process.
11229 (thread_db_get_tls_address): Do not crash if called when
11230 thread layer is not yet initialized.
11231
11232 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11233
11234 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11235 * spu-low.c (current_tid): Rename to ...
11236 (current_ptid): ... this.
11237 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11238 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11239 ptid_get_lwp (current_ptid) instead of current_tid.
11240 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11241 instead of current_tid. Use find_process_pid to verify pid
11242 argument is valid. Pass proper argument to remove_process.
11243 (spu_thread_alive): Compare current_ptid instead of current_tid.
11244 (spu_resume): Likewise.
11245
11246 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11247
11248 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11249 variable.
11250
11251 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11252
11253 Implement the multiprocess extensions, and add linux multiprocess
11254 support.
11255
11256 * server.h (ULONGEST): Declare.
11257 (struct ptid, ptid_t): New.
11258 (minus_one_ptid, null_ptid): Declare.
11259 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11260 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11261 (struct inferior_list_entry): Change `id' type from unsigned from
11262 to ptid_t.
11263 (struct sym_cache, struct breakpoint, struct
11264 process_info_private): Forward declare.
11265 (struct process_info): Declare.
11266 (current_process): Declare.
11267 (all_processes): Declare.
11268 (initialize_inferiors): Declare.
11269 (add_thread): Adjust to use ptid_t.
11270 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11271 (add_process, remove_process, find_thread_pid): Declare.
11272 (find_inferior_id): Adjust to use ptid_t.
11273 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11274 (multi_process): Declare.
11275 (push_event): Adjust to use ptid_t.
11276 (read_ptid, write_ptid): Declare.
11277 (prepare_resume_reply): Adjust to use ptid_t.
11278 (clear_symbol_cache): Declare.
11279 * inferiors.c (all_processes): New.
11280 (null_ptid, minus_one_ptid): New.
11281 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11282 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11283 (add_thread): Change unsigned long to ptid. Remove gdb_id
11284 parameter. Adjust.
11285 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11286 (gdb_id_to_thread): Rename to ...
11287 (find_thread_pid): ... this. Change unsigned long to ptid.
11288 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11289 (loaded_dll, pull_pid_from_list): Adjust.
11290 (add_process, remove_process, find_process_pid)
11291 (get_thread_process, current_process, initialize_inferiors): New.
11292 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11293 (struct target_waitstatus) <related_pid>: Ditto.
11294 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11295 return type to int.
11296 (struct target_ops) <join>: Add `pid' argument.
11297 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11298 (struct target_ops) <wait>: Add `ptid' field. Change return type
11299 to ptid.
11300 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11301 (mywait): Add `ptid' argument. Change return type to ptid_t.
11302 (target_pid_to_str): Declare.
11303 * target.c (set_desired_inferior): Adjust to use ptids.
11304 (mywait): Add new `ptid' argument. Adjust.
11305 (target_pid_to_str): New.
11306 * mem-break.h (free_all_breakpoints): Declare.
11307 * mem-break.c (breakpoints): Delelete.
11308 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11309 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11310 to use per-process breakpoint list.
11311 (free_all_breakpoints): New.
11312 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11313 (symbol_cache, all_symbols_looked_up): Delete.
11314 (hexchars): New.
11315 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11316 read_ptid): New.
11317 (prepare_resume_reply): Change ptid argument's type from unsigned
11318 long to ptid_t. Adjust. Implement W;process and X;process.
11319 (free_sym_cache, clear_symbol_cache): New.
11320 (look_up_one_symbol): Adjust to per-process symbol cache. *
11321 * server.c (cont_thread, general_thread, step_thread): Change type
11322 to ptid_t.
11323 (attached): Delete.
11324 (multi_process): New.
11325 (last_ptid): Change type to ptid_t.
11326 (struct vstop_notif) <ptid>: Change type to ptid_t.
11327 (queue_stop_reply, push_event): Change `ptid' argument's type to
11328 ptid_t.
11329 (discard_queued_stop_replies): Add `pid' argument.
11330 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11331 changes. Don't reference the `attached' global.
11332 (attach_inferior): Adjust to mywait interface changes.
11333 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11334 features. Handle and report "multiprocess+". Handle
11335 "qAttached:PID".
11336 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11337 changes.
11338 (handle_v_kill): New.
11339 (handle_v_stopped): Adjust to use target_pid_to_str.
11340 (handle_v_requests): Allow multiple attaches and runs when
11341 multiprocess extensions are in effect. Handle "vKill".
11342 (myresume): Adjust to use ptids.
11343 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11344 (handle_status): Adjust to discard_queued_stop_replies interface
11345 change.
11346 (first_thread_of, kill_inferior_callback)
11347 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11348 (main): Call initialize_inferiors. Adjust to use ptids, killing
11349 and detaching from all inferiors. Handle multiprocess packet
11350 variants.
11351 * linux-low.h: Include gdb_proc_service.h.
11352 (struct process_info_private): New.
11353 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11354 <lwpid_of>: Use ptid_get_lwp.
11355 (get_lwp_thread): Adjust.
11356 (struct lwp_info): Add `dead' member.
11357 (find_lwp_pid): Declare.
11358 * linux-low.c (thread_db_active): Delete.
11359 (new_inferior): Adjust comment.
11360 (inferior_pid): Delete.
11361 (linux_add_process): New.
11362 (handle_extended_wait): Adjust.
11363 (add_lwp): Change unsigned long to ptid.
11364 (linux_create_inferior): Add process to processes table. Adjust
11365 to use ptids. Don't set new_inferior here.
11366 (linux_attach_lwp): Rename to ...
11367 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11368 it. Adjust to use ptids.
11369 (linux_attach_lwp): New.
11370 (linux_attach): Add process to processes table. Don't set
11371 new_inferior here.
11372 (struct counter): New.
11373 (second_thread_of_pid_p, last_thread_of_process_p): New.
11374 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11375 multiple processes.
11376 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11377 processes. Remove process from process table.
11378 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11379 to multiple processes.
11380 (any_thread_of): New.
11381 (linux_detach): Add `pid' argument, and handle it. Remove process
11382 from processes table.
11383 (linux_join): Add `pid' argument. Handle it.
11384 (linux_thread_alive): Change unsighed long argument to ptid_t.
11385 Consider dead lwps as not being alive.
11386 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11387 threads we're not interested in.
11388 (same_lwp, find_lwp_pid): New.
11389 (linux_wait_for_lwp): Change `pid' argument's type from int to
11390 ptid_t. Adjust.
11391 (linux_wait_for_event): Rename to ...
11392 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11393 from int to ptid_t. Adjust.
11394 (linux_wait_for_event): New.
11395 (linux_wait_1): Add `ptid' argument. Change return type to
11396 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11397 that exit from the process table.
11398 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11399 Adjust.
11400 (mark_lwp_dead): New.
11401 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11402 stopping all threads, mark its main lwp as dead.
11403 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11404 ptids.
11405 (fetch_register, usr_store_inferior_registers)
11406 (regsets_fetch_inferior_registers)
11407 (regsets_store_inferior_registers, linux_read_memory)
11408 (linux_write_memory): Inline `inferior_pid'.
11409 (linux_look_up_symbols): Adjust to use per-process
11410 `thread_db_active'.
11411 (linux_request_interrupt): Adjust to use ptids.
11412 (linux_read_auxv): Inline `inferior_pid'.
11413 (initialize_low): Don't reference thread_db_active.
11414 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11415 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11416 (ps_getpid): Return the pid of the current inferior.
11417 * thread-db.c (proc_handle, thread_agent): Delete.
11418 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11419 per-process data.
11420 (find_one_thread): Change argument type to ptid_t. Adjust to
11421 per-process data.
11422 (maybe_attach_thread): Adjust to per-process data and ptids.
11423 (thread_db_find_new_threads): Ditto.
11424 (thread_db_init): Ditto.
11425 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11426 processes table. Adjust to use ptids.
11427 (spu_kill, spu_detach): Adjust interface. Remove process from
11428 processes table.
11429 (spu_join, spu_thread_alive): Adjust interface.
11430 (spu_wait): Adjust interface. Remove process from processes
11431 table. Adjust to use ptids.
11432 * win32-low.c (current_inferior_tid): Delete.
11433 (current_inferior_ptid): New.
11434 (debug_event_ptid): New.
11435 (thread_rec): Take a ptid. Adjust.
11436 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11437 (child_delete_thread): Ditto.
11438 (do_initial_child_stuff): Add `attached' argument. Add process to
11439 processes table.
11440 (child_fetch_inferior_registers, child_store_inferior_registers):
11441 Adjust.
11442 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11443 (win32_attach): Pass 1 to do_initial_child_stuff.
11444 (win32_kill): Adjust interface. Remove process from processes
11445 table.
11446 (win32_detach): Ditto.
11447 (win32_join): Adjust interface.
11448 (win32_thread_alive): Take a ptid.
11449 (win32_resume): Adjust to use ptids.
11450 (get_child_debug_event): Ditto.
11451 (win32_wait): Adjust interface. Remove exiting process from
11452 processes table.
11453
11454 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11455
11456 Non-stop mode support.
11457
11458 * server.h (non_stop): Declare.
11459 (gdb_client_data, handler_func): Declare.
11460 (delete_file_handler, add_file_handler, start_event_loop):
11461 Declare.
11462 (handle_serial_event, handle_target_event, push_event)
11463 (putpkt_notif): Declare.
11464 * target.h (enum resume_kind): New.
11465 (struct thread_resume): Replace `step' field by `kind' field.
11466 (TARGET_WNOHANG): Define.
11467 (struct target_ops) <wait>: Add `options' argument.
11468 <supports_non_stop, async, start_non_stop>: New fields.
11469 (target_supports_non_stop, target_async): New.
11470 (start_non_stop): Declare.
11471 (mywait): Add `options' argument.
11472 * target.c (mywait): Add `options' argument. Print child exit
11473 notifications here.
11474 (start_non_stop): New.
11475 * server.c (non_stop, own_buf, mem_buf): New globals.
11476 (struct vstop_notif): New.
11477 (notif_queue): New global.
11478 (queue_stop_reply, push_event, discard_queued_stop_replies)
11479 (send_next_stop_reply): New.
11480 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11481 interface changes.
11482 (attach_inferior): In non-stop mode, don't wait for the target
11483 here.
11484 (handle_general_set): Handle QNonStop.
11485 (handle_query): When handling qC, return the current general
11486 thread, instead of the first thread of the list.
11487 (handle_query): If the backend supports non-stop mode, include
11488 QNonStop+ in the qSupported query response.
11489 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11490 and non-stop mode.
11491 (handle_v_attach, handle_v_run): Handle non-stop mode.
11492 (handle_v_stopped): New.
11493 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11494 (myresume): Adjust to use resume_kind. Handle non-stop.
11495 (queue_stop_reply_callback): New.
11496 (handle_status): Handle non-stop mode.
11497 (main): Clear non_stop flag on reconnection. Use the event-loop.
11498 Refactor serial protocol handling from here ...
11499 (process_serial_event): ... to this new function. When GDB
11500 selects any thread, select one here. In non-stop mode, wait until
11501 GDB acks all pending events before exiting.
11502 (handle_serial_event, handle_target_event): New.
11503 * remote-utils.c (remote_open): Install remote_desc in the event
11504 loop.
11505 (remote_close): Remove remote_desc from the event loop.
11506 (putpkt_binary): Rename to...
11507 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11508 (putpkt_binary): New as wrapper around putpkt_binary_1.
11509 (putpkt_notif): New.
11510 (prepare_resume_reply): In non-stop mode, don't change the
11511 general_thread.
11512 * event-loop.c: New.
11513 * Makefile.in (OBJ): Add event-loop.o.
11514 (event-loop.o): New rule.
11515
11516 * linux-low.h (pid_of): Moved here.
11517 (lwpid_of): New.
11518 (get_lwp_thread): Use lwpid_of.
11519 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11520 * linux-low.c (pid_of): Delete.
11521 (inferior_pid): Use lwpid_of.
11522 (linux_event_pipe): New.
11523 (target_is_async_p): New.
11524 (delete_lwp): New.
11525 (handle_extended_wait): Use lwpid_of.
11526 (add_lwp): Don't set lwpid field.
11527 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11528 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11529 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11530 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11531 first. Adjust to linux_wait_for_event interface changes. Use
11532 lwpid_of.
11533 (linux_detach): Don't delete the main lwp here.
11534 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11535 (status_pending_p): Don't consider explicitly suspended lwps.
11536 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11537 pointer. Add OPTIONS argument. Change return type to int. Use
11538 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11539 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11540 pointer. Add status pointer argument. Return a pid instead of a
11541 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11542 changes. In non-stop mode, don't switch to a random thread.
11543 (linux_wait): Rename to...
11544 (linux_wait_1): ... this. Add target_options argument, and handle
11545 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11546 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11547 clean exit and signal exit code. Don't stop all threads in
11548 non-stop mode. In all-stop mode, only stop all threads when
11549 reporting a stop to GDB. Handle explicit thread stop requests.
11550 (async_file_flush, async_file_mark): New.
11551 (linux_wait): New.
11552 (send_sigstop): Use lwpid_of.
11553 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11554 interface changes. In non-stop mode, don't switch to a random
11555 thread.
11556 (linux_resume_one_lwp): Use lwpid_of.
11557 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11558 (linux_resume_one_thread): ... this. Handle resume_stop. In
11559 non-stop mode, don't look for pending flag in all threads.
11560 (resume_status_pending_p): Don't consider explicitly suspended
11561 threads.
11562 (my_waitpid): Reimplement. Emulate __WALL.
11563 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11564 Use lwpid_of.
11565 (sigchld_handler, linux_supports_non_stop, linux_async)
11566 (linux_start_non_stop): New.
11567 (linux_target_ops): Register linux_supports_non_stop, linux_async
11568 and linux_start_non_stop.
11569 (initialize_low): Install SIGCHLD handler.
11570 * thread-db.c (thread_db_create_event, find_one_thread)
11571 (thread_db_get_tls_address): Use lwpid_of.
11572 * win32-low.c (win32_detach): Adjust to use resume_kind.
11573 (win32_wait): Add `options' argument.
11574 * spu-low.c (spu_resume): Adjust to use resume_kind.
11575 (spu_wait): Add `options' argument.
11576
11577 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11578
11579 Decouple target code from remote protocol.
11580
11581 * target.h (enum target_waitkind): New.
11582 (struct target_waitstatus): New.
11583 (struct target_ops) <wait>: Return an unsigned long. Take a
11584 target_waitstatus pointer instead of a char pointer.
11585 (mywait): Likewise.
11586 * target.c (mywait): Change prototype to return an unsigned long.
11587 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11588 * server.h (thread_from_wait, old_thread_from_wait): Delete
11589 declarations.
11590 (prepare_resume_reply): Change prototype to take a
11591 target_waitstatus.
11592 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11593 (last_status, last_ptid): New.
11594 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11595 pid instead of a signal.
11596 (attach_inferior): Remove "status" and "signal" parameters.
11597 Adjust.
11598 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11599 not as an address.
11600 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11601 (handle_v_requests, myresume): Remove "status" and "signal"
11602 parameters. Adjust.
11603 (handle_status): New.
11604 (main): Delete local `status'. Adjust.
11605 * remote-utils.c: Include target.h.
11606 (prepare_resume_reply): Change prototype to take a
11607 target_waitstatus. Adjust.
11608
11609 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11610 interface.
11611 * spu-low.c (spu_wait): Adjust.
11612 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11613 Delete.
11614 (win32_wait): Adjust.
11615
11616 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11617
11618 * target.h (struct thread_resume): Delete leave_stopped member.
11619 (struct target_ops): Add a `n' argument to the `resume' callback.
11620 * server.c (start_inferior): Adjust.
11621 (handle_v_cont, myresume): Adjust.
11622 * linux-low.c (check_removed_breakpoint): Adjust to resume
11623 interface change, and to removed leave_stopped field.
11624 (resume_ptr): Delete.
11625 (struct thread_resume_array): New.
11626 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11627 resume interface change.
11628 (linux_continue_one_thread, linux_queue_one_thread)
11629 (resume_status_pending_p): Check if the resume field is NULL
11630 instead of checking the leave_stopped member.
11631 (linux_resume): Adjust to the target resume interface change.
11632 * spu-low.c (spu_resume): Adjust to the target resume interface
11633 change.
11634 * win32-low.c (win32_detach, win32_resume): Ditto.
11635
11636 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11637
11638 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11639 flag.
11640 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11641 pending.
11642 (linux_continue_one_thread): Only preserve the stepping flag if
11643 there's a pending breakpoint.
11644
11645 2009-03-31 Pedro Alves <pedro@codesourcery.com>
11646
11647 * server.c (main): After the inferior having exited, call
11648 remote_close before exiting gdbserver.
11649
11650 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11651
11652 Fix size of FPSCR in Power 7 processors.
11653 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11654 (PPC_FEATURE_HAS_DFP): New #define.
11655 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11656 size of the FPSCR.
11657
11658 2009-03-23 Pedro Alves <pedro@codesourcery.com>
11659
11660 * server.c (handle_query) Whitespace and formatting.
11661
11662 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11663
11664 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11665 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11666 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11667 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11668 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11669 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11670 Makefile.in, configure.ac: Fix whitespace throughout.
11671 * configure: Regenerate.
11672
11673 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11674
11675 * inferiors.c (find_inferior): Make it safe for the callback
11676 function to delete the currently iterated inferior.
11677
11678 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11679
11680 * Makefile.in (linuw_low_h): Move higher.
11681 (thread-db.o): Depend on $(linux_low_h).
11682
11683 2009-03-17 Pedro Alves <pedro@codesourcery.com>
11684
11685 Rename "process" to "lwp" throughout.
11686
11687 * linux-low.c (all_processes): Rename to...
11688 (all_lwps): ... this.
11689 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11690 (add_process): Rename to ...
11691 (add_lwp): ... this. Adjust.
11692 (linux_create_inferior): Adjust.
11693 (linux_attach_lwp): Adjust.
11694 (linux_attach): Adjust.
11695 (linux_kill_one_process): Rename to ...
11696 (linux_kill_one_lwp): ... this. Adjust.
11697 (linux_kill): Adjust.
11698 (linux_detach_one_process): Rename to ...
11699 (linux_detach_one_lwp): ... this. Adjust.
11700 (linux_detach): Adjust.
11701 (check_removed_breakpoint): Adjust.
11702 (status_pending_p): Adjust.
11703 (linux_wait_for_process): Rename to ...
11704 (linux_wait_for_lwp): ... this. Adjust.
11705 (linux_wait_for_event): Adjust.
11706 (send_sigstop): Adjust.
11707 (wait_for_sigstop): Adjust.
11708 (stop_all_processes): Rename to ...
11709 (stop_all_lwps): ... this.
11710 (linux_resume_one_process): Rename to ...
11711 (linux_resume_one_lwp): ... this. Adjust.
11712 (linux_set_resume_request, linux_continue_one_thread)
11713 (linux_queue_one_thread, resume_status_pending_p)
11714 (usr_store_inferior_registers, regsets_store_inferior_registers)
11715 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11716 Adjust.
11717 * linux-low.h (get_process): Rename to ...
11718 (get_lwp): ... this. Adjust.
11719 (get_thread_process): Rename to ...
11720 (get_thread_lwp): ... this. Adjust.
11721 (get_process_thread): Rename to ...
11722 (get_lwp_thread): ... this. Adjust.
11723 (struct process_info): Rename to ...
11724 (struct lwp_info): ... this.
11725 (all_processes): Rename to ...
11726 (all_lwps): ... this.
11727 * proc-service.c (ps_lgetregs): Adjust.
11728 * thread-db.c (thread_db_create_event, find_one_thread)
11729 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11730
11731 2009-03-14 Pedro Alves <pedro@codesourcery.com>
11732
11733 * server.c (handle_query): Handle "qAttached".
11734
11735 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11736
11737 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11738 GPLv3, update license URL.
11739
11740 2009-03-01 Doug Evans <dje@google.com>
11741
11742 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11743 (server_h): Add gdb_signals.h.
11744 (signals.o): Update.
11745 * server.h (target_signal_from_host,target_signal_to_host_p)
11746 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11747
11748 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11749
11750 * remote-utils.c (getpkt): Also generate remote-debug
11751 information if noack_mode is set.
11752
11753 2009-02-06 Pedro Alves <pedro@codesourcery.com>
11754
11755 * server.c (handle_query): Report qXfer:siginfo:read and
11756 qXfer:siginfo:write as supported and handle them.
11757 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11758 * linux-low.c (linux_xfer_siginfo): New.
11759 (linux_target_ops): Set it.
11760
11761 2009-01-26 Pedro Alves <pedro@codesourcery.com>
11762
11763 * server.c (gdbserver_usage): Mention --remote-debug.
11764 (main): Accept '--remote-debug' switch.
11765
11766 2009-01-18 Doug Evans <dje@google.com>
11767
11768 * regcache.c (new_register_cache): No need to check result of xcalloc.
11769 * server.c (handle_search_memory): Back out calls to xmalloc,
11770 result is checked and error is returned to user upon failure.
11771 (handle_query): Ditto. Add more checks for result of malloc.
11772 (handle_v_cont): Check result of malloc, report error back to
11773 user upon failure.
11774 (handle_v_run): Ditto. Call freeargv.
11775 * server.h (freeargv): Declare.
11776 * utils.c (freeargv): New fn.
11777
11778 2009-01-15 Doug Evans <dje@google.com>
11779
11780 * gdbreplay.c (perror_with_name): Make arg const char *.
11781 * server.h (target_signal_to_name): Make return type const char *.
11782 * thread-db.c (thread_db_err_str): Make return type const char *.
11783 * utils.c (perror_with_name): Make arg const char *.
11784
11785 2009-01-14 Pedro Alves <pedro@codesourcery.com>
11786
11787 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11788 when handling a EXIT_PROCESS_DEBUG_EVENT.
11789
11790 2009-01-06 Joel Brobecker <brobecker@adacore.com>
11791
11792 * gdbreplay.c (gdbreplay_version): Update copyright year.
11793 * server.c (gdbserver_version): Likewise.
11794
11795 2009-01-05 Doug Evans <dje@google.com>
11796
11797 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11798 (handle_extended_wait): Improve comment.
11799
11800 2008-12-13 Doug Evans <dje@google.com>
11801
11802 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11803 * server.h (ATTR_MALLOC): New macro.
11804 (xmalloc,xcalloc,xstrdup): Declare.
11805 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11806 * inferiors.c: Ditto.
11807 * linux-low.c: Ditto.
11808 * mem-break.c: Ditto.
11809 * regcache.c: Ditto.
11810 * remote-utils.c: Ditto.
11811 * server.c: Ditto.
11812 * target.c: Ditto.
11813 * win32-low.c: Ditto.
11814
11815 2008-12-12 Doug Evans <dje@google.com>
11816
11817 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11818 in debugging printf.
11819
11820 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11821
11822 2008-12-09 Doug Evans <dje@google.com>
11823
11824 * linux-low.h (struct process_info): Delete member tid, unused.
11825 * thread-db.c (find_one_thread): Update.
11826 (maybe_attach_thread): Update.
11827
11828 2008-12-02 Pedro Alves <pedro@codesourcery.com>
11829
11830 * target.h (struct target_ops): Add qxfer_osdata member.
11831 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11832 and dirent.h.
11833 (linux_qxfer_osdata): New functions.
11834 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11835 callback.
11836 * server.c (handle_query): Handle "qXfer:osdata:read:".
11837 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11838 (buffer_xml_printf): New functions.
11839 * server.h (struct buffer): New.
11840 (buffer_grow_str, buffer_grow_str0): New macros.
11841 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11842 (buffer_xml_printf): Declare.
11843
11844 2008-11-24 Doug Evans <dje@google.com>
11845
11846 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11847
11848 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11849
11850 * server.c (handle_v_run): Always use the supplied argument list.
11851
11852 2008-11-19 Bob Wilson <bob.wilson@acm.org>
11853
11854 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11855 (xtensa_regmap_table): Add entry for scompare1.
11856
11857 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11858
11859 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11860 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11861 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11862 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11863 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11864 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11865 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11866 XML target descriptions.
11867 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11868 when inferior is running on an ISA 2.05 or later processor. Add
11869 special case to return offset for full 64-bit slot of FPSCR when
11870 in 32-bits.
11871
11872 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11873
11874 * Makefile.in (SFILES, clean): Added sparc64 files.
11875 (reg-sparc64.o, reg-sparc64.c): New.
11876 * configure.srv (sparc*-*-linux*): New configuration.
11877 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11878 syscall arguments for SPARC.
11879 (regsets_store_inferior_registers): Likewise.
11880 * linux-sparc-low.c: New file.
11881
11882 2008-10-21 Doug Evans <dje@google.com>
11883
11884 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11885 (READLINE_DIR,READLINE_DEP): Delete.
11886 (INTERNAL_CFLAGS): Update.
11887 (LINTFLAGS): Update.
11888
11889 2008-10-10 Pedro Alves <pedro@codesourcery.com>
11890
11891 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11892 whole argv from the last run, not just argv[0].
11893
11894 2008-09-08 Pedro Alves <pedro@codesourcery.com>
11895
11896 * regcache.c (new_register_cache): Return NULL if the register
11897 cache size isn't known yet.
11898 (free_register_cache): Avoid dereferencing a NULL regcache.
11899
11900 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11901
11902 * configure.srv: Merge MIPS and MIPS64.
11903
11904 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11905
11906 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11907
11908 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
11909
11910 * Makefile.in: Add required vsx dependencies.
11911
11912 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11913 Declare init_registers_powerpc_vsx32l.
11914 Declare init_registers_powerpc_vsx64l.
11915 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11916 (ppc_arch_setup): Check for VSX in hwcap.
11917 (ppc_fill_vsxregset): New function.
11918 (ppc_store_vsxregset): New function.
11919 Add new VSX entry in regset_info target_regsets.
11920
11921 * configure.srv: Add new VSX dependencies.
11922
11923 2008-08-12 Pedro Alves <pedro@codesourcery.com>
11924
11925 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11926 (remote_open): Set or clear transport_is_reliable.
11927 (putpkt_binary): Don't expect acks in noack mode.
11928 (getpkt): Don't send ack/nac in noack mode.
11929 * server.c (handle_general_set): Handle QStartNoAckMode.
11930 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11931 qSupported.
11932 (main): Reset noack_mode on every connection.
11933 * server.h (noack_mode): Declare.
11934
11935 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11936
11937 * Makefile.in (GDBREPLAY_OBS): New variable.
11938 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11939
11940 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11941 Daniel Jacobowitz <dan@codesourcery.com>
11942
11943 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11944 (usr_store_inferior_registers): Likewise.
11945 (regsets_store_inferior_registers): Likewise.
11946
11947 2008-07-31 Rolf Jansen <rj@surtec.com>
11948 Pedro Alves <pedro@codesourcery.com>
11949
11950 * configure.ac: Check for memmem declaration.
11951 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11952 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11953 (disable_packet_qfThreadInfo): Unconditionally compile.
11954 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11955 * configure, config.in: Regenerate.
11956
11957 2008-07-28 Doug Kwan <dougkwan@google.com>
11958
11959 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11960 (linux_write_memory): Remove declaration of errno.
11961
11962 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11963
11964 * linux-low.c (handle_extended_wait): Do not use "status"
11965 variable uninitialized.
11966
11967 2008-07-07 Pedro Alves <pedro@codesourcery.com>
11968
11969 * server.c (handle_v_attach): Inhibit reporting dll changes.
11970
11971 2008-06-27 Pedro Alves <pedro@codesourcery.com>
11972
11973 * remote-utils.c (prepare_resume_reply): If requested, don't
11974 output "thread:TID" in the T stop reply.
11975
11976 * server.c (disable_packet_vCont, disable_packet_Tthread)
11977 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11978 (handle_query): If requested, disable support for qC, qfThreadInfo
11979 and qsThreadInfo.
11980 (handle_v_requests): If requested, disable support for vCont.
11981 (gdbserver_show_disableable): New.
11982 (main): Handle --disable-packet and --disable-packet=LIST.
11983
11984 * server.h (disable_packet_vCont, disable_packet_Tthread)
11985 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11986
11987 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11988
11989 * server.c (gdbserver_usage): Mention --version.
11990
11991 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11992
11993 * Makefile.in (gdbreplay.o): New rule.
11994
11995 2008-06-06 Joseph Myers <joseph@codesourcery.com>
11996
11997 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11998 message, not gdbserver.
11999
12000 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12001 Nathan Sidwell <nathan@codesourcery.com>
12002 Joseph Myers <joseph@codesourcery.com>
12003
12004 * acinclude.m4: Include ../../config/acx.m4.
12005 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12006 * configure, config.in: Regenerate.
12007 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12008 * server.c (gdbserver_version): Print PKGVERSION.
12009 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12010 (main): Adjust gdbserver_usage calls.
12011 * gdbreplay.c (version, host_name): Add declarations.
12012 (gdbreplay_version, gdbreplay_usage): New.
12013 (main): Accept --version and --help options.
12014
12015 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12016
12017 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12018 (arm_breakpoint_at): Handle Thumb.
12019 (the_low_target): Add comment.
12020
12021 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12022
12023 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12024
12025 2008-05-09 Doug Evans <dje@google.com>
12026
12027 * server.h (decode_search_memory_packet): Declare.
12028 * remote-utils.c (decode_search_memory_packet): New fn.
12029 * server.c (handle_search_memory_1): New fn.
12030 (handle_search_memory): New fn.
12031 (handle_query): Process qSearch:memory packets.
12032
12033 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12034
12035 * regcache.c (registers_length): Remove.
12036 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12037 full register packet.
12038 * regcache.h (registers_length): Remove prototype.
12039 * server.h (PBUFSIZ): Define to 16384.
12040
12041 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12042
12043 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12044 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12045 powerpc-64l.o, and powerpc-altivec64l.o.
12046 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12047 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12048 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12049 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12050 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12051 to srv_xmlfiles.
12052
12053 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12054 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12055 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12056 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12057 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12058 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12059 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12060 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12061 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12062 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12063 (clean): Update.
12064
12065 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12066 (init_registers_powerpc_32l): ... this new prototype.
12067 (init_registers_powerpc_32): Remove, replace by ...
12068 (init_registers_powerpc_altivec32l): ... this new prototype.
12069 (init_registers_powerpc_e500): Remove, replace by ...
12070 (init_registers_powerpc_e500l): ... this new prototype.
12071 (init_registers_ppc64): Remove, replace by ...
12072 (init_registers_powerpc_64l): ... this new prototype.
12073 (init_registers_powerpc_64): Remove, replace by ...
12074 (init_registers_powerpc_altivec64l): ... this new prototype.
12075 (ppc_num_regs): Set to 73.
12076 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12077 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12078 (ppc_cannot_store_register): Handle orig_r3 and trap.
12079 (ppc_arch_setup): Update init_registers_... calls.
12080 (ppc_fill_gregset): Handle orig_r3 and trap.
12081
12082 * inferiors.c (clear_inferiors): Reset current_inferior.
12083
12084 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12085
12086 * acinclude.m4: Add override.m4.
12087 * configure: Regenerate.
12088
12089 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12090
12091 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12092 initial call to init_register_ppc64.
12093
12094 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12095
12096 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12097 single powerpc*-*-linux* case.
12098 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12099
12100 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12101
12102 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12103 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12104 from reg_xmlfiles.
12105 * linux-ppc-low.c: Include <elf.h>.
12106 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12107 (ppc_hwcap): New global variable.
12108 (ppc_regmap): Remove __SPE__ #ifdef sections.
12109 (ppc_regmap_e500): New global variable.
12110 (ppc_cannot_store_register): Update __SPE__ special case.
12111 (ppc_get_hwcap): New function.
12112 (ppc_arch_setup): Use it to determine whether inferior supports
12113 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12114 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12115 Do not access registers if target does not support AltiVec.
12116 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12117 Do not access registers if target does not support SPE.
12118 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12119
12120 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12121
12122 * linux-low.c (disabled_regsets, num_regsets): New.
12123 (use_regsets_p): Delete.
12124 (linux_wait_for_process): Clear disabled_regsets.
12125 (regsets_fetch_inferior_registers): Check and set it.
12126 (regsets_store_inferior_registers): Likewise.
12127 (linux_fetch_registers, linux_store_registers): Do not use
12128 use_regsets_p.
12129 (initialize_low): Allocate disabled_regsets.
12130
12131 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12132
12133 * Makefile.in (LIBOBJS): New.
12134 (OBS): Use LIBOBJS.
12135 (memmem.o): New rule.
12136 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12137 * configure: Regenerated.
12138
12139 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12140
12141 * server.c (handle_query): Never return "unsupported" for
12142 qXfer:features:read queries.
12143
12144 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12145
12146 * server.c (get_features_xml): Fix inverted condition.
12147 (handle_query): Always support qXfer:feature:read.
12148
12149 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12150
12151 * server.c (wrapper_argv): New.
12152 (start_inferior): Handle wrapper_argv. If set, expect an extra
12153 trap.
12154 (gdbserver_usage): Document --wrapper.
12155 (main): Parse --wrapper.
12156
12157 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12158
12159 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12160 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12161 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12162 (ppc_set_pc): Likewise.
12163 (ppc_arch_setup): New function.
12164 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12165 of collect_register.
12166 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12167
12168 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12169
12170 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12171 instead of linux-ppc64-low.o.
12172 * linux-ppc64-low.c: Remove file.
12173 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12174 (linux-ppc64-low.o): Remove rule.
12175
12176 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12177 (init_registers_powerpc_64): Likewise.
12178 (ppc_regmap): Conditionally define depending on __powerpc64__.
12179 (ppc_cannot_store_register): Do not special-case "fpscr" when
12180 compiled on __powerpc64__.
12181 (ppc_collect_ptrace_register): New function.
12182 (ppc_supply_ptrace_register): New function.
12183 (ppc_breakpoint): Change type to "unsigned int".
12184 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12185 (the_low_target): Conditionally provide initializers for the
12186 arch_setup member depending on __powerpc64__. Install
12187 collect_ptrace_register and supply_ptrace_register members.
12188
12189 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12190
12191 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12192 * server.c (gdbserver_xmltarget): Define.
12193 (get_features_xml): Use it to replace "target.xml" and arch_string.
12194
12195 * configure.srv: Remove srv_xmltarget. Add XML files that were
12196 mentioned there to srv_xmlfiles instead. Remove conditional tests
12197 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12198 srv_xmlfiles and srv_regobj to include all possible choices.
12199 * configure.ac (srv_xmltarget): Remove.
12200 (srv_xmlfiles): Do not add "target.xml".
12201 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12202 checks for supplementary target information.
12203 * configure: Regenerate.
12204 * Makefile.in (XML_TARGET): Remove.
12205 (target.xml): Remove rule.
12206 (clean): Do not clean up target.xml.
12207 (.PRECIOUS): Do not mention target.xml.
12208
12209 * target.h (struct target_ops): Remove arch_string member.
12210 * linux-low.c (linux_arch_string): Remove.
12211 (linux_target_ops): Remove arch_string initializer.
12212 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12213 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12214 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12215 * spu-low.c (spu_arch_string): Remove.
12216 (spu_target_ops): Remove arch_string initializer.
12217 * win32-low.c (win32_arch_string): Remove.
12218 (win32_target_ops): Remove arch_string initializer.
12219 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12220 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12221 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12222
12223 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12224
12225 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12226 by collect_ptrace_register and supply_ptrace_register hooks.
12227 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12228 instead of checking for the_low_target.left_pad_xfer.
12229 (usr_store_inferior_registers): Use collect_ptrace_register callback
12230 instead of checking for the_low_target.left_pad_xfer.
12231
12232 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12233 (s390_supply_ptrace_register): Likewise.
12234 (s390_fill_gregset): Call s390_collect_ptrace_register.
12235 (the_low_target): Update.
12236
12237 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12238 (ppc_supply_ptrace_register): Likewise.
12239 (the_low_target): Update.
12240
12241 * linux-i386-low.c (the_low_target): Update.
12242 * linux-x86-64-low.c (the_low_target): Update.
12243
12244 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12245
12246 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12247 reg-s390.o and reg-s390x.o.
12248
12249 * linux-low.c (new_inferior): New global variable.
12250 (linux_create_inferior, linux_attach): Set it.
12251 (linux_wait_for_process): Call the_low_target.arch_setup after the
12252 target has stopped for the first time.
12253 (initialize_low): Do not call the_low_target.arch_setup.
12254
12255 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12256 (s390_set_pc): Likewise.
12257 (s390_arch_setup): New function.
12258 (the_low_target): Use s390_arch_setup as arch_setup routine.
12259
12260 * regcache.c (realloc_register_cache): New function.
12261 (set_register_cache): Call it for each existing regcache.
12262
12263 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12264
12265 * server.h (init_registers): Remove prototype.
12266
12267 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12268 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12269 instead of init_registers ().
12270 * linux-arm-low.c (init_registers_arm): Add prototype.
12271 (init_registers_arm_with_iwmmxt): Likewise.
12272 (the_low_target): Add initializer for arch_setup field.
12273 * linux-cris-low.c (init_registers_cris): Add prototype.
12274 (the_low_target): Add initializer for arch_setup field.
12275 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12276 (the_low_target): Add initializer for arch_setup field.
12277 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12278 (the_low_target): Add initializer for arch_setup field.
12279 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12280 (the_low_target): Add initializer for arch_setup field.
12281 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12282 (the_low_target): Add initializer for arch_setup field.
12283 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12284 (the_low_target): Add initializer for arch_setup field.
12285 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12286 (init_registers_mips64_linux): Likewise.
12287 (the_low_target): Add initializer for arch_setup field.
12288 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12289 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12290 (the_low_target): Add initializer for arch_setup field.
12291 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12292 (init_registers_powerpc_64): Likewise.
12293 (the_low_target): Add initializer for arch_setup field.
12294 * linux-s390-low.c (init_registers_s390): Add prototype.
12295 (init_registers_s390x): Likewise.
12296 (the_low_target): Add initializer for arch_setup field.
12297 * linux-sh-low.c (init_registers_sh): Add prototype.
12298 (the_low_target): Add initializer for arch_setup field.
12299 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12300 (the_low_target): Add initializer for arch_setup field.
12301 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12302 (the_low_target): Add initializer for arch_setup field.
12303
12304 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12305 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12306 instead of init_registers ().
12307 * win32-arm-low.c (init_registers_arm): Add prototype.
12308 (the_low_target): Add initializer for arch_setup field.
12309 * win32-i386-low.c (init_registers_i386): Add prototype.
12310 (the_low_target): Add initializer for arch_setup field.
12311
12312 * spu-low.c (init_registers_spu): Add prototype.
12313 (initialize_low): Call initialie_registers_spu () instead of
12314 initialize_registers ().
12315
12316 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12317
12318 * server.c (handle_v_requests): When handling the vRun and vAttach
12319 packets, if already debugging a process, don't kill it. Return an
12320 error instead.
12321
12322 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12323
12324 * server.c (handle_query): Correct length check.
12325
12326 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12327
12328 * win32-low.c (do_initial_child_stuff): Add process handle
12329 parameter. Set current_process_handle and current_process_id from the
12330 parameters. Clear globals.
12331 (win32_create_inferior): Don't set current_process_handle and
12332 current_process_id here. Instead pass them on the call to
12333 do_initial_child_stuff.
12334 (win32_attach): Likewise.
12335 (win32_clear_inferiors): New.
12336 (win32_kill): Don't close the current process handle or the
12337 current thread handle here. Instead call win32_clear_inferiors.
12338 (win32_detach): Don't open a new handle to the process. Call
12339 win32_clear_inferiors.
12340 (win32_join): Don't rely on current_process_handle; open a new
12341 handle using the process id.
12342 (win32_wait): Call win32_clear_inferiors when the inferior process
12343 has exited.
12344
12345 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12346
12347 * server.c (monitor_show_help): Add "exit".
12348
12349 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12350
12351 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12352 (clean): Add reg-xtensa.c.
12353 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12354 * configure.srv (xtensa*-*-linux*) New target.
12355 * linux-xtensa-low.c: New.
12356 * xtensa-xtregs.c: New.
12357
12358 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12359
12360 * hostio.c: Don't include errno.h.
12361 (errno_to_fileio_errno): Move to hostio-errno.
12362 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12363 error number outputting to the target->hostio_last_error callback.
12364 (hostio_packet_error): Use FILEIO_EINVAL directly.
12365 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12366 calls to hostio_error.
12367 * hostio-errno.c: New.
12368 * server.h (hostio_last_error_from_errno): Declare.
12369 * target.h (target_ops): Add hostio_last_error member.
12370 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12371 as hostio_last_error handler.
12372 * spu-low.c (spu_target_ops): Likewise.
12373 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12374 (wince_hostio_last_error): New functions.
12375 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12376 as hostio_last_error handler.
12377 (win32_target_ops) [!_WIN32_WCE]: Register
12378 hostio_last_error_from_errno as hostio_last_error handler.
12379 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12380 (hostio-errno.o): New rule.
12381 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12382 * configure.srv (srv_hostio_err_objs): New variable. Default to
12383 hostio-errno.o.
12384 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12385 * configure: Regenerate.
12386
12387 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12388
12389 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12390 (linux_kill, linux_detach): Clean up the process list.
12391 * remote-utils.c (remote_open): Improve port number parsing.
12392 (putpkt_binary, input_interrupt): Only send interrupts if the target
12393 is running.
12394 * server.c (extended_protocol): Make static.
12395 (attached): Define earlier.
12396 (exit_requested, response_needed, program_argv): New variables.
12397 (target_running): New.
12398 (start_inferior): Clear attached here.
12399 (attach_inferior): Set attached here.
12400 (require_running): Define.
12401 (handle_query): Use require_running and target_running. Implement
12402 "monitor exit".
12403 (handle_v_attach, handle_v_run): New.
12404 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12405 (gdbserver_usage): Update.
12406 (main): Redo argument parsing. Handle --debug and --multi. Handle
12407 --attach along with other options or after the port. Save
12408 program_argv. Support no initial program. Resynchronize
12409 communication with GDB after an error. Handle "monitor exit".
12410 Use require_running and target_running. Always allow the extended
12411 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12412 restart in extended mode.
12413 * README: Refer to the GDB manual. Update --attach usage.
12414
12415 2007-12-20 Andreas Schwab <schwab@suse.de>
12416
12417 * linux-low.c (STACK_SIZE): Define.
12418 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12419 (linux_test_for_tracefork): Likewise.
12420
12421 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12422
12423 * linux-low.c (linux_wait_for_event): Update messages. Do not
12424 reinsert auto-delete breakpoints.
12425 * mem-break.c (struct breakpoint): Change return type of handler to
12426 int.
12427 (set_breakpoint_at): Update handler type.
12428 (reinsert_breakpoint_handler): Return 1 instead of calling
12429 delete_breakpoint.
12430 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12431 setting a new one.
12432 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12433 * mem-break.h (set_breakpoint_at): Update handler type.
12434 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12435 * win32-low.c (auto_delete_breakpoint): New.
12436 (get_child_debug_event): Use it.
12437
12438 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12439
12440 * configure.ac: Check for pread and pwrite.
12441 * hostio.c (handle_pread): Fall back to lseek and read.
12442 (handle_pwrite): Fall back to lseek and write.
12443 * config.in, configure: Regenerated.
12444
12445 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12446
12447 * server.c (myresume): Add own_buf argument.
12448 (main): Update calls.
12449
12450 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12451
12452 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12453 * remote-utils.c (remote_open): Do not call disable_async_io.
12454 (block_async_io): Delete.
12455 (unblock_async_io): Make static.
12456 (initialize_async_io): New.
12457 * server.c (handle_v_cont): Handle async I/O here.
12458 (myresume): Likewise. Move other common resume tasks here...
12459 (main): ... from here. Call initialize_async_io. Disable async
12460 I/O before the main loop.
12461 * server.h (initialize_async_io): Declare.
12462 (block_async_io, unblock_async_io): Delete prototypes.
12463 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12464
12465 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12466
12467 * remote-utils.c (readchar): Allow binary data in received messages.
12468
12469 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12470
12471 * win32-low.c (attaching): New global.
12472 (win32_create_inferior): Clear the `attaching' global.
12473 (win32_attach): Set the `attaching' global.
12474 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12475 attaching. Only set a breakpoint at the entry point if not
12476 attaching.
12477
12478 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12479
12480 * server.c (main): Don't report dll events on the initial
12481 connection on attaches.
12482
12483 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12484
12485 * server.c (main): Relax numerical bases supported for the pid of
12486 the --attach command line argument.
12487
12488 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12489
12490 * win32-low.c (win32_attach): Call OpenProcess before
12491 DebugActiveProcess, not after. Add last error output to error
12492 call.
12493
12494 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12495
12496 * win32-low.c (win32_get_thread_context)
12497 (win32_set_thread_context): New functions.
12498 (thread_rec): Use win32_get_thread_context.
12499 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12500 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12501 field.
12502
12503 2007-12-03 Leo Zayas
12504 Pedro Alves <pedro_alves@portugalmail.pt>
12505
12506 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12507 global variables.
12508 (child_add_thread): Minor cleanup.
12509 (child_continue): Resume artificially suspended threads before
12510 calling ContinueDebugEvent.
12511 (suspend_one_thread): New.
12512 (fake_breakpoint_event): New.
12513 (get_child_debug_event): Change return type to int. Check here if
12514 gdb sent an interrupt request. If a soft interrupt was requested,
12515 fake a breakpoint event. Return 0 if there is no event to handle,
12516 and 1 otherwise.
12517 (win32_wait): Don't check here if gdb sent an interrupt request.
12518 Ensure there is a valid event to handle.
12519 (win32_request_interrupt): Add soft interruption method as last
12520 resort.
12521
12522 2007-12-03 Leo Zayas
12523 Pedro Alves <pedro_alves@portugalmail.pt>
12524
12525 * win32-low.h (win32_thread_info): Add descriptions to the
12526 structure members. Replace `suspend_count' counter by a
12527 `suspended' flag.
12528 * win32-low.c (thread_rec): Update condition of when to get the
12529 context from the inferior. Rely on ContextFlags being set if it
12530 has already been retrieved. Only suspend the inferior thread if
12531 we haven't already. Warn if that fails.
12532 (continue_one_thread): s/suspend_count/suspended/. Only call
12533 ResumeThread once. Warn if that fails.
12534
12535 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12536
12537 * win32-low.c (win32_wait): Don't read from the inferior when it
12538 has already exited.
12539
12540 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12541
12542 * Makefile.in (win32_low_h): New variable.
12543 (win32-low.o): Add dependency on $(win32_low_h).
12544 (win32-arm-low.o, win32-i386-low.o): New rules.
12545
12546 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12547
12548 * hostio.c: Correct copyright year.
12549
12550 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12551
12552 * Makefile.in (OBS): Add hostio.o.
12553 (hostio.o): New rule.
12554 * server.h (handle_vFile): Declare.
12555 * hostio.c: New file.
12556 * server.c (handle_v_requests): Take packet_len and new_packet_len
12557 for binary packets. Call handle_vFile.
12558 (main): Update call to handle_v_requests.
12559
12560 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12561
12562 * linux-low.c: Include <sched.h>.
12563
12564 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12565
12566 * linux-low.c (linux_tracefork_grandchild): New.
12567 (linux_tracefork_child): Use clone.
12568 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12569
12570 2007-10-31 Joel Brobecker <brobecker@adacore.com>
12571
12572 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12573
12574 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12575
12576 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12577
12578 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12579
12580 * inferiors.c (change_inferior_id): Delete.
12581 (add_pid_to_list, pull_pid_from_list): New.
12582 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12583 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12584 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12585 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12586 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12587 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12588 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12589 (using_threads): Always set to 1.
12590 (handle_extended_wait): New.
12591 (add_process): Do not set TID.
12592 (linux_create_inferior): Set must_set_ptrace_flags.
12593 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12594 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12595 (linux_thread_alive): Rename TID argument to LWPID.
12596 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12597 (linux_wait_for_event): Do not use TID or check using_threads. Update
12598 call to dead_thread_notify. Call handle_extended_wait.
12599 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12600 (send_sigstop): Delete sigstop_sent.
12601 (wait_for_sigstop): Avoid TID.
12602 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12603 (linux_test_for_tracefork): New.
12604 (linux_lookup_signals): Use thread_db_active and
12605 linux_supports_tracefork_flag.
12606 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12607 * linux-low.h (get_process_thread): Avoid TID.
12608 (struct process_ifo): Move thread_known and tid to the end. Remove
12609 sigstop_sent.
12610 (linux_attach_lwp, thread_db_init): Update prototypes.
12611 * server.h (change_inferior_id): Delete prototype.
12612 (add_pid_to_list, pull_pid_from_list): New prototypes.
12613 * thread-db.c (thread_db_use_events): New.
12614 (find_first_thread): Rename to...
12615 (find_one_thread): ...this. Update callers and messages. Do not
12616 call fatal. Check thread_db_use_events. Do not call
12617 change_inferior_id or new_thread_notify.
12618 (maybe_attach_thread): Update. Do not call new_thread_notify.
12619 (thread_db_init): Set thread_db_use_events. Check use_events.
12620 * utils.c (fatal, warning): Correct message prefix.
12621
12622 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12623
12624 * Makefile.in (clean): Remove new files.
12625 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12626 (powerpc-64.o, powerpc-64.c): New rules.
12627 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12628 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12629 with SPE.
12630 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12631 SPE targets.
12632 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12633 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12634 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12635 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12636 (target_regsets): Add AltiVec and SPE register sets.
12637 * configure.ac: Check for AltiVec and SPE.
12638 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12639 (ppc_fill_vrregset, ppc_store_vrregset): New.
12640 (target_regsets): Add AltiVec register set.
12641 * configure: Regenerated.
12642
12643 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12644
12645 * linux-low.c (O_LARGEFILE): Define.
12646 (linux_read_memory): Use /proc/PID/mem.
12647 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12648 * configure, config.in: Regenerated.
12649
12650 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12651
12652 * linux-low.c (linux_wait_for_event): Do not pass signals while
12653 single-stepping.
12654
12655 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12656
12657 * win32-low.c (create_process): New.
12658 (win32_create_inferior): Use create_process instead of
12659 CreateProcess. If create_process failed retry appending an ".exe"
12660 suffix. Store the GetLastError result immediatelly after
12661 create_process calls and use it on the call to error.
12662
12663 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12664
12665 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12666
12667 2007-08-23 Joel Brobecker <brobecker@adacore.com>
12668
12669 * configure.ac: Switch license to GPLv3.
12670
12671 2007-08-01 Michael Snyder <msnyder@access-company.com>
12672
12673 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12674
12675 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12676
12677 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12678 typedef.
12679 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12680 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12681 CloseToolhelp32Snapshot.
12682 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12683 CloseToolhelp32Snapshot.
12684
12685 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
12686
12687 * server.c (main): Check for inferior exit before main loop.
12688
12689 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12690
12691 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12692 instead of on tmp_desc.
12693
12694 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12695 Daniel Jacobowitz <dan@codesourcery.com>
12696
12697 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12698 (add_thread): Minor cleanups.
12699 (clear_inferiors): Move lower in the file. Clear the DLL
12700 list.
12701 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12702 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12703 (xml_escape_text): New.
12704 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12705 for qSupported.
12706 (handle_v_cont): Report errors.
12707 (gdbserver_version): Update.
12708 (main): Correct size of own_buf. Do not report initial DLL events.
12709 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12710 (unloaded_dll, xml_escape_text): New.
12711 * win32-low.c (enum target_waitkind): Update comments.
12712 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12713 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12714 (win32_EnumProcessModules, win32_GetModuleInformation)
12715 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12716 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12717 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12718 (win32_Module32First, win32_Module32Next, load_toolhelp)
12719 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12720 (get_child_debug_event): Handle DLL events.
12721 (win32_wait): Likewise.
12722
12723 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12724
12725 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12726 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12727
12728 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12729
12730 * win32-low.c (handle_output_debug_string): Ignore event if not
12731 waiting.
12732
12733 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12734
12735 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12736
12737 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12738
12739 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12740
12741 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12742
12743 * inferiors.c (change_inferior_id): Add comment.
12744 * linux-low.c (check_removed_breakpoint): Add an early
12745 prototype. Improve debug output.
12746 (linux_attach): Doc update.
12747 (linux_detach_one_process, linux_detach): Clean up before releasing
12748 each process.
12749 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12750 * linux-low.h (struct process_info): Doc improvement.
12751 * mem-break.c (delete_all_breakpoints): New.
12752 * mem-break.h (delete_all_breakpoints): New prototype.
12753 * thread-db.c (find_first_thread): New.
12754 (thread_db_create_event): Call it instead of
12755 thread_db_find_new_threads. Clean up unused variables.
12756 (maybe_attach_thread): Remove first thread handling.
12757 (thread_db_find_new_threads): Use find_first_thread.
12758 (thread_db_get_tls_address): Likewise.
12759
12760 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12761
12762 * thread-db.c (thread_db_find_new_threads): Add prototype.
12763 (thread_db_create_event): Check for the main thread before adding
12764 a new thread.
12765 (maybe_attach_thread): Only enable event reporting if TID == 0.
12766 (thread_db_get_tls_address): Check for new threads.
12767
12768 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12769
12770 * linux-low.c (linux_create_inferior): Try execv before execvp.
12771 * spu-low.c (spu_create_inferior): Likewise.
12772
12773 2007-06-13 Mike Frysinger <vapier@gentoo.org>
12774
12775 * linux-low.c (linux_create_inferior): Change execv to execvp.
12776 * spu-low.c (spu_create_inferior): Likewies.
12777
12778 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12779
12780 * Makefile.in (clean): Clean new files instead of deleted ones.
12781 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12782 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12783 rules.
12784 * configure.srv: Specify XML files and new regformats for MIPS and
12785 MIPS64 GNU/Linux.
12786 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12787 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12788 an entry for the restart register.
12789 (mips_cannot_fetch_register, mips_cannot_store_register)
12790 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12791 register names to match the XML descriptions.
12792 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12793 restart register instead of $0.
12794
12795 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12796 Markus Deuling <deuling@de.ibm.com>
12797
12798 * remote-utils.c (decode_xfer_write): New function.
12799 * server.h (decode_xfer_write): Add prototype.
12800 * server.c (handle_query): Add PACKET_LEN argument. Support
12801 qXfer:spu:read and qXfer:spu:write packets.
12802 (main): Pass packet_len to handle_query.
12803 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12804 * target.h (target_ops): Add qxfer_spu.
12805
12806 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12807
12808 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12809 accessing non-seekable spufs files.
12810
12811 2007-05-16 Markus Deuling <deuling@de.ibm.com>
12812
12813 * server.c (handle_query): Add reply for qC packet.
12814
12815 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12816 Leo Zayas <lerele@champenstudios@com>
12817
12818 * server.h (check_remote_input_interrupt_request): New function.
12819 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12820 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12821 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12822 (check_remote_input_interrupt_request): New function.
12823 * server.h (check_remote_input_interrupt_request): Declare.
12824 * win32-low.c (winapi_DebugBreakProcess,
12825 winapi_GenerateConsoleCtrlEvent): New typedefs.
12826 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12827 to 250 ms.
12828 (win32_wait): Check for remote interrupt request
12829 with check_remote_input_interrupt_request.
12830 (win32_request_interrupt): New function.
12831 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12832
12833 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12834
12835 * win32-low.c (debug_registers_changed,
12836 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12837 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12838 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12839 (thread_rec): Get context using the low target.
12840 (child_add_thread): Call thread_added on the low target,
12841 which does the same thing.
12842 (regptr): Delete.
12843 (do_initial_child_stuff): Remove debug registers references.
12844 Set context using the low target. Resume threads after
12845 setting the contexts.
12846 (child_continue): Remove dead variable. Remove debug
12847 registers references.
12848 (child_fetch_inferior_registers): Go through the low target.
12849 (do_child_store_inferior_registers): Remove.
12850 (child_store_inferior_registers): Go through the low target.
12851 (win32_resume): Remove debug registers references.
12852 Set context using the low target.
12853 (handle_exception): Change return type to void. Don't record
12854 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12855 first chance exception.
12856 (get_child_debug_event): Change return type to void. Remove
12857 goto loop. Always return after waiting for debug event.
12858 (win32_wait): Convert to switch statement. Handle spurious
12859 events.
12860
12861 * win32-i386-low.c (debug_registers_changed,
12862 debug_registers_used): New.
12863 (initial_stuff): Rename to ...
12864 (i386_initial_stuff): ... this. Clear debug registers
12865 state variables.
12866 (store_debug_registers): Delete.
12867 (i386_get_thread_context): New.
12868 (load_debug_registers): Delete.
12869 (i386_set_thread_context): New.
12870 (i386_thread_added): New.
12871 (single_step): Rename to ...
12872 (i386_single_step): ... this.
12873 (do_fetch_inferior_registers): Rename to ...
12874 (i386_fetch_inferior_register): ... this.
12875 (i386_store_inferior_register): New.
12876 (the_low_target): Adapt to new interface.
12877
12878 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12879 (arm_get_thread_context): New.
12880 (arm_set_thread_context): New.
12881 (regptr): New.
12882 (do_fetch_inferior_registers): Rename to ...
12883 (arm_fetch_inferior_register): ... this.
12884 (arm_store_inferior_register): New.
12885 (arm_wince_breakpoint): Reimplement as unsigned long.
12886 (arm_wince_breakpoint_len): Define.
12887 (the_low_target): Adapt to new interface.
12888
12889 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12890 load_debug_registers. Add get_thread_context, set_thread_context,
12891 thread_added and store_inferior_register. Rename
12892 fetch_inferior_registers to fetch_inferior_register.
12893 (regptr): Remove declaration.
12894
12895 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12896
12897 * linux-low.c (linux_detach): Change return type to int. Return 0.
12898 * spu-low.c (spu_detach): Likewise.
12899
12900 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12901
12902 * target.h (target_ops): Change return type of detach to int.
12903 Add join.
12904 (join_inferior): New.
12905 * server.c (main): Don't skip detach support on mingw32.
12906 If the inferior doesn't support detaching return error.
12907 Call join_inferior instead of using waitpid.
12908 * linux-low.c (linux_join): New.
12909 (linux_target_op): Add linux_join.
12910 * spu-low.c (spu_join): New.
12911 (spu_target_ops): Add spu_join.
12912 * win32-low.c (win32_detach): Adapt to new interface.
12913 Reopen current_process_handle before detaching. Issue a child
12914 resume before detaching.
12915 (win32_join): New.
12916 (win32_target_op): Add win32_join.
12917
12918 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12919
12920 * win32-low.c (win32-attach): Fix return value.
12921 * target.h (target_ops): Describe ATTACH return values.
12922
12923 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12924
12925 * win32-low.c (GETPROCADDRESS): Define.
12926 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12927 (winapi_DebugSetProcessKillOnExit): Likewise.
12928 (win32_create_inferior): Force usage of ansi CreateProcessA.
12929 (win32_attach): Use GETPROCADDRESS.
12930 (win32_detach): Likewise.
12931
12932 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12933
12934 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12935
12936 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12937
12938 * win32-low.c: Commit leftover changes from 2007-03-29.
12939
12940 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12941
12942 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12943 fields short instead of int. Add explicit padding.
12944 (i387_cache_to_fsave): Remove unnecessary casts.
12945 (i387_fsave_to_cache): Doc fix.
12946 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12947
12948 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12949
12950 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12951 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12952
12953 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12954
12955 * configure.srv (arm*-*-mingw32ce*): Move near the other
12956 arm targets.
12957
12958 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12959
12960 * configure.ac: Add errno checking.
12961 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12962 sys/file.h and malloc.h.
12963 (AC_CHECK_DECLS): Add perror.
12964 (srv_mingwce): Handle.
12965 * configure.srv (i[34567]86-*-cygwin*): Add
12966 win32-i386-low.o to srv_tgtobj.
12967 (i[34567]86-*-mingw*): Likewise.
12968 (arm*-*-mingw32ce*): Add case.
12969 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12970 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12971 [__MINGW32CE__] (strerror): New function.
12972 [__MINGW32CE__] (errno): Define to GetLastError.
12973 [__MINGW32CE__] (COUNTOF): New macro.
12974 (remote_open): Remove extra close call.
12975 * mem-break.c (delete_breakpoint_at): New function.
12976 * mem-break.h (delete_breakpoint_at): Declare.
12977 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12978 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12979 [USE_WIN32API] (read, write): Add char* casts.
12980 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12981 * server.h: Include wincecompat.h on Windows CE.
12982 [HAVE_ERRNO_H]: Check.
12983 (perror): Declare if not declared.
12984 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12985 (perror_with_name): Remove errno declaration.
12986 * wincecompat.h: New.
12987 * wincecompat.c: New.
12988 * win32-low.h: New.
12989 * win32-arm-low.c: New.
12990 * win32-i386-low.c: New.
12991 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12992 (OUTMSG2): Make it safe.
12993 (_T): New macro.
12994 (COUNTOF): New macro.
12995 (NUM_REGS): Get it from the low target.
12996 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12997 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12998 (thread_rec): Let low target handle debug registers.
12999 (child_add_thread): Likewise.
13000 (child_init_thread_list): Likewise.
13001 (continue_one_thread): Likewise.
13002 (regptr): New.
13003 (do_child_fetch_inferior_registers): Move to ...
13004 * win32-i386-low.c: ... here, and rename to ...
13005 (do_fetch_inferior_registers): ... this.
13006 * win32-low.c (child_fetch_inferior_registers):
13007 Go through the low target.
13008 (do_child_store_inferior_registers): Use regptr.
13009 (strwinerror): New function.
13010 (win32_create_inferior): Handle Windows CE.
13011 Use strwinerror instead of strerror on Windows error
13012 codes. Add program to the error output.
13013 Don't close the main thread handle on Windows CE.
13014 (win32_attach): Use coredll.dll on Windows CE.
13015 (win32_kill): Close current process and current
13016 thread handles.
13017 (win32_detach): Use coredll.dll on Windows CE.
13018 (win32_resume): Let low target handle debug registers, and
13019 step request.
13020 (handle_exception): Add/Remove initial breakpoint. Avoid
13021 non-existant WSTOPSIG on Windows CE.
13022 (win32_read_inferior_memory): Cast to remove warning.
13023 (win32_arch_string): Go through the low target.
13024 (initialize_low): Call set_breakpoint_data with the low
13025 target's breakpoint.
13026 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13027 FOP_REGNUM, mappings): Move to ...
13028 * win32-i386-low.c: ... here.
13029 * win32-low.c (win32_thread_info): Move to ...
13030 * win32-low.h: ... here.
13031 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13032 win32-arm-low.c and wincecompat.c.
13033 (all:): Add $EXEEXT.
13034 (install-only:): Likewise.
13035 (gdbserver:): Likewise.
13036 (gdbreplay:): Likewise.
13037 * config.in: Regenerate.
13038 * configure: Regenerate.
13039
13040 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13041
13042 * win32-low.c: Rename typedef thread_info to
13043 win32_thread_info throughout.
13044
13045 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13046
13047 * win32-i386-low.c: Rename to ...
13048 * win32-low.c: ... this.
13049 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13050 * Makefile.in: Likewise.
13051
13052 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13053
13054 * remote-utils.c (monitor_output): Constify msg parameter.
13055 * server.h (monitor_output): Likewise.
13056 * win32-i386-low.c (handle_output_debug_string): New.
13057 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13058 handle_output_debug_string.
13059 (get_child_debug_event): Likewise.
13060
13061 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13062
13063 * server.c (main): Correct strtoul check.
13064
13065 2007-03-27 Jon Ringle <jon@ringle.org>
13066
13067 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13068
13069 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13070
13071 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13072
13073 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13074
13075 * terminal.h: Check HAVE_SGTTY_H.
13076
13077 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13078
13079 * remote-utils.c (remote_open): Print out the assigned port number.
13080
13081 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13082
13083 * remote-utils.c (monitor_output): New function.
13084 * server.c (debug_threads): Define here.
13085 (monitor_show_help): New function.
13086 (handle_query): Handle qRcmd.
13087 (main): Do not handle 'd' packet.
13088 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13089 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13090 of debug_threads.
13091
13092 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13093
13094 * Makefile.in (EXEEXT): New.
13095 (clean): Use $(EXEEXT).
13096
13097 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13098
13099 * target.h (target_ops): Rename send_signal to request_interrupt,
13100 and remove enum target_signal parameter.
13101 * linux-low.c (linux_request_interrupt): Rename from
13102 linux_send_signal, and always send SIGINT.
13103 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13104 and always send SIGINT.
13105 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13106 of send_signal.
13107 (input_interrupt): Likewise.
13108
13109 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13110
13111 * server.c (get_features_xml): Check if target implemented
13112 arch_string.
13113 * win32-i386-low.c (win32_arch_string): New.
13114 (win32_target_ops): Add win32_arch_string as arch_string member.
13115
13116 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13117
13118 * spu-low.c (spu_arch_string): New.
13119 (spu_target_ops): Add spu_arch_string.
13120
13121 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13122
13123 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13124 * configure.ac: Do not check for terminal.h.
13125 * configure, config.in: Regenerated.
13126
13127 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13128
13129 * Makefile.in (OBS): Add $(XML_BUILTIN).
13130 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13131 (clean): Update.
13132 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13133 (arm-with-iwmmxt.c): New.
13134 * config.in, configure: Regenerate.
13135 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13136 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13137 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13138 (arm*-*-linux*): Add iWMMXt and regset support.
13139 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13140 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13141 (arm_store_wmmxregset, target_regsets): New.
13142 * server.c (get_features_xml): Take annex argument. Check builtin
13143 XML documents.
13144 (handle_query): Handle multiple annexes.
13145
13146 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13147
13148 * remote-utils.c [USE_WIN32API] (read, write): Define.
13149 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13150 write.
13151
13152 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13153
13154 * linux-i386-low.c (the_low_target): Set arch_string.
13155 * linux-x86-64-low.c (the_low_target): Likewise.
13156 * linux-low.c (linux_arch_string): New.
13157 (linux_target_ops): Add it.
13158 * linux-low.h (struct linux_target_ops): Add arch_string.
13159 * server.c (write_qxfer_response): Use const void * for DATA.
13160 (get_features_xml): New.
13161 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13162 * target.h (struct target_ops): Add arch_string method.
13163
13164 2007-01-03 Denis Pilat <denis.pilat@st.com>
13165 Daniel Jacobowitz <dan@codesourcery.com>
13166
13167 * linux-low.c (linux_kill): Handle being called with no threads.
13168 * win32-i386-low.c (win32_kill): Likewise.
13169 (get_child_debug_event): Clear current_process_handle.
13170
13171 2006-12-30 Denis PILAT <denis.pilat@st.com>
13172 Daniel Jacobowitz <dan@codesourcery.com>
13173
13174 * remote-utils.c (remote_open): Check the type of specified
13175 serial port devices before opening them.
13176 * server.c (main): Kill the inferior if an error occurs during
13177 the first remote_open.
13178
13179 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13180
13181 * README: Update supported targets.
13182
13183 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13184
13185 * Makefile.in (clean): Remove reg-mips64.c.
13186 (reg-mips64.c, reg-mips64.o): New rules.
13187 * configure.srv: Handle mips64. Include regset support for mips.
13188 * linux-mips-low.c (union mips_register): New.
13189 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13190 (mips_breakpoint, mips_breakpoint_at): Use int.
13191 (mips_collect_register, mips_supply_register)
13192 (mips_collect_register_32bit, mips_supply_register_32bit)
13193 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13194 (mips_store_fpregset, target_regsets): New.
13195 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13196
13197 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13198
13199 * configure.srv: Add target "spu*-*-*".
13200 * Makefile.in (clean): Remove reg-spu.c.
13201 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13202 * spu-low.c: New file.
13203
13204 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13205
13206 * configure.ac: Correct td_thr_tls_get_addr test.
13207 * configure: Regenerated.
13208
13209 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13210
13211 * linux-low.c (linux_wait_for_event): Reformat. Use the
13212 pass_signals array.
13213 * remote-utils.c (decode_address_to_semicolon): New.
13214 * server.c (pass_signals, handle_general_set): New.
13215 (handle_query): Mention QPassSignals for qSupported.
13216 (main): Call handle_general_set.
13217 * server.h (pass_signals, decode_address_to_semicolon): New.
13218
13219 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13220
13221 * server.c (handle_query): Correct error handling for read_auxv.
13222
13223 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13224
13225 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13226 and srv_linux_thread_db to yes.
13227 * linux-s390-low.c (s390_fill_gregset): New function.
13228 (target_regsets): Define data structure.
13229
13230 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13231
13232 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13233 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13234 * config.in, configure: Regenerated.
13235 * inferiors.c (gdb_id_to_thread): New function.
13236 (gdb_id_to_thread_id): Use it.
13237 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13238 * linux-low.h (struct process_info): Add th member.
13239 (thread_db_get_tls_address): New prototype.
13240 * remote-utils.c (decode_address): Make non-static.
13241 * server.c (handle_query): Handle qGetTLSAddr.
13242 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13243 * target.h (struct target_ops): Add get_tls_address.
13244 * thread-db.c (maybe_attach_thread): Save the thread handle.
13245 (thread_db_get_tls_address): New.
13246
13247 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13248
13249 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13250 (linux_resume_one_process): Take a siginfo_t *. Update all
13251 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13252 (struct pending_signals): Add a siginfo_t.
13253 (linux_wait_for_process): Always set last_status.
13254 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13255 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13256 * linux-low.h (struct process_info): Add last_status.
13257
13258 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13259
13260 * remote-utils.c (try_rle): New function.
13261 (putpkt_binary): Use it.
13262
13263 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13264
13265 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13266 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13267 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13268 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13269 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13270 point registers.
13271
13272 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13273
13274 * server.c (terminal_fd): New variable.
13275 (old_foreground_pgrp): Likewise.
13276 (restore_old_foreground_pgrp): New function.
13277 (start_inferior): Record the terminal file descriptor in terminal_fd
13278 and its original foreground group in old_foreground_pgrp. Register
13279 restore_old_foreground_pgrp with atexit().
13280
13281 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13282
13283 * server.c (handle_query): Correct qPart to qXfer.
13284
13285 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13286
13287 * configure.ac: Check for more headers which are missing on
13288 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13289 * configure.srv: Add Cygwin and mingw32.
13290 * remote-utils.c: Don't include headers unconditionally which
13291 are missing on mingw32. Include <winsock.h> for mingw32.
13292 (remote_open): Adjust for mingw32 support. Flush
13293 standard error after writing to it.
13294 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13295 (unblock_async_io, enable_async_io, disable_async_io)
13296 (readchar, getpkt): Update for Winsock support.
13297 (prepare_resume_reply): Expect a protocol signal number.
13298 * server.c: Disable <sys/wait.h> on mingw32.
13299 (start_inferior): Adjust for mingw32 support. Flush
13300 standard error after writing to it.
13301 (attach_inferior): Likewise. Use protocol signal
13302 numbers.
13303 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13304 and names.
13305 * win32-i386-low.c: New file.
13306 * Makefile.in (XM_CLIBS): Set.
13307 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13308 (win32-i386-low.o): New dependency rule.
13309 * linux-low.c (linux_wait): Use target signal numbers.
13310 * target.h (struct target_ops): Doc fix.
13311 * server.h (target_signal_to_name): New prototype.
13312 * gdbreplay.c: Don't include headers unconditionally which
13313 are missing on mingw32. Include <winsock.h> for mingw32.
13314 (remote_close, remote_open): Adjust for Winsock support.
13315 * configure, config.in: Regenerated.
13316
13317 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13318
13319 * server.c (decode_xfer_read, write_qxfer_response): New.
13320 (handle_query): Take a packet length argument. Handle
13321 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13322 the qSupported response.
13323 (main): Update call to handle_query.
13324
13325 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13326
13327 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13328 (putpkt_binary): Renamed from putpkt and adjusted for binary
13329 data.
13330 (putpkt): New wrapper for putpkt_binary.
13331 (readchar): Don't mask off the high bit.
13332 (decode_X_packet): New function.
13333 * server.c (main): Call putpkt_binary if a handler sets the packet
13334 length. Save the length of the incoming packet. Handle 'X'.
13335 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13336
13337 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13338
13339 * server.c (handle_query): Handle qSupported.
13340
13341 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13342
13343 * remote-utils.c (all_symbols_looked_up): New variable.
13344 (look_up_one_symbol): Check it.
13345 * server.h (look_up_one_symbol): New declaration.
13346 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13347
13348 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13349
13350 * Makefile.in (linux-arm-low.o): Update dependencies.
13351 * linux-arm-low.c: Include "gdb_proc_service.h".
13352 (PTRACE_GET_THREAD_AREA): Define.
13353 (ps_get_thread_area): New function.
13354
13355 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13356
13357 * configure.srv (m68k*-*-uclinux*): New target.
13358 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13359 (linux_resume_one_process): Remove extraneous cast.
13360 (linux_read_offsets): New.
13361 (linux_target_op): Add linux_read_offsets on mmuless systems.
13362 * server.c (handle_query): Add qOffsets logic.
13363 * target.h (struct target_ops): Add read_offsets.
13364
13365 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13366
13367 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13368 (PTRACE_GET_THREAD_AREA): Define.
13369 (ps_get_thread_area): New function.
13370 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13371 (linux-x86-64-low.o): Update.
13372
13373 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13374
13375 * configure.ac: Remove checks for prfpregset_t.
13376 * gdb_proc_service.h: New file.
13377 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13378 new "gdb_proc_service.h".
13379 * proc-service.c: Likewise.
13380 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13381 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13382 * Makefile.in (gdb_proc_service_h): Updated.
13383 * configure, config.in: Regenerated.
13384
13385 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13386
13387 * remote-utils.c (prepare_resume_reply): Move declaration
13388 of gdb_id_from_wait to the top of the block.
13389
13390 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13391
13392 * linux-low.c (regsets_store_inferior_registers): Read the regset
13393 from the target before filling it.
13394
13395 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13396
13397 * server.c (attach_inferior): Return SIGTRAP for a successful
13398 attach.
13399
13400 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13401
13402 * Makefile.in (OBS): Add version.o.
13403 (STAGESTUFF): Delete.
13404 (version.o): Add dependencies.
13405 (version.c): Replace rule.
13406 (clean): Remove version.c.
13407 * server.c (gdbserver_version): New.
13408 (gdbserver_usage): Use printf.
13409 (main): Handle --version and --help.
13410 * server.h (version, host_name): Add declarations.
13411
13412 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13413
13414 * linux-arm-low.c:
13415 * linux-arm-low.c:
13416 * inferiors.c:
13417 * i387-fp.h:
13418 * i387-fp.c:
13419 * gdbreplay.c:
13420 * regcache.c:
13421 * proc-service.c:
13422 * mem-break.h:
13423 * mem-break.c:
13424 * linux-x86-64-low.c:
13425 * linux-sh-low.c:
13426 * linux-s390-low.c:
13427 * linux-ppc64-low.c:
13428 * linux-ppc-low.c:
13429 * linux-mips-low.c:
13430 * linux-m68k-low.c:
13431 * linux-m32r-low.c:
13432 * linux-low.h:
13433 * linux-low.c:
13434 * linux-ia64-low.c:
13435 * linux-i386-low.c:
13436 * linux-crisv32-low.c:
13437 * thread-db.c:
13438 * terminal.h:
13439 * target.h:
13440 * target.c:
13441 * server.h:
13442 * server.c:
13443 * remote-utils.c:
13444 * regcache.h:
13445 * utils.c:
13446 * Makefile.in:
13447 * configure.ac:
13448 * gdbserver.1: Add (C) after Copyright. Update the FSF
13449 address.
13450
13451 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13452
13453 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13454 (arm_breakpoint_at): Recognize both breakpoints.
13455 (the_low_target): Use the correct breakpoint instruction.
13456
13457 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13458
13459 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13460 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13461 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13462 (the_low_target): Update.
13463
13464 2005-10-25 Andreas Schwab <schwab@suse.de>
13465
13466 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13467
13468 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13469 (ia64_num_regs): Reduce to 462.
13470
13471 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13472
13473 * acinclude.m4: Correct quoting.
13474 * aclocal.m4: Regenerated.
13475
13476 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13477 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13478 (thread_db_init): Call thread_db_err_str.
13479 * configure.ac: Check for TD_VERSION.
13480 * config.in, configure: Regenerated.
13481
13482 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13483
13484 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13485
13486 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13487
13488 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13489 is not available. Define HAVE_PTRACE_GETREGS if it is.
13490 * config.in, configure: Regenerated.
13491 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13492 * linux-i386-low.c, linux-m68k-low.c: Update to use
13493 HAVE_PTRACE_GETREGS.
13494 * linux-low.c (regsets_fetch_inferior_registers)
13495 (regsets_store_inferior_registers): Only return 0 if we processed
13496 GENERAL_REGS.
13497 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13498 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13499
13500 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13501
13502 * inferiors.c (struct thread_info): Add gdb_id.
13503 (add_thread): Add gdb_id argument.
13504 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13505 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13506 calls to add_thread.
13507 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13508 * server.c (handle_query): Use thread_to_gdb_id.
13509 (handle_v_cont, main): Use gdb_id_to_thread_id.
13510 * server.h (add_thread): Update prototype.
13511 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13512 prototypes.
13513
13514 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13515
13516 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13517 left-padded registers.
13518 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13519 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13520
13521 2005-07-01 Steve Ellcey <sje@cup.hp.com>
13522
13523 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13524 * configure: Regenerate.
13525 * config.in: Regenerate.
13526 * server.h (NEED_DECLARATION_STRERROR):
13527 Replace with !HAVE_DECL_STRERROR.
13528
13529 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13530
13531 * linux-low.c (linux_wait, linux_send_signal): Don't test
13532 an unsigned long variable for > 0 if it could be MAX_ULONG.
13533 * server.c (myresume): Likewise.
13534 * target.c (set_desired_inferior): Likewise.
13535
13536 2005-06-13 Mark Kettenis <kettenis@gnu.org>
13537
13538 * configure.ac: Simplify and improve check for socklen_t.
13539 * configure, config.in: Regenerate.
13540
13541 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13542
13543 * acconfig.h: Remove.
13544 * configure.ac: Add a test for socklen_t. Use three-argument
13545 AC_DEFINE throughout.
13546 * config.in: Regenerated using autoheader 2.59.
13547 * configure: Regenerated.
13548
13549 * gdbreplay.c (socklen_t): Provide a default.
13550 (remote_open): Use socklen_t.
13551 * remote-utils.c (socklen_t): Provide a default.
13552 (remote_open): Use socklen_t.
13553 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13554 unsigned char.
13555
13556 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13557 char for buffers.
13558 * linux-low.c (linux_read_memory, linux_write_memory)
13559 (linux_read_auxv): Likewise.
13560 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13561 (check_mem_write): Likewise.
13562 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13563 Likewise.
13564 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13565 (registers_from_string, register_data): Likewise.
13566 * server.c (handle_query, main): Likewise.
13567 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13568 (decode_M_packet): Likewise.
13569 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13570 * target.h (struct target_ops): Update read_memory, write_memory,
13571 and read_auxv.
13572 (read_inferior_memory, write_inferior_memory): Update.
13573 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13574 to unsigned char *.
13575 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13576 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13577 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13578 linux-s390-low.c, linux-sh-low.c: Update for changes in
13579 read_inferior_memory and the_low_target->breakpoint.
13580
13581 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13582
13583 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13584 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13585 * configure.srv: Add powerpc64-*-linux*.
13586 * linux-ppc64-low.c: New file.
13587
13588 2005-05-23 Orjan Friberg <orjanf@axis.com>
13589
13590 * linux-cris-low.c: New file with support for CRIS.
13591 * linux-crisv32-low.c: Ditto for CRISv32.
13592 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13593 (clean): Add reg-cris.c and reg-crisv32.c.
13594 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13595 reg-crisv32.o, and reg-crisv32.c to make rules.
13596 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13597 recognized targets.
13598
13599 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13600
13601 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13602 of sizeof (PTRACE_XFER_TYPE).
13603 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13604
13605 2005-05-12 Orjan Friberg <orjanf@axis.com>
13606
13607 * target.h (struct target_ops): Add insert_watchpoint,
13608 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13609 pointers for hardware watchpoint support.
13610 * linux-low.h (struct linux_target_ops): Ditto.
13611 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13612 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13613 to linux_target_ops.
13614 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13615 reply packet.
13616 * server.c (main): Recognize 'Z' and 'z' packets.
13617
13618 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13619
13620 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13621 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13622 (the_low_target): Add new members.
13623
13624 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13625
13626 * proc-service.c (ps_lgetregs): Search all_processes instead of
13627 all_threads.
13628
13629 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13630
13631 * server.c (start_inferior): Change return type to int.
13632 (attach_inferior): Change sigptr to int *.
13633 (handle_v_cont, handle_v_requests): Change signal to int *.
13634 (main): Change signal to int.
13635
13636 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
13637
13638 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13639 * configure.srv: Add m32r*-*-linux*.
13640 * linux-m32r-low.c: New file.
13641
13642 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13643
13644 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13645
13646 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13647
13648 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13649 Take unsigned long arguments for PIDs.
13650 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13651 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13652 (wait_for_sigstop, linux_resume_one_process)
13653 (regsets_fetch_inferior_registers, linux_send_signal)
13654 (linux_read_auxv): Likewise. Update the types of variables holding
13655 PIDs. Update format string specifiers.
13656 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13657 * remote-utils.c (prepare_resume_reply): Likewise.
13658 * server.c (cont_thread, general_thread, step_thread)
13659 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13660 unsigned long.
13661 (handle_query): Update format specifiers.
13662 (handle_v_cont, main): Use strtoul for thread IDs.
13663 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13664 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13665 (general_thread, step_thread, thread_from_wait)
13666 (old_thread_from_wait): Update.
13667 * target.h (struct thread_resume): Use unsigned long for THREAD.
13668 (struct target_ops): Use unsigned long for arguments to attach and
13669 thread_alive.
13670
13671 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13672
13673 * acinclude.m4: Include bfd/bfd.m4 directly.
13674 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13675 <agriffis@toolchain.org>.
13676 * aclocal.m4, configure: Regenerated.
13677
13678 2005-01-07 Andrew Cagney <cagney@gnu.org>
13679
13680 * configure.ac: Rename configure.in, require autoconf 2.59.
13681 * configure: Re-generate.
13682
13683 2004-12-08 Daniel Jacobowitz <dan@debian.org>
13684
13685 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13686 LIBS when finished.
13687 * aclocal.m4: Regenerated.
13688 * configure: Regenerated.
13689
13690 2004-11-21 Andreas Schwab <schwab@suse.de>
13691
13692 * linux-m68k-low.c (m68k_num_gregs): Define.
13693 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13694 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13695 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13696 (m68k_breakpoint_at): New. Add to the_low_target.
13697
13698 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13699 srv_linux_thread_db to yes.
13700
13701 2004-10-20 Joel Brobecker <brobecker@gnat.com>
13702
13703 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13704 (ARCH_SET_FS): Likewise.
13705 (ARCH_GET_FS): Likewise.
13706 (ARCH_GET_GS): Likewise.
13707
13708 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13709
13710 * linux-i386-low.c (ps_get_thread_area): New.
13711 * linux-x86-64-low.c (ps_get_thread_area): New.
13712 * linux-low.c: Include <sys/syscall.h>.
13713 (linux_kill_one_process): Don't kill the first thread here.
13714 (linux_kill): Kill the first thread here.
13715 (kill_lwp): New function.
13716 (send_sigstop, linux_send_signal): Use it.
13717 * proc-service.c: Clean up #ifdefs.
13718 (fpregset_info): Delete.
13719 (ps_lgetregs): Update and enable implementation.
13720 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13721 implementations.
13722 * remote-utils.c (struct sym_cache, symbol_cache): New.
13723 (input_interrupt): Print a clearer message.
13724 (async_io_enabled): New variable.
13725 (enable_async_io, disable_async_io): Use it. Update comments.
13726 (look_up_one_symbol): Use the symbol cache.
13727 * thread-db.c (thread_db_look_up_symbols): New function.
13728 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13729
13730 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13731
13732 * configure.in: Test for -rdynamic.
13733 * configure: Regenerated.
13734 * Makefile (INTERNAL_LDFLAGS): New.
13735 (gdbserver, gdbreplay): Use it.
13736
13737 2004-09-02 Andrew Cagney <cagney@gnu.org>
13738
13739 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13740
13741 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
13742
13743 * linux-low.c (linux_wait): Clear all_processes list also.
13744
13745 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13746
13747 * linux-low.c: Include <errno.h>. Remove extern declaration of
13748 errno.
13749
13750 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13751
13752 * gdbreplay.c, server.h, utils.c: Update copyright years.
13753
13754 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13755
13756 * server.c (main): Print child status or termination signal from
13757 variable 'signal', not 'sig'.
13758
13759 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13760
13761 * linux-low.c (linux_read_memory): Change return type to
13762 int. Check for and return error from ptrace().
13763 * target.c (read_inferior_memory): Change return type to int. Pass
13764 back return status from the_target->read_memory().
13765 * target.h (struct target_ops): Adapt *read_memory() prototype.
13766 Update comment.
13767 (read_inferior_memory): Adapt prototype.
13768 * server.c (main): Return an error packet if
13769 read_inferior_memory() returns an error.
13770
13771 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
13772
13773 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13774 Unify with other clean targets.
13775
13776 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13777
13778 * server.c (handle_v_cont): Call set_desired_inferior.
13779
13780 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13781
13782 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13783
13784 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13785
13786 * linux-low.c (linux_wait): Unblock async I/O.
13787 (linux_resume): Block and enable async I/O.
13788 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13789 * server.h (block_async_io, unblock_async_io): Add prototypes.
13790
13791 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13792
13793 * remote-utils.c (remote_open): Print a status notice after
13794 opening a TCP port.
13795 * server.c (attach_inferior): Print a status notice after
13796 attaching.
13797
13798 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13799
13800 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13801
13802 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
13803
13804 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13805 error packet.
13806 * server.c, target.h: Update copyright years.
13807
13808 2004-02-25 Roland McGrath <roland@redhat.com>
13809
13810 * target.h (struct target_ops): New member `read_auxv'.
13811 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13812 * linux-low.c (linux_read_auxv): New function.
13813 (linux_target_ops): Initialize `read_auxv' member to that.
13814
13815 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13816
13817 Committed by Jim Blandy <jimb@redhat.com>.
13818
13819 * linux-s390-low.c (s390_num_regs): Update.
13820 (s390_regmap): Remove control registers. Use __s390x__ predefine
13821 instead of GPR_SIZE to distiguish s390 and s390x targets.
13822
13823 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
13824
13825 * linux-low.c: Update copyright year.
13826 (check_removed_breakpoint): Clear pending_is_breakpoint.
13827 (linux_set_resume_request, linux_queue_one_thread)
13828 (resume_status_pending_p): New functions.
13829 (linux_continue_one_thread): Use process->resume.
13830 (linux_resume): Only resume threads if there are no pending events.
13831 * linux-low.h (struct process_info): Add resume request
13832 pointer.
13833
13834 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
13835
13836 * regcache.c (new_register_cache): Clear the allocated register
13837 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13838
13839 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
13840
13841 * linux-low.c (linux_resume): Take a struct thread_resume *
13842 argument.
13843 (linux_wait): Update call.
13844 (resume_ptr): New static variable.
13845 (linux_continue_one_thread): Renamed from
13846 linux_continue_one_process. Use resume_ptr.
13847 (linux_resume): Use linux_continue_one_thread.
13848 * server.c (handle_v_cont, handle_v_requests): New functions.
13849 (myresume): New function.
13850 (main): Handle 'v' case.
13851 * target.h (struct thread_resume): New type.
13852 (struct target_ops): Change argument of "resume" to struct
13853 thread_resume *.
13854 (myresume): Delete macro.
13855
13856 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13857
13858 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13859 (uninstall): Support DESTDIR.
13860
13861 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13862
13863 * configure.srv: Add xscale*linux copy of arm*linux entry.
13864
13865 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
13866
13867 * linux-arm-low.c (arm_reinsert_addr): New function.
13868 (the_low_target): Add arm_reinsert_addr.
13869
13870 2003-07-08 Mark Kettenis <kettenis@gnu.org>
13871
13872 * mem-break.c: Remove whitespace at end of file.
13873
13874 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13875
13876 * configure.in: Check whether we need to prototype strerror.
13877 * server.h: Optionally prototype strerror.
13878 * gdbreplay.c (perror_with_name): Use strerror.
13879 * linux-low.c (linux_attach_lwp): Use strerror.
13880 * utils.c (perror_with_name): Use strerror.
13881 * config.in, configure: Regenerated.
13882
13883 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13884
13885 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13886 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13887
13888 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
13889
13890 * Makefile.in (SFILES): Update.
13891 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13892 low-sun3.c: Remove files.
13893
13894 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
13895
13896 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13897 (linux_detach_one_process, linux_detach): New functions.
13898 (linux_target_ops): Add linux_detach.
13899 * server.c (main): Handle 'D' packet.
13900 * target.h (struct target_ops): Add "detach" member.
13901 (detach_inferior): Define.
13902
13903 2003-06-13 Mark Kettenis <kettenis@gnu.org>
13904
13905 From Kelley Cook <kelleycook@wideopenwest.com>:
13906 * configure.srv: Accept i[34567]86 variants.
13907
13908 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
13909
13910 * linux-low.c (linux_wait_for_event): Correct comment typos.
13911 (linux_resume_one_process): Call check_removed_breakpoint.
13912 (linux_send_signal): New function.
13913 (linux_target_ops): Add linux_send_signal.
13914 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13915 of kill.
13916 * target.h (struct target_ops): Add send_signal.
13917
13918 2003-05-29 Jim Blandy <jimb@redhat.com>
13919
13920 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13921 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13922 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13923 away part of the register's value.
13924
13925 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
13926
13927 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13928 (linux_wait_for_event, linux_init_signals): Likewise.
13929
13930 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
13931
13932 * configure.in: Check for stdlib.h.
13933 * configure: Regenerated.
13934 * config.in: Regenerated.
13935
13936 2003-01-04 Andreas Schwab <schwab@suse.de>
13937
13938 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13939
13940 2003-01-02 Andrew Cagney <ac131313@redhat.com>
13941
13942 * Makefile.in: Remove obsolete code.
13943
13944 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
13945
13946 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13947 defined(PT_FPR0_HI).
13948
13949 2002-11-17 Stuart Hughes <seh@zee2.com>
13950
13951 * linux-arm-low.c (arm_num_regs): Increase.
13952 (arm_regmap): Include status register.
13953
13954 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
13955
13956 * linux-low.c (register_addr): Remove incorrect -1 check.
13957
13958 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
13959
13960 * linux-low.c (linux_create_inferior): Call setpgid. Return
13961 the new PID.
13962 (unstopped_p, linux_signal_pid): Remove.
13963 (linux_target_ops): Remove linux_signal_pid.
13964 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13965 global instead of target method.
13966 * target.h (struct target_ops): Remove signal_pid. Update comment
13967 for create_inferior.
13968 * server.c (signal_pid): New variable.
13969 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
13970 gdbserver. Set the child to be the foreground process group.
13971 (attach_inferior): Set signal_pid.
13972
13973 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
13974
13975 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13976
13977 2002-08-20 Jim Blandy <jimb@redhat.com>
13978
13979 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13980 default for this.
13981
13982 2002-08-01 Andrew Cagney <cagney@redhat.com>
13983
13984 * Makefile.in: Make chill references obsolete.
13985
13986 2002-07-24 Kevin Buettner <kevinb@redhat.com>
13987
13988 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13989 * configure: Regenerate.
13990 * config.in: Regenerate.
13991
13992 2002-07-09 David O'Brien <obrien@FreeBSD.org>
13993
13994 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13995 (perror_with_name, remote_close, remote_open, expect, play): Static.
13996
13997 2002-07-04 Michal Ludvig <mludvig@suse.cz>
13998
13999 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14000 byte offsets instead of an array of indexes.
14001 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14002
14003 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14004
14005 * regcache.c: Add comment.
14006
14007 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14008
14009 * thread-db.c: New file.
14010 * proc-service.c: New file.
14011 * acinclude.m4: New file.
14012 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14013 proc-service.o, and thread-db.o.
14014 (linux-low.o): Add USE_THREAD_DB.
14015 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14016 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14017 * aclocal.m4: Regenerated.
14018 * config.in: Regenerated.
14019 * configure: Regenerated.
14020 * configure.in: Check for proc_service.h, sys/procfs.h,
14021 thread_db.h, and linux/elf.h headrs.
14022 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14023 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14024 Check for -lthread_db and thread support.
14025 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14026 PowerPC, and SuperH.
14027 * i387-fp.c: Constify arguments.
14028 * i387-fp.h: Likewise.
14029 * inferiors.c: (struct thread_info): Renamed from
14030 `struct inferior_info'. Remove PID member. Use generic inferior
14031 list header. All uses updated.
14032 (inferiors, signal_pid): Removed.
14033 (all_threads): New variable.
14034 (get_thread): Define.
14035 (add_inferior_to_list): New function.
14036 (for_each_inferior): New function.
14037 (change_inferior_id): New function.
14038 (add_inferior): Removed.
14039 (remove_inferior): New function.
14040 (add_thread): New function.
14041 (free_one_thread): New function.
14042 (remove_thread): New function.
14043 (clear_inferiors): Use for_each_inferior and free_one_thread.
14044 (find_inferior): New function.
14045 (find_inferior_id): New function.
14046 (inferior_target_data): Update argument type.
14047 (set_inferior_target_data): Likewise.
14048 (inferior_regcache_data): Likewise.
14049 (set_inferior_regcache_data): Likewise.
14050 * linux-low.c (linux_bp_reinsert): Remove.
14051 (all_processes, stopping_threads, using_thrads)
14052 (struct pending_signals, debug_threads, pid_of): New.
14053 (inferior_pid): Replace with macro.
14054 (struct inferior_linux_data): Remove.
14055 (get_stop_pc, add_process): New functions.
14056 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14057 Use add_process and add_thread.
14058 (linux_attach_lwp): New function, based on old linux_attach. Use
14059 add_process and add_thread. Set stop_expected for new threads.
14060 (linux_attach): New function.
14061 (linux_kill_one_process): New function.
14062 (linux_kill): Kill all LWPs.
14063 (linux_thread_alive): Use find_inferior_id.
14064 (check_removed_breakpoints, status_pending_p): New functions.
14065 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14066 Update. Use WNOHANG. Wait for cloned processes also. Update process
14067 struct for the found process.
14068 (linux_wait_for_event): New function.
14069 (linux_wait): Use it. Support LWPs.
14070 (send_sigstop, wait_for_sigstop, stop_all_processes)
14071 (linux_resume_one_process, linux_continue_one_process): New functions.
14072 (linux_resume): Support LWPs.
14073 (REGISTER_RAW_SIZE): Remove.
14074 (fetch_register): Use register_size instead. Call supply_register.
14075 (usr_store_inferior_registers): Likewise. Call collect_register.
14076 Fix recursive case.
14077 (regsets_fetch_inferior_registers): Improve error message.
14078 (regsets_store_inferior_registers): Add debugging.
14079 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14080 (unstopped_p, linux_signal_pid): New functions.
14081 (linux_target_ops): Add linux_signal_pid.
14082 (linux_init_signals): New function.
14083 (initialize_low): Call it. Initialize using_threads.
14084 * regcache.c (inferior_regcache_data): Add valid
14085 flag.
14086 (get_regcache): Fetch registers lazily. Add fetch argument
14087 and update all callers.
14088 (regcache_invalidate_one, regcache_invalidate): New
14089 functions.
14090 (new_register_cache): Renamed from create_register_cache.
14091 Return the new regcache.
14092 (free_register_cache): Change argument to a void *.
14093 (registers_to_string, registers_from_string): Call get_regcache
14094 with fetch flag set.
14095 (register_data): Make static. Pass fetch flag to get_regcache.
14096 (supply_register): Call get_regcache with fetch flag clear.
14097 (collect_register): Call get_regcache with fetch flag set.
14098 (collect_register_as_string): New function.
14099 * regcache.h: Update.
14100 * remote-utils.c (putpkt): Flush after debug output and use
14101 stderr.
14102 Handle input interrupts while waiting for an ACK.
14103 (input_interrupt): Use signal_pid method.
14104 (getpkt): Flush after debug output and use stderr.
14105 (outreg): Use collect_register_as_string.
14106 (new_thread_notify, dead_thread_notify): New functions.
14107 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14108 and general_thread.
14109 (look_up_one_symbol): Flush after debug output.
14110 * server.c (step_thread, server_waiting): New variables.
14111 (start_inferior): Don't use signal_pid. Update call to mywait.
14112 (attach_inferior): Update call to mywait.
14113 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14114 (main): Don't fetch/store registers explicitly. Use
14115 set_desired_inferior. Support proposed ``Hs'' packet. Update
14116 calls to mywait.
14117 * server.h: Update.
14118 (struct inferior_list, struct_inferior_list_entry): New.
14119 * target.c (set_desired_inferior): New.
14120 (write_inferior_memory): Constify.
14121 (mywait): New function.
14122 * target.h: Update.
14123 (struct target_ops): New signal_pid method.
14124 (mywait): Removed macro, added prototype.
14125
14126 * linux-low.h (regset_func): Removed.
14127 (regset_fill_func, regset_store_func): New.
14128 (enum regset_type): New.
14129 (struct regset_info): Add type field. Use new operation types.
14130 (struct linux_target_ops): stop_pc renamed to get_pc.
14131 Add decr_pc_after_break and breakpoint_at.
14132 (get_process, get_thread_proess, get_process_thread)
14133 (strut process_info, all_processes, linux_attach_lwp)
14134 (thread_db_init): New.
14135
14136 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14137 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14138 (the_low_target): Add new members.
14139 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14140 (i386_store_fpxregset): Constify.
14141 (target_regsets): Add new kind identifier.
14142 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14143 (i386_set_pc): Add debugging.
14144 (i386_breakpoint_at): New function.
14145 (the_low_target): Add new members.
14146 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14147 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14148 (mips_breakpoint_at): New.
14149 (the_low_target): Add new members.
14150 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14151 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14152 (the_low_target): Add new members.
14153 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14154 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14155 (the_low_target): Add new members.
14156 * linux-x86-64-low.c (target_regsets): Add new kind
14157 identifier.
14158
14159 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14160
14161 From Martin Pool <mbp@samba.org>:
14162 * server.c (gdbserver_usage): New function.
14163 (main): Call it.
14164
14165 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14166
14167 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14168 stop_at -> stop_pc.
14169
14170 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14171
14172 * Makefile.in: Remove obsolete code.
14173
14174 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14175
14176 * linux-low.c (regsets_fetch_inferior_registers),
14177 (regsets_store_inferior_registers): Removed cast to int from
14178 ptrace() calls.
14179 * regcache.h: Added declaration of struct inferior_info.
14180
14181 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14182
14183 * inferiors.c (struct inferior_info): Add regcache_data.
14184 (add_inferior): Call create_register_cache.
14185 (clear_inferiors): Call free_register_cache.
14186 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14187 * regcache.c (struct inferior_regcache_data): New.
14188 (registers): Remove.
14189 (get_regcache): New function.
14190 (create_register_cache, free_register_cache): New functions.
14191 (set_register_cache): Don't initialize the register cache here.
14192 (registers_to_string, registers_from_string, register_data): Call
14193 get_regcache.
14194 * regcache.h: Add prototypes.
14195 * server.h: Likewise.
14196
14197 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14198
14199 * mem-break.c: New file.
14200 * mem-break.h: New file.
14201 * Makefile.in: Add mem-break.o rule; update server.h
14202 dependencies.
14203 * inferiors.c (struct inferior_info): Add target_data
14204 member.
14205 (clear_inferiors): Free target_data member if set.
14206 (inferior_target_data, set_inferior_target_data): New functions.
14207 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14208 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14209 * linux-low.c (linux_bp_reinsert): New variable.
14210 (struct inferior_linux_data): New.
14211 (linux_create_inferior): Use set_inferior_target_data.
14212 (linux_attach): Likewise. Call add_inferior.
14213 (linux_wait_for_one_inferior): New function.
14214 (linux_wait): Call it.
14215 (linux_write_memory): Add const.
14216 (initialize_low): Call set_breakpoint_data.
14217 * linux-low.h (struct linux_target_ops): Add breakpoint
14218 handling members.
14219 * server.c (attach_inferior): Remove extra add_inferior
14220 call.
14221 * server.h: Include mem-break.h. Update inferior.c
14222 prototypes.
14223 * target.c (read_inferior_memory)
14224 (write_inferior_memory): New functions.
14225 * target.h (read_inferior_memory)
14226 (write_inferior_memory): Change macros to prototypes.
14227 (struct target_ops): Update comments. Add const to write_memory
14228 definition.
14229
14230 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14231
14232 * linux-low.c (usr_store_inferior_registers): Support
14233 registers which are allowed to fail to store.
14234 * linux-low.h (linux_target_ops): Likewise.
14235 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14236 (ppc_cannot_store_register): FPSCR may not be storable.
14237
14238 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14239
14240 * server.h: Include <string.h> if HAVE_STRING_H.
14241 * ChangeLog: Correct paths in last ChangeLog entry.
14242
14243 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14244
14245 * linux-low.h: Remove obsolete prototypes.
14246 (struct linux_target_ops): New.
14247 (extern the_low_target): New.
14248 * linux-low.c (num_regs, regmap): Remove declarations.
14249 (register_addr): Use the_low_target explicitly.
14250 (fetch_register): Likewise.
14251 (usr_fetch_inferior_registers): Likewise.
14252 (usr_store_inferior_registers): Likewise.
14253 * linux-arm-low.c (num_regs): Remove.
14254 (arm_num_regs): Define.
14255 (arm_regmap): Renamed from regmap, made static.
14256 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14257 made static.
14258 (arm_cannot_store_register): Renamed from cannot_store_register,
14259 made static.
14260 (the_low_target): New.
14261 * linux-i386-low.c (num_regs): Remove.
14262 (i386_num_regs): Define.
14263 (i386_regmap): Renamed from regmap, made static.
14264 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14265 made static.
14266 (i386_cannot_store_register): Renamed from cannot_store_register,
14267 made static.
14268 (the_low_target): New.
14269 * linux-ia64-low.c (num_regs): Remove.
14270 (ia64_num_regs): Define.
14271 (ia64_regmap): Renamed from regmap, made static.
14272 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14273 made static.
14274 (ia64_cannot_store_register): Renamed from cannot_store_register,
14275 made static.
14276 (the_low_target): New.
14277 * linux-m68k-low.c (num_regs): Remove.
14278 (m68k_num_regs): Define.
14279 (m68k_regmap): Renamed from regmap, made static.
14280 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14281 made static.
14282 (m68k_cannot_store_register): Renamed from cannot_store_register,
14283 made static.
14284 (the_low_target): New.
14285 * linux-mips-low.c (num_regs): Remove.
14286 (mips_num_regs): Define.
14287 (mips_regmap): Renamed from regmap, made static.
14288 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14289 made static.
14290 (mips_cannot_store_register): Renamed from cannot_store_register,
14291 made static.
14292 (the_low_target): New.
14293 * linux-ppc-low.c (num_regs): Remove.
14294 (ppc_num_regs): Define.
14295 (ppc_regmap): Renamed from regmap, made static.
14296 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14297 made static.
14298 (ppc_cannot_store_register): Renamed from cannot_store_register,
14299 made static.
14300 (the_low_target): New.
14301 * linux-s390-low.c (num_regs): Remove.
14302 (s390_num_regs): Define.
14303 (s390_regmap): Renamed from regmap, made static.
14304 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14305 made static.
14306 (s390_cannot_store_register): Renamed from cannot_store_register,
14307 made static.
14308 (the_low_target): New.
14309 * linux-sh-low.c (num_regs): Remove.
14310 (sh_num_regs): Define.
14311 (sh_regmap): Renamed from regmap, made static.
14312 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14313 made static.
14314 (sh_cannot_store_register): Renamed from cannot_store_register,
14315 made static.
14316 (the_low_target): New.
14317 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14318 (the_low_target): New.
14319
14320 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14321
14322 * Makefile.in: Add stamp-h target.
14323 * configure.in: Create stamp-h.
14324 * configure: Regenerated.
14325
14326 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14327
14328 * inferiors.c: New file.
14329 * target.c: New file.
14330 * target.h: New file.
14331 * Makefile.in: Add target.o and inferiors.o. Update
14332 dependencies.
14333 * linux-low.c (inferior_pid): New static variable,
14334 moved from server.c.
14335 (linux_create_inferior): Renamed from create_inferior.
14336 Call add_inferior. Return 0 on success instead of a PID.
14337 (linux_attach): Renamed from myattach.
14338 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14339 (linux_thread_alive): Renamed from mythread_alive.
14340 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14341 child dies.
14342 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14343 (regsets_store_inferior_registers): Correct error message.
14344 Add missing ``return 0''.
14345 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14346 (linux_store_registers): Renamed from store_inferior_registers.
14347 (linux_read_memory): Renamed from read_inferior_memory.
14348 (linux_write_memory): Renamed from write_inferior_memory.
14349 (linux_target_ops): New structure.
14350 (initialize_low): Call set_target_ops ().
14351 * remote-utils.c (unhexify): New function.
14352 (hexify): New function.
14353 (input_interrupt): Send signals to ``signal_pid''.
14354 * server.c (inferior_pid): Remove.
14355 (start_inferior): Update create_inferior call.
14356 (attach_inferior): Call add_inferior.
14357 (handle_query): New function.
14358 (main): Call handle_query for `q' packets.
14359 * server.h: Include "target.h". Remove obsolete prototypes.
14360 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14361
14362 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14363
14364 * Makefile.in: Add WARN_CFLAGS. Update configury
14365 dependencies.
14366 * configure.in: Check for <string.h>
14367 * configure: Regenerate.
14368 * config.in: Regenerate.
14369 * gdbreplay.c: Include needed system headers.
14370 (remote_open): Remove strchr prototype.
14371 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14372 * regcache.c (supply_register): Change buf argument to const void *.
14373 (supply_register_by_name): Likewise.
14374 (collect_register): Change buf argument to void *.
14375 (collect_register_by_name): Likewise.
14376 * regcache.h: Add missing prototypes.
14377 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14378 * server.c (handle_query): New function.
14379 (attached): New static variable, moved out of main.
14380 (main): Quiet longjmp clobber warnings.
14381 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14382 * utils.c (error): Remove NORETURN.
14383 (fatal): Likewise.
This page took 0.330636 seconds and 5 git commands to generate.