Probe catch syscall support
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
782c1122
AA
12016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2
3 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4 (s390_emit_ne_goto): Likewise.
5 (s390_emit_lt_goto): Likewise.
6 (s390_emit_le_goto): Likewise.
7 (s390_emit_gt_goto): Likewise.
8 (s390_emit_ge_goto): Likewise.
9 (s390x_emit_eq_goto): Likewise.
10 (s390x_emit_ne_goto): Likewise.
11 (s390x_emit_lt_goto): Likewise.
12 (s390x_emit_le_goto): Likewise.
13 (s390x_emit_gt_goto): Likewise.
14 (s390x_emit_ge_goto): Likewise.
15 (s390_emit_ops_impl): Mark variable static.
16 (s390x_emit_ops): Likewise.
17
2e7b624b
YQ
182016-06-17 Yao Qi <yao.qi@linaro.org>
19
20 * linux-low.c (handle_extended_wait): Call
21 uninsert_reinsert_breakpoints for the parent process. Remove
22 reinsert breakpoints from the child process. Reinsert them to
23 the parent process when vfork is done.
24 * mem-break.c (uninsert_reinsert_breakpoints): New function.
25 (reinsert_reinsert_breakpoints): New function.
26 * mem-break.h (uninsert_reinsert_breakpoints): Declare
27 (reinsert_reinsert_breakpoints): Declare.
28
8a81c5d7
YQ
292016-06-17 Yao Qi <yao.qi@linaro.org>
30
31 * linux-low.c (handle_extended_wait): If the parent is doing
32 step-over, remove the reinsert breakpoints from the forked child.
33
f50bf8e5
YQ
342016-06-17 Yao Qi <yao.qi@linaro.org>
35
36 * linux-low.c (unsuspend_all_lwps): Declare.
37 (linux_low_filter_event): If thread exited, call finish_step_over.
38 If step-over is finished, unsuspend other threads.
39
8376a3cb
YQ
402016-06-17 Yao Qi <yao.qi@linaro.org>
41
42 * linux-low.c (linux_resume_one_lwp_throw): Assert
43 has_reinsert_breakpoints returns false.
44 * mem-break.c (delete_disabled_breakpoints): Assert
45 bp type isn't reinsert_breakpoint.
46
f79b145d
YQ
472016-06-17 Yao Qi <yao.qi@linaro.org>
48
49 * linux-low.c (maybe_hw_step): New function.
50 (linux_resume_one_lwp_throw): Call maybe_hw_step.
51 (finish_step_over): Switch current_thread to lwp temporarily,
52 and assert has_reinsert_breakpoints returns true.
53 (proceed_one_lwp): Call maybe_hw_step.
54 * mem-break.c (has_reinsert_breakpoints): New function.
55 * mem-break.h (has_reinsert_breakpoints): Declare.
56
0ae534d2
JT
572016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
58
59 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
60
fcdad592
YQ
612016-05-17 Yao Qi <yao.qi@linaro.org>
62
63 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
64 instead of find_inferior.
65
9e784964
YQ
662016-05-05 Yao Qi <yao.qi@linaro.org>
67
68 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
69 Initialize res to zero.
70
cf2ebb6e
YQ
712016-05-05 Yao Qi <yao.qi@linaro.org>
72
73 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
74 to uint32_t.
75
c1aebf87
UW
762016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
77
78 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
79 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
80 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
81
35fd2deb 822016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 83 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
84
85 * tracepoint.c (write_inferior_int8): New function.
86 (cmd_qtenable_disable): Write enable flag using
87 write_inferior_int8.
88
484b3c32
YQ
892016-04-25 Yao Qi <yao.qi@linaro.org>
90
91 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
92 (need_step_over_p): Return zero if the LWP has pending signals
93 can be delivered on software single step target.
94
85ba7d86
YQ
952016-04-25 Yao Qi <yao.qi@linaro.org>
96
97 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
98 return instead of error.
99
3539aa13
YQ
1002016-04-22 Yao Qi <yao.qi@linaro.org>
101
102 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
103 to 23.
104
5b061e98
YQ
1052016-04-22 Yao Qi <yao.qi@linaro.org>
106
107 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
108 signal when stepping over breakpoint with software single
109 step.
110
3451269c
PA
1112016-04-21 Pedro Alves <palves@redhat.com>
112
113 * linux-s390-low.c (s390_collect_ptrace_register)
114 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
115 add casts.
116 (s390_check_regset): Use void * instead of gdb_byte *.
117
a2358508
PA
1182016-04-20 Pedro Alves <palves@redhat.com>
119
120 * configure: Renegerate.
121
6885166d
YQ
1222016-04-20 Yao Qi <yao.qi@linaro.org>
123
124 * linux-aarch32-low.c: Include "arch/arm-linux.h".
125 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
126 number 16.
127 (arm_store_gregset): Likewise.
128
2b863f51
WT
1292016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
130
131 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
132 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
133 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
134 (amd64-avx-mpx-linux.c): New rules.
135 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
136 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
137 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
138 (srv_amd64_regobj): Add amd64-avx-mpx.o.
139 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
140 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
141 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
142 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
143 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
144 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
145 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
146 * linux-x86-low.c (x86_linux_read_description): Add case for
147 X86_XSTATE_AVX_MPX_MASK.
148 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
149 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
150 init_registers_i386_avx_mpx_linux.
151 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
152 (initialize_low_tracepoint): Call
153 init_registers_i386_avx_mpx_linux.
154 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
155 (initialize_low_tracepoint): Call
156 init_registers_amd64_avx_mpx_linux.
157 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
158 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
159 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
160 declarations.
161
9b30624b
PA
1622016-04-18 Pedro Alves <palves@redhat.com>
163
164 * configure: Regenerate.
165
45e3745e
AT
1662016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
167
168 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
169 (aarch64_emit_sub): Likewise.
170
2afc13ff
PA
1712016-04-12 Pedro Alves <palves@redhat.com>
172
173 * utils.c (prepare_to_throw_exception): Delete.
174
6e774b13
SM
1752016-04-05 Simon Marchi <simon.marchi@ericsson.com>
176
177 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
178
4dca19f8
MK
1792016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
180
181 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
182
d0a9981f
MK
1832016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
184
185 * linux-aarch64-ipa.c: Add <elf.h> include.
186 * linux-ppc-ipa.c: Add <elf.h> include.
187 * linux-s390-ipa.c: Add <elf.h> include.
188
252db07e
MK
1892016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
190
191 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
192 (get_raw_reg_ptr): Likewise.
193 (get_trace_state_variable_value_ptr): Likewise.
194 (set_trace_state_variable_value_ptr): Likewise.
195 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
196 char *.
197
14e2b6d9
MK
1982016-03-31 Wei-cheng Wang <cole945@gmail.com>
199 Marcin Kościelnicki <koriakin@0x04.net>
200
201 PR/17221
202 * linux-ppc-low.c (emit_insns): New function.
203 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
204 (ppc_emit_prologue): New function.
205 (ppc_emit_epilogue): New function.
206 (ppc_emit_add): New function.
207 (ppc_emit_sub): New function.
208 (ppc_emit_mul): New function.
209 (ppc_emit_lsh): New function.
210 (ppc_emit_rsh_signed): New function.
211 (ppc_emit_rsh_unsigned): New function.
212 (ppc_emit_ext): New function.
213 (ppc_emit_zero_ext): New function.
214 (ppc_emit_log_not): New function.
215 (ppc_emit_bit_and): New function.
216 (ppc_emit_bit_or): New function.
217 (ppc_emit_bit_xor): New function.
218 (ppc_emit_bit_not): New function.
219 (ppc_emit_equal): New function.
220 (ppc_emit_less_signed): New function.
221 (ppc_emit_less_unsigned): New function.
222 (ppc_emit_ref): New function.
223 (ppc_emit_const): New function.
224 (ppc_emit_reg): New function.
225 (ppc_emit_pop): New function.
226 (ppc_emit_stack_flush): New function.
227 (ppc_emit_swap): New function.
228 (ppc_emit_stack_adjust): New function.
229 (ppc_emit_call): New function.
230 (ppc_emit_int_call_1): New function.
231 (ppc_emit_void_call_2): New function.
232 (ppc_emit_if_goto): New function.
233 (ppc_emit_goto): New function.
234 (ppc_emit_eq_goto): New function.
235 (ppc_emit_ne_goto): New function.
236 (ppc_emit_lt_goto): New function.
237 (ppc_emit_le_goto): New function.
238 (ppc_emit_gt_goto): New function.
239 (ppc_emit_ge_goto): New function.
240 (ppc_write_goto_address): New function.
241 (ppc_emit_ops_impl): New static variable.
242 (ppc64v1_emit_prologue): New function.
243 (ppc64v2_emit_prologue): New function.
244 (ppc64_emit_epilogue): New function.
245 (ppc64_emit_add): New function.
246 (ppc64_emit_sub): New function.
247 (ppc64_emit_mul): New function.
248 (ppc64_emit_lsh): New function.
249 (ppc64_emit_rsh_signed): New function.
250 (ppc64_emit_rsh_unsigned): New function.
251 (ppc64_emit_ext): New function.
252 (ppc64_emit_zero_ext): New function.
253 (ppc64_emit_log_not): New function.
254 (ppc64_emit_bit_and): New function.
255 (ppc64_emit_bit_or): New function.
256 (ppc64_emit_bit_xor): New function.
257 (ppc64_emit_bit_not): New function.
258 (ppc64_emit_equal): New function.
259 (ppc64_emit_less_signed): New function.
260 (ppc64_emit_less_unsigned): New function.
261 (ppc64_emit_ref): New function.
262 (ppc64_emit_const): New function.
263 (ppc64v1_emit_reg): New function.
264 (ppc64v2_emit_reg): New function.
265 (ppc64_emit_pop): New function.
266 (ppc64_emit_stack_flush): New function.
267 (ppc64_emit_swap): New function.
268 (ppc64v1_emit_call): New function.
269 (ppc64v2_emit_call): New function.
270 (ppc64v1_emit_int_call_1): New function.
271 (ppc64v2_emit_int_call_1): New function.
272 (ppc64v1_emit_void_call_2): New function.
273 (ppc64v2_emit_void_call_2): New function.
274 (ppc64_emit_if_goto): New function.
275 (ppc64_emit_eq_goto): New function.
276 (ppc64_emit_ne_goto): New function.
277 (ppc64_emit_lt_goto): New function.
278 (ppc64_emit_le_goto): New function.
279 (ppc64_emit_gt_goto): New function.
280 (ppc64_emit_ge_goto): New function.
281 (ppc64v1_emit_ops_impl): New static variable.
282 (ppc64v2_emit_ops_impl): New static variable.
283 (ppc_emit_ops): New function.
284 (linux_low_target): Wire in ppc_emit_ops.
285
a2174ba4
MK
2862016-03-31 Wei-cheng Wang <cole945@gmail.com>
287 Marcin Kościelnicki <koriakin@0x04.net>
288
289 PR/17221
290 * Makefile.in: Add powerpc-*-ipa.o
291 * configure.srv: Add ipa_obj for powerpc*-linux.
292 * linux-ppc-ipa.c: New file.
293 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
294 includes.
295 (PPC_FIELD): New macro.
296 (PPC_SEXT): New macro.
297 (PPC_OP6): New macro.
298 (PPC_BO): New macro.
299 (PPC_LI): New macro.
300 (PPC_BD): New macro.
301 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
302 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
303 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
304 (ppc_get_thread_area): New function.
305 (is_elfv2_inferior): New function.
306 (gen_ds_form): New function.
307 (GEN_STD): New macro.
308 (GEN_STDU): New macro.
309 (GEN_LD): New macro.
310 (GEN_LDU): New macro.
311 (gen_d_form): New function.
312 (GEN_ADDI): New macro.
313 (GEN_ADDIS): New macro.
314 (GEN_LI): New macro.
315 (GEN_LIS): New macro.
316 (GEN_ORI): New macro.
317 (GEN_ORIS): New macro.
318 (GEN_LWZ): New macro.
319 (GEN_STW): New macro.
320 (GEN_STWU): New macro.
321 (gen_xfx_form): New function.
322 (GEN_MFSPR): New macro.
323 (GEN_MTSPR): New macro.
324 (GEN_MFCR): New macro.
325 (GEN_MTCR): New macro.
326 (GEN_SYNC): New macro.
327 (GEN_LWSYNC): New macro.
328 (gen_x_form): New function.
329 (GEN_OR): New macro.
330 (GEN_MR): New macro.
331 (GEN_LWARX): New macro.
332 (GEN_STWCX): New macro.
333 (GEN_CMPW): New macro.
334 (gen_md_form): New function.
335 (GEN_RLDICL): New macro.
336 (GEN_RLDICR): New macro.
337 (gen_i_form): New function.
338 (GEN_B): New macro.
339 (GEN_BL): New macro.
340 (gen_b_form): New function.
341 (GEN_BNE): New macro.
342 (GEN_LOAD): New macro.
343 (GEN_STORE): New macro.
344 (gen_limm): New function.
345 (gen_atomic_xchg): New function.
346 (gen_call): New function.
347 (ppc_relocate_instruction): New function.
348 (ppc_install_fast_tracepoint_jump_pad): New function.
349 (ppc_get_min_fast_tracepoint_insn_len): New function.
350 (ppc_get_ipa_tdesc_idx): New function.
351 (the_low_target): Wire in the new functions.
352 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
353 tdescs.
354 * linux-ppc-tdesc.h: New file.
355
a13c4696
MK
3562016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
357
358 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
359 (alloc_jump_pad_buffer): New function.
360 * linux-amd64-ipa.c: Add <sys/mman.h> include.
361 (alloc_jump_pad_buffer): New function.
362 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
363 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
364 (alloc_jump_pad_buffer): New function.
365 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
366 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
367 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
368 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
369
1cda1512
MK
3702016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
371
372 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
373 * linux-amd64-ipa.c: Likewise.
374 * linux-i386-ipa.c: Likewise.
375 * linux-s390-ipa.c: Likewise.
376 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
377 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
378 set_trace_state_variable_value_ptr.
379 (struct ipa_sym_addresses): Likewise.
380 (symbol_list): Likewise.
381 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
382 accessing gdb_collect directly.
383 (gdb_collect_ptr_type): New typedef.
384 (get_raw_reg_ptr_type): New typedef.
385 (get_trace_state_variable_value_ptr_type): New typedef.
386 (set_trace_state_variable_value_ptr_type): New typedef.
387 (gdb_collect_ptr): New global.
388 (get_raw_reg_ptr): New global.
389 (get_trace_state_variable_value_ptr): New global.
390 (set_trace_state_variable_value_ptr): New global.
391 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
392 accessing get_raw_reg directly.
393 (get_get_tsv_func_addr): Likewise for
394 get_trace_state_variable_value_ptr.
395 (get_set_tsv_func_addr): Likewise for
396 set_trace_state_variable_value_ptr.
397 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
398
72fb5488
SM
3992016-03-30 Simon Marchi <simon.marchi@ericsson.com>
400
401 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
402
28170b88
MK
4032016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
404
405 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
406 packets.
407 (relocate_instruction): Remove own_buf.
408 * server.c (own_buf): Make global.
409 (handle_v_requests): Make global.
410 * server.h (own_buf): New declaration.
411 (handle_v_requests): New prototype.
412
f39e8743
MK
4132016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
414
415 PR 18377
416 * linux-s390-low.c (add_insns): New function.
417 (s390_emit_prologue): New function.
418 (s390_emit_epilogue): New function.
419 (s390_emit_add): New function.
420 (s390_emit_sub): New function.
421 (s390_emit_mul): New function.
422 (s390_emit_lsh): New function.
423 (s390_emit_rsh_signed): New function.
424 (s390_emit_rsh_unsigned): New function.
425 (s390_emit_ext): New function.
426 (s390_emit_log_not): New function.
427 (s390_emit_bit_and): New function.
428 (s390_emit_bit_or): New function.
429 (s390_emit_bit_xor): New function.
430 (s390_emit_bit_not): New function.
431 (s390_emit_equal): New function.
432 (s390_emit_less_signed): New function.
433 (s390_emit_less_unsigned): New function.
434 (s390_emit_ref): New function.
435 (s390_emit_if_goto): New function.
436 (s390_emit_goto): New function.
437 (s390_write_goto_address): New function.
438 (s390_emit_litpool): New function.
439 (s390_emit_const): New function.
440 (s390_emit_call): New function.
441 (s390_emit_reg): New function.
442 (s390_emit_pop): New function.
443 (s390_emit_stack_flush): New function.
444 (s390_emit_zero_ext): New function.
445 (s390_emit_swap): New function.
446 (s390_emit_stack_adjust): New function.
447 (s390_emit_set_r2): New function.
448 (s390_emit_int_call_1): New function.
449 (s390_emit_void_call_2): New function.
450 (s390_emit_eq_goto): New function.
451 (s390_emit_ne_goto): New function.
452 (s390_emit_lt_goto): New function.
453 (s390_emit_le_goto): New function.
454 (s390_emit_gt_goto): New function.
455 (s390_emit_ge_goto): New function.
456 (s390x_emit_prologue): New function.
457 (s390x_emit_epilogue): New function.
458 (s390x_emit_add): New function.
459 (s390x_emit_sub): New function.
460 (s390x_emit_mul): New function.
461 (s390x_emit_lsh): New function.
462 (s390x_emit_rsh_signed): New function.
463 (s390x_emit_rsh_unsigned): New function.
464 (s390x_emit_ext): New function.
465 (s390x_emit_log_not): New function.
466 (s390x_emit_bit_and): New function.
467 (s390x_emit_bit_or): New function.
468 (s390x_emit_bit_xor): New function.
469 (s390x_emit_bit_not): New function.
470 (s390x_emit_equal): New function.
471 (s390x_emit_less_signed): New function.
472 (s390x_emit_less_unsigned): New function.
473 (s390x_emit_ref): New function.
474 (s390x_emit_if_goto): New function.
475 (s390x_emit_const): New function.
476 (s390x_emit_call): New function.
477 (s390x_emit_reg): New function.
478 (s390x_emit_pop): New function.
479 (s390x_emit_stack_flush): New function.
480 (s390x_emit_zero_ext): New function.
481 (s390x_emit_swap): New function.
482 (s390x_emit_stack_adjust): New function.
483 (s390x_emit_int_call_1): New function.
484 (s390x_emit_void_call_2): New function.
485 (s390x_emit_eq_goto): New function.
486 (s390x_emit_ne_goto): New function.
487 (s390x_emit_lt_goto): New function.
488 (s390x_emit_le_goto): New function.
489 (s390x_emit_gt_goto): New function.
490 (s390x_emit_ge_goto): New function.
491 (s390_emit_ops): New function.
492 (struct linux_target_ops): Fill in emit_ops hook.
493
abd9baf9
MK
4942016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
495
496 PR 18377
497 * Makefile.in: Add s390 IPA files.
498 * configure.srv: Build IPA for s390.
499 * linux-s390-ipa.c: New file.
500 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
501 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
502 (tdesc_s390_linux32): Likewise.
503 (init_registers_s390_linux32v1): Likewise.
504 (tdesc_s390_linux32v1): Likewise.
505 (init_registers_s390_linux32v2): Likewise.
506 (tdesc_s390_linux32v2): Likewise.
507 (init_registers_s390_linux64): Likewise.
508 (tdesc_s390_linux64): Likewise.
509 (init_registers_s390_linux64v1): Likewise.
510 (tdesc_s390_linux64v1): Likewise.
511 (init_registers_s390_linux64v2): Likewise.
512 (tdesc_s390_linux64v2): Likewise.
513 (init_registers_s390_te_linux64): Likewise.
514 (tdesc_s390_te_linux64): Likewise.
515 (init_registers_s390_vx_linux64): Likewise.
516 (tdesc_s390_vx_linux64): Likewise.
517 (init_registers_s390_tevx_linux64): Likewise.
518 (tdesc_s390_tevx_linux64): Likewise.
519 (init_registers_s390x_linux64): Likewise.
520 (tdesc_s390x_linux64): Likewise.
521 (init_registers_s390x_linux64v1): Likewise.
522 (tdesc_s390x_linux64v1): Likewise.
523 (init_registers_s390x_linux64v2): Likewise.
524 (tdesc_s390x_linux64v2): Likewise.
525 (init_registers_s390x_te_linux64): Likewise.
526 (tdesc_s390x_te_linux64): Likewise.
527 (init_registers_s390x_vx_linux64): Likewise.
528 (tdesc_s390x_vx_linux64): Likewise.
529 (init_registers_s390x_tevx_linux64): Likewise.
530 (tdesc_s390x_tevx_linux64): Likewise.
531 (have_hwcap_s390_vx): New static variable.
532 (s390_arch_setup): Fill have_hwcap_s390_vx.
533 (s390_get_thread_area): New function.
534 (s390_ft_entry_gpr_esa): New const.
535 (s390_ft_entry_gpr_zarch): New const.
536 (s390_ft_entry_misc): New const.
537 (s390_ft_entry_fr): New const.
538 (s390_ft_entry_vr): New const.
539 (s390_ft_main_31): New const.
540 (s390_ft_main_64): New const.
541 (s390_ft_exit_fr): New const.
542 (s390_ft_exit_vr): New const.
543 (s390_ft_exit_misc): New const.
544 (s390_ft_exit_gpr_esa): New const.
545 (s390_ft_exit_gpr_zarch): New const.
546 (append_insns): New function.
547 (s390_relocate_instruction): New function.
548 (s390_install_fast_tracepoint_jump_pad): New function.
549 (s390_get_min_fast_tracepoint_insn_len): New function.
550 (s390_get_ipa_tdesc_idx): New function.
551 (struct linux_target_ops): Wire in the above functions.
552 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
553 * linux-s390-tdesc.h: New file.
554
a4105d04
MK
5552016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
556
557 * linux-s390-low.c (s390_supports_tracepoints): New function.
558 (struct linux_target_ops): Fill supports_tracepoints hook.
559
35ac8b3e
YQ
5602016-03-18 Yao Qi <yao.qi@linaro.org>
561
562 * linux-low.c (lwp_signal_can_be_delivered): New function.
563 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
564
94610ec4
YQ
5652016-03-18 Yao Qi <yao.qi@linaro.org>
566
567 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
568 0 if signal is enqueued. Remove 'signal' from one debugging
569 message. Move one debugging message to some lines below.
570 Remove code setting 'signal' to 0.
571
80aea927
YQ
5722016-03-18 Yao Qi <yao.qi@linaro.org>
573
574 * linux-low.c (linux_low_filter_event): Remove redundant
575 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
576
b04fd3be
MK
5772016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
578
579 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
580 (struct linux_target_ops): Wire in the above.
581
c40c8d4b
YQ
5822016-03-03 Yao Qi <yao.qi@linaro.org>
583
584 * linux-low.c: Update comments to start_step_over.
585
0f8288ae
YQ
5862016-03-03 Yao Qi <yao.qi@linaro.org>
587
588 PR server/19736
589 * linux-low.c (handle_extended_wait): Set child suspended
590 if event_lwp->bp_reinsert isn't zero.
591
fdbd04a8
YQ
5922016-03-02 Yao Qi <yao.qi@linaro.org>
593
594 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
595 enqueue_pending_signal.
596
6896a8fa
MK
5972016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
598
599 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
600 is actually loaded.
601
ab503087
MK
6022016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
603
604 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
605 (s390_regmap_3264) [!__s390x__]: New global.
606 (s390_collect_ptrace_register): Skip map entries containing -1.
607 (s390_supply_ptrace_register): Ditto.
608 (s390_fill_gprs_high): New function.
609 (s390_store_gprs_high): New function.
610 (s390_regsets): Add NT_S390_HIGH_GPRS.
611 (s390_get_hwcap): Enable on 31-bit.
612 (have_hwcap_s390_high_gprs): Enable on 31-bit.
613 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
614 Detect NT_S390_HIGH_GPRS.
615 (s390_usrregs_info_3264): Enable on 31-bit.
616 (s390_regs_info): Enable regs_info_3264 on 31-bit.
617 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
618
ae91f625
MK
6192016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
620
621 PR gdb/13808
622 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
623 * configure.srv: Ditto.
624 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
625 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
626 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
627 (init_registers_amd64_linux): Remove prototype.
628 (tdesc_amd64_linux): Remove declaration.
629 (get_ipa_tdesc): New function.
630 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
631 initialize remaining tdescs.
632 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
633 (init_registers_i386_linux): Remove prototype.
634 (tdesc_i386_linux): Remove declaration.
635 (get_ipa_tdesc): New function.
636 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
637 initialize remaining tdescs.
638 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
639 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
640 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
641 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
642 (x86_get_ipa_tdesc_idx): New function.
643 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
644 * linux-x86-tdesc.h: New file.
645 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
646 (target_get_ipa_tdesc_idx): New macro.
647 * tracepoint.c (ipa_tdesc_idx): New macro.
648 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
649 (symbol_list): Add ipa_tdesc_idx.
650 (cmd_qtstart): Write ipa_tdesc_idx in the target.
651 (ipa_tdesc): Remove.
652 (ipa_tdesc_idx): New variable.
653 (get_context_regcache): Use get_ipa_tdesc.
654 (gdb_collect): Ditto.
655 (gdb_probe): Ditto.
656 * tracepoint.h (get_ipa_tdesc): New prototype.
657 (ipa_tdesc): Remove.
658
e7ad2f14
PA
6592016-02-24 Pedro Alves <palves@redhat.com>
660
661 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
662 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
663 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
664 Factor out common code between the USE_SIGTRAP_SIGINFO and
665 !USE_SIGTRAP_SIGINFO blocks.
666 (linux_low_filter_event): Call save_stop_reason instead of
667 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
668 Update comments.
669 (linux_wait_1): Update comments.
670
657f9cde
WW
6712016-02-24 Wei-cheng Wang <cole945@gmail.com>
672
673 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
674 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
675 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
676 ppc_insert_point, ppc_remove_point.
677
b00b61e1
MK
6782016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
679
680 * linux-s390-low.c (s390_supports_z_point_type): New function.
681 (struct linux_target_ops): Wire s390_supports_z_point_type in.
682
553cb527
YQ
6832016-02-16 Yao Qi <yao.qi@linaro.org>
684
685 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
686 PC. Get pc from regcache_read_pc.
687
a5652c21
YQ
6882016-02-12 Yao Qi <yao.qi@linaro.org>
689
690 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
691 or linux_get_pc_32bit.
692 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
693
ed443b61
YQ
6942016-02-12 Yao Qi <yao.qi@linaro.org>
695
696 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
697 arm_linux_get_next_pcs_fixup.
698
020ecd38
MK
6992016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
700
701 * tracepoint.c (x_tracepoint_action_download): Change
702 write_inferior_data_ptr to write_inferior_data_pointer.
703 (cmd_qtstart): Likewise.
704 (write_inferior_data_ptr): Remove.
705 (download_agent_expr): Change write_inferior_data_ptr to
706 write_inferior_data_pointer.
707 (download_tracepoint_1): Likewise.
708 (download_tracepoint): Likewise.
709 (download_trace_state_variables): Likewise.
710
7cae9051
WW
7112016-02-11 Wei-cheng Wang <cole945@gmail.com>
712 Marcin Kościelnicki <koriakin@0x04.net>
713
714 * tracepoint.c (struct tracepoint_action_ops): Remove.
715 (struct tracepoint_action): Remove ops.
716 (m_tracepoint_action_download, r_tracepoint_action_download)
717 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
718 size and offset accordingly.
719 (m_tracepoint_action_ops, r_tracepoint_action_ops)
720 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
721 (tracepoint_action_send, tracepoint_action_download): New functions.
722 Helpers for trace action handlers.
723 (add_tracepoint_action): Remove setup actions ops.
724 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
725
9f6a71b4
YQ
7262016-02-10 Yao Qi <yao.qi@linaro.org>
727
728 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
729
1e94266c
SM
7302016-02-09 Simon Marchi <simon.marchi@ericsson.com>
731
732 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
733 to AC_OUTPUT.
734 * configure: Regenerate.
735
8adce034
SM
7362016-02-09 Simon Marchi <simon.marchi@ericsson.com>
737
738 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
739 void * to gdb_byte *.
740 * linux-low.c (siginfo_fixup): Likewise.
741 (linux_xfer_siginfo): Likewise.
742 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
743 Likewise.
744 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
745
93813b37
WT
7462016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
747
748 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
749 to srv_tgtobj.
750 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
751 to srv_tgtobj.
752 * linux-x86-low.c [__x86_64__]: Include
753 "nat/amd64-linux-siginfo.h".
754 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
755 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
756 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
757 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
758 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
759 (cpt_si_fd, si_timerid, si_overrun): Move from
760 nat/amd64-linux-siginfo.c.
761 * Makefile.in (amd64-linux-siginfo.o:): New rule.
762
8424cc97
SM
7632016-01-28 Simon Marchi <simon.marchi@ericsson.com>
764
765 * server.c (skip_to_semicolon): Remove.
766 (process_point_options): Use strchrnul instead of
767 skip_to_semicolon.
768
4d18591b
YQ
7692016-01-26 Yao Qi <yao.qi@linaro.org>
770
771 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
772 * linux-low.c (install_software_single_step_breakpoints): Don't
773 call regcache_read_pc.
774 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
775 argument pc.
776
d8020970
YQ
7772016-01-26 Yao Qi <yao.qi@linaro.org>
778
779 * linux-low.c (install_software_single_step_breakpoints): Call
780 regcache_read_pc instead of get_pc.
781
8b207339
YQ
7822016-01-26 Yao Qi <yao.qi@linaro.org>
783
784 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
785 (unblock_async_io): Rename to ...
786 (block_unblock_async_io): ... it. New function.
787 (enable_async_io): Don't install SIGIO handler. Unblock it
788 instead.
789 (disable_async_io): Don't ignore SIGIO. Block it instead.
790 (initialize_async_io): Install SIGIO handler. Don't call
791 unblock_async_io.
792
18879fef
YQ
7932016-01-26 Yao Qi <yao.qi@linaro.org>
794
795 * remote-utils.c (getpkt): If the buffer isn't empty, and the
796 first character is '\003', call *the_target->request_interrupt.
797
a0f8e08a
YQ
7982016-01-25 Yao Qi <yao.qi@linaro.org>
799
800 * remote-utils.c (new_thread_notify): Remove.
801 (dead_thread_notify): Likewise.
802 * remote-utils.h (new_thread_notify): Remove declaration.
803 (dead_thread_notify): Likewise.
804
cc5fd9ab
MK
8052016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
806
807 * gdb.trace/pending.exp: Fix expected message on continue.
808
99e8eb11
MK
8092016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
810
811 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
812 it works properly on big-endian machines where sizeof (CORE_ADDR)
813 != sizeof (void *).
814
a994041d
PA
8152016-01-21 Pedro Alves <palves@redhat.com>
816
817 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
818 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
819 * configure: Regenerate.
820
f7a6a40d
YQ
8212016-01-21 Yao Qi <yao.qi@linaro.org>
822
823 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
824 is_thumb and set it according to CPSR saved on the stack.
825 (get_next_pcs_syscall_next_pc): Pass is_thumb to
826 arm_sigreturn_next_pc.
827
6f69e520
YQ
8282016-01-18 Yao Qi <yao.qi@linaro.org>
829
830 * linux-low.c (linux_set_pc_64bit): New function.
831 (linux_get_pc_64bit): New function.
832 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
833 Declare.
834 * linux-sparc-low.c (debug_threads): Remove declaration.
835 (sparc_get_pc): Remove.
836 (the_low_target): Use linux_get_pc_64bit instead of
837 sparc_get_pc.
838 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
839 (the_low_target): Use linux_get_pc_64bit and
840 linux_set_pc_64bit.
841
276d4552
YQ
8422016-01-18 Yao Qi <yao.qi@linaro.org>
843
844 * linux-arm-low.c (debug_threads): Remove declaration.
845 (arm_get_pc, arm_set_pc): Remove.
846 (the_low_target): Use linux_get_pc_32bit and
847 linux_set_pc_32bit.
848 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
849 (the_low_target): Use linux_get_pc_32bit and
850 linux_set_pc_32bit.
851 * linux-cris-low.c (debug_threads): Remove declaration.
852 (cris_get_pc, cris_set_pc,): Remove.
853 (the_low_target): Use linux_get_pc_32bit and
854 linux_set_pc_32bit.
855 * linux-crisv32-low.c (debug_threads): Remove declaration.
856 (cris_get_pc, cris_set_pc): Remove.
857 (the_low_target): Use linux_get_pc_32bit and
858 linux_set_pc_32bit.
859 * linux-low.c: Include inttypes.h.
860 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
861 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
862 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
863 (the_low_target): Use linux_get_pc_32bit and
864 linux_set_pc_32bit.
865 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
866 (the_low_target): Use linux_get_pc_32bit and
867 linux_set_pc_32bit.
868 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
869 (the_low_target): Use linux_get_pc_32bit and
870 linux_set_pc_32bit.
871 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
872 (the_low_target): Use linux_get_pc_32bit and
873 linux_set_pc_32bit.
874 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
875 (the_low_target): Use linux_get_pc_32bit and
876 linux_set_pc_32bit.
877
eb0edac8
GB
8782016-01-18 Gary Benson <gbenson@redhat.com>
879
880 * configure.ac (AC_FUNC_FORK): New check.
881 * config.in: Regenerate.
882 * configure: Likewise.
883
1b451dda
YQ
8842016-01-14 Yao Qi <yao.qi@linaro.org>
885
886 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
887 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
888 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
889 arm_get_next_pcs_ctor.
890
82075af2
JS
8912016-01-12 Josh Stone <jistone@redhat.com>
892 Philippe Waroquiers <philippe.waroquiers@skynet.be>
893
894 * inferiors.h: Include "gdb_vecs.h".
895 (struct process_info): Add syscalls_to_catch.
896 * inferiors.c (remove_process): Free syscalls_to_catch.
897 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
898 syscall_return stops.
899 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
900 * server.c (handle_general_set): Handle QCatchSyscalls.
901 (handle_query): Report support for QCatchSyscalls.
902 * target.h (struct target_ops): Add supports_catch_syscall.
903 (target_supports_catch_syscall): New macro.
904 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
905 (struct lwp_info): Add syscall_state.
906 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
907 Maintain syscall_state and syscalls_to_catch across exec.
908 (get_syscall_trapinfo): New function, proxy to the_low_target.
909 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
910 (linux_low_filter_event): Toggle syscall_state entry/return for
911 syscall traps, and set it ignored for all others.
912 (gdb_catching_syscalls_p): New function.
913 (gdb_catch_this_syscall_p): New function.
914 (linux_wait_1): Handle SYSCALL_SIGTRAP.
915 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
916 (linux_supports_catch_syscall): New function.
917 (linux_target_ops): Install it.
918 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
919 (the_low_target): Install it.
920
8f13a3ce
MF
9212016-01-12 Mike Frysinger <vapier@gentoo.org>
922
923 * acinclude.m4: Include new ../warning.m4 file.
924 * configure: Regenerated.
925 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
926
5b3da067
MF
9272016-01-12 Mike Frysinger <vapier@gentoo.org>
928
929 * ax.c (is_goto_target): Mark static.
930 * linux-low.c (register_addr): Likewise.
931 (linux_fetch_registers, linux_store_registers): Likewise.
932 * mem-break.c (any_persistent_commands): Fix old prototype.
933 (add_commands_to_breakpoint): Mark static.
934 * regcache.c (find_register_by_name): Delete unused func.
935 * remote-utils.c (hex_or_minus_one): Mark static.
936 * server.c (monitor_show_help): Mark static.
937 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
938 handle_v_requests): Likewise.
939
bc504a31
PA
9402016-01-12 Pedro Alves <palves@redhat.com>
941
942 Remove use of the registered trademark symbol throughout.
943
5a0dd67a
YQ
9442016-01-08 Yao Qi <yao.qi@linaro.org>
945
946 * remote-utils.c (getpkt): If c is '\003', call target hook
947 request_interrupt.
948
b2ca446f
YQ
9492016-01-06 Yao Qi <yao.qi@linaro.org>
950
951 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
952 linux-aarch32-low.c.
953 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
954 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
955 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
956 (thumb2_breakpoint): Declare.
957 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
958 linux-aarch32-low.h.
959 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
960 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
961 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
962
edd88788
JB
9632016-01-01 Joel Brobecker <brobecker@adacore.com>
964
965 * gdbreplay.c (gdbreplay_version): Change copyright year in
966 version message.
967 * server.c (gdbserver_version): Likewise.
968
65da7f14
PP
9692015-12-28 Patrick Palka <patrick@parcs.ath.cx>
970
971 * server.c (crc32_table): Delete.
972 (crc32): Use libiberty's xcrc32 function.
973
4abd5ed2
JB
9742015-12-22 Joel Brobecker <brobecker@adacore.com>
975
976 * lynx-low.c (lynx_delete_thread_callback): New function.
977 (lynx_mourn): Properly delete our process and all of its
978 threads. Remove call to clear_inferiors.
979
0e50fe5c
JB
9802015-12-22 Joel Brobecker <brobecker@adacore.com>
981
982 * target.c (thread_search_callback): Add check that
983 the thread_stopped target callback is not NULL before
984 calling it.
985
35adc03f
YQ
9862015-12-21 Yao Qi <yao.qi@linaro.org>
987
988 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
989 arm breakpoint.
990
bd2b2909
AT
9912015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
992
993 * server.c (handle_query): Call target_supports_software_single_step.
994
7fe5e27e
AT
9952015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
996
997 * linux-low.c (single_step): New function.
998 (linux_resume_one_lwp_throw): Call single_step.
999 (start_step_over): Likewise.
1000
d9311bfa
AT
10012015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1002
1003 * Makefile.in (SFILES): Append arch/arm-linux.c,
1004 arch/arm-get-next-pcs.c.
1005 (arm-linux.o): New rule.
1006 (arm-get-next-pcs.o): New rule.
1007 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1008 arm-linux.o.
1009 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1010 to linux-aarch32-low.c.
1011 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1012 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1013 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1014 (thumb2_breakpoint_len): Likewise.
1015 (arm_is_thumb_mode): Make non-static.
1016 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1017 from linux-aarch32-low.c.
1018 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1019 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1020 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1021 (thumb2_breakpoint_len): Likewise.
1022 (arm_is_thumb_mode): New declaration.
1023 * linux-arm-low.c: Include arch/arm-linux.h
1024 aarch/arm-get-next-pcs.h, sys/syscall.h.
1025 (get_next_pcs_ops): New struct.
1026 (get_next_pcs_addr_bits_remove): New function.
1027 (get_next_pcs_is_thumb): New function.
1028 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1029 (arm_sigreturn_next_pc): Likewise.
1030 (get_next_pcs_syscall_next_pc): Likewise.
1031 (arm_gdbserver_get_next_pcs): Likewise.
1032 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1033 Initialize.
1034 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1035 * server.h: Include gdb_vecs.h.
1036
68ce2059
AT
10372015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1038
1039 * Makefile.in (SFILES): Append common/common-regcache.c.
1040 (OBS): Append common-regcache.o.
1041 (common-regcache.o): New rule.
1042 * regcache.c (init_register_cache): Initialize cache to
1043 REG_UNAVAILABLE.
1044 (regcache_raw_read_unsigned): New function.
1045 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1046 register_status enum.
1047
fa5308bd
AT
10482015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1049
1050 * linux-aarch64-low.c (the_low_targets): Rename
1051 breakpoint_reinsert_addr to get_next_pcs.
1052 * linux-arm-low.c (the_low_targets): Likewise.
1053 * linux-bfin-low.c (the_low_targets): Likewise.
1054 * linux-cris-low.c (the_low_targets): Likewise.
1055 * linux-crisv32-low.c (the_low_targets): Likewise.
1056 * linux-low.c (can_software_single_step): Likewise.
1057 (install_software_single_step_breakpoints): New function.
1058 (start_step_over): Use install_software_single_step_breakpoints.
1059 * linux-low.h: New CORE_ADDR vector.
1060 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1061 get_next_pcs.
1062 * linux-mips-low.c (the_low_targets): Likewise.
1063 * linux-nios2-low.c (the_low_targets): Likewise.
1064 * linux-sparc-low.c (the_low_targets): Likewise.
1065
4a6ed09b
PA
10662015-12-17 Pedro Alves <palves@redhat.com>
1067
1068 * linux-low.c (linux_kill_one_lwp): Remove references to
1069 LinuxThreads.
1070 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1071 to 'kill'.
1072 (linux_init_signals): Delete.
1073 (initialize_low): Adjust.
1074 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1075
7544db95
PA
10762015-12-16 Pedro Alves <palves@redhat.com>
1077
1078 * configure.ac (compiler warning flags): When testing a
1079 -Wno-foo option, check whether -Wfoo works instead.
1080 * configure: Regenerate.
1081
8020350c
DB
10822015-12-11 Don Breazeal <donb@codesourcery.com>
1083
1084 * server.c (process_serial_event): Don't exit from gdbserver
1085 in remote mode if there are still active inferiors.
1086
db91f502
YQ
10872015-12-11 Yao Qi <yao.qi@linaro.org>
1088
1089 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1090 arm_breakpoint_at if the process is 32-bit.
1091
b37a6290
YQ
10922015-12-11 Yao Qi <yao.qi@linaro.org>
1093
1094 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1095 arm breakpoint.
1096
17b1509a
YQ
10972015-12-07 Yao Qi <yao.qi@linaro.org>
1098
1099 * configure.srv: Append arm.o to srv_tgtobj for
1100 aarch64*-*-linux* target.
1101 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1102 from linux-arm-low.c.
1103 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1104 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1105 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1106 (thumb2_breakpoint_len): Likewise.
1107 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1108 (arm_breakpoint_kinds): Likewise.
1109 (arm_breakpoint_kind_from_pc): Likewise.
1110 (arm_sw_breakpoint_from_kind): Likewise.
1111 (arm_breakpoint_kind_from_current_state): Likewise.
1112 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1113 (arm_sw_breakpoint_from_kind): Declare.
1114 (arm_breakpoint_kind_from_current_state): Declare.
1115 (arm_breakpoint_at): Declare.
1116 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1117 arm_sw_breakpoint_from_kind if process is 32-bit.
1118 (aarch64_breakpoint_kind_from_pc): New function.
1119 (aarch64_breakpoint_kind_from_current_state): New function.
1120 (the_low_target): Initialize fields breakpoint_kind_from_pc
1121 and breakpoint_kind_from_current_state.
1122 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1123 linux-aarch32-low.c.
1124 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1125 (arm_breakpoint, arm_breakpoint_len): Likewise.
1126 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1127 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1128 (arm_is_thumb_mode): Likewise.
1129 (arm_breakpoint_at): Likewise.
1130 (arm_breakpoint_kind_from_pc): Likewise.
1131 (arm_sw_breakpoint_from_kind): Likewise.
1132 (arm_breakpoint_kind_from_current_state): Likewise.
1133
1134 Revert:
1135 2015-08-04 Yao Qi <yao.qi@linaro.org>
1136
1137 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1138 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1139 * server.c (extended_protocol): Remove "static".
1140 * server.h (extended_protocol): Declare it.
1141
ece66d65
JS
11422015-12-04 Josh Stone <jistone@redhat.com>
1143
1144 * target.h (struct target_ops) <arch_setup>: Rename to ...
1145 (struct target_ops) <post_create_inferior>: ... this.
1146 (target_arch_setup): Rename to ...
1147 (target_post_create_inferior): ... this, calling post_create_inferior.
1148 * server.c (start_inferior): Update target_arch_setup calls to
1149 target_post_create_inferior.
1150 * linux-low.c (linux_low_ptrace_options): Forward declare.
1151 (linux_arch_setup): Update its comment for general use.
1152 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1153 (struct linux_target_ops): Use linux_post_create_inferior.
1154 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1155 to post_create_inferior.
1156 * nto-low.c (struct nto_target_ops): Likewise.
1157 * spu-low.c (struct spu_target_ops): Likewise.
1158 * win32-low.c (struct win32_target_ops): Likewise.
1159
e58c48b4
AT
11602015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1161
1162 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1163
fbec8956
AT
11642015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1165
1166 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1167 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1168 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1169 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1170 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1171 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1172 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1173 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1174 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1175 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1176 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1177 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1178
9b4c5f87
AT
11792015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1180
1181 * linux-low.c (linux_look_up_symbols): Don't call
1182 linux_supports_traceclone.
1183 * linux-low.h (thread_db_init): Remove use_events argument.
1184 * thread-db.c (thread_db_use_event): Remove global variable.
1185 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1186 (struct thread_db) <td_create_bp>: Remove field.
1187 (thread_db_create_event): Remove function.
1188 (thread_db_enable_reporting): Likewise.
1189 (find_one_thread): Don't check for thread_db_use_events.
1190 (attach_thread): Likewise.
1191 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1192 (try_thread_db_load_1): Don't check for thread_db_use_events.
1193 (thread_db_init): Remove use_events argument and thread events
1194 handling.
1195 (remove_thread_event_breakpoints): Remove function.
1196 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1197
7d00775e
AT
11982015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1199
1200 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1201 New function.
1202 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1203 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1204 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1205 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1206 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1207 Initialize.
1208 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1209 New function.
1210 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1211 * linux-low.c (can_hardware_single_step): Use
1212 supports_hardware_single_step.
1213 (can_software_single_step): New function.
1214 (start_step_over): Call can_software_single_step.
1215 (linux_supports_hardware_single_step): New function.
1216 (struct target_ops) <supports_software_single_step>: Initialize.
1217 * linux-low.h (struct linux_target_ops)
1218 <supports_hardware_single_step>: Initialize.
1219 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1220 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1221 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1222 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1223 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1224 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1225 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1226 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1227 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1228 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1229 Initialize.
1230 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1231 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1232 Initialize.
1233 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1234 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1235 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1236 New function.
1237 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1238 * target.h (struct target_ops): <supports_software_single_step>:
1239 New field.
1240 (target_supports_software_single_step): New macro.
1241
2d97cd35
AT
12422015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1243
1244 * linux-low.c (linux_wait_1): Fix pc advance condition.
1245 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1246 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1247
769ef81f
AT
12482015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1249
1250 * linux-arm-low.c (arm_is_thumb_mode): New function.
1251 (arm_breakpoint_at): Use arm_is_thumb_mode.
1252 (arm_breakpoint_kind_from_current_state): New function.
1253 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1254 Initialize.
1255 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1256 (linux_breakpoint_kind_from_current_state): New function.
1257 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1258 * linux-low.h (struct linux_target_ops)
1259 <breakpoint_kind_from_current_state>: New field.
1260 * target.h (struct target_ops): Likewise.
1261 (target_breakpoint_kind_from_current_state): New macro.
1262
1bebeeca
PA
12632015-11-30 Pedro Alves <palves@redhat.com>
1264
1265 * linux-low.c (linux_resume): Wake up the event loop before
1266 returning.
1267
a67a9fae
PA
12682015-11-30 Pedro Alves <palves@redhat.com>
1269
1270 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1271 check.
1272 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1273 to -1.
1274 * target.c (struct thread_search): New structure.
1275 (thread_search_callback): New function.
1276 (prev_general_thread): New global.
1277 (prepare_to_access_memory, done_accessing_memory): New functions.
1278 * target.h (prepare_to_access_memory, done_accessing_memory):
1279 Replace macros with function declarations.
1280
f2faf941
PA
12812015-11-30 Pedro Alves <palves@redhat.com>
1282
1283 PR 14618
1284 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1285 report TARGET_WAITKIND_NO_RESUMED.
1286 * remote-utils.c (prepare_resume_reply): Handle
1287 TARGET_WAITKIND_NO_RESUMED.
1288 * server.c (report_no_resumed): New global.
1289 (handle_query) <qSupported>: Handle "no-resumed+". Report
1290 "no-resumed+" support.
1291 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1292 return error if the client doesn't support no-resumed events.
1293 (push_stop_notification): New function.
1294 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1295 events if the client supports them.
1296
a681f9c9
PA
12972015-11-30 Pedro Alves <palves@redhat.com>
1298
1299 * linux-low.c (thread_still_has_status_pending_p): Don't check
1300 vCont;t here.
1301 (lwp_resumed): New function.
1302 (status_pending_p_callback): Return early if the LWP is not
1303 supposed to be resumed.
1304
65706a29
PA
13052015-11-30 Pedro Alves <palves@redhat.com>
1306
1307 * linux-low.c (handle_extended_wait): Assert that the LWP's
1308 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1309 thread create events, leave the new child's status pending.
1310 (linux_low_filter_event): If GDB wants to hear about thread exit
1311 events, leave the LWP marked dead and don't delete it.
1312 (linux_wait_for_event_filtered): Don't check for thread exit.
1313 (filter_exit_event): New function.
1314 (linux_wait_1): Use it, when returning an exit event.
1315 (linux_resume_one_lwp_throw): Assert that the LWP's
1316 waitstatus is TARGET_WAITKIND_IGNORE.
1317 * remote-utils.c (prepare_resume_reply): Handle
1318 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1319 * server.c (report_thread_events): New global.
1320 (handle_general_set): Handle QThreadEvents.
1321 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1322 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1323 TARGET_WAITKIND_THREAD_EXITED.
1324 * server.h (report_thread_events): Declare.
1325
56cf4bed
PA
13262015-11-30 Pedro Alves <palves@redhat.com>
1327
1328 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1329 the thread's last_resume_kind was resume_stop.
1330
500c1d85
PA
13312015-11-30 Pedro Alves <palves@redhat.com>
1332
1333 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1334 before returning.
1335
de979965
PA
13362015-11-30 Pedro Alves <palves@redhat.com>
1337
1338 * server.c (handle_v_requests): Handle vCtrlC.
1339
34c65914
PA
13402015-11-30 Pedro Alves <palves@redhat.com>
1341
1342 * gdbthread.h (find_any_thread_of_pid): Declare.
1343 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1344 functions.
1345 * server.c (handle_query): If current_thread is NULL, look for
1346 another thread of the selected process.
1347
79efa585 13482015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1349 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1350
1351 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1352 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1353 name in reply.
1354 * target.h (struct target_ops) <thread_name>: New field.
1355 (target_thread_name): New macro.
1356
80d82c19
JB
13572015-11-23 Joel Brobecker <brobecker@adacore.com>
1358
1359 * regcache.h (regcache_invalidate_pid): Add declaration.
1360 * regcache.c (regcache_invalidate_pid): New function, extracted
1361 from regcache_invalidate.
1362 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1363 Add trivial documentation comment.
1364 * lynx-low.c: Use regcache_invalidate_pid instead of
1365 regcache_invalidate.
1366
64da5dd5
JB
13672015-11-23 Joel Brobecker <brobecker@adacore.com>
1368
1369 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1370 and Elf64_auxv_t if the target is Android.
1371
37ce4055
DE
13722015-11-22 Doug Evans <xdje42@gmail.com>
1373
1374 * target.h: #include <sys/types.h>.
1375
06e03fff
PA
13762015-11-19 Pedro Alves <palves@redhat.com>
1377
1378 * linux-low.c (linux_process_qsupported): Change prototype.
1379 Adjust.
1380 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1381 Change prototype.
1382 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1383 and adjust to loop over all features.
1384 * server.c (handle_query) <qSupported>: Adjust to call
1385 target_process_qsupported once, passing it a vector of unprocessed
1386 features.
1387 * target.h (struct target_ops) <process_qsupported>: Change
1388 prototype.
1389 (target_process_qsupported): Adjust.
1390
9a084706
PA
13912015-11-19 Pedro Alves <palves@redhat.com>
1392
1393 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1394 mode.
1395 * configure: Regenerate.
1396
dad44a1f
PA
13972015-11-19 Pedro Alves <palves@redhat.com>
1398
1399 * configure: Regenerate.
1400
231c0592
YQ
14012015-11-19 Yao Qi <yao.qi@linaro.org>
1402
1403 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1404 type to uint32_t.
1405
6c1c9a8b
YQ
14062015-11-19 Yao Qi <yao.qi@linaro.org>
1407
1408 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1409 (struct aarch64_operand): Move enum out.
1410
9caa3311
YQ
14112015-11-19 Yao Qi <yao.qi@linaro.org>
1412
1413 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1414 struct user_fpsimd_state *.
1415 (aarch64_store_fpregset): Likewise.
1416
6a69a054
YQ
14172015-11-19 Yao Qi <yao.qi@linaro.org>
1418
1419 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1420 struct user_pt_regs *.
1421 (aarch64_store_gregset): Likewise.
1422
1798301e
PA
14232015-11-18 Pedro Alves <palves@redhat.com>
1424
1425 * Makefile.in (all_object_files): Add $IPA_OBJS.
1426
ce7715e2
PA
14272015-11-17 Pedro Alves <palves@redhat.com>
1428
1429 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1430 GDB_SIGNAL_0 and gdb_signal_to_string.
1431
c0879059
PA
14322015-11-17 Pedro Alves <palves@redhat.com>
1433
1434 * win32-low.c (handle_output_debug_string): Remove parameter.
1435 (win32_kill): Remove our_status local and adjust call to
1436 handle_output_debug_string.
1437 (get_child_debug_event): Adjust call to
1438 handle_output_debug_string.
1439
1996e237
SM
14402015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1441
1442 * linux-mips-low.c (mips_fill_gregset): Add cast.
1443 (mips_store_gregset): Likewise.
1444 (mips_fill_fpregset): Likewise.
1445 (mips_store_fpregset): Likewise.
1446
cbec665b
SM
14472015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1448
1449 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1450 priv.
1451
eb3e3c67
SM
14522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1453
1454 * linux-mips-low.c (mips_linux_new_thread): Change type of
1455 watch_type to enum target_hw_bp_type.
1456
171de4b8
SM
14572015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1458
1459 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1460 Change return type to arm_hwbp_type.
1461
04248ead
SM
14622015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1463
1464 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1465 (arm_store_gregset): Likewise.
1466 * linux-arm-low.c (arm_get_hwcap): Likewise.
1467 (arm_read_description): Likewise.
1468
04b3479c
SM
14692015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1470
1471 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1472
2bc84e8a
SM
14732015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1474
1475 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1476 (ppc_fill_vsxregset): Likewise.
1477 (ppc_store_vsxregset): Likewise.
1478 (ppc_fill_vrregset): Likewise.
1479 (ppc_store_vrregset): Likewise.
1480 (ppc_fill_evrregset): Likewise.
1481 (ppc_store_evrregset): Likewise.
1482
e6c5bb05
SM
14832015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1484
1485 * linux-ppc-low.c (ppc_usrregs_info): Remove
1486 forward-declaration.
1487 (ppc_arch_setup): Move lower in file.
1488
7ea45d72
SM
14892015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1490
1491 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1492 (ps_pdwrite): Likewise.
1493
69291610
HW
14942015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1495
1496 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1497 to after assert checks.
1498
b42945fd
SM
14992015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1500
1501 * proc-service.c (ps_pdread): Add/adjust casts.
1502 (ps_pdwrite): Add/adjust casts.
1503
d6f85c84
SM
15042015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1505
1506 * server.c (handle_search_memory_1): Cast return value of
1507 memmem.
1508
f98cd059
SM
15092015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1510
1511 * server.c (write_qxfer_response): Change type of data to
1512 gdb_byte *.
1513
d2412fa5
PA
15142015-10-29 Pedro Alves <palves@redhat.com>
1515
1516 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1517
c17414a2
PA
15182015-10-29 Pedro Alves <palves@redhat.com>
1519
1520 * tracepoint.c (clear_installed_tracepoints): Add casts.
1521
e053fbc4
PA
15222015-10-29 Pedro Alves <palves@redhat.com>
1523
1524 * server.c (handle_v_cont, process_serial_event): Add enum
1525 gdb_signal casts to signal parsing code.
1526
add67df8
PA
15272015-10-29 Pedro Alves <palves@redhat.com>
1528
1529 * linux-low.h (NULL_REGSET): Define.
1530 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1531 * linux-arm-low.c (arm_regsets): Likewise.
1532 * linux-crisv32-low.c (cris_regsets): Likewise.
1533 * linux-m68k-low.c (m68k_regsets): Likewise.
1534 * linux-mips-low.c (mips_regsets): Likewise.
1535 * linux-nios2-low.c (nios2_regsets): Likewise.
1536 * linux-ppc-low.c (ppc_regsets): Likewise.
1537 * linux-s390-low.c (s390_regsets): Likewise.
1538 * linux-sh-low.c (sh_regsets): Likewise.
1539 * linux-sparc-low.c (sparc_regsets): Likewise.
1540 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1541 * linux-tile-low.c (tile_regsets): Likewise.
1542 * linux-x86-low.c (x86_regsets): Likewise.
1543 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1544
50bc912a
PA
15452015-10-29 Pedro Alves <palves@redhat.com>
1546
1547 * linux-low.h (NULL_REGSET): Define.
1548 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1549 * linux-arm-low.c (arm_regsets): Likewise.
1550 * linux-crisv32-low.c (cris_regsets): Likewise.
1551 * linux-m68k-low.c (m68k_regsets): Likewise.
1552 * linux-mips-low.c (mips_regsets): Likewise.
1553 * linux-nios2-low.c (nios2_regsets): Likewise.
1554 * linux-ppc-low.c (ppc_regsets): Likewise.
1555 * linux-s390-low.c (s390_regsets): Likewise.
1556 * linux-sh-low.c (sh_regsets): Likewise.
1557 * linux-sparc-low.c (sparc_regsets): Likewise.
1558 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1559 * linux-tile-low.c (tile_regsets): Likewise.
1560 * linux-x86-low.c (x86_regsets): Likewise.
1561 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1562
682b2546
DE
15632015-10-26 Doug Evans <dje@google.com>
1564
1565 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1566
963843d4
DE
15672015-10-26 Doug Evans <dje@google.com>
1568
1569 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1570
d41401ac
DE
15712015-10-26 Doug Evans <dje@google.com>
1572
1573 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1574 for debug_printf.
1575 (attach_thread, find_new_threads_callback): Ditto.
1576
3db28855
AT
15772015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1578
1579 * mem-break.h (set_breakpoint_data): Remove.
1580
fb78e89c
AT
15812015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1582
1583 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1584 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1585 (initialize_low): Remove set_breakpoint_data call.
1586 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1587 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1588 (initialize_low): Remove set_breakpoint_data call.
1589 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1590 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1591 (initialize_low): Remove set_breakpoint_data call.
1592
2e6ee069
AT
15932015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1594
1595 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1596 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1597 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1598 * target.h (target_breakpoint_kind_from_pc): New macro.
1599
1652a986
AT
16002015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1601
1602 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1603 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1604 the default breakpoint kind.
1605
abeead09
AT
16062015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1607
1608 * linux-arm-low.c (arm_supports_z_point_type): Add software
1609 breakpoint support.
1610
b0b4b501
AT
16112015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1612
1613 * linux-arm-low.c: Refactor breakpoint definitions.
1614 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1615 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1616
8689682c
AT
16172015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1618
1619 * Makefile.in: Add arm.c/o.
1620 * configure.srv: Likewise.
1621 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1622 (arm_breakpoint_kind_from_pc): New function.
1623 (arm_sw_breakpoint_from_kind): Return proper kind.
1624 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1625
27165294
AT
16262015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1627
1628 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1629 removal.
1630 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1631 (struct raw_breakpoint) <size>: Remove.
1632 (struct raw_breakpoint) <kind>: Add.
1633 (bp_size): New function.
1634 (bp_opcode): Likewise.
1635 (find_raw_breakpoint_at): Adjust for kind.
1636 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1637 (remove_memory_breakpoint): Adjust for kind call bp_size.
1638 (set_raw_breakpoint_at): Adjust for kind.
1639 (set_breakpoint): Likewise.
1640 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1641 (delete_raw_breakpoint): Adjust for kind.
1642 (delete_breakpoint): Likewise.
1643 (find_gdb_breakpoint): Likewise.
1644 (set_gdb_breakpoint_1): Likewise.
1645 (set_gdb_breakpoint): Likewise.
1646 (delete_gdb_breakpoint_1): Likewise.
1647 (delete_gdb_breakpoint): Likewise.
1648 (uninsert_raw_breakpoint): Likewise.
1649 (reinsert_raw_breakpoint): Likewise.
1650 (set_breakpoint_data): Remove.
1651 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1652 (check_mem_read): Adjust for kind call bp_size.
1653 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1654 (clone_one_breakpoint): Adjust for kind.
1655 * mem-break.h (set_gdb_breakpoint): Likewise.
1656 (delete_gdb_breakpoint): Likewise.
1657 * server.c (process_serial_event): Likewise.
1658
dd373349
AT
16592015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1660
1661 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1662 (struct linux_target_ops) <breakpoint>: Remove.
1663 (struct linux_target_ops) <breakpoint_len>: Remove.
1664 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1665 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1666 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1667 (arm_sw_breakpoint_from_kind): New function.
1668 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1669 (struct linux_target_ops) <breakpoint>: Remove.
1670 (struct linux_target_ops) <breakpoint_len>: Remove.
1671 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1672 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1673 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1674 (struct linux_target_ops) <breakpoint>: Remove.
1675 (struct linux_target_ops) <breakpoint_len>: Remove.
1676 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1677 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1678 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1679 (struct linux_target_ops) <breakpoint>: Remove.
1680 (struct linux_target_ops) <breakpoint_len>: Remove.
1681 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1682 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1683 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1684 and sw_breakpoint_from_kind to increment the pc.
1685 (linux_breakpoint_kind_from_pc): New function.
1686 (linux_sw_breakpoint_from_kind): New function.
1687 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1688 (initialize_low): Call breakpoint_kind_from_pc and
1689 sw_breakpoint_from_kind to replace breakpoint_data/len.
1690 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1691 New field.
1692 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1693 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1694 (struct linux_target_ops) <breakpoint>: Remove.
1695 (struct linux_target_ops) <breakpoint_len>: Remove.
1696 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1697 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1698 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1699 (struct linux_target_ops) <breakpoint>: Remove.
1700 (struct linux_target_ops) <breakpoint_len>: Remove.
1701 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1702 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1703 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1704 (struct linux_target_ops) <breakpoint>: Remove.
1705 (struct linux_target_ops) <breakpoint_len>: Remove.
1706 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1707 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1708 * linux-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1724 (struct linux_target_ops) <breakpoint>: Remove.
1725 (struct linux_target_ops) <breakpoint_len>: Remove.
1726 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1727 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1728 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1729 (struct linux_target_ops) <breakpoint>: Remove.
1730 (struct linux_target_ops) <breakpoint_len>: Remove.
1731 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1732 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1733 * linux-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1739 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1740 (struct linux_target_ops) <breakpoint>: Remove.
1741 (struct linux_target_ops) <breakpoint_len>: Remove.
1742 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1743 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1744 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1745 (struct linux_target_ops) <breakpoint>: Remove.
1746 (struct linux_target_ops) <breakpoint_len>: Remove.
1747 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1748 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1749
4cd98a19
AT
17502015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1751
1752 * linux-cris-low.c (cris_get_pc): Remove void arg.
1753
774ee6d2
AR
17542015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1755
1756 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1757 variable name.
1758
833dcd29
AR
17592015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1760
1761 * inferiors.c (thread_pid_matches_callback): New function.
1762 (find_thread_process): New function.
1763 (remove_thread): Reset current_thread.
1764 (remove_process): Assert threads have been removed first.
1765
8d689ee5
YQ
17662015-10-15 Yao Qi <yao.qi@linaro.org>
1767
1768 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1769 if it is 3.
1770 (aarch64_remove_point): Likewise.
1771 * regcache.c (regcache_register_size): New function.
1772
1c2e1515
YQ
17732015-10-12 Yao Qi <yao.qi@linaro.org>
1774
1775 * linux-aarch64-low.c: Update all callers as emit_load_store
1776 is renamed to aarch64_emit_load_store.
1777
e1c587c3
YQ
17782015-10-12 Yao Qi <yao.qi@linaro.org>
1779
1780 * linux-aarch64-low.c: Update all callers of function renaming
1781 from emit_insn to aarch64_emit_insn.
1782
b6542f81
YQ
17832015-10-12 Yao Qi <yao.qi@linaro.org>
1784
1785 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1786 arch/aarch64-insn.h.
1787 (struct aarch64_memory_operand): Likewise.
1788 (ENCODE): Likewise.
1789 (emit_insn): Move to arch/aarch64-insn.c.
1790 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1791 (emit_load_store): Move to arch/aarch64-insn.c.
1792 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1793 (can_encode_int32): Remove.
1794
246994ce
YQ
17952015-10-12 Yao Qi <yao.qi@linaro.org>
1796
1797 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1798 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1799 (aarch64_relocate_instruction): Likewise.
1800 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1801 (struct aarch64_insn_visitor): Likewise.
1802
0badd99f
YQ
18032015-10-12 Yao Qi <yao.qi@linaro.org>
1804
1805 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1806 (struct aarch64_insn_visitor): New.
1807 (struct aarch64_insn_relocation_data): New.
1808 (aarch64_ftrace_insn_reloc_b): New function.
1809 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1810 (aarch64_ftrace_insn_reloc_cb): Likewise.
1811 (aarch64_ftrace_insn_reloc_tb): Likewise.
1812 (aarch64_ftrace_insn_reloc_adr): Likewise.
1813 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1814 (aarch64_ftrace_insn_reloc_others): Likewise.
1815 (visitor): New.
1816 (aarch64_relocate_instruction): Use visitor.
1817
dfaffe9d
YQ
18182015-10-12 Yao Qi <yao.qi@linaro.org>
1819
1820 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1821 int. Add argument buf.
1822 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1823 aarch64_relocate_instruction.
1824
70b439f0
YQ
18252015-10-12 Yao Qi <yao.qi@linaro.org>
1826
1827 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1828 argument insn. Remove local variable insn. Don't call
1829 target_read_uint32.
1830 (aarch64_install_fast_tracepoint_jump_pad): Call
1831 target_read_uint32.
1832
7781c06f
YQ
18332015-09-30 Yao Qi <yao.qi@linaro.org>
1834
1835 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1836 (emit_load_store_pair): Likewise.
1837
9a3c8263
SM
18382015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1839
1840 * dll.c (match_dll): Add cast(s).
1841 (unloaded_dll): Likewise.
1842 * linux-low.c (second_thread_of_pid_p): Likewise.
1843 (delete_lwp_callback): Likewise.
1844 (count_events_callback): Likewise.
1845 (select_event_lwp_callback): Likewise.
1846 (linux_set_resume_request): Likewise.
1847 * server.c (accumulate_file_name_length): Likewise.
1848 (emit_dll_description): Likewise.
1849 (handle_qxfer_threads_worker): Likewise.
1850 (visit_actioned_threads): Likewise.
1851 * thread-db.c (any_thread_of): Likewise.
1852 * tracepoint.c (same_process_p): Likewise.
1853 (match_blocktype): Likewise.
1854 (build_traceframe_info_xml): Likewise.
1855
224c3ddb
SM
18562015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1857
1858 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1859 assignment.
1860 (gdb_unparse_agent_expr): Likewise.
1861 * hostio.c (require_data): Likewise.
1862 (handle_pread): Likewise.
1863 * linux-low.c (disable_regset): Likewise.
1864 (fetch_register): Likewise.
1865 (store_register): Likewise.
1866 (get_dynamic): Likewise.
1867 (linux_qxfer_libraries_svr4): Likewise.
1868 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1869 (set_fast_tracepoint_jump): Likewise.
1870 (uninsert_fast_tracepoint_jumps_at): Likewise.
1871 (reinsert_fast_tracepoint_jumps_at): Likewise.
1872 (validate_inserted_breakpoint): Likewise.
1873 (clone_agent_expr): Likewise.
1874 * regcache.c (init_register_cache): Likewise.
1875 * remote-utils.c (putpkt_binary_1): Likewise.
1876 (decode_M_packet): Likewise.
1877 (decode_X_packet): Likewise.
1878 (look_up_one_symbol): Likewise.
1879 (relocate_instruction): Likewise.
1880 (monitor_output): Likewise.
1881 * server.c (handle_search_memory): Likewise.
1882 (handle_qxfer_exec_file): Likewise.
1883 (handle_qxfer_libraries): Likewise.
1884 (handle_qxfer): Likewise.
1885 (handle_query): Likewise.
1886 (handle_v_cont): Likewise.
1887 (handle_v_run): Likewise.
1888 (captured_main): Likewise.
1889 * target.c (write_inferior_memory): Likewise.
1890 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1891 * tracepoint.c (init_trace_buffer): Likewise.
1892 (add_tracepoint_action): Likewise.
1893 (add_traceframe): Likewise.
1894 (add_traceframe_block): Likewise.
1895 (cmd_qtdpsrc): Likewise.
1896 (cmd_qtdv): Likewise.
1897 (cmd_qtstatus): Likewise.
1898 (response_source): Likewise.
1899 (response_tsv): Likewise.
1900 (cmd_qtnotes): Likewise.
1901 (gdb_collect): Likewise.
1902 (initialize_tracepoint): Likewise.
1903
afbe19f8
PL
19042015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1905
1906 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1907 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1908 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1909 <NOP>: New.
1910 (enum aarch64_condition_codes): New enum.
1911 (w0): New static global.
1912 (fp): Likewise.
1913 (lr): Likewise.
1914 (struct aarch64_memory_operand) <type>: New
1915 MEMORY_OPERAND_POSTINDEX type.
1916 (postindex_memory_operand): New helper function.
1917 (emit_ret): New function.
1918 (emit_load_store_pair): New function, factored out of emit_stp
1919 with support for MEMORY_OPERAND_POSTINDEX.
1920 (emit_stp): Rewrite using emit_load_store_pair.
1921 (emit_ldp): New function.
1922 (emit_load_store): Likewise.
1923 (emit_ldr): Mention post-index instruction in comment.
1924 (emit_ldrh): New function.
1925 (emit_ldrb): New function.
1926 (emit_ldrsw): Mention post-index instruction in comment.
1927 (emit_str): Likewise.
1928 (emit_subs): New function.
1929 (emit_cmp): Likewise.
1930 (emit_and): Likewise.
1931 (emit_orr): Likewise.
1932 (emit_orn): Likewise.
1933 (emit_eor): Likewise.
1934 (emit_mvn): Likewise.
1935 (emit_lslv): Likewise.
1936 (emit_lsrv): Likewise.
1937 (emit_asrv): Likewise.
1938 (emit_mul): Likewise.
1939 (emit_sbfm): Likewise.
1940 (emit_sbfx): Likewise.
1941 (emit_ubfm): Likewise.
1942 (emit_ubfx): Likewise.
1943 (emit_csinc): Likewise.
1944 (emit_cset): Likewise.
1945 (emit_nop): Likewise.
1946 (emit_ops_insns): New helper function.
1947 (emit_pop): Likewise.
1948 (emit_push): Likewise.
1949 (aarch64_emit_prologue): New function.
1950 (aarch64_emit_epilogue): Likewise.
1951 (aarch64_emit_add): Likewise.
1952 (aarch64_emit_sub): Likewise.
1953 (aarch64_emit_mul): Likewise.
1954 (aarch64_emit_lsh): Likewise.
1955 (aarch64_emit_rsh_signed): Likewise.
1956 (aarch64_emit_rsh_unsigned): Likewise.
1957 (aarch64_emit_ext): Likewise.
1958 (aarch64_emit_log_not): Likewise.
1959 (aarch64_emit_bit_and): Likewise.
1960 (aarch64_emit_bit_or): Likewise.
1961 (aarch64_emit_bit_xor): Likewise.
1962 (aarch64_emit_bit_not): Likewise.
1963 (aarch64_emit_equal): Likewise.
1964 (aarch64_emit_less_signed): Likewise.
1965 (aarch64_emit_less_unsigned): Likewise.
1966 (aarch64_emit_ref): Likewise.
1967 (aarch64_emit_if_goto): Likewise.
1968 (aarch64_emit_goto): Likewise.
1969 (aarch64_write_goto_address): Likewise.
1970 (aarch64_emit_const): Likewise.
1971 (aarch64_emit_call): Likewise.
1972 (aarch64_emit_reg): Likewise.
1973 (aarch64_emit_pop): Likewise.
1974 (aarch64_emit_stack_flush): Likewise.
1975 (aarch64_emit_zero_ext): Likewise.
1976 (aarch64_emit_swap): Likewise.
1977 (aarch64_emit_stack_adjust): Likewise.
1978 (aarch64_emit_int_call_1): Likewise.
1979 (aarch64_emit_void_call_2): Likewise.
1980 (aarch64_emit_eq_goto): Likewise.
1981 (aarch64_emit_ne_goto): Likewise.
1982 (aarch64_emit_lt_goto): Likewise.
1983 (aarch64_emit_le_goto): Likewise.
1984 (aarch64_emit_gt_goto): Likewise.
1985 (aarch64_emit_ge_got): Likewise.
1986 (aarch64_emit_ops_impl): New static global variable.
1987 (aarch64_emit_ops): New target function, return
1988 &aarch64_emit_ops_impl.
1989 (struct linux_target_ops): Install it.
1990
bb903df0
PL
19912015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1992
1993 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1994 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1995 aarch64-ipa.o.
1996 * linux-aarch64-ipa.c: New file.
1997 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1998 and endian.h.
1999 (aarch64_get_thread_area): New target method.
2000 (extract_signed_bitfield): New helper function.
2001 (aarch64_decode_ldr_literal): New function.
2002 (enum aarch64_opcodes): New enum.
2003 (struct aarch64_register): New struct.
2004 (struct aarch64_operand): New struct.
2005 (x0): New static global.
2006 (x1): Likewise.
2007 (x2): Likewise.
2008 (x3): Likewise.
2009 (x4): Likewise.
2010 (w2): Likewise.
2011 (ip0): Likewise.
2012 (sp): Likewise.
2013 (xzr): Likewise.
2014 (aarch64_register): New helper function.
2015 (register_operand): Likewise.
2016 (immediate_operand): Likewise.
2017 (struct aarch64_memory_operand): New struct.
2018 (offset_memory_operand): New helper function.
2019 (preindex_memory_operand): Likewise.
2020 (enum aarch64_system_control_registers): New enum.
2021 (ENCODE): New macro.
2022 (emit_insn): New helper function.
2023 (emit_b): New function.
2024 (emit_bcond): Likewise.
2025 (emit_cb): Likewise.
2026 (emit_tb): Likewise.
2027 (emit_blr): Likewise.
2028 (emit_stp): Likewise.
2029 (emit_ldp_q_offset): Likewise.
2030 (emit_stp_q_offset): Likewise.
2031 (emit_load_store): Likewise.
2032 (emit_ldr): Likewise.
2033 (emit_ldrsw): Likewise.
2034 (emit_str): Likewise.
2035 (emit_ldaxr): Likewise.
2036 (emit_stxr): Likewise.
2037 (emit_stlr): Likewise.
2038 (emit_data_processing_reg): Likewise.
2039 (emit_data_processing): Likewise.
2040 (emit_add): Likewise.
2041 (emit_sub): Likewise.
2042 (emit_mov): Likewise.
2043 (emit_movk): Likewise.
2044 (emit_mov_addr): Likewise.
2045 (emit_mrs): Likewise.
2046 (emit_msr): Likewise.
2047 (emit_sevl): Likewise.
2048 (emit_wfe): Likewise.
2049 (append_insns): Likewise.
2050 (can_encode_int32_in): New helper function.
2051 (aarch64_relocate_instruction): New function.
2052 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2053 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2054 (struct linux_target_ops): Install aarch64_get_thread_area,
2055 aarch64_install_fast_tracepoint_jump_pad and
2056 aarch64_get_min_fast_tracepoint_insn_len.
2057
787749ea
PL
20582015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2059
2060 * Makefile.in (aarch64-insn.o): New rule.
2061 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2062
9812b2e6
YQ
20632015-09-21 Yao Qi <yao.qi@linaro.org>
2064
2065 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2066
18fe412b
YQ
20672015-09-21 Yao Qi <yao.qi@linaro.org>
2068
2069 * tracepoint.c (max_jump_pad_size): Remove.
2070
a0cc84cd
YQ
20712015-09-18 Yao Qi <yao.qi@linaro.org>
2072
2073 * linux-aarch64-low.c: Don't include sys/uio.h.
2074 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2075
d78908cf
WW
20762015-09-16 Wei-cheng Wang <cole945@gmail.com>
2077
2078 * tracepoint.c (eval_result_type): Change prototype.
2079 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2080
d57e0d50
PA
20812015-09-15 Pedro Alves <palves@redhat.com>
2082
2083 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2084 Check whether to report exec events instead of checking whether
2085 multiprocess is enabled.
2086
5a676acc
PA
20872015-09-15 Pedro Alves <palves@redhat.com>
2088
2089 PR remote/18965
2090 * remote-utils.c (prepare_resume_reply): Merge
2091 TARGET_WAITKIND_VFORK_DONE switch case with the
2092 TARGET_WAITKIND_FORKED case.
2093
7c5d0fad
YQ
20942015-09-15 Yao Qi <yao.qi@linaro.org>
2095
2096 * server.c (handle_query): Check string comparison using
2097 "else if" instead of "if".
2098
750ce8d1
YQ
20992015-09-15 Yao Qi <yao.qi@linaro.org>
2100
2101 * server.c (vCont_supported): New global variable.
2102 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2103 matches. Append ";vContSupported+" to own_buf.
2104 (handle_v_requests): Append ";s;S" to own_buf if target supports
2105 hardware single step or vCont_supported is false.
2106 (capture_main): Set vCont_supported to zero.
2107
70b90b91
YQ
21082015-09-15 Yao Qi <yao.qi@linaro.org>
2109
2110 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2111 it to ...
2112 (linux_supports_hardware_single_step): ... New function.
2113 (linux_target_ops): Update.
2114 * lynx-low.c (lynx_target_ops): Set field
2115 supports_hardware_single_step to target_can_do_hardware_single_step.
2116 * nto-low.c (nto_target_ops): Likewise.
2117 * spu-low.c (spu_target_ops): Likewise.
2118 * win32-low.c (win32_target_ops): Likewise.
2119 * target.c (target_can_do_hardware_single_step): New function.
2120 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2121 Remove. <supports_hardware_single_step>: New field.
2122 (target_supports_conditional_breakpoints): Remove.
2123 (target_supports_hardware_single_step): New macro.
2124 (target_can_do_hardware_single_step): Declare.
2125 * server.c (handle_query): Use target_supports_hardware_single_step
2126 instead of target_supports_conditional_breakpoints.
2127
ade90bde
YQ
21282015-09-15 Yao Qi <yao.qi@linaro.org>
2129
2130 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2131 function.
2132 (struct linux_target_ops the_low_target): Install
2133 aarch64_linux_siginfo_fixup.
2134
94585166
DB
21352015-09-11 Don Breazeal <donb@codesourcery.com>
2136 Luis Machado <lgustavo@codesourcery.com>
2137
2138 * linux-low.c (linux_mourn): Static declaration.
2139 (linux_arch_setup): Move in front of
2140 handle_extended_wait.
2141 (linux_arch_setup_thread): New function.
2142 (handle_extended_wait): Handle exec events. Call
2143 linux_arch_setup_thread. Make event_lwp argument a
2144 pointer-to-a-pointer.
2145 (check_zombie_leaders): Do not check stopped threads.
2146 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2147 (linux_low_filter_event): Add lwp and thread for exec'ing
2148 non-leader thread if leader thread has been deleted.
2149 Refactor code into linux_arch_setup_thread and call it.
2150 Pass child lwp pointer by reference to handle_extended_wait.
2151 (linux_wait_for_event_filtered): Update comment.
2152 (linux_wait_1): Prevent clobbering exec event status.
2153 (linux_supports_exec_events): New function.
2154 (linux_target_ops) <supports_exec_events>: Initialize new member.
2155 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2156 new member.
2157 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2158 * server.c (report_exec_events): New global variable.
2159 (handle_query): Handle qSupported query for exec-events feature.
2160 (captured_main): Initialize report_exec_events.
2161 * server.h (report_exec_events): Declare new global variable.
2162 * target.h (struct target_ops) <supports_exec_events>: New
2163 member.
2164 (target_supports_exec_events): New macro.
2165 * win32-low.c (win32_target_ops) <supports_exec_events>:
2166 Initialize new member.
2167
0568462b
MM
21682015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2169
2170 * linux-low.c (linux_low_enable_btrace): Remove.
2171 (linux_target_ops): Replace linux_low_enable_btrace with
2172 linux_enable_btrace.
2173
39edd165
YQ
21742015-09-03 Yao Qi <yao.qi@linaro.org>
2175
2176 * linux-aarch64-low.c (aarch64_insert_point): Call
2177 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2178 returns true.
2179
1db33b5a
UW
21802015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2181
2182 * linux-low.c (check_stopped_by_breakpoint): Use
2183 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2184
ab290430
PA
21852015-08-27 Pedro Alves <palves@redhat.com>
2186
2187 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2188
8d749320
SM
21892015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2190
6711b7f8
SM
2191 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2192 the XNEW-family equivalent.
8d749320
SM
2193 (compile_bytecodes): Likewise.
2194 * dll.c (loaded_dll): Likewise.
2195 * event-loop.c (append_callback_event): Likewise.
2196 (create_file_handler): Likewise.
2197 (create_file_event): Likewise.
2198 * hostio.c (handle_open): Likewise.
2199 * inferiors.c (add_thread): Likewise.
2200 (add_process): Likewise.
2201 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2202 * linux-arm-low.c (arm_new_process): Likewise.
2203 (arm_new_thread): Likewise.
2204 * linux-low.c (add_to_pid_list): Likewise.
2205 (linux_add_process): Likewise.
2206 (handle_extended_wait): Likewise.
2207 (add_lwp): Likewise.
2208 (enqueue_one_deferred_signal): Likewise.
2209 (enqueue_pending_signal): Likewise.
2210 (linux_resume_one_lwp_throw): Likewise.
2211 (linux_resume_one_thread): Likewise.
2212 (linux_read_memory): Likewise.
2213 (linux_write_memory): Likewise.
2214 * linux-mips-low.c (mips_linux_new_process): Likewise.
2215 (mips_linux_new_thread): Likewise.
2216 (mips_add_watchpoint): Likewise.
2217 * linux-x86-low.c (initialize_low_arch): Likewise.
2218 * lynx-low.c (lynx_add_process): Likewise.
2219 * mem-break.c (set_raw_breakpoint_at): Likewise.
2220 (set_breakpoint): Likewise.
2221 (add_condition_to_breakpoint): Likewise.
2222 (add_commands_to_breakpoint): Likewise.
2223 (clone_agent_expr): Likewise.
2224 (clone_one_breakpoint): Likewise.
2225 * regcache.c (new_register_cache): Likewise.
2226 * remote-utils.c (look_up_one_symbol): Likewise.
2227 * server.c (queue_stop_reply): Likewise.
2228 (start_inferior): Likewise.
2229 (queue_stop_reply_callback): Likewise.
2230 (handle_target_event): Likewise.
2231 * spu-low.c (fetch_ppc_memory): Likewise.
2232 (store_ppc_memory): Likewise.
2233 * target.c (set_target_ops): Likewise.
2234 * thread-db.c (thread_db_load_search): Likewise.
2235 (try_thread_db_load_1): Likewise.
2236 * tracepoint.c (add_tracepoint): Likewise.
2237 (add_tracepoint_action): Likewise.
2238 (create_trace_state_variable): Likewise.
2239 (cmd_qtdpsrc): Likewise.
2240 (cmd_qtro): Likewise.
2241 (add_while_stepping_state): Likewise.
2242 * win32-low.c (child_add_thread): Likewise.
2243 (get_image_name): Likewise.
2244
ed8b7b42
YQ
22452015-08-25 Yao Qi <yao.qi@linaro.org>
2246
2247 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2248
db3cb7cb
YQ
22492015-08-25 Yao Qi <yao.qi@linaro.org>
2250
2251 * Makefile.in (aarch64-linux.o): New rule.
2252 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2253 srv_tgtobj.
2254 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2255 (aarch64_init_debug_reg_state): Make it extern.
2256 (aarch64_linux_prepare_to_resume): Remove.
2257
f6011a1c
YQ
22582015-08-25 Yao Qi <yao.qi@linaro.org>
2259
2260 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2261 lwp_arch_private_info and ptid_of_lwp.
2262
88e2cf7e
YQ
22632015-08-25 Yao Qi <yao.qi@linaro.org>
2264
2265 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2266 Find proc_info by find_process_pid. All callers updated.
2267
5e35436e
YQ
22682015-08-25 Yao Qi <yao.qi@linaro.org>
2269
2270 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2271 Remove.
2272 (debug_reg_change_callback): Remove.
2273 (aarch64_notify_debug_reg_change): Remove.
2274
4a8a7965
YQ
22752015-08-25 Yao Qi <yao.qi@linaro.org>
2276
2277 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2278 Call current_lwp_ptid.
2279
32a271ee
YQ
22802015-08-25 Yao Qi <yao.qi@linaro.org>
2281
2282 * linux-aarch64-low.c (debug_reg_change_callback): Use
2283 debug_printf.
2284
0d51c8d7
YQ
22852015-08-25 Yao Qi <yao.qi@linaro.org>
2286
2287 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2288
31a43dd5
YQ
22892015-08-25 Yao Qi <yao.qi@linaro.org>
2290
2291 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2292
8ee52567
YQ
22932015-08-25 Yao Qi <yao.qi@linaro.org>
2294
2295 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2296 the code.
2297
ff3f0f45
YQ
22982015-08-25 Yao Qi <yao.qi@linaro.org>
2299
2300 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2301 Remove.
2302 (debug_reg_change_callback): Remove argument entry and add argument
2303 lwp. Remove local variable thread. Don't print thread id in the
2304 debugging output. Don't check whether pid of thread equals to pid.
2305 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2306 iterate_over_lwps instead find_inferior.
2307
3d40fbb5
PA
23082015-08-24 Pedro Alves <palves@redhat.com>
2309
2310 * inferiors.c (get_first_process): New function.
2311 * inferiors.h (get_first_process): New declaration.
2312 * remote-utils.c (read_ptid): Default to the first process in the
2313 list, instead of to the current thread's process.
2314
438e1e42
PA
23152015-08-24 Pedro Alves <palves@redhat.com>
2316
2317 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2318 * event-loop.c: Likewise.
2319 * remote-utils.c: Likewise.
2320 * tracepoint.c: Likewise.
2321
a8c6d4fc
PA
23222015-08-24 Pedro Alves <palves@redhat.com>
2323
2324 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2325 ptid_get_lwp.
2326
99b0bb12
PA
23272015-08-21 Pedro Alves <palves@redhat.com>
2328
2329 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2330 instead of literal 1.
2331
f8904751
PA
23322015-08-21 Pedro Alves <palves@redhat.com>
2333
2334 * tdesc.c (default_description): Explicitly zero-initialize.
2335
465a859e
PA
23362015-08-21 Pedro Alves <palves@redhat.com>
2337
2338 PR gdb/18749
2339 * inferiors.c (remove_thread): Discard any pending stop reply for
2340 this thread.
2341 * server.c (remove_all_on_match_pid): Rename to ...
2342 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2343 instead of a pid.
2344 (discard_queued_stop_replies): Change parameter to a ptid. Now
2345 extern.
2346 (handle_v_kill, kill_inferior_callback, captured_main)
2347 (process_serial_event): Adjust.
2348 * server.h (discard_queued_stop_replies): Declare.
2349
f0db101d
PA
23502015-08-21 Pedro Alves <palves@redhat.com>
2351
2352 * linux-low.c (wait_for_sigstop): Always switch to no thread
2353 selected if the previously current thread dies.
2354 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2355 process instead of the current thread's.
2356 * remote-utils.c (input_interrupt): Don't check if there's no
2357 current thread.
2358 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2359 current thread to the general thread fails, error out.
2360 (handle_qxfer_auxv, handle_qxfer_libraries)
2361 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2362 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2363 (handle_query): Check if there's a thread selected instead of
2364 checking whether there's any thread in the thread list.
2365 (handle_qxfer_threads, handle_qxfer_btrace)
2366 (handle_qxfer_btrace_conf): Don't error out early if there's no
2367 thread in the thread list.
2368 (handle_v_cont, myresume): Don't set the current thread to the
2369 continue thread.
2370 (process_serial_event) <Hg handling>: Also set thread_id if the
2371 previous general thread is still alive.
2372 (process_serial_event) <g/G handling>: If setting the current
2373 thread to the general thread fails, error out.
2374 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2375 thread's lwp instead of the current thread's.
2376 * target.c (set_desired_thread): If the desired thread was not
2377 found, leave the current thread pointing to NULL. Return an int
2378 (boolean) indicating success.
2379 * target.h (set_desired_thread): Change return type to int.
2380
40045d91
MF
23812015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2382
2383 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2384 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2385 #includes.
2386 (ps_get_thread_area): New function.
2387
45face3b
GB
23882015-08-19 Gary Benson <gbenson@redhat.com>
2389
2390 * hostio.c (handle_pread): Do not attempt to read more data
2391 than hostio_reply_with_data can fit in a packet.
2392
16d5f642
JB
23932015-08-18 Joel Brobecker <brobecker@adacore.com>
2394
2395 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2396
a738da3a
MF
23972015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2398
2399 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2400
33ebda9d
PA
24012015-08-06 Pedro Alves <palves@redhat.com>
2402
2403 * tracepoint.c (expr_eval_result): Now an int.
2404
a44892be
PA
24052015-08-06 Pedro Alves <palves@redhat.com>
2406
2407 * gdbthread.h (struct regcache): Forward declare.
2408 (struct thread_info) <regcache_data>: Now a struct regcache
2409 pointer.
2410 * inferiors.c (inferior_regcache_data)
2411 (set_inferior_regcache_data): Now work with struct regcache
2412 pointers.
2413 * inferiors.h (struct regcache): Forward declare.
2414 (inferior_regcache_data, set_inferior_regcache_data): Now work
2415 with struct regcache pointers.
2416 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2417 (free_register_cache_thread): Remove struct regcache pointer
2418 casts.
2419
608a1e46
PA
24202015-08-06 Pedro Alves <palves@redhat.com>
2421
2422 * server.c (captured_main): On error, print the exception message
2423 to stderr, and if run_once is set, throw a quit.
2424
f0ce0d3a
PA
24252015-08-06 Pedro Alves <palves@redhat.com>
2426
2427 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2428 the current thread.
2429
bf47e248
PA
24302015-08-06 Pedro Alves <palves@redhat.com>
2431
2432 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2433 reading beyond the passed in buffer length.
2434
b6b9ffcc
PL
24352015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2436
2437 * tracepoint.c (symbol_list) <required>: Remove.
2438
863d01bd
PA
24392015-08-06 Pedro Alves <palves@redhat.com>
2440
2441 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2442 count if stopping and suspending threads.
2443 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2444 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2445 (linux_detach): Complete an ongoing step-over.
2446 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2447 throughout.
2448 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2449 (linux_wait_1): If passing a signal to the inferior after
2450 finishing a step-over, unsuspend and re-resume all lwps. If we
2451 see a single-step event but the thread should be continuing, don't
2452 pass the trap to gdb.
2453 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2454 internal_error instead of gdb_assert.
2455 (enqueue_pending_signal): New function.
2456 (check_ptrace_stopped_lwp_gone): Add debug output.
2457 (start_step_over): Use internal_error instead of gdb_assert.
2458 (complete_ongoing_step_over): New function.
2459 (linux_resume_one_thread): Don't resume a suspended thread.
2460 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2461 it stepping.
2462
00db26fa
PA
24632015-08-06 Pedro Alves <palves@redhat.com>
2464
2465 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2466 (linux_thread_alive): Use lwp_is_marked_dead.
2467 (extended_event_reported): Delete.
2468 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2469 instead of extended_event_reported.
2470 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2471 as well.
2472 (lwp_is_marked_dead): New function.
2473 (lwp_running): Use lwp_is_marked_dead.
2474 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2475 comment.
2476
ad071a30
PA
24772015-08-06 Pedro Alves <palves@redhat.com>
2478
2479 * linux-low.c (linux_wait_1): Move fork event output out of the
2480 !report_to_gdb check. Pass event_child->waitstatus to
2481 target_waitstatus_to_string instead of ourstatus.
2482
524b57e6
YQ
24832015-08-04 Yao Qi <yao.qi@linaro.org>
2484
2485 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2486 if current_thread is 32 bit.
2487
6085d6f6
YQ
24882015-08-04 Yao Qi <yao.qi@linaro.org>
2489
2490 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2491 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2492 * server.c (extended_protocol): Remove "static".
2493 * server.h (extended_protocol): Declare it.
2494
8a7e4587
YQ
24952015-08-04 Yao Qi <yao.qi@linaro.org>
2496
2497 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2498 both aarch64 and aarch32.
2499 (aarch64_set_pc): Likewise.
2500
3b53ae99
YQ
25012015-08-04 Yao Qi <yao.qi@linaro.org>
2502
2503 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2504 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2505 arm-with-neon.xml to srv_xmlfiles.
2506 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2507 (is_64bit_tdesc): New function.
2508 (aarch64_linux_read_description): New function.
2509 (aarch64_arch_setup): Call aarch64_linux_read_description.
2510 (regs_info): Rename to regs_info_aarch64.
2511 (aarch64_regs_info): Return right regs_info.
2512 (initialize_low_arch): Call initialize_low_arch_aarch32.
2513
bd9e6534
YQ
25142015-08-04 Yao Qi <yao.qi@linaro.org>
2515
2516 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2517 * linux-aarch32-low.c: New file.
2518 * linux-aarch32-low.h: New file.
2519 * linux-arm-low.c (arm_fill_gregset): Move it to
2520 linux-aarch32-low.c.
2521 (arm_store_gregset): Likewise.
2522 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2523 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2524 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2525 (regs_info): Rename to regs_info_arm.
2526 (arm_regs_info): Return regs_info_aarch32 if
2527 have_ptrace_getregset is 1 and target description is
2528 arm_with_neon or arm_with_vfpv3.
2529 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2530 Call initialize_low_arch_aarch32 instead.
2531
ded48a5e
YQ
25322015-08-04 Yao Qi <yao.qi@linaro.org>
2533
2534 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2535 * linux-low.c: ... here.
2536 * linux-low.h (have_ptrace_getregset): Declare it.
2537
96e9210f
PA
25382015-08-04 Pedro Alves <palves@redhat.com>
2539
2540 * thread-db.c (struct thread_db): Use new typedefs.
2541 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2542 CHK calls.
2543 (disable_thread_event_reporting): Cast result of dlsym to
2544 destination function pointer type.
2545 (thread_db_mourn): Use td_ta_delete_ftype.
2546
af60a1ef
SL
25472015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2548
2549 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2550 arch variant.
2551 (CDX_BREAKPOINT): Define for R2.
2552 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2553 (the_low_target): Add comments.
2554
e8b41681
YQ
25552015-07-30 Yao Qi <yao.qi@linaro.org>
2556
2557 * linux-arm-low.c (arm_hwcap): Remove it.
2558 (arm_read_description): New local variable arm_hwcap. Don't
2559 set arm_hwcap to zero.
2560
89abb039
YQ
25612015-07-30 Yao Qi <yao.qi@linaro.org>
2562
2563 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2564 Use regcache->tdesc instead.
2565 (arm_store_wmmxregset): Likewise.
2566 (arm_fill_vfpregset): Likewise.
2567 (arm_store_vfpregset): Likewise.
2568
deca266c
YQ
25692015-07-30 Yao Qi <yao.qi@linaro.org>
2570
2571 * linux-arm-low.c: Include arch/arm.h.
2572 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2573 (arm_store_gregset): Likewise.
2574
aa58a496
SM
25752015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2576
2577 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2578 ptrace's 4th parameter.
2579
50904b25
YQ
25802015-07-27 Yao Qi <yao.qi@linaro.org>
2581
2582 * configure.srv (case aarch64*-*-linux*): Don't set
2583 srv_linux_usrregs.
2584
5826e159
PA
25852015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2586
2587 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2588 sys/ptrace.h.
2589 * linux-arm-low.c: Likewise.
2590 * linux-cris-low.c: Likewise.
2591 * linux-crisv32-low.c: Likewise.
2592 * linux-low.c: Likewise.
2593 * linux-m68k-low.c: Likewise.
2594 * linux-mips-low.c: Likewise.
2595 * linux-nios2-low.c: Likewise.
2596 * linux-s390-low.c: Likewise.
2597 * linux-sparc-low.c: Likewise.
2598 * linux-tic6x-low.c: Likewise.
2599 * linux-tile-low.c: Likewise.
2600 * linux-x86-low.c: Likewise.
2601
54019719
PA
26022015-07-24 Pedro Alves <palves@redhat.com>
2603
2604 * config.in: Regenerate.
2605 * configure: Regenerate.
2606
eb7aa561
PA
26072015-07-24 Pedro Alves <palves@redhat.com>
2608
2609 * acinclude.m4: Include ../ptrace.m4.
2610 * configure.ac: Call GDB_AC_PTRACE.
2611 * config.in, configure: Regenerate.
2612
55d7b841
YQ
26132015-07-24 Yao Qi <yao.qi@linaro.org>
2614
2615 * linux-low.c (linux_create_inferior): Remove setting to
2616 proc->priv->new_inferior.
2617 (linux_attach): Likewise.
2618 (linux_low_filter_event): Likewise.
2619 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2620
c06cbd92
YQ
26212015-07-24 Yao Qi <yao.qi@linaro.org>
2622
2623 * linux-low.c (linux_arch_setup): New function.
2624 (linux_low_filter_event): If proc->tdesc is NULL and
2625 proc->attached is true, call the_low_target.arch_setup.
2626 Otherwise, keep status pending, and return.
2627 (linux_resume_one_lwp_throw): Don't call get_pc if
2628 thread->while_stepping isn't NULL. Don't call
2629 get_thread_regcache if proc->tdesc is NULL.
2630 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2631 (linux_target_ops): Install arch_setup.
2632 * server.c (start_inferior): Call the_target->arch_setup.
2633 * target.h (struct target_ops) <arch_setup>: New field.
2634 (target_arch_setup): New marco.
2635 * lynx-low.c (lynx_target_ops): Update.
2636 * nto-low.c (nto_target_ops): Update.
2637 * spu-low.c (spu_target_ops): Update.
2638 * win32-low.c (win32_target_ops): Update.
2639
5ae3ebba
YQ
26402015-07-24 Yao Qi <yao.qi@linaro.org>
2641
2642 * linux-low.c (linux_add_process): Don't set
2643 proc->priv->new_inferior.
2644 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2645 (linux_attach): Likewise.
2646
eb97750b
YQ
26472015-07-24 Yao Qi <yao.qi@linaro.org>
2648
2649 * server.c (start_inferior): Code refactor.
2650
51aee833
YQ
26512015-07-24 Yao Qi <yao.qi@linaro.org>
2652
2653 * server.c (process_serial_event): Set general_thread.
2654
af1b22f3
YQ
26552015-07-21 Yao Qi <yao.qi@linaro.org>
2656
2657 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2658 aarch64_linux_get_debug_reg_capacity.
2659
554717a3
YQ
26602015-07-17 Yao Qi <yao.qi@linaro.org>
2661
2662 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2663 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2664 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2665 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2666 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2667 (AARCH64_HWP_ALIGNMENT): Likewise.
2668 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2669 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2670 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2671 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2672 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2673 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2674 (struct aarch64_debug_reg_state): Likewise.
2675 (struct arch_lwp_info): Likewise.
2676 (aarch64_align_watchpoint): Likewise.
2677 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2678 (aarch64_watchpoint_length): Likewise.
2679 (aarch64_point_encode_ctrl_reg): Likewise
2680 (aarch64_point_is_aligned): Likewise.
2681 (aarch64_align_watchpoint): Likewise.
2682 (aarch64_linux_set_debug_regs):
2683 (aarch64_dr_state_insert_one_point): Likewise.
2684 (aarch64_dr_state_remove_one_point): Likewise.
2685 (aarch64_handle_breakpoint): Likewise.
2686 (aarch64_handle_aligned_watchpoint): Likewise.
2687 (aarch64_handle_unaligned_watchpoint): Likewise.
2688 (aarch64_handle_watchpoint): Likewise.
2689
c67ca4de
YQ
26902015-07-17 Yao Qi <yao.qi@linaro.org>
2691
2692 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2693 and don't aarch64_get_debug_reg_state. All callers update.
2694 (aarch64_handle_aligned_watchpoint): Likewise.
2695 (aarch64_handle_unaligned_watchpoint): Likewise.
2696 (aarch64_handle_watchpoint): Likewise.
2697 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2698 (aarch64_remove_point): Likewise.
2699
25abf979
YQ
27002015-07-17 Yao Qi <yao.qi@linaro.org>
2701
2702 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2703 debug_printf.
2704 (aarch64_handle_unaligned_watchpoint): Likewise.
2705
db1ff28b
JK
27062015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2707
2708 Revert the previous 3 commits:
2709 Move gdb_regex* to common/
2710 Move linux_find_memory_regions_full & co.
2711 gdbserver build-id attribute generator
2712
700ca40f
JK
27132015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2714 Jan Kratochvil <jan.kratochvil@redhat.com>
2715
2716 gdbserver build-id attribute generator.
2717 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2718 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2719 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2720 (find_phdr): New.
2721 (get_dynamic): Use find_pdhr to traverse program headers.
2722 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2723 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2724 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2725 (get_hex_build_id): New.
2726 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2727 to reply XML document.
2728
9904185c
JK
27292015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2730 Jan Kratochvil <jan.kratochvil@redhat.com>
2731
2732 * target.c: Include target/target-utils.h and fcntl.h.
2733 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2734 (target_fileio_read_stralloc): New functions.
2735
6e5b4429
JK
27362015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2737
2738 * Makefile.in (OBS): Add gdb_regex.o.
2739 (gdb_regex.o): New.
2740 * config.in: Rebuilt.
2741 * configure: Rebuilt.
2742
ddc98fbf
JK
27432015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2744 Jan Kratochvil <jan.kratochvil@redhat.com>
2745
2746 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2747 * Makefile.in (OBS): Add target-utils.o.
2748 (linux-maps.o, target-utils.o): New.
2749 * configure.srv (srv_linux_obj): Add linux-maps.o.
2750
e57bb7a0
PL
27512015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2752
2753 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2754 function, return 1.
2755 (the_low_target): Install it.
2756
586b02a9
PA
27572015-07-14 Pedro Alves <palves@redhat.com>
2758
2759 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2760 Instead, ignore ECHILD, and throw an error for other errnos.
2761
58c1b36c
PA
27622015-07-10 Pedro Alves <palves@redhat.com>
2763
2764 * event-loop.c (struct callback_event) <data>: Change type to
2765 gdb_client_data instance instead of gdb_client_data pointer.
2766 (append_callback_event): Adjust.
2767
421530db
PL
27682015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2769
2770 * linux-aarch64-low.c: Add comments for each linux_target_ops
2771 method. Remove comments already covered in target_ops and
2772 linux_target_ops definitions.
2773 (the_low_target): Add comments for each unimplemented method.
2774
c2d65f38
YQ
27752015-07-09 Yao Qi <yao.qi@linaro.org>
2776
2777 * linux-aarch64-low.c (aarch64_regmap): Remove.
2778 (aarch64_usrregs_info): Remove.
2779 (regs_info): Set field usrregs to NULL.
2780
b20a6524
MM
27812015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2782
2783 * linux-low.c: Include "rsp-low.h"
2784 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2785 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2786 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2787 (handle_btrace_enable_pt): New.
2788 (handle_btrace_general_set): Support "pt".
2789 (handle_btrace_conf_general_set): Support "pt:size".
2790
96c97461
PL
27912015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2792
2793 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2794 Z_PACKET_SW_BP.
2795
37d66942
PL
27962015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2797
2798 * linux-aarch64-low.c: Remove comment about endianness.
2799 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2800 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2801 memcmp.
2802
dc06243f
GB
28032015-06-24 Gary Benson <gbenson@redhat.com>
2804
2805 * linux-i386-ipa.c (stdint.h): Do not include.
2806 * lynx-i386-low.c (stdint.h): Likewise.
2807 * lynx-ppc-low.c (stdint.h): Likewise.
2808 * mem-break.c (stdint.h): Likewise.
2809 * thread-db.c (stdint.h): Likewise.
2810 * tracepoint.c (stdint.h): Likewise.
2811 * win32-low.c (stdint.h): Likewise.
2812
124e13d9
SM
28132015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2814
2815 * server.c (write_qxfer_response): Update call to
2816 remote_escape_output.
2817
909c2cda
JK
28182015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2819 Jan Kratochvil <jan.kratochvil@redhat.com>
2820
2821 Merge multiple hex conversions.
2822 * gdbreplay.c (tohex): Rename to 'fromhex'.
2823 (logchar): Use fromhex.
2824
24c05f46
JK
28252015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2826
2827 * server.c (handle_qxfer_libraries): Set `version' attribute for
2828 <library-list>.
2829
14d2069a
GB
28302015-06-10 Gary Benson <gbenson@redhat.com>
2831
2832 * target.h (struct target_ops) <multifs_open>: New field.
2833 <multifs_unlink>: Likewise.
2834 <multifs_readlink>: Likewise.
2835 * linux-low.c (nat/linux-namespaces.h): New include.
2836 (linux_target_ops): Initialize the_target->multifs_open,
2837 the_target->multifs_unlink and the_target->multifs_readlink.
2838 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2839 * hostio.c (hostio_fs_pid): New static variable.
2840 (hostio_handle_new_gdb_connection): New function.
2841 (handle_setfs): Likewise.
2842 (handle_open): Use the_target->multifs_open as appropriate.
2843 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2844 (handle_readlink): Use the_target->multifs_readlink as
2845 appropriate.
2846 (handle_vFile): Handle vFile:setfs packets.
2847 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2848 after target_handle_new_gdb_connection.
2849
4b8b5e72
GB
28502015-06-10 Gary Benson <gbenson@redhat.com>
2851
2852 * configure.ac (AC_CHECK_FUNCS): Add setns.
2853 * config.in: Regenerate.
2854 * configure: Likewise.
2855 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2856 (linux-namespaces.o): New rule.
2857 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2858
3ac2e371
GB
28592015-06-09 Gary Benson <gbenson@redhat.com>
2860
2861 * hostio.c (handle_open): Process mode argument with
2862 fileio_to_host_mode.
2863
ca9b78ce
YQ
28642015-06-01 Yao Qi <yao.qi@linaro.org>
2865
2866 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2867 * linux-x86-low.c: Likewise.
2868
bfacd19d
DB
28692015-05-28 Don Breazeal <donb@codesourcery.com>
2870
2871 * linux-low.c (handle_extended_wait): Initialize
2872 thread_info.last_resume_kind for new fork children.
2873
452003ef
PA
28742015-05-15 Pedro Alves <palves@redhat.com>
2875
2876 * target.h (target_handle_new_gdb_connection): Rewrite using if
2877 wrapped in do/while.
2878
1041a03c
JB
28792015-05-14 Joel Brobecker <brobecker@adacore.com>
2880
2881 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2882 * configure, config.in: Regenerate.
2883 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2884 Declare typedef.
2885
c269dbdb
DB
28862015-05-12 Don Breazeal <donb@codesourcery.com>
2887
2888 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2889 PTRACE_EVENT_VFORK_DONE.
2890 (linux_low_ptrace_options, extended_event_reported): Add vfork
2891 events.
2892 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2893 and "vforkdone" for RSP 'T' Stop Reply Packet.
2894 * server.h (report_vfork_events): Declare
2895 global variable.
2896
3a8a0396
DB
28972015-05-12 Don Breazeal <donb@codesourcery.com>
2898
2899 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2900 (the_low_target) <new_fork>: Initialize new member.
2901 * linux-arm-low.c (arm_new_fork): New function.
2902 (the_low_target) <new_fork>: Initialize new member.
2903 * linux-low.c (handle_extended_wait): Call new target function
2904 new_fork.
2905 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2906 * linux-mips-low.c (mips_add_watchpoint): New function
2907 extracted from mips_insert_point.
2908 (the_low_target) <new_fork>: Initialize new member.
2909 (mips_linux_new_fork): New function.
2910 (mips_insert_point): Call mips_add_watchpoint.
2911 * linux-x86-low.c (x86_linux_new_fork): New function.
2912 (the_low_target) <new_fork>: Initialize new member.
2913
de0d863e
DB
29142015-05-12 Don Breazeal <donb@codesourcery.com>
2915
2916 * linux-low.c (handle_extended_wait): Implement return value,
2917 rename argument 'event_child' to 'event_lwp', handle
2918 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2919 (linux_low_ptrace_options): New function.
2920 (linux_low_filter_event): Call linux_low_ptrace_options,
2921 use different argument fo linux_enable_event_reporting,
2922 use return value from handle_extended_wait.
2923 (extended_event_reported): New function.
2924 (linux_wait_1): Call extended_event_reported and set
2925 status to report fork events.
2926 (linux_write_memory): Add pid to debug message.
2927 (reset_lwp_ptrace_options_callback): New function.
2928 (linux_handle_new_gdb_connection): New function.
2929 (linux_target_ops): Initialize new structure member.
2930 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2931 * lynx-low.c: Initialize new structure member.
2932 * remote-utils.c (prepare_resume_reply): Implement stop reason
2933 "fork" for "T" stop message.
2934 * server.c (handle_query): Call handle_new_gdb_connection.
2935 * server.h (report_fork_events): Declare global flag.
2936 * target.h (struct target_ops) <handle_new_gdb_connection>:
2937 New member.
2938 (target_handle_new_gdb_connection): New macro.
2939 * win32-low.c: Initialize new structure member.
2940
ddcbc397
DB
29412015-05-12 Don Breazeal <donb@codesourcery.com>
2942
2943 * mem-break.c (APPEND_TO_LIST): Define macro.
2944 (clone_agent_expr): New function.
2945 (clone_one_breakpoint): New function.
2946 (clone_all_breakpoints): New function.
2947 * mem-break.h: Declare new functions.
2948
89245bc0
DB
29492015-05-12 Don Breazeal <donb@codesourcery.com>
2950
2951 * linux-low.c (linux_supports_fork_events): New function.
2952 (linux_supports_vfork_events): New function.
2953 (linux_target_ops): Initialize new structure members.
2954 (initialize_low): Call linux_check_ptrace_features.
2955 * lynx-low.c (lynx_target_ops): Initialize new structure
2956 members.
2957 * server.c (report_fork_events, report_vfork_events):
2958 New global flags.
2959 (handle_query): Add new features to qSupported packet and
2960 response.
2961 (captured_main): Initialize new global variables.
2962 * target.h (struct target_ops) <supports_fork_events>:
2963 New member.
2964 <supports_vfork_events>: New member.
2965 (target_supports_fork_events): New macro.
2966 (target_supports_vfork_events): New macro.
2967 * win32-low.c (win32_target_ops): Initialize new structure
2968 members.
2969
835205d0
GB
29702015-05-12 Gary Benson <gbenson@redhat.com>
2971
2972 * server.c (handle_qxfer_exec_file): Use current process
2973 if annex is empty.
2974
21e94bd9
SL
29752015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2976
2977 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2978 Remove HAVE_PTRACE_GETREGS conditionals.
2979 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2980 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2981
45614f15
YQ
29822015-05-08 Yao Qi <yao.qi@linaro.org>
2983
2984 * linux-low.c (linux_supports_conditional_breakpoints): New
2985 function.
2986 (linux_target_ops): Install new target method.
2987 * lynx-low.c (lynx_target_ops): Install NULL hook for
2988 supports_conditional_breakpoints.
2989 * nto-low.c (nto_target_ops): Likewise.
2990 * spu-low.c (spu_target_ops): Likewise.
2991 * win32-low.c (win32_target_ops): Likewise.
2992 * server.c (handle_query): Check
2993 target_supports_conditional_breakpoints.
2994 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2995 New field.
2996 (target_supports_conditional_breakpoints): New macro.
2997
80ad801e
PA
29982015-05-06 Pedro Alves <palves@redhat.com>
2999
3000 PR server/18081
3001 * server.c (start_inferior): If the process exits, mourn it.
3002
819843c7
GB
30032015-04-21 Gary Benson <gbenson@redhat.com>
3004
3005 * hostio.c (fileio_open_flags_to_host): Factored out to
3006 fileio_to_host_openflags in common/fileio.c. Single use
3007 updated.
3008
a2d5a9d7
MF
30092015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3010
3011 * linux-xtensa-low.c (xtensa_fill_gregset)
3012 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3013 XCHAL_HAVE_LOOP.
3014
deb44829
MF
30152015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3016
3017 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3018 (regs_info): Replace usrregs pointer with NULL.
3019
e57f1de3
GB
30202015-04-17 Gary Benson <gbenson@redhat.com>
3021
3022 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3023 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3024 * server.c (handle_qxfer_exec_file): New function.
3025 (qxfer_packets): Add exec-file entry.
3026 (handle_query): Report qXfer:exec-file:read as supported packet.
3027
62828379
RN
30282015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3029
3030 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3031
b88bb450
GB
30322015-04-09 Gary Benson <gbenson@redhat.com>
3033
3034 * hostio-errno.c (errno_to_fileio_error): Remove function.
3035 Update caller to use remote_fileio_to_fio_error.
3036
c8f4bfdd
YQ
30372015-04-09 Yao Qi <yao.qi@linaro.org>
3038
3039 * linux-low.c (linux_insert_point): Call
3040 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3041 (linux_remove_point): Call remove_memory_breakpoint if type is
3042 raw_bkpt_type_sw.
3043 * linux-x86-low.c (x86_insert_point): Don't call
3044 insert_memory_breakpoint.
3045 (x86_remove_point): Don't call remove_memory_breakpoint.
3046
41f98f02
PA
30472015-04-01 Pedro Alves <palves@redhat.com>
3048 Cleber Rosa <crosa@redhat.com>
3049
3050 * server.c (gdbserver_usage): Reorganize and extend the usage
3051 message.
3052
2bf6fb9d
PA
30532015-03-24 Pedro Alves <palves@redhat.com>
3054
3055 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3056 output. Also dump TRAP_TRACE.
3057 (linux_low_filter_event): In debug output, distinguish a
3058 resume_stop SIGSTOP from a delayed SIGSTOP.
3059
369f6daa
GB
30602015-03-24 Gary Benson <gbenson@redhat.com>
3061
3062 * linux-x86-low.c (x86_linux_new_thread): Moved to
3063 nat/x86-linux.c.
3064 (x86_linux_prepare_to_resume): Likewise.
3065
8e5d4070
GB
30662015-03-24 Gary Benson <gbenson@redhat.com>
3067
3068 * Makefile.in (x86-linux-dregs.o): New rule.
3069 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3070 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3071 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3072 (x86_linux_dr_get): Likewise.
3073 (x86_linux_dr_set): Likewise.
3074 (update_debug_registers_callback): Likewise.
3075 (x86_linux_dr_set_addr): Likewise.
3076 (x86_linux_dr_get_addr): Likewise.
3077 (x86_linux_dr_set_control): Likewise.
3078 (x86_linux_dr_get_control): Likewise.
3079 (x86_linux_dr_get_status): Likewise.
3080 (x86_linux_update_debug_registers): Likewise.
3081
2b95d440
GB
30822015-03-24 Gary Benson <gbenson@redhat.com>
3083
3084 * linux-x86-low.c (x86_linux_update_debug_registers):
3085 New function, factored out from...
3086 (x86_linux_prepare_to_resume): ...this.
3087
14b0bc68
GB
30882015-03-24 Gary Benson <gbenson@redhat.com>
3089
3090 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3091 (x86_linux_dr_set): Likewise.
3092 (update_debug_registers_callback): Likewise.
3093 (x86_linux_dr_set_addr): Likewise.
3094 (x86_linux_dr_get_addr): Likewise.
3095 (x86_linux_dr_set_control): Likewise.
3096 (x86_linux_dr_get_control): Likewise.
3097 (x86_linux_dr_get_status): Likewise.
3098 (x86_linux_prepare_to_resume): Likewise.
3099
5dfe6ca8
GB
31002015-03-24 Gary Benson <gbenson@redhat.com>
3101
3102 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3103 Use perror_with_name. Pass string through gettext.
3104 (x86_linux_dr_set): Likewise.
3105
d33472ad
GB
31062015-03-24 Gary Benson <gbenson@redhat.com>
3107
3108 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3109 (x86_linux_dr_set_addr): ...this.
3110 (x86_dr_low_get_addr): Rename to...
3111 (x86_linux_dr_get_addr): ...this.
3112 (x86_dr_low_set_control): Rename to...
3113 (x86_linux_dr_set_control): ...this.
3114 (x86_dr_low_get_control): Rename to...
3115 (x86_linux_dr_get_control): ...this.
3116 (x86_dr_low_get_status): Rename to...
3117 (x86_linux_dr_get_status): ...this.
3118 (x86_dr_low): Update with new function names.
3119
4b134ca1
GB
31202015-03-24 Gary Benson <gbenson@redhat.com>
3121
3122 * Makefile.in (x86-linux.o): New rule.
3123 * configure.srv: Add x86-linux.o to relevant targets.
3124 * linux-low.c (lwp_set_arch_private_info): New function.
3125 (lwp_arch_private_info): Likewise.
3126 * linux-x86-low.c: Include nat/x86-linux.h.
3127 (arch_lwp_info): Removed structure.
3128 (update_debug_registers_callback):
3129 Use lwp_set_debug_registers_changed.
3130 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3131 and lwp_set_debug_registers_changed.
3132 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3133
34c703da
GB
31342015-03-24 Gary Benson <gbenson@redhat.com>
3135
3136 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3137 * linux-arm-low.c (arm_new_thread): Likewise.
3138 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3139 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3140 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3141 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3142
cff068da
GB
31432015-03-24 Gary Benson <gbenson@redhat.com>
3144
3145 * linux-low.c (ptid_of_lwp): New function.
3146 (lwp_is_stopped): Likewise.
3147 (lwp_stop_reason): Likewise.
3148 * linux-x86-low.c (update_debug_registers_callback):
3149 Use lwp_is_stopped.
3150 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3151 lwp_stop_reason.
3152
b2f7c7e8
GB
31532015-03-24 Gary Benson <gbenson@redhat.com>
3154
3155 * linux-low.h (linux_stop_lwp): Remove declaration.
3156
6d4ee8c6
GB
31572015-03-24 Gary Benson <gbenson@redhat.com>
3158
3159 * linux-low.h: Include nat/linux-nat.h.
3160 * linux-low.c (iterate_over_lwps_args): New structure.
3161 (iterate_over_lwps_filter): New function.
3162 (iterate_over_lwps): Likewise.
3163 * linux-x86-low.c (update_debug_registers_callback):
3164 Update signature to what iterate_over_lwps expects.
3165 Remove PID check that iterate_over_lwps now performs.
3166 (x86_dr_low_set_addr): Use iterate_over_lwps.
3167 (x86_dr_low_set_control): Likewise.
3168
70a0bb6b
GB
31692015-03-24 Gary Benson <gbenson@redhat.com>
3170
3171 * linux-x86-low.c (x86_debug_reg_state): New function.
3172 (x86_linux_prepare_to_resume): Use the above.
3173
7b669087
GB
31742015-03-24 Gary Benson <gbenson@redhat.com>
3175
3176 * linux-low.c (current_lwp_ptid): New function.
3177 * linux-x86-low.c: Include nat/linux-nat.h.
3178 (x86_dr_low_get_addr): Use current_lwp_ptid.
3179 (x86_dr_low_get_control): Likewise.
3180 (x86_dr_low_get_status): Likewise.
3181
eef49a3d
PA
31822015-03-20 Pedro Alves <palves@redhat.com>
3183
3184 * tracepoint.c (cmd_qtstatus): Make "str" const.
3185
b2333d22
PA
31862015-03-20 Pedro Alves <palves@redhat.com>
3187
3188 * server.c (handle_general_set): Make "req_str" const.
3189
23f238d3
PA
31902015-03-19 Pedro Alves <palves@redhat.com>
3191
3192 * linux-low.c (linux_resume_one_lwp): Rename to ...
3193 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3194 instead call perror_with_name.
3195 (check_ptrace_stopped_lwp_gone): New function.
3196 (linux_resume_one_lwp): Reimplement as wrapper around
3197 linux_resume_one_lwp_throw that swallows errors if the LWP is
3198 gone.
3199
91baf43f
PA
32002015-03-19 Pedro Alves <palves@redhat.com>
3201
3202 * linux-low.c (count_events_callback, select_event_lwp_callback):
3203 No longer check whether the thread has resume_stop as last resume
3204 kind.
3205
8bf3b159
PA
32062015-03-19 Pedro Alves <palves@redhat.com>
3207
3208 * linux-low.c (count_events_callback, select_event_lwp_callback):
3209 Use the lwp's status_pending_p field, not the thread's.
3210
b90fc188
PA
32112015-03-19 Pedro Alves <palves@redhat.com>
3212
3213 * linux-low.c (select_event_lwp_callback): Update comments to
3214 no longer mention SIGTRAP.
3215
464b0089
GB
32162015-03-18 Gary Benson <gbenson@redhat.com>
3217
3218 * server.c (handle_query): Do not report vFile:fstat as supported.
3219
aa9e327f
GB
32202015-03-11 Gary Benson <gbenson@redhat.com>
3221
3222 * hostio.c (sys/types.h): New include.
3223 (sys/stat.h): Likewise.
3224 (common-remote-fileio.h): Likewise.
3225 (handle_fstat): New function.
3226 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3227
791c0056
GB
32282015-03-11 Gary Benson <gbenson@redhat.com>
3229
3230 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3231 struct stat.st_blocks and struct stat.st_blksize.
3232 * configure: Regenerate.
3233 * config.in: Likewise.
3234 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3235 (OBS): Add common-remote-fileio.o.
3236 (common-remote-fileio.o): New rule.
3237
9a9df970
PA
32382015-03-09 Pedro Alves <palves@redhat.com>
3239
3240 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3241 'struct sockaddr' pointer in 'accept' call.
3242
9eb1356e
PA
32432015-03-09 Pedro Alves <palves@redhat.com>
3244
3245 Revert:
3246 2015-03-07 Pedro Alves <palves@redhat.com>
3247 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3248 or <winsock2.h> here. Instead include "gdb_socket.h".
3249 (remote_open): Use union gdb_sockaddr_u.
3250 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3251 or <winsock2.h> here. Instead include "gdb_socket.h".
3252 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3253 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3254 or <sys/un.h>.
3255 (init_named_socket, gdb_agent_helper_thread): Use union
3256 gdb_sockaddr_u.
3257
aac331e4
PA
32582015-03-07 Pedro Alves <palves@redhat.com>
3259
3260 * configure.ac (build_warnings): Move
3261 -Wdeclaration-after-statement to the C-specific set.
3262 * configure: Regenerate.
3263
366c75fc
PA
32642015-03-07 Pedro Alves <palves@redhat.com>
3265
3266 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3267 or <winsock2.h> here. Instead include "gdb_socket.h".
3268 (remote_open): Use union gdb_sockaddr_u.
3269 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3270 or <winsock2.h> here. Instead include "gdb_socket.h".
3271 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3272 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3273 or <sys/un.h>.
3274 (init_named_socket, gdb_agent_helper_thread): Use union
3275 gdb_sockaddr_u.
3276
492d29ea
PA
32772015-03-07 Pedro Alves <palves@redhat.com>
3278
3279 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3280 instead.
3281
60a191ed
YQ
32822015-03-06 Yao Qi <yao.qi@linaro.org>
3283
3284 * linux-aarch64-low.c (aarch64_insert_point): Use
3285 show_debug_regs as a boolean.
3286 (aarch64_remove_point): Likewise.
3287
f5771b1d
PA
32882015-03-05 Pedro Alves <palves@redhat.com>
3289
3290 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3291 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3292 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3293 * nto-low.c (nto_target_ops): Likewise.
3294 * spu-low.c (spu_target_ops): Likewise.
3295 * win32-low.c (win32_target_ops): Likewise.
3296
3e572f71
PA
32972015-03-04 Pedro Alves <palves@redhat.com>
3298
72f4393d 3299 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3300 Decide whether a breakpoint triggered based on the SIGTRAP's
3301 siginfo.si_code.
72f4393d
L
3302 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3303 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3304 (linux_low_filter_event): Check for breakpoints before checking
3305 watchpoints.
3306 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3307 siginfo.si_code.
72f4393d
L
3308 (linux_stopped_by_sw_breakpoint)
3309 (linux_supports_stopped_by_sw_breakpoint)
3310 (linux_stopped_by_hw_breakpoint)
3311 (linux_supports_stopped_by_hw_breakpoint): New functions.
3312 (linux_target_ops): Install new target methods.
3e572f71 3313
1ec68e26
PA
33142015-03-04 Pedro Alves <palves@redhat.com>
3315
3316 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3317 * server.c (swbreak_feature, hwbreak_feature): New globals.
3318 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3319 (captured_main): Clear swbreak_feature and hwbreak_feature.
3320 * server.h (swbreak_feature, hwbreak_feature): Declare.
3321 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3322 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3323 supports_stopped_by_hw_breakpoint>: New fields.
3324 (target_supports_stopped_by_sw_breakpoint)
3325 (target_stopped_by_sw_breakpoint)
3326 (target_supports_stopped_by_hw_breakpoint)
3327 (target_stopped_by_hw_breakpoint): Declare.
3328
15c66dd6
PA
33292015-03-04 Pedro Alves <palves@redhat.com>
3330
3331 enum lwp_stop_reason -> enum target_stop_reason
3332 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3333 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3334 (linux_wait_1, stuck_in_jump_pad_callback)
3335 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3336 (linux_stopped_by_watchpoint):
3337 * linux-low.h (enum lwp_stop_reason): Delete.
3338 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3339 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3340
98fc70d6
YQ
33412015-03-04 Yao Qi <yao.qi@linaro.org>
3342
3343 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3344
dd2ac174
GB
33452015-03-03 Gary Benson <gbenson@redhat.com>
3346
3347 * hostio.c (handle_vFile): Fix prefix lengths.
3348
d68e53f4
MM
33492015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3350
3351 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3352 ptr_bits.
3353
bf2d68ab
AA
33542015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3355
3356 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3357 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3358 (clean): Add "rm -f" for above C files.
3359 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3360 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3361 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3362 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3363 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3364 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3365 (init_registers_s390x_vx_linux64)
3366 (init_registers_s390x_tevx_linux64)
3367 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3368 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3369 declarations.
3370 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3371 (s390_store_vxrs_high): New functions.
3372 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3373 NT_S390_VXRS_HIGH.
3374 (s390_arch_setup): Add logic for selecting one of the new target
3375 descriptions. Activate the new vector regsets if applicable.
3376 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3377 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3378 and init_registers_s390x_tevx_linux64.
3379
c966a859
PA
33802015-03-01 Pedro Alves <palves@redhat.com>
3381
3382 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3383 parameter.
3384
4180215b
PA
33852015-02-27 Pedro Alves <palves@redhat.com>
3386
3387 * linux-x86-low.c (u_debugreg_offset): New function.
3388 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3389
749bab01
PA
33902015-02-27 Pedro Alves <palves@redhat.com>
3391
3392 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3393 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3394 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3395 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3396 (ps_lsetfpregs, ps_getpid)
3397 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3398 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3399 (ps_lsetxregs, ps_plog): Declare.
3400
3c14e5a3
PA
34012015-02-27 Pedro Alves <palves@redhat.com>
3402
3403 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3404 IP_AGENT_EXPORT_FUNC.
3405 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3406 IP_AGENT_EXPORT_FUNC.
3407 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3408 (IP_AGENT_EXPORT): Delete.
3409 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3410 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3411 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3412 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3413 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3414 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3415 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3416 (traceframe_read_count, traceframe_write_count)
3417 (traceframes_created, trace_state_variables, get_raw_reg)
3418 (get_trace_state_variable_value, set_trace_state_variable_value)
3419 (ust_loaded, helper_thread_id, cmd_buf): Use
3420 IPA_SYM_EXPORTED_NAME.
3421 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3422 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3423 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3424 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3425 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3426 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3427 EXTERN_C_PUSH/EXTERN_C_POP.
3428 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3429 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3430 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3431 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3432 (traceframe_write_count, traceframe_read_count)
3433 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3434 (about_to_request_buffer_space, get_trace_state_variable_value)
3435 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3436 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3437 EXTERN_C_PUSH/EXTERN_C_POP.
3438 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3439 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3440 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3441 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3442 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3443 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3444 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3445 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3446 Define.
3447 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3448 (IP_AGENT_EXPORT_VAR_DECL): Define.
3449 (tracing): Declare.
3450 (gdb_agent_get_raw_reg): Declare.
3451
fe978cb0
PA
34522015-02-27 Tom Tromey <tromey@redhat.com>
3453 Pedro Alves <palves@redhat.com>
3454
3455 Rename symbols whose names are reserved C++ keywords throughout.
3456
3bc3d82a
PA
34572015-02-27 Pedro Alves <palves@redhat.com>
3458
3459 * Makefile.in (COMPILER): New, get it from autoconf.
3460 (CXX): Get from autoconf instead.
3461 (COMPILE.pre): Use COMPILER.
3462 (CC-LD): Rename to ...
3463 (CC_LD): ... this. Use COMPILER.
3464 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3465 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3466 * acinclude.m4: Include build-with-cxx.m4.
3467 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3468 Disable -Werror by default if building in C++ mode.
3469 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3470 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3471 the C++ compiler. Save/restore CXXFLAGS too.
3472 * configure: Regenerate.
3473
07697489
PA
34742015-02-27 Pedro Alves <palves@redhat.com>
3475
3476 * acinclude.m4: Include libiberty.m4.
3477 * configure.ac: Call libiberty_INIT.
3478 * config.in, configure: Regenerate.
3479
9beb7c4e
PA
34802015-02-26 Pedro Alves <palves@redhat.com>
3481
3482 * linux-low.c (linux_wait_1): When incrementing the PC past a
3483 program breakpoint always use the_low_target.breakpoint_len as
3484 increment, rather than the maximum between that and
3485 the_low_target.decr_pc_after_break.
3486
8090aef2
PA
34872015-02-23 Pedro Alves <palves@redhat.com>
3488
3489 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3490 thread was doing a step-over; always adjust the PC if
3491 we stepped over a permanent breakpoint.
3492 (linux_wait_1): If we stepped over breakpoint that was on top of a
3493 permanent breakpoint, manually advance the PC past it.
3494
bc9540e8
PA
34952015-02-23 Pedro Alves <palves@redhat.com>
3496
3497 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3498 modes.
3499 (x86_fill_gregset, x86_store_gregset): Use it when handling
3500 $orig_eax.
3501
2db9a427
PA
35022015-02-20 Pedro Alves <palves@redhat.com>
3503
3504 * thread-db.c: Include "nat/linux-procfs.h".
3505 (thread_db_init): Skip listing new threads if the kernel supports
3506 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3507
afa8d396
PA
35082015-02-20 Pedro Alves <palves@redhat.com>
3509
3510 * linux-low.c (status_pending_p_callback): Use ptid_match.
3511
c9587f88
AT
35122015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3513
3514 PR breakpoints/16812
3515 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3516 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3517 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3518
b05ec7a5
AT
35192015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3520
3521 PR breakpoints/15956
3522 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3523
d33501a5
MM
35242015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3525
3526 * linux-low.c (linux_low_btrace_conf): Print size.
3527 * server.c (handle_btrace_conf_general_set): New.
3528 (hanle_general_set): Call handle_btrace_conf_general_set.
3529 (handle_query): Report Qbtrace-conf:bts:size as supported.
3530
f4abbc16
MM
35312015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3532
3533 * linux-low.c (linux_low_enable_btrace): Update parameters.
3534 (linux_low_btrace_conf): New.
3535 (linux_target_ops)<to_btrace_conf>: Initialize.
3536 * server.c (current_btrace_conf): New.
3537 (handle_btrace_enable): Rename to ...
3538 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3539 to target_enable_btrace. Update comment. Update users.
3540 (handle_qxfer_btrace_conf): New.
3541 (qxfer_packets): Add btrace-conf entry.
3542 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3543 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3544 (target_ops)<read_btrace_conf>: New.
3545 (target_enable_btrace): Update parameters.
3546 (target_read_btrace_conf): New.
3547
043c3577
MM
35482015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3549
3550 * server.c (handle_btrace_general_set): Remove call to
3551 target_supports_btrace.
3552 (supported_btrace_packets): New.
3553 (handle_query): Call supported_btrace_packets.
3554 * target.h: include btrace-common.h.
3555 (btrace_target_info): Removed.
3556 (supports_btrace, target_supports_btrace): Update parameters.
3557
734b0e4b
MM
35582015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3559
3560 * Makefile.in (SFILES): Add common/btrace-common.c.
3561 (OBS): Add common/btrace-common.o.
3562 (btrace-common.o): Add build rules.
3563 * linux-low: Include btrace-common.h.
3564 (linux_low_read_btrace): Use struct btrace_data. Call
3565 btrace_data_init and btrace_data_fini.
3566
d6c146e9
PA
35672015-02-06 Pedro Alves <palves@redhat.com>
3568
3569 * thread-db.c (find_new_threads_callback): Add debug output.
3570
20ba1ce6
PA
35712015-02-04 Pedro Alves <palves@redhat.com>
3572
3573 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3574 (resume_stopped_resumed_lwps): New function.
3575 (linux_wait_for_event_filtered): Use it.
3576
8cc73a39
SDJ
35772015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3578
3579 * Makefile.in (SFILES): Add linux-personality.c.
3580 (linux-personality.o): New rule.
3581 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3582 list of objects to be built.
3583 * linux-low.c: Include nat/linux-personality.h.
3584 (linux_create_inferior): Remove code to disable address space
3585 randomization (moved to ../nat/linux-personality.c). Create
3586 cleanup to disable address space randomization.
3587
fb23d554
SDJ
35882015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3589
3590 * Makefile.in (posix-strerror.o): New rule.
3591 (mingw-strerror.o): Likewise.
3592 * configure: Regenerated.
3593 * configure.ac: Source file ../common/common.host. Initialize new
3594 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3595
cdf43629
YQ
35962015-01-14 Yao Qi <yao@codesourcery.com>
3597
3598 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3599 (ppc-linux.o): New rule.
3600 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3601 * configure.ac: AC_CHECK_FUNCS(getauxval).
3602 * config.in: Re-generated.
3603 * configure: Re-generated.
3604 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3605 ppc64_64bit_inferior_p
3606
514c5338
YQ
36072015-01-14 Yao Qi <yao@codesourcery.com>
3608
3609 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3610 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3611 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3612 (PT_ORIG_R3, PT_TRAP): Likewise.
3613 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3614 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3615 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3616
3368c1e5
JB
36172015-01-10 Joel Brobecker <brobecker@adacore.com>
3618
3619 * i387-fp.c (i387_cache_to_xsave): In look over
3620 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3621 zmmh_low_space field by use of zmmh_high_space.
3622
582511be
PA
36232015-01-09 Pedro Alves <palves@redhat.com>
3624
3625 * linux-low.c (step_over_bkpt): Move higher up in the file.
3626 (handle_extended_wait): Don't store the stop_pc here.
3627 (get_stop_pc): Adjust comments and rename to ...
3628 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3629 stopped for a software breakpoint or hardware breakpoint.
3630 (thread_still_has_status_pending_p): New function.
3631 (status_pending_p_callback): Use
3632 thread_still_has_status_pending_p. If the event is no longer
3633 interesting, resume the LWP.
3634 (handle_tracepoints): Add assert.
3635 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3636 (wstatus_maybe_breakpoint): New function.
3637 (cancel_breakpoint): Delete function.
3638 (check_stopped_by_watchpoint): New function, factored out from
3639 linux_low_filter_event.
3640 (lp_status_maybe_breakpoint): Delete function.
3641 (linux_low_filter_event): Remove filter_ptid argument.
3642 Leave thread group exits pending here. Store the LWP's stop PC.
3643 Always leave events pending.
3644 (linux_wait_for_event_filtered): Pull all events out of the
3645 kernel, and leave them all pending.
3646 (count_events_callback, select_event_lwp_callback): Consider all
3647 events.
3648 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3649 (select_event_lwp): Only give preference to the stepping LWP in
3650 all-stop mode. Adjust comments.
3651 (ignore_event): New function.
3652 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3653 references to cancel_breakpoints. Adjust to renames. Also give
3654 equal priority to all LWPs that have had events in non-stop mode.
3655 If reporting a software breakpoint event, unadjust the LWP's PC.
3656 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3657 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3658 Adjust.
3659 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3660 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3661 (linux_stopped_by_watchpoint): Adjust.
3662 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3663 * linux-low.h (enum lwp_stop_reason): New.
3664 (struct lwp_info) <stop_pc>: Adjust comment.
3665 <stopped_by_watchpoint>: Delete field.
3666 <stop_reason>: New field.
3667 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3668 * mem-break.c (software_breakpoint_inserted_here)
3669 (hardware_breakpoint_inserted_here): New function.
3670 * mem-break.h (software_breakpoint_inserted_here)
3671 (hardware_breakpoint_inserted_here): Declare.
3672 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3673 (cancel_breakpoints): Delete.
3674 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3675 (upload_fast_traceframes): Remove references to
3676 cancel_breakpoints.
3677
a33e3959
PA
36782015-01-09 Pedro Alves <palves@redhat.com>
3679
3680 * thread-db.c (find_new_threads_callback): Ignore thread if the
3681 kernel thread ID is -1.
3682
8784d563
PA
36832015-01-09 Pedro Alves <palves@redhat.com>
3684
3685 * linux-low.c (linux_attach_fail_reason_string): Move to
3686 nat/linux-ptrace.c, and rename.
3687 (linux_attach_lwp): Update comment.
3688 (attach_proc_task_lwp_callback): New function.
3689 (linux_attach): Adjust to rename and use
3690 linux_proc_attach_tgid_threads.
3691 (linux_attach_fail_reason_string): Delete declaration.
3692
76f2b779
JB
36932015-01-01 Joel Brobecker <brobecker@adacore.com>
3694
3695 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3696 * server.c (gdbserver_version): Likewise.
3697
fafcc06a
SDJ
36982014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3699
3700 * remote-utils.c: Include ctype.h.
3701 (input_interrupt): Explicitly handle the case when the char
3702 received is the NUL byte. Improve the printing of non-ASCII
3703 characters.
3704
beed38b8
JB
37052014-12-16 Joel Brobecker <brobecker@adacore.com>
3706
3707 * linux-low.c (linux_low_filter_event): Update call to
3708 linux_enable_event_reporting following the addition of
3709 a new parameter to that function.
3710
bf330350
CU
37112014-12-16 Catalin Udma <catalin.udma@freescale.com>
3712
3713 PR server/17457
3714 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3715 (AARCH64_FPCR_REGNO): Likewise.
3716 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3717 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3718 (aarch64_store_fpregset): Likewise.
3719
5227d625
JB
37202014-12-15 Joel Brobecker <brobecker@adacore.com>
3721
3722 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3723 Remove FIXME comment about assumption about N.
3724
f93b65a0
JB
37252014-12-13 Joel Brobecker <brobecker@adacore.com>
3726
3727 * configure.ac: If large-file support is disabled in GDBserver,
3728 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3729 * configure: Regenerate.
3730
e5a9158d
AA
37312014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3732
3733 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3734 warning upon ENODATA from ptrace.
3735 * linux-s390-low.c (s390_store_tdb): New.
3736 (s390_regsets): Add regset for NT_S390_TDB.
3737
feea5f36
AA
37382014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3739
3740 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3741 without a fill_function.
3742 * linux-s390-low.c (s390_fill_last_break): Remove.
3743 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3744 (s390_arch_setup): Use regset's size instead of fill_function for
3745 loop end condition.
3746
098dbe61
AA
37472014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3748
3749 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3750 the regset's store function when ptrace returned an error.
3751 * regcache.c (get_thread_regcache): Invalidate register cache
3752 before fetching inferior's registers.
3753
28eef672
AA
37542014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3755
3756 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3757 while-loop as for-loop.
3758 (regsets_store_inferior_registers): Likewise.
3759
bdca27a2
YQ
37602014-11-28 Yao Qi <yao@codesourcery.com>
3761
3762 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3763 * config.in, configure: Re-generate.
3764 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3765 is defined.
3766
9c232dda
YQ
37672014-11-21 Yao Qi <yao@codesourcery.com>
3768
3769 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3770 (AC_CHECK_HEADERS): Remove malloc.h.
3771 * configure: Re-generated.
3772 * config.in: Re-generated.
3773 * server.h: Don't include alloca.h and malloc.h.
3774 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3775 Don't include malloc.h.
3776
43968415
JB
37772014-11-17 Joel Brobecker <brobecker@adacore.com>
3778
3779 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3780 corresponding ERRNO check in same block.
3781
40e91bc7
PA
37822014-11-12 Pedro Alves <palves@redhat.com>
3783
3784 * server.c (cont_thread): Update comment.
3785 (start_inferior, attach_inferior): No longer clear cont_thread.
3786 (handle_v_cont): No longer set cont_thread.
3787 (captured_main): Clear cont_thread each time a GDB connects.
3788
c2c118cf
PA
37892014-11-12 Pedro Alves <palves@redhat.com>
3790
3791 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3792 thread, and don't resume all threads if the Hc thread has exited.
3793
78708b7c
PA
37942014-11-12 Pedro Alves <palves@redhat.com>
3795
3796 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3797 the process group instead of to a specific LWP.
3798
a2abc7de
PA
37992014-10-15 Pedro Alves <palves@redhat.com>
3800
3801 PR server/17487
3802 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3803 parameter.
3804 (arm_set_thread_context): Delete.
3805 (the_low_target): Adjust.
3806 * win32-i386-low.c (debug_registers_changed)
3807 (debug_registers_used): Delete.
3808 (update_debug_registers_callback): New function.
3809 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3810 needing to update their debug registers.
3811 (win32_get_current_dr): New function.
3812 (x86_dr_low_get_addr, x86_dr_low_get_control)
3813 (x86_dr_low_get_status): Fetch the debug register from the thread
3814 record's context.
3815 (i386_initial_stuff): Adjust.
3816 (i386_get_thread_context): Remove current_event parameter. Don't
3817 clear debug_registers_changed nor copy DR values to
3818 debug_reg_state.
3819 (i386_set_thread_context): Delete.
3820 (i386_prepare_to_resume): New function.
3821 (i386_thread_added): Mark the thread as needing to update irs
3822 debug registers.
3823 (the_low_target): Remove i386_set_thread_context and install
3824 i386_prepare_to_resume.
3825 * win32-low.c (win32_get_thread_context): Adjust.
3826 (win32_set_thread_context): Use SetThreadContext
3827 directly.
3828 (win32_prepare_to_resume): New function.
3829 (win32_require_context): New function, factored out from ...
3830 (thread_rec): ... this.
3831 (continue_one_thread): Call win32_prepare_to_resume on each thread
3832 we're about to continue.
3833 (win32_resume): Call win32_prepare_to_resume on the event thread.
3834 * win32-low.h (struct win32_thread_info)
3835 <debug_registers_changed>: New field.
3836 (struct win32_target_ops): Change prototype of set_thread_context,
3837 delete set_thread_context and add prepare_to_resume.
3838 (win32_require_context): New declaration.
3839
a442d071
GB
38402014-10-08 Gary Benson <gbenson@redhat.com>
3841
3842 * server.h: Do not include common-exceptions.h.
3843
6f1947e8
GB
38442014-10-08 Gary Benson <gbenson@redhat.com>
3845
3846 * server.h: Do not include cleanups.h.
3847
63b434a4
JH
38482014-09-30 James Hogan <james.hogan@imgtec.com>
3849
3850 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3851 mips64-dsp-linux.c.
3852
c4d9ceb6
YQ
38532014-09-23 Yao Qi <yao@codesourcery.com>
3854
3855 * linux-low.c (lp_status_maybe_breakpoint): New function.
3856 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3857 (count_events_callback): Likewise.
3858 (select_event_lwp_callback): Likewise.
3859 (cancel_breakpoints_callback): Likewise.
3860
89a5711c
DB
38612014-09-19 Don Breazeal <donb@codesourcery.com>
3862
3863 * linux-low.c (handle_extended_wait): Call
3864 linux_ptrace_get_extended_event.
3865 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3866 linux_is_extended_waitstatus.
3867
bffc0964
JB
38682014-09-16 Joel Brobecker <brobecker@adacore.com>
3869
3870 * Makefile.in (CPPFLAGS): Define.
3871 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3872 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3873
0bfdf32f
GB
38742014-09-16 Gary Benson <gbenson@redhat.com>
3875
3876 * inferiors.h (current_inferior): Renamed as...
3877 (current_thread): New variable. All uses updated.
3878 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3879 (maybe_move_out_of_jump_pad): Likewise.
3880 (cancel_breakpoint): Likewise.
3881 (linux_low_filter_event): Likewise.
3882 (wait_for_sigstop): Likewise.
3883 (linux_resume_one_lwp): Likewise.
3884 (need_step_over_p): Likewise.
3885 (start_step_over): Likewise.
3886 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3887 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3888 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3889 and save_inferior as saved_thread.
3890 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3891 saved_thread.
3892 (regcache_invalidate_thread): Likewise.
3893 * remote-utils.c (prepare_resume_reply): Likewise.
3894 * thread-db.c (thread_db_get_tls_address): Likewise.
3895 (disable_thread_event_reporting): Likewise.
3896 (remove_thread_event_breakpoints): Likewise.
3897 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3898 as saved_thread.
3899 * target.h (set_desired_inferior): Renamed as...
3900 (set_desired_thread): New declaration. All uses updated.
3901 * server.c (myresume): Updated comment to reference thread instead
3902 of inferior.
3903 (handle_serial_event): Likewise.
3904 (handle_target_event): Likewise.
3905
361c8ade
GB
39062014-09-12 Tom Tromey <tromey@redhat.com>
3907 Gary Benson <gbenson@redhat.com>
3908
3909 * regcache.h: Include common-regcache.h.
3910 (regcache_read_pc): Don't declare.
3911 * regcache.c (get_thread_regcache_for_ptid): New function.
3912
bd9269f7
GB
39132014-09-11 Tom Tromey <tromey@redhat.com>
3914 Gary Benson <gbenson@redhat.com>
3915
3916 * symbol.c: New file.
3917 * Makefile.in (SFILES): Add symbol.c.
3918 (OBS): Add symbol.o.
3919
f8c1d06b
GB
39202014-09-11 Gary Benson <gbenson@redhat.com>
3921
3922 * target.c (target_stop_ptid, target_continue_ptid): New
3923 functions.
3924
721ec300
GB
39252014-09-11 Tom Tromey <tromey@redhat.com>
3926 Gary Benson <gbenson@redhat.com>
3927
3928 * target.h: Include target/target.h.
3929 * target.c (target_read_memory, target_read_uint32)
3930 (target_write_memory): New functions.
3931
c5e92cca
GB
39322014-09-11 Gary Benson <gbenson@redhat.com>
3933
3934 * server.h (debug_hw_points): Don't declare.
3935 * server.c (debug_hw_points): Don't define. Replace all uses
3936 with show_debug_regs.
3937 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3938 all uses with show_debug_regs.
3939
2e4bb98a
EBM
39402014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3941
3942 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3943 endianness into account.
3944 (ppc_supply_ptrace_register): Likewise.
3945
ac740bc7
JH
39462014-09-03 James Hogan <james.hogan@imgtec.com>
3947
3948 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3949 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3950
97ea6506
GB
39512014-09-03 Gary Benson <gbenson@redhat.com>
3952
3953 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3954 ALL_DEBUG_ADDRESS_REGISTERS.
3955
df7e5265
GB
39562014-09-02 Gary Benson <gbenson@redhat.com>
3957
3958 * i386-low.h: Renamed as...
3959 * x86-low.h: New file. All type, function and variable name
3960 prefixes changed from "i386_" to "x86_". All references updated.
3961 * i386-low.c: Renamed as...
3962 * x86-low.c: New file. All type, function and variable name
3963 prefixes changed from "i386_" to "x86_". All references updated.
3964
ed859da7
GB
39652014-09-02 Gary Benson <gbenson@redhat.com>
3966
3967 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3968 (x86_linux_new_thread): Likewise.
3969
860789c7
GB
39702014-08-29 Gary Benson <gbenson@redhat.com>
3971
3972 * server.h (setjmp.h): Do not include.
3973 (toplevel): Do not declare.
3974 (common-exceptions.h): Include.
3975 (cleanups.h): Likewise.
3976 * server.c (toplevel): Do not define.
3977 (exit_code): New static global.
3978 (detach_or_kill_for_exit_cleanup): New function.
3979 (main): New function. Original main renamed to...
3980 (captured_main): New function.
3981 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3982
ff55e1b5
GB
39832014-08-29 Gary Benson <gbenson@redhat.com>
3984
3985 * Makefile.in (SFILES): Add common/common-exceptions.c.
3986 (OBS): Add common-exceptions.o.
3987 (common-exceptions.o): New rule.
3988 * utils.c (prepare_to_throw_exception): New function.
3989
e9bcb658
GB
39902014-08-29 Gary Benson <gbenson@redhat.com>
3991
3992 * config.in: Regenerate.
3993 * configure: Likewise.
3994
e3180625
GB
39952014-08-29 Gary Benson <gbenson@redhat.com>
3996
3997 * Makefile.in (SFILES): Add common/cleanups.c.
3998 (OBS): cleanups.o.
3999 (cleanups.o): New rule.
4000
e3d6ba5d
GB
40012014-08-29 Gary Benson <gbenson@redhat.com>
4002
4003 * utils.c (internal_vwarning): New function.
4004
7096e886
GB
40052014-08-28 Gary Benson <gbenson@redhat.com>
4006
4007 * utils.h (fatal): Remove declaration.
4008 * utils.c (fatal): Remove function.
4009
14ce3192
GB
40102014-08-28 Gary Benson <gbenson@redhat.com>
4011
4012 * tracepoint.c (gdb_agent_init): Replace fatal with
4013 perror_with_name.
4014 (initialize_tracepoint): Likewise.
4015
50278d59
GB
40162014-08-28 Gary Benson <gbenson@redhat.com>
4017
4018 * remote-utils.c (remote_prepare): Replace fatal with error.
4019
aa96c426
GB
40202014-08-28 Gary Benson <gbenson@redhat.com>
4021
4022 * linux-low.c (linux_async): Replace fatal with warning.
4023 Tidy up and return.
4024 (linux_start_non_stop): Return -1 if linux_async failed.
4025
f7160e97
GB
40262014-08-28 Gary Benson <gbenson@redhat.com>
4027
4028 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4029 gdb_assert.
4030 (i386_dr_low_get_addr): Remove vague comment.
4031 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4032 gdb_assert.
4033
38e08fca
GB
40342014-08-28 Gary Benson <gbenson@redhat.com>
4035
4036 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4037 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4038 internal_error.
4039 (linux_resume_one_lwp): Likewise.
4040 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4041 gdb_assert.
4042 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4043 with internal_error.
4044 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4045 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4046 (find_register_by_name): Replace fatal with internal_error.
4047 (find_regno): Likewise.
4048 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4049 * thread-db.c (thread_db_create_event): Likewise.
4050 (thread_db_load_search): Likewise.
4051 (try_thread_db_load_1): Likewise.
4052 * tracepoint.c (get_jump_space_head): Replace fatal with
4053 internal_error.
4054 (claim_trampoline_space): Likewise.
4055 (have_fast_tracepoint_trampoline_buffer): Likewise.
4056 (cmd_qtstart): Likewise.
4057 (stop_tracing): Likewise.
4058 (fast_tracepoint_collecting): Likewise.
4059 (target_malloc): Likewise.
4060 (download_tracepoint): Likewise.
4061 (download_trace_state_variables): Replace check with gdb_assert.
4062 (upload_fast_traceframes): Replace fatal with internal_error.
4063
34abf635
GB
40642014-08-19 Tom Tromey <tromey@redhat.com>
4065 Gary Benson <gbenson@redhat.com>
4066
4067 * Makefile.in (SFILES): Add common/common-debug.c.
4068 (OBS): Add common-debug.o.
4069 (common-debug.o): New rule.
4070 * debug.h (debug_printf): Don't declare.
4071 * debug.c (debug_printf): Renamed and rewritten as...
4072 (debug_vprintf): New function.
4073
f6e94d78
GB
40742014-08-19 Gary Benson <gbenson@redhat.com>
4075
4076 * utils.h: Do not include print-utils.h.
4077
9239eeab
GB
40782014-08-19 Tom Tromey <tromey@redhat.com>
4079 Gary Benson <gbenson@redhat.com>
4080
4081 * server.h: Add static assertion.
4082 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4083
ef87c8bb
GB
40842014-08-19 Tom Tromey <tromey@redhat.com>
4085 Gary Benson <gbenson@redhat.com>
4086
4087 * Makefile.in (SFILES): Add common/errors.c.
4088 (OBS): Add errors.o.
4089 (IPA_OBS): Add errors-ipa.o.
4090 (errors.o): New rule.
4091 (errors-ipa.o): Likewise.
4092 * utils.h (perror_with_name, error, warning): Don't declare.
4093 * utils.c (warning): Renamed and rewritten as...
4094 (vwarning): New function.
4095 (error): Renamed and rewritten as...
4096 (verror): New function.
4097 (internal_error): Renamed and rewritten as...
4098 (internal_verror): New function.
4099
bb974a24
GB
41002014-08-07 Gary Benson <gbenson@redhat.com>
4101
4102 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4103 * configure: Regenerate.
4104 * config.in: Likewise.
4105 * server.h: Do not include errno.h.
4106 * event-loop.c: Likewise.
4107 * hostio-errno.c: Likewise.
4108 * linux-low.c: Likewise.
4109 * remote-utils.c: Likewise.
4110 * spu-low.c: Likewise.
4111 * utils.c: Likewise.
4112 * gdbreplay.c: Unconditionally include errno.h.
4113
6d3d12eb
GB
41142014-08-07 Gary Benson <gbenson@redhat.com>
4115
4116 * server.h: Do not include string.h.
4117 * event-loop.c: Likewise.
4118 * linux-low.c: Likewise.
4119 * regcache.c: Likewise.
4120 * remote-utils.c: Likewise.
4121 * spu-low.c: Likewise.
4122 * utils.c: Likewise.
4123
dccbb609
GB
41242014-08-07 Gary Benson <gbenson@redhat.com>
4125
4126 * server.h: Do not include gdb_assert.h.
4127
e76df0d0
GB
41282014-08-07 Gary Benson <gbenson@redhat.com>
4129
4130 * server.h: Do not include common-utils.h.
4131
4cb9c816
GB
41322014-08-07 Gary Benson <gbenson@redhat.com>
4133
4134 * server.h: Do not include ptid.h.
4135 * notif.h: Likewise.
4136
3995eeee
GB
41372014-08-07 Gary Benson <gbenson@redhat.com>
4138
4139 * server.h: Do not include gdb_locale.h.
4140
cb9f1a9b
GB
41412014-08-07 Gary Benson <gbenson@redhat.com>
4142
4143 * server.h: Do not include gdb/signals.h.
4144 * win32-low.c: Likewise.
4145
a5fceff8
GB
41462014-08-07 Gary Benson <gbenson@redhat.com>
4147
4148 * server.h: Do not include pathmax.h.
4149
b9391142
GB
41502014-08-07 Gary Benson <gbenson@redhat.com>
4151
4152 * server.h: Do not include libiberty.h.
4153 * linux-bfin-low.c: Likewise.
4154
0e443c87
GB
41552014-08-07 Gary Benson <gbenson@redhat.com>
4156
4157 * server.h: Do not include ansidecl.h.
4158
8ebb3f56
GB
41592014-08-07 Gary Benson <gbenson@redhat.com>
4160
4161 * linux-x86-low.c: Do not include stddef.h.
4162 * lynx-ppc-low.c: Likewise.
4163 * tracepoint.c: Likewise.
4164
8980bdf6
GB
41652014-08-07 Gary Benson <gbenson@redhat.com>
4166
4167 * server.h: Do not include stdarg.h.
4168 * nto-low.c: Likewise.
4169
d7096f71
GB
41702014-08-07 Gary Benson <gbenson@redhat.com>
4171
4172 * server.h: Do not include stdlib.h.
4173 * inferiors.c: Likewise.
4174 * linux-low.c: Likewise.
4175 * regcache.c: Likewise.
4176 * spu-low.c: Likewise.
4177 * tracepoint.c: Likewise.
4178 * utils.c: Likewise.
4179
d02f550d
GB
41802014-08-07 Gary Benson <gbenson@redhat.com>
4181
4182 * server.h: Do not include stdio.h.
4183 * linux-low.c: Likewise.
4184 * remote-utils.c: Likewise.
4185 * spu-low.c: Likewise.
4186 * utils.c: Likewise.
4187 * wincecompat.c: Likewise.
4188
87f6c4e3
GB
41892014-08-06 Gary Benson <gbenson@redhat.com>
4190
4191 * regcache.c (init_register_cache): Move conditionals inside if.
4192
7089dca4
GB
41932014-08-06 Gary Benson <gbenson@redhat.com>
4194
4195 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4196
462f517e
GB
41972014-07-31 Gary Benson <gbenson@redhat.com>
4198
4199 * ax.h: Do not include server.h.
4200 * gdbthread.h: Likewise.
4201 * lynx-low.h: Likewise.
4202 * notif.h: Likewise.
4203
976411d6
GB
42042014-07-30 Gary Benson <gbenson@redhat.com>
4205
4206 * server.h: Include common-defs.h.
4207 Do not include config.h or build-gnulib-gdbserver/config.h.
4208
d41f6d8e
GB
42092014-07-30 Gary Benson <gbenson@redhat.com>
4210
4211 * hostio-errno.c: Move server.h to top of includes list.
4212 * inferiors.c: Likewise.
4213 * linux-x86-low.c: Likewise.
4214 * notif.c: Include server.h.
4215
314c6a35
TT
42162014-07-24 Tom Tromey <tromey@redhat.com>
4217 Gary Benson <gbenson@redhat.com>
4218
4219 * server.h (CORE_ADDR): Now unsigned.
4220
69ff6be5
PA
42212014-07-16 Pedro Alves <palves@redhat.com>
4222
4223 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4224
ce9e3fe7
PA
42252014-07-15 Pedro Alves <palves@redhat.com>
4226
4227 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4228 copy.
4229
e76126e8
PA
42302014-07-11 Pedro Alves <palves@redhat.com>
4231
4232 * linux-low.c (kill_wait_lwp): New function, based on
4233 kill_one_lwp_callback, but use my_waitpid directly.
4234 (kill_one_lwp_callback, linux_kill): Use it.
4235
8e9db26e
PA
42362014-06-23 Pedro Alves <palves@redhat.com>
4237
4238 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4239 before setting DR0..DR3.
4240
698b3e08
GB
42412014-06-20 Gary Benson <gbenson@redhat.com>
4242
4243 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4244 * configure: Regenerated.
4245 * config.in: Likewise.
4246
125f8a3d
GB
42472014-06-20 Gary Benson <gbenson@redhat.com>
4248
4249 * Makefile.in (SFILES): Update locations for files moved
4250 from common to nat.
4251 (object file files): Reordered.
4252
42995dbd
GB
42532014-06-20 Gary Benson <gbenson@redhat.com>
4254
4255 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4256 (i386_dr_low_set_addr): Likewise.
4257 (i386_dr_low_get_addr): Likewise.
4258 (i386_dr_low_can_set_control): Likewise.
4259 (i386_dr_low_set_control): Likewise.
4260 (i386_dr_low_get_control): Likewise.
4261 (i386_dr_low_get_status): Likewise.
4262 (i386_get_debug_register_length): Likewise.
4263 * linux-x86-low.c (i386_dr_low_set_addr):
4264 Changed signature. Made static.
4265 (i386_dr_low_get_addr): Likewise.
4266 (i386_dr_low_set_control): Likewise.
4267 (i386_dr_low_get_control): Likewise.
4268 (i386_dr_low_get_status): Likewise.
4269 (i386_dr_low): New global variable.
4270 * win32-i386-low.c (i386_dr_low_set_addr):
4271 Changed signature. Made static.
4272 (i386_dr_low_get_addr): Likewise.
4273 (i386_dr_low_set_control): Likewise.
4274 (i386_dr_low_get_control): Likewise.
4275 (i386_dr_low_get_status): Likewise.
4276 (i386_dr_low): New global variable.
4277
e1d2394b
MS
42782014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4279
4280 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4281 * Makefile.in (AR, AR_FLAGS): Define.
4282 * configure: Regenerate.
4283
3a8ee006
GB
42842014-06-19 Gary Benson <gbenson@redhat.com>
4285
4286 * Makefile.in (i386-dregs.o): New rule.
4287 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4288 * i386-low.c (target.h): Remove include.
4289 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4290 (DR_CONTROL_SHIFT): Likewise.
4291 (DR_CONTROL_SIZE): Likewise.
4292 (DR_RW_EXECUTE): Likewise.
4293 (DR_RW_WRITE): Likewise.
4294 (DR_RW_READ): Likewise.
4295 (DR_RW_IORW): Likewise.
4296 (DR_LEN_1): Likewise.
4297 (DR_LEN_2): Likewise.
4298 (DR_LEN_4): Likewise.
4299 (DR_LEN_8): Likewise.
4300 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4301 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4302 (DR_ENABLE_SIZE): Likewise.
4303 (DR_LOCAL_SLOWDOWN): Likewise.
4304 (DR_GLOBAL_SLOWDOWN): Likewise.
4305 (DR_CONTROL_RESERVED): Likewise.
4306 (I386_DR_CONTROL_MASK): Likewise.
4307 (I386_DR_VACANT): Likewise.
4308 (I386_DR_LOCAL_ENABLE): Likewise.
4309 (I386_DR_GLOBAL_ENABLE): Likewise.
4310 (I386_DR_DISABLE): Likewise.
4311 (I386_DR_SET_RW_LEN): Likewise.
4312 (I386_DR_GET_RW_LEN): Likewise.
4313 (I386_DR_WATCH_HIT): Likewise.
4314 (i386_wp_op_t): Likewise.
4315 (i386_show_dr): Likewise.
4316 (i386_length_and_rw_bits): Likewise.
4317 (i386_insert_aligned_watchpoint): Likewise.
4318 (i386_remove_aligned_watchpoint): Likewise.
4319 (i386_handle_nonaligned_watchpoint): Likewise.
4320 i386_update_inferior_debug_regs(): Likewise.
4321 (i386_dr_insert_watchpoint): Likewise.
4322 (i386_dr_remove_watchpoint): Likewise.
4323 (i386_dr_region_ok_for_watchpoint): Likewise.
4324 (i386_dr_stopped_data_address): Likewise.
4325 (i386_dr_stopped_by_watchpoint): Likewise.
4326
8f26655c
GB
43272014-06-19 Gary Benson <gbenson@redhat.com>
4328
4329 * i386-low.c (i386_dr_show): Renamed to
4330 i386_show_dr and made static. All uses updated.
4331 (i386_dr_length_and_rw_bits): Renamed to
4332 i386_length_and_rw_bits and made static.
4333 All uses updated.
4334 (i386_dr_insert_aligned_watchpoint): Renamed to
4335 i386_insert_aligned_watchpoint and made static.
4336 All uses updated.
4337 (i386_dr_remove_aligned_watchpoint): Renamed to
4338 i386_remove_aligned_watchpoint and made static.
4339 All uses updated.
4340 (i386_dr_update_inferior_debug_regs): Renamed to
4341 i386_update_inferior_debug_regs and made static.
4342 All uses updated.
4343
b9228891
GB
43442014-06-18 Gary Benson <gbenson@redhat.com>
4345
5171def3
GB
4346 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4347 (i386_dr_low_can_set_control): Likewise.
4348 (i386_get_debug_register_length): Likewise.
4349 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4350 (i386_dr_low_can_set_control): Likewise.
4351 (i386_get_debug_register_length): Likewise.
4352
43532014-06-17 Gary Benson <gbenson@redhat.com>
4354
b9228891
GB
4355 * i386-low.h (i386-dregs.h): New include.
4356 (DR_FIRSTADDR): Now in i386-dregs.h.
4357 (DR_LASTADDR): Likewise.
4358 (DR_NADDR): Likewise.
4359 (DR_STATUS): Likewise.
4360 (DR_CONTROL): Likewise.
4361 (i386_debug_reg_state): Likewise.
4362 (i386_dr_insert_watchpoint): Likewise.
4363 (i386_dr_remove_watchpoint): Likewise.
4364 (i386_dr_region_ok_for_watchpoint): Likewise.
4365 (i386_dr_stopped_data_address): Likewise.
4366 (i386_dr_stopped_by_watchpoint): Likewise.
4367 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4368
4be83cc2
GB
43692014-06-18 Gary Benson <gbenson@redhat.com>
4370
4371 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4372 i386_dr_insert_watchpoint.
4373 (i386_low_remove_watchpoint): Renamed to
4374 i386_dr_remove_watchpoint.
4375 (i386_low_region_ok_for_watchpoint): Renamed to
4376 i386_dr_region_ok_for_watchpoint.
4377 (i386_low_stopped_data_address): Renamed to
4378 i386_dr_stopped_data_address.
4379 (i386_low_stopped_by_watchpoint): Renamed to
4380 i386_dr_stopped_by_watchpoint.
4381 * i386-low.c (i386_show_dr): Renamed to
4382 i386_dr_show and made nonstatic. All uses updated.
4383 (i386_length_and_rw_bits): Renamed to
4384 i386_dr_length_and_rw_bits and made nonstatic.
4385 All uses updated.
4386 (i386_insert_aligned_watchpoint): Renamed to
4387 i386_dr_insert_aligned_watchpoint and made nonstatic.
4388 All uses updated.
4389 (i386_remove_aligned_watchpoint): Renamed to
4390 i386_dr_remove_aligned_watchpoint and made nonstatic.
4391 All uses updated.
4392 (i386_update_inferior_debug_regs): Renamed to
4393 i386_dr_update_inferior_debug_regs and made nonstatic.
4394 All uses updated.
4395 (i386_low_insert_watchpoint): Renamed to
4396 i386_dr_insert_watchpoint. All uses updated.
4397 (i386_low_remove_watchpoint): Renamed to
4398 i386_dr_remove_watchpoint. All uses updated.
4399 (i386_low_region_ok_for_watchpoint): Renamed to
4400 i386_dr_region_ok_for_watchpoint. All uses updated.
4401 (i386_low_stopped_data_address): Renamed to
4402 i386_dr_stopped_data_address. All uses updated.
4403 (i386_low_stopped_by_watchpoint): Renamed to
4404 i386_dr_stopped_by_watchpoint. All uses updated.
4405
131aa0d4
GB
44062014-06-18 Gary Benson <gbenson@redhat.com>
4407
4408 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4409 (i386_dr_low_can_set_control): Likewise.
4410 (i386_insert_aligned_watchpoint): New check.
4411
d9305f7f
GB
44122014-06-18 Gary Benson <gbenson@redhat.com>
4413
4414 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4415 Renamed to state.
4416
e927c9fc
GB
44172014-06-18 Gary Benson <gbenson@redhat.com>
4418
4419 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4420 instead of fatal and error.
4421 (i386_handle_nonaligned_watchpoint): Likewise.
4422
1b6d4134
GB
44232014-06-18 Gary Benson <gbenson@redhat.com>
4424
4425 * i386-low.c (i386_get_debug_register_length): New macro.
4426 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4427 (i386_show_dr): Use debug_printf instead of fprintf. Use
4428 phex to format values.
4429
6e62758f
GB
44302014-06-18 Gary Benson <gbenson@redhat.com>
4431
4432 * i386-low.h: Comment changes.
4433 * i386-low.c: Likewise.
4434
fc6e2f03
GB
44352014-06-18 Gary Benson <gbenson@redhat.com>
4436
4437 * i386-low.c: Whitespace changes.
4438
f9d1eeed
TT
44392014-06-12 Tom Tromey <tromey@redhat.com>
4440
4441 * utils.c (freeargv): Remove.
4442
0b04e523
TT
44432014-06-12 Tom Tromey <tromey@redhat.com>
4444
4445 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4446 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4447 (parse_debug_format_options): Likewise.
4448 (gdbserver_usage): Likewise.
4449 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4450 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4451 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4452 against libiberty.
4453 ($(LIBGNU)): Depend on libiberty.
4454 (all-lib): Recurse into all subdirs.
4455 (install-only): Invoke "install" target in subdirs.
4456 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4457 targets.
4458 * configure: Rebuild.
4459 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4460 for vasprintf, vsnprintf, or gettimeofday.
4461 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4462 srv_tgtobj.
4463
270c9937
JB
44642014-06-05 Joel Brobecker <brobecker@adacore.com>
4465
4466 * development.sh: Delete.
4467 * Makefile.in (config.status): Adjust dependency on development.sh.
4468 * configure.ac: Adjust development.sh source call.
4469 * configure: Regenerate.
4470
0a261ed8
PA
44712014-06-02 Pedro Alves <palves@redhat.com>
4472
4473 * ax.c (gdb_free_agent_expr): New function.
4474 * ax.h (gdb_free_agent_expr): New declaration.
4475 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4476 list.
4477 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4478 static.
4479 (clear_breakpoint_conditions_and_commands): New function.
4480 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4481 (clear_breakpoint_conditions_and_commands): New declaration.
4482
e9dae05e
RR
44832014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4484
4485 * linux-aarch64-low.c (asm/ptrace.h): Include.
4486
5876f503
JK
44872014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4488
4489 Fix TLS access for -static -pthread.
4490 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4491 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4492 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4493
802e8e6d
PA
44942014-05-20 Pedro Alves <palves@redhat.com>
4495
4496 * linux-aarch64-low.c (aarch64_insert_point)
4497 (aarch64_remove_point): No longer check whether the type is
4498 supported here. Adjust to new interface.
4499 (the_low_target): Install aarch64_supports_z_point_type as
4500 supports_z_point_type method.
4501 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4502 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4503 instead of a Z packet char. Adjust.
4504 (arm_supports_z_point_type): New function.
4505 (arm_insert_point, arm_remove_point): Adjust to new interface.
4506 (the_low_target): Install arm_supports_z_point_type.
4507 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4508 (cris_insert_point, cris_remove_point): Adjust to new interface.
4509 Don't check whether the type is supported here.
4510 (the_low_target): Install cris_supports_z_point_type.
4511 * linux-low.c (linux_supports_z_point_type): New function.
4512 (linux_insert_point, linux_remove_point): Adjust to new interface.
4513 * linux-low.h (struct linux_target_ops) <insert_point,
4514 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4515 raw_breakpoint pointer parameter.
4516 <supports_z_point_type>: New method.
4517 * linux-mips-low.c (mips_supports_z_point_type): New function.
4518 (mips_insert_point, mips_remove_point): Adjust to new interface.
4519 Use mips_supports_z_point_type.
4520 (the_low_target): Install mips_supports_z_point_type.
4521 * linux-ppc-low.c (the_low_target): Install NULL as
4522 supports_z_point_type method.
4523 * linux-s390-low.c (the_low_target): Install NULL as
4524 supports_z_point_type method.
4525 * linux-sparc-low.c (the_low_target): Install NULL as
4526 supports_z_point_type method.
4527 * linux-x86-low.c (x86_supports_z_point_type): New function.
4528 (x86_insert_point): Adjust to new insert_point interface. Use
4529 insert_memory_breakpoint. Adjust to new
4530 i386_low_insert_watchpoint interface.
4531 (x86_remove_point): Adjust to remove_point interface. Use
4532 remove_memory_breakpoint. Adjust to new
4533 i386_low_remove_watchpoint interface.
4534 (the_low_target): Install x86_supports_z_point_type.
4535 * lynx-low.c (lynx_target_ops): Install NULL as
4536 supports_z_point_type callback.
4537 * nto-low.c (nto_supports_z_point_type): New.
4538 (nto_insert_point, nto_remove_point): Adjust to new interface.
4539 (nto_target_ops): Install nto_supports_z_point_type.
4540 * mem-break.c: Adjust intro comment.
4541 (struct raw_breakpoint) <raw_type, size>: New fields.
4542 <inserted>: Update comment.
4543 <shlib_disabled>: Delete field.
4544 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4545 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4546 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4547 (raw_bkpt_type_to_target_hw_bp_type): New function.
4548 (find_enabled_raw_code_breakpoint_at): New function.
4549 (find_raw_breakpoint_at): New type and size parameters. Use them.
4550 (insert_memory_breakpoint): New function, based off
4551 set_raw_breakpoint_at.
4552 (remove_memory_breakpoint): New function.
4553 (set_raw_breakpoint_at): Reimplement.
4554 (set_breakpoint): New, based on set_breakpoint_at.
4555 (set_breakpoint_at): Reimplement.
4556 (delete_raw_breakpoint): Go through the_target->remove_point
4557 instead of assuming memory breakpoints.
4558 (find_gdb_breakpoint_at): Delete.
4559 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4560 (find_gdb_breakpoint): New function.
4561 (set_gdb_breakpoint_at): Delete.
4562 (z_type_supported): New function.
4563 (set_gdb_breakpoint_1): New function, loosely based off
4564 set_gdb_breakpoint_at.
4565 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4566 (delete_gdb_breakpoint_at): Delete.
4567 (delete_gdb_breakpoint_1): New function, loosely based off
4568 delete_gdb_breakpoint_at.
4569 (delete_gdb_breakpoint): New function.
4570 (clear_gdb_breakpoint_conditions): Rename to ...
4571 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4572 breakpoint.
4573 (add_condition_to_breakpoint): Make static.
4574 (add_breakpoint_condition): Take a struct breakpoint pointer
4575 instead of an address. Adjust.
4576 (gdb_condition_true_at_breakpoint): Rename to ...
4577 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4578 z_type parameter.
4579 (gdb_condition_true_at_breakpoint): Reimplement.
4580 (add_breakpoint_commands): Take a struct breakpoint pointer
4581 instead of an address. Adjust.
4582 (gdb_no_commands_at_breakpoint): Rename to ...
4583 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4584 parameter. Return true if no breakpoint was found. Change debug
4585 output.
4586 (gdb_no_commands_at_breakpoint): Reimplement.
4587 (run_breakpoint_commands): Rename to ...
4588 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4589 and change return type to boolean.
4590 (run_breakpoint_commands): New function.
4591 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4592 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4593 breakpoint. Go through the_target->remove_point instead of
4594 assuming memory breakpoint.
4595 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4596 software and hardware breakpoints.
4597 (reinsert_raw_breakpoint): Go through the_target->insert_point
4598 instead of assuming memory breakpoint.
4599 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4600 software and hardware breakpoints.
4601 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4602 Check both software and hardware breakpoints.
4603 (validate_inserted_breakpoint): Assert the breakpoint is a
4604 software breakpoint. Set the inserted flag to -1 instead of
4605 setting shlib_disabled.
4606 (delete_disabled_breakpoints): Adjust.
4607 (validate_breakpoints): Only validate software breakpoints.
4608 Adjust to inserted flag change.
4609 (check_mem_read, check_mem_write): Skip breakpoint types other
4610 than software breakpoints. Adjust to inserted flag change.
4611 * mem-break.h (enum raw_bkpt_type): New enum.
4612 (raw_breakpoint, struct process_info): Forward declare.
4613 (Z_packet_to_target_hw_bp_type): Delete declaration.
4614 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4615 (set_gdb_breakpoint, delete_gdb_breakpoint)
4616 (clear_breakpoint_conditions): New declarations.
4617 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4618 (breakpoint_inserted_here): Update comment.
4619 (add_breakpoint_condition, add_breakpoint_commands): Replace
4620 address parameter with a breakpoint pointer parameter.
4621 (gdb_breakpoint_here): Update comment.
4622 (delete_gdb_breakpoint_at): Delete.
4623 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4624 * server.c (process_point_options): Take a struct breakpoint
4625 pointer instead of an address. Adjust.
4626 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4627 delete_gdb_breakpoint.
4628 * spu-low.c (spu_target_ops): Install NULL as
4629 supports_z_point_type method.
4630 * target.h: Include mem-break.h.
4631 (struct target_ops) <prepare_to_access_memory>: Update comment.
4632 <supports_z_point_type>: New field.
4633 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4634 instead of a char. Also take a raw breakpoint pointer.
4635 * win32-arm-low.c (the_low_target): Install NULL as
4636 supports_z_point_type.
4637 * win32-i386-low.c (i386_supports_z_point_type): New function.
4638 (i386_insert_point, i386_remove_point): Adjust to new interface.
4639 (the_low_target): Install i386_supports_z_point_type.
4640 * win32-low.c (win32_supports_z_point_type): New function.
4641 (win32_insert_point, win32_remove_point): Adjust to new interface.
4642 (win32_target_ops): Install win32_supports_z_point_type.
4643 * win32-low.h (struct win32_target_ops):
4644 <supports_z_point_type>: New method.
4645 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4646 instead of a char. Also take a raw breakpoint pointer.
4647
932539e3
PA
46482014-05-20 Pedro Alves <palves@redhat.com>
4649
4650 * mem-break.h: Include break-common.h.
4651 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4652 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4653 (Z_packet_to_target_hw_bp_type): New declaration.
4654 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4655 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4656 (Z_PACKET_ACCESS_WP): Delete macros.
4657 (Z_packet_to_hw_type): Delete function.
4658 * i386-low.h: Don't include break-common.h here.
4659 (Z_packet_to_hw_type): Delete declaration.
4660 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4661 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4662 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4663 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4664 * linux-aarch64-low.c: Don't include break-common.h here.
4665 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4666 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4667 (Z_packet_to_target_hw_bp_type): Delete function.
4668 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4669 function.
4670 (mips_insert_point, mips_remove_point): Use
4671 Z_packet_to_target_hw_bp_type.
4672
4ff0d3d8
PA
46732014-05-20 Pedro Alves <palves@redhat.com>
4674
4675 * linux-aarch64-low.c: Include break-common.h.
4676 (enum target_point_type): Delete.
4677 (Z_packet_to_point_type): Rename to ...
4678 (Z_packet_to_target_hw_bp_type): ... this, and return a
4679 target_hw_bp_type instead.
4680 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4681 instead of an enum target_point_type.
4682 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4683 breakpoint type.
4684 (aarch64_dr_state_insert_one_point)
4685 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4686 (aarch64_handle_aligned_watchpoint)
4687 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4688 Take an enum target_hw_bp_type instead of an enum
4689 target_point_type.
4690 (aarch64_supports_z_point_type): New function.
4691 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4692 use Z_packet_to_target_hw_bp_type.
4693
786dc519
JB
46942014-05-20 Joel Brobecker <brobecker@adacore.com>
4695
4696 * configure.ac: Only use -Werror by default when DEVELOPMENT
4697 is true.
4698 * configure: Regenerate.
4699
9e0aa64f
JK
47002014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4701
4702 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4703 * linux-x86-low.c (X86_64_USER_REGS): New.
4704 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4705
2b577b92
YQ
47062014-04-28 Yao Qi <yao@codesourcery.com>
4707
4708 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4709 name.
4710
94611da2
PA
47112014-04-25 Pedro Alves <palves@redhat.com>
4712
4713 PR server/16255
4714 * linux-low.c (linux_attach_fail_reason_string): New function.
4715 (linux_attach_lwp): Delete.
4716 (linux_attach_lwp_1): Rename to ...
4717 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4718 argument. Remove "initial" parameter. Return int instead of
4719 void. Don't error or warn here.
4720 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4721 failure to attach to the tgid. Call warning when failing to
4722 attach to an lwp.
4723 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4724 argument. Remove "initial" parameter. Return int instead of
4725 void. Don't error or warn here.
4726 (linux_attach_fail_reason_string): New declaration.
4727 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4728 interface change. Use linux_attach_fail_reason_string.
4729
01f9f808
MS
47302014-04-24 Michael Sturm <michael.sturm@mintel.com>
4731 Walfred Tedeschi <walfred.tedeschi@intel.com>
4732
4733 * Makefile.in: Added rules to handle new files
4734 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4735 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4736 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4737 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4738 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4739 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4740 x32-avx512-linux.o.
4741 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4742 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4743 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4744 i386/x32-avx512.xml.
4745 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4746 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4747 i386/x32-avx512-linux.xml.
4748 * i387-fp.c (num_avx512_k_registers): New constant for number
4749 of K registers.
4750 (num_avx512_zmmh_low_registers): New constant for number of
4751 lower ZMM registers (0-15).
4752 (num_avx512_zmmh_high_registers): New constant for number of
4753 higher ZMM registers (16-31).
4754 (num_avx512_ymmh_registers): New contant for number of higher
4755 YMM registers (ymm16-31 added by avx521 on x86_64).
4756 (num_avx512_xmm_registers): New constant for number of higher
4757 XMM registers (xmm16-31 added by AVX512 on x86_64).
4758 (struct i387_xsave): Add space for AVX512 registers.
4759 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4760 Add code to handle AVX512 registers.
4761 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4762 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4763 prototypei from generated file.
4764 (tdesc_amd64_avx512_linux): Likewise.
4765 (init_registers_x32_avx512_linux): Likewise.
4766 (tdesc_x32_avx512_linux): Likewise.
4767 (init_registers_i386_avx512_linux): Likewise.
4768 (tdesc_i386_avx512_linux): Likewise.
4769 (x86_64_regmap): Add AVX512 registers.
4770 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4771 mask.
4772 (initialize_low_arch): Add code to initialize AVX512 registers.
4773
51aa91f9
PA
47742014-04-23 Pedro Alves <palves@redhat.com>
4775
4776 * mem-break.c (find_gdb_breakpoint_at): Make static.
4777 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4778
a4165e94
PA
47792014-04-23 Pedro Alves <palves@redhat.com>
4780
4781 * i386-low.c: Don't include break-common.h here.
4782 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4783 prototype to take target_hw_bp_type as argument instead of a Z
4784 packet char.
4785 * i386-low.h: Include break-common.h here.
4786 (Z_packet_to_hw_type): Declare.
4787 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4788 prototypes.
4789 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4790 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4791 (x86_remove_point): Convert the packet number to a
4792 target_hw_bp_type before calling i386_low_remove_watchpoint.
4793 * win32-i386-low.c (i386_insert_point): Convert the packet number
4794 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4795 (i386_remove_point): Convert the packet number to a
4796 target_hw_bp_type before calling i386_low_remove_watchpoint.
4797
b8acf843
PA
47982014-04-23 Pedro Alves <palves@redhat.com>
4799
4800 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4801
d708bcd1
PA
48022014-04-10 Pedro Alves <palves@redhat.com>
4803
4804 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4805 Check if the condition or command is NULL before checking if the
4806 breakpoint is known. On success, return true.
4807 * mem-break.h (add_breakpoint_condition): Document return.
4808 (add_breakpoint_commands): Add describing comment.
4809 * server.c (skip_to_semicolon): New function.
4810 (process_point_options): Use it.
4811
2eec7d5b
PA
48122014-04-09 Pedro Alves <palves@redhat.com>
4813
4814 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4815 to lwpid_of.
4816
fa96cb38
PA
48172014-02-27 Pedro Alves <palves@redhat.com>
4818
4819 PR 12702
4820 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4821 macros.
4822 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4823 output.
4824 (last_thread_of_process_p): Take a PID argument instead of a
4825 thread pointer.
4826 (linux_wait_for_lwp): Delete.
4827 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4828 functions.
4829 (linux_low_filter_event): New function, party factored out from
4830 linux_wait_for_event.
4831 (linux_wait_for_event): Rename to ...
4832 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4833 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4834 sigsuspend. Check for zombie leaders.
4835 (linux_wait_for_event): Reimplement as wrapper around
4836 linux_wait_for_event_filtered.
4837 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4838 a normal or signal exit is seen, it's the whole process exiting.
4839 (wait_for_sigstop): No longer a for_each_inferior callback.
4840 Rewrite on top of linux_wait_for_event_filtered.
4841 (stop_all_lwps): Call wait_for_sigstop directly.
4842 * server.c (resume, handle_target_event): Handle
4843 TARGET_WAITKIND_NO_RESUMED.
4844
d763de10
JB
48452014-02-26 Joel Brobecker <brobecker@adacore.com>
4846
4847 * win32-low.c (psapi_get_dll_name,
4848 * win32_CreateToolhelp32Snapshot): Delete.
4849 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4850 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4851 Delete.
4852 (handle_load_dll): Add function description.
4853 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4854
850a0f76
JB
48552014-02-26 Joel Brobecker <brobecker@adacore.com>
4856
4857 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4858 Add comment.
4859 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4860 base address when calling win32_add_one_solib.
4861 (handle_load_dll): Delete local variable load_addr.
4862 Remove 0x1000 offset applied to DLL base address when calling
4863 win32_add_one_solib.
4864 (handle_unload_dll): Add comment.
4865
f25b3fc3
JB
48662014-02-26 Joel Brobecker <brobecker@adacore.com>
4867
4868 * win32-low.c (win32_add_all_dlls): Renames
4869 win32_ensure_ntdll_loaded. Rewrite function documentation.
4870 Adjust implementation to always load all DLLs.
4871 Add 0x1000 offset to DLL base address when calling
4872 win32_add_one_solib.
4873 (child_initialization_done): New static global.
4874 (do_initial_child_stuff): Set child_initialization_done to
4875 zero during child initialization, and 1 after. Replace call
4876 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4877 Add comment.
4878 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4879 (handle_unload_dll): Add function documentation.
4880 (get_child_debug_event): Ignore load and unload DLL events
4881 during child initialization.
4882
d86d4aaf
DE
48832014-02-20 Doug Evans <dje@google.com>
4884
3bc32da3 4885 Remove global all_lwps.
d86d4aaf
DE
4886 * inferiors.h (ptid_of): Move here from linux-low.h.
4887 (pid_of, lwpid_of): Ditto.
4888 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4889 parameter is a struct thread_info * now.
4890 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4891 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4892 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4893 directly.
4894 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4895 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4896 * linux-arm-low.c (update_registers_callback): Update, "entry"
4897 parameter is a struct thread_info * now.
4898 Fetch lwpid from current_inferior directly.
4899 (arm_insert_point): Pass &all_threads to find_inferior instead of
4900 &all_lwps.
4901 (arm_remove_point): Ditto.
4902 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4903 (arm_prepare_to_resume): Fetch pid from thread.
4904 (arm_read_description): Fetch lwpid from current_inferior directly.
4905 * linux-low.c (all_lwps): Delete.
4906 (delete_lwp): Delete call to remove_inferior.
4907 (handle_extended_wait): Fetch lwpid from thread.
4908 (add_lwp): Don't set lwp->entry.id. Remove call to
4909 add_inferior_to_list.
4910 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4911 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4912 (kill_one_lwp_callback): Ditto.
4913 (linux_kill): Don't dereference NULL pointer.
4914 Fetch ptid,lwpid from thread.
4915 (get_detach_signal): Fetch ptid from thread.
4916 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4917 Simplify call to regcache_invalidate_thread.
4918 (delete_lwp_callback): Update, "entry" parameter is a
4919 struct thread_info * now. Fetch pid from thread.
4920 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4921 (status_pending_p_callback): Update, "entry" parameter is a
4922 struct thread_info * now. Fetch ptid from thread.
4923 (find_lwp_pid): Update, "entry" parameter is a
4924 struct thread_info * now.
4925 (linux_wait_for_lwp): Fetch pid from thread.
4926 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4927 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4928 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4929 (dequeue_one_deferred_signal): Ditto.
4930 (cancel_breakpoint): Fetch ptid from current_inferior.
4931 (linux_wait_for_event): Pass &all_threads to find_inferior,
4932 not &all_lwps. Fetch ptid, lwpid from thread.
4933 (count_events_callback): Update, "entry" parameter is a
4934 struct thread_info * now.
4935 (select_singlestep_lwp_callback): Ditto.
4936 (select_event_lwp_callback): Ditto.
4937 (cancel_breakpoints_callback): Ditto.
4938 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4939 not &all_lwps.
4940 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4941 (unsuspend_one_lwp): Update, "entry" parameter is a
4942 struct thread_info * now.
4943 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4944 not &all_lwps.
4945 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4946 Fetch lwpid from thread, not lwp.
4947 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4948 Pass &all_threads to find_inferior, not &all_lwps.
4949 (send_sigstop): Fetch lwpid from thread, not lwp.
4950 (send_sigstop_callback): Update, "entry" parameter is a
4951 struct thread_info * now.
4952 (suspend_and_send_sigstop_callback): Ditto.
4953 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4954 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4955 struct thread_info * now.
4956 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4957 from thread, lwp.
4958 (lwp_running): Update, "entry" parameter is a
4959 struct thread_info * now.
4960 (stop_all_lwps): Fetch ptid from thread.
4961 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4962 (linux_resume_one_lwp): Fetch lwpid from thread.
4963 (linux_set_resume_request): Update, "entry" parameter is a
4964 struct thread_info * now. Fetch pid, lwpid from thread.
4965 (resume_status_pending_p): Update, "entry" parameter is a
4966 struct thread_info * now.
4967 (need_step_over_p): Ditto. Fetch lwpid from thread.
4968 (start_step_over): Fetch lwpid from thread.
4969 (linux_resume_one_thread): Update, "entry" parameter is a
4970 struct thread_info * now. Fetch lwpid from thread.
4971 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4972 (proceed_one_lwp): Update, "entry" parameter is a
4973 struct thread_info * now. Fetch lwpid from thread.
4974 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4975 struct thread_info * now.
4976 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4977 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4978 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4979 directly.
4980 (regsets_store_inferior_registers): Ditto.
4981 (fetch_register, store_register): Ditto.
4982 (linux_read_memory, linux_write_memory): Ditto.
4983 (linux_request_interrupt): Ditto.
4984 (linux_read_auxv): Ditto.
4985 (linux_xfer_siginfo): Ditto.
4986 (linux_qxfer_spu): Ditto.
4987 (linux_qxfer_libraries_svr4): Ditto.
4988 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4989 moved to inferiors.h.
4990 (get_lwp): Delete.
4991 (get_thread_lwp): Update.
4992 (struct lwp_info): Delete member "entry". Simplify comment for
4993 member "thread".
4994 (all_lwps): Delete.
4995 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4996 current_inferior directly.
4997 (update_watch_registers_callback): Update, "entry" parameter is a
4998 struct thread_info * now. Fetch pid from thread.
4999 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5000 (mips_insert_point): Fetch lwpid from current_inferior.
5001 Pass &all_threads to find_inferior, not &all_lwps.
5002 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5003 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5004 directly.
5005 (mips_stopped_data_address): Ditto.
5006 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5007 directly.
5008 * linux-tile-low.c (tile_arch_setup): Ditto.
5009 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5010 (update_debug_registers_callback): Update, "entry" parameter is a
5011 struct thread_info * now. Fetch pid from thread.
5012 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5013 Pass &all_threads to find_inferior, not &all_lwps.
5014 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5015 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5016 Pass &all_threads to find_inferior, not &all_lwps.
5017 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5018 (i386_dr_low_get_status): Ditto.
5019 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5020 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5021 (x86_linux_read_description): Ditto.
5022 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5023
3b8361aa
DE
50242014-02-20 Doug Evans <dje@google.com>
5025
5026 * inferiors.c (get_first_inferior): Fix buglet.
5027
f7667f0d
DE
50282014-02-19 Doug Evans <dje@google.com>
5029
5030 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5031 * inferiors.c (add_thread): Change result type to struct thread_info *.
5032 All callers updated.
5033 (add_lwp): Call add_thread here instead of in callers.
5034 All callers updated.
5035 * linux-low.h (get_lwp_thread): Rewrite.
5036 (struct lwp_info): New member "thread".
5037
b3312d80
DE
50382014-02-19 Doug Evans <dje@google.com>
5039
5040 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5041 All callers updated.
5042
ecc6f45c
DE
50432014-02-19 Doug Evans <dje@google.com>
5044
5045 * inferiors.c (add_thread): Fix whitespace.
5046
649ebbca
DE
50472014-02-19 Doug Evans <dje@google.com>
5048
5049 * dll.c (clear_dlls): Replace accessing list implemention details
5050 with API function.
5051 * gdbthread.h (get_first_thread): Declare.
5052 * inferiors.c (for_each_inferior_with_data): New function.
5053 (get_first_thread): New function.
5054 (find_thread_ptid): Simplify.
5055 (get_first_inferior): New function.
5056 (clear_list): Delete.
5057 (one_inferior_p): New function.
5058 (clear_inferior_list): New function.
5059 (clear_inferiors): Update.
5060 * inferiors.h (for_each_inferior_with_data): Declare.
5061 (clear_inferior_list): Declare.
5062 (one_inferior_p): Declare.
5063 (get_first_inferior): Declare.
5064 * linux-low.c (linux_wait_for_event): Replace accessing list
5065 implemention details with API function.
5066 * server.c (target_running): Ditto.
5067 (accumulate_file_name_length): New function.
5068 (emit_dll_description): New function.
5069 (handle_qxfer_libraries): Replace accessing list implemention
5070 details with API function.
5071 (handle_qxfer_threads_worker): New function.
5072 (handle_qxfer_threads_proper): Replace accessing list implemention
5073 details with API function.
5074 (handle_query): Ditto.
5075 (visit_actioned_threads_callback_ftype): New typedef.
5076 (visit_actioned_threads_data): New struct.
5077 (visit_actioned_threads): Rewrite to be find_inferior callback.
5078 (resume): Call find_inferior.
5079 (handle_status): Replace accessing list implemention
5080 details with API function.
5081 (process_serial_event): Replace accessing list implemention details
5082 with API function.
5083 * target.c (set_desired_inferior): Replace accessing list implemention
5084 details with API function.
5085 * tracepoint.c (same_process_p): New function.
5086 (gdb_agent_about_to_close): Replace accessing list implemention
5087 details with API function.
5088 * win32-low.c (child_delete_thread): Replace accessing list
5089 implemention details with API function.
5090 (match_dll_by_basename): New function.
5091 (dll_is_loaded_by_basename): New function.
5092 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5093 details call to dll_is_loaded_by_basename.
5094
80894984
DE
50952014-02-19 Doug Evans <dje@google.com>
5096
5097 * dll.h (struct dll_info): Add comment.
5098 * gdbthread.h (struct thread_info): Add comment.
5099 (current_ptid): Simplify.
5100 * inferiors.c (add_process): Update.
5101 (remove_process): Update.
5102 * inferiors.h (struct process_info): Rename member "head" to "entry".
5103 * linux-low.c (delete_lwp): Update.
5104 (add_lwp): Update.
5105 (last_thread_of_process_p): Update.
5106 (kill_one_lwp_callback, linux_kill): Update.
5107 (status_pending_p_callback): Update.
5108 (wait_for_sigstop): Update. Simplify read of ptid.
5109 (start_step_over): Update.
5110 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5111 (get_lwp_thread): Update.
5112 (struct lwp_info): Rename member "head" to "entry".
5113 * regcache.h (inferior_list_entry): Delete.
5114 * server.c (kill_inferior_callback): Update.
5115 (detach_or_kill_inferior_callback): Update.
5116 (print_started_pid): Update.
5117 (print_attached_pid): Update.
5118 (process_serial_event): Simplify read of ptid.
5119 * thread-db.c (thread_db_create_event): Update.
5120 (thread_db_get_tls_address): Update.
5121 * win32-low.c (current_inferior_ptid): Simplify.
5122
46917d26
TT
51232014-02-19 Tom Tromey <tromey@redhat.com>
5124
5125 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5126 argument.
5127 (target_supports_btrace): Update.
5128
0759a81e
YQ
51292014-02-14 Yao Qi <yao@codesourcery.com>
5130
5131 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5132 (rsp-low-ipa.o): New target.
5133
a7191e8b
TT
51342014-02-12 Tom Tromey <tromey@redhat.com>
5135
5136 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5137 convert_ascii_to_int.
5138 * regcache.c (registers_to_string): Likewise.
5139 * remote-utils.c (decode_M_packet): Likewise.
5140 * server.c (process_serial_event): Likewise.
5141
ff0e980e
TT
51422014-02-12 Tom Tromey <tromey@redhat.com>
5143
5144 * server.c (handle_query, handle_v_run): Use hex2bin, not
5145 unhexify.
5146 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5147
e9371aff
TT
51482014-02-12 Tom Tromey <tromey@redhat.com>
5149
5150 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5151 convert_int_to_ascii.
5152 * regcache.c (registers_to_string, collect_register_as_string):
5153 Likewise.
5154 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5155 Likewise.
5156 * server.c (process_serial_event): Likewise.
5157 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5158 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5159
971dc0b8
TT
51602014-02-12 Tom Tromey <tromey@redhat.com>
5161
5162 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5163 bin2hex, not hexify.
5164 * tracepoint.c (cmd_qtstatus): Likewise.
5165
0a822afb
TT
51662014-02-12 Tom Tromey <tromey@redhat.com>
5167
5168 * remote-utils.c (monitor_output): Pass explicit length to
5169 hexify.
5170
9c3d6531
TT
51712014-02-12 Tom Tromey <tromey@redhat.com>
5172
5173 * tracepoint.c: Include rsp-low.h.
5174 * server.c: Include rsp-low.h.
5175 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5176 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5177 declare.
5178 * remote-utils.c: Include rsp-low.h.
5179 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5180 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5181 (convert_int_to_ascii, convert_ascii_to_int): Move to
5182 common/rsp-low.c.
5183 * regcache.c: Include rsp-low.h.
5184 * ax.c: Include rsp-low.h.
5185 * Makefile.in (SFILES): Add common/rsp-low.c.
5186 (OBS): Add rsp-low.o.
5187 (rsp-low.o): New target.
5188
01fd3ea5
TT
51892014-02-12 Tom Tromey <tromey@redhat.com>
5190
5191 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5192 Include print-utils.h.
5193 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5194 (plongest, thirty_two, phex_nz): Remove.
5195 * Makefile.in (SFILES): Add common/print-utils.c.
5196 (OBS): Add print-utils.o.
5197 (print-utils-ipa.o): New target.
5198 (print-utils.o): New target.
5199 (IPA_OBJS): Add print-utils-ipa.o.
5200
e99dc820
TT
52012014-02-06 Tom Tromey <tromey@redhat.com>
5202
5203 * Makefile.in (SFILES): Fix indentation.
5204
ee1e2d4f
DE
52052014-02-05 Doug Evans <dje@google.com>
5206
5207 * linux-low.c (linux_wait_for_event): Improve comment.
5208 (linux_wait_1): Keep current_inferior in sync with event_child.
5209
f5a02773
DE
52102014-01-22 Doug Evans <dje@google.com>
5211
5212 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5213
87ce2a04
DE
52142014-01-22 Doug Evans <dje@google.com>
5215
5216 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5217 * configure: Regenerate.
5218 * config.in: Regenerate.
5219 * Makefile.in (SFILES): Add debug.c.
5220 (OBS): Add debug.o.
5221 * debug.c: New file.
5222 * debug.h: New file.
5223 * linux-aarch64-low.c (*): Update all debugging printfs to use
5224 debug_printf instead of fprintf.
5225 * linux-arm-low.c (*): Ditto.
5226 * linux-cris-low.c (*): Ditto.
5227 * linux-crisv32-low.c (*): Ditto.
5228 * linux-m32r-low.c (*): Ditto.
5229 * linux-sparc-low.c (*): Ditto.
5230 * linux-x86.c (*): Ditto.
5231 * linux-low.c (*): Ditto.
5232 (linux_wait_1): Add calls to debug_enter, debug_exit.
5233 (linux_wait): Remove redundant debugging printf.
5234 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5235 (linux_resume, unstop_all_lwps): Ditto.
5236 * mem-break.c (*): Update all debugging printfs to use
5237 debug_printf instead of fprintf.
5238 * remote-utils.c (*): Ditto.
5239 * thread-db.c (*): Ditto.
5240 * server.c #include <ctype.h>, "gdb_vecs.h".
5241 (debug_threads): Moved to debug.c.
5242 (*): Update all debugging printfs to use debug_printf instead of
5243 fprintf.
5244 (start_inferior): Replace call to fflush with call to debug_flush.
5245 (monitor_show_help): Mention set debug-format.
5246 (parse_debug_format_options): New function.
5247 (handle_monitor_command): Handle "monitor set debug-format".
5248 (gdbserver_usage): Mention --debug-format.
5249 (main): Parse --debug-format.
5250 * server.h (debug_threads): Declaration moved to debug.h.
5251 #include "debug.h".
5252 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5253 trace_debug_1 that uses debug_printf.
5254 (tracepoint_look_up_symbols): Update all debugging printfs to use
5255 debug_printf instead of fprintf.
5256
e671835b
BS
52572014-01-20 Baruch Siach <baruch@tkos.co.il>
5258
5259 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5260 sys/ptrace.h.
5261
b5737fa9
PA
52622014-01-17 Pedro Alves <palves@redhat.com>
5263
ea38d2a9 5264 PR build/16445
c7faa97a
PA
5265 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5266 defined after including gdb_proc_service.h.
b5737fa9 5267
40ed484e
DE
52682014-01-16 Doug Evans <dje@google.com>
5269
5270 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5271 (match_dll): Use it.
5272
969c39fb
MM
52732014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5274
5275 * target.h (target_ops) <read_btrace>: Change parameters and
5276 return type to allow error reporting.
5277 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5278 trace reading errors on.
5279 * linux-low.c (linux_low_read_btrace): Pass trace reading
5280 errors on.
5281 (linux_low_disable_btrace): New.
5282
ab7f45ba
DE
52832014-01-15 Doug Evans <dje@google.com>
5284
5285 * inferiors.c (thread_id_to_gdb_id): Delete.
5286 * inferiors.h (thread_id_to_gdb_id): Delete.
5287
66af0f44
EZ
52882014-01-13 Eli Zaretskii <eliz@gnu.org>
5289
5290 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5291 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5292 versions.
5293
9939e131
PA
52942014-01-08 Pedro Alves <palves@redhat.com>
5295
5296 * server.c (handle_status): Don't discard previous queued stop
5297 replies or thread's pending status here.
5298 (main) <disconnection>: Do it here instead.
5299
b7ea362b
PA
53002014-01-08 Pedro Alves <palves@redhat.com>
5301
5302 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5303 * server.c (visit_actioned_threads, handle_pending_status): New
5304 function.
5305 (handle_v_cont): Factor out parts to ...
5306 (resume): ... this new function. If in all-stop, and a thread
5307 being resumed has a pending status, report it without actually
5308 resuming.
5309 (myresume): Adjust to use the new 'resume' function.
5310 (clear_pending_status_callback, set_pending_status_callback)
5311 (find_status_pending_thread_callback): New functions.
5312 (handle_status): Handle the case of multiple threads having
5313 interesting statuses to report. Report threads' real last signal
5314 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5315 with an interesting thread to report the status for, instead of
5316 always reporting the status of the first thread.
5317
28498c42
JB
53182014-01-01 Joel Brobecker <brobecker@adacore.com>
5319
5320 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5321 * gdbreplay.c (gdbreplay_version): Likewise.
5322
f45c82da
YZ
53232013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5324
5325 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5326 iov.iov_len with the real length in use.
5327
379a5e2d
JB
53282013-12-13 Joel Brobecker <brobecker@adacore.com>
5329
5330 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5331 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5332 for all targets that use win32-low.c.
5333 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5334 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5335
4210d83e
PA
53362013-12-13 Pedro Alves <palves@redhat.com>
5337
5338 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5339 if equal to TARGET_WAITKIND_LOADED.
5340 * win32-low.c (cached_status): New static global.
5341 (win32_wait): Add declaration.
5342 (do_initial_child_stuff): Flush all initial pending debug events
5343 up to the initial breakpoint.
5344 (win32_wait): If CACHED_STATUS was set, return that instead
5345 of doing a real wait. Remove the code resuming the execution
5346 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5347 during the initial phase. Also remove the code changing
5348 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5349 TARGET_WAITKIND_STOPPED.
5350
e7f0d979
YQ
53512013-12-11 Yao Qi <yao@codesourcery.com>
5352
5353 * notif.c (handle_notif_ack): Return 0 if no notification
5354 matches.
5355
ebcf782c
DE
53562013-11-20 Doug Evans <dje@google.com>
5357
5358 * linux-low.c (linux_set_resume_request): Fix comment.
5359
20ad9378
DE
53602013-11-20 Doug Evans <dje@google.com>
5361
5362 * linux-low.c (resume_status_pending_p): Tweak comment.
5363
a196ebeb
WT
53642013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5365
5366 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5367 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5368 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5369 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5370 (srv_amd64_regobj): Add amd64-mpx.o.
5371 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5372 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5373 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5374 * i387-fp.c (num_pl_bnd_register) Added constant.
5375 (num_pl_bnd_cfg_registers) Added constant.
5376 (struct i387_xsave) Added reserved area and MPX fields.
5377 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5378 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5379 function.
5380 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5381 (init_registers_amd64_mpx_linux): Declare new function.
5382 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5383 (x86_64_regmap): Add MPX registers.
5384 (x86_linux_read_description): Add MPX case.
5385 (initialize_low_arch): Initialize MPX targets.
5386
0080a2f6
TT
53872013-11-18 Tom Tromey <tromey@redhat.com>
5388
5389 * configure: Rebuild.
5390 * configure.ac: Don't check for stdlib.h.
5391 * gdbreplay.c: Unconditionally include stdlib.h.
5392
2978b111
TT
53932013-11-18 Tom Tromey <tromey@redhat.com>
5394
5395 * config.in: Rebuild.
5396 * configure: Rebuild.
5397 * configure.ac: Don't use AC_HEADER_DIRENT.
5398
a3d08894
TT
53992013-11-18 Tom Tromey <tromey@redhat.com>
5400
5401 * server.h: Don't check HAVE_STRING_H.
5402 * gdbreplay.c: Don't check HAVE_STRING_H.
5403 * configure: Rebuild.
5404
0a5dd17d
TT
54052013-11-18 Tom Tromey <tromey@redhat.com>
5406
5407 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5408 LIBGNU.
5409
1bd2f0ba
TT
54102013-11-08 Tom Tromey <tromey@redhat.com>
5411
5412 * configure, config.in: Rebuild.
5413 * configure.ac: Remove unused configury.
5414
3266f10b
TT
54152013-11-08 Tom Tromey <tromey@redhat.com>
5416
5417 * acinclude.m4: Include common.m4, codeset.m4.
5418 * configure, config.in: Rebuild.
5419 * configure.ac: Use GDB_AC_COMMON.
5420
6682d959
AA
54212013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5422
5423 * linux-s390-low.c (HWCAP_S390_TE): New define.
5424 (s390_arch_setup): Consider the TE field in the HWCAP for
5425 determining 'have_regset_tdb'.
5426
fd0a4d76
SDJ
54272013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5428
5429 PR gdb/16014
5430 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5431 call to sizeof.
5432
1a3d890b
PA
54332013-10-02 Pedro Alves <palves@redhat.com>
5434
5435 * server.c (process_serial_event): Don't output "GDBserver
5436 exiting" if GDB is connected through stdio.
5437 * target.c (mywait): Likewise, be silent if GDB is connected
5438 through stdio.
5439
97ad4581
JB
54402013-10-01 Joel Brobecker <brobecker@adacore.com>
5441
5442 * lynx-low.c (lynx_add_threads_after_attach): New function.
5443 (lynx_attach): Remove call to add_thread. Add call to
5444 lynx_add_threads_after_attach instead.
5445
5b4e221c
MF
54462013-09-28 Mike Frysinger <vapier@gentoo.org>
5447
5448 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5449 * config.in, configure: Regenerated.
5450
ee47b2f8
YQ
54512013-09-18 Yao Qi <yao@codesourcery.com>
5452
5453 PR server/15959
5454 * server.c (start_inferior): Clear 'resume_info'.
5455
d6707650 54562013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5457
d6707650
JW
5458 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5459 for each register.
5460
9243dd0e 54612013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5462
9243dd0e
JW
5463 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5464 linux-tile-low.o to srv_tgtobj.
5465
c623a6ef
WN
54662013-09-16 Will Newton <will.newton@linaro.org>
5467
5468 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5469 out regs.
5470
fb71d39e
PA
54712013-09-06 Pedro Alves <palves@redhat.com>
5472
5473 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5474 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5475 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5476 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5477 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5478 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5479
8e7e9910
PA
54802013-09-06 Pedro Alves <palves@redhat.com>
5481
5482 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5483 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5484
7c3a12ca
PA
54852013-09-06 Pedro Alves <palves@redhat.com>
5486
5487 * linux-amd64-ipa.c: Include tracepoint.h.
5488 * linux-i386-ipa.c: Include tracepoint.h.
5489
8eb3d7b6
RW
54902013-09-06 Ricard Wanderlof <ricardw@axis.com>
5491
5492 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5493 (ps_get_thread_area): New function.
5494
eddddb9d
RW
54952013-09-06 Ricard Wanderlof <ricardw@axis.com>
5496
5497 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5498 (initialize_low_arch): Call init_registers_crisv32 rather than
5499 init_register_crisv32.
5500
533b0600
PA
55012013-09-05 Pedro Alves <palves@redhat.com>
5502
5503 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5504 to ...
5505 * hostio.h: ... this new file.
5506 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5507 win32-low.c: Include hostio.h.
5508
0ce3d3b5
PA
55092013-09-05 Pedro Alves <palves@redhat.com>
5510
5511 * server.h (gdb_client_data, handler_func, callback_handler_func)
5512 (delete_file_handler, add_file_handler, append_callback_event)
5513 (delete_callback_event, start_event_loop, initialize_event_loop):
5514 Move to event-loop.h and include it.
5515 * event-loop.h: New file.
5516
799cdc37
PA
55172013-09-05 Pedro Alves <palves@redhat.com>
5518
5519 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5520 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5521 (loaded_dll, unloaded_dll): Move to ...
5522 * dll.h: ... this new file.
5523 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5524
6a6bbd9d
PA
55252013-09-05 Pedro Alves <palves@redhat.com>
5526
5527 * server.h (current_process, get_thread_process, all_processes)
5528 (add_inferior_to_list, for_each_inferior, current_inferior)
5529 (remove_inferior, add_process, remove_process, find_process_pid)
5530 (have_started_inferiors_p, have_attached_inferiors_p)
5531 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5532 (clear_inferiors, find_inferior, find_inferior_id)
5533 (inferior_target_data, set_inferior_target_data)
5534 (inferior_regcache_data, set_inferior_regcache_data): Move to
5535 inferiors.h, and include it.
5536 * inferiors.h: New file.
5537
f699aaba
PA
55382013-09-05 Pedro Alves <palves@redhat.com>
5539
5540 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5541 Move ...
72f4393d 5542 * ax.h: ... here.
f699aaba 5543
c144c7a0
PA
55442013-09-05 Pedro Alves <palves@redhat.com>
5545
5546 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5547 tracepoint.h.
5548 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5549 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5550 (handle_tracepoint_general_set, handle_tracepoint_query)
5551 (tracepoint_finished_step, tracepoint_was_hit)
5552 (release_while_stepping_state_list, current_traceframe)
5553 (in_readonly_region, traceframe_read_mem)
5554 (fetch_traceframe_registers, traceframe_read_sdata)
5555 (traceframe_read_info, struct fast_tpoint_collect_status)
5556 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5557 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5558 (supply_fast_tracepoint_registers)
5559 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5560 (ipa_tdesc, claim_trampoline_space)
5561 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5562 (agent_mem_read, agent_get_trace_state_variable_value)
5563 (agent_set_trace_state_variable_value, agent_tsv_read)
5564 (agent_mem_read_string, get_raw_reg_func_addr)
5565 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5566 * tracepoint.h: ... this new file.
5567
ff42e6ab
PA
55682013-09-05 Pedro Alves <palves@redhat.com>
5569
5570 * server.h (perror_with_name, error, fatal, warning, paddress)
5571 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5572 include it.
5573 * utils.h: New file.
5574
541af0f4
PA
55752013-09-05 Pedro Alves <palves@redhat.com>
5576
5577 * server.h (remote_debug, noack_mode, transport_is_reliable)
5578 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5579 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5580 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5581 (write_enn, initialize_async_io, enable_async_io)
5582 (disable_async_io, check_remote_input_interrupt_request)
5583 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5584 (dead_thread_notify, prepare_resume_reply)
5585 (decode_address_to_semicolon, decode_address, decode_m_packet)
5586 (decode_M_packet, decode_X_packet, decode_xfer_write)
5587 (decode_search_memory_packet, unhexify, hexify)
5588 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5589 (look_up_one_symbol, relocate_instruction)
5590 (monitor_output): Move to remote-utils.h, and include it.
5591 * remote-utils.h: New file.
5592
eebdf26b
PA
55932013-09-05 Pedro Alves <palves@redhat.com>
5594
5595 * server.h (_): Delete.
5596
3aafd2ff
PA
55972013-09-02 Pedro Alves <palves@redhat.com>
5598
5599 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5600 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5601 allocated.
5602 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5603
cee83bcb
PM
56042013-09-02 Pierre Muller <muller@sourceware.org>
5605
5606 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5607 or WriteProcessMemory complete successfully and handle
5608 ERROR_PARTIAL_COPY error.
5609
9a13b2fa
PA
56102013-09-02 Pedro Alves <palves@redhat.com>
5611
5612 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5613 error instead of EIO.
5614
602e3198
JK
56152013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5616
5617 PR server/15604
5618 * linux-low.c: Include filestuff.h.
5619 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5620 * lynx-low.c: Include filestuff.h.
5621 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5622 * server.c: Include filestuff.h.
5623 (main): Call notice_open_fds.
5624 * spu-low.c: Include filestuff.h.
5625 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5626
96d7229d
LM
56272013-08-22 Luis Machado <lgustavo@codesourcery.com>
5628
5629 * Makefile.in: Explain why ../target and ../nat are not
5630 listed as include file search paths.
5631 (linux-waitpid.o): New object file rule.
5632 * configure.srv (srv_native_linux_obj): New variable.
5633 Replace all occurrences of linux native object files with
5634 $srv_native_linux_obj.
5635 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5636 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5637 (linux_enable_event_reporting): Remove declaration.
5638 (my_waitpid): Moved to common/linux-waitpid.c.
5639 (linux_wait_for_event): Pass ptid when calling
5640 linux_enable_event_reporting.
5641 (linux_supports_tracefork_flag): Remove.
5642 (linux_enable_event_reporting): Likewise.
5643 (linux_tracefork_grandchild): Remove.
5644 (STACK_SIZE): Moved to common/linux-ptrace.c.
5645 (linux_tracefork_child): Remove.
5646 (linux_test_for_tracefork): Remove.
5647 (linux_look_up_symbols): Call linux_supports_traceclone.
5648 (initialize_low): Remove call to linux_test_for_tracefork.
5649 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5650 common/linux-ptrace.h.
5651 (PTRACE_TYPE_ARG4): Likewise.
5652 Include linux-ptrace.h.
5653
32940073
PA
56542013-08-21 Pedro Alves <palves@redhat.com>
5655
5656 * config.in: Renegerate.
5657
33b60d58 56582013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 5659
33b60d58
LM
5660 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5661 (SFILES): Remove $(srcdir)/common/target-common.c and
5662 add $(srcdir)/target/waitstatus.c.
5663 (OBS): Remove target-common.o and add waitstatus.o.
5664 (server_h): Remove $(srcdir)/../common/target-common.h and
5665 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5666 and $(srcdir)/../target/waitstatus.h.
5667 (target-common.o): Remove.
5668 (waitstatus.o): New target object file.
5669 * target.h: Do not include target-common.h and
5670 include target/resume.h, target/wait.h and
5671 target/waitstatus.h.
5672
b8e1b30e
LM
56732013-08-13 Luis Machado <lgustavo@codesourcery.com>
5674
5675 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5676 to PTRACE_TYPE_ARG3.
5677 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5678 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5679 PTRACE_TYPE_ARG4.
5680 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5681 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5682
7a60ad40
YQ
56832013-07-27 Jie Zhang <jie@codesourcery.com>
5684 Daniel Jacobowitz <dan@codesourcery.com>
5685 Yao Qi <yao@codesourcery.com>
5686
5687 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5688 (mips-linux-watch.o): New rule.
5689 (mips_linux_watch_h): New variable.
5690 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5691 srv_tgtobj.
5692 * linux-mips-low.c: Include mips-linux-watch.h.
5693 (struct arch_process_info, struct arch_lwp_info): New.
5694 (update_watch_registers_callback): New function.
5695 (mips_linux_new_process, mips_linux_new_thread) New functions.
5696 (mips_linux_prepare_to_resume, mips_insert_point): New
5697 functions.
5698 (mips_remove_point, mips_stopped_by_watchpoint): New
5699 functions.
5700 (rsp_bp_type_to_target_hw_bp_type): New function.
5701 (mips_stopped_data_address): New function.
5702 (the_low_target): Add watchpoint support functions.
5703
de6f69ad
YQ
57042013-07-27 Yao Qi <yao@codesourcery.com>
5705
5706 * i386-low.c: Include break-common.h.
5707 (enum target_hw_bp_type): Remove.
5708
3360c0bf
LM
57092013-07-24 Luis Machado <lgustavo@codesourcery.com>
5710
5711 * Makefile.in (SFILES): /common/target-common.c.
5712 (OBS): Add target-common.o.
5713 (server_h): Add $(srcdir)/../common/target-common.h.
5714 (target-common.o): New target.
5715 * server.c (queue_stop_reply_callback): Free
5716 status string after use.
5717 * target.c (target_waitstatus_to_string): Remove.
5718 * target.h: Include target-common.h.
5719 (resume_kind): Likewise.
5720 (target_waitkind): Likewise.
5721 (target_waitstatus): Likewise.
5722 (TARGET_WNOHANG): Likewise.
5723
bd885420
YQ
57242013-07-04 Yao Qi <yao@codesourcery.com>
5725
5726 * Makefile.in (host_alias): Use @host_noncanonical@.
5727 (target_alias): Use @target_noncanonical@.
5728 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5729 ACX_NONCANONICAL_HOST.
5730 * configure: Regenerated.
5731
5732 Revert:
5733 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5734
5735 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5736 * configure: Rebuild.
5737 * Makefile.in (version_host, version_target): Get from configure.
5738 (version.c): Use $(version_host) and $(version_target).
5739
17ef446e
PA
57402013-07-03 Pedro Alves <palves@redhat.com>
5741
5742 * Makefile.in (config.status): Depend on development.sh.
5743 * acinclude.m4: Include libmcheck.m4.
5744 * configure: Regenerate.
5745
7a9a7487
MG
57462013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5747
5748 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5749 attribute inside the parentheses.
5750 (winapi_DebugSetProcessKillOnExit): Ditto.
5751 (winapi_DebugBreakProcess): Ditto.
5752 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 5753
49b64de6
MG
57542013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5755
5756 * notif.h (notif_event): Add a dummy member to avoid compiler
5757 errors.
5758
d5749ee7
PA
57592013-07-01 Pedro Alves <palves@redhat.com>
5760
5761 * hostio.c (HOSTIO_PATH_MAX): Define.
5762 (require_filename, handle_open, handle_unlink, handle_readlink):
5763 Use it.
5764
d8d2a3ee
PA
57652013-07-01 Pedro Alves <palves@redhat.com>
5766
5767 * server.h: Include "pathmax.h".
5768 * linux-low.c: Don't include sys/param.h.
5769 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5770 MAXPATHLEN.
5771 * win32-low.c: Don't include sys/param.h.
5772 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5773
bc7dea8d
PA
57742013-07-01 Pedro Alves <palves@redhat.com>
5775
5776 * event-loop.c: Don't check HAVE_UNISTD_H before including
5777 <unistd.h>.
5778 * gdbreplay.c: Likewise.
5779 * remote-utils.c: Likewise.
5780 * server.c: Likewise.
5781 * configure.ac: Don't check for unistd.h.
5782 * configure: Regenerate.
5783
d6c2da54
TT
57842013-06-28 Tom Tromey <tromey@redhat.com>
5785
5786 * Makefile.in (version.c): Use version.in, not
5787 common/version.in.
5788
257b6bec
MG
57892013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5790
5791 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5792 * configure: Rebuild.
5793 * Makefile.in (version_host, version_target): Get from configure.
5794 (version.c): Use $(version_host) and $(version_target).
5795
86ebe149
DK
57962013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5797
5798 Fix trace-status to output user name without trailing colon.
5799 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5800
f30aa5af
DK
58012013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5802
5803 Fix trace-status to output proper start-time and stop-time.
5804 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5805 output start time and stop time in hex as gdb expects.
5806
28a93511
YQ
58072013-06-26 Pedro Alves <pedro@codesourcery.com>
5808
5809 * tracepoint.c (build_traceframe_info_xml): Output trace state
5810 variables present in the trace buffer.
5811
01208463
TT
58122013-06-24 Tom Tromey <tromey@redhat.com>
5813
5814 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5815 create-version.sh.
5816 (version.o): Remove.
5817 * gdbreplay.c: Include version.h.
5818 (version, host_name): Don't declare.
5819 * server.h: Include version.h.
5820 (version, host_name): Don't declare.
5821
760256f9
PA
58222013-06-12 Pedro Alves <palves@redhat.com>
5823
5824 * linux-x86-low.c (linux_is_elf64): Delete global.
5825 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5826 with local linux_pid_exe_is_elf_64_file use.
5827
030031ee
PA
58282013-06-11 Pedro Alves <palves@redhat.com>
5829
5830 * linux-low.c (regset_disabled, disable_regset): New functions.
5831 (regsets_fetch_inferior_registers)
5832 (regsets_store_inferior_registers): Use them.
5833 (initialize_regsets_info); Don't allocate the disabled_regsets
5834 array here.
5835 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5836 comment.
5837
5da6eb0a
PA
58382013-06-11 Pedro Alves <palves@redhat.com>
5839
5840 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5841 xmalloc.
5842
7e5aaa09
PA
58432013-06-11 Pedro Alves <palves@redhat.com>
5844
5845 * linux-x86-low.c (initialize_low_arch): Call
5846 init_registers_x32_avx_linux.
5847
d878444c
JK
58482013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5849
5850 Fix compatibility with Android Bionic.
5851 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5852 it is not empty.
5853
3aee8918
PA
58542013-06-07 Pedro Alves <palves@redhat.com>
5855
5f2b57b5 5856 PR server/14823
3aee8918
PA
5857 * Makefile.in (OBS): Add tdesc.o.
5858 (IPA_OBJS): Add tdesc-ipa.o.
5859 (tdesc-ipa.o): New rule.
5860 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5861 interface.
5862 * linux-low.c (new_inferior): Delete.
5863 (disabled_regsets, num_regsets): Delete.
5864 (linux_add_process): Adjust to set the new per-process
5865 new_inferior flag.
5866 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5867 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5868 was a stop. When calling arch_setup, switch the current inferior
5869 to the thread that got an event.
5870 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5871 (regsets_fetch_inferior_registers)
5872 (regsets_store_inferior_registers): New regsets_info parameter.
5873 Adjust to use it.
5874 (linux_register_in_regsets): New regs_info parameter. Adjust to
5875 use it.
5876 (register_addr, fetch_register, store_register): New usrregs_info
5877 parameter. Adjust to use it.
5878 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5879 parameter regs_info. Adjust to use it.
5880 (linux_fetch_registers): Get the current inferior's regs_info, and
5881 adjust to use it.
5882 (linux_store_registers): Ditto.
5883 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5884 (initialize_low): Don't initialize the target_regsets here. Call
5885 initialize_low_arch.
5886 * linux-low.h (target_regsets): Delete declaration.
5887 (struct regsets_info): New.
5888 (struct usrregs_info): New.
5889 (struct regs_info): New.
5890 (struct process_info_private) <new_inferior>: New field.
5891 (struct linux_target_ops): Delete the num_regs, regmap, and
5892 regset_bitmap fields. New field regs_info.
5893 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5894 * i387-fp.c (num_xmm_registers): Delete.
5895 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5896 calls to new interface.
5897 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5898 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5899 Infer the number of xmm registers from the regcache's target
5900 description.
5901 * i387-fp.h (num_xmm_registers): Delete.
5902 * inferiors.c (add_thread): Don't install the thread's regcache
5903 here.
5904 * proc-service.c (gregset_info): Fetch the current inferior's
5905 regs_info. Adjust to use it.
5906 * regcache.c: Include tdesc.h.
5907 (register_bytes, reg_defs, num_registers)
5908 (gdbserver_expedite_regs): Delete.
5909 (get_thread_regcache): If the thread doesn't have a regcache yet,
5910 create one, instead of aborting gdbserver.
5911 (regcache_invalidate_one): Rename to ...
5912 (regcache_invalidate_thread): ... this.
5913 (regcache_invalidate_one): New.
5914 (regcache_invalidate): Only invalidate registers of the current
5915 process.
5916 (init_register_cache): Add target_desc parameter, and use it.
5917 (new_register_cache): Ditto. Assert the target description has a
5918 non zero registers_size.
5919 (regcache_cpy): Add assertions. Adjust.
5920 (realloc_register_cache, set_register_cache): Delete.
5921 (registers_to_string, registers_from_string): Adjust.
5922 (find_register_by_name, find_regno, find_register_by_number)
5923 (register_cache_size): Add target_desc parameter, and use it.
5924 (free_register_cache_thread, free_register_cache_thread_one)
5925 (regcache_release, register_cache_size): New.
5926 (register_size): Add target_desc parameter, and use it.
5927 (register_data, supply_register, supply_register_zeroed)
5928 (supply_regblock, supply_register_by_name, collect_register)
5929 (collect_register_as_string, collect_register_by_name): Adjust.
5930 * regcache.h (struct target_desc): Forward declare.
5931 (struct regcache) <tdesc>: New field.
5932 (init_register_cache, new_register_cache): Add target_desc
5933 parameter.
5934 (regcache_invalidate_thread): Declare.
5935 (regcache_invalidate_one): Delete declaration.
5936 (regcache_release): Declare.
5937 (find_register_by_number, register_cache_size, register_size)
5938 (find_regno): Add target_desc parameter.
5939 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5940 declarations.
5941 * remote-utils.c: Include tdesc.h.
5942 (outreg, prepare_resume_reply): Adjust.
5943 * server.c: Include tdesc.h.
5944 (gdbserver_xmltarget): Delete declaration.
5945 (get_features_xml, process_serial_event): Adjust.
5946 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5947 declare.
5948 (struct process_info) <tdesc>: New field.
5949 (ipa_tdesc): Declare.
5950 * tdesc.c: New file.
5951 * tdesc.h: New file.
5952 * tracepoint.c: Include tdesc.h.
5953 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5954 (get_context_regcache): Adjust to pass ipa_tdesc down.
5955 (do_action_at_tracepoint): Adjust to get the register cache size
5956 from the context regcache's description.
5957 (traceframe_walk_blocks): Adjust to get the register cache size
5958 from the current trace frame's description.
5959 (traceframe_get_pc): Adjust to get current trace frame's
5960 description and pass it down.
5961 (gdb_collect): Adjust to get the register cache size from the
5962 IPA's description.
5963 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5964 (gdbserver_xmltarget): Delete.
5965 (initialize_low_tracepoint): Set the ipa's target description.
5966 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5967 (initialize_low_tracepoint): Set the ipa's target description.
5968 * linux-x86-low.c: Include tdesc.h.
5969 [__x86_64__] (is_64bit_tdesc): New.
5970 (ps_get_thread_area, x86_get_thread_area): Use it.
5971 (i386_cannot_store_register): Rename to ...
5972 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5973 (i386_cannot_fetch_register): Rename to ...
5974 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5975 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5976 to new interface.
5977 (target_regsets): Rename to ...
5978 (x86_regsets): ... this.
5979 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5980 interface.
5981 (x86_siginfo_fixup): Use is_64bit_tdesc.
5982 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5983 (tdesc_x32_avx_linux, tdesc_x32_linux)
5984 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5985 Declare.
5986 (x86_linux_update_xmltarget): Delete.
5987 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5988 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5989 (AMD64_LINUX_USER64_CS): New.
5990 (x86_linux_read_description): New, based on
5991 x86_linux_update_xmltarget.
5992 (same_process_callback): New.
5993 (x86_arch_setup_process_callback): New.
5994 (x86_linux_update_xmltarget): New.
5995 (x86_regsets_info): New.
5996 (amd64_linux_regs_info): New.
5997 (i386_linux_usrregs_info): New.
5998 (i386_linux_regs_info): New.
5999 (x86_linux_regs_info): New.
6000 (x86_arch_setup): Reimplement.
6001 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6002 (x86_emit_ops): Ditto.
6003 (the_low_target): Adjust. Install x86_linux_regs_info,
6004 x86_cannot_fetch_register, and x86_cannot_store_register.
6005 (initialize_low_arch): New.
6006 * linux-ia64-low.c (tdesc_ia64): Declare.
6007 (ia64_fetch_register): Adjust.
6008 (ia64_usrregs_info, regs_info): New globals.
6009 (ia64_regs_info): New function.
6010 (the_low_target): Adjust.
6011 (initialize_low_arch): New function.
6012 * linux-sparc-low.c (tdesc_sparc64): Declare.
6013 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6014 Adjust.
6015 (sparc_arch_setup): New function.
6016 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6017 (the_low_target): Adjust.
6018 (initialize_low_arch): New function.
6019 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6020 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6021 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6022 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6023 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6024 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6025 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6026 (tdesc_powerpc_isa205_vsx64l): Declare.
6027 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6028 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6029 (ppc_set_pc, ppc_get_hwcap): Adjust.
6030 (ppc_usrregs_info): Forward declare.
6031 (!__powerpc64__) ppc_regmap_adjusted: New global.
6032 (ppc_arch_setup): Adjust to the current process'es target
6033 description.
6034 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6035 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6036 (ppc_store_evrregset): Adjust.
6037 (target_regsets): Rename to ...
6038 (ppc_regsets): ... this, and make static.
6039 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6040 (ppc_regs_info): New function.
6041 (the_low_target): Adjust.
6042 (initialize_low_arch): New function.
6043 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6044 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6045 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6046 (tdesc_s390x_linux64v2): Declare.
6047 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6048 (s390_fill_gregset, s390_store_last_break): Adjust.
6049 (target_regsets): Rename to ...
6050 (s390_regsets): ... this, and make static.
6051 (s390_get_pc, s390_set_pc): Adjust.
6052 (s390_get_hwcap): New target_desc parameter, and use it.
6053 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6054 (s390_arch_setup): Adjust to set the current process'es target
6055 description. Don't adjust the regmap.
6056 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6057 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6058 (regs_info_3264): New globals.
6059 (s390_regs_info): New function.
6060 (the_low_target): Adjust.
6061 (initialize_low_arch): New function.
6062 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6063 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6064 [__mips64] (init_registers_mips_linux)
6065 (init_registers_mips_dsp_linux): Delete defines.
6066 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6067 (have_dsp): New global.
6068 (mips_read_description): New, based on mips_arch_setup.
6069 (mips_arch_setup): Reimplement.
6070 (get_usrregs_info): New function.
6071 (mips_cannot_fetch_register, mips_cannot_store_register)
6072 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6073 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6074 (target_regsets): Rename to ...
6075 (mips_regsets): ... this, and make static.
6076 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6077 (dsp_regs_info, regs_info): New globals.
6078 (mips_regs_info): New function.
6079 (the_low_target): Adjust.
6080 (initialize_low_arch): New function.
6081 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6082 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6083 Declare.
6084 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6085 (arm_read_description): New, with bits factored from
6086 arm_arch_setup.
6087 (arm_arch_setup): Reimplement.
6088 (target_regsets): Rename to ...
6089 (arm_regsets): ... this, and make static.
6090 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6091 (arm_regs_info): New function.
6092 (the_low_target): Adjust.
6093 (initialize_low_arch): New function.
6094 * linux-m68k-low.c (tdesc_m68k): Declare.
6095 (target_regsets): Rename to ...
6096 (m68k_regsets): ... this, and make static.
6097 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6098 (m68k_regs_info): New function.
6099 (m68k_arch_setup): New function.
6100 (the_low_target): Adjust.
6101 (initialize_low_arch): New function.
6102 * linux-sh-low.c (tdesc_sharch): Declare.
6103 (target_regsets): Rename to ...
6104 (sh_regsets): ... this, and make static.
6105 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6106 (sh_regs_info, sh_arch_setup): New functions.
6107 (the_low_target): Adjust.
6108 (initialize_low_arch): New function.
6109 * linux-bfin-low.c (tdesc_bfin): Declare.
6110 (bfin_arch_setup): New function.
6111 (bfin_usrregs_info, regs_info): New globals.
6112 (bfin_regs_info): New function.
6113 (the_low_target): Adjust.
6114 (initialize_low_arch): New function.
6115 * linux-cris-low.c (tdesc_cris): Declare.
6116 (cris_arch_setup): New function.
6117 (cris_usrregs_info, regs_info): New globals.
6118 (cris_regs_info): New function.
6119 (the_low_target): Adjust.
6120 (initialize_low_arch): New function.
6121 * linux-cris-low.c (tdesc_crisv32): Declare.
6122 (cris_arch_setup): New function.
6123 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6124 (cris_regs_info): New function.
6125 (the_low_target): Adjust.
6126 (initialize_low_arch): New function.
6127 * linux-m32r-low.c (tdesc_m32r): Declare.
6128 (m32r_arch_setup): New function.
6129 (m32r_usrregs_info, regs_info): New globals.
6130 (m32r_regs_info): Adjust.
6131 (initialize_low_arch): New function.
6132 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6133 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6134 (tic6x_usrregs_info): Forward declare.
6135 (tic6x_read_description): New function, based on ...
6136 (tic6x_arch_setup): ... this. Reimplement.
6137 (target_regsets): Rename to ...
6138 (tic6x_regsets): ... this, and make static.
6139 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6140 (tic6x_regs_info): New function.
6141 (the_low_target): Adjust.
6142 (initialize_low_arch): New function.
6143 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6144 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6145 (target_regsets): Rename to ...
6146 (xtensa_regsets): ... this, and make static.
6147 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6148 globals.
6149 (xtensa_arch_setup, xtensa_regs_info): New functions.
6150 (the_low_target): Adjust.
6151 (initialize_low_arch): New function.
6152 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6153 (nios2_arch_setup): Set the current process'es tdesc.
6154 (target_regsets): Rename to ...
6155 (nios2_regsets): ... this.
6156 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6157 (nios2_regs_info): New function.
6158 (the_low_target): Adjust.
6159 (initialize_low_arch): New function.
a261b8f5
PA
6160 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6161 (aarch64_arch_setup): Set the current process'es tdesc.
6162 (target_regsets): Rename to ...
6163 (aarch64_regsets): ... this.
6164 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6165 (aarch64_regs_info): New function.
6166 (the_low_target): Adjust.
6167 (initialize_low_arch): New function.
3aee8918
PA
6168 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6169 globals.
6170 (target_regsets): Rename to ...
6171 (tile_regsets): ... this.
6172 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6173 (tile_regs_info): New function.
6174 (tile_arch_setup): Set the current process'es tdesc.
6175 (the_low_target): Adjust.
6176 (initialize_low_arch): New function.
6177 * spu-low.c (tdesc_spu): Declare.
6178 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6179 * win32-arm-low.c (tdesc_arm): Declare.
6180 (arm_arch_setup): New function.
6181 (the_low_target): Install arm_arch_setup instead of
6182 init_registers_arm.
6183 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6184 (init_windows_x86): Rename to ...
6185 (i386_arch_setup): ... this. Set `win32_tdesc'.
6186 (the_low_target): Adjust.
6187 * win32-low.c (win32_tdesc): New global.
6188 (child_add_thread): Don't create the thread cache here.
6189 (do_initial_child_stuff): Set the new process'es tdesc.
6190 * win32-low.h (struct target_desc): Forward declare.
6191 (win32_tdesc): Declare.
6192 * lynx-i386-low.c (tdesc_i386): Declare global.
6193 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6194 * lynx-low.c (lynx_tdesc): New global.
6195 (lynx_add_process): Set the new process'es tdesc.
6196 * lynx-low.h (struct target_desc): Forward declare.
6197 (lynx_tdesc): Declare global.
6198 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6199 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6200 * nto-low.c (nto_tdesc): New global.
6201 (do_attach): Set the new process'es tdesc.
6202 * nto-low.h (struct target_desc): Forward declare.
6203 (nto_tdesc): Declare.
6204 * nto-x86-low.c (tdesc_i386): Declare.
6205 (nto_x86_arch_setup): Set `nto_tdesc'.
6206
b1fbec62
GB
62072013-06-04 Gary Benson <gbenson@redhat.com>
6208
6209 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6210 to qSupported response when appropriate.
6211 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6212 with nonzero-length annex.
6213 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6214 arguments supplied in annex.
6215
d1ec4ce7
DE
62162013-05-31 Doug Evans <dje@google.com>
6217
ac44adcb 6218 PR server/15594
d1ec4ce7
DE
6219 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6220 64 bits in 64-cross-32 environment.
6221
9b25f2d3
PA
62222013-05-28 Pedro Alves <palves@redhat.com>
6223
6224 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6225 (aarch64-without-fpu.c): Delete rule.
6226 * configure.srv (aarch64*-*-linux*): Remove references to
6227 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6228 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6229 declaration.
6230
6740dc9c
PA
62312013-05-24 Pedro Alves <palves@redhat.com>
6232
6233 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6234 instead of strchr/decode_address. Error if the range isn't split
6235 with a ','. Don't assume there's be a ':' in the action.
6236
c2d6af84
PA
62372013-05-23 Yao Qi <yao@codesourcery.com>
6238 Pedro Alves <palves@redhat.com>
6239
6240 * linux-low.c (lwp_in_step_range): New function.
6241 (linux_wait_1): If the thread was range stepping and stopped
6242 outside the stepping range, report the stop to GDB. Otherwise,
6243 continue stepping. Add range stepping debug output.
6244 (linux_set_resume_request): Copy the step range from the resume
6245 request to the lwp.
6246 (linux_supports_range_stepping): New.
6247 (linux_target_ops) <supports_range_stepping>: Set to
6248 linux_supports_range_stepping.
6249 * linux-low.h (struct linux_target_ops)
6250 <supports_range_stepping>: New field.
6251 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6252 * linux-x86-low.c (x86_supports_range_stepping): New.
6253 (the_low_target) <supports_range_stepping>: Set to
6254 x86_supports_range_stepping.
6255 * server.c (handle_v_cont): Handle 'r' action.
6256 (handle_v_requests): Append ";r" if the target supports range
6257 stepping.
6258 * target.h (struct thread_resume) <step_range_start,
6259 step_range_end>: New fields.
6260 (struct target_ops) <supports_range_stepping>:
6261 New field.
6262 (target_supports_range_stepping): New macro.
6263
58794e1a
JB
62642013-05-17 Joel Brobecker <brobecker@adacore.com>
6265
6266 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6267 confusion in comment.
6268
d631c5a7
JB
62692013-05-17 Joel Brobecker <brobecker@adacore.com>
6270
6271 * lynx-low.c (struct process_info_private): New type.
6272 (lynx_add_process): New function.
6273 (lynx_create_inferior, lynx_attach): Replace calls to
6274 add_process by calls to lynx_add_process.
6275 (lynx_resume): If PTID is null, then try using
6276 current_process()->private->last_wait_event_ptid.
6277 Add comments.
6278 (lynx_clear_inferiors): Delete. The contents of that function
6279 has been inlined in lynx_mourn;
6280 (lynx_wait_1): Save the ptid in the process's private data.
6281 (lynx_mourn): Free the process' private data. Replace call
6282 to lynx_clear_inferiors by call to clear_inferiors.
6283
96f7a20f
YQ
62842013-05-17 Yao Qi <yao@codesourcery.com>
6285
6286 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6287 the right place.
6288
db0dfaa0
LM
62892013-05-16 Luis Machado <lgustavo@codesourcery.com>
6290
6291 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6292 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6293 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6294 PT_TEXT_END_ADDR guards. Update comments.
6295 (linux_target_op) <read_offsets>: Conditionally define to
6296 linux_read_offsets if the target is UCLIBC and if it defines
6297 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6298
68f5f838
SL
62992013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6300 Andrew Jenner <andrew@codesourcery.com>
6301
6302 * Makefile.in (SFILES): Add linux-nios2-low.c.
6303 (clean): Add action to delete nios2-linux.c.
6304 (nios2-linux.c): New rule.
6305 * configure.srv: Add nios2*-*-linux*.
6306 * linux-nios2-low.c: New.
6307
1ebff1fd
HAQ
63082013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6309
6310 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6311
f6150862
HZ
63122013-04-25 Hui Zhu <hui@codesourcery.com>
6313
6314 PR gdb/15186
f6150862
HZ
6315 * ax.c (ax_printf): Add fflush.
6316
614c279d
TT
63172013-04-22 Tom Tromey <tromey@redhat.com>
6318
6319 * Makefile.in (SFILES): Add filestuff.c.
6320 (OBS): Add filestuff.o.
6321 (filestuff.o): New target.
6322 * config.in, configure: Rebuild.
6323 * configure.ac: Check for fdwalk, pipe2.
6324
7d4e5717
PA
63252013-04-17 Pedro Alves <palves@redhat.com>
6326
6327 * configure.ac (USE_THREAD_DB): Delete variable.
6328 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6329 Don't AC_SUBST USE_THREAD_DB.
6330 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6331 * config.in, configure: Regenerate.
6332
d5c93e41
PA
63332013-04-16 Pedro Alves <palves@redhat.com>
6334
6335 * linux-low.h (struct lwp_info) <thread_known>: Move under
6336 the USE_THREAD_DB #ifdef.
6337
04f5fe89
PA
63382013-04-16 Pedro Alves <palves@redhat.com>
6339
6340 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6341 (linux-low.o): Delete rule.
6342 * linux-low.h: Always include "gdb_thread_db.h" instead of
6343 conditionally including thread_db.h.
6344 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6345 HAVE_THREAD_DB_H.
6346
480b27bf
JK
63472013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6348
6349 * Makefile.in (install-only): Fix make install regression.
6350
43662968
JK
63512013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6352
6353 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6354 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6355 installation.
6356 * gdbserver.1: Remove.
6357
3e74e146
PA
63582013-03-22 Pedro Alves <palves@redhat.com>
6359
6360 * linux-low.c (handle_extended_wait): Don't call
6361 linux_enable_event_reporting.
6362
a8347a2a
TT
63632013-03-15 Tony Theodore <tonyt@logyst.com>
6364
6365 PR build/9098:
6366 * Makefile.in (SHELL): Use @SHELL@.
6367
eeb56fa7
SDJ
63682013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6369
6370 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6371 compiler warning.
6372
4fa7e2ff
JB
63732013-03-13 Joel Brobecker <brobecker@adacore.com>
6374
6375 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6376 Remove extraneous NULL element.
6377
8ddb1965
YQ
63782013-03-13 Yao Qi <yao@codesourcery.com>
6379
6380 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6381 'V' block in trace frame.
6382
9accd112
MM
63832013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6384
6385 * target.h (struct target_ops): Add btrace ops.
6386 (target_supports_btrace): New macro.
6387 (target_enable_btrace): New macro.
6388 (target_disable_btrace): New macro.
6389 (target_read_btrace): New macro.
6390 * gdbthread.h (struct thread_info): Add btrace field.
6391 * server.c: Include btrace-common.h.
6392 (handle_btrace_general_set): New function.
6393 (handle_btrace_enable): New function.
6394 (handle_btrace_disable): New function.
6395 (handle_general_set): Call handle_btrace_general_set.
6396 (handle_qxfer_btrace): New function.
6397 (struct qxfer qxfer_packets[]): Add btrace entry.
6398 * inferiors.c (remove_thread): Disable btrace.
6399 * linux-low: Include linux-btrace.h.
6400 (linux_low_enable_btrace): New function.
6401 (linux_low_read_btrace): New function.
6402 (linux_target_ops): Add btrace ops.
6403 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6404 Add srv_linux_btrace=yes.
6405 (x86_64-*-linux*): Add linux-btrace.o.
6406 Add srv_linux_btrace=yes.
6407 * configure.ac: Define HAVE_LINUX_BTRACE.
6408 * config.in: Regenerated.
6409 * configure: Regenerated.
6410
5cc22e4c
MM
64112013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6412
6413 * server.c (handle_qxfer): Preserve error message if -3 is
6414 returned.
6415 (qxfer): Document the -3 return value.
6416
7c97f91e
MM
64172013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6418
6419 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6420 (linux_btrace_h): New variable.
6421 (linux-btrace.o): New rule.
6422
be9a119c 64232013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6424 Hafiz Abid Qadeer <abidh@codesourcery.com>
6425
6426 * tracepoint.c (trace_buffer_size): New global.
6427 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6428 (init_trace_buffer): Change to one-argument function. Allocate
6429 trace buffer memory.
6430 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6431 handle QTBuffer:size packet.
6432 (cmd_bigqtbuffer_size): New function.
6433 (initialize_tracepoint): Call init_trace_buffer with
6434 DEFAULT_TRACE_BUFFER_SIZE.
6435 * server.c (handle_query): Add QTBuffer:size in the
6436 supported packets.
6437
e64f7499
YQ
64382013-03-07 Yao Qi <yao@codesourcery.com>
6439
6440 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6441 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6442 of -1.
6443 (cmd_qtsp): Adjust condition. Do post increment.
6444 Set cur_action and cur_step_action back to 0.
6445
f0ae6fc3
PA
64462013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6447
6448 PR server/15236
6449 * linux-low.c (linux_write_memory): Return early success if LEN is
6450 zero.
6451
b5b0b0af
CV
64522013-03-05 Corinna Vinschen <vinschen@redhat.de>
6453
334ad4a8 6454 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6455
589bc927
TT
64562013-02-28 Tom Tromey <tromey@redhat.com>
6457
6458 * configure.ac: Invoke AC_SYS_LARGEFILE.
6459 * configure, config.in: Rebuild.
6460
dfe07582
CV
64612013-02-28 Corinna Vinschen <vinschen@redhat.com>
6462
6463 * win32-low.c: Throughout, fix format strings and casts of
6464 printf-like functions to avoid type related warnings on all
6465 platforms.
6466 (get_child_debug_event): Print dwDebugEventCode as hex since
6467 that's how it's usually documented.
6468
736cd585
YQ
64692013-02-28 Yao Qi <yao@codesourcery.com>
6470
6471 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6472 pulongest.
6473
e1f58301
JW
64742013-02-27 Jiong Wang <jiwang@tilera.com>
6475
6476 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6477 (reg-tilegx32.c): New rule.
6478 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6479 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6480 different register info initializer according to elf class.
6481 (init_registers_tilgx32): New function. The tilegx32 register info
6482 initializer.
6483 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6484 (tile_store_gregset): Likewise.
6485
d171ca78
YQ
64862013-02-27 Yao Qi <yao@codesourcery.com>
6487
6488 * server.c (process_point_options): Print debug message when
6489 debug_threads is true.
6490
282bbdf3
YQ
64912013-02-26 Yao Qi <yao@codesourcery.com>
6492
6493 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6494
aca22551
PA
64952013-02-19 Pedro Alves <palves@redhat.com>
6496 Kai Tietz <ktietz@redhat.com>
6497
6498 PR gdb/15161
6499
6500 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6501 instead of strtoul to extract address from packet.
6502 (process_serial_event) <'z'>: Likewise.
6503
4f3cee1c
YQ
65042013-02-18 Yao Qi <yao@codesourcery.com>
6505
6506 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6507
8e1d55a3
PA
65082013-02-14 Pedro Alves <palves@redhat.com>
6509
6510 Plug memory leak.
6511
6512 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6513 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6514
458820da
PA
65152013-02-14 Pedro Alves <palves@redhat.com>
6516
6517 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6518
baea0dae
PA
65192013-02-14 Pedro Alves <palves@redhat.com>
6520
6521 * tracepoint.c (save_string): Delete.
6522 (add_tracepoint_action): Use savestring instead of save_string.
6523
0b1afbb3
PA
65242013-02-12 Pedro Alves <palves@redhat.com>
6525
6526 * linux-xtensa-low.c: Ditto.
6527 * xtensa-xtregs.c: Ditto.
6528
8a4ac37e
PA
65292013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6530
6531 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6532 thread_db.
6533
148de6bb
MS
65342013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6535
6536 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6537 aarch64_num_wp_regs and aarch64_num_bp_regs to
6538 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6539
55fac6e0
MS
65402013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6541
6542 * linux-aarch64-low.c (ps_get_thread_area): Replace
6543 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6544
176eb98c
MS
65452013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6546 Marcus Shawcroft <marcus.shawcroft@arm.com>
6547 Nigel Stephens <nigel.stephens@arm.com>
6548 Yufeng Zhang <yufeng.zhang@arm.com>
6549
6550 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6551 (aarch64.c, aarch64-without-fpu.c): New targets.
6552 * configure.srv (aarch64*-*-linux*): New.
6553 * linux-aarch64-low.c: New file.
6554
56f7af9c
MS
65552013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6556
43aaf8b6 6557 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
6558 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6559 (dequeue_one_deferred_signal, linux_resume_one_thread)
6560 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6561 (linux_tracefork_grandchild, linux_test_for_tracefork)
6562 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6563 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6564 where the argument is 0.
6565
60f662b0
YQ
65662013-01-25 Yao Qi <yao@codesourcery.com>
6567
6568 * event-loop.c: Include "queue.h".
6569 (gdb_event_p): New typedef.
6570 (struct gdb_event) <next_event>: Remove.
6571 (event_queue): Change to QUEUE(gdb_event_p).
6572 (async_queue_event): Remove.
6573 (gdb_event_xfree): New.
6574 (initialize_event_loop): New.
6575 (process_event): Use API from QUEUE.
6576 (wait_for_event): Likewise.
6577 * server.c (main): Call initialize_event_loop.
6578 * server.h (initialize_event_loop): Declare.
6579
5ae4861a
YQ
65802013-01-18 Yao Qi <yao@codesourcery.com>
6581
6582 * ax.h (struct eval_agent_expr_context): New.
6583 (gdb_eval_agent_expr): Update declaration.
6584 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6585 TFRAME. Add new argument CTX.
6586 * server.h (struct eval_agent_expr_context): Declare.
6587 (agent_mem_read, agent_tsv_read): Update declaration.
6588 (agent_mem_read_string): Likewise.
6589 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6590 (add_traceframe_block): Add new argument TPOINT.
6591 Increase TPOINT->traceframe_usage.
6592 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6593 eval_tracepoint_agent_expr.
6594 (condition_true_at_tracepoint): Likewise.
6595 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6596 (agent_mem_read_string, agent_tsv_read): Likewise.
6597
85e00e85
YQ
65982013-01-16 Yao Qi <yao@codesourcery.com>
6599
6600 * linux-low.c (linux_resume_one_lwp): Don't check
6601 'lwp->bp_reinsert != 0'.
6602
4039cf45
JB
66032013-01-07 Joel Brobecker <brobecker@adacore.com>
6604 Pedro Alves <palves@redhat.com>
6605
6606 * lynx-low.c (ptrace_request_to_str): Define a temporary
6607 macro and use it to simplify this function's implementation.
6608
9044dee2
JB
66092013-01-07 Joel Brobecker <brobecker@adacore.com>
6610
6611 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6612 sets errno.
6613
e6352c8f
JB
66142013-01-07 Joel Brobecker <brobecker@adacore.com>
6615
6616 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6617
50681a27
JB
66182013-01-07 Joel Brobecker <brobecker@adacore.com>
6619
6620 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6621
3f6e77ef
JB
66222013-01-07 Joel Brobecker <brobecker@adacore.com>
6623
6624 * lynx-low.c (lynx_resume): Use the resume_info parameter
6625 to determine the ptid for the lynx_ptrace call, unless
6626 it is equal to minus_one_ptid, in which case we use the
6627 ptid of the current_inferior.
6628 (lynx_wait_1): After having received a thread create/exit
6629 event, resume the inferior's execution using the signaling
6630 thread's ptid, rather than the old ptid.
6631
7fda33ae
JB
66322013-01-07 Joel Brobecker <brobecker@adacore.com>
6633
6634 * lynx-low.c (lynx_resume): Delete variable ret.
6635
b9786c74
JB
66362013-01-01 Joel Brobecker <brobecker@adacore.com>
6637
6638 * gdbreplay.c (gdbreplay_version): Update copyright year.
6639 * server.c (gdbserver_version): Likewise.
6640
8b93d60f
JB
66412012-12-17 Joel Brobecker <brobecker@adacore.com>
6642
6643 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6644 new thread.
6645
037335a7
JB
66462012-12-17 Joel Brobecker <brobecker@adacore.com>
6647
6648 * lynx-low.c (ptrace_request_to_str): Add handling for
6649 PTRACE_GETTRACESIG.
6650
52d4cbd8
JB
66512012-12-17 Joel Brobecker <brobecker@adacore.com>
6652
6653 * lynx-low.c (lynx_attach): Delete variable new_process.
6654
ab8f6ca9
JB
66552012-12-17 Joel Brobecker <brobecker@adacore.com>
6656
6657 * lynx-low.c (lynx_create_inferior): Delete variable
6658 new_process.
6659
78cbc024
JB
66602012-12-17 Joel Brobecker <brobecker@adacore.com>
6661
6662 * lynx-low.c (ptrace_request_to_str): Do not handle
6663 PTRACE_GETTHREADLIST if this macro does not exist.
6664
14a00470
YQ
66652012-12-15 Yao Qi <yao@codesourcery.com>
6666
6667 * Makefile.in (OBS): Add notif.o.
6668 * notif.c, notif.h: New.
6669 * server.c: Include "notif.h".
6670 (struct vstop_notif) <next>: Remove.
6671 <base>: New field.
6672 (queue_stop_reply): Update.
6673 (push_event, send_next_stop_reply): Remove.
6674 (discard_queued_stop_replies): Update.
6675 (notif_stop): New variable.
6676 (handle_v_stopped): Remove.
6677 (handle_v_requests): Don't call handle_v_stopped. Call
6678 handle_ack_notif instead.
6679 (queue_stop_reply_callback): Call notif_event_enque instead
6680 of queue_stop_reply.
6681 (handle_status): Don't call send_next_stop_reply, call
6682 notif_write_event instead.
6683 (kill_inferior_callback): Likewise.
6684 (detach_or_kill_inferior_callback): Likewise.
6685 (main): Call initialize_notif.
6686 (process_serial_event): Call QUEUE_is_empty.
6687 (handle_target_event): Call notif_push instead of push event.
6688 * server.h (push_event): Remove declaration.
6689
61c125b9
TT
66902012-12-10 Tom Tromey <tromey@redhat.com>
6691
6692 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6693 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6694 macros.
6695 (.c.o): Rewrite.
6696 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6697 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6698 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6699 (amd64-linux-ipa.o, ax.o): Rewrite.
6700 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6701 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6702 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6703 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6704 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6705 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6706 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6707 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6708 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6709 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6710 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6711 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6712 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6713 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6714 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6715 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6716 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6717 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6718 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6719 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6720 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6721 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6722 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6723 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6724 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6725 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6726 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6727 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6728 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6729 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6730 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6731 (reg-tilegx.o): Remove.
6732 (all_object_files): New macro.
6733 Include .deps files.
6734 * aclocal.m4, configure: Rebuild.
6735 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6736 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6737 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6738
e90e9ad9
TT
67392012-12-05 Tom Tromey <tromey@redhat.com>
6740
6741 PR gdb/14917:
6742 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6743
02d403bf 67442012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
6745
6746 * configure.ac: Check for linux/perf_event.h.
6747 * config.in: Regenerated.
6748 * configure: Regenerated.
6749
0270a750
PA
67502012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6751
6752 * hostio.c (handle_readlink): Decrease buffer size
6753 parameter passed to readlink by one byte.
6754
8c29b58e
YQ
67552012-11-26 Yao Qi <yao@codesourcery.com>
6756
6757 * configure.ac (build_warnings): Append '-Wempty-body'.
6758 * configure: Regenerated.
6759 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6760 body.
6761
8bdce1ff
PM
67622012-11-15 Pierre Muller <muller@sourceware.org>
6763
6764 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6765 * config.in: Regenerate.
6766 * configure: Regenerate.
6767 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6768 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6769 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6770 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6771 header.
6772 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6773 instead of <sys/wait.h> header.
6774 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6775
02d403bf 67762012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6777
6778 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6779 (various make rules): Remove -DGDBSERVER
6780
fbd5db48
YQ
67812012-11-09 Yao Qi <yao@codesourcery.com>
6782
6783 * spu-low.c (current_ptid): Move it to ..
6784 * gdbthread.h: ... here. New.
6785 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6786 * server.c (myresume, process_serial_event): Likewise.
6787 * thread-db.c (thread_db_find_new_threads): Likewise.
6788 * tracepoint.c (run_inferior_command): Likewise.
6789
b3dc46ff
AB
67902012-10-01 Andrew Burgess <aburgess@broadcom.com>
6791
6792 * server.c (handle_search_memory_1): Include access length in
6793 warning message.
6794
07c04788
HPN
67952012-09-05 Michael Brandt <michael.brandt@axis.com>
6796
6797 * linux-crisv32-low.c: Fix compile errors.
6798
918d227b
YQ
67992012-09-04 Yao Qi <yao@codesourcery.com>
6800
6801 * tracepoint.c (cmd_qtsv): Adjust debug message.
6802 Don't check CUR_TPOINT.
6803
18c1b81a
YQ
68042012-08-28 Yao Qi <yao@codesourcery.com>
6805
6806 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6807 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6808 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6809 Remove declarations of xmalloc, xreallloc, xstrdup and
6810 freeargv.
6811 * Makefile.in (libiberty_h): New.
6812 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6813 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6814
dc82f37b
YQ
68152012-08-23 Yao Qi <yao@codesourcery.com>
6816
6817 * server.h: Remove declaration of 'xsnprintf'.
6818
406b1477
KS
68192012-08-22 Keith Seitz <keiths@redhat.com>
6820
6821 * server.h: Include build-gnulib-gbserver/config.h.
6822 * gdbreplay.c: Likewise.
6823
e6712ff1
DE
68242012-08-08 Doug Evans <dje@google.com>
6825
6826 * Makefile.in (SFILES): Add gdb_vecs.c.
6827 (OBS): Add gdb_vecs.o.
6828 (gdb_vecs_h, host_defs_h): New variables.
6829 (thread-db.o): Add $(gdb_vecs_h) dependency.
6830 (gdb_vecs.o): New rule.
6831 * thread-db.c: #include "gdb_vecs.h".
6832 (thread_db_load_search): Use a vector to iterate over path elements.
6833 Handle text appearing after "$pdir".
6834
6835 * configure.ac: Add check for strstr.
6836 * config.in: Regenerate.
6837 * configure: Regenerate.
6838
7c3270ae
UW
68392012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6840
6841 * hostio.c (handle_pread): If pread fails, fall back to attempting
6842 lseek/read.
6843 (handle_pwrite): Likewise for pwrite.
6844
b62e2b27
UW
68452012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6846
6847 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6848 between unsupported TYPE and unimplementable ADDR/LEN combination.
6849 (arm_insert_point): Act on new return value.
6850
78a99e91
PA
68512012-07-31 Pedro Alves <palves@redhat.com>
6852
6853 * server.c (process_point_options): Only skip tokens if we find
6854 one that is unrecognized. Don't treat 'X' specially while
6855 skipping unrecognized tokens.
6856
fcf303ab
UW
68572012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6858
6859 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6860 to 4-byte-align HW breakpoint addresses for Thumb.
6861
7255706c
YQ
68622012-07-27 Yao Qi <yao@codesourcery.com>
6863
6864 PR remote/14161.
6865
6866 * server.h: Declare gdb_agent_about_to_close.
6867 * target.c (kill_inferior): Include "agent.h".
6868 New. Send command 'kill'.
6869 * target.h (kill_inferior): Removed macro.
6870 * tracepoint.c (gdb_agent_about_to_close): New.
6871 (gdb_agent_helper_thread): Handle command 'close'.
6872 Wait endlessly until the inferior stops.
6873 Install gdb_agent_remove_socket to atexit hook.
6874 (agent_socket_name): New static variable.
6875 (gdb_agent_socket_init): Replace local variable 'name' with
6876 'agent_socket_name'.
6877 (gdb_agent_remove_socket): New.
6878
5a3f286f
YQ
68792012-07-27 Yao Qi <yao@codesourcery.com>
6880
6881 * server.c (process_point_options): Stop at 'X' when parsing.
6882
961bd387
ME
68832012-07-19 Michael Eager <eager@eagercon.com>
6884
a261b8f5 6885 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6886 to hw_execute.
6887 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6888 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6889 hardware breakpoint.
6890
aa7c7447
JK
68912012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6892
6893 * gdbserver/linux-low.c (initialize_low): Call
6894 linux_ptrace_init_warnings.
6895
7f216e7c
DE
68962012-07-02 Doug Evans <dje@google.com>
6897
6898 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6899 pointer to int.
6900
d3ce09f5
SS
69012012-07-02 Stan Shebs <stan@codesourcery.com>
6902
6903 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6904 (ax.o): Add it to build rule.
6905 (ax-ipa.o): Ditto.
6906 (OBS): Add format.o.
6907 (IPA_OBS): Add format.o.
6908 * server.c (handle_query): Claim support for breakpoint commands.
6909 (process_point_options): Add command case.
6910 (process_serial_event): Leave running if there are printfs in
6911 effect.
6912 * mem-break.h (any_persistent_commands): Declare.
6913 (add_breakpoint_commands): Declare.
6914 (gdb_no_commands_at_breakpoint): Declare.
6915 (run_breakpoint_commands): Declare.
6916 * mem-break.c (struct point_command_list): New struct.
6917 (struct breakpoint): New field command_list.
6918 (any_persistent_commands): New function.
6919 (add_commands_to_breakpoint): New function.
6920 (add_breakpoint_commands): New function.
6921 (gdb_no_commands_at_breakpoint): New function.
6922 (run_breakpoint_commands): New function.
6923 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6924 locally.
6925 * ax.c: Include format.h.
6926 (ax_printf): New function.
6927 (gdb_eval_agent_expr): Add printf opcode.
6928
2f8f6aed
YQ
69292012-06-13 Yao Qi <yao@codesourcery.com>
6930
6931 * server.c (start_inferior): Remove duplicated writes to fields
6932 'last_resume_kind' and 'last_status' of 'current_inferior'.
6933
0c9070b3
YQ
69342012-06-12 Yao Qi <yao@codesourcery.com>
6935 Pedro Alves <palves@redhat.com>
6936
6937 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6938 comment.
6939 * server.c (handle_v_cont): Extend comment.
6940
c52daf70
YQ
69412012-06-11 Yao Qi <yao@codesourcery.com>
6942
6943 * linux-low.c (linux_attach): Add 'static'.
6944
d38bbb0a
YQ
69452012-06-06 Yao Qi <yao@codesourcery.com>
6946
6947 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6948
89dc0afd
JK
69492012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6950
6951 Fix gcc -flto compilation warning.
6952 * server.c (main): Make variable multi_mode and attach volatile.
6953
75f62ce7
TJB
69542012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6955
6956 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6957 if the platform doesn't know about it.
6958
65f479b6
PA
69592012-05-30 Jeff Kenton <jkenton@tilera.com>
6960
6961 * Makefile.in (SFILES): Add linux-tile-low.c.
6962 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6963 * configure.srv: Handle tilegx-*-linux*.
6964 * linux-tile-low.c: New file.
6965
0c5bf5a9
JK
69662012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6967
6968 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6969
a493e3e2
PA
69702012-05-24 Pedro Alves <palves@redhat.com>
6971
6972 PR gdb/7205
6973
43aaf8b6 6974 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6975
2ea28649
PA
69762012-05-24 Pedro Alves <palves@redhat.com>
6977
6978 PR gdb/7205
6979
6980 Replace target_signal with gdb_signal throughout.
6981
8d409d16
MR
69822012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6983
6984 * linux-low.c (linux_store_registers): Avoid the copying sequence
6985 when no data has been retrieved by ptrace.
6986
23512c01
MGD
69872012-05-22 Will Deacon <will.deacon@arm.com>
6988
6989 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6990 Include asm/ptrace.h.
6991 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6992 already defined.
6993
4934b29e
MR
69942012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6995
6996 * linux-low.c (linux_store_registers): Don't re-retrieve data
6997 with ptrace that has already been obtained from /proc. Always
6998 copy any data retrieved with ptrace to the buffer supplied.
6999
bde24c0a
PA
70002012-05-11 Yao Qi <yao@codesourcery.com>
7001 Pedro Alves <palves@redhat.com>
7002
7003 * linux-low.c (enum stopping_threads_kind): New.
7004 (stopping_threads): Change type to `enum stopping_threads_kind'.
7005 (handle_extended_wait): If stopping and suspending threads, leave
7006 the new_lwp suspended too.
7007 (linux_wait_for_event): Adjust.
7008 (stop_all_lwps): Set `stopping_threads' to
7009 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7010 whether we're suspending threads or just stopping them. Assert no
7011 recursion happens.
7012
623b6bdf
YQ
70132012-04-29 Yao Qi <yao@codesourcery.com>
7014
7015 * server.h: Move some code to ...
7016 * gdbthread.h: ... here. New.
7017 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7018 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7019 (nto-low.o, win32-low.o): Likewise.
7020 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7021 * regcache.c, remote-utils.c, server.c: Likewise.
7022 * target.c, tracepoint.c, win32-low.c: Likewise.
7023
f15f9948
TJB
70242012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7025
7026 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7027 (PTRACE_ARG4_TYPE): Likewise.
7028 (PTRACE_XFER_TYPE): Likewise.
7029 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7030 ptrace to PTRACE_ARG3_TYPE.
7031 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7032 (PTRACE_ARG4_TYPE): Likewise.
7033 (PTRACE_XFER_TYPE): Likewise.
7034 (linux_detach_one_lwp): Cast fourth argument of
7035 ptrace to long then PTRACE_ARG4_TYPE.
7036 (regsets_fetch_inferior_registers): Cast third argument of
7037 ptrace to long then PTRACE_ARG3_TYPE.
7038 (regsets_store_inferior_registers): Likewise.
7039
38ea300a
PA
70402012-04-20 Pedro Alves <palves@redhat.com>
7041
7042 * configure: Regenerate.
7043
c971b7fa
PA
70442012-04-19 Pedro Alves <palves@redhat.com>
7045
43aaf8b6 7046 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7047 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7048 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7049 (all, install-only, uninstall, clean-info, all-lib, clean): No
7050 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7051 (maintainer-clean realclean distclean): Use subdir_do.
7052 (subdir_do): New.
7053 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7054 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7055 * acinclude.m4: Include acx_configure_dir.m4.
7056 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7057 calls. Call AC_PROG_RANLIB. Configure gnulib using
7058 ACX_CONFIGURE_DIR.
7059 (GNULIB): New.
7060 (GNULIB_STDINT_H): Adjust.
7061 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7062 * gdbreplay.c: Include build-gnulib/config.h.
7063 * server.h: Likewise.
7064 * aclocal.m4: Regenerate.
7065 * config.in: Regenerate.
7066 * configure: Regenerate.
c971b7fa 7067
809277f8
PA
70682012-04-19 Pedro Alves <palves@redhat.com>
7069
7070 * Makefile.in (LIBGNU, INCGNU): Adjust.
7071 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7072 (all, install-only, uninstall, clean-info, all-lib, clean)
7073 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7074 * configure.ac: Adjust AC_OUTPUT output.
7075 * aclocal.m4: Regenerate.
7076 * configure: Regenerate.
7077
fd9bb8b8
PA
70782012-04-19 Pedro Alves <palves@redhat.com>
7079
7080 * Makefile.in (generated_files): New.
7081 (server_h): Remove the explicit dependency on config.h, and depend
7082 on $generated_files.
7083
1c298c66
PA
70842012-04-19 Pedro Alves <palves@redhat.com>
7085
7086 * Makefile.in (INCGNU): Add -Ignulib.
7087
57c4b50b
PA
70882012-04-19 Pedro Alves <palves@redhat.com>
7089
7090 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7091 (INCGNU): ... this, and spell out -I here.
7092 (GNULIB_LIB): Rename to ...
7093 (LIBGNU): ... this.
7094 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7095
1030e047
PA
70962012-04-19 Pedro Alves <palves@redhat.com>
7097
7098 * config.in: Regenerate.
7099
447d4319
PA
71002012-04-19 Pedro Alves <palves@redhat.com>
7101
7102 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7103 * server.h (memmem): Remove declaration.
7104 * config.in: Regenerate.
7105 * configure: Regenerate.
7106
aad9eab9
YQ
71072012-04-19 Yao Qi <yao@codesourcery.com>
7108
7109 * Makefile.in (SFILES): Add common/vec.c.
7110 (OBS): Add vec.o.
7111 (vec.o): New rule.
7112
3e10640f
YQ
71132012-04-19 Yao Qi <yao@codesourcery.com>
7114
7115 * remote-utils.c (prepare_resume_reply): Replace with macro
7116 target_core_of_thread.
7117 * server.c (handle_qxfer_threads_proper): Likewise.
7118 * target.h (traget_core_of_thread): New macro.
7119
71622373
PA
71202012-04-18 Pedro Alves <palves@redhat.com>
7121
7122 * aclocal.m4: Regenerate.
7123 * configure: Regenerate.
7124
80d26939
YQ
71252012-04-16 Yao Qi <yao@codesourcery.com>
7126
7127 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7128 duplicated on address.
7129
42476b70
YQ
71302012-04-16 Yao Qi <yao@codesourcery.com>
7131
7132 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7133 (struct tracepoint_action_ops) <send>: New field.
7134 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7135 (agent_expr_send, x_tracepoint_action_send): New.
7136 (l_tracepoint_action_send): New.
7137 (cmd_qtdp): Download and install tracepoint
7138 according to `use_agent'.
7139 (run_inferior_command): Add one more parameter `len'.
7140 Update callers.
7141 (tracepoint_send_agent): New.
7142 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7143
7bc83639
YQ
71442012-04-16 Yao Qi <yao@codesourcery.com>
7145
7146 * tracepoint.c (download_tracepoints): Moved to ...
7147 (cmd_qtstart): ... here.
7148
5f18041e
YQ
71492012-04-14 Yao Qi <yao@codesourcery.com>
7150
7151 * tracepoint.c: Include inttypes.h.
7152 (struct collect_memory_action): Use sized types.
7153 (struct tracepoint): Likewise.
7154 (cmd_qtdp, stop_tracing): Update print specifiers.
7155 (cmd_qtp, response_tracepoint): Likewise.
7156 (collect_data_at_tracepoint): Likewise.
7157 (collect_data_at_step): Likewise.
7158
55a8c076
YQ
71592012-04-14 Yao Qi <yao@codesourcery.com>
7160
7161 Import gnulib module inttypes.
7162 * aclocal.m4, config.in, configure: Regenerated.
7163
dc750257
YQ
71642012-04-14 Yao Qi <yao@codesourcery.com>
7165
7166 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7167 Makefile and config.status at last.
7168
0ab5faf9
YQ
71692012-04-13 Yao Qi <yao@codesourcery.com>
7170
7171 * tracepoint.c: Include stdint.h unconditionally.
7172
18f5fd81
TJB
71732012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7174
7175 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7176 on BFD_HAVE_SYS_PROCFS_TYPE.
7177 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7178 * configure: Regenerate.
7179 * config.in: Likewise.
7180
4d47af5c
L
71812012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7182
7183 * Makefile.in (clean): Also remove x32.c x32-linux.c
7184 x32-avx.c x32-avx-linux.c.
7185 (x32.o): New target.
7186 (x32.c): Likewise.
7187 (x32-linux.o): Likewise.
7188 (x32-linux.c): Likewise.
7189 (x32-avx.o): Likewise.
7190 (x32-avx.c): Likewise.
7191 (x32-avx-linux.o): Likewise.
7192 (x32-avx-linux.c): Likewise.
7193
7194 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7195 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7196 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7197 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7198 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7199 i386/x32-avx-linux.xml.
7200
7201 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7202 (init_registers_x32_avx_linux): Likwise.
7203 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7204 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7205
ecedbe58
PA
72062012-04-13 Pedro Alves <palves@redhat.com>
7207
7208 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7209 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7210 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7211 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7212 the sub-make.
7213
c92b5177
L
72142012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7215
7216 * linux-x86-low.c (compat_x32_clock_t): New.
7217 (compat_x32_siginfo_t): Likewise.
7218 (compat_x32_siginfo_from_siginfo): Likewise.
7219 (siginfo_from_compat_x32_siginfo): Likewise.
7220 (linux_is_elf64): Likewise.
7221 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7222 and siginfo_from_compat_x32_siginfo for x32.
7223 (x86_arch_setup): Set linux_is_elf64.
7224
214d508e
L
72252012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7226
7227 PR gdb/13969
7228 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7229 e_machine field.
7230 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7231 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7232 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7233 compatible with process.
7234
c9a1864a
YQ
72352012-04-12 Yao Qi <yao@codesourcery.com>
7236
7237 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7238 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7239 (install-only, install-info, clean): Handle sub dir gnulib.
7240 (all-lib, am--refresh): New targets.
7241 (memmem.o): Remove target.
7242 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7243 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7244 (AC_REPLACE_FUNCS): Remove memmem.
7245 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7246 (AC_OUTPUT): Generate Makefile in gnulib/.
7247 * aclocal.m4, config.in, configure: Regenerated.
7248
367ba2c2
MR
72492012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7250
7251 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7252
9d236627
PA
72532012-04-05 Pedro Alves <palves@redhat.com>
7254
7255 -Werror=strict-aliasing
7256
7257 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7258 pointer.
7259
111217b3
PA
72602012-04-04 Pedro Alves <palves@redhat.com>
7261
7262 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7263 (sparc_store_gregset_from_stack, sparc_store_gregset)
7264 (sparc_breakpoint_at): Fix formatting.
7265
8365dcf5
TJB
72662012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7267
7268 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7269 are available.
7270 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7271 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7272 * config.in: Regenerate.
7273 * configure: Likewise.
7274
689cc2ae
PA
72752012-03-29 Pedro Alves <palves@redhat.com>
7276
7277 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7278 Correct ptrace arguments.
7279
c14dfd32
PA
72802012-03-28 Pedro Alves <palves@redhat.com>
7281
7282 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7283 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7284 (IA64_FR1_REGNUM): New defines.
7285 (ia64_fetch_register): New.
7286 (the_low_target): Install it.
7287 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7288 field.
7289 * linux-low.c (linux_fetch_registers): Try the
7290 the_low_target.fetch_register hook first.
7291
7292 * linux-arm-low.c (the_low_target): Adjust.
7293 * linux-bfin-low.c (the_low_target): Adjust.
7294 * linux-cris-low.c (the_low_target): Adjust.
7295 * linux-crisv32-low.c (the_low_target): Adjust.
7296 * linux-m32r-low.c (the_low_target): Adjust.
7297 * linux-m68k-low.c (the_low_target): Adjust.
7298 * linux-mips-low.c (the_low_target): Adjust.
7299 * linux-ppc-low.c (the_low_target): Adjust.
7300 * linux-s390-low.c (the_low_target): Adjust.
7301 * linux-sh-low.c (the_low_target): Adjust.
7302 * linux-sparc-low.c (the_low_target): Adjust.
7303 * linux-tic6x-low.c (the_low_target): Adjust.
7304 * linux-x86-low.c (the_low_target): Adjust.
7305 * linux-xtensa-low.c (the_low_target): Adjust.
7306
63c88e13
PA
73072012-03-26 Pedro Alves <palves@redhat.com>
7308
7309 * server.c (handle_qxfer_libraries): Don't bail early if
7310 the_target->qxfer_libraries_svr4 is not NULL.
7311
fb723180
PA
73122012-03-26 Pedro Alves <palves@redhat.com>
7313
7314 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7315
0afae3cf
PA
73162012-03-23 Pedro Alves <palves@redhat.com>
7317
7318 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7319 "library-list-svr4" element's start tag when the the DSO list is
7320 empty.
7321
485f1ee4
PA
73222012-03-23 Pedro Alves <palves@redhat.com>
7323
7324 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7325 a variable whose type size is the same as the inferior's pointer
7326 size.
7327
a5362b9a
TS
73282012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7329
7330 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7331 struct siginfo.
7332 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7333 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7334 * linux-low.h: Include <signal.h>.
7335 (struct siginfo): Remove forward declaration.
7336 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7337 struct siginfo.
7338
d226c142
MF
73392012-03-21 Mike Frysinger <vapier@gentoo.org>
7340
7341 * .gitignore: Ignore more files.
7342
122f36ef
PA
73432012-03-19 Pedro Alves <palves@redhat.com>
7344 Jan Kratochvil <jan.kratochvil@redhat.com>
7345
7346 * server.c (cont_thread, general_thread): Add describing comments.
7347 (start_inferior): Clear `cont_thread'.
7348 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7349 of a process.
7350
fc3e5175
YQ
73512012-03-15 Yao Qi <yao@codesourcery.com>
7352
7353 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7354 handling to ...
7355 (cmd_qtdp): ... here.
7356
8d0d92cd
YQ
73572012-03-15 Yao Qi <yao@codesourcery.com>
7358
7359 * tracepoint.c (struct tracepoint_action_ops): New.
7360 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7361 (m_tracepoint_action_download): New.
7362 (r_tracepoint_action_download): New.
7363 (x_tracepoint_action_download): New.
7364 (l_tracepoint_action_download): New.
7365 (add_tracepoint_action): Install `action->ops' according type.
7366 (download_tracepoint_1): Move code `download' function pointer
7367 of various tracepoint_action_ops.
7368
87b0bb13
JK
73692012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7370
7371 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7372 linux_ptrace_attach_warnings.
7373
5f572dec
JK
73742012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7375
7376 * Makefile.in (linux-ptrace.o): New.
7377 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7378 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7379 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7380 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7381 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7382 of these targets.
7383 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7384
f4647387
YQ
73852012-03-08 Yao Qi <yao@codesourcery.com>
7386 Pedro Alves <palves@redhat.com>
7387
7388 Fix PR server/13392.
7389 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7390 offset of JMP insn.
7391 * tracepoint.c (remove_tracepoint): New.
7392 (cmd_qtdp): Call remove_tracepoint when failed to install.
7393
9b224c5e
PA
73942012-03-07 Pedro Alves <palves@redhat.com>
7395
7396 * linux-low.c (get_detach_signal): New.
7397 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7398 Pass on pending signals to PTRACE_DETACH. Check the result of the
7399 ptrace call.
7400 * server.c (program_signals, program_signals_p): New.
7401 (handle_general_set): Handle QProgramSignals.
7402 * server.h (program_signals, program_signals_p): Declare.
7403
e237a7e2
JK
74042012-03-05 Pedro Alves <palves@redhat.com>
7405 Jan Kratochvil <jan.kratochvil@redhat.com>
7406
7407 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7408 New comment why.
7409
5808517f
YQ
74102012-03-03 Yao Qi <yao@codesourcery.com>
7411
7412 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7413 agent_look_up_symbols.
7414
58b4daa5
YQ
74152012-03-03 Yao Qi <yao@codesourcery.com>
7416
7417 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7418 (linux-x86-low.o): Likewise.
7419 * server.h: Remove in_process_agent_loaded.
7420 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7421 common/agent.c.
7422 Update callers.
7423
8ffcbaaf
YQ
74242012-03-03 Yao Qi <yao@codesourcery.com>
7425
7426 * tracepoint.c (gdb_agent_capability): New global.
7427 (in_process_agent_loaded_ust): Renamed to
7428 `in_process_agent_supports_ust'.
7429 Update callers.
7430 (in_process_agent_supports_ust): Call agent_capability_check.
7431 (clear_installed_tracepoints): Assert that agent supports
7432 agent.
7433
d1feda86
YQ
74342012-03-03 Yao Qi <yao@codesourcery.com>
7435
7436 * linux-low.c (linux_supports_agent): New.
7437 (linux_target_ops): Initialize field `supports_agent' with
7438 linux_supports_agent.
7439 * target.h (struct target_ops) <supports_agent>: New.
7440 (target_supports_agent): New macro.
7441 * server.c (handle_general_set): Handle packet 'QAgent'.
7442 (handle_query): Send `QAgent+'.
7443 * Makefile.in (server.o): Depends on agent.h.
7444
2fa291ac
YQ
74452012-03-03 Yao Qi <yao@codesourcery.com>
7446
7447 * Makefile.in (OBS): Add agent.o.
7448 Add new rule for agent.o.
7449 Track dependence of tracepoint.c on agent.h.
7450 * tracepoint.c (run_inferior_command_1):
7451 (run_inferior_command): Call agent_run_command.
7452 (gdb_ust_connect_sync_socket): Deleted. Move it to
7453 common/agent.c.
7454 (resume_thread, stop_thread): Likewise.
7455 (gdb_ust_socket_init): Renamed to ...
7456 (gdb_agent_socket_init): ... New.
7457 (gdb_ust_thread): Renamed to ...
7458 (gdb_agent_helper_thread): ... New.
7459 (gdb_ust_init): Move some code to ...
7460 (gdb_agent_init): ... here. New.
7461 [HAVE_UST]: Call gdb_ust_init.
7462 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7463 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7464 * config.in, configure: Regenerated.
7465
05044653
PA
74662012-03-02 Pedro Alves <palves@redhat.com>
7467
7468 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7469 * linux-low.c (struct simple_pid_list): New.
7470 (stopped_pids): New a struct simple_pid_list pointer.
7471 (add_to_pid_list, pull_pid_from_list): New.
7472 (handle_extended_wait): Don't assume the first signal new children
7473 report is SIGSTOP. Adjust call to pull_pid_from_list.
7474 (linux_wait_for_lwp): Adjust.
7475
8d00225b
YQ
74762012-03-02 Yao Qi <yao@codesourcery.com>
7477
7478 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7479 debug log.
7480
19560ba5
YQ
74812012-03-02 Yao Qi <yao@codesourcery.com>
7482
7483 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7484 `stop_pc' and `tpoint'. Update caller.
7485
1faeff08
MR
74862012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7487
7488 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7489 * linux-low.c (use_linux_regsets): New macro.
7490 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7491 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7492 (linux_register_in_regsets): New function.
7493 (usr_fetch_inferior_registers): Skip registers covered by
7494 regsets.
7495 (usr_store_inferior_registers): Likewise.
7496 (usr_fetch_inferior_registers): New macro.
7497 (usr_store_inferior_registers): Likewise.
7498 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7499 (linux_store_registers): Likewise.
7500 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7501 prototype.
7502 (init_registers_mips64_dsp_linux): Likewise.
7503 (init_registers_mips_linux): New macro.
7504 (init_registers_mips_dsp_linux): Likewise.
7505 (mips_dsp_num_regs): Likewise.
7506 (DSP_BASE, DSP_CONTROL): New fallback macros.
7507 (mips_base_regs): New macro.
7508 (mips_regmap): Use it. Fix the size.
7509 (mips_dsp_regmap): New variable.
7510 (mips_dsp_regset_bitmap): Likewise.
7511 (mips_arch_setup): New function.
7512 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7513 than mips_regmap.
7514 (mips_cannot_store_register): Likewise.
7515 (the_low_target): Update .arch_setup, .num_regs and .regmap
7516 initializers. Add .regset_bitmap initializer.
7517 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7518 initializer.
7519 * linux-bfin-low.c (the_low_target): Likewise.
7520 * linux-cris-low.c (the_low_target): Likewise.
7521 * linux-crisv32-low.c (the_low_target): Likewise.
7522 * linux-ia64-low.c (the_low_target): Likewise.
7523 * linux-m32r-low.c (the_low_target): Likewise.
7524 * linux-m68k-low.c (the_low_target): Likewise.
7525 * linux-ppc-low.c (the_low_target): Likewise.
7526 * linux-s390-low.c (the_low_target): Likewise.
7527 * linux-sh-low.c (the_low_target): Likewise.
7528 * linux-sparc-low.c (the_low_target): Likewise.
7529 * linux-tic6x-low.c (the_low_target): Likewise.
7530 * linux-x86-low.c (the_low_target): Likewise.
7531 * linux-xtensa-low.c (the_low_target): Likewise.
7532 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7533 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7534 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7535 srv_xmlfiles.
7536 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7537 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7538
c03e6ccc
YQ
75392012-02-29 Yao Qi <yao@codesourcery.com>
7540 Pedro Alves <palves@redhat.com>
7541
7542 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7543 `step_over_finished' is true.
7544
644cebc9
PA
75452012-02-27 Pedro Alves <palves@redhat.com>
7546
7547 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7548 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7549
c14d7ab2
PA
75502012-02-27 Pedro Alves <palves@redhat.com>
7551
7552 PR server/9684
7553 * linux-low.c (pid_is_stopped): New.
7554 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7555
412c89dd
LM
75562012-02-25 Luis Machado <lgustavo@codesourcery.com>
7557
7558 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7559 of conditions.
7560
b745defe
MR
75612012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7562
7563 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7564
9f3a5c85
LM
75652012-02-24 Luis Machado <lgustavo@codesourcery>
7566
7567 * server.c (handle_query): Advertise support for target-side
7568 breakpoint condition evaluation.
7569 (process_point_options): New function.
7570 (process_serial_event): When inserting a breakpoint, check for
7571 a target-side condition that should be evaluated.
7572
7573 * mem-break.c: Include regcache.h and ax.h.
7574 (point_cond_list_t): New data structure.
7575 (breakpoint) <cond_list>: New field.
7576 (find_gdb_breakpoint_at): Make non-static.
7577 (delete_gdb_breakpoint_at): Clear any target-side
7578 conditions.
7579 (clear_gdb_breakpoint_conditions): New function.
7580 (add_condition_to_breakpoint): Likewise.
7581 (add_breakpoint_condition): Likewise.
7582 (gdb_condition_true_at_breakpoint): Likewise.
7583 (gdb_breakpoint_here): Return result directly instead
7584 of going through a local variable.
7585
7586 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7587 (clear_gdb_breakpoint_conditions): Likewise.
7588 (add_breakpoint_condition): Likewise.
7589 (gdb_condition_true_at_breakpoint): Likewise.
7590
7591 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7592 (need_step_over_p): Take target-side breakpoint condition into
7593 consideration.
7594
5e1dc496
LM
75952012-02-24 Luis Machado <lgustavo@codesourcery>
7596
7597 * server.h: Include tracepoint.h.
7598 (agent_mem_read, agent_get_trace_state_variable_value,
7599 agent_set_trace_state_variable_value,
7600 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7601 get_set_tsv_func_addr): New prototypes.
7602
7603 * ax.h: New include file.
7604 * ax.c: New source file.
7605
7606 * tracepoint.c: Include ax.h.
7607 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7608 agent_expr, eval_result_type): Move to ax.h.
7609 (parse_agent_expr): Rename to ...
7610 (gdb_parse_agent_expr): ... this, make it non-static and move
7611 to ax.h.
7612 (unparse_agent_expr) Rename to ...
7613 (gdb_unparse_agent_expr): ... this, make it non-static and move
7614 to ax.h.
7615 (eval_agent_expr): Rename to ...
7616 (eval_tracepoint_agent_expr): ... this.
7617 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7618 forward declarations.
7619 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7620 (agent_get_trace_state_variable_value): New function.
7621 (agent_set_trace_state_variable_value): New function.
7622 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7623 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7624 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7625 (condition_true_at_tracepoint): Likewise.
7626 (parse_agent_expr): Rename to ...
7627 (gdb_parse_agent_expr): ... this and move to ax.c.
7628 (unparse_agent_expr): Rename to ...
7629 (gdb_unparse_agent_expr): ... this and move to ax.c.
7630 (gdb_agent_op_name): Move to ax.c.
7631 (eval_agent_expr): Rename to ...
7632 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7633 and move to ax.c.
7634 (eval_tracepoint_agent_expr): New function.
7635 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 7636 non-static.
5e1dc496
LM
7637 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7638 ax.c.
7639 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7640 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7641 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7642 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7643 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7644 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7645 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7646 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7647 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7648 (compile_bytecodes): Remove forward declaration.
7649 (is_goto_target): Move to ax.c.
7650 (compile_bytecodes): Move to ax.c and call
7651 agent_get_trace_state_variable_value (...) and
7652 agent_set_trace_state_variable_value (...).
7653
7654 * Makefile.in: Update ax.c and IPA dependencies.
7655
277e4e52
PA
76562012-02-24 Pedro Alves <palves@redhat.com>
7657
7658 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7659 (cmd_bigqtbuffer_circular): ... this. Only handle
7660 'QTBuffer:circular:'.
7661 (handle_tracepoint_general_set): Adjust.
7662
bf4c19f7
YQ
76632012-02-16 Yao Qi <yao@codesourcery.com>
7664
7665 * inferiors.c: Move code to ...
7666 * dll.c: .... here. New.
7667 * server.h: Declare clear_dlls.
7668 * Makefile.in (SFILES): Add dll.c.
7669 (OBS): Add dll.o
7670 (dll.o): New rule.
7671
d73f2619
YQ
76722012-02-11 Yao Qi <yao@codesourcery.com>
7673
7674 * server.c: (handle_monitor_command): Add a new parameter
7675 `own_buf'.
7676 (handle_query): Update caller.
7677
f8255c2a
JB
76782012-02-09 Joel Brobecker <brobecker@adacore.com>
7679
7680 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7681 * configure, config.in: Regenerate.
7682 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7683 is not defined.
7684
da84f473
PA
76852012-02-02 Pedro Alves <palves@redhat.com>
7686
7687 Try SIGKILL first, then PTRACE_KILL.
7688 * linux-low.c (linux_kill_one_lwp): New.
7689 (linux_kill_one_lwp): Rename to ...
7690 (kill_one_lwp_callback): ... this. Use the new
7691 linux_kill_one_lwp.
7692
e886a173
PA
76932012-02-02 Pedro Alves <palves@redhat.com>
7694
7695 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7696 inferior.
7697
be07f1a2
PA
76982012-01-27 Pedro Alves <palves@redhat.com>
7699
7700 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7701 (elf_64_file_p): Make static.
7702 (linux_pid_exe_is_elf_64_file): New.
7703 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7704 Delete declarations.
7705 (linux_pid_exe_is_elf_64_file): Declare.
7706 * linux-x86-low.c (x86_arch_setup): Use
7707 linux_pid_exe_is_elf_64_file.
7708
d8301ad1
JK
77092012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7710
7711 * linux-low.c (linux_wait_for_event_1): Rename to ...
7712 (linux_wait_for_event): ... here and merge it with former
7713 linux_wait_for_event - new variable wait_ptid, use it.
7714 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7715
01b17894
PA
77162012-01-23 Pedro Alves <palves@redhat.com>
7717
7718 * server.c (main): Avoid yet another case of infinite loop while
7719 detaching/killing after a longjmp.
7720
e825046f
JK
77212012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7722
7723 Code cleanup.
7724 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7725
b9e7b9c3
UW
77262012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7727
7728 * hostio.c (handle_readlink): New function.
7729 (handle_vFile): Call it to handle "vFile:readlink" packets.
7730
901f9912
UW
77312012-01-20 Pedro Alves <palves@redhat.com>
7732 Ulrich Weigand <ulrich.weigand@linaro.org>
7733
7734 * server.c (handle_v_requests): Only support vAttach and vRun to
7735 start multiple processes when in extended protocol mode.
7736
fc1ab1a0
PA
77372012-01-17 Pedro Alves <palves@redhat.com>
7738
7739 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7740 memalign plus mprotect to allocate the scratch buffer.
7741
7d5d4e98
PA
77422012-01-13 Pedro Alves <palves@redhat.com>
7743
7744 * server.c (attach_inferior): Clear `cont_thread'.
7745
f128d5e9
PA
77462012-01-13 Pedro Alves <palves@redhat.com>
7747
7748 * server.c (main): Avoid infinite loop while detaching/killing
7749 after a longjmp.
7750
06db92f0
DE
77512012-01-09 Doug Evans <dje@google.com>
7752
7753 * server.c (start_inferior): Set last_ptid in --wrapper case.
7754
32d92999
YQ
77552012-01-06 Yao Qi <yao@codesourcery.com>
7756
7757 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7758 defined.
7759 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7760
5e0a92a9
YQ
77612012-01-04 Yao Qi <yao@codesourcery.com>
7762
7763 * tracepoint.c (cmd_qtdp): Print debug message
7764 for static tracepoint.
7765
ae639e8c
YQ
77662012-01-04 Yao Qi <yao@codesourcery.com>
7767
7768 * tracepoint.c (trace_vdebug): Differentiate debug message
7769 between gdbserver and IPA.
7770
f72429c5
YQ
77712012-01-03 Yao Qi <yao@codesourcery.com>
7772
7773 * tracepoint.c (tracepoint_was_hit): Don't collect for
7774 static tracepoint.
7775
12c3e59c
JB
77762012-01-02 Joel Brobecker <brobecker@adacore.com>
7777
7778 * terminal.h: Reformat copyright header.
7779
67827812
JB
77802012-01-02 Joel Brobecker <brobecker@adacore.com>
7781
7782 * server.c (gdbserver_version): Update copyright year.
7783 * gdbreplay.c (gdbreplay_version): Likewise.
7784
3e52c33d
JK
77852011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7786
7787 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7788
7789 Revert:
7790 2011-12-18 Hui Zhu <teawater@gmail.com>
7791 * linux-low.c (linux_create_inferior): Save return value to ret.
7792
66f1260e
HZ
77932011-12-18 Hui Zhu <teawater@gmail.com>
7794
7795 * linux-low.c (linux_create_inferior): Save return value to ret.
7796
e77616d7
DE
77972011-12-16 Doug Evans <dje@google.com>
7798
e7b06c57
DE
7799 * linux-low.c (linux_create_inferior): If stdio connection,
7800 redirect stdin from /dev/null, stdout to stderr.
7801 * remote-utils.c (remote_is_stdio): New static global.
7802 (remote_connection_is_stdio): New function.
7803 (remote_prepare): Handle stdio connection.
7804 (remote_open): Ditto.
7805 (remote_close): Don't close stdin for stdio connections.
7806 (read_prim,write_prim): New functions. Replace all calls to
7807 read/write to these.
7808 * server.c (main): Watch for "-" argument. Move call to
7809 remote_prepare before start_inferior.
7810 * server.h (STDIO_CONNECTION_NAME): New macro.
7811 (remote_connection_is_stdio): Declare.
7812
e77616d7
DE
7813 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7814 in debugging output.
7815
82067193
YQ
78162011-12-15 Yao Qi <yao@codesourcery.com>
7817
7818 * tracepoint.c: Include sys/syscall.h.
7819 (gdb_ust_thread): Remove preprocessor conditional.
7820
82bfbe7e
PA
78212011-12-14 Pedro Alves <pedro@codesourcery.com>
7822
7823 * linux-low.c (linux_detach_one_lwp): Call
7824 the_low_target.prepare_to_resume before detaching.
7825
712c6575
YQ
78262011-12-14 Yao Qi <yao@codesourcery.com>
7827
7828 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7829 of write.
7830
d54d1edf
YQ
78312011-12-14 Yao Qi <yao@codesourcery.com>
7832
7833 * i386-low.c (i386_low_stopped_data_address): Initialize local
7834 variable `control'.
7835
6210a125
PA
78362011-12-13 Pedro Alves <pedro@codesourcery.com>
7837
7838 PR remote/13492
7839
7840 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7841 DR_CONTROL unless necessary. Extend comments.
7842 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7843 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7844
2ece8244
YQ
78452011-12-13 Yao Qi <yao@codesourcery.com>
7846
7847 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7848 macros.
7849 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7850
784867a5
JK
78512011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7852
7853 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7854 Print new debug message for such case.
7855
6bf36717
JK
78562011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7857
7858 Fix overlapping memcpy.
7859 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7860 the read_inferior_memory transfer.
7861 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7862 write_inferior_memory transfer.
7863 (set_fast_tracepoint_jump): New variable buf. Use it for the
7864 read_inferior_memory and write_inferior_memory transfers.
7865 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7866 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7867 Use it for the write_inferior_memory transfer.
7868 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7869 buffers.
7870
50275556
MR
78712011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7872
7873 * linux-low.c (fetch_register, store_register): Make code
7874 consistent, fix formatting.
7875
7325beb4
MR
78762011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7877
7878 * linux-low.c (usr_store_inferior_registers): Factor out code
7879 to handle individual registers into...
7880 (store_register): ... this new function.
7881
c642a434
UW
78822011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7883
7884 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7885 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7886 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7887 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7888 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7889 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7890 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7891 (srv_xmlfiles): Add new XML files.
7892
7893 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7894 and <sys/uio.h>.
7895 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7896 (init_registers_s390_linux32v1): Add prototype.
7897 (init_registers_s390_linux32v2): Likewise.
7898 (init_registers_s390_linux64v1): Likewise.
7899 (init_registers_s390_linux64v2): Likewise.
7900 (init_registers_s390x_linux64v1): Likewise.
7901 (init_registers_s390x_linux64v2): Likewise.
7902 (s390_num_regs): Increment to 52.
7903 (s390_regmap): Add orig_r2 register.
7904 (s390_num_regs_3264): Increment to 68.
7905 (s390_regmap_3264): Add orig_r2 register.
7906 (s390_collect_ptrace_register): Handle orig_r2 register.
7907 (s390_supply_ptrace_register): Likewise.
7908 (s390_fill_last_break): New function.
7909 (s390_store_last_break): Likewise.
7910 (s390_fill_system_call): New function.
7911 (s390_store_system_call): Likewise.
7912 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7913 register sets.
7914 (s390_check_regset): New function.
7915 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7916 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7917 Update target_regsets for available register sets.
7918
2268b414
JK
79192011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7920 Jan Kratochvil <jan.kratochvil@redhat.com>
7921
7922 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7923 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7924 New.
7925 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7926 * linux-low.h (struct process_info_private): New member r_debug.
7927 * server.c (handle_qxfer_libraries): Call
7928 the_target->qxfer_libraries_svr4.
7929 (handle_qxfer_libraries_svr4): New function.
7930 (qxfer_packets): New entry "libraries-svr4".
7931 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7932 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7933 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7934 PACKET_qXfer_libraries_svr4.
7935
d6db1fab
UW
79362011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7937
7938 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7939 PSW address/mask between 8-byte and 16-byte formats.
7940 (s390_supply_ptrace_register): Likewise.
7941 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7942 basic addressing mode bit.
7943
242f5f1c
SS
79442011-11-24 Stan Shebs <stan@codesourcery.com>
7945
7946 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7947
f196051f
SS
79482011-11-17 Stan Shebs <stan@codesourcery.com>
7949
7950 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7951 (tracing_start_time): New global.
7952 (tracing_stop_time): New global.
7953 (tracing_user_name): New global.
7954 (tracing_notes): New global.
7955 (tracing_stop_note): New global.
7956 (cmd_qtstart): Set traceframe_usage, start_time.
7957 (stop_tracing): Set stop_time.
7958 (cmd_qtstatus): Report additional status.
7959 (cmd_qtp): New function.
7960 (handle_tracepoint_query): Call it.
7961 (cmd_qtnotes): New function.
7962 (handle_tracepoint_general_set): Call it.
7963 (get_timestamp): Rename from tsv_get_timestamp.
7964
405f8e94
SS
79652011-11-14 Stan Shebs <stan@codesourcery.com>
7966 Kwok Cheung Yeung <kcy@codesourcery.com>
7967
7968 * linux-x86-low.c (small_jump_insn): New.
7969 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7970 trampoline and error message, build a trampoline and issue a small
7971 jump instruction to it.
7972 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7973 trampoline and error message.
7974 (x86_get_min_fast_tracepoint_insn_len): New.
7975 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7976 * linux-low.h (struct linux_target_ops): Add arguments to
7977 install_fast_tracepoint_jump_pad operation, add new operation.
7978 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7979 arguments.
7980 (linux_get_min_fast_tracepoint_insn_len): New function.
7981 (linux_target_op): Add new operation.
7982 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7983 (gdb_trampoline_buffer_end): Ditto.
7984 (gdb_trampoline_buffer_error): Ditto.
7985 (struct ipa_sym_addresses): Add fields for new IPA variables.
7986 (symbol_list): Add entries for new IPA variables.
7987 (struct tracepoint): Add fields to hold the address range of the
7988 trampoline used by the tracepoint.
7989 (trampoline_buffer_head): New static variable.
7990 (trampoline_buffer_tail): Ditto.
7991 (claim_trampoline_space): New function.
7992 (have_fast_tracepoint_trampoline_buffer): New function.
7993 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7994 structure.
7995 (install_fast_tracepoint): Ditto, also add error buffer argument.
7996 (cmd_qtminftpilen): New function.
7997 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7998 (fast_tracepoint_from_trampoline_address): New function.
7999 (fast_tracepoint_collecting): Handle trampoline as part of jump
8000 pad space.
8001 (set_trampoline_buffer_space): New function.
8002 (initialize_tracepoint): Initialize new IPA variables.
8003 * target.h (struct target_ops): Add arguments to
8004 install_fast_tracepoint_jump_pad operation, add new
8005 get_min_fast_tracepoint_insn_len operation.
8006 (target_get_min_fast_tracepoint_insn_len): New.
8007 (install_fast_tracepoint_jump_pad): Add arguments.
8008 * server.h (IPA_BUFSIZ): Define.
8009 * linux-i386-ipa.c: Include extra header files.
8010 (initialize_fast_tracepoint_trampoline_buffer): New function.
8011 (initialize_low_tracepoint): Call it.
8012 * server.h (set_trampoline_buffer_space): Declare.
8013 (claim_trampoline_space): Ditto.
8014 (have_fast_tracepoint_trampoline_buffer): Ditto.
8015
1e4d1764
YQ
80162011-11-14 Yao Qi <yao@codesourcery.com>
8017
8018 * server.c (handle_query): Handle InstallInTrace for qSupported.
8019 * tracepoint.c (add_tracepoint): Sort list.
8020 (install_tracepoint, download_tracepoint): New.
8021 (cmd_qtdp): Call them to install and download tracepoints.
8022 (sort_tracepoints): Removed.
8023 (cmd_qtstart): Update.
8024
5c73ff4e
YQ
80252011-11-14 Yao Qi <yao@codesourcery.com>
8026
8027 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8028 * mem-break.h: Declare.
8029 * tracepoint.c (cmd_qtstart): Move some code to ...
8030 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8031 New.
8032 (download_tracepoints): Move some code to ...
8033 (download_tracepoint_1): ... here. New.
8034
86a30030
YQ
80352011-11-08 Yao Qi <yao@codesourcery.com>
8036
8037 * remote-utils.c (relocate_instruction): A comment fix.
8038
8d26e50c
JB
80392011-11-07 Joel Brobecker <brobecker@adacore.com>
8040
8041 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8042 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8043 dr_status_mirror and dr_control_mirror from debug_reg_state.
8044 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8045 (i386_initial_stuff): Remove use of deleted globals.
8046 (i386_get_thread_context, i386_set_thread_context,
8047 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8048 from debug_reg_state.
8049
a59306a3
YQ
80502011-11-05 Yao Qi <yao@codesourcery.com>
8051
8052 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8053 address as TPOINT's.
8054
3065dfb6
SS
80552011-11-02 Stan Shebs <stan@codesourcery.com>
8056
8057 * tracepoint.c (agent_mem_read_string): New function.
8058 (eval_agent_expr): Call it for tracenz.
8059 * server.c (handle_query): Report support for tracenz.
8060
fd0d8c7c
YQ
80612011-11-02 Yao Qi <yao@codesourcery.com>
8062
8063 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8064
609086b1
YQ
80652011-11-02 Yao Qi <yao@codesourcery.com>
8066
8067 * target.h: Fix a typo in comment.
8068
b9fd1791
PA
80692011-10-31 Pedro Alves <pedro@codesourcery.com>
8070
8071 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8072 clobber the breakpoints' shadows with fast tracepoint jumps.
8073 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8074 * target.c (write_inferior_memory): Also pass MYADDR down to
8075 check_mem_write.
8076
03583c20
UW
80772011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8078
8079 * configure.ac: Check support for personality routine.
8080 * configure: Regenerate.
8081 * config.in: Likewise.
8082 * linux-low.c: Include <sys/personality.h>.
8083 Define ADDR_NO_RANDOMIZE if necessary.
8084 (linux_create_inferior): Disable address space randomization when
8085 forking inferior, if requested.
8086 (linux_supports_disable_randomization): New function.
8087 (linux_target_ops): Install it.
8088 * server.h (disable_randomization): Declare.
8089 * server.c (disable_randomization): New global variable.
8090 (handle_general_set): Handle QDisableRandomization.
8091 (handle_query): Likewise for qSupported.
8092 (main): Support --disable-randomization and --no-disable-randomization
8093 command line arguments.
8094 * target.h (struct target_ops): Add supports_disable_randomization.
8095 (target_supports_disable_randomization): New macro.
8096
723b724b
MF
80972011-09-29 Mike Frysinger <vapier@gentoo.org>
8098
8099 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8100 ifdef check.
8101 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8102 [!PT_GETDSBT] (target_loadmap): New definition.
8103 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8104 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8105 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8106 and PT_GETDSBT to LINUX_LOADMAP.
8107 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8108 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8109
55329a5c 81102011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8111
8112 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8113 (arm_linux_hwbp_cap): New static variable.
8114 (arm_linux_get_hwbp_cap): Replace by ...
8115 (arm_linux_init_hwbp_cap): ... this new function.
8116 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8117 (arm_linux_get_hw_watchpoint_count): Likewise.
8118 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8119 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8120 (arm_prepare_to_resume): Use perror_with_name instead of error.
8121
55329a5c 81222011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8123
8124 * linux-arm-low.c: Include <signal.h>.
8125 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8126 (struct arm_linux_hwbp_cap): New data type.
8127 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8128 (struct arm_linux_hw_breakpoint): New data type.
8129 (MAX_BPTS, MAX_WPTS): Define.
8130 (struct arch_process_info, struct arch_lwp_info): New data types.
8131 (arm_linux_get_hwbp_cap): New function.
8132 (arm_linux_get_hw_breakpoint_count): Likewise.
8133 (arm_linux_get_hw_watchpoint_count): Likewise.
8134 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8135 (arm_hwbp_control_initialize): Likewise.
8136 (arm_hwbp_control_is_enabled): Likewise.
8137 (arm_hwbp_control_is_initialized): Likewise.
8138 (arm_hwbp_control_disable): Likewise.
8139 (arm_linux_hw_breakpoint_equal): Likewise.
8140 (arm_linux_hw_point_initialize): Likewise.
8141 (struct update_registers_data): New data structure.
8142 (update_registers_callback: New function.
8143 (arm_insert_point): Likewise.
8144 (arm_remove_point): Likewise.
8145 (arm_stopped_by_watchpoint): Likewise.
8146 (arm_stopped_data_address): Likewise.
8147 (arm_new_process): Likewise.
8148 (arm_new_thread): Likewise.
8149 (arm_prepare_to_resume): Likewise.
8150 (the_low_target): Register arm_insert_point, arm_remove_point,
8151 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8152 arm_new_thread, and arm_prepare_to_resume.
8153
6b9801d4
SS
81542011-09-15 Stan Shebs <stan@codesourcery.com>
8155
8156 * server.h (struct emit_ops): Add compare-goto fields.
8157 * tracepoint.c (gdb_agent_op_sizes): New table.
8158 (emit_eq_goto): New function.
8159 (emit_ne_goto): New function.
8160 (emit_lt_goto): New function.
8161 (emit_le_goto): New function.
8162 (emit_gt_goto): New function.
8163 (emit_ge_goto): New function.
8164 (is_goto_target): New function.
8165 (compile_bytecodes): Recognize special cases of compare-goto
8166 combinations and call specialized emitters for them.
8167 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8168 (amd64_emit_ne_goto): New function.
8169 (amd64_emit_lt_goto): New function.
8170 (amd64_emit_le_goto): New function.
8171 (amd64_emit_gt_goto): New function.
8172 (amd64_emit_ge_goto): New function.
8173 (amd64_emit_ops): Add the new functions.
8174 (i386_emit_eq_goto): New function.
8175 (i386_emit_ne_goto): New function.
8176 (i386_emit_lt_goto): New function.
8177 (i386_emit_le_goto): New function.
8178 (i386_emit_gt_goto): New function.
8179 (i386_emit_ge_goto): New function.
8180 (i386_emit_ops): Add the new functions.
8181
bf15cbda
SS
81822011-09-08 Stan Shebs <stan@codesourcery.com>
8183
8184 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8185 (i386_emit_epilogue): Restore %ebx.
8186
943ca1dd
JZ
81872011-08-31 Jie Zhang <jzhang918@gmail.com>
8188
8189 * server.c (step_thread): Remove definition.
8190 (process_serial_event): Don't handle Hs.
8191 * server.h (step_thread): Remove declaration.
8192 * target.c (set_desired_inferior): Remove use of step_thread.
8193
e3deef73
LM
81942011-08-24 Luis Machado <lgustavo@codesourcery.com>
8195
8196 * linux-low.c: Include linux-procfs.h.
8197 (linux_attach_lwp_1): Update comments.
8198 (linux_attach): Scan for existing threads when attaching to a
8199 process that is the tgid.
8200 * Makefile.in: Update dependencies.
8201
13da1c97
LM
82022011-08-24 Luis Machado <lgustavo@codesourcery.com>
8203
8204 * configure.srv: Add linux-procfs.o dependencies.
8205
881127c9
YQ
82062011-08-14 Yao Qi <yao@codesourcery.com>
8207
8208 * target.h (struct target_ops): Fix indent.
8209 * win32-low.c (win32_target_ops): Fix comment.
8210
58dbd541
YQ
82112011-08-14 Andrew Jenner <andrew@codesourcery.com>
8212 Yao Qi <yao@codesourcery.com>
8213
8214 * Makefile.in (clean): Remove tic6x-*.c files.
8215 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8216 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8217 (tic6x-c64xp-linux.c): Likewise.
8218 * configure.srv: Add support for tic6x-*-uclinux.
8219 * linux-tic6x-low.c: New.
8220 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8221
78d85199
YQ
82222011-08-14 Andrew Stubbs <ams@codesourcery.com>
8223 Yao Qi <yao@codesourcery.com>
8224
8225 * target.h (struct target_ops): Add read_loadmap.
8226 * linux-low.c (struct target_loadseg): New type.
8227 (struct target_loadmap): New type.
8228 (linux_read_loadmap): New function.
8229 (linux_target_ops): Add linux_read_loadmap.
8230 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8231 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8232 to NULL.
78d85199 8233
a959a88d
EZ
82342011-08-05 Eli Zaretskii <eliz@gnu.org>
8235
8236 * win32-low.c: Include <stdint.h>.
8237
1ced966e
PA
82382011-07-22 Pedro Alves <pedro@codesourcery.com>
8239
8240 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8241 to the inferior here.
8242 (i386_remove_aligned_watchpoint): Ditto.
8243 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8244 fit part of the watchpoint in the debug registers.
8245 (i386_update_inferior_debug_regs): New.
8246 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8247 registers, and only update the inferior on success.
8248 (i386_low_remove_watchpoint): Ditto.
8249
d26e3629
KY
82502011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8251
8252 * linux-low.c (compare_ints, unique, list_threads, show_process,
8253 linux_core_of_thread): Delete.
8254 (linux_target_ops): Change linux_core_of_thread to
8255 linux_common_core_of_thread.
8256 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8257 * utils.c (malloc_failure): Change type of argument.
8258 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8259 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8260 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8261 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8262 (IPA_OBJS): Add common-utils-ipa.o.
8263 (ptid_h, linux_osdata_h): New macros.
8264 (server_h): Add common/common-utils.h, common/xml-utils.h,
8265 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8266 common/ptid.h.
8267 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8268 ptid.o, buffer.o): New rules.
8269 (linux-low.o): Add common/linux-osdata.h as a dependency.
8270 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8271 * configure.ac: Add AC_HEADER_DIRENT check.
8272 * config.in: Regenerate.
8273 * configure: Regenerate.
8274 * remote-utils.c (xml_escape_text): Delete.
8275 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8276 buffer_xml_printf): Move to common/buffer.c.
8277 * server.c (main): Remove call to initialize_inferiors.
8278 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8279 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8280 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8281 internal_error, gdb_assert, gdb_assert_fail): Delete.
8282 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8283 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8284 common/buffer.h.
8285 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8286 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8287 initialize_inferiors): Delete.
8288
2275a1a7
PA
82892011-07-20 Pedro Alves <pedro@codesourcery.com>
8290
8291 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8292 symbol error.
8293
0a5b1e09
PA
82942011-05-31 Pedro Alves <pedro@codesourcery.com>
8295
8296 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8297 assertion.
8298 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8299
6938fd34
YQ
83002011-05-26 Yao Qi <yao@codesourcery.com>
8301
8302 * Makefile.in (thread-db.o): Track dependence to
8303 common/gdb_thread_db.h.
8304 * thread-db.c: include gdb_thread_db.h from right place.
8305
b481f9e0
TT
83062011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8307
8308 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8309 __FILE__ and __LINE__ to internal_error.
8310
98a5dd13
DE
83112011-05-13 Doug Evans <dje@google.com>
8312
8313 * thread-db.c (try_thread_db_load_from_sdir): New function.
8314 (try_thread_db_load_from_dir): New function.
8315 (thread_db_load_search): Handle $sdir, ignore $pdir.
8316 Remove trying of system directories if search of
8317 libthread-db-search-path fails, that is now done via $sdir.
8318
d248b706
KY
83192011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8320
8321 * server.c (handle_query): Add EnableDisableTracepoints to the list
8322 of supported features.
43aaf8b6 8323 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8324 tracepoints.
43aaf8b6
PA
8325 (cmd_qtenable_disable): New.
8326 (cmd_qtstart): Install tracepoints even if disabled.
8327 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8328 receiving a QTEnable or QTDisable packet.
8329 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8330 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8331 tracepoints.
8332 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8333
84e578fb
DE
83342011-05-10 Doug Evans <dje@google.com>
8335
8336 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8337
71f55dd8
DE
83382011-05-04 Doug Evans <dje@google.com>
8339
8340 * linux-low.c (linux_join): Skip process lookup.
8341 * spu-low.c (spu_join): Ditto.
8342 * server.c (join_inferiors_callback): Delete.
8343 (process_serial_event): For 'D' packet (detach) call join_inferior
8344 directly.
8345
4d393d60
JM
83462011-05-04 Joseph Myers <joseph@codesourcery.com>
8347
8348 * README: Don't mention xscale*-*-linux*.
8349 * configure.srv (xscale*-*-linux*): Don't handle target.
8350
b00ad6ff
NF
83512011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8352
8353 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8354 casting pointers.
8355 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8356 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8357 (i386_emit_void_call_2): Likewise.
8358
af96c192
YQ
83592011-04-26 Yao Qi <yao@codesourcery.com>
8360
43aaf8b6
PA
8361 * linux-low.c: Move common macros to linux-ptrace.h.
8362 Include linux-ptrace.h.
af96c192
YQ
8363 * Makefile.in (linux_ptrace_h): New.
8364 (linux-low.o): Depends on linux-ptrace.h.
8365
03f2bd59
JK
83662011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8367
8368 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8369 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8370 (remote_prepare): New function with most of the TCP code from ...
8371 (remote_open): ... here. Detect PORT here unconditionally. Move also
8372 setting transport_is_reliable.
8373 * server.c (run_once): New variable.
8374 (gdbserver_usage): Document it.
8375 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8376 the first run if RUN_ONCE.
8377 * server.h (run_once, remote_prepare): New declarations.
8378
7a9dd1b2
TT
83792011-04-19 Tom Tromey <tromey@redhat.com>
8380
8381 * win32-low.c (handle_load_dll): Remove duplicate "the".
8382
81239425
PM
83832011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8384
8385 Remove support for old Cygwin 1.5 versions.
8386 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8387 function to avoid warning.
8388 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8389 warning.
8390
9e0627f1
PM
83912011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8392
8393 * gdbserver/server.h (Macro _): Define it if not available.
8394
588eebee
MS
83952011-03-14 Michael Snyder <msnyder@vmware.com>
8396
348af9f7 8397 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8398
43f70d4c
JB
83992011-03-10 Joel Brobecker <brobecker@adacore.com>
8400
8401 * Makefile.in (maintainer-clean realclean distclean): Remove
8402 "make ... subdir_do" command.
8403
348af9f7
MS
84042011-03-10 Michael Snyder <msnyder@vmware.com>
8405
8406 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8407
8408 * server.c (handle_v_run): Free alloced buffer on early return.
8409
e637a4f5
YQ
84102011-03-09 Yao Qi <yao@codesourcery.com>
8411
8412 Revert:
8413 2011-03-04 Yao Qi <yao@codesourcery.com>
8414
8415 * Makefile.in: Remove GNU make feature --directory.
8416
8417 2011-03-05 Yao Qi <yao@codesourcery.com>
8418
8419 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8420 (subdir_do): New make target. Copied from gdb/Makefile.
8421 (maintainer-clean, realclean, distclean, clean): Call corresponding
8422 make targets in common/Makefile.
8423
8424 2011-02-11 Yao Qi <yao@codesourcery.com>
8425
8426 * configure.ac: Call AC_PROG_RANLIB.
8427 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8428 * configure: Regenerate.
8429
e6edda56
JK
84302011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8431
8432 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8433
e5141119
JB
84342011-03-06 Yao Qi <yao@codesourcery.com>
8435
8436 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8437
64794aa4
JB
84382011-03-05 Yao Qi <yao@codesourcery.com>
8439
8440 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8441 (subdir_do): New make target. Copied from gdb/Makefile.
8442 (maintainer-clean, realclean, distclean, clean): Call corresponding
8443 make targets in common/Makefile.
8444
7a762829
YQ
84452011-03-04 Yao Qi <yao@codesourcery.com>
8446
8447 * Makefile.in: Remove GNU make feature --directory.
8448
348af9f7
MS
84492011-03-04 Michael Snyder <msnyder@vmware.com>
8450
8451 * server.c (queue_stop_reply): Call xmalloc not malloc.
8452
84532011-03-02 Michael Snyder <msnyder@vmware.com>
8454
8455 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8456
9f72fee2
MS
84572011-02-28 Michael Snyder <msnyder@vmware.com>
8458
588eebee
MS
8459 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8460 (cmd_qtframe): Ditto.
8461 (cmd_qtbuffer): Ditto.
8462 (cmd_bigqtbuffer): Ditto.
8463
9f72fee2
MS
8464 * utils.c (decimal2str): Initialize 'width' to nine, then
8465 don't mess with it.
8466
8040bd49
UW
84672011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8468
8469 * hostio.c (require_data): Free *data, not data.
8470
7e52cbd0
JK
84712011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8472
8473 * hostio.c (require_data): Use free, not xfree.
8474
9130f83e
MS
84752011-02-27 Michael Snyder <msnyder@vmware.com>
8476
4b812f4e
MS
8477 * server.c (handle_query): Discard unused value.
8478
9130f83e
MS
8479 * hostio.c (require_data): Free malloc memory before returning
8480 error.
8481
69d37113
MS
84822011-02-26 Michael Snyder <msnyder@vmware.com>
8483
8484 * linux-low.c (list_threads): Call closedir for dirent.
8485
35f5825a
MS
84862011-02-27 Michael Snyder <msnyder@vmware.com>
8487
2a589cef
MS
8488 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8489 a case statement falls through.
8490
0adea5f7
MS
8491 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8492
35f5825a
MS
8493 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8494 in comparison.
8495
238f1c74
MS
84962011-02-26 Michael Snyder <msnyder@vmware.com>
8497
8498 * utils.c (decimal2str): Eliminate dead code and dead param.
8499 (pulongest): Drop dead param from call to decimal2str.
8500 (plongest): Ditto.
8501
633ff500
JB
85022011-02-24 Joel Brobecker <brobecker@adacore.com>
8503
8504 Revert the following patch (not approved yet):
8505 2011-02-21 Hui Zhu <teawater@gmail.com>
8506 * tracepoint.c (tp_printf): New function.
8507 (eval_agent_expr): Handle gdb_agent_op_printf.
8508
f9c6ff72
HZ
85092011-02-21 Hui Zhu <teawater@gmail.com>
8510
8511 * tracepoint.c (tp_printf): New function.
8512 (eval_agent_expr): Handle gdb_agent_op_printf.
8513
94d5e490
TT
85142011-02-18 Tom Tromey <tromey@redhat.com>
8515
8516 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8517 (tracepoint.o): Likewise.
8518 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8519 (gdb_agent_op_names): Likewise.
8520
c7f96d2b
TT
85212011-02-18 Tom Tromey <tromey@redhat.com>
8522
8523 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8524 gdb_agent_op_rot>: New constants.
8525 (gdb_agent_op_names): Add pick and roll.
8526 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8527 cases.
8528
0feedb2c
JK
85292011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8530
8531 * aclocal.m4: Regenerated with aclocal-1.11.1.
8532
b3b9301e
PA
85332011-02-14 Pedro Alves <pedro@codesourcery.com>
8534
8535 * server.c (handle_qxfer_traceframe_info): New.
8536 (qxfer_packets): Register "traceframe-info".
8537 (handle_query): Report support for qXfer:traceframe-info:read+.
8538 * tracepoint.c (match_blocktype): New.
8539 (traceframe_find_block_type): Rename to ...
8540 (traceframe_walk_blocks): ... this. Add callback filter argument,
8541 and use it.
8542 (traceframe_find_block_type): New, reimplemented on top of
8543 traceframe_walk_blocks.
8544 (build_traceframe_info_xml): New.
8545 (traceframe_read_info): New.
8546 * server.h (traceframe_read_info): Declare.
8547
4f3e6fb7
YQ
85482011-02-11 Yao Qi <yao@codesourcery.com>
8549
8550 * configure.ac: Call AC_PROG_RANLIB.
8551 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8552 * configure: Regenerate.
8553
764880b7
PA
85542011-02-07 Pedro Alves <pedro@codesourcery.com>
8555
8556 * server.c (gdb_read_memory): Change return semantics to allow
8557 partial transfers.
8558 (handle_search_memory_1): Adjust.
8559 (process_serial_event) <'m' packet>: Handle partial transfers.
8560 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8561
1c79eb8a
PA
85622011-01-28 Pedro Alves <pedro@codesourcery.com>
8563
8564 * regcache.c (init_register_cache): Initialize
8565 regcache->register_status.
8566 (free_register_cache): Release regcache->register_status.
8567 (regcache_cpy): Copy register_status.
8568 (registers_to_string): Print 'x's for unavailable registers.
8569 (supply_register): Mark the register's status valid or
8570 unavailable, depending on whether a buffer was passed in or not.
8571 (supply_register_zeroed): New.
8572 (supply_regblock): Mark the registers' status valid or
8573 unavailable, depending on whether a buffer was passed in or not.
8574 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8575 (struct regcache): New `register_status' field.
8576 (supply_register_zeroed): Declare.
8577 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8578 supply_register_zeroed, rather than passing a NULL buffer to
8579 supply_register.
8580 * tracepoint.c (fetch_traceframe_registers): Update comment.
8581
85724a0e
PA
85822011-01-28 Pedro Alves <pedro@codesourcery.com>
8583
8584 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8585 buffer explicit.
8586
d08aafef
PA
85872011-01-25 Pedro Alves <pedro@codesourcery.com>
8588
8589 * server.h (decode_xfer_write): Change prototype.
8590 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8591 and don't extract the annex here.
8592 * server.c (decode_xfer_read): Remove `annex' parameter,
8593 and don't extract the annex here.
8594 (decode_xfer): New.
8595 (struct qxfer): New.
8596 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8597 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8598 (handle_qxfer_statictrace): New functions, abstracted out from
8599 handle_query, and made to use the struct qxfer interface.
8600 (handle_threads_qxfer_proper): Rename to ...
8601 (handle_qxfer_threads_proper): ... this.
8602 (handle_threads_qxfer): Rename to ...
8603 (handle_qxfer_threads): ... this. Adjust.
8604 (qxfer_packets): New array.
8605 (handle_qxfer): New function.
8606 (handle_query): Use handle_qxfer.
8607
493e2a69
MS
86082011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8609
8610 * gdbreplay.c: Shorten lines of >= 80 columns.
8611 * linux-low.c: Ditto.
8612 * linux-ppc-low.c: Ditto.
8613 * linux-s390-low.c: Ditto.
8614 * linux-sparc-low.c: Ditto.
8615 * linux-x86-low.c: Ditto.
8616 * linux-xtensa-low.c: Ditto.
8617 * mem-break.c: Ditto.
8618 * nto-low.c: Ditto.
8619 * regcache.h: Ditto.
8620 * remote-utils.c: Ditto.
8621 * server.c: Ditto.
8622 * server.h: Ditto.
8623 * thread-db.c: Ditto.
8624 * tracepoint.c: Ditto.
8625 * utils.c: Ditto.
8626 * win32-low.h: Ditto.
8627
44944448
JB
86282011-01-05 Joel Brobecker <brobecker@adacore.com>
8629
8630 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8631 update.
8632
71ce852c
JB
86332011-01-01 Joel Brobecker <brobecker@adacore.com>
8634
8635 * server.c (gdbserver_version): Update copyright year in version
8636 output.
8637 * gdbreplay.c (gdbreplay_version): Ditto.
8638
eb826dc6
MF
86392010-12-29 Jie Zhang <jie.zhang@analog.com>
8640
8641 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8642 * linux-bfin-low.c: New file.
8643 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8644 PT_DATA_ADDR for BFIN targets.
8645 * Makefile.in (SFILES): Add linux-bfin-low.c.
8646 (clean): Remove reg-bfin.c.
8647 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8648 * README: Mention supported Blackfin targets.
8649
39ab222a
MF
86502010-12-23 Mike Frysinger <vapier@gentoo.org>
8651
8652 * .gitignore: New file.
8653
a1f2ce7d
MF
86542010-11-16 Mike Frysinger <vapier@gentoo.org>
8655
8656 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8657
f474844c
JZ
86582010-10-22 Jie Zhang <jie@codesourcery.com>
8659
8660 * Makefile.in: Add FLAGS_TO_PASS variable.
8661 (install): Remove dependency of install-only and recursively
8662 invoke make for install-only.
8663
f1048712
DE
86642010-10-04 Doug Evans <dje@google.com>
8665
8666 * Makefile.in (uninstall): Use $(DESTDIR).
8667
b53a1623
PA
86682010-09-24 Pedro Alves <pedro@codesourcery.com>
8669
e6ee044d
PA
8670 PR gdb/11842
8671
b53a1623
PA
8672 * linux-x86-low.c (compat_siginfo_from_siginfo)
8673 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8674 si_code is < 0. Check for si_code == SI_TIMER before checking for
8675 si_code < 0.
8676
fa1bd1e4
JB
86772010-09-13 Joel Brobecker <brobecker@adacore.com>
8678
8679 * lynx-i386-low.c: New file.
8680 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8681
47fac8f8
JB
86822010-09-13 Joel Brobecker <brobecker@adacore.com>
8683
8684 * lynx-low.c (ptrace_request_to_str): Remove handling for
8685 request values that have been removed in LynxOS 5.x.
8686
1adfc54d
JB
86872010-09-13 Joel Brobecker <brobecker@adacore.com>
8688
8689 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8690 <ptrace.h>
8691
c2a66c29
NS
86922010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8693
8694 * configure.ac: Add --enable-inprocess-agent option.
8695 * configure: Rebuilt.
8696
32fcada3
YQ
86972010-09-06 Yao Qi <yao@codesourcery.com>
8698
8699 * linux-low.c (linux_kill): Remove unused variable.
8700 (linux_stabilize_threads): Likewise.
8701 * server.c (start_inferior): Likewise.
8702 (queue_stop_reply_callback): Likewise.
8703 * tracepoint.c (do_action_at_tracepoint): Likewise.
8704
0cccb683
YQ
87052010-09-06 Yao Qi <yao@codesourcery.com>
8706
8707 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8708 on return.
8709
423ec54c
JK
87102010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8711
8712 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8713
12ac6819
PA
87142010-09-06 Pedro Alves <pedro@codesourcery.com>
8715
8716 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8717 "$(IPA_DEPFILES)".
8718
8ed54b31
JB
87192010-09-01 Joel Brobecker <brobecker@adacore.com>
8720
8721 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8722 gdbserver/lynx-ppc-low.c: New files.
8723 * Makefile.in (lynx_low_h): New variable.
8724 (lynx-low.o, lynx-ppc-low.o): New rules.
8725 * configure.ac: On LynxOS, link with -lnetinet.
8726 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8727 * configure: regenerate.
8728
bb0116a4
JB
87292010-09-01 Joel Brobecker <brobecker@adacore.com>
8730
8731 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8732 * configure.ac: Add check for vasprintf and vsnprintf.
8733 * configure, config.in: Regenerate.
8734 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8735
a778ab81 87362010-09-01 Joel Brobecker <brobecker@adacore.com>
8737
8738 * gdbreplay.c: Move include of alloca.h up, next to include of
8739 malloc.h.
8740 * server.h: Add include of malloc.h.
8741 * mem-break.c: Remove include of malloc.h.
8742 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8743
8b034a19 87442010-09-01 Joel Brobecker <brobecker@adacore.com>
8745
8746 * Makefile.in (memmem.o): Build with -Wno-error.
8747
87482010-09-01 Joel Brobecker <brobecker@adacore.com>
8749
8750 * utils.c (xsnprintf): Make non-static.
8751 * server.h: Add xsnprintf declaration.
8752 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8753 replace calls to snprintf by calls to xsnprintf throughout.
8754
87552010-09-01 Joel Brobecker <brobecker@adacore.com>
8756
8757 * configure.ac: Add configure check for alloca.
8758 * configure, config.in: Regenerate.
8759 * server.h: Include alloca.h if it exists.
8760 * gdbreplay.c: Include alloca.h if it exists.
8761
1a981360
PA
87622010-08-28 Pedro Alves <pedro@codesourcery.com>
8763
8764 * linux-low.c (__SIGRTMIN): Define if not already defined.
8765 (linux_create_inferior): Check for __ANDROID__ rather than
8766 __SIGRTMIN.
8767 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8768 are already deferred.
8769 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8770 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8771 stopped and already has a pending signal to report.
8772 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8773 a pending signal to report or is moving out of a jump pad.
8774 (linux_init_signals): Check for __ANDROID__ rather than
8775 __SIGRTMIN.
8776
b4d51a55
PA
87772010-08-28 Pedro Alves <pedro@codesourcery.com>
8778
8779 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8780 debug_threads check. Avoid a linear search when not doing debug
8781 output.
8782
ec48365d
PA
87832010-08-27 Pedro Alves <pedro@codesourcery.com>
8784
8785 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8786 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8787 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8788 (process_event): Change local fd's type to gdb_fildes_t.
8789 (create_file_handler): Adjust prototype.
8790 (delete_file_handler): Adjust prototype.
8791 (handle_file_event): Adjust prototype. Use pfildes.
8792 (create_file_event): Adjsut prototype.
8793 * remote-utils.c (remote_desc, listen_desc): Change type to
8794 gdb_fildes_t.
8795 * server.h: New gdb_fildes_t typedef.
8796 [USE_WIN32API]: Include winsock2.h.
8797 (delete_file_handler, add_file_handler): Adjust prototypes.
8798 (pfildes): Declare.
8799 * utils.c (pfildes): New.
8800
854d88f0
PA
88012010-08-27 Pedro Alves <pedro@codesourcery.com>
8802
8803 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8804 * configure: Regenerate.
8805
0146f85b
PA
88062010-08-27 Pedro Alves <pedro@codesourcery.com>
8807
8808 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8809 (linux_done_accessing_memory): ... this.
8810 (linux_target_ops): Adjust.
8811 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8812 * nto-low.c (nto_target_ops): Adjust comment.
8813 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8814 * spu-low.c (spu_target_ops): Adjust comment.
8815 * target.h (target_ops): Rename unprepare_to_access_memory field
8816 to done_accessing_memory.
8817 (unprepare_to_access_memory): Rename to ...
8818 (done_accessing_memory): ... this.
8819
90d74c30
PA
88202010-08-26 Pedro Alves <pedro@codesourcery.com>
8821
8822 * linux-low.c (linux_prepare_to_access_memory): New.
8823 (linux_unprepare_to_access_memory): New.
8824 (linux_target_ops): Install them.
8825 * server.c (read_memory): Rename to ...
8826 (gdb_read_memory): ... this. Use
8827 prepare_to_access_memory/prepare_to_access_memory.
8828 (write_memory): Rename to ...
8829 (gdb_write_memory): ... this. Use
8830 prepare_to_access_memory/prepare_to_access_memory.
8831 (handle_search_memory_1): Adjust.
8832 (process_serial_event): Adjust.
8833 * target.h (struct target_ops): New fields
8834 prepare_to_access_memory and unprepare_to_access_memory.
8835 (prepare_to_access_memory, unprepare_to_access_memory): New.
8836 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8837 prepare_to_access_memory/prepare_to_access_memory.
8838 * nto-low.c (nto_target_ops): Adjust.
8839 * spu-low.c (spu_target_ops): Adjust.
8840 * win32-low.c (win32_target_ops): Adjust.
8841
fd467969
PA
88422010-08-26 Pedro Alves <pedro@codesourcery.com>
8843
8844 * Makefile.in (WARN_CFLAGS): Get it from configure.
8845 (WERROR_CFLAGS): New.
8846 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8847 * configure.ac: Introduce --enable-werror, which adds -Werror to
8848 the compiler command line. Enabled by default. Disable with
8849 --disable-werror. Add -Wdeclaration-after-statement
8850 Wpointer-arith and -Wformat-nonliteral to warning flags.
8851 * configure: Regenerate.
8852
331e2f5f
PA
88532010-08-26 Pedro Alves <pedro@codesourcery.com>
8854
8855 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8856
e581f2b4
PA
88572010-08-26 Pedro Alves <pedro@codesourcery.com>
8858
8859 * gdbreplay.c (remote_error): New.
8860 (gdbchar): New.
8861 (expect): Use gdbchar. Check for error reading from GDB.
8862 Clarify sync error output.
8863 (play): Check for errors writing to GDB.
8864 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8865 * remote-utils.c (getpkt): Check for errors writing to the remote
8866 descriptor.
8867
3c11dd79
PA
88682010-08-25 Pedro Alves <pedro@codesourcery.com>
8869
8870 * linux-low.c (linux_wait_1): Move non-debugging code out of
8871 `debug_threads' control.
8872
d20a8ad9
PA
88732010-08-25 Pedro Alves <pedro@codesourcery.com>
8874
8875 * linux-low.c (linux_wait_1): Don't set last_status here.
8876 * server.c (push_event, queue_stop_reply_callback): Assert we're
8877 not pushing a TARGET_WAITKIND_IGNORE event.
8878 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8879 (myresume, handle_target_event): Set the thread's last_resume_kind
8880 and last_status from the target returned status.
8881
964e4306
PA
88822010-08-25 Pedro Alves <pedro@codesourcery.com>
8883
8884 PR threads/10729
8885
8886 * linux-x86-low.c (update_debug_registers_callback): New.
8887 (i386_dr_low_set_addr): Use it.
8888 (i386_dr_low_get_addr): New.
8889 (i386_dr_low_set_control): Use update_debug_registers_callback.
8890 (i386_dr_low_get_control): New.
8891 (i386_dr_low_get_status): Adjust.
8892 * linux-low.c (linux_stop_lwp): New.
8893 * linux-low.h (linux_stop_lwp): Declare.
8894
8895 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8896 argument instead of a i386_debug_reg_state.
8897 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8898 a i386_debug_reg_state.
8899 (i386_insert_aligned_watchpoint): Adjust.
8900 (i386_remove_aligned_watchpoint): Adjust.
8901 (i386_low_stopped_data_address): Read the debug registers from the
8902 inferior instead of from the mirrors.
8903 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8904 (i386_dr_low_get_addr): Declare.
8905 (i386_dr_low_get_control): Declare.
8906 (i386_dr_low_get_status): Change prototype.
8907
8908 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8909 (i386_dr_low_get_addr): New.
8910 (i386_dr_low_get_control): New.
8911 (i386_dr_low_get_status): Adjust prototype. Return
8912 dr_status_mirror.
8913 (i386_initial_stuff): Clear dr_status_mirror and
8914 dr_control_mirror.
8915 (i386_get_thread_context): Adjust.
8916 (i386_set_thread_context): Adjust.
8917 (i386_thread_added): Adjust.
8918
5f21a75b
PA
89192010-08-24 Pedro Alves <pedro@codesourcery.com>
8920
8921 * linux-low.h (linux_thread_area): Delete declaration.
8922
3e4c1235
TS
89232010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8924
8925 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8926 after its termination.
8927
1971b033
PA
89282010-08-09 Pedro Alves <pedro@codesourcery.com>
8929
8930 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8931 (gdb_wants_all_stopped): Delete.
8932 (linux_wait_1): Don't call them.
8933 * server.c (handle_v_cont): Tag all threads as want-stopped.
8934 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8935 stopped as "client-wants-stopped".
8936
310444ac
PA
89372010-07-31 Pedro Alves <pedro@codesourcery.com>
8938
8939 * Makefile.in (signals_h): New.
8940 (server_h): Depend on it.
8941 (server.o): Don't depend on $(signals_def).
8942 (signals.o): Depend on $(signals_def).
8943
a19cae16
JK
89442010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8945
8946 * Makefile.in (signals_def): New.
8947 (server_h): Append include/gdb/signals.h and signals_def.
8948 (server.o): Append signals_def.
8949
30d50328
JK
89502010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8951
8952 * server.c (handle_target_event): Use target_signal_to_host for
8953 resume_info.sig initialization.
8954 * target.h (struct thread_resume) <sig>: New comment.
8955
5c3216e2
OS
89562010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8957
c6f46ca0
OS
8958 * server.c (handle_query): strcpy() the returned string from paddress()
8959 instead of sprintf().
5c3216e2
OS
8960 * utils.c (paddress): Return phex_nz().
8961
6bd31874
JB
89622010-07-07 Joel Brobecker <brobecker@adacore.com>
8963
8964 * server.c (handle_v_cont): Call mourn_inferior if process
8965 just exited.
8966 (myresume): Likewise.
8967
0fb4aa4b
PA
89682010-07-01 Pedro Alves <pedro@codesourcery.com>
8969
8970 Static tracepoints, and integration with UST.
8971
8972 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8973 * mem-break.c (uninsert_all_breakpoints)
8974 (reinsert_all_breakpoints): New.
8975 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8976 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8977 (gdb_agent_ust_loaded, helper_thread_id)
8978 (gdb_agent_helper_thread_id): New macros.
8979 (struct ipa_sym_addresses): Add addr_ust_loaded,
8980 addr_helper_thread_id, addr_cmd_buf.
8981 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8982 (in_process_agent_loaded_ust): New.
8983 (write_e_ust_not_loaded): New.
8984 (maybe_write_ipa_ust_not_loaded): New.
8985 (struct collect_static_trace_data_action): New.
8986 (enum tracepoint_type) <static_tracepoint>: New.
8987 (struct tracepoint) <handle>: Mention static tracepoints.
8988 (struct static_tracepoint_ctx): New.
8989 (CMD_BUF_SIZE): New.
8990 (add_tracepoint_action): Handle static tracepoint actions.
8991 (unprobe_marker_at): New.
8992 (clear_installed_tracepoints): Handle static tracepoints.
8993 (cmd_qtdp): Handle static tracepoints.
8994 (probe_marker_at): New.
8995 (cmd_qtstart): Handle static tracepoints.
8996 (response_tracepoint): Handle static tracepoints.
8997 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8998 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8999 (get_context_regcache): Handle static tracepoints.
9000 (do_action_at_tracepoint): Handle static tracepoint actions.
9001 (traceframe_find_block_type): Handle static trace data blocks.
9002 (traceframe_read_sdata): New.
9003 (download_tracepoints): Download static tracepoint actions.
9004 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9005 (GDB_PROBE_NAME): New.
9006 (ust_ops): New.
9007 (GET_UST_SYM): New.
9008 (USTF): New.
9009 (dlsym_ust): New.
9010 (ust_marker_to_static_tracepoint): New.
9011 (gdb_probe): New.
9012 (collect_ust_data_at_tracepoint): New.
9013 (gdb_ust_probe): New.
9014 (UNIX_PATH_MAX, SOCK_DIR): New.
9015 (gdb_ust_connect_sync_socket): New.
9016 (resume_thread, stop_thread): New.
9017 (run_inferior_command): New.
9018 (init_named_socket): New.
9019 (gdb_ust_socket_init): New.
9020 (cstr_to_hexstr): New.
9021 (next_st): New.
9022 (first_marker, next_marker): New.
9023 (response_ust_marker): New.
9024 (cmd_qtfstm, cmd_qtsstm): New.
9025 (unprobe_marker_at, probe_marker_at): New.
9026 (cmd_qtstmat, gdb_ust_thread): New.
9027 (gdb_ust_init): New.
9028 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9029 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9030 (ST_REGENTRY): New.
9031 (x86_64_st_collect_regmap): New.
9032 (X86_64_NUM_ST_COLLECT_GREGS): New.
9033 (AMD64_RIP_REGNUM): New.
9034 (supply_static_tracepoint_registers): New.
9035 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9036 (ST_REGENTRY): New.
9037 (i386_st_collect_regmap): New.
9038 (i386_NUM_ST_COLLECT_GREGS): New.
9039 (supply_static_tracepoint_registers): New.
9040 * server.c (handle_query): Handle qXfer:statictrace:read.
9041 <qSupported>: Report support for StaticTracepoints, and
9042 qXfer:statictrace:read features.
9043 * server.h (traceframe_read_sdata)
9044 (supply_static_tracepoint_registers): Declare.
9045 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9046 (unpack_varlen_hex): Include in IPA build.
9047 * Makefile.in (ustlibs, ustinc): New.
9048 (IPA_OBJS): Add remote-utils-ipa.o.
9049 ($(IPA_LIB)): Link -ldl and -lpthread.
9050 (UST_CFLAGS): New.
9051 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9052 * config.in, configure: Regenerate.
9053
9e4344e5
PA
90542010-06-20 Ian Lance Taylor <iant@google.com>
9055 Pedro Alves <pedro@codesourcery.com>
9056
9057 * linux-x86-low.c (always_true): Delete.
9058 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9059 trying to fool the compiler with always_true.
9060
c6beb2cb
PA
90612010-06-20 Pedro Alves <pedro@codesourcery.com>
9062
9063 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9064 conditions in gdbserver.
9065
d2ed6730
UW
90662010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9067
9068 * spu-low.c (spu_read_memory): Wrap around local store limit.
9069 (spu_write_memory): Likewise.
9070
4e29fb54
PA
90712010-06-15 Pedro Alves <pedro@codesourcery.com>
9072
9073 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9074 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9075 LONGEST uses.
9076 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9077 uses.
9078 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9079 uses with LONGEST uses.
9080
6a271cae
PA
90812010-06-14 Stan Shebs <stan@codesourcery.com>
9082 Pedro Alves <pedro@codesourcery.com>
9083
9084 Bytecode compiler.
9085
9086 * linux-x86-low.c: Include limits.h.
9087 (add_insns): New.
9088 (always_true): New.
9089 (EMIT_ASM): New.
9090 (EMIT_ASM32): New.
9091 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9092 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9093 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9094 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9095 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9096 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9097 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9098 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9099 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9100 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9101 (amd64_emit_void_call_2): New.
9102 (amd64_emit_ops): New.
9103 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9104 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9105 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9106 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9107 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9108 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9109 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9110 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9111 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9112 (i386_emit_stack_adjust, i386_emit_int_call_1)
9113 (i386_emit_void_call_2): New.
9114 (i386_emit_ops): New.
9115 (x86_emit_ops): New.
9116 (the_low_target): Install x86_emit_ops.
9117 * server.h (struct emit_ops): New.
9118 (get_raw_reg_func_addr): Declare.
9119 (current_insn_ptr, emit_error): Declare.
9120 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9121 (set_trace_state_variable_value): New defines.
9122 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9123 addr_get_trace_state_variable_value and
9124 addr_set_trace_state_variable_value.
9125 (symbol_list): New fields for get_raw_reg,
9126 get_trace_state_variable_value and set_trace_state_variable_value.
9127 (condfn): New typedef.
9128 (struct tracepoint): New field `compiled_cond'.
9129 (do_action_at_tracepoint): Clear compiled_cond.
9130 (get_trace_state_variable_value, set_trace_state_variable_value):
9131 Export in the IPA.
9132 (condition_true_at_tracepoint): If there's a compiled condition,
9133 run that.
9134 (current_insn_ptr, emit_error): New globals.
9135 (struct bytecode_address): New.
9136 (get_raw_reg_func_addr): New.
9137 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9138 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9139 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9140 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9141 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9142 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9143 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9144 (compile_tracepoint_condition, compile_bytecodes): New.
9145 * target.h (emit_ops): Forward declare.
9146 (struct target_ops): New field emit_ops.
9147 (target_emit_ops): New.
9148 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9149 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9150 * linux-low.c (linux_emit_ops): New.
9151 (linux_target_ops): Install it.
9152 * linux-low.h (struct linux_target_ops): New field emit_ops.
9153
92b72907
UW
91542010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9155
9156 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9157 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9158
fa593d66
PA
91592010-06-01 Pedro Alves <pedro@codesourcery.com>
9160 Stan Shebs <stan@codesourcery.com>
9161
9162 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9163 (all): Depend on $(extra_libraries).
9164 (install-only): Install the IPA.
9165 (IPA_OBJS, IPA_LIB): New.
9166 (clean): Remove the IPA lib.
9167 (IPAGENT_CFLAGS): New.
9168 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9169 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9170 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9171 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9172 * configure.ac: Check for atomic builtins support in the compiler.
9173 (IPA_DEPFILES, extra_libraries): Define.
9174 * configure.srv (ipa_obj): Add description.
9175 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9176 (i[34567]86-*-linux*): Set ipa_obj.
9177 (x86_64-*-linux*): Set ipa_obj.
9178 * linux-low.c (stabilizing_threads): New.
9179 (supports_fast_tracepoints): New.
9180 (linux_detach): Stabilize threads before detaching.
9181 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9182 the lwp is either not stabilizing, or is moving out of a jump pad.
9183 (linux_fast_tracepoint_collecting): New.
9184 (maybe_move_out_of_jump_pad): New.
9185 (enqueue_one_deferred_signal): New.
9186 (dequeue_one_deferred_signal): New.
9187 (linux_wait_for_event_1): If moving out of a jump pad, defer
9188 pending signals to later.
9189 (linux_stabilize_threads): New.
9190 (linux_wait_1): Check if threads need moving out of jump pads, and
9191 do it if so.
9192 (stuck_in_jump_pad_callback): New.
9193 (move_out_of_jump_pad_callback): New.
9194 (lwp_running): New.
9195 (linux_resume_one_lwp): Handle moving out of jump pads.
9196 (linux_set_resume_request): Dequeue deferred signals.
9197 (need_step_over_p): Also step over fast tracepoint jumps.
9198 (start_step_over): Also uninsert fast tracepoint jumps.
9199 (finish_step_over): Also reinsert fast tracepoint jumps.
9200 (linux_install_fast_tracepoint_jump): New.
9201 (linux_target_ops): Install linux_stabilize_threads and
9202 linux_install_fast_tracepoint_jump_pad.
9203 * linux-low.h (linux_target_ops) <get_thread_area,
9204 install_fast_tracepoint_jump_pad>: New fields.
9205 (struct lwp_info) <collecting_fast_tracepoint,
9206 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9207 (linux_get_thread_area): Declare.
9208 * linux-x86-low.c (jump_insn): New.
9209 (x86_get_thread_area): New.
9210 (append_insns): New.
9211 (push_opcode): New.
9212 (amd64_install_fast_tracepoint_jump_pad): New.
9213 (i386_install_fast_tracepoint_jump_pad): New.
9214 (x86_install_fast_tracepoint_jump_pad): New.
9215 (the_low_target): Install x86_get_thread_area and
9216 x86_install_fast_tracepoint_jump_pad.
9217 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9218 (struct fast_tracepoint_jump): New.
9219 (fast_tracepoint_jump_insn): New.
9220 (fast_tracepoint_jump_shadow): New.
9221 (find_fast_tracepoint_jump_at): New.
9222 (fast_tracepoint_jump_here): New.
9223 (delete_fast_tracepoint_jump): New.
9224 (set_fast_tracepoint_jump): New.
9225 (uninsert_fast_tracepoint_jumps_at): New.
9226 (reinsert_fast_tracepoint_jumps_at): New.
9227 (set_breakpoint_at): Use write_inferior_memory.
9228 (uninsert_raw_breakpoint): Use write_inferior_memory.
9229 (check_mem_read): Mask out fast tracepoint jumps.
9230 (check_mem_write): Mask out fast tracepoint jumps.
9231 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9232 (set_fast_tracepoint_jump): Declare.
9233 (delete_fast_tracepoint_jump)
9234 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9235 (reinsert_fast_tracepoint_jumps_at): Declare.
9236 * regcache.c: Don't compile many functions when building the
9237 in-process agent library.
9238 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9239 the register buffer in the heap.
9240 (free_register_cache): If the register buffer isn't owned by the
9241 regcache, don't free it.
9242 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9243 pre-existing register caches.
9244 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9245 type.
9246 (convert_ascii_to_int): : Constify `from' parameter type.
9247 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9248 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9249 the needed buffer in-place.
9250 (relocate_instruction): New.
9251 * server.c (handle_query) <qSymbols>: If the target supports
9252 tracepoints, give it a chance of looking up symbols. Report
9253 support for fast tracepoints.
9254 (handle_status): Stabilize threads.
9255 (process_serial_event): Adjust.
9256 * server.h (struct fast_tracepoint_jump): Forward declare.
9257 (struct process_info) <fast_tracepoint_jumps>: New field.
9258 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9259 (decode_X_packet, decode_M_packet): Adjust.
9260 (relocate_instruction): Declare.
9261 (in_process_agent_loaded): Declare.
9262 (tracepoint_look_up_symbols): Declare.
9263 (struct fast_tpoint_collect_status): Declare.
9264 (fast_tracepoint_collecting): Declare.
9265 (force_unlock_trace_buffer): Declare.
9266 (handle_tracepoint_bkpts): Declare.
9267 (initialize_low_tracepoint)
9268 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9269 * target.h (struct target_ops) <stabilize_threads,
9270 install_fast_tracepoint_jump_pad>: New fields.
9271 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9272 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9273 [HAVE_STDINT_H]: Include stdint.h.
9274 (trace_debug_1): Rename to ...
9275 (trace_vdebug): ... this.
9276 (trace_debug): Rename to ...
9277 (trace_debug_1): ... this. Add `level' parameter.
9278 (trace_debug): New.
9279 (ATTR_USED, ATTR_NOINLINE): New.
9280 (IP_AGENT_EXPORT): New.
9281 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9282 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9283 (about_to_request_buffer_space, trace_buffer_is_full)
9284 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9285 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9286 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9287 (traceframe_write_count, traceframes_created)
9288 (trace_state_variables)
9289 New renaming defines.
9290 (struct ipa_sym_addresses): New.
9291 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9292 (symbol_list): New.
9293 (ipa_sym_addrs): New.
9294 (all_tracepoint_symbols_looked_up): New.
9295 (in_process_agent_loaded): New.
9296 (write_e_ipa_not_loaded): New.
9297 (maybe_write_ipa_not_loaded): New.
9298 (tracepoint_look_up_symbols): New.
9299 (debug_threads) [IN_PROCESS_AGENT]: New.
9300 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9301 (UNKNOWN_SIDE_EFFECTS): New.
9302 (stop_tracing): New.
9303 (flush_trace_buffer): New.
9304 (stop_tracing_bkpt): New.
9305 (flush_trace_buffer_bkpt): New.
9306 (read_inferior_integer): New.
9307 (read_inferior_uinteger): New.
9308 (read_inferior_data_pointer): New.
9309 (write_inferior_data_pointer): New.
9310 (write_inferior_integer): New.
9311 (write_inferior_uinteger): New.
9312 (struct collect_static_trace_data_action): Delete.
9313 (enum tracepoint_type): New.
9314 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9315 <actions_str, step_actions, step_actions_str>: Only include in
9316 GDBserver.
fa593d66
PA
9317 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9318 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9319 (tracepoints): Use IP_AGENT_EXPORT.
9320 (last_tracepoint): Don't include in the IPA.
9321 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9322 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9323 (alloced_trace_state_variables): New.
9324 (trace_state_variables): Use IP_AGENT_EXPORT.
9325 (traceframe_t): Delete unused variable.
9326 (circular_trace_buffer): Don't include in the IPA.
9327 (trace_buffer_start): Delete.
9328 (struct trace_buffer_control): New.
9329 (trace_buffer_free): Delete.
9330 (struct ipa_trace_buffer_control): New.
9331 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9332 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9333 New.
9334 (trace_buffer_ctrl): New.
9335 (TRACE_BUFFER_CTRL_CURR): New.
9336 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9337 Reimplement as macros.
9338 (trace_buffer_wrap): Delete.
9339 (traceframe_write_count, traceframe_read_count)
9340 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9341 (struct tracepoint_hit_ctx) <type>: New field.
9342 (struct fast_tracepoint_ctx): New.
9343 (memory_barrier): New.
9344 (cmpxchg): New.
9345 (record_tracepoint_error): Update atomically in the IPA.
9346 (clear_inferior_trace_buffer): New.
9347 (about_to_request_buffer_space): New.
9348 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9349 updating the same buffer.
9350 (add_tracepoint): Default the tracepoint's type to trap
9351 tracepoint, and orig_size to -1.
9352 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9353 internal variables.
9354 (create_trace_state_variable): New parameter `gdb'. Handle it.
9355 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9356 (cmd_qtdp): Handle fast tracepoints.
9357 (cmd_qtdv): Adjust.
9358 (max_jump_pad_size): New.
9359 (gdb_jump_pad_head): New.
9360 (get_jump_space_head): New.
9361 (claim_jump_space): New.
9362 (sort_tracepoints): New.
9363 (MAX_JUMP_SIZE): New.
9364 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9365 IPA.
9366 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9367 support. Upload fast traceframes, and delete internal IPA
9368 breakpoints.
9369 (stop_tracing_handler): New.
9370 (flush_trace_buffer_handler): New.
9371 (cmd_qtstop): Upload fast tracepoints.
9372 (response_tracepoint): Handle fast tracepoints.
9373 (tracepoint_finished_step): Upload fast traceframes. Set the
9374 tracepoint hit context's tracepoint type.
9375 (handle_tracepoint_bkpts): New.
9376 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9377 type. Add comment about fast tracepoints.
9378 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9379 non-existing action_str field.
9380 (get_context_regcache): Handle fast tracepoints.
9381 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9382 to the regcache.
9383 (fast_tracepoint_from_jump_pad_address): New.
9384 (fast_tracepoint_from_ipa_tpoint_address): New.
9385 (collecting_t): New.
9386 (force_unlock_trace_buffer): New.
9387 (fast_tracepoint_collecting): New.
9388 (collecting): New.
9389 (gdb_collect): New.
9390 (write_inferior_data_ptr): New.
9391 (target_tp_heap): New.
9392 (target_malloc): New.
9393 (download_agent_expr): New.
9394 (UALIGN): New.
9395 (download_tracepoints): New.
9396 (download_trace_state_variables): New.
9397 (upload_fast_traceframes): New.
9398 (IPA_FIRST_TRACEFRAME): New.
9399 (IPA_NEXT_TRACEFRAME_1): New.
9400 (IPA_NEXT_TRACEFRAME): New.
9401 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9402 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9403 (gdb_jump_pad_buffer_end): New.
9404 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9405 (initialize_tracepoint): Adjust.
9406 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9407 buffer. Initialize the low module.
9408 * utils.c (PREFIX, TOOLNAME): New.
9409 (malloc_failure): Use PREFIX.
9410 (error): In the IPA, an error causes an exit.
9411 (fatal, warning): Use PREFIX.
9412 (internal_error): Use TOOLNAME.
9413 (NUMCELLS): Increase to 10.
9414 * configure, config.in: Regenerate.
9415
d149dd1d
PA
94162010-06-01 Pedro Alves <pedro@codesourcery.com>
9417
9418 * server.c (handle_query) <qSupported>: Do two passes over the
9419 qSupported string to avoid nesting strtok.
9420
f6528abd
JK
94212010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9422
9423 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9424 (CDEPS): New.
9425 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9426 -Wl,--dynamic-list.
9427 * configure: Regenerate.
9428 * proc-service.list: New.
9429
ca2a87a0
JK
94302010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9431
9432 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9433 New comment.
9434
363a6e9f
OS
94352010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9436
9437 * gdbreplay.c (remote_open): Check error return from socket() call by
9438 its equality to -1 not by it being negative.
9439 * remote-utils.c (remote_open): Likewise.
9440
d23b6cb1
PA
94412010-05-23 Pedro Alves <pedro@codesourcery.com>
9442
9443 * config.h: Regenerate.
9444
28d3cf85
MK
94452010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9446
9447 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9448 doesn't provide PTRACE_GET_THREAD_AREA.
9449
fea36a59
MK
94502010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9451
9452 * linux-m68k-low.c: Include <asm/ptrace.h>
9453 (ps_get_thread_area): Implement.
9454
24b066ba
DE
94552010-05-03 Doug Evans <dje@google.com>
9456
9457 * event-loop.c (struct callback_event): New struct.
9458 (callback_list): New global.
9459 (append_callback_event, delete_callback_event): New functions.
9460 (process_callback): New function.
9461 (start_event_loop): Call it.
9462 * remote-utils.c (NOT_SCHEDULED): Define.
9463 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9464 moved out of readchar.
9465 (readchar): Rewrite. Call reschedule before returning.
9466 (reset_readchar): New function.
9467 (remote_close): Call it.
9468 (process_remaining, reschedule): New functions.
9469 * server.h (callback_handler_func): New typedef.
9470 (append_callback_event, delete_callback_event): Declare.
9471
9836d6ea
PA
94722010-05-03 Pedro Alves <pedro@codesourcery.com>
9473
9474 * proc-service.c (ps_pglobal_lookup): Use
9475 thread_db_look_up_one_symbol.
9476 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9477 parameter. Use it instead of all_symbols_looked_up.
9478 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9479 field.
9480 (all_symbols_looked_up): Don't declare.
9481 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9482 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9483 field.
9484 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9485 Set all_symbols_looked_up here.
9486 (thread_db_look_up_one_symbol): New.
9487 (thread_db_get_tls_address): Adjust.
9488 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9489 thread_db object on the heap, and tentatively set it in the
9490 process structure.
9491 (thread_db_init): Don't set all_symbols_looked_up here.
9492 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9493
7984d532
PA
94942010-05-03 Pedro Alves <pedro@codesourcery.com>
9495
9496 * linux-low.c (linux_kill, linux_detach): Adjust.
9497 (status_pending_p_callback): Remove redundant statement. Check
9498 for !TARGET_WAITIKIND_IGNORE, instead of
9499 TARGET_WAITKIND_STOPPED.
9500 (handle_tracepoints): Make sure LWP is locked. Adjust.
9501 (linux_wait_for_event_1): Adjust.
9502 (linux_cancel_breakpoints): New.
9503 (unsuspend_one_lwp): New.
9504 (unsuspend_all_lwps): New.
9505 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9506 (send_sigstop_callback): Change return type to int, add new
9507 `except' parameter and handle it.
9508 (suspend_and_send_sigstop_callback): New.
9509 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9510 pass them down. If SUSPEND, also increment the lwp's suspend
9511 count.
9512 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9513 (need_step_over_p): Don't consider suspended LWPs.
9514 (start_step_over): Adjust.
9515 (proceed_one_lwp): Change return type to int, add new `except'
9516 parameter and handle it.
9517 (unsuspend_and_proceed_one_lwp): New.
9518 (proceed_all_lwps): Use find_inferior instead of
9519 for_each_inferior.
9520 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9521 also decrement the suspend count of LWPs. Pass `except' down,
9522 instead of hacking its suspend count.
9523 (linux_pause_all): Add `freeze' parameter. Adjust.
9524 (linux_unpause_all): New.
9525 (linux_target_ops): Install linux_unpause_all.
9526 * server.c (handle_status): Adjust.
9527 * target.h (struct target_ops): New fields `unpause_all' and
9528 `cancel_breakpoints'. Add new parameter to `pause_all'.
9529 (pause_all): Add new `freeze' parameter.
9530 (unpause_all): New.
9531 (cancel_breakpoints): New.
9532 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9533 cancel breakpoints.
9534 (cmd_qtstart): Pause threads.
9535 (stop_tracing): Pause threads, and cancel breakpoints.
9536 * win32-low.c (win32_target_ops): Adjust.
9537
e471f25b
PA
95382010-05-03 Pedro Alves <pedro@codesourcery.com>
9539
9540 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9541 the inferior right away from here...
9542 (linux_wait_1): ... to here, and adjust to check the thread's
9543 last_resume_kind instead of the lwp's step or stop_expected flags.
9544
1915ef4f
PA
95452010-05-02 Pedro Alves <pedro@codesourcery.com>
9546
9547 * README: Use consistent `GDB' and `GDBserver' spellings.
9548
f9e39928
PA
95492010-05-02 Pedro Alves <pedro@codesourcery.com>
9550
9551 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9552 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9553 (linux_detach_one_lwp): Assume the lwp is stopped.
9554 (any_thread_of): Delete.
9555 (linux_detach): Stop all lwps here. Don't blindly delete all
9556 breakpoints.
9557 (delete_lwp_callback): New.
9558 (linux_mourn): Delete all lwps of the process that is gone.
9559 (linux_wait_1): Don't delete the last lwp of the process here.
9560 * mem-break.h (mark_breakpoints_out): Declare.
9561 * mem-break.c (mark_breakpoints_out): New.
9562 (free_all_breakpoints): Use it.
9563 * server.c (handle_target_event): If the process is gone, mark
9564 breakpoints out.
9565 * thread-db.c (struct thread_db) <create_bp>: New field.
9566 (thread_db_enable_reporting): Fix prototype. Store a thread event
9567 breakpoint reference in the thread_db struct.
9568 (thread_db_load_search): Clear the thread_db object.
9569 (try_thread_db_load_1): Ditto.
9570 (switch_to_process): New.
9571 (disable_thread_event_reporting): Use it.
9572 (remove_thread_event_breakpoints): New.
9573 (thread_db_detach, thread_db_mourn): Use it.
9574
1e7fc18c
PA
95752010-05-01 Pedro Alves <pedro@codesourcery.com>
9576
9577 * linux-low.c (linux_enable_event_reporting): New.
9578 (linux_wait_for_event_1, handle_extended_wait): Use it.
9579
02fc4de7
PA
95802010-04-30 Pedro Alves <pedro@codesourcery.com>
9581
9582 * linux-low.c (linux_kill_one_lwp, linux_kill)
9583 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9584 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9585 SIGSTOP even if the LWP is stopped.
9586 (send_sigstop_callback): New.
9587 (stop_all_lwps): Use send_sigstop_callback instead.
9588 (linux_resume_one_thread): Adjust.
9589 (proceed_one_lwp): Still proceed an LWP that the client has
9590 requested to stop, if we haven't reported it as stopped yet. Make
9591 sure that LWPs the client want stopped, have a pending SIGSTOP.
9592
bc3b5632
DE
95932010-04-26 Doug Evans <dje@google.com>
9594
ae1ada35
DE
9595 * server.c (handle_general_set): Make static.
9596
bc3b5632
DE
9597 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9598 Print received char after testing for error/eof instead of before.
9599 (input_interrupt): Tweak comment.
9600
65730243
DE
96012010-04-23 Doug Evans <dje@google.com>
9602
9603 * server.c (start_inferior): Print inferior argv if --debug.
9604
a8ae7dc0
AR
96052010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9606
9607 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9608 * nto-x86-low.c: Include server.h
9609
1c07cc19
PM
96102010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9611
9612 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9613 be consistent with other sources of this directory.
9614 (init_registers_amd64): Correct name of source file of this function
9615 in the comment.
9616
e0a61e09
PM
96172010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9618
9619 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9620 64-bit executables.
9621
54709339
PM
96222010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9623
9624 * win32-i386-low.c: Add 64-bit support.
9625 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9626 (init_registers_amd64): Declare.
9627 (mappings): Add 64-bit version of array.
9628 (init_windows_x86): New function.
9629 (the_low_target): Change init_arch field to init_windows_x86.
9630
e8f0053d
PM
96312010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9632
9633 * win32-low.c: Adapt to support also 64-bit architecture.
9634 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9635 (get_image_name): Use SIZE_T type for local variable `done'.
9636 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9637 (toolhelp_get_dll_name): Idem.
9638 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9639 Use uintptr_t typecast to avoid warning.
9640 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9641 (handle_exception): Use phex_nz to avoid warning.
9642 (win32_wait): Remove unused local variable `process'.
9643
c481e77e
PM
96442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9645
9646 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9647 `amd64-avx.o'.
9648
12ea4b69
PM
96492010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9650
9651 * configure.ac: Use `ws2_32' library for srv_mingw.
9652 * configure: Regenerate.
9653 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9654 * remote-utils.c: Likewise.
9655
f6d1620c
L
96562010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9657
9658 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9659 if __x86_64__ is defined.
9660
8e642873
PM
96612010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9662
9663 * configure: Regenerate.
9664
711e434b
PM
96652010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9666
9667 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9668 * target.h (target_ops): New get_tib_address field.
9669 * win32-low.h (win32_thread_info): Add thread_local_base field.
9670 * win32-low.c (child_add_thread): Add tlb argument.
9671 Set thread_local_base field to TLB.
9672 (get_child_debug_event): Adapt to child_add_thread change.
9673 (win32_get_tib_address): New function.
9674 (win32_target_ops): Set get_tib_address field to
9675 win32_get_tib_address.
9676 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9677
505106cd
PA
96782010-04-12 Pedro Alves <pedro@codesourcery.com>
9679
505106cd
PA
9680 * linux-low.c (linux_mourn): Also remove the process.
9681 * server.c (handle_target_event): Don't remove the process here.
9682 * nto-low.c (nto_mourn): New.
9683 (nto_target_ops): Install it.
9684 * spu-low.c (spu_mourn): New.
9685 (spu_target_ops): Install it.
9686 * win32-low.c (win32_mourn): New.
9687 (win32_target_ops): Install it.
9688
e8470a06
PA
96892010-04-12 Pedro Alves <pedro@codesourcery.com>
9690
9691 * server.h (buffer_xml_printf): Remove redundant `;'.
9692
45ba0d02
PA
96932010-04-12 Pedro Alves <pedro@codesourcery.com>
9694
9695 * regcache.c (set_register_cache): Invalidate regcaches before
9696 changing the register cache layout.
9697 (regcache_invalidate_one): Allow a NULL regcache.
9698 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9699 regcaches before changing the register cache layout or the target
9700 regsets.
9701
59e04013
L
97022010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9703
9704 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9705 variable warning on Linux/x86-64.
9706
8336d594
PA
97072010-04-11 Pedro Alves <pedro@codesourcery.com>
9708
9709 GDBserver disconnected tracing support.
9710
9711 * linux-low.c (linux_remove_process): Delete.
9712 (add_lwp): Don't set last_resume_kind here.
9713 (linux_kill): Use `mourn'.
9714 (linux_detach): Use `thread_db_detach', and `mourn'.
9715 (linux_mourn): New.
9716 (linux_attach_lwp_1): Adjust comment.
9717 (linux_attach): last_resume_kind moved the thread_info; adjust.
9718 (status_pending_p_callback): Adjust.
9719 (linux_wait_for_event_1): Adjust.
9720 (count_events_callback, select_singlestep_lwp_callback)
9721 (select_event_lwp_callback, cancel_breakpoints_callback)
9722 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9723 (proceed_one_lwp): Adjust.
9724 (linux_async): Add debug output.
9725 (linux_thread_stopped): New.
9726 (linux_pause_all): New.
9727 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9728 linux_pause_all.
9729 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9730 (thread_db_free): Delete declaration.
9731 (thread_db_detach, thread_db_mourn): Declare.
9732 * thread-db.c (thread_db_init): Use thread_db_mourn.
9733 (thread_db_free): Delete, split in two.
9734 (disable_thread_event_reporting): New.
9735 (thread_db_detach): New.
9736 (thread_db_mourn): New.
9737
9738 * server.h (struct thread_info) <last_resume_kind>: New field.
9739 <attached>: Add comment.
9740 <gdb_detached>: New field.
9741 (handler_func): Change return type to int.
9742 (handle_serial_event, handle_target_event): Ditto.
9743 (gdb_connected): Declare.
9744 (tracing): Delete.
9745 (disconnected_tracing): Declare.
9746 (stop_tracing): Declare.
9747
9748 * server.c (handle_query) <qSupported>: Report support for
9749 disconnected tracing.
9750 (queue_stop_reply_callback): Account for running threads.
9751 (gdb_wants_thread_stopped): New.
9752 (gdb_wants_all_threads_stopped): New.
9753 (gdb_reattached_process): New.
9754 (handle_status): Clear the `gdb_detached' flag of all processes.
9755 In all-stop, stop all threads.
9756 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9757 (process_serial_event): If the remote connection breaks, or if an
9758 exit was forced with "monitor exit", force an event loop exit.
9759 Handle disconnected tracing on detach.
9760 (handle_serial_event): Adjust.
9761 (handle_target_event): If GDB isn't connected, forward events back
9762 to the inferior, unless the last process exited, in which case,
9763 exit gdbserver. Adjust interface.
9764
9765 * remote-utils.c (remote_open): Don't block in accept. Instead
9766 register an event loop source on the listen socket file
9767 descriptor. Refactor bits into ...
9768 (listen_desc): ... this new global.
9769 (gdb_connected): ... this new function.
9770 (enable_async_notification): ... this new function.
9771 (handle_accept_event): ... this new function.
9772 (remote_close): Clear remote_desc.
9773
9774 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9775
9776 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9777 New fields.
9778 (mourn_inferior): Define.
9779 (target_process_qsupported): Avoid the dangling else problem.
9780 (thread_stopped): Define.
9781 (pause_all): Define.
9782 (target_waitstatus_to_string): Declare.
9783 * target.c (target_waitstatus_to_string): New.
9784
9785 * tracepoint.c (tracing): Make extern.
9786 (disconnected_tracing): New.
9787 (stop_tracing): Make extern. Handle tracing stops due to GDB
9788 disconnecting.
9789 (cmd_qtdisconnected): New.
9790 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9791 (handle_tracepoint_general_set): Handle QTDisconnected.
9792
9793 * event-loop.c (event_handler_func): Change return type to int.
9794 (process_event): Bail out if the event handler wants the event
9795 loop to stop.
9796 (handle_file_event): Ditto.
9797 (start_event_loop): Bail out if the event handler wants the event
9798 loop to stop.
9799
9800 * nto-low.c (nto_target_ops): Adjust.
9801 * spu-low.c (spu_wait): Don't remove the process here.
9802 (spu_target_ops): Adjust.
9803 * win32-low.c (win32_wait): Don't remove the process here.
9804 (win32_target_ops): Adjust.
9805
5d267c4c
PA
98062010-04-11 Pedro Alves <pedro@codesourcery.com>
9807
9808 * regcache.c (realloc_register_cache): Invalidate inferior's
9809 regcache before recreating it.
9810
623ccd72
PA
98112010-04-09 Pedro Alves <pedro@codesourcery.com>
9812
9813 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9814
219f2f23
PA
98152010-04-09 Stan Shebs <stan@codesourcery.com>
9816 Pedro Alves <pedro@codesourcery.com>
9817
9818 * server.h (LONGEST): New.
9819 (struct thread_info) <while_stepping>: New field.
9820 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9821 Declare.
9822 (initialize_tracepoint, handle_tracepoint_general_set)
9823 (handle_tracepoint_query, tracepoint_finished_step)
9824 (tracepoint_was_hit, release_while_stepping_state_list):
9825 (current_traceframe): Declare.
9826 * server.c (handle_general_set): Handle tracepoint packets.
9827 (read_memory): New.
9828 (write_memory): New.
9829 (handle_search_memory_1): Use read_memory.
9830 (handle_query): Report support for conditional tracepoints, trace
9831 state variables, and tracepoint sources. Handle tracepoint
9832 queries.
9833 (main): Initialize the tracepoints module.
9834 (process_serial_event): Handle traceframe reads/writes.
9835
9836 * linux-low.c (handle_tracepoints): New.
9837 (linux_wait_1): Call it.
9838 (linux_resume_one_lwp): Handle while-stepping.
9839 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9840 (linux_target_ops): Install them.
9841 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9842 New field.
9843 * linux-x86-low.c (x86_supports_tracepoints): New.
9844 (the_low_target). Install it.
9845
9846 * mem-break.h (delete_breakpoint): Declare.
9847 * mem-break.c (delete_breakpoint): Make external.
9848
9849 * target.h (struct target_ops): Add `supports_tracepoints',
9850 `read_pc', and `write_pc' fields.
9851 (target_supports_tracepoints): Define.
9852 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9853 (phex_nz): New.
9854
9855 * regcache.h (struct regcache) <registers_owned>: New field.
9856 (init_register_cache, regcache_cpy): Declare.
9857 (regcache_read_pc, regcache_write_pc): Declare.
9858 (register_cache_size): Declare.
9859 (supply_regblock): Declare.
9860 * regcache.c (init_register_cache): New.
9861 (new_register_cache): Use it.
9862 (regcache_cpy): New.
9863 (register_cache_size): New.
9864 (supply_regblock): New.
9865 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9866
219f2f23
PA
9867 * tracepoint.c: New.
9868
9869 * Makefile.in (OBS): Add tracepoint.o.
9870 (tracepoint.o): New rule.
9871
3a13a53b
L
98722010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9873
9874 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9875 (i386-mmx.o): New.
9876 (i386-mmx.c): Likewise.
9877 (i386-mmx-linux.o): Likewise.
9878 (i386-mmx-linux.c): Likewise.
9879
9880 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9881 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9882 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9883 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9884
9885 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9886 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9887 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9888
1570b33e
L
98892010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9890
9891 * Makefile.in (clean): Updated.
9892 (i386-avx.o): New.
9893 (i386-avx.c): Likewise.
9894 (i386-avx-linux.o): Likewise.
9895 (i386-avx-linux.c): Likewise.
9896 (amd64-avx.o): Likewise.
9897 (amd64-avx.c): Likewise.
9898 (amd64-avx-linux.o): Likewise.
9899 (amd64-avx-linux.c): Likewise.
9900
9901 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9902 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9903 (srv_amd64_regobj): Add amd64-avx.o.
9904 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9905 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9906 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9907 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9908 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9909 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9910 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9911
9912 * i387-fp.c: Include "i386-xstate.h".
9913 (i387_xsave): New.
9914 (i387_cache_to_xsave): Likewise.
9915 (i387_xsave_to_cache): Likewise.
9916 (x86_xcr0): Likewise.
9917
9918 * i387-fp.h (i387_cache_to_xsave): Likewise.
9919 (i387_xsave_to_cache): Likewise.
9920 (x86_xcr0): Likewise.
9921
9922 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9923 * linux-crisv32-low.c (target_regsets): Likewise.
9924 * linux-m68k-low.c (target_regsets): Likewise.
9925 * linux-mips-low.c (target_regsets): Likewise.
9926 * linux-ppc-low.c (target_regsets): Likewise.
9927 * linux-s390-low.c (target_regsets): Likewise.
9928 * linux-sh-low.c (target_regsets): Likewise.
9929 * linux-sparc-low.c (target_regsets): Likewise.
9930 * linux-xtensa-low.c (target_regsets): Likewise.
9931
9932 * linux-low.c: Include <sys/uio.h>.
9933 (regsets_fetch_inferior_registers): Support nt_type.
9934 (regsets_store_inferior_registers): Likewise.
9935 (linux_process_qsupported): New.
9936 (linux_target_ops): Add linux_process_qsupported.
9937
9938 * linux-low.h (regset_info): Add nt_type.
9939 (linux_target_ops): Add process_qsupported.
9940
9941 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9942 and <sys/uio.h>.
9943 (init_registers_i386_avx_linux): New.
9944 (init_registers_amd64_avx_linux): Likewise.
9945 (xmltarget_i386_linux_no_xml): Likewise.
9946 (xmltarget_amd64_linux_no_xml): Likewise.
9947 (PTRACE_GETREGSET): Likewise.
9948 (PTRACE_SETREGSET): Likewise.
9949 (x86_fill_xstateregset): Likewise.
9950 (x86_store_xstateregset): Likewise.
9951 (use_xml): Likewise.
9952 (x86_linux_update_xmltarget): Likewise.
9953 (x86_linux_process_qsupported): Likewise.
9954 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9955 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9956 init_registers_i386_linux here. Call
9957 x86_linux_update_xmltarget.
9958 (the_low_target): Add x86_linux_process_qsupported.
9959
9960 * server.c (handle_query): Call target_process_qsupported.
9961
9962 * target.h (target_ops): Add process_qsupported.
9963 (target_process_qsupported): New.
9964
fc7238bb
PA
99652010-04-03 Pedro Alves <pedro@codesourcery.com>
9966
9967 * inferiors.c (add_thread): Set last_status kind to
9968 TARGET_WAITKIND_IGNORE.
9969 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9970 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9971 (linux_wait_1): Move `thread' local definition to block that uses
9972 it. Don't NULL initialize `event_child'.
9973 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9974 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9975 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9976
bdabb078
PA
99772010-04-01 Pedro Alves <pedro@codesourcery.com>
9978
9979 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9980 an extended waitstatus, or by a watchpoint.
9981 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9982 thread was stepping or has been stopped by a watchpoint.
9983
d3bbe7a0
PA
99842010-04-01 Pedro Alves <pedro@codesourcery.com>
9985
9986 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9987 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9988 of another, then delete the previous, and validate all
9989 breakpoints.
9990 (validate_inserted_breakpoint): New.
9991 (delete_disabled_breakpoints): New.
9992 (validate_breakpoints): New.
9993 (check_mem_read): Validate breakpoints before trusting their
9994 shadow. Delete disabled breakpoints.
9995 (check_mem_write): Validate breakpoints before trusting they
9996 should be inserted. Delete disabled breakpoints.
9997 * mem-break.h (validate_breakpoints):
9998 * server.c (handle_query): Validate breakpoints when we see a
9999 qSymbol query.
10000
8b07ae33
PA
100012010-04-01 Pedro Alves <pedro@codesourcery.com>
10002
10003 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10004 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10005 if we could tell there's a GDB breakpoint at stop_pc.
10006 (need_step_over_p): Don't do a step over if we find a GDB
10007 breakpoint at the resume PC.
10008
10009 * mem-break.c (struct raw_breakpoint): New.
10010 (enum bkpt_type): New type `gdb_breakpoint'.
10011 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10012 fields. New field `raw'.
10013 (find_raw_breakpoint_at): New.
10014 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10015 breakpoint instead.
10016 (set_breakpoint_at): Adjust.
10017 (delete_raw_breakpoint): New.
10018 (release_breakpoint): New.
10019 (delete_breakpoint): Rename to...
10020 (delete_breakpoint_1): ... this. Add proc parameter. Use
10021 release_breakpoint. Return ENOENT.
10022 (delete_breakpoint): Reimplement.
10023 (find_breakpoint_at): Delete.
10024 (find_gdb_breakpoint_at): New.
10025 (delete_breakpoint_at): Delete.
10026 (set_gdb_breakpoint_at): New.
10027 (delete_gdb_breakpoint_at): New.
10028 (gdb_breakpoint_here): New.
10029 (set_reinsert_breakpoint): Use release_breakpoint.
10030 (uninsert_breakpoint): Rename to ...
10031 (uninsert_raw_breakpoint): ... this.
10032 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10033 (reinsert_raw_breakpoint): Change parameter type to
10034 raw_breakpoint.
10035 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10036 instead.
10037 (check_breakpoints): Adjust. Use release_breakpoint.
10038 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10039 (breakpoint_inserted_here): Ditto.
10040 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10041 Don't trust the breakpoint's shadow if it is not inserted.
10042 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10043 (delete_all_breakpoints): Adjust.
10044 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10045 use delete_breakpoint_1.
10046
10047 * mem-break.h (breakpoints_supported): Delete declaration.
10048 (set_gdb_breakpoint_at): Declare.
10049 (gdb_breakpoint_here): Declare.
10050 (delete_breakpoint_at): Delete.
10051 (delete_gdb_breakpoint_at): Declare.
10052
10053 * server.h (struct raw_breakpoint): Forward declare.
10054 (struct process_info): New field `raw_breakpoints'.
10055
10056 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10057 breakpoints.
10058
6bf5e0ba
PA
100592010-03-24 Pedro Alves <pedro@codesourcery.com>
10060
10061 * linux-low.c (status_pending_p_callback): Fix comment.
10062 (linux_wait_for_event_1): Move most of the internal breakpoint
10063 handling from here...
10064 (linux_wait_1): ... to here.
10065 (count_events_callback): New.
10066 (select_singlestep_lwp_callback): New.
10067 (select_event_lwp_callback): New.
10068 (cancel_breakpoints_callback): New.
10069 (select_event_lwp): New.
10070 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10071 priority to all LWPs that have had events that should be reported
10072 to the client. Cancel breakpoints when about to reporting the
10073 event to the client, not while stopping lwps. No longer cancel
10074 finished single-steps here.
10075 (cancel_finished_single_step): Delete.
10076 (cancel_finished_single_steps): Delete.
10077
414a389f
PA
100782010-03-24 Pedro Alves <pedro@codesourcery.com>
10079
10080 * mem-break.c (enum bkpt_type): New.
10081 (struct breakpoint): New field `type'.
10082 (set_breakpoint_at): Change return type to struct breakpoint
10083 pointer. Set type to `other_breakpoint' by default.
10084 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10085 in the breakpoint list.
10086 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10087 (reinsert_breakpoint): Rename to ...
10088 (reinsert_raw_breakpoint): ... this.
10089 (reinsert_breakpoints_at): Adjust.
10090 * mem-break.h (struct breakpoint): Declare.
10091 (set_breakpoint_at): Change return type to struct breakpoint
10092 pointer.
10093
2280c721
PA
100942010-03-24 Pedro Alves <pedro@codesourcery.com>
10095
10096 * server.c (handle_query): Assign, not compare.
10097
d50171e4
PA
100982010-03-24 Pedro Alves <pedro@codesourcery.com>
10099
10100 Teach linux gdbserver to step-over-breakpoints.
10101
10102 * linux-low.c (can_hardware_single_step): New.
10103 (supports_breakpoints): New.
10104 (handle_extended_wait): If stopping threads, read the stop pc of
10105 the new cloned LWP.
10106 (get_pc): New.
10107 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10108 low target doesn't support retrieving the PC.
10109 (add_lwp): Set last_resume_kind to resume_continue.
10110 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10111 (linux_attach): Don't clear stop_expected. Set the lwp's
10112 last_resume_kind to resume_stop.
10113 (linux_detach_one_lwp): Don't check for removed breakpoints.
10114 (check_removed_breakpoint): Delete.
10115 (status_pending_p): Rename to ...
10116 (status_pending_p_callback): ... this. Don't check for removed
10117 breakpoints. Don't consider threads that are stopped from GDB's
10118 perspective.
10119 (linux_wait_for_lwp): Always read the stop_pc here.
10120 (cancel_breakpoint): New.
10121 (step_over_bkpt): New global.
10122 (linux_wait_for_event_1): Implement stepping over breakpoints.
10123 (gdb_wants_lwp_stopped): New.
10124 (gdb_wants_all_stopped): New.
10125 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10126 single-step traps here. Store the thread's last reported target
10127 wait status.
10128 (send_sigstop): Don't clear stop_expected. Always set it,
10129 instead.
10130 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10131 (cancel_finished_single_step): New.
10132 (cancel_finished_single_steps): New.
10133 (wait_for_sigstop): Don't cancel finished single-step traps here.
10134 (linux_resume_one_lwp): Don't check for removed breakpoints.
10135 Don't set `step' on non-hardware step archs.
10136 (linux_set_resume_request): Ignore resume_stop requests if already
10137 stopping or stopped. Set the lwp's last_resume_kind.
10138 (resume_status_pending_p): Don't check for removed breakpoints.
10139 (need_step_over_p): New.
10140 (start_step_over): New.
10141 (finish_step_over): New.
10142 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10143 requests. Clear the thread's last reported target waitstatus.
10144 Don't use the `suspended' flag. Don't consider pending breakpoints.
10145 (linux_resume): Start a step-over if necessary.
10146 (proceed_one_lwp): New.
10147 (proceed_all_lwps): New.
10148 (unstop_all_lwps): New.
10149 * linux-low.h (struct lwp_info): Rewrite comment for the
10150 `suspended' flag. Add the `stop_pc' field. Delete the
10151 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10152 Add `'last_resume_kind' and `need_step_over' fields.
10153 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10154 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10155 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10156 (set_raw_breakpoint_at): New.
10157 (set_breakpoint_at): Rewrite to use it.
10158 (reinsert_breakpoint_handler): Delete.
10159 (set_reinsert_breakpoint): New.
10160 (reinsert_breakpoint_by_bp): Delete.
10161 (delete_reinsert_breakpoints): New.
10162 (uninsert_breakpoint): Rewrite.
10163 (uninsert_breakpoints_at): New.
10164 (reinsert_breakpoint): Rewrite.
10165 (reinsert_breakpoints_at): New.
10166 (check_breakpoints): Rewrite.
10167 (breakpoint_here): New.
10168 (breakpoint_inserted_here): New.
10169 (check_mem_read): Adjust.
10170 * mem-break.h (breakpoints_supported, breakpoint_here)
10171 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10172 (reinsert_breakpoint_by_bp): Delete declaration.
10173 (delete_reinsert_breakpoints): Declare.
10174 (reinsert_breakpoint): Delete declaration.
10175 (reinsert_breakpoints_at): Declare.
10176 (uninsert_breakpoint): Delete declaration.
10177 (uninsert_breakpoints_at): Declare.
10178 (check_breakpoints): Adjust prototype.
10179 * server.h: Adjust include order.
10180 (struct thread_info): Declare here. Add a `last_status' field.
10181
30ba68cb
MS
101822010-03-23 Michael Snyder <msnyder@vmware.com>
10183
10184 * server.c (crc32): New function.
10185 (handle_query): Add handling for 'qCRC:' request.
10186
b9a881c2
PA
101872010-03-23 Pedro Alves <pedro@codesourcery.com>
10188
10189 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10190 lwp had been stopped by a watchpoint.
10191
e92d13d5
PA
101922010-03-16 Pedro Alves <pedro@codesourcery.com>
10193
10194 * server.h (internal_error): Declare.
10195 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10196 * utils.c (internal_error): New function.
10197
64daa791
AS
101982010-03-15 Andreas Schwab <schwab@redhat.com>
10199
10200 * configure.srv: Fix typo setting srv_regobj.
10201
f52cd8cd
PA
102022010-03-15 Pedro Alves <pedro@codesourcery.com>
10203
10204 * linux-low.c (fetch_register): Avoid passing a non string literal
10205 format to `error'.
10206 (usr_store_inferior_registers): Ditto.
10207
93ae6fdc
PA
102082010-03-14 Pedro Alves <pedro@codesourcery.com>
10209
10210 * linux-low.c (linux_write_memory): Bail out early if peeking
10211 memory failed.
10212
c3adc08c
PA
102132010-03-14 Pedro Alves <pedro@codesourcery.com>
10214
10215 * linux-low.h (struct lwp_info): New fields
10216 `stopped_by_watchpoint' and `stopped_data_address'.
10217 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10218 here, and cache them in the lwp object.
10219 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10220 directly.
10221 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10222 field.
10223 (linux_stopped_by_watchpoint): Rewrite.
10224 (linux_stopped_data_address): Rewrite.
10225
bce522a2
PA
102262010-03-06 Simo Melenius <simo.melenius@iki.fi>
10227
10228 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10229 switching the current inferior, not before.
10230
90884b2b
L
102312010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10232
10233 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10234 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10235 i386-linux.c and amd64-linux.c.
10236 (reg-i386.o): Removed.
10237 (reg-i386.c): Likewise.
10238 (reg-i386-linux.o): Likewise.
10239 (reg-i386-linux.c): Likewise.
10240 (reg-x86-64.o): Likewise.
10241 (reg-x86-64.c): Likewise.
10242 (reg-x86-64-linux.o): Likewise.
10243 (reg-x86-64-linux.c): Likewise.
10244 (i386.o): New.
10245 (i386.c): Likewise.
10246 (i386-linux.o): Likewise.
10247 (i386-linux.c): Likewise.
10248 (amd64.o): Likewise.
10249 (amd64.c): Likewise.
10250 (amd64-linux.o): Likewise.
10251 (amd64-linux.c): Likewise.
10252
10253 * configure.srv (srv_i386_regobj): New.
10254 (srv_i386_linux_regobj): Likewise.
10255 (srv_amd64_regobj): Likewise.
10256 (srv_amd64_linux_regobj): Likewise.
10257 (srv_i386_32bit_xmlfiles): Likewise.
10258 (srv_i386_64bit_xmlfiles): Likewise.
10259 (srv_i386_xmlfiles): Likewise.
10260 (srv_amd64_xmlfiles): Likewise.
10261 (srv_i386_linux_xmlfiles): Likewise.
10262 (srv_amd64_linux_xmlfiles): Likewise.
10263 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10264 srv_xmlfiles to $srv_i386_xmlfiles.
10265 (i[34567]86-*-mingw32ce*): Likewise.
10266 (i[34567]86-*-mingw*): Likewise.
10267 (i[34567]86-*-nto*): Likewise.
10268 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10269 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10270 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10271 (x86_64-*-linux*): Likewise.
10272
10273 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10274 (init_registers_amd64_linux): New.
10275 (x86_arch_setup): Replace init_registers_x86_64_linux with
10276 init_registers_amd64_linux.
10277
193f13e6
MK
102782010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10279
10280 * configure.ac: Check for libdl. If it is not available link against
10281 static libthread_db.
10282 * configure: Regenerate.
10283
85d721b8
PA
102842010-02-22 Pedro Alves <pedro@codesourcery.com>
10285
10286 PR9605
10287
10288 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10289 handing a read watchpoint.
10290 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10291
6076632b
DE
102922010-02-12 Doug Evans <dje@google.com>
10293
10294 * linux-low.c (linux_supports_tracefork_flag): Document.
10295 (linux_look_up_symbols): Add comment.
10296
3327ccf7
L
102972010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10298
10299 * regcache.c (supply_register): Clear regcache if buf is NULL.
10300
0718675c 103012010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10302 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10303
10304 * inferiors.c (find_inferior): Add function documentation.
10305 (unloaded_dll): Handle the case where the unloaded dll has not
10306 been previously registered in the dll list.
10307
177321bd
DJ
103082010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10309
10310 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10311 (thumb2_breakpoint): New.
10312 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10313
2b009048
DJ
103142010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10315
10316 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10317 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10318 breakpoints.
10319
3be029c7
PA
103202010-01-21 Pedro Alves <pedro@codesourcery.com>
10321
10322 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10323
18f5de3b
JK
103242010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10325
10326 * linux-s390-low.c (s390_collect_ptrace_register)
10327 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10328
3743bb4f
DE
103292010-01-21 Doug Evans <dje@google.com>
10330
14ce3065
DE
10331 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10332 (PTRACE_ARG4_TYPE): New macro.
10333 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10334 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10335 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10336 (usr_store_inferior_registers): Ditto.
10337 (linux_read_memory, linux_write_memory): Ditto.
10338 (linux_test_for_tracefork): Ditto.
10339
3743bb4f
DE
10340 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10341 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10342
8b315be5
PA
103432010-01-21 Pedro Alves <pedro@codesourcery.com>
10344
10345 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10346 target.
10347
85492558
PA
103482010-01-21 Pedro Alves <pedro@codesourcery.com>
10349
10350 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10351 prototype to take a regcache. Adjust.
10352
442ea881
PA
103532010-01-20 Pedro Alves <pedro@codesourcery.com>
10354
10355 * regcache.h (struct thread_info): Forward declare.
10356 (struct regcache): New.
10357 (new_register_cache): Adjust prototype.
10358 (get_thread_regcache): Declare.
10359 (free_register_cache): Adjust prototype.
10360 (registers_to_string, registers_from_string): Ditto.
10361 (supply_register, supply_register_by_name, collect_register)
10362 (collect_register_as_string, collect_register_by_name): Ditto.
10363 * regcache.c (struct inferior_regcache_data): Delete.
10364 (get_regcache): Rename to ...
10365 (get_thread_regcache): ... this. Adjust. Switch inferior before
10366 fetching registers.
10367 (regcache_invalidate_one): Adjust.
10368 (regcache_invalidate): Fix prototype.
10369 (new_register_cache): Return the new register cache.
10370 (free_register_cache): Change prototype.
10371 (realloc_register_cache): Adjust.
10372 (registers_to_string): Change prototype to take a regcache. Adjust.
10373 (registers_from_string): Ditto.
10374 (register_data): Ditto.
10375 (supply_register): Ditto.
10376 (supply_register_by_name): Ditto.
10377 (collect_register): Ditto.
10378 (collect_register_as_string): Ditto.
10379 (collect_register_by_name): Ditto.
10380 * server.c (process_serial_event): Adjust.
10381 * linux-low.h (regset_fill_func, regset_store_func): Change
10382 prototype.
10383 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10384 Change prototype.
10385 * linux-low.c (get_stop_pc): Adjust.
10386 (check_removed_breakpoint): Adjust.
10387 (linux_wait_for_event): Adjust.
10388 (linux_resume_one_lwp): Adjust.
10389 (fetch_register): Add regcache parameter. Adjust.
10390 (usr_store_inferior_registers): Ditto.
10391 (regsets_fetch_inferior_registers): Ditto.
10392 (regsets_store_inferior_registers): Ditto.
10393 (linux_fetch_registers, linux_store_registers): Ditto.
10394 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10395 regcache. Adjust.
43aaf8b6
PA
10396 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10397 Ditto.
442ea881
PA
10398 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10399 prototype to take a regcache.
10400 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10401 * remote-utils.c (convert_ascii_to_int, outreg)
10402 (prepare_resume_reply): Change prototype to take a regcache.
10403 Adjust.
10404 * target.h (struct target_ops) <fetch_registers, store_registers>:
10405 Change prototype to take a regcache.
10406 (fetch_inferior_registers, store_inferior_registers): Change
10407 prototype to take a regcache. Adjust.
10408 * proc-service.c (ps_lgetregs): Adjust.
10409 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10410 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10411 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10412 take a regcache. Adjust.
10413 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10414 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10415 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10416 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10417 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10418 (cris_cannot_fetch_register):
10419 (cris_breakpoint_at): Change prototype to take a regcache.
10420 Adjust.
10421 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10422 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10423 to take a regcache. Adjust.
10424 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10425 Adjust.
10426 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10427 take a regcache. Adjust.
10428 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10429 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10430 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10431 * linux-mips-low.c (mips_get_pc):
10432 (mips_set_pc): Change prototype to take a regcache. Adjust.
10433 (mips_reinsert_addr): Adjust.
10434 (mips_collect_register): Change prototype to take a regcache.
10435 Adjust.
10436 (mips_supply_register):
10437 (mips_collect_register_32bit, mips_supply_register_32bit)
10438 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10439 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10440 * linux-ppc-low.c (ppc_supply_ptrace_register)
10441 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10442 (parse_spufs_run): Adjust.
10443 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10444 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10445 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10446 take a regcache. Adjust.
10447 * linux-s390-low.c (s390_collect_ptrace_register)
10448 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10449 (s390_set_pc): Change prototype to take a regcache. Adjust.
10450 (s390_arch_setup): Adjust.
10451 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10452 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10453 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10454 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10455 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10456 regcache. Adjust.
10457 (sparc_breakpoint_at): Adjust.
10458 * linux-xtensa-low.c (xtensa_fill_gregset):
10459 (xtensa_store_gregset):
10460 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10461 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10462 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10463 prototype to take a regcache. Adjust.
10464 * win32-arm-low.c (arm_fetch_inferior_register)
10465 (arm_store_inferior_register): Change prototype to take a
10466 regcache. Adjust.
10467 * win32-i386-low.c (i386_fetch_inferior_register)
10468 (i386_store_inferior_register): Change prototype to take a
10469 regcache. Adjust.
10470 * win32-low.c (child_fetch_inferior_registers)
10471 (child_store_inferior_registers): Change prototype to take a
10472 regcache. Adjust.
10473 (win32_wait): Adjust.
10474 (win32_fetch_inferior_registers): Change prototype to take a
10475 regcache. Adjust.
10476 (win32_store_inferior_registers): Adjust.
10477 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10478 store_inferior_register>: Change prototype to take a regcache.
10479
60c3d7b0
DE
104802010-01-20 Doug Evans <dje@google.com>
10481
10482 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10483 #ifdef.
10484 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10485 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10486
dc146f7c
VP
104872010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10488
10489 * linux-low.c (linux_core_of_thread): New.
10490 (compare_ints, show_process, list_threads): New.
10491 (linux_qxfer_osdata): Report threads and cores.
10492 (linux_target_op): Register linux_core_of_thread.
10493 * remote-utils.c (prepare_resume_reply): Report the core.
10494 (buffer_xml_printf): Support %d specifier.
10495 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10496 New.
10497 (handle_query): Handle qXfer:threads. Announce availability
10498 thereof.
10499 * target.h (struct target_ops): New field core_of_thread.
10500
7803799a
UW
105012010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10502
10503 * Makefile.in (clean): Remove new generated files.
10504 (reg-s390.o, reg-s390.c): Remove rules.
10505 (reg-s390x.o, reg-s390x.c): Likewise.
10506 (s390-linux32.o, s390-linux32.c): Add rules.
10507 (s390-linux64.o, s390-linux64.c): Likewise.
10508 (s390x-linux64.o, s390x-linux64.c): Likewise.
10509 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10510 * linux-s390-low.c: Include <elf.h>.
10511 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10512 (init_registers_s390): Remove prototype.
10513 (init_registers_s390x): Likewise.
10514 (init_registers_s390_linux32): Add prototype.
10515 (init_registers_s390_linux64): Likewise.
10516 (init_registers_s390x_linux64): Likewise.
10517 (s390_num_regs_3264): New define.
10518 (s390_regmap_3264): New global variable.
10519 (s390_cannot_fetch_register): Remove obsolete check.
10520 (s390_cannot_store_register): Likewise.
10521 (s390_collect_ptrace_register): Handle upper/lower register halves.
10522 (s390_supply_ptrace_register): Likewise.
10523 (s390_fill_gregset): Update to register number changes.
10524 (s390_get_hwcap): New routine.
10525 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10526 Install appropriate regmap and register set.
10527
6e7ffa39
JB
105282010-01-01 Joel Brobecker <brobecker@adacore.com>
10529
10530 * server.c (gdbserver_version): Update copyright year to 2010.
10531 * gdbreplay.c (gdbreplay_version): Likewise.
10532
957f3f49
DE
105332009-12-28 Doug Evans <dje@google.com>
10534
10535 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10536 elf/external.h. Include <elf.h> instead but only if necessary.
10537
ca5c370d
PA
105382009-12-28 Pedro Alves <pedro@codesourcery.com>
10539
10540 * linux-low.c (linux_remove_process): Remove `detaching'
10541 parameter. Don't release/detach from thread_db here.
10542 (linux_kill): Release/detach from thread_db here, ...
10543 (linux_detach): ... and here, before actually detaching.
10544 (linux_wait_1): ... and here, when a process exits.
10545 * thread-db.c (any_thread_of): New.
10546 (thread_db_free): Switch the current inferior to a thread of the
10547 passed in process.
10548
4ee62156
DE
105492009-12-21 Doug Evans <dje@google.com>
10550
d90e6a88
DE
10551 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10552
c5f62d5f
DE
10553 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10554 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10555 warning ifndef __NR_tkill. Move setting of errno there too.
10556 Delete unnecessary resetting of errno after syscall.
10557 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10558
10e86dd7
DE
10559 * configure.ac: Check for dladdr.
10560 * config.in: Regenerate.
10561 * configure: Regenerate.
10562 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10563 (try_thread_db_load): Update.
10564
4ee62156
DE
10565 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10566
00f515da
DE
105672009-12-18 Doug Evans <dje@google.com>
10568
e9464885
DE
10569 * event-loop.c: Include unistd.h if it exists.
10570
07d4f67e
DE
10571 * linux-low.c (my_waitpid): Move definition away from being in
10572 between linux_tracefork_child/linux_test_for_tracefork.
10573
00f515da
DE
10574 * gdb_proc_service.h (psaddr_t): Fix type.
10575 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10576 signature to match glibc.
10577
1de1badb
DE
105782009-12-16 Doug Evans <dje@google.com>
10579
10580 * linux-low.c (linux_read_memory): Fix argument to read.
10581
aeeb81d1
PA
105822009-11-26 Pedro Alves <pedro@codesourcery.com>
10583
10584 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10585 events, don't leave current_inferior pointing at null.
10586
10357975
PA
105872009-11-26 Pedro Alves <pedro@codesourcery.com>
10588
10589 * win32-low.c (LOG): Delete.
10590 (OUTMSG): Output to stderr.
10591 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10592 on compile time LOG macro.
10593 (win32_wait): Fix debug output.
10594
cf6e3471
PA
105952009-11-26 Pedro Alves <pedro@codesourcery.com>
10596
10597 * win32-low.c (win32_add_one_solib): If the dll name is
10598 "ntdll.dll", prepend the system directory to the dll path.
10599
0c85e18e
MK
106002009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10601
10602 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10603
9ac544ce 106042009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 10605 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
10606
10607 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10608 * configure.ac: Check for __mcoldfire__ and set
10609 gdb_cv_m68k_is_coldfire.
10610 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10611 reg-cf.o and reg-m68k.o.
10612 * configure: Regenerated.
10613
fd7dd3e6
PA
106142009-11-16 Pedro Alves <pedro@codesourcery.com>
10615
10616 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10617 Pass it to thread_db_free.
10618 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10619 proper `detaching' argument to linux_remove_process.
10620 * linux-low.h (thread_db_free): Add `detaching' parameter.
10621 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10622 to thread_db_free.
10623 (thread_db_free): Add `detaching' parameter. Only
10624 call td_ta_clear_event if detaching from process.
10625
75aa492e
MK
106262009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10627
10628 * thread-db.c (thread_db_free): Fix typo.
10629
21e1bee4
PP
106302009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10631
10632 PR gdb/10838
10633 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10634
8838b45e
NS
106352009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10636
10637 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10638 with an i686 compiler.
10639 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10640 needed.
10641 * configure: Rebuilt.
10642
8a35fb51
SL
106432009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10644
10645 PR gdb/10783
10646
10647 * server.c (handle_search_memory_1): Correct read_addr initialization
10648 in loop for searching subsequent chunks.
10649
96f15937
PP
106502009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10651
10652 * configure.ac: New --with-libthread-db option.
10653 * thread-db.c: Allow direct dependence on libthread_db.
10654 (thread_db_free): Adjust.
10655 * config.in: Regenerate.
10656 * configure: Likewise.
889bf7c5 10657
5f7d1694
PP
106582009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10659
10660 PR gdb/10757
10661 * thread-db.c (attach_thread): New function.
10662 (maybe_attach_thread): Return success/failure.
10663 (find_new_threads_callback): Adjust.
889bf7c5
PA
10664 (thread_db_find_new_threads): Loop until no new threads.
10665
88e3b899
PA
106662009-10-13 Pedro Alves <pedro@codesourcery.com>
10667
10668 * proc-service.c (ps_lgetregs): Formatting.
10669
cdbfd419
PP
106702009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10671
10672 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10673 * configure.ac: Adjust.
10674 * linux-low.h (struct process_info_private): Move members to struct
10675 thread_db.
10676 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10677 * linux-low.c (linux_remove_process): Adjust.
10678 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10679 * server.c (handle_query): Move code ...
10680 (handle_monitor_command): ... here. New function.
10681 * target.h (struct target_ops): New member.
10682 * thread-db.c (struct thread_db): New.
10683 (libthread_db_search_path): New variable.
10684 (thread_db_create_event, thread_db_enable_reporting)
10685 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10686 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10687 (try_thread_db_load_1, dladdr_to_soname): New functions.
10688 (try_thread_db_load, thread_db_load_search): New functions.
10689 (thread_db_init): Search for libthread_db.
10690 (thread_db_free): New function.
10691 (thread_db_handle_monitor_command): Likewise.
10692 * config.in: Regenerate.
10693 * configure: Regenerate.
889bf7c5 10694
4168d2d6
UW
106952009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10696
10697 * spu-low.c (spu_kill): Wait for inferior to terminate.
10698 Call clear_inferiors.
10699 (spu_detach): Call clear_inferiors.
10700
81ecdfbb
RW
107012009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10702
10703 * aclocal.m4: Regenerate.
10704 * config.in: Likewise.
10705 * configure: Likewise.
10706
0b9ff2c0
UW
107072009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10708
10709 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10710 (parse_spufs_run): New function.
10711 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10712 (ppc_breakpoint_at): Handle SPU breakpoints.
10713
efcbbd14
UW
107142009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10715
10716 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10717 (SPUFS_MAGIC): Define.
10718 (spu_enumerate_spu_ids): New function.
10719 (linux_qxfer_spu): New function.
10720 (linux_target_ops): Install linux_qxfer_spu.
10721
f4d9bade
UW
107222009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10723
10724 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10725 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10726 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10727 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10728 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10729 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10730 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10731 (init_registers_powerpc_cell32l): Add prototype.
10732 (init_registers_powerpc_cell64l): Likewise.
10733 (ppc_arch_setup): Detect Cell/B.E. architecture.
10734
96e946ca
RW
107352009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10736
10737 * Makefile.in (datarootdir): New variable.
10738
58d6951d
DJ
107392009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10740
10741 * linux-low.c (linux_write_memory): Update debugging output.
10742 * Makefile.in (clean): Add new descriptions.
10743 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10744 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10745 * configure.srv: Add new files for arm*-*-linux*.
10746 * linux-arm-low.c: Add new declarations.
10747 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10748 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10749 (HWCAP_VFPv3D16): New.
10750 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10751 instead of __IWMMXT__.
10752 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10753 (arm_arch_setup): New.
10754 (target_regsets): Remove #ifdef. Add VFP regset.
10755 (the_low_target): Use arm_arch_setup.
10756
12b42a12
DJ
107572009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10758
10759 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10760 the main thread again.
10761
ac8c974e
AR
107622009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10763
10764 Adding Neutrino gdbserver.
10765 * configure: Regenerated.
10766 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10767 * configure.srv (i[34567]86-*-nto*): New target.
10768 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10769 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10770 (nto_comctrl) [__QNX__]: New function.
10771 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10772
4424e0c3 107732009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
10774
10775 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10776 srv_tgtobj.
10777
912cf4ba
PA
107782009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10779 Pedro Alves <pedro@codesourcery.com>
10780
10781 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10782 don't support CONTEXT_EXTENDED_REGISTERS.
10783 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10784 (the_low_target): Install them.
10785 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10786 failing with ERROR_PIPE_NOT_CONNECTED.
10787
aa5ca48f
DE
107882009-06-30 Doug Evans <dje@google.com>
10789 Pierre Muller <muller@ics.u-strasbg.fr>
10790
10791 Add h/w watchpoint support to x86-linux, win32-i386.
10792 * Makefile.in (SFILES): Add i386-low.c
10793 (i386_low_h): Define.
10794 (i386-low.o): Add dependencies.
10795 (linux-x86-low.o): Add i386-low.h dependency.
10796 (win32-i386-low.o): Ditto.
10797 * i386-low.c: New file.
10798 * i386-low.h: New file.
10799 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10800 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10801 * linux-low.c (linux_add_process): Initialize arch_private.
10802 (linux_remove_process): Free arch_private.
10803 (add_lwp): Initialize arch_private.
10804 (delete_lwp): Free arch_private.
10805 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10806 provided.
10807 * linux-low.h (process_info_private): New member arch_private.
10808 (lwp_info): New member arch_private.
10809 (linux_target_ops): New members new_process, new_thread,
10810 prepare_to_resume.
10811 (ptid_of): New macro.
10812 * linux-x86-low.c: Include stddef.h, i386-low.h.
10813 (arch_process_info): New struct.
10814 (arch_lwp_info): New struct.
10815 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10816 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10817 (i386_dr_low_get_status): New function.
10818 (x86_insert_point, x86_remove_point): New functions.
10819 (x86_stopped_by_watchpoint): New function.
10820 (x86_stopped_data_address): New function.
10821 (x86_linux_new_process, x86_linux_new_thread): New functions.
10822 (x86_linux_prepare_to_resume): New function.
10823 (the_low_target): Add entries for insert_point, remove_point,
10824 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10825 prepare_to_resume.
10826 * server.c (debug_hw_points): New global.
10827 (monitor_show_help): Document set debug-hw-points.
10828 (handle_query): Process "set debug-hw-points".
10829 * server.h (debug_hw_points): Declare.
10830 (paddress): Declare.
10831 * utils.c (NUMCELLS, CELLSIZE): New macros.
10832 (get_sell, xsnprintf, paddress): New functions.
10833 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10834 remove_point, stopped_by_watchpoint, stopped_data_address.
10835 * win32-i386-low.c: Include i386-low.h.
10836 (debug_reg_state): Replaces dr.
10837 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10838 (i386_dr_low_get_status): New function.
10839 (i386_insert_point, i386_remove_point): New functions.
10840 (i386_stopped_by_watchpoint): New function.
10841 (i386_stopped_data_address): New function.
10842 (i386_initial_stuff): Update.
10843 (get_thread_context,set_thread_context,i386_thread_added): Update.
10844 (the_low_target): Add entries for insert_point,
10845 remove_point, stopped_by_watchpoint, stopped_data_address.
10846 * win32-low.c (win32_insert_watchpoint): New function.
10847 (win32_remove_watchpoint): New function.
10848 (win32_stopped_by_watchpoint): New function.
10849 (win32_stopped_data_address): New function.
10850 (win32_target_ops): Add entries for insert_watchpoint,
10851 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10852 * win32-low.h (win32_target_ops): New members insert_point,
10853 remove_point, stopped_by_watchpoint, stopped_data_address.
10854
d993e290
PA
108552009-06-25 Pedro Alves <pedro@codesourcery.com>
10856
10857 * server.c (process_serial_event): Re-return unsupported, not
10858 error, if the type isn't recognized. Re-allow supporting only
10859 insert or remove packets. Also call require_running for
10860 breakpoints. Add missing break statement to default case. Tidy.
10861 * target.h (struct target_ops): Rename insert_watchpoint to
10862 insert_point, and remove_watchpoint to remove_point.
10863
10864 * linux-low.h (struct linux_target_ops): Likewise.
10865 * linux-low.c (linux_insert_watchpoint): Rename to ...
10866 (linux_insert_point): ... this. Adjust.
10867 (linux_remove_watchpoint): Rename to ...
10868 (linux_remove_point): ... this. Adjust.
10869 (linux_target_ops): Adjust.
10870 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10871 (cris_insert_point): ... this.
10872 (cris_remove_watchpoint): Rename to ...
10873 (cris_remove_point): ... this.
10874 (the_low_target): Adjust.
10875
0f54c268
PM
108762009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10877
10878 * server.c (handle_v_kill): Pass signal_pid to
10879 kill_inferior if multi_process is zero.
10880
c6314022
AR
108812009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10882
10883 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10884 * target.h (target_ops): Comment for *_watchpoint to make it clear
10885 the functions can get types '0' and '1'.
10886
4463ce24
AR
108872009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10888
10889 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10890 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10891 * regcache.c (get_regcache): Likewise.
10892 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10893 * win32-low.c (child_fetch_inferior_registers): Remove check for
10894 regno 0.
10895
cf8fd78b
PA
108962009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10897 Pedro Alves <pedro@codesourcery.com>
10898
10899 * target.h (struct target_ops) <supports_multi_process>: New
10900 callback.
10901 (target_supports_multi_process): New.
10902 * server.c (handle_query): Even if GDB reports support, only
10903 enable multi-process if the target also supports it. Report
10904 multi-process support only if the target backend supports it.
10905 * linux-low.c (linux_supports_multi_process): New function.
10906 (linux_target_ops): Install it as target_supports_multi_process
10907 callback.
10908
47c0c975
DE
109092009-05-24 Doug Evans <dje@google.com>
10910
e09875d4
DE
10911 Global renaming of find_thread_pid to find_thread_ptid.
10912 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10913 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10914 All callers updated.
10915
e27d73f6
DE
10916 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10917 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10918 directly.
10919
47c0c975
DE
10920 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10921 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10922 (linux_resume_one_lwp): Ditto.
10923
2acc282a
DE
109242009-05-23 Doug Evans <dje@google.com>
10925
10926 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10927 from struct inferior_list_entry * to struct lwp_info *.
10928 All callers updated.
10929
9f1036c1
DE
109302009-05-13 Doug Evans <dje@google.com>
10931
10932 * linux-x86-low.c: Don't include assert.h.
10933 (x86_siginfo_fixup): Use fatal, not assert.
10934 (x86_arch_setup): Fix comment.
10935
d0722149
DE
109362009-05-12 Doug Evans <dje@google.com>
10937
10938 Biarch support for i386/amd64 gdbserver.
10939 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10940 Add linux-x86-low.c.
10941 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10942 (linux-x86-low.o): Add.
10943 * linux-x86-64-low.c: Delete.
10944 * linux-i386-low.c: Delete.
10945 * linux-x86-low.c: New file.
10946 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10947 linux-x86-low.o.
10948 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10949 linux-x86-low.o.
10950 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10951 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10952 (linux_child_pid_to_exec_file): New function.
10953 (elf_64_header_p, elf_64_file_p): New functions.
10954 (siginfo_fixup): New function.
10955 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10956 give target a chance to convert layout.
10957 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10958 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10959
fdeb2a12
DE
109602009-05-07 Doug Evans <dje@google.com>
10961
10962 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10963 (regsets_store_inferior_registers): Ditto.
10964
a6dbe5df
PA
109652009-05-06 Pedro Alves <pedro@codesourcery.com>
10966
10967 PR server/10048
10968
10969 * linux-low.c (must_set_ptrace_flags): Delete.
10970 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10971 of the global.
10972 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10973 `lwp->must_set_ptrace_flags' instead.
ba42693b 10974 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10975 (linux_wait_1): ... not here.
10976
5091eb23
DE
109772009-04-30 Doug Evans <dje@google.com>
10978
9f767825
DE
10979 * inferiors.c (started_inferior_callback): New function.
10980 (attached_inferior_callback): New function.
10981 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10982 * server.c (print_started_pid, print_attached_pid): New functions.
10983 (detach_or_kill_for_exit): New function.
10984 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10985 * server.h (have_started_inferiors_p): Declare.
10986 (have_attached_inferiors_p): Declare.
10987
5091eb23
DE
10988 * inferiors.c (remove_process): Fix memory leak, free process.
10989 * linux-low.c (linux_remove_process): New function.
10990 (linux_kill): Call it instead of remove_process.
10991 (linux_detach, linux_wait_1): Ditto.
10992
155c8968
PA
109932009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10994
10995 * configure.srv: Add x86 Windows CE target.
10996
7fe519cb
UW
109972009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10998
10999 * inferiors.c (get_thread_process): Make global.
11000 * server.h (get_thread_process): Add prototype.
11001 * thread-db.c (find_one_thread): Use get_thread_process
11002 instead of current_process.
11003 (thread_db_get_tls_address): Do not crash if called when
11004 thread layer is not yet initialized.
11005
5472f405
UW
110062009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11007
11008 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11009 * spu-low.c (current_tid): Rename to ...
11010 (current_ptid): ... this.
11011 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11012 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11013 ptid_get_lwp (current_ptid) instead of current_tid.
11014 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11015 instead of current_tid. Use find_process_pid to verify pid
11016 argument is valid. Pass proper argument to remove_process.
11017 (spu_thread_alive): Compare current_ptid instead of current_tid.
11018 (spu_resume): Likewise.
11019
55ac2b99
PA
110202009-04-02 Pedro Alves <pedro@codesourcery.com>
11021
11022 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11023 variable.
11024
95954743
PA
110252009-04-01 Pedro Alves <pedro@codesourcery.com>
11026
11027 Implement the multiprocess extensions, and add linux multiprocess
11028 support.
11029
11030 * server.h (ULONGEST): Declare.
11031 (struct ptid, ptid_t): New.
11032 (minus_one_ptid, null_ptid): Declare.
11033 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11034 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11035 (struct inferior_list_entry): Change `id' type from unsigned from
11036 to ptid_t.
11037 (struct sym_cache, struct breakpoint, struct
11038 process_info_private): Forward declare.
11039 (struct process_info): Declare.
11040 (current_process): Declare.
11041 (all_processes): Declare.
11042 (initialize_inferiors): Declare.
11043 (add_thread): Adjust to use ptid_t.
11044 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11045 (add_process, remove_process, find_thread_pid): Declare.
11046 (find_inferior_id): Adjust to use ptid_t.
11047 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11048 (multi_process): Declare.
11049 (push_event): Adjust to use ptid_t.
11050 (read_ptid, write_ptid): Declare.
11051 (prepare_resume_reply): Adjust to use ptid_t.
11052 (clear_symbol_cache): Declare.
11053 * inferiors.c (all_processes): New.
11054 (null_ptid, minus_one_ptid): New.
11055 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11056 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11057 (add_thread): Change unsigned long to ptid. Remove gdb_id
11058 parameter. Adjust.
11059 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11060 (gdb_id_to_thread): Rename to ...
11061 (find_thread_pid): ... this. Change unsigned long to ptid.
11062 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11063 (loaded_dll, pull_pid_from_list): Adjust.
11064 (add_process, remove_process, find_process_pid)
11065 (get_thread_process, current_process, initialize_inferiors): New.
11066 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11067 (struct target_waitstatus) <related_pid>: Ditto.
11068 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11069 return type to int.
11070 (struct target_ops) <join>: Add `pid' argument.
11071 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11072 (struct target_ops) <wait>: Add `ptid' field. Change return type
11073 to ptid.
11074 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11075 (mywait): Add `ptid' argument. Change return type to ptid_t.
11076 (target_pid_to_str): Declare.
11077 * target.c (set_desired_inferior): Adjust to use ptids.
11078 (mywait): Add new `ptid' argument. Adjust.
11079 (target_pid_to_str): New.
11080 * mem-break.h (free_all_breakpoints): Declare.
11081 * mem-break.c (breakpoints): Delelete.
11082 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11083 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11084 to use per-process breakpoint list.
11085 (free_all_breakpoints): New.
11086 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11087 (symbol_cache, all_symbols_looked_up): Delete.
11088 (hexchars): New.
11089 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11090 read_ptid): New.
11091 (prepare_resume_reply): Change ptid argument's type from unsigned
11092 long to ptid_t. Adjust. Implement W;process and X;process.
11093 (free_sym_cache, clear_symbol_cache): New.
11094 (look_up_one_symbol): Adjust to per-process symbol cache. *
11095 * server.c (cont_thread, general_thread, step_thread): Change type
11096 to ptid_t.
11097 (attached): Delete.
11098 (multi_process): New.
11099 (last_ptid): Change type to ptid_t.
11100 (struct vstop_notif) <ptid>: Change type to ptid_t.
11101 (queue_stop_reply, push_event): Change `ptid' argument's type to
11102 ptid_t.
11103 (discard_queued_stop_replies): Add `pid' argument.
11104 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11105 changes. Don't reference the `attached' global.
11106 (attach_inferior): Adjust to mywait interface changes.
11107 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11108 features. Handle and report "multiprocess+". Handle
11109 "qAttached:PID".
11110 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11111 changes.
11112 (handle_v_kill): New.
11113 (handle_v_stopped): Adjust to use target_pid_to_str.
11114 (handle_v_requests): Allow multiple attaches and runs when
11115 multiprocess extensions are in effect. Handle "vKill".
11116 (myresume): Adjust to use ptids.
11117 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11118 (handle_status): Adjust to discard_queued_stop_replies interface
11119 change.
11120 (first_thread_of, kill_inferior_callback)
11121 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11122 (main): Call initialize_inferiors. Adjust to use ptids, killing
11123 and detaching from all inferiors. Handle multiprocess packet
11124 variants.
11125 * linux-low.h: Include gdb_proc_service.h.
11126 (struct process_info_private): New.
11127 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11128 <lwpid_of>: Use ptid_get_lwp.
11129 (get_lwp_thread): Adjust.
11130 (struct lwp_info): Add `dead' member.
11131 (find_lwp_pid): Declare.
11132 * linux-low.c (thread_db_active): Delete.
11133 (new_inferior): Adjust comment.
11134 (inferior_pid): Delete.
11135 (linux_add_process): New.
11136 (handle_extended_wait): Adjust.
11137 (add_lwp): Change unsigned long to ptid.
11138 (linux_create_inferior): Add process to processes table. Adjust
11139 to use ptids. Don't set new_inferior here.
11140 (linux_attach_lwp): Rename to ...
11141 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11142 it. Adjust to use ptids.
11143 (linux_attach_lwp): New.
11144 (linux_attach): Add process to processes table. Don't set
11145 new_inferior here.
11146 (struct counter): New.
11147 (second_thread_of_pid_p, last_thread_of_process_p): New.
11148 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11149 multiple processes.
11150 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11151 processes. Remove process from process table.
11152 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11153 to multiple processes.
11154 (any_thread_of): New.
11155 (linux_detach): Add `pid' argument, and handle it. Remove process
11156 from processes table.
11157 (linux_join): Add `pid' argument. Handle it.
11158 (linux_thread_alive): Change unsighed long argument to ptid_t.
11159 Consider dead lwps as not being alive.
11160 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11161 threads we're not interested in.
11162 (same_lwp, find_lwp_pid): New.
11163 (linux_wait_for_lwp): Change `pid' argument's type from int to
11164 ptid_t. Adjust.
11165 (linux_wait_for_event): Rename to ...
11166 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11167 from int to ptid_t. Adjust.
11168 (linux_wait_for_event): New.
11169 (linux_wait_1): Add `ptid' argument. Change return type to
11170 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11171 that exit from the process table.
11172 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11173 Adjust.
11174 (mark_lwp_dead): New.
11175 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11176 stopping all threads, mark its main lwp as dead.
11177 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11178 ptids.
11179 (fetch_register, usr_store_inferior_registers)
11180 (regsets_fetch_inferior_registers)
11181 (regsets_store_inferior_registers, linux_read_memory)
11182 (linux_write_memory): Inline `inferior_pid'.
11183 (linux_look_up_symbols): Adjust to use per-process
11184 `thread_db_active'.
11185 (linux_request_interrupt): Adjust to use ptids.
11186 (linux_read_auxv): Inline `inferior_pid'.
11187 (initialize_low): Don't reference thread_db_active.
11188 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11189 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11190 (ps_getpid): Return the pid of the current inferior.
11191 * thread-db.c (proc_handle, thread_agent): Delete.
11192 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11193 per-process data.
11194 (find_one_thread): Change argument type to ptid_t. Adjust to
11195 per-process data.
11196 (maybe_attach_thread): Adjust to per-process data and ptids.
11197 (thread_db_find_new_threads): Ditto.
11198 (thread_db_init): Ditto.
11199 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11200 processes table. Adjust to use ptids.
11201 (spu_kill, spu_detach): Adjust interface. Remove process from
11202 processes table.
11203 (spu_join, spu_thread_alive): Adjust interface.
11204 (spu_wait): Adjust interface. Remove process from processes
11205 table. Adjust to use ptids.
11206 * win32-low.c (current_inferior_tid): Delete.
11207 (current_inferior_ptid): New.
11208 (debug_event_ptid): New.
11209 (thread_rec): Take a ptid. Adjust.
11210 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11211 (child_delete_thread): Ditto.
11212 (do_initial_child_stuff): Add `attached' argument. Add process to
11213 processes table.
11214 (child_fetch_inferior_registers, child_store_inferior_registers):
11215 Adjust.
11216 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11217 (win32_attach): Pass 1 to do_initial_child_stuff.
11218 (win32_kill): Adjust interface. Remove process from processes
11219 table.
11220 (win32_detach): Ditto.
11221 (win32_join): Adjust interface.
11222 (win32_thread_alive): Take a ptid.
11223 (win32_resume): Adjust to use ptids.
11224 (get_child_debug_event): Ditto.
11225 (win32_wait): Adjust interface. Remove exiting process from
11226 processes table.
11227
bd99dc85
PA
112282009-04-01 Pedro Alves <pedro@codesourcery.com>
11229
11230 Non-stop mode support.
11231
11232 * server.h (non_stop): Declare.
11233 (gdb_client_data, handler_func): Declare.
11234 (delete_file_handler, add_file_handler, start_event_loop):
11235 Declare.
11236 (handle_serial_event, handle_target_event, push_event)
11237 (putpkt_notif): Declare.
11238 * target.h (enum resume_kind): New.
11239 (struct thread_resume): Replace `step' field by `kind' field.
11240 (TARGET_WNOHANG): Define.
11241 (struct target_ops) <wait>: Add `options' argument.
11242 <supports_non_stop, async, start_non_stop>: New fields.
11243 (target_supports_non_stop, target_async): New.
11244 (start_non_stop): Declare.
11245 (mywait): Add `options' argument.
11246 * target.c (mywait): Add `options' argument. Print child exit
11247 notifications here.
11248 (start_non_stop): New.
11249 * server.c (non_stop, own_buf, mem_buf): New globals.
11250 (struct vstop_notif): New.
11251 (notif_queue): New global.
11252 (queue_stop_reply, push_event, discard_queued_stop_replies)
11253 (send_next_stop_reply): New.
11254 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11255 interface changes.
11256 (attach_inferior): In non-stop mode, don't wait for the target
11257 here.
11258 (handle_general_set): Handle QNonStop.
11259 (handle_query): When handling qC, return the current general
11260 thread, instead of the first thread of the list.
11261 (handle_query): If the backend supports non-stop mode, include
11262 QNonStop+ in the qSupported query response.
11263 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11264 and non-stop mode.
11265 (handle_v_attach, handle_v_run): Handle non-stop mode.
11266 (handle_v_stopped): New.
11267 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11268 (myresume): Adjust to use resume_kind. Handle non-stop.
11269 (queue_stop_reply_callback): New.
11270 (handle_status): Handle non-stop mode.
11271 (main): Clear non_stop flag on reconnection. Use the event-loop.
11272 Refactor serial protocol handling from here ...
11273 (process_serial_event): ... to this new function. When GDB
11274 selects any thread, select one here. In non-stop mode, wait until
11275 GDB acks all pending events before exiting.
11276 (handle_serial_event, handle_target_event): New.
11277 * remote-utils.c (remote_open): Install remote_desc in the event
11278 loop.
11279 (remote_close): Remove remote_desc from the event loop.
11280 (putpkt_binary): Rename to...
11281 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11282 (putpkt_binary): New as wrapper around putpkt_binary_1.
11283 (putpkt_notif): New.
11284 (prepare_resume_reply): In non-stop mode, don't change the
11285 general_thread.
11286 * event-loop.c: New.
11287 * Makefile.in (OBJ): Add event-loop.o.
11288 (event-loop.o): New rule.
11289
11290 * linux-low.h (pid_of): Moved here.
11291 (lwpid_of): New.
11292 (get_lwp_thread): Use lwpid_of.
11293 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11294 * linux-low.c (pid_of): Delete.
11295 (inferior_pid): Use lwpid_of.
11296 (linux_event_pipe): New.
11297 (target_is_async_p): New.
11298 (delete_lwp): New.
11299 (handle_extended_wait): Use lwpid_of.
11300 (add_lwp): Don't set lwpid field.
11301 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11302 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11303 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11304 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11305 first. Adjust to linux_wait_for_event interface changes. Use
11306 lwpid_of.
11307 (linux_detach): Don't delete the main lwp here.
11308 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11309 (status_pending_p): Don't consider explicitly suspended lwps.
11310 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11311 pointer. Add OPTIONS argument. Change return type to int. Use
11312 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11313 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11314 pointer. Add status pointer argument. Return a pid instead of a
11315 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11316 changes. In non-stop mode, don't switch to a random thread.
11317 (linux_wait): Rename to...
11318 (linux_wait_1): ... this. Add target_options argument, and handle
11319 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11320 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11321 clean exit and signal exit code. Don't stop all threads in
11322 non-stop mode. In all-stop mode, only stop all threads when
11323 reporting a stop to GDB. Handle explicit thread stop requests.
11324 (async_file_flush, async_file_mark): New.
11325 (linux_wait): New.
11326 (send_sigstop): Use lwpid_of.
11327 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11328 interface changes. In non-stop mode, don't switch to a random
11329 thread.
11330 (linux_resume_one_lwp): Use lwpid_of.
11331 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11332 (linux_resume_one_thread): ... this. Handle resume_stop. In
11333 non-stop mode, don't look for pending flag in all threads.
11334 (resume_status_pending_p): Don't consider explicitly suspended
11335 threads.
11336 (my_waitpid): Reimplement. Emulate __WALL.
11337 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11338 Use lwpid_of.
11339 (sigchld_handler, linux_supports_non_stop, linux_async)
11340 (linux_start_non_stop): New.
11341 (linux_target_ops): Register linux_supports_non_stop, linux_async
11342 and linux_start_non_stop.
11343 (initialize_low): Install SIGCHLD handler.
11344 * thread-db.c (thread_db_create_event, find_one_thread)
11345 (thread_db_get_tls_address): Use lwpid_of.
11346 * win32-low.c (win32_detach): Adjust to use resume_kind.
11347 (win32_wait): Add `options' argument.
11348 * spu-low.c (spu_resume): Adjust to use resume_kind.
11349 (spu_wait): Add `options' argument.
11350
5b1c542e
PA
113512009-04-01 Pedro Alves <pedro@codesourcery.com>
11352
11353 Decouple target code from remote protocol.
11354
11355 * target.h (enum target_waitkind): New.
11356 (struct target_waitstatus): New.
11357 (struct target_ops) <wait>: Return an unsigned long. Take a
11358 target_waitstatus pointer instead of a char pointer.
11359 (mywait): Likewise.
11360 * target.c (mywait): Change prototype to return an unsigned long.
11361 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11362 * server.h (thread_from_wait, old_thread_from_wait): Delete
11363 declarations.
11364 (prepare_resume_reply): Change prototype to take a
11365 target_waitstatus.
11366 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11367 (last_status, last_ptid): New.
11368 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11369 pid instead of a signal.
11370 (attach_inferior): Remove "status" and "signal" parameters.
11371 Adjust.
11372 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11373 not as an address.
11374 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11375 (handle_v_requests, myresume): Remove "status" and "signal"
11376 parameters. Adjust.
11377 (handle_status): New.
11378 (main): Delete local `status'. Adjust.
11379 * remote-utils.c: Include target.h.
11380 (prepare_resume_reply): Change prototype to take a
11381 target_waitstatus. Adjust.
11382
11383 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11384 interface.
11385 * spu-low.c (spu_wait): Adjust.
11386 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11387 Delete.
11388 (win32_wait): Adjust.
11389
2bd7c093
PA
113902009-04-01 Pedro Alves <pedro@codesourcery.com>
11391
11392 * target.h (struct thread_resume): Delete leave_stopped member.
11393 (struct target_ops): Add a `n' argument to the `resume' callback.
11394 * server.c (start_inferior): Adjust.
11395 (handle_v_cont, myresume): Adjust.
11396 * linux-low.c (check_removed_breakpoint): Adjust to resume
11397 interface change, and to removed leave_stopped field.
11398 (resume_ptr): Delete.
11399 (struct thread_resume_array): New.
11400 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11401 resume interface change.
11402 (linux_continue_one_thread, linux_queue_one_thread)
11403 (resume_status_pending_p): Check if the resume field is NULL
11404 instead of checking the leave_stopped member.
11405 (linux_resume): Adjust to the target resume interface change.
11406 * spu-low.c (spu_resume): Adjust to the target resume interface
11407 change.
11408 * win32-low.c (win32_detach, win32_resume): Ditto.
11409
c35fafde
PA
114102009-04-01 Pedro Alves <pedro@codesourcery.com>
11411
11412 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11413 flag.
11414 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11415 pending.
11416 (linux_continue_one_thread): Only preserve the stepping flag if
11417 there's a pending breakpoint.
11418
0a59d50b
PA
114192009-03-31 Pedro Alves <pedro@codesourcery.com>
11420
11421 * server.c (main): After the inferior having exited, call
11422 remote_close before exiting gdbserver.
11423
f04c6d38
TJB
114242009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11425
11426 Fix size of FPSCR in Power 7 processors.
11427 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11428 (PPC_FEATURE_HAS_DFP): New #define.
11429 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11430 size of the FPSCR.
11431
78e5cee6
PA
114322009-03-23 Pedro Alves <pedro@codesourcery.com>
11433
11434 * server.c (handle_query) Whitespace and formatting.
11435
1b3f6016
PA
114362009-03-22 Pedro Alves <pedro@codesourcery.com>
11437
11438 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11439 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11440 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11441 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11442 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11443 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11444 Makefile.in, configure.ac: Fix whitespace throughout.
11445 * configure: Regenerate.
11446
a07b2135
PA
114472009-03-22 Pedro Alves <pedro@codesourcery.com>
11448
11449 * inferiors.c (find_inferior): Make it safe for the callback
11450 function to delete the currently iterated inferior.
11451
67cc2626
PA
114522009-03-22 Pedro Alves <pedro@codesourcery.com>
11453
11454 * Makefile.in (linuw_low_h): Move higher.
11455 (thread-db.o): Depend on $(linux_low_h).
11456
54a0b537
PA
114572009-03-17 Pedro Alves <pedro@codesourcery.com>
11458
11459 Rename "process" to "lwp" throughout.
11460
11461 * linux-low.c (all_processes): Rename to...
11462 (all_lwps): ... this.
11463 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11464 (add_process): Rename to ...
11465 (add_lwp): ... this. Adjust.
11466 (linux_create_inferior): Adjust.
11467 (linux_attach_lwp): Adjust.
11468 (linux_attach): Adjust.
11469 (linux_kill_one_process): Rename to ...
11470 (linux_kill_one_lwp): ... this. Adjust.
11471 (linux_kill): Adjust.
11472 (linux_detach_one_process): Rename to ...
11473 (linux_detach_one_lwp): ... this. Adjust.
11474 (linux_detach): Adjust.
11475 (check_removed_breakpoint): Adjust.
11476 (status_pending_p): Adjust.
11477 (linux_wait_for_process): Rename to ...
11478 (linux_wait_for_lwp): ... this. Adjust.
11479 (linux_wait_for_event): Adjust.
11480 (send_sigstop): Adjust.
11481 (wait_for_sigstop): Adjust.
11482 (stop_all_processes): Rename to ...
11483 (stop_all_lwps): ... this.
11484 (linux_resume_one_process): Rename to ...
11485 (linux_resume_one_lwp): ... this. Adjust.
11486 (linux_set_resume_request, linux_continue_one_thread)
11487 (linux_queue_one_thread, resume_status_pending_p)
11488 (usr_store_inferior_registers, regsets_store_inferior_registers)
11489 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11490 Adjust.
11491 * linux-low.h (get_process): Rename to ...
11492 (get_lwp): ... this. Adjust.
11493 (get_thread_process): Rename to ...
11494 (get_thread_lwp): ... this. Adjust.
11495 (get_process_thread): Rename to ...
11496 (get_lwp_thread): ... this. Adjust.
11497 (struct process_info): Rename to ...
11498 (struct lwp_info): ... this.
11499 (all_processes): Rename to ...
11500 (all_lwps): ... this.
11501 * proc-service.c (ps_lgetregs): Adjust.
11502 * thread-db.c (thread_db_create_event, find_one_thread)
11503 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11504
0b16c5cf
PA
115052009-03-14 Pedro Alves <pedro@codesourcery.com>
11506
11507 * server.c (handle_query): Handle "qAttached".
11508
32de4b9d
NS
115092009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11510
11511 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11512 GPLv3, update license URL.
11513
2aecd87f
DE
115142009-03-01 Doug Evans <dje@google.com>
11515
93efd302 11516 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11517 (server_h): Add gdb_signals.h.
11518 (signals.o): Update.
11519 * server.h (target_signal_from_host,target_signal_to_host_p)
11520 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11521
86b1f9c5
PM
115222009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11523
11524 * remote-utils.c (getpkt): Also generate remote-debug
11525 information if noack_mode is set.
11526
4aa995e1
PA
115272009-02-06 Pedro Alves <pedro@codesourcery.com>
11528
11529 * server.c (handle_query): Report qXfer:siginfo:read and
11530 qXfer:siginfo:write as supported and handle them.
11531 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11532 * linux-low.c (linux_xfer_siginfo): New.
11533 (linux_target_ops): Set it.
11534
62709adf
PA
115352009-01-26 Pedro Alves <pedro@codesourcery.com>
11536
11537 * server.c (gdbserver_usage): Mention --remote-debug.
11538 (main): Accept '--remote-debug' switch.
11539
aef93bd7
DE
115402009-01-18 Doug Evans <dje@google.com>
11541
11542 * regcache.c (new_register_cache): No need to check result of xcalloc.
11543 * server.c (handle_search_memory): Back out calls to xmalloc,
11544 result is checked and error is returned to user upon failure.
11545 (handle_query): Ditto. Add more checks for result of malloc.
11546 (handle_v_cont): Check result of malloc, report error back to
11547 user upon failure.
11548 (handle_v_run): Ditto. Call freeargv.
11549 * server.h (freeargv): Declare.
11550 * utils.c (freeargv): New fn.
11551
54363045
DE
115522009-01-15 Doug Evans <dje@google.com>
11553
f626972c
DE
11554 * gdbreplay.c (perror_with_name): Make arg const char *.
11555 * server.h (target_signal_to_name): Make return type const char *.
0842e787 11556 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 11557 * utils.c (perror_with_name): Make arg const char *.
54363045 11558
18aae699
PA
115592009-01-14 Pedro Alves <pedro@codesourcery.com>
11560
11561 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11562 when handling a EXIT_PROCESS_DEBUG_EVENT.
11563
ff703abe
JB
115642009-01-06 Joel Brobecker <brobecker@adacore.com>
11565
11566 * gdbreplay.c (gdbreplay_version): Update copyright year.
11567 * server.c (gdbserver_version): Likewise.
11568
f21cc1a2 115692009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
11570
11571 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 11572 (handle_extended_wait): Improve comment.
0e21c1ec 11573
bca929d3
DE
115742008-12-13 Doug Evans <dje@google.com>
11575
11576 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11577 * server.h (ATTR_MALLOC): New macro.
11578 (xmalloc,xcalloc,xstrdup): Declare.
11579 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11580 * inferiors.c: Ditto.
11581 * linux-low.c: Ditto.
11582 * mem-break.c: Ditto.
11583 * regcache.c: Ditto.
11584 * remote-utils.c: Ditto.
11585 * server.c: Ditto.
11586 * target.c: Ditto.
11587 * win32-low.c: Ditto.
11588
97438e3f
DE
115892008-12-12 Doug Evans <dje@google.com>
11590
896c7fbb
DE
11591 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11592 in debugging printf.
11593
97438e3f
DE
11594 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11595
e3b886f8
DE
115962008-12-09 Doug Evans <dje@google.com>
11597
11598 * linux-low.h (struct process_info): Delete member tid, unused.
11599 * thread-db.c (find_one_thread): Update.
11600 (maybe_attach_thread): Update.
11601
07e059b5
VP
116022008-12-02 Pedro Alves <pedro@codesourcery.com>
11603
889bf7c5
PA
11604 * target.h (struct target_ops): Add qxfer_osdata member.
11605 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11606 and dirent.h.
11607 (linux_qxfer_osdata): New functions.
11608 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11609 callback.
11610 * server.c (handle_query): Handle "qXfer:osdata:read:".
11611 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11612 (buffer_xml_printf): New functions.
11613 * server.h (struct buffer): New.
11614 (buffer_grow_str, buffer_grow_str0): New macros.
11615 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11616 (buffer_xml_printf): Declare.
07e059b5 11617
4cab47ab
DE
116182008-11-24 Doug Evans <dje@google.com>
11619
11620 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11621
f142445f
DJ
116222008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11623
11624 * server.c (handle_v_run): Always use the supplied argument list.
11625
d0107bb6 116262008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 11627
d0107bb6
BW
11628 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11629 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 11630
2c4ad781
TJB
116312008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11632
11633 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11634 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11635 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11636 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11637 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11638 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11639 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11640 XML target descriptions.
11641 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11642 when inferior is running on an ISA 2.05 or later processor. Add
11643 special case to return offset for full 64-bit slot of FPSCR when
11644 in 32-bits.
11645
dfb64f85
DJ
116462008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11647
11648 * Makefile.in (SFILES, clean): Added sparc64 files.
11649 (reg-sparc64.o, reg-sparc64.c): New.
11650 * configure.srv (sparc*-*-linux*): New configuration.
11651 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11652 syscall arguments for SPARC.
11653 (regsets_store_inferior_registers): Likewise.
11654 * linux-sparc-low.c: New file.
11655
66b6e1dd
DE
116562008-10-21 Doug Evans <dje@google.com>
11657
11658 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11659 (READLINE_DIR,READLINE_DEP): Delete.
11660 (INTERNAL_CFLAGS): Update.
11661 (LINTFLAGS): Update.
11662
9b710a42
PA
116632008-10-10 Pedro Alves <pedro@codesourcery.com>
11664
11665 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11666 whole argv from the last run, not just argv[0].
11667
5822d809
PA
116682008-09-08 Pedro Alves <pedro@codesourcery.com>
11669
11670 * regcache.c (new_register_cache): Return NULL if the register
11671 cache size isn't known yet.
11672 (free_register_cache): Avoid dereferencing a NULL regcache.
11673
74aac56f
DJ
116742008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11675
11676 * configure.srv: Merge MIPS and MIPS64.
11677
400b20f5
MR
116782008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11679
11680 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11681
677c5bb1
LM
116822008-08-18 Luis Machado <luisgpm@br.ibm.com>
11683
11684 * Makefile.in: Add required vsx dependencies.
11685
11686 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11687 Declare init_registers_powerpc_vsx32l.
11688 Declare init_registers_powerpc_vsx64l.
11689 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11690 (ppc_arch_setup): Check for VSX in hwcap.
11691 (ppc_fill_vsxregset): New function.
11692 (ppc_store_vsxregset): New function.
11693 Add new VSX entry in regset_info target_regsets.
11694
11695 * configure.srv: Add new VSX dependencies.
11696
a6f3e723
SL
116972008-08-12 Pedro Alves <pedro@codesourcery.com>
11698
11699 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11700 (remote_open): Set or clear transport_is_reliable.
11701 (putpkt_binary): Don't expect acks in noack mode.
11702 (getpkt): Don't send ack/nac in noack mode.
11703 * server.c (handle_general_set): Handle QStartNoAckMode.
11704 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11705 qSupported.
11706 (main): Reset noack_mode on every connection.
11707 * server.h (noack_mode): Declare.
11708
a417dc56
RW
117092008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11710
11711 * Makefile.in (GDBREPLAY_OBS): New variable.
11712 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11713
3221518c
UW
117142008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11715 Daniel Jacobowitz <dan@codesourcery.com>
11716
11717 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11718 (usr_store_inferior_registers): Likewise.
11719 (regsets_store_inferior_registers): Likewise.
11720
ec56be1b
PA
117212008-07-31 Rolf Jansen <rj@surtec.com>
11722 Pedro Alves <pedro@codesourcery.com>
11723
11724 * configure.ac: Check for memmem declaration.
11725 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11726 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11727 (disable_packet_qfThreadInfo): Unconditionally compile.
11728 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11729 * configure, config.in: Regenerate.
11730
2fe5e3ff
DE
117312008-07-28 Doug Kwan <dougkwan@google.com>
11732
11733 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11734 (linux_write_memory): Remove declaration of errno.
11735
836acd6d
UW
117362008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11737
11738 * linux-low.c (handle_extended_wait): Do not use "status"
11739 variable uninitialized.
11740
aeba519e
PA
117412008-07-07 Pedro Alves <pedro@codesourcery.com>
11742
11743 * server.c (handle_v_attach): Inhibit reporting dll changes.
11744
db42f210
PA
117452008-06-27 Pedro Alves <pedro@codesourcery.com>
11746
11747 * remote-utils.c (prepare_resume_reply): If requested, don't
11748 output "thread:TID" in the T stop reply.
11749
11750 * server.c (disable_packet_vCont, disable_packet_Tthread)
11751 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11752 (handle_query): If requested, disable support for qC, qfThreadInfo
11753 and qsThreadInfo.
11754 (handle_v_requests): If requested, disable support for vCont.
11755 (gdbserver_show_disableable): New.
11756 (main): Handle --disable-packet and --disable-packet=LIST.
11757
11758 * server.h (disable_packet_vCont, disable_packet_Tthread)
11759 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11760
8e4c5421
CD
117612008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11762
11763 * server.c (gdbserver_usage): Mention --version.
11764
6e23a804
DJ
117652008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11766
11767 * Makefile.in (gdbreplay.o): New rule.
11768
90aa6a40
JM
117692008-06-06 Joseph Myers <joseph@codesourcery.com>
11770
11771 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11772 message, not gdbserver.
11773
c16158bc 117742008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
11775 Nathan Sidwell <nathan@codesourcery.com>
11776 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11777
11778 * acinclude.m4: Include ../../config/acx.m4.
11779 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11780 * configure, config.in: Regenerate.
11781 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11782 * server.c (gdbserver_version): Print PKGVERSION.
11783 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11784 (main): Adjust gdbserver_usage calls.
11785 * gdbreplay.c (version, host_name): Add declarations.
11786 (gdbreplay_version, gdbreplay_usage): New.
11787 (main): Accept --version and --help options.
11788
aeb75bf5
DJ
117892008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11790
11791 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11792 (arm_breakpoint_at): Handle Thumb.
11793 (the_low_target): Add comment.
11794
76b233dd
UW
117952008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11796
11797 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11798
08388c79
DE
117992008-05-09 Doug Evans <dje@google.com>
11800
a3c83fae
DE
11801 * server.h (decode_search_memory_packet): Declare.
11802 * remote-utils.c (decode_search_memory_packet): New fn.
11803 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11804 (handle_search_memory): New fn.
11805 (handle_query): Process qSearch:memory packets.
11806
bb9c3d36
UW
118072008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11808
11809 * regcache.c (registers_length): Remove.
11810 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11811 full register packet.
11812 * regcache.h (registers_length): Remove prototype.
11813 * server.h (PBUFSIZ): Define to 16384.
11814
7284e1be
UW
118152008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11816
11817 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11818 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11819 powerpc-64l.o, and powerpc-altivec64l.o.
11820 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11821 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11822 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11823 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11824 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11825 to srv_xmlfiles.
11826
11827 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11828 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11829 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11830 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11831 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11832 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11833 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11834 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11835 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11836 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11837 (clean): Update.
11838
11839 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11840 (init_registers_powerpc_32l): ... this new prototype.
11841 (init_registers_powerpc_32): Remove, replace by ...
11842 (init_registers_powerpc_altivec32l): ... this new prototype.
11843 (init_registers_powerpc_e500): Remove, replace by ...
11844 (init_registers_powerpc_e500l): ... this new prototype.
11845 (init_registers_ppc64): Remove, replace by ...
11846 (init_registers_powerpc_64l): ... this new prototype.
11847 (init_registers_powerpc_64): Remove, replace by ...
11848 (init_registers_powerpc_altivec64l): ... this new prototype.
11849 (ppc_num_regs): Set to 73.
11850 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11851 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11852 (ppc_cannot_store_register): Handle orig_r3 and trap.
11853 (ppc_arch_setup): Update init_registers_... calls.
11854 (ppc_fill_gregset): Handle orig_r3 and trap.
11855
11856 * inferiors.c (clear_inferiors): Reset current_inferior.
11857
fdc59709
PB
118582008-04-23 Paolo Bonzini <bonzini@gnu.org>
11859
889bf7c5
PA
11860 * acinclude.m4: Add override.m4.
11861 * configure: Regenerate.
fdc59709 11862
c9b2f845
UW
118632008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11864
11865 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11866 initial call to init_register_ppc64.
11867
550512b8
UW
118682008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11869
43aaf8b6
PA
11870 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11871 single powerpc*-*-linux* case.
550512b8
UW
11872 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11873
b6430ec3
UW
118742008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11875
11876 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11877 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11878 from reg_xmlfiles.
11879 * linux-ppc-low.c: Include <elf.h>.
11880 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11881 (ppc_hwcap): New global variable.
11882 (ppc_regmap): Remove __SPE__ #ifdef sections.
11883 (ppc_regmap_e500): New global variable.
11884 (ppc_cannot_store_register): Update __SPE__ special case.
11885 (ppc_get_hwcap): New function.
11886 (ppc_arch_setup): Use it to determine whether inferior supports
11887 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11888 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11889 Do not access registers if target does not support AltiVec.
11890 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11891 Do not access registers if target does not support SPE.
11892 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11893
52fa2412
UW
118942008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11895
11896 * linux-low.c (disabled_regsets, num_regsets): New.
11897 (use_regsets_p): Delete.
11898 (linux_wait_for_process): Clear disabled_regsets.
11899 (regsets_fetch_inferior_registers): Check and set it.
11900 (regsets_store_inferior_registers): Likewise.
11901 (linux_fetch_registers, linux_store_registers): Do not use
11902 use_regsets_p.
11903 (initialize_low): Allocate disabled_regsets.
11904
e28b3332
DJ
119052008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11906
11907 * Makefile.in (LIBOBJS): New.
11908 (OBS): Use LIBOBJS.
11909 (memmem.o): New rule.
11910 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11911 * configure: Regenerated.
11912
4536995d
UW
119132008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11914
11915 * server.c (handle_query): Never return "unsupported" for
11916 qXfer:features:read queries.
11917
221c031f
UW
119182008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11919
11920 * server.c (get_features_xml): Fix inverted condition.
11921 (handle_query): Always support qXfer:feature:read.
11922
ccd213ac
DJ
119232008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11924
11925 * server.c (wrapper_argv): New.
11926 (start_inferior): Handle wrapper_argv. If set, expect an extra
11927 trap.
11928 (gdbserver_usage): Document --wrapper.
11929 (main): Parse --wrapper.
11930
6fe305f7
UW
119312008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11932
11933 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11934 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11935 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11936 (ppc_set_pc): Likewise.
11937 (ppc_arch_setup): New function.
11938 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11939 of collect_register.
889bf7c5 11940 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11941
5b0a002e
UW
119422008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11943
11944 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11945 instead of linux-ppc64-low.o.
11946 * linux-ppc64-low.c: Remove file.
11947 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11948 (linux-ppc64-low.o): Remove rule.
11949
11950 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11951 (init_registers_powerpc_64): Likewise.
11952 (ppc_regmap): Conditionally define depending on __powerpc64__.
11953 (ppc_cannot_store_register): Do not special-case "fpscr" when
11954 compiled on __powerpc64__.
11955 (ppc_collect_ptrace_register): New function.
11956 (ppc_supply_ptrace_register): New function.
11957 (ppc_breakpoint): Change type to "unsigned int".
11958 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11959 (the_low_target): Conditionally provide initializers for the
889bf7c5 11960 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11961 collect_ptrace_register and supply_ptrace_register members.
11962
9b4b61c8
UW
119632008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11964
11965 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11966 * server.c (gdbserver_xmltarget): Define.
11967 (get_features_xml): Use it to replace "target.xml" and arch_string.
11968
11969 * configure.srv: Remove srv_xmltarget. Add XML files that were
11970 mentioned there to srv_xmlfiles instead. Remove conditional tests
11971 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11972 srv_xmlfiles and srv_regobj to include all possible choices.
11973 * configure.ac (srv_xmltarget): Remove.
11974 (srv_xmlfiles): Do not add "target.xml".
11975 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11976 checks for supplementary target information.
11977 * configure: Regenerate.
11978 * Makefile.in (XML_TARGET): Remove.
11979 (target.xml): Remove rule.
11980 (clean): Do not clean up target.xml.
11981 (.PRECIOUS): Do not mention target.xml.
11982
11983 * target.h (struct target_ops): Remove arch_string member.
11984 * linux-low.c (linux_arch_string): Remove.
11985 (linux_target_ops): Remove arch_string initializer.
11986 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11987 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11988 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11989 * spu-low.c (spu_arch_string): Remove.
11990 (spu_target_ops): Remove arch_string initializer.
11991 * win32-low.c (win32_arch_string): Remove.
11992 (win32_target_ops): Remove arch_string initializer.
11993 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11994 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11995 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11996
ee1a7ae4
UW
119972008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11998
11999 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12000 by collect_ptrace_register and supply_ptrace_register hooks.
12001 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12002 instead of checking for the_low_target.left_pad_xfer.
12003 (usr_store_inferior_registers): Use collect_ptrace_register callback
12004 instead of checking for the_low_target.left_pad_xfer.
12005
12006 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12007 (s390_supply_ptrace_register): Likewise.
12008 (s390_fill_gregset): Call s390_collect_ptrace_register.
12009 (the_low_target): Update.
12010
12011 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12012 (ppc_supply_ptrace_register): Likewise.
12013 (the_low_target): Update.
12014
12015 * linux-i386-low.c (the_low_target): Update.
12016 * linux-x86-64-low.c (the_low_target): Update.
12017
d61ddec4
UW
120182008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12019
12020 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12021 reg-s390.o and reg-s390x.o.
12022
12023 * linux-low.c (new_inferior): New global variable.
12024 (linux_create_inferior, linux_attach): Set it.
12025 (linux_wait_for_process): Call the_low_target.arch_setup after the
12026 target has stopped for the first time.
12027 (initialize_low): Do not call the_low_target.arch_setup.
12028
12029 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12030 (s390_set_pc): Likewise.
12031 (s390_arch_setup): New function.
12032 (the_low_target): Use s390_arch_setup as arch_setup routine.
12033
12034 * regcache.c (realloc_register_cache): New function.
12035 (set_register_cache): Call it for each existing regcache.
12036
d05b4ac3
UW
120372008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12038
12039 * server.h (init_registers): Remove prototype.
12040
12041 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12042 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12043 instead of init_registers ().
12044 * linux-arm-low.c (init_registers_arm): Add prototype.
12045 (init_registers_arm_with_iwmmxt): Likewise.
12046 (the_low_target): Add initializer for arch_setup field.
12047 * linux-cris-low.c (init_registers_cris): Add prototype.
12048 (the_low_target): Add initializer for arch_setup field.
12049 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12050 (the_low_target): Add initializer for arch_setup field.
12051 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12052 (the_low_target): Add initializer for arch_setup field.
12053 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12054 (the_low_target): Add initializer for arch_setup field.
12055 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12056 (the_low_target): Add initializer for arch_setup field.
12057 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12058 (the_low_target): Add initializer for arch_setup field.
12059 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12060 (init_registers_mips64_linux): Likewise.
12061 (the_low_target): Add initializer for arch_setup field.
12062 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12063 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12064 (the_low_target): Add initializer for arch_setup field.
12065 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12066 (init_registers_powerpc_64): Likewise.
12067 (the_low_target): Add initializer for arch_setup field.
12068 * linux-s390-low.c (init_registers_s390): Add prototype.
12069 (init_registers_s390x): Likewise.
12070 (the_low_target): Add initializer for arch_setup field.
12071 * linux-sh-low.c (init_registers_sh): Add prototype.
12072 (the_low_target): Add initializer for arch_setup field.
12073 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12074 (the_low_target): Add initializer for arch_setup field.
12075 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12076 (the_low_target): Add initializer for arch_setup field.
12077
12078 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12079 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12080 instead of init_registers ().
12081 * win32-arm-low.c (init_registers_arm): Add prototype.
12082 (the_low_target): Add initializer for arch_setup field.
12083 * win32-i386-low.c (init_registers_i386): Add prototype.
12084 (the_low_target): Add initializer for arch_setup field.
12085
12086 * spu-low.c (init_registers_spu): Add prototype.
12087 (initialize_low): Call initialie_registers_spu () instead of
12088 initialize_registers ().
12089
fd96d250
PA
120902008-02-19 Pedro Alves <pedro@codesourcery.com>
12091
12092 * server.c (handle_v_requests): When handling the vRun and vAttach
12093 packets, if already debugging a process, don't kill it. Return an
12094 error instead.
12095
d41b6bb4
DJ
120962008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12097
12098 * server.c (handle_query): Correct length check.
12099
5ac588cf
PA
121002008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12101
12102 * win32-low.c (do_initial_child_stuff): Add process handle
12103 parameter. Set current_process_handle and current_process_id from the
12104 parameters. Clear globals.
12105 (win32_create_inferior): Don't set current_process_handle and
12106 current_process_id here. Instead pass them on the call to
12107 do_initial_child_stuff.
12108 (win32_attach): Likewise.
12109 (win32_clear_inferiors): New.
12110 (win32_kill): Don't close the current process handle or the
12111 current thread handle here. Instead call win32_clear_inferiors.
12112 (win32_detach): Don't open a new handle to the process. Call
12113 win32_clear_inferiors.
12114 (win32_join): Don't rely on current_process_handle; open a new
12115 handle using the process id.
12116 (win32_wait): Call win32_clear_inferiors when the inferior process
12117 has exited.
12118
ecd7ecbc
DJ
121192008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12120
12121 * server.c (monitor_show_help): Add "exit".
12122
1525d545
MG
121232008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12124
ecd7ecbc 12125 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12126 (clean): Add reg-xtensa.c.
12127 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12128 * configure.srv (xtensa*-*-linux*) New target.
12129 * linux-xtensa-low.c: New.
12130 * xtensa-xtregs.c: New.
1525d545 12131
59a016f0
PA
121322008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12133
12134 * hostio.c: Don't include errno.h.
12135 (errno_to_fileio_errno): Move to hostio-errno.
12136 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12137 error number outputting to the target->hostio_last_error callback.
12138 (hostio_packet_error): Use FILEIO_EINVAL directly.
12139 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12140 calls to hostio_error.
12141 * hostio-errno.c: New.
12142 * server.h (hostio_last_error_from_errno): Declare.
12143 * target.h (target_ops): Add hostio_last_error member.
12144 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12145 as hostio_last_error handler.
889bf7c5 12146 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12147 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12148 (wince_hostio_last_error): New functions.
12149 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12150 as hostio_last_error handler.
12151 (win32_target_ops) [!_WIN32_WCE]: Register
12152 hostio_last_error_from_errno as hostio_last_error handler.
12153 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12154 (hostio-errno.o): New rule.
12155 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12156 * configure.srv (srv_hostio_err_objs): New variable. Default to
12157 hostio-errno.o.
12158 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12159 * configure: Regenerate.
12160
2d717e4f
DJ
121612008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12162
12163 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12164 (linux_kill, linux_detach): Clean up the process list.
12165 * remote-utils.c (remote_open): Improve port number parsing.
12166 (putpkt_binary, input_interrupt): Only send interrupts if the target
12167 is running.
12168 * server.c (extended_protocol): Make static.
12169 (attached): Define earlier.
12170 (exit_requested, response_needed, program_argv): New variables.
12171 (target_running): New.
12172 (start_inferior): Clear attached here.
12173 (attach_inferior): Set attached here.
12174 (require_running): Define.
12175 (handle_query): Use require_running and target_running. Implement
12176 "monitor exit".
12177 (handle_v_attach, handle_v_run): New.
12178 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12179 (gdbserver_usage): Update.
12180 (main): Redo argument parsing. Handle --debug and --multi. Handle
12181 --attach along with other options or after the port. Save
12182 program_argv. Support no initial program. Resynchronize
12183 communication with GDB after an error. Handle "monitor exit".
12184 Use require_running and target_running. Always allow the extended
12185 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12186 restart in extended mode.
12187 * README: Refer to the GDB manual. Update --attach usage.
12188
7407e2de
AS
121892007-12-20 Andreas Schwab <schwab@suse.de>
12190
12191 * linux-low.c (STACK_SIZE): Define.
12192 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12193 (linux_test_for_tracefork): Likewise.
12194
b65d95c5
DJ
121952007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12196
12197 * linux-low.c (linux_wait_for_event): Update messages. Do not
12198 reinsert auto-delete breakpoints.
12199 * mem-break.c (struct breakpoint): Change return type of handler to
12200 int.
12201 (set_breakpoint_at): Update handler type.
12202 (reinsert_breakpoint_handler): Return 1 instead of calling
12203 delete_breakpoint.
12204 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12205 setting a new one.
12206 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12207 * mem-break.h (set_breakpoint_at): Update handler type.
12208 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12209 * win32-low.c (auto_delete_breakpoint): New.
12210 (get_child_debug_event): Use it.
12211
4e799345
DJ
122122007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12213
12214 * configure.ac: Check for pread and pwrite.
12215 * hostio.c (handle_pread): Fall back to lseek and read.
12216 (handle_pwrite): Fall back to lseek and write.
12217 * config.in, configure: Regenerated.
12218
27524b67
DJ
122192007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12220
12221 * server.c (myresume): Add own_buf argument.
12222 (main): Update calls.
12223
a20d5e98
DJ
122242007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12225
12226 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12227 * remote-utils.c (remote_open): Do not call disable_async_io.
12228 (block_async_io): Delete.
12229 (unblock_async_io): Make static.
12230 (initialize_async_io): New.
12231 * server.c (handle_v_cont): Handle async I/O here.
12232 (myresume): Likewise. Move other common resume tasks here...
12233 (main): ... from here. Call initialize_async_io. Disable async
12234 I/O before the main loop.
12235 * server.h (initialize_async_io): Declare.
12236 (block_async_io, unblock_async_io): Delete prototypes.
12237 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12238
b79d787e
DJ
122392007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12240
12241 * remote-utils.c (readchar): Allow binary data in received messages.
12242
d97903b2
PA
122432007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12244
12245 * win32-low.c (attaching): New global.
12246 (win32_create_inferior): Clear the `attaching' global.
12247 (win32_attach): Set the `attaching' global.
12248 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12249 attaching. Only set a breakpoint at the entry point if not
12250 attaching.
12251
311de423
PA
122522007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12253
12254 * server.c (main): Don't report dll events on the initial
12255 connection on attaches.
12256
6c2d16d2
PA
122572007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12258
12259 * server.c (main): Relax numerical bases supported for the pid of
12260 the --attach command line argument.
12261
5ca906e6
PA
122622007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12263
12264 * win32-low.c (win32_attach): Call OpenProcess before
12265 DebugActiveProcess, not after. Add last error output to error
12266 call.
12267
9c6c8194
PA
122682007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12269
12270 * win32-low.c (win32_get_thread_context)
12271 (win32_set_thread_context): New functions.
12272 (thread_rec): Use win32_get_thread_context.
12273 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12274 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12275 field.
12276
4d5d1aaa
PA
122772007-12-03 Leo Zayas
12278 Pedro Alves <pedro_alves@portugalmail.pt>
12279
12280 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12281 global variables.
12282 (child_add_thread): Minor cleanup.
12283 (child_continue): Resume artificially suspended threads before
12284 calling ContinueDebugEvent.
12285 (suspend_one_thread): New.
12286 (fake_breakpoint_event): New.
12287 (get_child_debug_event): Change return type to int. Check here if
12288 gdb sent an interrupt request. If a soft interrupt was requested,
12289 fake a breakpoint event. Return 0 if there is no event to handle,
12290 and 1 otherwise.
12291 (win32_wait): Don't check here if gdb sent an interrupt request.
12292 Ensure there is a valid event to handle.
12293 (win32_request_interrupt): Add soft interruption method as last
12294 resort.
12295
c436e841
PA
122962007-12-03 Leo Zayas
12297 Pedro Alves <pedro_alves@portugalmail.pt>
12298
12299 * win32-low.h (win32_thread_info): Add descriptions to the
12300 structure members. Replace `suspend_count' counter by a
12301 `suspended' flag.
12302 * win32-low.c (thread_rec): Update condition of when to get the
12303 context from the inferior. Rely on ContextFlags being set if it
12304 has already been retrieved. Only suspend the inferior thread if
12305 we haven't already. Warn if that fails.
12306 (continue_one_thread): s/suspend_count/suspended/. Only call
12307 ResumeThread once. Warn if that fails.
12308
e7b5fa67
PA
123092007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12310
12311 * win32-low.c (win32_wait): Don't read from the inferior when it
12312 has already exited.
12313
a385171d
PA
123142007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12315
12316 * Makefile.in (win32_low_h): New variable.
12317 (win32-low.o): Add dependency on $(win32_low_h).
12318 (win32-arm-low.o, win32-i386-low.o): New rules.
12319
f80c84b3
DJ
123202007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12321
12322 * hostio.c: Correct copyright year.
12323
a6b151f1
DJ
123242007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12325
12326 * Makefile.in (OBS): Add hostio.o.
12327 (hostio.o): New rule.
12328 * server.h (handle_vFile): Declare.
12329 * hostio.c: New file.
12330 * server.c (handle_v_requests): Take packet_len and new_packet_len
12331 for binary packets. Call handle_vFile.
12332 (main): Update call to handle_v_requests.
12333
f9387fc3
DJ
123342007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12335
12336 * linux-low.c: Include <sched.h>.
12337
51c2684e
DJ
123382007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12339
12340 * linux-low.c (linux_tracefork_grandchild): New.
12341 (linux_tracefork_child): Use clone.
12342 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12343
75f83163
JB
123442007-10-31 Joel Brobecker <brobecker@adacore.com>
12345
12346 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12347
da5898ce
DJ
123482007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12349
12350 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12351
24a09b5f
DJ
123522007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12353
12354 * inferiors.c (change_inferior_id): Delete.
12355 (add_pid_to_list, pull_pid_from_list): New.
12356 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12357 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12358 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12359 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12360 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12361 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12362 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12363 (using_threads): Always set to 1.
12364 (handle_extended_wait): New.
12365 (add_process): Do not set TID.
12366 (linux_create_inferior): Set must_set_ptrace_flags.
12367 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12368 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12369 (linux_thread_alive): Rename TID argument to LWPID.
12370 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12371 (linux_wait_for_event): Do not use TID or check using_threads. Update
12372 call to dead_thread_notify. Call handle_extended_wait.
12373 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12374 (send_sigstop): Delete sigstop_sent.
12375 (wait_for_sigstop): Avoid TID.
12376 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12377 (linux_test_for_tracefork): New.
12378 (linux_lookup_signals): Use thread_db_active and
12379 linux_supports_tracefork_flag.
12380 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12381 * linux-low.h (get_process_thread): Avoid TID.
12382 (struct process_ifo): Move thread_known and tid to the end. Remove
12383 sigstop_sent.
12384 (linux_attach_lwp, thread_db_init): Update prototypes.
12385 * server.h (change_inferior_id): Delete prototype.
12386 (add_pid_to_list, pull_pid_from_list): New prototypes.
12387 * thread-db.c (thread_db_use_events): New.
12388 (find_first_thread): Rename to...
12389 (find_one_thread): ...this. Update callers and messages. Do not
12390 call fatal. Check thread_db_use_events. Do not call
12391 change_inferior_id or new_thread_notify.
12392 (maybe_attach_thread): Update. Do not call new_thread_notify.
12393 (thread_db_init): Set thread_db_use_events. Check use_events.
12394 * utils.c (fatal, warning): Correct message prefix.
12395
30ed0a8f
DJ
123962007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12397
12398 * Makefile.in (clean): Remove new files.
12399 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12400 (powerpc-64.o, powerpc-64.c): New rules.
12401 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12402 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12403 with SPE.
12404 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12405 SPE targets.
12406 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12407 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12408 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12409 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12410 (target_regsets): Add AltiVec and SPE register sets.
12411 * configure.ac: Check for AltiVec and SPE.
12412 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12413 (ppc_fill_vrregset, ppc_store_vrregset): New.
12414 (target_regsets): Add AltiVec register set.
12415 * configure: Regenerated.
12416
fd462a61
DJ
124172007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12418
12419 * linux-low.c (O_LARGEFILE): Define.
12420 (linux_read_memory): Use /proc/PID/mem.
12421 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12422 * configure, config.in: Regenerated.
12423
69f223ed
DJ
124242007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12425
12426 * linux-low.c (linux_wait_for_event): Do not pass signals while
12427 single-stepping.
12428
aec18585
PA
124292007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12430
12431 * win32-low.c (create_process): New.
12432 (win32_create_inferior): Use create_process instead of
12433 CreateProcess. If create_process failed retry appending an ".exe"
12434 suffix. Store the GetLastError result immediatelly after
12435 create_process calls and use it on the call to error.
12436
34d86ddd
PA
124372007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12438
12439 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12440
5a0e3bd0
JB
124412007-08-23 Joel Brobecker <brobecker@adacore.com>
12442
12443 * configure.ac: Switch license to GPLv3.
12444
f88c79e6
MS
124452007-08-01 Michael Snyder <msnyder@access-company.com>
12446
12447 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12448
6b3d9b83
PA
124492007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12450
12451 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12452 typedef.
12453 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12454 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12455 CloseToolhelp32Snapshot.
12456 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12457 CloseToolhelp32Snapshot.
12458
c588c53c
MS
124592007-07-27 Michael Snyder <michael.snyder@access-company.com>
12460
12461 * server.c (main): Check for inferior exit before main loop.
12462
aa0403d9
PA
124632007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12464
12465 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12466 instead of on tmp_desc.
12467
255e7678
DJ
124682007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12469 Daniel Jacobowitz <dan@codesourcery.com>
12470
12471 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12472 (add_thread): Minor cleanups.
12473 (clear_inferiors): Move lower in the file. Clear the DLL
12474 list.
12475 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12476 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12477 (xml_escape_text): New.
12478 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12479 for qSupported.
12480 (handle_v_cont): Report errors.
12481 (gdbserver_version): Update.
12482 (main): Correct size of own_buf. Do not report initial DLL events.
12483 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12484 (unloaded_dll, xml_escape_text): New.
12485 * win32-low.c (enum target_waitkind): Update comments.
12486 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12487 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12488 (win32_EnumProcessModules, win32_GetModuleInformation)
12489 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12490 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12491 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12492 (win32_Module32First, win32_Module32Next, load_toolhelp)
12493 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12494 (get_child_debug_event): Handle DLL events.
12495 (win32_wait): Likewise.
12496
0d37add9
DJ
124972007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12498
12499 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12500 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12501
45e2715e
PA
125022007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12503
12504 * win32-low.c (handle_output_debug_string): Ignore event if not
12505 waiting.
12506
c5674cf1
PA
125072007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12508
12509 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12510
2bbe3cc1
DJ
125112007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12512
12513 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12514
ae13219e
DJ
125152007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12516
12517 * inferiors.c (change_inferior_id): Add comment.
12518 * linux-low.c (check_removed_breakpoint): Add an early
12519 prototype. Improve debug output.
12520 (linux_attach): Doc update.
12521 (linux_detach_one_process, linux_detach): Clean up before releasing
12522 each process.
12523 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12524 * linux-low.h (struct process_info): Doc improvement.
12525 * mem-break.c (delete_all_breakpoints): New.
12526 * mem-break.h (delete_all_breakpoints): New prototype.
12527 * thread-db.c (find_first_thread): New.
12528 (thread_db_create_event): Call it instead of
12529 thread_db_find_new_threads. Clean up unused variables.
12530 (maybe_attach_thread): Remove first thread handling.
12531 (thread_db_find_new_threads): Use find_first_thread.
12532 (thread_db_get_tls_address): Likewise.
12533
4105de34
DJ
125342007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12535
12536 * thread-db.c (thread_db_find_new_threads): Add prototype.
12537 (thread_db_create_event): Check for the main thread before adding
12538 a new thread.
12539 (maybe_attach_thread): Only enable event reporting if TID == 0.
12540 (thread_db_get_tls_address): Check for new threads.
12541
2b876972
DJ
125422007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12543
12544 * linux-low.c (linux_create_inferior): Try execv before execvp.
12545 * spu-low.c (spu_create_inferior): Likewise.
12546
7a245884
DJ
125472007-06-13 Mike Frysinger <vapier@gentoo.org>
12548
12549 * linux-low.c (linux_create_inferior): Change execv to execvp.
12550 * spu-low.c (spu_create_inferior): Likewies.
12551
117ce543
DJ
125522007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12553
12554 * Makefile.in (clean): Clean new files instead of deleted ones.
12555 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12556 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12557 rules.
12558 * configure.srv: Specify XML files and new regformats for MIPS and
12559 MIPS64 GNU/Linux.
12560 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12561 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12562 an entry for the restart register.
12563 (mips_cannot_fetch_register, mips_cannot_store_register)
12564 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12565 register names to match the XML descriptions.
12566 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12567 restart register instead of $0.
12568
0e7f50da
UW
125692007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12570 Markus Deuling <deuling@de.ibm.com>
12571
12572 * remote-utils.c (decode_xfer_write): New function.
12573 * server.h (decode_xfer_write): Add prototype.
12574 * server.c (handle_query): Add PACKET_LEN argument. Support
12575 qXfer:spu:read and qXfer:spu:write packets.
12576 (main): Pass packet_len to handle_query.
12577 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12578 * target.h (target_ops): Add qxfer_spu.
12579
374c1d38
UW
125802007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12581
12582 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12583 accessing non-seekable spufs files.
12584
bb63802a
UW
125852007-05-16 Markus Deuling <deuling@de.ibm.com>
12586
889bf7c5 12587 * server.c (handle_query): Add reply for qC packet.
bb63802a 12588
7390519e
PA
125892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12590 Leo Zayas <lerele@champenstudios@com>
12591
12592 * server.h (check_remote_input_interrupt_request): New function.
12593 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12594 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12595 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12596 (check_remote_input_interrupt_request): New function.
12597 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 12598 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
12599 winapi_GenerateConsoleCtrlEvent): New typedefs.
12600 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12601 to 250 ms.
12602 (win32_wait): Check for remote interrupt request
12603 with check_remote_input_interrupt_request.
12604 (win32_request_interrupt): New function.
12605 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12606
34b34921
PA
126072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12608
12609 * win32-low.c (debug_registers_changed,
12610 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12611 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12612 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12613 (thread_rec): Get context using the low target.
12614 (child_add_thread): Call thread_added on the low target,
12615 which does the same thing.
12616 (regptr): Delete.
12617 (do_initial_child_stuff): Remove debug registers references.
12618 Set context using the low target. Resume threads after
12619 setting the contexts.
12620 (child_continue): Remove dead variable. Remove debug
12621 registers references.
12622 (child_fetch_inferior_registers): Go through the low target.
12623 (do_child_store_inferior_registers): Remove.
12624 (child_store_inferior_registers): Go through the low target.
12625 (win32_resume): Remove debug registers references.
12626 Set context using the low target.
12627 (handle_exception): Change return type to void. Don't record
12628 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12629 first chance exception.
889bf7c5 12630 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
12631 goto loop. Always return after waiting for debug event.
12632 (win32_wait): Convert to switch statement. Handle spurious
12633 events.
12634
12635 * win32-i386-low.c (debug_registers_changed,
12636 debug_registers_used): New.
12637 (initial_stuff): Rename to ...
12638 (i386_initial_stuff): ... this. Clear debug registers
12639 state variables.
12640 (store_debug_registers): Delete.
12641 (i386_get_thread_context): New.
12642 (load_debug_registers): Delete.
12643 (i386_set_thread_context): New.
12644 (i386_thread_added): New.
12645 (single_step): Rename to ...
12646 (i386_single_step): ... this.
12647 (do_fetch_inferior_registers): Rename to ...
12648 (i386_fetch_inferior_register): ... this.
12649 (i386_store_inferior_register): New.
12650 (the_low_target): Adapt to new interface.
12651
12652 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12653 (arm_get_thread_context): New.
12654 (arm_set_thread_context): New.
12655 (regptr): New.
12656 (do_fetch_inferior_registers): Rename to ...
12657 (arm_fetch_inferior_register): ... this.
12658 (arm_store_inferior_register): New.
12659 (arm_wince_breakpoint): Reimplement as unsigned long.
12660 (arm_wince_breakpoint_len): Define.
12661 (the_low_target): Adapt to new interface.
12662
12663 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12664 load_debug_registers. Add get_thread_context, set_thread_context,
12665 thread_added and store_inferior_register. Rename
12666 fetch_inferior_registers to fetch_inferior_register.
12667 (regptr): Remove declaration.
12668
dd6953e1
PA
126692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12670
12671 * linux-low.c (linux_detach): Change return type to int. Return 0.
12672 * spu-low.c (spu_detach): Likewise.
12673
444d6139
PA
126742007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12675
12676 * target.h (target_ops): Change return type of detach to int.
12677 Add join.
12678 (join_inferior): New.
12679 * server.c (main): Don't skip detach support on mingw32.
12680 If the inferior doesn't support detaching return error.
12681 Call join_inferior instead of using waitpid.
12682 * linux-low.c (linux_join): New.
12683 (linux_target_op): Add linux_join.
12684 * spu-low.c (spu_join): New.
12685 (spu_target_ops): Add spu_join.
12686 * win32-low.c (win32_detach): Adapt to new interface.
12687 Reopen current_process_handle before detaching. Issue a child
12688 resume before detaching.
12689 (win32_join): New.
12690 (win32_target_op): Add win32_join.
12691
1d5315fe
PA
126922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12693
12694 * win32-low.c (win32-attach): Fix return value.
12695 * target.h (target_ops): Describe ATTACH return values.
12696
bf914831
PA
126972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12698
12699 * win32-low.c (GETPROCADDRESS): Define.
12700 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12701 (winapi_DebugSetProcessKillOnExit): Likewise.
12702 (win32_create_inferior): Force usage of ansi CreateProcessA.
12703 (win32_attach): Use GETPROCADDRESS.
12704 (win32_detach): Likewise.
12705
f72f3e60
PA
127062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12707
12708 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12709
ed50f18f
PA
127102007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12711
12712 * win32-low.c: Commit leftover changes from 2007-03-29.
12713
0c2ead7e
DJ
127142007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12715
12716 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12717 fields short instead of int. Add explicit padding.
12718 (i387_cache_to_fsave): Remove unnecessary casts.
12719 (i387_fsave_to_cache): Doc fix.
12720 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12721
73725ff3
DJ
127222007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12723
12724 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12725 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12726
d99f33d8
PA
127272007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12728
12729 * configure.srv (arm*-*-mingw32ce*): Move near the other
12730 arm targets.
12731
68070c10
PA
127322007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12733
2482afc6 12734 * configure.ac: Add errno checking.
68070c10
PA
12735 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12736 sys/file.h and malloc.h.
12737 (AC_CHECK_DECLS): Add perror.
12738 (srv_mingwce): Handle.
2482afc6 12739 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
12740 win32-i386-low.o to srv_tgtobj.
12741 (i[34567]86-*-mingw*): Likewise.
12742 (arm*-*-mingw32ce*): Add case.
12743 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12744 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12745 [__MINGW32CE__] (strerror): New function.
12746 [__MINGW32CE__] (errno): Define to GetLastError.
12747 [__MINGW32CE__] (COUNTOF): New macro.
12748 (remote_open): Remove extra close call.
12749 * mem-break.c (delete_breakpoint_at): New function.
12750 * mem-break.h (delete_breakpoint_at): Declare.
12751 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12752 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12753 [USE_WIN32API] (read, write): Add char* casts.
12754 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12755 * server.h: Include wincecompat.h on Windows CE.
12756 [HAVE_ERRNO_H]: Check.
12757 (perror): Declare if not declared.
12758 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12759 (perror_with_name): Remove errno declaration.
12760 * wincecompat.h: New.
12761 * wincecompat.c: New.
12762 * win32-low.h: New.
12763 * win32-arm-low.c: New.
12764 * win32-i386-low.c: New.
12765 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12766 (OUTMSG2): Make it safe.
12767 (_T): New macro.
12768 (COUNTOF): New macro.
12769 (NUM_REGS): Get it from the low target.
12770 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12771 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12772 (thread_rec): Let low target handle debug registers.
12773 (child_add_thread): Likewise.
12774 (child_init_thread_list): Likewise.
12775 (continue_one_thread): Likewise.
12776 (regptr): New.
12777 (do_child_fetch_inferior_registers): Move to ...
12778 * win32-i386-low.c: ... here, and rename to ...
12779 (do_fetch_inferior_registers): ... this.
889bf7c5 12780 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12781 Go through the low target.
12782 (do_child_store_inferior_registers): Use regptr.
12783 (strwinerror): New function.
12784 (win32_create_inferior): Handle Windows CE.
12785 Use strwinerror instead of strerror on Windows error
12786 codes. Add program to the error output.
12787 Don't close the main thread handle on Windows CE.
12788 (win32_attach): Use coredll.dll on Windows CE.
12789 (win32_kill): Close current process and current
12790 thread handles.
12791 (win32_detach): Use coredll.dll on Windows CE.
12792 (win32_resume): Let low target handle debug registers, and
12793 step request.
12794 (handle_exception): Add/Remove initial breakpoint. Avoid
12795 non-existant WSTOPSIG on Windows CE.
12796 (win32_read_inferior_memory): Cast to remove warning.
12797 (win32_arch_string): Go through the low target.
12798 (initialize_low): Call set_breakpoint_data with the low
12799 target's breakpoint.
12800 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12801 FOP_REGNUM, mappings): Move to ...
12802 * win32-i386-low.c: ... here.
12803 * win32-low.c (win32_thread_info): Move to ...
12804 * win32-low.h: ... here.
12805 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12806 win32-arm-low.c and wincecompat.c.
12807 (all:): Add $EXEEXT.
12808 (install-only:): Likewise.
12809 (gdbserver:): Likewise.
12810 (gdbreplay:): Likewise.
12811 * config.in: Regenerate.
12812 * configure: Regenerate.
12813
41093d81
PA
128142007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12815
12816 * win32-low.c: Rename typedef thread_info to
12817 win32_thread_info throughout.
12818
544afa54
PA
128192007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12820
12821 * win32-i386-low.c: Rename to ...
12822 * win32-low.c: ... this.
12823 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12824 * Makefile.in: Likewise.
12825
bce7165d
PA
128262007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12827
12828 * remote-utils.c (monitor_output): Constify msg parameter.
12829 * server.h (monitor_output): Likewise.
12830 * win32-i386-low.c (handle_output_debug_string): New.
12831 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12832 handle_output_debug_string.
12833 (get_child_debug_event): Likewise.
12834
506c7aa0
DJ
128352007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12836
12837 * server.c (main): Correct strtoul check.
12838
42c81e2a
DJ
128392007-03-27 Jon Ringle <jon@ringle.org>
12840
12841 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12842
9453113a
DJ
128432007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12844
12845 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12846
64a69107
DJ
128472007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12848
12849 * terminal.h: Check HAVE_SGTTY_H.
12850
128512007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12852
12853 * remote-utils.c (remote_open): Print out the assigned port number.
12854
c74d0ad8
DJ
128552007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12856
12857 * remote-utils.c (monitor_output): New function.
12858 * server.c (debug_threads): Define here.
12859 (monitor_show_help): New function.
12860 (handle_query): Handle qRcmd.
12861 (main): Do not handle 'd' packet.
12862 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12863 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12864 of debug_threads.
12865
de7c3b4a
PA
128662007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12867
12868 * Makefile.in (EXEEXT): New.
12869 (clean): Use $(EXEEXT).
12870
ef57601b
PA
128712007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12872
12873 * target.h (target_ops): Rename send_signal to request_interrupt,
12874 and remove enum target_signal parameter.
12875 * linux-low.c (linux_request_interrupt): Rename from
12876 linux_send_signal, and always send SIGINT.
12877 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12878 and always send SIGINT.
12879 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12880 of send_signal.
12881 (input_interrupt): Likewise.
12882
820f2bda
PA
128832007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12884
12885 * server.c (get_features_xml): Check if target implemented
12886 arch_string.
12887 * win32-i386-low.c (win32_arch_string): New.
12888 (win32_target_ops): Add win32_arch_string as arch_string member.
12889
ab39bf24
UW
128902007-02-22 Markus Deuling <deuling@de.ibm.com>
12891
12892 * spu-low.c (spu_arch_string): New.
12893 (spu_target_ops): Add spu_arch_string.
12894
61ff6e04
DJ
128952007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12896
12897 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12898 * configure.ac: Do not check for terminal.h.
12899 * configure, config.in: Regenerated.
12900
fb1e4ffc
DJ
129012007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12902
12903 * Makefile.in (OBS): Add $(XML_BUILTIN).
12904 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12905 (clean): Update.
12906 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12907 (arm-with-iwmmxt.c): New.
12908 * config.in, configure: Regenerate.
12909 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12910 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12911 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12912 (arm*-*-linux*): Add iWMMXt and regset support.
12913 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12914 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12915 (arm_store_wmmxregset, target_regsets): New.
12916 * server.c (get_features_xml): Take annex argument. Check builtin
12917 XML documents.
12918 (handle_query): Handle multiple annexes.
12919
0f48aa01
DJ
129202007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12921
12922 * remote-utils.c [USE_WIN32API] (read, write): Define.
12923 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12924 write.
12925
23181151
DJ
129262007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12927
12928 * linux-i386-low.c (the_low_target): Set arch_string.
12929 * linux-x86-64-low.c (the_low_target): Likewise.
12930 * linux-low.c (linux_arch_string): New.
12931 (linux_target_ops): Add it.
12932 * linux-low.h (struct linux_target_ops): Add arch_string.
12933 * server.c (write_qxfer_response): Use const void * for DATA.
12934 (get_features_xml): New.
12935 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12936 * target.h (struct target_ops): Add arch_string method.
12937
9d606399
DJ
129382007-01-03 Denis Pilat <denis.pilat@st.com>
12939 Daniel Jacobowitz <dan@codesourcery.com>
12940
12941 * linux-low.c (linux_kill): Handle being called with no threads.
12942 * win32-i386-low.c (win32_kill): Likewise.
12943 (get_child_debug_event): Clear current_process_handle.
12944
129452006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12946 Daniel Jacobowitz <dan@codesourcery.com>
12947
12948 * remote-utils.c (remote_open): Check the type of specified
12949 serial port devices before opening them.
12950 * server.c (main): Kill the inferior if an error occurs during
12951 the first remote_open.
12952
a5e13d24
DJ
129532006-12-05 Markus Deuling <deuling@de.ibm.com>
12954
12955 * README: Update supported targets.
12956
186947f7
DJ
129572006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12958
12959 * Makefile.in (clean): Remove reg-mips64.c.
12960 (reg-mips64.c, reg-mips64.o): New rules.
12961 * configure.srv: Handle mips64. Include regset support for mips.
12962 * linux-mips-low.c (union mips_register): New.
12963 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12964 (mips_breakpoint, mips_breakpoint_at): Use int.
12965 (mips_collect_register, mips_supply_register)
12966 (mips_collect_register_32bit, mips_supply_register_32bit)
12967 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12968 (mips_store_fpregset, target_regsets): New.
12969 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12970
a13e2c95
UW
129712006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12972
12973 * configure.srv: Add target "spu*-*-*".
12974 * Makefile.in (clean): Remove reg-spu.c.
12975 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12976 * spu-low.c: New file.
12977
cb7283db
DJ
129782006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12979
12980 * configure.ac: Correct td_thr_tls_get_addr test.
12981 * configure: Regenerated.
12982
89be2091
DJ
129832006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12984
12985 * linux-low.c (linux_wait_for_event): Reformat. Use the
12986 pass_signals array.
12987 * remote-utils.c (decode_address_to_semicolon): New.
12988 * server.c (pass_signals, handle_general_set): New.
12989 (handle_query): Mention QPassSignals for qSupported.
12990 (main): Call handle_general_set.
12991 * server.h (pass_signals, decode_address_to_semicolon): New.
12992
000ef4f0
DJ
129932006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12994
12995 * server.c (handle_query): Correct error handling for read_auxv.
12996
b7149293
UW
129972005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12998
12999 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13000 and srv_linux_thread_db to yes.
13001 * linux-s390-low.c (s390_fill_gregset): New function.
13002 (target_regsets): Define data structure.
13003
dae5f5cf
DJ
130042006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13005
13006 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13007 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13008 * config.in, configure: Regenerated.
13009 * inferiors.c (gdb_id_to_thread): New function.
13010 (gdb_id_to_thread_id): Use it.
13011 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13012 * linux-low.h (struct process_info): Add th member.
13013 (thread_db_get_tls_address): New prototype.
13014 * remote-utils.c (decode_address): Make non-static.
13015 * server.c (handle_query): Handle qGetTLSAddr.
13016 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13017 * target.h (struct target_ops): Add get_tls_address.
13018 * thread-db.c (maybe_attach_thread): Save the thread handle.
13019 (thread_db_get_tls_address): New.
13020
32ca6d61
DJ
130212006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13022
13023 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13024 (linux_resume_one_process): Take a siginfo_t *. Update all
13025 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13026 (struct pending_signals): Add a siginfo_t.
13027 (linux_wait_for_process): Always set last_status.
13028 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13029 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13030 * linux-low.h (struct process_info): Add last_status.
13031
5ffff7c1
DJ
130322006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13033
13034 * remote-utils.c (try_rle): New function.
13035 (putpkt_binary): Use it.
13036
8695c747
DJ
130372006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13038
13039 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13040 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13041 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13042 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13043 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13044 point registers.
13045
290fadea
RS
130462006-08-08 Richard Sandiford <richard@codesourcery.com>
13047
13048 * server.c (terminal_fd): New variable.
13049 (old_foreground_pgrp): Likewise.
13050 (restore_old_foreground_pgrp): New function.
13051 (start_inferior): Record the terminal file descriptor in terminal_fd
13052 and its original foreground group in old_foreground_pgrp. Register
13053 restore_old_foreground_pgrp with atexit().
13054
9f2e1e63
DJ
130552006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13056
13057 * server.c (handle_query): Correct qPart to qXfer.
13058
b80864fb
DJ
130592006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13060
13061 * configure.ac: Check for more headers which are missing on
13062 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13063 * configure.srv: Add Cygwin and mingw32.
13064 * remote-utils.c: Don't include headers unconditionally which
13065 are missing on mingw32. Include <winsock.h> for mingw32.
13066 (remote_open): Adjust for mingw32 support. Flush
13067 standard error after writing to it.
13068 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13069 (unblock_async_io, enable_async_io, disable_async_io)
13070 (readchar, getpkt): Update for Winsock support.
13071 (prepare_resume_reply): Expect a protocol signal number.
13072 * server.c: Disable <sys/wait.h> on mingw32.
13073 (start_inferior): Adjust for mingw32 support. Flush
13074 standard error after writing to it.
13075 (attach_inferior): Likewise. Use protocol signal
13076 numbers.
13077 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13078 and names.
13079 * win32-i386-low.c: New file.
13080 * Makefile.in (XM_CLIBS): Set.
13081 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13082 (win32-i386-low.o): New dependency rule.
13083 * linux-low.c (linux_wait): Use target signal numbers.
13084 * target.h (struct target_ops): Doc fix.
13085 * server.h (target_signal_to_name): New prototype.
13086 * gdbreplay.c: Don't include headers unconditionally which
13087 are missing on mingw32. Include <winsock.h> for mingw32.
13088 (remote_close, remote_open): Adjust for Winsock support.
13089 * configure, config.in: Regenerated.
13090
0876f84a
DJ
130912006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13092
13093 * server.c (decode_xfer_read, write_qxfer_response): New.
13094 (handle_query): Take a packet length argument. Handle
13095 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13096 the qSupported response.
13097 (main): Update call to handle_query.
13098
01f9e8fa
DJ
130992006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13100
13101 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13102 (putpkt_binary): Renamed from putpkt and adjusted for binary
13103 data.
13104 (putpkt): New wrapper for putpkt_binary.
13105 (readchar): Don't mask off the high bit.
13106 (decode_X_packet): New function.
13107 * server.c (main): Call putpkt_binary if a handler sets the packet
13108 length. Save the length of the incoming packet. Handle 'X'.
13109 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13110
be2a5f71
DJ
131112006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13112
13113 * server.c (handle_query): Handle qSupported.
13114
ea025f5f
DJ
131152006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13116
13117 * remote-utils.c (all_symbols_looked_up): New variable.
13118 (look_up_one_symbol): Check it.
13119 * server.h (look_up_one_symbol): New declaration.
13120 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13121
9308fc88
DJ
131222006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13123
13124 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13125 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13126 (PTRACE_GET_THREAD_AREA): Define.
13127 (ps_get_thread_area): New function.
13128
52fb6437
NS
131292006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13130
13131 * configure.srv (m68k*-*-uclinux*): New target.
13132 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13133 (linux_resume_one_process): Remove extraneous cast.
13134 (linux_read_offsets): New.
13135 (linux_target_op): Add linux_read_offsets on mmuless systems.
13136 * server.c (handle_query): Add qOffsets logic.
13137 * target.h (struct target_ops): Add read_offsets.
13138
21b0f40c
DJ
131392006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13140
13141 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13142 (PTRACE_GET_THREAD_AREA): Define.
13143 (ps_get_thread_area): New function.
13144 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13145 (linux-x86-64-low.o): Update.
13146
0050a760
DJ
131472006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13148
13149 * configure.ac: Remove checks for prfpregset_t.
13150 * gdb_proc_service.h: New file.
13151 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13152 new "gdb_proc_service.h".
13153 * proc-service.c: Likewise.
13154 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13155 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13156 * Makefile.in (gdb_proc_service_h): Updated.
13157 * configure, config.in: Regenerated.
13158
b92a518e
DJ
131592006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13160
13161 * remote-utils.c (prepare_resume_reply): Move declaration
13162 of gdb_id_from_wait to the top of the block.
13163
545587ee
DJ
131642006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13165
13166 * linux-low.c (regsets_store_inferior_registers): Read the regset
13167 from the target before filling it.
13168
9db87ebd
DJ
131692006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13170
13171 * server.c (attach_inferior): Return SIGTRAP for a successful
13172 attach.
13173
dd24457d
DJ
131742006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13175
13176 * Makefile.in (OBS): Add version.o.
13177 (STAGESTUFF): Delete.
13178 (version.o): Add dependencies.
13179 (version.c): Replace rule.
13180 (clean): Remove version.c.
13181 * server.c (gdbserver_version): New.
13182 (gdbserver_usage): Use printf.
13183 (main): Handle --version and --help.
13184 * server.h (version, host_name): Add declarations.
13185
6f0f660e
EZ
131862005-12-23 Eli Zaretskii <eliz@gnu.org>
13187
889bf7c5
PA
13188 * linux-arm-low.c:
13189 * linux-arm-low.c:
13190 * inferiors.c:
13191 * i387-fp.h:
13192 * i387-fp.c:
13193 * gdbreplay.c:
13194 * regcache.c:
13195 * proc-service.c:
13196 * mem-break.h:
13197 * mem-break.c:
13198 * linux-x86-64-low.c:
13199 * linux-sh-low.c:
13200 * linux-s390-low.c:
13201 * linux-ppc64-low.c:
13202 * linux-ppc-low.c:
13203 * linux-mips-low.c:
13204 * linux-m68k-low.c:
13205 * linux-m32r-low.c:
13206 * linux-low.h:
13207 * linux-low.c:
13208 * linux-ia64-low.c:
13209 * linux-i386-low.c:
13210 * linux-crisv32-low.c:
13211 * thread-db.c:
13212 * terminal.h:
13213 * target.h:
13214 * target.c:
13215 * server.h:
13216 * server.c:
13217 * remote-utils.c:
13218 * regcache.h:
13219 * utils.c:
13220 * Makefile.in:
13221 * configure.ac:
6f0f660e
EZ
13222 * gdbserver.1: Add (C) after Copyright. Update the FSF
13223 address.
13224
9d1fb177
DJ
132252005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13226
13227 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13228 (arm_breakpoint_at): Recognize both breakpoints.
13229 (the_low_target): Use the correct breakpoint instruction.
13230
011a70c2
DJ
132312005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13232
13233 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13234 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13235 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13236 (the_low_target): Update.
13237
7fb85e41
AS
132382005-10-25 Andreas Schwab <schwab@suse.de>
13239
13240 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13241
13242 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13243 (ia64_num_regs): Reduce to 462.
13244
3db0444b
DJ
132452005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13246
13247 * acinclude.m4: Correct quoting.
13248 * aclocal.m4: Regenerated.
13249
13250 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13251 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13252 (thread_db_init): Call thread_db_err_str.
13253 * configure.ac: Check for TD_VERSION.
13254 * config.in, configure: Regenerated.
13255
bee0189a
DJ
132562005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13257
13258 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13259
e9d25b98
DJ
132602005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13261
13262 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13263 is not available. Define HAVE_PTRACE_GETREGS if it is.
13264 * config.in, configure: Regenerated.
13265 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13266 * linux-i386-low.c, linux-m68k-low.c: Update to use
13267 HAVE_PTRACE_GETREGS.
13268 * linux-low.c (regsets_fetch_inferior_registers)
13269 (regsets_store_inferior_registers): Only return 0 if we processed
13270 GENERAL_REGS.
13271 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13272 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13273
a06660f7
DJ
132742005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13275
13276 * inferiors.c (struct thread_info): Add gdb_id.
13277 (add_thread): Add gdb_id argument.
13278 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13279 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13280 calls to add_thread.
13281 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13282 * server.c (handle_query): Use thread_to_gdb_id.
13283 (handle_v_cont, main): Use gdb_id_to_thread_id.
13284 * server.h (add_thread): Update prototype.
13285 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13286 prototypes.
13287
5a1f5858
DJ
132882005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13289
13290 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13291 left-padded registers.
13292 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13293 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13294
e122f1f5
SE
132952005-07-01 Steve Ellcey <sje@cup.hp.com>
13296
13297 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13298 * configure: Regenerate.
13299 * config.in: Regenerate.
13300 * server.h (NEED_DECLARATION_STRERROR):
13301 Replace with !HAVE_DECL_STRERROR.
13302
d592fa2f
DJ
133032005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13304
13305 * linux-low.c (linux_wait, linux_send_signal): Don't test
13306 an unsigned long variable for > 0 if it could be MAX_ULONG.
13307 * server.c (myresume): Likewise.
13308 * target.c (set_desired_inferior): Likewise.
13309
ccbd4912
MK
133102005-06-13 Mark Kettenis <kettenis@gnu.org>
13311
13312 * configure.ac: Simplify and improve check for socklen_t.
13313 * configure, config.in: Regenerate.
13314
f450004a
DJ
133152005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13316
13317 * acconfig.h: Remove.
13318 * configure.ac: Add a test for socklen_t. Use three-argument
13319 AC_DEFINE throughout.
13320 * config.in: Regenerated using autoheader 2.59.
13321 * configure: Regenerated.
13322
13323 * gdbreplay.c (socklen_t): Provide a default.
13324 (remote_open): Use socklen_t.
13325 * remote-utils.c (socklen_t): Provide a default.
13326 (remote_open): Use socklen_t.
13327 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13328 unsigned char.
13329
13330 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13331 char for buffers.
13332 * linux-low.c (linux_read_memory, linux_write_memory)
13333 (linux_read_auxv): Likewise.
13334 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13335 (check_mem_write): Likewise.
13336 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13337 Likewise.
13338 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13339 (registers_from_string, register_data): Likewise.
13340 * server.c (handle_query, main): Likewise.
13341 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13342 (decode_M_packet): Likewise.
13343 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13344 * target.h (struct target_ops): Update read_memory, write_memory,
13345 and read_auxv.
13346 (read_inferior_memory, write_inferior_memory): Update.
13347 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13348 to unsigned char *.
13349 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13350 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13351 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13352 linux-s390-low.c, linux-sh-low.c: Update for changes in
13353 read_inferior_memory and the_low_target->breakpoint.
13354
eee84df1
DJ
133552005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13356
13357 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13358 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13359 * configure.srv: Add powerpc64-*-linux*.
13360 * linux-ppc64-low.c: New file.
13361
45b134e5
OF
133622005-05-23 Orjan Friberg <orjanf@axis.com>
13363
13364 * linux-cris-low.c: New file with support for CRIS.
13365 * linux-crisv32-low.c: Ditto for CRISv32.
13366 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13367 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13368 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13369 reg-crisv32.o, and reg-crisv32.c to make rules.
13370 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13371 recognized targets.
13372
48d93c75
UW
133732005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13374
13375 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13376 of sizeof (PTRACE_XFER_TYPE).
13377 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13378
e013ee27
OF
133792005-05-12 Orjan Friberg <orjanf@axis.com>
13380
889bf7c5 13381 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13382 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13383 pointers for hardware watchpoint support.
13384 * linux-low.h (struct linux_target_ops): Ditto.
13385 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13386 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13387 to linux_target_ops.
13388 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13389 reply packet.
13390 * server.c (main): Recognize 'Z' and 'z' packets.
13391
b0ded00b
UW
133922005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13393
13394 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13395 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13396 (the_low_target): Add new members.
13397
8643e2ad
DJ
133982005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13399
13400 * proc-service.c (ps_lgetregs): Search all_processes instead of
13401 all_threads.
13402
fc620387
DJ
134032005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13404
13405 * server.c (start_inferior): Change return type to int.
13406 (attach_inferior): Change sigptr to int *.
13407 (handle_v_cont, handle_v_requests): Change signal to int *.
13408 (main): Change signal to int.
13409
134102005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13411
13412 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13413 * configure.srv: Add m32r*-*-linux*.
13414 * linux-m32r-low.c: New file.
13415
e0e76420
DJ
134162005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13417
13418 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13419
a1928bad
DJ
134202005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13421
13422 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13423 Take unsigned long arguments for PIDs.
13424 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13425 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13426 (wait_for_sigstop, linux_resume_one_process)
13427 (regsets_fetch_inferior_registers, linux_send_signal)
13428 (linux_read_auxv): Likewise. Update the types of variables holding
13429 PIDs. Update format string specifiers.
13430 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13431 * remote-utils.c (prepare_resume_reply): Likewise.
13432 * server.c (cont_thread, general_thread, step_thread)
13433 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13434 unsigned long.
13435 (handle_query): Update format specifiers.
13436 (handle_v_cont, main): Use strtoul for thread IDs.
13437 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13438 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13439 (general_thread, step_thread, thread_from_wait)
13440 (old_thread_from_wait): Update.
13441 * target.h (struct thread_resume): Use unsigned long for THREAD.
13442 (struct target_ops): Use unsigned long for arguments to attach and
13443 thread_alive.
13444
dcdb98d2
DJ
134452005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13446
13447 * acinclude.m4: Include bfd/bfd.m4 directly.
13448 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13449 <agriffis@toolchain.org>.
13450 * aclocal.m4, configure: Regenerated.
13451
bec39cab
AC
134522005-01-07 Andrew Cagney <cagney@gnu.org>
13453
13454 * configure.ac: Rename configure.in, require autoconf 2.59.
13455 * configure: Re-generate.
13456
434c4c77
DJ
134572004-12-08 Daniel Jacobowitz <dan@debian.org>
13458
13459 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13460 LIBS when finished.
13461 * aclocal.m4: Regenerated.
13462 * configure: Regenerated.
13463
db1d3e1b
AS
134642004-11-21 Andreas Schwab <schwab@suse.de>
13465
13466 * linux-m68k-low.c (m68k_num_gregs): Define.
13467 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13468 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13469 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13470 (m68k_breakpoint_at): New. Add to the_low_target.
13471
13472 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13473 srv_linux_thread_db to yes.
13474
43360365
JB
134752004-10-20 Joel Brobecker <brobecker@gnat.com>
13476
13477 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13478 (ARCH_SET_FS): Likewise.
13479 (ARCH_GET_FS): Likewise.
13480 (ARCH_GET_GS): Likewise.
13481
fd500816
DJ
134822004-10-16 Daniel Jacobowitz <dan@debian.org>
13483
13484 * linux-i386-low.c (ps_get_thread_area): New.
13485 * linux-x86-64-low.c (ps_get_thread_area): New.
13486 * linux-low.c: Include <sys/syscall.h>.
13487 (linux_kill_one_process): Don't kill the first thread here.
13488 (linux_kill): Kill the first thread here.
13489 (kill_lwp): New function.
13490 (send_sigstop, linux_send_signal): Use it.
13491 * proc-service.c: Clean up #ifdefs.
13492 (fpregset_info): Delete.
13493 (ps_lgetregs): Update and enable implementation.
13494 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13495 implementations.
13496 * remote-utils.c (struct sym_cache, symbol_cache): New.
13497 (input_interrupt): Print a clearer message.
13498 (async_io_enabled): New variable.
13499 (enable_async_io, disable_async_io): Use it. Update comments.
13500 (look_up_one_symbol): Use the symbol cache.
13501 * thread-db.c (thread_db_look_up_symbols): New function.
13502 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13503
f6de3c42
DJ
135042004-10-16 Daniel Jacobowitz <dan@debian.org>
13505
13506 * configure.in: Test for -rdynamic.
13507 * configure: Regenerated.
13508 * Makefile (INTERNAL_LDFLAGS): New.
13509 (gdbserver, gdbreplay): Use it.
13510
2c0fc042
AC
135112004-09-02 Andrew Cagney <cagney@gnu.org>
13512
13513 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13514
075b3282
DJ
135152004-03-23 Daniel Jacobowitz <drow@mvista.com>
13516
13517 * linux-low.c (linux_wait): Clear all_processes list also.
13518
fa6a77dc
DJ
135192004-03-12 Daniel Jacobowitz <drow@mvista.com>
13520
13521 * linux-low.c: Include <errno.h>. Remove extern declaration of
13522 errno.
13523
6d782a97
DJ
135242004-03-12 Daniel Jacobowitz <drow@mvista.com>
13525
13526 * gdbreplay.c, server.h, utils.c: Update copyright years.
13527
3a7fb99b
DJ
135282004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13529
13530 * server.c (main): Print child status or termination signal from
13531 variable 'signal', not 'sig'.
13532
c3e735a6
DJ
135332004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13534
13535 * linux-low.c (linux_read_memory): Change return type to
13536 int. Check for and return error from ptrace().
13537 * target.c (read_inferior_memory): Change return type to int. Pass
13538 back return status from the_target->read_memory().
13539 * target.h (struct target_ops): Adapt *read_memory() prototype.
13540 Update comment.
13541 (read_inferior_memory): Adapt prototype.
13542 * server.c (main): Return an error packet if
13543 read_inferior_memory() returns an error.
13544
a59d1c82
DJ
135452004-03-04 Daniel Jacobowitz <drow@mvista.com>
13546
13547 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13548 Unify with other clean targets.
13549
dc3f8883
DJ
135502004-02-29 Daniel Jacobowitz <drow@mvista.com>
13551
13552 * server.c (handle_v_cont): Call set_desired_inferior.
13553
89a208da
DJ
135542004-02-29 Daniel Jacobowitz <drow@mvista.com>
13555
13556 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13557
62ea82f5
DJ
135582004-02-29 Daniel Jacobowitz <drow@mvista.com>
13559
13560 * linux-low.c (linux_wait): Unblock async I/O.
13561 (linux_resume): Block and enable async I/O.
13562 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13563 * server.h (block_async_io, unblock_async_io): Add prototypes.
13564
6910d122
DJ
135652004-02-29 Daniel Jacobowitz <drow@mvista.com>
13566
13567 * remote-utils.c (remote_open): Print a status notice after
13568 opening a TCP port.
13569 * server.c (attach_inferior): Print a status notice after
13570 attaching.
13571
135722004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
13573
13574 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13575
c89dc5d4
DJ
135762004-02-26 Daniel Jacobowitz <drow@mvista.com>
13577
13578 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13579 error packet.
13580 * server.c, target.h: Update copyright years.
13581
4b8dad4a
RM
135822004-02-25 Roland McGrath <roland@redhat.com>
13583
13584 * target.h (struct target_ops): New member `read_auxv'.
13585 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13586 * linux-low.c (linux_read_auxv): New function.
13587 (linux_target_ops): Initialize `read_auxv' member to that.
13588
d7446758
JB
135892004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13590
13591 Committed by Jim Blandy <jimb@redhat.com>.
13592
13593 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 13594 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
13595 instead of GPR_SIZE to distiguish s390 and s390x targets.
13596
5544ad89
DJ
135972004-01-31 Daniel Jacobowitz <drow@mvista.com>
13598
13599 * linux-low.c: Update copyright year.
13600 (check_removed_breakpoint): Clear pending_is_breakpoint.
13601 (linux_set_resume_request, linux_queue_one_thread)
13602 (resume_status_pending_p): New functions.
13603 (linux_continue_one_thread): Use process->resume.
13604 (linux_resume): Only resume threads if there are no pending events.
13605 * linux-low.h (struct process_info): Add resume request
13606 pointer.
13607
2a68b70e
DJ
136082004-01-30 Daniel Jacobowitz <drow@mvista.com>
13609
13610 * regcache.c (new_register_cache): Clear the allocated register
13611 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13612
64386c31
DJ
136132003-10-13 Daniel Jacobowitz <drow@mvista.com>
13614
13615 * linux-low.c (linux_resume): Take a struct thread_resume *
13616 argument.
13617 (linux_wait): Update call.
13618 (resume_ptr): New static variable.
13619 (linux_continue_one_thread): Renamed from
13620 linux_continue_one_process. Use resume_ptr.
13621 (linux_resume): Use linux_continue_one_thread.
13622 * server.c (handle_v_cont, handle_v_requests): New functions.
13623 (myresume): New function.
13624 (main): Handle 'v' case.
13625 * target.h (struct thread_resume): New type.
13626 (struct target_ops): Change argument of "resume" to struct
13627 thread_resume *.
13628 (myresume): Delete macro.
13629
c938e9b0
L
136302003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13631
13632 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13633 (uninstall): Support DESTDIR.
13634
7f313d07
BC
13635Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13636
13637 * configure.srv: Add xscale*linux copy of arm*linux entry.
13638
3b2fc2ea
DJ
136392003-07-24 Daniel Jacobowitz <drow@mvista.com>
13640
13641 * linux-arm-low.c (arm_reinsert_addr): New function.
13642 (the_low_target): Add arm_reinsert_addr.
13643
1c0a559e
MK
136442003-07-08 Mark Kettenis <kettenis@gnu.org>
13645
13646 * mem-break.c: Remove whitespace at end of file.
13647
43d5792c
DJ
136482003-06-28 Daniel Jacobowitz <drow@mvista.com>
13649
13650 * configure.in: Check whether we need to prototype strerror.
13651 * server.h: Optionally prototype strerror.
13652 * gdbreplay.c (perror_with_name): Use strerror.
13653 * linux-low.c (linux_attach_lwp): Use strerror.
13654 * utils.c (perror_with_name): Use strerror.
13655 * config.in, configure: Regenerated.
13656
c8a86edf
DJ
136572003-06-28 Daniel Jacobowitz <drow@mvista.com>
13658
13659 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13660 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13661
73d37363
DJ
136622003-06-20 Daniel Jacobowitz <drow@mvista.com>
13663
13664 * Makefile.in (SFILES): Update.
13665 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13666 low-sun3.c: Remove files.
13667
6ad8ae5c
DJ
136682003-06-17 Daniel Jacobowitz <drow@mvista.com>
13669
13670 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13671 (linux_detach_one_process, linux_detach): New functions.
13672 (linux_target_ops): Add linux_detach.
13673 * server.c (main): Handle 'D' packet.
13674 * target.h (struct target_ops): Add "detach" member.
13675 (detach_inferior): Define.
13676
1581182a
MK
136772003-06-13 Mark Kettenis <kettenis@gnu.org>
13678
13679 From Kelley Cook <kelleycook@wideopenwest.com>:
13680 * configure.srv: Accept i[34567]86 variants.
13681
e5379b03
DJ
136822003-06-05 Daniel Jacobowitz <drow@mvista.com>
13683
13684 * linux-low.c (linux_wait_for_event): Correct comment typos.
13685 (linux_resume_one_process): Call check_removed_breakpoint.
13686 (linux_send_signal): New function.
13687 (linux_target_ops): Add linux_send_signal.
13688 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13689 of kill.
13690 * target.h (struct target_ops): Add send_signal.
13691
2ff29de4
JB
136922003-05-29 Jim Blandy <jimb@redhat.com>
13693
13694 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13695 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13696 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13697 away part of the register's value.
13698
254787d4
DJ
136992003-03-26 Daniel Jacobowitz <drow@mvista.com>
13700
13701 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13702 (linux_wait_for_event, linux_init_signals): Likewise.
13703
94e10508
DJ
137042003-03-17 Daniel Jacobowitz <drow@mvista.com>
13705
13706 * configure.in: Check for stdlib.h.
13707 * configure: Regenerated.
13708 * config.in: Regenerated.
13709
4c0711e0
DJ
137102003-01-04 Andreas Schwab <schwab@suse.de>
13711
13712 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13713
ef66e766
AC
137142003-01-02 Andrew Cagney <ac131313@redhat.com>
13715
13716 * Makefile.in: Remove obsolete code.
13717
a1358604
DJ
137182002-11-20 Daniel Jacobowitz <drow@mvista.com>
13719
13720 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13721 defined(PT_FPR0_HI).
13722
23ce3b1c
DJ
137232002-11-17 Stuart Hughes <seh@zee2.com>
13724
13725 * linux-arm-low.c (arm_num_regs): Increase.
13726 (arm_regmap): Include status register.
13727
137282002-11-17 Daniel Jacobowitz <drow@mvista.com>
13729
13730 * linux-low.c (register_addr): Remove incorrect -1 check.
13731
a9fa9f7d
DJ
137322002-08-29 Daniel Jacobowitz <drow@mvista.com>
13733
13734 * linux-low.c (linux_create_inferior): Call setpgid. Return
13735 the new PID.
13736 (unstopped_p, linux_signal_pid): Remove.
13737 (linux_target_ops): Remove linux_signal_pid.
13738 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13739 global instead of target method.
13740 * target.h (struct target_ops): Remove signal_pid. Update comment
13741 for create_inferior.
13742 * server.c (signal_pid): New variable.
13743 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 13744 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
13745 (attach_inferior): Set signal_pid.
13746
17574093
DJ
137472002-08-23 Daniel Jacobowitz <drow@mvista.com>
13748
13749 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13750
137512002-08-20 Jim Blandy <jimb@redhat.com>
13752
13753 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13754 default for this.
13755
137562002-08-01 Andrew Cagney <cagney@redhat.com>
13757
13758 * Makefile.in: Make chill references obsolete.
13759
137602002-07-24 Kevin Buettner <kevinb@redhat.com>
13761
13762 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13763 * configure: Regenerate.
13764 * config.in: Regenerate.
13765
137662002-07-09 David O'Brien <obrien@FreeBSD.org>
13767
13768 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13769 (perror_with_name, remote_close, remote_open, expect, play): Static.
13770
137712002-07-04 Michal Ludvig <mludvig@suse.cz>
13772
4b8dad4a 13773 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
13774 byte offsets instead of an array of indexes.
13775 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13776
137772002-06-13 Daniel Jacobowitz <drow@mvista.com>
13778
13779 * regcache.c: Add comment.
13780
137812002-06-11 Daniel Jacobowitz <drow@mvista.com>
13782
13783 * thread-db.c: New file.
13784 * proc-service.c: New file.
13785 * acinclude.m4: New file.
13786 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13787 proc-service.o, and thread-db.o.
13788 (linux-low.o): Add USE_THREAD_DB.
13789 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13790 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13791 * aclocal.m4: Regenerated.
13792 * config.in: Regenerated.
13793 * configure: Regenerated.
13794 * configure.in: Check for proc_service.h, sys/procfs.h,
13795 thread_db.h, and linux/elf.h headrs.
13796 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13797 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13798 Check for -lthread_db and thread support.
13799 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13800 PowerPC, and SuperH.
13801 * i387-fp.c: Constify arguments.
13802 * i387-fp.h: Likewise.
13803 * inferiors.c: (struct thread_info): Renamed from
13804 `struct inferior_info'. Remove PID member. Use generic inferior
13805 list header. All uses updated.
13806 (inferiors, signal_pid): Removed.
13807 (all_threads): New variable.
13808 (get_thread): Define.
13809 (add_inferior_to_list): New function.
13810 (for_each_inferior): New function.
13811 (change_inferior_id): New function.
13812 (add_inferior): Removed.
13813 (remove_inferior): New function.
13814 (add_thread): New function.
13815 (free_one_thread): New function.
13816 (remove_thread): New function.
13817 (clear_inferiors): Use for_each_inferior and free_one_thread.
13818 (find_inferior): New function.
13819 (find_inferior_id): New function.
13820 (inferior_target_data): Update argument type.
13821 (set_inferior_target_data): Likewise.
13822 (inferior_regcache_data): Likewise.
13823 (set_inferior_regcache_data): Likewise.
13824 * linux-low.c (linux_bp_reinsert): Remove.
13825 (all_processes, stopping_threads, using_thrads)
13826 (struct pending_signals, debug_threads, pid_of): New.
13827 (inferior_pid): Replace with macro.
13828 (struct inferior_linux_data): Remove.
13829 (get_stop_pc, add_process): New functions.
13830 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13831 Use add_process and add_thread.
13832 (linux_attach_lwp): New function, based on old linux_attach. Use
13833 add_process and add_thread. Set stop_expected for new threads.
13834 (linux_attach): New function.
13835 (linux_kill_one_process): New function.
13836 (linux_kill): Kill all LWPs.
13837 (linux_thread_alive): Use find_inferior_id.
13838 (check_removed_breakpoints, status_pending_p): New functions.
13839 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13840 Update. Use WNOHANG. Wait for cloned processes also. Update process
13841 struct for the found process.
13842 (linux_wait_for_event): New function.
13843 (linux_wait): Use it. Support LWPs.
13844 (send_sigstop, wait_for_sigstop, stop_all_processes)
13845 (linux_resume_one_process, linux_continue_one_process): New functions.
13846 (linux_resume): Support LWPs.
13847 (REGISTER_RAW_SIZE): Remove.
13848 (fetch_register): Use register_size instead. Call supply_register.
13849 (usr_store_inferior_registers): Likewise. Call collect_register.
13850 Fix recursive case.
13851 (regsets_fetch_inferior_registers): Improve error message.
13852 (regsets_store_inferior_registers): Add debugging.
13853 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13854 (unstopped_p, linux_signal_pid): New functions.
13855 (linux_target_ops): Add linux_signal_pid.
13856 (linux_init_signals): New function.
13857 (initialize_low): Call it. Initialize using_threads.
13858 * regcache.c (inferior_regcache_data): Add valid
13859 flag.
13860 (get_regcache): Fetch registers lazily. Add fetch argument
13861 and update all callers.
13862 (regcache_invalidate_one, regcache_invalidate): New
13863 functions.
13864 (new_register_cache): Renamed from create_register_cache.
13865 Return the new regcache.
13866 (free_register_cache): Change argument to a void *.
13867 (registers_to_string, registers_from_string): Call get_regcache
13868 with fetch flag set.
13869 (register_data): Make static. Pass fetch flag to get_regcache.
13870 (supply_register): Call get_regcache with fetch flag clear.
13871 (collect_register): Call get_regcache with fetch flag set.
13872 (collect_register_as_string): New function.
13873 * regcache.h: Update.
13874 * remote-utils.c (putpkt): Flush after debug output and use
13875 stderr.
13876 Handle input interrupts while waiting for an ACK.
13877 (input_interrupt): Use signal_pid method.
13878 (getpkt): Flush after debug output and use stderr.
13879 (outreg): Use collect_register_as_string.
13880 (new_thread_notify, dead_thread_notify): New functions.
13881 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13882 and general_thread.
13883 (look_up_one_symbol): Flush after debug output.
13884 * server.c (step_thread, server_waiting): New variables.
13885 (start_inferior): Don't use signal_pid. Update call to mywait.
13886 (attach_inferior): Update call to mywait.
13887 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13888 (main): Don't fetch/store registers explicitly. Use
13889 set_desired_inferior. Support proposed ``Hs'' packet. Update
13890 calls to mywait.
13891 * server.h: Update.
13892 (struct inferior_list, struct_inferior_list_entry): New.
13893 * target.c (set_desired_inferior): New.
13894 (write_inferior_memory): Constify.
13895 (mywait): New function.
13896 * target.h: Update.
13897 (struct target_ops): New signal_pid method.
13898 (mywait): Removed macro, added prototype.
13899
13900 * linux-low.h (regset_func): Removed.
13901 (regset_fill_func, regset_store_func): New.
13902 (enum regset_type): New.
13903 (struct regset_info): Add type field. Use new operation types.
13904 (struct linux_target_ops): stop_pc renamed to get_pc.
13905 Add decr_pc_after_break and breakpoint_at.
13906 (get_process, get_thread_proess, get_process_thread)
13907 (strut process_info, all_processes, linux_attach_lwp)
13908 (thread_db_init): New.
13909
13910 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13911 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13912 (the_low_target): Add new members.
13913 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13914 (i386_store_fpxregset): Constify.
13915 (target_regsets): Add new kind identifier.
13916 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13917 (i386_set_pc): Add debugging.
13918 (i386_breakpoint_at): New function.
13919 (the_low_target): Add new members.
13920 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13921 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13922 (mips_breakpoint_at): New.
13923 (the_low_target): Add new members.
13924 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13925 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13926 (the_low_target): Add new members.
13927 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13928 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13929 (the_low_target): Add new members.
13930 * linux-x86-64-low.c (target_regsets): Add new kind
13931 identifier.
13932
139332002-05-15 Daniel Jacobowitz <drow@mvista.com>
13934
13935 From Martin Pool <mbp@samba.org>:
13936 * server.c (gdbserver_usage): New function.
13937 (main): Call it.
13938
139392002-05-14 Daniel Jacobowitz <drow@mvista.com>
13940
13941 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13942 stop_at -> stop_pc.
13943
139442002-05-04 Andrew Cagney <ac131313@redhat.com>
13945
13946 * Makefile.in: Remove obsolete code.
13947
139482002-04-24 Michal Ludvig <mludvig@suse.cz>
13949
13950 * linux-low.c (regsets_fetch_inferior_registers),
13951 (regsets_store_inferior_registers): Removed cast to int from
13952 ptrace() calls.
13953 * regcache.h: Added declaration of struct inferior_info.
13954
139552002-04-20 Daniel Jacobowitz <drow@mvista.com>
13956
13957 * inferiors.c (struct inferior_info): Add regcache_data.
13958 (add_inferior): Call create_register_cache.
13959 (clear_inferiors): Call free_register_cache.
13960 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13961 * regcache.c (struct inferior_regcache_data): New.
13962 (registers): Remove.
13963 (get_regcache): New function.
13964 (create_register_cache, free_register_cache): New functions.
13965 (set_register_cache): Don't initialize the register cache here.
13966 (registers_to_string, registers_from_string, register_data): Call
13967 get_regcache.
13968 * regcache.h: Add prototypes.
13969 * server.h: Likewise.
13970
139712002-04-20 Daniel Jacobowitz <drow@mvista.com>
13972
13973 * mem-break.c: New file.
13974 * mem-break.h: New file.
13975 * Makefile.in: Add mem-break.o rule; update server.h
13976 dependencies.
13977 * inferiors.c (struct inferior_info): Add target_data
13978 member.
13979 (clear_inferiors): Free target_data member if set.
13980 (inferior_target_data, set_inferior_target_data): New functions.
13981 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13982 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13983 * linux-low.c (linux_bp_reinsert): New variable.
13984 (struct inferior_linux_data): New.
13985 (linux_create_inferior): Use set_inferior_target_data.
13986 (linux_attach): Likewise. Call add_inferior.
13987 (linux_wait_for_one_inferior): New function.
13988 (linux_wait): Call it.
13989 (linux_write_memory): Add const.
13990 (initialize_low): Call set_breakpoint_data.
13991 * linux-low.h (struct linux_target_ops): Add breakpoint
13992 handling members.
13993 * server.c (attach_inferior): Remove extra add_inferior
13994 call.
13995 * server.h: Include mem-break.h. Update inferior.c
13996 prototypes.
13997 * target.c (read_inferior_memory)
13998 (write_inferior_memory): New functions.
13999 * target.h (read_inferior_memory)
14000 (write_inferior_memory): Change macros to prototypes.
14001 (struct target_ops): Update comments. Add const to write_memory
14002 definition.
14003
140042002-04-11 Daniel Jacobowitz <drow@mvista.com>
14005
14006 * linux-low.c (usr_store_inferior_registers): Support
14007 registers which are allowed to fail to store.
14008 * linux-low.h (linux_target_ops): Likewise.
14009 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14010 (ppc_cannot_store_register): FPSCR may not be storable.
14011
140122002-04-09 Daniel Jacobowitz <drow@mvista.com>
14013
14014 * server.h: Include <string.h> if HAVE_STRING_H.
14015 * ChangeLog: Correct paths in last ChangeLog entry.
14016
140172002-04-09 Daniel Jacobowitz <drow@mvista.com>
14018
14019 * linux-low.h: Remove obsolete prototypes.
14020 (struct linux_target_ops): New.
14021 (extern the_low_target): New.
14022 * linux-low.c (num_regs, regmap): Remove declarations.
14023 (register_addr): Use the_low_target explicitly.
14024 (fetch_register): Likewise.
14025 (usr_fetch_inferior_registers): Likewise.
14026 (usr_store_inferior_registers): Likewise.
14027 * linux-arm-low.c (num_regs): Remove.
14028 (arm_num_regs): Define.
14029 (arm_regmap): Renamed from regmap, made static.
14030 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14031 made static.
14032 (arm_cannot_store_register): Renamed from cannot_store_register,
14033 made static.
14034 (the_low_target): New.
14035 * linux-i386-low.c (num_regs): Remove.
14036 (i386_num_regs): Define.
14037 (i386_regmap): Renamed from regmap, made static.
14038 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14039 made static.
14040 (i386_cannot_store_register): Renamed from cannot_store_register,
14041 made static.
14042 (the_low_target): New.
14043 * linux-ia64-low.c (num_regs): Remove.
14044 (ia64_num_regs): Define.
14045 (ia64_regmap): Renamed from regmap, made static.
14046 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14047 made static.
14048 (ia64_cannot_store_register): Renamed from cannot_store_register,
14049 made static.
14050 (the_low_target): New.
14051 * linux-m68k-low.c (num_regs): Remove.
14052 (m68k_num_regs): Define.
14053 (m68k_regmap): Renamed from regmap, made static.
14054 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14055 made static.
14056 (m68k_cannot_store_register): Renamed from cannot_store_register,
14057 made static.
14058 (the_low_target): New.
14059 * linux-mips-low.c (num_regs): Remove.
14060 (mips_num_regs): Define.
14061 (mips_regmap): Renamed from regmap, made static.
14062 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14063 made static.
14064 (mips_cannot_store_register): Renamed from cannot_store_register,
14065 made static.
14066 (the_low_target): New.
14067 * linux-ppc-low.c (num_regs): Remove.
14068 (ppc_num_regs): Define.
14069 (ppc_regmap): Renamed from regmap, made static.
14070 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14071 made static.
14072 (ppc_cannot_store_register): Renamed from cannot_store_register,
14073 made static.
14074 (the_low_target): New.
14075 * linux-s390-low.c (num_regs): Remove.
14076 (s390_num_regs): Define.
14077 (s390_regmap): Renamed from regmap, made static.
14078 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14079 made static.
14080 (s390_cannot_store_register): Renamed from cannot_store_register,
14081 made static.
14082 (the_low_target): New.
14083 * linux-sh-low.c (num_regs): Remove.
14084 (sh_num_regs): Define.
14085 (sh_regmap): Renamed from regmap, made static.
14086 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14087 made static.
14088 (sh_cannot_store_register): Renamed from cannot_store_register,
14089 made static.
14090 (the_low_target): New.
14091 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14092 (the_low_target): New.
14093
140942002-04-09 Daniel Jacobowitz <drow@mvista.com>
14095
14096 * Makefile.in: Add stamp-h target.
14097 * configure.in: Create stamp-h.
14098 * configure: Regenerated.
14099
141002002-04-09 Daniel Jacobowitz <drow@mvista.com>
14101
14102 * inferiors.c: New file.
14103 * target.c: New file.
14104 * target.h: New file.
14105 * Makefile.in: Add target.o and inferiors.o. Update
14106 dependencies.
14107 * linux-low.c (inferior_pid): New static variable,
14108 moved from server.c.
14109 (linux_create_inferior): Renamed from create_inferior.
14110 Call add_inferior. Return 0 on success instead of a PID.
14111 (linux_attach): Renamed from myattach.
14112 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14113 (linux_thread_alive): Renamed from mythread_alive.
14114 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14115 child dies.
14116 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14117 (regsets_store_inferior_registers): Correct error message.
14118 Add missing ``return 0''.
14119 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14120 (linux_store_registers): Renamed from store_inferior_registers.
14121 (linux_read_memory): Renamed from read_inferior_memory.
14122 (linux_write_memory): Renamed from write_inferior_memory.
14123 (linux_target_ops): New structure.
14124 (initialize_low): Call set_target_ops ().
14125 * remote-utils.c (unhexify): New function.
14126 (hexify): New function.
14127 (input_interrupt): Send signals to ``signal_pid''.
14128 * server.c (inferior_pid): Remove.
14129 (start_inferior): Update create_inferior call.
14130 (attach_inferior): Call add_inferior.
14131 (handle_query): New function.
14132 (main): Call handle_query for `q' packets.
14133 * server.h: Include "target.h". Remove obsolete prototypes.
14134 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14135
141362002-04-09 Daniel Jacobowitz <drow@mvista.com>
14137
14138 * Makefile.in: Add WARN_CFLAGS. Update configury
14139 dependencies.
14140 * configure.in: Check for <string.h>
14141 * configure: Regenerate.
14142 * config.in: Regenerate.
14143 * gdbreplay.c: Include needed system headers.
14144 (remote_open): Remove strchr prototype.
14145 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14146 * regcache.c (supply_register): Change buf argument to const void *.
14147 (supply_register_by_name): Likewise.
14148 (collect_register): Change buf argument to void *.
14149 (collect_register_by_name): Likewise.
14150 * regcache.h: Add missing prototypes.
14151 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14152 * server.c (handle_query): New function.
14153 (attached): New static variable, moved out of main.
14154 (main): Quiet longjmp clobber warnings.
14155 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14156 * utils.c (error): Remove NORETURN.
14157 (fatal): Likewise.
This page took 1.670727 seconds and 4 git commands to generate.