Fix grammar in error message.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
... / ...
CommitLineData
12016-07-01 Pedro Alves <palves@redhat.com>
2 Antoine Tremblay <antoine.tremblay@ericsson.com>
3
4 * linux-low.c: Change interface to take the target lwp_info
5 pointer directly and return void. Handle detaching from a zombie
6 thread.
7 (linux_detach_lwp_callback): New function.
8 (linux_detach): Detach from the leader thread after detaching from
9 the clone threads.
10
112016-06-28 Yao Qi <yao.qi@linaro.org>
12
13 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
14 for variable new_offset.
15 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
16 (aarch64_ftrace_insn_reloc_cb): Likewise.
17 (aarch64_ftrace_insn_reloc_tb): Likewise.
18 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
19 PRIx64 instead of PRIx32.
20
212016-06-28 Yao Qi <yao.qi@linaro.org>
22
23 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
24 (the_low_target): Install arm_get_syscall_trapinfo.
25
262016-06-28 Yao Qi <yao.qi@linaro.org>
27
28 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
29 function.
30 (the_low_target): Install aarch64_get_syscall_trapinfo.
31
322016-06-28 Yao Qi <yao.qi@linaro.org>
33
34 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
35 Callers updated.
36 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
37 Remove parameter sysno.
38 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
39 sysret.
40
412016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
42
43 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
44 (s390_emit_ne_goto): Likewise.
45 (s390_emit_lt_goto): Likewise.
46 (s390_emit_le_goto): Likewise.
47 (s390_emit_gt_goto): Likewise.
48 (s390_emit_ge_goto): Likewise.
49 (s390x_emit_eq_goto): Likewise.
50 (s390x_emit_ne_goto): Likewise.
51 (s390x_emit_lt_goto): Likewise.
52 (s390x_emit_le_goto): Likewise.
53 (s390x_emit_gt_goto): Likewise.
54 (s390x_emit_ge_goto): Likewise.
55 (s390_emit_ops_impl): Mark variable static.
56 (s390x_emit_ops): Likewise.
57
582016-06-17 Yao Qi <yao.qi@linaro.org>
59
60 * linux-low.c (handle_extended_wait): Call
61 uninsert_reinsert_breakpoints for the parent process. Remove
62 reinsert breakpoints from the child process. Reinsert them to
63 the parent process when vfork is done.
64 * mem-break.c (uninsert_reinsert_breakpoints): New function.
65 (reinsert_reinsert_breakpoints): New function.
66 * mem-break.h (uninsert_reinsert_breakpoints): Declare
67 (reinsert_reinsert_breakpoints): Declare.
68
692016-06-17 Yao Qi <yao.qi@linaro.org>
70
71 * linux-low.c (handle_extended_wait): If the parent is doing
72 step-over, remove the reinsert breakpoints from the forked child.
73
742016-06-17 Yao Qi <yao.qi@linaro.org>
75
76 * linux-low.c (unsuspend_all_lwps): Declare.
77 (linux_low_filter_event): If thread exited, call finish_step_over.
78 If step-over is finished, unsuspend other threads.
79
802016-06-17 Yao Qi <yao.qi@linaro.org>
81
82 * linux-low.c (linux_resume_one_lwp_throw): Assert
83 has_reinsert_breakpoints returns false.
84 * mem-break.c (delete_disabled_breakpoints): Assert
85 bp type isn't reinsert_breakpoint.
86
872016-06-17 Yao Qi <yao.qi@linaro.org>
88
89 * linux-low.c (maybe_hw_step): New function.
90 (linux_resume_one_lwp_throw): Call maybe_hw_step.
91 (finish_step_over): Switch current_thread to lwp temporarily,
92 and assert has_reinsert_breakpoints returns true.
93 (proceed_one_lwp): Call maybe_hw_step.
94 * mem-break.c (has_reinsert_breakpoints): New function.
95 * mem-break.h (has_reinsert_breakpoints): Declare.
96
972016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
98
99 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
100
1012016-05-17 Yao Qi <yao.qi@linaro.org>
102
103 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
104 instead of find_inferior.
105
1062016-05-05 Yao Qi <yao.qi@linaro.org>
107
108 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
109 Initialize res to zero.
110
1112016-05-05 Yao Qi <yao.qi@linaro.org>
112
113 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
114 to uint32_t.
115
1162016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
117
118 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
119 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
120 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
121
1222016-04-28 Par Olsson <par.olsson@windriver.com>
123 Simon Marchi <simon.marchi@ericsson.com>
124
125 * tracepoint.c (write_inferior_int8): New function.
126 (cmd_qtenable_disable): Write enable flag using
127 write_inferior_int8.
128
1292016-04-25 Yao Qi <yao.qi@linaro.org>
130
131 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
132 (need_step_over_p): Return zero if the LWP has pending signals
133 can be delivered on software single step target.
134
1352016-04-25 Yao Qi <yao.qi@linaro.org>
136
137 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
138 return instead of error.
139
1402016-04-22 Yao Qi <yao.qi@linaro.org>
141
142 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
143 to 23.
144
1452016-04-22 Yao Qi <yao.qi@linaro.org>
146
147 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
148 signal when stepping over breakpoint with software single
149 step.
150
1512016-04-21 Pedro Alves <palves@redhat.com>
152
153 * linux-s390-low.c (s390_collect_ptrace_register)
154 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
155 add casts.
156 (s390_check_regset): Use void * instead of gdb_byte *.
157
1582016-04-20 Pedro Alves <palves@redhat.com>
159
160 * configure: Renegerate.
161
1622016-04-20 Yao Qi <yao.qi@linaro.org>
163
164 * linux-aarch32-low.c: Include "arch/arm-linux.h".
165 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
166 number 16.
167 (arm_store_gregset): Likewise.
168
1692016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
170
171 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
172 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
173 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
174 (amd64-avx-mpx-linux.c): New rules.
175 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
176 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
177 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
178 (srv_amd64_regobj): Add amd64-avx-mpx.o.
179 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
180 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
181 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
182 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
183 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
184 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
185 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
186 * linux-x86-low.c (x86_linux_read_description): Add case for
187 X86_XSTATE_AVX_MPX_MASK.
188 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
189 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
190 init_registers_i386_avx_mpx_linux.
191 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
192 (initialize_low_tracepoint): Call
193 init_registers_i386_avx_mpx_linux.
194 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
195 (initialize_low_tracepoint): Call
196 init_registers_amd64_avx_mpx_linux.
197 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
198 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
199 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
200 declarations.
201
2022016-04-18 Pedro Alves <palves@redhat.com>
203
204 * configure: Regenerate.
205
2062016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
207
208 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
209 (aarch64_emit_sub): Likewise.
210
2112016-04-12 Pedro Alves <palves@redhat.com>
212
213 * utils.c (prepare_to_throw_exception): Delete.
214
2152016-04-05 Simon Marchi <simon.marchi@ericsson.com>
216
217 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
218
2192016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
220
221 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
222
2232016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
224
225 * linux-aarch64-ipa.c: Add <elf.h> include.
226 * linux-ppc-ipa.c: Add <elf.h> include.
227 * linux-s390-ipa.c: Add <elf.h> include.
228
2292016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
230
231 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
232 (get_raw_reg_ptr): Likewise.
233 (get_trace_state_variable_value_ptr): Likewise.
234 (set_trace_state_variable_value_ptr): Likewise.
235 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
236 char *.
237
2382016-03-31 Wei-cheng Wang <cole945@gmail.com>
239 Marcin Kościelnicki <koriakin@0x04.net>
240
241 PR/17221
242 * linux-ppc-low.c (emit_insns): New function.
243 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
244 (ppc_emit_prologue): New function.
245 (ppc_emit_epilogue): New function.
246 (ppc_emit_add): New function.
247 (ppc_emit_sub): New function.
248 (ppc_emit_mul): New function.
249 (ppc_emit_lsh): New function.
250 (ppc_emit_rsh_signed): New function.
251 (ppc_emit_rsh_unsigned): New function.
252 (ppc_emit_ext): New function.
253 (ppc_emit_zero_ext): New function.
254 (ppc_emit_log_not): New function.
255 (ppc_emit_bit_and): New function.
256 (ppc_emit_bit_or): New function.
257 (ppc_emit_bit_xor): New function.
258 (ppc_emit_bit_not): New function.
259 (ppc_emit_equal): New function.
260 (ppc_emit_less_signed): New function.
261 (ppc_emit_less_unsigned): New function.
262 (ppc_emit_ref): New function.
263 (ppc_emit_const): New function.
264 (ppc_emit_reg): New function.
265 (ppc_emit_pop): New function.
266 (ppc_emit_stack_flush): New function.
267 (ppc_emit_swap): New function.
268 (ppc_emit_stack_adjust): New function.
269 (ppc_emit_call): New function.
270 (ppc_emit_int_call_1): New function.
271 (ppc_emit_void_call_2): New function.
272 (ppc_emit_if_goto): New function.
273 (ppc_emit_goto): New function.
274 (ppc_emit_eq_goto): New function.
275 (ppc_emit_ne_goto): New function.
276 (ppc_emit_lt_goto): New function.
277 (ppc_emit_le_goto): New function.
278 (ppc_emit_gt_goto): New function.
279 (ppc_emit_ge_goto): New function.
280 (ppc_write_goto_address): New function.
281 (ppc_emit_ops_impl): New static variable.
282 (ppc64v1_emit_prologue): New function.
283 (ppc64v2_emit_prologue): New function.
284 (ppc64_emit_epilogue): New function.
285 (ppc64_emit_add): New function.
286 (ppc64_emit_sub): New function.
287 (ppc64_emit_mul): New function.
288 (ppc64_emit_lsh): New function.
289 (ppc64_emit_rsh_signed): New function.
290 (ppc64_emit_rsh_unsigned): New function.
291 (ppc64_emit_ext): New function.
292 (ppc64_emit_zero_ext): New function.
293 (ppc64_emit_log_not): New function.
294 (ppc64_emit_bit_and): New function.
295 (ppc64_emit_bit_or): New function.
296 (ppc64_emit_bit_xor): New function.
297 (ppc64_emit_bit_not): New function.
298 (ppc64_emit_equal): New function.
299 (ppc64_emit_less_signed): New function.
300 (ppc64_emit_less_unsigned): New function.
301 (ppc64_emit_ref): New function.
302 (ppc64_emit_const): New function.
303 (ppc64v1_emit_reg): New function.
304 (ppc64v2_emit_reg): New function.
305 (ppc64_emit_pop): New function.
306 (ppc64_emit_stack_flush): New function.
307 (ppc64_emit_swap): New function.
308 (ppc64v1_emit_call): New function.
309 (ppc64v2_emit_call): New function.
310 (ppc64v1_emit_int_call_1): New function.
311 (ppc64v2_emit_int_call_1): New function.
312 (ppc64v1_emit_void_call_2): New function.
313 (ppc64v2_emit_void_call_2): New function.
314 (ppc64_emit_if_goto): New function.
315 (ppc64_emit_eq_goto): New function.
316 (ppc64_emit_ne_goto): New function.
317 (ppc64_emit_lt_goto): New function.
318 (ppc64_emit_le_goto): New function.
319 (ppc64_emit_gt_goto): New function.
320 (ppc64_emit_ge_goto): New function.
321 (ppc64v1_emit_ops_impl): New static variable.
322 (ppc64v2_emit_ops_impl): New static variable.
323 (ppc_emit_ops): New function.
324 (linux_low_target): Wire in ppc_emit_ops.
325
3262016-03-31 Wei-cheng Wang <cole945@gmail.com>
327 Marcin Kościelnicki <koriakin@0x04.net>
328
329 PR/17221
330 * Makefile.in: Add powerpc-*-ipa.o
331 * configure.srv: Add ipa_obj for powerpc*-linux.
332 * linux-ppc-ipa.c: New file.
333 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
334 includes.
335 (PPC_FIELD): New macro.
336 (PPC_SEXT): New macro.
337 (PPC_OP6): New macro.
338 (PPC_BO): New macro.
339 (PPC_LI): New macro.
340 (PPC_BD): New macro.
341 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
342 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
343 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
344 (ppc_get_thread_area): New function.
345 (is_elfv2_inferior): New function.
346 (gen_ds_form): New function.
347 (GEN_STD): New macro.
348 (GEN_STDU): New macro.
349 (GEN_LD): New macro.
350 (GEN_LDU): New macro.
351 (gen_d_form): New function.
352 (GEN_ADDI): New macro.
353 (GEN_ADDIS): New macro.
354 (GEN_LI): New macro.
355 (GEN_LIS): New macro.
356 (GEN_ORI): New macro.
357 (GEN_ORIS): New macro.
358 (GEN_LWZ): New macro.
359 (GEN_STW): New macro.
360 (GEN_STWU): New macro.
361 (gen_xfx_form): New function.
362 (GEN_MFSPR): New macro.
363 (GEN_MTSPR): New macro.
364 (GEN_MFCR): New macro.
365 (GEN_MTCR): New macro.
366 (GEN_SYNC): New macro.
367 (GEN_LWSYNC): New macro.
368 (gen_x_form): New function.
369 (GEN_OR): New macro.
370 (GEN_MR): New macro.
371 (GEN_LWARX): New macro.
372 (GEN_STWCX): New macro.
373 (GEN_CMPW): New macro.
374 (gen_md_form): New function.
375 (GEN_RLDICL): New macro.
376 (GEN_RLDICR): New macro.
377 (gen_i_form): New function.
378 (GEN_B): New macro.
379 (GEN_BL): New macro.
380 (gen_b_form): New function.
381 (GEN_BNE): New macro.
382 (GEN_LOAD): New macro.
383 (GEN_STORE): New macro.
384 (gen_limm): New function.
385 (gen_atomic_xchg): New function.
386 (gen_call): New function.
387 (ppc_relocate_instruction): New function.
388 (ppc_install_fast_tracepoint_jump_pad): New function.
389 (ppc_get_min_fast_tracepoint_insn_len): New function.
390 (ppc_get_ipa_tdesc_idx): New function.
391 (the_low_target): Wire in the new functions.
392 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
393 tdescs.
394 * linux-ppc-tdesc.h: New file.
395
3962016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
397
398 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
399 (alloc_jump_pad_buffer): New function.
400 * linux-amd64-ipa.c: Add <sys/mman.h> include.
401 (alloc_jump_pad_buffer): New function.
402 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
403 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
404 (alloc_jump_pad_buffer): New function.
405 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
406 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
407 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
408 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
409
4102016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
411
412 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
413 * linux-amd64-ipa.c: Likewise.
414 * linux-i386-ipa.c: Likewise.
415 * linux-s390-ipa.c: Likewise.
416 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
417 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
418 set_trace_state_variable_value_ptr.
419 (struct ipa_sym_addresses): Likewise.
420 (symbol_list): Likewise.
421 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
422 accessing gdb_collect directly.
423 (gdb_collect_ptr_type): New typedef.
424 (get_raw_reg_ptr_type): New typedef.
425 (get_trace_state_variable_value_ptr_type): New typedef.
426 (set_trace_state_variable_value_ptr_type): New typedef.
427 (gdb_collect_ptr): New global.
428 (get_raw_reg_ptr): New global.
429 (get_trace_state_variable_value_ptr): New global.
430 (set_trace_state_variable_value_ptr): New global.
431 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
432 accessing get_raw_reg directly.
433 (get_get_tsv_func_addr): Likewise for
434 get_trace_state_variable_value_ptr.
435 (get_set_tsv_func_addr): Likewise for
436 set_trace_state_variable_value_ptr.
437 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
438
4392016-03-30 Simon Marchi <simon.marchi@ericsson.com>
440
441 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
442
4432016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
444
445 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
446 packets.
447 (relocate_instruction): Remove own_buf.
448 * server.c (own_buf): Make global.
449 (handle_v_requests): Make global.
450 * server.h (own_buf): New declaration.
451 (handle_v_requests): New prototype.
452
4532016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
454
455 PR 18377
456 * linux-s390-low.c (add_insns): New function.
457 (s390_emit_prologue): New function.
458 (s390_emit_epilogue): New function.
459 (s390_emit_add): New function.
460 (s390_emit_sub): New function.
461 (s390_emit_mul): New function.
462 (s390_emit_lsh): New function.
463 (s390_emit_rsh_signed): New function.
464 (s390_emit_rsh_unsigned): New function.
465 (s390_emit_ext): New function.
466 (s390_emit_log_not): New function.
467 (s390_emit_bit_and): New function.
468 (s390_emit_bit_or): New function.
469 (s390_emit_bit_xor): New function.
470 (s390_emit_bit_not): New function.
471 (s390_emit_equal): New function.
472 (s390_emit_less_signed): New function.
473 (s390_emit_less_unsigned): New function.
474 (s390_emit_ref): New function.
475 (s390_emit_if_goto): New function.
476 (s390_emit_goto): New function.
477 (s390_write_goto_address): New function.
478 (s390_emit_litpool): New function.
479 (s390_emit_const): New function.
480 (s390_emit_call): New function.
481 (s390_emit_reg): New function.
482 (s390_emit_pop): New function.
483 (s390_emit_stack_flush): New function.
484 (s390_emit_zero_ext): New function.
485 (s390_emit_swap): New function.
486 (s390_emit_stack_adjust): New function.
487 (s390_emit_set_r2): New function.
488 (s390_emit_int_call_1): New function.
489 (s390_emit_void_call_2): New function.
490 (s390_emit_eq_goto): New function.
491 (s390_emit_ne_goto): New function.
492 (s390_emit_lt_goto): New function.
493 (s390_emit_le_goto): New function.
494 (s390_emit_gt_goto): New function.
495 (s390_emit_ge_goto): New function.
496 (s390x_emit_prologue): New function.
497 (s390x_emit_epilogue): New function.
498 (s390x_emit_add): New function.
499 (s390x_emit_sub): New function.
500 (s390x_emit_mul): New function.
501 (s390x_emit_lsh): New function.
502 (s390x_emit_rsh_signed): New function.
503 (s390x_emit_rsh_unsigned): New function.
504 (s390x_emit_ext): New function.
505 (s390x_emit_log_not): New function.
506 (s390x_emit_bit_and): New function.
507 (s390x_emit_bit_or): New function.
508 (s390x_emit_bit_xor): New function.
509 (s390x_emit_bit_not): New function.
510 (s390x_emit_equal): New function.
511 (s390x_emit_less_signed): New function.
512 (s390x_emit_less_unsigned): New function.
513 (s390x_emit_ref): New function.
514 (s390x_emit_if_goto): New function.
515 (s390x_emit_const): New function.
516 (s390x_emit_call): New function.
517 (s390x_emit_reg): New function.
518 (s390x_emit_pop): New function.
519 (s390x_emit_stack_flush): New function.
520 (s390x_emit_zero_ext): New function.
521 (s390x_emit_swap): New function.
522 (s390x_emit_stack_adjust): New function.
523 (s390x_emit_int_call_1): New function.
524 (s390x_emit_void_call_2): New function.
525 (s390x_emit_eq_goto): New function.
526 (s390x_emit_ne_goto): New function.
527 (s390x_emit_lt_goto): New function.
528 (s390x_emit_le_goto): New function.
529 (s390x_emit_gt_goto): New function.
530 (s390x_emit_ge_goto): New function.
531 (s390_emit_ops): New function.
532 (struct linux_target_ops): Fill in emit_ops hook.
533
5342016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
535
536 PR 18377
537 * Makefile.in: Add s390 IPA files.
538 * configure.srv: Build IPA for s390.
539 * linux-s390-ipa.c: New file.
540 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
541 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
542 (tdesc_s390_linux32): Likewise.
543 (init_registers_s390_linux32v1): Likewise.
544 (tdesc_s390_linux32v1): Likewise.
545 (init_registers_s390_linux32v2): Likewise.
546 (tdesc_s390_linux32v2): Likewise.
547 (init_registers_s390_linux64): Likewise.
548 (tdesc_s390_linux64): Likewise.
549 (init_registers_s390_linux64v1): Likewise.
550 (tdesc_s390_linux64v1): Likewise.
551 (init_registers_s390_linux64v2): Likewise.
552 (tdesc_s390_linux64v2): Likewise.
553 (init_registers_s390_te_linux64): Likewise.
554 (tdesc_s390_te_linux64): Likewise.
555 (init_registers_s390_vx_linux64): Likewise.
556 (tdesc_s390_vx_linux64): Likewise.
557 (init_registers_s390_tevx_linux64): Likewise.
558 (tdesc_s390_tevx_linux64): Likewise.
559 (init_registers_s390x_linux64): Likewise.
560 (tdesc_s390x_linux64): Likewise.
561 (init_registers_s390x_linux64v1): Likewise.
562 (tdesc_s390x_linux64v1): Likewise.
563 (init_registers_s390x_linux64v2): Likewise.
564 (tdesc_s390x_linux64v2): Likewise.
565 (init_registers_s390x_te_linux64): Likewise.
566 (tdesc_s390x_te_linux64): Likewise.
567 (init_registers_s390x_vx_linux64): Likewise.
568 (tdesc_s390x_vx_linux64): Likewise.
569 (init_registers_s390x_tevx_linux64): Likewise.
570 (tdesc_s390x_tevx_linux64): Likewise.
571 (have_hwcap_s390_vx): New static variable.
572 (s390_arch_setup): Fill have_hwcap_s390_vx.
573 (s390_get_thread_area): New function.
574 (s390_ft_entry_gpr_esa): New const.
575 (s390_ft_entry_gpr_zarch): New const.
576 (s390_ft_entry_misc): New const.
577 (s390_ft_entry_fr): New const.
578 (s390_ft_entry_vr): New const.
579 (s390_ft_main_31): New const.
580 (s390_ft_main_64): New const.
581 (s390_ft_exit_fr): New const.
582 (s390_ft_exit_vr): New const.
583 (s390_ft_exit_misc): New const.
584 (s390_ft_exit_gpr_esa): New const.
585 (s390_ft_exit_gpr_zarch): New const.
586 (append_insns): New function.
587 (s390_relocate_instruction): New function.
588 (s390_install_fast_tracepoint_jump_pad): New function.
589 (s390_get_min_fast_tracepoint_insn_len): New function.
590 (s390_get_ipa_tdesc_idx): New function.
591 (struct linux_target_ops): Wire in the above functions.
592 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
593 * linux-s390-tdesc.h: New file.
594
5952016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
596
597 * linux-s390-low.c (s390_supports_tracepoints): New function.
598 (struct linux_target_ops): Fill supports_tracepoints hook.
599
6002016-03-18 Yao Qi <yao.qi@linaro.org>
601
602 * linux-low.c (lwp_signal_can_be_delivered): New function.
603 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
604
6052016-03-18 Yao Qi <yao.qi@linaro.org>
606
607 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
608 0 if signal is enqueued. Remove 'signal' from one debugging
609 message. Move one debugging message to some lines below.
610 Remove code setting 'signal' to 0.
611
6122016-03-18 Yao Qi <yao.qi@linaro.org>
613
614 * linux-low.c (linux_low_filter_event): Remove redundant
615 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
616
6172016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
618
619 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
620 (struct linux_target_ops): Wire in the above.
621
6222016-03-03 Yao Qi <yao.qi@linaro.org>
623
624 * linux-low.c: Update comments to start_step_over.
625
6262016-03-03 Yao Qi <yao.qi@linaro.org>
627
628 PR server/19736
629 * linux-low.c (handle_extended_wait): Set child suspended
630 if event_lwp->bp_reinsert isn't zero.
631
6322016-03-02 Yao Qi <yao.qi@linaro.org>
633
634 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
635 enqueue_pending_signal.
636
6372016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
638
639 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
640 is actually loaded.
641
6422016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
643
644 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
645 (s390_regmap_3264) [!__s390x__]: New global.
646 (s390_collect_ptrace_register): Skip map entries containing -1.
647 (s390_supply_ptrace_register): Ditto.
648 (s390_fill_gprs_high): New function.
649 (s390_store_gprs_high): New function.
650 (s390_regsets): Add NT_S390_HIGH_GPRS.
651 (s390_get_hwcap): Enable on 31-bit.
652 (have_hwcap_s390_high_gprs): Enable on 31-bit.
653 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
654 Detect NT_S390_HIGH_GPRS.
655 (s390_usrregs_info_3264): Enable on 31-bit.
656 (s390_regs_info): Enable regs_info_3264 on 31-bit.
657 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
658
6592016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
660
661 PR gdb/13808
662 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
663 * configure.srv: Ditto.
664 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
665 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
666 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
667 (init_registers_amd64_linux): Remove prototype.
668 (tdesc_amd64_linux): Remove declaration.
669 (get_ipa_tdesc): New function.
670 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
671 initialize remaining tdescs.
672 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
673 (init_registers_i386_linux): Remove prototype.
674 (tdesc_i386_linux): Remove declaration.
675 (get_ipa_tdesc): New function.
676 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
677 initialize remaining tdescs.
678 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
679 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
680 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
681 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
682 (x86_get_ipa_tdesc_idx): New function.
683 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
684 * linux-x86-tdesc.h: New file.
685 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
686 (target_get_ipa_tdesc_idx): New macro.
687 * tracepoint.c (ipa_tdesc_idx): New macro.
688 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
689 (symbol_list): Add ipa_tdesc_idx.
690 (cmd_qtstart): Write ipa_tdesc_idx in the target.
691 (ipa_tdesc): Remove.
692 (ipa_tdesc_idx): New variable.
693 (get_context_regcache): Use get_ipa_tdesc.
694 (gdb_collect): Ditto.
695 (gdb_probe): Ditto.
696 * tracepoint.h (get_ipa_tdesc): New prototype.
697 (ipa_tdesc): Remove.
698
6992016-02-24 Pedro Alves <palves@redhat.com>
700
701 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
702 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
703 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
704 Factor out common code between the USE_SIGTRAP_SIGINFO and
705 !USE_SIGTRAP_SIGINFO blocks.
706 (linux_low_filter_event): Call save_stop_reason instead of
707 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
708 Update comments.
709 (linux_wait_1): Update comments.
710
7112016-02-24 Wei-cheng Wang <cole945@gmail.com>
712
713 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
714 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
715 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
716 ppc_insert_point, ppc_remove_point.
717
7182016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
719
720 * linux-s390-low.c (s390_supports_z_point_type): New function.
721 (struct linux_target_ops): Wire s390_supports_z_point_type in.
722
7232016-02-16 Yao Qi <yao.qi@linaro.org>
724
725 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
726 PC. Get pc from regcache_read_pc.
727
7282016-02-12 Yao Qi <yao.qi@linaro.org>
729
730 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
731 or linux_get_pc_32bit.
732 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
733
7342016-02-12 Yao Qi <yao.qi@linaro.org>
735
736 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
737 arm_linux_get_next_pcs_fixup.
738
7392016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
740
741 * tracepoint.c (x_tracepoint_action_download): Change
742 write_inferior_data_ptr to write_inferior_data_pointer.
743 (cmd_qtstart): Likewise.
744 (write_inferior_data_ptr): Remove.
745 (download_agent_expr): Change write_inferior_data_ptr to
746 write_inferior_data_pointer.
747 (download_tracepoint_1): Likewise.
748 (download_tracepoint): Likewise.
749 (download_trace_state_variables): Likewise.
750
7512016-02-11 Wei-cheng Wang <cole945@gmail.com>
752 Marcin Kościelnicki <koriakin@0x04.net>
753
754 * tracepoint.c (struct tracepoint_action_ops): Remove.
755 (struct tracepoint_action): Remove ops.
756 (m_tracepoint_action_download, r_tracepoint_action_download)
757 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
758 size and offset accordingly.
759 (m_tracepoint_action_ops, r_tracepoint_action_ops)
760 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
761 (tracepoint_action_send, tracepoint_action_download): New functions.
762 Helpers for trace action handlers.
763 (add_tracepoint_action): Remove setup actions ops.
764 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
765
7662016-02-10 Yao Qi <yao.qi@linaro.org>
767
768 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
769
7702016-02-09 Simon Marchi <simon.marchi@ericsson.com>
771
772 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
773 to AC_OUTPUT.
774 * configure: Regenerate.
775
7762016-02-09 Simon Marchi <simon.marchi@ericsson.com>
777
778 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
779 void * to gdb_byte *.
780 * linux-low.c (siginfo_fixup): Likewise.
781 (linux_xfer_siginfo): Likewise.
782 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
783 Likewise.
784 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
785
7862016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
787
788 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
789 to srv_tgtobj.
790 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
791 to srv_tgtobj.
792 * linux-x86-low.c [__x86_64__]: Include
793 "nat/amd64-linux-siginfo.h".
794 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
795 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
796 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
797 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
798 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
799 (cpt_si_fd, si_timerid, si_overrun): Move from
800 nat/amd64-linux-siginfo.c.
801 * Makefile.in (amd64-linux-siginfo.o:): New rule.
802
8032016-01-28 Simon Marchi <simon.marchi@ericsson.com>
804
805 * server.c (skip_to_semicolon): Remove.
806 (process_point_options): Use strchrnul instead of
807 skip_to_semicolon.
808
8092016-01-26 Yao Qi <yao.qi@linaro.org>
810
811 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
812 * linux-low.c (install_software_single_step_breakpoints): Don't
813 call regcache_read_pc.
814 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
815 argument pc.
816
8172016-01-26 Yao Qi <yao.qi@linaro.org>
818
819 * linux-low.c (install_software_single_step_breakpoints): Call
820 regcache_read_pc instead of get_pc.
821
8222016-01-26 Yao Qi <yao.qi@linaro.org>
823
824 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
825 (unblock_async_io): Rename to ...
826 (block_unblock_async_io): ... it. New function.
827 (enable_async_io): Don't install SIGIO handler. Unblock it
828 instead.
829 (disable_async_io): Don't ignore SIGIO. Block it instead.
830 (initialize_async_io): Install SIGIO handler. Don't call
831 unblock_async_io.
832
8332016-01-26 Yao Qi <yao.qi@linaro.org>
834
835 * remote-utils.c (getpkt): If the buffer isn't empty, and the
836 first character is '\003', call *the_target->request_interrupt.
837
8382016-01-25 Yao Qi <yao.qi@linaro.org>
839
840 * remote-utils.c (new_thread_notify): Remove.
841 (dead_thread_notify): Likewise.
842 * remote-utils.h (new_thread_notify): Remove declaration.
843 (dead_thread_notify): Likewise.
844
8452016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
846
847 * gdb.trace/pending.exp: Fix expected message on continue.
848
8492016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
850
851 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
852 it works properly on big-endian machines where sizeof (CORE_ADDR)
853 != sizeof (void *).
854
8552016-01-21 Pedro Alves <palves@redhat.com>
856
857 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
858 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
859 * configure: Regenerate.
860
8612016-01-21 Yao Qi <yao.qi@linaro.org>
862
863 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
864 is_thumb and set it according to CPSR saved on the stack.
865 (get_next_pcs_syscall_next_pc): Pass is_thumb to
866 arm_sigreturn_next_pc.
867
8682016-01-18 Yao Qi <yao.qi@linaro.org>
869
870 * linux-low.c (linux_set_pc_64bit): New function.
871 (linux_get_pc_64bit): New function.
872 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
873 Declare.
874 * linux-sparc-low.c (debug_threads): Remove declaration.
875 (sparc_get_pc): Remove.
876 (the_low_target): Use linux_get_pc_64bit instead of
877 sparc_get_pc.
878 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
879 (the_low_target): Use linux_get_pc_64bit and
880 linux_set_pc_64bit.
881
8822016-01-18 Yao Qi <yao.qi@linaro.org>
883
884 * linux-arm-low.c (debug_threads): Remove declaration.
885 (arm_get_pc, arm_set_pc): Remove.
886 (the_low_target): Use linux_get_pc_32bit and
887 linux_set_pc_32bit.
888 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
889 (the_low_target): Use linux_get_pc_32bit and
890 linux_set_pc_32bit.
891 * linux-cris-low.c (debug_threads): Remove declaration.
892 (cris_get_pc, cris_set_pc,): Remove.
893 (the_low_target): Use linux_get_pc_32bit and
894 linux_set_pc_32bit.
895 * linux-crisv32-low.c (debug_threads): Remove declaration.
896 (cris_get_pc, cris_set_pc): Remove.
897 (the_low_target): Use linux_get_pc_32bit and
898 linux_set_pc_32bit.
899 * linux-low.c: Include inttypes.h.
900 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
901 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
902 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
903 (the_low_target): Use linux_get_pc_32bit and
904 linux_set_pc_32bit.
905 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
906 (the_low_target): Use linux_get_pc_32bit and
907 linux_set_pc_32bit.
908 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
909 (the_low_target): Use linux_get_pc_32bit and
910 linux_set_pc_32bit.
911 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
912 (the_low_target): Use linux_get_pc_32bit and
913 linux_set_pc_32bit.
914 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
915 (the_low_target): Use linux_get_pc_32bit and
916 linux_set_pc_32bit.
917
9182016-01-18 Gary Benson <gbenson@redhat.com>
919
920 * configure.ac (AC_FUNC_FORK): New check.
921 * config.in: Regenerate.
922 * configure: Likewise.
923
9242016-01-14 Yao Qi <yao.qi@linaro.org>
925
926 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
927 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
928 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
929 arm_get_next_pcs_ctor.
930
9312016-01-12 Josh Stone <jistone@redhat.com>
932 Philippe Waroquiers <philippe.waroquiers@skynet.be>
933
934 * inferiors.h: Include "gdb_vecs.h".
935 (struct process_info): Add syscalls_to_catch.
936 * inferiors.c (remove_process): Free syscalls_to_catch.
937 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
938 syscall_return stops.
939 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
940 * server.c (handle_general_set): Handle QCatchSyscalls.
941 (handle_query): Report support for QCatchSyscalls.
942 * target.h (struct target_ops): Add supports_catch_syscall.
943 (target_supports_catch_syscall): New macro.
944 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
945 (struct lwp_info): Add syscall_state.
946 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
947 Maintain syscall_state and syscalls_to_catch across exec.
948 (get_syscall_trapinfo): New function, proxy to the_low_target.
949 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
950 (linux_low_filter_event): Toggle syscall_state entry/return for
951 syscall traps, and set it ignored for all others.
952 (gdb_catching_syscalls_p): New function.
953 (gdb_catch_this_syscall_p): New function.
954 (linux_wait_1): Handle SYSCALL_SIGTRAP.
955 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
956 (linux_supports_catch_syscall): New function.
957 (linux_target_ops): Install it.
958 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
959 (the_low_target): Install it.
960
9612016-01-12 Mike Frysinger <vapier@gentoo.org>
962
963 * acinclude.m4: Include new ../warning.m4 file.
964 * configure: Regenerated.
965 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
966
9672016-01-12 Mike Frysinger <vapier@gentoo.org>
968
969 * ax.c (is_goto_target): Mark static.
970 * linux-low.c (register_addr): Likewise.
971 (linux_fetch_registers, linux_store_registers): Likewise.
972 * mem-break.c (any_persistent_commands): Fix old prototype.
973 (add_commands_to_breakpoint): Mark static.
974 * regcache.c (find_register_by_name): Delete unused func.
975 * remote-utils.c (hex_or_minus_one): Mark static.
976 * server.c (monitor_show_help): Mark static.
977 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
978 handle_v_requests): Likewise.
979
9802016-01-12 Pedro Alves <palves@redhat.com>
981
982 Remove use of the registered trademark symbol throughout.
983
9842016-01-08 Yao Qi <yao.qi@linaro.org>
985
986 * remote-utils.c (getpkt): If c is '\003', call target hook
987 request_interrupt.
988
9892016-01-06 Yao Qi <yao.qi@linaro.org>
990
991 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
992 linux-aarch32-low.c.
993 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
994 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
995 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
996 (thumb2_breakpoint): Declare.
997 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
998 linux-aarch32-low.h.
999 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1000 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1001 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1002
10032016-01-01 Joel Brobecker <brobecker@adacore.com>
1004
1005 * gdbreplay.c (gdbreplay_version): Change copyright year in
1006 version message.
1007 * server.c (gdbserver_version): Likewise.
1008
10092015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1010
1011 * server.c (crc32_table): Delete.
1012 (crc32): Use libiberty's xcrc32 function.
1013
10142015-12-22 Joel Brobecker <brobecker@adacore.com>
1015
1016 * lynx-low.c (lynx_delete_thread_callback): New function.
1017 (lynx_mourn): Properly delete our process and all of its
1018 threads. Remove call to clear_inferiors.
1019
10202015-12-22 Joel Brobecker <brobecker@adacore.com>
1021
1022 * target.c (thread_search_callback): Add check that
1023 the thread_stopped target callback is not NULL before
1024 calling it.
1025
10262015-12-21 Yao Qi <yao.qi@linaro.org>
1027
1028 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1029 arm breakpoint.
1030
10312015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1032
1033 * server.c (handle_query): Call target_supports_software_single_step.
1034
10352015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1036
1037 * linux-low.c (single_step): New function.
1038 (linux_resume_one_lwp_throw): Call single_step.
1039 (start_step_over): Likewise.
1040
10412015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1042
1043 * Makefile.in (SFILES): Append arch/arm-linux.c,
1044 arch/arm-get-next-pcs.c.
1045 (arm-linux.o): New rule.
1046 (arm-get-next-pcs.o): New rule.
1047 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1048 arm-linux.o.
1049 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1050 to linux-aarch32-low.c.
1051 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1052 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1053 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1054 (thumb2_breakpoint_len): Likewise.
1055 (arm_is_thumb_mode): Make non-static.
1056 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1057 from linux-aarch32-low.c.
1058 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1059 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1060 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1061 (thumb2_breakpoint_len): Likewise.
1062 (arm_is_thumb_mode): New declaration.
1063 * linux-arm-low.c: Include arch/arm-linux.h
1064 aarch/arm-get-next-pcs.h, sys/syscall.h.
1065 (get_next_pcs_ops): New struct.
1066 (get_next_pcs_addr_bits_remove): New function.
1067 (get_next_pcs_is_thumb): New function.
1068 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1069 (arm_sigreturn_next_pc): Likewise.
1070 (get_next_pcs_syscall_next_pc): Likewise.
1071 (arm_gdbserver_get_next_pcs): Likewise.
1072 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1073 Initialize.
1074 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1075 * server.h: Include gdb_vecs.h.
1076
10772015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1078
1079 * Makefile.in (SFILES): Append common/common-regcache.c.
1080 (OBS): Append common-regcache.o.
1081 (common-regcache.o): New rule.
1082 * regcache.c (init_register_cache): Initialize cache to
1083 REG_UNAVAILABLE.
1084 (regcache_raw_read_unsigned): New function.
1085 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1086 register_status enum.
1087
10882015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1089
1090 * linux-aarch64-low.c (the_low_targets): Rename
1091 breakpoint_reinsert_addr to get_next_pcs.
1092 * linux-arm-low.c (the_low_targets): Likewise.
1093 * linux-bfin-low.c (the_low_targets): Likewise.
1094 * linux-cris-low.c (the_low_targets): Likewise.
1095 * linux-crisv32-low.c (the_low_targets): Likewise.
1096 * linux-low.c (can_software_single_step): Likewise.
1097 (install_software_single_step_breakpoints): New function.
1098 (start_step_over): Use install_software_single_step_breakpoints.
1099 * linux-low.h: New CORE_ADDR vector.
1100 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1101 get_next_pcs.
1102 * linux-mips-low.c (the_low_targets): Likewise.
1103 * linux-nios2-low.c (the_low_targets): Likewise.
1104 * linux-sparc-low.c (the_low_targets): Likewise.
1105
11062015-12-17 Pedro Alves <palves@redhat.com>
1107
1108 * linux-low.c (linux_kill_one_lwp): Remove references to
1109 LinuxThreads.
1110 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1111 to 'kill'.
1112 (linux_init_signals): Delete.
1113 (initialize_low): Adjust.
1114 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1115
11162015-12-16 Pedro Alves <palves@redhat.com>
1117
1118 * configure.ac (compiler warning flags): When testing a
1119 -Wno-foo option, check whether -Wfoo works instead.
1120 * configure: Regenerate.
1121
11222015-12-11 Don Breazeal <donb@codesourcery.com>
1123
1124 * server.c (process_serial_event): Don't exit from gdbserver
1125 in remote mode if there are still active inferiors.
1126
11272015-12-11 Yao Qi <yao.qi@linaro.org>
1128
1129 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1130 arm_breakpoint_at if the process is 32-bit.
1131
11322015-12-11 Yao Qi <yao.qi@linaro.org>
1133
1134 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1135 arm breakpoint.
1136
11372015-12-07 Yao Qi <yao.qi@linaro.org>
1138
1139 * configure.srv: Append arm.o to srv_tgtobj for
1140 aarch64*-*-linux* target.
1141 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1142 from linux-arm-low.c.
1143 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1144 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1145 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1146 (thumb2_breakpoint_len): Likewise.
1147 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1148 (arm_breakpoint_kinds): Likewise.
1149 (arm_breakpoint_kind_from_pc): Likewise.
1150 (arm_sw_breakpoint_from_kind): Likewise.
1151 (arm_breakpoint_kind_from_current_state): Likewise.
1152 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1153 (arm_sw_breakpoint_from_kind): Declare.
1154 (arm_breakpoint_kind_from_current_state): Declare.
1155 (arm_breakpoint_at): Declare.
1156 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1157 arm_sw_breakpoint_from_kind if process is 32-bit.
1158 (aarch64_breakpoint_kind_from_pc): New function.
1159 (aarch64_breakpoint_kind_from_current_state): New function.
1160 (the_low_target): Initialize fields breakpoint_kind_from_pc
1161 and breakpoint_kind_from_current_state.
1162 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1163 linux-aarch32-low.c.
1164 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1165 (arm_breakpoint, arm_breakpoint_len): Likewise.
1166 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1167 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1168 (arm_is_thumb_mode): Likewise.
1169 (arm_breakpoint_at): Likewise.
1170 (arm_breakpoint_kind_from_pc): Likewise.
1171 (arm_sw_breakpoint_from_kind): Likewise.
1172 (arm_breakpoint_kind_from_current_state): Likewise.
1173
1174 Revert:
1175 2015-08-04 Yao Qi <yao.qi@linaro.org>
1176
1177 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1178 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1179 * server.c (extended_protocol): Remove "static".
1180 * server.h (extended_protocol): Declare it.
1181
11822015-12-04 Josh Stone <jistone@redhat.com>
1183
1184 * target.h (struct target_ops) <arch_setup>: Rename to ...
1185 (struct target_ops) <post_create_inferior>: ... this.
1186 (target_arch_setup): Rename to ...
1187 (target_post_create_inferior): ... this, calling post_create_inferior.
1188 * server.c (start_inferior): Update target_arch_setup calls to
1189 target_post_create_inferior.
1190 * linux-low.c (linux_low_ptrace_options): Forward declare.
1191 (linux_arch_setup): Update its comment for general use.
1192 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1193 (struct linux_target_ops): Use linux_post_create_inferior.
1194 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1195 to post_create_inferior.
1196 * nto-low.c (struct nto_target_ops): Likewise.
1197 * spu-low.c (struct spu_target_ops): Likewise.
1198 * win32-low.c (struct win32_target_ops): Likewise.
1199
12002015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1201
1202 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1203
12042015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1205
1206 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1207 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1208 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1209 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1210 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1211 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1212 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1213 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1214 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1215 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1216 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1217 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1218
12192015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1220
1221 * linux-low.c (linux_look_up_symbols): Don't call
1222 linux_supports_traceclone.
1223 * linux-low.h (thread_db_init): Remove use_events argument.
1224 * thread-db.c (thread_db_use_event): Remove global variable.
1225 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1226 (struct thread_db) <td_create_bp>: Remove field.
1227 (thread_db_create_event): Remove function.
1228 (thread_db_enable_reporting): Likewise.
1229 (find_one_thread): Don't check for thread_db_use_events.
1230 (attach_thread): Likewise.
1231 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1232 (try_thread_db_load_1): Don't check for thread_db_use_events.
1233 (thread_db_init): Remove use_events argument and thread events
1234 handling.
1235 (remove_thread_event_breakpoints): Remove function.
1236 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1237
12382015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1239
1240 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1241 New function.
1242 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1243 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1244 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1245 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1246 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1247 Initialize.
1248 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1249 New function.
1250 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1251 * linux-low.c (can_hardware_single_step): Use
1252 supports_hardware_single_step.
1253 (can_software_single_step): New function.
1254 (start_step_over): Call can_software_single_step.
1255 (linux_supports_hardware_single_step): New function.
1256 (struct target_ops) <supports_software_single_step>: Initialize.
1257 * linux-low.h (struct linux_target_ops)
1258 <supports_hardware_single_step>: Initialize.
1259 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1260 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1261 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1262 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1263 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1264 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1265 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1266 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1267 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1268 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1269 Initialize.
1270 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1271 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1272 Initialize.
1273 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1274 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1275 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1276 New function.
1277 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1278 * target.h (struct target_ops): <supports_software_single_step>:
1279 New field.
1280 (target_supports_software_single_step): New macro.
1281
12822015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1283
1284 * linux-low.c (linux_wait_1): Fix pc advance condition.
1285 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1286 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1287
12882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1289
1290 * linux-arm-low.c (arm_is_thumb_mode): New function.
1291 (arm_breakpoint_at): Use arm_is_thumb_mode.
1292 (arm_breakpoint_kind_from_current_state): New function.
1293 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1294 Initialize.
1295 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1296 (linux_breakpoint_kind_from_current_state): New function.
1297 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1298 * linux-low.h (struct linux_target_ops)
1299 <breakpoint_kind_from_current_state>: New field.
1300 * target.h (struct target_ops): Likewise.
1301 (target_breakpoint_kind_from_current_state): New macro.
1302
13032015-11-30 Pedro Alves <palves@redhat.com>
1304
1305 * linux-low.c (linux_resume): Wake up the event loop before
1306 returning.
1307
13082015-11-30 Pedro Alves <palves@redhat.com>
1309
1310 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1311 check.
1312 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1313 to -1.
1314 * target.c (struct thread_search): New structure.
1315 (thread_search_callback): New function.
1316 (prev_general_thread): New global.
1317 (prepare_to_access_memory, done_accessing_memory): New functions.
1318 * target.h (prepare_to_access_memory, done_accessing_memory):
1319 Replace macros with function declarations.
1320
13212015-11-30 Pedro Alves <palves@redhat.com>
1322
1323 PR 14618
1324 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1325 report TARGET_WAITKIND_NO_RESUMED.
1326 * remote-utils.c (prepare_resume_reply): Handle
1327 TARGET_WAITKIND_NO_RESUMED.
1328 * server.c (report_no_resumed): New global.
1329 (handle_query) <qSupported>: Handle "no-resumed+". Report
1330 "no-resumed+" support.
1331 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1332 return error if the client doesn't support no-resumed events.
1333 (push_stop_notification): New function.
1334 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1335 events if the client supports them.
1336
13372015-11-30 Pedro Alves <palves@redhat.com>
1338
1339 * linux-low.c (thread_still_has_status_pending_p): Don't check
1340 vCont;t here.
1341 (lwp_resumed): New function.
1342 (status_pending_p_callback): Return early if the LWP is not
1343 supposed to be resumed.
1344
13452015-11-30 Pedro Alves <palves@redhat.com>
1346
1347 * linux-low.c (handle_extended_wait): Assert that the LWP's
1348 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1349 thread create events, leave the new child's status pending.
1350 (linux_low_filter_event): If GDB wants to hear about thread exit
1351 events, leave the LWP marked dead and don't delete it.
1352 (linux_wait_for_event_filtered): Don't check for thread exit.
1353 (filter_exit_event): New function.
1354 (linux_wait_1): Use it, when returning an exit event.
1355 (linux_resume_one_lwp_throw): Assert that the LWP's
1356 waitstatus is TARGET_WAITKIND_IGNORE.
1357 * remote-utils.c (prepare_resume_reply): Handle
1358 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1359 * server.c (report_thread_events): New global.
1360 (handle_general_set): Handle QThreadEvents.
1361 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1362 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1363 TARGET_WAITKIND_THREAD_EXITED.
1364 * server.h (report_thread_events): Declare.
1365
13662015-11-30 Pedro Alves <palves@redhat.com>
1367
1368 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1369 the thread's last_resume_kind was resume_stop.
1370
13712015-11-30 Pedro Alves <palves@redhat.com>
1372
1373 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1374 before returning.
1375
13762015-11-30 Pedro Alves <palves@redhat.com>
1377
1378 * server.c (handle_v_requests): Handle vCtrlC.
1379
13802015-11-30 Pedro Alves <palves@redhat.com>
1381
1382 * gdbthread.h (find_any_thread_of_pid): Declare.
1383 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1384 functions.
1385 * server.c (handle_query): If current_thread is NULL, look for
1386 another thread of the selected process.
1387
13882015-11-26 Daniel Colascione <dancol@dancol.org>
1389 Simon Marchi <simon.marchi@ericsson.com>
1390
1391 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1392 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1393 name in reply.
1394 * target.h (struct target_ops) <thread_name>: New field.
1395 (target_thread_name): New macro.
1396
13972015-11-23 Joel Brobecker <brobecker@adacore.com>
1398
1399 * regcache.h (regcache_invalidate_pid): Add declaration.
1400 * regcache.c (regcache_invalidate_pid): New function, extracted
1401 from regcache_invalidate.
1402 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1403 Add trivial documentation comment.
1404 * lynx-low.c: Use regcache_invalidate_pid instead of
1405 regcache_invalidate.
1406
14072015-11-23 Joel Brobecker <brobecker@adacore.com>
1408
1409 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1410 and Elf64_auxv_t if the target is Android.
1411
14122015-11-22 Doug Evans <xdje42@gmail.com>
1413
1414 * target.h: #include <sys/types.h>.
1415
14162015-11-19 Pedro Alves <palves@redhat.com>
1417
1418 * linux-low.c (linux_process_qsupported): Change prototype.
1419 Adjust.
1420 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1421 Change prototype.
1422 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1423 and adjust to loop over all features.
1424 * server.c (handle_query) <qSupported>: Adjust to call
1425 target_process_qsupported once, passing it a vector of unprocessed
1426 features.
1427 * target.h (struct target_ops) <process_qsupported>: Change
1428 prototype.
1429 (target_process_qsupported): Adjust.
1430
14312015-11-19 Pedro Alves <palves@redhat.com>
1432
1433 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1434 mode.
1435 * configure: Regenerate.
1436
14372015-11-19 Pedro Alves <palves@redhat.com>
1438
1439 * configure: Regenerate.
1440
14412015-11-19 Yao Qi <yao.qi@linaro.org>
1442
1443 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1444 type to uint32_t.
1445
14462015-11-19 Yao Qi <yao.qi@linaro.org>
1447
1448 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1449 (struct aarch64_operand): Move enum out.
1450
14512015-11-19 Yao Qi <yao.qi@linaro.org>
1452
1453 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1454 struct user_fpsimd_state *.
1455 (aarch64_store_fpregset): Likewise.
1456
14572015-11-19 Yao Qi <yao.qi@linaro.org>
1458
1459 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1460 struct user_pt_regs *.
1461 (aarch64_store_gregset): Likewise.
1462
14632015-11-18 Pedro Alves <palves@redhat.com>
1464
1465 * Makefile.in (all_object_files): Add $IPA_OBJS.
1466
14672015-11-17 Pedro Alves <palves@redhat.com>
1468
1469 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1470 GDB_SIGNAL_0 and gdb_signal_to_string.
1471
14722015-11-17 Pedro Alves <palves@redhat.com>
1473
1474 * win32-low.c (handle_output_debug_string): Remove parameter.
1475 (win32_kill): Remove our_status local and adjust call to
1476 handle_output_debug_string.
1477 (get_child_debug_event): Adjust call to
1478 handle_output_debug_string.
1479
14802015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1481
1482 * linux-mips-low.c (mips_fill_gregset): Add cast.
1483 (mips_store_gregset): Likewise.
1484 (mips_fill_fpregset): Likewise.
1485 (mips_store_fpregset): Likewise.
1486
14872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1488
1489 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1490 priv.
1491
14922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1493
1494 * linux-mips-low.c (mips_linux_new_thread): Change type of
1495 watch_type to enum target_hw_bp_type.
1496
14972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1498
1499 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1500 Change return type to arm_hwbp_type.
1501
15022015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1503
1504 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1505 (arm_store_gregset): Likewise.
1506 * linux-arm-low.c (arm_get_hwcap): Likewise.
1507 (arm_read_description): Likewise.
1508
15092015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1510
1511 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1512
15132015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1514
1515 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1516 (ppc_fill_vsxregset): Likewise.
1517 (ppc_store_vsxregset): Likewise.
1518 (ppc_fill_vrregset): Likewise.
1519 (ppc_store_vrregset): Likewise.
1520 (ppc_fill_evrregset): Likewise.
1521 (ppc_store_evrregset): Likewise.
1522
15232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1524
1525 * linux-ppc-low.c (ppc_usrregs_info): Remove
1526 forward-declaration.
1527 (ppc_arch_setup): Move lower in file.
1528
15292015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1530
1531 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1532 (ps_pdwrite): Likewise.
1533
15342015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1535
1536 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1537 to after assert checks.
1538
15392015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1540
1541 * proc-service.c (ps_pdread): Add/adjust casts.
1542 (ps_pdwrite): Add/adjust casts.
1543
15442015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1545
1546 * server.c (handle_search_memory_1): Cast return value of
1547 memmem.
1548
15492015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1550
1551 * server.c (write_qxfer_response): Change type of data to
1552 gdb_byte *.
1553
15542015-10-29 Pedro Alves <palves@redhat.com>
1555
1556 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1557
15582015-10-29 Pedro Alves <palves@redhat.com>
1559
1560 * tracepoint.c (clear_installed_tracepoints): Add casts.
1561
15622015-10-29 Pedro Alves <palves@redhat.com>
1563
1564 * server.c (handle_v_cont, process_serial_event): Add enum
1565 gdb_signal casts to signal parsing code.
1566
15672015-10-29 Pedro Alves <palves@redhat.com>
1568
1569 * linux-low.h (NULL_REGSET): Define.
1570 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1571 * linux-arm-low.c (arm_regsets): Likewise.
1572 * linux-crisv32-low.c (cris_regsets): Likewise.
1573 * linux-m68k-low.c (m68k_regsets): Likewise.
1574 * linux-mips-low.c (mips_regsets): Likewise.
1575 * linux-nios2-low.c (nios2_regsets): Likewise.
1576 * linux-ppc-low.c (ppc_regsets): Likewise.
1577 * linux-s390-low.c (s390_regsets): Likewise.
1578 * linux-sh-low.c (sh_regsets): Likewise.
1579 * linux-sparc-low.c (sparc_regsets): Likewise.
1580 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1581 * linux-tile-low.c (tile_regsets): Likewise.
1582 * linux-x86-low.c (x86_regsets): Likewise.
1583 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1584
15852015-10-29 Pedro Alves <palves@redhat.com>
1586
1587 * linux-low.h (NULL_REGSET): Define.
1588 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1589 * linux-arm-low.c (arm_regsets): Likewise.
1590 * linux-crisv32-low.c (cris_regsets): Likewise.
1591 * linux-m68k-low.c (m68k_regsets): Likewise.
1592 * linux-mips-low.c (mips_regsets): Likewise.
1593 * linux-nios2-low.c (nios2_regsets): Likewise.
1594 * linux-ppc-low.c (ppc_regsets): Likewise.
1595 * linux-s390-low.c (s390_regsets): Likewise.
1596 * linux-sh-low.c (sh_regsets): Likewise.
1597 * linux-sparc-low.c (sparc_regsets): Likewise.
1598 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1599 * linux-tile-low.c (tile_regsets): Likewise.
1600 * linux-x86-low.c (x86_regsets): Likewise.
1601 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1602
16032015-10-26 Doug Evans <dje@google.com>
1604
1605 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1606
16072015-10-26 Doug Evans <dje@google.com>
1608
1609 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1610
16112015-10-26 Doug Evans <dje@google.com>
1612
1613 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1614 for debug_printf.
1615 (attach_thread, find_new_threads_callback): Ditto.
1616
16172015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1618
1619 * mem-break.h (set_breakpoint_data): Remove.
1620
16212015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1622
1623 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1624 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1625 (initialize_low): Remove set_breakpoint_data call.
1626 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1627 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1628 (initialize_low): Remove set_breakpoint_data call.
1629 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1630 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1631 (initialize_low): Remove set_breakpoint_data call.
1632
16332015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1634
1635 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1636 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1637 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1638 * target.h (target_breakpoint_kind_from_pc): New macro.
1639
16402015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1641
1642 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1643 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1644 the default breakpoint kind.
1645
16462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1647
1648 * linux-arm-low.c (arm_supports_z_point_type): Add software
1649 breakpoint support.
1650
16512015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1652
1653 * linux-arm-low.c: Refactor breakpoint definitions.
1654 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1655 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1656
16572015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1658
1659 * Makefile.in: Add arm.c/o.
1660 * configure.srv: Likewise.
1661 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1662 (arm_breakpoint_kind_from_pc): New function.
1663 (arm_sw_breakpoint_from_kind): Return proper kind.
1664 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1665
16662015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1667
1668 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1669 removal.
1670 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1671 (struct raw_breakpoint) <size>: Remove.
1672 (struct raw_breakpoint) <kind>: Add.
1673 (bp_size): New function.
1674 (bp_opcode): Likewise.
1675 (find_raw_breakpoint_at): Adjust for kind.
1676 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1677 (remove_memory_breakpoint): Adjust for kind call bp_size.
1678 (set_raw_breakpoint_at): Adjust for kind.
1679 (set_breakpoint): Likewise.
1680 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1681 (delete_raw_breakpoint): Adjust for kind.
1682 (delete_breakpoint): Likewise.
1683 (find_gdb_breakpoint): Likewise.
1684 (set_gdb_breakpoint_1): Likewise.
1685 (set_gdb_breakpoint): Likewise.
1686 (delete_gdb_breakpoint_1): Likewise.
1687 (delete_gdb_breakpoint): Likewise.
1688 (uninsert_raw_breakpoint): Likewise.
1689 (reinsert_raw_breakpoint): Likewise.
1690 (set_breakpoint_data): Remove.
1691 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1692 (check_mem_read): Adjust for kind call bp_size.
1693 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1694 (clone_one_breakpoint): Adjust for kind.
1695 * mem-break.h (set_gdb_breakpoint): Likewise.
1696 (delete_gdb_breakpoint): Likewise.
1697 * server.c (process_serial_event): Likewise.
1698
16992015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1700
1701 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1702 (struct linux_target_ops) <breakpoint>: Remove.
1703 (struct linux_target_ops) <breakpoint_len>: Remove.
1704 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1705 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1706 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1707 (arm_sw_breakpoint_from_kind): New function.
1708 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1709 (struct linux_target_ops) <breakpoint>: Remove.
1710 (struct linux_target_ops) <breakpoint_len>: Remove.
1711 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1712 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1713 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1714 (struct linux_target_ops) <breakpoint>: Remove.
1715 (struct linux_target_ops) <breakpoint_len>: Remove.
1716 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1717 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1718 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1719 (struct linux_target_ops) <breakpoint>: Remove.
1720 (struct linux_target_ops) <breakpoint_len>: Remove.
1721 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1722 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1723 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1724 and sw_breakpoint_from_kind to increment the pc.
1725 (linux_breakpoint_kind_from_pc): New function.
1726 (linux_sw_breakpoint_from_kind): New function.
1727 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1728 (initialize_low): Call breakpoint_kind_from_pc and
1729 sw_breakpoint_from_kind to replace breakpoint_data/len.
1730 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1731 New field.
1732 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1733 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1734 (struct linux_target_ops) <breakpoint>: Remove.
1735 (struct linux_target_ops) <breakpoint_len>: Remove.
1736 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1737 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1738 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1739 (struct linux_target_ops) <breakpoint>: Remove.
1740 (struct linux_target_ops) <breakpoint_len>: Remove.
1741 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1742 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1743 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1744 (struct linux_target_ops) <breakpoint>: Remove.
1745 (struct linux_target_ops) <breakpoint_len>: Remove.
1746 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1747 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1748 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1749 (struct linux_target_ops) <breakpoint>: Remove.
1750 (struct linux_target_ops) <breakpoint_len>: Remove.
1751 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1752 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1753 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1754 (struct linux_target_ops) <breakpoint>: Remove.
1755 (struct linux_target_ops) <breakpoint_len>: Remove.
1756 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1757 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1758 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1759 (struct linux_target_ops) <breakpoint>: Remove.
1760 (struct linux_target_ops) <breakpoint_len>: Remove.
1761 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1762 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1763 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1764 (struct linux_target_ops) <breakpoint>: Remove.
1765 (struct linux_target_ops) <breakpoint_len>: Remove.
1766 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1767 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1768 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1769 (struct linux_target_ops) <breakpoint>: Remove.
1770 (struct linux_target_ops) <breakpoint_len>: Remove.
1771 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1772 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1773 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1774 (struct linux_target_ops) <breakpoint>: Remove.
1775 (struct linux_target_ops) <breakpoint_len>: Remove.
1776 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1777 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1778 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1779 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1780 (struct linux_target_ops) <breakpoint>: Remove.
1781 (struct linux_target_ops) <breakpoint_len>: Remove.
1782 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1783 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1784 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1785 (struct linux_target_ops) <breakpoint>: Remove.
1786 (struct linux_target_ops) <breakpoint_len>: Remove.
1787 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1788 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1789
17902015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1791
1792 * linux-cris-low.c (cris_get_pc): Remove void arg.
1793
17942015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1795
1796 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1797 variable name.
1798
17992015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1800
1801 * inferiors.c (thread_pid_matches_callback): New function.
1802 (find_thread_process): New function.
1803 (remove_thread): Reset current_thread.
1804 (remove_process): Assert threads have been removed first.
1805
18062015-10-15 Yao Qi <yao.qi@linaro.org>
1807
1808 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1809 if it is 3.
1810 (aarch64_remove_point): Likewise.
1811 * regcache.c (regcache_register_size): New function.
1812
18132015-10-12 Yao Qi <yao.qi@linaro.org>
1814
1815 * linux-aarch64-low.c: Update all callers as emit_load_store
1816 is renamed to aarch64_emit_load_store.
1817
18182015-10-12 Yao Qi <yao.qi@linaro.org>
1819
1820 * linux-aarch64-low.c: Update all callers of function renaming
1821 from emit_insn to aarch64_emit_insn.
1822
18232015-10-12 Yao Qi <yao.qi@linaro.org>
1824
1825 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1826 arch/aarch64-insn.h.
1827 (struct aarch64_memory_operand): Likewise.
1828 (ENCODE): Likewise.
1829 (emit_insn): Move to arch/aarch64-insn.c.
1830 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1831 (emit_load_store): Move to arch/aarch64-insn.c.
1832 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1833 (can_encode_int32): Remove.
1834
18352015-10-12 Yao Qi <yao.qi@linaro.org>
1836
1837 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1838 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1839 (aarch64_relocate_instruction): Likewise.
1840 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1841 (struct aarch64_insn_visitor): Likewise.
1842
18432015-10-12 Yao Qi <yao.qi@linaro.org>
1844
1845 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1846 (struct aarch64_insn_visitor): New.
1847 (struct aarch64_insn_relocation_data): New.
1848 (aarch64_ftrace_insn_reloc_b): New function.
1849 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1850 (aarch64_ftrace_insn_reloc_cb): Likewise.
1851 (aarch64_ftrace_insn_reloc_tb): Likewise.
1852 (aarch64_ftrace_insn_reloc_adr): Likewise.
1853 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1854 (aarch64_ftrace_insn_reloc_others): Likewise.
1855 (visitor): New.
1856 (aarch64_relocate_instruction): Use visitor.
1857
18582015-10-12 Yao Qi <yao.qi@linaro.org>
1859
1860 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1861 int. Add argument buf.
1862 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1863 aarch64_relocate_instruction.
1864
18652015-10-12 Yao Qi <yao.qi@linaro.org>
1866
1867 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1868 argument insn. Remove local variable insn. Don't call
1869 target_read_uint32.
1870 (aarch64_install_fast_tracepoint_jump_pad): Call
1871 target_read_uint32.
1872
18732015-09-30 Yao Qi <yao.qi@linaro.org>
1874
1875 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1876 (emit_load_store_pair): Likewise.
1877
18782015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1879
1880 * dll.c (match_dll): Add cast(s).
1881 (unloaded_dll): Likewise.
1882 * linux-low.c (second_thread_of_pid_p): Likewise.
1883 (delete_lwp_callback): Likewise.
1884 (count_events_callback): Likewise.
1885 (select_event_lwp_callback): Likewise.
1886 (linux_set_resume_request): Likewise.
1887 * server.c (accumulate_file_name_length): Likewise.
1888 (emit_dll_description): Likewise.
1889 (handle_qxfer_threads_worker): Likewise.
1890 (visit_actioned_threads): Likewise.
1891 * thread-db.c (any_thread_of): Likewise.
1892 * tracepoint.c (same_process_p): Likewise.
1893 (match_blocktype): Likewise.
1894 (build_traceframe_info_xml): Likewise.
1895
18962015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1897
1898 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1899 assignment.
1900 (gdb_unparse_agent_expr): Likewise.
1901 * hostio.c (require_data): Likewise.
1902 (handle_pread): Likewise.
1903 * linux-low.c (disable_regset): Likewise.
1904 (fetch_register): Likewise.
1905 (store_register): Likewise.
1906 (get_dynamic): Likewise.
1907 (linux_qxfer_libraries_svr4): Likewise.
1908 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1909 (set_fast_tracepoint_jump): Likewise.
1910 (uninsert_fast_tracepoint_jumps_at): Likewise.
1911 (reinsert_fast_tracepoint_jumps_at): Likewise.
1912 (validate_inserted_breakpoint): Likewise.
1913 (clone_agent_expr): Likewise.
1914 * regcache.c (init_register_cache): Likewise.
1915 * remote-utils.c (putpkt_binary_1): Likewise.
1916 (decode_M_packet): Likewise.
1917 (decode_X_packet): Likewise.
1918 (look_up_one_symbol): Likewise.
1919 (relocate_instruction): Likewise.
1920 (monitor_output): Likewise.
1921 * server.c (handle_search_memory): Likewise.
1922 (handle_qxfer_exec_file): Likewise.
1923 (handle_qxfer_libraries): Likewise.
1924 (handle_qxfer): Likewise.
1925 (handle_query): Likewise.
1926 (handle_v_cont): Likewise.
1927 (handle_v_run): Likewise.
1928 (captured_main): Likewise.
1929 * target.c (write_inferior_memory): Likewise.
1930 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1931 * tracepoint.c (init_trace_buffer): Likewise.
1932 (add_tracepoint_action): Likewise.
1933 (add_traceframe): Likewise.
1934 (add_traceframe_block): Likewise.
1935 (cmd_qtdpsrc): Likewise.
1936 (cmd_qtdv): Likewise.
1937 (cmd_qtstatus): Likewise.
1938 (response_source): Likewise.
1939 (response_tsv): Likewise.
1940 (cmd_qtnotes): Likewise.
1941 (gdb_collect): Likewise.
1942 (initialize_tracepoint): Likewise.
1943
19442015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1945
1946 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1947 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1948 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1949 <NOP>: New.
1950 (enum aarch64_condition_codes): New enum.
1951 (w0): New static global.
1952 (fp): Likewise.
1953 (lr): Likewise.
1954 (struct aarch64_memory_operand) <type>: New
1955 MEMORY_OPERAND_POSTINDEX type.
1956 (postindex_memory_operand): New helper function.
1957 (emit_ret): New function.
1958 (emit_load_store_pair): New function, factored out of emit_stp
1959 with support for MEMORY_OPERAND_POSTINDEX.
1960 (emit_stp): Rewrite using emit_load_store_pair.
1961 (emit_ldp): New function.
1962 (emit_load_store): Likewise.
1963 (emit_ldr): Mention post-index instruction in comment.
1964 (emit_ldrh): New function.
1965 (emit_ldrb): New function.
1966 (emit_ldrsw): Mention post-index instruction in comment.
1967 (emit_str): Likewise.
1968 (emit_subs): New function.
1969 (emit_cmp): Likewise.
1970 (emit_and): Likewise.
1971 (emit_orr): Likewise.
1972 (emit_orn): Likewise.
1973 (emit_eor): Likewise.
1974 (emit_mvn): Likewise.
1975 (emit_lslv): Likewise.
1976 (emit_lsrv): Likewise.
1977 (emit_asrv): Likewise.
1978 (emit_mul): Likewise.
1979 (emit_sbfm): Likewise.
1980 (emit_sbfx): Likewise.
1981 (emit_ubfm): Likewise.
1982 (emit_ubfx): Likewise.
1983 (emit_csinc): Likewise.
1984 (emit_cset): Likewise.
1985 (emit_nop): Likewise.
1986 (emit_ops_insns): New helper function.
1987 (emit_pop): Likewise.
1988 (emit_push): Likewise.
1989 (aarch64_emit_prologue): New function.
1990 (aarch64_emit_epilogue): Likewise.
1991 (aarch64_emit_add): Likewise.
1992 (aarch64_emit_sub): Likewise.
1993 (aarch64_emit_mul): Likewise.
1994 (aarch64_emit_lsh): Likewise.
1995 (aarch64_emit_rsh_signed): Likewise.
1996 (aarch64_emit_rsh_unsigned): Likewise.
1997 (aarch64_emit_ext): Likewise.
1998 (aarch64_emit_log_not): Likewise.
1999 (aarch64_emit_bit_and): Likewise.
2000 (aarch64_emit_bit_or): Likewise.
2001 (aarch64_emit_bit_xor): Likewise.
2002 (aarch64_emit_bit_not): Likewise.
2003 (aarch64_emit_equal): Likewise.
2004 (aarch64_emit_less_signed): Likewise.
2005 (aarch64_emit_less_unsigned): Likewise.
2006 (aarch64_emit_ref): Likewise.
2007 (aarch64_emit_if_goto): Likewise.
2008 (aarch64_emit_goto): Likewise.
2009 (aarch64_write_goto_address): Likewise.
2010 (aarch64_emit_const): Likewise.
2011 (aarch64_emit_call): Likewise.
2012 (aarch64_emit_reg): Likewise.
2013 (aarch64_emit_pop): Likewise.
2014 (aarch64_emit_stack_flush): Likewise.
2015 (aarch64_emit_zero_ext): Likewise.
2016 (aarch64_emit_swap): Likewise.
2017 (aarch64_emit_stack_adjust): Likewise.
2018 (aarch64_emit_int_call_1): Likewise.
2019 (aarch64_emit_void_call_2): Likewise.
2020 (aarch64_emit_eq_goto): Likewise.
2021 (aarch64_emit_ne_goto): Likewise.
2022 (aarch64_emit_lt_goto): Likewise.
2023 (aarch64_emit_le_goto): Likewise.
2024 (aarch64_emit_gt_goto): Likewise.
2025 (aarch64_emit_ge_got): Likewise.
2026 (aarch64_emit_ops_impl): New static global variable.
2027 (aarch64_emit_ops): New target function, return
2028 &aarch64_emit_ops_impl.
2029 (struct linux_target_ops): Install it.
2030
20312015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2032
2033 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2034 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2035 aarch64-ipa.o.
2036 * linux-aarch64-ipa.c: New file.
2037 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2038 and endian.h.
2039 (aarch64_get_thread_area): New target method.
2040 (extract_signed_bitfield): New helper function.
2041 (aarch64_decode_ldr_literal): New function.
2042 (enum aarch64_opcodes): New enum.
2043 (struct aarch64_register): New struct.
2044 (struct aarch64_operand): New struct.
2045 (x0): New static global.
2046 (x1): Likewise.
2047 (x2): Likewise.
2048 (x3): Likewise.
2049 (x4): Likewise.
2050 (w2): Likewise.
2051 (ip0): Likewise.
2052 (sp): Likewise.
2053 (xzr): Likewise.
2054 (aarch64_register): New helper function.
2055 (register_operand): Likewise.
2056 (immediate_operand): Likewise.
2057 (struct aarch64_memory_operand): New struct.
2058 (offset_memory_operand): New helper function.
2059 (preindex_memory_operand): Likewise.
2060 (enum aarch64_system_control_registers): New enum.
2061 (ENCODE): New macro.
2062 (emit_insn): New helper function.
2063 (emit_b): New function.
2064 (emit_bcond): Likewise.
2065 (emit_cb): Likewise.
2066 (emit_tb): Likewise.
2067 (emit_blr): Likewise.
2068 (emit_stp): Likewise.
2069 (emit_ldp_q_offset): Likewise.
2070 (emit_stp_q_offset): Likewise.
2071 (emit_load_store): Likewise.
2072 (emit_ldr): Likewise.
2073 (emit_ldrsw): Likewise.
2074 (emit_str): Likewise.
2075 (emit_ldaxr): Likewise.
2076 (emit_stxr): Likewise.
2077 (emit_stlr): Likewise.
2078 (emit_data_processing_reg): Likewise.
2079 (emit_data_processing): Likewise.
2080 (emit_add): Likewise.
2081 (emit_sub): Likewise.
2082 (emit_mov): Likewise.
2083 (emit_movk): Likewise.
2084 (emit_mov_addr): Likewise.
2085 (emit_mrs): Likewise.
2086 (emit_msr): Likewise.
2087 (emit_sevl): Likewise.
2088 (emit_wfe): Likewise.
2089 (append_insns): Likewise.
2090 (can_encode_int32_in): New helper function.
2091 (aarch64_relocate_instruction): New function.
2092 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2093 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2094 (struct linux_target_ops): Install aarch64_get_thread_area,
2095 aarch64_install_fast_tracepoint_jump_pad and
2096 aarch64_get_min_fast_tracepoint_insn_len.
2097
20982015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2099
2100 * Makefile.in (aarch64-insn.o): New rule.
2101 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2102
21032015-09-21 Yao Qi <yao.qi@linaro.org>
2104
2105 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2106
21072015-09-21 Yao Qi <yao.qi@linaro.org>
2108
2109 * tracepoint.c (max_jump_pad_size): Remove.
2110
21112015-09-18 Yao Qi <yao.qi@linaro.org>
2112
2113 * linux-aarch64-low.c: Don't include sys/uio.h.
2114 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2115
21162015-09-16 Wei-cheng Wang <cole945@gmail.com>
2117
2118 * tracepoint.c (eval_result_type): Change prototype.
2119 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2120
21212015-09-15 Pedro Alves <palves@redhat.com>
2122
2123 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2124 Check whether to report exec events instead of checking whether
2125 multiprocess is enabled.
2126
21272015-09-15 Pedro Alves <palves@redhat.com>
2128
2129 PR remote/18965
2130 * remote-utils.c (prepare_resume_reply): Merge
2131 TARGET_WAITKIND_VFORK_DONE switch case with the
2132 TARGET_WAITKIND_FORKED case.
2133
21342015-09-15 Yao Qi <yao.qi@linaro.org>
2135
2136 * server.c (handle_query): Check string comparison using
2137 "else if" instead of "if".
2138
21392015-09-15 Yao Qi <yao.qi@linaro.org>
2140
2141 * server.c (vCont_supported): New global variable.
2142 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2143 matches. Append ";vContSupported+" to own_buf.
2144 (handle_v_requests): Append ";s;S" to own_buf if target supports
2145 hardware single step or vCont_supported is false.
2146 (capture_main): Set vCont_supported to zero.
2147
21482015-09-15 Yao Qi <yao.qi@linaro.org>
2149
2150 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2151 it to ...
2152 (linux_supports_hardware_single_step): ... New function.
2153 (linux_target_ops): Update.
2154 * lynx-low.c (lynx_target_ops): Set field
2155 supports_hardware_single_step to target_can_do_hardware_single_step.
2156 * nto-low.c (nto_target_ops): Likewise.
2157 * spu-low.c (spu_target_ops): Likewise.
2158 * win32-low.c (win32_target_ops): Likewise.
2159 * target.c (target_can_do_hardware_single_step): New function.
2160 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2161 Remove. <supports_hardware_single_step>: New field.
2162 (target_supports_conditional_breakpoints): Remove.
2163 (target_supports_hardware_single_step): New macro.
2164 (target_can_do_hardware_single_step): Declare.
2165 * server.c (handle_query): Use target_supports_hardware_single_step
2166 instead of target_supports_conditional_breakpoints.
2167
21682015-09-15 Yao Qi <yao.qi@linaro.org>
2169
2170 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2171 function.
2172 (struct linux_target_ops the_low_target): Install
2173 aarch64_linux_siginfo_fixup.
2174
21752015-09-11 Don Breazeal <donb@codesourcery.com>
2176 Luis Machado <lgustavo@codesourcery.com>
2177
2178 * linux-low.c (linux_mourn): Static declaration.
2179 (linux_arch_setup): Move in front of
2180 handle_extended_wait.
2181 (linux_arch_setup_thread): New function.
2182 (handle_extended_wait): Handle exec events. Call
2183 linux_arch_setup_thread. Make event_lwp argument a
2184 pointer-to-a-pointer.
2185 (check_zombie_leaders): Do not check stopped threads.
2186 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2187 (linux_low_filter_event): Add lwp and thread for exec'ing
2188 non-leader thread if leader thread has been deleted.
2189 Refactor code into linux_arch_setup_thread and call it.
2190 Pass child lwp pointer by reference to handle_extended_wait.
2191 (linux_wait_for_event_filtered): Update comment.
2192 (linux_wait_1): Prevent clobbering exec event status.
2193 (linux_supports_exec_events): New function.
2194 (linux_target_ops) <supports_exec_events>: Initialize new member.
2195 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2196 new member.
2197 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2198 * server.c (report_exec_events): New global variable.
2199 (handle_query): Handle qSupported query for exec-events feature.
2200 (captured_main): Initialize report_exec_events.
2201 * server.h (report_exec_events): Declare new global variable.
2202 * target.h (struct target_ops) <supports_exec_events>: New
2203 member.
2204 (target_supports_exec_events): New macro.
2205 * win32-low.c (win32_target_ops) <supports_exec_events>:
2206 Initialize new member.
2207
22082015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2209
2210 * linux-low.c (linux_low_enable_btrace): Remove.
2211 (linux_target_ops): Replace linux_low_enable_btrace with
2212 linux_enable_btrace.
2213
22142015-09-03 Yao Qi <yao.qi@linaro.org>
2215
2216 * linux-aarch64-low.c (aarch64_insert_point): Call
2217 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2218 returns true.
2219
22202015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2221
2222 * linux-low.c (check_stopped_by_breakpoint): Use
2223 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2224
22252015-08-27 Pedro Alves <palves@redhat.com>
2226
2227 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2228
22292015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2230
2231 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2232 the XNEW-family equivalent.
2233 (compile_bytecodes): Likewise.
2234 * dll.c (loaded_dll): Likewise.
2235 * event-loop.c (append_callback_event): Likewise.
2236 (create_file_handler): Likewise.
2237 (create_file_event): Likewise.
2238 * hostio.c (handle_open): Likewise.
2239 * inferiors.c (add_thread): Likewise.
2240 (add_process): Likewise.
2241 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2242 * linux-arm-low.c (arm_new_process): Likewise.
2243 (arm_new_thread): Likewise.
2244 * linux-low.c (add_to_pid_list): Likewise.
2245 (linux_add_process): Likewise.
2246 (handle_extended_wait): Likewise.
2247 (add_lwp): Likewise.
2248 (enqueue_one_deferred_signal): Likewise.
2249 (enqueue_pending_signal): Likewise.
2250 (linux_resume_one_lwp_throw): Likewise.
2251 (linux_resume_one_thread): Likewise.
2252 (linux_read_memory): Likewise.
2253 (linux_write_memory): Likewise.
2254 * linux-mips-low.c (mips_linux_new_process): Likewise.
2255 (mips_linux_new_thread): Likewise.
2256 (mips_add_watchpoint): Likewise.
2257 * linux-x86-low.c (initialize_low_arch): Likewise.
2258 * lynx-low.c (lynx_add_process): Likewise.
2259 * mem-break.c (set_raw_breakpoint_at): Likewise.
2260 (set_breakpoint): Likewise.
2261 (add_condition_to_breakpoint): Likewise.
2262 (add_commands_to_breakpoint): Likewise.
2263 (clone_agent_expr): Likewise.
2264 (clone_one_breakpoint): Likewise.
2265 * regcache.c (new_register_cache): Likewise.
2266 * remote-utils.c (look_up_one_symbol): Likewise.
2267 * server.c (queue_stop_reply): Likewise.
2268 (start_inferior): Likewise.
2269 (queue_stop_reply_callback): Likewise.
2270 (handle_target_event): Likewise.
2271 * spu-low.c (fetch_ppc_memory): Likewise.
2272 (store_ppc_memory): Likewise.
2273 * target.c (set_target_ops): Likewise.
2274 * thread-db.c (thread_db_load_search): Likewise.
2275 (try_thread_db_load_1): Likewise.
2276 * tracepoint.c (add_tracepoint): Likewise.
2277 (add_tracepoint_action): Likewise.
2278 (create_trace_state_variable): Likewise.
2279 (cmd_qtdpsrc): Likewise.
2280 (cmd_qtro): Likewise.
2281 (add_while_stepping_state): Likewise.
2282 * win32-low.c (child_add_thread): Likewise.
2283 (get_image_name): Likewise.
2284
22852015-08-25 Yao Qi <yao.qi@linaro.org>
2286
2287 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2288
22892015-08-25 Yao Qi <yao.qi@linaro.org>
2290
2291 * Makefile.in (aarch64-linux.o): New rule.
2292 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2293 srv_tgtobj.
2294 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2295 (aarch64_init_debug_reg_state): Make it extern.
2296 (aarch64_linux_prepare_to_resume): Remove.
2297
22982015-08-25 Yao Qi <yao.qi@linaro.org>
2299
2300 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2301 lwp_arch_private_info and ptid_of_lwp.
2302
23032015-08-25 Yao Qi <yao.qi@linaro.org>
2304
2305 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2306 Find proc_info by find_process_pid. All callers updated.
2307
23082015-08-25 Yao Qi <yao.qi@linaro.org>
2309
2310 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2311 Remove.
2312 (debug_reg_change_callback): Remove.
2313 (aarch64_notify_debug_reg_change): Remove.
2314
23152015-08-25 Yao Qi <yao.qi@linaro.org>
2316
2317 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2318 Call current_lwp_ptid.
2319
23202015-08-25 Yao Qi <yao.qi@linaro.org>
2321
2322 * linux-aarch64-low.c (debug_reg_change_callback): Use
2323 debug_printf.
2324
23252015-08-25 Yao Qi <yao.qi@linaro.org>
2326
2327 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2328
23292015-08-25 Yao Qi <yao.qi@linaro.org>
2330
2331 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2332
23332015-08-25 Yao Qi <yao.qi@linaro.org>
2334
2335 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2336 the code.
2337
23382015-08-25 Yao Qi <yao.qi@linaro.org>
2339
2340 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2341 Remove.
2342 (debug_reg_change_callback): Remove argument entry and add argument
2343 lwp. Remove local variable thread. Don't print thread id in the
2344 debugging output. Don't check whether pid of thread equals to pid.
2345 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2346 iterate_over_lwps instead find_inferior.
2347
23482015-08-24 Pedro Alves <palves@redhat.com>
2349
2350 * inferiors.c (get_first_process): New function.
2351 * inferiors.h (get_first_process): New declaration.
2352 * remote-utils.c (read_ptid): Default to the first process in the
2353 list, instead of to the current thread's process.
2354
23552015-08-24 Pedro Alves <palves@redhat.com>
2356
2357 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2358 * event-loop.c: Likewise.
2359 * remote-utils.c: Likewise.
2360 * tracepoint.c: Likewise.
2361
23622015-08-24 Pedro Alves <palves@redhat.com>
2363
2364 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2365 ptid_get_lwp.
2366
23672015-08-21 Pedro Alves <palves@redhat.com>
2368
2369 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2370 instead of literal 1.
2371
23722015-08-21 Pedro Alves <palves@redhat.com>
2373
2374 * tdesc.c (default_description): Explicitly zero-initialize.
2375
23762015-08-21 Pedro Alves <palves@redhat.com>
2377
2378 PR gdb/18749
2379 * inferiors.c (remove_thread): Discard any pending stop reply for
2380 this thread.
2381 * server.c (remove_all_on_match_pid): Rename to ...
2382 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2383 instead of a pid.
2384 (discard_queued_stop_replies): Change parameter to a ptid. Now
2385 extern.
2386 (handle_v_kill, kill_inferior_callback, captured_main)
2387 (process_serial_event): Adjust.
2388 * server.h (discard_queued_stop_replies): Declare.
2389
23902015-08-21 Pedro Alves <palves@redhat.com>
2391
2392 * linux-low.c (wait_for_sigstop): Always switch to no thread
2393 selected if the previously current thread dies.
2394 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2395 process instead of the current thread's.
2396 * remote-utils.c (input_interrupt): Don't check if there's no
2397 current thread.
2398 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2399 current thread to the general thread fails, error out.
2400 (handle_qxfer_auxv, handle_qxfer_libraries)
2401 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2402 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2403 (handle_query): Check if there's a thread selected instead of
2404 checking whether there's any thread in the thread list.
2405 (handle_qxfer_threads, handle_qxfer_btrace)
2406 (handle_qxfer_btrace_conf): Don't error out early if there's no
2407 thread in the thread list.
2408 (handle_v_cont, myresume): Don't set the current thread to the
2409 continue thread.
2410 (process_serial_event) <Hg handling>: Also set thread_id if the
2411 previous general thread is still alive.
2412 (process_serial_event) <g/G handling>: If setting the current
2413 thread to the general thread fails, error out.
2414 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2415 thread's lwp instead of the current thread's.
2416 * target.c (set_desired_thread): If the desired thread was not
2417 found, leave the current thread pointing to NULL. Return an int
2418 (boolean) indicating success.
2419 * target.h (set_desired_thread): Change return type to int.
2420
24212015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2422
2423 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2424 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2425 #includes.
2426 (ps_get_thread_area): New function.
2427
24282015-08-19 Gary Benson <gbenson@redhat.com>
2429
2430 * hostio.c (handle_pread): Do not attempt to read more data
2431 than hostio_reply_with_data can fit in a packet.
2432
24332015-08-18 Joel Brobecker <brobecker@adacore.com>
2434
2435 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2436
24372015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2438
2439 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2440
24412015-08-06 Pedro Alves <palves@redhat.com>
2442
2443 * tracepoint.c (expr_eval_result): Now an int.
2444
24452015-08-06 Pedro Alves <palves@redhat.com>
2446
2447 * gdbthread.h (struct regcache): Forward declare.
2448 (struct thread_info) <regcache_data>: Now a struct regcache
2449 pointer.
2450 * inferiors.c (inferior_regcache_data)
2451 (set_inferior_regcache_data): Now work with struct regcache
2452 pointers.
2453 * inferiors.h (struct regcache): Forward declare.
2454 (inferior_regcache_data, set_inferior_regcache_data): Now work
2455 with struct regcache pointers.
2456 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2457 (free_register_cache_thread): Remove struct regcache pointer
2458 casts.
2459
24602015-08-06 Pedro Alves <palves@redhat.com>
2461
2462 * server.c (captured_main): On error, print the exception message
2463 to stderr, and if run_once is set, throw a quit.
2464
24652015-08-06 Pedro Alves <palves@redhat.com>
2466
2467 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2468 the current thread.
2469
24702015-08-06 Pedro Alves <palves@redhat.com>
2471
2472 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2473 reading beyond the passed in buffer length.
2474
24752015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2476
2477 * tracepoint.c (symbol_list) <required>: Remove.
2478
24792015-08-06 Pedro Alves <palves@redhat.com>
2480
2481 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2482 count if stopping and suspending threads.
2483 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2484 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2485 (linux_detach): Complete an ongoing step-over.
2486 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2487 throughout.
2488 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2489 (linux_wait_1): If passing a signal to the inferior after
2490 finishing a step-over, unsuspend and re-resume all lwps. If we
2491 see a single-step event but the thread should be continuing, don't
2492 pass the trap to gdb.
2493 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2494 internal_error instead of gdb_assert.
2495 (enqueue_pending_signal): New function.
2496 (check_ptrace_stopped_lwp_gone): Add debug output.
2497 (start_step_over): Use internal_error instead of gdb_assert.
2498 (complete_ongoing_step_over): New function.
2499 (linux_resume_one_thread): Don't resume a suspended thread.
2500 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2501 it stepping.
2502
25032015-08-06 Pedro Alves <palves@redhat.com>
2504
2505 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2506 (linux_thread_alive): Use lwp_is_marked_dead.
2507 (extended_event_reported): Delete.
2508 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2509 instead of extended_event_reported.
2510 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2511 as well.
2512 (lwp_is_marked_dead): New function.
2513 (lwp_running): Use lwp_is_marked_dead.
2514 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2515 comment.
2516
25172015-08-06 Pedro Alves <palves@redhat.com>
2518
2519 * linux-low.c (linux_wait_1): Move fork event output out of the
2520 !report_to_gdb check. Pass event_child->waitstatus to
2521 target_waitstatus_to_string instead of ourstatus.
2522
25232015-08-04 Yao Qi <yao.qi@linaro.org>
2524
2525 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2526 if current_thread is 32 bit.
2527
25282015-08-04 Yao Qi <yao.qi@linaro.org>
2529
2530 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2531 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2532 * server.c (extended_protocol): Remove "static".
2533 * server.h (extended_protocol): Declare it.
2534
25352015-08-04 Yao Qi <yao.qi@linaro.org>
2536
2537 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2538 both aarch64 and aarch32.
2539 (aarch64_set_pc): Likewise.
2540
25412015-08-04 Yao Qi <yao.qi@linaro.org>
2542
2543 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2544 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2545 arm-with-neon.xml to srv_xmlfiles.
2546 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2547 (is_64bit_tdesc): New function.
2548 (aarch64_linux_read_description): New function.
2549 (aarch64_arch_setup): Call aarch64_linux_read_description.
2550 (regs_info): Rename to regs_info_aarch64.
2551 (aarch64_regs_info): Return right regs_info.
2552 (initialize_low_arch): Call initialize_low_arch_aarch32.
2553
25542015-08-04 Yao Qi <yao.qi@linaro.org>
2555
2556 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2557 * linux-aarch32-low.c: New file.
2558 * linux-aarch32-low.h: New file.
2559 * linux-arm-low.c (arm_fill_gregset): Move it to
2560 linux-aarch32-low.c.
2561 (arm_store_gregset): Likewise.
2562 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2563 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2564 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2565 (regs_info): Rename to regs_info_arm.
2566 (arm_regs_info): Return regs_info_aarch32 if
2567 have_ptrace_getregset is 1 and target description is
2568 arm_with_neon or arm_with_vfpv3.
2569 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2570 Call initialize_low_arch_aarch32 instead.
2571
25722015-08-04 Yao Qi <yao.qi@linaro.org>
2573
2574 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2575 * linux-low.c: ... here.
2576 * linux-low.h (have_ptrace_getregset): Declare it.
2577
25782015-08-04 Pedro Alves <palves@redhat.com>
2579
2580 * thread-db.c (struct thread_db): Use new typedefs.
2581 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2582 CHK calls.
2583 (disable_thread_event_reporting): Cast result of dlsym to
2584 destination function pointer type.
2585 (thread_db_mourn): Use td_ta_delete_ftype.
2586
25872015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2588
2589 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2590 arch variant.
2591 (CDX_BREAKPOINT): Define for R2.
2592 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2593 (the_low_target): Add comments.
2594
25952015-07-30 Yao Qi <yao.qi@linaro.org>
2596
2597 * linux-arm-low.c (arm_hwcap): Remove it.
2598 (arm_read_description): New local variable arm_hwcap. Don't
2599 set arm_hwcap to zero.
2600
26012015-07-30 Yao Qi <yao.qi@linaro.org>
2602
2603 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2604 Use regcache->tdesc instead.
2605 (arm_store_wmmxregset): Likewise.
2606 (arm_fill_vfpregset): Likewise.
2607 (arm_store_vfpregset): Likewise.
2608
26092015-07-30 Yao Qi <yao.qi@linaro.org>
2610
2611 * linux-arm-low.c: Include arch/arm.h.
2612 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2613 (arm_store_gregset): Likewise.
2614
26152015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2616
2617 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2618 ptrace's 4th parameter.
2619
26202015-07-27 Yao Qi <yao.qi@linaro.org>
2621
2622 * configure.srv (case aarch64*-*-linux*): Don't set
2623 srv_linux_usrregs.
2624
26252015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2626
2627 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2628 sys/ptrace.h.
2629 * linux-arm-low.c: Likewise.
2630 * linux-cris-low.c: Likewise.
2631 * linux-crisv32-low.c: Likewise.
2632 * linux-low.c: Likewise.
2633 * linux-m68k-low.c: Likewise.
2634 * linux-mips-low.c: Likewise.
2635 * linux-nios2-low.c: Likewise.
2636 * linux-s390-low.c: Likewise.
2637 * linux-sparc-low.c: Likewise.
2638 * linux-tic6x-low.c: Likewise.
2639 * linux-tile-low.c: Likewise.
2640 * linux-x86-low.c: Likewise.
2641
26422015-07-24 Pedro Alves <palves@redhat.com>
2643
2644 * config.in: Regenerate.
2645 * configure: Regenerate.
2646
26472015-07-24 Pedro Alves <palves@redhat.com>
2648
2649 * acinclude.m4: Include ../ptrace.m4.
2650 * configure.ac: Call GDB_AC_PTRACE.
2651 * config.in, configure: Regenerate.
2652
26532015-07-24 Yao Qi <yao.qi@linaro.org>
2654
2655 * linux-low.c (linux_create_inferior): Remove setting to
2656 proc->priv->new_inferior.
2657 (linux_attach): Likewise.
2658 (linux_low_filter_event): Likewise.
2659 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2660
26612015-07-24 Yao Qi <yao.qi@linaro.org>
2662
2663 * linux-low.c (linux_arch_setup): New function.
2664 (linux_low_filter_event): If proc->tdesc is NULL and
2665 proc->attached is true, call the_low_target.arch_setup.
2666 Otherwise, keep status pending, and return.
2667 (linux_resume_one_lwp_throw): Don't call get_pc if
2668 thread->while_stepping isn't NULL. Don't call
2669 get_thread_regcache if proc->tdesc is NULL.
2670 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2671 (linux_target_ops): Install arch_setup.
2672 * server.c (start_inferior): Call the_target->arch_setup.
2673 * target.h (struct target_ops) <arch_setup>: New field.
2674 (target_arch_setup): New marco.
2675 * lynx-low.c (lynx_target_ops): Update.
2676 * nto-low.c (nto_target_ops): Update.
2677 * spu-low.c (spu_target_ops): Update.
2678 * win32-low.c (win32_target_ops): Update.
2679
26802015-07-24 Yao Qi <yao.qi@linaro.org>
2681
2682 * linux-low.c (linux_add_process): Don't set
2683 proc->priv->new_inferior.
2684 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2685 (linux_attach): Likewise.
2686
26872015-07-24 Yao Qi <yao.qi@linaro.org>
2688
2689 * server.c (start_inferior): Code refactor.
2690
26912015-07-24 Yao Qi <yao.qi@linaro.org>
2692
2693 * server.c (process_serial_event): Set general_thread.
2694
26952015-07-21 Yao Qi <yao.qi@linaro.org>
2696
2697 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2698 aarch64_linux_get_debug_reg_capacity.
2699
27002015-07-17 Yao Qi <yao.qi@linaro.org>
2701
2702 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2703 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2704 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2705 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2706 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2707 (AARCH64_HWP_ALIGNMENT): Likewise.
2708 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2709 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2710 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2711 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2712 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2713 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2714 (struct aarch64_debug_reg_state): Likewise.
2715 (struct arch_lwp_info): Likewise.
2716 (aarch64_align_watchpoint): Likewise.
2717 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2718 (aarch64_watchpoint_length): Likewise.
2719 (aarch64_point_encode_ctrl_reg): Likewise
2720 (aarch64_point_is_aligned): Likewise.
2721 (aarch64_align_watchpoint): Likewise.
2722 (aarch64_linux_set_debug_regs):
2723 (aarch64_dr_state_insert_one_point): Likewise.
2724 (aarch64_dr_state_remove_one_point): Likewise.
2725 (aarch64_handle_breakpoint): Likewise.
2726 (aarch64_handle_aligned_watchpoint): Likewise.
2727 (aarch64_handle_unaligned_watchpoint): Likewise.
2728 (aarch64_handle_watchpoint): Likewise.
2729
27302015-07-17 Yao Qi <yao.qi@linaro.org>
2731
2732 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2733 and don't aarch64_get_debug_reg_state. All callers update.
2734 (aarch64_handle_aligned_watchpoint): Likewise.
2735 (aarch64_handle_unaligned_watchpoint): Likewise.
2736 (aarch64_handle_watchpoint): Likewise.
2737 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2738 (aarch64_remove_point): Likewise.
2739
27402015-07-17 Yao Qi <yao.qi@linaro.org>
2741
2742 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2743 debug_printf.
2744 (aarch64_handle_unaligned_watchpoint): Likewise.
2745
27462015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2747
2748 Revert the previous 3 commits:
2749 Move gdb_regex* to common/
2750 Move linux_find_memory_regions_full & co.
2751 gdbserver build-id attribute generator
2752
27532015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2754 Jan Kratochvil <jan.kratochvil@redhat.com>
2755
2756 gdbserver build-id attribute generator.
2757 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2758 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2759 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2760 (find_phdr): New.
2761 (get_dynamic): Use find_pdhr to traverse program headers.
2762 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2763 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2764 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2765 (get_hex_build_id): New.
2766 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2767 to reply XML document.
2768
27692015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2770 Jan Kratochvil <jan.kratochvil@redhat.com>
2771
2772 * target.c: Include target/target-utils.h and fcntl.h.
2773 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2774 (target_fileio_read_stralloc): New functions.
2775
27762015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2777
2778 * Makefile.in (OBS): Add gdb_regex.o.
2779 (gdb_regex.o): New.
2780 * config.in: Rebuilt.
2781 * configure: Rebuilt.
2782
27832015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2784 Jan Kratochvil <jan.kratochvil@redhat.com>
2785
2786 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2787 * Makefile.in (OBS): Add target-utils.o.
2788 (linux-maps.o, target-utils.o): New.
2789 * configure.srv (srv_linux_obj): Add linux-maps.o.
2790
27912015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2792
2793 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2794 function, return 1.
2795 (the_low_target): Install it.
2796
27972015-07-14 Pedro Alves <palves@redhat.com>
2798
2799 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2800 Instead, ignore ECHILD, and throw an error for other errnos.
2801
28022015-07-10 Pedro Alves <palves@redhat.com>
2803
2804 * event-loop.c (struct callback_event) <data>: Change type to
2805 gdb_client_data instance instead of gdb_client_data pointer.
2806 (append_callback_event): Adjust.
2807
28082015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2809
2810 * linux-aarch64-low.c: Add comments for each linux_target_ops
2811 method. Remove comments already covered in target_ops and
2812 linux_target_ops definitions.
2813 (the_low_target): Add comments for each unimplemented method.
2814
28152015-07-09 Yao Qi <yao.qi@linaro.org>
2816
2817 * linux-aarch64-low.c (aarch64_regmap): Remove.
2818 (aarch64_usrregs_info): Remove.
2819 (regs_info): Set field usrregs to NULL.
2820
28212015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2822
2823 * linux-low.c: Include "rsp-low.h"
2824 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2825 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2826 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2827 (handle_btrace_enable_pt): New.
2828 (handle_btrace_general_set): Support "pt".
2829 (handle_btrace_conf_general_set): Support "pt:size".
2830
28312015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2832
2833 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2834 Z_PACKET_SW_BP.
2835
28362015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2837
2838 * linux-aarch64-low.c: Remove comment about endianness.
2839 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2840 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2841 memcmp.
2842
28432015-06-24 Gary Benson <gbenson@redhat.com>
2844
2845 * linux-i386-ipa.c (stdint.h): Do not include.
2846 * lynx-i386-low.c (stdint.h): Likewise.
2847 * lynx-ppc-low.c (stdint.h): Likewise.
2848 * mem-break.c (stdint.h): Likewise.
2849 * thread-db.c (stdint.h): Likewise.
2850 * tracepoint.c (stdint.h): Likewise.
2851 * win32-low.c (stdint.h): Likewise.
2852
28532015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2854
2855 * server.c (write_qxfer_response): Update call to
2856 remote_escape_output.
2857
28582015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2859 Jan Kratochvil <jan.kratochvil@redhat.com>
2860
2861 Merge multiple hex conversions.
2862 * gdbreplay.c (tohex): Rename to 'fromhex'.
2863 (logchar): Use fromhex.
2864
28652015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2866
2867 * server.c (handle_qxfer_libraries): Set `version' attribute for
2868 <library-list>.
2869
28702015-06-10 Gary Benson <gbenson@redhat.com>
2871
2872 * target.h (struct target_ops) <multifs_open>: New field.
2873 <multifs_unlink>: Likewise.
2874 <multifs_readlink>: Likewise.
2875 * linux-low.c (nat/linux-namespaces.h): New include.
2876 (linux_target_ops): Initialize the_target->multifs_open,
2877 the_target->multifs_unlink and the_target->multifs_readlink.
2878 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2879 * hostio.c (hostio_fs_pid): New static variable.
2880 (hostio_handle_new_gdb_connection): New function.
2881 (handle_setfs): Likewise.
2882 (handle_open): Use the_target->multifs_open as appropriate.
2883 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2884 (handle_readlink): Use the_target->multifs_readlink as
2885 appropriate.
2886 (handle_vFile): Handle vFile:setfs packets.
2887 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2888 after target_handle_new_gdb_connection.
2889
28902015-06-10 Gary Benson <gbenson@redhat.com>
2891
2892 * configure.ac (AC_CHECK_FUNCS): Add setns.
2893 * config.in: Regenerate.
2894 * configure: Likewise.
2895 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2896 (linux-namespaces.o): New rule.
2897 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2898
28992015-06-09 Gary Benson <gbenson@redhat.com>
2900
2901 * hostio.c (handle_open): Process mode argument with
2902 fileio_to_host_mode.
2903
29042015-06-01 Yao Qi <yao.qi@linaro.org>
2905
2906 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2907 * linux-x86-low.c: Likewise.
2908
29092015-05-28 Don Breazeal <donb@codesourcery.com>
2910
2911 * linux-low.c (handle_extended_wait): Initialize
2912 thread_info.last_resume_kind for new fork children.
2913
29142015-05-15 Pedro Alves <palves@redhat.com>
2915
2916 * target.h (target_handle_new_gdb_connection): Rewrite using if
2917 wrapped in do/while.
2918
29192015-05-14 Joel Brobecker <brobecker@adacore.com>
2920
2921 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2922 * configure, config.in: Regenerate.
2923 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2924 Declare typedef.
2925
29262015-05-12 Don Breazeal <donb@codesourcery.com>
2927
2928 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2929 PTRACE_EVENT_VFORK_DONE.
2930 (linux_low_ptrace_options, extended_event_reported): Add vfork
2931 events.
2932 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2933 and "vforkdone" for RSP 'T' Stop Reply Packet.
2934 * server.h (report_vfork_events): Declare
2935 global variable.
2936
29372015-05-12 Don Breazeal <donb@codesourcery.com>
2938
2939 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2940 (the_low_target) <new_fork>: Initialize new member.
2941 * linux-arm-low.c (arm_new_fork): New function.
2942 (the_low_target) <new_fork>: Initialize new member.
2943 * linux-low.c (handle_extended_wait): Call new target function
2944 new_fork.
2945 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2946 * linux-mips-low.c (mips_add_watchpoint): New function
2947 extracted from mips_insert_point.
2948 (the_low_target) <new_fork>: Initialize new member.
2949 (mips_linux_new_fork): New function.
2950 (mips_insert_point): Call mips_add_watchpoint.
2951 * linux-x86-low.c (x86_linux_new_fork): New function.
2952 (the_low_target) <new_fork>: Initialize new member.
2953
29542015-05-12 Don Breazeal <donb@codesourcery.com>
2955
2956 * linux-low.c (handle_extended_wait): Implement return value,
2957 rename argument 'event_child' to 'event_lwp', handle
2958 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2959 (linux_low_ptrace_options): New function.
2960 (linux_low_filter_event): Call linux_low_ptrace_options,
2961 use different argument fo linux_enable_event_reporting,
2962 use return value from handle_extended_wait.
2963 (extended_event_reported): New function.
2964 (linux_wait_1): Call extended_event_reported and set
2965 status to report fork events.
2966 (linux_write_memory): Add pid to debug message.
2967 (reset_lwp_ptrace_options_callback): New function.
2968 (linux_handle_new_gdb_connection): New function.
2969 (linux_target_ops): Initialize new structure member.
2970 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2971 * lynx-low.c: Initialize new structure member.
2972 * remote-utils.c (prepare_resume_reply): Implement stop reason
2973 "fork" for "T" stop message.
2974 * server.c (handle_query): Call handle_new_gdb_connection.
2975 * server.h (report_fork_events): Declare global flag.
2976 * target.h (struct target_ops) <handle_new_gdb_connection>:
2977 New member.
2978 (target_handle_new_gdb_connection): New macro.
2979 * win32-low.c: Initialize new structure member.
2980
29812015-05-12 Don Breazeal <donb@codesourcery.com>
2982
2983 * mem-break.c (APPEND_TO_LIST): Define macro.
2984 (clone_agent_expr): New function.
2985 (clone_one_breakpoint): New function.
2986 (clone_all_breakpoints): New function.
2987 * mem-break.h: Declare new functions.
2988
29892015-05-12 Don Breazeal <donb@codesourcery.com>
2990
2991 * linux-low.c (linux_supports_fork_events): New function.
2992 (linux_supports_vfork_events): New function.
2993 (linux_target_ops): Initialize new structure members.
2994 (initialize_low): Call linux_check_ptrace_features.
2995 * lynx-low.c (lynx_target_ops): Initialize new structure
2996 members.
2997 * server.c (report_fork_events, report_vfork_events):
2998 New global flags.
2999 (handle_query): Add new features to qSupported packet and
3000 response.
3001 (captured_main): Initialize new global variables.
3002 * target.h (struct target_ops) <supports_fork_events>:
3003 New member.
3004 <supports_vfork_events>: New member.
3005 (target_supports_fork_events): New macro.
3006 (target_supports_vfork_events): New macro.
3007 * win32-low.c (win32_target_ops): Initialize new structure
3008 members.
3009
30102015-05-12 Gary Benson <gbenson@redhat.com>
3011
3012 * server.c (handle_qxfer_exec_file): Use current process
3013 if annex is empty.
3014
30152015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3016
3017 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3018 Remove HAVE_PTRACE_GETREGS conditionals.
3019 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3020 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3021
30222015-05-08 Yao Qi <yao.qi@linaro.org>
3023
3024 * linux-low.c (linux_supports_conditional_breakpoints): New
3025 function.
3026 (linux_target_ops): Install new target method.
3027 * lynx-low.c (lynx_target_ops): Install NULL hook for
3028 supports_conditional_breakpoints.
3029 * nto-low.c (nto_target_ops): Likewise.
3030 * spu-low.c (spu_target_ops): Likewise.
3031 * win32-low.c (win32_target_ops): Likewise.
3032 * server.c (handle_query): Check
3033 target_supports_conditional_breakpoints.
3034 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3035 New field.
3036 (target_supports_conditional_breakpoints): New macro.
3037
30382015-05-06 Pedro Alves <palves@redhat.com>
3039
3040 PR server/18081
3041 * server.c (start_inferior): If the process exits, mourn it.
3042
30432015-04-21 Gary Benson <gbenson@redhat.com>
3044
3045 * hostio.c (fileio_open_flags_to_host): Factored out to
3046 fileio_to_host_openflags in common/fileio.c. Single use
3047 updated.
3048
30492015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3050
3051 * linux-xtensa-low.c (xtensa_fill_gregset)
3052 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3053 XCHAL_HAVE_LOOP.
3054
30552015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3056
3057 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3058 (regs_info): Replace usrregs pointer with NULL.
3059
30602015-04-17 Gary Benson <gbenson@redhat.com>
3061
3062 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3063 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3064 * server.c (handle_qxfer_exec_file): New function.
3065 (qxfer_packets): Add exec-file entry.
3066 (handle_query): Report qXfer:exec-file:read as supported packet.
3067
30682015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3069
3070 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3071
30722015-04-09 Gary Benson <gbenson@redhat.com>
3073
3074 * hostio-errno.c (errno_to_fileio_error): Remove function.
3075 Update caller to use remote_fileio_to_fio_error.
3076
30772015-04-09 Yao Qi <yao.qi@linaro.org>
3078
3079 * linux-low.c (linux_insert_point): Call
3080 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3081 (linux_remove_point): Call remove_memory_breakpoint if type is
3082 raw_bkpt_type_sw.
3083 * linux-x86-low.c (x86_insert_point): Don't call
3084 insert_memory_breakpoint.
3085 (x86_remove_point): Don't call remove_memory_breakpoint.
3086
30872015-04-01 Pedro Alves <palves@redhat.com>
3088 Cleber Rosa <crosa@redhat.com>
3089
3090 * server.c (gdbserver_usage): Reorganize and extend the usage
3091 message.
3092
30932015-03-24 Pedro Alves <palves@redhat.com>
3094
3095 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3096 output. Also dump TRAP_TRACE.
3097 (linux_low_filter_event): In debug output, distinguish a
3098 resume_stop SIGSTOP from a delayed SIGSTOP.
3099
31002015-03-24 Gary Benson <gbenson@redhat.com>
3101
3102 * linux-x86-low.c (x86_linux_new_thread): Moved to
3103 nat/x86-linux.c.
3104 (x86_linux_prepare_to_resume): Likewise.
3105
31062015-03-24 Gary Benson <gbenson@redhat.com>
3107
3108 * Makefile.in (x86-linux-dregs.o): New rule.
3109 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3110 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3111 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3112 (x86_linux_dr_get): Likewise.
3113 (x86_linux_dr_set): Likewise.
3114 (update_debug_registers_callback): Likewise.
3115 (x86_linux_dr_set_addr): Likewise.
3116 (x86_linux_dr_get_addr): Likewise.
3117 (x86_linux_dr_set_control): Likewise.
3118 (x86_linux_dr_get_control): Likewise.
3119 (x86_linux_dr_get_status): Likewise.
3120 (x86_linux_update_debug_registers): Likewise.
3121
31222015-03-24 Gary Benson <gbenson@redhat.com>
3123
3124 * linux-x86-low.c (x86_linux_update_debug_registers):
3125 New function, factored out from...
3126 (x86_linux_prepare_to_resume): ...this.
3127
31282015-03-24 Gary Benson <gbenson@redhat.com>
3129
3130 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3131 (x86_linux_dr_set): Likewise.
3132 (update_debug_registers_callback): Likewise.
3133 (x86_linux_dr_set_addr): Likewise.
3134 (x86_linux_dr_get_addr): Likewise.
3135 (x86_linux_dr_set_control): Likewise.
3136 (x86_linux_dr_get_control): Likewise.
3137 (x86_linux_dr_get_status): Likewise.
3138 (x86_linux_prepare_to_resume): Likewise.
3139
31402015-03-24 Gary Benson <gbenson@redhat.com>
3141
3142 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3143 Use perror_with_name. Pass string through gettext.
3144 (x86_linux_dr_set): Likewise.
3145
31462015-03-24 Gary Benson <gbenson@redhat.com>
3147
3148 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3149 (x86_linux_dr_set_addr): ...this.
3150 (x86_dr_low_get_addr): Rename to...
3151 (x86_linux_dr_get_addr): ...this.
3152 (x86_dr_low_set_control): Rename to...
3153 (x86_linux_dr_set_control): ...this.
3154 (x86_dr_low_get_control): Rename to...
3155 (x86_linux_dr_get_control): ...this.
3156 (x86_dr_low_get_status): Rename to...
3157 (x86_linux_dr_get_status): ...this.
3158 (x86_dr_low): Update with new function names.
3159
31602015-03-24 Gary Benson <gbenson@redhat.com>
3161
3162 * Makefile.in (x86-linux.o): New rule.
3163 * configure.srv: Add x86-linux.o to relevant targets.
3164 * linux-low.c (lwp_set_arch_private_info): New function.
3165 (lwp_arch_private_info): Likewise.
3166 * linux-x86-low.c: Include nat/x86-linux.h.
3167 (arch_lwp_info): Removed structure.
3168 (update_debug_registers_callback):
3169 Use lwp_set_debug_registers_changed.
3170 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3171 and lwp_set_debug_registers_changed.
3172 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3173
31742015-03-24 Gary Benson <gbenson@redhat.com>
3175
3176 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3177 * linux-arm-low.c (arm_new_thread): Likewise.
3178 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3179 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3180 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3181 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3182
31832015-03-24 Gary Benson <gbenson@redhat.com>
3184
3185 * linux-low.c (ptid_of_lwp): New function.
3186 (lwp_is_stopped): Likewise.
3187 (lwp_stop_reason): Likewise.
3188 * linux-x86-low.c (update_debug_registers_callback):
3189 Use lwp_is_stopped.
3190 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3191 lwp_stop_reason.
3192
31932015-03-24 Gary Benson <gbenson@redhat.com>
3194
3195 * linux-low.h (linux_stop_lwp): Remove declaration.
3196
31972015-03-24 Gary Benson <gbenson@redhat.com>
3198
3199 * linux-low.h: Include nat/linux-nat.h.
3200 * linux-low.c (iterate_over_lwps_args): New structure.
3201 (iterate_over_lwps_filter): New function.
3202 (iterate_over_lwps): Likewise.
3203 * linux-x86-low.c (update_debug_registers_callback):
3204 Update signature to what iterate_over_lwps expects.
3205 Remove PID check that iterate_over_lwps now performs.
3206 (x86_dr_low_set_addr): Use iterate_over_lwps.
3207 (x86_dr_low_set_control): Likewise.
3208
32092015-03-24 Gary Benson <gbenson@redhat.com>
3210
3211 * linux-x86-low.c (x86_debug_reg_state): New function.
3212 (x86_linux_prepare_to_resume): Use the above.
3213
32142015-03-24 Gary Benson <gbenson@redhat.com>
3215
3216 * linux-low.c (current_lwp_ptid): New function.
3217 * linux-x86-low.c: Include nat/linux-nat.h.
3218 (x86_dr_low_get_addr): Use current_lwp_ptid.
3219 (x86_dr_low_get_control): Likewise.
3220 (x86_dr_low_get_status): Likewise.
3221
32222015-03-20 Pedro Alves <palves@redhat.com>
3223
3224 * tracepoint.c (cmd_qtstatus): Make "str" const.
3225
32262015-03-20 Pedro Alves <palves@redhat.com>
3227
3228 * server.c (handle_general_set): Make "req_str" const.
3229
32302015-03-19 Pedro Alves <palves@redhat.com>
3231
3232 * linux-low.c (linux_resume_one_lwp): Rename to ...
3233 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3234 instead call perror_with_name.
3235 (check_ptrace_stopped_lwp_gone): New function.
3236 (linux_resume_one_lwp): Reimplement as wrapper around
3237 linux_resume_one_lwp_throw that swallows errors if the LWP is
3238 gone.
3239
32402015-03-19 Pedro Alves <palves@redhat.com>
3241
3242 * linux-low.c (count_events_callback, select_event_lwp_callback):
3243 No longer check whether the thread has resume_stop as last resume
3244 kind.
3245
32462015-03-19 Pedro Alves <palves@redhat.com>
3247
3248 * linux-low.c (count_events_callback, select_event_lwp_callback):
3249 Use the lwp's status_pending_p field, not the thread's.
3250
32512015-03-19 Pedro Alves <palves@redhat.com>
3252
3253 * linux-low.c (select_event_lwp_callback): Update comments to
3254 no longer mention SIGTRAP.
3255
32562015-03-18 Gary Benson <gbenson@redhat.com>
3257
3258 * server.c (handle_query): Do not report vFile:fstat as supported.
3259
32602015-03-11 Gary Benson <gbenson@redhat.com>
3261
3262 * hostio.c (sys/types.h): New include.
3263 (sys/stat.h): Likewise.
3264 (common-remote-fileio.h): Likewise.
3265 (handle_fstat): New function.
3266 (handle_vFile): Handle vFile:fstat packets.
3267
32682015-03-11 Gary Benson <gbenson@redhat.com>
3269
3270 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3271 struct stat.st_blocks and struct stat.st_blksize.
3272 * configure: Regenerate.
3273 * config.in: Likewise.
3274 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3275 (OBS): Add common-remote-fileio.o.
3276 (common-remote-fileio.o): New rule.
3277
32782015-03-09 Pedro Alves <palves@redhat.com>
3279
3280 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3281 'struct sockaddr' pointer in 'accept' call.
3282
32832015-03-09 Pedro Alves <palves@redhat.com>
3284
3285 Revert:
3286 2015-03-07 Pedro Alves <palves@redhat.com>
3287 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3288 or <winsock2.h> here. Instead include "gdb_socket.h".
3289 (remote_open): Use union gdb_sockaddr_u.
3290 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3291 or <winsock2.h> here. Instead include "gdb_socket.h".
3292 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3293 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3294 or <sys/un.h>.
3295 (init_named_socket, gdb_agent_helper_thread): Use union
3296 gdb_sockaddr_u.
3297
32982015-03-07 Pedro Alves <palves@redhat.com>
3299
3300 * configure.ac (build_warnings): Move
3301 -Wdeclaration-after-statement to the C-specific set.
3302 * configure: Regenerate.
3303
33042015-03-07 Pedro Alves <palves@redhat.com>
3305
3306 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3307 or <winsock2.h> here. Instead include "gdb_socket.h".
3308 (remote_open): Use union gdb_sockaddr_u.
3309 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3310 or <winsock2.h> here. Instead include "gdb_socket.h".
3311 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3312 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3313 or <sys/un.h>.
3314 (init_named_socket, gdb_agent_helper_thread): Use union
3315 gdb_sockaddr_u.
3316
33172015-03-07 Pedro Alves <palves@redhat.com>
3318
3319 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3320 instead.
3321
33222015-03-06 Yao Qi <yao.qi@linaro.org>
3323
3324 * linux-aarch64-low.c (aarch64_insert_point): Use
3325 show_debug_regs as a boolean.
3326 (aarch64_remove_point): Likewise.
3327
33282015-03-05 Pedro Alves <palves@redhat.com>
3329
3330 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3331 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3332 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3333 * nto-low.c (nto_target_ops): Likewise.
3334 * spu-low.c (spu_target_ops): Likewise.
3335 * win32-low.c (win32_target_ops): Likewise.
3336
33372015-03-04 Pedro Alves <palves@redhat.com>
3338
3339 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3340 Decide whether a breakpoint triggered based on the SIGTRAP's
3341 siginfo.si_code.
3342 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3343 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3344 (linux_low_filter_event): Check for breakpoints before checking
3345 watchpoints.
3346 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3347 siginfo.si_code.
3348 (linux_stopped_by_sw_breakpoint)
3349 (linux_supports_stopped_by_sw_breakpoint)
3350 (linux_stopped_by_hw_breakpoint)
3351 (linux_supports_stopped_by_hw_breakpoint): New functions.
3352 (linux_target_ops): Install new target methods.
3353
33542015-03-04 Pedro Alves <palves@redhat.com>
3355
3356 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3357 * server.c (swbreak_feature, hwbreak_feature): New globals.
3358 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3359 (captured_main): Clear swbreak_feature and hwbreak_feature.
3360 * server.h (swbreak_feature, hwbreak_feature): Declare.
3361 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3362 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3363 supports_stopped_by_hw_breakpoint>: New fields.
3364 (target_supports_stopped_by_sw_breakpoint)
3365 (target_stopped_by_sw_breakpoint)
3366 (target_supports_stopped_by_hw_breakpoint)
3367 (target_stopped_by_hw_breakpoint): Declare.
3368
33692015-03-04 Pedro Alves <palves@redhat.com>
3370
3371 enum lwp_stop_reason -> enum target_stop_reason
3372 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3373 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3374 (linux_wait_1, stuck_in_jump_pad_callback)
3375 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3376 (linux_stopped_by_watchpoint):
3377 * linux-low.h (enum lwp_stop_reason): Delete.
3378 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3379 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3380
33812015-03-04 Yao Qi <yao.qi@linaro.org>
3382
3383 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3384
33852015-03-03 Gary Benson <gbenson@redhat.com>
3386
3387 * hostio.c (handle_vFile): Fix prefix lengths.
3388
33892015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3390
3391 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3392 ptr_bits.
3393
33942015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3395
3396 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3397 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3398 (clean): Add "rm -f" for above C files.
3399 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3400 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3401 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3402 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3403 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3404 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3405 (init_registers_s390x_vx_linux64)
3406 (init_registers_s390x_tevx_linux64)
3407 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3408 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3409 declarations.
3410 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3411 (s390_store_vxrs_high): New functions.
3412 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3413 NT_S390_VXRS_HIGH.
3414 (s390_arch_setup): Add logic for selecting one of the new target
3415 descriptions. Activate the new vector regsets if applicable.
3416 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3417 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3418 and init_registers_s390x_tevx_linux64.
3419
34202015-03-01 Pedro Alves <palves@redhat.com>
3421
3422 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3423 parameter.
3424
34252015-02-27 Pedro Alves <palves@redhat.com>
3426
3427 * linux-x86-low.c (u_debugreg_offset): New function.
3428 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3429
34302015-02-27 Pedro Alves <palves@redhat.com>
3431
3432 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3433 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3434 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3435 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3436 (ps_lsetfpregs, ps_getpid)
3437 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3438 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3439 (ps_lsetxregs, ps_plog): Declare.
3440
34412015-02-27 Pedro Alves <palves@redhat.com>
3442
3443 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3444 IP_AGENT_EXPORT_FUNC.
3445 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3446 IP_AGENT_EXPORT_FUNC.
3447 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3448 (IP_AGENT_EXPORT): Delete.
3449 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3450 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3451 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3452 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3453 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3454 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3455 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3456 (traceframe_read_count, traceframe_write_count)
3457 (traceframes_created, trace_state_variables, get_raw_reg)
3458 (get_trace_state_variable_value, set_trace_state_variable_value)
3459 (ust_loaded, helper_thread_id, cmd_buf): Use
3460 IPA_SYM_EXPORTED_NAME.
3461 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3462 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3463 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3464 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3465 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3466 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3467 EXTERN_C_PUSH/EXTERN_C_POP.
3468 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3469 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3470 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3471 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3472 (traceframe_write_count, traceframe_read_count)
3473 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3474 (about_to_request_buffer_space, get_trace_state_variable_value)
3475 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3476 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3477 EXTERN_C_PUSH/EXTERN_C_POP.
3478 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3479 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3480 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3481 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3482 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3483 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3484 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3485 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3486 Define.
3487 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3488 (IP_AGENT_EXPORT_VAR_DECL): Define.
3489 (tracing): Declare.
3490 (gdb_agent_get_raw_reg): Declare.
3491
34922015-02-27 Tom Tromey <tromey@redhat.com>
3493 Pedro Alves <palves@redhat.com>
3494
3495 Rename symbols whose names are reserved C++ keywords throughout.
3496
34972015-02-27 Pedro Alves <palves@redhat.com>
3498
3499 * Makefile.in (COMPILER): New, get it from autoconf.
3500 (CXX): Get from autoconf instead.
3501 (COMPILE.pre): Use COMPILER.
3502 (CC-LD): Rename to ...
3503 (CC_LD): ... this. Use COMPILER.
3504 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3505 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3506 * acinclude.m4: Include build-with-cxx.m4.
3507 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3508 Disable -Werror by default if building in C++ mode.
3509 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3510 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3511 the C++ compiler. Save/restore CXXFLAGS too.
3512 * configure: Regenerate.
3513
35142015-02-27 Pedro Alves <palves@redhat.com>
3515
3516 * acinclude.m4: Include libiberty.m4.
3517 * configure.ac: Call libiberty_INIT.
3518 * config.in, configure: Regenerate.
3519
35202015-02-26 Pedro Alves <palves@redhat.com>
3521
3522 * linux-low.c (linux_wait_1): When incrementing the PC past a
3523 program breakpoint always use the_low_target.breakpoint_len as
3524 increment, rather than the maximum between that and
3525 the_low_target.decr_pc_after_break.
3526
35272015-02-23 Pedro Alves <palves@redhat.com>
3528
3529 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3530 thread was doing a step-over; always adjust the PC if
3531 we stepped over a permanent breakpoint.
3532 (linux_wait_1): If we stepped over breakpoint that was on top of a
3533 permanent breakpoint, manually advance the PC past it.
3534
35352015-02-23 Pedro Alves <palves@redhat.com>
3536
3537 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3538 modes.
3539 (x86_fill_gregset, x86_store_gregset): Use it when handling
3540 $orig_eax.
3541
35422015-02-20 Pedro Alves <palves@redhat.com>
3543
3544 * thread-db.c: Include "nat/linux-procfs.h".
3545 (thread_db_init): Skip listing new threads if the kernel supports
3546 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3547
35482015-02-20 Pedro Alves <palves@redhat.com>
3549
3550 * linux-low.c (status_pending_p_callback): Use ptid_match.
3551
35522015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3553
3554 PR breakpoints/16812
3555 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3556 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3557 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3558
35592015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3560
3561 PR breakpoints/15956
3562 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3563
35642015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3565
3566 * linux-low.c (linux_low_btrace_conf): Print size.
3567 * server.c (handle_btrace_conf_general_set): New.
3568 (hanle_general_set): Call handle_btrace_conf_general_set.
3569 (handle_query): Report Qbtrace-conf:bts:size as supported.
3570
35712015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3572
3573 * linux-low.c (linux_low_enable_btrace): Update parameters.
3574 (linux_low_btrace_conf): New.
3575 (linux_target_ops)<to_btrace_conf>: Initialize.
3576 * server.c (current_btrace_conf): New.
3577 (handle_btrace_enable): Rename to ...
3578 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3579 to target_enable_btrace. Update comment. Update users.
3580 (handle_qxfer_btrace_conf): New.
3581 (qxfer_packets): Add btrace-conf entry.
3582 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3583 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3584 (target_ops)<read_btrace_conf>: New.
3585 (target_enable_btrace): Update parameters.
3586 (target_read_btrace_conf): New.
3587
35882015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3589
3590 * server.c (handle_btrace_general_set): Remove call to
3591 target_supports_btrace.
3592 (supported_btrace_packets): New.
3593 (handle_query): Call supported_btrace_packets.
3594 * target.h: include btrace-common.h.
3595 (btrace_target_info): Removed.
3596 (supports_btrace, target_supports_btrace): Update parameters.
3597
35982015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3599
3600 * Makefile.in (SFILES): Add common/btrace-common.c.
3601 (OBS): Add common/btrace-common.o.
3602 (btrace-common.o): Add build rules.
3603 * linux-low: Include btrace-common.h.
3604 (linux_low_read_btrace): Use struct btrace_data. Call
3605 btrace_data_init and btrace_data_fini.
3606
36072015-02-06 Pedro Alves <palves@redhat.com>
3608
3609 * thread-db.c (find_new_threads_callback): Add debug output.
3610
36112015-02-04 Pedro Alves <palves@redhat.com>
3612
3613 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3614 (resume_stopped_resumed_lwps): New function.
3615 (linux_wait_for_event_filtered): Use it.
3616
36172015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3618
3619 * Makefile.in (SFILES): Add linux-personality.c.
3620 (linux-personality.o): New rule.
3621 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3622 list of objects to be built.
3623 * linux-low.c: Include nat/linux-personality.h.
3624 (linux_create_inferior): Remove code to disable address space
3625 randomization (moved to ../nat/linux-personality.c). Create
3626 cleanup to disable address space randomization.
3627
36282015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3629
3630 * Makefile.in (posix-strerror.o): New rule.
3631 (mingw-strerror.o): Likewise.
3632 * configure: Regenerated.
3633 * configure.ac: Source file ../common/common.host. Initialize new
3634 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3635
36362015-01-14 Yao Qi <yao@codesourcery.com>
3637
3638 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3639 (ppc-linux.o): New rule.
3640 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3641 * configure.ac: AC_CHECK_FUNCS(getauxval).
3642 * config.in: Re-generated.
3643 * configure: Re-generated.
3644 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3645 ppc64_64bit_inferior_p
3646
36472015-01-14 Yao Qi <yao@codesourcery.com>
3648
3649 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3650 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3651 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3652 (PT_ORIG_R3, PT_TRAP): Likewise.
3653 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3654 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3655 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3656
36572015-01-10 Joel Brobecker <brobecker@adacore.com>
3658
3659 * i387-fp.c (i387_cache_to_xsave): In look over
3660 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3661 zmmh_low_space field by use of zmmh_high_space.
3662
36632015-01-09 Pedro Alves <palves@redhat.com>
3664
3665 * linux-low.c (step_over_bkpt): Move higher up in the file.
3666 (handle_extended_wait): Don't store the stop_pc here.
3667 (get_stop_pc): Adjust comments and rename to ...
3668 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3669 stopped for a software breakpoint or hardware breakpoint.
3670 (thread_still_has_status_pending_p): New function.
3671 (status_pending_p_callback): Use
3672 thread_still_has_status_pending_p. If the event is no longer
3673 interesting, resume the LWP.
3674 (handle_tracepoints): Add assert.
3675 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3676 (wstatus_maybe_breakpoint): New function.
3677 (cancel_breakpoint): Delete function.
3678 (check_stopped_by_watchpoint): New function, factored out from
3679 linux_low_filter_event.
3680 (lp_status_maybe_breakpoint): Delete function.
3681 (linux_low_filter_event): Remove filter_ptid argument.
3682 Leave thread group exits pending here. Store the LWP's stop PC.
3683 Always leave events pending.
3684 (linux_wait_for_event_filtered): Pull all events out of the
3685 kernel, and leave them all pending.
3686 (count_events_callback, select_event_lwp_callback): Consider all
3687 events.
3688 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3689 (select_event_lwp): Only give preference to the stepping LWP in
3690 all-stop mode. Adjust comments.
3691 (ignore_event): New function.
3692 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3693 references to cancel_breakpoints. Adjust to renames. Also give
3694 equal priority to all LWPs that have had events in non-stop mode.
3695 If reporting a software breakpoint event, unadjust the LWP's PC.
3696 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3697 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3698 Adjust.
3699 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3700 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3701 (linux_stopped_by_watchpoint): Adjust.
3702 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3703 * linux-low.h (enum lwp_stop_reason): New.
3704 (struct lwp_info) <stop_pc>: Adjust comment.
3705 <stopped_by_watchpoint>: Delete field.
3706 <stop_reason>: New field.
3707 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3708 * mem-break.c (software_breakpoint_inserted_here)
3709 (hardware_breakpoint_inserted_here): New function.
3710 * mem-break.h (software_breakpoint_inserted_here)
3711 (hardware_breakpoint_inserted_here): Declare.
3712 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3713 (cancel_breakpoints): Delete.
3714 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3715 (upload_fast_traceframes): Remove references to
3716 cancel_breakpoints.
3717
37182015-01-09 Pedro Alves <palves@redhat.com>
3719
3720 * thread-db.c (find_new_threads_callback): Ignore thread if the
3721 kernel thread ID is -1.
3722
37232015-01-09 Pedro Alves <palves@redhat.com>
3724
3725 * linux-low.c (linux_attach_fail_reason_string): Move to
3726 nat/linux-ptrace.c, and rename.
3727 (linux_attach_lwp): Update comment.
3728 (attach_proc_task_lwp_callback): New function.
3729 (linux_attach): Adjust to rename and use
3730 linux_proc_attach_tgid_threads.
3731 (linux_attach_fail_reason_string): Delete declaration.
3732
37332015-01-01 Joel Brobecker <brobecker@adacore.com>
3734
3735 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3736 * server.c (gdbserver_version): Likewise.
3737
37382014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3739
3740 * remote-utils.c: Include ctype.h.
3741 (input_interrupt): Explicitly handle the case when the char
3742 received is the NUL byte. Improve the printing of non-ASCII
3743 characters.
3744
37452014-12-16 Joel Brobecker <brobecker@adacore.com>
3746
3747 * linux-low.c (linux_low_filter_event): Update call to
3748 linux_enable_event_reporting following the addition of
3749 a new parameter to that function.
3750
37512014-12-16 Catalin Udma <catalin.udma@freescale.com>
3752
3753 PR server/17457
3754 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3755 (AARCH64_FPCR_REGNO): Likewise.
3756 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3757 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3758 (aarch64_store_fpregset): Likewise.
3759
37602014-12-15 Joel Brobecker <brobecker@adacore.com>
3761
3762 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3763 Remove FIXME comment about assumption about N.
3764
37652014-12-13 Joel Brobecker <brobecker@adacore.com>
3766
3767 * configure.ac: If large-file support is disabled in GDBserver,
3768 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3769 * configure: Regenerate.
3770
37712014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3772
3773 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3774 warning upon ENODATA from ptrace.
3775 * linux-s390-low.c (s390_store_tdb): New.
3776 (s390_regsets): Add regset for NT_S390_TDB.
3777
37782014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3779
3780 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3781 without a fill_function.
3782 * linux-s390-low.c (s390_fill_last_break): Remove.
3783 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3784 (s390_arch_setup): Use regset's size instead of fill_function for
3785 loop end condition.
3786
37872014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3788
3789 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3790 the regset's store function when ptrace returned an error.
3791 * regcache.c (get_thread_regcache): Invalidate register cache
3792 before fetching inferior's registers.
3793
37942014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3795
3796 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3797 while-loop as for-loop.
3798 (regsets_store_inferior_registers): Likewise.
3799
38002014-11-28 Yao Qi <yao@codesourcery.com>
3801
3802 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3803 * config.in, configure: Re-generate.
3804 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3805 is defined.
3806
38072014-11-21 Yao Qi <yao@codesourcery.com>
3808
3809 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3810 (AC_CHECK_HEADERS): Remove malloc.h.
3811 * configure: Re-generated.
3812 * config.in: Re-generated.
3813 * server.h: Don't include alloca.h and malloc.h.
3814 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3815 Don't include malloc.h.
3816
38172014-11-17 Joel Brobecker <brobecker@adacore.com>
3818
3819 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3820 corresponding ERRNO check in same block.
3821
38222014-11-12 Pedro Alves <palves@redhat.com>
3823
3824 * server.c (cont_thread): Update comment.
3825 (start_inferior, attach_inferior): No longer clear cont_thread.
3826 (handle_v_cont): No longer set cont_thread.
3827 (captured_main): Clear cont_thread each time a GDB connects.
3828
38292014-11-12 Pedro Alves <palves@redhat.com>
3830
3831 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3832 thread, and don't resume all threads if the Hc thread has exited.
3833
38342014-11-12 Pedro Alves <palves@redhat.com>
3835
3836 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3837 the process group instead of to a specific LWP.
3838
38392014-10-15 Pedro Alves <palves@redhat.com>
3840
3841 PR server/17487
3842 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3843 parameter.
3844 (arm_set_thread_context): Delete.
3845 (the_low_target): Adjust.
3846 * win32-i386-low.c (debug_registers_changed)
3847 (debug_registers_used): Delete.
3848 (update_debug_registers_callback): New function.
3849 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3850 needing to update their debug registers.
3851 (win32_get_current_dr): New function.
3852 (x86_dr_low_get_addr, x86_dr_low_get_control)
3853 (x86_dr_low_get_status): Fetch the debug register from the thread
3854 record's context.
3855 (i386_initial_stuff): Adjust.
3856 (i386_get_thread_context): Remove current_event parameter. Don't
3857 clear debug_registers_changed nor copy DR values to
3858 debug_reg_state.
3859 (i386_set_thread_context): Delete.
3860 (i386_prepare_to_resume): New function.
3861 (i386_thread_added): Mark the thread as needing to update irs
3862 debug registers.
3863 (the_low_target): Remove i386_set_thread_context and install
3864 i386_prepare_to_resume.
3865 * win32-low.c (win32_get_thread_context): Adjust.
3866 (win32_set_thread_context): Use SetThreadContext
3867 directly.
3868 (win32_prepare_to_resume): New function.
3869 (win32_require_context): New function, factored out from ...
3870 (thread_rec): ... this.
3871 (continue_one_thread): Call win32_prepare_to_resume on each thread
3872 we're about to continue.
3873 (win32_resume): Call win32_prepare_to_resume on the event thread.
3874 * win32-low.h (struct win32_thread_info)
3875 <debug_registers_changed>: New field.
3876 (struct win32_target_ops): Change prototype of set_thread_context,
3877 delete set_thread_context and add prepare_to_resume.
3878 (win32_require_context): New declaration.
3879
38802014-10-08 Gary Benson <gbenson@redhat.com>
3881
3882 * server.h: Do not include common-exceptions.h.
3883
38842014-10-08 Gary Benson <gbenson@redhat.com>
3885
3886 * server.h: Do not include cleanups.h.
3887
38882014-09-30 James Hogan <james.hogan@imgtec.com>
3889
3890 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3891 mips64-dsp-linux.c.
3892
38932014-09-23 Yao Qi <yao@codesourcery.com>
3894
3895 * linux-low.c (lp_status_maybe_breakpoint): New function.
3896 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3897 (count_events_callback): Likewise.
3898 (select_event_lwp_callback): Likewise.
3899 (cancel_breakpoints_callback): Likewise.
3900
39012014-09-19 Don Breazeal <donb@codesourcery.com>
3902
3903 * linux-low.c (handle_extended_wait): Call
3904 linux_ptrace_get_extended_event.
3905 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3906 linux_is_extended_waitstatus.
3907
39082014-09-16 Joel Brobecker <brobecker@adacore.com>
3909
3910 * Makefile.in (CPPFLAGS): Define.
3911 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3912 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3913
39142014-09-16 Gary Benson <gbenson@redhat.com>
3915
3916 * inferiors.h (current_inferior): Renamed as...
3917 (current_thread): New variable. All uses updated.
3918 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3919 (maybe_move_out_of_jump_pad): Likewise.
3920 (cancel_breakpoint): Likewise.
3921 (linux_low_filter_event): Likewise.
3922 (wait_for_sigstop): Likewise.
3923 (linux_resume_one_lwp): Likewise.
3924 (need_step_over_p): Likewise.
3925 (start_step_over): Likewise.
3926 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3927 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3928 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3929 and save_inferior as saved_thread.
3930 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3931 saved_thread.
3932 (regcache_invalidate_thread): Likewise.
3933 * remote-utils.c (prepare_resume_reply): Likewise.
3934 * thread-db.c (thread_db_get_tls_address): Likewise.
3935 (disable_thread_event_reporting): Likewise.
3936 (remove_thread_event_breakpoints): Likewise.
3937 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3938 as saved_thread.
3939 * target.h (set_desired_inferior): Renamed as...
3940 (set_desired_thread): New declaration. All uses updated.
3941 * server.c (myresume): Updated comment to reference thread instead
3942 of inferior.
3943 (handle_serial_event): Likewise.
3944 (handle_target_event): Likewise.
3945
39462014-09-12 Tom Tromey <tromey@redhat.com>
3947 Gary Benson <gbenson@redhat.com>
3948
3949 * regcache.h: Include common-regcache.h.
3950 (regcache_read_pc): Don't declare.
3951 * regcache.c (get_thread_regcache_for_ptid): New function.
3952
39532014-09-11 Tom Tromey <tromey@redhat.com>
3954 Gary Benson <gbenson@redhat.com>
3955
3956 * symbol.c: New file.
3957 * Makefile.in (SFILES): Add symbol.c.
3958 (OBS): Add symbol.o.
3959
39602014-09-11 Gary Benson <gbenson@redhat.com>
3961
3962 * target.c (target_stop_ptid, target_continue_ptid): New
3963 functions.
3964
39652014-09-11 Tom Tromey <tromey@redhat.com>
3966 Gary Benson <gbenson@redhat.com>
3967
3968 * target.h: Include target/target.h.
3969 * target.c (target_read_memory, target_read_uint32)
3970 (target_write_memory): New functions.
3971
39722014-09-11 Gary Benson <gbenson@redhat.com>
3973
3974 * server.h (debug_hw_points): Don't declare.
3975 * server.c (debug_hw_points): Don't define. Replace all uses
3976 with show_debug_regs.
3977 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3978 all uses with show_debug_regs.
3979
39802014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3981
3982 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3983 endianness into account.
3984 (ppc_supply_ptrace_register): Likewise.
3985
39862014-09-03 James Hogan <james.hogan@imgtec.com>
3987
3988 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3989 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3990
39912014-09-03 Gary Benson <gbenson@redhat.com>
3992
3993 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3994 ALL_DEBUG_ADDRESS_REGISTERS.
3995
39962014-09-02 Gary Benson <gbenson@redhat.com>
3997
3998 * i386-low.h: Renamed as...
3999 * x86-low.h: New file. All type, function and variable name
4000 prefixes changed from "i386_" to "x86_". All references updated.
4001 * i386-low.c: Renamed as...
4002 * x86-low.c: New file. All type, function and variable name
4003 prefixes changed from "i386_" to "x86_". All references updated.
4004
40052014-09-02 Gary Benson <gbenson@redhat.com>
4006
4007 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4008 (x86_linux_new_thread): Likewise.
4009
40102014-08-29 Gary Benson <gbenson@redhat.com>
4011
4012 * server.h (setjmp.h): Do not include.
4013 (toplevel): Do not declare.
4014 (common-exceptions.h): Include.
4015 (cleanups.h): Likewise.
4016 * server.c (toplevel): Do not define.
4017 (exit_code): New static global.
4018 (detach_or_kill_for_exit_cleanup): New function.
4019 (main): New function. Original main renamed to...
4020 (captured_main): New function.
4021 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4022
40232014-08-29 Gary Benson <gbenson@redhat.com>
4024
4025 * Makefile.in (SFILES): Add common/common-exceptions.c.
4026 (OBS): Add common-exceptions.o.
4027 (common-exceptions.o): New rule.
4028 * utils.c (prepare_to_throw_exception): New function.
4029
40302014-08-29 Gary Benson <gbenson@redhat.com>
4031
4032 * config.in: Regenerate.
4033 * configure: Likewise.
4034
40352014-08-29 Gary Benson <gbenson@redhat.com>
4036
4037 * Makefile.in (SFILES): Add common/cleanups.c.
4038 (OBS): cleanups.o.
4039 (cleanups.o): New rule.
4040
40412014-08-29 Gary Benson <gbenson@redhat.com>
4042
4043 * utils.c (internal_vwarning): New function.
4044
40452014-08-28 Gary Benson <gbenson@redhat.com>
4046
4047 * utils.h (fatal): Remove declaration.
4048 * utils.c (fatal): Remove function.
4049
40502014-08-28 Gary Benson <gbenson@redhat.com>
4051
4052 * tracepoint.c (gdb_agent_init): Replace fatal with
4053 perror_with_name.
4054 (initialize_tracepoint): Likewise.
4055
40562014-08-28 Gary Benson <gbenson@redhat.com>
4057
4058 * remote-utils.c (remote_prepare): Replace fatal with error.
4059
40602014-08-28 Gary Benson <gbenson@redhat.com>
4061
4062 * linux-low.c (linux_async): Replace fatal with warning.
4063 Tidy up and return.
4064 (linux_start_non_stop): Return -1 if linux_async failed.
4065
40662014-08-28 Gary Benson <gbenson@redhat.com>
4067
4068 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4069 gdb_assert.
4070 (i386_dr_low_get_addr): Remove vague comment.
4071 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4072 gdb_assert.
4073
40742014-08-28 Gary Benson <gbenson@redhat.com>
4075
4076 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4077 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4078 internal_error.
4079 (linux_resume_one_lwp): Likewise.
4080 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4081 gdb_assert.
4082 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4083 with internal_error.
4084 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4085 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4086 (find_register_by_name): Replace fatal with internal_error.
4087 (find_regno): Likewise.
4088 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4089 * thread-db.c (thread_db_create_event): Likewise.
4090 (thread_db_load_search): Likewise.
4091 (try_thread_db_load_1): Likewise.
4092 * tracepoint.c (get_jump_space_head): Replace fatal with
4093 internal_error.
4094 (claim_trampoline_space): Likewise.
4095 (have_fast_tracepoint_trampoline_buffer): Likewise.
4096 (cmd_qtstart): Likewise.
4097 (stop_tracing): Likewise.
4098 (fast_tracepoint_collecting): Likewise.
4099 (target_malloc): Likewise.
4100 (download_tracepoint): Likewise.
4101 (download_trace_state_variables): Replace check with gdb_assert.
4102 (upload_fast_traceframes): Replace fatal with internal_error.
4103
41042014-08-19 Tom Tromey <tromey@redhat.com>
4105 Gary Benson <gbenson@redhat.com>
4106
4107 * Makefile.in (SFILES): Add common/common-debug.c.
4108 (OBS): Add common-debug.o.
4109 (common-debug.o): New rule.
4110 * debug.h (debug_printf): Don't declare.
4111 * debug.c (debug_printf): Renamed and rewritten as...
4112 (debug_vprintf): New function.
4113
41142014-08-19 Gary Benson <gbenson@redhat.com>
4115
4116 * utils.h: Do not include print-utils.h.
4117
41182014-08-19 Tom Tromey <tromey@redhat.com>
4119 Gary Benson <gbenson@redhat.com>
4120
4121 * server.h: Add static assertion.
4122 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4123
41242014-08-19 Tom Tromey <tromey@redhat.com>
4125 Gary Benson <gbenson@redhat.com>
4126
4127 * Makefile.in (SFILES): Add common/errors.c.
4128 (OBS): Add errors.o.
4129 (IPA_OBS): Add errors-ipa.o.
4130 (errors.o): New rule.
4131 (errors-ipa.o): Likewise.
4132 * utils.h (perror_with_name, error, warning): Don't declare.
4133 * utils.c (warning): Renamed and rewritten as...
4134 (vwarning): New function.
4135 (error): Renamed and rewritten as...
4136 (verror): New function.
4137 (internal_error): Renamed and rewritten as...
4138 (internal_verror): New function.
4139
41402014-08-07 Gary Benson <gbenson@redhat.com>
4141
4142 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4143 * configure: Regenerate.
4144 * config.in: Likewise.
4145 * server.h: Do not include errno.h.
4146 * event-loop.c: Likewise.
4147 * hostio-errno.c: Likewise.
4148 * linux-low.c: Likewise.
4149 * remote-utils.c: Likewise.
4150 * spu-low.c: Likewise.
4151 * utils.c: Likewise.
4152 * gdbreplay.c: Unconditionally include errno.h.
4153
41542014-08-07 Gary Benson <gbenson@redhat.com>
4155
4156 * server.h: Do not include string.h.
4157 * event-loop.c: Likewise.
4158 * linux-low.c: Likewise.
4159 * regcache.c: Likewise.
4160 * remote-utils.c: Likewise.
4161 * spu-low.c: Likewise.
4162 * utils.c: Likewise.
4163
41642014-08-07 Gary Benson <gbenson@redhat.com>
4165
4166 * server.h: Do not include gdb_assert.h.
4167
41682014-08-07 Gary Benson <gbenson@redhat.com>
4169
4170 * server.h: Do not include common-utils.h.
4171
41722014-08-07 Gary Benson <gbenson@redhat.com>
4173
4174 * server.h: Do not include ptid.h.
4175 * notif.h: Likewise.
4176
41772014-08-07 Gary Benson <gbenson@redhat.com>
4178
4179 * server.h: Do not include gdb_locale.h.
4180
41812014-08-07 Gary Benson <gbenson@redhat.com>
4182
4183 * server.h: Do not include gdb/signals.h.
4184 * win32-low.c: Likewise.
4185
41862014-08-07 Gary Benson <gbenson@redhat.com>
4187
4188 * server.h: Do not include pathmax.h.
4189
41902014-08-07 Gary Benson <gbenson@redhat.com>
4191
4192 * server.h: Do not include libiberty.h.
4193 * linux-bfin-low.c: Likewise.
4194
41952014-08-07 Gary Benson <gbenson@redhat.com>
4196
4197 * server.h: Do not include ansidecl.h.
4198
41992014-08-07 Gary Benson <gbenson@redhat.com>
4200
4201 * linux-x86-low.c: Do not include stddef.h.
4202 * lynx-ppc-low.c: Likewise.
4203 * tracepoint.c: Likewise.
4204
42052014-08-07 Gary Benson <gbenson@redhat.com>
4206
4207 * server.h: Do not include stdarg.h.
4208 * nto-low.c: Likewise.
4209
42102014-08-07 Gary Benson <gbenson@redhat.com>
4211
4212 * server.h: Do not include stdlib.h.
4213 * inferiors.c: Likewise.
4214 * linux-low.c: Likewise.
4215 * regcache.c: Likewise.
4216 * spu-low.c: Likewise.
4217 * tracepoint.c: Likewise.
4218 * utils.c: Likewise.
4219
42202014-08-07 Gary Benson <gbenson@redhat.com>
4221
4222 * server.h: Do not include stdio.h.
4223 * linux-low.c: Likewise.
4224 * remote-utils.c: Likewise.
4225 * spu-low.c: Likewise.
4226 * utils.c: Likewise.
4227 * wincecompat.c: Likewise.
4228
42292014-08-06 Gary Benson <gbenson@redhat.com>
4230
4231 * regcache.c (init_register_cache): Move conditionals inside if.
4232
42332014-08-06 Gary Benson <gbenson@redhat.com>
4234
4235 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4236
42372014-07-31 Gary Benson <gbenson@redhat.com>
4238
4239 * ax.h: Do not include server.h.
4240 * gdbthread.h: Likewise.
4241 * lynx-low.h: Likewise.
4242 * notif.h: Likewise.
4243
42442014-07-30 Gary Benson <gbenson@redhat.com>
4245
4246 * server.h: Include common-defs.h.
4247 Do not include config.h or build-gnulib-gdbserver/config.h.
4248
42492014-07-30 Gary Benson <gbenson@redhat.com>
4250
4251 * hostio-errno.c: Move server.h to top of includes list.
4252 * inferiors.c: Likewise.
4253 * linux-x86-low.c: Likewise.
4254 * notif.c: Include server.h.
4255
42562014-07-24 Tom Tromey <tromey@redhat.com>
4257 Gary Benson <gbenson@redhat.com>
4258
4259 * server.h (CORE_ADDR): Now unsigned.
4260
42612014-07-16 Pedro Alves <palves@redhat.com>
4262
4263 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4264
42652014-07-15 Pedro Alves <palves@redhat.com>
4266
4267 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4268 copy.
4269
42702014-07-11 Pedro Alves <palves@redhat.com>
4271
4272 * linux-low.c (kill_wait_lwp): New function, based on
4273 kill_one_lwp_callback, but use my_waitpid directly.
4274 (kill_one_lwp_callback, linux_kill): Use it.
4275
42762014-06-23 Pedro Alves <palves@redhat.com>
4277
4278 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4279 before setting DR0..DR3.
4280
42812014-06-20 Gary Benson <gbenson@redhat.com>
4282
4283 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4284 * configure: Regenerated.
4285 * config.in: Likewise.
4286
42872014-06-20 Gary Benson <gbenson@redhat.com>
4288
4289 * Makefile.in (SFILES): Update locations for files moved
4290 from common to nat.
4291 (object file files): Reordered.
4292
42932014-06-20 Gary Benson <gbenson@redhat.com>
4294
4295 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4296 (i386_dr_low_set_addr): Likewise.
4297 (i386_dr_low_get_addr): Likewise.
4298 (i386_dr_low_can_set_control): Likewise.
4299 (i386_dr_low_set_control): Likewise.
4300 (i386_dr_low_get_control): Likewise.
4301 (i386_dr_low_get_status): Likewise.
4302 (i386_get_debug_register_length): Likewise.
4303 * linux-x86-low.c (i386_dr_low_set_addr):
4304 Changed signature. Made static.
4305 (i386_dr_low_get_addr): Likewise.
4306 (i386_dr_low_set_control): Likewise.
4307 (i386_dr_low_get_control): Likewise.
4308 (i386_dr_low_get_status): Likewise.
4309 (i386_dr_low): New global variable.
4310 * win32-i386-low.c (i386_dr_low_set_addr):
4311 Changed signature. Made static.
4312 (i386_dr_low_get_addr): Likewise.
4313 (i386_dr_low_set_control): Likewise.
4314 (i386_dr_low_get_control): Likewise.
4315 (i386_dr_low_get_status): Likewise.
4316 (i386_dr_low): New global variable.
4317
43182014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4319
4320 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4321 * Makefile.in (AR, AR_FLAGS): Define.
4322 * configure: Regenerate.
4323
43242014-06-19 Gary Benson <gbenson@redhat.com>
4325
4326 * Makefile.in (i386-dregs.o): New rule.
4327 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4328 * i386-low.c (target.h): Remove include.
4329 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4330 (DR_CONTROL_SHIFT): Likewise.
4331 (DR_CONTROL_SIZE): Likewise.
4332 (DR_RW_EXECUTE): Likewise.
4333 (DR_RW_WRITE): Likewise.
4334 (DR_RW_READ): Likewise.
4335 (DR_RW_IORW): Likewise.
4336 (DR_LEN_1): Likewise.
4337 (DR_LEN_2): Likewise.
4338 (DR_LEN_4): Likewise.
4339 (DR_LEN_8): Likewise.
4340 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4341 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4342 (DR_ENABLE_SIZE): Likewise.
4343 (DR_LOCAL_SLOWDOWN): Likewise.
4344 (DR_GLOBAL_SLOWDOWN): Likewise.
4345 (DR_CONTROL_RESERVED): Likewise.
4346 (I386_DR_CONTROL_MASK): Likewise.
4347 (I386_DR_VACANT): Likewise.
4348 (I386_DR_LOCAL_ENABLE): Likewise.
4349 (I386_DR_GLOBAL_ENABLE): Likewise.
4350 (I386_DR_DISABLE): Likewise.
4351 (I386_DR_SET_RW_LEN): Likewise.
4352 (I386_DR_GET_RW_LEN): Likewise.
4353 (I386_DR_WATCH_HIT): Likewise.
4354 (i386_wp_op_t): Likewise.
4355 (i386_show_dr): Likewise.
4356 (i386_length_and_rw_bits): Likewise.
4357 (i386_insert_aligned_watchpoint): Likewise.
4358 (i386_remove_aligned_watchpoint): Likewise.
4359 (i386_handle_nonaligned_watchpoint): Likewise.
4360 i386_update_inferior_debug_regs(): Likewise.
4361 (i386_dr_insert_watchpoint): Likewise.
4362 (i386_dr_remove_watchpoint): Likewise.
4363 (i386_dr_region_ok_for_watchpoint): Likewise.
4364 (i386_dr_stopped_data_address): Likewise.
4365 (i386_dr_stopped_by_watchpoint): Likewise.
4366
43672014-06-19 Gary Benson <gbenson@redhat.com>
4368
4369 * i386-low.c (i386_dr_show): Renamed to
4370 i386_show_dr and made static. All uses updated.
4371 (i386_dr_length_and_rw_bits): Renamed to
4372 i386_length_and_rw_bits and made static.
4373 All uses updated.
4374 (i386_dr_insert_aligned_watchpoint): Renamed to
4375 i386_insert_aligned_watchpoint and made static.
4376 All uses updated.
4377 (i386_dr_remove_aligned_watchpoint): Renamed to
4378 i386_remove_aligned_watchpoint and made static.
4379 All uses updated.
4380 (i386_dr_update_inferior_debug_regs): Renamed to
4381 i386_update_inferior_debug_regs and made static.
4382 All uses updated.
4383
43842014-06-18 Gary Benson <gbenson@redhat.com>
4385
4386 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4387 (i386_dr_low_can_set_control): Likewise.
4388 (i386_get_debug_register_length): Likewise.
4389 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4390 (i386_dr_low_can_set_control): Likewise.
4391 (i386_get_debug_register_length): Likewise.
4392
43932014-06-17 Gary Benson <gbenson@redhat.com>
4394
4395 * i386-low.h (i386-dregs.h): New include.
4396 (DR_FIRSTADDR): Now in i386-dregs.h.
4397 (DR_LASTADDR): Likewise.
4398 (DR_NADDR): Likewise.
4399 (DR_STATUS): Likewise.
4400 (DR_CONTROL): Likewise.
4401 (i386_debug_reg_state): Likewise.
4402 (i386_dr_insert_watchpoint): Likewise.
4403 (i386_dr_remove_watchpoint): Likewise.
4404 (i386_dr_region_ok_for_watchpoint): Likewise.
4405 (i386_dr_stopped_data_address): Likewise.
4406 (i386_dr_stopped_by_watchpoint): Likewise.
4407 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4408
44092014-06-18 Gary Benson <gbenson@redhat.com>
4410
4411 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4412 i386_dr_insert_watchpoint.
4413 (i386_low_remove_watchpoint): Renamed to
4414 i386_dr_remove_watchpoint.
4415 (i386_low_region_ok_for_watchpoint): Renamed to
4416 i386_dr_region_ok_for_watchpoint.
4417 (i386_low_stopped_data_address): Renamed to
4418 i386_dr_stopped_data_address.
4419 (i386_low_stopped_by_watchpoint): Renamed to
4420 i386_dr_stopped_by_watchpoint.
4421 * i386-low.c (i386_show_dr): Renamed to
4422 i386_dr_show and made nonstatic. All uses updated.
4423 (i386_length_and_rw_bits): Renamed to
4424 i386_dr_length_and_rw_bits and made nonstatic.
4425 All uses updated.
4426 (i386_insert_aligned_watchpoint): Renamed to
4427 i386_dr_insert_aligned_watchpoint and made nonstatic.
4428 All uses updated.
4429 (i386_remove_aligned_watchpoint): Renamed to
4430 i386_dr_remove_aligned_watchpoint and made nonstatic.
4431 All uses updated.
4432 (i386_update_inferior_debug_regs): Renamed to
4433 i386_dr_update_inferior_debug_regs and made nonstatic.
4434 All uses updated.
4435 (i386_low_insert_watchpoint): Renamed to
4436 i386_dr_insert_watchpoint. All uses updated.
4437 (i386_low_remove_watchpoint): Renamed to
4438 i386_dr_remove_watchpoint. All uses updated.
4439 (i386_low_region_ok_for_watchpoint): Renamed to
4440 i386_dr_region_ok_for_watchpoint. All uses updated.
4441 (i386_low_stopped_data_address): Renamed to
4442 i386_dr_stopped_data_address. All uses updated.
4443 (i386_low_stopped_by_watchpoint): Renamed to
4444 i386_dr_stopped_by_watchpoint. All uses updated.
4445
44462014-06-18 Gary Benson <gbenson@redhat.com>
4447
4448 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4449 (i386_dr_low_can_set_control): Likewise.
4450 (i386_insert_aligned_watchpoint): New check.
4451
44522014-06-18 Gary Benson <gbenson@redhat.com>
4453
4454 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4455 Renamed to state.
4456
44572014-06-18 Gary Benson <gbenson@redhat.com>
4458
4459 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4460 instead of fatal and error.
4461 (i386_handle_nonaligned_watchpoint): Likewise.
4462
44632014-06-18 Gary Benson <gbenson@redhat.com>
4464
4465 * i386-low.c (i386_get_debug_register_length): New macro.
4466 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4467 (i386_show_dr): Use debug_printf instead of fprintf. Use
4468 phex to format values.
4469
44702014-06-18 Gary Benson <gbenson@redhat.com>
4471
4472 * i386-low.h: Comment changes.
4473 * i386-low.c: Likewise.
4474
44752014-06-18 Gary Benson <gbenson@redhat.com>
4476
4477 * i386-low.c: Whitespace changes.
4478
44792014-06-12 Tom Tromey <tromey@redhat.com>
4480
4481 * utils.c (freeargv): Remove.
4482
44832014-06-12 Tom Tromey <tromey@redhat.com>
4484
4485 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4486 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4487 (parse_debug_format_options): Likewise.
4488 (gdbserver_usage): Likewise.
4489 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4490 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4491 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4492 against libiberty.
4493 ($(LIBGNU)): Depend on libiberty.
4494 (all-lib): Recurse into all subdirs.
4495 (install-only): Invoke "install" target in subdirs.
4496 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4497 targets.
4498 * configure: Rebuild.
4499 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4500 for vasprintf, vsnprintf, or gettimeofday.
4501 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4502 srv_tgtobj.
4503
45042014-06-05 Joel Brobecker <brobecker@adacore.com>
4505
4506 * development.sh: Delete.
4507 * Makefile.in (config.status): Adjust dependency on development.sh.
4508 * configure.ac: Adjust development.sh source call.
4509 * configure: Regenerate.
4510
45112014-06-02 Pedro Alves <palves@redhat.com>
4512
4513 * ax.c (gdb_free_agent_expr): New function.
4514 * ax.h (gdb_free_agent_expr): New declaration.
4515 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4516 list.
4517 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4518 static.
4519 (clear_breakpoint_conditions_and_commands): New function.
4520 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4521 (clear_breakpoint_conditions_and_commands): New declaration.
4522
45232014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4524
4525 * linux-aarch64-low.c (asm/ptrace.h): Include.
4526
45272014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4528
4529 Fix TLS access for -static -pthread.
4530 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4531 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4532 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4533
45342014-05-20 Pedro Alves <palves@redhat.com>
4535
4536 * linux-aarch64-low.c (aarch64_insert_point)
4537 (aarch64_remove_point): No longer check whether the type is
4538 supported here. Adjust to new interface.
4539 (the_low_target): Install aarch64_supports_z_point_type as
4540 supports_z_point_type method.
4541 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4542 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4543 instead of a Z packet char. Adjust.
4544 (arm_supports_z_point_type): New function.
4545 (arm_insert_point, arm_remove_point): Adjust to new interface.
4546 (the_low_target): Install arm_supports_z_point_type.
4547 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4548 (cris_insert_point, cris_remove_point): Adjust to new interface.
4549 Don't check whether the type is supported here.
4550 (the_low_target): Install cris_supports_z_point_type.
4551 * linux-low.c (linux_supports_z_point_type): New function.
4552 (linux_insert_point, linux_remove_point): Adjust to new interface.
4553 * linux-low.h (struct linux_target_ops) <insert_point,
4554 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4555 raw_breakpoint pointer parameter.
4556 <supports_z_point_type>: New method.
4557 * linux-mips-low.c (mips_supports_z_point_type): New function.
4558 (mips_insert_point, mips_remove_point): Adjust to new interface.
4559 Use mips_supports_z_point_type.
4560 (the_low_target): Install mips_supports_z_point_type.
4561 * linux-ppc-low.c (the_low_target): Install NULL as
4562 supports_z_point_type method.
4563 * linux-s390-low.c (the_low_target): Install NULL as
4564 supports_z_point_type method.
4565 * linux-sparc-low.c (the_low_target): Install NULL as
4566 supports_z_point_type method.
4567 * linux-x86-low.c (x86_supports_z_point_type): New function.
4568 (x86_insert_point): Adjust to new insert_point interface. Use
4569 insert_memory_breakpoint. Adjust to new
4570 i386_low_insert_watchpoint interface.
4571 (x86_remove_point): Adjust to remove_point interface. Use
4572 remove_memory_breakpoint. Adjust to new
4573 i386_low_remove_watchpoint interface.
4574 (the_low_target): Install x86_supports_z_point_type.
4575 * lynx-low.c (lynx_target_ops): Install NULL as
4576 supports_z_point_type callback.
4577 * nto-low.c (nto_supports_z_point_type): New.
4578 (nto_insert_point, nto_remove_point): Adjust to new interface.
4579 (nto_target_ops): Install nto_supports_z_point_type.
4580 * mem-break.c: Adjust intro comment.
4581 (struct raw_breakpoint) <raw_type, size>: New fields.
4582 <inserted>: Update comment.
4583 <shlib_disabled>: Delete field.
4584 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4585 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4586 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4587 (raw_bkpt_type_to_target_hw_bp_type): New function.
4588 (find_enabled_raw_code_breakpoint_at): New function.
4589 (find_raw_breakpoint_at): New type and size parameters. Use them.
4590 (insert_memory_breakpoint): New function, based off
4591 set_raw_breakpoint_at.
4592 (remove_memory_breakpoint): New function.
4593 (set_raw_breakpoint_at): Reimplement.
4594 (set_breakpoint): New, based on set_breakpoint_at.
4595 (set_breakpoint_at): Reimplement.
4596 (delete_raw_breakpoint): Go through the_target->remove_point
4597 instead of assuming memory breakpoints.
4598 (find_gdb_breakpoint_at): Delete.
4599 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4600 (find_gdb_breakpoint): New function.
4601 (set_gdb_breakpoint_at): Delete.
4602 (z_type_supported): New function.
4603 (set_gdb_breakpoint_1): New function, loosely based off
4604 set_gdb_breakpoint_at.
4605 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4606 (delete_gdb_breakpoint_at): Delete.
4607 (delete_gdb_breakpoint_1): New function, loosely based off
4608 delete_gdb_breakpoint_at.
4609 (delete_gdb_breakpoint): New function.
4610 (clear_gdb_breakpoint_conditions): Rename to ...
4611 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4612 breakpoint.
4613 (add_condition_to_breakpoint): Make static.
4614 (add_breakpoint_condition): Take a struct breakpoint pointer
4615 instead of an address. Adjust.
4616 (gdb_condition_true_at_breakpoint): Rename to ...
4617 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4618 z_type parameter.
4619 (gdb_condition_true_at_breakpoint): Reimplement.
4620 (add_breakpoint_commands): Take a struct breakpoint pointer
4621 instead of an address. Adjust.
4622 (gdb_no_commands_at_breakpoint): Rename to ...
4623 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4624 parameter. Return true if no breakpoint was found. Change debug
4625 output.
4626 (gdb_no_commands_at_breakpoint): Reimplement.
4627 (run_breakpoint_commands): Rename to ...
4628 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4629 and change return type to boolean.
4630 (run_breakpoint_commands): New function.
4631 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4632 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4633 breakpoint. Go through the_target->remove_point instead of
4634 assuming memory breakpoint.
4635 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4636 software and hardware breakpoints.
4637 (reinsert_raw_breakpoint): Go through the_target->insert_point
4638 instead of assuming memory breakpoint.
4639 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4640 software and hardware breakpoints.
4641 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4642 Check both software and hardware breakpoints.
4643 (validate_inserted_breakpoint): Assert the breakpoint is a
4644 software breakpoint. Set the inserted flag to -1 instead of
4645 setting shlib_disabled.
4646 (delete_disabled_breakpoints): Adjust.
4647 (validate_breakpoints): Only validate software breakpoints.
4648 Adjust to inserted flag change.
4649 (check_mem_read, check_mem_write): Skip breakpoint types other
4650 than software breakpoints. Adjust to inserted flag change.
4651 * mem-break.h (enum raw_bkpt_type): New enum.
4652 (raw_breakpoint, struct process_info): Forward declare.
4653 (Z_packet_to_target_hw_bp_type): Delete declaration.
4654 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4655 (set_gdb_breakpoint, delete_gdb_breakpoint)
4656 (clear_breakpoint_conditions): New declarations.
4657 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4658 (breakpoint_inserted_here): Update comment.
4659 (add_breakpoint_condition, add_breakpoint_commands): Replace
4660 address parameter with a breakpoint pointer parameter.
4661 (gdb_breakpoint_here): Update comment.
4662 (delete_gdb_breakpoint_at): Delete.
4663 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4664 * server.c (process_point_options): Take a struct breakpoint
4665 pointer instead of an address. Adjust.
4666 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4667 delete_gdb_breakpoint.
4668 * spu-low.c (spu_target_ops): Install NULL as
4669 supports_z_point_type method.
4670 * target.h: Include mem-break.h.
4671 (struct target_ops) <prepare_to_access_memory>: Update comment.
4672 <supports_z_point_type>: New field.
4673 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4674 instead of a char. Also take a raw breakpoint pointer.
4675 * win32-arm-low.c (the_low_target): Install NULL as
4676 supports_z_point_type.
4677 * win32-i386-low.c (i386_supports_z_point_type): New function.
4678 (i386_insert_point, i386_remove_point): Adjust to new interface.
4679 (the_low_target): Install i386_supports_z_point_type.
4680 * win32-low.c (win32_supports_z_point_type): New function.
4681 (win32_insert_point, win32_remove_point): Adjust to new interface.
4682 (win32_target_ops): Install win32_supports_z_point_type.
4683 * win32-low.h (struct win32_target_ops):
4684 <supports_z_point_type>: New method.
4685 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4686 instead of a char. Also take a raw breakpoint pointer.
4687
46882014-05-20 Pedro Alves <palves@redhat.com>
4689
4690 * mem-break.h: Include break-common.h.
4691 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4692 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4693 (Z_packet_to_target_hw_bp_type): New declaration.
4694 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4695 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4696 (Z_PACKET_ACCESS_WP): Delete macros.
4697 (Z_packet_to_hw_type): Delete function.
4698 * i386-low.h: Don't include break-common.h here.
4699 (Z_packet_to_hw_type): Delete declaration.
4700 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4701 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4702 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4703 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4704 * linux-aarch64-low.c: Don't include break-common.h here.
4705 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4706 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4707 (Z_packet_to_target_hw_bp_type): Delete function.
4708 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4709 function.
4710 (mips_insert_point, mips_remove_point): Use
4711 Z_packet_to_target_hw_bp_type.
4712
47132014-05-20 Pedro Alves <palves@redhat.com>
4714
4715 * linux-aarch64-low.c: Include break-common.h.
4716 (enum target_point_type): Delete.
4717 (Z_packet_to_point_type): Rename to ...
4718 (Z_packet_to_target_hw_bp_type): ... this, and return a
4719 target_hw_bp_type instead.
4720 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4721 instead of an enum target_point_type.
4722 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4723 breakpoint type.
4724 (aarch64_dr_state_insert_one_point)
4725 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4726 (aarch64_handle_aligned_watchpoint)
4727 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4728 Take an enum target_hw_bp_type instead of an enum
4729 target_point_type.
4730 (aarch64_supports_z_point_type): New function.
4731 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4732 use Z_packet_to_target_hw_bp_type.
4733
47342014-05-20 Joel Brobecker <brobecker@adacore.com>
4735
4736 * configure.ac: Only use -Werror by default when DEVELOPMENT
4737 is true.
4738 * configure: Regenerate.
4739
47402014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4741
4742 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4743 * linux-x86-low.c (X86_64_USER_REGS): New.
4744 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4745
47462014-04-28 Yao Qi <yao@codesourcery.com>
4747
4748 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4749 name.
4750
47512014-04-25 Pedro Alves <palves@redhat.com>
4752
4753 PR server/16255
4754 * linux-low.c (linux_attach_fail_reason_string): New function.
4755 (linux_attach_lwp): Delete.
4756 (linux_attach_lwp_1): Rename to ...
4757 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4758 argument. Remove "initial" parameter. Return int instead of
4759 void. Don't error or warn here.
4760 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4761 failure to attach to the tgid. Call warning when failing to
4762 attach to an lwp.
4763 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4764 argument. Remove "initial" parameter. Return int instead of
4765 void. Don't error or warn here.
4766 (linux_attach_fail_reason_string): New declaration.
4767 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4768 interface change. Use linux_attach_fail_reason_string.
4769
47702014-04-24 Michael Sturm <michael.sturm@mintel.com>
4771 Walfred Tedeschi <walfred.tedeschi@intel.com>
4772
4773 * Makefile.in: Added rules to handle new files
4774 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4775 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4776 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4777 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4778 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4779 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4780 x32-avx512-linux.o.
4781 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4782 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4783 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4784 i386/x32-avx512.xml.
4785 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4786 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4787 i386/x32-avx512-linux.xml.
4788 * i387-fp.c (num_avx512_k_registers): New constant for number
4789 of K registers.
4790 (num_avx512_zmmh_low_registers): New constant for number of
4791 lower ZMM registers (0-15).
4792 (num_avx512_zmmh_high_registers): New constant for number of
4793 higher ZMM registers (16-31).
4794 (num_avx512_ymmh_registers): New contant for number of higher
4795 YMM registers (ymm16-31 added by avx521 on x86_64).
4796 (num_avx512_xmm_registers): New constant for number of higher
4797 XMM registers (xmm16-31 added by AVX512 on x86_64).
4798 (struct i387_xsave): Add space for AVX512 registers.
4799 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4800 Add code to handle AVX512 registers.
4801 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4802 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4803 prototypei from generated file.
4804 (tdesc_amd64_avx512_linux): Likewise.
4805 (init_registers_x32_avx512_linux): Likewise.
4806 (tdesc_x32_avx512_linux): Likewise.
4807 (init_registers_i386_avx512_linux): Likewise.
4808 (tdesc_i386_avx512_linux): Likewise.
4809 (x86_64_regmap): Add AVX512 registers.
4810 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4811 mask.
4812 (initialize_low_arch): Add code to initialize AVX512 registers.
4813
48142014-04-23 Pedro Alves <palves@redhat.com>
4815
4816 * mem-break.c (find_gdb_breakpoint_at): Make static.
4817 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4818
48192014-04-23 Pedro Alves <palves@redhat.com>
4820
4821 * i386-low.c: Don't include break-common.h here.
4822 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4823 prototype to take target_hw_bp_type as argument instead of a Z
4824 packet char.
4825 * i386-low.h: Include break-common.h here.
4826 (Z_packet_to_hw_type): Declare.
4827 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4828 prototypes.
4829 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4830 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4831 (x86_remove_point): Convert the packet number to a
4832 target_hw_bp_type before calling i386_low_remove_watchpoint.
4833 * win32-i386-low.c (i386_insert_point): Convert the packet number
4834 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4835 (i386_remove_point): Convert the packet number to a
4836 target_hw_bp_type before calling i386_low_remove_watchpoint.
4837
48382014-04-23 Pedro Alves <palves@redhat.com>
4839
4840 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4841
48422014-04-10 Pedro Alves <palves@redhat.com>
4843
4844 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4845 Check if the condition or command is NULL before checking if the
4846 breakpoint is known. On success, return true.
4847 * mem-break.h (add_breakpoint_condition): Document return.
4848 (add_breakpoint_commands): Add describing comment.
4849 * server.c (skip_to_semicolon): New function.
4850 (process_point_options): Use it.
4851
48522014-04-09 Pedro Alves <palves@redhat.com>
4853
4854 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4855 to lwpid_of.
4856
48572014-02-27 Pedro Alves <palves@redhat.com>
4858
4859 PR 12702
4860 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4861 macros.
4862 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4863 output.
4864 (last_thread_of_process_p): Take a PID argument instead of a
4865 thread pointer.
4866 (linux_wait_for_lwp): Delete.
4867 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4868 functions.
4869 (linux_low_filter_event): New function, party factored out from
4870 linux_wait_for_event.
4871 (linux_wait_for_event): Rename to ...
4872 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4873 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4874 sigsuspend. Check for zombie leaders.
4875 (linux_wait_for_event): Reimplement as wrapper around
4876 linux_wait_for_event_filtered.
4877 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4878 a normal or signal exit is seen, it's the whole process exiting.
4879 (wait_for_sigstop): No longer a for_each_inferior callback.
4880 Rewrite on top of linux_wait_for_event_filtered.
4881 (stop_all_lwps): Call wait_for_sigstop directly.
4882 * server.c (resume, handle_target_event): Handle
4883 TARGET_WAITKIND_NO_RESUMED.
4884
48852014-02-26 Joel Brobecker <brobecker@adacore.com>
4886
4887 * win32-low.c (psapi_get_dll_name,
4888 * win32_CreateToolhelp32Snapshot): Delete.
4889 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4890 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4891 Delete.
4892 (handle_load_dll): Add function description.
4893 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4894
48952014-02-26 Joel Brobecker <brobecker@adacore.com>
4896
4897 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4898 Add comment.
4899 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4900 base address when calling win32_add_one_solib.
4901 (handle_load_dll): Delete local variable load_addr.
4902 Remove 0x1000 offset applied to DLL base address when calling
4903 win32_add_one_solib.
4904 (handle_unload_dll): Add comment.
4905
49062014-02-26 Joel Brobecker <brobecker@adacore.com>
4907
4908 * win32-low.c (win32_add_all_dlls): Renames
4909 win32_ensure_ntdll_loaded. Rewrite function documentation.
4910 Adjust implementation to always load all DLLs.
4911 Add 0x1000 offset to DLL base address when calling
4912 win32_add_one_solib.
4913 (child_initialization_done): New static global.
4914 (do_initial_child_stuff): Set child_initialization_done to
4915 zero during child initialization, and 1 after. Replace call
4916 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4917 Add comment.
4918 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4919 (handle_unload_dll): Add function documentation.
4920 (get_child_debug_event): Ignore load and unload DLL events
4921 during child initialization.
4922
49232014-02-20 Doug Evans <dje@google.com>
4924
4925 Remove global all_lwps.
4926 * inferiors.h (ptid_of): Move here from linux-low.h.
4927 (pid_of, lwpid_of): Ditto.
4928 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4929 parameter is a struct thread_info * now.
4930 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4931 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4932 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4933 directly.
4934 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4935 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4936 * linux-arm-low.c (update_registers_callback): Update, "entry"
4937 parameter is a struct thread_info * now.
4938 Fetch lwpid from current_inferior directly.
4939 (arm_insert_point): Pass &all_threads to find_inferior instead of
4940 &all_lwps.
4941 (arm_remove_point): Ditto.
4942 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4943 (arm_prepare_to_resume): Fetch pid from thread.
4944 (arm_read_description): Fetch lwpid from current_inferior directly.
4945 * linux-low.c (all_lwps): Delete.
4946 (delete_lwp): Delete call to remove_inferior.
4947 (handle_extended_wait): Fetch lwpid from thread.
4948 (add_lwp): Don't set lwp->entry.id. Remove call to
4949 add_inferior_to_list.
4950 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4951 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4952 (kill_one_lwp_callback): Ditto.
4953 (linux_kill): Don't dereference NULL pointer.
4954 Fetch ptid,lwpid from thread.
4955 (get_detach_signal): Fetch ptid from thread.
4956 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4957 Simplify call to regcache_invalidate_thread.
4958 (delete_lwp_callback): Update, "entry" parameter is a
4959 struct thread_info * now. Fetch pid from thread.
4960 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4961 (status_pending_p_callback): Update, "entry" parameter is a
4962 struct thread_info * now. Fetch ptid from thread.
4963 (find_lwp_pid): Update, "entry" parameter is a
4964 struct thread_info * now.
4965 (linux_wait_for_lwp): Fetch pid from thread.
4966 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4967 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4968 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4969 (dequeue_one_deferred_signal): Ditto.
4970 (cancel_breakpoint): Fetch ptid from current_inferior.
4971 (linux_wait_for_event): Pass &all_threads to find_inferior,
4972 not &all_lwps. Fetch ptid, lwpid from thread.
4973 (count_events_callback): Update, "entry" parameter is a
4974 struct thread_info * now.
4975 (select_singlestep_lwp_callback): Ditto.
4976 (select_event_lwp_callback): Ditto.
4977 (cancel_breakpoints_callback): Ditto.
4978 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4979 not &all_lwps.
4980 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4981 (unsuspend_one_lwp): Update, "entry" parameter is a
4982 struct thread_info * now.
4983 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4984 not &all_lwps.
4985 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4986 Fetch lwpid from thread, not lwp.
4987 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4988 Pass &all_threads to find_inferior, not &all_lwps.
4989 (send_sigstop): Fetch lwpid from thread, not lwp.
4990 (send_sigstop_callback): Update, "entry" parameter is a
4991 struct thread_info * now.
4992 (suspend_and_send_sigstop_callback): Ditto.
4993 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4994 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4995 struct thread_info * now.
4996 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4997 from thread, lwp.
4998 (lwp_running): Update, "entry" parameter is a
4999 struct thread_info * now.
5000 (stop_all_lwps): Fetch ptid from thread.
5001 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5002 (linux_resume_one_lwp): Fetch lwpid from thread.
5003 (linux_set_resume_request): Update, "entry" parameter is a
5004 struct thread_info * now. Fetch pid, lwpid from thread.
5005 (resume_status_pending_p): Update, "entry" parameter is a
5006 struct thread_info * now.
5007 (need_step_over_p): Ditto. Fetch lwpid from thread.
5008 (start_step_over): Fetch lwpid from thread.
5009 (linux_resume_one_thread): Update, "entry" parameter is a
5010 struct thread_info * now. Fetch lwpid from thread.
5011 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5012 (proceed_one_lwp): Update, "entry" parameter is a
5013 struct thread_info * now. Fetch lwpid from thread.
5014 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5015 struct thread_info * now.
5016 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5017 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5018 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5019 directly.
5020 (regsets_store_inferior_registers): Ditto.
5021 (fetch_register, store_register): Ditto.
5022 (linux_read_memory, linux_write_memory): Ditto.
5023 (linux_request_interrupt): Ditto.
5024 (linux_read_auxv): Ditto.
5025 (linux_xfer_siginfo): Ditto.
5026 (linux_qxfer_spu): Ditto.
5027 (linux_qxfer_libraries_svr4): Ditto.
5028 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5029 moved to inferiors.h.
5030 (get_lwp): Delete.
5031 (get_thread_lwp): Update.
5032 (struct lwp_info): Delete member "entry". Simplify comment for
5033 member "thread".
5034 (all_lwps): Delete.
5035 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5036 current_inferior directly.
5037 (update_watch_registers_callback): Update, "entry" parameter is a
5038 struct thread_info * now. Fetch pid from thread.
5039 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5040 (mips_insert_point): Fetch lwpid from current_inferior.
5041 Pass &all_threads to find_inferior, not &all_lwps.
5042 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5043 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5044 directly.
5045 (mips_stopped_data_address): Ditto.
5046 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5047 directly.
5048 * linux-tile-low.c (tile_arch_setup): Ditto.
5049 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5050 (update_debug_registers_callback): Update, "entry" parameter is a
5051 struct thread_info * now. Fetch pid from thread.
5052 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5053 Pass &all_threads to find_inferior, not &all_lwps.
5054 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5055 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5056 Pass &all_threads to find_inferior, not &all_lwps.
5057 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5058 (i386_dr_low_get_status): Ditto.
5059 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5060 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5061 (x86_linux_read_description): Ditto.
5062 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5063
50642014-02-20 Doug Evans <dje@google.com>
5065
5066 * inferiors.c (get_first_inferior): Fix buglet.
5067
50682014-02-19 Doug Evans <dje@google.com>
5069
5070 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5071 * inferiors.c (add_thread): Change result type to struct thread_info *.
5072 All callers updated.
5073 (add_lwp): Call add_thread here instead of in callers.
5074 All callers updated.
5075 * linux-low.h (get_lwp_thread): Rewrite.
5076 (struct lwp_info): New member "thread".
5077
50782014-02-19 Doug Evans <dje@google.com>
5079
5080 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5081 All callers updated.
5082
50832014-02-19 Doug Evans <dje@google.com>
5084
5085 * inferiors.c (add_thread): Fix whitespace.
5086
50872014-02-19 Doug Evans <dje@google.com>
5088
5089 * dll.c (clear_dlls): Replace accessing list implemention details
5090 with API function.
5091 * gdbthread.h (get_first_thread): Declare.
5092 * inferiors.c (for_each_inferior_with_data): New function.
5093 (get_first_thread): New function.
5094 (find_thread_ptid): Simplify.
5095 (get_first_inferior): New function.
5096 (clear_list): Delete.
5097 (one_inferior_p): New function.
5098 (clear_inferior_list): New function.
5099 (clear_inferiors): Update.
5100 * inferiors.h (for_each_inferior_with_data): Declare.
5101 (clear_inferior_list): Declare.
5102 (one_inferior_p): Declare.
5103 (get_first_inferior): Declare.
5104 * linux-low.c (linux_wait_for_event): Replace accessing list
5105 implemention details with API function.
5106 * server.c (target_running): Ditto.
5107 (accumulate_file_name_length): New function.
5108 (emit_dll_description): New function.
5109 (handle_qxfer_libraries): Replace accessing list implemention
5110 details with API function.
5111 (handle_qxfer_threads_worker): New function.
5112 (handle_qxfer_threads_proper): Replace accessing list implemention
5113 details with API function.
5114 (handle_query): Ditto.
5115 (visit_actioned_threads_callback_ftype): New typedef.
5116 (visit_actioned_threads_data): New struct.
5117 (visit_actioned_threads): Rewrite to be find_inferior callback.
5118 (resume): Call find_inferior.
5119 (handle_status): Replace accessing list implemention
5120 details with API function.
5121 (process_serial_event): Replace accessing list implemention details
5122 with API function.
5123 * target.c (set_desired_inferior): Replace accessing list implemention
5124 details with API function.
5125 * tracepoint.c (same_process_p): New function.
5126 (gdb_agent_about_to_close): Replace accessing list implemention
5127 details with API function.
5128 * win32-low.c (child_delete_thread): Replace accessing list
5129 implemention details with API function.
5130 (match_dll_by_basename): New function.
5131 (dll_is_loaded_by_basename): New function.
5132 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5133 details call to dll_is_loaded_by_basename.
5134
51352014-02-19 Doug Evans <dje@google.com>
5136
5137 * dll.h (struct dll_info): Add comment.
5138 * gdbthread.h (struct thread_info): Add comment.
5139 (current_ptid): Simplify.
5140 * inferiors.c (add_process): Update.
5141 (remove_process): Update.
5142 * inferiors.h (struct process_info): Rename member "head" to "entry".
5143 * linux-low.c (delete_lwp): Update.
5144 (add_lwp): Update.
5145 (last_thread_of_process_p): Update.
5146 (kill_one_lwp_callback, linux_kill): Update.
5147 (status_pending_p_callback): Update.
5148 (wait_for_sigstop): Update. Simplify read of ptid.
5149 (start_step_over): Update.
5150 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5151 (get_lwp_thread): Update.
5152 (struct lwp_info): Rename member "head" to "entry".
5153 * regcache.h (inferior_list_entry): Delete.
5154 * server.c (kill_inferior_callback): Update.
5155 (detach_or_kill_inferior_callback): Update.
5156 (print_started_pid): Update.
5157 (print_attached_pid): Update.
5158 (process_serial_event): Simplify read of ptid.
5159 * thread-db.c (thread_db_create_event): Update.
5160 (thread_db_get_tls_address): Update.
5161 * win32-low.c (current_inferior_ptid): Simplify.
5162
51632014-02-19 Tom Tromey <tromey@redhat.com>
5164
5165 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5166 argument.
5167 (target_supports_btrace): Update.
5168
51692014-02-14 Yao Qi <yao@codesourcery.com>
5170
5171 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5172 (rsp-low-ipa.o): New target.
5173
51742014-02-12 Tom Tromey <tromey@redhat.com>
5175
5176 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5177 convert_ascii_to_int.
5178 * regcache.c (registers_to_string): Likewise.
5179 * remote-utils.c (decode_M_packet): Likewise.
5180 * server.c (process_serial_event): Likewise.
5181
51822014-02-12 Tom Tromey <tromey@redhat.com>
5183
5184 * server.c (handle_query, handle_v_run): Use hex2bin, not
5185 unhexify.
5186 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5187
51882014-02-12 Tom Tromey <tromey@redhat.com>
5189
5190 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5191 convert_int_to_ascii.
5192 * regcache.c (registers_to_string, collect_register_as_string):
5193 Likewise.
5194 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5195 Likewise.
5196 * server.c (process_serial_event): Likewise.
5197 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5198 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5199
52002014-02-12 Tom Tromey <tromey@redhat.com>
5201
5202 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5203 bin2hex, not hexify.
5204 * tracepoint.c (cmd_qtstatus): Likewise.
5205
52062014-02-12 Tom Tromey <tromey@redhat.com>
5207
5208 * remote-utils.c (monitor_output): Pass explicit length to
5209 hexify.
5210
52112014-02-12 Tom Tromey <tromey@redhat.com>
5212
5213 * tracepoint.c: Include rsp-low.h.
5214 * server.c: Include rsp-low.h.
5215 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5216 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5217 declare.
5218 * remote-utils.c: Include rsp-low.h.
5219 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5220 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5221 (convert_int_to_ascii, convert_ascii_to_int): Move to
5222 common/rsp-low.c.
5223 * regcache.c: Include rsp-low.h.
5224 * ax.c: Include rsp-low.h.
5225 * Makefile.in (SFILES): Add common/rsp-low.c.
5226 (OBS): Add rsp-low.o.
5227 (rsp-low.o): New target.
5228
52292014-02-12 Tom Tromey <tromey@redhat.com>
5230
5231 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5232 Include print-utils.h.
5233 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5234 (plongest, thirty_two, phex_nz): Remove.
5235 * Makefile.in (SFILES): Add common/print-utils.c.
5236 (OBS): Add print-utils.o.
5237 (print-utils-ipa.o): New target.
5238 (print-utils.o): New target.
5239 (IPA_OBJS): Add print-utils-ipa.o.
5240
52412014-02-06 Tom Tromey <tromey@redhat.com>
5242
5243 * Makefile.in (SFILES): Fix indentation.
5244
52452014-02-05 Doug Evans <dje@google.com>
5246
5247 * linux-low.c (linux_wait_for_event): Improve comment.
5248 (linux_wait_1): Keep current_inferior in sync with event_child.
5249
52502014-01-22 Doug Evans <dje@google.com>
5251
5252 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5253
52542014-01-22 Doug Evans <dje@google.com>
5255
5256 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5257 * configure: Regenerate.
5258 * config.in: Regenerate.
5259 * Makefile.in (SFILES): Add debug.c.
5260 (OBS): Add debug.o.
5261 * debug.c: New file.
5262 * debug.h: New file.
5263 * linux-aarch64-low.c (*): Update all debugging printfs to use
5264 debug_printf instead of fprintf.
5265 * linux-arm-low.c (*): Ditto.
5266 * linux-cris-low.c (*): Ditto.
5267 * linux-crisv32-low.c (*): Ditto.
5268 * linux-m32r-low.c (*): Ditto.
5269 * linux-sparc-low.c (*): Ditto.
5270 * linux-x86.c (*): Ditto.
5271 * linux-low.c (*): Ditto.
5272 (linux_wait_1): Add calls to debug_enter, debug_exit.
5273 (linux_wait): Remove redundant debugging printf.
5274 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5275 (linux_resume, unstop_all_lwps): Ditto.
5276 * mem-break.c (*): Update all debugging printfs to use
5277 debug_printf instead of fprintf.
5278 * remote-utils.c (*): Ditto.
5279 * thread-db.c (*): Ditto.
5280 * server.c #include <ctype.h>, "gdb_vecs.h".
5281 (debug_threads): Moved to debug.c.
5282 (*): Update all debugging printfs to use debug_printf instead of
5283 fprintf.
5284 (start_inferior): Replace call to fflush with call to debug_flush.
5285 (monitor_show_help): Mention set debug-format.
5286 (parse_debug_format_options): New function.
5287 (handle_monitor_command): Handle "monitor set debug-format".
5288 (gdbserver_usage): Mention --debug-format.
5289 (main): Parse --debug-format.
5290 * server.h (debug_threads): Declaration moved to debug.h.
5291 #include "debug.h".
5292 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5293 trace_debug_1 that uses debug_printf.
5294 (tracepoint_look_up_symbols): Update all debugging printfs to use
5295 debug_printf instead of fprintf.
5296
52972014-01-20 Baruch Siach <baruch@tkos.co.il>
5298
5299 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5300 sys/ptrace.h.
5301
53022014-01-17 Pedro Alves <palves@redhat.com>
5303
5304 PR build/16445
5305 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5306 defined after including gdb_proc_service.h.
5307
53082014-01-16 Doug Evans <dje@google.com>
5309
5310 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5311 (match_dll): Use it.
5312
53132014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5314
5315 * target.h (target_ops) <read_btrace>: Change parameters and
5316 return type to allow error reporting.
5317 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5318 trace reading errors on.
5319 * linux-low.c (linux_low_read_btrace): Pass trace reading
5320 errors on.
5321 (linux_low_disable_btrace): New.
5322
53232014-01-15 Doug Evans <dje@google.com>
5324
5325 * inferiors.c (thread_id_to_gdb_id): Delete.
5326 * inferiors.h (thread_id_to_gdb_id): Delete.
5327
53282014-01-13 Eli Zaretskii <eliz@gnu.org>
5329
5330 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5331 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5332 versions.
5333
53342014-01-08 Pedro Alves <palves@redhat.com>
5335
5336 * server.c (handle_status): Don't discard previous queued stop
5337 replies or thread's pending status here.
5338 (main) <disconnection>: Do it here instead.
5339
53402014-01-08 Pedro Alves <palves@redhat.com>
5341
5342 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5343 * server.c (visit_actioned_threads, handle_pending_status): New
5344 function.
5345 (handle_v_cont): Factor out parts to ...
5346 (resume): ... this new function. If in all-stop, and a thread
5347 being resumed has a pending status, report it without actually
5348 resuming.
5349 (myresume): Adjust to use the new 'resume' function.
5350 (clear_pending_status_callback, set_pending_status_callback)
5351 (find_status_pending_thread_callback): New functions.
5352 (handle_status): Handle the case of multiple threads having
5353 interesting statuses to report. Report threads' real last signal
5354 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5355 with an interesting thread to report the status for, instead of
5356 always reporting the status of the first thread.
5357
53582014-01-01 Joel Brobecker <brobecker@adacore.com>
5359
5360 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5361 * gdbreplay.c (gdbreplay_version): Likewise.
5362
53632013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5364
5365 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5366 iov.iov_len with the real length in use.
5367
53682013-12-13 Joel Brobecker <brobecker@adacore.com>
5369
5370 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5371 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5372 for all targets that use win32-low.c.
5373 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5374 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5375
53762013-12-13 Pedro Alves <palves@redhat.com>
5377
5378 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5379 if equal to TARGET_WAITKIND_LOADED.
5380 * win32-low.c (cached_status): New static global.
5381 (win32_wait): Add declaration.
5382 (do_initial_child_stuff): Flush all initial pending debug events
5383 up to the initial breakpoint.
5384 (win32_wait): If CACHED_STATUS was set, return that instead
5385 of doing a real wait. Remove the code resuming the execution
5386 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5387 during the initial phase. Also remove the code changing
5388 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5389 TARGET_WAITKIND_STOPPED.
5390
53912013-12-11 Yao Qi <yao@codesourcery.com>
5392
5393 * notif.c (handle_notif_ack): Return 0 if no notification
5394 matches.
5395
53962013-11-20 Doug Evans <dje@google.com>
5397
5398 * linux-low.c (linux_set_resume_request): Fix comment.
5399
54002013-11-20 Doug Evans <dje@google.com>
5401
5402 * linux-low.c (resume_status_pending_p): Tweak comment.
5403
54042013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5405
5406 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5407 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5408 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5409 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5410 (srv_amd64_regobj): Add amd64-mpx.o.
5411 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5412 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5413 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5414 * i387-fp.c (num_pl_bnd_register) Added constant.
5415 (num_pl_bnd_cfg_registers) Added constant.
5416 (struct i387_xsave) Added reserved area and MPX fields.
5417 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5418 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5419 function.
5420 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5421 (init_registers_amd64_mpx_linux): Declare new function.
5422 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5423 (x86_64_regmap): Add MPX registers.
5424 (x86_linux_read_description): Add MPX case.
5425 (initialize_low_arch): Initialize MPX targets.
5426
54272013-11-18 Tom Tromey <tromey@redhat.com>
5428
5429 * configure: Rebuild.
5430 * configure.ac: Don't check for stdlib.h.
5431 * gdbreplay.c: Unconditionally include stdlib.h.
5432
54332013-11-18 Tom Tromey <tromey@redhat.com>
5434
5435 * config.in: Rebuild.
5436 * configure: Rebuild.
5437 * configure.ac: Don't use AC_HEADER_DIRENT.
5438
54392013-11-18 Tom Tromey <tromey@redhat.com>
5440
5441 * server.h: Don't check HAVE_STRING_H.
5442 * gdbreplay.c: Don't check HAVE_STRING_H.
5443 * configure: Rebuild.
5444
54452013-11-18 Tom Tromey <tromey@redhat.com>
5446
5447 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5448 LIBGNU.
5449
54502013-11-08 Tom Tromey <tromey@redhat.com>
5451
5452 * configure, config.in: Rebuild.
5453 * configure.ac: Remove unused configury.
5454
54552013-11-08 Tom Tromey <tromey@redhat.com>
5456
5457 * acinclude.m4: Include common.m4, codeset.m4.
5458 * configure, config.in: Rebuild.
5459 * configure.ac: Use GDB_AC_COMMON.
5460
54612013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5462
5463 * linux-s390-low.c (HWCAP_S390_TE): New define.
5464 (s390_arch_setup): Consider the TE field in the HWCAP for
5465 determining 'have_regset_tdb'.
5466
54672013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5468
5469 PR gdb/16014
5470 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5471 call to sizeof.
5472
54732013-10-02 Pedro Alves <palves@redhat.com>
5474
5475 * server.c (process_serial_event): Don't output "GDBserver
5476 exiting" if GDB is connected through stdio.
5477 * target.c (mywait): Likewise, be silent if GDB is connected
5478 through stdio.
5479
54802013-10-01 Joel Brobecker <brobecker@adacore.com>
5481
5482 * lynx-low.c (lynx_add_threads_after_attach): New function.
5483 (lynx_attach): Remove call to add_thread. Add call to
5484 lynx_add_threads_after_attach instead.
5485
54862013-09-28 Mike Frysinger <vapier@gentoo.org>
5487
5488 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5489 * config.in, configure: Regenerated.
5490
54912013-09-18 Yao Qi <yao@codesourcery.com>
5492
5493 PR server/15959
5494 * server.c (start_inferior): Clear 'resume_info'.
5495
54962013-09-16 Jiong Wang <jiwang@tilera.com>
5497
5498 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5499 for each register.
5500
55012013-09-16 Jiong Wang <jiwang@tilera.com>
5502
5503 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5504 linux-tile-low.o to srv_tgtobj.
5505
55062013-09-16 Will Newton <will.newton@linaro.org>
5507
5508 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5509 out regs.
5510
55112013-09-06 Pedro Alves <palves@redhat.com>
5512
5513 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5514 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5515 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5516 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5517 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5518 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5519
55202013-09-06 Pedro Alves <palves@redhat.com>
5521
5522 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5523 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5524
55252013-09-06 Pedro Alves <palves@redhat.com>
5526
5527 * linux-amd64-ipa.c: Include tracepoint.h.
5528 * linux-i386-ipa.c: Include tracepoint.h.
5529
55302013-09-06 Ricard Wanderlof <ricardw@axis.com>
5531
5532 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5533 (ps_get_thread_area): New function.
5534
55352013-09-06 Ricard Wanderlof <ricardw@axis.com>
5536
5537 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5538 (initialize_low_arch): Call init_registers_crisv32 rather than
5539 init_register_crisv32.
5540
55412013-09-05 Pedro Alves <palves@redhat.com>
5542
5543 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5544 to ...
5545 * hostio.h: ... this new file.
5546 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5547 win32-low.c: Include hostio.h.
5548
55492013-09-05 Pedro Alves <palves@redhat.com>
5550
5551 * server.h (gdb_client_data, handler_func, callback_handler_func)
5552 (delete_file_handler, add_file_handler, append_callback_event)
5553 (delete_callback_event, start_event_loop, initialize_event_loop):
5554 Move to event-loop.h and include it.
5555 * event-loop.h: New file.
5556
55572013-09-05 Pedro Alves <palves@redhat.com>
5558
5559 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5560 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5561 (loaded_dll, unloaded_dll): Move to ...
5562 * dll.h: ... this new file.
5563 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5564
55652013-09-05 Pedro Alves <palves@redhat.com>
5566
5567 * server.h (current_process, get_thread_process, all_processes)
5568 (add_inferior_to_list, for_each_inferior, current_inferior)
5569 (remove_inferior, add_process, remove_process, find_process_pid)
5570 (have_started_inferiors_p, have_attached_inferiors_p)
5571 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5572 (clear_inferiors, find_inferior, find_inferior_id)
5573 (inferior_target_data, set_inferior_target_data)
5574 (inferior_regcache_data, set_inferior_regcache_data): Move to
5575 inferiors.h, and include it.
5576 * inferiors.h: New file.
5577
55782013-09-05 Pedro Alves <palves@redhat.com>
5579
5580 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5581 Move ...
5582 * ax.h: ... here.
5583
55842013-09-05 Pedro Alves <palves@redhat.com>
5585
5586 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5587 tracepoint.h.
5588 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5589 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5590 (handle_tracepoint_general_set, handle_tracepoint_query)
5591 (tracepoint_finished_step, tracepoint_was_hit)
5592 (release_while_stepping_state_list, current_traceframe)
5593 (in_readonly_region, traceframe_read_mem)
5594 (fetch_traceframe_registers, traceframe_read_sdata)
5595 (traceframe_read_info, struct fast_tpoint_collect_status)
5596 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5597 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5598 (supply_fast_tracepoint_registers)
5599 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5600 (ipa_tdesc, claim_trampoline_space)
5601 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5602 (agent_mem_read, agent_get_trace_state_variable_value)
5603 (agent_set_trace_state_variable_value, agent_tsv_read)
5604 (agent_mem_read_string, get_raw_reg_func_addr)
5605 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5606 * tracepoint.h: ... this new file.
5607
56082013-09-05 Pedro Alves <palves@redhat.com>
5609
5610 * server.h (perror_with_name, error, fatal, warning, paddress)
5611 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5612 include it.
5613 * utils.h: New file.
5614
56152013-09-05 Pedro Alves <palves@redhat.com>
5616
5617 * server.h (remote_debug, noack_mode, transport_is_reliable)
5618 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5619 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5620 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5621 (write_enn, initialize_async_io, enable_async_io)
5622 (disable_async_io, check_remote_input_interrupt_request)
5623 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5624 (dead_thread_notify, prepare_resume_reply)
5625 (decode_address_to_semicolon, decode_address, decode_m_packet)
5626 (decode_M_packet, decode_X_packet, decode_xfer_write)
5627 (decode_search_memory_packet, unhexify, hexify)
5628 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5629 (look_up_one_symbol, relocate_instruction)
5630 (monitor_output): Move to remote-utils.h, and include it.
5631 * remote-utils.h: New file.
5632
56332013-09-05 Pedro Alves <palves@redhat.com>
5634
5635 * server.h (_): Delete.
5636
56372013-09-02 Pedro Alves <palves@redhat.com>
5638
5639 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5640 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5641 allocated.
5642 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5643
56442013-09-02 Pierre Muller <muller@sourceware.org>
5645
5646 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5647 or WriteProcessMemory complete successfully and handle
5648 ERROR_PARTIAL_COPY error.
5649
56502013-09-02 Pedro Alves <palves@redhat.com>
5651
5652 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5653 error instead of EIO.
5654
56552013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5656
5657 PR server/15604
5658 * linux-low.c: Include filestuff.h.
5659 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5660 * lynx-low.c: Include filestuff.h.
5661 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5662 * server.c: Include filestuff.h.
5663 (main): Call notice_open_fds.
5664 * spu-low.c: Include filestuff.h.
5665 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5666
56672013-08-22 Luis Machado <lgustavo@codesourcery.com>
5668
5669 * Makefile.in: Explain why ../target and ../nat are not
5670 listed as include file search paths.
5671 (linux-waitpid.o): New object file rule.
5672 * configure.srv (srv_native_linux_obj): New variable.
5673 Replace all occurrences of linux native object files with
5674 $srv_native_linux_obj.
5675 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5676 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5677 (linux_enable_event_reporting): Remove declaration.
5678 (my_waitpid): Moved to common/linux-waitpid.c.
5679 (linux_wait_for_event): Pass ptid when calling
5680 linux_enable_event_reporting.
5681 (linux_supports_tracefork_flag): Remove.
5682 (linux_enable_event_reporting): Likewise.
5683 (linux_tracefork_grandchild): Remove.
5684 (STACK_SIZE): Moved to common/linux-ptrace.c.
5685 (linux_tracefork_child): Remove.
5686 (linux_test_for_tracefork): Remove.
5687 (linux_look_up_symbols): Call linux_supports_traceclone.
5688 (initialize_low): Remove call to linux_test_for_tracefork.
5689 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5690 common/linux-ptrace.h.
5691 (PTRACE_TYPE_ARG4): Likewise.
5692 Include linux-ptrace.h.
5693
56942013-08-21 Pedro Alves <palves@redhat.com>
5695
5696 * config.in: Renegerate.
5697
56982013-08-19 Luis Machado <lgustavo@codesourcery.com>
5699
5700 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5701 (SFILES): Remove $(srcdir)/common/target-common.c and
5702 add $(srcdir)/target/waitstatus.c.
5703 (OBS): Remove target-common.o and add waitstatus.o.
5704 (server_h): Remove $(srcdir)/../common/target-common.h and
5705 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5706 and $(srcdir)/../target/waitstatus.h.
5707 (target-common.o): Remove.
5708 (waitstatus.o): New target object file.
5709 * target.h: Do not include target-common.h and
5710 include target/resume.h, target/wait.h and
5711 target/waitstatus.h.
5712
57132013-08-13 Luis Machado <lgustavo@codesourcery.com>
5714
5715 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5716 to PTRACE_TYPE_ARG3.
5717 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5718 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5719 PTRACE_TYPE_ARG4.
5720 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5721 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5722
57232013-07-27 Jie Zhang <jie@codesourcery.com>
5724 Daniel Jacobowitz <dan@codesourcery.com>
5725 Yao Qi <yao@codesourcery.com>
5726
5727 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5728 (mips-linux-watch.o): New rule.
5729 (mips_linux_watch_h): New variable.
5730 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5731 srv_tgtobj.
5732 * linux-mips-low.c: Include mips-linux-watch.h.
5733 (struct arch_process_info, struct arch_lwp_info): New.
5734 (update_watch_registers_callback): New function.
5735 (mips_linux_new_process, mips_linux_new_thread) New functions.
5736 (mips_linux_prepare_to_resume, mips_insert_point): New
5737 functions.
5738 (mips_remove_point, mips_stopped_by_watchpoint): New
5739 functions.
5740 (rsp_bp_type_to_target_hw_bp_type): New function.
5741 (mips_stopped_data_address): New function.
5742 (the_low_target): Add watchpoint support functions.
5743
57442013-07-27 Yao Qi <yao@codesourcery.com>
5745
5746 * i386-low.c: Include break-common.h.
5747 (enum target_hw_bp_type): Remove.
5748
57492013-07-24 Luis Machado <lgustavo@codesourcery.com>
5750
5751 * Makefile.in (SFILES): /common/target-common.c.
5752 (OBS): Add target-common.o.
5753 (server_h): Add $(srcdir)/../common/target-common.h.
5754 (target-common.o): New target.
5755 * server.c (queue_stop_reply_callback): Free
5756 status string after use.
5757 * target.c (target_waitstatus_to_string): Remove.
5758 * target.h: Include target-common.h.
5759 (resume_kind): Likewise.
5760 (target_waitkind): Likewise.
5761 (target_waitstatus): Likewise.
5762 (TARGET_WNOHANG): Likewise.
5763
57642013-07-04 Yao Qi <yao@codesourcery.com>
5765
5766 * Makefile.in (host_alias): Use @host_noncanonical@.
5767 (target_alias): Use @target_noncanonical@.
5768 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5769 ACX_NONCANONICAL_HOST.
5770 * configure: Regenerated.
5771
5772 Revert:
5773 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5774
5775 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5776 * configure: Rebuild.
5777 * Makefile.in (version_host, version_target): Get from configure.
5778 (version.c): Use $(version_host) and $(version_target).
5779
57802013-07-03 Pedro Alves <palves@redhat.com>
5781
5782 * Makefile.in (config.status): Depend on development.sh.
5783 * acinclude.m4: Include libmcheck.m4.
5784 * configure: Regenerate.
5785
57862013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5787
5788 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5789 attribute inside the parentheses.
5790 (winapi_DebugSetProcessKillOnExit): Ditto.
5791 (winapi_DebugBreakProcess): Ditto.
5792 (winapi_GenerateConsoleCtrlEvent): Ditto.
5793
57942013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5795
5796 * notif.h (notif_event): Add a dummy member to avoid compiler
5797 errors.
5798
57992013-07-01 Pedro Alves <palves@redhat.com>
5800
5801 * hostio.c (HOSTIO_PATH_MAX): Define.
5802 (require_filename, handle_open, handle_unlink, handle_readlink):
5803 Use it.
5804
58052013-07-01 Pedro Alves <palves@redhat.com>
5806
5807 * server.h: Include "pathmax.h".
5808 * linux-low.c: Don't include sys/param.h.
5809 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5810 MAXPATHLEN.
5811 * win32-low.c: Don't include sys/param.h.
5812 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5813
58142013-07-01 Pedro Alves <palves@redhat.com>
5815
5816 * event-loop.c: Don't check HAVE_UNISTD_H before including
5817 <unistd.h>.
5818 * gdbreplay.c: Likewise.
5819 * remote-utils.c: Likewise.
5820 * server.c: Likewise.
5821 * configure.ac: Don't check for unistd.h.
5822 * configure: Regenerate.
5823
58242013-06-28 Tom Tromey <tromey@redhat.com>
5825
5826 * Makefile.in (version.c): Use version.in, not
5827 common/version.in.
5828
58292013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5830
5831 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5832 * configure: Rebuild.
5833 * Makefile.in (version_host, version_target): Get from configure.
5834 (version.c): Use $(version_host) and $(version_target).
5835
58362013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5837
5838 Fix trace-status to output user name without trailing colon.
5839 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5840
58412013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5842
5843 Fix trace-status to output proper start-time and stop-time.
5844 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5845 output start time and stop time in hex as gdb expects.
5846
58472013-06-26 Pedro Alves <pedro@codesourcery.com>
5848
5849 * tracepoint.c (build_traceframe_info_xml): Output trace state
5850 variables present in the trace buffer.
5851
58522013-06-24 Tom Tromey <tromey@redhat.com>
5853
5854 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5855 create-version.sh.
5856 (version.o): Remove.
5857 * gdbreplay.c: Include version.h.
5858 (version, host_name): Don't declare.
5859 * server.h: Include version.h.
5860 (version, host_name): Don't declare.
5861
58622013-06-12 Pedro Alves <palves@redhat.com>
5863
5864 * linux-x86-low.c (linux_is_elf64): Delete global.
5865 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5866 with local linux_pid_exe_is_elf_64_file use.
5867
58682013-06-11 Pedro Alves <palves@redhat.com>
5869
5870 * linux-low.c (regset_disabled, disable_regset): New functions.
5871 (regsets_fetch_inferior_registers)
5872 (regsets_store_inferior_registers): Use them.
5873 (initialize_regsets_info); Don't allocate the disabled_regsets
5874 array here.
5875 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5876 comment.
5877
58782013-06-11 Pedro Alves <palves@redhat.com>
5879
5880 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5881 xmalloc.
5882
58832013-06-11 Pedro Alves <palves@redhat.com>
5884
5885 * linux-x86-low.c (initialize_low_arch): Call
5886 init_registers_x32_avx_linux.
5887
58882013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5889
5890 Fix compatibility with Android Bionic.
5891 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5892 it is not empty.
5893
58942013-06-07 Pedro Alves <palves@redhat.com>
5895
5896 PR server/14823
5897 * Makefile.in (OBS): Add tdesc.o.
5898 (IPA_OBJS): Add tdesc-ipa.o.
5899 (tdesc-ipa.o): New rule.
5900 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5901 interface.
5902 * linux-low.c (new_inferior): Delete.
5903 (disabled_regsets, num_regsets): Delete.
5904 (linux_add_process): Adjust to set the new per-process
5905 new_inferior flag.
5906 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5907 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5908 was a stop. When calling arch_setup, switch the current inferior
5909 to the thread that got an event.
5910 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5911 (regsets_fetch_inferior_registers)
5912 (regsets_store_inferior_registers): New regsets_info parameter.
5913 Adjust to use it.
5914 (linux_register_in_regsets): New regs_info parameter. Adjust to
5915 use it.
5916 (register_addr, fetch_register, store_register): New usrregs_info
5917 parameter. Adjust to use it.
5918 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5919 parameter regs_info. Adjust to use it.
5920 (linux_fetch_registers): Get the current inferior's regs_info, and
5921 adjust to use it.
5922 (linux_store_registers): Ditto.
5923 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5924 (initialize_low): Don't initialize the target_regsets here. Call
5925 initialize_low_arch.
5926 * linux-low.h (target_regsets): Delete declaration.
5927 (struct regsets_info): New.
5928 (struct usrregs_info): New.
5929 (struct regs_info): New.
5930 (struct process_info_private) <new_inferior>: New field.
5931 (struct linux_target_ops): Delete the num_regs, regmap, and
5932 regset_bitmap fields. New field regs_info.
5933 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5934 * i387-fp.c (num_xmm_registers): Delete.
5935 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5936 calls to new interface.
5937 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5938 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5939 Infer the number of xmm registers from the regcache's target
5940 description.
5941 * i387-fp.h (num_xmm_registers): Delete.
5942 * inferiors.c (add_thread): Don't install the thread's regcache
5943 here.
5944 * proc-service.c (gregset_info): Fetch the current inferior's
5945 regs_info. Adjust to use it.
5946 * regcache.c: Include tdesc.h.
5947 (register_bytes, reg_defs, num_registers)
5948 (gdbserver_expedite_regs): Delete.
5949 (get_thread_regcache): If the thread doesn't have a regcache yet,
5950 create one, instead of aborting gdbserver.
5951 (regcache_invalidate_one): Rename to ...
5952 (regcache_invalidate_thread): ... this.
5953 (regcache_invalidate_one): New.
5954 (regcache_invalidate): Only invalidate registers of the current
5955 process.
5956 (init_register_cache): Add target_desc parameter, and use it.
5957 (new_register_cache): Ditto. Assert the target description has a
5958 non zero registers_size.
5959 (regcache_cpy): Add assertions. Adjust.
5960 (realloc_register_cache, set_register_cache): Delete.
5961 (registers_to_string, registers_from_string): Adjust.
5962 (find_register_by_name, find_regno, find_register_by_number)
5963 (register_cache_size): Add target_desc parameter, and use it.
5964 (free_register_cache_thread, free_register_cache_thread_one)
5965 (regcache_release, register_cache_size): New.
5966 (register_size): Add target_desc parameter, and use it.
5967 (register_data, supply_register, supply_register_zeroed)
5968 (supply_regblock, supply_register_by_name, collect_register)
5969 (collect_register_as_string, collect_register_by_name): Adjust.
5970 * regcache.h (struct target_desc): Forward declare.
5971 (struct regcache) <tdesc>: New field.
5972 (init_register_cache, new_register_cache): Add target_desc
5973 parameter.
5974 (regcache_invalidate_thread): Declare.
5975 (regcache_invalidate_one): Delete declaration.
5976 (regcache_release): Declare.
5977 (find_register_by_number, register_cache_size, register_size)
5978 (find_regno): Add target_desc parameter.
5979 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5980 declarations.
5981 * remote-utils.c: Include tdesc.h.
5982 (outreg, prepare_resume_reply): Adjust.
5983 * server.c: Include tdesc.h.
5984 (gdbserver_xmltarget): Delete declaration.
5985 (get_features_xml, process_serial_event): Adjust.
5986 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5987 declare.
5988 (struct process_info) <tdesc>: New field.
5989 (ipa_tdesc): Declare.
5990 * tdesc.c: New file.
5991 * tdesc.h: New file.
5992 * tracepoint.c: Include tdesc.h.
5993 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5994 (get_context_regcache): Adjust to pass ipa_tdesc down.
5995 (do_action_at_tracepoint): Adjust to get the register cache size
5996 from the context regcache's description.
5997 (traceframe_walk_blocks): Adjust to get the register cache size
5998 from the current trace frame's description.
5999 (traceframe_get_pc): Adjust to get current trace frame's
6000 description and pass it down.
6001 (gdb_collect): Adjust to get the register cache size from the
6002 IPA's description.
6003 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6004 (gdbserver_xmltarget): Delete.
6005 (initialize_low_tracepoint): Set the ipa's target description.
6006 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6007 (initialize_low_tracepoint): Set the ipa's target description.
6008 * linux-x86-low.c: Include tdesc.h.
6009 [__x86_64__] (is_64bit_tdesc): New.
6010 (ps_get_thread_area, x86_get_thread_area): Use it.
6011 (i386_cannot_store_register): Rename to ...
6012 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6013 (i386_cannot_fetch_register): Rename to ...
6014 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6015 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6016 to new interface.
6017 (target_regsets): Rename to ...
6018 (x86_regsets): ... this.
6019 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6020 interface.
6021 (x86_siginfo_fixup): Use is_64bit_tdesc.
6022 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6023 (tdesc_x32_avx_linux, tdesc_x32_linux)
6024 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6025 Declare.
6026 (x86_linux_update_xmltarget): Delete.
6027 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6028 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6029 (AMD64_LINUX_USER64_CS): New.
6030 (x86_linux_read_description): New, based on
6031 x86_linux_update_xmltarget.
6032 (same_process_callback): New.
6033 (x86_arch_setup_process_callback): New.
6034 (x86_linux_update_xmltarget): New.
6035 (x86_regsets_info): New.
6036 (amd64_linux_regs_info): New.
6037 (i386_linux_usrregs_info): New.
6038 (i386_linux_regs_info): New.
6039 (x86_linux_regs_info): New.
6040 (x86_arch_setup): Reimplement.
6041 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6042 (x86_emit_ops): Ditto.
6043 (the_low_target): Adjust. Install x86_linux_regs_info,
6044 x86_cannot_fetch_register, and x86_cannot_store_register.
6045 (initialize_low_arch): New.
6046 * linux-ia64-low.c (tdesc_ia64): Declare.
6047 (ia64_fetch_register): Adjust.
6048 (ia64_usrregs_info, regs_info): New globals.
6049 (ia64_regs_info): New function.
6050 (the_low_target): Adjust.
6051 (initialize_low_arch): New function.
6052 * linux-sparc-low.c (tdesc_sparc64): Declare.
6053 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6054 Adjust.
6055 (sparc_arch_setup): New function.
6056 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6057 (the_low_target): Adjust.
6058 (initialize_low_arch): New function.
6059 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6060 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6061 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6062 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6063 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6064 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6065 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6066 (tdesc_powerpc_isa205_vsx64l): Declare.
6067 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6068 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6069 (ppc_set_pc, ppc_get_hwcap): Adjust.
6070 (ppc_usrregs_info): Forward declare.
6071 (!__powerpc64__) ppc_regmap_adjusted: New global.
6072 (ppc_arch_setup): Adjust to the current process'es target
6073 description.
6074 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6075 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6076 (ppc_store_evrregset): Adjust.
6077 (target_regsets): Rename to ...
6078 (ppc_regsets): ... this, and make static.
6079 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6080 (ppc_regs_info): New function.
6081 (the_low_target): Adjust.
6082 (initialize_low_arch): New function.
6083 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6084 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6085 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6086 (tdesc_s390x_linux64v2): Declare.
6087 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6088 (s390_fill_gregset, s390_store_last_break): Adjust.
6089 (target_regsets): Rename to ...
6090 (s390_regsets): ... this, and make static.
6091 (s390_get_pc, s390_set_pc): Adjust.
6092 (s390_get_hwcap): New target_desc parameter, and use it.
6093 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6094 (s390_arch_setup): Adjust to set the current process'es target
6095 description. Don't adjust the regmap.
6096 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6097 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6098 (regs_info_3264): New globals.
6099 (s390_regs_info): New function.
6100 (the_low_target): Adjust.
6101 (initialize_low_arch): New function.
6102 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6103 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6104 [__mips64] (init_registers_mips_linux)
6105 (init_registers_mips_dsp_linux): Delete defines.
6106 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6107 (have_dsp): New global.
6108 (mips_read_description): New, based on mips_arch_setup.
6109 (mips_arch_setup): Reimplement.
6110 (get_usrregs_info): New function.
6111 (mips_cannot_fetch_register, mips_cannot_store_register)
6112 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6113 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6114 (target_regsets): Rename to ...
6115 (mips_regsets): ... this, and make static.
6116 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6117 (dsp_regs_info, regs_info): New globals.
6118 (mips_regs_info): New function.
6119 (the_low_target): Adjust.
6120 (initialize_low_arch): New function.
6121 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6122 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6123 Declare.
6124 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6125 (arm_read_description): New, with bits factored from
6126 arm_arch_setup.
6127 (arm_arch_setup): Reimplement.
6128 (target_regsets): Rename to ...
6129 (arm_regsets): ... this, and make static.
6130 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6131 (arm_regs_info): New function.
6132 (the_low_target): Adjust.
6133 (initialize_low_arch): New function.
6134 * linux-m68k-low.c (tdesc_m68k): Declare.
6135 (target_regsets): Rename to ...
6136 (m68k_regsets): ... this, and make static.
6137 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6138 (m68k_regs_info): New function.
6139 (m68k_arch_setup): New function.
6140 (the_low_target): Adjust.
6141 (initialize_low_arch): New function.
6142 * linux-sh-low.c (tdesc_sharch): Declare.
6143 (target_regsets): Rename to ...
6144 (sh_regsets): ... this, and make static.
6145 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6146 (sh_regs_info, sh_arch_setup): New functions.
6147 (the_low_target): Adjust.
6148 (initialize_low_arch): New function.
6149 * linux-bfin-low.c (tdesc_bfin): Declare.
6150 (bfin_arch_setup): New function.
6151 (bfin_usrregs_info, regs_info): New globals.
6152 (bfin_regs_info): New function.
6153 (the_low_target): Adjust.
6154 (initialize_low_arch): New function.
6155 * linux-cris-low.c (tdesc_cris): Declare.
6156 (cris_arch_setup): New function.
6157 (cris_usrregs_info, regs_info): New globals.
6158 (cris_regs_info): New function.
6159 (the_low_target): Adjust.
6160 (initialize_low_arch): New function.
6161 * linux-cris-low.c (tdesc_crisv32): Declare.
6162 (cris_arch_setup): New function.
6163 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6164 (cris_regs_info): New function.
6165 (the_low_target): Adjust.
6166 (initialize_low_arch): New function.
6167 * linux-m32r-low.c (tdesc_m32r): Declare.
6168 (m32r_arch_setup): New function.
6169 (m32r_usrregs_info, regs_info): New globals.
6170 (m32r_regs_info): Adjust.
6171 (initialize_low_arch): New function.
6172 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6173 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6174 (tic6x_usrregs_info): Forward declare.
6175 (tic6x_read_description): New function, based on ...
6176 (tic6x_arch_setup): ... this. Reimplement.
6177 (target_regsets): Rename to ...
6178 (tic6x_regsets): ... this, and make static.
6179 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6180 (tic6x_regs_info): New function.
6181 (the_low_target): Adjust.
6182 (initialize_low_arch): New function.
6183 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6184 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6185 (target_regsets): Rename to ...
6186 (xtensa_regsets): ... this, and make static.
6187 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6188 globals.
6189 (xtensa_arch_setup, xtensa_regs_info): New functions.
6190 (the_low_target): Adjust.
6191 (initialize_low_arch): New function.
6192 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6193 (nios2_arch_setup): Set the current process'es tdesc.
6194 (target_regsets): Rename to ...
6195 (nios2_regsets): ... this.
6196 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6197 (nios2_regs_info): New function.
6198 (the_low_target): Adjust.
6199 (initialize_low_arch): New function.
6200 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6201 (aarch64_arch_setup): Set the current process'es tdesc.
6202 (target_regsets): Rename to ...
6203 (aarch64_regsets): ... this.
6204 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6205 (aarch64_regs_info): New function.
6206 (the_low_target): Adjust.
6207 (initialize_low_arch): New function.
6208 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6209 globals.
6210 (target_regsets): Rename to ...
6211 (tile_regsets): ... this.
6212 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6213 (tile_regs_info): New function.
6214 (tile_arch_setup): Set the current process'es tdesc.
6215 (the_low_target): Adjust.
6216 (initialize_low_arch): New function.
6217 * spu-low.c (tdesc_spu): Declare.
6218 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6219 * win32-arm-low.c (tdesc_arm): Declare.
6220 (arm_arch_setup): New function.
6221 (the_low_target): Install arm_arch_setup instead of
6222 init_registers_arm.
6223 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6224 (init_windows_x86): Rename to ...
6225 (i386_arch_setup): ... this. Set `win32_tdesc'.
6226 (the_low_target): Adjust.
6227 * win32-low.c (win32_tdesc): New global.
6228 (child_add_thread): Don't create the thread cache here.
6229 (do_initial_child_stuff): Set the new process'es tdesc.
6230 * win32-low.h (struct target_desc): Forward declare.
6231 (win32_tdesc): Declare.
6232 * lynx-i386-low.c (tdesc_i386): Declare global.
6233 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6234 * lynx-low.c (lynx_tdesc): New global.
6235 (lynx_add_process): Set the new process'es tdesc.
6236 * lynx-low.h (struct target_desc): Forward declare.
6237 (lynx_tdesc): Declare global.
6238 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6239 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6240 * nto-low.c (nto_tdesc): New global.
6241 (do_attach): Set the new process'es tdesc.
6242 * nto-low.h (struct target_desc): Forward declare.
6243 (nto_tdesc): Declare.
6244 * nto-x86-low.c (tdesc_i386): Declare.
6245 (nto_x86_arch_setup): Set `nto_tdesc'.
6246
62472013-06-04 Gary Benson <gbenson@redhat.com>
6248
6249 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6250 to qSupported response when appropriate.
6251 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6252 with nonzero-length annex.
6253 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6254 arguments supplied in annex.
6255
62562013-05-31 Doug Evans <dje@google.com>
6257
6258 PR server/15594
6259 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6260 64 bits in 64-cross-32 environment.
6261
62622013-05-28 Pedro Alves <palves@redhat.com>
6263
6264 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6265 (aarch64-without-fpu.c): Delete rule.
6266 * configure.srv (aarch64*-*-linux*): Remove references to
6267 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6268 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6269 declaration.
6270
62712013-05-24 Pedro Alves <palves@redhat.com>
6272
6273 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6274 instead of strchr/decode_address. Error if the range isn't split
6275 with a ','. Don't assume there's be a ':' in the action.
6276
62772013-05-23 Yao Qi <yao@codesourcery.com>
6278 Pedro Alves <palves@redhat.com>
6279
6280 * linux-low.c (lwp_in_step_range): New function.
6281 (linux_wait_1): If the thread was range stepping and stopped
6282 outside the stepping range, report the stop to GDB. Otherwise,
6283 continue stepping. Add range stepping debug output.
6284 (linux_set_resume_request): Copy the step range from the resume
6285 request to the lwp.
6286 (linux_supports_range_stepping): New.
6287 (linux_target_ops) <supports_range_stepping>: Set to
6288 linux_supports_range_stepping.
6289 * linux-low.h (struct linux_target_ops)
6290 <supports_range_stepping>: New field.
6291 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6292 * linux-x86-low.c (x86_supports_range_stepping): New.
6293 (the_low_target) <supports_range_stepping>: Set to
6294 x86_supports_range_stepping.
6295 * server.c (handle_v_cont): Handle 'r' action.
6296 (handle_v_requests): Append ";r" if the target supports range
6297 stepping.
6298 * target.h (struct thread_resume) <step_range_start,
6299 step_range_end>: New fields.
6300 (struct target_ops) <supports_range_stepping>:
6301 New field.
6302 (target_supports_range_stepping): New macro.
6303
63042013-05-17 Joel Brobecker <brobecker@adacore.com>
6305
6306 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6307 confusion in comment.
6308
63092013-05-17 Joel Brobecker <brobecker@adacore.com>
6310
6311 * lynx-low.c (struct process_info_private): New type.
6312 (lynx_add_process): New function.
6313 (lynx_create_inferior, lynx_attach): Replace calls to
6314 add_process by calls to lynx_add_process.
6315 (lynx_resume): If PTID is null, then try using
6316 current_process()->private->last_wait_event_ptid.
6317 Add comments.
6318 (lynx_clear_inferiors): Delete. The contents of that function
6319 has been inlined in lynx_mourn;
6320 (lynx_wait_1): Save the ptid in the process's private data.
6321 (lynx_mourn): Free the process' private data. Replace call
6322 to lynx_clear_inferiors by call to clear_inferiors.
6323
63242013-05-17 Yao Qi <yao@codesourcery.com>
6325
6326 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6327 the right place.
6328
63292013-05-16 Luis Machado <lgustavo@codesourcery.com>
6330
6331 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6332 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6333 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6334 PT_TEXT_END_ADDR guards. Update comments.
6335 (linux_target_op) <read_offsets>: Conditionally define to
6336 linux_read_offsets if the target is UCLIBC and if it defines
6337 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6338
63392013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6340 Andrew Jenner <andrew@codesourcery.com>
6341
6342 * Makefile.in (SFILES): Add linux-nios2-low.c.
6343 (clean): Add action to delete nios2-linux.c.
6344 (nios2-linux.c): New rule.
6345 * configure.srv: Add nios2*-*-linux*.
6346 * linux-nios2-low.c: New.
6347
63482013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6349
6350 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6351
63522013-04-25 Hui Zhu <hui@codesourcery.com>
6353
6354 PR gdb/15186
6355 * ax.c (ax_printf): Add fflush.
6356
63572013-04-22 Tom Tromey <tromey@redhat.com>
6358
6359 * Makefile.in (SFILES): Add filestuff.c.
6360 (OBS): Add filestuff.o.
6361 (filestuff.o): New target.
6362 * config.in, configure: Rebuild.
6363 * configure.ac: Check for fdwalk, pipe2.
6364
63652013-04-17 Pedro Alves <palves@redhat.com>
6366
6367 * configure.ac (USE_THREAD_DB): Delete variable.
6368 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6369 Don't AC_SUBST USE_THREAD_DB.
6370 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6371 * config.in, configure: Regenerate.
6372
63732013-04-16 Pedro Alves <palves@redhat.com>
6374
6375 * linux-low.h (struct lwp_info) <thread_known>: Move under
6376 the USE_THREAD_DB #ifdef.
6377
63782013-04-16 Pedro Alves <palves@redhat.com>
6379
6380 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6381 (linux-low.o): Delete rule.
6382 * linux-low.h: Always include "gdb_thread_db.h" instead of
6383 conditionally including thread_db.h.
6384 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6385 HAVE_THREAD_DB_H.
6386
63872013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6388
6389 * Makefile.in (install-only): Fix make install regression.
6390
63912013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6392
6393 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6394 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6395 installation.
6396 * gdbserver.1: Remove.
6397
63982013-03-22 Pedro Alves <palves@redhat.com>
6399
6400 * linux-low.c (handle_extended_wait): Don't call
6401 linux_enable_event_reporting.
6402
64032013-03-15 Tony Theodore <tonyt@logyst.com>
6404
6405 PR build/9098:
6406 * Makefile.in (SHELL): Use @SHELL@.
6407
64082013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6409
6410 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6411 compiler warning.
6412
64132013-03-13 Joel Brobecker <brobecker@adacore.com>
6414
6415 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6416 Remove extraneous NULL element.
6417
64182013-03-13 Yao Qi <yao@codesourcery.com>
6419
6420 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6421 'V' block in trace frame.
6422
64232013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6424
6425 * target.h (struct target_ops): Add btrace ops.
6426 (target_supports_btrace): New macro.
6427 (target_enable_btrace): New macro.
6428 (target_disable_btrace): New macro.
6429 (target_read_btrace): New macro.
6430 * gdbthread.h (struct thread_info): Add btrace field.
6431 * server.c: Include btrace-common.h.
6432 (handle_btrace_general_set): New function.
6433 (handle_btrace_enable): New function.
6434 (handle_btrace_disable): New function.
6435 (handle_general_set): Call handle_btrace_general_set.
6436 (handle_qxfer_btrace): New function.
6437 (struct qxfer qxfer_packets[]): Add btrace entry.
6438 * inferiors.c (remove_thread): Disable btrace.
6439 * linux-low: Include linux-btrace.h.
6440 (linux_low_enable_btrace): New function.
6441 (linux_low_read_btrace): New function.
6442 (linux_target_ops): Add btrace ops.
6443 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6444 Add srv_linux_btrace=yes.
6445 (x86_64-*-linux*): Add linux-btrace.o.
6446 Add srv_linux_btrace=yes.
6447 * configure.ac: Define HAVE_LINUX_BTRACE.
6448 * config.in: Regenerated.
6449 * configure: Regenerated.
6450
64512013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6452
6453 * server.c (handle_qxfer): Preserve error message if -3 is
6454 returned.
6455 (qxfer): Document the -3 return value.
6456
64572013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6458
6459 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6460 (linux_btrace_h): New variable.
6461 (linux-btrace.o): New rule.
6462
64632013-03-08 Stan Shebs <stan@codesourcery.com>
6464 Hafiz Abid Qadeer <abidh@codesourcery.com>
6465
6466 * tracepoint.c (trace_buffer_size): New global.
6467 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6468 (init_trace_buffer): Change to one-argument function. Allocate
6469 trace buffer memory.
6470 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6471 handle QTBuffer:size packet.
6472 (cmd_bigqtbuffer_size): New function.
6473 (initialize_tracepoint): Call init_trace_buffer with
6474 DEFAULT_TRACE_BUFFER_SIZE.
6475 * server.c (handle_query): Add QTBuffer:size in the
6476 supported packets.
6477
64782013-03-07 Yao Qi <yao@codesourcery.com>
6479
6480 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6481 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6482 of -1.
6483 (cmd_qtsp): Adjust condition. Do post increment.
6484 Set cur_action and cur_step_action back to 0.
6485
64862013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6487
6488 PR server/15236
6489 * linux-low.c (linux_write_memory): Return early success if LEN is
6490 zero.
6491
64922013-03-05 Corinna Vinschen <vinschen@redhat.de>
6493
6494 * configure.srv: Add x86_64-*-cygwin* as target.
6495
64962013-02-28 Tom Tromey <tromey@redhat.com>
6497
6498 * configure.ac: Invoke AC_SYS_LARGEFILE.
6499 * configure, config.in: Rebuild.
6500
65012013-02-28 Corinna Vinschen <vinschen@redhat.com>
6502
6503 * win32-low.c: Throughout, fix format strings and casts of
6504 printf-like functions to avoid type related warnings on all
6505 platforms.
6506 (get_child_debug_event): Print dwDebugEventCode as hex since
6507 that's how it's usually documented.
6508
65092013-02-28 Yao Qi <yao@codesourcery.com>
6510
6511 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6512 pulongest.
6513
65142013-02-27 Jiong Wang <jiwang@tilera.com>
6515
6516 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6517 (reg-tilegx32.c): New rule.
6518 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6519 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6520 different register info initializer according to elf class.
6521 (init_registers_tilgx32): New function. The tilegx32 register info
6522 initializer.
6523 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6524 (tile_store_gregset): Likewise.
6525
65262013-02-27 Yao Qi <yao@codesourcery.com>
6527
6528 * server.c (process_point_options): Print debug message when
6529 debug_threads is true.
6530
65312013-02-26 Yao Qi <yao@codesourcery.com>
6532
6533 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6534
65352013-02-19 Pedro Alves <palves@redhat.com>
6536 Kai Tietz <ktietz@redhat.com>
6537
6538 PR gdb/15161
6539
6540 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6541 instead of strtoul to extract address from packet.
6542 (process_serial_event) <'z'>: Likewise.
6543
65442013-02-18 Yao Qi <yao@codesourcery.com>
6545
6546 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6547
65482013-02-14 Pedro Alves <palves@redhat.com>
6549
6550 Plug memory leak.
6551
6552 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6553 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6554
65552013-02-14 Pedro Alves <palves@redhat.com>
6556
6557 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6558
65592013-02-14 Pedro Alves <palves@redhat.com>
6560
6561 * tracepoint.c (save_string): Delete.
6562 (add_tracepoint_action): Use savestring instead of save_string.
6563
65642013-02-12 Pedro Alves <palves@redhat.com>
6565
6566 * linux-xtensa-low.c: Ditto.
6567 * xtensa-xtregs.c: Ditto.
6568
65692013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6570
6571 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6572 thread_db.
6573
65742013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6575
6576 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6577 aarch64_num_wp_regs and aarch64_num_bp_regs to
6578 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6579
65802013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6581
6582 * linux-aarch64-low.c (ps_get_thread_area): Replace
6583 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6584
65852013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6586 Marcus Shawcroft <marcus.shawcroft@arm.com>
6587 Nigel Stephens <nigel.stephens@arm.com>
6588 Yufeng Zhang <yufeng.zhang@arm.com>
6589
6590 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6591 (aarch64.c, aarch64-without-fpu.c): New targets.
6592 * configure.srv (aarch64*-*-linux*): New.
6593 * linux-aarch64-low.c: New file.
6594
65952013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6596
6597 * linux-low.c (handle_extended_wait, linux_create_inferior)
6598 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6599 (dequeue_one_deferred_signal, linux_resume_one_thread)
6600 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6601 (linux_tracefork_grandchild, linux_test_for_tracefork)
6602 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6603 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6604 where the argument is 0.
6605
66062013-01-25 Yao Qi <yao@codesourcery.com>
6607
6608 * event-loop.c: Include "queue.h".
6609 (gdb_event_p): New typedef.
6610 (struct gdb_event) <next_event>: Remove.
6611 (event_queue): Change to QUEUE(gdb_event_p).
6612 (async_queue_event): Remove.
6613 (gdb_event_xfree): New.
6614 (initialize_event_loop): New.
6615 (process_event): Use API from QUEUE.
6616 (wait_for_event): Likewise.
6617 * server.c (main): Call initialize_event_loop.
6618 * server.h (initialize_event_loop): Declare.
6619
66202013-01-18 Yao Qi <yao@codesourcery.com>
6621
6622 * ax.h (struct eval_agent_expr_context): New.
6623 (gdb_eval_agent_expr): Update declaration.
6624 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6625 TFRAME. Add new argument CTX.
6626 * server.h (struct eval_agent_expr_context): Declare.
6627 (agent_mem_read, agent_tsv_read): Update declaration.
6628 (agent_mem_read_string): Likewise.
6629 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6630 (add_traceframe_block): Add new argument TPOINT.
6631 Increase TPOINT->traceframe_usage.
6632 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6633 eval_tracepoint_agent_expr.
6634 (condition_true_at_tracepoint): Likewise.
6635 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6636 (agent_mem_read_string, agent_tsv_read): Likewise.
6637
66382013-01-16 Yao Qi <yao@codesourcery.com>
6639
6640 * linux-low.c (linux_resume_one_lwp): Don't check
6641 'lwp->bp_reinsert != 0'.
6642
66432013-01-07 Joel Brobecker <brobecker@adacore.com>
6644 Pedro Alves <palves@redhat.com>
6645
6646 * lynx-low.c (ptrace_request_to_str): Define a temporary
6647 macro and use it to simplify this function's implementation.
6648
66492013-01-07 Joel Brobecker <brobecker@adacore.com>
6650
6651 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6652 sets errno.
6653
66542013-01-07 Joel Brobecker <brobecker@adacore.com>
6655
6656 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6657
66582013-01-07 Joel Brobecker <brobecker@adacore.com>
6659
6660 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6661
66622013-01-07 Joel Brobecker <brobecker@adacore.com>
6663
6664 * lynx-low.c (lynx_resume): Use the resume_info parameter
6665 to determine the ptid for the lynx_ptrace call, unless
6666 it is equal to minus_one_ptid, in which case we use the
6667 ptid of the current_inferior.
6668 (lynx_wait_1): After having received a thread create/exit
6669 event, resume the inferior's execution using the signaling
6670 thread's ptid, rather than the old ptid.
6671
66722013-01-07 Joel Brobecker <brobecker@adacore.com>
6673
6674 * lynx-low.c (lynx_resume): Delete variable ret.
6675
66762013-01-01 Joel Brobecker <brobecker@adacore.com>
6677
6678 * gdbreplay.c (gdbreplay_version): Update copyright year.
6679 * server.c (gdbserver_version): Likewise.
6680
66812012-12-17 Joel Brobecker <brobecker@adacore.com>
6682
6683 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6684 new thread.
6685
66862012-12-17 Joel Brobecker <brobecker@adacore.com>
6687
6688 * lynx-low.c (ptrace_request_to_str): Add handling for
6689 PTRACE_GETTRACESIG.
6690
66912012-12-17 Joel Brobecker <brobecker@adacore.com>
6692
6693 * lynx-low.c (lynx_attach): Delete variable new_process.
6694
66952012-12-17 Joel Brobecker <brobecker@adacore.com>
6696
6697 * lynx-low.c (lynx_create_inferior): Delete variable
6698 new_process.
6699
67002012-12-17 Joel Brobecker <brobecker@adacore.com>
6701
6702 * lynx-low.c (ptrace_request_to_str): Do not handle
6703 PTRACE_GETTHREADLIST if this macro does not exist.
6704
67052012-12-15 Yao Qi <yao@codesourcery.com>
6706
6707 * Makefile.in (OBS): Add notif.o.
6708 * notif.c, notif.h: New.
6709 * server.c: Include "notif.h".
6710 (struct vstop_notif) <next>: Remove.
6711 <base>: New field.
6712 (queue_stop_reply): Update.
6713 (push_event, send_next_stop_reply): Remove.
6714 (discard_queued_stop_replies): Update.
6715 (notif_stop): New variable.
6716 (handle_v_stopped): Remove.
6717 (handle_v_requests): Don't call handle_v_stopped. Call
6718 handle_ack_notif instead.
6719 (queue_stop_reply_callback): Call notif_event_enque instead
6720 of queue_stop_reply.
6721 (handle_status): Don't call send_next_stop_reply, call
6722 notif_write_event instead.
6723 (kill_inferior_callback): Likewise.
6724 (detach_or_kill_inferior_callback): Likewise.
6725 (main): Call initialize_notif.
6726 (process_serial_event): Call QUEUE_is_empty.
6727 (handle_target_event): Call notif_push instead of push event.
6728 * server.h (push_event): Remove declaration.
6729
67302012-12-10 Tom Tromey <tromey@redhat.com>
6731
6732 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6733 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6734 macros.
6735 (.c.o): Rewrite.
6736 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6737 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6738 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6739 (amd64-linux-ipa.o, ax.o): Rewrite.
6740 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6741 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6742 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6743 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6744 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6745 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6746 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6747 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6748 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6749 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6750 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6751 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6752 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6753 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6754 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6755 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6756 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6757 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6758 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6759 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6760 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6761 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6762 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6763 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6764 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6765 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6766 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6767 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6768 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6769 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6770 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6771 (reg-tilegx.o): Remove.
6772 (all_object_files): New macro.
6773 Include .deps files.
6774 * aclocal.m4, configure: Rebuild.
6775 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6776 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6777 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6778
67792012-12-05 Tom Tromey <tromey@redhat.com>
6780
6781 PR gdb/14917:
6782 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6783
67842012-11-28 Markus Metzger <markus.t.metzger@intel.com>
6785
6786 * configure.ac: Check for linux/perf_event.h.
6787 * config.in: Regenerated.
6788 * configure: Regenerated.
6789
67902012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6791
6792 * hostio.c (handle_readlink): Decrease buffer size
6793 parameter passed to readlink by one byte.
6794
67952012-11-26 Yao Qi <yao@codesourcery.com>
6796
6797 * configure.ac (build_warnings): Append '-Wempty-body'.
6798 * configure: Regenerated.
6799 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6800 body.
6801
68022012-11-15 Pierre Muller <muller@sourceware.org>
6803
6804 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6805 * config.in: Regenerate.
6806 * configure: Regenerate.
6807 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6808 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6809 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6810 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6811 header.
6812 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6813 instead of <sys/wait.h> header.
6814 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6815
68162012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6817
6818 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6819 (various make rules): Remove -DGDBSERVER
6820
68212012-11-09 Yao Qi <yao@codesourcery.com>
6822
6823 * spu-low.c (current_ptid): Move it to ..
6824 * gdbthread.h: ... here. New.
6825 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6826 * server.c (myresume, process_serial_event): Likewise.
6827 * thread-db.c (thread_db_find_new_threads): Likewise.
6828 * tracepoint.c (run_inferior_command): Likewise.
6829
68302012-10-01 Andrew Burgess <aburgess@broadcom.com>
6831
6832 * server.c (handle_search_memory_1): Include access length in
6833 warning message.
6834
68352012-09-05 Michael Brandt <michael.brandt@axis.com>
6836
6837 * linux-crisv32-low.c: Fix compile errors.
6838
68392012-09-04 Yao Qi <yao@codesourcery.com>
6840
6841 * tracepoint.c (cmd_qtsv): Adjust debug message.
6842 Don't check CUR_TPOINT.
6843
68442012-08-28 Yao Qi <yao@codesourcery.com>
6845
6846 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6847 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6848 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6849 Remove declarations of xmalloc, xreallloc, xstrdup and
6850 freeargv.
6851 * Makefile.in (libiberty_h): New.
6852 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6853 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6854
68552012-08-23 Yao Qi <yao@codesourcery.com>
6856
6857 * server.h: Remove declaration of 'xsnprintf'.
6858
68592012-08-22 Keith Seitz <keiths@redhat.com>
6860
6861 * server.h: Include build-gnulib-gbserver/config.h.
6862 * gdbreplay.c: Likewise.
6863
68642012-08-08 Doug Evans <dje@google.com>
6865
6866 * Makefile.in (SFILES): Add gdb_vecs.c.
6867 (OBS): Add gdb_vecs.o.
6868 (gdb_vecs_h, host_defs_h): New variables.
6869 (thread-db.o): Add $(gdb_vecs_h) dependency.
6870 (gdb_vecs.o): New rule.
6871 * thread-db.c: #include "gdb_vecs.h".
6872 (thread_db_load_search): Use a vector to iterate over path elements.
6873 Handle text appearing after "$pdir".
6874
6875 * configure.ac: Add check for strstr.
6876 * config.in: Regenerate.
6877 * configure: Regenerate.
6878
68792012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6880
6881 * hostio.c (handle_pread): If pread fails, fall back to attempting
6882 lseek/read.
6883 (handle_pwrite): Likewise for pwrite.
6884
68852012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6886
6887 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6888 between unsupported TYPE and unimplementable ADDR/LEN combination.
6889 (arm_insert_point): Act on new return value.
6890
68912012-07-31 Pedro Alves <palves@redhat.com>
6892
6893 * server.c (process_point_options): Only skip tokens if we find
6894 one that is unrecognized. Don't treat 'X' specially while
6895 skipping unrecognized tokens.
6896
68972012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6898
6899 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6900 to 4-byte-align HW breakpoint addresses for Thumb.
6901
69022012-07-27 Yao Qi <yao@codesourcery.com>
6903
6904 PR remote/14161.
6905
6906 * server.h: Declare gdb_agent_about_to_close.
6907 * target.c (kill_inferior): Include "agent.h".
6908 New. Send command 'kill'.
6909 * target.h (kill_inferior): Removed macro.
6910 * tracepoint.c (gdb_agent_about_to_close): New.
6911 (gdb_agent_helper_thread): Handle command 'close'.
6912 Wait endlessly until the inferior stops.
6913 Install gdb_agent_remove_socket to atexit hook.
6914 (agent_socket_name): New static variable.
6915 (gdb_agent_socket_init): Replace local variable 'name' with
6916 'agent_socket_name'.
6917 (gdb_agent_remove_socket): New.
6918
69192012-07-27 Yao Qi <yao@codesourcery.com>
6920
6921 * server.c (process_point_options): Stop at 'X' when parsing.
6922
69232012-07-19 Michael Eager <eager@eagercon.com>
6924
6925 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6926 to hw_execute.
6927 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6928 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6929 hardware breakpoint.
6930
69312012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6932
6933 * gdbserver/linux-low.c (initialize_low): Call
6934 linux_ptrace_init_warnings.
6935
69362012-07-02 Doug Evans <dje@google.com>
6937
6938 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6939 pointer to int.
6940
69412012-07-02 Stan Shebs <stan@codesourcery.com>
6942
6943 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6944 (ax.o): Add it to build rule.
6945 (ax-ipa.o): Ditto.
6946 (OBS): Add format.o.
6947 (IPA_OBS): Add format.o.
6948 * server.c (handle_query): Claim support for breakpoint commands.
6949 (process_point_options): Add command case.
6950 (process_serial_event): Leave running if there are printfs in
6951 effect.
6952 * mem-break.h (any_persistent_commands): Declare.
6953 (add_breakpoint_commands): Declare.
6954 (gdb_no_commands_at_breakpoint): Declare.
6955 (run_breakpoint_commands): Declare.
6956 * mem-break.c (struct point_command_list): New struct.
6957 (struct breakpoint): New field command_list.
6958 (any_persistent_commands): New function.
6959 (add_commands_to_breakpoint): New function.
6960 (add_breakpoint_commands): New function.
6961 (gdb_no_commands_at_breakpoint): New function.
6962 (run_breakpoint_commands): New function.
6963 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6964 locally.
6965 * ax.c: Include format.h.
6966 (ax_printf): New function.
6967 (gdb_eval_agent_expr): Add printf opcode.
6968
69692012-06-13 Yao Qi <yao@codesourcery.com>
6970
6971 * server.c (start_inferior): Remove duplicated writes to fields
6972 'last_resume_kind' and 'last_status' of 'current_inferior'.
6973
69742012-06-12 Yao Qi <yao@codesourcery.com>
6975 Pedro Alves <palves@redhat.com>
6976
6977 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6978 comment.
6979 * server.c (handle_v_cont): Extend comment.
6980
69812012-06-11 Yao Qi <yao@codesourcery.com>
6982
6983 * linux-low.c (linux_attach): Add 'static'.
6984
69852012-06-06 Yao Qi <yao@codesourcery.com>
6986
6987 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6988
69892012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6990
6991 Fix gcc -flto compilation warning.
6992 * server.c (main): Make variable multi_mode and attach volatile.
6993
69942012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6995
6996 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6997 if the platform doesn't know about it.
6998
69992012-05-30 Jeff Kenton <jkenton@tilera.com>
7000
7001 * Makefile.in (SFILES): Add linux-tile-low.c.
7002 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7003 * configure.srv: Handle tilegx-*-linux*.
7004 * linux-tile-low.c: New file.
7005
70062012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7007
7008 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7009
70102012-05-24 Pedro Alves <palves@redhat.com>
7011
7012 PR gdb/7205
7013
7014 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7015
70162012-05-24 Pedro Alves <palves@redhat.com>
7017
7018 PR gdb/7205
7019
7020 Replace target_signal with gdb_signal throughout.
7021
70222012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7023
7024 * linux-low.c (linux_store_registers): Avoid the copying sequence
7025 when no data has been retrieved by ptrace.
7026
70272012-05-22 Will Deacon <will.deacon@arm.com>
7028
7029 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7030 Include asm/ptrace.h.
7031 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7032 already defined.
7033
70342012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7035
7036 * linux-low.c (linux_store_registers): Don't re-retrieve data
7037 with ptrace that has already been obtained from /proc. Always
7038 copy any data retrieved with ptrace to the buffer supplied.
7039
70402012-05-11 Yao Qi <yao@codesourcery.com>
7041 Pedro Alves <palves@redhat.com>
7042
7043 * linux-low.c (enum stopping_threads_kind): New.
7044 (stopping_threads): Change type to `enum stopping_threads_kind'.
7045 (handle_extended_wait): If stopping and suspending threads, leave
7046 the new_lwp suspended too.
7047 (linux_wait_for_event): Adjust.
7048 (stop_all_lwps): Set `stopping_threads' to
7049 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7050 whether we're suspending threads or just stopping them. Assert no
7051 recursion happens.
7052
70532012-04-29 Yao Qi <yao@codesourcery.com>
7054
7055 * server.h: Move some code to ...
7056 * gdbthread.h: ... here. New.
7057 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7058 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7059 (nto-low.o, win32-low.o): Likewise.
7060 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7061 * regcache.c, remote-utils.c, server.c: Likewise.
7062 * target.c, tracepoint.c, win32-low.c: Likewise.
7063
70642012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7065
7066 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7067 (PTRACE_ARG4_TYPE): Likewise.
7068 (PTRACE_XFER_TYPE): Likewise.
7069 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7070 ptrace to PTRACE_ARG3_TYPE.
7071 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7072 (PTRACE_ARG4_TYPE): Likewise.
7073 (PTRACE_XFER_TYPE): Likewise.
7074 (linux_detach_one_lwp): Cast fourth argument of
7075 ptrace to long then PTRACE_ARG4_TYPE.
7076 (regsets_fetch_inferior_registers): Cast third argument of
7077 ptrace to long then PTRACE_ARG3_TYPE.
7078 (regsets_store_inferior_registers): Likewise.
7079
70802012-04-20 Pedro Alves <palves@redhat.com>
7081
7082 * configure: Regenerate.
7083
70842012-04-19 Pedro Alves <palves@redhat.com>
7085
7086 * Makefile.in (GNULIB_BUILDDIR): New.
7087 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7088 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7089 (all, install-only, uninstall, clean-info, all-lib, clean): No
7090 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7091 (maintainer-clean realclean distclean): Use subdir_do.
7092 (subdir_do): New.
7093 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7094 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7095 * acinclude.m4: Include acx_configure_dir.m4.
7096 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7097 calls. Call AC_PROG_RANLIB. Configure gnulib using
7098 ACX_CONFIGURE_DIR.
7099 (GNULIB): New.
7100 (GNULIB_STDINT_H): Adjust.
7101 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7102 * gdbreplay.c: Include build-gnulib/config.h.
7103 * server.h: Likewise.
7104 * aclocal.m4: Regenerate.
7105 * config.in: Regenerate.
7106 * configure: Regenerate.
7107
71082012-04-19 Pedro Alves <palves@redhat.com>
7109
7110 * Makefile.in (LIBGNU, INCGNU): Adjust.
7111 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7112 (all, install-only, uninstall, clean-info, all-lib, clean)
7113 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7114 * configure.ac: Adjust AC_OUTPUT output.
7115 * aclocal.m4: Regenerate.
7116 * configure: Regenerate.
7117
71182012-04-19 Pedro Alves <palves@redhat.com>
7119
7120 * Makefile.in (generated_files): New.
7121 (server_h): Remove the explicit dependency on config.h, and depend
7122 on $generated_files.
7123
71242012-04-19 Pedro Alves <palves@redhat.com>
7125
7126 * Makefile.in (INCGNU): Add -Ignulib.
7127
71282012-04-19 Pedro Alves <palves@redhat.com>
7129
7130 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7131 (INCGNU): ... this, and spell out -I here.
7132 (GNULIB_LIB): Rename to ...
7133 (LIBGNU): ... this.
7134 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7135
71362012-04-19 Pedro Alves <palves@redhat.com>
7137
7138 * config.in: Regenerate.
7139
71402012-04-19 Pedro Alves <palves@redhat.com>
7141
7142 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7143 * server.h (memmem): Remove declaration.
7144 * config.in: Regenerate.
7145 * configure: Regenerate.
7146
71472012-04-19 Yao Qi <yao@codesourcery.com>
7148
7149 * Makefile.in (SFILES): Add common/vec.c.
7150 (OBS): Add vec.o.
7151 (vec.o): New rule.
7152
71532012-04-19 Yao Qi <yao@codesourcery.com>
7154
7155 * remote-utils.c (prepare_resume_reply): Replace with macro
7156 target_core_of_thread.
7157 * server.c (handle_qxfer_threads_proper): Likewise.
7158 * target.h (traget_core_of_thread): New macro.
7159
71602012-04-18 Pedro Alves <palves@redhat.com>
7161
7162 * aclocal.m4: Regenerate.
7163 * configure: Regenerate.
7164
71652012-04-16 Yao Qi <yao@codesourcery.com>
7166
7167 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7168 duplicated on address.
7169
71702012-04-16 Yao Qi <yao@codesourcery.com>
7171
7172 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7173 (struct tracepoint_action_ops) <send>: New field.
7174 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7175 (agent_expr_send, x_tracepoint_action_send): New.
7176 (l_tracepoint_action_send): New.
7177 (cmd_qtdp): Download and install tracepoint
7178 according to `use_agent'.
7179 (run_inferior_command): Add one more parameter `len'.
7180 Update callers.
7181 (tracepoint_send_agent): New.
7182 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7183
71842012-04-16 Yao Qi <yao@codesourcery.com>
7185
7186 * tracepoint.c (download_tracepoints): Moved to ...
7187 (cmd_qtstart): ... here.
7188
71892012-04-14 Yao Qi <yao@codesourcery.com>
7190
7191 * tracepoint.c: Include inttypes.h.
7192 (struct collect_memory_action): Use sized types.
7193 (struct tracepoint): Likewise.
7194 (cmd_qtdp, stop_tracing): Update print specifiers.
7195 (cmd_qtp, response_tracepoint): Likewise.
7196 (collect_data_at_tracepoint): Likewise.
7197 (collect_data_at_step): Likewise.
7198
71992012-04-14 Yao Qi <yao@codesourcery.com>
7200
7201 Import gnulib module inttypes.
7202 * aclocal.m4, config.in, configure: Regenerated.
7203
72042012-04-14 Yao Qi <yao@codesourcery.com>
7205
7206 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7207 Makefile and config.status at last.
7208
72092012-04-13 Yao Qi <yao@codesourcery.com>
7210
7211 * tracepoint.c: Include stdint.h unconditionally.
7212
72132012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7214
7215 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7216 on BFD_HAVE_SYS_PROCFS_TYPE.
7217 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7218 * configure: Regenerate.
7219 * config.in: Likewise.
7220
72212012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7222
7223 * Makefile.in (clean): Also remove x32.c x32-linux.c
7224 x32-avx.c x32-avx-linux.c.
7225 (x32.o): New target.
7226 (x32.c): Likewise.
7227 (x32-linux.o): Likewise.
7228 (x32-linux.c): Likewise.
7229 (x32-avx.o): Likewise.
7230 (x32-avx.c): Likewise.
7231 (x32-avx-linux.o): Likewise.
7232 (x32-avx-linux.c): Likewise.
7233
7234 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7235 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7236 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7237 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7238 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7239 i386/x32-avx-linux.xml.
7240
7241 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7242 (init_registers_x32_avx_linux): Likwise.
7243 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7244 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7245
72462012-04-13 Pedro Alves <palves@redhat.com>
7247
7248 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7249 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7250 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7251 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7252 the sub-make.
7253
72542012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7255
7256 * linux-x86-low.c (compat_x32_clock_t): New.
7257 (compat_x32_siginfo_t): Likewise.
7258 (compat_x32_siginfo_from_siginfo): Likewise.
7259 (siginfo_from_compat_x32_siginfo): Likewise.
7260 (linux_is_elf64): Likewise.
7261 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7262 and siginfo_from_compat_x32_siginfo for x32.
7263 (x86_arch_setup): Set linux_is_elf64.
7264
72652012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7266
7267 PR gdb/13969
7268 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7269 e_machine field.
7270 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7271 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7272 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7273 compatible with process.
7274
72752012-04-12 Yao Qi <yao@codesourcery.com>
7276
7277 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7278 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7279 (install-only, install-info, clean): Handle sub dir gnulib.
7280 (all-lib, am--refresh): New targets.
7281 (memmem.o): Remove target.
7282 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7283 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7284 (AC_REPLACE_FUNCS): Remove memmem.
7285 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7286 (AC_OUTPUT): Generate Makefile in gnulib/.
7287 * aclocal.m4, config.in, configure: Regenerated.
7288
72892012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7290
7291 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7292
72932012-04-05 Pedro Alves <palves@redhat.com>
7294
7295 -Werror=strict-aliasing
7296
7297 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7298 pointer.
7299
73002012-04-04 Pedro Alves <palves@redhat.com>
7301
7302 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7303 (sparc_store_gregset_from_stack, sparc_store_gregset)
7304 (sparc_breakpoint_at): Fix formatting.
7305
73062012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7307
7308 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7309 are available.
7310 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7311 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7312 * config.in: Regenerate.
7313 * configure: Likewise.
7314
73152012-03-29 Pedro Alves <palves@redhat.com>
7316
7317 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7318 Correct ptrace arguments.
7319
73202012-03-28 Pedro Alves <palves@redhat.com>
7321
7322 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7323 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7324 (IA64_FR1_REGNUM): New defines.
7325 (ia64_fetch_register): New.
7326 (the_low_target): Install it.
7327 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7328 field.
7329 * linux-low.c (linux_fetch_registers): Try the
7330 the_low_target.fetch_register hook first.
7331
7332 * linux-arm-low.c (the_low_target): Adjust.
7333 * linux-bfin-low.c (the_low_target): Adjust.
7334 * linux-cris-low.c (the_low_target): Adjust.
7335 * linux-crisv32-low.c (the_low_target): Adjust.
7336 * linux-m32r-low.c (the_low_target): Adjust.
7337 * linux-m68k-low.c (the_low_target): Adjust.
7338 * linux-mips-low.c (the_low_target): Adjust.
7339 * linux-ppc-low.c (the_low_target): Adjust.
7340 * linux-s390-low.c (the_low_target): Adjust.
7341 * linux-sh-low.c (the_low_target): Adjust.
7342 * linux-sparc-low.c (the_low_target): Adjust.
7343 * linux-tic6x-low.c (the_low_target): Adjust.
7344 * linux-x86-low.c (the_low_target): Adjust.
7345 * linux-xtensa-low.c (the_low_target): Adjust.
7346
73472012-03-26 Pedro Alves <palves@redhat.com>
7348
7349 * server.c (handle_qxfer_libraries): Don't bail early if
7350 the_target->qxfer_libraries_svr4 is not NULL.
7351
73522012-03-26 Pedro Alves <palves@redhat.com>
7353
7354 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7355
73562012-03-23 Pedro Alves <palves@redhat.com>
7357
7358 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7359 "library-list-svr4" element's start tag when the the DSO list is
7360 empty.
7361
73622012-03-23 Pedro Alves <palves@redhat.com>
7363
7364 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7365 a variable whose type size is the same as the inferior's pointer
7366 size.
7367
73682012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7369
7370 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7371 struct siginfo.
7372 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7373 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7374 * linux-low.h: Include <signal.h>.
7375 (struct siginfo): Remove forward declaration.
7376 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7377 struct siginfo.
7378
73792012-03-21 Mike Frysinger <vapier@gentoo.org>
7380
7381 * .gitignore: Ignore more files.
7382
73832012-03-19 Pedro Alves <palves@redhat.com>
7384 Jan Kratochvil <jan.kratochvil@redhat.com>
7385
7386 * server.c (cont_thread, general_thread): Add describing comments.
7387 (start_inferior): Clear `cont_thread'.
7388 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7389 of a process.
7390
73912012-03-15 Yao Qi <yao@codesourcery.com>
7392
7393 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7394 handling to ...
7395 (cmd_qtdp): ... here.
7396
73972012-03-15 Yao Qi <yao@codesourcery.com>
7398
7399 * tracepoint.c (struct tracepoint_action_ops): New.
7400 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7401 (m_tracepoint_action_download): New.
7402 (r_tracepoint_action_download): New.
7403 (x_tracepoint_action_download): New.
7404 (l_tracepoint_action_download): New.
7405 (add_tracepoint_action): Install `action->ops' according type.
7406 (download_tracepoint_1): Move code `download' function pointer
7407 of various tracepoint_action_ops.
7408
74092012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7410
7411 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7412 linux_ptrace_attach_warnings.
7413
74142012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7415
7416 * Makefile.in (linux-ptrace.o): New.
7417 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7418 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7419 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7420 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7421 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7422 of these targets.
7423 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7424
74252012-03-08 Yao Qi <yao@codesourcery.com>
7426 Pedro Alves <palves@redhat.com>
7427
7428 Fix PR server/13392.
7429 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7430 offset of JMP insn.
7431 * tracepoint.c (remove_tracepoint): New.
7432 (cmd_qtdp): Call remove_tracepoint when failed to install.
7433
74342012-03-07 Pedro Alves <palves@redhat.com>
7435
7436 * linux-low.c (get_detach_signal): New.
7437 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7438 Pass on pending signals to PTRACE_DETACH. Check the result of the
7439 ptrace call.
7440 * server.c (program_signals, program_signals_p): New.
7441 (handle_general_set): Handle QProgramSignals.
7442 * server.h (program_signals, program_signals_p): Declare.
7443
74442012-03-05 Pedro Alves <palves@redhat.com>
7445 Jan Kratochvil <jan.kratochvil@redhat.com>
7446
7447 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7448 New comment why.
7449
74502012-03-03 Yao Qi <yao@codesourcery.com>
7451
7452 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7453 agent_look_up_symbols.
7454
74552012-03-03 Yao Qi <yao@codesourcery.com>
7456
7457 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7458 (linux-x86-low.o): Likewise.
7459 * server.h: Remove in_process_agent_loaded.
7460 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7461 common/agent.c.
7462 Update callers.
7463
74642012-03-03 Yao Qi <yao@codesourcery.com>
7465
7466 * tracepoint.c (gdb_agent_capability): New global.
7467 (in_process_agent_loaded_ust): Renamed to
7468 `in_process_agent_supports_ust'.
7469 Update callers.
7470 (in_process_agent_supports_ust): Call agent_capability_check.
7471 (clear_installed_tracepoints): Assert that agent supports
7472 agent.
7473
74742012-03-03 Yao Qi <yao@codesourcery.com>
7475
7476 * linux-low.c (linux_supports_agent): New.
7477 (linux_target_ops): Initialize field `supports_agent' with
7478 linux_supports_agent.
7479 * target.h (struct target_ops) <supports_agent>: New.
7480 (target_supports_agent): New macro.
7481 * server.c (handle_general_set): Handle packet 'QAgent'.
7482 (handle_query): Send `QAgent+'.
7483 * Makefile.in (server.o): Depends on agent.h.
7484
74852012-03-03 Yao Qi <yao@codesourcery.com>
7486
7487 * Makefile.in (OBS): Add agent.o.
7488 Add new rule for agent.o.
7489 Track dependence of tracepoint.c on agent.h.
7490 * tracepoint.c (run_inferior_command_1):
7491 (run_inferior_command): Call agent_run_command.
7492 (gdb_ust_connect_sync_socket): Deleted. Move it to
7493 common/agent.c.
7494 (resume_thread, stop_thread): Likewise.
7495 (gdb_ust_socket_init): Renamed to ...
7496 (gdb_agent_socket_init): ... New.
7497 (gdb_ust_thread): Renamed to ...
7498 (gdb_agent_helper_thread): ... New.
7499 (gdb_ust_init): Move some code to ...
7500 (gdb_agent_init): ... here. New.
7501 [HAVE_UST]: Call gdb_ust_init.
7502 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7503 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7504 * config.in, configure: Regenerated.
7505
75062012-03-02 Pedro Alves <palves@redhat.com>
7507
7508 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7509 * linux-low.c (struct simple_pid_list): New.
7510 (stopped_pids): New a struct simple_pid_list pointer.
7511 (add_to_pid_list, pull_pid_from_list): New.
7512 (handle_extended_wait): Don't assume the first signal new children
7513 report is SIGSTOP. Adjust call to pull_pid_from_list.
7514 (linux_wait_for_lwp): Adjust.
7515
75162012-03-02 Yao Qi <yao@codesourcery.com>
7517
7518 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7519 debug log.
7520
75212012-03-02 Yao Qi <yao@codesourcery.com>
7522
7523 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7524 `stop_pc' and `tpoint'. Update caller.
7525
75262012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7527
7528 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7529 * linux-low.c (use_linux_regsets): New macro.
7530 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7531 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7532 (linux_register_in_regsets): New function.
7533 (usr_fetch_inferior_registers): Skip registers covered by
7534 regsets.
7535 (usr_store_inferior_registers): Likewise.
7536 (usr_fetch_inferior_registers): New macro.
7537 (usr_store_inferior_registers): Likewise.
7538 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7539 (linux_store_registers): Likewise.
7540 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7541 prototype.
7542 (init_registers_mips64_dsp_linux): Likewise.
7543 (init_registers_mips_linux): New macro.
7544 (init_registers_mips_dsp_linux): Likewise.
7545 (mips_dsp_num_regs): Likewise.
7546 (DSP_BASE, DSP_CONTROL): New fallback macros.
7547 (mips_base_regs): New macro.
7548 (mips_regmap): Use it. Fix the size.
7549 (mips_dsp_regmap): New variable.
7550 (mips_dsp_regset_bitmap): Likewise.
7551 (mips_arch_setup): New function.
7552 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7553 than mips_regmap.
7554 (mips_cannot_store_register): Likewise.
7555 (the_low_target): Update .arch_setup, .num_regs and .regmap
7556 initializers. Add .regset_bitmap initializer.
7557 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7558 initializer.
7559 * linux-bfin-low.c (the_low_target): Likewise.
7560 * linux-cris-low.c (the_low_target): Likewise.
7561 * linux-crisv32-low.c (the_low_target): Likewise.
7562 * linux-ia64-low.c (the_low_target): Likewise.
7563 * linux-m32r-low.c (the_low_target): Likewise.
7564 * linux-m68k-low.c (the_low_target): Likewise.
7565 * linux-ppc-low.c (the_low_target): Likewise.
7566 * linux-s390-low.c (the_low_target): Likewise.
7567 * linux-sh-low.c (the_low_target): Likewise.
7568 * linux-sparc-low.c (the_low_target): Likewise.
7569 * linux-tic6x-low.c (the_low_target): Likewise.
7570 * linux-x86-low.c (the_low_target): Likewise.
7571 * linux-xtensa-low.c (the_low_target): Likewise.
7572 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7573 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7574 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7575 srv_xmlfiles.
7576 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7577 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7578
75792012-02-29 Yao Qi <yao@codesourcery.com>
7580 Pedro Alves <palves@redhat.com>
7581
7582 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7583 `step_over_finished' is true.
7584
75852012-02-27 Pedro Alves <palves@redhat.com>
7586
7587 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7588 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7589
75902012-02-27 Pedro Alves <palves@redhat.com>
7591
7592 PR server/9684
7593 * linux-low.c (pid_is_stopped): New.
7594 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7595
75962012-02-25 Luis Machado <lgustavo@codesourcery.com>
7597
7598 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7599 of conditions.
7600
76012012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7602
7603 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7604
76052012-02-24 Luis Machado <lgustavo@codesourcery>
7606
7607 * server.c (handle_query): Advertise support for target-side
7608 breakpoint condition evaluation.
7609 (process_point_options): New function.
7610 (process_serial_event): When inserting a breakpoint, check for
7611 a target-side condition that should be evaluated.
7612
7613 * mem-break.c: Include regcache.h and ax.h.
7614 (point_cond_list_t): New data structure.
7615 (breakpoint) <cond_list>: New field.
7616 (find_gdb_breakpoint_at): Make non-static.
7617 (delete_gdb_breakpoint_at): Clear any target-side
7618 conditions.
7619 (clear_gdb_breakpoint_conditions): New function.
7620 (add_condition_to_breakpoint): Likewise.
7621 (add_breakpoint_condition): Likewise.
7622 (gdb_condition_true_at_breakpoint): Likewise.
7623 (gdb_breakpoint_here): Return result directly instead
7624 of going through a local variable.
7625
7626 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7627 (clear_gdb_breakpoint_conditions): Likewise.
7628 (add_breakpoint_condition): Likewise.
7629 (gdb_condition_true_at_breakpoint): Likewise.
7630
7631 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7632 (need_step_over_p): Take target-side breakpoint condition into
7633 consideration.
7634
76352012-02-24 Luis Machado <lgustavo@codesourcery>
7636
7637 * server.h: Include tracepoint.h.
7638 (agent_mem_read, agent_get_trace_state_variable_value,
7639 agent_set_trace_state_variable_value,
7640 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7641 get_set_tsv_func_addr): New prototypes.
7642
7643 * ax.h: New include file.
7644 * ax.c: New source file.
7645
7646 * tracepoint.c: Include ax.h.
7647 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7648 agent_expr, eval_result_type): Move to ax.h.
7649 (parse_agent_expr): Rename to ...
7650 (gdb_parse_agent_expr): ... this, make it non-static and move
7651 to ax.h.
7652 (unparse_agent_expr) Rename to ...
7653 (gdb_unparse_agent_expr): ... this, make it non-static and move
7654 to ax.h.
7655 (eval_agent_expr): Rename to ...
7656 (eval_tracepoint_agent_expr): ... this.
7657 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7658 forward declarations.
7659 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7660 (agent_get_trace_state_variable_value): New function.
7661 (agent_set_trace_state_variable_value): New function.
7662 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7663 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7664 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7665 (condition_true_at_tracepoint): Likewise.
7666 (parse_agent_expr): Rename to ...
7667 (gdb_parse_agent_expr): ... this and move to ax.c.
7668 (unparse_agent_expr): Rename to ...
7669 (gdb_unparse_agent_expr): ... this and move to ax.c.
7670 (gdb_agent_op_name): Move to ax.c.
7671 (eval_agent_expr): Rename to ...
7672 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7673 and move to ax.c.
7674 (eval_tracepoint_agent_expr): New function.
7675 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7676 non-static.
7677 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7678 ax.c.
7679 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7680 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7681 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7682 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7683 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7684 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7685 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7686 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7687 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7688 (compile_bytecodes): Remove forward declaration.
7689 (is_goto_target): Move to ax.c.
7690 (compile_bytecodes): Move to ax.c and call
7691 agent_get_trace_state_variable_value (...) and
7692 agent_set_trace_state_variable_value (...).
7693
7694 * Makefile.in: Update ax.c and IPA dependencies.
7695
76962012-02-24 Pedro Alves <palves@redhat.com>
7697
7698 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7699 (cmd_bigqtbuffer_circular): ... this. Only handle
7700 'QTBuffer:circular:'.
7701 (handle_tracepoint_general_set): Adjust.
7702
77032012-02-16 Yao Qi <yao@codesourcery.com>
7704
7705 * inferiors.c: Move code to ...
7706 * dll.c: .... here. New.
7707 * server.h: Declare clear_dlls.
7708 * Makefile.in (SFILES): Add dll.c.
7709 (OBS): Add dll.o
7710 (dll.o): New rule.
7711
77122012-02-11 Yao Qi <yao@codesourcery.com>
7713
7714 * server.c: (handle_monitor_command): Add a new parameter
7715 `own_buf'.
7716 (handle_query): Update caller.
7717
77182012-02-09 Joel Brobecker <brobecker@adacore.com>
7719
7720 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7721 * configure, config.in: Regenerate.
7722 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7723 is not defined.
7724
77252012-02-02 Pedro Alves <palves@redhat.com>
7726
7727 Try SIGKILL first, then PTRACE_KILL.
7728 * linux-low.c (linux_kill_one_lwp): New.
7729 (linux_kill_one_lwp): Rename to ...
7730 (kill_one_lwp_callback): ... this. Use the new
7731 linux_kill_one_lwp.
7732
77332012-02-02 Pedro Alves <palves@redhat.com>
7734
7735 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7736 inferior.
7737
77382012-01-27 Pedro Alves <palves@redhat.com>
7739
7740 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7741 (elf_64_file_p): Make static.
7742 (linux_pid_exe_is_elf_64_file): New.
7743 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7744 Delete declarations.
7745 (linux_pid_exe_is_elf_64_file): Declare.
7746 * linux-x86-low.c (x86_arch_setup): Use
7747 linux_pid_exe_is_elf_64_file.
7748
77492012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7750
7751 * linux-low.c (linux_wait_for_event_1): Rename to ...
7752 (linux_wait_for_event): ... here and merge it with former
7753 linux_wait_for_event - new variable wait_ptid, use it.
7754 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7755
77562012-01-23 Pedro Alves <palves@redhat.com>
7757
7758 * server.c (main): Avoid yet another case of infinite loop while
7759 detaching/killing after a longjmp.
7760
77612012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7762
7763 Code cleanup.
7764 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7765
77662012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7767
7768 * hostio.c (handle_readlink): New function.
7769 (handle_vFile): Call it to handle "vFile:readlink" packets.
7770
77712012-01-20 Pedro Alves <palves@redhat.com>
7772 Ulrich Weigand <ulrich.weigand@linaro.org>
7773
7774 * server.c (handle_v_requests): Only support vAttach and vRun to
7775 start multiple processes when in extended protocol mode.
7776
77772012-01-17 Pedro Alves <palves@redhat.com>
7778
7779 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7780 memalign plus mprotect to allocate the scratch buffer.
7781
77822012-01-13 Pedro Alves <palves@redhat.com>
7783
7784 * server.c (attach_inferior): Clear `cont_thread'.
7785
77862012-01-13 Pedro Alves <palves@redhat.com>
7787
7788 * server.c (main): Avoid infinite loop while detaching/killing
7789 after a longjmp.
7790
77912012-01-09 Doug Evans <dje@google.com>
7792
7793 * server.c (start_inferior): Set last_ptid in --wrapper case.
7794
77952012-01-06 Yao Qi <yao@codesourcery.com>
7796
7797 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7798 defined.
7799 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7800
78012012-01-04 Yao Qi <yao@codesourcery.com>
7802
7803 * tracepoint.c (cmd_qtdp): Print debug message
7804 for static tracepoint.
7805
78062012-01-04 Yao Qi <yao@codesourcery.com>
7807
7808 * tracepoint.c (trace_vdebug): Differentiate debug message
7809 between gdbserver and IPA.
7810
78112012-01-03 Yao Qi <yao@codesourcery.com>
7812
7813 * tracepoint.c (tracepoint_was_hit): Don't collect for
7814 static tracepoint.
7815
78162012-01-02 Joel Brobecker <brobecker@adacore.com>
7817
7818 * terminal.h: Reformat copyright header.
7819
78202012-01-02 Joel Brobecker <brobecker@adacore.com>
7821
7822 * server.c (gdbserver_version): Update copyright year.
7823 * gdbreplay.c (gdbreplay_version): Likewise.
7824
78252011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7826
7827 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7828
7829 Revert:
7830 2011-12-18 Hui Zhu <teawater@gmail.com>
7831 * linux-low.c (linux_create_inferior): Save return value to ret.
7832
78332011-12-18 Hui Zhu <teawater@gmail.com>
7834
7835 * linux-low.c (linux_create_inferior): Save return value to ret.
7836
78372011-12-16 Doug Evans <dje@google.com>
7838
7839 * linux-low.c (linux_create_inferior): If stdio connection,
7840 redirect stdin from /dev/null, stdout to stderr.
7841 * remote-utils.c (remote_is_stdio): New static global.
7842 (remote_connection_is_stdio): New function.
7843 (remote_prepare): Handle stdio connection.
7844 (remote_open): Ditto.
7845 (remote_close): Don't close stdin for stdio connections.
7846 (read_prim,write_prim): New functions. Replace all calls to
7847 read/write to these.
7848 * server.c (main): Watch for "-" argument. Move call to
7849 remote_prepare before start_inferior.
7850 * server.h (STDIO_CONNECTION_NAME): New macro.
7851 (remote_connection_is_stdio): Declare.
7852
7853 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7854 in debugging output.
7855
78562011-12-15 Yao Qi <yao@codesourcery.com>
7857
7858 * tracepoint.c: Include sys/syscall.h.
7859 (gdb_ust_thread): Remove preprocessor conditional.
7860
78612011-12-14 Pedro Alves <pedro@codesourcery.com>
7862
7863 * linux-low.c (linux_detach_one_lwp): Call
7864 the_low_target.prepare_to_resume before detaching.
7865
78662011-12-14 Yao Qi <yao@codesourcery.com>
7867
7868 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7869 of write.
7870
78712011-12-14 Yao Qi <yao@codesourcery.com>
7872
7873 * i386-low.c (i386_low_stopped_data_address): Initialize local
7874 variable `control'.
7875
78762011-12-13 Pedro Alves <pedro@codesourcery.com>
7877
7878 PR remote/13492
7879
7880 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7881 DR_CONTROL unless necessary. Extend comments.
7882 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7883 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7884
78852011-12-13 Yao Qi <yao@codesourcery.com>
7886
7887 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7888 macros.
7889 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7890
78912011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7892
7893 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7894 Print new debug message for such case.
7895
78962011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7897
7898 Fix overlapping memcpy.
7899 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7900 the read_inferior_memory transfer.
7901 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7902 write_inferior_memory transfer.
7903 (set_fast_tracepoint_jump): New variable buf. Use it for the
7904 read_inferior_memory and write_inferior_memory transfers.
7905 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7906 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7907 Use it for the write_inferior_memory transfer.
7908 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7909 buffers.
7910
79112011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7912
7913 * linux-low.c (fetch_register, store_register): Make code
7914 consistent, fix formatting.
7915
79162011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7917
7918 * linux-low.c (usr_store_inferior_registers): Factor out code
7919 to handle individual registers into...
7920 (store_register): ... this new function.
7921
79222011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7923
7924 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7925 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7926 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7927 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7928 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7929 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7930 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7931 (srv_xmlfiles): Add new XML files.
7932
7933 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7934 and <sys/uio.h>.
7935 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7936 (init_registers_s390_linux32v1): Add prototype.
7937 (init_registers_s390_linux32v2): Likewise.
7938 (init_registers_s390_linux64v1): Likewise.
7939 (init_registers_s390_linux64v2): Likewise.
7940 (init_registers_s390x_linux64v1): Likewise.
7941 (init_registers_s390x_linux64v2): Likewise.
7942 (s390_num_regs): Increment to 52.
7943 (s390_regmap): Add orig_r2 register.
7944 (s390_num_regs_3264): Increment to 68.
7945 (s390_regmap_3264): Add orig_r2 register.
7946 (s390_collect_ptrace_register): Handle orig_r2 register.
7947 (s390_supply_ptrace_register): Likewise.
7948 (s390_fill_last_break): New function.
7949 (s390_store_last_break): Likewise.
7950 (s390_fill_system_call): New function.
7951 (s390_store_system_call): Likewise.
7952 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7953 register sets.
7954 (s390_check_regset): New function.
7955 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7956 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7957 Update target_regsets for available register sets.
7958
79592011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7960 Jan Kratochvil <jan.kratochvil@redhat.com>
7961
7962 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7963 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7964 New.
7965 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7966 * linux-low.h (struct process_info_private): New member r_debug.
7967 * server.c (handle_qxfer_libraries): Call
7968 the_target->qxfer_libraries_svr4.
7969 (handle_qxfer_libraries_svr4): New function.
7970 (qxfer_packets): New entry "libraries-svr4".
7971 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7972 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7973 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7974 PACKET_qXfer_libraries_svr4.
7975
79762011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7977
7978 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7979 PSW address/mask between 8-byte and 16-byte formats.
7980 (s390_supply_ptrace_register): Likewise.
7981 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7982 basic addressing mode bit.
7983
79842011-11-24 Stan Shebs <stan@codesourcery.com>
7985
7986 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7987
79882011-11-17 Stan Shebs <stan@codesourcery.com>
7989
7990 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7991 (tracing_start_time): New global.
7992 (tracing_stop_time): New global.
7993 (tracing_user_name): New global.
7994 (tracing_notes): New global.
7995 (tracing_stop_note): New global.
7996 (cmd_qtstart): Set traceframe_usage, start_time.
7997 (stop_tracing): Set stop_time.
7998 (cmd_qtstatus): Report additional status.
7999 (cmd_qtp): New function.
8000 (handle_tracepoint_query): Call it.
8001 (cmd_qtnotes): New function.
8002 (handle_tracepoint_general_set): Call it.
8003 (get_timestamp): Rename from tsv_get_timestamp.
8004
80052011-11-14 Stan Shebs <stan@codesourcery.com>
8006 Kwok Cheung Yeung <kcy@codesourcery.com>
8007
8008 * linux-x86-low.c (small_jump_insn): New.
8009 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8010 trampoline and error message, build a trampoline and issue a small
8011 jump instruction to it.
8012 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8013 trampoline and error message.
8014 (x86_get_min_fast_tracepoint_insn_len): New.
8015 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8016 * linux-low.h (struct linux_target_ops): Add arguments to
8017 install_fast_tracepoint_jump_pad operation, add new operation.
8018 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8019 arguments.
8020 (linux_get_min_fast_tracepoint_insn_len): New function.
8021 (linux_target_op): Add new operation.
8022 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8023 (gdb_trampoline_buffer_end): Ditto.
8024 (gdb_trampoline_buffer_error): Ditto.
8025 (struct ipa_sym_addresses): Add fields for new IPA variables.
8026 (symbol_list): Add entries for new IPA variables.
8027 (struct tracepoint): Add fields to hold the address range of the
8028 trampoline used by the tracepoint.
8029 (trampoline_buffer_head): New static variable.
8030 (trampoline_buffer_tail): Ditto.
8031 (claim_trampoline_space): New function.
8032 (have_fast_tracepoint_trampoline_buffer): New function.
8033 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8034 structure.
8035 (install_fast_tracepoint): Ditto, also add error buffer argument.
8036 (cmd_qtminftpilen): New function.
8037 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8038 (fast_tracepoint_from_trampoline_address): New function.
8039 (fast_tracepoint_collecting): Handle trampoline as part of jump
8040 pad space.
8041 (set_trampoline_buffer_space): New function.
8042 (initialize_tracepoint): Initialize new IPA variables.
8043 * target.h (struct target_ops): Add arguments to
8044 install_fast_tracepoint_jump_pad operation, add new
8045 get_min_fast_tracepoint_insn_len operation.
8046 (target_get_min_fast_tracepoint_insn_len): New.
8047 (install_fast_tracepoint_jump_pad): Add arguments.
8048 * server.h (IPA_BUFSIZ): Define.
8049 * linux-i386-ipa.c: Include extra header files.
8050 (initialize_fast_tracepoint_trampoline_buffer): New function.
8051 (initialize_low_tracepoint): Call it.
8052 * server.h (set_trampoline_buffer_space): Declare.
8053 (claim_trampoline_space): Ditto.
8054 (have_fast_tracepoint_trampoline_buffer): Ditto.
8055
80562011-11-14 Yao Qi <yao@codesourcery.com>
8057
8058 * server.c (handle_query): Handle InstallInTrace for qSupported.
8059 * tracepoint.c (add_tracepoint): Sort list.
8060 (install_tracepoint, download_tracepoint): New.
8061 (cmd_qtdp): Call them to install and download tracepoints.
8062 (sort_tracepoints): Removed.
8063 (cmd_qtstart): Update.
8064
80652011-11-14 Yao Qi <yao@codesourcery.com>
8066
8067 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8068 * mem-break.h: Declare.
8069 * tracepoint.c (cmd_qtstart): Move some code to ...
8070 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8071 New.
8072 (download_tracepoints): Move some code to ...
8073 (download_tracepoint_1): ... here. New.
8074
80752011-11-08 Yao Qi <yao@codesourcery.com>
8076
8077 * remote-utils.c (relocate_instruction): A comment fix.
8078
80792011-11-07 Joel Brobecker <brobecker@adacore.com>
8080
8081 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8082 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8083 dr_status_mirror and dr_control_mirror from debug_reg_state.
8084 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8085 (i386_initial_stuff): Remove use of deleted globals.
8086 (i386_get_thread_context, i386_set_thread_context,
8087 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8088 from debug_reg_state.
8089
80902011-11-05 Yao Qi <yao@codesourcery.com>
8091
8092 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8093 address as TPOINT's.
8094
80952011-11-02 Stan Shebs <stan@codesourcery.com>
8096
8097 * tracepoint.c (agent_mem_read_string): New function.
8098 (eval_agent_expr): Call it for tracenz.
8099 * server.c (handle_query): Report support for tracenz.
8100
81012011-11-02 Yao Qi <yao@codesourcery.com>
8102
8103 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8104
81052011-11-02 Yao Qi <yao@codesourcery.com>
8106
8107 * target.h: Fix a typo in comment.
8108
81092011-10-31 Pedro Alves <pedro@codesourcery.com>
8110
8111 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8112 clobber the breakpoints' shadows with fast tracepoint jumps.
8113 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8114 * target.c (write_inferior_memory): Also pass MYADDR down to
8115 check_mem_write.
8116
81172011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8118
8119 * configure.ac: Check support for personality routine.
8120 * configure: Regenerate.
8121 * config.in: Likewise.
8122 * linux-low.c: Include <sys/personality.h>.
8123 Define ADDR_NO_RANDOMIZE if necessary.
8124 (linux_create_inferior): Disable address space randomization when
8125 forking inferior, if requested.
8126 (linux_supports_disable_randomization): New function.
8127 (linux_target_ops): Install it.
8128 * server.h (disable_randomization): Declare.
8129 * server.c (disable_randomization): New global variable.
8130 (handle_general_set): Handle QDisableRandomization.
8131 (handle_query): Likewise for qSupported.
8132 (main): Support --disable-randomization and --no-disable-randomization
8133 command line arguments.
8134 * target.h (struct target_ops): Add supports_disable_randomization.
8135 (target_supports_disable_randomization): New macro.
8136
81372011-09-29 Mike Frysinger <vapier@gentoo.org>
8138
8139 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8140 ifdef check.
8141 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8142 [!PT_GETDSBT] (target_loadmap): New definition.
8143 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8144 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8145 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8146 and PT_GETDSBT to LINUX_LOADMAP.
8147 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8148 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8149
81502011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8151
8152 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8153 (arm_linux_hwbp_cap): New static variable.
8154 (arm_linux_get_hwbp_cap): Replace by ...
8155 (arm_linux_init_hwbp_cap): ... this new function.
8156 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8157 (arm_linux_get_hw_watchpoint_count): Likewise.
8158 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8159 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8160 (arm_prepare_to_resume): Use perror_with_name instead of error.
8161
81622011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8163
8164 * linux-arm-low.c: Include <signal.h>.
8165 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8166 (struct arm_linux_hwbp_cap): New data type.
8167 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8168 (struct arm_linux_hw_breakpoint): New data type.
8169 (MAX_BPTS, MAX_WPTS): Define.
8170 (struct arch_process_info, struct arch_lwp_info): New data types.
8171 (arm_linux_get_hwbp_cap): New function.
8172 (arm_linux_get_hw_breakpoint_count): Likewise.
8173 (arm_linux_get_hw_watchpoint_count): Likewise.
8174 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8175 (arm_hwbp_control_initialize): Likewise.
8176 (arm_hwbp_control_is_enabled): Likewise.
8177 (arm_hwbp_control_is_initialized): Likewise.
8178 (arm_hwbp_control_disable): Likewise.
8179 (arm_linux_hw_breakpoint_equal): Likewise.
8180 (arm_linux_hw_point_initialize): Likewise.
8181 (struct update_registers_data): New data structure.
8182 (update_registers_callback: New function.
8183 (arm_insert_point): Likewise.
8184 (arm_remove_point): Likewise.
8185 (arm_stopped_by_watchpoint): Likewise.
8186 (arm_stopped_data_address): Likewise.
8187 (arm_new_process): Likewise.
8188 (arm_new_thread): Likewise.
8189 (arm_prepare_to_resume): Likewise.
8190 (the_low_target): Register arm_insert_point, arm_remove_point,
8191 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8192 arm_new_thread, and arm_prepare_to_resume.
8193
81942011-09-15 Stan Shebs <stan@codesourcery.com>
8195
8196 * server.h (struct emit_ops): Add compare-goto fields.
8197 * tracepoint.c (gdb_agent_op_sizes): New table.
8198 (emit_eq_goto): New function.
8199 (emit_ne_goto): New function.
8200 (emit_lt_goto): New function.
8201 (emit_le_goto): New function.
8202 (emit_gt_goto): New function.
8203 (emit_ge_goto): New function.
8204 (is_goto_target): New function.
8205 (compile_bytecodes): Recognize special cases of compare-goto
8206 combinations and call specialized emitters for them.
8207 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8208 (amd64_emit_ne_goto): New function.
8209 (amd64_emit_lt_goto): New function.
8210 (amd64_emit_le_goto): New function.
8211 (amd64_emit_gt_goto): New function.
8212 (amd64_emit_ge_goto): New function.
8213 (amd64_emit_ops): Add the new functions.
8214 (i386_emit_eq_goto): New function.
8215 (i386_emit_ne_goto): New function.
8216 (i386_emit_lt_goto): New function.
8217 (i386_emit_le_goto): New function.
8218 (i386_emit_gt_goto): New function.
8219 (i386_emit_ge_goto): New function.
8220 (i386_emit_ops): Add the new functions.
8221
82222011-09-08 Stan Shebs <stan@codesourcery.com>
8223
8224 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8225 (i386_emit_epilogue): Restore %ebx.
8226
82272011-08-31 Jie Zhang <jzhang918@gmail.com>
8228
8229 * server.c (step_thread): Remove definition.
8230 (process_serial_event): Don't handle Hs.
8231 * server.h (step_thread): Remove declaration.
8232 * target.c (set_desired_inferior): Remove use of step_thread.
8233
82342011-08-24 Luis Machado <lgustavo@codesourcery.com>
8235
8236 * linux-low.c: Include linux-procfs.h.
8237 (linux_attach_lwp_1): Update comments.
8238 (linux_attach): Scan for existing threads when attaching to a
8239 process that is the tgid.
8240 * Makefile.in: Update dependencies.
8241
82422011-08-24 Luis Machado <lgustavo@codesourcery.com>
8243
8244 * configure.srv: Add linux-procfs.o dependencies.
8245
82462011-08-14 Yao Qi <yao@codesourcery.com>
8247
8248 * target.h (struct target_ops): Fix indent.
8249 * win32-low.c (win32_target_ops): Fix comment.
8250
82512011-08-14 Andrew Jenner <andrew@codesourcery.com>
8252 Yao Qi <yao@codesourcery.com>
8253
8254 * Makefile.in (clean): Remove tic6x-*.c files.
8255 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8256 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8257 (tic6x-c64xp-linux.c): Likewise.
8258 * configure.srv: Add support for tic6x-*-uclinux.
8259 * linux-tic6x-low.c: New.
8260 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8261
82622011-08-14 Andrew Stubbs <ams@codesourcery.com>
8263 Yao Qi <yao@codesourcery.com>
8264
8265 * target.h (struct target_ops): Add read_loadmap.
8266 * linux-low.c (struct target_loadseg): New type.
8267 (struct target_loadmap): New type.
8268 (linux_read_loadmap): New function.
8269 (linux_target_ops): Add linux_read_loadmap.
8270 * server.c (handle_query): Support qXfer:fdpic:read packet.
8271 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8272 to NULL.
8273
82742011-08-05 Eli Zaretskii <eliz@gnu.org>
8275
8276 * win32-low.c: Include <stdint.h>.
8277
82782011-07-22 Pedro Alves <pedro@codesourcery.com>
8279
8280 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8281 to the inferior here.
8282 (i386_remove_aligned_watchpoint): Ditto.
8283 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8284 fit part of the watchpoint in the debug registers.
8285 (i386_update_inferior_debug_regs): New.
8286 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8287 registers, and only update the inferior on success.
8288 (i386_low_remove_watchpoint): Ditto.
8289
82902011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8291
8292 * linux-low.c (compare_ints, unique, list_threads, show_process,
8293 linux_core_of_thread): Delete.
8294 (linux_target_ops): Change linux_core_of_thread to
8295 linux_common_core_of_thread.
8296 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8297 * utils.c (malloc_failure): Change type of argument.
8298 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8299 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8300 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8301 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8302 (IPA_OBJS): Add common-utils-ipa.o.
8303 (ptid_h, linux_osdata_h): New macros.
8304 (server_h): Add common/common-utils.h, common/xml-utils.h,
8305 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8306 common/ptid.h.
8307 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8308 ptid.o, buffer.o): New rules.
8309 (linux-low.o): Add common/linux-osdata.h as a dependency.
8310 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8311 * configure.ac: Add AC_HEADER_DIRENT check.
8312 * config.in: Regenerate.
8313 * configure: Regenerate.
8314 * remote-utils.c (xml_escape_text): Delete.
8315 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8316 buffer_xml_printf): Move to common/buffer.c.
8317 * server.c (main): Remove call to initialize_inferiors.
8318 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8319 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8320 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8321 internal_error, gdb_assert, gdb_assert_fail): Delete.
8322 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8323 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8324 common/buffer.h.
8325 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8326 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8327 initialize_inferiors): Delete.
8328
83292011-07-20 Pedro Alves <pedro@codesourcery.com>
8330
8331 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8332 symbol error.
8333
83342011-05-31 Pedro Alves <pedro@codesourcery.com>
8335
8336 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8337 assertion.
8338 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8339
83402011-05-26 Yao Qi <yao@codesourcery.com>
8341
8342 * Makefile.in (thread-db.o): Track dependence to
8343 common/gdb_thread_db.h.
8344 * thread-db.c: include gdb_thread_db.h from right place.
8345
83462011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8347
8348 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8349 __FILE__ and __LINE__ to internal_error.
8350
83512011-05-13 Doug Evans <dje@google.com>
8352
8353 * thread-db.c (try_thread_db_load_from_sdir): New function.
8354 (try_thread_db_load_from_dir): New function.
8355 (thread_db_load_search): Handle $sdir, ignore $pdir.
8356 Remove trying of system directories if search of
8357 libthread-db-search-path fails, that is now done via $sdir.
8358
83592011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8360
8361 * server.c (handle_query): Add EnableDisableTracepoints to the list
8362 of supported features.
8363 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8364 tracepoints.
8365 (cmd_qtenable_disable): New.
8366 (cmd_qtstart): Install tracepoints even if disabled.
8367 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8368 receiving a QTEnable or QTDisable packet.
8369 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8370 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8371 tracepoints.
8372 (gdb_probe): Skip data collection if static tracepoint is disabled.
8373
83742011-05-10 Doug Evans <dje@google.com>
8375
8376 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8377
83782011-05-04 Doug Evans <dje@google.com>
8379
8380 * linux-low.c (linux_join): Skip process lookup.
8381 * spu-low.c (spu_join): Ditto.
8382 * server.c (join_inferiors_callback): Delete.
8383 (process_serial_event): For 'D' packet (detach) call join_inferior
8384 directly.
8385
83862011-05-04 Joseph Myers <joseph@codesourcery.com>
8387
8388 * README: Don't mention xscale*-*-linux*.
8389 * configure.srv (xscale*-*-linux*): Don't handle target.
8390
83912011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8392
8393 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8394 casting pointers.
8395 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8396 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8397 (i386_emit_void_call_2): Likewise.
8398
83992011-04-26 Yao Qi <yao@codesourcery.com>
8400
8401 * linux-low.c: Move common macros to linux-ptrace.h.
8402 Include linux-ptrace.h.
8403 * Makefile.in (linux_ptrace_h): New.
8404 (linux-low.o): Depends on linux-ptrace.h.
8405
84062011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8407
8408 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8409 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8410 (remote_prepare): New function with most of the TCP code from ...
8411 (remote_open): ... here. Detect PORT here unconditionally. Move also
8412 setting transport_is_reliable.
8413 * server.c (run_once): New variable.
8414 (gdbserver_usage): Document it.
8415 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8416 the first run if RUN_ONCE.
8417 * server.h (run_once, remote_prepare): New declarations.
8418
84192011-04-19 Tom Tromey <tromey@redhat.com>
8420
8421 * win32-low.c (handle_load_dll): Remove duplicate "the".
8422
84232011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8424
8425 Remove support for old Cygwin 1.5 versions.
8426 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8427 function to avoid warning.
8428 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8429 warning.
8430
84312011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8432
8433 * gdbserver/server.h (Macro _): Define it if not available.
8434
84352011-03-14 Michael Snyder <msnyder@vmware.com>
8436
8437 * hostio.c (handle_close): Remove unnecessary null test.
8438
84392011-03-10 Joel Brobecker <brobecker@adacore.com>
8440
8441 * Makefile.in (maintainer-clean realclean distclean): Remove
8442 "make ... subdir_do" command.
8443
84442011-03-10 Michael Snyder <msnyder@vmware.com>
8445
8446 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8447
8448 * server.c (handle_v_run): Free alloced buffer on early return.
8449
84502011-03-09 Yao Qi <yao@codesourcery.com>
8451
8452 Revert:
8453 2011-03-04 Yao Qi <yao@codesourcery.com>
8454
8455 * Makefile.in: Remove GNU make feature --directory.
8456
8457 2011-03-05 Yao Qi <yao@codesourcery.com>
8458
8459 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8460 (subdir_do): New make target. Copied from gdb/Makefile.
8461 (maintainer-clean, realclean, distclean, clean): Call corresponding
8462 make targets in common/Makefile.
8463
8464 2011-02-11 Yao Qi <yao@codesourcery.com>
8465
8466 * configure.ac: Call AC_PROG_RANLIB.
8467 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8468 * configure: Regenerate.
8469
84702011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8471
8472 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8473
84742011-03-06 Yao Qi <yao@codesourcery.com>
8475
8476 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8477
84782011-03-05 Yao Qi <yao@codesourcery.com>
8479
8480 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8481 (subdir_do): New make target. Copied from gdb/Makefile.
8482 (maintainer-clean, realclean, distclean, clean): Call corresponding
8483 make targets in common/Makefile.
8484
84852011-03-04 Yao Qi <yao@codesourcery.com>
8486
8487 * Makefile.in: Remove GNU make feature --directory.
8488
84892011-03-04 Michael Snyder <msnyder@vmware.com>
8490
8491 * server.c (queue_stop_reply): Call xmalloc not malloc.
8492
84932011-03-02 Michael Snyder <msnyder@vmware.com>
8494
8495 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8496
84972011-02-28 Michael Snyder <msnyder@vmware.com>
8498
8499 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8500 (cmd_qtframe): Ditto.
8501 (cmd_qtbuffer): Ditto.
8502 (cmd_bigqtbuffer): Ditto.
8503
8504 * utils.c (decimal2str): Initialize 'width' to nine, then
8505 don't mess with it.
8506
85072011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8508
8509 * hostio.c (require_data): Free *data, not data.
8510
85112011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8512
8513 * hostio.c (require_data): Use free, not xfree.
8514
85152011-02-27 Michael Snyder <msnyder@vmware.com>
8516
8517 * server.c (handle_query): Discard unused value.
8518
8519 * hostio.c (require_data): Free malloc memory before returning
8520 error.
8521
85222011-02-26 Michael Snyder <msnyder@vmware.com>
8523
8524 * linux-low.c (list_threads): Call closedir for dirent.
8525
85262011-02-27 Michael Snyder <msnyder@vmware.com>
8527
8528 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8529 a case statement falls through.
8530
8531 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8532
8533 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8534 in comparison.
8535
85362011-02-26 Michael Snyder <msnyder@vmware.com>
8537
8538 * utils.c (decimal2str): Eliminate dead code and dead param.
8539 (pulongest): Drop dead param from call to decimal2str.
8540 (plongest): Ditto.
8541
85422011-02-24 Joel Brobecker <brobecker@adacore.com>
8543
8544 Revert the following patch (not approved yet):
8545 2011-02-21 Hui Zhu <teawater@gmail.com>
8546 * tracepoint.c (tp_printf): New function.
8547 (eval_agent_expr): Handle gdb_agent_op_printf.
8548
85492011-02-21 Hui Zhu <teawater@gmail.com>
8550
8551 * tracepoint.c (tp_printf): New function.
8552 (eval_agent_expr): Handle gdb_agent_op_printf.
8553
85542011-02-18 Tom Tromey <tromey@redhat.com>
8555
8556 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8557 (tracepoint.o): Likewise.
8558 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8559 (gdb_agent_op_names): Likewise.
8560
85612011-02-18 Tom Tromey <tromey@redhat.com>
8562
8563 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8564 gdb_agent_op_rot>: New constants.
8565 (gdb_agent_op_names): Add pick and roll.
8566 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8567 cases.
8568
85692011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8570
8571 * aclocal.m4: Regenerated with aclocal-1.11.1.
8572
85732011-02-14 Pedro Alves <pedro@codesourcery.com>
8574
8575 * server.c (handle_qxfer_traceframe_info): New.
8576 (qxfer_packets): Register "traceframe-info".
8577 (handle_query): Report support for qXfer:traceframe-info:read+.
8578 * tracepoint.c (match_blocktype): New.
8579 (traceframe_find_block_type): Rename to ...
8580 (traceframe_walk_blocks): ... this. Add callback filter argument,
8581 and use it.
8582 (traceframe_find_block_type): New, reimplemented on top of
8583 traceframe_walk_blocks.
8584 (build_traceframe_info_xml): New.
8585 (traceframe_read_info): New.
8586 * server.h (traceframe_read_info): Declare.
8587
85882011-02-11 Yao Qi <yao@codesourcery.com>
8589
8590 * configure.ac: Call AC_PROG_RANLIB.
8591 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8592 * configure: Regenerate.
8593
85942011-02-07 Pedro Alves <pedro@codesourcery.com>
8595
8596 * server.c (gdb_read_memory): Change return semantics to allow
8597 partial transfers.
8598 (handle_search_memory_1): Adjust.
8599 (process_serial_event) <'m' packet>: Handle partial transfers.
8600 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8601
86022011-01-28 Pedro Alves <pedro@codesourcery.com>
8603
8604 * regcache.c (init_register_cache): Initialize
8605 regcache->register_status.
8606 (free_register_cache): Release regcache->register_status.
8607 (regcache_cpy): Copy register_status.
8608 (registers_to_string): Print 'x's for unavailable registers.
8609 (supply_register): Mark the register's status valid or
8610 unavailable, depending on whether a buffer was passed in or not.
8611 (supply_register_zeroed): New.
8612 (supply_regblock): Mark the registers' status valid or
8613 unavailable, depending on whether a buffer was passed in or not.
8614 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8615 (struct regcache): New `register_status' field.
8616 (supply_register_zeroed): Declare.
8617 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8618 supply_register_zeroed, rather than passing a NULL buffer to
8619 supply_register.
8620 * tracepoint.c (fetch_traceframe_registers): Update comment.
8621
86222011-01-28 Pedro Alves <pedro@codesourcery.com>
8623
8624 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8625 buffer explicit.
8626
86272011-01-25 Pedro Alves <pedro@codesourcery.com>
8628
8629 * server.h (decode_xfer_write): Change prototype.
8630 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8631 and don't extract the annex here.
8632 * server.c (decode_xfer_read): Remove `annex' parameter,
8633 and don't extract the annex here.
8634 (decode_xfer): New.
8635 (struct qxfer): New.
8636 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8637 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8638 (handle_qxfer_statictrace): New functions, abstracted out from
8639 handle_query, and made to use the struct qxfer interface.
8640 (handle_threads_qxfer_proper): Rename to ...
8641 (handle_qxfer_threads_proper): ... this.
8642 (handle_threads_qxfer): Rename to ...
8643 (handle_qxfer_threads): ... this. Adjust.
8644 (qxfer_packets): New array.
8645 (handle_qxfer): New function.
8646 (handle_query): Use handle_qxfer.
8647
86482011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8649
8650 * gdbreplay.c: Shorten lines of >= 80 columns.
8651 * linux-low.c: Ditto.
8652 * linux-ppc-low.c: Ditto.
8653 * linux-s390-low.c: Ditto.
8654 * linux-sparc-low.c: Ditto.
8655 * linux-x86-low.c: Ditto.
8656 * linux-xtensa-low.c: Ditto.
8657 * mem-break.c: Ditto.
8658 * nto-low.c: Ditto.
8659 * regcache.h: Ditto.
8660 * remote-utils.c: Ditto.
8661 * server.c: Ditto.
8662 * server.h: Ditto.
8663 * thread-db.c: Ditto.
8664 * tracepoint.c: Ditto.
8665 * utils.c: Ditto.
8666 * win32-low.h: Ditto.
8667
86682011-01-05 Joel Brobecker <brobecker@adacore.com>
8669
8670 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8671 update.
8672
86732011-01-01 Joel Brobecker <brobecker@adacore.com>
8674
8675 * server.c (gdbserver_version): Update copyright year in version
8676 output.
8677 * gdbreplay.c (gdbreplay_version): Ditto.
8678
86792010-12-29 Jie Zhang <jie.zhang@analog.com>
8680
8681 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8682 * linux-bfin-low.c: New file.
8683 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8684 PT_DATA_ADDR for BFIN targets.
8685 * Makefile.in (SFILES): Add linux-bfin-low.c.
8686 (clean): Remove reg-bfin.c.
8687 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8688 * README: Mention supported Blackfin targets.
8689
86902010-12-23 Mike Frysinger <vapier@gentoo.org>
8691
8692 * .gitignore: New file.
8693
86942010-11-16 Mike Frysinger <vapier@gentoo.org>
8695
8696 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8697
86982010-10-22 Jie Zhang <jie@codesourcery.com>
8699
8700 * Makefile.in: Add FLAGS_TO_PASS variable.
8701 (install): Remove dependency of install-only and recursively
8702 invoke make for install-only.
8703
87042010-10-04 Doug Evans <dje@google.com>
8705
8706 * Makefile.in (uninstall): Use $(DESTDIR).
8707
87082010-09-24 Pedro Alves <pedro@codesourcery.com>
8709
8710 PR gdb/11842
8711
8712 * linux-x86-low.c (compat_siginfo_from_siginfo)
8713 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8714 si_code is < 0. Check for si_code == SI_TIMER before checking for
8715 si_code < 0.
8716
87172010-09-13 Joel Brobecker <brobecker@adacore.com>
8718
8719 * lynx-i386-low.c: New file.
8720 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8721
87222010-09-13 Joel Brobecker <brobecker@adacore.com>
8723
8724 * lynx-low.c (ptrace_request_to_str): Remove handling for
8725 request values that have been removed in LynxOS 5.x.
8726
87272010-09-13 Joel Brobecker <brobecker@adacore.com>
8728
8729 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8730 <ptrace.h>
8731
87322010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8733
8734 * configure.ac: Add --enable-inprocess-agent option.
8735 * configure: Rebuilt.
8736
87372010-09-06 Yao Qi <yao@codesourcery.com>
8738
8739 * linux-low.c (linux_kill): Remove unused variable.
8740 (linux_stabilize_threads): Likewise.
8741 * server.c (start_inferior): Likewise.
8742 (queue_stop_reply_callback): Likewise.
8743 * tracepoint.c (do_action_at_tracepoint): Likewise.
8744
87452010-09-06 Yao Qi <yao@codesourcery.com>
8746
8747 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8748 on return.
8749
87502010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8751
8752 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8753
87542010-09-06 Pedro Alves <pedro@codesourcery.com>
8755
8756 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8757 "$(IPA_DEPFILES)".
8758
87592010-09-01 Joel Brobecker <brobecker@adacore.com>
8760
8761 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8762 gdbserver/lynx-ppc-low.c: New files.
8763 * Makefile.in (lynx_low_h): New variable.
8764 (lynx-low.o, lynx-ppc-low.o): New rules.
8765 * configure.ac: On LynxOS, link with -lnetinet.
8766 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8767 * configure: regenerate.
8768
87692010-09-01 Joel Brobecker <brobecker@adacore.com>
8770
8771 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8772 * configure.ac: Add check for vasprintf and vsnprintf.
8773 * configure, config.in: Regenerate.
8774 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8775
87762010-09-01 Joel Brobecker <brobecker@adacore.com>
8777
8778 * gdbreplay.c: Move include of alloca.h up, next to include of
8779 malloc.h.
8780 * server.h: Add include of malloc.h.
8781 * mem-break.c: Remove include of malloc.h.
8782 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8783
87842010-09-01 Joel Brobecker <brobecker@adacore.com>
8785
8786 * Makefile.in (memmem.o): Build with -Wno-error.
8787
87882010-09-01 Joel Brobecker <brobecker@adacore.com>
8789
8790 * utils.c (xsnprintf): Make non-static.
8791 * server.h: Add xsnprintf declaration.
8792 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8793 replace calls to snprintf by calls to xsnprintf throughout.
8794
87952010-09-01 Joel Brobecker <brobecker@adacore.com>
8796
8797 * configure.ac: Add configure check for alloca.
8798 * configure, config.in: Regenerate.
8799 * server.h: Include alloca.h if it exists.
8800 * gdbreplay.c: Include alloca.h if it exists.
8801
88022010-08-28 Pedro Alves <pedro@codesourcery.com>
8803
8804 * linux-low.c (__SIGRTMIN): Define if not already defined.
8805 (linux_create_inferior): Check for __ANDROID__ rather than
8806 __SIGRTMIN.
8807 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8808 are already deferred.
8809 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8810 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8811 stopped and already has a pending signal to report.
8812 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8813 a pending signal to report or is moving out of a jump pad.
8814 (linux_init_signals): Check for __ANDROID__ rather than
8815 __SIGRTMIN.
8816
88172010-08-28 Pedro Alves <pedro@codesourcery.com>
8818
8819 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8820 debug_threads check. Avoid a linear search when not doing debug
8821 output.
8822
88232010-08-27 Pedro Alves <pedro@codesourcery.com>
8824
8825 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8826 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8827 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8828 (process_event): Change local fd's type to gdb_fildes_t.
8829 (create_file_handler): Adjust prototype.
8830 (delete_file_handler): Adjust prototype.
8831 (handle_file_event): Adjust prototype. Use pfildes.
8832 (create_file_event): Adjsut prototype.
8833 * remote-utils.c (remote_desc, listen_desc): Change type to
8834 gdb_fildes_t.
8835 * server.h: New gdb_fildes_t typedef.
8836 [USE_WIN32API]: Include winsock2.h.
8837 (delete_file_handler, add_file_handler): Adjust prototypes.
8838 (pfildes): Declare.
8839 * utils.c (pfildes): New.
8840
88412010-08-27 Pedro Alves <pedro@codesourcery.com>
8842
8843 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8844 * configure: Regenerate.
8845
88462010-08-27 Pedro Alves <pedro@codesourcery.com>
8847
8848 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8849 (linux_done_accessing_memory): ... this.
8850 (linux_target_ops): Adjust.
8851 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8852 * nto-low.c (nto_target_ops): Adjust comment.
8853 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8854 * spu-low.c (spu_target_ops): Adjust comment.
8855 * target.h (target_ops): Rename unprepare_to_access_memory field
8856 to done_accessing_memory.
8857 (unprepare_to_access_memory): Rename to ...
8858 (done_accessing_memory): ... this.
8859
88602010-08-26 Pedro Alves <pedro@codesourcery.com>
8861
8862 * linux-low.c (linux_prepare_to_access_memory): New.
8863 (linux_unprepare_to_access_memory): New.
8864 (linux_target_ops): Install them.
8865 * server.c (read_memory): Rename to ...
8866 (gdb_read_memory): ... this. Use
8867 prepare_to_access_memory/prepare_to_access_memory.
8868 (write_memory): Rename to ...
8869 (gdb_write_memory): ... this. Use
8870 prepare_to_access_memory/prepare_to_access_memory.
8871 (handle_search_memory_1): Adjust.
8872 (process_serial_event): Adjust.
8873 * target.h (struct target_ops): New fields
8874 prepare_to_access_memory and unprepare_to_access_memory.
8875 (prepare_to_access_memory, unprepare_to_access_memory): New.
8876 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8877 prepare_to_access_memory/prepare_to_access_memory.
8878 * nto-low.c (nto_target_ops): Adjust.
8879 * spu-low.c (spu_target_ops): Adjust.
8880 * win32-low.c (win32_target_ops): Adjust.
8881
88822010-08-26 Pedro Alves <pedro@codesourcery.com>
8883
8884 * Makefile.in (WARN_CFLAGS): Get it from configure.
8885 (WERROR_CFLAGS): New.
8886 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8887 * configure.ac: Introduce --enable-werror, which adds -Werror to
8888 the compiler command line. Enabled by default. Disable with
8889 --disable-werror. Add -Wdeclaration-after-statement
8890 Wpointer-arith and -Wformat-nonliteral to warning flags.
8891 * configure: Regenerate.
8892
88932010-08-26 Pedro Alves <pedro@codesourcery.com>
8894
8895 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8896
88972010-08-26 Pedro Alves <pedro@codesourcery.com>
8898
8899 * gdbreplay.c (remote_error): New.
8900 (gdbchar): New.
8901 (expect): Use gdbchar. Check for error reading from GDB.
8902 Clarify sync error output.
8903 (play): Check for errors writing to GDB.
8904 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8905 * remote-utils.c (getpkt): Check for errors writing to the remote
8906 descriptor.
8907
89082010-08-25 Pedro Alves <pedro@codesourcery.com>
8909
8910 * linux-low.c (linux_wait_1): Move non-debugging code out of
8911 `debug_threads' control.
8912
89132010-08-25 Pedro Alves <pedro@codesourcery.com>
8914
8915 * linux-low.c (linux_wait_1): Don't set last_status here.
8916 * server.c (push_event, queue_stop_reply_callback): Assert we're
8917 not pushing a TARGET_WAITKIND_IGNORE event.
8918 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8919 (myresume, handle_target_event): Set the thread's last_resume_kind
8920 and last_status from the target returned status.
8921
89222010-08-25 Pedro Alves <pedro@codesourcery.com>
8923
8924 PR threads/10729
8925
8926 * linux-x86-low.c (update_debug_registers_callback): New.
8927 (i386_dr_low_set_addr): Use it.
8928 (i386_dr_low_get_addr): New.
8929 (i386_dr_low_set_control): Use update_debug_registers_callback.
8930 (i386_dr_low_get_control): New.
8931 (i386_dr_low_get_status): Adjust.
8932 * linux-low.c (linux_stop_lwp): New.
8933 * linux-low.h (linux_stop_lwp): Declare.
8934
8935 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8936 argument instead of a i386_debug_reg_state.
8937 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8938 a i386_debug_reg_state.
8939 (i386_insert_aligned_watchpoint): Adjust.
8940 (i386_remove_aligned_watchpoint): Adjust.
8941 (i386_low_stopped_data_address): Read the debug registers from the
8942 inferior instead of from the mirrors.
8943 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8944 (i386_dr_low_get_addr): Declare.
8945 (i386_dr_low_get_control): Declare.
8946 (i386_dr_low_get_status): Change prototype.
8947
8948 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8949 (i386_dr_low_get_addr): New.
8950 (i386_dr_low_get_control): New.
8951 (i386_dr_low_get_status): Adjust prototype. Return
8952 dr_status_mirror.
8953 (i386_initial_stuff): Clear dr_status_mirror and
8954 dr_control_mirror.
8955 (i386_get_thread_context): Adjust.
8956 (i386_set_thread_context): Adjust.
8957 (i386_thread_added): Adjust.
8958
89592010-08-24 Pedro Alves <pedro@codesourcery.com>
8960
8961 * linux-low.h (linux_thread_area): Delete declaration.
8962
89632010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8964
8965 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8966 after its termination.
8967
89682010-08-09 Pedro Alves <pedro@codesourcery.com>
8969
8970 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8971 (gdb_wants_all_stopped): Delete.
8972 (linux_wait_1): Don't call them.
8973 * server.c (handle_v_cont): Tag all threads as want-stopped.
8974 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8975 stopped as "client-wants-stopped".
8976
89772010-07-31 Pedro Alves <pedro@codesourcery.com>
8978
8979 * Makefile.in (signals_h): New.
8980 (server_h): Depend on it.
8981 (server.o): Don't depend on $(signals_def).
8982 (signals.o): Depend on $(signals_def).
8983
89842010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8985
8986 * Makefile.in (signals_def): New.
8987 (server_h): Append include/gdb/signals.h and signals_def.
8988 (server.o): Append signals_def.
8989
89902010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8991
8992 * server.c (handle_target_event): Use target_signal_to_host for
8993 resume_info.sig initialization.
8994 * target.h (struct thread_resume) <sig>: New comment.
8995
89962010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8997
8998 * server.c (handle_query): strcpy() the returned string from paddress()
8999 instead of sprintf().
9000 * utils.c (paddress): Return phex_nz().
9001
90022010-07-07 Joel Brobecker <brobecker@adacore.com>
9003
9004 * server.c (handle_v_cont): Call mourn_inferior if process
9005 just exited.
9006 (myresume): Likewise.
9007
90082010-07-01 Pedro Alves <pedro@codesourcery.com>
9009
9010 Static tracepoints, and integration with UST.
9011
9012 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9013 * mem-break.c (uninsert_all_breakpoints)
9014 (reinsert_all_breakpoints): New.
9015 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9016 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9017 (gdb_agent_ust_loaded, helper_thread_id)
9018 (gdb_agent_helper_thread_id): New macros.
9019 (struct ipa_sym_addresses): Add addr_ust_loaded,
9020 addr_helper_thread_id, addr_cmd_buf.
9021 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9022 (in_process_agent_loaded_ust): New.
9023 (write_e_ust_not_loaded): New.
9024 (maybe_write_ipa_ust_not_loaded): New.
9025 (struct collect_static_trace_data_action): New.
9026 (enum tracepoint_type) <static_tracepoint>: New.
9027 (struct tracepoint) <handle>: Mention static tracepoints.
9028 (struct static_tracepoint_ctx): New.
9029 (CMD_BUF_SIZE): New.
9030 (add_tracepoint_action): Handle static tracepoint actions.
9031 (unprobe_marker_at): New.
9032 (clear_installed_tracepoints): Handle static tracepoints.
9033 (cmd_qtdp): Handle static tracepoints.
9034 (probe_marker_at): New.
9035 (cmd_qtstart): Handle static tracepoints.
9036 (response_tracepoint): Handle static tracepoints.
9037 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9038 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9039 (get_context_regcache): Handle static tracepoints.
9040 (do_action_at_tracepoint): Handle static tracepoint actions.
9041 (traceframe_find_block_type): Handle static trace data blocks.
9042 (traceframe_read_sdata): New.
9043 (download_tracepoints): Download static tracepoint actions.
9044 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9045 (GDB_PROBE_NAME): New.
9046 (ust_ops): New.
9047 (GET_UST_SYM): New.
9048 (USTF): New.
9049 (dlsym_ust): New.
9050 (ust_marker_to_static_tracepoint): New.
9051 (gdb_probe): New.
9052 (collect_ust_data_at_tracepoint): New.
9053 (gdb_ust_probe): New.
9054 (UNIX_PATH_MAX, SOCK_DIR): New.
9055 (gdb_ust_connect_sync_socket): New.
9056 (resume_thread, stop_thread): New.
9057 (run_inferior_command): New.
9058 (init_named_socket): New.
9059 (gdb_ust_socket_init): New.
9060 (cstr_to_hexstr): New.
9061 (next_st): New.
9062 (first_marker, next_marker): New.
9063 (response_ust_marker): New.
9064 (cmd_qtfstm, cmd_qtsstm): New.
9065 (unprobe_marker_at, probe_marker_at): New.
9066 (cmd_qtstmat, gdb_ust_thread): New.
9067 (gdb_ust_init): New.
9068 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9069 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9070 (ST_REGENTRY): New.
9071 (x86_64_st_collect_regmap): New.
9072 (X86_64_NUM_ST_COLLECT_GREGS): New.
9073 (AMD64_RIP_REGNUM): New.
9074 (supply_static_tracepoint_registers): New.
9075 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9076 (ST_REGENTRY): New.
9077 (i386_st_collect_regmap): New.
9078 (i386_NUM_ST_COLLECT_GREGS): New.
9079 (supply_static_tracepoint_registers): New.
9080 * server.c (handle_query): Handle qXfer:statictrace:read.
9081 <qSupported>: Report support for StaticTracepoints, and
9082 qXfer:statictrace:read features.
9083 * server.h (traceframe_read_sdata)
9084 (supply_static_tracepoint_registers): Declare.
9085 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9086 (unpack_varlen_hex): Include in IPA build.
9087 * Makefile.in (ustlibs, ustinc): New.
9088 (IPA_OBJS): Add remote-utils-ipa.o.
9089 ($(IPA_LIB)): Link -ldl and -lpthread.
9090 (UST_CFLAGS): New.
9091 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9092 * config.in, configure: Regenerate.
9093
90942010-06-20 Ian Lance Taylor <iant@google.com>
9095 Pedro Alves <pedro@codesourcery.com>
9096
9097 * linux-x86-low.c (always_true): Delete.
9098 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9099 trying to fool the compiler with always_true.
9100
91012010-06-20 Pedro Alves <pedro@codesourcery.com>
9102
9103 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9104 conditions in gdbserver.
9105
91062010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9107
9108 * spu-low.c (spu_read_memory): Wrap around local store limit.
9109 (spu_write_memory): Likewise.
9110
91112010-06-15 Pedro Alves <pedro@codesourcery.com>
9112
9113 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9114 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9115 LONGEST uses.
9116 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9117 uses.
9118 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9119 uses with LONGEST uses.
9120
91212010-06-14 Stan Shebs <stan@codesourcery.com>
9122 Pedro Alves <pedro@codesourcery.com>
9123
9124 Bytecode compiler.
9125
9126 * linux-x86-low.c: Include limits.h.
9127 (add_insns): New.
9128 (always_true): New.
9129 (EMIT_ASM): New.
9130 (EMIT_ASM32): New.
9131 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9132 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9133 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9134 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9135 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9136 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9137 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9138 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9139 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9140 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9141 (amd64_emit_void_call_2): New.
9142 (amd64_emit_ops): New.
9143 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9144 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9145 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9146 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9147 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9148 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9149 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9150 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9151 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9152 (i386_emit_stack_adjust, i386_emit_int_call_1)
9153 (i386_emit_void_call_2): New.
9154 (i386_emit_ops): New.
9155 (x86_emit_ops): New.
9156 (the_low_target): Install x86_emit_ops.
9157 * server.h (struct emit_ops): New.
9158 (get_raw_reg_func_addr): Declare.
9159 (current_insn_ptr, emit_error): Declare.
9160 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9161 (set_trace_state_variable_value): New defines.
9162 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9163 addr_get_trace_state_variable_value and
9164 addr_set_trace_state_variable_value.
9165 (symbol_list): New fields for get_raw_reg,
9166 get_trace_state_variable_value and set_trace_state_variable_value.
9167 (condfn): New typedef.
9168 (struct tracepoint): New field `compiled_cond'.
9169 (do_action_at_tracepoint): Clear compiled_cond.
9170 (get_trace_state_variable_value, set_trace_state_variable_value):
9171 Export in the IPA.
9172 (condition_true_at_tracepoint): If there's a compiled condition,
9173 run that.
9174 (current_insn_ptr, emit_error): New globals.
9175 (struct bytecode_address): New.
9176 (get_raw_reg_func_addr): New.
9177 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9178 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9179 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9180 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9181 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9182 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9183 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9184 (compile_tracepoint_condition, compile_bytecodes): New.
9185 * target.h (emit_ops): Forward declare.
9186 (struct target_ops): New field emit_ops.
9187 (target_emit_ops): New.
9188 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9189 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9190 * linux-low.c (linux_emit_ops): New.
9191 (linux_target_ops): Install it.
9192 * linux-low.h (struct linux_target_ops): New field emit_ops.
9193
91942010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9195
9196 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9197 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9198
91992010-06-01 Pedro Alves <pedro@codesourcery.com>
9200 Stan Shebs <stan@codesourcery.com>
9201
9202 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9203 (all): Depend on $(extra_libraries).
9204 (install-only): Install the IPA.
9205 (IPA_OBJS, IPA_LIB): New.
9206 (clean): Remove the IPA lib.
9207 (IPAGENT_CFLAGS): New.
9208 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9209 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9210 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9211 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9212 * configure.ac: Check for atomic builtins support in the compiler.
9213 (IPA_DEPFILES, extra_libraries): Define.
9214 * configure.srv (ipa_obj): Add description.
9215 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9216 (i[34567]86-*-linux*): Set ipa_obj.
9217 (x86_64-*-linux*): Set ipa_obj.
9218 * linux-low.c (stabilizing_threads): New.
9219 (supports_fast_tracepoints): New.
9220 (linux_detach): Stabilize threads before detaching.
9221 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9222 the lwp is either not stabilizing, or is moving out of a jump pad.
9223 (linux_fast_tracepoint_collecting): New.
9224 (maybe_move_out_of_jump_pad): New.
9225 (enqueue_one_deferred_signal): New.
9226 (dequeue_one_deferred_signal): New.
9227 (linux_wait_for_event_1): If moving out of a jump pad, defer
9228 pending signals to later.
9229 (linux_stabilize_threads): New.
9230 (linux_wait_1): Check if threads need moving out of jump pads, and
9231 do it if so.
9232 (stuck_in_jump_pad_callback): New.
9233 (move_out_of_jump_pad_callback): New.
9234 (lwp_running): New.
9235 (linux_resume_one_lwp): Handle moving out of jump pads.
9236 (linux_set_resume_request): Dequeue deferred signals.
9237 (need_step_over_p): Also step over fast tracepoint jumps.
9238 (start_step_over): Also uninsert fast tracepoint jumps.
9239 (finish_step_over): Also reinsert fast tracepoint jumps.
9240 (linux_install_fast_tracepoint_jump): New.
9241 (linux_target_ops): Install linux_stabilize_threads and
9242 linux_install_fast_tracepoint_jump_pad.
9243 * linux-low.h (linux_target_ops) <get_thread_area,
9244 install_fast_tracepoint_jump_pad>: New fields.
9245 (struct lwp_info) <collecting_fast_tracepoint,
9246 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9247 (linux_get_thread_area): Declare.
9248 * linux-x86-low.c (jump_insn): New.
9249 (x86_get_thread_area): New.
9250 (append_insns): New.
9251 (push_opcode): New.
9252 (amd64_install_fast_tracepoint_jump_pad): New.
9253 (i386_install_fast_tracepoint_jump_pad): New.
9254 (x86_install_fast_tracepoint_jump_pad): New.
9255 (the_low_target): Install x86_get_thread_area and
9256 x86_install_fast_tracepoint_jump_pad.
9257 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9258 (struct fast_tracepoint_jump): New.
9259 (fast_tracepoint_jump_insn): New.
9260 (fast_tracepoint_jump_shadow): New.
9261 (find_fast_tracepoint_jump_at): New.
9262 (fast_tracepoint_jump_here): New.
9263 (delete_fast_tracepoint_jump): New.
9264 (set_fast_tracepoint_jump): New.
9265 (uninsert_fast_tracepoint_jumps_at): New.
9266 (reinsert_fast_tracepoint_jumps_at): New.
9267 (set_breakpoint_at): Use write_inferior_memory.
9268 (uninsert_raw_breakpoint): Use write_inferior_memory.
9269 (check_mem_read): Mask out fast tracepoint jumps.
9270 (check_mem_write): Mask out fast tracepoint jumps.
9271 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9272 (set_fast_tracepoint_jump): Declare.
9273 (delete_fast_tracepoint_jump)
9274 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9275 (reinsert_fast_tracepoint_jumps_at): Declare.
9276 * regcache.c: Don't compile many functions when building the
9277 in-process agent library.
9278 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9279 the register buffer in the heap.
9280 (free_register_cache): If the register buffer isn't owned by the
9281 regcache, don't free it.
9282 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9283 pre-existing register caches.
9284 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9285 type.
9286 (convert_ascii_to_int): : Constify `from' parameter type.
9287 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9288 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9289 the needed buffer in-place.
9290 (relocate_instruction): New.
9291 * server.c (handle_query) <qSymbols>: If the target supports
9292 tracepoints, give it a chance of looking up symbols. Report
9293 support for fast tracepoints.
9294 (handle_status): Stabilize threads.
9295 (process_serial_event): Adjust.
9296 * server.h (struct fast_tracepoint_jump): Forward declare.
9297 (struct process_info) <fast_tracepoint_jumps>: New field.
9298 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9299 (decode_X_packet, decode_M_packet): Adjust.
9300 (relocate_instruction): Declare.
9301 (in_process_agent_loaded): Declare.
9302 (tracepoint_look_up_symbols): Declare.
9303 (struct fast_tpoint_collect_status): Declare.
9304 (fast_tracepoint_collecting): Declare.
9305 (force_unlock_trace_buffer): Declare.
9306 (handle_tracepoint_bkpts): Declare.
9307 (initialize_low_tracepoint)
9308 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9309 * target.h (struct target_ops) <stabilize_threads,
9310 install_fast_tracepoint_jump_pad>: New fields.
9311 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9312 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9313 [HAVE_STDINT_H]: Include stdint.h.
9314 (trace_debug_1): Rename to ...
9315 (trace_vdebug): ... this.
9316 (trace_debug): Rename to ...
9317 (trace_debug_1): ... this. Add `level' parameter.
9318 (trace_debug): New.
9319 (ATTR_USED, ATTR_NOINLINE): New.
9320 (IP_AGENT_EXPORT): New.
9321 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9322 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9323 (about_to_request_buffer_space, trace_buffer_is_full)
9324 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9325 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9326 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9327 (traceframe_write_count, traceframes_created)
9328 (trace_state_variables)
9329 New renaming defines.
9330 (struct ipa_sym_addresses): New.
9331 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9332 (symbol_list): New.
9333 (ipa_sym_addrs): New.
9334 (all_tracepoint_symbols_looked_up): New.
9335 (in_process_agent_loaded): New.
9336 (write_e_ipa_not_loaded): New.
9337 (maybe_write_ipa_not_loaded): New.
9338 (tracepoint_look_up_symbols): New.
9339 (debug_threads) [IN_PROCESS_AGENT]: New.
9340 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9341 (UNKNOWN_SIDE_EFFECTS): New.
9342 (stop_tracing): New.
9343 (flush_trace_buffer): New.
9344 (stop_tracing_bkpt): New.
9345 (flush_trace_buffer_bkpt): New.
9346 (read_inferior_integer): New.
9347 (read_inferior_uinteger): New.
9348 (read_inferior_data_pointer): New.
9349 (write_inferior_data_pointer): New.
9350 (write_inferior_integer): New.
9351 (write_inferior_uinteger): New.
9352 (struct collect_static_trace_data_action): Delete.
9353 (enum tracepoint_type): New.
9354 (struct tracepoint) <type>: New field `type'.
9355 <actions_str, step_actions, step_actions_str>: Only include in
9356 GDBserver.
9357 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9358 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9359 (tracepoints): Use IP_AGENT_EXPORT.
9360 (last_tracepoint): Don't include in the IPA.
9361 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9362 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9363 (alloced_trace_state_variables): New.
9364 (trace_state_variables): Use IP_AGENT_EXPORT.
9365 (traceframe_t): Delete unused variable.
9366 (circular_trace_buffer): Don't include in the IPA.
9367 (trace_buffer_start): Delete.
9368 (struct trace_buffer_control): New.
9369 (trace_buffer_free): Delete.
9370 (struct ipa_trace_buffer_control): New.
9371 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9372 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9373 New.
9374 (trace_buffer_ctrl): New.
9375 (TRACE_BUFFER_CTRL_CURR): New.
9376 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9377 Reimplement as macros.
9378 (trace_buffer_wrap): Delete.
9379 (traceframe_write_count, traceframe_read_count)
9380 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9381 (struct tracepoint_hit_ctx) <type>: New field.
9382 (struct fast_tracepoint_ctx): New.
9383 (memory_barrier): New.
9384 (cmpxchg): New.
9385 (record_tracepoint_error): Update atomically in the IPA.
9386 (clear_inferior_trace_buffer): New.
9387 (about_to_request_buffer_space): New.
9388 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9389 updating the same buffer.
9390 (add_tracepoint): Default the tracepoint's type to trap
9391 tracepoint, and orig_size to -1.
9392 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9393 internal variables.
9394 (create_trace_state_variable): New parameter `gdb'. Handle it.
9395 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9396 (cmd_qtdp): Handle fast tracepoints.
9397 (cmd_qtdv): Adjust.
9398 (max_jump_pad_size): New.
9399 (gdb_jump_pad_head): New.
9400 (get_jump_space_head): New.
9401 (claim_jump_space): New.
9402 (sort_tracepoints): New.
9403 (MAX_JUMP_SIZE): New.
9404 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9405 IPA.
9406 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9407 support. Upload fast traceframes, and delete internal IPA
9408 breakpoints.
9409 (stop_tracing_handler): New.
9410 (flush_trace_buffer_handler): New.
9411 (cmd_qtstop): Upload fast tracepoints.
9412 (response_tracepoint): Handle fast tracepoints.
9413 (tracepoint_finished_step): Upload fast traceframes. Set the
9414 tracepoint hit context's tracepoint type.
9415 (handle_tracepoint_bkpts): New.
9416 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9417 type. Add comment about fast tracepoints.
9418 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9419 non-existing action_str field.
9420 (get_context_regcache): Handle fast tracepoints.
9421 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9422 to the regcache.
9423 (fast_tracepoint_from_jump_pad_address): New.
9424 (fast_tracepoint_from_ipa_tpoint_address): New.
9425 (collecting_t): New.
9426 (force_unlock_trace_buffer): New.
9427 (fast_tracepoint_collecting): New.
9428 (collecting): New.
9429 (gdb_collect): New.
9430 (write_inferior_data_ptr): New.
9431 (target_tp_heap): New.
9432 (target_malloc): New.
9433 (download_agent_expr): New.
9434 (UALIGN): New.
9435 (download_tracepoints): New.
9436 (download_trace_state_variables): New.
9437 (upload_fast_traceframes): New.
9438 (IPA_FIRST_TRACEFRAME): New.
9439 (IPA_NEXT_TRACEFRAME_1): New.
9440 (IPA_NEXT_TRACEFRAME): New.
9441 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9442 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9443 (gdb_jump_pad_buffer_end): New.
9444 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9445 (initialize_tracepoint): Adjust.
9446 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9447 buffer. Initialize the low module.
9448 * utils.c (PREFIX, TOOLNAME): New.
9449 (malloc_failure): Use PREFIX.
9450 (error): In the IPA, an error causes an exit.
9451 (fatal, warning): Use PREFIX.
9452 (internal_error): Use TOOLNAME.
9453 (NUMCELLS): Increase to 10.
9454 * configure, config.in: Regenerate.
9455
94562010-06-01 Pedro Alves <pedro@codesourcery.com>
9457
9458 * server.c (handle_query) <qSupported>: Do two passes over the
9459 qSupported string to avoid nesting strtok.
9460
94612010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9462
9463 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9464 (CDEPS): New.
9465 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9466 -Wl,--dynamic-list.
9467 * configure: Regenerate.
9468 * proc-service.list: New.
9469
94702010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9471
9472 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9473 New comment.
9474
94752010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9476
9477 * gdbreplay.c (remote_open): Check error return from socket() call by
9478 its equality to -1 not by it being negative.
9479 * remote-utils.c (remote_open): Likewise.
9480
94812010-05-23 Pedro Alves <pedro@codesourcery.com>
9482
9483 * config.h: Regenerate.
9484
94852010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9486
9487 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9488 doesn't provide PTRACE_GET_THREAD_AREA.
9489
94902010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9491
9492 * linux-m68k-low.c: Include <asm/ptrace.h>
9493 (ps_get_thread_area): Implement.
9494
94952010-05-03 Doug Evans <dje@google.com>
9496
9497 * event-loop.c (struct callback_event): New struct.
9498 (callback_list): New global.
9499 (append_callback_event, delete_callback_event): New functions.
9500 (process_callback): New function.
9501 (start_event_loop): Call it.
9502 * remote-utils.c (NOT_SCHEDULED): Define.
9503 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9504 moved out of readchar.
9505 (readchar): Rewrite. Call reschedule before returning.
9506 (reset_readchar): New function.
9507 (remote_close): Call it.
9508 (process_remaining, reschedule): New functions.
9509 * server.h (callback_handler_func): New typedef.
9510 (append_callback_event, delete_callback_event): Declare.
9511
95122010-05-03 Pedro Alves <pedro@codesourcery.com>
9513
9514 * proc-service.c (ps_pglobal_lookup): Use
9515 thread_db_look_up_one_symbol.
9516 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9517 parameter. Use it instead of all_symbols_looked_up.
9518 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9519 field.
9520 (all_symbols_looked_up): Don't declare.
9521 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9522 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9523 field.
9524 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9525 Set all_symbols_looked_up here.
9526 (thread_db_look_up_one_symbol): New.
9527 (thread_db_get_tls_address): Adjust.
9528 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9529 thread_db object on the heap, and tentatively set it in the
9530 process structure.
9531 (thread_db_init): Don't set all_symbols_looked_up here.
9532 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9533
95342010-05-03 Pedro Alves <pedro@codesourcery.com>
9535
9536 * linux-low.c (linux_kill, linux_detach): Adjust.
9537 (status_pending_p_callback): Remove redundant statement. Check
9538 for !TARGET_WAITIKIND_IGNORE, instead of
9539 TARGET_WAITKIND_STOPPED.
9540 (handle_tracepoints): Make sure LWP is locked. Adjust.
9541 (linux_wait_for_event_1): Adjust.
9542 (linux_cancel_breakpoints): New.
9543 (unsuspend_one_lwp): New.
9544 (unsuspend_all_lwps): New.
9545 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9546 (send_sigstop_callback): Change return type to int, add new
9547 `except' parameter and handle it.
9548 (suspend_and_send_sigstop_callback): New.
9549 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9550 pass them down. If SUSPEND, also increment the lwp's suspend
9551 count.
9552 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9553 (need_step_over_p): Don't consider suspended LWPs.
9554 (start_step_over): Adjust.
9555 (proceed_one_lwp): Change return type to int, add new `except'
9556 parameter and handle it.
9557 (unsuspend_and_proceed_one_lwp): New.
9558 (proceed_all_lwps): Use find_inferior instead of
9559 for_each_inferior.
9560 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9561 also decrement the suspend count of LWPs. Pass `except' down,
9562 instead of hacking its suspend count.
9563 (linux_pause_all): Add `freeze' parameter. Adjust.
9564 (linux_unpause_all): New.
9565 (linux_target_ops): Install linux_unpause_all.
9566 * server.c (handle_status): Adjust.
9567 * target.h (struct target_ops): New fields `unpause_all' and
9568 `cancel_breakpoints'. Add new parameter to `pause_all'.
9569 (pause_all): Add new `freeze' parameter.
9570 (unpause_all): New.
9571 (cancel_breakpoints): New.
9572 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9573 cancel breakpoints.
9574 (cmd_qtstart): Pause threads.
9575 (stop_tracing): Pause threads, and cancel breakpoints.
9576 * win32-low.c (win32_target_ops): Adjust.
9577
95782010-05-03 Pedro Alves <pedro@codesourcery.com>
9579
9580 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9581 the inferior right away from here...
9582 (linux_wait_1): ... to here, and adjust to check the thread's
9583 last_resume_kind instead of the lwp's step or stop_expected flags.
9584
95852010-05-02 Pedro Alves <pedro@codesourcery.com>
9586
9587 * README: Use consistent `GDB' and `GDBserver' spellings.
9588
95892010-05-02 Pedro Alves <pedro@codesourcery.com>
9590
9591 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9592 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9593 (linux_detach_one_lwp): Assume the lwp is stopped.
9594 (any_thread_of): Delete.
9595 (linux_detach): Stop all lwps here. Don't blindly delete all
9596 breakpoints.
9597 (delete_lwp_callback): New.
9598 (linux_mourn): Delete all lwps of the process that is gone.
9599 (linux_wait_1): Don't delete the last lwp of the process here.
9600 * mem-break.h (mark_breakpoints_out): Declare.
9601 * mem-break.c (mark_breakpoints_out): New.
9602 (free_all_breakpoints): Use it.
9603 * server.c (handle_target_event): If the process is gone, mark
9604 breakpoints out.
9605 * thread-db.c (struct thread_db) <create_bp>: New field.
9606 (thread_db_enable_reporting): Fix prototype. Store a thread event
9607 breakpoint reference in the thread_db struct.
9608 (thread_db_load_search): Clear the thread_db object.
9609 (try_thread_db_load_1): Ditto.
9610 (switch_to_process): New.
9611 (disable_thread_event_reporting): Use it.
9612 (remove_thread_event_breakpoints): New.
9613 (thread_db_detach, thread_db_mourn): Use it.
9614
96152010-05-01 Pedro Alves <pedro@codesourcery.com>
9616
9617 * linux-low.c (linux_enable_event_reporting): New.
9618 (linux_wait_for_event_1, handle_extended_wait): Use it.
9619
96202010-04-30 Pedro Alves <pedro@codesourcery.com>
9621
9622 * linux-low.c (linux_kill_one_lwp, linux_kill)
9623 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9624 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9625 SIGSTOP even if the LWP is stopped.
9626 (send_sigstop_callback): New.
9627 (stop_all_lwps): Use send_sigstop_callback instead.
9628 (linux_resume_one_thread): Adjust.
9629 (proceed_one_lwp): Still proceed an LWP that the client has
9630 requested to stop, if we haven't reported it as stopped yet. Make
9631 sure that LWPs the client want stopped, have a pending SIGSTOP.
9632
96332010-04-26 Doug Evans <dje@google.com>
9634
9635 * server.c (handle_general_set): Make static.
9636
9637 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9638 Print received char after testing for error/eof instead of before.
9639 (input_interrupt): Tweak comment.
9640
96412010-04-23 Doug Evans <dje@google.com>
9642
9643 * server.c (start_inferior): Print inferior argv if --debug.
9644
96452010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9646
9647 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9648 * nto-x86-low.c: Include server.h
9649
96502010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9651
9652 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9653 be consistent with other sources of this directory.
9654 (init_registers_amd64): Correct name of source file of this function
9655 in the comment.
9656
96572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9658
9659 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9660 64-bit executables.
9661
96622010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9663
9664 * win32-i386-low.c: Add 64-bit support.
9665 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9666 (init_registers_amd64): Declare.
9667 (mappings): Add 64-bit version of array.
9668 (init_windows_x86): New function.
9669 (the_low_target): Change init_arch field to init_windows_x86.
9670
96712010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9672
9673 * win32-low.c: Adapt to support also 64-bit architecture.
9674 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9675 (get_image_name): Use SIZE_T type for local variable `done'.
9676 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9677 (toolhelp_get_dll_name): Idem.
9678 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9679 Use uintptr_t typecast to avoid warning.
9680 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9681 (handle_exception): Use phex_nz to avoid warning.
9682 (win32_wait): Remove unused local variable `process'.
9683
96842010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9685
9686 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9687 `amd64-avx.o'.
9688
96892010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9690
9691 * configure.ac: Use `ws2_32' library for srv_mingw.
9692 * configure: Regenerate.
9693 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9694 * remote-utils.c: Likewise.
9695
96962010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9697
9698 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9699 if __x86_64__ is defined.
9700
97012010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9702
9703 * configure: Regenerate.
9704
97052010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9706
9707 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9708 * target.h (target_ops): New get_tib_address field.
9709 * win32-low.h (win32_thread_info): Add thread_local_base field.
9710 * win32-low.c (child_add_thread): Add tlb argument.
9711 Set thread_local_base field to TLB.
9712 (get_child_debug_event): Adapt to child_add_thread change.
9713 (win32_get_tib_address): New function.
9714 (win32_target_ops): Set get_tib_address field to
9715 win32_get_tib_address.
9716 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9717
97182010-04-12 Pedro Alves <pedro@codesourcery.com>
9719
9720 * linux-low.c (linux_mourn): Also remove the process.
9721 * server.c (handle_target_event): Don't remove the process here.
9722 * nto-low.c (nto_mourn): New.
9723 (nto_target_ops): Install it.
9724 * spu-low.c (spu_mourn): New.
9725 (spu_target_ops): Install it.
9726 * win32-low.c (win32_mourn): New.
9727 (win32_target_ops): Install it.
9728
97292010-04-12 Pedro Alves <pedro@codesourcery.com>
9730
9731 * server.h (buffer_xml_printf): Remove redundant `;'.
9732
97332010-04-12 Pedro Alves <pedro@codesourcery.com>
9734
9735 * regcache.c (set_register_cache): Invalidate regcaches before
9736 changing the register cache layout.
9737 (regcache_invalidate_one): Allow a NULL regcache.
9738 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9739 regcaches before changing the register cache layout or the target
9740 regsets.
9741
97422010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9743
9744 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9745 variable warning on Linux/x86-64.
9746
97472010-04-11 Pedro Alves <pedro@codesourcery.com>
9748
9749 GDBserver disconnected tracing support.
9750
9751 * linux-low.c (linux_remove_process): Delete.
9752 (add_lwp): Don't set last_resume_kind here.
9753 (linux_kill): Use `mourn'.
9754 (linux_detach): Use `thread_db_detach', and `mourn'.
9755 (linux_mourn): New.
9756 (linux_attach_lwp_1): Adjust comment.
9757 (linux_attach): last_resume_kind moved the thread_info; adjust.
9758 (status_pending_p_callback): Adjust.
9759 (linux_wait_for_event_1): Adjust.
9760 (count_events_callback, select_singlestep_lwp_callback)
9761 (select_event_lwp_callback, cancel_breakpoints_callback)
9762 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9763 (proceed_one_lwp): Adjust.
9764 (linux_async): Add debug output.
9765 (linux_thread_stopped): New.
9766 (linux_pause_all): New.
9767 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9768 linux_pause_all.
9769 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9770 (thread_db_free): Delete declaration.
9771 (thread_db_detach, thread_db_mourn): Declare.
9772 * thread-db.c (thread_db_init): Use thread_db_mourn.
9773 (thread_db_free): Delete, split in two.
9774 (disable_thread_event_reporting): New.
9775 (thread_db_detach): New.
9776 (thread_db_mourn): New.
9777
9778 * server.h (struct thread_info) <last_resume_kind>: New field.
9779 <attached>: Add comment.
9780 <gdb_detached>: New field.
9781 (handler_func): Change return type to int.
9782 (handle_serial_event, handle_target_event): Ditto.
9783 (gdb_connected): Declare.
9784 (tracing): Delete.
9785 (disconnected_tracing): Declare.
9786 (stop_tracing): Declare.
9787
9788 * server.c (handle_query) <qSupported>: Report support for
9789 disconnected tracing.
9790 (queue_stop_reply_callback): Account for running threads.
9791 (gdb_wants_thread_stopped): New.
9792 (gdb_wants_all_threads_stopped): New.
9793 (gdb_reattached_process): New.
9794 (handle_status): Clear the `gdb_detached' flag of all processes.
9795 In all-stop, stop all threads.
9796 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9797 (process_serial_event): If the remote connection breaks, or if an
9798 exit was forced with "monitor exit", force an event loop exit.
9799 Handle disconnected tracing on detach.
9800 (handle_serial_event): Adjust.
9801 (handle_target_event): If GDB isn't connected, forward events back
9802 to the inferior, unless the last process exited, in which case,
9803 exit gdbserver. Adjust interface.
9804
9805 * remote-utils.c (remote_open): Don't block in accept. Instead
9806 register an event loop source on the listen socket file
9807 descriptor. Refactor bits into ...
9808 (listen_desc): ... this new global.
9809 (gdb_connected): ... this new function.
9810 (enable_async_notification): ... this new function.
9811 (handle_accept_event): ... this new function.
9812 (remote_close): Clear remote_desc.
9813
9814 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9815
9816 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9817 New fields.
9818 (mourn_inferior): Define.
9819 (target_process_qsupported): Avoid the dangling else problem.
9820 (thread_stopped): Define.
9821 (pause_all): Define.
9822 (target_waitstatus_to_string): Declare.
9823 * target.c (target_waitstatus_to_string): New.
9824
9825 * tracepoint.c (tracing): Make extern.
9826 (disconnected_tracing): New.
9827 (stop_tracing): Make extern. Handle tracing stops due to GDB
9828 disconnecting.
9829 (cmd_qtdisconnected): New.
9830 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9831 (handle_tracepoint_general_set): Handle QTDisconnected.
9832
9833 * event-loop.c (event_handler_func): Change return type to int.
9834 (process_event): Bail out if the event handler wants the event
9835 loop to stop.
9836 (handle_file_event): Ditto.
9837 (start_event_loop): Bail out if the event handler wants the event
9838 loop to stop.
9839
9840 * nto-low.c (nto_target_ops): Adjust.
9841 * spu-low.c (spu_wait): Don't remove the process here.
9842 (spu_target_ops): Adjust.
9843 * win32-low.c (win32_wait): Don't remove the process here.
9844 (win32_target_ops): Adjust.
9845
98462010-04-11 Pedro Alves <pedro@codesourcery.com>
9847
9848 * regcache.c (realloc_register_cache): Invalidate inferior's
9849 regcache before recreating it.
9850
98512010-04-09 Pedro Alves <pedro@codesourcery.com>
9852
9853 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9854
98552010-04-09 Stan Shebs <stan@codesourcery.com>
9856 Pedro Alves <pedro@codesourcery.com>
9857
9858 * server.h (LONGEST): New.
9859 (struct thread_info) <while_stepping>: New field.
9860 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9861 Declare.
9862 (initialize_tracepoint, handle_tracepoint_general_set)
9863 (handle_tracepoint_query, tracepoint_finished_step)
9864 (tracepoint_was_hit, release_while_stepping_state_list):
9865 (current_traceframe): Declare.
9866 * server.c (handle_general_set): Handle tracepoint packets.
9867 (read_memory): New.
9868 (write_memory): New.
9869 (handle_search_memory_1): Use read_memory.
9870 (handle_query): Report support for conditional tracepoints, trace
9871 state variables, and tracepoint sources. Handle tracepoint
9872 queries.
9873 (main): Initialize the tracepoints module.
9874 (process_serial_event): Handle traceframe reads/writes.
9875
9876 * linux-low.c (handle_tracepoints): New.
9877 (linux_wait_1): Call it.
9878 (linux_resume_one_lwp): Handle while-stepping.
9879 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9880 (linux_target_ops): Install them.
9881 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9882 New field.
9883 * linux-x86-low.c (x86_supports_tracepoints): New.
9884 (the_low_target). Install it.
9885
9886 * mem-break.h (delete_breakpoint): Declare.
9887 * mem-break.c (delete_breakpoint): Make external.
9888
9889 * target.h (struct target_ops): Add `supports_tracepoints',
9890 `read_pc', and `write_pc' fields.
9891 (target_supports_tracepoints): Define.
9892 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9893 (phex_nz): New.
9894
9895 * regcache.h (struct regcache) <registers_owned>: New field.
9896 (init_register_cache, regcache_cpy): Declare.
9897 (regcache_read_pc, regcache_write_pc): Declare.
9898 (register_cache_size): Declare.
9899 (supply_regblock): Declare.
9900 * regcache.c (init_register_cache): New.
9901 (new_register_cache): Use it.
9902 (regcache_cpy): New.
9903 (register_cache_size): New.
9904 (supply_regblock): New.
9905 (regcache_read_pc, regcache_write_pc): New.
9906
9907 * tracepoint.c: New.
9908
9909 * Makefile.in (OBS): Add tracepoint.o.
9910 (tracepoint.o): New rule.
9911
99122010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9913
9914 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9915 (i386-mmx.o): New.
9916 (i386-mmx.c): Likewise.
9917 (i386-mmx-linux.o): Likewise.
9918 (i386-mmx-linux.c): Likewise.
9919
9920 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9921 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9922 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9923 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9924
9925 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9926 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9927 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9928
99292010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9930
9931 * Makefile.in (clean): Updated.
9932 (i386-avx.o): New.
9933 (i386-avx.c): Likewise.
9934 (i386-avx-linux.o): Likewise.
9935 (i386-avx-linux.c): Likewise.
9936 (amd64-avx.o): Likewise.
9937 (amd64-avx.c): Likewise.
9938 (amd64-avx-linux.o): Likewise.
9939 (amd64-avx-linux.c): Likewise.
9940
9941 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9942 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9943 (srv_amd64_regobj): Add amd64-avx.o.
9944 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9945 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9946 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9947 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9948 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9949 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9950 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9951
9952 * i387-fp.c: Include "i386-xstate.h".
9953 (i387_xsave): New.
9954 (i387_cache_to_xsave): Likewise.
9955 (i387_xsave_to_cache): Likewise.
9956 (x86_xcr0): Likewise.
9957
9958 * i387-fp.h (i387_cache_to_xsave): Likewise.
9959 (i387_xsave_to_cache): Likewise.
9960 (x86_xcr0): Likewise.
9961
9962 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9963 * linux-crisv32-low.c (target_regsets): Likewise.
9964 * linux-m68k-low.c (target_regsets): Likewise.
9965 * linux-mips-low.c (target_regsets): Likewise.
9966 * linux-ppc-low.c (target_regsets): Likewise.
9967 * linux-s390-low.c (target_regsets): Likewise.
9968 * linux-sh-low.c (target_regsets): Likewise.
9969 * linux-sparc-low.c (target_regsets): Likewise.
9970 * linux-xtensa-low.c (target_regsets): Likewise.
9971
9972 * linux-low.c: Include <sys/uio.h>.
9973 (regsets_fetch_inferior_registers): Support nt_type.
9974 (regsets_store_inferior_registers): Likewise.
9975 (linux_process_qsupported): New.
9976 (linux_target_ops): Add linux_process_qsupported.
9977
9978 * linux-low.h (regset_info): Add nt_type.
9979 (linux_target_ops): Add process_qsupported.
9980
9981 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9982 and <sys/uio.h>.
9983 (init_registers_i386_avx_linux): New.
9984 (init_registers_amd64_avx_linux): Likewise.
9985 (xmltarget_i386_linux_no_xml): Likewise.
9986 (xmltarget_amd64_linux_no_xml): Likewise.
9987 (PTRACE_GETREGSET): Likewise.
9988 (PTRACE_SETREGSET): Likewise.
9989 (x86_fill_xstateregset): Likewise.
9990 (x86_store_xstateregset): Likewise.
9991 (use_xml): Likewise.
9992 (x86_linux_update_xmltarget): Likewise.
9993 (x86_linux_process_qsupported): Likewise.
9994 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9995 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9996 init_registers_i386_linux here. Call
9997 x86_linux_update_xmltarget.
9998 (the_low_target): Add x86_linux_process_qsupported.
9999
10000 * server.c (handle_query): Call target_process_qsupported.
10001
10002 * target.h (target_ops): Add process_qsupported.
10003 (target_process_qsupported): New.
10004
100052010-04-03 Pedro Alves <pedro@codesourcery.com>
10006
10007 * inferiors.c (add_thread): Set last_status kind to
10008 TARGET_WAITKIND_IGNORE.
10009 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10010 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10011 (linux_wait_1): Move `thread' local definition to block that uses
10012 it. Don't NULL initialize `event_child'.
10013 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10014 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10015 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10016
100172010-04-01 Pedro Alves <pedro@codesourcery.com>
10018
10019 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10020 an extended waitstatus, or by a watchpoint.
10021 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10022 thread was stepping or has been stopped by a watchpoint.
10023
100242010-04-01 Pedro Alves <pedro@codesourcery.com>
10025
10026 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10027 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10028 of another, then delete the previous, and validate all
10029 breakpoints.
10030 (validate_inserted_breakpoint): New.
10031 (delete_disabled_breakpoints): New.
10032 (validate_breakpoints): New.
10033 (check_mem_read): Validate breakpoints before trusting their
10034 shadow. Delete disabled breakpoints.
10035 (check_mem_write): Validate breakpoints before trusting they
10036 should be inserted. Delete disabled breakpoints.
10037 * mem-break.h (validate_breakpoints):
10038 * server.c (handle_query): Validate breakpoints when we see a
10039 qSymbol query.
10040
100412010-04-01 Pedro Alves <pedro@codesourcery.com>
10042
10043 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10044 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10045 if we could tell there's a GDB breakpoint at stop_pc.
10046 (need_step_over_p): Don't do a step over if we find a GDB
10047 breakpoint at the resume PC.
10048
10049 * mem-break.c (struct raw_breakpoint): New.
10050 (enum bkpt_type): New type `gdb_breakpoint'.
10051 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10052 fields. New field `raw'.
10053 (find_raw_breakpoint_at): New.
10054 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10055 breakpoint instead.
10056 (set_breakpoint_at): Adjust.
10057 (delete_raw_breakpoint): New.
10058 (release_breakpoint): New.
10059 (delete_breakpoint): Rename to...
10060 (delete_breakpoint_1): ... this. Add proc parameter. Use
10061 release_breakpoint. Return ENOENT.
10062 (delete_breakpoint): Reimplement.
10063 (find_breakpoint_at): Delete.
10064 (find_gdb_breakpoint_at): New.
10065 (delete_breakpoint_at): Delete.
10066 (set_gdb_breakpoint_at): New.
10067 (delete_gdb_breakpoint_at): New.
10068 (gdb_breakpoint_here): New.
10069 (set_reinsert_breakpoint): Use release_breakpoint.
10070 (uninsert_breakpoint): Rename to ...
10071 (uninsert_raw_breakpoint): ... this.
10072 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10073 (reinsert_raw_breakpoint): Change parameter type to
10074 raw_breakpoint.
10075 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10076 instead.
10077 (check_breakpoints): Adjust. Use release_breakpoint.
10078 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10079 (breakpoint_inserted_here): Ditto.
10080 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10081 Don't trust the breakpoint's shadow if it is not inserted.
10082 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10083 (delete_all_breakpoints): Adjust.
10084 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10085 use delete_breakpoint_1.
10086
10087 * mem-break.h (breakpoints_supported): Delete declaration.
10088 (set_gdb_breakpoint_at): Declare.
10089 (gdb_breakpoint_here): Declare.
10090 (delete_breakpoint_at): Delete.
10091 (delete_gdb_breakpoint_at): Declare.
10092
10093 * server.h (struct raw_breakpoint): Forward declare.
10094 (struct process_info): New field `raw_breakpoints'.
10095
10096 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10097 breakpoints.
10098
100992010-03-24 Pedro Alves <pedro@codesourcery.com>
10100
10101 * linux-low.c (status_pending_p_callback): Fix comment.
10102 (linux_wait_for_event_1): Move most of the internal breakpoint
10103 handling from here...
10104 (linux_wait_1): ... to here.
10105 (count_events_callback): New.
10106 (select_singlestep_lwp_callback): New.
10107 (select_event_lwp_callback): New.
10108 (cancel_breakpoints_callback): New.
10109 (select_event_lwp): New.
10110 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10111 priority to all LWPs that have had events that should be reported
10112 to the client. Cancel breakpoints when about to reporting the
10113 event to the client, not while stopping lwps. No longer cancel
10114 finished single-steps here.
10115 (cancel_finished_single_step): Delete.
10116 (cancel_finished_single_steps): Delete.
10117
101182010-03-24 Pedro Alves <pedro@codesourcery.com>
10119
10120 * mem-break.c (enum bkpt_type): New.
10121 (struct breakpoint): New field `type'.
10122 (set_breakpoint_at): Change return type to struct breakpoint
10123 pointer. Set type to `other_breakpoint' by default.
10124 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10125 in the breakpoint list.
10126 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10127 (reinsert_breakpoint): Rename to ...
10128 (reinsert_raw_breakpoint): ... this.
10129 (reinsert_breakpoints_at): Adjust.
10130 * mem-break.h (struct breakpoint): Declare.
10131 (set_breakpoint_at): Change return type to struct breakpoint
10132 pointer.
10133
101342010-03-24 Pedro Alves <pedro@codesourcery.com>
10135
10136 * server.c (handle_query): Assign, not compare.
10137
101382010-03-24 Pedro Alves <pedro@codesourcery.com>
10139
10140 Teach linux gdbserver to step-over-breakpoints.
10141
10142 * linux-low.c (can_hardware_single_step): New.
10143 (supports_breakpoints): New.
10144 (handle_extended_wait): If stopping threads, read the stop pc of
10145 the new cloned LWP.
10146 (get_pc): New.
10147 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10148 low target doesn't support retrieving the PC.
10149 (add_lwp): Set last_resume_kind to resume_continue.
10150 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10151 (linux_attach): Don't clear stop_expected. Set the lwp's
10152 last_resume_kind to resume_stop.
10153 (linux_detach_one_lwp): Don't check for removed breakpoints.
10154 (check_removed_breakpoint): Delete.
10155 (status_pending_p): Rename to ...
10156 (status_pending_p_callback): ... this. Don't check for removed
10157 breakpoints. Don't consider threads that are stopped from GDB's
10158 perspective.
10159 (linux_wait_for_lwp): Always read the stop_pc here.
10160 (cancel_breakpoint): New.
10161 (step_over_bkpt): New global.
10162 (linux_wait_for_event_1): Implement stepping over breakpoints.
10163 (gdb_wants_lwp_stopped): New.
10164 (gdb_wants_all_stopped): New.
10165 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10166 single-step traps here. Store the thread's last reported target
10167 wait status.
10168 (send_sigstop): Don't clear stop_expected. Always set it,
10169 instead.
10170 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10171 (cancel_finished_single_step): New.
10172 (cancel_finished_single_steps): New.
10173 (wait_for_sigstop): Don't cancel finished single-step traps here.
10174 (linux_resume_one_lwp): Don't check for removed breakpoints.
10175 Don't set `step' on non-hardware step archs.
10176 (linux_set_resume_request): Ignore resume_stop requests if already
10177 stopping or stopped. Set the lwp's last_resume_kind.
10178 (resume_status_pending_p): Don't check for removed breakpoints.
10179 (need_step_over_p): New.
10180 (start_step_over): New.
10181 (finish_step_over): New.
10182 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10183 requests. Clear the thread's last reported target waitstatus.
10184 Don't use the `suspended' flag. Don't consider pending breakpoints.
10185 (linux_resume): Start a step-over if necessary.
10186 (proceed_one_lwp): New.
10187 (proceed_all_lwps): New.
10188 (unstop_all_lwps): New.
10189 * linux-low.h (struct lwp_info): Rewrite comment for the
10190 `suspended' flag. Add the `stop_pc' field. Delete the
10191 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10192 Add `'last_resume_kind' and `need_step_over' fields.
10193 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10194 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10195 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10196 (set_raw_breakpoint_at): New.
10197 (set_breakpoint_at): Rewrite to use it.
10198 (reinsert_breakpoint_handler): Delete.
10199 (set_reinsert_breakpoint): New.
10200 (reinsert_breakpoint_by_bp): Delete.
10201 (delete_reinsert_breakpoints): New.
10202 (uninsert_breakpoint): Rewrite.
10203 (uninsert_breakpoints_at): New.
10204 (reinsert_breakpoint): Rewrite.
10205 (reinsert_breakpoints_at): New.
10206 (check_breakpoints): Rewrite.
10207 (breakpoint_here): New.
10208 (breakpoint_inserted_here): New.
10209 (check_mem_read): Adjust.
10210 * mem-break.h (breakpoints_supported, breakpoint_here)
10211 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10212 (reinsert_breakpoint_by_bp): Delete declaration.
10213 (delete_reinsert_breakpoints): Declare.
10214 (reinsert_breakpoint): Delete declaration.
10215 (reinsert_breakpoints_at): Declare.
10216 (uninsert_breakpoint): Delete declaration.
10217 (uninsert_breakpoints_at): Declare.
10218 (check_breakpoints): Adjust prototype.
10219 * server.h: Adjust include order.
10220 (struct thread_info): Declare here. Add a `last_status' field.
10221
102222010-03-23 Michael Snyder <msnyder@vmware.com>
10223
10224 * server.c (crc32): New function.
10225 (handle_query): Add handling for 'qCRC:' request.
10226
102272010-03-23 Pedro Alves <pedro@codesourcery.com>
10228
10229 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10230 lwp had been stopped by a watchpoint.
10231
102322010-03-16 Pedro Alves <pedro@codesourcery.com>
10233
10234 * server.h (internal_error): Declare.
10235 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10236 * utils.c (internal_error): New function.
10237
102382010-03-15 Andreas Schwab <schwab@redhat.com>
10239
10240 * configure.srv: Fix typo setting srv_regobj.
10241
102422010-03-15 Pedro Alves <pedro@codesourcery.com>
10243
10244 * linux-low.c (fetch_register): Avoid passing a non string literal
10245 format to `error'.
10246 (usr_store_inferior_registers): Ditto.
10247
102482010-03-14 Pedro Alves <pedro@codesourcery.com>
10249
10250 * linux-low.c (linux_write_memory): Bail out early if peeking
10251 memory failed.
10252
102532010-03-14 Pedro Alves <pedro@codesourcery.com>
10254
10255 * linux-low.h (struct lwp_info): New fields
10256 `stopped_by_watchpoint' and `stopped_data_address'.
10257 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10258 here, and cache them in the lwp object.
10259 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10260 directly.
10261 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10262 field.
10263 (linux_stopped_by_watchpoint): Rewrite.
10264 (linux_stopped_data_address): Rewrite.
10265
102662010-03-06 Simo Melenius <simo.melenius@iki.fi>
10267
10268 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10269 switching the current inferior, not before.
10270
102712010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10272
10273 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10274 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10275 i386-linux.c and amd64-linux.c.
10276 (reg-i386.o): Removed.
10277 (reg-i386.c): Likewise.
10278 (reg-i386-linux.o): Likewise.
10279 (reg-i386-linux.c): Likewise.
10280 (reg-x86-64.o): Likewise.
10281 (reg-x86-64.c): Likewise.
10282 (reg-x86-64-linux.o): Likewise.
10283 (reg-x86-64-linux.c): Likewise.
10284 (i386.o): New.
10285 (i386.c): Likewise.
10286 (i386-linux.o): Likewise.
10287 (i386-linux.c): Likewise.
10288 (amd64.o): Likewise.
10289 (amd64.c): Likewise.
10290 (amd64-linux.o): Likewise.
10291 (amd64-linux.c): Likewise.
10292
10293 * configure.srv (srv_i386_regobj): New.
10294 (srv_i386_linux_regobj): Likewise.
10295 (srv_amd64_regobj): Likewise.
10296 (srv_amd64_linux_regobj): Likewise.
10297 (srv_i386_32bit_xmlfiles): Likewise.
10298 (srv_i386_64bit_xmlfiles): Likewise.
10299 (srv_i386_xmlfiles): Likewise.
10300 (srv_amd64_xmlfiles): Likewise.
10301 (srv_i386_linux_xmlfiles): Likewise.
10302 (srv_amd64_linux_xmlfiles): Likewise.
10303 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10304 srv_xmlfiles to $srv_i386_xmlfiles.
10305 (i[34567]86-*-mingw32ce*): Likewise.
10306 (i[34567]86-*-mingw*): Likewise.
10307 (i[34567]86-*-nto*): Likewise.
10308 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10309 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10310 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10311 (x86_64-*-linux*): Likewise.
10312
10313 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10314 (init_registers_amd64_linux): New.
10315 (x86_arch_setup): Replace init_registers_x86_64_linux with
10316 init_registers_amd64_linux.
10317
103182010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10319
10320 * configure.ac: Check for libdl. If it is not available link against
10321 static libthread_db.
10322 * configure: Regenerate.
10323
103242010-02-22 Pedro Alves <pedro@codesourcery.com>
10325
10326 PR9605
10327
10328 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10329 handing a read watchpoint.
10330 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10331
103322010-02-12 Doug Evans <dje@google.com>
10333
10334 * linux-low.c (linux_supports_tracefork_flag): Document.
10335 (linux_look_up_symbols): Add comment.
10336
103372010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10338
10339 * regcache.c (supply_register): Clear regcache if buf is NULL.
10340
103412010-02-02 Nicolas Roche <roche@sourceware.org>
10342 Joel Brobecker <brobecker@adacore.com>
10343
10344 * inferiors.c (find_inferior): Add function documentation.
10345 (unloaded_dll): Handle the case where the unloaded dll has not
10346 been previously registered in the dll list.
10347
103482010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10349
10350 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10351 (thumb2_breakpoint): New.
10352 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10353
103542010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10355
10356 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10357 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10358 breakpoints.
10359
103602010-01-21 Pedro Alves <pedro@codesourcery.com>
10361
10362 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10363
103642010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10365
10366 * linux-s390-low.c (s390_collect_ptrace_register)
10367 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10368
103692010-01-21 Doug Evans <dje@google.com>
10370
10371 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10372 (PTRACE_ARG4_TYPE): New macro.
10373 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10374 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10375 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10376 (usr_store_inferior_registers): Ditto.
10377 (linux_read_memory, linux_write_memory): Ditto.
10378 (linux_test_for_tracefork): Ditto.
10379
10380 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10381 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10382
103832010-01-21 Pedro Alves <pedro@codesourcery.com>
10384
10385 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10386 target.
10387
103882010-01-21 Pedro Alves <pedro@codesourcery.com>
10389
10390 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10391 prototype to take a regcache. Adjust.
10392
103932010-01-20 Pedro Alves <pedro@codesourcery.com>
10394
10395 * regcache.h (struct thread_info): Forward declare.
10396 (struct regcache): New.
10397 (new_register_cache): Adjust prototype.
10398 (get_thread_regcache): Declare.
10399 (free_register_cache): Adjust prototype.
10400 (registers_to_string, registers_from_string): Ditto.
10401 (supply_register, supply_register_by_name, collect_register)
10402 (collect_register_as_string, collect_register_by_name): Ditto.
10403 * regcache.c (struct inferior_regcache_data): Delete.
10404 (get_regcache): Rename to ...
10405 (get_thread_regcache): ... this. Adjust. Switch inferior before
10406 fetching registers.
10407 (regcache_invalidate_one): Adjust.
10408 (regcache_invalidate): Fix prototype.
10409 (new_register_cache): Return the new register cache.
10410 (free_register_cache): Change prototype.
10411 (realloc_register_cache): Adjust.
10412 (registers_to_string): Change prototype to take a regcache. Adjust.
10413 (registers_from_string): Ditto.
10414 (register_data): Ditto.
10415 (supply_register): Ditto.
10416 (supply_register_by_name): Ditto.
10417 (collect_register): Ditto.
10418 (collect_register_as_string): Ditto.
10419 (collect_register_by_name): Ditto.
10420 * server.c (process_serial_event): Adjust.
10421 * linux-low.h (regset_fill_func, regset_store_func): Change
10422 prototype.
10423 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10424 Change prototype.
10425 * linux-low.c (get_stop_pc): Adjust.
10426 (check_removed_breakpoint): Adjust.
10427 (linux_wait_for_event): Adjust.
10428 (linux_resume_one_lwp): Adjust.
10429 (fetch_register): Add regcache parameter. Adjust.
10430 (usr_store_inferior_registers): Ditto.
10431 (regsets_fetch_inferior_registers): Ditto.
10432 (regsets_store_inferior_registers): Ditto.
10433 (linux_fetch_registers, linux_store_registers): Ditto.
10434 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10435 regcache. Adjust.
10436 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10437 Ditto.
10438 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10439 prototype to take a regcache.
10440 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10441 * remote-utils.c (convert_ascii_to_int, outreg)
10442 (prepare_resume_reply): Change prototype to take a regcache.
10443 Adjust.
10444 * target.h (struct target_ops) <fetch_registers, store_registers>:
10445 Change prototype to take a regcache.
10446 (fetch_inferior_registers, store_inferior_registers): Change
10447 prototype to take a regcache. Adjust.
10448 * proc-service.c (ps_lgetregs): Adjust.
10449 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10450 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10451 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10452 take a regcache. Adjust.
10453 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10454 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10455 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10456 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10457 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10458 (cris_cannot_fetch_register):
10459 (cris_breakpoint_at): Change prototype to take a regcache.
10460 Adjust.
10461 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10462 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10463 to take a regcache. Adjust.
10464 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10465 Adjust.
10466 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10467 take a regcache. Adjust.
10468 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10469 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10470 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10471 * linux-mips-low.c (mips_get_pc):
10472 (mips_set_pc): Change prototype to take a regcache. Adjust.
10473 (mips_reinsert_addr): Adjust.
10474 (mips_collect_register): Change prototype to take a regcache.
10475 Adjust.
10476 (mips_supply_register):
10477 (mips_collect_register_32bit, mips_supply_register_32bit)
10478 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10479 (mips_store_fpregset): Ditto.
10480 * linux-ppc-low.c (ppc_supply_ptrace_register)
10481 (ppc_supply_ptrace_register): Ditto.
10482 (parse_spufs_run): Adjust.
10483 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10484 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10485 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10486 take a regcache. Adjust.
10487 * linux-s390-low.c (s390_collect_ptrace_register)
10488 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10489 (s390_set_pc): Change prototype to take a regcache. Adjust.
10490 (s390_arch_setup): Adjust.
10491 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10492 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10493 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10494 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10495 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10496 regcache. Adjust.
10497 (sparc_breakpoint_at): Adjust.
10498 * linux-xtensa-low.c (xtensa_fill_gregset):
10499 (xtensa_store_gregset):
10500 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10501 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10502 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10503 prototype to take a regcache. Adjust.
10504 * win32-arm-low.c (arm_fetch_inferior_register)
10505 (arm_store_inferior_register): Change prototype to take a
10506 regcache. Adjust.
10507 * win32-i386-low.c (i386_fetch_inferior_register)
10508 (i386_store_inferior_register): Change prototype to take a
10509 regcache. Adjust.
10510 * win32-low.c (child_fetch_inferior_registers)
10511 (child_store_inferior_registers): Change prototype to take a
10512 regcache. Adjust.
10513 (win32_wait): Adjust.
10514 (win32_fetch_inferior_registers): Change prototype to take a
10515 regcache. Adjust.
10516 (win32_store_inferior_registers): Adjust.
10517 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10518 store_inferior_register>: Change prototype to take a regcache.
10519
105202010-01-20 Doug Evans <dje@google.com>
10521
10522 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10523 #ifdef.
10524 (linux_wait_for_event1, linux_init_signals): Ditto.
10525 (W_STOPCODE): Provide definition if missing.
10526
105272010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10528
10529 * linux-low.c (linux_core_of_thread): New.
10530 (compare_ints, show_process, list_threads): New.
10531 (linux_qxfer_osdata): Report threads and cores.
10532 (linux_target_op): Register linux_core_of_thread.
10533 * remote-utils.c (prepare_resume_reply): Report the core.
10534 (buffer_xml_printf): Support %d specifier.
10535 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10536 New.
10537 (handle_query): Handle qXfer:threads. Announce availability
10538 thereof.
10539 * target.h (struct target_ops): New field core_of_thread.
10540
105412010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10542
10543 * Makefile.in (clean): Remove new generated files.
10544 (reg-s390.o, reg-s390.c): Remove rules.
10545 (reg-s390x.o, reg-s390x.c): Likewise.
10546 (s390-linux32.o, s390-linux32.c): Add rules.
10547 (s390-linux64.o, s390-linux64.c): Likewise.
10548 (s390x-linux64.o, s390x-linux64.c): Likewise.
10549 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10550 * linux-s390-low.c: Include <elf.h>.
10551 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10552 (init_registers_s390): Remove prototype.
10553 (init_registers_s390x): Likewise.
10554 (init_registers_s390_linux32): Add prototype.
10555 (init_registers_s390_linux64): Likewise.
10556 (init_registers_s390x_linux64): Likewise.
10557 (s390_num_regs_3264): New define.
10558 (s390_regmap_3264): New global variable.
10559 (s390_cannot_fetch_register): Remove obsolete check.
10560 (s390_cannot_store_register): Likewise.
10561 (s390_collect_ptrace_register): Handle upper/lower register halves.
10562 (s390_supply_ptrace_register): Likewise.
10563 (s390_fill_gregset): Update to register number changes.
10564 (s390_get_hwcap): New routine.
10565 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10566 Install appropriate regmap and register set.
10567
105682010-01-01 Joel Brobecker <brobecker@adacore.com>
10569
10570 * server.c (gdbserver_version): Update copyright year to 2010.
10571 * gdbreplay.c (gdbreplay_version): Likewise.
10572
105732009-12-28 Doug Evans <dje@google.com>
10574
10575 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10576 elf/external.h. Include <elf.h> instead but only if necessary.
10577
105782009-12-28 Pedro Alves <pedro@codesourcery.com>
10579
10580 * linux-low.c (linux_remove_process): Remove `detaching'
10581 parameter. Don't release/detach from thread_db here.
10582 (linux_kill): Release/detach from thread_db here, ...
10583 (linux_detach): ... and here, before actually detaching.
10584 (linux_wait_1): ... and here, when a process exits.
10585 * thread-db.c (any_thread_of): New.
10586 (thread_db_free): Switch the current inferior to a thread of the
10587 passed in process.
10588
105892009-12-21 Doug Evans <dje@google.com>
10590
10591 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10592
10593 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10594 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10595 warning ifndef __NR_tkill. Move setting of errno there too.
10596 Delete unnecessary resetting of errno after syscall.
10597 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10598
10599 * configure.ac: Check for dladdr.
10600 * config.in: Regenerate.
10601 * configure: Regenerate.
10602 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10603 (try_thread_db_load): Update.
10604
10605 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10606
106072009-12-18 Doug Evans <dje@google.com>
10608
10609 * event-loop.c: Include unistd.h if it exists.
10610
10611 * linux-low.c (my_waitpid): Move definition away from being in
10612 between linux_tracefork_child/linux_test_for_tracefork.
10613
10614 * gdb_proc_service.h (psaddr_t): Fix type.
10615 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10616 signature to match glibc.
10617
106182009-12-16 Doug Evans <dje@google.com>
10619
10620 * linux-low.c (linux_read_memory): Fix argument to read.
10621
106222009-11-26 Pedro Alves <pedro@codesourcery.com>
10623
10624 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10625 events, don't leave current_inferior pointing at null.
10626
106272009-11-26 Pedro Alves <pedro@codesourcery.com>
10628
10629 * win32-low.c (LOG): Delete.
10630 (OUTMSG): Output to stderr.
10631 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10632 on compile time LOG macro.
10633 (win32_wait): Fix debug output.
10634
106352009-11-26 Pedro Alves <pedro@codesourcery.com>
10636
10637 * win32-low.c (win32_add_one_solib): If the dll name is
10638 "ntdll.dll", prepend the system directory to the dll path.
10639
106402009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10641
10642 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10643
106442009-11-17 Nathan Sidwell <nathan@codesourcery.com>
10645 Vladimir Prus <vladimir@codesourcery.com>
10646
10647 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10648 * configure.ac: Check for __mcoldfire__ and set
10649 gdb_cv_m68k_is_coldfire.
10650 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10651 reg-cf.o and reg-m68k.o.
10652 * configure: Regenerated.
10653
106542009-11-16 Pedro Alves <pedro@codesourcery.com>
10655
10656 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10657 Pass it to thread_db_free.
10658 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10659 proper `detaching' argument to linux_remove_process.
10660 * linux-low.h (thread_db_free): Add `detaching' parameter.
10661 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10662 to thread_db_free.
10663 (thread_db_free): Add `detaching' parameter. Only
10664 call td_ta_clear_event if detaching from process.
10665
106662009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10667
10668 * thread-db.c (thread_db_free): Fix typo.
10669
106702009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10671
10672 PR gdb/10838
10673 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10674
106752009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10676
10677 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10678 with an i686 compiler.
10679 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10680 needed.
10681 * configure: Rebuilt.
10682
106832009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10684
10685 PR gdb/10783
10686
10687 * server.c (handle_search_memory_1): Correct read_addr initialization
10688 in loop for searching subsequent chunks.
10689
106902009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10691
10692 * configure.ac: New --with-libthread-db option.
10693 * thread-db.c: Allow direct dependence on libthread_db.
10694 (thread_db_free): Adjust.
10695 * config.in: Regenerate.
10696 * configure: Likewise.
10697
106982009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10699
10700 PR gdb/10757
10701 * thread-db.c (attach_thread): New function.
10702 (maybe_attach_thread): Return success/failure.
10703 (find_new_threads_callback): Adjust.
10704 (thread_db_find_new_threads): Loop until no new threads.
10705
107062009-10-13 Pedro Alves <pedro@codesourcery.com>
10707
10708 * proc-service.c (ps_lgetregs): Formatting.
10709
107102009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10711
10712 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10713 * configure.ac: Adjust.
10714 * linux-low.h (struct process_info_private): Move members to struct
10715 thread_db.
10716 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10717 * linux-low.c (linux_remove_process): Adjust.
10718 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10719 * server.c (handle_query): Move code ...
10720 (handle_monitor_command): ... here. New function.
10721 * target.h (struct target_ops): New member.
10722 * thread-db.c (struct thread_db): New.
10723 (libthread_db_search_path): New variable.
10724 (thread_db_create_event, thread_db_enable_reporting)
10725 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10726 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10727 (try_thread_db_load_1, dladdr_to_soname): New functions.
10728 (try_thread_db_load, thread_db_load_search): New functions.
10729 (thread_db_init): Search for libthread_db.
10730 (thread_db_free): New function.
10731 (thread_db_handle_monitor_command): Likewise.
10732 * config.in: Regenerate.
10733 * configure: Regenerate.
10734
107352009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10736
10737 * spu-low.c (spu_kill): Wait for inferior to terminate.
10738 Call clear_inferiors.
10739 (spu_detach): Call clear_inferiors.
10740
107412009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10742
10743 * aclocal.m4: Regenerate.
10744 * config.in: Likewise.
10745 * configure: Likewise.
10746
107472009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10748
10749 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10750 (parse_spufs_run): New function.
10751 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10752 (ppc_breakpoint_at): Handle SPU breakpoints.
10753
107542009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10755
10756 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10757 (SPUFS_MAGIC): Define.
10758 (spu_enumerate_spu_ids): New function.
10759 (linux_qxfer_spu): New function.
10760 (linux_target_ops): Install linux_qxfer_spu.
10761
107622009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10763
10764 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10765 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10766 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10767 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10768 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10769 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10770 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10771 (init_registers_powerpc_cell32l): Add prototype.
10772 (init_registers_powerpc_cell64l): Likewise.
10773 (ppc_arch_setup): Detect Cell/B.E. architecture.
10774
107752009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10776
10777 * Makefile.in (datarootdir): New variable.
10778
107792009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10780
10781 * linux-low.c (linux_write_memory): Update debugging output.
10782 * Makefile.in (clean): Add new descriptions.
10783 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10784 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10785 * configure.srv: Add new files for arm*-*-linux*.
10786 * linux-arm-low.c: Add new declarations.
10787 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10788 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10789 (HWCAP_VFPv3D16): New.
10790 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10791 instead of __IWMMXT__.
10792 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10793 (arm_arch_setup): New.
10794 (target_regsets): Remove #ifdef. Add VFP regset.
10795 (the_low_target): Use arm_arch_setup.
10796
107972009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10798
10799 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10800 the main thread again.
10801
108022009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10803
10804 Adding Neutrino gdbserver.
10805 * configure: Regenerated.
10806 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10807 * configure.srv (i[34567]86-*-nto*): New target.
10808 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10809 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10810 (nto_comctrl) [__QNX__]: New function.
10811 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10812
108132009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
10814
10815 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10816 srv_tgtobj.
10817
108182009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10819 Pedro Alves <pedro@codesourcery.com>
10820
10821 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10822 don't support CONTEXT_EXTENDED_REGISTERS.
10823 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10824 (the_low_target): Install them.
10825 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10826 failing with ERROR_PIPE_NOT_CONNECTED.
10827
108282009-06-30 Doug Evans <dje@google.com>
10829 Pierre Muller <muller@ics.u-strasbg.fr>
10830
10831 Add h/w watchpoint support to x86-linux, win32-i386.
10832 * Makefile.in (SFILES): Add i386-low.c
10833 (i386_low_h): Define.
10834 (i386-low.o): Add dependencies.
10835 (linux-x86-low.o): Add i386-low.h dependency.
10836 (win32-i386-low.o): Ditto.
10837 * i386-low.c: New file.
10838 * i386-low.h: New file.
10839 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10840 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10841 * linux-low.c (linux_add_process): Initialize arch_private.
10842 (linux_remove_process): Free arch_private.
10843 (add_lwp): Initialize arch_private.
10844 (delete_lwp): Free arch_private.
10845 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10846 provided.
10847 * linux-low.h (process_info_private): New member arch_private.
10848 (lwp_info): New member arch_private.
10849 (linux_target_ops): New members new_process, new_thread,
10850 prepare_to_resume.
10851 (ptid_of): New macro.
10852 * linux-x86-low.c: Include stddef.h, i386-low.h.
10853 (arch_process_info): New struct.
10854 (arch_lwp_info): New struct.
10855 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10856 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10857 (i386_dr_low_get_status): New function.
10858 (x86_insert_point, x86_remove_point): New functions.
10859 (x86_stopped_by_watchpoint): New function.
10860 (x86_stopped_data_address): New function.
10861 (x86_linux_new_process, x86_linux_new_thread): New functions.
10862 (x86_linux_prepare_to_resume): New function.
10863 (the_low_target): Add entries for insert_point, remove_point,
10864 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10865 prepare_to_resume.
10866 * server.c (debug_hw_points): New global.
10867 (monitor_show_help): Document set debug-hw-points.
10868 (handle_query): Process "set debug-hw-points".
10869 * server.h (debug_hw_points): Declare.
10870 (paddress): Declare.
10871 * utils.c (NUMCELLS, CELLSIZE): New macros.
10872 (get_sell, xsnprintf, paddress): New functions.
10873 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10874 remove_point, stopped_by_watchpoint, stopped_data_address.
10875 * win32-i386-low.c: Include i386-low.h.
10876 (debug_reg_state): Replaces dr.
10877 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10878 (i386_dr_low_get_status): New function.
10879 (i386_insert_point, i386_remove_point): New functions.
10880 (i386_stopped_by_watchpoint): New function.
10881 (i386_stopped_data_address): New function.
10882 (i386_initial_stuff): Update.
10883 (get_thread_context,set_thread_context,i386_thread_added): Update.
10884 (the_low_target): Add entries for insert_point,
10885 remove_point, stopped_by_watchpoint, stopped_data_address.
10886 * win32-low.c (win32_insert_watchpoint): New function.
10887 (win32_remove_watchpoint): New function.
10888 (win32_stopped_by_watchpoint): New function.
10889 (win32_stopped_data_address): New function.
10890 (win32_target_ops): Add entries for insert_watchpoint,
10891 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10892 * win32-low.h (win32_target_ops): New members insert_point,
10893 remove_point, stopped_by_watchpoint, stopped_data_address.
10894
108952009-06-25 Pedro Alves <pedro@codesourcery.com>
10896
10897 * server.c (process_serial_event): Re-return unsupported, not
10898 error, if the type isn't recognized. Re-allow supporting only
10899 insert or remove packets. Also call require_running for
10900 breakpoints. Add missing break statement to default case. Tidy.
10901 * target.h (struct target_ops): Rename insert_watchpoint to
10902 insert_point, and remove_watchpoint to remove_point.
10903
10904 * linux-low.h (struct linux_target_ops): Likewise.
10905 * linux-low.c (linux_insert_watchpoint): Rename to ...
10906 (linux_insert_point): ... this. Adjust.
10907 (linux_remove_watchpoint): Rename to ...
10908 (linux_remove_point): ... this. Adjust.
10909 (linux_target_ops): Adjust.
10910 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10911 (cris_insert_point): ... this.
10912 (cris_remove_watchpoint): Rename to ...
10913 (cris_remove_point): ... this.
10914 (the_low_target): Adjust.
10915
109162009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10917
10918 * server.c (handle_v_kill): Pass signal_pid to
10919 kill_inferior if multi_process is zero.
10920
109212009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10922
10923 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10924 * target.h (target_ops): Comment for *_watchpoint to make it clear
10925 the functions can get types '0' and '1'.
10926
109272009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10928
10929 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10930 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10931 * regcache.c (get_regcache): Likewise.
10932 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10933 * win32-low.c (child_fetch_inferior_registers): Remove check for
10934 regno 0.
10935
109362009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10937 Pedro Alves <pedro@codesourcery.com>
10938
10939 * target.h (struct target_ops) <supports_multi_process>: New
10940 callback.
10941 (target_supports_multi_process): New.
10942 * server.c (handle_query): Even if GDB reports support, only
10943 enable multi-process if the target also supports it. Report
10944 multi-process support only if the target backend supports it.
10945 * linux-low.c (linux_supports_multi_process): New function.
10946 (linux_target_ops): Install it as target_supports_multi_process
10947 callback.
10948
109492009-05-24 Doug Evans <dje@google.com>
10950
10951 Global renaming of find_thread_pid to find_thread_ptid.
10952 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10953 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10954 All callers updated.
10955
10956 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10957 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10958 directly.
10959
10960 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10961 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10962 (linux_resume_one_lwp): Ditto.
10963
109642009-05-23 Doug Evans <dje@google.com>
10965
10966 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10967 from struct inferior_list_entry * to struct lwp_info *.
10968 All callers updated.
10969
109702009-05-13 Doug Evans <dje@google.com>
10971
10972 * linux-x86-low.c: Don't include assert.h.
10973 (x86_siginfo_fixup): Use fatal, not assert.
10974 (x86_arch_setup): Fix comment.
10975
109762009-05-12 Doug Evans <dje@google.com>
10977
10978 Biarch support for i386/amd64 gdbserver.
10979 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10980 Add linux-x86-low.c.
10981 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10982 (linux-x86-low.o): Add.
10983 * linux-x86-64-low.c: Delete.
10984 * linux-i386-low.c: Delete.
10985 * linux-x86-low.c: New file.
10986 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10987 linux-x86-low.o.
10988 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10989 linux-x86-low.o.
10990 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10991 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10992 (linux_child_pid_to_exec_file): New function.
10993 (elf_64_header_p, elf_64_file_p): New functions.
10994 (siginfo_fixup): New function.
10995 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10996 give target a chance to convert layout.
10997 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10998 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10999
110002009-05-07 Doug Evans <dje@google.com>
11001
11002 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11003 (regsets_store_inferior_registers): Ditto.
11004
110052009-05-06 Pedro Alves <pedro@codesourcery.com>
11006
11007 PR server/10048
11008
11009 * linux-low.c (must_set_ptrace_flags): Delete.
11010 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11011 of the global.
11012 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11013 `lwp->must_set_ptrace_flags' instead.
11014 (linux_wait_for_event_1): Set ptrace options here.
11015 (linux_wait_1): ... not here.
11016
110172009-04-30 Doug Evans <dje@google.com>
11018
11019 * inferiors.c (started_inferior_callback): New function.
11020 (attached_inferior_callback): New function.
11021 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11022 * server.c (print_started_pid, print_attached_pid): New functions.
11023 (detach_or_kill_for_exit): New function.
11024 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11025 * server.h (have_started_inferiors_p): Declare.
11026 (have_attached_inferiors_p): Declare.
11027
11028 * inferiors.c (remove_process): Fix memory leak, free process.
11029 * linux-low.c (linux_remove_process): New function.
11030 (linux_kill): Call it instead of remove_process.
11031 (linux_detach, linux_wait_1): Ditto.
11032
110332009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11034
11035 * configure.srv: Add x86 Windows CE target.
11036
110372009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11038
11039 * inferiors.c (get_thread_process): Make global.
11040 * server.h (get_thread_process): Add prototype.
11041 * thread-db.c (find_one_thread): Use get_thread_process
11042 instead of current_process.
11043 (thread_db_get_tls_address): Do not crash if called when
11044 thread layer is not yet initialized.
11045
110462009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11047
11048 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11049 * spu-low.c (current_tid): Rename to ...
11050 (current_ptid): ... this.
11051 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11052 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11053 ptid_get_lwp (current_ptid) instead of current_tid.
11054 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11055 instead of current_tid. Use find_process_pid to verify pid
11056 argument is valid. Pass proper argument to remove_process.
11057 (spu_thread_alive): Compare current_ptid instead of current_tid.
11058 (spu_resume): Likewise.
11059
110602009-04-02 Pedro Alves <pedro@codesourcery.com>
11061
11062 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11063 variable.
11064
110652009-04-01 Pedro Alves <pedro@codesourcery.com>
11066
11067 Implement the multiprocess extensions, and add linux multiprocess
11068 support.
11069
11070 * server.h (ULONGEST): Declare.
11071 (struct ptid, ptid_t): New.
11072 (minus_one_ptid, null_ptid): Declare.
11073 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11074 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11075 (struct inferior_list_entry): Change `id' type from unsigned from
11076 to ptid_t.
11077 (struct sym_cache, struct breakpoint, struct
11078 process_info_private): Forward declare.
11079 (struct process_info): Declare.
11080 (current_process): Declare.
11081 (all_processes): Declare.
11082 (initialize_inferiors): Declare.
11083 (add_thread): Adjust to use ptid_t.
11084 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11085 (add_process, remove_process, find_thread_pid): Declare.
11086 (find_inferior_id): Adjust to use ptid_t.
11087 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11088 (multi_process): Declare.
11089 (push_event): Adjust to use ptid_t.
11090 (read_ptid, write_ptid): Declare.
11091 (prepare_resume_reply): Adjust to use ptid_t.
11092 (clear_symbol_cache): Declare.
11093 * inferiors.c (all_processes): New.
11094 (null_ptid, minus_one_ptid): New.
11095 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11096 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11097 (add_thread): Change unsigned long to ptid. Remove gdb_id
11098 parameter. Adjust.
11099 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11100 (gdb_id_to_thread): Rename to ...
11101 (find_thread_pid): ... this. Change unsigned long to ptid.
11102 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11103 (loaded_dll, pull_pid_from_list): Adjust.
11104 (add_process, remove_process, find_process_pid)
11105 (get_thread_process, current_process, initialize_inferiors): New.
11106 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11107 (struct target_waitstatus) <related_pid>: Ditto.
11108 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11109 return type to int.
11110 (struct target_ops) <join>: Add `pid' argument.
11111 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11112 (struct target_ops) <wait>: Add `ptid' field. Change return type
11113 to ptid.
11114 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11115 (mywait): Add `ptid' argument. Change return type to ptid_t.
11116 (target_pid_to_str): Declare.
11117 * target.c (set_desired_inferior): Adjust to use ptids.
11118 (mywait): Add new `ptid' argument. Adjust.
11119 (target_pid_to_str): New.
11120 * mem-break.h (free_all_breakpoints): Declare.
11121 * mem-break.c (breakpoints): Delelete.
11122 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11123 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11124 to use per-process breakpoint list.
11125 (free_all_breakpoints): New.
11126 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11127 (symbol_cache, all_symbols_looked_up): Delete.
11128 (hexchars): New.
11129 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11130 read_ptid): New.
11131 (prepare_resume_reply): Change ptid argument's type from unsigned
11132 long to ptid_t. Adjust. Implement W;process and X;process.
11133 (free_sym_cache, clear_symbol_cache): New.
11134 (look_up_one_symbol): Adjust to per-process symbol cache. *
11135 * server.c (cont_thread, general_thread, step_thread): Change type
11136 to ptid_t.
11137 (attached): Delete.
11138 (multi_process): New.
11139 (last_ptid): Change type to ptid_t.
11140 (struct vstop_notif) <ptid>: Change type to ptid_t.
11141 (queue_stop_reply, push_event): Change `ptid' argument's type to
11142 ptid_t.
11143 (discard_queued_stop_replies): Add `pid' argument.
11144 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11145 changes. Don't reference the `attached' global.
11146 (attach_inferior): Adjust to mywait interface changes.
11147 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11148 features. Handle and report "multiprocess+". Handle
11149 "qAttached:PID".
11150 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11151 changes.
11152 (handle_v_kill): New.
11153 (handle_v_stopped): Adjust to use target_pid_to_str.
11154 (handle_v_requests): Allow multiple attaches and runs when
11155 multiprocess extensions are in effect. Handle "vKill".
11156 (myresume): Adjust to use ptids.
11157 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11158 (handle_status): Adjust to discard_queued_stop_replies interface
11159 change.
11160 (first_thread_of, kill_inferior_callback)
11161 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11162 (main): Call initialize_inferiors. Adjust to use ptids, killing
11163 and detaching from all inferiors. Handle multiprocess packet
11164 variants.
11165 * linux-low.h: Include gdb_proc_service.h.
11166 (struct process_info_private): New.
11167 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11168 <lwpid_of>: Use ptid_get_lwp.
11169 (get_lwp_thread): Adjust.
11170 (struct lwp_info): Add `dead' member.
11171 (find_lwp_pid): Declare.
11172 * linux-low.c (thread_db_active): Delete.
11173 (new_inferior): Adjust comment.
11174 (inferior_pid): Delete.
11175 (linux_add_process): New.
11176 (handle_extended_wait): Adjust.
11177 (add_lwp): Change unsigned long to ptid.
11178 (linux_create_inferior): Add process to processes table. Adjust
11179 to use ptids. Don't set new_inferior here.
11180 (linux_attach_lwp): Rename to ...
11181 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11182 it. Adjust to use ptids.
11183 (linux_attach_lwp): New.
11184 (linux_attach): Add process to processes table. Don't set
11185 new_inferior here.
11186 (struct counter): New.
11187 (second_thread_of_pid_p, last_thread_of_process_p): New.
11188 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11189 multiple processes.
11190 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11191 processes. Remove process from process table.
11192 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11193 to multiple processes.
11194 (any_thread_of): New.
11195 (linux_detach): Add `pid' argument, and handle it. Remove process
11196 from processes table.
11197 (linux_join): Add `pid' argument. Handle it.
11198 (linux_thread_alive): Change unsighed long argument to ptid_t.
11199 Consider dead lwps as not being alive.
11200 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11201 threads we're not interested in.
11202 (same_lwp, find_lwp_pid): New.
11203 (linux_wait_for_lwp): Change `pid' argument's type from int to
11204 ptid_t. Adjust.
11205 (linux_wait_for_event): Rename to ...
11206 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11207 from int to ptid_t. Adjust.
11208 (linux_wait_for_event): New.
11209 (linux_wait_1): Add `ptid' argument. Change return type to
11210 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11211 that exit from the process table.
11212 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11213 Adjust.
11214 (mark_lwp_dead): New.
11215 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11216 stopping all threads, mark its main lwp as dead.
11217 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11218 ptids.
11219 (fetch_register, usr_store_inferior_registers)
11220 (regsets_fetch_inferior_registers)
11221 (regsets_store_inferior_registers, linux_read_memory)
11222 (linux_write_memory): Inline `inferior_pid'.
11223 (linux_look_up_symbols): Adjust to use per-process
11224 `thread_db_active'.
11225 (linux_request_interrupt): Adjust to use ptids.
11226 (linux_read_auxv): Inline `inferior_pid'.
11227 (initialize_low): Don't reference thread_db_active.
11228 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11229 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11230 (ps_getpid): Return the pid of the current inferior.
11231 * thread-db.c (proc_handle, thread_agent): Delete.
11232 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11233 per-process data.
11234 (find_one_thread): Change argument type to ptid_t. Adjust to
11235 per-process data.
11236 (maybe_attach_thread): Adjust to per-process data and ptids.
11237 (thread_db_find_new_threads): Ditto.
11238 (thread_db_init): Ditto.
11239 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11240 processes table. Adjust to use ptids.
11241 (spu_kill, spu_detach): Adjust interface. Remove process from
11242 processes table.
11243 (spu_join, spu_thread_alive): Adjust interface.
11244 (spu_wait): Adjust interface. Remove process from processes
11245 table. Adjust to use ptids.
11246 * win32-low.c (current_inferior_tid): Delete.
11247 (current_inferior_ptid): New.
11248 (debug_event_ptid): New.
11249 (thread_rec): Take a ptid. Adjust.
11250 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11251 (child_delete_thread): Ditto.
11252 (do_initial_child_stuff): Add `attached' argument. Add process to
11253 processes table.
11254 (child_fetch_inferior_registers, child_store_inferior_registers):
11255 Adjust.
11256 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11257 (win32_attach): Pass 1 to do_initial_child_stuff.
11258 (win32_kill): Adjust interface. Remove process from processes
11259 table.
11260 (win32_detach): Ditto.
11261 (win32_join): Adjust interface.
11262 (win32_thread_alive): Take a ptid.
11263 (win32_resume): Adjust to use ptids.
11264 (get_child_debug_event): Ditto.
11265 (win32_wait): Adjust interface. Remove exiting process from
11266 processes table.
11267
112682009-04-01 Pedro Alves <pedro@codesourcery.com>
11269
11270 Non-stop mode support.
11271
11272 * server.h (non_stop): Declare.
11273 (gdb_client_data, handler_func): Declare.
11274 (delete_file_handler, add_file_handler, start_event_loop):
11275 Declare.
11276 (handle_serial_event, handle_target_event, push_event)
11277 (putpkt_notif): Declare.
11278 * target.h (enum resume_kind): New.
11279 (struct thread_resume): Replace `step' field by `kind' field.
11280 (TARGET_WNOHANG): Define.
11281 (struct target_ops) <wait>: Add `options' argument.
11282 <supports_non_stop, async, start_non_stop>: New fields.
11283 (target_supports_non_stop, target_async): New.
11284 (start_non_stop): Declare.
11285 (mywait): Add `options' argument.
11286 * target.c (mywait): Add `options' argument. Print child exit
11287 notifications here.
11288 (start_non_stop): New.
11289 * server.c (non_stop, own_buf, mem_buf): New globals.
11290 (struct vstop_notif): New.
11291 (notif_queue): New global.
11292 (queue_stop_reply, push_event, discard_queued_stop_replies)
11293 (send_next_stop_reply): New.
11294 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11295 interface changes.
11296 (attach_inferior): In non-stop mode, don't wait for the target
11297 here.
11298 (handle_general_set): Handle QNonStop.
11299 (handle_query): When handling qC, return the current general
11300 thread, instead of the first thread of the list.
11301 (handle_query): If the backend supports non-stop mode, include
11302 QNonStop+ in the qSupported query response.
11303 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11304 and non-stop mode.
11305 (handle_v_attach, handle_v_run): Handle non-stop mode.
11306 (handle_v_stopped): New.
11307 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11308 (myresume): Adjust to use resume_kind. Handle non-stop.
11309 (queue_stop_reply_callback): New.
11310 (handle_status): Handle non-stop mode.
11311 (main): Clear non_stop flag on reconnection. Use the event-loop.
11312 Refactor serial protocol handling from here ...
11313 (process_serial_event): ... to this new function. When GDB
11314 selects any thread, select one here. In non-stop mode, wait until
11315 GDB acks all pending events before exiting.
11316 (handle_serial_event, handle_target_event): New.
11317 * remote-utils.c (remote_open): Install remote_desc in the event
11318 loop.
11319 (remote_close): Remove remote_desc from the event loop.
11320 (putpkt_binary): Rename to...
11321 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11322 (putpkt_binary): New as wrapper around putpkt_binary_1.
11323 (putpkt_notif): New.
11324 (prepare_resume_reply): In non-stop mode, don't change the
11325 general_thread.
11326 * event-loop.c: New.
11327 * Makefile.in (OBJ): Add event-loop.o.
11328 (event-loop.o): New rule.
11329
11330 * linux-low.h (pid_of): Moved here.
11331 (lwpid_of): New.
11332 (get_lwp_thread): Use lwpid_of.
11333 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11334 * linux-low.c (pid_of): Delete.
11335 (inferior_pid): Use lwpid_of.
11336 (linux_event_pipe): New.
11337 (target_is_async_p): New.
11338 (delete_lwp): New.
11339 (handle_extended_wait): Use lwpid_of.
11340 (add_lwp): Don't set lwpid field.
11341 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11342 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11343 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11344 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11345 first. Adjust to linux_wait_for_event interface changes. Use
11346 lwpid_of.
11347 (linux_detach): Don't delete the main lwp here.
11348 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11349 (status_pending_p): Don't consider explicitly suspended lwps.
11350 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11351 pointer. Add OPTIONS argument. Change return type to int. Use
11352 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11353 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11354 pointer. Add status pointer argument. Return a pid instead of a
11355 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11356 changes. In non-stop mode, don't switch to a random thread.
11357 (linux_wait): Rename to...
11358 (linux_wait_1): ... this. Add target_options argument, and handle
11359 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11360 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11361 clean exit and signal exit code. Don't stop all threads in
11362 non-stop mode. In all-stop mode, only stop all threads when
11363 reporting a stop to GDB. Handle explicit thread stop requests.
11364 (async_file_flush, async_file_mark): New.
11365 (linux_wait): New.
11366 (send_sigstop): Use lwpid_of.
11367 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11368 interface changes. In non-stop mode, don't switch to a random
11369 thread.
11370 (linux_resume_one_lwp): Use lwpid_of.
11371 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11372 (linux_resume_one_thread): ... this. Handle resume_stop. In
11373 non-stop mode, don't look for pending flag in all threads.
11374 (resume_status_pending_p): Don't consider explicitly suspended
11375 threads.
11376 (my_waitpid): Reimplement. Emulate __WALL.
11377 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11378 Use lwpid_of.
11379 (sigchld_handler, linux_supports_non_stop, linux_async)
11380 (linux_start_non_stop): New.
11381 (linux_target_ops): Register linux_supports_non_stop, linux_async
11382 and linux_start_non_stop.
11383 (initialize_low): Install SIGCHLD handler.
11384 * thread-db.c (thread_db_create_event, find_one_thread)
11385 (thread_db_get_tls_address): Use lwpid_of.
11386 * win32-low.c (win32_detach): Adjust to use resume_kind.
11387 (win32_wait): Add `options' argument.
11388 * spu-low.c (spu_resume): Adjust to use resume_kind.
11389 (spu_wait): Add `options' argument.
11390
113912009-04-01 Pedro Alves <pedro@codesourcery.com>
11392
11393 Decouple target code from remote protocol.
11394
11395 * target.h (enum target_waitkind): New.
11396 (struct target_waitstatus): New.
11397 (struct target_ops) <wait>: Return an unsigned long. Take a
11398 target_waitstatus pointer instead of a char pointer.
11399 (mywait): Likewise.
11400 * target.c (mywait): Change prototype to return an unsigned long.
11401 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11402 * server.h (thread_from_wait, old_thread_from_wait): Delete
11403 declarations.
11404 (prepare_resume_reply): Change prototype to take a
11405 target_waitstatus.
11406 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11407 (last_status, last_ptid): New.
11408 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11409 pid instead of a signal.
11410 (attach_inferior): Remove "status" and "signal" parameters.
11411 Adjust.
11412 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11413 not as an address.
11414 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11415 (handle_v_requests, myresume): Remove "status" and "signal"
11416 parameters. Adjust.
11417 (handle_status): New.
11418 (main): Delete local `status'. Adjust.
11419 * remote-utils.c: Include target.h.
11420 (prepare_resume_reply): Change prototype to take a
11421 target_waitstatus. Adjust.
11422
11423 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11424 interface.
11425 * spu-low.c (spu_wait): Adjust.
11426 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11427 Delete.
11428 (win32_wait): Adjust.
11429
114302009-04-01 Pedro Alves <pedro@codesourcery.com>
11431
11432 * target.h (struct thread_resume): Delete leave_stopped member.
11433 (struct target_ops): Add a `n' argument to the `resume' callback.
11434 * server.c (start_inferior): Adjust.
11435 (handle_v_cont, myresume): Adjust.
11436 * linux-low.c (check_removed_breakpoint): Adjust to resume
11437 interface change, and to removed leave_stopped field.
11438 (resume_ptr): Delete.
11439 (struct thread_resume_array): New.
11440 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11441 resume interface change.
11442 (linux_continue_one_thread, linux_queue_one_thread)
11443 (resume_status_pending_p): Check if the resume field is NULL
11444 instead of checking the leave_stopped member.
11445 (linux_resume): Adjust to the target resume interface change.
11446 * spu-low.c (spu_resume): Adjust to the target resume interface
11447 change.
11448 * win32-low.c (win32_detach, win32_resume): Ditto.
11449
114502009-04-01 Pedro Alves <pedro@codesourcery.com>
11451
11452 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11453 flag.
11454 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11455 pending.
11456 (linux_continue_one_thread): Only preserve the stepping flag if
11457 there's a pending breakpoint.
11458
114592009-03-31 Pedro Alves <pedro@codesourcery.com>
11460
11461 * server.c (main): After the inferior having exited, call
11462 remote_close before exiting gdbserver.
11463
114642009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11465
11466 Fix size of FPSCR in Power 7 processors.
11467 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11468 (PPC_FEATURE_HAS_DFP): New #define.
11469 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11470 size of the FPSCR.
11471
114722009-03-23 Pedro Alves <pedro@codesourcery.com>
11473
11474 * server.c (handle_query) Whitespace and formatting.
11475
114762009-03-22 Pedro Alves <pedro@codesourcery.com>
11477
11478 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11479 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11480 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11481 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11482 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11483 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11484 Makefile.in, configure.ac: Fix whitespace throughout.
11485 * configure: Regenerate.
11486
114872009-03-22 Pedro Alves <pedro@codesourcery.com>
11488
11489 * inferiors.c (find_inferior): Make it safe for the callback
11490 function to delete the currently iterated inferior.
11491
114922009-03-22 Pedro Alves <pedro@codesourcery.com>
11493
11494 * Makefile.in (linuw_low_h): Move higher.
11495 (thread-db.o): Depend on $(linux_low_h).
11496
114972009-03-17 Pedro Alves <pedro@codesourcery.com>
11498
11499 Rename "process" to "lwp" throughout.
11500
11501 * linux-low.c (all_processes): Rename to...
11502 (all_lwps): ... this.
11503 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11504 (add_process): Rename to ...
11505 (add_lwp): ... this. Adjust.
11506 (linux_create_inferior): Adjust.
11507 (linux_attach_lwp): Adjust.
11508 (linux_attach): Adjust.
11509 (linux_kill_one_process): Rename to ...
11510 (linux_kill_one_lwp): ... this. Adjust.
11511 (linux_kill): Adjust.
11512 (linux_detach_one_process): Rename to ...
11513 (linux_detach_one_lwp): ... this. Adjust.
11514 (linux_detach): Adjust.
11515 (check_removed_breakpoint): Adjust.
11516 (status_pending_p): Adjust.
11517 (linux_wait_for_process): Rename to ...
11518 (linux_wait_for_lwp): ... this. Adjust.
11519 (linux_wait_for_event): Adjust.
11520 (send_sigstop): Adjust.
11521 (wait_for_sigstop): Adjust.
11522 (stop_all_processes): Rename to ...
11523 (stop_all_lwps): ... this.
11524 (linux_resume_one_process): Rename to ...
11525 (linux_resume_one_lwp): ... this. Adjust.
11526 (linux_set_resume_request, linux_continue_one_thread)
11527 (linux_queue_one_thread, resume_status_pending_p)
11528 (usr_store_inferior_registers, regsets_store_inferior_registers)
11529 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11530 Adjust.
11531 * linux-low.h (get_process): Rename to ...
11532 (get_lwp): ... this. Adjust.
11533 (get_thread_process): Rename to ...
11534 (get_thread_lwp): ... this. Adjust.
11535 (get_process_thread): Rename to ...
11536 (get_lwp_thread): ... this. Adjust.
11537 (struct process_info): Rename to ...
11538 (struct lwp_info): ... this.
11539 (all_processes): Rename to ...
11540 (all_lwps): ... this.
11541 * proc-service.c (ps_lgetregs): Adjust.
11542 * thread-db.c (thread_db_create_event, find_one_thread)
11543 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11544
115452009-03-14 Pedro Alves <pedro@codesourcery.com>
11546
11547 * server.c (handle_query): Handle "qAttached".
11548
115492009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11550
11551 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11552 GPLv3, update license URL.
11553
115542009-03-01 Doug Evans <dje@google.com>
11555
11556 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11557 (server_h): Add gdb_signals.h.
11558 (signals.o): Update.
11559 * server.h (target_signal_from_host,target_signal_to_host_p)
11560 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11561
115622009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11563
11564 * remote-utils.c (getpkt): Also generate remote-debug
11565 information if noack_mode is set.
11566
115672009-02-06 Pedro Alves <pedro@codesourcery.com>
11568
11569 * server.c (handle_query): Report qXfer:siginfo:read and
11570 qXfer:siginfo:write as supported and handle them.
11571 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11572 * linux-low.c (linux_xfer_siginfo): New.
11573 (linux_target_ops): Set it.
11574
115752009-01-26 Pedro Alves <pedro@codesourcery.com>
11576
11577 * server.c (gdbserver_usage): Mention --remote-debug.
11578 (main): Accept '--remote-debug' switch.
11579
115802009-01-18 Doug Evans <dje@google.com>
11581
11582 * regcache.c (new_register_cache): No need to check result of xcalloc.
11583 * server.c (handle_search_memory): Back out calls to xmalloc,
11584 result is checked and error is returned to user upon failure.
11585 (handle_query): Ditto. Add more checks for result of malloc.
11586 (handle_v_cont): Check result of malloc, report error back to
11587 user upon failure.
11588 (handle_v_run): Ditto. Call freeargv.
11589 * server.h (freeargv): Declare.
11590 * utils.c (freeargv): New fn.
11591
115922009-01-15 Doug Evans <dje@google.com>
11593
11594 * gdbreplay.c (perror_with_name): Make arg const char *.
11595 * server.h (target_signal_to_name): Make return type const char *.
11596 * thread-db.c (thread_db_err_str): Make return type const char *.
11597 * utils.c (perror_with_name): Make arg const char *.
11598
115992009-01-14 Pedro Alves <pedro@codesourcery.com>
11600
11601 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11602 when handling a EXIT_PROCESS_DEBUG_EVENT.
11603
116042009-01-06 Joel Brobecker <brobecker@adacore.com>
11605
11606 * gdbreplay.c (gdbreplay_version): Update copyright year.
11607 * server.c (gdbserver_version): Likewise.
11608
116092009-01-05 Doug Evans <dje@google.com>
11610
11611 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11612 (handle_extended_wait): Improve comment.
11613
116142008-12-13 Doug Evans <dje@google.com>
11615
11616 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11617 * server.h (ATTR_MALLOC): New macro.
11618 (xmalloc,xcalloc,xstrdup): Declare.
11619 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11620 * inferiors.c: Ditto.
11621 * linux-low.c: Ditto.
11622 * mem-break.c: Ditto.
11623 * regcache.c: Ditto.
11624 * remote-utils.c: Ditto.
11625 * server.c: Ditto.
11626 * target.c: Ditto.
11627 * win32-low.c: Ditto.
11628
116292008-12-12 Doug Evans <dje@google.com>
11630
11631 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11632 in debugging printf.
11633
11634 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11635
116362008-12-09 Doug Evans <dje@google.com>
11637
11638 * linux-low.h (struct process_info): Delete member tid, unused.
11639 * thread-db.c (find_one_thread): Update.
11640 (maybe_attach_thread): Update.
11641
116422008-12-02 Pedro Alves <pedro@codesourcery.com>
11643
11644 * target.h (struct target_ops): Add qxfer_osdata member.
11645 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11646 and dirent.h.
11647 (linux_qxfer_osdata): New functions.
11648 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11649 callback.
11650 * server.c (handle_query): Handle "qXfer:osdata:read:".
11651 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11652 (buffer_xml_printf): New functions.
11653 * server.h (struct buffer): New.
11654 (buffer_grow_str, buffer_grow_str0): New macros.
11655 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11656 (buffer_xml_printf): Declare.
11657
116582008-11-24 Doug Evans <dje@google.com>
11659
11660 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11661
116622008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11663
11664 * server.c (handle_v_run): Always use the supplied argument list.
11665
116662008-11-19 Bob Wilson <bob.wilson@acm.org>
11667
11668 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11669 (xtensa_regmap_table): Add entry for scompare1.
11670
116712008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11672
11673 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11674 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11675 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11676 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11677 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11678 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11679 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11680 XML target descriptions.
11681 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11682 when inferior is running on an ISA 2.05 or later processor. Add
11683 special case to return offset for full 64-bit slot of FPSCR when
11684 in 32-bits.
11685
116862008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11687
11688 * Makefile.in (SFILES, clean): Added sparc64 files.
11689 (reg-sparc64.o, reg-sparc64.c): New.
11690 * configure.srv (sparc*-*-linux*): New configuration.
11691 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11692 syscall arguments for SPARC.
11693 (regsets_store_inferior_registers): Likewise.
11694 * linux-sparc-low.c: New file.
11695
116962008-10-21 Doug Evans <dje@google.com>
11697
11698 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11699 (READLINE_DIR,READLINE_DEP): Delete.
11700 (INTERNAL_CFLAGS): Update.
11701 (LINTFLAGS): Update.
11702
117032008-10-10 Pedro Alves <pedro@codesourcery.com>
11704
11705 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11706 whole argv from the last run, not just argv[0].
11707
117082008-09-08 Pedro Alves <pedro@codesourcery.com>
11709
11710 * regcache.c (new_register_cache): Return NULL if the register
11711 cache size isn't known yet.
11712 (free_register_cache): Avoid dereferencing a NULL regcache.
11713
117142008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11715
11716 * configure.srv: Merge MIPS and MIPS64.
11717
117182008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11719
11720 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11721
117222008-08-18 Luis Machado <luisgpm@br.ibm.com>
11723
11724 * Makefile.in: Add required vsx dependencies.
11725
11726 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11727 Declare init_registers_powerpc_vsx32l.
11728 Declare init_registers_powerpc_vsx64l.
11729 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11730 (ppc_arch_setup): Check for VSX in hwcap.
11731 (ppc_fill_vsxregset): New function.
11732 (ppc_store_vsxregset): New function.
11733 Add new VSX entry in regset_info target_regsets.
11734
11735 * configure.srv: Add new VSX dependencies.
11736
117372008-08-12 Pedro Alves <pedro@codesourcery.com>
11738
11739 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11740 (remote_open): Set or clear transport_is_reliable.
11741 (putpkt_binary): Don't expect acks in noack mode.
11742 (getpkt): Don't send ack/nac in noack mode.
11743 * server.c (handle_general_set): Handle QStartNoAckMode.
11744 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11745 qSupported.
11746 (main): Reset noack_mode on every connection.
11747 * server.h (noack_mode): Declare.
11748
117492008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11750
11751 * Makefile.in (GDBREPLAY_OBS): New variable.
11752 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11753
117542008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11755 Daniel Jacobowitz <dan@codesourcery.com>
11756
11757 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11758 (usr_store_inferior_registers): Likewise.
11759 (regsets_store_inferior_registers): Likewise.
11760
117612008-07-31 Rolf Jansen <rj@surtec.com>
11762 Pedro Alves <pedro@codesourcery.com>
11763
11764 * configure.ac: Check for memmem declaration.
11765 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11766 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11767 (disable_packet_qfThreadInfo): Unconditionally compile.
11768 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11769 * configure, config.in: Regenerate.
11770
117712008-07-28 Doug Kwan <dougkwan@google.com>
11772
11773 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11774 (linux_write_memory): Remove declaration of errno.
11775
117762008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11777
11778 * linux-low.c (handle_extended_wait): Do not use "status"
11779 variable uninitialized.
11780
117812008-07-07 Pedro Alves <pedro@codesourcery.com>
11782
11783 * server.c (handle_v_attach): Inhibit reporting dll changes.
11784
117852008-06-27 Pedro Alves <pedro@codesourcery.com>
11786
11787 * remote-utils.c (prepare_resume_reply): If requested, don't
11788 output "thread:TID" in the T stop reply.
11789
11790 * server.c (disable_packet_vCont, disable_packet_Tthread)
11791 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11792 (handle_query): If requested, disable support for qC, qfThreadInfo
11793 and qsThreadInfo.
11794 (handle_v_requests): If requested, disable support for vCont.
11795 (gdbserver_show_disableable): New.
11796 (main): Handle --disable-packet and --disable-packet=LIST.
11797
11798 * server.h (disable_packet_vCont, disable_packet_Tthread)
11799 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11800
118012008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11802
11803 * server.c (gdbserver_usage): Mention --version.
11804
118052008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11806
11807 * Makefile.in (gdbreplay.o): New rule.
11808
118092008-06-06 Joseph Myers <joseph@codesourcery.com>
11810
11811 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11812 message, not gdbserver.
11813
118142008-06-05 Vladimir Prus <vladimir@codesourcery.com>
11815 Nathan Sidwell <nathan@codesourcery.com>
11816 Joseph Myers <joseph@codesourcery.com>
11817
11818 * acinclude.m4: Include ../../config/acx.m4.
11819 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11820 * configure, config.in: Regenerate.
11821 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11822 * server.c (gdbserver_version): Print PKGVERSION.
11823 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11824 (main): Adjust gdbserver_usage calls.
11825 * gdbreplay.c (version, host_name): Add declarations.
11826 (gdbreplay_version, gdbreplay_usage): New.
11827 (main): Accept --version and --help options.
11828
118292008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11830
11831 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11832 (arm_breakpoint_at): Handle Thumb.
11833 (the_low_target): Add comment.
11834
118352008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11836
11837 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11838
118392008-05-09 Doug Evans <dje@google.com>
11840
11841 * server.h (decode_search_memory_packet): Declare.
11842 * remote-utils.c (decode_search_memory_packet): New fn.
11843 * server.c (handle_search_memory_1): New fn.
11844 (handle_search_memory): New fn.
11845 (handle_query): Process qSearch:memory packets.
11846
118472008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11848
11849 * regcache.c (registers_length): Remove.
11850 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11851 full register packet.
11852 * regcache.h (registers_length): Remove prototype.
11853 * server.h (PBUFSIZ): Define to 16384.
11854
118552008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11856
11857 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11858 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11859 powerpc-64l.o, and powerpc-altivec64l.o.
11860 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11861 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11862 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11863 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11864 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11865 to srv_xmlfiles.
11866
11867 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11868 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11869 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11870 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11871 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11872 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11873 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11874 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11875 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11876 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11877 (clean): Update.
11878
11879 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11880 (init_registers_powerpc_32l): ... this new prototype.
11881 (init_registers_powerpc_32): Remove, replace by ...
11882 (init_registers_powerpc_altivec32l): ... this new prototype.
11883 (init_registers_powerpc_e500): Remove, replace by ...
11884 (init_registers_powerpc_e500l): ... this new prototype.
11885 (init_registers_ppc64): Remove, replace by ...
11886 (init_registers_powerpc_64l): ... this new prototype.
11887 (init_registers_powerpc_64): Remove, replace by ...
11888 (init_registers_powerpc_altivec64l): ... this new prototype.
11889 (ppc_num_regs): Set to 73.
11890 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11891 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11892 (ppc_cannot_store_register): Handle orig_r3 and trap.
11893 (ppc_arch_setup): Update init_registers_... calls.
11894 (ppc_fill_gregset): Handle orig_r3 and trap.
11895
11896 * inferiors.c (clear_inferiors): Reset current_inferior.
11897
118982008-04-23 Paolo Bonzini <bonzini@gnu.org>
11899
11900 * acinclude.m4: Add override.m4.
11901 * configure: Regenerate.
11902
119032008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11904
11905 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11906 initial call to init_register_ppc64.
11907
119082008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11909
11910 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11911 single powerpc*-*-linux* case.
11912 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11913
119142008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11915
11916 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11917 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11918 from reg_xmlfiles.
11919 * linux-ppc-low.c: Include <elf.h>.
11920 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11921 (ppc_hwcap): New global variable.
11922 (ppc_regmap): Remove __SPE__ #ifdef sections.
11923 (ppc_regmap_e500): New global variable.
11924 (ppc_cannot_store_register): Update __SPE__ special case.
11925 (ppc_get_hwcap): New function.
11926 (ppc_arch_setup): Use it to determine whether inferior supports
11927 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11928 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11929 Do not access registers if target does not support AltiVec.
11930 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11931 Do not access registers if target does not support SPE.
11932 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11933
119342008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11935
11936 * linux-low.c (disabled_regsets, num_regsets): New.
11937 (use_regsets_p): Delete.
11938 (linux_wait_for_process): Clear disabled_regsets.
11939 (regsets_fetch_inferior_registers): Check and set it.
11940 (regsets_store_inferior_registers): Likewise.
11941 (linux_fetch_registers, linux_store_registers): Do not use
11942 use_regsets_p.
11943 (initialize_low): Allocate disabled_regsets.
11944
119452008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11946
11947 * Makefile.in (LIBOBJS): New.
11948 (OBS): Use LIBOBJS.
11949 (memmem.o): New rule.
11950 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11951 * configure: Regenerated.
11952
119532008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11954
11955 * server.c (handle_query): Never return "unsupported" for
11956 qXfer:features:read queries.
11957
119582008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11959
11960 * server.c (get_features_xml): Fix inverted condition.
11961 (handle_query): Always support qXfer:feature:read.
11962
119632008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11964
11965 * server.c (wrapper_argv): New.
11966 (start_inferior): Handle wrapper_argv. If set, expect an extra
11967 trap.
11968 (gdbserver_usage): Document --wrapper.
11969 (main): Parse --wrapper.
11970
119712008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11972
11973 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11974 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11975 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11976 (ppc_set_pc): Likewise.
11977 (ppc_arch_setup): New function.
11978 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11979 of collect_register.
11980 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11981
119822008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11983
11984 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11985 instead of linux-ppc64-low.o.
11986 * linux-ppc64-low.c: Remove file.
11987 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11988 (linux-ppc64-low.o): Remove rule.
11989
11990 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11991 (init_registers_powerpc_64): Likewise.
11992 (ppc_regmap): Conditionally define depending on __powerpc64__.
11993 (ppc_cannot_store_register): Do not special-case "fpscr" when
11994 compiled on __powerpc64__.
11995 (ppc_collect_ptrace_register): New function.
11996 (ppc_supply_ptrace_register): New function.
11997 (ppc_breakpoint): Change type to "unsigned int".
11998 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11999 (the_low_target): Conditionally provide initializers for the
12000 arch_setup member depending on __powerpc64__. Install
12001 collect_ptrace_register and supply_ptrace_register members.
12002
120032008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12004
12005 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12006 * server.c (gdbserver_xmltarget): Define.
12007 (get_features_xml): Use it to replace "target.xml" and arch_string.
12008
12009 * configure.srv: Remove srv_xmltarget. Add XML files that were
12010 mentioned there to srv_xmlfiles instead. Remove conditional tests
12011 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12012 srv_xmlfiles and srv_regobj to include all possible choices.
12013 * configure.ac (srv_xmltarget): Remove.
12014 (srv_xmlfiles): Do not add "target.xml".
12015 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12016 checks for supplementary target information.
12017 * configure: Regenerate.
12018 * Makefile.in (XML_TARGET): Remove.
12019 (target.xml): Remove rule.
12020 (clean): Do not clean up target.xml.
12021 (.PRECIOUS): Do not mention target.xml.
12022
12023 * target.h (struct target_ops): Remove arch_string member.
12024 * linux-low.c (linux_arch_string): Remove.
12025 (linux_target_ops): Remove arch_string initializer.
12026 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12027 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12028 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12029 * spu-low.c (spu_arch_string): Remove.
12030 (spu_target_ops): Remove arch_string initializer.
12031 * win32-low.c (win32_arch_string): Remove.
12032 (win32_target_ops): Remove arch_string initializer.
12033 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12034 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12035 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12036
120372008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12038
12039 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12040 by collect_ptrace_register and supply_ptrace_register hooks.
12041 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12042 instead of checking for the_low_target.left_pad_xfer.
12043 (usr_store_inferior_registers): Use collect_ptrace_register callback
12044 instead of checking for the_low_target.left_pad_xfer.
12045
12046 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12047 (s390_supply_ptrace_register): Likewise.
12048 (s390_fill_gregset): Call s390_collect_ptrace_register.
12049 (the_low_target): Update.
12050
12051 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12052 (ppc_supply_ptrace_register): Likewise.
12053 (the_low_target): Update.
12054
12055 * linux-i386-low.c (the_low_target): Update.
12056 * linux-x86-64-low.c (the_low_target): Update.
12057
120582008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12059
12060 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12061 reg-s390.o and reg-s390x.o.
12062
12063 * linux-low.c (new_inferior): New global variable.
12064 (linux_create_inferior, linux_attach): Set it.
12065 (linux_wait_for_process): Call the_low_target.arch_setup after the
12066 target has stopped for the first time.
12067 (initialize_low): Do not call the_low_target.arch_setup.
12068
12069 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12070 (s390_set_pc): Likewise.
12071 (s390_arch_setup): New function.
12072 (the_low_target): Use s390_arch_setup as arch_setup routine.
12073
12074 * regcache.c (realloc_register_cache): New function.
12075 (set_register_cache): Call it for each existing regcache.
12076
120772008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12078
12079 * server.h (init_registers): Remove prototype.
12080
12081 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12082 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12083 instead of init_registers ().
12084 * linux-arm-low.c (init_registers_arm): Add prototype.
12085 (init_registers_arm_with_iwmmxt): Likewise.
12086 (the_low_target): Add initializer for arch_setup field.
12087 * linux-cris-low.c (init_registers_cris): Add prototype.
12088 (the_low_target): Add initializer for arch_setup field.
12089 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12090 (the_low_target): Add initializer for arch_setup field.
12091 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12092 (the_low_target): Add initializer for arch_setup field.
12093 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12094 (the_low_target): Add initializer for arch_setup field.
12095 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12096 (the_low_target): Add initializer for arch_setup field.
12097 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12098 (the_low_target): Add initializer for arch_setup field.
12099 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12100 (init_registers_mips64_linux): Likewise.
12101 (the_low_target): Add initializer for arch_setup field.
12102 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12103 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12104 (the_low_target): Add initializer for arch_setup field.
12105 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12106 (init_registers_powerpc_64): Likewise.
12107 (the_low_target): Add initializer for arch_setup field.
12108 * linux-s390-low.c (init_registers_s390): Add prototype.
12109 (init_registers_s390x): Likewise.
12110 (the_low_target): Add initializer for arch_setup field.
12111 * linux-sh-low.c (init_registers_sh): Add prototype.
12112 (the_low_target): Add initializer for arch_setup field.
12113 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12114 (the_low_target): Add initializer for arch_setup field.
12115 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12116 (the_low_target): Add initializer for arch_setup field.
12117
12118 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12119 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12120 instead of init_registers ().
12121 * win32-arm-low.c (init_registers_arm): Add prototype.
12122 (the_low_target): Add initializer for arch_setup field.
12123 * win32-i386-low.c (init_registers_i386): Add prototype.
12124 (the_low_target): Add initializer for arch_setup field.
12125
12126 * spu-low.c (init_registers_spu): Add prototype.
12127 (initialize_low): Call initialie_registers_spu () instead of
12128 initialize_registers ().
12129
121302008-02-19 Pedro Alves <pedro@codesourcery.com>
12131
12132 * server.c (handle_v_requests): When handling the vRun and vAttach
12133 packets, if already debugging a process, don't kill it. Return an
12134 error instead.
12135
121362008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12137
12138 * server.c (handle_query): Correct length check.
12139
121402008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12141
12142 * win32-low.c (do_initial_child_stuff): Add process handle
12143 parameter. Set current_process_handle and current_process_id from the
12144 parameters. Clear globals.
12145 (win32_create_inferior): Don't set current_process_handle and
12146 current_process_id here. Instead pass them on the call to
12147 do_initial_child_stuff.
12148 (win32_attach): Likewise.
12149 (win32_clear_inferiors): New.
12150 (win32_kill): Don't close the current process handle or the
12151 current thread handle here. Instead call win32_clear_inferiors.
12152 (win32_detach): Don't open a new handle to the process. Call
12153 win32_clear_inferiors.
12154 (win32_join): Don't rely on current_process_handle; open a new
12155 handle using the process id.
12156 (win32_wait): Call win32_clear_inferiors when the inferior process
12157 has exited.
12158
121592008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12160
12161 * server.c (monitor_show_help): Add "exit".
12162
121632008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12164
12165 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12166 (clean): Add reg-xtensa.c.
12167 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12168 * configure.srv (xtensa*-*-linux*) New target.
12169 * linux-xtensa-low.c: New.
12170 * xtensa-xtregs.c: New.
12171
121722008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12173
12174 * hostio.c: Don't include errno.h.
12175 (errno_to_fileio_errno): Move to hostio-errno.
12176 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12177 error number outputting to the target->hostio_last_error callback.
12178 (hostio_packet_error): Use FILEIO_EINVAL directly.
12179 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12180 calls to hostio_error.
12181 * hostio-errno.c: New.
12182 * server.h (hostio_last_error_from_errno): Declare.
12183 * target.h (target_ops): Add hostio_last_error member.
12184 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12185 as hostio_last_error handler.
12186 * spu-low.c (spu_target_ops): Likewise.
12187 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12188 (wince_hostio_last_error): New functions.
12189 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12190 as hostio_last_error handler.
12191 (win32_target_ops) [!_WIN32_WCE]: Register
12192 hostio_last_error_from_errno as hostio_last_error handler.
12193 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12194 (hostio-errno.o): New rule.
12195 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12196 * configure.srv (srv_hostio_err_objs): New variable. Default to
12197 hostio-errno.o.
12198 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12199 * configure: Regenerate.
12200
122012008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12202
12203 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12204 (linux_kill, linux_detach): Clean up the process list.
12205 * remote-utils.c (remote_open): Improve port number parsing.
12206 (putpkt_binary, input_interrupt): Only send interrupts if the target
12207 is running.
12208 * server.c (extended_protocol): Make static.
12209 (attached): Define earlier.
12210 (exit_requested, response_needed, program_argv): New variables.
12211 (target_running): New.
12212 (start_inferior): Clear attached here.
12213 (attach_inferior): Set attached here.
12214 (require_running): Define.
12215 (handle_query): Use require_running and target_running. Implement
12216 "monitor exit".
12217 (handle_v_attach, handle_v_run): New.
12218 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12219 (gdbserver_usage): Update.
12220 (main): Redo argument parsing. Handle --debug and --multi. Handle
12221 --attach along with other options or after the port. Save
12222 program_argv. Support no initial program. Resynchronize
12223 communication with GDB after an error. Handle "monitor exit".
12224 Use require_running and target_running. Always allow the extended
12225 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12226 restart in extended mode.
12227 * README: Refer to the GDB manual. Update --attach usage.
12228
122292007-12-20 Andreas Schwab <schwab@suse.de>
12230
12231 * linux-low.c (STACK_SIZE): Define.
12232 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12233 (linux_test_for_tracefork): Likewise.
12234
122352007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12236
12237 * linux-low.c (linux_wait_for_event): Update messages. Do not
12238 reinsert auto-delete breakpoints.
12239 * mem-break.c (struct breakpoint): Change return type of handler to
12240 int.
12241 (set_breakpoint_at): Update handler type.
12242 (reinsert_breakpoint_handler): Return 1 instead of calling
12243 delete_breakpoint.
12244 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12245 setting a new one.
12246 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12247 * mem-break.h (set_breakpoint_at): Update handler type.
12248 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12249 * win32-low.c (auto_delete_breakpoint): New.
12250 (get_child_debug_event): Use it.
12251
122522007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12253
12254 * configure.ac: Check for pread and pwrite.
12255 * hostio.c (handle_pread): Fall back to lseek and read.
12256 (handle_pwrite): Fall back to lseek and write.
12257 * config.in, configure: Regenerated.
12258
122592007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12260
12261 * server.c (myresume): Add own_buf argument.
12262 (main): Update calls.
12263
122642007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12265
12266 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12267 * remote-utils.c (remote_open): Do not call disable_async_io.
12268 (block_async_io): Delete.
12269 (unblock_async_io): Make static.
12270 (initialize_async_io): New.
12271 * server.c (handle_v_cont): Handle async I/O here.
12272 (myresume): Likewise. Move other common resume tasks here...
12273 (main): ... from here. Call initialize_async_io. Disable async
12274 I/O before the main loop.
12275 * server.h (initialize_async_io): Declare.
12276 (block_async_io, unblock_async_io): Delete prototypes.
12277 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12278
122792007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12280
12281 * remote-utils.c (readchar): Allow binary data in received messages.
12282
122832007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12284
12285 * win32-low.c (attaching): New global.
12286 (win32_create_inferior): Clear the `attaching' global.
12287 (win32_attach): Set the `attaching' global.
12288 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12289 attaching. Only set a breakpoint at the entry point if not
12290 attaching.
12291
122922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12293
12294 * server.c (main): Don't report dll events on the initial
12295 connection on attaches.
12296
122972007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12298
12299 * server.c (main): Relax numerical bases supported for the pid of
12300 the --attach command line argument.
12301
123022007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12303
12304 * win32-low.c (win32_attach): Call OpenProcess before
12305 DebugActiveProcess, not after. Add last error output to error
12306 call.
12307
123082007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12309
12310 * win32-low.c (win32_get_thread_context)
12311 (win32_set_thread_context): New functions.
12312 (thread_rec): Use win32_get_thread_context.
12313 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12314 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12315 field.
12316
123172007-12-03 Leo Zayas
12318 Pedro Alves <pedro_alves@portugalmail.pt>
12319
12320 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12321 global variables.
12322 (child_add_thread): Minor cleanup.
12323 (child_continue): Resume artificially suspended threads before
12324 calling ContinueDebugEvent.
12325 (suspend_one_thread): New.
12326 (fake_breakpoint_event): New.
12327 (get_child_debug_event): Change return type to int. Check here if
12328 gdb sent an interrupt request. If a soft interrupt was requested,
12329 fake a breakpoint event. Return 0 if there is no event to handle,
12330 and 1 otherwise.
12331 (win32_wait): Don't check here if gdb sent an interrupt request.
12332 Ensure there is a valid event to handle.
12333 (win32_request_interrupt): Add soft interruption method as last
12334 resort.
12335
123362007-12-03 Leo Zayas
12337 Pedro Alves <pedro_alves@portugalmail.pt>
12338
12339 * win32-low.h (win32_thread_info): Add descriptions to the
12340 structure members. Replace `suspend_count' counter by a
12341 `suspended' flag.
12342 * win32-low.c (thread_rec): Update condition of when to get the
12343 context from the inferior. Rely on ContextFlags being set if it
12344 has already been retrieved. Only suspend the inferior thread if
12345 we haven't already. Warn if that fails.
12346 (continue_one_thread): s/suspend_count/suspended/. Only call
12347 ResumeThread once. Warn if that fails.
12348
123492007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12350
12351 * win32-low.c (win32_wait): Don't read from the inferior when it
12352 has already exited.
12353
123542007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12355
12356 * Makefile.in (win32_low_h): New variable.
12357 (win32-low.o): Add dependency on $(win32_low_h).
12358 (win32-arm-low.o, win32-i386-low.o): New rules.
12359
123602007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12361
12362 * hostio.c: Correct copyright year.
12363
123642007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12365
12366 * Makefile.in (OBS): Add hostio.o.
12367 (hostio.o): New rule.
12368 * server.h (handle_vFile): Declare.
12369 * hostio.c: New file.
12370 * server.c (handle_v_requests): Take packet_len and new_packet_len
12371 for binary packets. Call handle_vFile.
12372 (main): Update call to handle_v_requests.
12373
123742007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12375
12376 * linux-low.c: Include <sched.h>.
12377
123782007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12379
12380 * linux-low.c (linux_tracefork_grandchild): New.
12381 (linux_tracefork_child): Use clone.
12382 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12383
123842007-10-31 Joel Brobecker <brobecker@adacore.com>
12385
12386 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12387
123882007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12389
12390 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12391
123922007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12393
12394 * inferiors.c (change_inferior_id): Delete.
12395 (add_pid_to_list, pull_pid_from_list): New.
12396 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12397 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12398 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12399 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12400 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12401 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12402 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12403 (using_threads): Always set to 1.
12404 (handle_extended_wait): New.
12405 (add_process): Do not set TID.
12406 (linux_create_inferior): Set must_set_ptrace_flags.
12407 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12408 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12409 (linux_thread_alive): Rename TID argument to LWPID.
12410 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12411 (linux_wait_for_event): Do not use TID or check using_threads. Update
12412 call to dead_thread_notify. Call handle_extended_wait.
12413 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12414 (send_sigstop): Delete sigstop_sent.
12415 (wait_for_sigstop): Avoid TID.
12416 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12417 (linux_test_for_tracefork): New.
12418 (linux_lookup_signals): Use thread_db_active and
12419 linux_supports_tracefork_flag.
12420 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12421 * linux-low.h (get_process_thread): Avoid TID.
12422 (struct process_ifo): Move thread_known and tid to the end. Remove
12423 sigstop_sent.
12424 (linux_attach_lwp, thread_db_init): Update prototypes.
12425 * server.h (change_inferior_id): Delete prototype.
12426 (add_pid_to_list, pull_pid_from_list): New prototypes.
12427 * thread-db.c (thread_db_use_events): New.
12428 (find_first_thread): Rename to...
12429 (find_one_thread): ...this. Update callers and messages. Do not
12430 call fatal. Check thread_db_use_events. Do not call
12431 change_inferior_id or new_thread_notify.
12432 (maybe_attach_thread): Update. Do not call new_thread_notify.
12433 (thread_db_init): Set thread_db_use_events. Check use_events.
12434 * utils.c (fatal, warning): Correct message prefix.
12435
124362007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12437
12438 * Makefile.in (clean): Remove new files.
12439 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12440 (powerpc-64.o, powerpc-64.c): New rules.
12441 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12442 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12443 with SPE.
12444 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12445 SPE targets.
12446 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12447 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12448 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12449 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12450 (target_regsets): Add AltiVec and SPE register sets.
12451 * configure.ac: Check for AltiVec and SPE.
12452 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12453 (ppc_fill_vrregset, ppc_store_vrregset): New.
12454 (target_regsets): Add AltiVec register set.
12455 * configure: Regenerated.
12456
124572007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12458
12459 * linux-low.c (O_LARGEFILE): Define.
12460 (linux_read_memory): Use /proc/PID/mem.
12461 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12462 * configure, config.in: Regenerated.
12463
124642007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12465
12466 * linux-low.c (linux_wait_for_event): Do not pass signals while
12467 single-stepping.
12468
124692007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12470
12471 * win32-low.c (create_process): New.
12472 (win32_create_inferior): Use create_process instead of
12473 CreateProcess. If create_process failed retry appending an ".exe"
12474 suffix. Store the GetLastError result immediatelly after
12475 create_process calls and use it on the call to error.
12476
124772007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12478
12479 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12480
124812007-08-23 Joel Brobecker <brobecker@adacore.com>
12482
12483 * configure.ac: Switch license to GPLv3.
12484
124852007-08-01 Michael Snyder <msnyder@access-company.com>
12486
12487 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12488
124892007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12490
12491 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12492 typedef.
12493 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12494 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12495 CloseToolhelp32Snapshot.
12496 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12497 CloseToolhelp32Snapshot.
12498
124992007-07-27 Michael Snyder <michael.snyder@access-company.com>
12500
12501 * server.c (main): Check for inferior exit before main loop.
12502
125032007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12504
12505 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12506 instead of on tmp_desc.
12507
125082007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12509 Daniel Jacobowitz <dan@codesourcery.com>
12510
12511 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12512 (add_thread): Minor cleanups.
12513 (clear_inferiors): Move lower in the file. Clear the DLL
12514 list.
12515 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12516 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12517 (xml_escape_text): New.
12518 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12519 for qSupported.
12520 (handle_v_cont): Report errors.
12521 (gdbserver_version): Update.
12522 (main): Correct size of own_buf. Do not report initial DLL events.
12523 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12524 (unloaded_dll, xml_escape_text): New.
12525 * win32-low.c (enum target_waitkind): Update comments.
12526 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12527 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12528 (win32_EnumProcessModules, win32_GetModuleInformation)
12529 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12530 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12531 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12532 (win32_Module32First, win32_Module32Next, load_toolhelp)
12533 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12534 (get_child_debug_event): Handle DLL events.
12535 (win32_wait): Likewise.
12536
125372007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12538
12539 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12540 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12541
125422007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12543
12544 * win32-low.c (handle_output_debug_string): Ignore event if not
12545 waiting.
12546
125472007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12548
12549 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12550
125512007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12552
12553 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12554
125552007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12556
12557 * inferiors.c (change_inferior_id): Add comment.
12558 * linux-low.c (check_removed_breakpoint): Add an early
12559 prototype. Improve debug output.
12560 (linux_attach): Doc update.
12561 (linux_detach_one_process, linux_detach): Clean up before releasing
12562 each process.
12563 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12564 * linux-low.h (struct process_info): Doc improvement.
12565 * mem-break.c (delete_all_breakpoints): New.
12566 * mem-break.h (delete_all_breakpoints): New prototype.
12567 * thread-db.c (find_first_thread): New.
12568 (thread_db_create_event): Call it instead of
12569 thread_db_find_new_threads. Clean up unused variables.
12570 (maybe_attach_thread): Remove first thread handling.
12571 (thread_db_find_new_threads): Use find_first_thread.
12572 (thread_db_get_tls_address): Likewise.
12573
125742007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12575
12576 * thread-db.c (thread_db_find_new_threads): Add prototype.
12577 (thread_db_create_event): Check for the main thread before adding
12578 a new thread.
12579 (maybe_attach_thread): Only enable event reporting if TID == 0.
12580 (thread_db_get_tls_address): Check for new threads.
12581
125822007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12583
12584 * linux-low.c (linux_create_inferior): Try execv before execvp.
12585 * spu-low.c (spu_create_inferior): Likewise.
12586
125872007-06-13 Mike Frysinger <vapier@gentoo.org>
12588
12589 * linux-low.c (linux_create_inferior): Change execv to execvp.
12590 * spu-low.c (spu_create_inferior): Likewies.
12591
125922007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12593
12594 * Makefile.in (clean): Clean new files instead of deleted ones.
12595 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12596 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12597 rules.
12598 * configure.srv: Specify XML files and new regformats for MIPS and
12599 MIPS64 GNU/Linux.
12600 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12601 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12602 an entry for the restart register.
12603 (mips_cannot_fetch_register, mips_cannot_store_register)
12604 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12605 register names to match the XML descriptions.
12606 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12607 restart register instead of $0.
12608
126092007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12610 Markus Deuling <deuling@de.ibm.com>
12611
12612 * remote-utils.c (decode_xfer_write): New function.
12613 * server.h (decode_xfer_write): Add prototype.
12614 * server.c (handle_query): Add PACKET_LEN argument. Support
12615 qXfer:spu:read and qXfer:spu:write packets.
12616 (main): Pass packet_len to handle_query.
12617 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12618 * target.h (target_ops): Add qxfer_spu.
12619
126202007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12621
12622 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12623 accessing non-seekable spufs files.
12624
126252007-05-16 Markus Deuling <deuling@de.ibm.com>
12626
12627 * server.c (handle_query): Add reply for qC packet.
12628
126292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12630 Leo Zayas <lerele@champenstudios@com>
12631
12632 * server.h (check_remote_input_interrupt_request): New function.
12633 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12634 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12635 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12636 (check_remote_input_interrupt_request): New function.
12637 * server.h (check_remote_input_interrupt_request): Declare.
12638 * win32-low.c (winapi_DebugBreakProcess,
12639 winapi_GenerateConsoleCtrlEvent): New typedefs.
12640 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12641 to 250 ms.
12642 (win32_wait): Check for remote interrupt request
12643 with check_remote_input_interrupt_request.
12644 (win32_request_interrupt): New function.
12645 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12646
126472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12648
12649 * win32-low.c (debug_registers_changed,
12650 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12651 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12652 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12653 (thread_rec): Get context using the low target.
12654 (child_add_thread): Call thread_added on the low target,
12655 which does the same thing.
12656 (regptr): Delete.
12657 (do_initial_child_stuff): Remove debug registers references.
12658 Set context using the low target. Resume threads after
12659 setting the contexts.
12660 (child_continue): Remove dead variable. Remove debug
12661 registers references.
12662 (child_fetch_inferior_registers): Go through the low target.
12663 (do_child_store_inferior_registers): Remove.
12664 (child_store_inferior_registers): Go through the low target.
12665 (win32_resume): Remove debug registers references.
12666 Set context using the low target.
12667 (handle_exception): Change return type to void. Don't record
12668 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12669 first chance exception.
12670 (get_child_debug_event): Change return type to void. Remove
12671 goto loop. Always return after waiting for debug event.
12672 (win32_wait): Convert to switch statement. Handle spurious
12673 events.
12674
12675 * win32-i386-low.c (debug_registers_changed,
12676 debug_registers_used): New.
12677 (initial_stuff): Rename to ...
12678 (i386_initial_stuff): ... this. Clear debug registers
12679 state variables.
12680 (store_debug_registers): Delete.
12681 (i386_get_thread_context): New.
12682 (load_debug_registers): Delete.
12683 (i386_set_thread_context): New.
12684 (i386_thread_added): New.
12685 (single_step): Rename to ...
12686 (i386_single_step): ... this.
12687 (do_fetch_inferior_registers): Rename to ...
12688 (i386_fetch_inferior_register): ... this.
12689 (i386_store_inferior_register): New.
12690 (the_low_target): Adapt to new interface.
12691
12692 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12693 (arm_get_thread_context): New.
12694 (arm_set_thread_context): New.
12695 (regptr): New.
12696 (do_fetch_inferior_registers): Rename to ...
12697 (arm_fetch_inferior_register): ... this.
12698 (arm_store_inferior_register): New.
12699 (arm_wince_breakpoint): Reimplement as unsigned long.
12700 (arm_wince_breakpoint_len): Define.
12701 (the_low_target): Adapt to new interface.
12702
12703 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12704 load_debug_registers. Add get_thread_context, set_thread_context,
12705 thread_added and store_inferior_register. Rename
12706 fetch_inferior_registers to fetch_inferior_register.
12707 (regptr): Remove declaration.
12708
127092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12710
12711 * linux-low.c (linux_detach): Change return type to int. Return 0.
12712 * spu-low.c (spu_detach): Likewise.
12713
127142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12715
12716 * target.h (target_ops): Change return type of detach to int.
12717 Add join.
12718 (join_inferior): New.
12719 * server.c (main): Don't skip detach support on mingw32.
12720 If the inferior doesn't support detaching return error.
12721 Call join_inferior instead of using waitpid.
12722 * linux-low.c (linux_join): New.
12723 (linux_target_op): Add linux_join.
12724 * spu-low.c (spu_join): New.
12725 (spu_target_ops): Add spu_join.
12726 * win32-low.c (win32_detach): Adapt to new interface.
12727 Reopen current_process_handle before detaching. Issue a child
12728 resume before detaching.
12729 (win32_join): New.
12730 (win32_target_op): Add win32_join.
12731
127322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12733
12734 * win32-low.c (win32-attach): Fix return value.
12735 * target.h (target_ops): Describe ATTACH return values.
12736
127372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12738
12739 * win32-low.c (GETPROCADDRESS): Define.
12740 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12741 (winapi_DebugSetProcessKillOnExit): Likewise.
12742 (win32_create_inferior): Force usage of ansi CreateProcessA.
12743 (win32_attach): Use GETPROCADDRESS.
12744 (win32_detach): Likewise.
12745
127462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12747
12748 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12749
127502007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12751
12752 * win32-low.c: Commit leftover changes from 2007-03-29.
12753
127542007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12755
12756 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12757 fields short instead of int. Add explicit padding.
12758 (i387_cache_to_fsave): Remove unnecessary casts.
12759 (i387_fsave_to_cache): Doc fix.
12760 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12761
127622007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12763
12764 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12765 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12766
127672007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12768
12769 * configure.srv (arm*-*-mingw32ce*): Move near the other
12770 arm targets.
12771
127722007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12773
12774 * configure.ac: Add errno checking.
12775 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12776 sys/file.h and malloc.h.
12777 (AC_CHECK_DECLS): Add perror.
12778 (srv_mingwce): Handle.
12779 * configure.srv (i[34567]86-*-cygwin*): Add
12780 win32-i386-low.o to srv_tgtobj.
12781 (i[34567]86-*-mingw*): Likewise.
12782 (arm*-*-mingw32ce*): Add case.
12783 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12784 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12785 [__MINGW32CE__] (strerror): New function.
12786 [__MINGW32CE__] (errno): Define to GetLastError.
12787 [__MINGW32CE__] (COUNTOF): New macro.
12788 (remote_open): Remove extra close call.
12789 * mem-break.c (delete_breakpoint_at): New function.
12790 * mem-break.h (delete_breakpoint_at): Declare.
12791 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12792 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12793 [USE_WIN32API] (read, write): Add char* casts.
12794 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12795 * server.h: Include wincecompat.h on Windows CE.
12796 [HAVE_ERRNO_H]: Check.
12797 (perror): Declare if not declared.
12798 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12799 (perror_with_name): Remove errno declaration.
12800 * wincecompat.h: New.
12801 * wincecompat.c: New.
12802 * win32-low.h: New.
12803 * win32-arm-low.c: New.
12804 * win32-i386-low.c: New.
12805 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12806 (OUTMSG2): Make it safe.
12807 (_T): New macro.
12808 (COUNTOF): New macro.
12809 (NUM_REGS): Get it from the low target.
12810 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12811 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12812 (thread_rec): Let low target handle debug registers.
12813 (child_add_thread): Likewise.
12814 (child_init_thread_list): Likewise.
12815 (continue_one_thread): Likewise.
12816 (regptr): New.
12817 (do_child_fetch_inferior_registers): Move to ...
12818 * win32-i386-low.c: ... here, and rename to ...
12819 (do_fetch_inferior_registers): ... this.
12820 * win32-low.c (child_fetch_inferior_registers):
12821 Go through the low target.
12822 (do_child_store_inferior_registers): Use regptr.
12823 (strwinerror): New function.
12824 (win32_create_inferior): Handle Windows CE.
12825 Use strwinerror instead of strerror on Windows error
12826 codes. Add program to the error output.
12827 Don't close the main thread handle on Windows CE.
12828 (win32_attach): Use coredll.dll on Windows CE.
12829 (win32_kill): Close current process and current
12830 thread handles.
12831 (win32_detach): Use coredll.dll on Windows CE.
12832 (win32_resume): Let low target handle debug registers, and
12833 step request.
12834 (handle_exception): Add/Remove initial breakpoint. Avoid
12835 non-existant WSTOPSIG on Windows CE.
12836 (win32_read_inferior_memory): Cast to remove warning.
12837 (win32_arch_string): Go through the low target.
12838 (initialize_low): Call set_breakpoint_data with the low
12839 target's breakpoint.
12840 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12841 FOP_REGNUM, mappings): Move to ...
12842 * win32-i386-low.c: ... here.
12843 * win32-low.c (win32_thread_info): Move to ...
12844 * win32-low.h: ... here.
12845 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12846 win32-arm-low.c and wincecompat.c.
12847 (all:): Add $EXEEXT.
12848 (install-only:): Likewise.
12849 (gdbserver:): Likewise.
12850 (gdbreplay:): Likewise.
12851 * config.in: Regenerate.
12852 * configure: Regenerate.
12853
128542007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12855
12856 * win32-low.c: Rename typedef thread_info to
12857 win32_thread_info throughout.
12858
128592007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12860
12861 * win32-i386-low.c: Rename to ...
12862 * win32-low.c: ... this.
12863 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12864 * Makefile.in: Likewise.
12865
128662007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12867
12868 * remote-utils.c (monitor_output): Constify msg parameter.
12869 * server.h (monitor_output): Likewise.
12870 * win32-i386-low.c (handle_output_debug_string): New.
12871 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12872 handle_output_debug_string.
12873 (get_child_debug_event): Likewise.
12874
128752007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12876
12877 * server.c (main): Correct strtoul check.
12878
128792007-03-27 Jon Ringle <jon@ringle.org>
12880
12881 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12882
128832007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12884
12885 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12886
128872007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12888
12889 * terminal.h: Check HAVE_SGTTY_H.
12890
128912007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12892
12893 * remote-utils.c (remote_open): Print out the assigned port number.
12894
128952007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12896
12897 * remote-utils.c (monitor_output): New function.
12898 * server.c (debug_threads): Define here.
12899 (monitor_show_help): New function.
12900 (handle_query): Handle qRcmd.
12901 (main): Do not handle 'd' packet.
12902 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12903 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12904 of debug_threads.
12905
129062007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12907
12908 * Makefile.in (EXEEXT): New.
12909 (clean): Use $(EXEEXT).
12910
129112007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12912
12913 * target.h (target_ops): Rename send_signal to request_interrupt,
12914 and remove enum target_signal parameter.
12915 * linux-low.c (linux_request_interrupt): Rename from
12916 linux_send_signal, and always send SIGINT.
12917 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12918 and always send SIGINT.
12919 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12920 of send_signal.
12921 (input_interrupt): Likewise.
12922
129232007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12924
12925 * server.c (get_features_xml): Check if target implemented
12926 arch_string.
12927 * win32-i386-low.c (win32_arch_string): New.
12928 (win32_target_ops): Add win32_arch_string as arch_string member.
12929
129302007-02-22 Markus Deuling <deuling@de.ibm.com>
12931
12932 * spu-low.c (spu_arch_string): New.
12933 (spu_target_ops): Add spu_arch_string.
12934
129352007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12936
12937 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12938 * configure.ac: Do not check for terminal.h.
12939 * configure, config.in: Regenerated.
12940
129412007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12942
12943 * Makefile.in (OBS): Add $(XML_BUILTIN).
12944 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12945 (clean): Update.
12946 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12947 (arm-with-iwmmxt.c): New.
12948 * config.in, configure: Regenerate.
12949 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12950 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12951 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12952 (arm*-*-linux*): Add iWMMXt and regset support.
12953 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12954 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12955 (arm_store_wmmxregset, target_regsets): New.
12956 * server.c (get_features_xml): Take annex argument. Check builtin
12957 XML documents.
12958 (handle_query): Handle multiple annexes.
12959
129602007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12961
12962 * remote-utils.c [USE_WIN32API] (read, write): Define.
12963 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12964 write.
12965
129662007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12967
12968 * linux-i386-low.c (the_low_target): Set arch_string.
12969 * linux-x86-64-low.c (the_low_target): Likewise.
12970 * linux-low.c (linux_arch_string): New.
12971 (linux_target_ops): Add it.
12972 * linux-low.h (struct linux_target_ops): Add arch_string.
12973 * server.c (write_qxfer_response): Use const void * for DATA.
12974 (get_features_xml): New.
12975 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12976 * target.h (struct target_ops): Add arch_string method.
12977
129782007-01-03 Denis Pilat <denis.pilat@st.com>
12979 Daniel Jacobowitz <dan@codesourcery.com>
12980
12981 * linux-low.c (linux_kill): Handle being called with no threads.
12982 * win32-i386-low.c (win32_kill): Likewise.
12983 (get_child_debug_event): Clear current_process_handle.
12984
129852006-12-30 Denis PILAT <denis.pilat@st.com>
12986 Daniel Jacobowitz <dan@codesourcery.com>
12987
12988 * remote-utils.c (remote_open): Check the type of specified
12989 serial port devices before opening them.
12990 * server.c (main): Kill the inferior if an error occurs during
12991 the first remote_open.
12992
129932006-12-05 Markus Deuling <deuling@de.ibm.com>
12994
12995 * README: Update supported targets.
12996
129972006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12998
12999 * Makefile.in (clean): Remove reg-mips64.c.
13000 (reg-mips64.c, reg-mips64.o): New rules.
13001 * configure.srv: Handle mips64. Include regset support for mips.
13002 * linux-mips-low.c (union mips_register): New.
13003 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13004 (mips_breakpoint, mips_breakpoint_at): Use int.
13005 (mips_collect_register, mips_supply_register)
13006 (mips_collect_register_32bit, mips_supply_register_32bit)
13007 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13008 (mips_store_fpregset, target_regsets): New.
13009 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13010
130112006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13012
13013 * configure.srv: Add target "spu*-*-*".
13014 * Makefile.in (clean): Remove reg-spu.c.
13015 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13016 * spu-low.c: New file.
13017
130182006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13019
13020 * configure.ac: Correct td_thr_tls_get_addr test.
13021 * configure: Regenerated.
13022
130232006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13024
13025 * linux-low.c (linux_wait_for_event): Reformat. Use the
13026 pass_signals array.
13027 * remote-utils.c (decode_address_to_semicolon): New.
13028 * server.c (pass_signals, handle_general_set): New.
13029 (handle_query): Mention QPassSignals for qSupported.
13030 (main): Call handle_general_set.
13031 * server.h (pass_signals, decode_address_to_semicolon): New.
13032
130332006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13034
13035 * server.c (handle_query): Correct error handling for read_auxv.
13036
130372005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13038
13039 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13040 and srv_linux_thread_db to yes.
13041 * linux-s390-low.c (s390_fill_gregset): New function.
13042 (target_regsets): Define data structure.
13043
130442006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13045
13046 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13047 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13048 * config.in, configure: Regenerated.
13049 * inferiors.c (gdb_id_to_thread): New function.
13050 (gdb_id_to_thread_id): Use it.
13051 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13052 * linux-low.h (struct process_info): Add th member.
13053 (thread_db_get_tls_address): New prototype.
13054 * remote-utils.c (decode_address): Make non-static.
13055 * server.c (handle_query): Handle qGetTLSAddr.
13056 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13057 * target.h (struct target_ops): Add get_tls_address.
13058 * thread-db.c (maybe_attach_thread): Save the thread handle.
13059 (thread_db_get_tls_address): New.
13060
130612006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13062
13063 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13064 (linux_resume_one_process): Take a siginfo_t *. Update all
13065 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13066 (struct pending_signals): Add a siginfo_t.
13067 (linux_wait_for_process): Always set last_status.
13068 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13069 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13070 * linux-low.h (struct process_info): Add last_status.
13071
130722006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13073
13074 * remote-utils.c (try_rle): New function.
13075 (putpkt_binary): Use it.
13076
130772006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13078
13079 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13080 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13081 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13082 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13083 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13084 point registers.
13085
130862006-08-08 Richard Sandiford <richard@codesourcery.com>
13087
13088 * server.c (terminal_fd): New variable.
13089 (old_foreground_pgrp): Likewise.
13090 (restore_old_foreground_pgrp): New function.
13091 (start_inferior): Record the terminal file descriptor in terminal_fd
13092 and its original foreground group in old_foreground_pgrp. Register
13093 restore_old_foreground_pgrp with atexit().
13094
130952006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13096
13097 * server.c (handle_query): Correct qPart to qXfer.
13098
130992006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13100
13101 * configure.ac: Check for more headers which are missing on
13102 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13103 * configure.srv: Add Cygwin and mingw32.
13104 * remote-utils.c: Don't include headers unconditionally which
13105 are missing on mingw32. Include <winsock.h> for mingw32.
13106 (remote_open): Adjust for mingw32 support. Flush
13107 standard error after writing to it.
13108 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13109 (unblock_async_io, enable_async_io, disable_async_io)
13110 (readchar, getpkt): Update for Winsock support.
13111 (prepare_resume_reply): Expect a protocol signal number.
13112 * server.c: Disable <sys/wait.h> on mingw32.
13113 (start_inferior): Adjust for mingw32 support. Flush
13114 standard error after writing to it.
13115 (attach_inferior): Likewise. Use protocol signal
13116 numbers.
13117 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13118 and names.
13119 * win32-i386-low.c: New file.
13120 * Makefile.in (XM_CLIBS): Set.
13121 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13122 (win32-i386-low.o): New dependency rule.
13123 * linux-low.c (linux_wait): Use target signal numbers.
13124 * target.h (struct target_ops): Doc fix.
13125 * server.h (target_signal_to_name): New prototype.
13126 * gdbreplay.c: Don't include headers unconditionally which
13127 are missing on mingw32. Include <winsock.h> for mingw32.
13128 (remote_close, remote_open): Adjust for Winsock support.
13129 * configure, config.in: Regenerated.
13130
131312006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13132
13133 * server.c (decode_xfer_read, write_qxfer_response): New.
13134 (handle_query): Take a packet length argument. Handle
13135 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13136 the qSupported response.
13137 (main): Update call to handle_query.
13138
131392006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13140
13141 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13142 (putpkt_binary): Renamed from putpkt and adjusted for binary
13143 data.
13144 (putpkt): New wrapper for putpkt_binary.
13145 (readchar): Don't mask off the high bit.
13146 (decode_X_packet): New function.
13147 * server.c (main): Call putpkt_binary if a handler sets the packet
13148 length. Save the length of the incoming packet. Handle 'X'.
13149 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13150
131512006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13152
13153 * server.c (handle_query): Handle qSupported.
13154
131552006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13156
13157 * remote-utils.c (all_symbols_looked_up): New variable.
13158 (look_up_one_symbol): Check it.
13159 * server.h (look_up_one_symbol): New declaration.
13160 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13161
131622006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13163
13164 * Makefile.in (linux-arm-low.o): Update dependencies.
13165 * linux-arm-low.c: Include "gdb_proc_service.h".
13166 (PTRACE_GET_THREAD_AREA): Define.
13167 (ps_get_thread_area): New function.
13168
131692006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13170
13171 * configure.srv (m68k*-*-uclinux*): New target.
13172 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13173 (linux_resume_one_process): Remove extraneous cast.
13174 (linux_read_offsets): New.
13175 (linux_target_op): Add linux_read_offsets on mmuless systems.
13176 * server.c (handle_query): Add qOffsets logic.
13177 * target.h (struct target_ops): Add read_offsets.
13178
131792006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13180
13181 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13182 (PTRACE_GET_THREAD_AREA): Define.
13183 (ps_get_thread_area): New function.
13184 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13185 (linux-x86-64-low.o): Update.
13186
131872006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13188
13189 * configure.ac: Remove checks for prfpregset_t.
13190 * gdb_proc_service.h: New file.
13191 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13192 new "gdb_proc_service.h".
13193 * proc-service.c: Likewise.
13194 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13195 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13196 * Makefile.in (gdb_proc_service_h): Updated.
13197 * configure, config.in: Regenerated.
13198
131992006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13200
13201 * remote-utils.c (prepare_resume_reply): Move declaration
13202 of gdb_id_from_wait to the top of the block.
13203
132042006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13205
13206 * linux-low.c (regsets_store_inferior_registers): Read the regset
13207 from the target before filling it.
13208
132092006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13210
13211 * server.c (attach_inferior): Return SIGTRAP for a successful
13212 attach.
13213
132142006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13215
13216 * Makefile.in (OBS): Add version.o.
13217 (STAGESTUFF): Delete.
13218 (version.o): Add dependencies.
13219 (version.c): Replace rule.
13220 (clean): Remove version.c.
13221 * server.c (gdbserver_version): New.
13222 (gdbserver_usage): Use printf.
13223 (main): Handle --version and --help.
13224 * server.h (version, host_name): Add declarations.
13225
132262005-12-23 Eli Zaretskii <eliz@gnu.org>
13227
13228 * linux-arm-low.c:
13229 * linux-arm-low.c:
13230 * inferiors.c:
13231 * i387-fp.h:
13232 * i387-fp.c:
13233 * gdbreplay.c:
13234 * regcache.c:
13235 * proc-service.c:
13236 * mem-break.h:
13237 * mem-break.c:
13238 * linux-x86-64-low.c:
13239 * linux-sh-low.c:
13240 * linux-s390-low.c:
13241 * linux-ppc64-low.c:
13242 * linux-ppc-low.c:
13243 * linux-mips-low.c:
13244 * linux-m68k-low.c:
13245 * linux-m32r-low.c:
13246 * linux-low.h:
13247 * linux-low.c:
13248 * linux-ia64-low.c:
13249 * linux-i386-low.c:
13250 * linux-crisv32-low.c:
13251 * thread-db.c:
13252 * terminal.h:
13253 * target.h:
13254 * target.c:
13255 * server.h:
13256 * server.c:
13257 * remote-utils.c:
13258 * regcache.h:
13259 * utils.c:
13260 * Makefile.in:
13261 * configure.ac:
13262 * gdbserver.1: Add (C) after Copyright. Update the FSF
13263 address.
13264
132652005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13266
13267 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13268 (arm_breakpoint_at): Recognize both breakpoints.
13269 (the_low_target): Use the correct breakpoint instruction.
13270
132712005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13272
13273 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13274 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13275 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13276 (the_low_target): Update.
13277
132782005-10-25 Andreas Schwab <schwab@suse.de>
13279
13280 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13281
13282 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13283 (ia64_num_regs): Reduce to 462.
13284
132852005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13286
13287 * acinclude.m4: Correct quoting.
13288 * aclocal.m4: Regenerated.
13289
13290 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13291 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13292 (thread_db_init): Call thread_db_err_str.
13293 * configure.ac: Check for TD_VERSION.
13294 * config.in, configure: Regenerated.
13295
132962005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13297
13298 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13299
133002005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13301
13302 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13303 is not available. Define HAVE_PTRACE_GETREGS if it is.
13304 * config.in, configure: Regenerated.
13305 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13306 * linux-i386-low.c, linux-m68k-low.c: Update to use
13307 HAVE_PTRACE_GETREGS.
13308 * linux-low.c (regsets_fetch_inferior_registers)
13309 (regsets_store_inferior_registers): Only return 0 if we processed
13310 GENERAL_REGS.
13311 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13312 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13313
133142005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13315
13316 * inferiors.c (struct thread_info): Add gdb_id.
13317 (add_thread): Add gdb_id argument.
13318 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13319 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13320 calls to add_thread.
13321 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13322 * server.c (handle_query): Use thread_to_gdb_id.
13323 (handle_v_cont, main): Use gdb_id_to_thread_id.
13324 * server.h (add_thread): Update prototype.
13325 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13326 prototypes.
13327
133282005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13329
13330 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13331 left-padded registers.
13332 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13333 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13334
133352005-07-01 Steve Ellcey <sje@cup.hp.com>
13336
13337 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13338 * configure: Regenerate.
13339 * config.in: Regenerate.
13340 * server.h (NEED_DECLARATION_STRERROR):
13341 Replace with !HAVE_DECL_STRERROR.
13342
133432005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13344
13345 * linux-low.c (linux_wait, linux_send_signal): Don't test
13346 an unsigned long variable for > 0 if it could be MAX_ULONG.
13347 * server.c (myresume): Likewise.
13348 * target.c (set_desired_inferior): Likewise.
13349
133502005-06-13 Mark Kettenis <kettenis@gnu.org>
13351
13352 * configure.ac: Simplify and improve check for socklen_t.
13353 * configure, config.in: Regenerate.
13354
133552005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13356
13357 * acconfig.h: Remove.
13358 * configure.ac: Add a test for socklen_t. Use three-argument
13359 AC_DEFINE throughout.
13360 * config.in: Regenerated using autoheader 2.59.
13361 * configure: Regenerated.
13362
13363 * gdbreplay.c (socklen_t): Provide a default.
13364 (remote_open): Use socklen_t.
13365 * remote-utils.c (socklen_t): Provide a default.
13366 (remote_open): Use socklen_t.
13367 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13368 unsigned char.
13369
13370 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13371 char for buffers.
13372 * linux-low.c (linux_read_memory, linux_write_memory)
13373 (linux_read_auxv): Likewise.
13374 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13375 (check_mem_write): Likewise.
13376 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13377 Likewise.
13378 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13379 (registers_from_string, register_data): Likewise.
13380 * server.c (handle_query, main): Likewise.
13381 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13382 (decode_M_packet): Likewise.
13383 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13384 * target.h (struct target_ops): Update read_memory, write_memory,
13385 and read_auxv.
13386 (read_inferior_memory, write_inferior_memory): Update.
13387 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13388 to unsigned char *.
13389 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13390 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13391 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13392 linux-s390-low.c, linux-sh-low.c: Update for changes in
13393 read_inferior_memory and the_low_target->breakpoint.
13394
133952005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13396
13397 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13398 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13399 * configure.srv: Add powerpc64-*-linux*.
13400 * linux-ppc64-low.c: New file.
13401
134022005-05-23 Orjan Friberg <orjanf@axis.com>
13403
13404 * linux-cris-low.c: New file with support for CRIS.
13405 * linux-crisv32-low.c: Ditto for CRISv32.
13406 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13407 (clean): Add reg-cris.c and reg-crisv32.c.
13408 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13409 reg-crisv32.o, and reg-crisv32.c to make rules.
13410 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13411 recognized targets.
13412
134132005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13414
13415 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13416 of sizeof (PTRACE_XFER_TYPE).
13417 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13418
134192005-05-12 Orjan Friberg <orjanf@axis.com>
13420
13421 * target.h (struct target_ops): Add insert_watchpoint,
13422 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13423 pointers for hardware watchpoint support.
13424 * linux-low.h (struct linux_target_ops): Ditto.
13425 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13426 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13427 to linux_target_ops.
13428 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13429 reply packet.
13430 * server.c (main): Recognize 'Z' and 'z' packets.
13431
134322005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13433
13434 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13435 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13436 (the_low_target): Add new members.
13437
134382005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13439
13440 * proc-service.c (ps_lgetregs): Search all_processes instead of
13441 all_threads.
13442
134432005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13444
13445 * server.c (start_inferior): Change return type to int.
13446 (attach_inferior): Change sigptr to int *.
13447 (handle_v_cont, handle_v_requests): Change signal to int *.
13448 (main): Change signal to int.
13449
134502005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
13451
13452 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13453 * configure.srv: Add m32r*-*-linux*.
13454 * linux-m32r-low.c: New file.
13455
134562005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13457
13458 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13459
134602005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13461
13462 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13463 Take unsigned long arguments for PIDs.
13464 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13465 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13466 (wait_for_sigstop, linux_resume_one_process)
13467 (regsets_fetch_inferior_registers, linux_send_signal)
13468 (linux_read_auxv): Likewise. Update the types of variables holding
13469 PIDs. Update format string specifiers.
13470 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13471 * remote-utils.c (prepare_resume_reply): Likewise.
13472 * server.c (cont_thread, general_thread, step_thread)
13473 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13474 unsigned long.
13475 (handle_query): Update format specifiers.
13476 (handle_v_cont, main): Use strtoul for thread IDs.
13477 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13478 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13479 (general_thread, step_thread, thread_from_wait)
13480 (old_thread_from_wait): Update.
13481 * target.h (struct thread_resume): Use unsigned long for THREAD.
13482 (struct target_ops): Use unsigned long for arguments to attach and
13483 thread_alive.
13484
134852005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13486
13487 * acinclude.m4: Include bfd/bfd.m4 directly.
13488 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13489 <agriffis@toolchain.org>.
13490 * aclocal.m4, configure: Regenerated.
13491
134922005-01-07 Andrew Cagney <cagney@gnu.org>
13493
13494 * configure.ac: Rename configure.in, require autoconf 2.59.
13495 * configure: Re-generate.
13496
134972004-12-08 Daniel Jacobowitz <dan@debian.org>
13498
13499 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13500 LIBS when finished.
13501 * aclocal.m4: Regenerated.
13502 * configure: Regenerated.
13503
135042004-11-21 Andreas Schwab <schwab@suse.de>
13505
13506 * linux-m68k-low.c (m68k_num_gregs): Define.
13507 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13508 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13509 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13510 (m68k_breakpoint_at): New. Add to the_low_target.
13511
13512 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13513 srv_linux_thread_db to yes.
13514
135152004-10-20 Joel Brobecker <brobecker@gnat.com>
13516
13517 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13518 (ARCH_SET_FS): Likewise.
13519 (ARCH_GET_FS): Likewise.
13520 (ARCH_GET_GS): Likewise.
13521
135222004-10-16 Daniel Jacobowitz <dan@debian.org>
13523
13524 * linux-i386-low.c (ps_get_thread_area): New.
13525 * linux-x86-64-low.c (ps_get_thread_area): New.
13526 * linux-low.c: Include <sys/syscall.h>.
13527 (linux_kill_one_process): Don't kill the first thread here.
13528 (linux_kill): Kill the first thread here.
13529 (kill_lwp): New function.
13530 (send_sigstop, linux_send_signal): Use it.
13531 * proc-service.c: Clean up #ifdefs.
13532 (fpregset_info): Delete.
13533 (ps_lgetregs): Update and enable implementation.
13534 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13535 implementations.
13536 * remote-utils.c (struct sym_cache, symbol_cache): New.
13537 (input_interrupt): Print a clearer message.
13538 (async_io_enabled): New variable.
13539 (enable_async_io, disable_async_io): Use it. Update comments.
13540 (look_up_one_symbol): Use the symbol cache.
13541 * thread-db.c (thread_db_look_up_symbols): New function.
13542 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13543
135442004-10-16 Daniel Jacobowitz <dan@debian.org>
13545
13546 * configure.in: Test for -rdynamic.
13547 * configure: Regenerated.
13548 * Makefile (INTERNAL_LDFLAGS): New.
13549 (gdbserver, gdbreplay): Use it.
13550
135512004-09-02 Andrew Cagney <cagney@gnu.org>
13552
13553 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13554
135552004-03-23 Daniel Jacobowitz <drow@mvista.com>
13556
13557 * linux-low.c (linux_wait): Clear all_processes list also.
13558
135592004-03-12 Daniel Jacobowitz <drow@mvista.com>
13560
13561 * linux-low.c: Include <errno.h>. Remove extern declaration of
13562 errno.
13563
135642004-03-12 Daniel Jacobowitz <drow@mvista.com>
13565
13566 * gdbreplay.c, server.h, utils.c: Update copyright years.
13567
135682004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13569
13570 * server.c (main): Print child status or termination signal from
13571 variable 'signal', not 'sig'.
13572
135732004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13574
13575 * linux-low.c (linux_read_memory): Change return type to
13576 int. Check for and return error from ptrace().
13577 * target.c (read_inferior_memory): Change return type to int. Pass
13578 back return status from the_target->read_memory().
13579 * target.h (struct target_ops): Adapt *read_memory() prototype.
13580 Update comment.
13581 (read_inferior_memory): Adapt prototype.
13582 * server.c (main): Return an error packet if
13583 read_inferior_memory() returns an error.
13584
135852004-03-04 Daniel Jacobowitz <drow@mvista.com>
13586
13587 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13588 Unify with other clean targets.
13589
135902004-02-29 Daniel Jacobowitz <drow@mvista.com>
13591
13592 * server.c (handle_v_cont): Call set_desired_inferior.
13593
135942004-02-29 Daniel Jacobowitz <drow@mvista.com>
13595
13596 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13597
135982004-02-29 Daniel Jacobowitz <drow@mvista.com>
13599
13600 * linux-low.c (linux_wait): Unblock async I/O.
13601 (linux_resume): Block and enable async I/O.
13602 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13603 * server.h (block_async_io, unblock_async_io): Add prototypes.
13604
136052004-02-29 Daniel Jacobowitz <drow@mvista.com>
13606
13607 * remote-utils.c (remote_open): Print a status notice after
13608 opening a TCP port.
13609 * server.c (attach_inferior): Print a status notice after
13610 attaching.
13611
136122004-02-29 Daniel Jacobowitz <drow@mvista.com>
13613
13614 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13615
136162004-02-26 Daniel Jacobowitz <drow@mvista.com>
13617
13618 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13619 error packet.
13620 * server.c, target.h: Update copyright years.
13621
136222004-02-25 Roland McGrath <roland@redhat.com>
13623
13624 * target.h (struct target_ops): New member `read_auxv'.
13625 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13626 * linux-low.c (linux_read_auxv): New function.
13627 (linux_target_ops): Initialize `read_auxv' member to that.
13628
136292004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13630
13631 Committed by Jim Blandy <jimb@redhat.com>.
13632
13633 * linux-s390-low.c (s390_num_regs): Update.
13634 (s390_regmap): Remove control registers. Use __s390x__ predefine
13635 instead of GPR_SIZE to distiguish s390 and s390x targets.
13636
136372004-01-31 Daniel Jacobowitz <drow@mvista.com>
13638
13639 * linux-low.c: Update copyright year.
13640 (check_removed_breakpoint): Clear pending_is_breakpoint.
13641 (linux_set_resume_request, linux_queue_one_thread)
13642 (resume_status_pending_p): New functions.
13643 (linux_continue_one_thread): Use process->resume.
13644 (linux_resume): Only resume threads if there are no pending events.
13645 * linux-low.h (struct process_info): Add resume request
13646 pointer.
13647
136482004-01-30 Daniel Jacobowitz <drow@mvista.com>
13649
13650 * regcache.c (new_register_cache): Clear the allocated register
13651 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13652
136532003-10-13 Daniel Jacobowitz <drow@mvista.com>
13654
13655 * linux-low.c (linux_resume): Take a struct thread_resume *
13656 argument.
13657 (linux_wait): Update call.
13658 (resume_ptr): New static variable.
13659 (linux_continue_one_thread): Renamed from
13660 linux_continue_one_process. Use resume_ptr.
13661 (linux_resume): Use linux_continue_one_thread.
13662 * server.c (handle_v_cont, handle_v_requests): New functions.
13663 (myresume): New function.
13664 (main): Handle 'v' case.
13665 * target.h (struct thread_resume): New type.
13666 (struct target_ops): Change argument of "resume" to struct
13667 thread_resume *.
13668 (myresume): Delete macro.
13669
136702003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13671
13672 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13673 (uninstall): Support DESTDIR.
13674
13675Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13676
13677 * configure.srv: Add xscale*linux copy of arm*linux entry.
13678
136792003-07-24 Daniel Jacobowitz <drow@mvista.com>
13680
13681 * linux-arm-low.c (arm_reinsert_addr): New function.
13682 (the_low_target): Add arm_reinsert_addr.
13683
136842003-07-08 Mark Kettenis <kettenis@gnu.org>
13685
13686 * mem-break.c: Remove whitespace at end of file.
13687
136882003-06-28 Daniel Jacobowitz <drow@mvista.com>
13689
13690 * configure.in: Check whether we need to prototype strerror.
13691 * server.h: Optionally prototype strerror.
13692 * gdbreplay.c (perror_with_name): Use strerror.
13693 * linux-low.c (linux_attach_lwp): Use strerror.
13694 * utils.c (perror_with_name): Use strerror.
13695 * config.in, configure: Regenerated.
13696
136972003-06-28 Daniel Jacobowitz <drow@mvista.com>
13698
13699 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13700 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13701
137022003-06-20 Daniel Jacobowitz <drow@mvista.com>
13703
13704 * Makefile.in (SFILES): Update.
13705 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13706 low-sun3.c: Remove files.
13707
137082003-06-17 Daniel Jacobowitz <drow@mvista.com>
13709
13710 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13711 (linux_detach_one_process, linux_detach): New functions.
13712 (linux_target_ops): Add linux_detach.
13713 * server.c (main): Handle 'D' packet.
13714 * target.h (struct target_ops): Add "detach" member.
13715 (detach_inferior): Define.
13716
137172003-06-13 Mark Kettenis <kettenis@gnu.org>
13718
13719 From Kelley Cook <kelleycook@wideopenwest.com>:
13720 * configure.srv: Accept i[34567]86 variants.
13721
137222003-06-05 Daniel Jacobowitz <drow@mvista.com>
13723
13724 * linux-low.c (linux_wait_for_event): Correct comment typos.
13725 (linux_resume_one_process): Call check_removed_breakpoint.
13726 (linux_send_signal): New function.
13727 (linux_target_ops): Add linux_send_signal.
13728 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13729 of kill.
13730 * target.h (struct target_ops): Add send_signal.
13731
137322003-05-29 Jim Blandy <jimb@redhat.com>
13733
13734 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13735 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13736 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13737 away part of the register's value.
13738
137392003-03-26 Daniel Jacobowitz <drow@mvista.com>
13740
13741 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13742 (linux_wait_for_event, linux_init_signals): Likewise.
13743
137442003-03-17 Daniel Jacobowitz <drow@mvista.com>
13745
13746 * configure.in: Check for stdlib.h.
13747 * configure: Regenerated.
13748 * config.in: Regenerated.
13749
137502003-01-04 Andreas Schwab <schwab@suse.de>
13751
13752 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13753
137542003-01-02 Andrew Cagney <ac131313@redhat.com>
13755
13756 * Makefile.in: Remove obsolete code.
13757
137582002-11-20 Daniel Jacobowitz <drow@mvista.com>
13759
13760 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13761 defined(PT_FPR0_HI).
13762
137632002-11-17 Stuart Hughes <seh@zee2.com>
13764
13765 * linux-arm-low.c (arm_num_regs): Increase.
13766 (arm_regmap): Include status register.
13767
137682002-11-17 Daniel Jacobowitz <drow@mvista.com>
13769
13770 * linux-low.c (register_addr): Remove incorrect -1 check.
13771
137722002-08-29 Daniel Jacobowitz <drow@mvista.com>
13773
13774 * linux-low.c (linux_create_inferior): Call setpgid. Return
13775 the new PID.
13776 (unstopped_p, linux_signal_pid): Remove.
13777 (linux_target_ops): Remove linux_signal_pid.
13778 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13779 global instead of target method.
13780 * target.h (struct target_ops): Remove signal_pid. Update comment
13781 for create_inferior.
13782 * server.c (signal_pid): New variable.
13783 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
13784 gdbserver. Set the child to be the foreground process group.
13785 (attach_inferior): Set signal_pid.
13786
137872002-08-23 Daniel Jacobowitz <drow@mvista.com>
13788
13789 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13790
137912002-08-20 Jim Blandy <jimb@redhat.com>
13792
13793 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13794 default for this.
13795
137962002-08-01 Andrew Cagney <cagney@redhat.com>
13797
13798 * Makefile.in: Make chill references obsolete.
13799
138002002-07-24 Kevin Buettner <kevinb@redhat.com>
13801
13802 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13803 * configure: Regenerate.
13804 * config.in: Regenerate.
13805
138062002-07-09 David O'Brien <obrien@FreeBSD.org>
13807
13808 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13809 (perror_with_name, remote_close, remote_open, expect, play): Static.
13810
138112002-07-04 Michal Ludvig <mludvig@suse.cz>
13812
13813 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13814 byte offsets instead of an array of indexes.
13815 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13816
138172002-06-13 Daniel Jacobowitz <drow@mvista.com>
13818
13819 * regcache.c: Add comment.
13820
138212002-06-11 Daniel Jacobowitz <drow@mvista.com>
13822
13823 * thread-db.c: New file.
13824 * proc-service.c: New file.
13825 * acinclude.m4: New file.
13826 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13827 proc-service.o, and thread-db.o.
13828 (linux-low.o): Add USE_THREAD_DB.
13829 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13830 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13831 * aclocal.m4: Regenerated.
13832 * config.in: Regenerated.
13833 * configure: Regenerated.
13834 * configure.in: Check for proc_service.h, sys/procfs.h,
13835 thread_db.h, and linux/elf.h headrs.
13836 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13837 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13838 Check for -lthread_db and thread support.
13839 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13840 PowerPC, and SuperH.
13841 * i387-fp.c: Constify arguments.
13842 * i387-fp.h: Likewise.
13843 * inferiors.c: (struct thread_info): Renamed from
13844 `struct inferior_info'. Remove PID member. Use generic inferior
13845 list header. All uses updated.
13846 (inferiors, signal_pid): Removed.
13847 (all_threads): New variable.
13848 (get_thread): Define.
13849 (add_inferior_to_list): New function.
13850 (for_each_inferior): New function.
13851 (change_inferior_id): New function.
13852 (add_inferior): Removed.
13853 (remove_inferior): New function.
13854 (add_thread): New function.
13855 (free_one_thread): New function.
13856 (remove_thread): New function.
13857 (clear_inferiors): Use for_each_inferior and free_one_thread.
13858 (find_inferior): New function.
13859 (find_inferior_id): New function.
13860 (inferior_target_data): Update argument type.
13861 (set_inferior_target_data): Likewise.
13862 (inferior_regcache_data): Likewise.
13863 (set_inferior_regcache_data): Likewise.
13864 * linux-low.c (linux_bp_reinsert): Remove.
13865 (all_processes, stopping_threads, using_thrads)
13866 (struct pending_signals, debug_threads, pid_of): New.
13867 (inferior_pid): Replace with macro.
13868 (struct inferior_linux_data): Remove.
13869 (get_stop_pc, add_process): New functions.
13870 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13871 Use add_process and add_thread.
13872 (linux_attach_lwp): New function, based on old linux_attach. Use
13873 add_process and add_thread. Set stop_expected for new threads.
13874 (linux_attach): New function.
13875 (linux_kill_one_process): New function.
13876 (linux_kill): Kill all LWPs.
13877 (linux_thread_alive): Use find_inferior_id.
13878 (check_removed_breakpoints, status_pending_p): New functions.
13879 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13880 Update. Use WNOHANG. Wait for cloned processes also. Update process
13881 struct for the found process.
13882 (linux_wait_for_event): New function.
13883 (linux_wait): Use it. Support LWPs.
13884 (send_sigstop, wait_for_sigstop, stop_all_processes)
13885 (linux_resume_one_process, linux_continue_one_process): New functions.
13886 (linux_resume): Support LWPs.
13887 (REGISTER_RAW_SIZE): Remove.
13888 (fetch_register): Use register_size instead. Call supply_register.
13889 (usr_store_inferior_registers): Likewise. Call collect_register.
13890 Fix recursive case.
13891 (regsets_fetch_inferior_registers): Improve error message.
13892 (regsets_store_inferior_registers): Add debugging.
13893 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13894 (unstopped_p, linux_signal_pid): New functions.
13895 (linux_target_ops): Add linux_signal_pid.
13896 (linux_init_signals): New function.
13897 (initialize_low): Call it. Initialize using_threads.
13898 * regcache.c (inferior_regcache_data): Add valid
13899 flag.
13900 (get_regcache): Fetch registers lazily. Add fetch argument
13901 and update all callers.
13902 (regcache_invalidate_one, regcache_invalidate): New
13903 functions.
13904 (new_register_cache): Renamed from create_register_cache.
13905 Return the new regcache.
13906 (free_register_cache): Change argument to a void *.
13907 (registers_to_string, registers_from_string): Call get_regcache
13908 with fetch flag set.
13909 (register_data): Make static. Pass fetch flag to get_regcache.
13910 (supply_register): Call get_regcache with fetch flag clear.
13911 (collect_register): Call get_regcache with fetch flag set.
13912 (collect_register_as_string): New function.
13913 * regcache.h: Update.
13914 * remote-utils.c (putpkt): Flush after debug output and use
13915 stderr.
13916 Handle input interrupts while waiting for an ACK.
13917 (input_interrupt): Use signal_pid method.
13918 (getpkt): Flush after debug output and use stderr.
13919 (outreg): Use collect_register_as_string.
13920 (new_thread_notify, dead_thread_notify): New functions.
13921 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13922 and general_thread.
13923 (look_up_one_symbol): Flush after debug output.
13924 * server.c (step_thread, server_waiting): New variables.
13925 (start_inferior): Don't use signal_pid. Update call to mywait.
13926 (attach_inferior): Update call to mywait.
13927 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13928 (main): Don't fetch/store registers explicitly. Use
13929 set_desired_inferior. Support proposed ``Hs'' packet. Update
13930 calls to mywait.
13931 * server.h: Update.
13932 (struct inferior_list, struct_inferior_list_entry): New.
13933 * target.c (set_desired_inferior): New.
13934 (write_inferior_memory): Constify.
13935 (mywait): New function.
13936 * target.h: Update.
13937 (struct target_ops): New signal_pid method.
13938 (mywait): Removed macro, added prototype.
13939
13940 * linux-low.h (regset_func): Removed.
13941 (regset_fill_func, regset_store_func): New.
13942 (enum regset_type): New.
13943 (struct regset_info): Add type field. Use new operation types.
13944 (struct linux_target_ops): stop_pc renamed to get_pc.
13945 Add decr_pc_after_break and breakpoint_at.
13946 (get_process, get_thread_proess, get_process_thread)
13947 (strut process_info, all_processes, linux_attach_lwp)
13948 (thread_db_init): New.
13949
13950 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13951 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13952 (the_low_target): Add new members.
13953 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13954 (i386_store_fpxregset): Constify.
13955 (target_regsets): Add new kind identifier.
13956 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13957 (i386_set_pc): Add debugging.
13958 (i386_breakpoint_at): New function.
13959 (the_low_target): Add new members.
13960 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13961 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13962 (mips_breakpoint_at): New.
13963 (the_low_target): Add new members.
13964 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13965 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13966 (the_low_target): Add new members.
13967 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13968 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13969 (the_low_target): Add new members.
13970 * linux-x86-64-low.c (target_regsets): Add new kind
13971 identifier.
13972
139732002-05-15 Daniel Jacobowitz <drow@mvista.com>
13974
13975 From Martin Pool <mbp@samba.org>:
13976 * server.c (gdbserver_usage): New function.
13977 (main): Call it.
13978
139792002-05-14 Daniel Jacobowitz <drow@mvista.com>
13980
13981 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13982 stop_at -> stop_pc.
13983
139842002-05-04 Andrew Cagney <ac131313@redhat.com>
13985
13986 * Makefile.in: Remove obsolete code.
13987
139882002-04-24 Michal Ludvig <mludvig@suse.cz>
13989
13990 * linux-low.c (regsets_fetch_inferior_registers),
13991 (regsets_store_inferior_registers): Removed cast to int from
13992 ptrace() calls.
13993 * regcache.h: Added declaration of struct inferior_info.
13994
139952002-04-20 Daniel Jacobowitz <drow@mvista.com>
13996
13997 * inferiors.c (struct inferior_info): Add regcache_data.
13998 (add_inferior): Call create_register_cache.
13999 (clear_inferiors): Call free_register_cache.
14000 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14001 * regcache.c (struct inferior_regcache_data): New.
14002 (registers): Remove.
14003 (get_regcache): New function.
14004 (create_register_cache, free_register_cache): New functions.
14005 (set_register_cache): Don't initialize the register cache here.
14006 (registers_to_string, registers_from_string, register_data): Call
14007 get_regcache.
14008 * regcache.h: Add prototypes.
14009 * server.h: Likewise.
14010
140112002-04-20 Daniel Jacobowitz <drow@mvista.com>
14012
14013 * mem-break.c: New file.
14014 * mem-break.h: New file.
14015 * Makefile.in: Add mem-break.o rule; update server.h
14016 dependencies.
14017 * inferiors.c (struct inferior_info): Add target_data
14018 member.
14019 (clear_inferiors): Free target_data member if set.
14020 (inferior_target_data, set_inferior_target_data): New functions.
14021 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14022 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14023 * linux-low.c (linux_bp_reinsert): New variable.
14024 (struct inferior_linux_data): New.
14025 (linux_create_inferior): Use set_inferior_target_data.
14026 (linux_attach): Likewise. Call add_inferior.
14027 (linux_wait_for_one_inferior): New function.
14028 (linux_wait): Call it.
14029 (linux_write_memory): Add const.
14030 (initialize_low): Call set_breakpoint_data.
14031 * linux-low.h (struct linux_target_ops): Add breakpoint
14032 handling members.
14033 * server.c (attach_inferior): Remove extra add_inferior
14034 call.
14035 * server.h: Include mem-break.h. Update inferior.c
14036 prototypes.
14037 * target.c (read_inferior_memory)
14038 (write_inferior_memory): New functions.
14039 * target.h (read_inferior_memory)
14040 (write_inferior_memory): Change macros to prototypes.
14041 (struct target_ops): Update comments. Add const to write_memory
14042 definition.
14043
140442002-04-11 Daniel Jacobowitz <drow@mvista.com>
14045
14046 * linux-low.c (usr_store_inferior_registers): Support
14047 registers which are allowed to fail to store.
14048 * linux-low.h (linux_target_ops): Likewise.
14049 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14050 (ppc_cannot_store_register): FPSCR may not be storable.
14051
140522002-04-09 Daniel Jacobowitz <drow@mvista.com>
14053
14054 * server.h: Include <string.h> if HAVE_STRING_H.
14055 * ChangeLog: Correct paths in last ChangeLog entry.
14056
140572002-04-09 Daniel Jacobowitz <drow@mvista.com>
14058
14059 * linux-low.h: Remove obsolete prototypes.
14060 (struct linux_target_ops): New.
14061 (extern the_low_target): New.
14062 * linux-low.c (num_regs, regmap): Remove declarations.
14063 (register_addr): Use the_low_target explicitly.
14064 (fetch_register): Likewise.
14065 (usr_fetch_inferior_registers): Likewise.
14066 (usr_store_inferior_registers): Likewise.
14067 * linux-arm-low.c (num_regs): Remove.
14068 (arm_num_regs): Define.
14069 (arm_regmap): Renamed from regmap, made static.
14070 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14071 made static.
14072 (arm_cannot_store_register): Renamed from cannot_store_register,
14073 made static.
14074 (the_low_target): New.
14075 * linux-i386-low.c (num_regs): Remove.
14076 (i386_num_regs): Define.
14077 (i386_regmap): Renamed from regmap, made static.
14078 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14079 made static.
14080 (i386_cannot_store_register): Renamed from cannot_store_register,
14081 made static.
14082 (the_low_target): New.
14083 * linux-ia64-low.c (num_regs): Remove.
14084 (ia64_num_regs): Define.
14085 (ia64_regmap): Renamed from regmap, made static.
14086 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14087 made static.
14088 (ia64_cannot_store_register): Renamed from cannot_store_register,
14089 made static.
14090 (the_low_target): New.
14091 * linux-m68k-low.c (num_regs): Remove.
14092 (m68k_num_regs): Define.
14093 (m68k_regmap): Renamed from regmap, made static.
14094 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14095 made static.
14096 (m68k_cannot_store_register): Renamed from cannot_store_register,
14097 made static.
14098 (the_low_target): New.
14099 * linux-mips-low.c (num_regs): Remove.
14100 (mips_num_regs): Define.
14101 (mips_regmap): Renamed from regmap, made static.
14102 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14103 made static.
14104 (mips_cannot_store_register): Renamed from cannot_store_register,
14105 made static.
14106 (the_low_target): New.
14107 * linux-ppc-low.c (num_regs): Remove.
14108 (ppc_num_regs): Define.
14109 (ppc_regmap): Renamed from regmap, made static.
14110 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14111 made static.
14112 (ppc_cannot_store_register): Renamed from cannot_store_register,
14113 made static.
14114 (the_low_target): New.
14115 * linux-s390-low.c (num_regs): Remove.
14116 (s390_num_regs): Define.
14117 (s390_regmap): Renamed from regmap, made static.
14118 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14119 made static.
14120 (s390_cannot_store_register): Renamed from cannot_store_register,
14121 made static.
14122 (the_low_target): New.
14123 * linux-sh-low.c (num_regs): Remove.
14124 (sh_num_regs): Define.
14125 (sh_regmap): Renamed from regmap, made static.
14126 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14127 made static.
14128 (sh_cannot_store_register): Renamed from cannot_store_register,
14129 made static.
14130 (the_low_target): New.
14131 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14132 (the_low_target): New.
14133
141342002-04-09 Daniel Jacobowitz <drow@mvista.com>
14135
14136 * Makefile.in: Add stamp-h target.
14137 * configure.in: Create stamp-h.
14138 * configure: Regenerated.
14139
141402002-04-09 Daniel Jacobowitz <drow@mvista.com>
14141
14142 * inferiors.c: New file.
14143 * target.c: New file.
14144 * target.h: New file.
14145 * Makefile.in: Add target.o and inferiors.o. Update
14146 dependencies.
14147 * linux-low.c (inferior_pid): New static variable,
14148 moved from server.c.
14149 (linux_create_inferior): Renamed from create_inferior.
14150 Call add_inferior. Return 0 on success instead of a PID.
14151 (linux_attach): Renamed from myattach.
14152 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14153 (linux_thread_alive): Renamed from mythread_alive.
14154 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14155 child dies.
14156 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14157 (regsets_store_inferior_registers): Correct error message.
14158 Add missing ``return 0''.
14159 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14160 (linux_store_registers): Renamed from store_inferior_registers.
14161 (linux_read_memory): Renamed from read_inferior_memory.
14162 (linux_write_memory): Renamed from write_inferior_memory.
14163 (linux_target_ops): New structure.
14164 (initialize_low): Call set_target_ops ().
14165 * remote-utils.c (unhexify): New function.
14166 (hexify): New function.
14167 (input_interrupt): Send signals to ``signal_pid''.
14168 * server.c (inferior_pid): Remove.
14169 (start_inferior): Update create_inferior call.
14170 (attach_inferior): Call add_inferior.
14171 (handle_query): New function.
14172 (main): Call handle_query for `q' packets.
14173 * server.h: Include "target.h". Remove obsolete prototypes.
14174 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14175
141762002-04-09 Daniel Jacobowitz <drow@mvista.com>
14177
14178 * Makefile.in: Add WARN_CFLAGS. Update configury
14179 dependencies.
14180 * configure.in: Check for <string.h>
14181 * configure: Regenerate.
14182 * config.in: Regenerate.
14183 * gdbreplay.c: Include needed system headers.
14184 (remote_open): Remove strchr prototype.
14185 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14186 * regcache.c (supply_register): Change buf argument to const void *.
14187 (supply_register_by_name): Likewise.
14188 (collect_register): Change buf argument to void *.
14189 (collect_register_by_name): Likewise.
14190 * regcache.h: Add missing prototypes.
14191 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14192 * server.c (handle_query): New function.
14193 (attached): New static variable, moved out of main.
14194 (main): Quiet longjmp clobber warnings.
14195 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14196 * utils.c (error): Remove NORETURN.
14197 (fatal): Likewise.
This page took 0.100086 seconds and 4 git commands to generate.