]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Update x86 linker tests for --disable-x86-relax-relocations
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
fcdad592
YQ
12016-05-17 Yao Qi <yao.qi@linaro.org>
2
3 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4 instead of find_inferior.
5
9e784964
YQ
62016-05-05 Yao Qi <yao.qi@linaro.org>
7
8 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
9 Initialize res to zero.
10
cf2ebb6e
YQ
112016-05-05 Yao Qi <yao.qi@linaro.org>
12
13 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
14 to uint32_t.
15
c1aebf87
UW
162016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17
18 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
19 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
20 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
21
35fd2deb 222016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 23 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
24
25 * tracepoint.c (write_inferior_int8): New function.
26 (cmd_qtenable_disable): Write enable flag using
27 write_inferior_int8.
28
484b3c32
YQ
292016-04-25 Yao Qi <yao.qi@linaro.org>
30
31 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
32 (need_step_over_p): Return zero if the LWP has pending signals
33 can be delivered on software single step target.
34
85ba7d86
YQ
352016-04-25 Yao Qi <yao.qi@linaro.org>
36
37 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
38 return instead of error.
39
3539aa13
YQ
402016-04-22 Yao Qi <yao.qi@linaro.org>
41
42 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
43 to 23.
44
5b061e98
YQ
452016-04-22 Yao Qi <yao.qi@linaro.org>
46
47 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
48 signal when stepping over breakpoint with software single
49 step.
50
3451269c
PA
512016-04-21 Pedro Alves <palves@redhat.com>
52
53 * linux-s390-low.c (s390_collect_ptrace_register)
54 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
55 add casts.
56 (s390_check_regset): Use void * instead of gdb_byte *.
57
a2358508
PA
582016-04-20 Pedro Alves <palves@redhat.com>
59
60 * configure: Renegerate.
61
6885166d
YQ
622016-04-20 Yao Qi <yao.qi@linaro.org>
63
64 * linux-aarch32-low.c: Include "arch/arm-linux.h".
65 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
66 number 16.
67 (arm_store_gregset): Likewise.
68
2b863f51
WT
692016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
70
71 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
72 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
73 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
74 (amd64-avx-mpx-linux.c): New rules.
75 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
76 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
77 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
78 (srv_amd64_regobj): Add amd64-avx-mpx.o.
79 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
80 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
81 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
82 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
83 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
84 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
85 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
86 * linux-x86-low.c (x86_linux_read_description): Add case for
87 X86_XSTATE_AVX_MPX_MASK.
88 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
89 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
90 init_registers_i386_avx_mpx_linux.
91 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
92 (initialize_low_tracepoint): Call
93 init_registers_i386_avx_mpx_linux.
94 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
95 (initialize_low_tracepoint): Call
96 init_registers_amd64_avx_mpx_linux.
97 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
98 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
99 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
100 declarations.
101
9b30624b
PA
1022016-04-18 Pedro Alves <palves@redhat.com>
103
104 * configure: Regenerate.
105
45e3745e
AT
1062016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
107
108 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
109 (aarch64_emit_sub): Likewise.
110
2afc13ff
PA
1112016-04-12 Pedro Alves <palves@redhat.com>
112
113 * utils.c (prepare_to_throw_exception): Delete.
114
6e774b13
SM
1152016-04-05 Simon Marchi <simon.marchi@ericsson.com>
116
117 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
118
4dca19f8
MK
1192016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
120
121 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
122
d0a9981f
MK
1232016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
124
125 * linux-aarch64-ipa.c: Add <elf.h> include.
126 * linux-ppc-ipa.c: Add <elf.h> include.
127 * linux-s390-ipa.c: Add <elf.h> include.
128
252db07e
MK
1292016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
130
131 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
132 (get_raw_reg_ptr): Likewise.
133 (get_trace_state_variable_value_ptr): Likewise.
134 (set_trace_state_variable_value_ptr): Likewise.
135 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
136 char *.
137
14e2b6d9
MK
1382016-03-31 Wei-cheng Wang <cole945@gmail.com>
139 Marcin Kościelnicki <koriakin@0x04.net>
140
141 PR/17221
142 * linux-ppc-low.c (emit_insns): New function.
143 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
144 (ppc_emit_prologue): New function.
145 (ppc_emit_epilogue): New function.
146 (ppc_emit_add): New function.
147 (ppc_emit_sub): New function.
148 (ppc_emit_mul): New function.
149 (ppc_emit_lsh): New function.
150 (ppc_emit_rsh_signed): New function.
151 (ppc_emit_rsh_unsigned): New function.
152 (ppc_emit_ext): New function.
153 (ppc_emit_zero_ext): New function.
154 (ppc_emit_log_not): New function.
155 (ppc_emit_bit_and): New function.
156 (ppc_emit_bit_or): New function.
157 (ppc_emit_bit_xor): New function.
158 (ppc_emit_bit_not): New function.
159 (ppc_emit_equal): New function.
160 (ppc_emit_less_signed): New function.
161 (ppc_emit_less_unsigned): New function.
162 (ppc_emit_ref): New function.
163 (ppc_emit_const): New function.
164 (ppc_emit_reg): New function.
165 (ppc_emit_pop): New function.
166 (ppc_emit_stack_flush): New function.
167 (ppc_emit_swap): New function.
168 (ppc_emit_stack_adjust): New function.
169 (ppc_emit_call): New function.
170 (ppc_emit_int_call_1): New function.
171 (ppc_emit_void_call_2): New function.
172 (ppc_emit_if_goto): New function.
173 (ppc_emit_goto): New function.
174 (ppc_emit_eq_goto): New function.
175 (ppc_emit_ne_goto): New function.
176 (ppc_emit_lt_goto): New function.
177 (ppc_emit_le_goto): New function.
178 (ppc_emit_gt_goto): New function.
179 (ppc_emit_ge_goto): New function.
180 (ppc_write_goto_address): New function.
181 (ppc_emit_ops_impl): New static variable.
182 (ppc64v1_emit_prologue): New function.
183 (ppc64v2_emit_prologue): New function.
184 (ppc64_emit_epilogue): New function.
185 (ppc64_emit_add): New function.
186 (ppc64_emit_sub): New function.
187 (ppc64_emit_mul): New function.
188 (ppc64_emit_lsh): New function.
189 (ppc64_emit_rsh_signed): New function.
190 (ppc64_emit_rsh_unsigned): New function.
191 (ppc64_emit_ext): New function.
192 (ppc64_emit_zero_ext): New function.
193 (ppc64_emit_log_not): New function.
194 (ppc64_emit_bit_and): New function.
195 (ppc64_emit_bit_or): New function.
196 (ppc64_emit_bit_xor): New function.
197 (ppc64_emit_bit_not): New function.
198 (ppc64_emit_equal): New function.
199 (ppc64_emit_less_signed): New function.
200 (ppc64_emit_less_unsigned): New function.
201 (ppc64_emit_ref): New function.
202 (ppc64_emit_const): New function.
203 (ppc64v1_emit_reg): New function.
204 (ppc64v2_emit_reg): New function.
205 (ppc64_emit_pop): New function.
206 (ppc64_emit_stack_flush): New function.
207 (ppc64_emit_swap): New function.
208 (ppc64v1_emit_call): New function.
209 (ppc64v2_emit_call): New function.
210 (ppc64v1_emit_int_call_1): New function.
211 (ppc64v2_emit_int_call_1): New function.
212 (ppc64v1_emit_void_call_2): New function.
213 (ppc64v2_emit_void_call_2): New function.
214 (ppc64_emit_if_goto): New function.
215 (ppc64_emit_eq_goto): New function.
216 (ppc64_emit_ne_goto): New function.
217 (ppc64_emit_lt_goto): New function.
218 (ppc64_emit_le_goto): New function.
219 (ppc64_emit_gt_goto): New function.
220 (ppc64_emit_ge_goto): New function.
221 (ppc64v1_emit_ops_impl): New static variable.
222 (ppc64v2_emit_ops_impl): New static variable.
223 (ppc_emit_ops): New function.
224 (linux_low_target): Wire in ppc_emit_ops.
225
a2174ba4
MK
2262016-03-31 Wei-cheng Wang <cole945@gmail.com>
227 Marcin Kościelnicki <koriakin@0x04.net>
228
229 PR/17221
230 * Makefile.in: Add powerpc-*-ipa.o
231 * configure.srv: Add ipa_obj for powerpc*-linux.
232 * linux-ppc-ipa.c: New file.
233 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
234 includes.
235 (PPC_FIELD): New macro.
236 (PPC_SEXT): New macro.
237 (PPC_OP6): New macro.
238 (PPC_BO): New macro.
239 (PPC_LI): New macro.
240 (PPC_BD): New macro.
241 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
242 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
243 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
244 (ppc_get_thread_area): New function.
245 (is_elfv2_inferior): New function.
246 (gen_ds_form): New function.
247 (GEN_STD): New macro.
248 (GEN_STDU): New macro.
249 (GEN_LD): New macro.
250 (GEN_LDU): New macro.
251 (gen_d_form): New function.
252 (GEN_ADDI): New macro.
253 (GEN_ADDIS): New macro.
254 (GEN_LI): New macro.
255 (GEN_LIS): New macro.
256 (GEN_ORI): New macro.
257 (GEN_ORIS): New macro.
258 (GEN_LWZ): New macro.
259 (GEN_STW): New macro.
260 (GEN_STWU): New macro.
261 (gen_xfx_form): New function.
262 (GEN_MFSPR): New macro.
263 (GEN_MTSPR): New macro.
264 (GEN_MFCR): New macro.
265 (GEN_MTCR): New macro.
266 (GEN_SYNC): New macro.
267 (GEN_LWSYNC): New macro.
268 (gen_x_form): New function.
269 (GEN_OR): New macro.
270 (GEN_MR): New macro.
271 (GEN_LWARX): New macro.
272 (GEN_STWCX): New macro.
273 (GEN_CMPW): New macro.
274 (gen_md_form): New function.
275 (GEN_RLDICL): New macro.
276 (GEN_RLDICR): New macro.
277 (gen_i_form): New function.
278 (GEN_B): New macro.
279 (GEN_BL): New macro.
280 (gen_b_form): New function.
281 (GEN_BNE): New macro.
282 (GEN_LOAD): New macro.
283 (GEN_STORE): New macro.
284 (gen_limm): New function.
285 (gen_atomic_xchg): New function.
286 (gen_call): New function.
287 (ppc_relocate_instruction): New function.
288 (ppc_install_fast_tracepoint_jump_pad): New function.
289 (ppc_get_min_fast_tracepoint_insn_len): New function.
290 (ppc_get_ipa_tdesc_idx): New function.
291 (the_low_target): Wire in the new functions.
292 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
293 tdescs.
294 * linux-ppc-tdesc.h: New file.
295
a13c4696
MK
2962016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
297
298 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
299 (alloc_jump_pad_buffer): New function.
300 * linux-amd64-ipa.c: Add <sys/mman.h> include.
301 (alloc_jump_pad_buffer): New function.
302 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
303 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
304 (alloc_jump_pad_buffer): New function.
305 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
306 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
307 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
308 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
309
1cda1512
MK
3102016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
311
312 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
313 * linux-amd64-ipa.c: Likewise.
314 * linux-i386-ipa.c: Likewise.
315 * linux-s390-ipa.c: Likewise.
316 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
317 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
318 set_trace_state_variable_value_ptr.
319 (struct ipa_sym_addresses): Likewise.
320 (symbol_list): Likewise.
321 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
322 accessing gdb_collect directly.
323 (gdb_collect_ptr_type): New typedef.
324 (get_raw_reg_ptr_type): New typedef.
325 (get_trace_state_variable_value_ptr_type): New typedef.
326 (set_trace_state_variable_value_ptr_type): New typedef.
327 (gdb_collect_ptr): New global.
328 (get_raw_reg_ptr): New global.
329 (get_trace_state_variable_value_ptr): New global.
330 (set_trace_state_variable_value_ptr): New global.
331 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
332 accessing get_raw_reg directly.
333 (get_get_tsv_func_addr): Likewise for
334 get_trace_state_variable_value_ptr.
335 (get_set_tsv_func_addr): Likewise for
336 set_trace_state_variable_value_ptr.
337 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
338
72fb5488
SM
3392016-03-30 Simon Marchi <simon.marchi@ericsson.com>
340
341 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
342
28170b88
MK
3432016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
344
345 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
346 packets.
347 (relocate_instruction): Remove own_buf.
348 * server.c (own_buf): Make global.
349 (handle_v_requests): Make global.
350 * server.h (own_buf): New declaration.
351 (handle_v_requests): New prototype.
352
f39e8743
MK
3532016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
354
355 PR 18377
356 * linux-s390-low.c (add_insns): New function.
357 (s390_emit_prologue): New function.
358 (s390_emit_epilogue): New function.
359 (s390_emit_add): New function.
360 (s390_emit_sub): New function.
361 (s390_emit_mul): New function.
362 (s390_emit_lsh): New function.
363 (s390_emit_rsh_signed): New function.
364 (s390_emit_rsh_unsigned): New function.
365 (s390_emit_ext): New function.
366 (s390_emit_log_not): New function.
367 (s390_emit_bit_and): New function.
368 (s390_emit_bit_or): New function.
369 (s390_emit_bit_xor): New function.
370 (s390_emit_bit_not): New function.
371 (s390_emit_equal): New function.
372 (s390_emit_less_signed): New function.
373 (s390_emit_less_unsigned): New function.
374 (s390_emit_ref): New function.
375 (s390_emit_if_goto): New function.
376 (s390_emit_goto): New function.
377 (s390_write_goto_address): New function.
378 (s390_emit_litpool): New function.
379 (s390_emit_const): New function.
380 (s390_emit_call): New function.
381 (s390_emit_reg): New function.
382 (s390_emit_pop): New function.
383 (s390_emit_stack_flush): New function.
384 (s390_emit_zero_ext): New function.
385 (s390_emit_swap): New function.
386 (s390_emit_stack_adjust): New function.
387 (s390_emit_set_r2): New function.
388 (s390_emit_int_call_1): New function.
389 (s390_emit_void_call_2): New function.
390 (s390_emit_eq_goto): New function.
391 (s390_emit_ne_goto): New function.
392 (s390_emit_lt_goto): New function.
393 (s390_emit_le_goto): New function.
394 (s390_emit_gt_goto): New function.
395 (s390_emit_ge_goto): New function.
396 (s390x_emit_prologue): New function.
397 (s390x_emit_epilogue): New function.
398 (s390x_emit_add): New function.
399 (s390x_emit_sub): New function.
400 (s390x_emit_mul): New function.
401 (s390x_emit_lsh): New function.
402 (s390x_emit_rsh_signed): New function.
403 (s390x_emit_rsh_unsigned): New function.
404 (s390x_emit_ext): New function.
405 (s390x_emit_log_not): New function.
406 (s390x_emit_bit_and): New function.
407 (s390x_emit_bit_or): New function.
408 (s390x_emit_bit_xor): New function.
409 (s390x_emit_bit_not): New function.
410 (s390x_emit_equal): New function.
411 (s390x_emit_less_signed): New function.
412 (s390x_emit_less_unsigned): New function.
413 (s390x_emit_ref): New function.
414 (s390x_emit_if_goto): New function.
415 (s390x_emit_const): New function.
416 (s390x_emit_call): New function.
417 (s390x_emit_reg): New function.
418 (s390x_emit_pop): New function.
419 (s390x_emit_stack_flush): New function.
420 (s390x_emit_zero_ext): New function.
421 (s390x_emit_swap): New function.
422 (s390x_emit_stack_adjust): New function.
423 (s390x_emit_int_call_1): New function.
424 (s390x_emit_void_call_2): New function.
425 (s390x_emit_eq_goto): New function.
426 (s390x_emit_ne_goto): New function.
427 (s390x_emit_lt_goto): New function.
428 (s390x_emit_le_goto): New function.
429 (s390x_emit_gt_goto): New function.
430 (s390x_emit_ge_goto): New function.
431 (s390_emit_ops): New function.
432 (struct linux_target_ops): Fill in emit_ops hook.
433
abd9baf9
MK
4342016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
435
436 PR 18377
437 * Makefile.in: Add s390 IPA files.
438 * configure.srv: Build IPA for s390.
439 * linux-s390-ipa.c: New file.
440 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
441 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
442 (tdesc_s390_linux32): Likewise.
443 (init_registers_s390_linux32v1): Likewise.
444 (tdesc_s390_linux32v1): Likewise.
445 (init_registers_s390_linux32v2): Likewise.
446 (tdesc_s390_linux32v2): Likewise.
447 (init_registers_s390_linux64): Likewise.
448 (tdesc_s390_linux64): Likewise.
449 (init_registers_s390_linux64v1): Likewise.
450 (tdesc_s390_linux64v1): Likewise.
451 (init_registers_s390_linux64v2): Likewise.
452 (tdesc_s390_linux64v2): Likewise.
453 (init_registers_s390_te_linux64): Likewise.
454 (tdesc_s390_te_linux64): Likewise.
455 (init_registers_s390_vx_linux64): Likewise.
456 (tdesc_s390_vx_linux64): Likewise.
457 (init_registers_s390_tevx_linux64): Likewise.
458 (tdesc_s390_tevx_linux64): Likewise.
459 (init_registers_s390x_linux64): Likewise.
460 (tdesc_s390x_linux64): Likewise.
461 (init_registers_s390x_linux64v1): Likewise.
462 (tdesc_s390x_linux64v1): Likewise.
463 (init_registers_s390x_linux64v2): Likewise.
464 (tdesc_s390x_linux64v2): Likewise.
465 (init_registers_s390x_te_linux64): Likewise.
466 (tdesc_s390x_te_linux64): Likewise.
467 (init_registers_s390x_vx_linux64): Likewise.
468 (tdesc_s390x_vx_linux64): Likewise.
469 (init_registers_s390x_tevx_linux64): Likewise.
470 (tdesc_s390x_tevx_linux64): Likewise.
471 (have_hwcap_s390_vx): New static variable.
472 (s390_arch_setup): Fill have_hwcap_s390_vx.
473 (s390_get_thread_area): New function.
474 (s390_ft_entry_gpr_esa): New const.
475 (s390_ft_entry_gpr_zarch): New const.
476 (s390_ft_entry_misc): New const.
477 (s390_ft_entry_fr): New const.
478 (s390_ft_entry_vr): New const.
479 (s390_ft_main_31): New const.
480 (s390_ft_main_64): New const.
481 (s390_ft_exit_fr): New const.
482 (s390_ft_exit_vr): New const.
483 (s390_ft_exit_misc): New const.
484 (s390_ft_exit_gpr_esa): New const.
485 (s390_ft_exit_gpr_zarch): New const.
486 (append_insns): New function.
487 (s390_relocate_instruction): New function.
488 (s390_install_fast_tracepoint_jump_pad): New function.
489 (s390_get_min_fast_tracepoint_insn_len): New function.
490 (s390_get_ipa_tdesc_idx): New function.
491 (struct linux_target_ops): Wire in the above functions.
492 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
493 * linux-s390-tdesc.h: New file.
494
a4105d04
MK
4952016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
496
497 * linux-s390-low.c (s390_supports_tracepoints): New function.
498 (struct linux_target_ops): Fill supports_tracepoints hook.
499
35ac8b3e
YQ
5002016-03-18 Yao Qi <yao.qi@linaro.org>
501
502 * linux-low.c (lwp_signal_can_be_delivered): New function.
503 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
504
94610ec4
YQ
5052016-03-18 Yao Qi <yao.qi@linaro.org>
506
507 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
508 0 if signal is enqueued. Remove 'signal' from one debugging
509 message. Move one debugging message to some lines below.
510 Remove code setting 'signal' to 0.
511
80aea927
YQ
5122016-03-18 Yao Qi <yao.qi@linaro.org>
513
514 * linux-low.c (linux_low_filter_event): Remove redundant
515 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
516
b04fd3be
MK
5172016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
518
519 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
520 (struct linux_target_ops): Wire in the above.
521
c40c8d4b
YQ
5222016-03-03 Yao Qi <yao.qi@linaro.org>
523
524 * linux-low.c: Update comments to start_step_over.
525
0f8288ae
YQ
5262016-03-03 Yao Qi <yao.qi@linaro.org>
527
528 PR server/19736
529 * linux-low.c (handle_extended_wait): Set child suspended
530 if event_lwp->bp_reinsert isn't zero.
531
fdbd04a8
YQ
5322016-03-02 Yao Qi <yao.qi@linaro.org>
533
534 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
535 enqueue_pending_signal.
536
6896a8fa
MK
5372016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
538
539 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
540 is actually loaded.
541
ab503087
MK
5422016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
543
544 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
545 (s390_regmap_3264) [!__s390x__]: New global.
546 (s390_collect_ptrace_register): Skip map entries containing -1.
547 (s390_supply_ptrace_register): Ditto.
548 (s390_fill_gprs_high): New function.
549 (s390_store_gprs_high): New function.
550 (s390_regsets): Add NT_S390_HIGH_GPRS.
551 (s390_get_hwcap): Enable on 31-bit.
552 (have_hwcap_s390_high_gprs): Enable on 31-bit.
553 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
554 Detect NT_S390_HIGH_GPRS.
555 (s390_usrregs_info_3264): Enable on 31-bit.
556 (s390_regs_info): Enable regs_info_3264 on 31-bit.
557 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
558
ae91f625
MK
5592016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
560
561 PR gdb/13808
562 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
563 * configure.srv: Ditto.
564 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
565 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
566 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
567 (init_registers_amd64_linux): Remove prototype.
568 (tdesc_amd64_linux): Remove declaration.
569 (get_ipa_tdesc): New function.
570 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
571 initialize remaining tdescs.
572 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
573 (init_registers_i386_linux): Remove prototype.
574 (tdesc_i386_linux): Remove declaration.
575 (get_ipa_tdesc): New function.
576 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
577 initialize remaining tdescs.
578 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
579 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
580 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
581 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
582 (x86_get_ipa_tdesc_idx): New function.
583 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
584 * linux-x86-tdesc.h: New file.
585 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
586 (target_get_ipa_tdesc_idx): New macro.
587 * tracepoint.c (ipa_tdesc_idx): New macro.
588 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
589 (symbol_list): Add ipa_tdesc_idx.
590 (cmd_qtstart): Write ipa_tdesc_idx in the target.
591 (ipa_tdesc): Remove.
592 (ipa_tdesc_idx): New variable.
593 (get_context_regcache): Use get_ipa_tdesc.
594 (gdb_collect): Ditto.
595 (gdb_probe): Ditto.
596 * tracepoint.h (get_ipa_tdesc): New prototype.
597 (ipa_tdesc): Remove.
598
e7ad2f14
PA
5992016-02-24 Pedro Alves <palves@redhat.com>
600
601 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
602 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
603 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
604 Factor out common code between the USE_SIGTRAP_SIGINFO and
605 !USE_SIGTRAP_SIGINFO blocks.
606 (linux_low_filter_event): Call save_stop_reason instead of
607 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
608 Update comments.
609 (linux_wait_1): Update comments.
610
657f9cde
WW
6112016-02-24 Wei-cheng Wang <cole945@gmail.com>
612
613 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
614 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
615 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
616 ppc_insert_point, ppc_remove_point.
617
b00b61e1
MK
6182016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
619
620 * linux-s390-low.c (s390_supports_z_point_type): New function.
621 (struct linux_target_ops): Wire s390_supports_z_point_type in.
622
553cb527
YQ
6232016-02-16 Yao Qi <yao.qi@linaro.org>
624
625 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
626 PC. Get pc from regcache_read_pc.
627
a5652c21
YQ
6282016-02-12 Yao Qi <yao.qi@linaro.org>
629
630 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
631 or linux_get_pc_32bit.
632 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
633
ed443b61
YQ
6342016-02-12 Yao Qi <yao.qi@linaro.org>
635
636 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
637 arm_linux_get_next_pcs_fixup.
638
020ecd38
MK
6392016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
640
641 * tracepoint.c (x_tracepoint_action_download): Change
642 write_inferior_data_ptr to write_inferior_data_pointer.
643 (cmd_qtstart): Likewise.
644 (write_inferior_data_ptr): Remove.
645 (download_agent_expr): Change write_inferior_data_ptr to
646 write_inferior_data_pointer.
647 (download_tracepoint_1): Likewise.
648 (download_tracepoint): Likewise.
649 (download_trace_state_variables): Likewise.
650
7cae9051
WW
6512016-02-11 Wei-cheng Wang <cole945@gmail.com>
652 Marcin Kościelnicki <koriakin@0x04.net>
653
654 * tracepoint.c (struct tracepoint_action_ops): Remove.
655 (struct tracepoint_action): Remove ops.
656 (m_tracepoint_action_download, r_tracepoint_action_download)
657 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
658 size and offset accordingly.
659 (m_tracepoint_action_ops, r_tracepoint_action_ops)
660 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
661 (tracepoint_action_send, tracepoint_action_download): New functions.
662 Helpers for trace action handlers.
663 (add_tracepoint_action): Remove setup actions ops.
664 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
665
9f6a71b4
YQ
6662016-02-10 Yao Qi <yao.qi@linaro.org>
667
668 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
669
1e94266c
SM
6702016-02-09 Simon Marchi <simon.marchi@ericsson.com>
671
672 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
673 to AC_OUTPUT.
674 * configure: Regenerate.
675
8adce034
SM
6762016-02-09 Simon Marchi <simon.marchi@ericsson.com>
677
678 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
679 void * to gdb_byte *.
680 * linux-low.c (siginfo_fixup): Likewise.
681 (linux_xfer_siginfo): Likewise.
682 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
683 Likewise.
684 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
685
93813b37
WT
6862016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
687
688 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
689 to srv_tgtobj.
690 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
691 to srv_tgtobj.
692 * linux-x86-low.c [__x86_64__]: Include
693 "nat/amd64-linux-siginfo.h".
694 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
695 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
696 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
697 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
698 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
699 (cpt_si_fd, si_timerid, si_overrun): Move from
700 nat/amd64-linux-siginfo.c.
701 * Makefile.in (amd64-linux-siginfo.o:): New rule.
702
8424cc97
SM
7032016-01-28 Simon Marchi <simon.marchi@ericsson.com>
704
705 * server.c (skip_to_semicolon): Remove.
706 (process_point_options): Use strchrnul instead of
707 skip_to_semicolon.
708
4d18591b
YQ
7092016-01-26 Yao Qi <yao.qi@linaro.org>
710
711 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
712 * linux-low.c (install_software_single_step_breakpoints): Don't
713 call regcache_read_pc.
714 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
715 argument pc.
716
d8020970
YQ
7172016-01-26 Yao Qi <yao.qi@linaro.org>
718
719 * linux-low.c (install_software_single_step_breakpoints): Call
720 regcache_read_pc instead of get_pc.
721
8b207339
YQ
7222016-01-26 Yao Qi <yao.qi@linaro.org>
723
724 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
725 (unblock_async_io): Rename to ...
726 (block_unblock_async_io): ... it. New function.
727 (enable_async_io): Don't install SIGIO handler. Unblock it
728 instead.
729 (disable_async_io): Don't ignore SIGIO. Block it instead.
730 (initialize_async_io): Install SIGIO handler. Don't call
731 unblock_async_io.
732
18879fef
YQ
7332016-01-26 Yao Qi <yao.qi@linaro.org>
734
735 * remote-utils.c (getpkt): If the buffer isn't empty, and the
736 first character is '\003', call *the_target->request_interrupt.
737
a0f8e08a
YQ
7382016-01-25 Yao Qi <yao.qi@linaro.org>
739
740 * remote-utils.c (new_thread_notify): Remove.
741 (dead_thread_notify): Likewise.
742 * remote-utils.h (new_thread_notify): Remove declaration.
743 (dead_thread_notify): Likewise.
744
cc5fd9ab
MK
7452016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
746
747 * gdb.trace/pending.exp: Fix expected message on continue.
748
99e8eb11
MK
7492016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
750
751 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
752 it works properly on big-endian machines where sizeof (CORE_ADDR)
753 != sizeof (void *).
754
a994041d
PA
7552016-01-21 Pedro Alves <palves@redhat.com>
756
757 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
758 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
759 * configure: Regenerate.
760
f7a6a40d
YQ
7612016-01-21 Yao Qi <yao.qi@linaro.org>
762
763 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
764 is_thumb and set it according to CPSR saved on the stack.
765 (get_next_pcs_syscall_next_pc): Pass is_thumb to
766 arm_sigreturn_next_pc.
767
6f69e520
YQ
7682016-01-18 Yao Qi <yao.qi@linaro.org>
769
770 * linux-low.c (linux_set_pc_64bit): New function.
771 (linux_get_pc_64bit): New function.
772 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
773 Declare.
774 * linux-sparc-low.c (debug_threads): Remove declaration.
775 (sparc_get_pc): Remove.
776 (the_low_target): Use linux_get_pc_64bit instead of
777 sparc_get_pc.
778 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
779 (the_low_target): Use linux_get_pc_64bit and
780 linux_set_pc_64bit.
781
276d4552
YQ
7822016-01-18 Yao Qi <yao.qi@linaro.org>
783
784 * linux-arm-low.c (debug_threads): Remove declaration.
785 (arm_get_pc, arm_set_pc): Remove.
786 (the_low_target): Use linux_get_pc_32bit and
787 linux_set_pc_32bit.
788 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
789 (the_low_target): Use linux_get_pc_32bit and
790 linux_set_pc_32bit.
791 * linux-cris-low.c (debug_threads): Remove declaration.
792 (cris_get_pc, cris_set_pc,): Remove.
793 (the_low_target): Use linux_get_pc_32bit and
794 linux_set_pc_32bit.
795 * linux-crisv32-low.c (debug_threads): Remove declaration.
796 (cris_get_pc, cris_set_pc): Remove.
797 (the_low_target): Use linux_get_pc_32bit and
798 linux_set_pc_32bit.
799 * linux-low.c: Include inttypes.h.
800 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
801 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
802 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
803 (the_low_target): Use linux_get_pc_32bit and
804 linux_set_pc_32bit.
805 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
806 (the_low_target): Use linux_get_pc_32bit and
807 linux_set_pc_32bit.
808 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
809 (the_low_target): Use linux_get_pc_32bit and
810 linux_set_pc_32bit.
811 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
812 (the_low_target): Use linux_get_pc_32bit and
813 linux_set_pc_32bit.
814 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
815 (the_low_target): Use linux_get_pc_32bit and
816 linux_set_pc_32bit.
817
eb0edac8
GB
8182016-01-18 Gary Benson <gbenson@redhat.com>
819
820 * configure.ac (AC_FUNC_FORK): New check.
821 * config.in: Regenerate.
822 * configure: Likewise.
823
1b451dda
YQ
8242016-01-14 Yao Qi <yao.qi@linaro.org>
825
826 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
827 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
828 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
829 arm_get_next_pcs_ctor.
830
82075af2
JS
8312016-01-12 Josh Stone <jistone@redhat.com>
832 Philippe Waroquiers <philippe.waroquiers@skynet.be>
833
834 * inferiors.h: Include "gdb_vecs.h".
835 (struct process_info): Add syscalls_to_catch.
836 * inferiors.c (remove_process): Free syscalls_to_catch.
837 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
838 syscall_return stops.
839 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
840 * server.c (handle_general_set): Handle QCatchSyscalls.
841 (handle_query): Report support for QCatchSyscalls.
842 * target.h (struct target_ops): Add supports_catch_syscall.
843 (target_supports_catch_syscall): New macro.
844 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
845 (struct lwp_info): Add syscall_state.
846 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
847 Maintain syscall_state and syscalls_to_catch across exec.
848 (get_syscall_trapinfo): New function, proxy to the_low_target.
849 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
850 (linux_low_filter_event): Toggle syscall_state entry/return for
851 syscall traps, and set it ignored for all others.
852 (gdb_catching_syscalls_p): New function.
853 (gdb_catch_this_syscall_p): New function.
854 (linux_wait_1): Handle SYSCALL_SIGTRAP.
855 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
856 (linux_supports_catch_syscall): New function.
857 (linux_target_ops): Install it.
858 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
859 (the_low_target): Install it.
860
8f13a3ce
MF
8612016-01-12 Mike Frysinger <vapier@gentoo.org>
862
863 * acinclude.m4: Include new ../warning.m4 file.
864 * configure: Regenerated.
865 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
866
5b3da067
MF
8672016-01-12 Mike Frysinger <vapier@gentoo.org>
868
869 * ax.c (is_goto_target): Mark static.
870 * linux-low.c (register_addr): Likewise.
871 (linux_fetch_registers, linux_store_registers): Likewise.
872 * mem-break.c (any_persistent_commands): Fix old prototype.
873 (add_commands_to_breakpoint): Mark static.
874 * regcache.c (find_register_by_name): Delete unused func.
875 * remote-utils.c (hex_or_minus_one): Mark static.
876 * server.c (monitor_show_help): Mark static.
877 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
878 handle_v_requests): Likewise.
879
bc504a31
PA
8802016-01-12 Pedro Alves <palves@redhat.com>
881
882 Remove use of the registered trademark symbol throughout.
883
5a0dd67a
YQ
8842016-01-08 Yao Qi <yao.qi@linaro.org>
885
886 * remote-utils.c (getpkt): If c is '\003', call target hook
887 request_interrupt.
888
b2ca446f
YQ
8892016-01-06 Yao Qi <yao.qi@linaro.org>
890
891 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
892 linux-aarch32-low.c.
893 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
894 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
895 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
896 (thumb2_breakpoint): Declare.
897 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
898 linux-aarch32-low.h.
899 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
900 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
901 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
902
edd88788
JB
9032016-01-01 Joel Brobecker <brobecker@adacore.com>
904
905 * gdbreplay.c (gdbreplay_version): Change copyright year in
906 version message.
907 * server.c (gdbserver_version): Likewise.
908
65da7f14
PP
9092015-12-28 Patrick Palka <patrick@parcs.ath.cx>
910
911 * server.c (crc32_table): Delete.
912 (crc32): Use libiberty's xcrc32 function.
913
4abd5ed2
JB
9142015-12-22 Joel Brobecker <brobecker@adacore.com>
915
916 * lynx-low.c (lynx_delete_thread_callback): New function.
917 (lynx_mourn): Properly delete our process and all of its
918 threads. Remove call to clear_inferiors.
919
0e50fe5c
JB
9202015-12-22 Joel Brobecker <brobecker@adacore.com>
921
922 * target.c (thread_search_callback): Add check that
923 the thread_stopped target callback is not NULL before
924 calling it.
925
35adc03f
YQ
9262015-12-21 Yao Qi <yao.qi@linaro.org>
927
928 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
929 arm breakpoint.
930
bd2b2909
AT
9312015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
932
933 * server.c (handle_query): Call target_supports_software_single_step.
934
7fe5e27e
AT
9352015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
936
937 * linux-low.c (single_step): New function.
938 (linux_resume_one_lwp_throw): Call single_step.
939 (start_step_over): Likewise.
940
d9311bfa
AT
9412015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
942
943 * Makefile.in (SFILES): Append arch/arm-linux.c,
944 arch/arm-get-next-pcs.c.
945 (arm-linux.o): New rule.
946 (arm-get-next-pcs.o): New rule.
947 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
948 arm-linux.o.
949 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
950 to linux-aarch32-low.c.
951 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
952 (arm_breakpoint_len, thumb_breakpoint): Likewise.
953 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
954 (thumb2_breakpoint_len): Likewise.
955 (arm_is_thumb_mode): Make non-static.
956 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
957 from linux-aarch32-low.c.
958 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
959 (arm_breakpoint_len, thumb_breakpoint): Likewise.
960 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
961 (thumb2_breakpoint_len): Likewise.
962 (arm_is_thumb_mode): New declaration.
963 * linux-arm-low.c: Include arch/arm-linux.h
964 aarch/arm-get-next-pcs.h, sys/syscall.h.
965 (get_next_pcs_ops): New struct.
966 (get_next_pcs_addr_bits_remove): New function.
967 (get_next_pcs_is_thumb): New function.
968 (get_next_pcs_read_memory_unsigned_integer): Likewise.
969 (arm_sigreturn_next_pc): Likewise.
970 (get_next_pcs_syscall_next_pc): Likewise.
971 (arm_gdbserver_get_next_pcs): Likewise.
972 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
973 Initialize.
974 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
975 * server.h: Include gdb_vecs.h.
976
68ce2059
AT
9772015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
978
979 * Makefile.in (SFILES): Append common/common-regcache.c.
980 (OBS): Append common-regcache.o.
981 (common-regcache.o): New rule.
982 * regcache.c (init_register_cache): Initialize cache to
983 REG_UNAVAILABLE.
984 (regcache_raw_read_unsigned): New function.
985 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
986 register_status enum.
987
fa5308bd
AT
9882015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
989
990 * linux-aarch64-low.c (the_low_targets): Rename
991 breakpoint_reinsert_addr to get_next_pcs.
992 * linux-arm-low.c (the_low_targets): Likewise.
993 * linux-bfin-low.c (the_low_targets): Likewise.
994 * linux-cris-low.c (the_low_targets): Likewise.
995 * linux-crisv32-low.c (the_low_targets): Likewise.
996 * linux-low.c (can_software_single_step): Likewise.
997 (install_software_single_step_breakpoints): New function.
998 (start_step_over): Use install_software_single_step_breakpoints.
999 * linux-low.h: New CORE_ADDR vector.
1000 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1001 get_next_pcs.
1002 * linux-mips-low.c (the_low_targets): Likewise.
1003 * linux-nios2-low.c (the_low_targets): Likewise.
1004 * linux-sparc-low.c (the_low_targets): Likewise.
1005
4a6ed09b
PA
10062015-12-17 Pedro Alves <palves@redhat.com>
1007
1008 * linux-low.c (linux_kill_one_lwp): Remove references to
1009 LinuxThreads.
1010 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1011 to 'kill'.
1012 (linux_init_signals): Delete.
1013 (initialize_low): Adjust.
1014 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1015
7544db95
PA
10162015-12-16 Pedro Alves <palves@redhat.com>
1017
1018 * configure.ac (compiler warning flags): When testing a
1019 -Wno-foo option, check whether -Wfoo works instead.
1020 * configure: Regenerate.
1021
8020350c
DB
10222015-12-11 Don Breazeal <donb@codesourcery.com>
1023
1024 * server.c (process_serial_event): Don't exit from gdbserver
1025 in remote mode if there are still active inferiors.
1026
db91f502
YQ
10272015-12-11 Yao Qi <yao.qi@linaro.org>
1028
1029 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1030 arm_breakpoint_at if the process is 32-bit.
1031
b37a6290
YQ
10322015-12-11 Yao Qi <yao.qi@linaro.org>
1033
1034 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1035 arm breakpoint.
1036
17b1509a
YQ
10372015-12-07 Yao Qi <yao.qi@linaro.org>
1038
1039 * configure.srv: Append arm.o to srv_tgtobj for
1040 aarch64*-*-linux* target.
1041 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1042 from linux-arm-low.c.
1043 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1044 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1045 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1046 (thumb2_breakpoint_len): Likewise.
1047 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1048 (arm_breakpoint_kinds): Likewise.
1049 (arm_breakpoint_kind_from_pc): Likewise.
1050 (arm_sw_breakpoint_from_kind): Likewise.
1051 (arm_breakpoint_kind_from_current_state): Likewise.
1052 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1053 (arm_sw_breakpoint_from_kind): Declare.
1054 (arm_breakpoint_kind_from_current_state): Declare.
1055 (arm_breakpoint_at): Declare.
1056 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1057 arm_sw_breakpoint_from_kind if process is 32-bit.
1058 (aarch64_breakpoint_kind_from_pc): New function.
1059 (aarch64_breakpoint_kind_from_current_state): New function.
1060 (the_low_target): Initialize fields breakpoint_kind_from_pc
1061 and breakpoint_kind_from_current_state.
1062 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1063 linux-aarch32-low.c.
1064 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1065 (arm_breakpoint, arm_breakpoint_len): Likewise.
1066 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1067 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1068 (arm_is_thumb_mode): Likewise.
1069 (arm_breakpoint_at): Likewise.
1070 (arm_breakpoint_kind_from_pc): Likewise.
1071 (arm_sw_breakpoint_from_kind): Likewise.
1072 (arm_breakpoint_kind_from_current_state): Likewise.
1073
1074 Revert:
1075 2015-08-04 Yao Qi <yao.qi@linaro.org>
1076
1077 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1078 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1079 * server.c (extended_protocol): Remove "static".
1080 * server.h (extended_protocol): Declare it.
1081
ece66d65
JS
10822015-12-04 Josh Stone <jistone@redhat.com>
1083
1084 * target.h (struct target_ops) <arch_setup>: Rename to ...
1085 (struct target_ops) <post_create_inferior>: ... this.
1086 (target_arch_setup): Rename to ...
1087 (target_post_create_inferior): ... this, calling post_create_inferior.
1088 * server.c (start_inferior): Update target_arch_setup calls to
1089 target_post_create_inferior.
1090 * linux-low.c (linux_low_ptrace_options): Forward declare.
1091 (linux_arch_setup): Update its comment for general use.
1092 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1093 (struct linux_target_ops): Use linux_post_create_inferior.
1094 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1095 to post_create_inferior.
1096 * nto-low.c (struct nto_target_ops): Likewise.
1097 * spu-low.c (struct spu_target_ops): Likewise.
1098 * win32-low.c (struct win32_target_ops): Likewise.
1099
e58c48b4
AT
11002015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1101
1102 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1103
fbec8956
AT
11042015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1105
1106 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1107 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1108 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1109 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1110 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1111 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1112 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1113 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1114 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1115 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1116 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1117 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1118
9b4c5f87
AT
11192015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1120
1121 * linux-low.c (linux_look_up_symbols): Don't call
1122 linux_supports_traceclone.
1123 * linux-low.h (thread_db_init): Remove use_events argument.
1124 * thread-db.c (thread_db_use_event): Remove global variable.
1125 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1126 (struct thread_db) <td_create_bp>: Remove field.
1127 (thread_db_create_event): Remove function.
1128 (thread_db_enable_reporting): Likewise.
1129 (find_one_thread): Don't check for thread_db_use_events.
1130 (attach_thread): Likewise.
1131 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1132 (try_thread_db_load_1): Don't check for thread_db_use_events.
1133 (thread_db_init): Remove use_events argument and thread events
1134 handling.
1135 (remove_thread_event_breakpoints): Remove function.
1136 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1137
7d00775e
AT
11382015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1139
1140 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1141 New function.
1142 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1143 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1144 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1145 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1146 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1147 Initialize.
1148 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1149 New function.
1150 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1151 * linux-low.c (can_hardware_single_step): Use
1152 supports_hardware_single_step.
1153 (can_software_single_step): New function.
1154 (start_step_over): Call can_software_single_step.
1155 (linux_supports_hardware_single_step): New function.
1156 (struct target_ops) <supports_software_single_step>: Initialize.
1157 * linux-low.h (struct linux_target_ops)
1158 <supports_hardware_single_step>: Initialize.
1159 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1160 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1161 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1162 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1163 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1164 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1165 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1166 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1167 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1168 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1169 Initialize.
1170 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1171 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1172 Initialize.
1173 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1174 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1175 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1176 New function.
1177 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1178 * target.h (struct target_ops): <supports_software_single_step>:
1179 New field.
1180 (target_supports_software_single_step): New macro.
1181
2d97cd35
AT
11822015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1183
1184 * linux-low.c (linux_wait_1): Fix pc advance condition.
1185 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1186 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1187
769ef81f
AT
11882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1189
1190 * linux-arm-low.c (arm_is_thumb_mode): New function.
1191 (arm_breakpoint_at): Use arm_is_thumb_mode.
1192 (arm_breakpoint_kind_from_current_state): New function.
1193 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1194 Initialize.
1195 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1196 (linux_breakpoint_kind_from_current_state): New function.
1197 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1198 * linux-low.h (struct linux_target_ops)
1199 <breakpoint_kind_from_current_state>: New field.
1200 * target.h (struct target_ops): Likewise.
1201 (target_breakpoint_kind_from_current_state): New macro.
1202
1bebeeca
PA
12032015-11-30 Pedro Alves <palves@redhat.com>
1204
1205 * linux-low.c (linux_resume): Wake up the event loop before
1206 returning.
1207
a67a9fae
PA
12082015-11-30 Pedro Alves <palves@redhat.com>
1209
1210 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1211 check.
1212 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1213 to -1.
1214 * target.c (struct thread_search): New structure.
1215 (thread_search_callback): New function.
1216 (prev_general_thread): New global.
1217 (prepare_to_access_memory, done_accessing_memory): New functions.
1218 * target.h (prepare_to_access_memory, done_accessing_memory):
1219 Replace macros with function declarations.
1220
f2faf941
PA
12212015-11-30 Pedro Alves <palves@redhat.com>
1222
1223 PR 14618
1224 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1225 report TARGET_WAITKIND_NO_RESUMED.
1226 * remote-utils.c (prepare_resume_reply): Handle
1227 TARGET_WAITKIND_NO_RESUMED.
1228 * server.c (report_no_resumed): New global.
1229 (handle_query) <qSupported>: Handle "no-resumed+". Report
1230 "no-resumed+" support.
1231 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1232 return error if the client doesn't support no-resumed events.
1233 (push_stop_notification): New function.
1234 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1235 events if the client supports them.
1236
a681f9c9
PA
12372015-11-30 Pedro Alves <palves@redhat.com>
1238
1239 * linux-low.c (thread_still_has_status_pending_p): Don't check
1240 vCont;t here.
1241 (lwp_resumed): New function.
1242 (status_pending_p_callback): Return early if the LWP is not
1243 supposed to be resumed.
1244
65706a29
PA
12452015-11-30 Pedro Alves <palves@redhat.com>
1246
1247 * linux-low.c (handle_extended_wait): Assert that the LWP's
1248 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1249 thread create events, leave the new child's status pending.
1250 (linux_low_filter_event): If GDB wants to hear about thread exit
1251 events, leave the LWP marked dead and don't delete it.
1252 (linux_wait_for_event_filtered): Don't check for thread exit.
1253 (filter_exit_event): New function.
1254 (linux_wait_1): Use it, when returning an exit event.
1255 (linux_resume_one_lwp_throw): Assert that the LWP's
1256 waitstatus is TARGET_WAITKIND_IGNORE.
1257 * remote-utils.c (prepare_resume_reply): Handle
1258 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1259 * server.c (report_thread_events): New global.
1260 (handle_general_set): Handle QThreadEvents.
1261 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1262 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1263 TARGET_WAITKIND_THREAD_EXITED.
1264 * server.h (report_thread_events): Declare.
1265
56cf4bed
PA
12662015-11-30 Pedro Alves <palves@redhat.com>
1267
1268 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1269 the thread's last_resume_kind was resume_stop.
1270
500c1d85
PA
12712015-11-30 Pedro Alves <palves@redhat.com>
1272
1273 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1274 before returning.
1275
de979965
PA
12762015-11-30 Pedro Alves <palves@redhat.com>
1277
1278 * server.c (handle_v_requests): Handle vCtrlC.
1279
34c65914
PA
12802015-11-30 Pedro Alves <palves@redhat.com>
1281
1282 * gdbthread.h (find_any_thread_of_pid): Declare.
1283 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1284 functions.
1285 * server.c (handle_query): If current_thread is NULL, look for
1286 another thread of the selected process.
1287
79efa585 12882015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1289 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1290
1291 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1292 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1293 name in reply.
1294 * target.h (struct target_ops) <thread_name>: New field.
1295 (target_thread_name): New macro.
1296
80d82c19
JB
12972015-11-23 Joel Brobecker <brobecker@adacore.com>
1298
1299 * regcache.h (regcache_invalidate_pid): Add declaration.
1300 * regcache.c (regcache_invalidate_pid): New function, extracted
1301 from regcache_invalidate.
1302 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1303 Add trivial documentation comment.
1304 * lynx-low.c: Use regcache_invalidate_pid instead of
1305 regcache_invalidate.
1306
64da5dd5
JB
13072015-11-23 Joel Brobecker <brobecker@adacore.com>
1308
1309 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1310 and Elf64_auxv_t if the target is Android.
1311
37ce4055
DE
13122015-11-22 Doug Evans <xdje42@gmail.com>
1313
1314 * target.h: #include <sys/types.h>.
1315
06e03fff
PA
13162015-11-19 Pedro Alves <palves@redhat.com>
1317
1318 * linux-low.c (linux_process_qsupported): Change prototype.
1319 Adjust.
1320 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1321 Change prototype.
1322 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1323 and adjust to loop over all features.
1324 * server.c (handle_query) <qSupported>: Adjust to call
1325 target_process_qsupported once, passing it a vector of unprocessed
1326 features.
1327 * target.h (struct target_ops) <process_qsupported>: Change
1328 prototype.
1329 (target_process_qsupported): Adjust.
1330
9a084706
PA
13312015-11-19 Pedro Alves <palves@redhat.com>
1332
1333 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1334 mode.
1335 * configure: Regenerate.
1336
dad44a1f
PA
13372015-11-19 Pedro Alves <palves@redhat.com>
1338
1339 * configure: Regenerate.
1340
231c0592
YQ
13412015-11-19 Yao Qi <yao.qi@linaro.org>
1342
1343 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1344 type to uint32_t.
1345
6c1c9a8b
YQ
13462015-11-19 Yao Qi <yao.qi@linaro.org>
1347
1348 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1349 (struct aarch64_operand): Move enum out.
1350
9caa3311
YQ
13512015-11-19 Yao Qi <yao.qi@linaro.org>
1352
1353 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1354 struct user_fpsimd_state *.
1355 (aarch64_store_fpregset): Likewise.
1356
6a69a054
YQ
13572015-11-19 Yao Qi <yao.qi@linaro.org>
1358
1359 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1360 struct user_pt_regs *.
1361 (aarch64_store_gregset): Likewise.
1362
1798301e
PA
13632015-11-18 Pedro Alves <palves@redhat.com>
1364
1365 * Makefile.in (all_object_files): Add $IPA_OBJS.
1366
ce7715e2
PA
13672015-11-17 Pedro Alves <palves@redhat.com>
1368
1369 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1370 GDB_SIGNAL_0 and gdb_signal_to_string.
1371
c0879059
PA
13722015-11-17 Pedro Alves <palves@redhat.com>
1373
1374 * win32-low.c (handle_output_debug_string): Remove parameter.
1375 (win32_kill): Remove our_status local and adjust call to
1376 handle_output_debug_string.
1377 (get_child_debug_event): Adjust call to
1378 handle_output_debug_string.
1379
1996e237
SM
13802015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1381
1382 * linux-mips-low.c (mips_fill_gregset): Add cast.
1383 (mips_store_gregset): Likewise.
1384 (mips_fill_fpregset): Likewise.
1385 (mips_store_fpregset): Likewise.
1386
cbec665b
SM
13872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1388
1389 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1390 priv.
1391
eb3e3c67
SM
13922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1393
1394 * linux-mips-low.c (mips_linux_new_thread): Change type of
1395 watch_type to enum target_hw_bp_type.
1396
171de4b8
SM
13972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1398
1399 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1400 Change return type to arm_hwbp_type.
1401
04248ead
SM
14022015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1403
1404 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1405 (arm_store_gregset): Likewise.
1406 * linux-arm-low.c (arm_get_hwcap): Likewise.
1407 (arm_read_description): Likewise.
1408
04b3479c
SM
14092015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1410
1411 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1412
2bc84e8a
SM
14132015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1414
1415 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1416 (ppc_fill_vsxregset): Likewise.
1417 (ppc_store_vsxregset): Likewise.
1418 (ppc_fill_vrregset): Likewise.
1419 (ppc_store_vrregset): Likewise.
1420 (ppc_fill_evrregset): Likewise.
1421 (ppc_store_evrregset): Likewise.
1422
e6c5bb05
SM
14232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1424
1425 * linux-ppc-low.c (ppc_usrregs_info): Remove
1426 forward-declaration.
1427 (ppc_arch_setup): Move lower in file.
1428
7ea45d72
SM
14292015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1430
1431 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1432 (ps_pdwrite): Likewise.
1433
69291610
HW
14342015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1435
1436 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1437 to after assert checks.
1438
b42945fd
SM
14392015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1440
1441 * proc-service.c (ps_pdread): Add/adjust casts.
1442 (ps_pdwrite): Add/adjust casts.
1443
d6f85c84
SM
14442015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1445
1446 * server.c (handle_search_memory_1): Cast return value of
1447 memmem.
1448
f98cd059
SM
14492015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1450
1451 * server.c (write_qxfer_response): Change type of data to
1452 gdb_byte *.
1453
d2412fa5
PA
14542015-10-29 Pedro Alves <palves@redhat.com>
1455
1456 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1457
c17414a2
PA
14582015-10-29 Pedro Alves <palves@redhat.com>
1459
1460 * tracepoint.c (clear_installed_tracepoints): Add casts.
1461
e053fbc4
PA
14622015-10-29 Pedro Alves <palves@redhat.com>
1463
1464 * server.c (handle_v_cont, process_serial_event): Add enum
1465 gdb_signal casts to signal parsing code.
1466
add67df8
PA
14672015-10-29 Pedro Alves <palves@redhat.com>
1468
1469 * linux-low.h (NULL_REGSET): Define.
1470 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1471 * linux-arm-low.c (arm_regsets): Likewise.
1472 * linux-crisv32-low.c (cris_regsets): Likewise.
1473 * linux-m68k-low.c (m68k_regsets): Likewise.
1474 * linux-mips-low.c (mips_regsets): Likewise.
1475 * linux-nios2-low.c (nios2_regsets): Likewise.
1476 * linux-ppc-low.c (ppc_regsets): Likewise.
1477 * linux-s390-low.c (s390_regsets): Likewise.
1478 * linux-sh-low.c (sh_regsets): Likewise.
1479 * linux-sparc-low.c (sparc_regsets): Likewise.
1480 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1481 * linux-tile-low.c (tile_regsets): Likewise.
1482 * linux-x86-low.c (x86_regsets): Likewise.
1483 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1484
50bc912a
PA
14852015-10-29 Pedro Alves <palves@redhat.com>
1486
1487 * linux-low.h (NULL_REGSET): Define.
1488 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1489 * linux-arm-low.c (arm_regsets): Likewise.
1490 * linux-crisv32-low.c (cris_regsets): Likewise.
1491 * linux-m68k-low.c (m68k_regsets): Likewise.
1492 * linux-mips-low.c (mips_regsets): Likewise.
1493 * linux-nios2-low.c (nios2_regsets): Likewise.
1494 * linux-ppc-low.c (ppc_regsets): Likewise.
1495 * linux-s390-low.c (s390_regsets): Likewise.
1496 * linux-sh-low.c (sh_regsets): Likewise.
1497 * linux-sparc-low.c (sparc_regsets): Likewise.
1498 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1499 * linux-tile-low.c (tile_regsets): Likewise.
1500 * linux-x86-low.c (x86_regsets): Likewise.
1501 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1502
682b2546
DE
15032015-10-26 Doug Evans <dje@google.com>
1504
1505 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1506
963843d4
DE
15072015-10-26 Doug Evans <dje@google.com>
1508
1509 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1510
d41401ac
DE
15112015-10-26 Doug Evans <dje@google.com>
1512
1513 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1514 for debug_printf.
1515 (attach_thread, find_new_threads_callback): Ditto.
1516
3db28855
AT
15172015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1518
1519 * mem-break.h (set_breakpoint_data): Remove.
1520
fb78e89c
AT
15212015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1522
1523 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1524 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1525 (initialize_low): Remove set_breakpoint_data call.
1526 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1527 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1528 (initialize_low): Remove set_breakpoint_data call.
1529 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1530 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1531 (initialize_low): Remove set_breakpoint_data call.
1532
2e6ee069
AT
15332015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1534
1535 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1536 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1537 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1538 * target.h (target_breakpoint_kind_from_pc): New macro.
1539
1652a986
AT
15402015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1541
1542 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1543 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1544 the default breakpoint kind.
1545
abeead09
AT
15462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1547
1548 * linux-arm-low.c (arm_supports_z_point_type): Add software
1549 breakpoint support.
1550
b0b4b501
AT
15512015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1552
1553 * linux-arm-low.c: Refactor breakpoint definitions.
1554 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1555 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1556
8689682c
AT
15572015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1558
1559 * Makefile.in: Add arm.c/o.
1560 * configure.srv: Likewise.
1561 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1562 (arm_breakpoint_kind_from_pc): New function.
1563 (arm_sw_breakpoint_from_kind): Return proper kind.
1564 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1565
27165294
AT
15662015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1567
1568 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1569 removal.
1570 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1571 (struct raw_breakpoint) <size>: Remove.
1572 (struct raw_breakpoint) <kind>: Add.
1573 (bp_size): New function.
1574 (bp_opcode): Likewise.
1575 (find_raw_breakpoint_at): Adjust for kind.
1576 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1577 (remove_memory_breakpoint): Adjust for kind call bp_size.
1578 (set_raw_breakpoint_at): Adjust for kind.
1579 (set_breakpoint): Likewise.
1580 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1581 (delete_raw_breakpoint): Adjust for kind.
1582 (delete_breakpoint): Likewise.
1583 (find_gdb_breakpoint): Likewise.
1584 (set_gdb_breakpoint_1): Likewise.
1585 (set_gdb_breakpoint): Likewise.
1586 (delete_gdb_breakpoint_1): Likewise.
1587 (delete_gdb_breakpoint): Likewise.
1588 (uninsert_raw_breakpoint): Likewise.
1589 (reinsert_raw_breakpoint): Likewise.
1590 (set_breakpoint_data): Remove.
1591 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1592 (check_mem_read): Adjust for kind call bp_size.
1593 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1594 (clone_one_breakpoint): Adjust for kind.
1595 * mem-break.h (set_gdb_breakpoint): Likewise.
1596 (delete_gdb_breakpoint): Likewise.
1597 * server.c (process_serial_event): Likewise.
1598
dd373349
AT
15992015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1600
1601 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1602 (struct linux_target_ops) <breakpoint>: Remove.
1603 (struct linux_target_ops) <breakpoint_len>: Remove.
1604 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1605 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1606 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1607 (arm_sw_breakpoint_from_kind): New function.
1608 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1609 (struct linux_target_ops) <breakpoint>: Remove.
1610 (struct linux_target_ops) <breakpoint_len>: Remove.
1611 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1612 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1613 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1614 (struct linux_target_ops) <breakpoint>: Remove.
1615 (struct linux_target_ops) <breakpoint_len>: Remove.
1616 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1617 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1618 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1619 (struct linux_target_ops) <breakpoint>: Remove.
1620 (struct linux_target_ops) <breakpoint_len>: Remove.
1621 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1622 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1623 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1624 and sw_breakpoint_from_kind to increment the pc.
1625 (linux_breakpoint_kind_from_pc): New function.
1626 (linux_sw_breakpoint_from_kind): New function.
1627 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1628 (initialize_low): Call breakpoint_kind_from_pc and
1629 sw_breakpoint_from_kind to replace breakpoint_data/len.
1630 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1631 New field.
1632 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1633 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1634 (struct linux_target_ops) <breakpoint>: Remove.
1635 (struct linux_target_ops) <breakpoint_len>: Remove.
1636 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1637 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1638 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1639 (struct linux_target_ops) <breakpoint>: Remove.
1640 (struct linux_target_ops) <breakpoint_len>: Remove.
1641 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1642 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1643 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1644 (struct linux_target_ops) <breakpoint>: Remove.
1645 (struct linux_target_ops) <breakpoint_len>: Remove.
1646 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1647 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1648 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1649 (struct linux_target_ops) <breakpoint>: Remove.
1650 (struct linux_target_ops) <breakpoint_len>: Remove.
1651 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1652 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1653 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1654 (struct linux_target_ops) <breakpoint>: Remove.
1655 (struct linux_target_ops) <breakpoint_len>: Remove.
1656 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1657 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1658 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1659 (struct linux_target_ops) <breakpoint>: Remove.
1660 (struct linux_target_ops) <breakpoint_len>: Remove.
1661 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1662 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1663 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1664 (struct linux_target_ops) <breakpoint>: Remove.
1665 (struct linux_target_ops) <breakpoint_len>: Remove.
1666 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1667 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1668 * linux-sparc-low.c (sparc_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-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1679 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1680 (struct linux_target_ops) <breakpoint>: Remove.
1681 (struct linux_target_ops) <breakpoint_len>: Remove.
1682 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1683 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1684 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1685 (struct linux_target_ops) <breakpoint>: Remove.
1686 (struct linux_target_ops) <breakpoint_len>: Remove.
1687 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1688 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1689
4cd98a19
AT
16902015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1691
1692 * linux-cris-low.c (cris_get_pc): Remove void arg.
1693
774ee6d2
AR
16942015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1695
1696 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1697 variable name.
1698
833dcd29
AR
16992015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1700
1701 * inferiors.c (thread_pid_matches_callback): New function.
1702 (find_thread_process): New function.
1703 (remove_thread): Reset current_thread.
1704 (remove_process): Assert threads have been removed first.
1705
8d689ee5
YQ
17062015-10-15 Yao Qi <yao.qi@linaro.org>
1707
1708 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1709 if it is 3.
1710 (aarch64_remove_point): Likewise.
1711 * regcache.c (regcache_register_size): New function.
1712
1c2e1515
YQ
17132015-10-12 Yao Qi <yao.qi@linaro.org>
1714
1715 * linux-aarch64-low.c: Update all callers as emit_load_store
1716 is renamed to aarch64_emit_load_store.
1717
e1c587c3
YQ
17182015-10-12 Yao Qi <yao.qi@linaro.org>
1719
1720 * linux-aarch64-low.c: Update all callers of function renaming
1721 from emit_insn to aarch64_emit_insn.
1722
b6542f81
YQ
17232015-10-12 Yao Qi <yao.qi@linaro.org>
1724
1725 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1726 arch/aarch64-insn.h.
1727 (struct aarch64_memory_operand): Likewise.
1728 (ENCODE): Likewise.
1729 (emit_insn): Move to arch/aarch64-insn.c.
1730 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1731 (emit_load_store): Move to arch/aarch64-insn.c.
1732 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1733 (can_encode_int32): Remove.
1734
246994ce
YQ
17352015-10-12 Yao Qi <yao.qi@linaro.org>
1736
1737 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1738 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1739 (aarch64_relocate_instruction): Likewise.
1740 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1741 (struct aarch64_insn_visitor): Likewise.
1742
0badd99f
YQ
17432015-10-12 Yao Qi <yao.qi@linaro.org>
1744
1745 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1746 (struct aarch64_insn_visitor): New.
1747 (struct aarch64_insn_relocation_data): New.
1748 (aarch64_ftrace_insn_reloc_b): New function.
1749 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1750 (aarch64_ftrace_insn_reloc_cb): Likewise.
1751 (aarch64_ftrace_insn_reloc_tb): Likewise.
1752 (aarch64_ftrace_insn_reloc_adr): Likewise.
1753 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1754 (aarch64_ftrace_insn_reloc_others): Likewise.
1755 (visitor): New.
1756 (aarch64_relocate_instruction): Use visitor.
1757
dfaffe9d
YQ
17582015-10-12 Yao Qi <yao.qi@linaro.org>
1759
1760 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1761 int. Add argument buf.
1762 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1763 aarch64_relocate_instruction.
1764
70b439f0
YQ
17652015-10-12 Yao Qi <yao.qi@linaro.org>
1766
1767 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1768 argument insn. Remove local variable insn. Don't call
1769 target_read_uint32.
1770 (aarch64_install_fast_tracepoint_jump_pad): Call
1771 target_read_uint32.
1772
7781c06f
YQ
17732015-09-30 Yao Qi <yao.qi@linaro.org>
1774
1775 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1776 (emit_load_store_pair): Likewise.
1777
9a3c8263
SM
17782015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1779
1780 * dll.c (match_dll): Add cast(s).
1781 (unloaded_dll): Likewise.
1782 * linux-low.c (second_thread_of_pid_p): Likewise.
1783 (delete_lwp_callback): Likewise.
1784 (count_events_callback): Likewise.
1785 (select_event_lwp_callback): Likewise.
1786 (linux_set_resume_request): Likewise.
1787 * server.c (accumulate_file_name_length): Likewise.
1788 (emit_dll_description): Likewise.
1789 (handle_qxfer_threads_worker): Likewise.
1790 (visit_actioned_threads): Likewise.
1791 * thread-db.c (any_thread_of): Likewise.
1792 * tracepoint.c (same_process_p): Likewise.
1793 (match_blocktype): Likewise.
1794 (build_traceframe_info_xml): Likewise.
1795
224c3ddb
SM
17962015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1797
1798 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1799 assignment.
1800 (gdb_unparse_agent_expr): Likewise.
1801 * hostio.c (require_data): Likewise.
1802 (handle_pread): Likewise.
1803 * linux-low.c (disable_regset): Likewise.
1804 (fetch_register): Likewise.
1805 (store_register): Likewise.
1806 (get_dynamic): Likewise.
1807 (linux_qxfer_libraries_svr4): Likewise.
1808 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1809 (set_fast_tracepoint_jump): Likewise.
1810 (uninsert_fast_tracepoint_jumps_at): Likewise.
1811 (reinsert_fast_tracepoint_jumps_at): Likewise.
1812 (validate_inserted_breakpoint): Likewise.
1813 (clone_agent_expr): Likewise.
1814 * regcache.c (init_register_cache): Likewise.
1815 * remote-utils.c (putpkt_binary_1): Likewise.
1816 (decode_M_packet): Likewise.
1817 (decode_X_packet): Likewise.
1818 (look_up_one_symbol): Likewise.
1819 (relocate_instruction): Likewise.
1820 (monitor_output): Likewise.
1821 * server.c (handle_search_memory): Likewise.
1822 (handle_qxfer_exec_file): Likewise.
1823 (handle_qxfer_libraries): Likewise.
1824 (handle_qxfer): Likewise.
1825 (handle_query): Likewise.
1826 (handle_v_cont): Likewise.
1827 (handle_v_run): Likewise.
1828 (captured_main): Likewise.
1829 * target.c (write_inferior_memory): Likewise.
1830 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1831 * tracepoint.c (init_trace_buffer): Likewise.
1832 (add_tracepoint_action): Likewise.
1833 (add_traceframe): Likewise.
1834 (add_traceframe_block): Likewise.
1835 (cmd_qtdpsrc): Likewise.
1836 (cmd_qtdv): Likewise.
1837 (cmd_qtstatus): Likewise.
1838 (response_source): Likewise.
1839 (response_tsv): Likewise.
1840 (cmd_qtnotes): Likewise.
1841 (gdb_collect): Likewise.
1842 (initialize_tracepoint): Likewise.
1843
afbe19f8
PL
18442015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1845
1846 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1847 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1848 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1849 <NOP>: New.
1850 (enum aarch64_condition_codes): New enum.
1851 (w0): New static global.
1852 (fp): Likewise.
1853 (lr): Likewise.
1854 (struct aarch64_memory_operand) <type>: New
1855 MEMORY_OPERAND_POSTINDEX type.
1856 (postindex_memory_operand): New helper function.
1857 (emit_ret): New function.
1858 (emit_load_store_pair): New function, factored out of emit_stp
1859 with support for MEMORY_OPERAND_POSTINDEX.
1860 (emit_stp): Rewrite using emit_load_store_pair.
1861 (emit_ldp): New function.
1862 (emit_load_store): Likewise.
1863 (emit_ldr): Mention post-index instruction in comment.
1864 (emit_ldrh): New function.
1865 (emit_ldrb): New function.
1866 (emit_ldrsw): Mention post-index instruction in comment.
1867 (emit_str): Likewise.
1868 (emit_subs): New function.
1869 (emit_cmp): Likewise.
1870 (emit_and): Likewise.
1871 (emit_orr): Likewise.
1872 (emit_orn): Likewise.
1873 (emit_eor): Likewise.
1874 (emit_mvn): Likewise.
1875 (emit_lslv): Likewise.
1876 (emit_lsrv): Likewise.
1877 (emit_asrv): Likewise.
1878 (emit_mul): Likewise.
1879 (emit_sbfm): Likewise.
1880 (emit_sbfx): Likewise.
1881 (emit_ubfm): Likewise.
1882 (emit_ubfx): Likewise.
1883 (emit_csinc): Likewise.
1884 (emit_cset): Likewise.
1885 (emit_nop): Likewise.
1886 (emit_ops_insns): New helper function.
1887 (emit_pop): Likewise.
1888 (emit_push): Likewise.
1889 (aarch64_emit_prologue): New function.
1890 (aarch64_emit_epilogue): Likewise.
1891 (aarch64_emit_add): Likewise.
1892 (aarch64_emit_sub): Likewise.
1893 (aarch64_emit_mul): Likewise.
1894 (aarch64_emit_lsh): Likewise.
1895 (aarch64_emit_rsh_signed): Likewise.
1896 (aarch64_emit_rsh_unsigned): Likewise.
1897 (aarch64_emit_ext): Likewise.
1898 (aarch64_emit_log_not): Likewise.
1899 (aarch64_emit_bit_and): Likewise.
1900 (aarch64_emit_bit_or): Likewise.
1901 (aarch64_emit_bit_xor): Likewise.
1902 (aarch64_emit_bit_not): Likewise.
1903 (aarch64_emit_equal): Likewise.
1904 (aarch64_emit_less_signed): Likewise.
1905 (aarch64_emit_less_unsigned): Likewise.
1906 (aarch64_emit_ref): Likewise.
1907 (aarch64_emit_if_goto): Likewise.
1908 (aarch64_emit_goto): Likewise.
1909 (aarch64_write_goto_address): Likewise.
1910 (aarch64_emit_const): Likewise.
1911 (aarch64_emit_call): Likewise.
1912 (aarch64_emit_reg): Likewise.
1913 (aarch64_emit_pop): Likewise.
1914 (aarch64_emit_stack_flush): Likewise.
1915 (aarch64_emit_zero_ext): Likewise.
1916 (aarch64_emit_swap): Likewise.
1917 (aarch64_emit_stack_adjust): Likewise.
1918 (aarch64_emit_int_call_1): Likewise.
1919 (aarch64_emit_void_call_2): Likewise.
1920 (aarch64_emit_eq_goto): Likewise.
1921 (aarch64_emit_ne_goto): Likewise.
1922 (aarch64_emit_lt_goto): Likewise.
1923 (aarch64_emit_le_goto): Likewise.
1924 (aarch64_emit_gt_goto): Likewise.
1925 (aarch64_emit_ge_got): Likewise.
1926 (aarch64_emit_ops_impl): New static global variable.
1927 (aarch64_emit_ops): New target function, return
1928 &aarch64_emit_ops_impl.
1929 (struct linux_target_ops): Install it.
1930
bb903df0
PL
19312015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1932
1933 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1934 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1935 aarch64-ipa.o.
1936 * linux-aarch64-ipa.c: New file.
1937 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1938 and endian.h.
1939 (aarch64_get_thread_area): New target method.
1940 (extract_signed_bitfield): New helper function.
1941 (aarch64_decode_ldr_literal): New function.
1942 (enum aarch64_opcodes): New enum.
1943 (struct aarch64_register): New struct.
1944 (struct aarch64_operand): New struct.
1945 (x0): New static global.
1946 (x1): Likewise.
1947 (x2): Likewise.
1948 (x3): Likewise.
1949 (x4): Likewise.
1950 (w2): Likewise.
1951 (ip0): Likewise.
1952 (sp): Likewise.
1953 (xzr): Likewise.
1954 (aarch64_register): New helper function.
1955 (register_operand): Likewise.
1956 (immediate_operand): Likewise.
1957 (struct aarch64_memory_operand): New struct.
1958 (offset_memory_operand): New helper function.
1959 (preindex_memory_operand): Likewise.
1960 (enum aarch64_system_control_registers): New enum.
1961 (ENCODE): New macro.
1962 (emit_insn): New helper function.
1963 (emit_b): New function.
1964 (emit_bcond): Likewise.
1965 (emit_cb): Likewise.
1966 (emit_tb): Likewise.
1967 (emit_blr): Likewise.
1968 (emit_stp): Likewise.
1969 (emit_ldp_q_offset): Likewise.
1970 (emit_stp_q_offset): Likewise.
1971 (emit_load_store): Likewise.
1972 (emit_ldr): Likewise.
1973 (emit_ldrsw): Likewise.
1974 (emit_str): Likewise.
1975 (emit_ldaxr): Likewise.
1976 (emit_stxr): Likewise.
1977 (emit_stlr): Likewise.
1978 (emit_data_processing_reg): Likewise.
1979 (emit_data_processing): Likewise.
1980 (emit_add): Likewise.
1981 (emit_sub): Likewise.
1982 (emit_mov): Likewise.
1983 (emit_movk): Likewise.
1984 (emit_mov_addr): Likewise.
1985 (emit_mrs): Likewise.
1986 (emit_msr): Likewise.
1987 (emit_sevl): Likewise.
1988 (emit_wfe): Likewise.
1989 (append_insns): Likewise.
1990 (can_encode_int32_in): New helper function.
1991 (aarch64_relocate_instruction): New function.
1992 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1993 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1994 (struct linux_target_ops): Install aarch64_get_thread_area,
1995 aarch64_install_fast_tracepoint_jump_pad and
1996 aarch64_get_min_fast_tracepoint_insn_len.
1997
787749ea
PL
19982015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1999
2000 * Makefile.in (aarch64-insn.o): New rule.
2001 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2002
9812b2e6
YQ
20032015-09-21 Yao Qi <yao.qi@linaro.org>
2004
2005 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2006
18fe412b
YQ
20072015-09-21 Yao Qi <yao.qi@linaro.org>
2008
2009 * tracepoint.c (max_jump_pad_size): Remove.
2010
a0cc84cd
YQ
20112015-09-18 Yao Qi <yao.qi@linaro.org>
2012
2013 * linux-aarch64-low.c: Don't include sys/uio.h.
2014 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2015
d78908cf
WW
20162015-09-16 Wei-cheng Wang <cole945@gmail.com>
2017
2018 * tracepoint.c (eval_result_type): Change prototype.
2019 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2020
d57e0d50
PA
20212015-09-15 Pedro Alves <palves@redhat.com>
2022
2023 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2024 Check whether to report exec events instead of checking whether
2025 multiprocess is enabled.
2026
5a676acc
PA
20272015-09-15 Pedro Alves <palves@redhat.com>
2028
2029 PR remote/18965
2030 * remote-utils.c (prepare_resume_reply): Merge
2031 TARGET_WAITKIND_VFORK_DONE switch case with the
2032 TARGET_WAITKIND_FORKED case.
2033
7c5d0fad
YQ
20342015-09-15 Yao Qi <yao.qi@linaro.org>
2035
2036 * server.c (handle_query): Check string comparison using
2037 "else if" instead of "if".
2038
750ce8d1
YQ
20392015-09-15 Yao Qi <yao.qi@linaro.org>
2040
2041 * server.c (vCont_supported): New global variable.
2042 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2043 matches. Append ";vContSupported+" to own_buf.
2044 (handle_v_requests): Append ";s;S" to own_buf if target supports
2045 hardware single step or vCont_supported is false.
2046 (capture_main): Set vCont_supported to zero.
2047
70b90b91
YQ
20482015-09-15 Yao Qi <yao.qi@linaro.org>
2049
2050 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2051 it to ...
2052 (linux_supports_hardware_single_step): ... New function.
2053 (linux_target_ops): Update.
2054 * lynx-low.c (lynx_target_ops): Set field
2055 supports_hardware_single_step to target_can_do_hardware_single_step.
2056 * nto-low.c (nto_target_ops): Likewise.
2057 * spu-low.c (spu_target_ops): Likewise.
2058 * win32-low.c (win32_target_ops): Likewise.
2059 * target.c (target_can_do_hardware_single_step): New function.
2060 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2061 Remove. <supports_hardware_single_step>: New field.
2062 (target_supports_conditional_breakpoints): Remove.
2063 (target_supports_hardware_single_step): New macro.
2064 (target_can_do_hardware_single_step): Declare.
2065 * server.c (handle_query): Use target_supports_hardware_single_step
2066 instead of target_supports_conditional_breakpoints.
2067
ade90bde
YQ
20682015-09-15 Yao Qi <yao.qi@linaro.org>
2069
2070 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2071 function.
2072 (struct linux_target_ops the_low_target): Install
2073 aarch64_linux_siginfo_fixup.
2074
94585166
DB
20752015-09-11 Don Breazeal <donb@codesourcery.com>
2076 Luis Machado <lgustavo@codesourcery.com>
2077
2078 * linux-low.c (linux_mourn): Static declaration.
2079 (linux_arch_setup): Move in front of
2080 handle_extended_wait.
2081 (linux_arch_setup_thread): New function.
2082 (handle_extended_wait): Handle exec events. Call
2083 linux_arch_setup_thread. Make event_lwp argument a
2084 pointer-to-a-pointer.
2085 (check_zombie_leaders): Do not check stopped threads.
2086 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2087 (linux_low_filter_event): Add lwp and thread for exec'ing
2088 non-leader thread if leader thread has been deleted.
2089 Refactor code into linux_arch_setup_thread and call it.
2090 Pass child lwp pointer by reference to handle_extended_wait.
2091 (linux_wait_for_event_filtered): Update comment.
2092 (linux_wait_1): Prevent clobbering exec event status.
2093 (linux_supports_exec_events): New function.
2094 (linux_target_ops) <supports_exec_events>: Initialize new member.
2095 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2096 new member.
2097 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2098 * server.c (report_exec_events): New global variable.
2099 (handle_query): Handle qSupported query for exec-events feature.
2100 (captured_main): Initialize report_exec_events.
2101 * server.h (report_exec_events): Declare new global variable.
2102 * target.h (struct target_ops) <supports_exec_events>: New
2103 member.
2104 (target_supports_exec_events): New macro.
2105 * win32-low.c (win32_target_ops) <supports_exec_events>:
2106 Initialize new member.
2107
0568462b
MM
21082015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2109
2110 * linux-low.c (linux_low_enable_btrace): Remove.
2111 (linux_target_ops): Replace linux_low_enable_btrace with
2112 linux_enable_btrace.
2113
39edd165
YQ
21142015-09-03 Yao Qi <yao.qi@linaro.org>
2115
2116 * linux-aarch64-low.c (aarch64_insert_point): Call
2117 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2118 returns true.
2119
1db33b5a
UW
21202015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2121
2122 * linux-low.c (check_stopped_by_breakpoint): Use
2123 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2124
ab290430
PA
21252015-08-27 Pedro Alves <palves@redhat.com>
2126
2127 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2128
8d749320
SM
21292015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2130
6711b7f8
SM
2131 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2132 the XNEW-family equivalent.
8d749320
SM
2133 (compile_bytecodes): Likewise.
2134 * dll.c (loaded_dll): Likewise.
2135 * event-loop.c (append_callback_event): Likewise.
2136 (create_file_handler): Likewise.
2137 (create_file_event): Likewise.
2138 * hostio.c (handle_open): Likewise.
2139 * inferiors.c (add_thread): Likewise.
2140 (add_process): Likewise.
2141 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2142 * linux-arm-low.c (arm_new_process): Likewise.
2143 (arm_new_thread): Likewise.
2144 * linux-low.c (add_to_pid_list): Likewise.
2145 (linux_add_process): Likewise.
2146 (handle_extended_wait): Likewise.
2147 (add_lwp): Likewise.
2148 (enqueue_one_deferred_signal): Likewise.
2149 (enqueue_pending_signal): Likewise.
2150 (linux_resume_one_lwp_throw): Likewise.
2151 (linux_resume_one_thread): Likewise.
2152 (linux_read_memory): Likewise.
2153 (linux_write_memory): Likewise.
2154 * linux-mips-low.c (mips_linux_new_process): Likewise.
2155 (mips_linux_new_thread): Likewise.
2156 (mips_add_watchpoint): Likewise.
2157 * linux-x86-low.c (initialize_low_arch): Likewise.
2158 * lynx-low.c (lynx_add_process): Likewise.
2159 * mem-break.c (set_raw_breakpoint_at): Likewise.
2160 (set_breakpoint): Likewise.
2161 (add_condition_to_breakpoint): Likewise.
2162 (add_commands_to_breakpoint): Likewise.
2163 (clone_agent_expr): Likewise.
2164 (clone_one_breakpoint): Likewise.
2165 * regcache.c (new_register_cache): Likewise.
2166 * remote-utils.c (look_up_one_symbol): Likewise.
2167 * server.c (queue_stop_reply): Likewise.
2168 (start_inferior): Likewise.
2169 (queue_stop_reply_callback): Likewise.
2170 (handle_target_event): Likewise.
2171 * spu-low.c (fetch_ppc_memory): Likewise.
2172 (store_ppc_memory): Likewise.
2173 * target.c (set_target_ops): Likewise.
2174 * thread-db.c (thread_db_load_search): Likewise.
2175 (try_thread_db_load_1): Likewise.
2176 * tracepoint.c (add_tracepoint): Likewise.
2177 (add_tracepoint_action): Likewise.
2178 (create_trace_state_variable): Likewise.
2179 (cmd_qtdpsrc): Likewise.
2180 (cmd_qtro): Likewise.
2181 (add_while_stepping_state): Likewise.
2182 * win32-low.c (child_add_thread): Likewise.
2183 (get_image_name): Likewise.
2184
ed8b7b42
YQ
21852015-08-25 Yao Qi <yao.qi@linaro.org>
2186
2187 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2188
db3cb7cb
YQ
21892015-08-25 Yao Qi <yao.qi@linaro.org>
2190
2191 * Makefile.in (aarch64-linux.o): New rule.
2192 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2193 srv_tgtobj.
2194 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2195 (aarch64_init_debug_reg_state): Make it extern.
2196 (aarch64_linux_prepare_to_resume): Remove.
2197
f6011a1c
YQ
21982015-08-25 Yao Qi <yao.qi@linaro.org>
2199
2200 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2201 lwp_arch_private_info and ptid_of_lwp.
2202
88e2cf7e
YQ
22032015-08-25 Yao Qi <yao.qi@linaro.org>
2204
2205 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2206 Find proc_info by find_process_pid. All callers updated.
2207
5e35436e
YQ
22082015-08-25 Yao Qi <yao.qi@linaro.org>
2209
2210 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2211 Remove.
2212 (debug_reg_change_callback): Remove.
2213 (aarch64_notify_debug_reg_change): Remove.
2214
4a8a7965
YQ
22152015-08-25 Yao Qi <yao.qi@linaro.org>
2216
2217 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2218 Call current_lwp_ptid.
2219
32a271ee
YQ
22202015-08-25 Yao Qi <yao.qi@linaro.org>
2221
2222 * linux-aarch64-low.c (debug_reg_change_callback): Use
2223 debug_printf.
2224
0d51c8d7
YQ
22252015-08-25 Yao Qi <yao.qi@linaro.org>
2226
2227 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2228
31a43dd5
YQ
22292015-08-25 Yao Qi <yao.qi@linaro.org>
2230
2231 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2232
8ee52567
YQ
22332015-08-25 Yao Qi <yao.qi@linaro.org>
2234
2235 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2236 the code.
2237
ff3f0f45
YQ
22382015-08-25 Yao Qi <yao.qi@linaro.org>
2239
2240 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2241 Remove.
2242 (debug_reg_change_callback): Remove argument entry and add argument
2243 lwp. Remove local variable thread. Don't print thread id in the
2244 debugging output. Don't check whether pid of thread equals to pid.
2245 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2246 iterate_over_lwps instead find_inferior.
2247
3d40fbb5
PA
22482015-08-24 Pedro Alves <palves@redhat.com>
2249
2250 * inferiors.c (get_first_process): New function.
2251 * inferiors.h (get_first_process): New declaration.
2252 * remote-utils.c (read_ptid): Default to the first process in the
2253 list, instead of to the current thread's process.
2254
438e1e42
PA
22552015-08-24 Pedro Alves <palves@redhat.com>
2256
2257 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2258 * event-loop.c: Likewise.
2259 * remote-utils.c: Likewise.
2260 * tracepoint.c: Likewise.
2261
a8c6d4fc
PA
22622015-08-24 Pedro Alves <palves@redhat.com>
2263
2264 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2265 ptid_get_lwp.
2266
99b0bb12
PA
22672015-08-21 Pedro Alves <palves@redhat.com>
2268
2269 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2270 instead of literal 1.
2271
f8904751
PA
22722015-08-21 Pedro Alves <palves@redhat.com>
2273
2274 * tdesc.c (default_description): Explicitly zero-initialize.
2275
465a859e
PA
22762015-08-21 Pedro Alves <palves@redhat.com>
2277
2278 PR gdb/18749
2279 * inferiors.c (remove_thread): Discard any pending stop reply for
2280 this thread.
2281 * server.c (remove_all_on_match_pid): Rename to ...
2282 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2283 instead of a pid.
2284 (discard_queued_stop_replies): Change parameter to a ptid. Now
2285 extern.
2286 (handle_v_kill, kill_inferior_callback, captured_main)
2287 (process_serial_event): Adjust.
2288 * server.h (discard_queued_stop_replies): Declare.
2289
f0db101d
PA
22902015-08-21 Pedro Alves <palves@redhat.com>
2291
2292 * linux-low.c (wait_for_sigstop): Always switch to no thread
2293 selected if the previously current thread dies.
2294 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2295 process instead of the current thread's.
2296 * remote-utils.c (input_interrupt): Don't check if there's no
2297 current thread.
2298 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2299 current thread to the general thread fails, error out.
2300 (handle_qxfer_auxv, handle_qxfer_libraries)
2301 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2302 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2303 (handle_query): Check if there's a thread selected instead of
2304 checking whether there's any thread in the thread list.
2305 (handle_qxfer_threads, handle_qxfer_btrace)
2306 (handle_qxfer_btrace_conf): Don't error out early if there's no
2307 thread in the thread list.
2308 (handle_v_cont, myresume): Don't set the current thread to the
2309 continue thread.
2310 (process_serial_event) <Hg handling>: Also set thread_id if the
2311 previous general thread is still alive.
2312 (process_serial_event) <g/G handling>: If setting the current
2313 thread to the general thread fails, error out.
2314 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2315 thread's lwp instead of the current thread's.
2316 * target.c (set_desired_thread): If the desired thread was not
2317 found, leave the current thread pointing to NULL. Return an int
2318 (boolean) indicating success.
2319 * target.h (set_desired_thread): Change return type to int.
2320
40045d91
MF
23212015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2322
2323 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2324 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2325 #includes.
2326 (ps_get_thread_area): New function.
2327
45face3b
GB
23282015-08-19 Gary Benson <gbenson@redhat.com>
2329
2330 * hostio.c (handle_pread): Do not attempt to read more data
2331 than hostio_reply_with_data can fit in a packet.
2332
16d5f642
JB
23332015-08-18 Joel Brobecker <brobecker@adacore.com>
2334
2335 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2336
a738da3a
MF
23372015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2338
2339 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2340
33ebda9d
PA
23412015-08-06 Pedro Alves <palves@redhat.com>
2342
2343 * tracepoint.c (expr_eval_result): Now an int.
2344
a44892be
PA
23452015-08-06 Pedro Alves <palves@redhat.com>
2346
2347 * gdbthread.h (struct regcache): Forward declare.
2348 (struct thread_info) <regcache_data>: Now a struct regcache
2349 pointer.
2350 * inferiors.c (inferior_regcache_data)
2351 (set_inferior_regcache_data): Now work with struct regcache
2352 pointers.
2353 * inferiors.h (struct regcache): Forward declare.
2354 (inferior_regcache_data, set_inferior_regcache_data): Now work
2355 with struct regcache pointers.
2356 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2357 (free_register_cache_thread): Remove struct regcache pointer
2358 casts.
2359
608a1e46
PA
23602015-08-06 Pedro Alves <palves@redhat.com>
2361
2362 * server.c (captured_main): On error, print the exception message
2363 to stderr, and if run_once is set, throw a quit.
2364
f0ce0d3a
PA
23652015-08-06 Pedro Alves <palves@redhat.com>
2366
2367 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2368 the current thread.
2369
bf47e248
PA
23702015-08-06 Pedro Alves <palves@redhat.com>
2371
2372 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2373 reading beyond the passed in buffer length.
2374
b6b9ffcc
PL
23752015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2376
2377 * tracepoint.c (symbol_list) <required>: Remove.
2378
863d01bd
PA
23792015-08-06 Pedro Alves <palves@redhat.com>
2380
2381 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2382 count if stopping and suspending threads.
2383 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2384 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2385 (linux_detach): Complete an ongoing step-over.
2386 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2387 throughout.
2388 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2389 (linux_wait_1): If passing a signal to the inferior after
2390 finishing a step-over, unsuspend and re-resume all lwps. If we
2391 see a single-step event but the thread should be continuing, don't
2392 pass the trap to gdb.
2393 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2394 internal_error instead of gdb_assert.
2395 (enqueue_pending_signal): New function.
2396 (check_ptrace_stopped_lwp_gone): Add debug output.
2397 (start_step_over): Use internal_error instead of gdb_assert.
2398 (complete_ongoing_step_over): New function.
2399 (linux_resume_one_thread): Don't resume a suspended thread.
2400 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2401 it stepping.
2402
00db26fa
PA
24032015-08-06 Pedro Alves <palves@redhat.com>
2404
2405 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2406 (linux_thread_alive): Use lwp_is_marked_dead.
2407 (extended_event_reported): Delete.
2408 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2409 instead of extended_event_reported.
2410 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2411 as well.
2412 (lwp_is_marked_dead): New function.
2413 (lwp_running): Use lwp_is_marked_dead.
2414 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2415 comment.
2416
ad071a30
PA
24172015-08-06 Pedro Alves <palves@redhat.com>
2418
2419 * linux-low.c (linux_wait_1): Move fork event output out of the
2420 !report_to_gdb check. Pass event_child->waitstatus to
2421 target_waitstatus_to_string instead of ourstatus.
2422
524b57e6
YQ
24232015-08-04 Yao Qi <yao.qi@linaro.org>
2424
2425 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2426 if current_thread is 32 bit.
2427
6085d6f6
YQ
24282015-08-04 Yao Qi <yao.qi@linaro.org>
2429
2430 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2431 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2432 * server.c (extended_protocol): Remove "static".
2433 * server.h (extended_protocol): Declare it.
2434
8a7e4587
YQ
24352015-08-04 Yao Qi <yao.qi@linaro.org>
2436
2437 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2438 both aarch64 and aarch32.
2439 (aarch64_set_pc): Likewise.
2440
3b53ae99
YQ
24412015-08-04 Yao Qi <yao.qi@linaro.org>
2442
2443 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2444 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2445 arm-with-neon.xml to srv_xmlfiles.
2446 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2447 (is_64bit_tdesc): New function.
2448 (aarch64_linux_read_description): New function.
2449 (aarch64_arch_setup): Call aarch64_linux_read_description.
2450 (regs_info): Rename to regs_info_aarch64.
2451 (aarch64_regs_info): Return right regs_info.
2452 (initialize_low_arch): Call initialize_low_arch_aarch32.
2453
bd9e6534
YQ
24542015-08-04 Yao Qi <yao.qi@linaro.org>
2455
2456 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2457 * linux-aarch32-low.c: New file.
2458 * linux-aarch32-low.h: New file.
2459 * linux-arm-low.c (arm_fill_gregset): Move it to
2460 linux-aarch32-low.c.
2461 (arm_store_gregset): Likewise.
2462 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2463 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2464 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2465 (regs_info): Rename to regs_info_arm.
2466 (arm_regs_info): Return regs_info_aarch32 if
2467 have_ptrace_getregset is 1 and target description is
2468 arm_with_neon or arm_with_vfpv3.
2469 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2470 Call initialize_low_arch_aarch32 instead.
2471
ded48a5e
YQ
24722015-08-04 Yao Qi <yao.qi@linaro.org>
2473
2474 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2475 * linux-low.c: ... here.
2476 * linux-low.h (have_ptrace_getregset): Declare it.
2477
96e9210f
PA
24782015-08-04 Pedro Alves <palves@redhat.com>
2479
2480 * thread-db.c (struct thread_db): Use new typedefs.
2481 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2482 CHK calls.
2483 (disable_thread_event_reporting): Cast result of dlsym to
2484 destination function pointer type.
2485 (thread_db_mourn): Use td_ta_delete_ftype.
2486
af60a1ef
SL
24872015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2488
2489 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2490 arch variant.
2491 (CDX_BREAKPOINT): Define for R2.
2492 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2493 (the_low_target): Add comments.
2494
e8b41681
YQ
24952015-07-30 Yao Qi <yao.qi@linaro.org>
2496
2497 * linux-arm-low.c (arm_hwcap): Remove it.
2498 (arm_read_description): New local variable arm_hwcap. Don't
2499 set arm_hwcap to zero.
2500
89abb039
YQ
25012015-07-30 Yao Qi <yao.qi@linaro.org>
2502
2503 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2504 Use regcache->tdesc instead.
2505 (arm_store_wmmxregset): Likewise.
2506 (arm_fill_vfpregset): Likewise.
2507 (arm_store_vfpregset): Likewise.
2508
deca266c
YQ
25092015-07-30 Yao Qi <yao.qi@linaro.org>
2510
2511 * linux-arm-low.c: Include arch/arm.h.
2512 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2513 (arm_store_gregset): Likewise.
2514
aa58a496
SM
25152015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2516
2517 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2518 ptrace's 4th parameter.
2519
50904b25
YQ
25202015-07-27 Yao Qi <yao.qi@linaro.org>
2521
2522 * configure.srv (case aarch64*-*-linux*): Don't set
2523 srv_linux_usrregs.
2524
5826e159
PA
25252015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2526
2527 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2528 sys/ptrace.h.
2529 * linux-arm-low.c: Likewise.
2530 * linux-cris-low.c: Likewise.
2531 * linux-crisv32-low.c: Likewise.
2532 * linux-low.c: Likewise.
2533 * linux-m68k-low.c: Likewise.
2534 * linux-mips-low.c: Likewise.
2535 * linux-nios2-low.c: Likewise.
2536 * linux-s390-low.c: Likewise.
2537 * linux-sparc-low.c: Likewise.
2538 * linux-tic6x-low.c: Likewise.
2539 * linux-tile-low.c: Likewise.
2540 * linux-x86-low.c: Likewise.
2541
54019719
PA
25422015-07-24 Pedro Alves <palves@redhat.com>
2543
2544 * config.in: Regenerate.
2545 * configure: Regenerate.
2546
eb7aa561
PA
25472015-07-24 Pedro Alves <palves@redhat.com>
2548
2549 * acinclude.m4: Include ../ptrace.m4.
2550 * configure.ac: Call GDB_AC_PTRACE.
2551 * config.in, configure: Regenerate.
2552
55d7b841
YQ
25532015-07-24 Yao Qi <yao.qi@linaro.org>
2554
2555 * linux-low.c (linux_create_inferior): Remove setting to
2556 proc->priv->new_inferior.
2557 (linux_attach): Likewise.
2558 (linux_low_filter_event): Likewise.
2559 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2560
c06cbd92
YQ
25612015-07-24 Yao Qi <yao.qi@linaro.org>
2562
2563 * linux-low.c (linux_arch_setup): New function.
2564 (linux_low_filter_event): If proc->tdesc is NULL and
2565 proc->attached is true, call the_low_target.arch_setup.
2566 Otherwise, keep status pending, and return.
2567 (linux_resume_one_lwp_throw): Don't call get_pc if
2568 thread->while_stepping isn't NULL. Don't call
2569 get_thread_regcache if proc->tdesc is NULL.
2570 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2571 (linux_target_ops): Install arch_setup.
2572 * server.c (start_inferior): Call the_target->arch_setup.
2573 * target.h (struct target_ops) <arch_setup>: New field.
2574 (target_arch_setup): New marco.
2575 * lynx-low.c (lynx_target_ops): Update.
2576 * nto-low.c (nto_target_ops): Update.
2577 * spu-low.c (spu_target_ops): Update.
2578 * win32-low.c (win32_target_ops): Update.
2579
5ae3ebba
YQ
25802015-07-24 Yao Qi <yao.qi@linaro.org>
2581
2582 * linux-low.c (linux_add_process): Don't set
2583 proc->priv->new_inferior.
2584 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2585 (linux_attach): Likewise.
2586
eb97750b
YQ
25872015-07-24 Yao Qi <yao.qi@linaro.org>
2588
2589 * server.c (start_inferior): Code refactor.
2590
51aee833
YQ
25912015-07-24 Yao Qi <yao.qi@linaro.org>
2592
2593 * server.c (process_serial_event): Set general_thread.
2594
af1b22f3
YQ
25952015-07-21 Yao Qi <yao.qi@linaro.org>
2596
2597 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2598 aarch64_linux_get_debug_reg_capacity.
2599
554717a3
YQ
26002015-07-17 Yao Qi <yao.qi@linaro.org>
2601
2602 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2603 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2604 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2605 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2606 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2607 (AARCH64_HWP_ALIGNMENT): Likewise.
2608 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2609 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2610 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2611 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2612 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2613 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2614 (struct aarch64_debug_reg_state): Likewise.
2615 (struct arch_lwp_info): Likewise.
2616 (aarch64_align_watchpoint): Likewise.
2617 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2618 (aarch64_watchpoint_length): Likewise.
2619 (aarch64_point_encode_ctrl_reg): Likewise
2620 (aarch64_point_is_aligned): Likewise.
2621 (aarch64_align_watchpoint): Likewise.
2622 (aarch64_linux_set_debug_regs):
2623 (aarch64_dr_state_insert_one_point): Likewise.
2624 (aarch64_dr_state_remove_one_point): Likewise.
2625 (aarch64_handle_breakpoint): Likewise.
2626 (aarch64_handle_aligned_watchpoint): Likewise.
2627 (aarch64_handle_unaligned_watchpoint): Likewise.
2628 (aarch64_handle_watchpoint): Likewise.
2629
c67ca4de
YQ
26302015-07-17 Yao Qi <yao.qi@linaro.org>
2631
2632 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2633 and don't aarch64_get_debug_reg_state. All callers update.
2634 (aarch64_handle_aligned_watchpoint): Likewise.
2635 (aarch64_handle_unaligned_watchpoint): Likewise.
2636 (aarch64_handle_watchpoint): Likewise.
2637 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2638 (aarch64_remove_point): Likewise.
2639
25abf979
YQ
26402015-07-17 Yao Qi <yao.qi@linaro.org>
2641
2642 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2643 debug_printf.
2644 (aarch64_handle_unaligned_watchpoint): Likewise.
2645
db1ff28b
JK
26462015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2647
2648 Revert the previous 3 commits:
2649 Move gdb_regex* to common/
2650 Move linux_find_memory_regions_full & co.
2651 gdbserver build-id attribute generator
2652
700ca40f
JK
26532015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2654 Jan Kratochvil <jan.kratochvil@redhat.com>
2655
2656 gdbserver build-id attribute generator.
2657 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2658 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2659 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2660 (find_phdr): New.
2661 (get_dynamic): Use find_pdhr to traverse program headers.
2662 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2663 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2664 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2665 (get_hex_build_id): New.
2666 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2667 to reply XML document.
2668
9904185c
JK
26692015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2670 Jan Kratochvil <jan.kratochvil@redhat.com>
2671
2672 * target.c: Include target/target-utils.h and fcntl.h.
2673 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2674 (target_fileio_read_stralloc): New functions.
2675
6e5b4429
JK
26762015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2677
2678 * Makefile.in (OBS): Add gdb_regex.o.
2679 (gdb_regex.o): New.
2680 * config.in: Rebuilt.
2681 * configure: Rebuilt.
2682
ddc98fbf
JK
26832015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2684 Jan Kratochvil <jan.kratochvil@redhat.com>
2685
2686 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2687 * Makefile.in (OBS): Add target-utils.o.
2688 (linux-maps.o, target-utils.o): New.
2689 * configure.srv (srv_linux_obj): Add linux-maps.o.
2690
e57bb7a0
PL
26912015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2692
2693 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2694 function, return 1.
2695 (the_low_target): Install it.
2696
586b02a9
PA
26972015-07-14 Pedro Alves <palves@redhat.com>
2698
2699 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2700 Instead, ignore ECHILD, and throw an error for other errnos.
2701
58c1b36c
PA
27022015-07-10 Pedro Alves <palves@redhat.com>
2703
2704 * event-loop.c (struct callback_event) <data>: Change type to
2705 gdb_client_data instance instead of gdb_client_data pointer.
2706 (append_callback_event): Adjust.
2707
421530db
PL
27082015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2709
2710 * linux-aarch64-low.c: Add comments for each linux_target_ops
2711 method. Remove comments already covered in target_ops and
2712 linux_target_ops definitions.
2713 (the_low_target): Add comments for each unimplemented method.
2714
c2d65f38
YQ
27152015-07-09 Yao Qi <yao.qi@linaro.org>
2716
2717 * linux-aarch64-low.c (aarch64_regmap): Remove.
2718 (aarch64_usrregs_info): Remove.
2719 (regs_info): Set field usrregs to NULL.
2720
b20a6524
MM
27212015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2722
2723 * linux-low.c: Include "rsp-low.h"
2724 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2725 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2726 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2727 (handle_btrace_enable_pt): New.
2728 (handle_btrace_general_set): Support "pt".
2729 (handle_btrace_conf_general_set): Support "pt:size".
2730
96c97461
PL
27312015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2732
2733 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2734 Z_PACKET_SW_BP.
2735
37d66942
PL
27362015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2737
2738 * linux-aarch64-low.c: Remove comment about endianness.
2739 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2740 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2741 memcmp.
2742
dc06243f
GB
27432015-06-24 Gary Benson <gbenson@redhat.com>
2744
2745 * linux-i386-ipa.c (stdint.h): Do not include.
2746 * lynx-i386-low.c (stdint.h): Likewise.
2747 * lynx-ppc-low.c (stdint.h): Likewise.
2748 * mem-break.c (stdint.h): Likewise.
2749 * thread-db.c (stdint.h): Likewise.
2750 * tracepoint.c (stdint.h): Likewise.
2751 * win32-low.c (stdint.h): Likewise.
2752
124e13d9
SM
27532015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2754
2755 * server.c (write_qxfer_response): Update call to
2756 remote_escape_output.
2757
909c2cda
JK
27582015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2759 Jan Kratochvil <jan.kratochvil@redhat.com>
2760
2761 Merge multiple hex conversions.
2762 * gdbreplay.c (tohex): Rename to 'fromhex'.
2763 (logchar): Use fromhex.
2764
24c05f46
JK
27652015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2766
2767 * server.c (handle_qxfer_libraries): Set `version' attribute for
2768 <library-list>.
2769
14d2069a
GB
27702015-06-10 Gary Benson <gbenson@redhat.com>
2771
2772 * target.h (struct target_ops) <multifs_open>: New field.
2773 <multifs_unlink>: Likewise.
2774 <multifs_readlink>: Likewise.
2775 * linux-low.c (nat/linux-namespaces.h): New include.
2776 (linux_target_ops): Initialize the_target->multifs_open,
2777 the_target->multifs_unlink and the_target->multifs_readlink.
2778 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2779 * hostio.c (hostio_fs_pid): New static variable.
2780 (hostio_handle_new_gdb_connection): New function.
2781 (handle_setfs): Likewise.
2782 (handle_open): Use the_target->multifs_open as appropriate.
2783 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2784 (handle_readlink): Use the_target->multifs_readlink as
2785 appropriate.
2786 (handle_vFile): Handle vFile:setfs packets.
2787 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2788 after target_handle_new_gdb_connection.
2789
4b8b5e72
GB
27902015-06-10 Gary Benson <gbenson@redhat.com>
2791
2792 * configure.ac (AC_CHECK_FUNCS): Add setns.
2793 * config.in: Regenerate.
2794 * configure: Likewise.
2795 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2796 (linux-namespaces.o): New rule.
2797 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2798
3ac2e371
GB
27992015-06-09 Gary Benson <gbenson@redhat.com>
2800
2801 * hostio.c (handle_open): Process mode argument with
2802 fileio_to_host_mode.
2803
ca9b78ce
YQ
28042015-06-01 Yao Qi <yao.qi@linaro.org>
2805
2806 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2807 * linux-x86-low.c: Likewise.
2808
bfacd19d
DB
28092015-05-28 Don Breazeal <donb@codesourcery.com>
2810
2811 * linux-low.c (handle_extended_wait): Initialize
2812 thread_info.last_resume_kind for new fork children.
2813
452003ef
PA
28142015-05-15 Pedro Alves <palves@redhat.com>
2815
2816 * target.h (target_handle_new_gdb_connection): Rewrite using if
2817 wrapped in do/while.
2818
1041a03c
JB
28192015-05-14 Joel Brobecker <brobecker@adacore.com>
2820
2821 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2822 * configure, config.in: Regenerate.
2823 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2824 Declare typedef.
2825
c269dbdb
DB
28262015-05-12 Don Breazeal <donb@codesourcery.com>
2827
2828 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2829 PTRACE_EVENT_VFORK_DONE.
2830 (linux_low_ptrace_options, extended_event_reported): Add vfork
2831 events.
2832 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2833 and "vforkdone" for RSP 'T' Stop Reply Packet.
2834 * server.h (report_vfork_events): Declare
2835 global variable.
2836
3a8a0396
DB
28372015-05-12 Don Breazeal <donb@codesourcery.com>
2838
2839 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2840 (the_low_target) <new_fork>: Initialize new member.
2841 * linux-arm-low.c (arm_new_fork): New function.
2842 (the_low_target) <new_fork>: Initialize new member.
2843 * linux-low.c (handle_extended_wait): Call new target function
2844 new_fork.
2845 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2846 * linux-mips-low.c (mips_add_watchpoint): New function
2847 extracted from mips_insert_point.
2848 (the_low_target) <new_fork>: Initialize new member.
2849 (mips_linux_new_fork): New function.
2850 (mips_insert_point): Call mips_add_watchpoint.
2851 * linux-x86-low.c (x86_linux_new_fork): New function.
2852 (the_low_target) <new_fork>: Initialize new member.
2853
de0d863e
DB
28542015-05-12 Don Breazeal <donb@codesourcery.com>
2855
2856 * linux-low.c (handle_extended_wait): Implement return value,
2857 rename argument 'event_child' to 'event_lwp', handle
2858 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2859 (linux_low_ptrace_options): New function.
2860 (linux_low_filter_event): Call linux_low_ptrace_options,
2861 use different argument fo linux_enable_event_reporting,
2862 use return value from handle_extended_wait.
2863 (extended_event_reported): New function.
2864 (linux_wait_1): Call extended_event_reported and set
2865 status to report fork events.
2866 (linux_write_memory): Add pid to debug message.
2867 (reset_lwp_ptrace_options_callback): New function.
2868 (linux_handle_new_gdb_connection): New function.
2869 (linux_target_ops): Initialize new structure member.
2870 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2871 * lynx-low.c: Initialize new structure member.
2872 * remote-utils.c (prepare_resume_reply): Implement stop reason
2873 "fork" for "T" stop message.
2874 * server.c (handle_query): Call handle_new_gdb_connection.
2875 * server.h (report_fork_events): Declare global flag.
2876 * target.h (struct target_ops) <handle_new_gdb_connection>:
2877 New member.
2878 (target_handle_new_gdb_connection): New macro.
2879 * win32-low.c: Initialize new structure member.
2880
ddcbc397
DB
28812015-05-12 Don Breazeal <donb@codesourcery.com>
2882
2883 * mem-break.c (APPEND_TO_LIST): Define macro.
2884 (clone_agent_expr): New function.
2885 (clone_one_breakpoint): New function.
2886 (clone_all_breakpoints): New function.
2887 * mem-break.h: Declare new functions.
2888
89245bc0
DB
28892015-05-12 Don Breazeal <donb@codesourcery.com>
2890
2891 * linux-low.c (linux_supports_fork_events): New function.
2892 (linux_supports_vfork_events): New function.
2893 (linux_target_ops): Initialize new structure members.
2894 (initialize_low): Call linux_check_ptrace_features.
2895 * lynx-low.c (lynx_target_ops): Initialize new structure
2896 members.
2897 * server.c (report_fork_events, report_vfork_events):
2898 New global flags.
2899 (handle_query): Add new features to qSupported packet and
2900 response.
2901 (captured_main): Initialize new global variables.
2902 * target.h (struct target_ops) <supports_fork_events>:
2903 New member.
2904 <supports_vfork_events>: New member.
2905 (target_supports_fork_events): New macro.
2906 (target_supports_vfork_events): New macro.
2907 * win32-low.c (win32_target_ops): Initialize new structure
2908 members.
2909
835205d0
GB
29102015-05-12 Gary Benson <gbenson@redhat.com>
2911
2912 * server.c (handle_qxfer_exec_file): Use current process
2913 if annex is empty.
2914
21e94bd9
SL
29152015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2916
2917 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2918 Remove HAVE_PTRACE_GETREGS conditionals.
2919 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2920 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2921
45614f15
YQ
29222015-05-08 Yao Qi <yao.qi@linaro.org>
2923
2924 * linux-low.c (linux_supports_conditional_breakpoints): New
2925 function.
2926 (linux_target_ops): Install new target method.
2927 * lynx-low.c (lynx_target_ops): Install NULL hook for
2928 supports_conditional_breakpoints.
2929 * nto-low.c (nto_target_ops): Likewise.
2930 * spu-low.c (spu_target_ops): Likewise.
2931 * win32-low.c (win32_target_ops): Likewise.
2932 * server.c (handle_query): Check
2933 target_supports_conditional_breakpoints.
2934 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2935 New field.
2936 (target_supports_conditional_breakpoints): New macro.
2937
80ad801e
PA
29382015-05-06 Pedro Alves <palves@redhat.com>
2939
2940 PR server/18081
2941 * server.c (start_inferior): If the process exits, mourn it.
2942
819843c7
GB
29432015-04-21 Gary Benson <gbenson@redhat.com>
2944
2945 * hostio.c (fileio_open_flags_to_host): Factored out to
2946 fileio_to_host_openflags in common/fileio.c. Single use
2947 updated.
2948
a2d5a9d7
MF
29492015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2950
2951 * linux-xtensa-low.c (xtensa_fill_gregset)
2952 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2953 XCHAL_HAVE_LOOP.
2954
deb44829
MF
29552015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2956
2957 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2958 (regs_info): Replace usrregs pointer with NULL.
2959
e57f1de3
GB
29602015-04-17 Gary Benson <gbenson@redhat.com>
2961
2962 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2963 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2964 * server.c (handle_qxfer_exec_file): New function.
2965 (qxfer_packets): Add exec-file entry.
2966 (handle_query): Report qXfer:exec-file:read as supported packet.
2967
62828379
RN
29682015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2969
2970 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2971
b88bb450
GB
29722015-04-09 Gary Benson <gbenson@redhat.com>
2973
2974 * hostio-errno.c (errno_to_fileio_error): Remove function.
2975 Update caller to use remote_fileio_to_fio_error.
2976
c8f4bfdd
YQ
29772015-04-09 Yao Qi <yao.qi@linaro.org>
2978
2979 * linux-low.c (linux_insert_point): Call
2980 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2981 (linux_remove_point): Call remove_memory_breakpoint if type is
2982 raw_bkpt_type_sw.
2983 * linux-x86-low.c (x86_insert_point): Don't call
2984 insert_memory_breakpoint.
2985 (x86_remove_point): Don't call remove_memory_breakpoint.
2986
41f98f02
PA
29872015-04-01 Pedro Alves <palves@redhat.com>
2988 Cleber Rosa <crosa@redhat.com>
2989
2990 * server.c (gdbserver_usage): Reorganize and extend the usage
2991 message.
2992
2bf6fb9d
PA
29932015-03-24 Pedro Alves <palves@redhat.com>
2994
2995 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2996 output. Also dump TRAP_TRACE.
2997 (linux_low_filter_event): In debug output, distinguish a
2998 resume_stop SIGSTOP from a delayed SIGSTOP.
2999
369f6daa
GB
30002015-03-24 Gary Benson <gbenson@redhat.com>
3001
3002 * linux-x86-low.c (x86_linux_new_thread): Moved to
3003 nat/x86-linux.c.
3004 (x86_linux_prepare_to_resume): Likewise.
3005
8e5d4070
GB
30062015-03-24 Gary Benson <gbenson@redhat.com>
3007
3008 * Makefile.in (x86-linux-dregs.o): New rule.
3009 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3010 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3011 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3012 (x86_linux_dr_get): Likewise.
3013 (x86_linux_dr_set): Likewise.
3014 (update_debug_registers_callback): Likewise.
3015 (x86_linux_dr_set_addr): Likewise.
3016 (x86_linux_dr_get_addr): Likewise.
3017 (x86_linux_dr_set_control): Likewise.
3018 (x86_linux_dr_get_control): Likewise.
3019 (x86_linux_dr_get_status): Likewise.
3020 (x86_linux_update_debug_registers): Likewise.
3021
2b95d440
GB
30222015-03-24 Gary Benson <gbenson@redhat.com>
3023
3024 * linux-x86-low.c (x86_linux_update_debug_registers):
3025 New function, factored out from...
3026 (x86_linux_prepare_to_resume): ...this.
3027
14b0bc68
GB
30282015-03-24 Gary Benson <gbenson@redhat.com>
3029
3030 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3031 (x86_linux_dr_set): Likewise.
3032 (update_debug_registers_callback): Likewise.
3033 (x86_linux_dr_set_addr): Likewise.
3034 (x86_linux_dr_get_addr): Likewise.
3035 (x86_linux_dr_set_control): Likewise.
3036 (x86_linux_dr_get_control): Likewise.
3037 (x86_linux_dr_get_status): Likewise.
3038 (x86_linux_prepare_to_resume): Likewise.
3039
5dfe6ca8
GB
30402015-03-24 Gary Benson <gbenson@redhat.com>
3041
3042 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3043 Use perror_with_name. Pass string through gettext.
3044 (x86_linux_dr_set): Likewise.
3045
d33472ad
GB
30462015-03-24 Gary Benson <gbenson@redhat.com>
3047
3048 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3049 (x86_linux_dr_set_addr): ...this.
3050 (x86_dr_low_get_addr): Rename to...
3051 (x86_linux_dr_get_addr): ...this.
3052 (x86_dr_low_set_control): Rename to...
3053 (x86_linux_dr_set_control): ...this.
3054 (x86_dr_low_get_control): Rename to...
3055 (x86_linux_dr_get_control): ...this.
3056 (x86_dr_low_get_status): Rename to...
3057 (x86_linux_dr_get_status): ...this.
3058 (x86_dr_low): Update with new function names.
3059
4b134ca1
GB
30602015-03-24 Gary Benson <gbenson@redhat.com>
3061
3062 * Makefile.in (x86-linux.o): New rule.
3063 * configure.srv: Add x86-linux.o to relevant targets.
3064 * linux-low.c (lwp_set_arch_private_info): New function.
3065 (lwp_arch_private_info): Likewise.
3066 * linux-x86-low.c: Include nat/x86-linux.h.
3067 (arch_lwp_info): Removed structure.
3068 (update_debug_registers_callback):
3069 Use lwp_set_debug_registers_changed.
3070 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3071 and lwp_set_debug_registers_changed.
3072 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3073
34c703da
GB
30742015-03-24 Gary Benson <gbenson@redhat.com>
3075
3076 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3077 * linux-arm-low.c (arm_new_thread): Likewise.
3078 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3079 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3080 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3081 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3082
cff068da
GB
30832015-03-24 Gary Benson <gbenson@redhat.com>
3084
3085 * linux-low.c (ptid_of_lwp): New function.
3086 (lwp_is_stopped): Likewise.
3087 (lwp_stop_reason): Likewise.
3088 * linux-x86-low.c (update_debug_registers_callback):
3089 Use lwp_is_stopped.
3090 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3091 lwp_stop_reason.
3092
b2f7c7e8
GB
30932015-03-24 Gary Benson <gbenson@redhat.com>
3094
3095 * linux-low.h (linux_stop_lwp): Remove declaration.
3096
6d4ee8c6
GB
30972015-03-24 Gary Benson <gbenson@redhat.com>
3098
3099 * linux-low.h: Include nat/linux-nat.h.
3100 * linux-low.c (iterate_over_lwps_args): New structure.
3101 (iterate_over_lwps_filter): New function.
3102 (iterate_over_lwps): Likewise.
3103 * linux-x86-low.c (update_debug_registers_callback):
3104 Update signature to what iterate_over_lwps expects.
3105 Remove PID check that iterate_over_lwps now performs.
3106 (x86_dr_low_set_addr): Use iterate_over_lwps.
3107 (x86_dr_low_set_control): Likewise.
3108
70a0bb6b
GB
31092015-03-24 Gary Benson <gbenson@redhat.com>
3110
3111 * linux-x86-low.c (x86_debug_reg_state): New function.
3112 (x86_linux_prepare_to_resume): Use the above.
3113
7b669087
GB
31142015-03-24 Gary Benson <gbenson@redhat.com>
3115
3116 * linux-low.c (current_lwp_ptid): New function.
3117 * linux-x86-low.c: Include nat/linux-nat.h.
3118 (x86_dr_low_get_addr): Use current_lwp_ptid.
3119 (x86_dr_low_get_control): Likewise.
3120 (x86_dr_low_get_status): Likewise.
3121
eef49a3d
PA
31222015-03-20 Pedro Alves <palves@redhat.com>
3123
3124 * tracepoint.c (cmd_qtstatus): Make "str" const.
3125
b2333d22
PA
31262015-03-20 Pedro Alves <palves@redhat.com>
3127
3128 * server.c (handle_general_set): Make "req_str" const.
3129
23f238d3
PA
31302015-03-19 Pedro Alves <palves@redhat.com>
3131
3132 * linux-low.c (linux_resume_one_lwp): Rename to ...
3133 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3134 instead call perror_with_name.
3135 (check_ptrace_stopped_lwp_gone): New function.
3136 (linux_resume_one_lwp): Reimplement as wrapper around
3137 linux_resume_one_lwp_throw that swallows errors if the LWP is
3138 gone.
3139
91baf43f
PA
31402015-03-19 Pedro Alves <palves@redhat.com>
3141
3142 * linux-low.c (count_events_callback, select_event_lwp_callback):
3143 No longer check whether the thread has resume_stop as last resume
3144 kind.
3145
8bf3b159
PA
31462015-03-19 Pedro Alves <palves@redhat.com>
3147
3148 * linux-low.c (count_events_callback, select_event_lwp_callback):
3149 Use the lwp's status_pending_p field, not the thread's.
3150
b90fc188
PA
31512015-03-19 Pedro Alves <palves@redhat.com>
3152
3153 * linux-low.c (select_event_lwp_callback): Update comments to
3154 no longer mention SIGTRAP.
3155
464b0089
GB
31562015-03-18 Gary Benson <gbenson@redhat.com>
3157
3158 * server.c (handle_query): Do not report vFile:fstat as supported.
3159
aa9e327f
GB
31602015-03-11 Gary Benson <gbenson@redhat.com>
3161
3162 * hostio.c (sys/types.h): New include.
3163 (sys/stat.h): Likewise.
3164 (common-remote-fileio.h): Likewise.
3165 (handle_fstat): New function.
3166 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3167
791c0056
GB
31682015-03-11 Gary Benson <gbenson@redhat.com>
3169
3170 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3171 struct stat.st_blocks and struct stat.st_blksize.
3172 * configure: Regenerate.
3173 * config.in: Likewise.
3174 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3175 (OBS): Add common-remote-fileio.o.
3176 (common-remote-fileio.o): New rule.
3177
9a9df970
PA
31782015-03-09 Pedro Alves <palves@redhat.com>
3179
3180 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3181 'struct sockaddr' pointer in 'accept' call.
3182
9eb1356e
PA
31832015-03-09 Pedro Alves <palves@redhat.com>
3184
3185 Revert:
3186 2015-03-07 Pedro Alves <palves@redhat.com>
3187 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3188 or <winsock2.h> here. Instead include "gdb_socket.h".
3189 (remote_open): Use union gdb_sockaddr_u.
3190 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3191 or <winsock2.h> here. Instead include "gdb_socket.h".
3192 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3193 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3194 or <sys/un.h>.
3195 (init_named_socket, gdb_agent_helper_thread): Use union
3196 gdb_sockaddr_u.
3197
aac331e4
PA
31982015-03-07 Pedro Alves <palves@redhat.com>
3199
3200 * configure.ac (build_warnings): Move
3201 -Wdeclaration-after-statement to the C-specific set.
3202 * configure: Regenerate.
3203
366c75fc
PA
32042015-03-07 Pedro Alves <palves@redhat.com>
3205
3206 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3207 or <winsock2.h> here. Instead include "gdb_socket.h".
3208 (remote_open): Use union gdb_sockaddr_u.
3209 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3210 or <winsock2.h> here. Instead include "gdb_socket.h".
3211 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3212 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3213 or <sys/un.h>.
3214 (init_named_socket, gdb_agent_helper_thread): Use union
3215 gdb_sockaddr_u.
3216
492d29ea
PA
32172015-03-07 Pedro Alves <palves@redhat.com>
3218
3219 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3220 instead.
3221
60a191ed
YQ
32222015-03-06 Yao Qi <yao.qi@linaro.org>
3223
3224 * linux-aarch64-low.c (aarch64_insert_point): Use
3225 show_debug_regs as a boolean.
3226 (aarch64_remove_point): Likewise.
3227
f5771b1d
PA
32282015-03-05 Pedro Alves <palves@redhat.com>
3229
3230 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3231 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3232 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3233 * nto-low.c (nto_target_ops): Likewise.
3234 * spu-low.c (spu_target_ops): Likewise.
3235 * win32-low.c (win32_target_ops): Likewise.
3236
3e572f71
PA
32372015-03-04 Pedro Alves <palves@redhat.com>
3238
72f4393d 3239 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3240 Decide whether a breakpoint triggered based on the SIGTRAP's
3241 siginfo.si_code.
72f4393d
L
3242 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3243 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3244 (linux_low_filter_event): Check for breakpoints before checking
3245 watchpoints.
3246 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3247 siginfo.si_code.
72f4393d
L
3248 (linux_stopped_by_sw_breakpoint)
3249 (linux_supports_stopped_by_sw_breakpoint)
3250 (linux_stopped_by_hw_breakpoint)
3251 (linux_supports_stopped_by_hw_breakpoint): New functions.
3252 (linux_target_ops): Install new target methods.
3e572f71 3253
1ec68e26
PA
32542015-03-04 Pedro Alves <palves@redhat.com>
3255
3256 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3257 * server.c (swbreak_feature, hwbreak_feature): New globals.
3258 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3259 (captured_main): Clear swbreak_feature and hwbreak_feature.
3260 * server.h (swbreak_feature, hwbreak_feature): Declare.
3261 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3262 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3263 supports_stopped_by_hw_breakpoint>: New fields.
3264 (target_supports_stopped_by_sw_breakpoint)
3265 (target_stopped_by_sw_breakpoint)
3266 (target_supports_stopped_by_hw_breakpoint)
3267 (target_stopped_by_hw_breakpoint): Declare.
3268
15c66dd6
PA
32692015-03-04 Pedro Alves <palves@redhat.com>
3270
3271 enum lwp_stop_reason -> enum target_stop_reason
3272 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3273 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3274 (linux_wait_1, stuck_in_jump_pad_callback)
3275 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3276 (linux_stopped_by_watchpoint):
3277 * linux-low.h (enum lwp_stop_reason): Delete.
3278 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3279 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3280
98fc70d6
YQ
32812015-03-04 Yao Qi <yao.qi@linaro.org>
3282
3283 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3284
dd2ac174
GB
32852015-03-03 Gary Benson <gbenson@redhat.com>
3286
3287 * hostio.c (handle_vFile): Fix prefix lengths.
3288
d68e53f4
MM
32892015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3290
3291 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3292 ptr_bits.
3293
bf2d68ab
AA
32942015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3295
3296 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3297 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3298 (clean): Add "rm -f" for above C files.
3299 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3300 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3301 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3302 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3303 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3304 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3305 (init_registers_s390x_vx_linux64)
3306 (init_registers_s390x_tevx_linux64)
3307 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3308 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3309 declarations.
3310 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3311 (s390_store_vxrs_high): New functions.
3312 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3313 NT_S390_VXRS_HIGH.
3314 (s390_arch_setup): Add logic for selecting one of the new target
3315 descriptions. Activate the new vector regsets if applicable.
3316 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3317 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3318 and init_registers_s390x_tevx_linux64.
3319
c966a859
PA
33202015-03-01 Pedro Alves <palves@redhat.com>
3321
3322 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3323 parameter.
3324
4180215b
PA
33252015-02-27 Pedro Alves <palves@redhat.com>
3326
3327 * linux-x86-low.c (u_debugreg_offset): New function.
3328 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3329
749bab01
PA
33302015-02-27 Pedro Alves <palves@redhat.com>
3331
3332 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3333 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3334 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3335 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3336 (ps_lsetfpregs, ps_getpid)
3337 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3338 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3339 (ps_lsetxregs, ps_plog): Declare.
3340
3c14e5a3
PA
33412015-02-27 Pedro Alves <palves@redhat.com>
3342
3343 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3344 IP_AGENT_EXPORT_FUNC.
3345 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3346 IP_AGENT_EXPORT_FUNC.
3347 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3348 (IP_AGENT_EXPORT): Delete.
3349 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3350 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3351 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3352 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3353 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3354 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3355 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3356 (traceframe_read_count, traceframe_write_count)
3357 (traceframes_created, trace_state_variables, get_raw_reg)
3358 (get_trace_state_variable_value, set_trace_state_variable_value)
3359 (ust_loaded, helper_thread_id, cmd_buf): Use
3360 IPA_SYM_EXPORTED_NAME.
3361 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3362 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3363 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3364 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3365 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3366 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3367 EXTERN_C_PUSH/EXTERN_C_POP.
3368 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3369 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3370 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3371 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3372 (traceframe_write_count, traceframe_read_count)
3373 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3374 (about_to_request_buffer_space, get_trace_state_variable_value)
3375 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3376 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3377 EXTERN_C_PUSH/EXTERN_C_POP.
3378 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3379 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3380 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3381 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3382 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3383 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3384 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3385 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3386 Define.
3387 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3388 (IP_AGENT_EXPORT_VAR_DECL): Define.
3389 (tracing): Declare.
3390 (gdb_agent_get_raw_reg): Declare.
3391
fe978cb0
PA
33922015-02-27 Tom Tromey <tromey@redhat.com>
3393 Pedro Alves <palves@redhat.com>
3394
3395 Rename symbols whose names are reserved C++ keywords throughout.
3396
3bc3d82a
PA
33972015-02-27 Pedro Alves <palves@redhat.com>
3398
3399 * Makefile.in (COMPILER): New, get it from autoconf.
3400 (CXX): Get from autoconf instead.
3401 (COMPILE.pre): Use COMPILER.
3402 (CC-LD): Rename to ...
3403 (CC_LD): ... this. Use COMPILER.
3404 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3405 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3406 * acinclude.m4: Include build-with-cxx.m4.
3407 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3408 Disable -Werror by default if building in C++ mode.
3409 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3410 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3411 the C++ compiler. Save/restore CXXFLAGS too.
3412 * configure: Regenerate.
3413
07697489
PA
34142015-02-27 Pedro Alves <palves@redhat.com>
3415
3416 * acinclude.m4: Include libiberty.m4.
3417 * configure.ac: Call libiberty_INIT.
3418 * config.in, configure: Regenerate.
3419
9beb7c4e
PA
34202015-02-26 Pedro Alves <palves@redhat.com>
3421
3422 * linux-low.c (linux_wait_1): When incrementing the PC past a
3423 program breakpoint always use the_low_target.breakpoint_len as
3424 increment, rather than the maximum between that and
3425 the_low_target.decr_pc_after_break.
3426
8090aef2
PA
34272015-02-23 Pedro Alves <palves@redhat.com>
3428
3429 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3430 thread was doing a step-over; always adjust the PC if
3431 we stepped over a permanent breakpoint.
3432 (linux_wait_1): If we stepped over breakpoint that was on top of a
3433 permanent breakpoint, manually advance the PC past it.
3434
bc9540e8
PA
34352015-02-23 Pedro Alves <palves@redhat.com>
3436
3437 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3438 modes.
3439 (x86_fill_gregset, x86_store_gregset): Use it when handling
3440 $orig_eax.
3441
2db9a427
PA
34422015-02-20 Pedro Alves <palves@redhat.com>
3443
3444 * thread-db.c: Include "nat/linux-procfs.h".
3445 (thread_db_init): Skip listing new threads if the kernel supports
3446 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3447
afa8d396
PA
34482015-02-20 Pedro Alves <palves@redhat.com>
3449
3450 * linux-low.c (status_pending_p_callback): Use ptid_match.
3451
c9587f88
AT
34522015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3453
3454 PR breakpoints/16812
3455 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3456 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3457 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3458
b05ec7a5
AT
34592015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3460
3461 PR breakpoints/15956
3462 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3463
d33501a5
MM
34642015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3465
3466 * linux-low.c (linux_low_btrace_conf): Print size.
3467 * server.c (handle_btrace_conf_general_set): New.
3468 (hanle_general_set): Call handle_btrace_conf_general_set.
3469 (handle_query): Report Qbtrace-conf:bts:size as supported.
3470
f4abbc16
MM
34712015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3472
3473 * linux-low.c (linux_low_enable_btrace): Update parameters.
3474 (linux_low_btrace_conf): New.
3475 (linux_target_ops)<to_btrace_conf>: Initialize.
3476 * server.c (current_btrace_conf): New.
3477 (handle_btrace_enable): Rename to ...
3478 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3479 to target_enable_btrace. Update comment. Update users.
3480 (handle_qxfer_btrace_conf): New.
3481 (qxfer_packets): Add btrace-conf entry.
3482 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3483 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3484 (target_ops)<read_btrace_conf>: New.
3485 (target_enable_btrace): Update parameters.
3486 (target_read_btrace_conf): New.
3487
043c3577
MM
34882015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3489
3490 * server.c (handle_btrace_general_set): Remove call to
3491 target_supports_btrace.
3492 (supported_btrace_packets): New.
3493 (handle_query): Call supported_btrace_packets.
3494 * target.h: include btrace-common.h.
3495 (btrace_target_info): Removed.
3496 (supports_btrace, target_supports_btrace): Update parameters.
3497
734b0e4b
MM
34982015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3499
3500 * Makefile.in (SFILES): Add common/btrace-common.c.
3501 (OBS): Add common/btrace-common.o.
3502 (btrace-common.o): Add build rules.
3503 * linux-low: Include btrace-common.h.
3504 (linux_low_read_btrace): Use struct btrace_data. Call
3505 btrace_data_init and btrace_data_fini.
3506
d6c146e9
PA
35072015-02-06 Pedro Alves <palves@redhat.com>
3508
3509 * thread-db.c (find_new_threads_callback): Add debug output.
3510
20ba1ce6
PA
35112015-02-04 Pedro Alves <palves@redhat.com>
3512
3513 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3514 (resume_stopped_resumed_lwps): New function.
3515 (linux_wait_for_event_filtered): Use it.
3516
8cc73a39
SDJ
35172015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3518
3519 * Makefile.in (SFILES): Add linux-personality.c.
3520 (linux-personality.o): New rule.
3521 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3522 list of objects to be built.
3523 * linux-low.c: Include nat/linux-personality.h.
3524 (linux_create_inferior): Remove code to disable address space
3525 randomization (moved to ../nat/linux-personality.c). Create
3526 cleanup to disable address space randomization.
3527
fb23d554
SDJ
35282015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3529
3530 * Makefile.in (posix-strerror.o): New rule.
3531 (mingw-strerror.o): Likewise.
3532 * configure: Regenerated.
3533 * configure.ac: Source file ../common/common.host. Initialize new
3534 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3535
cdf43629
YQ
35362015-01-14 Yao Qi <yao@codesourcery.com>
3537
3538 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3539 (ppc-linux.o): New rule.
3540 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3541 * configure.ac: AC_CHECK_FUNCS(getauxval).
3542 * config.in: Re-generated.
3543 * configure: Re-generated.
3544 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3545 ppc64_64bit_inferior_p
3546
514c5338
YQ
35472015-01-14 Yao Qi <yao@codesourcery.com>
3548
3549 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3550 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3551 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3552 (PT_ORIG_R3, PT_TRAP): Likewise.
3553 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3554 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3555 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3556
3368c1e5
JB
35572015-01-10 Joel Brobecker <brobecker@adacore.com>
3558
3559 * i387-fp.c (i387_cache_to_xsave): In look over
3560 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3561 zmmh_low_space field by use of zmmh_high_space.
3562
582511be
PA
35632015-01-09 Pedro Alves <palves@redhat.com>
3564
3565 * linux-low.c (step_over_bkpt): Move higher up in the file.
3566 (handle_extended_wait): Don't store the stop_pc here.
3567 (get_stop_pc): Adjust comments and rename to ...
3568 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3569 stopped for a software breakpoint or hardware breakpoint.
3570 (thread_still_has_status_pending_p): New function.
3571 (status_pending_p_callback): Use
3572 thread_still_has_status_pending_p. If the event is no longer
3573 interesting, resume the LWP.
3574 (handle_tracepoints): Add assert.
3575 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3576 (wstatus_maybe_breakpoint): New function.
3577 (cancel_breakpoint): Delete function.
3578 (check_stopped_by_watchpoint): New function, factored out from
3579 linux_low_filter_event.
3580 (lp_status_maybe_breakpoint): Delete function.
3581 (linux_low_filter_event): Remove filter_ptid argument.
3582 Leave thread group exits pending here. Store the LWP's stop PC.
3583 Always leave events pending.
3584 (linux_wait_for_event_filtered): Pull all events out of the
3585 kernel, and leave them all pending.
3586 (count_events_callback, select_event_lwp_callback): Consider all
3587 events.
3588 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3589 (select_event_lwp): Only give preference to the stepping LWP in
3590 all-stop mode. Adjust comments.
3591 (ignore_event): New function.
3592 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3593 references to cancel_breakpoints. Adjust to renames. Also give
3594 equal priority to all LWPs that have had events in non-stop mode.
3595 If reporting a software breakpoint event, unadjust the LWP's PC.
3596 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3597 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3598 Adjust.
3599 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3600 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3601 (linux_stopped_by_watchpoint): Adjust.
3602 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3603 * linux-low.h (enum lwp_stop_reason): New.
3604 (struct lwp_info) <stop_pc>: Adjust comment.
3605 <stopped_by_watchpoint>: Delete field.
3606 <stop_reason>: New field.
3607 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3608 * mem-break.c (software_breakpoint_inserted_here)
3609 (hardware_breakpoint_inserted_here): New function.
3610 * mem-break.h (software_breakpoint_inserted_here)
3611 (hardware_breakpoint_inserted_here): Declare.
3612 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3613 (cancel_breakpoints): Delete.
3614 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3615 (upload_fast_traceframes): Remove references to
3616 cancel_breakpoints.
3617
a33e3959
PA
36182015-01-09 Pedro Alves <palves@redhat.com>
3619
3620 * thread-db.c (find_new_threads_callback): Ignore thread if the
3621 kernel thread ID is -1.
3622
8784d563
PA
36232015-01-09 Pedro Alves <palves@redhat.com>
3624
3625 * linux-low.c (linux_attach_fail_reason_string): Move to
3626 nat/linux-ptrace.c, and rename.
3627 (linux_attach_lwp): Update comment.
3628 (attach_proc_task_lwp_callback): New function.
3629 (linux_attach): Adjust to rename and use
3630 linux_proc_attach_tgid_threads.
3631 (linux_attach_fail_reason_string): Delete declaration.
3632
76f2b779
JB
36332015-01-01 Joel Brobecker <brobecker@adacore.com>
3634
3635 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3636 * server.c (gdbserver_version): Likewise.
3637
fafcc06a
SDJ
36382014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3639
3640 * remote-utils.c: Include ctype.h.
3641 (input_interrupt): Explicitly handle the case when the char
3642 received is the NUL byte. Improve the printing of non-ASCII
3643 characters.
3644
beed38b8
JB
36452014-12-16 Joel Brobecker <brobecker@adacore.com>
3646
3647 * linux-low.c (linux_low_filter_event): Update call to
3648 linux_enable_event_reporting following the addition of
3649 a new parameter to that function.
3650
bf330350
CU
36512014-12-16 Catalin Udma <catalin.udma@freescale.com>
3652
3653 PR server/17457
3654 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3655 (AARCH64_FPCR_REGNO): Likewise.
3656 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3657 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3658 (aarch64_store_fpregset): Likewise.
3659
5227d625
JB
36602014-12-15 Joel Brobecker <brobecker@adacore.com>
3661
3662 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3663 Remove FIXME comment about assumption about N.
3664
f93b65a0
JB
36652014-12-13 Joel Brobecker <brobecker@adacore.com>
3666
3667 * configure.ac: If large-file support is disabled in GDBserver,
3668 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3669 * configure: Regenerate.
3670
e5a9158d
AA
36712014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3672
3673 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3674 warning upon ENODATA from ptrace.
3675 * linux-s390-low.c (s390_store_tdb): New.
3676 (s390_regsets): Add regset for NT_S390_TDB.
3677
feea5f36
AA
36782014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3679
3680 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3681 without a fill_function.
3682 * linux-s390-low.c (s390_fill_last_break): Remove.
3683 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3684 (s390_arch_setup): Use regset's size instead of fill_function for
3685 loop end condition.
3686
098dbe61
AA
36872014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3688
3689 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3690 the regset's store function when ptrace returned an error.
3691 * regcache.c (get_thread_regcache): Invalidate register cache
3692 before fetching inferior's registers.
3693
28eef672
AA
36942014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3695
3696 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3697 while-loop as for-loop.
3698 (regsets_store_inferior_registers): Likewise.
3699
bdca27a2
YQ
37002014-11-28 Yao Qi <yao@codesourcery.com>
3701
3702 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3703 * config.in, configure: Re-generate.
3704 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3705 is defined.
3706
9c232dda
YQ
37072014-11-21 Yao Qi <yao@codesourcery.com>
3708
3709 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3710 (AC_CHECK_HEADERS): Remove malloc.h.
3711 * configure: Re-generated.
3712 * config.in: Re-generated.
3713 * server.h: Don't include alloca.h and malloc.h.
3714 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3715 Don't include malloc.h.
3716
43968415
JB
37172014-11-17 Joel Brobecker <brobecker@adacore.com>
3718
3719 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3720 corresponding ERRNO check in same block.
3721
40e91bc7
PA
37222014-11-12 Pedro Alves <palves@redhat.com>
3723
3724 * server.c (cont_thread): Update comment.
3725 (start_inferior, attach_inferior): No longer clear cont_thread.
3726 (handle_v_cont): No longer set cont_thread.
3727 (captured_main): Clear cont_thread each time a GDB connects.
3728
c2c118cf
PA
37292014-11-12 Pedro Alves <palves@redhat.com>
3730
3731 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3732 thread, and don't resume all threads if the Hc thread has exited.
3733
78708b7c
PA
37342014-11-12 Pedro Alves <palves@redhat.com>
3735
3736 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3737 the process group instead of to a specific LWP.
3738
a2abc7de
PA
37392014-10-15 Pedro Alves <palves@redhat.com>
3740
3741 PR server/17487
3742 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3743 parameter.
3744 (arm_set_thread_context): Delete.
3745 (the_low_target): Adjust.
3746 * win32-i386-low.c (debug_registers_changed)
3747 (debug_registers_used): Delete.
3748 (update_debug_registers_callback): New function.
3749 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3750 needing to update their debug registers.
3751 (win32_get_current_dr): New function.
3752 (x86_dr_low_get_addr, x86_dr_low_get_control)
3753 (x86_dr_low_get_status): Fetch the debug register from the thread
3754 record's context.
3755 (i386_initial_stuff): Adjust.
3756 (i386_get_thread_context): Remove current_event parameter. Don't
3757 clear debug_registers_changed nor copy DR values to
3758 debug_reg_state.
3759 (i386_set_thread_context): Delete.
3760 (i386_prepare_to_resume): New function.
3761 (i386_thread_added): Mark the thread as needing to update irs
3762 debug registers.
3763 (the_low_target): Remove i386_set_thread_context and install
3764 i386_prepare_to_resume.
3765 * win32-low.c (win32_get_thread_context): Adjust.
3766 (win32_set_thread_context): Use SetThreadContext
3767 directly.
3768 (win32_prepare_to_resume): New function.
3769 (win32_require_context): New function, factored out from ...
3770 (thread_rec): ... this.
3771 (continue_one_thread): Call win32_prepare_to_resume on each thread
3772 we're about to continue.
3773 (win32_resume): Call win32_prepare_to_resume on the event thread.
3774 * win32-low.h (struct win32_thread_info)
3775 <debug_registers_changed>: New field.
3776 (struct win32_target_ops): Change prototype of set_thread_context,
3777 delete set_thread_context and add prepare_to_resume.
3778 (win32_require_context): New declaration.
3779
a442d071
GB
37802014-10-08 Gary Benson <gbenson@redhat.com>
3781
3782 * server.h: Do not include common-exceptions.h.
3783
6f1947e8
GB
37842014-10-08 Gary Benson <gbenson@redhat.com>
3785
3786 * server.h: Do not include cleanups.h.
3787
63b434a4
JH
37882014-09-30 James Hogan <james.hogan@imgtec.com>
3789
3790 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3791 mips64-dsp-linux.c.
3792
c4d9ceb6
YQ
37932014-09-23 Yao Qi <yao@codesourcery.com>
3794
3795 * linux-low.c (lp_status_maybe_breakpoint): New function.
3796 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3797 (count_events_callback): Likewise.
3798 (select_event_lwp_callback): Likewise.
3799 (cancel_breakpoints_callback): Likewise.
3800
89a5711c
DB
38012014-09-19 Don Breazeal <donb@codesourcery.com>
3802
3803 * linux-low.c (handle_extended_wait): Call
3804 linux_ptrace_get_extended_event.
3805 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3806 linux_is_extended_waitstatus.
3807
bffc0964
JB
38082014-09-16 Joel Brobecker <brobecker@adacore.com>
3809
3810 * Makefile.in (CPPFLAGS): Define.
3811 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3812 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3813
0bfdf32f
GB
38142014-09-16 Gary Benson <gbenson@redhat.com>
3815
3816 * inferiors.h (current_inferior): Renamed as...
3817 (current_thread): New variable. All uses updated.
3818 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3819 (maybe_move_out_of_jump_pad): Likewise.
3820 (cancel_breakpoint): Likewise.
3821 (linux_low_filter_event): Likewise.
3822 (wait_for_sigstop): Likewise.
3823 (linux_resume_one_lwp): Likewise.
3824 (need_step_over_p): Likewise.
3825 (start_step_over): Likewise.
3826 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3827 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3828 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3829 and save_inferior as saved_thread.
3830 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3831 saved_thread.
3832 (regcache_invalidate_thread): Likewise.
3833 * remote-utils.c (prepare_resume_reply): Likewise.
3834 * thread-db.c (thread_db_get_tls_address): Likewise.
3835 (disable_thread_event_reporting): Likewise.
3836 (remove_thread_event_breakpoints): Likewise.
3837 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3838 as saved_thread.
3839 * target.h (set_desired_inferior): Renamed as...
3840 (set_desired_thread): New declaration. All uses updated.
3841 * server.c (myresume): Updated comment to reference thread instead
3842 of inferior.
3843 (handle_serial_event): Likewise.
3844 (handle_target_event): Likewise.
3845
361c8ade
GB
38462014-09-12 Tom Tromey <tromey@redhat.com>
3847 Gary Benson <gbenson@redhat.com>
3848
3849 * regcache.h: Include common-regcache.h.
3850 (regcache_read_pc): Don't declare.
3851 * regcache.c (get_thread_regcache_for_ptid): New function.
3852
bd9269f7
GB
38532014-09-11 Tom Tromey <tromey@redhat.com>
3854 Gary Benson <gbenson@redhat.com>
3855
3856 * symbol.c: New file.
3857 * Makefile.in (SFILES): Add symbol.c.
3858 (OBS): Add symbol.o.
3859
f8c1d06b
GB
38602014-09-11 Gary Benson <gbenson@redhat.com>
3861
3862 * target.c (target_stop_ptid, target_continue_ptid): New
3863 functions.
3864
721ec300
GB
38652014-09-11 Tom Tromey <tromey@redhat.com>
3866 Gary Benson <gbenson@redhat.com>
3867
3868 * target.h: Include target/target.h.
3869 * target.c (target_read_memory, target_read_uint32)
3870 (target_write_memory): New functions.
3871
c5e92cca
GB
38722014-09-11 Gary Benson <gbenson@redhat.com>
3873
3874 * server.h (debug_hw_points): Don't declare.
3875 * server.c (debug_hw_points): Don't define. Replace all uses
3876 with show_debug_regs.
3877 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3878 all uses with show_debug_regs.
3879
2e4bb98a
EBM
38802014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3881
3882 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3883 endianness into account.
3884 (ppc_supply_ptrace_register): Likewise.
3885
ac740bc7
JH
38862014-09-03 James Hogan <james.hogan@imgtec.com>
3887
3888 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3889 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3890
97ea6506
GB
38912014-09-03 Gary Benson <gbenson@redhat.com>
3892
3893 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3894 ALL_DEBUG_ADDRESS_REGISTERS.
3895
df7e5265
GB
38962014-09-02 Gary Benson <gbenson@redhat.com>
3897
3898 * i386-low.h: Renamed as...
3899 * x86-low.h: New file. All type, function and variable name
3900 prefixes changed from "i386_" to "x86_". All references updated.
3901 * i386-low.c: Renamed as...
3902 * x86-low.c: New file. All type, function and variable name
3903 prefixes changed from "i386_" to "x86_". All references updated.
3904
ed859da7
GB
39052014-09-02 Gary Benson <gbenson@redhat.com>
3906
3907 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3908 (x86_linux_new_thread): Likewise.
3909
860789c7
GB
39102014-08-29 Gary Benson <gbenson@redhat.com>
3911
3912 * server.h (setjmp.h): Do not include.
3913 (toplevel): Do not declare.
3914 (common-exceptions.h): Include.
3915 (cleanups.h): Likewise.
3916 * server.c (toplevel): Do not define.
3917 (exit_code): New static global.
3918 (detach_or_kill_for_exit_cleanup): New function.
3919 (main): New function. Original main renamed to...
3920 (captured_main): New function.
3921 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3922
ff55e1b5
GB
39232014-08-29 Gary Benson <gbenson@redhat.com>
3924
3925 * Makefile.in (SFILES): Add common/common-exceptions.c.
3926 (OBS): Add common-exceptions.o.
3927 (common-exceptions.o): New rule.
3928 * utils.c (prepare_to_throw_exception): New function.
3929
e9bcb658
GB
39302014-08-29 Gary Benson <gbenson@redhat.com>
3931
3932 * config.in: Regenerate.
3933 * configure: Likewise.
3934
e3180625
GB
39352014-08-29 Gary Benson <gbenson@redhat.com>
3936
3937 * Makefile.in (SFILES): Add common/cleanups.c.
3938 (OBS): cleanups.o.
3939 (cleanups.o): New rule.
3940
e3d6ba5d
GB
39412014-08-29 Gary Benson <gbenson@redhat.com>
3942
3943 * utils.c (internal_vwarning): New function.
3944
7096e886
GB
39452014-08-28 Gary Benson <gbenson@redhat.com>
3946
3947 * utils.h (fatal): Remove declaration.
3948 * utils.c (fatal): Remove function.
3949
14ce3192
GB
39502014-08-28 Gary Benson <gbenson@redhat.com>
3951
3952 * tracepoint.c (gdb_agent_init): Replace fatal with
3953 perror_with_name.
3954 (initialize_tracepoint): Likewise.
3955
50278d59
GB
39562014-08-28 Gary Benson <gbenson@redhat.com>
3957
3958 * remote-utils.c (remote_prepare): Replace fatal with error.
3959
aa96c426
GB
39602014-08-28 Gary Benson <gbenson@redhat.com>
3961
3962 * linux-low.c (linux_async): Replace fatal with warning.
3963 Tidy up and return.
3964 (linux_start_non_stop): Return -1 if linux_async failed.
3965
f7160e97
GB
39662014-08-28 Gary Benson <gbenson@redhat.com>
3967
3968 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3969 gdb_assert.
3970 (i386_dr_low_get_addr): Remove vague comment.
3971 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3972 gdb_assert.
3973
38e08fca
GB
39742014-08-28 Gary Benson <gbenson@redhat.com>
3975
3976 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3977 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3978 internal_error.
3979 (linux_resume_one_lwp): Likewise.
3980 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3981 gdb_assert.
3982 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3983 with internal_error.
3984 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3985 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3986 (find_register_by_name): Replace fatal with internal_error.
3987 (find_regno): Likewise.
3988 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3989 * thread-db.c (thread_db_create_event): Likewise.
3990 (thread_db_load_search): Likewise.
3991 (try_thread_db_load_1): Likewise.
3992 * tracepoint.c (get_jump_space_head): Replace fatal with
3993 internal_error.
3994 (claim_trampoline_space): Likewise.
3995 (have_fast_tracepoint_trampoline_buffer): Likewise.
3996 (cmd_qtstart): Likewise.
3997 (stop_tracing): Likewise.
3998 (fast_tracepoint_collecting): Likewise.
3999 (target_malloc): Likewise.
4000 (download_tracepoint): Likewise.
4001 (download_trace_state_variables): Replace check with gdb_assert.
4002 (upload_fast_traceframes): Replace fatal with internal_error.
4003
34abf635
GB
40042014-08-19 Tom Tromey <tromey@redhat.com>
4005 Gary Benson <gbenson@redhat.com>
4006
4007 * Makefile.in (SFILES): Add common/common-debug.c.
4008 (OBS): Add common-debug.o.
4009 (common-debug.o): New rule.
4010 * debug.h (debug_printf): Don't declare.
4011 * debug.c (debug_printf): Renamed and rewritten as...
4012 (debug_vprintf): New function.
4013
f6e94d78
GB
40142014-08-19 Gary Benson <gbenson@redhat.com>
4015
4016 * utils.h: Do not include print-utils.h.
4017
9239eeab
GB
40182014-08-19 Tom Tromey <tromey@redhat.com>
4019 Gary Benson <gbenson@redhat.com>
4020
4021 * server.h: Add static assertion.
4022 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4023
ef87c8bb
GB
40242014-08-19 Tom Tromey <tromey@redhat.com>
4025 Gary Benson <gbenson@redhat.com>
4026
4027 * Makefile.in (SFILES): Add common/errors.c.
4028 (OBS): Add errors.o.
4029 (IPA_OBS): Add errors-ipa.o.
4030 (errors.o): New rule.
4031 (errors-ipa.o): Likewise.
4032 * utils.h (perror_with_name, error, warning): Don't declare.
4033 * utils.c (warning): Renamed and rewritten as...
4034 (vwarning): New function.
4035 (error): Renamed and rewritten as...
4036 (verror): New function.
4037 (internal_error): Renamed and rewritten as...
4038 (internal_verror): New function.
4039
bb974a24
GB
40402014-08-07 Gary Benson <gbenson@redhat.com>
4041
4042 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4043 * configure: Regenerate.
4044 * config.in: Likewise.
4045 * server.h: Do not include errno.h.
4046 * event-loop.c: Likewise.
4047 * hostio-errno.c: Likewise.
4048 * linux-low.c: Likewise.
4049 * remote-utils.c: Likewise.
4050 * spu-low.c: Likewise.
4051 * utils.c: Likewise.
4052 * gdbreplay.c: Unconditionally include errno.h.
4053
6d3d12eb
GB
40542014-08-07 Gary Benson <gbenson@redhat.com>
4055
4056 * server.h: Do not include string.h.
4057 * event-loop.c: Likewise.
4058 * linux-low.c: Likewise.
4059 * regcache.c: Likewise.
4060 * remote-utils.c: Likewise.
4061 * spu-low.c: Likewise.
4062 * utils.c: Likewise.
4063
dccbb609
GB
40642014-08-07 Gary Benson <gbenson@redhat.com>
4065
4066 * server.h: Do not include gdb_assert.h.
4067
e76df0d0
GB
40682014-08-07 Gary Benson <gbenson@redhat.com>
4069
4070 * server.h: Do not include common-utils.h.
4071
4cb9c816
GB
40722014-08-07 Gary Benson <gbenson@redhat.com>
4073
4074 * server.h: Do not include ptid.h.
4075 * notif.h: Likewise.
4076
3995eeee
GB
40772014-08-07 Gary Benson <gbenson@redhat.com>
4078
4079 * server.h: Do not include gdb_locale.h.
4080
cb9f1a9b
GB
40812014-08-07 Gary Benson <gbenson@redhat.com>
4082
4083 * server.h: Do not include gdb/signals.h.
4084 * win32-low.c: Likewise.
4085
a5fceff8
GB
40862014-08-07 Gary Benson <gbenson@redhat.com>
4087
4088 * server.h: Do not include pathmax.h.
4089
b9391142
GB
40902014-08-07 Gary Benson <gbenson@redhat.com>
4091
4092 * server.h: Do not include libiberty.h.
4093 * linux-bfin-low.c: Likewise.
4094
0e443c87
GB
40952014-08-07 Gary Benson <gbenson@redhat.com>
4096
4097 * server.h: Do not include ansidecl.h.
4098
8ebb3f56
GB
40992014-08-07 Gary Benson <gbenson@redhat.com>
4100
4101 * linux-x86-low.c: Do not include stddef.h.
4102 * lynx-ppc-low.c: Likewise.
4103 * tracepoint.c: Likewise.
4104
8980bdf6
GB
41052014-08-07 Gary Benson <gbenson@redhat.com>
4106
4107 * server.h: Do not include stdarg.h.
4108 * nto-low.c: Likewise.
4109
d7096f71
GB
41102014-08-07 Gary Benson <gbenson@redhat.com>
4111
4112 * server.h: Do not include stdlib.h.
4113 * inferiors.c: Likewise.
4114 * linux-low.c: Likewise.
4115 * regcache.c: Likewise.
4116 * spu-low.c: Likewise.
4117 * tracepoint.c: Likewise.
4118 * utils.c: Likewise.
4119
d02f550d
GB
41202014-08-07 Gary Benson <gbenson@redhat.com>
4121
4122 * server.h: Do not include stdio.h.
4123 * linux-low.c: Likewise.
4124 * remote-utils.c: Likewise.
4125 * spu-low.c: Likewise.
4126 * utils.c: Likewise.
4127 * wincecompat.c: Likewise.
4128
87f6c4e3
GB
41292014-08-06 Gary Benson <gbenson@redhat.com>
4130
4131 * regcache.c (init_register_cache): Move conditionals inside if.
4132
7089dca4
GB
41332014-08-06 Gary Benson <gbenson@redhat.com>
4134
4135 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4136
462f517e
GB
41372014-07-31 Gary Benson <gbenson@redhat.com>
4138
4139 * ax.h: Do not include server.h.
4140 * gdbthread.h: Likewise.
4141 * lynx-low.h: Likewise.
4142 * notif.h: Likewise.
4143
976411d6
GB
41442014-07-30 Gary Benson <gbenson@redhat.com>
4145
4146 * server.h: Include common-defs.h.
4147 Do not include config.h or build-gnulib-gdbserver/config.h.
4148
d41f6d8e
GB
41492014-07-30 Gary Benson <gbenson@redhat.com>
4150
4151 * hostio-errno.c: Move server.h to top of includes list.
4152 * inferiors.c: Likewise.
4153 * linux-x86-low.c: Likewise.
4154 * notif.c: Include server.h.
4155
314c6a35
TT
41562014-07-24 Tom Tromey <tromey@redhat.com>
4157 Gary Benson <gbenson@redhat.com>
4158
4159 * server.h (CORE_ADDR): Now unsigned.
4160
69ff6be5
PA
41612014-07-16 Pedro Alves <palves@redhat.com>
4162
4163 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4164
ce9e3fe7
PA
41652014-07-15 Pedro Alves <palves@redhat.com>
4166
4167 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4168 copy.
4169
e76126e8
PA
41702014-07-11 Pedro Alves <palves@redhat.com>
4171
4172 * linux-low.c (kill_wait_lwp): New function, based on
4173 kill_one_lwp_callback, but use my_waitpid directly.
4174 (kill_one_lwp_callback, linux_kill): Use it.
4175
8e9db26e
PA
41762014-06-23 Pedro Alves <palves@redhat.com>
4177
4178 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4179 before setting DR0..DR3.
4180
698b3e08
GB
41812014-06-20 Gary Benson <gbenson@redhat.com>
4182
4183 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4184 * configure: Regenerated.
4185 * config.in: Likewise.
4186
125f8a3d
GB
41872014-06-20 Gary Benson <gbenson@redhat.com>
4188
4189 * Makefile.in (SFILES): Update locations for files moved
4190 from common to nat.
4191 (object file files): Reordered.
4192
42995dbd
GB
41932014-06-20 Gary Benson <gbenson@redhat.com>
4194
4195 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4196 (i386_dr_low_set_addr): Likewise.
4197 (i386_dr_low_get_addr): Likewise.
4198 (i386_dr_low_can_set_control): Likewise.
4199 (i386_dr_low_set_control): Likewise.
4200 (i386_dr_low_get_control): Likewise.
4201 (i386_dr_low_get_status): Likewise.
4202 (i386_get_debug_register_length): Likewise.
4203 * linux-x86-low.c (i386_dr_low_set_addr):
4204 Changed signature. Made static.
4205 (i386_dr_low_get_addr): Likewise.
4206 (i386_dr_low_set_control): Likewise.
4207 (i386_dr_low_get_control): Likewise.
4208 (i386_dr_low_get_status): Likewise.
4209 (i386_dr_low): New global variable.
4210 * win32-i386-low.c (i386_dr_low_set_addr):
4211 Changed signature. Made static.
4212 (i386_dr_low_get_addr): Likewise.
4213 (i386_dr_low_set_control): Likewise.
4214 (i386_dr_low_get_control): Likewise.
4215 (i386_dr_low_get_status): Likewise.
4216 (i386_dr_low): New global variable.
4217
e1d2394b
MS
42182014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4219
4220 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4221 * Makefile.in (AR, AR_FLAGS): Define.
4222 * configure: Regenerate.
4223
3a8ee006
GB
42242014-06-19 Gary Benson <gbenson@redhat.com>
4225
4226 * Makefile.in (i386-dregs.o): New rule.
4227 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4228 * i386-low.c (target.h): Remove include.
4229 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4230 (DR_CONTROL_SHIFT): Likewise.
4231 (DR_CONTROL_SIZE): Likewise.
4232 (DR_RW_EXECUTE): Likewise.
4233 (DR_RW_WRITE): Likewise.
4234 (DR_RW_READ): Likewise.
4235 (DR_RW_IORW): Likewise.
4236 (DR_LEN_1): Likewise.
4237 (DR_LEN_2): Likewise.
4238 (DR_LEN_4): Likewise.
4239 (DR_LEN_8): Likewise.
4240 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4241 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4242 (DR_ENABLE_SIZE): Likewise.
4243 (DR_LOCAL_SLOWDOWN): Likewise.
4244 (DR_GLOBAL_SLOWDOWN): Likewise.
4245 (DR_CONTROL_RESERVED): Likewise.
4246 (I386_DR_CONTROL_MASK): Likewise.
4247 (I386_DR_VACANT): Likewise.
4248 (I386_DR_LOCAL_ENABLE): Likewise.
4249 (I386_DR_GLOBAL_ENABLE): Likewise.
4250 (I386_DR_DISABLE): Likewise.
4251 (I386_DR_SET_RW_LEN): Likewise.
4252 (I386_DR_GET_RW_LEN): Likewise.
4253 (I386_DR_WATCH_HIT): Likewise.
4254 (i386_wp_op_t): Likewise.
4255 (i386_show_dr): Likewise.
4256 (i386_length_and_rw_bits): Likewise.
4257 (i386_insert_aligned_watchpoint): Likewise.
4258 (i386_remove_aligned_watchpoint): Likewise.
4259 (i386_handle_nonaligned_watchpoint): Likewise.
4260 i386_update_inferior_debug_regs(): Likewise.
4261 (i386_dr_insert_watchpoint): Likewise.
4262 (i386_dr_remove_watchpoint): Likewise.
4263 (i386_dr_region_ok_for_watchpoint): Likewise.
4264 (i386_dr_stopped_data_address): Likewise.
4265 (i386_dr_stopped_by_watchpoint): Likewise.
4266
8f26655c
GB
42672014-06-19 Gary Benson <gbenson@redhat.com>
4268
4269 * i386-low.c (i386_dr_show): Renamed to
4270 i386_show_dr and made static. All uses updated.
4271 (i386_dr_length_and_rw_bits): Renamed to
4272 i386_length_and_rw_bits and made static.
4273 All uses updated.
4274 (i386_dr_insert_aligned_watchpoint): Renamed to
4275 i386_insert_aligned_watchpoint and made static.
4276 All uses updated.
4277 (i386_dr_remove_aligned_watchpoint): Renamed to
4278 i386_remove_aligned_watchpoint and made static.
4279 All uses updated.
4280 (i386_dr_update_inferior_debug_regs): Renamed to
4281 i386_update_inferior_debug_regs and made static.
4282 All uses updated.
4283
b9228891
GB
42842014-06-18 Gary Benson <gbenson@redhat.com>
4285
5171def3
GB
4286 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4287 (i386_dr_low_can_set_control): Likewise.
4288 (i386_get_debug_register_length): Likewise.
4289 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4290 (i386_dr_low_can_set_control): Likewise.
4291 (i386_get_debug_register_length): Likewise.
4292
42932014-06-17 Gary Benson <gbenson@redhat.com>
4294
b9228891
GB
4295 * i386-low.h (i386-dregs.h): New include.
4296 (DR_FIRSTADDR): Now in i386-dregs.h.
4297 (DR_LASTADDR): Likewise.
4298 (DR_NADDR): Likewise.
4299 (DR_STATUS): Likewise.
4300 (DR_CONTROL): Likewise.
4301 (i386_debug_reg_state): Likewise.
4302 (i386_dr_insert_watchpoint): Likewise.
4303 (i386_dr_remove_watchpoint): Likewise.
4304 (i386_dr_region_ok_for_watchpoint): Likewise.
4305 (i386_dr_stopped_data_address): Likewise.
4306 (i386_dr_stopped_by_watchpoint): Likewise.
4307 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4308
4be83cc2
GB
43092014-06-18 Gary Benson <gbenson@redhat.com>
4310
4311 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4312 i386_dr_insert_watchpoint.
4313 (i386_low_remove_watchpoint): Renamed to
4314 i386_dr_remove_watchpoint.
4315 (i386_low_region_ok_for_watchpoint): Renamed to
4316 i386_dr_region_ok_for_watchpoint.
4317 (i386_low_stopped_data_address): Renamed to
4318 i386_dr_stopped_data_address.
4319 (i386_low_stopped_by_watchpoint): Renamed to
4320 i386_dr_stopped_by_watchpoint.
4321 * i386-low.c (i386_show_dr): Renamed to
4322 i386_dr_show and made nonstatic. All uses updated.
4323 (i386_length_and_rw_bits): Renamed to
4324 i386_dr_length_and_rw_bits and made nonstatic.
4325 All uses updated.
4326 (i386_insert_aligned_watchpoint): Renamed to
4327 i386_dr_insert_aligned_watchpoint and made nonstatic.
4328 All uses updated.
4329 (i386_remove_aligned_watchpoint): Renamed to
4330 i386_dr_remove_aligned_watchpoint and made nonstatic.
4331 All uses updated.
4332 (i386_update_inferior_debug_regs): Renamed to
4333 i386_dr_update_inferior_debug_regs and made nonstatic.
4334 All uses updated.
4335 (i386_low_insert_watchpoint): Renamed to
4336 i386_dr_insert_watchpoint. All uses updated.
4337 (i386_low_remove_watchpoint): Renamed to
4338 i386_dr_remove_watchpoint. All uses updated.
4339 (i386_low_region_ok_for_watchpoint): Renamed to
4340 i386_dr_region_ok_for_watchpoint. All uses updated.
4341 (i386_low_stopped_data_address): Renamed to
4342 i386_dr_stopped_data_address. All uses updated.
4343 (i386_low_stopped_by_watchpoint): Renamed to
4344 i386_dr_stopped_by_watchpoint. All uses updated.
4345
131aa0d4
GB
43462014-06-18 Gary Benson <gbenson@redhat.com>
4347
4348 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4349 (i386_dr_low_can_set_control): Likewise.
4350 (i386_insert_aligned_watchpoint): New check.
4351
d9305f7f
GB
43522014-06-18 Gary Benson <gbenson@redhat.com>
4353
4354 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4355 Renamed to state.
4356
e927c9fc
GB
43572014-06-18 Gary Benson <gbenson@redhat.com>
4358
4359 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4360 instead of fatal and error.
4361 (i386_handle_nonaligned_watchpoint): Likewise.
4362
1b6d4134
GB
43632014-06-18 Gary Benson <gbenson@redhat.com>
4364
4365 * i386-low.c (i386_get_debug_register_length): New macro.
4366 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4367 (i386_show_dr): Use debug_printf instead of fprintf. Use
4368 phex to format values.
4369
6e62758f
GB
43702014-06-18 Gary Benson <gbenson@redhat.com>
4371
4372 * i386-low.h: Comment changes.
4373 * i386-low.c: Likewise.
4374
fc6e2f03
GB
43752014-06-18 Gary Benson <gbenson@redhat.com>
4376
4377 * i386-low.c: Whitespace changes.
4378
f9d1eeed
TT
43792014-06-12 Tom Tromey <tromey@redhat.com>
4380
4381 * utils.c (freeargv): Remove.
4382
0b04e523
TT
43832014-06-12 Tom Tromey <tromey@redhat.com>
4384
4385 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4386 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4387 (parse_debug_format_options): Likewise.
4388 (gdbserver_usage): Likewise.
4389 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4390 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4391 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4392 against libiberty.
4393 ($(LIBGNU)): Depend on libiberty.
4394 (all-lib): Recurse into all subdirs.
4395 (install-only): Invoke "install" target in subdirs.
4396 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4397 targets.
4398 * configure: Rebuild.
4399 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4400 for vasprintf, vsnprintf, or gettimeofday.
4401 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4402 srv_tgtobj.
4403
270c9937
JB
44042014-06-05 Joel Brobecker <brobecker@adacore.com>
4405
4406 * development.sh: Delete.
4407 * Makefile.in (config.status): Adjust dependency on development.sh.
4408 * configure.ac: Adjust development.sh source call.
4409 * configure: Regenerate.
4410
0a261ed8
PA
44112014-06-02 Pedro Alves <palves@redhat.com>
4412
4413 * ax.c (gdb_free_agent_expr): New function.
4414 * ax.h (gdb_free_agent_expr): New declaration.
4415 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4416 list.
4417 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4418 static.
4419 (clear_breakpoint_conditions_and_commands): New function.
4420 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4421 (clear_breakpoint_conditions_and_commands): New declaration.
4422
e9dae05e
RR
44232014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4424
4425 * linux-aarch64-low.c (asm/ptrace.h): Include.
4426
5876f503
JK
44272014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4428
4429 Fix TLS access for -static -pthread.
4430 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4431 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4432 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4433
802e8e6d
PA
44342014-05-20 Pedro Alves <palves@redhat.com>
4435
4436 * linux-aarch64-low.c (aarch64_insert_point)
4437 (aarch64_remove_point): No longer check whether the type is
4438 supported here. Adjust to new interface.
4439 (the_low_target): Install aarch64_supports_z_point_type as
4440 supports_z_point_type method.
4441 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4442 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4443 instead of a Z packet char. Adjust.
4444 (arm_supports_z_point_type): New function.
4445 (arm_insert_point, arm_remove_point): Adjust to new interface.
4446 (the_low_target): Install arm_supports_z_point_type.
4447 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4448 (cris_insert_point, cris_remove_point): Adjust to new interface.
4449 Don't check whether the type is supported here.
4450 (the_low_target): Install cris_supports_z_point_type.
4451 * linux-low.c (linux_supports_z_point_type): New function.
4452 (linux_insert_point, linux_remove_point): Adjust to new interface.
4453 * linux-low.h (struct linux_target_ops) <insert_point,
4454 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4455 raw_breakpoint pointer parameter.
4456 <supports_z_point_type>: New method.
4457 * linux-mips-low.c (mips_supports_z_point_type): New function.
4458 (mips_insert_point, mips_remove_point): Adjust to new interface.
4459 Use mips_supports_z_point_type.
4460 (the_low_target): Install mips_supports_z_point_type.
4461 * linux-ppc-low.c (the_low_target): Install NULL as
4462 supports_z_point_type method.
4463 * linux-s390-low.c (the_low_target): Install NULL as
4464 supports_z_point_type method.
4465 * linux-sparc-low.c (the_low_target): Install NULL as
4466 supports_z_point_type method.
4467 * linux-x86-low.c (x86_supports_z_point_type): New function.
4468 (x86_insert_point): Adjust to new insert_point interface. Use
4469 insert_memory_breakpoint. Adjust to new
4470 i386_low_insert_watchpoint interface.
4471 (x86_remove_point): Adjust to remove_point interface. Use
4472 remove_memory_breakpoint. Adjust to new
4473 i386_low_remove_watchpoint interface.
4474 (the_low_target): Install x86_supports_z_point_type.
4475 * lynx-low.c (lynx_target_ops): Install NULL as
4476 supports_z_point_type callback.
4477 * nto-low.c (nto_supports_z_point_type): New.
4478 (nto_insert_point, nto_remove_point): Adjust to new interface.
4479 (nto_target_ops): Install nto_supports_z_point_type.
4480 * mem-break.c: Adjust intro comment.
4481 (struct raw_breakpoint) <raw_type, size>: New fields.
4482 <inserted>: Update comment.
4483 <shlib_disabled>: Delete field.
4484 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4485 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4486 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4487 (raw_bkpt_type_to_target_hw_bp_type): New function.
4488 (find_enabled_raw_code_breakpoint_at): New function.
4489 (find_raw_breakpoint_at): New type and size parameters. Use them.
4490 (insert_memory_breakpoint): New function, based off
4491 set_raw_breakpoint_at.
4492 (remove_memory_breakpoint): New function.
4493 (set_raw_breakpoint_at): Reimplement.
4494 (set_breakpoint): New, based on set_breakpoint_at.
4495 (set_breakpoint_at): Reimplement.
4496 (delete_raw_breakpoint): Go through the_target->remove_point
4497 instead of assuming memory breakpoints.
4498 (find_gdb_breakpoint_at): Delete.
4499 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4500 (find_gdb_breakpoint): New function.
4501 (set_gdb_breakpoint_at): Delete.
4502 (z_type_supported): New function.
4503 (set_gdb_breakpoint_1): New function, loosely based off
4504 set_gdb_breakpoint_at.
4505 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4506 (delete_gdb_breakpoint_at): Delete.
4507 (delete_gdb_breakpoint_1): New function, loosely based off
4508 delete_gdb_breakpoint_at.
4509 (delete_gdb_breakpoint): New function.
4510 (clear_gdb_breakpoint_conditions): Rename to ...
4511 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4512 breakpoint.
4513 (add_condition_to_breakpoint): Make static.
4514 (add_breakpoint_condition): Take a struct breakpoint pointer
4515 instead of an address. Adjust.
4516 (gdb_condition_true_at_breakpoint): Rename to ...
4517 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4518 z_type parameter.
4519 (gdb_condition_true_at_breakpoint): Reimplement.
4520 (add_breakpoint_commands): Take a struct breakpoint pointer
4521 instead of an address. Adjust.
4522 (gdb_no_commands_at_breakpoint): Rename to ...
4523 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4524 parameter. Return true if no breakpoint was found. Change debug
4525 output.
4526 (gdb_no_commands_at_breakpoint): Reimplement.
4527 (run_breakpoint_commands): Rename to ...
4528 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4529 and change return type to boolean.
4530 (run_breakpoint_commands): New function.
4531 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4532 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4533 breakpoint. Go through the_target->remove_point instead of
4534 assuming memory breakpoint.
4535 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4536 software and hardware breakpoints.
4537 (reinsert_raw_breakpoint): Go through the_target->insert_point
4538 instead of assuming memory breakpoint.
4539 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4540 software and hardware breakpoints.
4541 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4542 Check both software and hardware breakpoints.
4543 (validate_inserted_breakpoint): Assert the breakpoint is a
4544 software breakpoint. Set the inserted flag to -1 instead of
4545 setting shlib_disabled.
4546 (delete_disabled_breakpoints): Adjust.
4547 (validate_breakpoints): Only validate software breakpoints.
4548 Adjust to inserted flag change.
4549 (check_mem_read, check_mem_write): Skip breakpoint types other
4550 than software breakpoints. Adjust to inserted flag change.
4551 * mem-break.h (enum raw_bkpt_type): New enum.
4552 (raw_breakpoint, struct process_info): Forward declare.
4553 (Z_packet_to_target_hw_bp_type): Delete declaration.
4554 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4555 (set_gdb_breakpoint, delete_gdb_breakpoint)
4556 (clear_breakpoint_conditions): New declarations.
4557 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4558 (breakpoint_inserted_here): Update comment.
4559 (add_breakpoint_condition, add_breakpoint_commands): Replace
4560 address parameter with a breakpoint pointer parameter.
4561 (gdb_breakpoint_here): Update comment.
4562 (delete_gdb_breakpoint_at): Delete.
4563 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4564 * server.c (process_point_options): Take a struct breakpoint
4565 pointer instead of an address. Adjust.
4566 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4567 delete_gdb_breakpoint.
4568 * spu-low.c (spu_target_ops): Install NULL as
4569 supports_z_point_type method.
4570 * target.h: Include mem-break.h.
4571 (struct target_ops) <prepare_to_access_memory>: Update comment.
4572 <supports_z_point_type>: New field.
4573 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4574 instead of a char. Also take a raw breakpoint pointer.
4575 * win32-arm-low.c (the_low_target): Install NULL as
4576 supports_z_point_type.
4577 * win32-i386-low.c (i386_supports_z_point_type): New function.
4578 (i386_insert_point, i386_remove_point): Adjust to new interface.
4579 (the_low_target): Install i386_supports_z_point_type.
4580 * win32-low.c (win32_supports_z_point_type): New function.
4581 (win32_insert_point, win32_remove_point): Adjust to new interface.
4582 (win32_target_ops): Install win32_supports_z_point_type.
4583 * win32-low.h (struct win32_target_ops):
4584 <supports_z_point_type>: New method.
4585 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4586 instead of a char. Also take a raw breakpoint pointer.
4587
932539e3
PA
45882014-05-20 Pedro Alves <palves@redhat.com>
4589
4590 * mem-break.h: Include break-common.h.
4591 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4592 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4593 (Z_packet_to_target_hw_bp_type): New declaration.
4594 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4595 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4596 (Z_PACKET_ACCESS_WP): Delete macros.
4597 (Z_packet_to_hw_type): Delete function.
4598 * i386-low.h: Don't include break-common.h here.
4599 (Z_packet_to_hw_type): Delete declaration.
4600 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4601 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4602 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4603 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4604 * linux-aarch64-low.c: Don't include break-common.h here.
4605 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4606 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4607 (Z_packet_to_target_hw_bp_type): Delete function.
4608 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4609 function.
4610 (mips_insert_point, mips_remove_point): Use
4611 Z_packet_to_target_hw_bp_type.
4612
4ff0d3d8
PA
46132014-05-20 Pedro Alves <palves@redhat.com>
4614
4615 * linux-aarch64-low.c: Include break-common.h.
4616 (enum target_point_type): Delete.
4617 (Z_packet_to_point_type): Rename to ...
4618 (Z_packet_to_target_hw_bp_type): ... this, and return a
4619 target_hw_bp_type instead.
4620 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4621 instead of an enum target_point_type.
4622 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4623 breakpoint type.
4624 (aarch64_dr_state_insert_one_point)
4625 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4626 (aarch64_handle_aligned_watchpoint)
4627 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4628 Take an enum target_hw_bp_type instead of an enum
4629 target_point_type.
4630 (aarch64_supports_z_point_type): New function.
4631 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4632 use Z_packet_to_target_hw_bp_type.
4633
786dc519
JB
46342014-05-20 Joel Brobecker <brobecker@adacore.com>
4635
4636 * configure.ac: Only use -Werror by default when DEVELOPMENT
4637 is true.
4638 * configure: Regenerate.
4639
9e0aa64f
JK
46402014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4641
4642 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4643 * linux-x86-low.c (X86_64_USER_REGS): New.
4644 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4645
2b577b92
YQ
46462014-04-28 Yao Qi <yao@codesourcery.com>
4647
4648 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4649 name.
4650
94611da2
PA
46512014-04-25 Pedro Alves <palves@redhat.com>
4652
4653 PR server/16255
4654 * linux-low.c (linux_attach_fail_reason_string): New function.
4655 (linux_attach_lwp): Delete.
4656 (linux_attach_lwp_1): Rename to ...
4657 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4658 argument. Remove "initial" parameter. Return int instead of
4659 void. Don't error or warn here.
4660 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4661 failure to attach to the tgid. Call warning when failing to
4662 attach to an lwp.
4663 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4664 argument. Remove "initial" parameter. Return int instead of
4665 void. Don't error or warn here.
4666 (linux_attach_fail_reason_string): New declaration.
4667 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4668 interface change. Use linux_attach_fail_reason_string.
4669
01f9f808
MS
46702014-04-24 Michael Sturm <michael.sturm@mintel.com>
4671 Walfred Tedeschi <walfred.tedeschi@intel.com>
4672
4673 * Makefile.in: Added rules to handle new files
4674 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4675 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4676 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4677 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4678 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4679 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4680 x32-avx512-linux.o.
4681 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4682 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4683 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4684 i386/x32-avx512.xml.
4685 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4686 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4687 i386/x32-avx512-linux.xml.
4688 * i387-fp.c (num_avx512_k_registers): New constant for number
4689 of K registers.
4690 (num_avx512_zmmh_low_registers): New constant for number of
4691 lower ZMM registers (0-15).
4692 (num_avx512_zmmh_high_registers): New constant for number of
4693 higher ZMM registers (16-31).
4694 (num_avx512_ymmh_registers): New contant for number of higher
4695 YMM registers (ymm16-31 added by avx521 on x86_64).
4696 (num_avx512_xmm_registers): New constant for number of higher
4697 XMM registers (xmm16-31 added by AVX512 on x86_64).
4698 (struct i387_xsave): Add space for AVX512 registers.
4699 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4700 Add code to handle AVX512 registers.
4701 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4702 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4703 prototypei from generated file.
4704 (tdesc_amd64_avx512_linux): Likewise.
4705 (init_registers_x32_avx512_linux): Likewise.
4706 (tdesc_x32_avx512_linux): Likewise.
4707 (init_registers_i386_avx512_linux): Likewise.
4708 (tdesc_i386_avx512_linux): Likewise.
4709 (x86_64_regmap): Add AVX512 registers.
4710 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4711 mask.
4712 (initialize_low_arch): Add code to initialize AVX512 registers.
4713
51aa91f9
PA
47142014-04-23 Pedro Alves <palves@redhat.com>
4715
4716 * mem-break.c (find_gdb_breakpoint_at): Make static.
4717 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4718
a4165e94
PA
47192014-04-23 Pedro Alves <palves@redhat.com>
4720
4721 * i386-low.c: Don't include break-common.h here.
4722 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4723 prototype to take target_hw_bp_type as argument instead of a Z
4724 packet char.
4725 * i386-low.h: Include break-common.h here.
4726 (Z_packet_to_hw_type): Declare.
4727 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4728 prototypes.
4729 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4730 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4731 (x86_remove_point): Convert the packet number to a
4732 target_hw_bp_type before calling i386_low_remove_watchpoint.
4733 * win32-i386-low.c (i386_insert_point): Convert the packet number
4734 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4735 (i386_remove_point): Convert the packet number to a
4736 target_hw_bp_type before calling i386_low_remove_watchpoint.
4737
b8acf843
PA
47382014-04-23 Pedro Alves <palves@redhat.com>
4739
4740 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4741
d708bcd1
PA
47422014-04-10 Pedro Alves <palves@redhat.com>
4743
4744 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4745 Check if the condition or command is NULL before checking if the
4746 breakpoint is known. On success, return true.
4747 * mem-break.h (add_breakpoint_condition): Document return.
4748 (add_breakpoint_commands): Add describing comment.
4749 * server.c (skip_to_semicolon): New function.
4750 (process_point_options): Use it.
4751
2eec7d5b
PA
47522014-04-09 Pedro Alves <palves@redhat.com>
4753
4754 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4755 to lwpid_of.
4756
fa96cb38
PA
47572014-02-27 Pedro Alves <palves@redhat.com>
4758
4759 PR 12702
4760 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4761 macros.
4762 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4763 output.
4764 (last_thread_of_process_p): Take a PID argument instead of a
4765 thread pointer.
4766 (linux_wait_for_lwp): Delete.
4767 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4768 functions.
4769 (linux_low_filter_event): New function, party factored out from
4770 linux_wait_for_event.
4771 (linux_wait_for_event): Rename to ...
4772 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4773 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4774 sigsuspend. Check for zombie leaders.
4775 (linux_wait_for_event): Reimplement as wrapper around
4776 linux_wait_for_event_filtered.
4777 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4778 a normal or signal exit is seen, it's the whole process exiting.
4779 (wait_for_sigstop): No longer a for_each_inferior callback.
4780 Rewrite on top of linux_wait_for_event_filtered.
4781 (stop_all_lwps): Call wait_for_sigstop directly.
4782 * server.c (resume, handle_target_event): Handle
4783 TARGET_WAITKIND_NO_RESUMED.
4784
d763de10
JB
47852014-02-26 Joel Brobecker <brobecker@adacore.com>
4786
4787 * win32-low.c (psapi_get_dll_name,
4788 * win32_CreateToolhelp32Snapshot): Delete.
4789 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4790 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4791 Delete.
4792 (handle_load_dll): Add function description.
4793 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4794
850a0f76
JB
47952014-02-26 Joel Brobecker <brobecker@adacore.com>
4796
4797 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4798 Add comment.
4799 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4800 base address when calling win32_add_one_solib.
4801 (handle_load_dll): Delete local variable load_addr.
4802 Remove 0x1000 offset applied to DLL base address when calling
4803 win32_add_one_solib.
4804 (handle_unload_dll): Add comment.
4805
f25b3fc3
JB
48062014-02-26 Joel Brobecker <brobecker@adacore.com>
4807
4808 * win32-low.c (win32_add_all_dlls): Renames
4809 win32_ensure_ntdll_loaded. Rewrite function documentation.
4810 Adjust implementation to always load all DLLs.
4811 Add 0x1000 offset to DLL base address when calling
4812 win32_add_one_solib.
4813 (child_initialization_done): New static global.
4814 (do_initial_child_stuff): Set child_initialization_done to
4815 zero during child initialization, and 1 after. Replace call
4816 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4817 Add comment.
4818 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4819 (handle_unload_dll): Add function documentation.
4820 (get_child_debug_event): Ignore load and unload DLL events
4821 during child initialization.
4822
d86d4aaf
DE
48232014-02-20 Doug Evans <dje@google.com>
4824
3bc32da3 4825 Remove global all_lwps.
d86d4aaf
DE
4826 * inferiors.h (ptid_of): Move here from linux-low.h.
4827 (pid_of, lwpid_of): Ditto.
4828 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4829 parameter is a struct thread_info * now.
4830 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4831 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4832 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4833 directly.
4834 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4835 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4836 * linux-arm-low.c (update_registers_callback): Update, "entry"
4837 parameter is a struct thread_info * now.
4838 Fetch lwpid from current_inferior directly.
4839 (arm_insert_point): Pass &all_threads to find_inferior instead of
4840 &all_lwps.
4841 (arm_remove_point): Ditto.
4842 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4843 (arm_prepare_to_resume): Fetch pid from thread.
4844 (arm_read_description): Fetch lwpid from current_inferior directly.
4845 * linux-low.c (all_lwps): Delete.
4846 (delete_lwp): Delete call to remove_inferior.
4847 (handle_extended_wait): Fetch lwpid from thread.
4848 (add_lwp): Don't set lwp->entry.id. Remove call to
4849 add_inferior_to_list.
4850 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4851 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4852 (kill_one_lwp_callback): Ditto.
4853 (linux_kill): Don't dereference NULL pointer.
4854 Fetch ptid,lwpid from thread.
4855 (get_detach_signal): Fetch ptid from thread.
4856 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4857 Simplify call to regcache_invalidate_thread.
4858 (delete_lwp_callback): Update, "entry" parameter is a
4859 struct thread_info * now. Fetch pid from thread.
4860 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4861 (status_pending_p_callback): Update, "entry" parameter is a
4862 struct thread_info * now. Fetch ptid from thread.
4863 (find_lwp_pid): Update, "entry" parameter is a
4864 struct thread_info * now.
4865 (linux_wait_for_lwp): Fetch pid from thread.
4866 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4867 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4868 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4869 (dequeue_one_deferred_signal): Ditto.
4870 (cancel_breakpoint): Fetch ptid from current_inferior.
4871 (linux_wait_for_event): Pass &all_threads to find_inferior,
4872 not &all_lwps. Fetch ptid, lwpid from thread.
4873 (count_events_callback): Update, "entry" parameter is a
4874 struct thread_info * now.
4875 (select_singlestep_lwp_callback): Ditto.
4876 (select_event_lwp_callback): Ditto.
4877 (cancel_breakpoints_callback): Ditto.
4878 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4879 not &all_lwps.
4880 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4881 (unsuspend_one_lwp): Update, "entry" parameter is a
4882 struct thread_info * now.
4883 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4884 not &all_lwps.
4885 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4886 Fetch lwpid from thread, not lwp.
4887 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4888 Pass &all_threads to find_inferior, not &all_lwps.
4889 (send_sigstop): Fetch lwpid from thread, not lwp.
4890 (send_sigstop_callback): Update, "entry" parameter is a
4891 struct thread_info * now.
4892 (suspend_and_send_sigstop_callback): Ditto.
4893 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4894 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4895 struct thread_info * now.
4896 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4897 from thread, lwp.
4898 (lwp_running): Update, "entry" parameter is a
4899 struct thread_info * now.
4900 (stop_all_lwps): Fetch ptid from thread.
4901 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4902 (linux_resume_one_lwp): Fetch lwpid from thread.
4903 (linux_set_resume_request): Update, "entry" parameter is a
4904 struct thread_info * now. Fetch pid, lwpid from thread.
4905 (resume_status_pending_p): Update, "entry" parameter is a
4906 struct thread_info * now.
4907 (need_step_over_p): Ditto. Fetch lwpid from thread.
4908 (start_step_over): Fetch lwpid from thread.
4909 (linux_resume_one_thread): Update, "entry" parameter is a
4910 struct thread_info * now. Fetch lwpid from thread.
4911 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4912 (proceed_one_lwp): Update, "entry" parameter is a
4913 struct thread_info * now. Fetch lwpid from thread.
4914 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4915 struct thread_info * now.
4916 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4917 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4918 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4919 directly.
4920 (regsets_store_inferior_registers): Ditto.
4921 (fetch_register, store_register): Ditto.
4922 (linux_read_memory, linux_write_memory): Ditto.
4923 (linux_request_interrupt): Ditto.
4924 (linux_read_auxv): Ditto.
4925 (linux_xfer_siginfo): Ditto.
4926 (linux_qxfer_spu): Ditto.
4927 (linux_qxfer_libraries_svr4): Ditto.
4928 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4929 moved to inferiors.h.
4930 (get_lwp): Delete.
4931 (get_thread_lwp): Update.
4932 (struct lwp_info): Delete member "entry". Simplify comment for
4933 member "thread".
4934 (all_lwps): Delete.
4935 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4936 current_inferior directly.
4937 (update_watch_registers_callback): Update, "entry" parameter is a
4938 struct thread_info * now. Fetch pid from thread.
4939 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4940 (mips_insert_point): Fetch lwpid from current_inferior.
4941 Pass &all_threads to find_inferior, not &all_lwps.
4942 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4943 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4944 directly.
4945 (mips_stopped_data_address): Ditto.
4946 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4947 directly.
4948 * linux-tile-low.c (tile_arch_setup): Ditto.
4949 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4950 (update_debug_registers_callback): Update, "entry" parameter is a
4951 struct thread_info * now. Fetch pid from thread.
4952 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4953 Pass &all_threads to find_inferior, not &all_lwps.
4954 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4955 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4956 Pass &all_threads to find_inferior, not &all_lwps.
4957 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4958 (i386_dr_low_get_status): Ditto.
4959 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4960 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4961 (x86_linux_read_description): Ditto.
4962 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4963
3b8361aa
DE
49642014-02-20 Doug Evans <dje@google.com>
4965
4966 * inferiors.c (get_first_inferior): Fix buglet.
4967
f7667f0d
DE
49682014-02-19 Doug Evans <dje@google.com>
4969
4970 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4971 * inferiors.c (add_thread): Change result type to struct thread_info *.
4972 All callers updated.
4973 (add_lwp): Call add_thread here instead of in callers.
4974 All callers updated.
4975 * linux-low.h (get_lwp_thread): Rewrite.
4976 (struct lwp_info): New member "thread".
4977
b3312d80
DE
49782014-02-19 Doug Evans <dje@google.com>
4979
4980 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4981 All callers updated.
4982
ecc6f45c
DE
49832014-02-19 Doug Evans <dje@google.com>
4984
4985 * inferiors.c (add_thread): Fix whitespace.
4986
649ebbca
DE
49872014-02-19 Doug Evans <dje@google.com>
4988
4989 * dll.c (clear_dlls): Replace accessing list implemention details
4990 with API function.
4991 * gdbthread.h (get_first_thread): Declare.
4992 * inferiors.c (for_each_inferior_with_data): New function.
4993 (get_first_thread): New function.
4994 (find_thread_ptid): Simplify.
4995 (get_first_inferior): New function.
4996 (clear_list): Delete.
4997 (one_inferior_p): New function.
4998 (clear_inferior_list): New function.
4999 (clear_inferiors): Update.
5000 * inferiors.h (for_each_inferior_with_data): Declare.
5001 (clear_inferior_list): Declare.
5002 (one_inferior_p): Declare.
5003 (get_first_inferior): Declare.
5004 * linux-low.c (linux_wait_for_event): Replace accessing list
5005 implemention details with API function.
5006 * server.c (target_running): Ditto.
5007 (accumulate_file_name_length): New function.
5008 (emit_dll_description): New function.
5009 (handle_qxfer_libraries): Replace accessing list implemention
5010 details with API function.
5011 (handle_qxfer_threads_worker): New function.
5012 (handle_qxfer_threads_proper): Replace accessing list implemention
5013 details with API function.
5014 (handle_query): Ditto.
5015 (visit_actioned_threads_callback_ftype): New typedef.
5016 (visit_actioned_threads_data): New struct.
5017 (visit_actioned_threads): Rewrite to be find_inferior callback.
5018 (resume): Call find_inferior.
5019 (handle_status): Replace accessing list implemention
5020 details with API function.
5021 (process_serial_event): Replace accessing list implemention details
5022 with API function.
5023 * target.c (set_desired_inferior): Replace accessing list implemention
5024 details with API function.
5025 * tracepoint.c (same_process_p): New function.
5026 (gdb_agent_about_to_close): Replace accessing list implemention
5027 details with API function.
5028 * win32-low.c (child_delete_thread): Replace accessing list
5029 implemention details with API function.
5030 (match_dll_by_basename): New function.
5031 (dll_is_loaded_by_basename): New function.
5032 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5033 details call to dll_is_loaded_by_basename.
5034
80894984
DE
50352014-02-19 Doug Evans <dje@google.com>
5036
5037 * dll.h (struct dll_info): Add comment.
5038 * gdbthread.h (struct thread_info): Add comment.
5039 (current_ptid): Simplify.
5040 * inferiors.c (add_process): Update.
5041 (remove_process): Update.
5042 * inferiors.h (struct process_info): Rename member "head" to "entry".
5043 * linux-low.c (delete_lwp): Update.
5044 (add_lwp): Update.
5045 (last_thread_of_process_p): Update.
5046 (kill_one_lwp_callback, linux_kill): Update.
5047 (status_pending_p_callback): Update.
5048 (wait_for_sigstop): Update. Simplify read of ptid.
5049 (start_step_over): Update.
5050 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5051 (get_lwp_thread): Update.
5052 (struct lwp_info): Rename member "head" to "entry".
5053 * regcache.h (inferior_list_entry): Delete.
5054 * server.c (kill_inferior_callback): Update.
5055 (detach_or_kill_inferior_callback): Update.
5056 (print_started_pid): Update.
5057 (print_attached_pid): Update.
5058 (process_serial_event): Simplify read of ptid.
5059 * thread-db.c (thread_db_create_event): Update.
5060 (thread_db_get_tls_address): Update.
5061 * win32-low.c (current_inferior_ptid): Simplify.
5062
46917d26
TT
50632014-02-19 Tom Tromey <tromey@redhat.com>
5064
5065 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5066 argument.
5067 (target_supports_btrace): Update.
5068
0759a81e
YQ
50692014-02-14 Yao Qi <yao@codesourcery.com>
5070
5071 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5072 (rsp-low-ipa.o): New target.
5073
a7191e8b
TT
50742014-02-12 Tom Tromey <tromey@redhat.com>
5075
5076 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5077 convert_ascii_to_int.
5078 * regcache.c (registers_to_string): Likewise.
5079 * remote-utils.c (decode_M_packet): Likewise.
5080 * server.c (process_serial_event): Likewise.
5081
ff0e980e
TT
50822014-02-12 Tom Tromey <tromey@redhat.com>
5083
5084 * server.c (handle_query, handle_v_run): Use hex2bin, not
5085 unhexify.
5086 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5087
e9371aff
TT
50882014-02-12 Tom Tromey <tromey@redhat.com>
5089
5090 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5091 convert_int_to_ascii.
5092 * regcache.c (registers_to_string, collect_register_as_string):
5093 Likewise.
5094 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5095 Likewise.
5096 * server.c (process_serial_event): Likewise.
5097 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5098 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5099
971dc0b8
TT
51002014-02-12 Tom Tromey <tromey@redhat.com>
5101
5102 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5103 bin2hex, not hexify.
5104 * tracepoint.c (cmd_qtstatus): Likewise.
5105
0a822afb
TT
51062014-02-12 Tom Tromey <tromey@redhat.com>
5107
5108 * remote-utils.c (monitor_output): Pass explicit length to
5109 hexify.
5110
9c3d6531
TT
51112014-02-12 Tom Tromey <tromey@redhat.com>
5112
5113 * tracepoint.c: Include rsp-low.h.
5114 * server.c: Include rsp-low.h.
5115 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5116 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5117 declare.
5118 * remote-utils.c: Include rsp-low.h.
5119 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5120 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5121 (convert_int_to_ascii, convert_ascii_to_int): Move to
5122 common/rsp-low.c.
5123 * regcache.c: Include rsp-low.h.
5124 * ax.c: Include rsp-low.h.
5125 * Makefile.in (SFILES): Add common/rsp-low.c.
5126 (OBS): Add rsp-low.o.
5127 (rsp-low.o): New target.
5128
01fd3ea5
TT
51292014-02-12 Tom Tromey <tromey@redhat.com>
5130
5131 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5132 Include print-utils.h.
5133 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5134 (plongest, thirty_two, phex_nz): Remove.
5135 * Makefile.in (SFILES): Add common/print-utils.c.
5136 (OBS): Add print-utils.o.
5137 (print-utils-ipa.o): New target.
5138 (print-utils.o): New target.
5139 (IPA_OBJS): Add print-utils-ipa.o.
5140
e99dc820
TT
51412014-02-06 Tom Tromey <tromey@redhat.com>
5142
5143 * Makefile.in (SFILES): Fix indentation.
5144
ee1e2d4f
DE
51452014-02-05 Doug Evans <dje@google.com>
5146
5147 * linux-low.c (linux_wait_for_event): Improve comment.
5148 (linux_wait_1): Keep current_inferior in sync with event_child.
5149
f5a02773
DE
51502014-01-22 Doug Evans <dje@google.com>
5151
5152 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5153
87ce2a04
DE
51542014-01-22 Doug Evans <dje@google.com>
5155
5156 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5157 * configure: Regenerate.
5158 * config.in: Regenerate.
5159 * Makefile.in (SFILES): Add debug.c.
5160 (OBS): Add debug.o.
5161 * debug.c: New file.
5162 * debug.h: New file.
5163 * linux-aarch64-low.c (*): Update all debugging printfs to use
5164 debug_printf instead of fprintf.
5165 * linux-arm-low.c (*): Ditto.
5166 * linux-cris-low.c (*): Ditto.
5167 * linux-crisv32-low.c (*): Ditto.
5168 * linux-m32r-low.c (*): Ditto.
5169 * linux-sparc-low.c (*): Ditto.
5170 * linux-x86.c (*): Ditto.
5171 * linux-low.c (*): Ditto.
5172 (linux_wait_1): Add calls to debug_enter, debug_exit.
5173 (linux_wait): Remove redundant debugging printf.
5174 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5175 (linux_resume, unstop_all_lwps): Ditto.
5176 * mem-break.c (*): Update all debugging printfs to use
5177 debug_printf instead of fprintf.
5178 * remote-utils.c (*): Ditto.
5179 * thread-db.c (*): Ditto.
5180 * server.c #include <ctype.h>, "gdb_vecs.h".
5181 (debug_threads): Moved to debug.c.
5182 (*): Update all debugging printfs to use debug_printf instead of
5183 fprintf.
5184 (start_inferior): Replace call to fflush with call to debug_flush.
5185 (monitor_show_help): Mention set debug-format.
5186 (parse_debug_format_options): New function.
5187 (handle_monitor_command): Handle "monitor set debug-format".
5188 (gdbserver_usage): Mention --debug-format.
5189 (main): Parse --debug-format.
5190 * server.h (debug_threads): Declaration moved to debug.h.
5191 #include "debug.h".
5192 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5193 trace_debug_1 that uses debug_printf.
5194 (tracepoint_look_up_symbols): Update all debugging printfs to use
5195 debug_printf instead of fprintf.
5196
e671835b
BS
51972014-01-20 Baruch Siach <baruch@tkos.co.il>
5198
5199 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5200 sys/ptrace.h.
5201
b5737fa9
PA
52022014-01-17 Pedro Alves <palves@redhat.com>
5203
ea38d2a9 5204 PR build/16445
c7faa97a
PA
5205 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5206 defined after including gdb_proc_service.h.
b5737fa9 5207
40ed484e
DE
52082014-01-16 Doug Evans <dje@google.com>
5209
5210 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5211 (match_dll): Use it.
5212
969c39fb
MM
52132014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5214
5215 * target.h (target_ops) <read_btrace>: Change parameters and
5216 return type to allow error reporting.
5217 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5218 trace reading errors on.
5219 * linux-low.c (linux_low_read_btrace): Pass trace reading
5220 errors on.
5221 (linux_low_disable_btrace): New.
5222
ab7f45ba
DE
52232014-01-15 Doug Evans <dje@google.com>
5224
5225 * inferiors.c (thread_id_to_gdb_id): Delete.
5226 * inferiors.h (thread_id_to_gdb_id): Delete.
5227
66af0f44
EZ
52282014-01-13 Eli Zaretskii <eliz@gnu.org>
5229
5230 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5231 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5232 versions.
5233
9939e131
PA
52342014-01-08 Pedro Alves <palves@redhat.com>
5235
5236 * server.c (handle_status): Don't discard previous queued stop
5237 replies or thread's pending status here.
5238 (main) <disconnection>: Do it here instead.
5239
b7ea362b
PA
52402014-01-08 Pedro Alves <palves@redhat.com>
5241
5242 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5243 * server.c (visit_actioned_threads, handle_pending_status): New
5244 function.
5245 (handle_v_cont): Factor out parts to ...
5246 (resume): ... this new function. If in all-stop, and a thread
5247 being resumed has a pending status, report it without actually
5248 resuming.
5249 (myresume): Adjust to use the new 'resume' function.
5250 (clear_pending_status_callback, set_pending_status_callback)
5251 (find_status_pending_thread_callback): New functions.
5252 (handle_status): Handle the case of multiple threads having
5253 interesting statuses to report. Report threads' real last signal
5254 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5255 with an interesting thread to report the status for, instead of
5256 always reporting the status of the first thread.
5257
28498c42
JB
52582014-01-01 Joel Brobecker <brobecker@adacore.com>
5259
5260 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5261 * gdbreplay.c (gdbreplay_version): Likewise.
5262
f45c82da
YZ
52632013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5264
5265 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5266 iov.iov_len with the real length in use.
5267
379a5e2d
JB
52682013-12-13 Joel Brobecker <brobecker@adacore.com>
5269
5270 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5271 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5272 for all targets that use win32-low.c.
5273 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5274 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5275
4210d83e
PA
52762013-12-13 Pedro Alves <palves@redhat.com>
5277
5278 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5279 if equal to TARGET_WAITKIND_LOADED.
5280 * win32-low.c (cached_status): New static global.
5281 (win32_wait): Add declaration.
5282 (do_initial_child_stuff): Flush all initial pending debug events
5283 up to the initial breakpoint.
5284 (win32_wait): If CACHED_STATUS was set, return that instead
5285 of doing a real wait. Remove the code resuming the execution
5286 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5287 during the initial phase. Also remove the code changing
5288 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5289 TARGET_WAITKIND_STOPPED.
5290
e7f0d979
YQ
52912013-12-11 Yao Qi <yao@codesourcery.com>
5292
5293 * notif.c (handle_notif_ack): Return 0 if no notification
5294 matches.
5295
ebcf782c
DE
52962013-11-20 Doug Evans <dje@google.com>
5297
5298 * linux-low.c (linux_set_resume_request): Fix comment.
5299
20ad9378
DE
53002013-11-20 Doug Evans <dje@google.com>
5301
5302 * linux-low.c (resume_status_pending_p): Tweak comment.
5303
a196ebeb
WT
53042013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5305
5306 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5307 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5308 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5309 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5310 (srv_amd64_regobj): Add amd64-mpx.o.
5311 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5312 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5313 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5314 * i387-fp.c (num_pl_bnd_register) Added constant.
5315 (num_pl_bnd_cfg_registers) Added constant.
5316 (struct i387_xsave) Added reserved area and MPX fields.
5317 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5318 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5319 function.
5320 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5321 (init_registers_amd64_mpx_linux): Declare new function.
5322 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5323 (x86_64_regmap): Add MPX registers.
5324 (x86_linux_read_description): Add MPX case.
5325 (initialize_low_arch): Initialize MPX targets.
5326
0080a2f6
TT
53272013-11-18 Tom Tromey <tromey@redhat.com>
5328
5329 * configure: Rebuild.
5330 * configure.ac: Don't check for stdlib.h.
5331 * gdbreplay.c: Unconditionally include stdlib.h.
5332
2978b111
TT
53332013-11-18 Tom Tromey <tromey@redhat.com>
5334
5335 * config.in: Rebuild.
5336 * configure: Rebuild.
5337 * configure.ac: Don't use AC_HEADER_DIRENT.
5338
a3d08894
TT
53392013-11-18 Tom Tromey <tromey@redhat.com>
5340
5341 * server.h: Don't check HAVE_STRING_H.
5342 * gdbreplay.c: Don't check HAVE_STRING_H.
5343 * configure: Rebuild.
5344
0a5dd17d
TT
53452013-11-18 Tom Tromey <tromey@redhat.com>
5346
5347 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5348 LIBGNU.
5349
1bd2f0ba
TT
53502013-11-08 Tom Tromey <tromey@redhat.com>
5351
5352 * configure, config.in: Rebuild.
5353 * configure.ac: Remove unused configury.
5354
3266f10b
TT
53552013-11-08 Tom Tromey <tromey@redhat.com>
5356
5357 * acinclude.m4: Include common.m4, codeset.m4.
5358 * configure, config.in: Rebuild.
5359 * configure.ac: Use GDB_AC_COMMON.
5360
6682d959
AA
53612013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5362
5363 * linux-s390-low.c (HWCAP_S390_TE): New define.
5364 (s390_arch_setup): Consider the TE field in the HWCAP for
5365 determining 'have_regset_tdb'.
5366
fd0a4d76
SDJ
53672013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5368
5369 PR gdb/16014
5370 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5371 call to sizeof.
5372
1a3d890b
PA
53732013-10-02 Pedro Alves <palves@redhat.com>
5374
5375 * server.c (process_serial_event): Don't output "GDBserver
5376 exiting" if GDB is connected through stdio.
5377 * target.c (mywait): Likewise, be silent if GDB is connected
5378 through stdio.
5379
97ad4581
JB
53802013-10-01 Joel Brobecker <brobecker@adacore.com>
5381
5382 * lynx-low.c (lynx_add_threads_after_attach): New function.
5383 (lynx_attach): Remove call to add_thread. Add call to
5384 lynx_add_threads_after_attach instead.
5385
5b4e221c
MF
53862013-09-28 Mike Frysinger <vapier@gentoo.org>
5387
5388 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5389 * config.in, configure: Regenerated.
5390
ee47b2f8
YQ
53912013-09-18 Yao Qi <yao@codesourcery.com>
5392
5393 PR server/15959
5394 * server.c (start_inferior): Clear 'resume_info'.
5395
d6707650 53962013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5397
d6707650
JW
5398 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5399 for each register.
5400
9243dd0e 54012013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5402
9243dd0e
JW
5403 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5404 linux-tile-low.o to srv_tgtobj.
5405
c623a6ef
WN
54062013-09-16 Will Newton <will.newton@linaro.org>
5407
5408 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5409 out regs.
5410
fb71d39e
PA
54112013-09-06 Pedro Alves <palves@redhat.com>
5412
5413 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5414 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5415 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5416 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5417 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5418 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5419
8e7e9910
PA
54202013-09-06 Pedro Alves <palves@redhat.com>
5421
5422 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5423 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5424
7c3a12ca
PA
54252013-09-06 Pedro Alves <palves@redhat.com>
5426
5427 * linux-amd64-ipa.c: Include tracepoint.h.
5428 * linux-i386-ipa.c: Include tracepoint.h.
5429
8eb3d7b6
RW
54302013-09-06 Ricard Wanderlof <ricardw@axis.com>
5431
5432 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5433 (ps_get_thread_area): New function.
5434
eddddb9d
RW
54352013-09-06 Ricard Wanderlof <ricardw@axis.com>
5436
5437 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5438 (initialize_low_arch): Call init_registers_crisv32 rather than
5439 init_register_crisv32.
5440
533b0600
PA
54412013-09-05 Pedro Alves <palves@redhat.com>
5442
5443 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5444 to ...
5445 * hostio.h: ... this new file.
5446 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5447 win32-low.c: Include hostio.h.
5448
0ce3d3b5
PA
54492013-09-05 Pedro Alves <palves@redhat.com>
5450
5451 * server.h (gdb_client_data, handler_func, callback_handler_func)
5452 (delete_file_handler, add_file_handler, append_callback_event)
5453 (delete_callback_event, start_event_loop, initialize_event_loop):
5454 Move to event-loop.h and include it.
5455 * event-loop.h: New file.
5456
799cdc37
PA
54572013-09-05 Pedro Alves <palves@redhat.com>
5458
5459 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5460 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5461 (loaded_dll, unloaded_dll): Move to ...
5462 * dll.h: ... this new file.
5463 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5464
6a6bbd9d
PA
54652013-09-05 Pedro Alves <palves@redhat.com>
5466
5467 * server.h (current_process, get_thread_process, all_processes)
5468 (add_inferior_to_list, for_each_inferior, current_inferior)
5469 (remove_inferior, add_process, remove_process, find_process_pid)
5470 (have_started_inferiors_p, have_attached_inferiors_p)
5471 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5472 (clear_inferiors, find_inferior, find_inferior_id)
5473 (inferior_target_data, set_inferior_target_data)
5474 (inferior_regcache_data, set_inferior_regcache_data): Move to
5475 inferiors.h, and include it.
5476 * inferiors.h: New file.
5477
f699aaba
PA
54782013-09-05 Pedro Alves <palves@redhat.com>
5479
5480 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5481 Move ...
72f4393d 5482 * ax.h: ... here.
f699aaba 5483
c144c7a0
PA
54842013-09-05 Pedro Alves <palves@redhat.com>
5485
5486 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5487 tracepoint.h.
5488 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5489 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5490 (handle_tracepoint_general_set, handle_tracepoint_query)
5491 (tracepoint_finished_step, tracepoint_was_hit)
5492 (release_while_stepping_state_list, current_traceframe)
5493 (in_readonly_region, traceframe_read_mem)
5494 (fetch_traceframe_registers, traceframe_read_sdata)
5495 (traceframe_read_info, struct fast_tpoint_collect_status)
5496 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5497 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5498 (supply_fast_tracepoint_registers)
5499 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5500 (ipa_tdesc, claim_trampoline_space)
5501 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5502 (agent_mem_read, agent_get_trace_state_variable_value)
5503 (agent_set_trace_state_variable_value, agent_tsv_read)
5504 (agent_mem_read_string, get_raw_reg_func_addr)
5505 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5506 * tracepoint.h: ... this new file.
5507
ff42e6ab
PA
55082013-09-05 Pedro Alves <palves@redhat.com>
5509
5510 * server.h (perror_with_name, error, fatal, warning, paddress)
5511 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5512 include it.
5513 * utils.h: New file.
5514
541af0f4
PA
55152013-09-05 Pedro Alves <palves@redhat.com>
5516
5517 * server.h (remote_debug, noack_mode, transport_is_reliable)
5518 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5519 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5520 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5521 (write_enn, initialize_async_io, enable_async_io)
5522 (disable_async_io, check_remote_input_interrupt_request)
5523 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5524 (dead_thread_notify, prepare_resume_reply)
5525 (decode_address_to_semicolon, decode_address, decode_m_packet)
5526 (decode_M_packet, decode_X_packet, decode_xfer_write)
5527 (decode_search_memory_packet, unhexify, hexify)
5528 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5529 (look_up_one_symbol, relocate_instruction)
5530 (monitor_output): Move to remote-utils.h, and include it.
5531 * remote-utils.h: New file.
5532
eebdf26b
PA
55332013-09-05 Pedro Alves <palves@redhat.com>
5534
5535 * server.h (_): Delete.
5536
3aafd2ff
PA
55372013-09-02 Pedro Alves <palves@redhat.com>
5538
5539 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5540 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5541 allocated.
5542 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5543
cee83bcb
PM
55442013-09-02 Pierre Muller <muller@sourceware.org>
5545
5546 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5547 or WriteProcessMemory complete successfully and handle
5548 ERROR_PARTIAL_COPY error.
5549
9a13b2fa
PA
55502013-09-02 Pedro Alves <palves@redhat.com>
5551
5552 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5553 error instead of EIO.
5554
602e3198
JK
55552013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5556
5557 PR server/15604
5558 * linux-low.c: Include filestuff.h.
5559 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5560 * lynx-low.c: Include filestuff.h.
5561 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5562 * server.c: Include filestuff.h.
5563 (main): Call notice_open_fds.
5564 * spu-low.c: Include filestuff.h.
5565 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5566
96d7229d
LM
55672013-08-22 Luis Machado <lgustavo@codesourcery.com>
5568
5569 * Makefile.in: Explain why ../target and ../nat are not
5570 listed as include file search paths.
5571 (linux-waitpid.o): New object file rule.
5572 * configure.srv (srv_native_linux_obj): New variable.
5573 Replace all occurrences of linux native object files with
5574 $srv_native_linux_obj.
5575 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5576 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5577 (linux_enable_event_reporting): Remove declaration.
5578 (my_waitpid): Moved to common/linux-waitpid.c.
5579 (linux_wait_for_event): Pass ptid when calling
5580 linux_enable_event_reporting.
5581 (linux_supports_tracefork_flag): Remove.
5582 (linux_enable_event_reporting): Likewise.
5583 (linux_tracefork_grandchild): Remove.
5584 (STACK_SIZE): Moved to common/linux-ptrace.c.
5585 (linux_tracefork_child): Remove.
5586 (linux_test_for_tracefork): Remove.
5587 (linux_look_up_symbols): Call linux_supports_traceclone.
5588 (initialize_low): Remove call to linux_test_for_tracefork.
5589 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5590 common/linux-ptrace.h.
5591 (PTRACE_TYPE_ARG4): Likewise.
5592 Include linux-ptrace.h.
5593
32940073
PA
55942013-08-21 Pedro Alves <palves@redhat.com>
5595
5596 * config.in: Renegerate.
5597
33b60d58 55982013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 5599
33b60d58
LM
5600 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5601 (SFILES): Remove $(srcdir)/common/target-common.c and
5602 add $(srcdir)/target/waitstatus.c.
5603 (OBS): Remove target-common.o and add waitstatus.o.
5604 (server_h): Remove $(srcdir)/../common/target-common.h and
5605 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5606 and $(srcdir)/../target/waitstatus.h.
5607 (target-common.o): Remove.
5608 (waitstatus.o): New target object file.
5609 * target.h: Do not include target-common.h and
5610 include target/resume.h, target/wait.h and
5611 target/waitstatus.h.
5612
b8e1b30e
LM
56132013-08-13 Luis Machado <lgustavo@codesourcery.com>
5614
5615 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5616 to PTRACE_TYPE_ARG3.
5617 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5618 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5619 PTRACE_TYPE_ARG4.
5620 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5621 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5622
7a60ad40
YQ
56232013-07-27 Jie Zhang <jie@codesourcery.com>
5624 Daniel Jacobowitz <dan@codesourcery.com>
5625 Yao Qi <yao@codesourcery.com>
5626
5627 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5628 (mips-linux-watch.o): New rule.
5629 (mips_linux_watch_h): New variable.
5630 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5631 srv_tgtobj.
5632 * linux-mips-low.c: Include mips-linux-watch.h.
5633 (struct arch_process_info, struct arch_lwp_info): New.
5634 (update_watch_registers_callback): New function.
5635 (mips_linux_new_process, mips_linux_new_thread) New functions.
5636 (mips_linux_prepare_to_resume, mips_insert_point): New
5637 functions.
5638 (mips_remove_point, mips_stopped_by_watchpoint): New
5639 functions.
5640 (rsp_bp_type_to_target_hw_bp_type): New function.
5641 (mips_stopped_data_address): New function.
5642 (the_low_target): Add watchpoint support functions.
5643
de6f69ad
YQ
56442013-07-27 Yao Qi <yao@codesourcery.com>
5645
5646 * i386-low.c: Include break-common.h.
5647 (enum target_hw_bp_type): Remove.
5648
3360c0bf
LM
56492013-07-24 Luis Machado <lgustavo@codesourcery.com>
5650
5651 * Makefile.in (SFILES): /common/target-common.c.
5652 (OBS): Add target-common.o.
5653 (server_h): Add $(srcdir)/../common/target-common.h.
5654 (target-common.o): New target.
5655 * server.c (queue_stop_reply_callback): Free
5656 status string after use.
5657 * target.c (target_waitstatus_to_string): Remove.
5658 * target.h: Include target-common.h.
5659 (resume_kind): Likewise.
5660 (target_waitkind): Likewise.
5661 (target_waitstatus): Likewise.
5662 (TARGET_WNOHANG): Likewise.
5663
bd885420
YQ
56642013-07-04 Yao Qi <yao@codesourcery.com>
5665
5666 * Makefile.in (host_alias): Use @host_noncanonical@.
5667 (target_alias): Use @target_noncanonical@.
5668 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5669 ACX_NONCANONICAL_HOST.
5670 * configure: Regenerated.
5671
5672 Revert:
5673 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5674
5675 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5676 * configure: Rebuild.
5677 * Makefile.in (version_host, version_target): Get from configure.
5678 (version.c): Use $(version_host) and $(version_target).
5679
17ef446e
PA
56802013-07-03 Pedro Alves <palves@redhat.com>
5681
5682 * Makefile.in (config.status): Depend on development.sh.
5683 * acinclude.m4: Include libmcheck.m4.
5684 * configure: Regenerate.
5685
7a9a7487
MG
56862013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5687
5688 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5689 attribute inside the parentheses.
5690 (winapi_DebugSetProcessKillOnExit): Ditto.
5691 (winapi_DebugBreakProcess): Ditto.
5692 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 5693
49b64de6
MG
56942013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5695
5696 * notif.h (notif_event): Add a dummy member to avoid compiler
5697 errors.
5698
d5749ee7
PA
56992013-07-01 Pedro Alves <palves@redhat.com>
5700
5701 * hostio.c (HOSTIO_PATH_MAX): Define.
5702 (require_filename, handle_open, handle_unlink, handle_readlink):
5703 Use it.
5704
d8d2a3ee
PA
57052013-07-01 Pedro Alves <palves@redhat.com>
5706
5707 * server.h: Include "pathmax.h".
5708 * linux-low.c: Don't include sys/param.h.
5709 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5710 MAXPATHLEN.
5711 * win32-low.c: Don't include sys/param.h.
5712 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5713
bc7dea8d
PA
57142013-07-01 Pedro Alves <palves@redhat.com>
5715
5716 * event-loop.c: Don't check HAVE_UNISTD_H before including
5717 <unistd.h>.
5718 * gdbreplay.c: Likewise.
5719 * remote-utils.c: Likewise.
5720 * server.c: Likewise.
5721 * configure.ac: Don't check for unistd.h.
5722 * configure: Regenerate.
5723
d6c2da54
TT
57242013-06-28 Tom Tromey <tromey@redhat.com>
5725
5726 * Makefile.in (version.c): Use version.in, not
5727 common/version.in.
5728
257b6bec
MG
57292013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5730
5731 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5732 * configure: Rebuild.
5733 * Makefile.in (version_host, version_target): Get from configure.
5734 (version.c): Use $(version_host) and $(version_target).
5735
86ebe149
DK
57362013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5737
5738 Fix trace-status to output user name without trailing colon.
5739 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5740
f30aa5af
DK
57412013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5742
5743 Fix trace-status to output proper start-time and stop-time.
5744 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5745 output start time and stop time in hex as gdb expects.
5746
28a93511
YQ
57472013-06-26 Pedro Alves <pedro@codesourcery.com>
5748
5749 * tracepoint.c (build_traceframe_info_xml): Output trace state
5750 variables present in the trace buffer.
5751
01208463
TT
57522013-06-24 Tom Tromey <tromey@redhat.com>
5753
5754 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5755 create-version.sh.
5756 (version.o): Remove.
5757 * gdbreplay.c: Include version.h.
5758 (version, host_name): Don't declare.
5759 * server.h: Include version.h.
5760 (version, host_name): Don't declare.
5761
760256f9
PA
57622013-06-12 Pedro Alves <palves@redhat.com>
5763
5764 * linux-x86-low.c (linux_is_elf64): Delete global.
5765 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5766 with local linux_pid_exe_is_elf_64_file use.
5767
030031ee
PA
57682013-06-11 Pedro Alves <palves@redhat.com>
5769
5770 * linux-low.c (regset_disabled, disable_regset): New functions.
5771 (regsets_fetch_inferior_registers)
5772 (regsets_store_inferior_registers): Use them.
5773 (initialize_regsets_info); Don't allocate the disabled_regsets
5774 array here.
5775 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5776 comment.
5777
5da6eb0a
PA
57782013-06-11 Pedro Alves <palves@redhat.com>
5779
5780 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5781 xmalloc.
5782
7e5aaa09
PA
57832013-06-11 Pedro Alves <palves@redhat.com>
5784
5785 * linux-x86-low.c (initialize_low_arch): Call
5786 init_registers_x32_avx_linux.
5787
d878444c
JK
57882013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5789
5790 Fix compatibility with Android Bionic.
5791 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5792 it is not empty.
5793
3aee8918
PA
57942013-06-07 Pedro Alves <palves@redhat.com>
5795
5f2b57b5 5796 PR server/14823
3aee8918
PA
5797 * Makefile.in (OBS): Add tdesc.o.
5798 (IPA_OBJS): Add tdesc-ipa.o.
5799 (tdesc-ipa.o): New rule.
5800 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5801 interface.
5802 * linux-low.c (new_inferior): Delete.
5803 (disabled_regsets, num_regsets): Delete.
5804 (linux_add_process): Adjust to set the new per-process
5805 new_inferior flag.
5806 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5807 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5808 was a stop. When calling arch_setup, switch the current inferior
5809 to the thread that got an event.
5810 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5811 (regsets_fetch_inferior_registers)
5812 (regsets_store_inferior_registers): New regsets_info parameter.
5813 Adjust to use it.
5814 (linux_register_in_regsets): New regs_info parameter. Adjust to
5815 use it.
5816 (register_addr, fetch_register, store_register): New usrregs_info
5817 parameter. Adjust to use it.
5818 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5819 parameter regs_info. Adjust to use it.
5820 (linux_fetch_registers): Get the current inferior's regs_info, and
5821 adjust to use it.
5822 (linux_store_registers): Ditto.
5823 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5824 (initialize_low): Don't initialize the target_regsets here. Call
5825 initialize_low_arch.
5826 * linux-low.h (target_regsets): Delete declaration.
5827 (struct regsets_info): New.
5828 (struct usrregs_info): New.
5829 (struct regs_info): New.
5830 (struct process_info_private) <new_inferior>: New field.
5831 (struct linux_target_ops): Delete the num_regs, regmap, and
5832 regset_bitmap fields. New field regs_info.
5833 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5834 * i387-fp.c (num_xmm_registers): Delete.
5835 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5836 calls to new interface.
5837 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5838 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5839 Infer the number of xmm registers from the regcache's target
5840 description.
5841 * i387-fp.h (num_xmm_registers): Delete.
5842 * inferiors.c (add_thread): Don't install the thread's regcache
5843 here.
5844 * proc-service.c (gregset_info): Fetch the current inferior's
5845 regs_info. Adjust to use it.
5846 * regcache.c: Include tdesc.h.
5847 (register_bytes, reg_defs, num_registers)
5848 (gdbserver_expedite_regs): Delete.
5849 (get_thread_regcache): If the thread doesn't have a regcache yet,
5850 create one, instead of aborting gdbserver.
5851 (regcache_invalidate_one): Rename to ...
5852 (regcache_invalidate_thread): ... this.
5853 (regcache_invalidate_one): New.
5854 (regcache_invalidate): Only invalidate registers of the current
5855 process.
5856 (init_register_cache): Add target_desc parameter, and use it.
5857 (new_register_cache): Ditto. Assert the target description has a
5858 non zero registers_size.
5859 (regcache_cpy): Add assertions. Adjust.
5860 (realloc_register_cache, set_register_cache): Delete.
5861 (registers_to_string, registers_from_string): Adjust.
5862 (find_register_by_name, find_regno, find_register_by_number)
5863 (register_cache_size): Add target_desc parameter, and use it.
5864 (free_register_cache_thread, free_register_cache_thread_one)
5865 (regcache_release, register_cache_size): New.
5866 (register_size): Add target_desc parameter, and use it.
5867 (register_data, supply_register, supply_register_zeroed)
5868 (supply_regblock, supply_register_by_name, collect_register)
5869 (collect_register_as_string, collect_register_by_name): Adjust.
5870 * regcache.h (struct target_desc): Forward declare.
5871 (struct regcache) <tdesc>: New field.
5872 (init_register_cache, new_register_cache): Add target_desc
5873 parameter.
5874 (regcache_invalidate_thread): Declare.
5875 (regcache_invalidate_one): Delete declaration.
5876 (regcache_release): Declare.
5877 (find_register_by_number, register_cache_size, register_size)
5878 (find_regno): Add target_desc parameter.
5879 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5880 declarations.
5881 * remote-utils.c: Include tdesc.h.
5882 (outreg, prepare_resume_reply): Adjust.
5883 * server.c: Include tdesc.h.
5884 (gdbserver_xmltarget): Delete declaration.
5885 (get_features_xml, process_serial_event): Adjust.
5886 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5887 declare.
5888 (struct process_info) <tdesc>: New field.
5889 (ipa_tdesc): Declare.
5890 * tdesc.c: New file.
5891 * tdesc.h: New file.
5892 * tracepoint.c: Include tdesc.h.
5893 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5894 (get_context_regcache): Adjust to pass ipa_tdesc down.
5895 (do_action_at_tracepoint): Adjust to get the register cache size
5896 from the context regcache's description.
5897 (traceframe_walk_blocks): Adjust to get the register cache size
5898 from the current trace frame's description.
5899 (traceframe_get_pc): Adjust to get current trace frame's
5900 description and pass it down.
5901 (gdb_collect): Adjust to get the register cache size from the
5902 IPA's description.
5903 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5904 (gdbserver_xmltarget): Delete.
5905 (initialize_low_tracepoint): Set the ipa's target description.
5906 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5907 (initialize_low_tracepoint): Set the ipa's target description.
5908 * linux-x86-low.c: Include tdesc.h.
5909 [__x86_64__] (is_64bit_tdesc): New.
5910 (ps_get_thread_area, x86_get_thread_area): Use it.
5911 (i386_cannot_store_register): Rename to ...
5912 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5913 (i386_cannot_fetch_register): Rename to ...
5914 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5915 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5916 to new interface.
5917 (target_regsets): Rename to ...
5918 (x86_regsets): ... this.
5919 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5920 interface.
5921 (x86_siginfo_fixup): Use is_64bit_tdesc.
5922 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5923 (tdesc_x32_avx_linux, tdesc_x32_linux)
5924 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5925 Declare.
5926 (x86_linux_update_xmltarget): Delete.
5927 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5928 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5929 (AMD64_LINUX_USER64_CS): New.
5930 (x86_linux_read_description): New, based on
5931 x86_linux_update_xmltarget.
5932 (same_process_callback): New.
5933 (x86_arch_setup_process_callback): New.
5934 (x86_linux_update_xmltarget): New.
5935 (x86_regsets_info): New.
5936 (amd64_linux_regs_info): New.
5937 (i386_linux_usrregs_info): New.
5938 (i386_linux_regs_info): New.
5939 (x86_linux_regs_info): New.
5940 (x86_arch_setup): Reimplement.
5941 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5942 (x86_emit_ops): Ditto.
5943 (the_low_target): Adjust. Install x86_linux_regs_info,
5944 x86_cannot_fetch_register, and x86_cannot_store_register.
5945 (initialize_low_arch): New.
5946 * linux-ia64-low.c (tdesc_ia64): Declare.
5947 (ia64_fetch_register): Adjust.
5948 (ia64_usrregs_info, regs_info): New globals.
5949 (ia64_regs_info): New function.
5950 (the_low_target): Adjust.
5951 (initialize_low_arch): New function.
5952 * linux-sparc-low.c (tdesc_sparc64): Declare.
5953 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5954 Adjust.
5955 (sparc_arch_setup): New function.
5956 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5957 (the_low_target): Adjust.
5958 (initialize_low_arch): New function.
5959 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5960 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5961 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5962 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5963 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5964 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5965 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5966 (tdesc_powerpc_isa205_vsx64l): Declare.
5967 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5968 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5969 (ppc_set_pc, ppc_get_hwcap): Adjust.
5970 (ppc_usrregs_info): Forward declare.
5971 (!__powerpc64__) ppc_regmap_adjusted: New global.
5972 (ppc_arch_setup): Adjust to the current process'es target
5973 description.
5974 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5975 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5976 (ppc_store_evrregset): Adjust.
5977 (target_regsets): Rename to ...
5978 (ppc_regsets): ... this, and make static.
5979 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5980 (ppc_regs_info): New function.
5981 (the_low_target): Adjust.
5982 (initialize_low_arch): New function.
5983 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5984 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5985 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5986 (tdesc_s390x_linux64v2): Declare.
5987 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5988 (s390_fill_gregset, s390_store_last_break): Adjust.
5989 (target_regsets): Rename to ...
5990 (s390_regsets): ... this, and make static.
5991 (s390_get_pc, s390_set_pc): Adjust.
5992 (s390_get_hwcap): New target_desc parameter, and use it.
5993 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5994 (s390_arch_setup): Adjust to set the current process'es target
5995 description. Don't adjust the regmap.
5996 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5997 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5998 (regs_info_3264): New globals.
5999 (s390_regs_info): New function.
6000 (the_low_target): Adjust.
6001 (initialize_low_arch): New function.
6002 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6003 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6004 [__mips64] (init_registers_mips_linux)
6005 (init_registers_mips_dsp_linux): Delete defines.
6006 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6007 (have_dsp): New global.
6008 (mips_read_description): New, based on mips_arch_setup.
6009 (mips_arch_setup): Reimplement.
6010 (get_usrregs_info): New function.
6011 (mips_cannot_fetch_register, mips_cannot_store_register)
6012 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6013 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6014 (target_regsets): Rename to ...
6015 (mips_regsets): ... this, and make static.
6016 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6017 (dsp_regs_info, regs_info): New globals.
6018 (mips_regs_info): New function.
6019 (the_low_target): Adjust.
6020 (initialize_low_arch): New function.
6021 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6022 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6023 Declare.
6024 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6025 (arm_read_description): New, with bits factored from
6026 arm_arch_setup.
6027 (arm_arch_setup): Reimplement.
6028 (target_regsets): Rename to ...
6029 (arm_regsets): ... this, and make static.
6030 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6031 (arm_regs_info): New function.
6032 (the_low_target): Adjust.
6033 (initialize_low_arch): New function.
6034 * linux-m68k-low.c (tdesc_m68k): Declare.
6035 (target_regsets): Rename to ...
6036 (m68k_regsets): ... this, and make static.
6037 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6038 (m68k_regs_info): New function.
6039 (m68k_arch_setup): New function.
6040 (the_low_target): Adjust.
6041 (initialize_low_arch): New function.
6042 * linux-sh-low.c (tdesc_sharch): Declare.
6043 (target_regsets): Rename to ...
6044 (sh_regsets): ... this, and make static.
6045 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6046 (sh_regs_info, sh_arch_setup): New functions.
6047 (the_low_target): Adjust.
6048 (initialize_low_arch): New function.
6049 * linux-bfin-low.c (tdesc_bfin): Declare.
6050 (bfin_arch_setup): New function.
6051 (bfin_usrregs_info, regs_info): New globals.
6052 (bfin_regs_info): New function.
6053 (the_low_target): Adjust.
6054 (initialize_low_arch): New function.
6055 * linux-cris-low.c (tdesc_cris): Declare.
6056 (cris_arch_setup): New function.
6057 (cris_usrregs_info, regs_info): New globals.
6058 (cris_regs_info): New function.
6059 (the_low_target): Adjust.
6060 (initialize_low_arch): New function.
6061 * linux-cris-low.c (tdesc_crisv32): Declare.
6062 (cris_arch_setup): New function.
6063 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6064 (cris_regs_info): New function.
6065 (the_low_target): Adjust.
6066 (initialize_low_arch): New function.
6067 * linux-m32r-low.c (tdesc_m32r): Declare.
6068 (m32r_arch_setup): New function.
6069 (m32r_usrregs_info, regs_info): New globals.
6070 (m32r_regs_info): Adjust.
6071 (initialize_low_arch): New function.
6072 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6073 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6074 (tic6x_usrregs_info): Forward declare.
6075 (tic6x_read_description): New function, based on ...
6076 (tic6x_arch_setup): ... this. Reimplement.
6077 (target_regsets): Rename to ...
6078 (tic6x_regsets): ... this, and make static.
6079 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6080 (tic6x_regs_info): New function.
6081 (the_low_target): Adjust.
6082 (initialize_low_arch): New function.
6083 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6084 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6085 (target_regsets): Rename to ...
6086 (xtensa_regsets): ... this, and make static.
6087 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6088 globals.
6089 (xtensa_arch_setup, xtensa_regs_info): New functions.
6090 (the_low_target): Adjust.
6091 (initialize_low_arch): New function.
6092 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6093 (nios2_arch_setup): Set the current process'es tdesc.
6094 (target_regsets): Rename to ...
6095 (nios2_regsets): ... this.
6096 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6097 (nios2_regs_info): New function.
6098 (the_low_target): Adjust.
6099 (initialize_low_arch): New function.
a261b8f5
PA
6100 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6101 (aarch64_arch_setup): Set the current process'es tdesc.
6102 (target_regsets): Rename to ...
6103 (aarch64_regsets): ... this.
6104 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6105 (aarch64_regs_info): New function.
6106 (the_low_target): Adjust.
6107 (initialize_low_arch): New function.
3aee8918
PA
6108 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6109 globals.
6110 (target_regsets): Rename to ...
6111 (tile_regsets): ... this.
6112 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6113 (tile_regs_info): New function.
6114 (tile_arch_setup): Set the current process'es tdesc.
6115 (the_low_target): Adjust.
6116 (initialize_low_arch): New function.
6117 * spu-low.c (tdesc_spu): Declare.
6118 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6119 * win32-arm-low.c (tdesc_arm): Declare.
6120 (arm_arch_setup): New function.
6121 (the_low_target): Install arm_arch_setup instead of
6122 init_registers_arm.
6123 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6124 (init_windows_x86): Rename to ...
6125 (i386_arch_setup): ... this. Set `win32_tdesc'.
6126 (the_low_target): Adjust.
6127 * win32-low.c (win32_tdesc): New global.
6128 (child_add_thread): Don't create the thread cache here.
6129 (do_initial_child_stuff): Set the new process'es tdesc.
6130 * win32-low.h (struct target_desc): Forward declare.
6131 (win32_tdesc): Declare.
6132 * lynx-i386-low.c (tdesc_i386): Declare global.
6133 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6134 * lynx-low.c (lynx_tdesc): New global.
6135 (lynx_add_process): Set the new process'es tdesc.
6136 * lynx-low.h (struct target_desc): Forward declare.
6137 (lynx_tdesc): Declare global.
6138 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6139 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6140 * nto-low.c (nto_tdesc): New global.
6141 (do_attach): Set the new process'es tdesc.
6142 * nto-low.h (struct target_desc): Forward declare.
6143 (nto_tdesc): Declare.
6144 * nto-x86-low.c (tdesc_i386): Declare.
6145 (nto_x86_arch_setup): Set `nto_tdesc'.
6146
b1fbec62
GB
61472013-06-04 Gary Benson <gbenson@redhat.com>
6148
6149 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6150 to qSupported response when appropriate.
6151 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6152 with nonzero-length annex.
6153 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6154 arguments supplied in annex.
6155
d1ec4ce7
DE
61562013-05-31 Doug Evans <dje@google.com>
6157
ac44adcb 6158 PR server/15594
d1ec4ce7
DE
6159 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6160 64 bits in 64-cross-32 environment.
6161
9b25f2d3
PA
61622013-05-28 Pedro Alves <palves@redhat.com>
6163
6164 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6165 (aarch64-without-fpu.c): Delete rule.
6166 * configure.srv (aarch64*-*-linux*): Remove references to
6167 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6168 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6169 declaration.
6170
6740dc9c
PA
61712013-05-24 Pedro Alves <palves@redhat.com>
6172
6173 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6174 instead of strchr/decode_address. Error if the range isn't split
6175 with a ','. Don't assume there's be a ':' in the action.
6176
c2d6af84
PA
61772013-05-23 Yao Qi <yao@codesourcery.com>
6178 Pedro Alves <palves@redhat.com>
6179
6180 * linux-low.c (lwp_in_step_range): New function.
6181 (linux_wait_1): If the thread was range stepping and stopped
6182 outside the stepping range, report the stop to GDB. Otherwise,
6183 continue stepping. Add range stepping debug output.
6184 (linux_set_resume_request): Copy the step range from the resume
6185 request to the lwp.
6186 (linux_supports_range_stepping): New.
6187 (linux_target_ops) <supports_range_stepping>: Set to
6188 linux_supports_range_stepping.
6189 * linux-low.h (struct linux_target_ops)
6190 <supports_range_stepping>: New field.
6191 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6192 * linux-x86-low.c (x86_supports_range_stepping): New.
6193 (the_low_target) <supports_range_stepping>: Set to
6194 x86_supports_range_stepping.
6195 * server.c (handle_v_cont): Handle 'r' action.
6196 (handle_v_requests): Append ";r" if the target supports range
6197 stepping.
6198 * target.h (struct thread_resume) <step_range_start,
6199 step_range_end>: New fields.
6200 (struct target_ops) <supports_range_stepping>:
6201 New field.
6202 (target_supports_range_stepping): New macro.
6203
58794e1a
JB
62042013-05-17 Joel Brobecker <brobecker@adacore.com>
6205
6206 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6207 confusion in comment.
6208
d631c5a7
JB
62092013-05-17 Joel Brobecker <brobecker@adacore.com>
6210
6211 * lynx-low.c (struct process_info_private): New type.
6212 (lynx_add_process): New function.
6213 (lynx_create_inferior, lynx_attach): Replace calls to
6214 add_process by calls to lynx_add_process.
6215 (lynx_resume): If PTID is null, then try using
6216 current_process()->private->last_wait_event_ptid.
6217 Add comments.
6218 (lynx_clear_inferiors): Delete. The contents of that function
6219 has been inlined in lynx_mourn;
6220 (lynx_wait_1): Save the ptid in the process's private data.
6221 (lynx_mourn): Free the process' private data. Replace call
6222 to lynx_clear_inferiors by call to clear_inferiors.
6223
96f7a20f
YQ
62242013-05-17 Yao Qi <yao@codesourcery.com>
6225
6226 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6227 the right place.
6228
db0dfaa0
LM
62292013-05-16 Luis Machado <lgustavo@codesourcery.com>
6230
6231 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6232 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6233 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6234 PT_TEXT_END_ADDR guards. Update comments.
6235 (linux_target_op) <read_offsets>: Conditionally define to
6236 linux_read_offsets if the target is UCLIBC and if it defines
6237 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6238
68f5f838
SL
62392013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6240 Andrew Jenner <andrew@codesourcery.com>
6241
6242 * Makefile.in (SFILES): Add linux-nios2-low.c.
6243 (clean): Add action to delete nios2-linux.c.
6244 (nios2-linux.c): New rule.
6245 * configure.srv: Add nios2*-*-linux*.
6246 * linux-nios2-low.c: New.
6247
1ebff1fd
HAQ
62482013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6249
6250 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6251
f6150862
HZ
62522013-04-25 Hui Zhu <hui@codesourcery.com>
6253
6254 PR gdb/15186
f6150862
HZ
6255 * ax.c (ax_printf): Add fflush.
6256
614c279d
TT
62572013-04-22 Tom Tromey <tromey@redhat.com>
6258
6259 * Makefile.in (SFILES): Add filestuff.c.
6260 (OBS): Add filestuff.o.
6261 (filestuff.o): New target.
6262 * config.in, configure: Rebuild.
6263 * configure.ac: Check for fdwalk, pipe2.
6264
7d4e5717
PA
62652013-04-17 Pedro Alves <palves@redhat.com>
6266
6267 * configure.ac (USE_THREAD_DB): Delete variable.
6268 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6269 Don't AC_SUBST USE_THREAD_DB.
6270 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6271 * config.in, configure: Regenerate.
6272
d5c93e41
PA
62732013-04-16 Pedro Alves <palves@redhat.com>
6274
6275 * linux-low.h (struct lwp_info) <thread_known>: Move under
6276 the USE_THREAD_DB #ifdef.
6277
04f5fe89
PA
62782013-04-16 Pedro Alves <palves@redhat.com>
6279
6280 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6281 (linux-low.o): Delete rule.
6282 * linux-low.h: Always include "gdb_thread_db.h" instead of
6283 conditionally including thread_db.h.
6284 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6285 HAVE_THREAD_DB_H.
6286
480b27bf
JK
62872013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6288
6289 * Makefile.in (install-only): Fix make install regression.
6290
43662968
JK
62912013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6292
6293 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6294 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6295 installation.
6296 * gdbserver.1: Remove.
6297
3e74e146
PA
62982013-03-22 Pedro Alves <palves@redhat.com>
6299
6300 * linux-low.c (handle_extended_wait): Don't call
6301 linux_enable_event_reporting.
6302
a8347a2a
TT
63032013-03-15 Tony Theodore <tonyt@logyst.com>
6304
6305 PR build/9098:
6306 * Makefile.in (SHELL): Use @SHELL@.
6307
eeb56fa7
SDJ
63082013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6309
6310 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6311 compiler warning.
6312
4fa7e2ff
JB
63132013-03-13 Joel Brobecker <brobecker@adacore.com>
6314
6315 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6316 Remove extraneous NULL element.
6317
8ddb1965
YQ
63182013-03-13 Yao Qi <yao@codesourcery.com>
6319
6320 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6321 'V' block in trace frame.
6322
9accd112
MM
63232013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6324
6325 * target.h (struct target_ops): Add btrace ops.
6326 (target_supports_btrace): New macro.
6327 (target_enable_btrace): New macro.
6328 (target_disable_btrace): New macro.
6329 (target_read_btrace): New macro.
6330 * gdbthread.h (struct thread_info): Add btrace field.
6331 * server.c: Include btrace-common.h.
6332 (handle_btrace_general_set): New function.
6333 (handle_btrace_enable): New function.
6334 (handle_btrace_disable): New function.
6335 (handle_general_set): Call handle_btrace_general_set.
6336 (handle_qxfer_btrace): New function.
6337 (struct qxfer qxfer_packets[]): Add btrace entry.
6338 * inferiors.c (remove_thread): Disable btrace.
6339 * linux-low: Include linux-btrace.h.
6340 (linux_low_enable_btrace): New function.
6341 (linux_low_read_btrace): New function.
6342 (linux_target_ops): Add btrace ops.
6343 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6344 Add srv_linux_btrace=yes.
6345 (x86_64-*-linux*): Add linux-btrace.o.
6346 Add srv_linux_btrace=yes.
6347 * configure.ac: Define HAVE_LINUX_BTRACE.
6348 * config.in: Regenerated.
6349 * configure: Regenerated.
6350
5cc22e4c
MM
63512013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6352
6353 * server.c (handle_qxfer): Preserve error message if -3 is
6354 returned.
6355 (qxfer): Document the -3 return value.
6356
7c97f91e
MM
63572013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6358
6359 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6360 (linux_btrace_h): New variable.
6361 (linux-btrace.o): New rule.
6362
be9a119c 63632013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6364 Hafiz Abid Qadeer <abidh@codesourcery.com>
6365
6366 * tracepoint.c (trace_buffer_size): New global.
6367 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6368 (init_trace_buffer): Change to one-argument function. Allocate
6369 trace buffer memory.
6370 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6371 handle QTBuffer:size packet.
6372 (cmd_bigqtbuffer_size): New function.
6373 (initialize_tracepoint): Call init_trace_buffer with
6374 DEFAULT_TRACE_BUFFER_SIZE.
6375 * server.c (handle_query): Add QTBuffer:size in the
6376 supported packets.
6377
e64f7499
YQ
63782013-03-07 Yao Qi <yao@codesourcery.com>
6379
6380 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6381 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6382 of -1.
6383 (cmd_qtsp): Adjust condition. Do post increment.
6384 Set cur_action and cur_step_action back to 0.
6385
f0ae6fc3
PA
63862013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6387
6388 PR server/15236
6389 * linux-low.c (linux_write_memory): Return early success if LEN is
6390 zero.
6391
b5b0b0af
CV
63922013-03-05 Corinna Vinschen <vinschen@redhat.de>
6393
334ad4a8 6394 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6395
589bc927
TT
63962013-02-28 Tom Tromey <tromey@redhat.com>
6397
6398 * configure.ac: Invoke AC_SYS_LARGEFILE.
6399 * configure, config.in: Rebuild.
6400
dfe07582
CV
64012013-02-28 Corinna Vinschen <vinschen@redhat.com>
6402
6403 * win32-low.c: Throughout, fix format strings and casts of
6404 printf-like functions to avoid type related warnings on all
6405 platforms.
6406 (get_child_debug_event): Print dwDebugEventCode as hex since
6407 that's how it's usually documented.
6408
736cd585
YQ
64092013-02-28 Yao Qi <yao@codesourcery.com>
6410
6411 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6412 pulongest.
6413
e1f58301
JW
64142013-02-27 Jiong Wang <jiwang@tilera.com>
6415
6416 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6417 (reg-tilegx32.c): New rule.
6418 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6419 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6420 different register info initializer according to elf class.
6421 (init_registers_tilgx32): New function. The tilegx32 register info
6422 initializer.
6423 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6424 (tile_store_gregset): Likewise.
6425
d171ca78
YQ
64262013-02-27 Yao Qi <yao@codesourcery.com>
6427
6428 * server.c (process_point_options): Print debug message when
6429 debug_threads is true.
6430
282bbdf3
YQ
64312013-02-26 Yao Qi <yao@codesourcery.com>
6432
6433 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6434
aca22551
PA
64352013-02-19 Pedro Alves <palves@redhat.com>
6436 Kai Tietz <ktietz@redhat.com>
6437
6438 PR gdb/15161
6439
6440 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6441 instead of strtoul to extract address from packet.
6442 (process_serial_event) <'z'>: Likewise.
6443
4f3cee1c
YQ
64442013-02-18 Yao Qi <yao@codesourcery.com>
6445
6446 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6447
8e1d55a3
PA
64482013-02-14 Pedro Alves <palves@redhat.com>
6449
6450 Plug memory leak.
6451
6452 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6453 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6454
458820da
PA
64552013-02-14 Pedro Alves <palves@redhat.com>
6456
6457 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6458
baea0dae
PA
64592013-02-14 Pedro Alves <palves@redhat.com>
6460
6461 * tracepoint.c (save_string): Delete.
6462 (add_tracepoint_action): Use savestring instead of save_string.
6463
0b1afbb3
PA
64642013-02-12 Pedro Alves <palves@redhat.com>
6465
6466 * linux-xtensa-low.c: Ditto.
6467 * xtensa-xtregs.c: Ditto.
6468
8a4ac37e
PA
64692013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6470
6471 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6472 thread_db.
6473
148de6bb
MS
64742013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6475
6476 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6477 aarch64_num_wp_regs and aarch64_num_bp_regs to
6478 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6479
55fac6e0
MS
64802013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6481
6482 * linux-aarch64-low.c (ps_get_thread_area): Replace
6483 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6484
176eb98c
MS
64852013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6486 Marcus Shawcroft <marcus.shawcroft@arm.com>
6487 Nigel Stephens <nigel.stephens@arm.com>
6488 Yufeng Zhang <yufeng.zhang@arm.com>
6489
6490 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6491 (aarch64.c, aarch64-without-fpu.c): New targets.
6492 * configure.srv (aarch64*-*-linux*): New.
6493 * linux-aarch64-low.c: New file.
6494
56f7af9c
MS
64952013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6496
43aaf8b6 6497 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
6498 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6499 (dequeue_one_deferred_signal, linux_resume_one_thread)
6500 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6501 (linux_tracefork_grandchild, linux_test_for_tracefork)
6502 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6503 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6504 where the argument is 0.
6505
60f662b0
YQ
65062013-01-25 Yao Qi <yao@codesourcery.com>
6507
6508 * event-loop.c: Include "queue.h".
6509 (gdb_event_p): New typedef.
6510 (struct gdb_event) <next_event>: Remove.
6511 (event_queue): Change to QUEUE(gdb_event_p).
6512 (async_queue_event): Remove.
6513 (gdb_event_xfree): New.
6514 (initialize_event_loop): New.
6515 (process_event): Use API from QUEUE.
6516 (wait_for_event): Likewise.
6517 * server.c (main): Call initialize_event_loop.
6518 * server.h (initialize_event_loop): Declare.
6519
5ae4861a
YQ
65202013-01-18 Yao Qi <yao@codesourcery.com>
6521
6522 * ax.h (struct eval_agent_expr_context): New.
6523 (gdb_eval_agent_expr): Update declaration.
6524 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6525 TFRAME. Add new argument CTX.
6526 * server.h (struct eval_agent_expr_context): Declare.
6527 (agent_mem_read, agent_tsv_read): Update declaration.
6528 (agent_mem_read_string): Likewise.
6529 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6530 (add_traceframe_block): Add new argument TPOINT.
6531 Increase TPOINT->traceframe_usage.
6532 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6533 eval_tracepoint_agent_expr.
6534 (condition_true_at_tracepoint): Likewise.
6535 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6536 (agent_mem_read_string, agent_tsv_read): Likewise.
6537
85e00e85
YQ
65382013-01-16 Yao Qi <yao@codesourcery.com>
6539
6540 * linux-low.c (linux_resume_one_lwp): Don't check
6541 'lwp->bp_reinsert != 0'.
6542
4039cf45
JB
65432013-01-07 Joel Brobecker <brobecker@adacore.com>
6544 Pedro Alves <palves@redhat.com>
6545
6546 * lynx-low.c (ptrace_request_to_str): Define a temporary
6547 macro and use it to simplify this function's implementation.
6548
9044dee2
JB
65492013-01-07 Joel Brobecker <brobecker@adacore.com>
6550
6551 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6552 sets errno.
6553
e6352c8f
JB
65542013-01-07 Joel Brobecker <brobecker@adacore.com>
6555
6556 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6557
50681a27
JB
65582013-01-07 Joel Brobecker <brobecker@adacore.com>
6559
6560 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6561
3f6e77ef
JB
65622013-01-07 Joel Brobecker <brobecker@adacore.com>
6563
6564 * lynx-low.c (lynx_resume): Use the resume_info parameter
6565 to determine the ptid for the lynx_ptrace call, unless
6566 it is equal to minus_one_ptid, in which case we use the
6567 ptid of the current_inferior.
6568 (lynx_wait_1): After having received a thread create/exit
6569 event, resume the inferior's execution using the signaling
6570 thread's ptid, rather than the old ptid.
6571
7fda33ae
JB
65722013-01-07 Joel Brobecker <brobecker@adacore.com>
6573
6574 * lynx-low.c (lynx_resume): Delete variable ret.
6575
b9786c74
JB
65762013-01-01 Joel Brobecker <brobecker@adacore.com>
6577
6578 * gdbreplay.c (gdbreplay_version): Update copyright year.
6579 * server.c (gdbserver_version): Likewise.
6580
8b93d60f
JB
65812012-12-17 Joel Brobecker <brobecker@adacore.com>
6582
6583 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6584 new thread.
6585
037335a7
JB
65862012-12-17 Joel Brobecker <brobecker@adacore.com>
6587
6588 * lynx-low.c (ptrace_request_to_str): Add handling for
6589 PTRACE_GETTRACESIG.
6590
52d4cbd8
JB
65912012-12-17 Joel Brobecker <brobecker@adacore.com>
6592
6593 * lynx-low.c (lynx_attach): Delete variable new_process.
6594
ab8f6ca9
JB
65952012-12-17 Joel Brobecker <brobecker@adacore.com>
6596
6597 * lynx-low.c (lynx_create_inferior): Delete variable
6598 new_process.
6599
78cbc024
JB
66002012-12-17 Joel Brobecker <brobecker@adacore.com>
6601
6602 * lynx-low.c (ptrace_request_to_str): Do not handle
6603 PTRACE_GETTHREADLIST if this macro does not exist.
6604
14a00470
YQ
66052012-12-15 Yao Qi <yao@codesourcery.com>
6606
6607 * Makefile.in (OBS): Add notif.o.
6608 * notif.c, notif.h: New.
6609 * server.c: Include "notif.h".
6610 (struct vstop_notif) <next>: Remove.
6611 <base>: New field.
6612 (queue_stop_reply): Update.
6613 (push_event, send_next_stop_reply): Remove.
6614 (discard_queued_stop_replies): Update.
6615 (notif_stop): New variable.
6616 (handle_v_stopped): Remove.
6617 (handle_v_requests): Don't call handle_v_stopped. Call
6618 handle_ack_notif instead.
6619 (queue_stop_reply_callback): Call notif_event_enque instead
6620 of queue_stop_reply.
6621 (handle_status): Don't call send_next_stop_reply, call
6622 notif_write_event instead.
6623 (kill_inferior_callback): Likewise.
6624 (detach_or_kill_inferior_callback): Likewise.
6625 (main): Call initialize_notif.
6626 (process_serial_event): Call QUEUE_is_empty.
6627 (handle_target_event): Call notif_push instead of push event.
6628 * server.h (push_event): Remove declaration.
6629
61c125b9
TT
66302012-12-10 Tom Tromey <tromey@redhat.com>
6631
6632 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6633 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6634 macros.
6635 (.c.o): Rewrite.
6636 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6637 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6638 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6639 (amd64-linux-ipa.o, ax.o): Rewrite.
6640 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6641 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6642 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6643 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6644 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6645 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6646 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6647 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6648 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6649 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6650 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6651 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6652 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6653 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6654 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6655 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6656 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6657 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6658 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6659 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6660 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6661 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6662 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6663 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6664 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6665 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6666 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6667 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6668 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6669 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6670 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6671 (reg-tilegx.o): Remove.
6672 (all_object_files): New macro.
6673 Include .deps files.
6674 * aclocal.m4, configure: Rebuild.
6675 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6676 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6677 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6678
e90e9ad9
TT
66792012-12-05 Tom Tromey <tromey@redhat.com>
6680
6681 PR gdb/14917:
6682 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6683
02d403bf 66842012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
6685
6686 * configure.ac: Check for linux/perf_event.h.
6687 * config.in: Regenerated.
6688 * configure: Regenerated.
6689
0270a750
PA
66902012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6691
6692 * hostio.c (handle_readlink): Decrease buffer size
6693 parameter passed to readlink by one byte.
6694
8c29b58e
YQ
66952012-11-26 Yao Qi <yao@codesourcery.com>
6696
6697 * configure.ac (build_warnings): Append '-Wempty-body'.
6698 * configure: Regenerated.
6699 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6700 body.
6701
8bdce1ff
PM
67022012-11-15 Pierre Muller <muller@sourceware.org>
6703
6704 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6705 * config.in: Regenerate.
6706 * configure: Regenerate.
6707 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6708 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6709 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6710 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6711 header.
6712 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6713 instead of <sys/wait.h> header.
6714 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6715
02d403bf 67162012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6717
6718 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6719 (various make rules): Remove -DGDBSERVER
6720
fbd5db48
YQ
67212012-11-09 Yao Qi <yao@codesourcery.com>
6722
6723 * spu-low.c (current_ptid): Move it to ..
6724 * gdbthread.h: ... here. New.
6725 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6726 * server.c (myresume, process_serial_event): Likewise.
6727 * thread-db.c (thread_db_find_new_threads): Likewise.
6728 * tracepoint.c (run_inferior_command): Likewise.
6729
b3dc46ff
AB
67302012-10-01 Andrew Burgess <aburgess@broadcom.com>
6731
6732 * server.c (handle_search_memory_1): Include access length in
6733 warning message.
6734
07c04788
HPN
67352012-09-05 Michael Brandt <michael.brandt@axis.com>
6736
6737 * linux-crisv32-low.c: Fix compile errors.
6738
918d227b
YQ
67392012-09-04 Yao Qi <yao@codesourcery.com>
6740
6741 * tracepoint.c (cmd_qtsv): Adjust debug message.
6742 Don't check CUR_TPOINT.
6743
18c1b81a
YQ
67442012-08-28 Yao Qi <yao@codesourcery.com>
6745
6746 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6747 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6748 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6749 Remove declarations of xmalloc, xreallloc, xstrdup and
6750 freeargv.
6751 * Makefile.in (libiberty_h): New.
6752 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6753 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6754
dc82f37b
YQ
67552012-08-23 Yao Qi <yao@codesourcery.com>
6756
6757 * server.h: Remove declaration of 'xsnprintf'.
6758
406b1477
KS
67592012-08-22 Keith Seitz <keiths@redhat.com>
6760
6761 * server.h: Include build-gnulib-gbserver/config.h.
6762 * gdbreplay.c: Likewise.
6763
e6712ff1
DE
67642012-08-08 Doug Evans <dje@google.com>
6765
6766 * Makefile.in (SFILES): Add gdb_vecs.c.
6767 (OBS): Add gdb_vecs.o.
6768 (gdb_vecs_h, host_defs_h): New variables.
6769 (thread-db.o): Add $(gdb_vecs_h) dependency.
6770 (gdb_vecs.o): New rule.
6771 * thread-db.c: #include "gdb_vecs.h".
6772 (thread_db_load_search): Use a vector to iterate over path elements.
6773 Handle text appearing after "$pdir".
6774
6775 * configure.ac: Add check for strstr.
6776 * config.in: Regenerate.
6777 * configure: Regenerate.
6778
7c3270ae
UW
67792012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6780
6781 * hostio.c (handle_pread): If pread fails, fall back to attempting
6782 lseek/read.
6783 (handle_pwrite): Likewise for pwrite.
6784
b62e2b27
UW
67852012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6786
6787 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6788 between unsupported TYPE and unimplementable ADDR/LEN combination.
6789 (arm_insert_point): Act on new return value.
6790
78a99e91
PA
67912012-07-31 Pedro Alves <palves@redhat.com>
6792
6793 * server.c (process_point_options): Only skip tokens if we find
6794 one that is unrecognized. Don't treat 'X' specially while
6795 skipping unrecognized tokens.
6796
fcf303ab
UW
67972012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6798
6799 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6800 to 4-byte-align HW breakpoint addresses for Thumb.
6801
7255706c
YQ
68022012-07-27 Yao Qi <yao@codesourcery.com>
6803
6804 PR remote/14161.
6805
6806 * server.h: Declare gdb_agent_about_to_close.
6807 * target.c (kill_inferior): Include "agent.h".
6808 New. Send command 'kill'.
6809 * target.h (kill_inferior): Removed macro.
6810 * tracepoint.c (gdb_agent_about_to_close): New.
6811 (gdb_agent_helper_thread): Handle command 'close'.
6812 Wait endlessly until the inferior stops.
6813 Install gdb_agent_remove_socket to atexit hook.
6814 (agent_socket_name): New static variable.
6815 (gdb_agent_socket_init): Replace local variable 'name' with
6816 'agent_socket_name'.
6817 (gdb_agent_remove_socket): New.
6818
5a3f286f
YQ
68192012-07-27 Yao Qi <yao@codesourcery.com>
6820
6821 * server.c (process_point_options): Stop at 'X' when parsing.
6822
961bd387
ME
68232012-07-19 Michael Eager <eager@eagercon.com>
6824
a261b8f5 6825 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6826 to hw_execute.
6827 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6828 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6829 hardware breakpoint.
6830
aa7c7447
JK
68312012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6832
6833 * gdbserver/linux-low.c (initialize_low): Call
6834 linux_ptrace_init_warnings.
6835
7f216e7c
DE
68362012-07-02 Doug Evans <dje@google.com>
6837
6838 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6839 pointer to int.
6840
d3ce09f5
SS
68412012-07-02 Stan Shebs <stan@codesourcery.com>
6842
6843 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6844 (ax.o): Add it to build rule.
6845 (ax-ipa.o): Ditto.
6846 (OBS): Add format.o.
6847 (IPA_OBS): Add format.o.
6848 * server.c (handle_query): Claim support for breakpoint commands.
6849 (process_point_options): Add command case.
6850 (process_serial_event): Leave running if there are printfs in
6851 effect.
6852 * mem-break.h (any_persistent_commands): Declare.
6853 (add_breakpoint_commands): Declare.
6854 (gdb_no_commands_at_breakpoint): Declare.
6855 (run_breakpoint_commands): Declare.
6856 * mem-break.c (struct point_command_list): New struct.
6857 (struct breakpoint): New field command_list.
6858 (any_persistent_commands): New function.
6859 (add_commands_to_breakpoint): New function.
6860 (add_breakpoint_commands): New function.
6861 (gdb_no_commands_at_breakpoint): New function.
6862 (run_breakpoint_commands): New function.
6863 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6864 locally.
6865 * ax.c: Include format.h.
6866 (ax_printf): New function.
6867 (gdb_eval_agent_expr): Add printf opcode.
6868
2f8f6aed
YQ
68692012-06-13 Yao Qi <yao@codesourcery.com>
6870
6871 * server.c (start_inferior): Remove duplicated writes to fields
6872 'last_resume_kind' and 'last_status' of 'current_inferior'.
6873
0c9070b3
YQ
68742012-06-12 Yao Qi <yao@codesourcery.com>
6875 Pedro Alves <palves@redhat.com>
6876
6877 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6878 comment.
6879 * server.c (handle_v_cont): Extend comment.
6880
c52daf70
YQ
68812012-06-11 Yao Qi <yao@codesourcery.com>
6882
6883 * linux-low.c (linux_attach): Add 'static'.
6884
d38bbb0a
YQ
68852012-06-06 Yao Qi <yao@codesourcery.com>
6886
6887 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6888
89dc0afd
JK
68892012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6890
6891 Fix gcc -flto compilation warning.
6892 * server.c (main): Make variable multi_mode and attach volatile.
6893
75f62ce7
TJB
68942012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6895
6896 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6897 if the platform doesn't know about it.
6898
65f479b6
PA
68992012-05-30 Jeff Kenton <jkenton@tilera.com>
6900
6901 * Makefile.in (SFILES): Add linux-tile-low.c.
6902 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6903 * configure.srv: Handle tilegx-*-linux*.
6904 * linux-tile-low.c: New file.
6905
0c5bf5a9
JK
69062012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6907
6908 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6909
a493e3e2
PA
69102012-05-24 Pedro Alves <palves@redhat.com>
6911
6912 PR gdb/7205
6913
43aaf8b6 6914 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6915
2ea28649
PA
69162012-05-24 Pedro Alves <palves@redhat.com>
6917
6918 PR gdb/7205
6919
6920 Replace target_signal with gdb_signal throughout.
6921
8d409d16
MR
69222012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6923
6924 * linux-low.c (linux_store_registers): Avoid the copying sequence
6925 when no data has been retrieved by ptrace.
6926
23512c01
MGD
69272012-05-22 Will Deacon <will.deacon@arm.com>
6928
6929 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6930 Include asm/ptrace.h.
6931 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6932 already defined.
6933
4934b29e
MR
69342012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6935
6936 * linux-low.c (linux_store_registers): Don't re-retrieve data
6937 with ptrace that has already been obtained from /proc. Always
6938 copy any data retrieved with ptrace to the buffer supplied.
6939
bde24c0a
PA
69402012-05-11 Yao Qi <yao@codesourcery.com>
6941 Pedro Alves <palves@redhat.com>
6942
6943 * linux-low.c (enum stopping_threads_kind): New.
6944 (stopping_threads): Change type to `enum stopping_threads_kind'.
6945 (handle_extended_wait): If stopping and suspending threads, leave
6946 the new_lwp suspended too.
6947 (linux_wait_for_event): Adjust.
6948 (stop_all_lwps): Set `stopping_threads' to
6949 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6950 whether we're suspending threads or just stopping them. Assert no
6951 recursion happens.
6952
623b6bdf
YQ
69532012-04-29 Yao Qi <yao@codesourcery.com>
6954
6955 * server.h: Move some code to ...
6956 * gdbthread.h: ... here. New.
6957 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6958 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6959 (nto-low.o, win32-low.o): Likewise.
6960 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6961 * regcache.c, remote-utils.c, server.c: Likewise.
6962 * target.c, tracepoint.c, win32-low.c: Likewise.
6963
f15f9948
TJB
69642012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6965
6966 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6967 (PTRACE_ARG4_TYPE): Likewise.
6968 (PTRACE_XFER_TYPE): Likewise.
6969 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6970 ptrace to PTRACE_ARG3_TYPE.
6971 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6972 (PTRACE_ARG4_TYPE): Likewise.
6973 (PTRACE_XFER_TYPE): Likewise.
6974 (linux_detach_one_lwp): Cast fourth argument of
6975 ptrace to long then PTRACE_ARG4_TYPE.
6976 (regsets_fetch_inferior_registers): Cast third argument of
6977 ptrace to long then PTRACE_ARG3_TYPE.
6978 (regsets_store_inferior_registers): Likewise.
6979
38ea300a
PA
69802012-04-20 Pedro Alves <palves@redhat.com>
6981
6982 * configure: Regenerate.
6983
c971b7fa
PA
69842012-04-19 Pedro Alves <palves@redhat.com>
6985
43aaf8b6 6986 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6987 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6988 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6989 (all, install-only, uninstall, clean-info, all-lib, clean): No
6990 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6991 (maintainer-clean realclean distclean): Use subdir_do.
6992 (subdir_do): New.
6993 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6994 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6995 * acinclude.m4: Include acx_configure_dir.m4.
6996 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6997 calls. Call AC_PROG_RANLIB. Configure gnulib using
6998 ACX_CONFIGURE_DIR.
6999 (GNULIB): New.
7000 (GNULIB_STDINT_H): Adjust.
7001 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7002 * gdbreplay.c: Include build-gnulib/config.h.
7003 * server.h: Likewise.
7004 * aclocal.m4: Regenerate.
7005 * config.in: Regenerate.
7006 * configure: Regenerate.
c971b7fa 7007
809277f8
PA
70082012-04-19 Pedro Alves <palves@redhat.com>
7009
7010 * Makefile.in (LIBGNU, INCGNU): Adjust.
7011 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7012 (all, install-only, uninstall, clean-info, all-lib, clean)
7013 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7014 * configure.ac: Adjust AC_OUTPUT output.
7015 * aclocal.m4: Regenerate.
7016 * configure: Regenerate.
7017
fd9bb8b8
PA
70182012-04-19 Pedro Alves <palves@redhat.com>
7019
7020 * Makefile.in (generated_files): New.
7021 (server_h): Remove the explicit dependency on config.h, and depend
7022 on $generated_files.
7023
1c298c66
PA
70242012-04-19 Pedro Alves <palves@redhat.com>
7025
7026 * Makefile.in (INCGNU): Add -Ignulib.
7027
57c4b50b
PA
70282012-04-19 Pedro Alves <palves@redhat.com>
7029
7030 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7031 (INCGNU): ... this, and spell out -I here.
7032 (GNULIB_LIB): Rename to ...
7033 (LIBGNU): ... this.
7034 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7035
1030e047
PA
70362012-04-19 Pedro Alves <palves@redhat.com>
7037
7038 * config.in: Regenerate.
7039
447d4319
PA
70402012-04-19 Pedro Alves <palves@redhat.com>
7041
7042 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7043 * server.h (memmem): Remove declaration.
7044 * config.in: Regenerate.
7045 * configure: Regenerate.
7046
aad9eab9
YQ
70472012-04-19 Yao Qi <yao@codesourcery.com>
7048
7049 * Makefile.in (SFILES): Add common/vec.c.
7050 (OBS): Add vec.o.
7051 (vec.o): New rule.
7052
3e10640f
YQ
70532012-04-19 Yao Qi <yao@codesourcery.com>
7054
7055 * remote-utils.c (prepare_resume_reply): Replace with macro
7056 target_core_of_thread.
7057 * server.c (handle_qxfer_threads_proper): Likewise.
7058 * target.h (traget_core_of_thread): New macro.
7059
71622373
PA
70602012-04-18 Pedro Alves <palves@redhat.com>
7061
7062 * aclocal.m4: Regenerate.
7063 * configure: Regenerate.
7064
80d26939
YQ
70652012-04-16 Yao Qi <yao@codesourcery.com>
7066
7067 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7068 duplicated on address.
7069
42476b70
YQ
70702012-04-16 Yao Qi <yao@codesourcery.com>
7071
7072 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7073 (struct tracepoint_action_ops) <send>: New field.
7074 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7075 (agent_expr_send, x_tracepoint_action_send): New.
7076 (l_tracepoint_action_send): New.
7077 (cmd_qtdp): Download and install tracepoint
7078 according to `use_agent'.
7079 (run_inferior_command): Add one more parameter `len'.
7080 Update callers.
7081 (tracepoint_send_agent): New.
7082 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7083
7bc83639
YQ
70842012-04-16 Yao Qi <yao@codesourcery.com>
7085
7086 * tracepoint.c (download_tracepoints): Moved to ...
7087 (cmd_qtstart): ... here.
7088
5f18041e
YQ
70892012-04-14 Yao Qi <yao@codesourcery.com>
7090
7091 * tracepoint.c: Include inttypes.h.
7092 (struct collect_memory_action): Use sized types.
7093 (struct tracepoint): Likewise.
7094 (cmd_qtdp, stop_tracing): Update print specifiers.
7095 (cmd_qtp, response_tracepoint): Likewise.
7096 (collect_data_at_tracepoint): Likewise.
7097 (collect_data_at_step): Likewise.
7098
55a8c076
YQ
70992012-04-14 Yao Qi <yao@codesourcery.com>
7100
7101 Import gnulib module inttypes.
7102 * aclocal.m4, config.in, configure: Regenerated.
7103
dc750257
YQ
71042012-04-14 Yao Qi <yao@codesourcery.com>
7105
7106 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7107 Makefile and config.status at last.
7108
0ab5faf9
YQ
71092012-04-13 Yao Qi <yao@codesourcery.com>
7110
7111 * tracepoint.c: Include stdint.h unconditionally.
7112
18f5fd81
TJB
71132012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7114
7115 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7116 on BFD_HAVE_SYS_PROCFS_TYPE.
7117 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7118 * configure: Regenerate.
7119 * config.in: Likewise.
7120
4d47af5c
L
71212012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7122
7123 * Makefile.in (clean): Also remove x32.c x32-linux.c
7124 x32-avx.c x32-avx-linux.c.
7125 (x32.o): New target.
7126 (x32.c): Likewise.
7127 (x32-linux.o): Likewise.
7128 (x32-linux.c): Likewise.
7129 (x32-avx.o): Likewise.
7130 (x32-avx.c): Likewise.
7131 (x32-avx-linux.o): Likewise.
7132 (x32-avx-linux.c): Likewise.
7133
7134 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7135 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7136 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7137 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7138 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7139 i386/x32-avx-linux.xml.
7140
7141 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7142 (init_registers_x32_avx_linux): Likwise.
7143 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7144 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7145
ecedbe58
PA
71462012-04-13 Pedro Alves <palves@redhat.com>
7147
7148 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7149 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7150 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7151 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7152 the sub-make.
7153
c92b5177
L
71542012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7155
7156 * linux-x86-low.c (compat_x32_clock_t): New.
7157 (compat_x32_siginfo_t): Likewise.
7158 (compat_x32_siginfo_from_siginfo): Likewise.
7159 (siginfo_from_compat_x32_siginfo): Likewise.
7160 (linux_is_elf64): Likewise.
7161 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7162 and siginfo_from_compat_x32_siginfo for x32.
7163 (x86_arch_setup): Set linux_is_elf64.
7164
214d508e
L
71652012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7166
7167 PR gdb/13969
7168 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7169 e_machine field.
7170 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7171 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7172 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7173 compatible with process.
7174
c9a1864a
YQ
71752012-04-12 Yao Qi <yao@codesourcery.com>
7176
7177 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7178 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7179 (install-only, install-info, clean): Handle sub dir gnulib.
7180 (all-lib, am--refresh): New targets.
7181 (memmem.o): Remove target.
7182 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7183 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7184 (AC_REPLACE_FUNCS): Remove memmem.
7185 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7186 (AC_OUTPUT): Generate Makefile in gnulib/.
7187 * aclocal.m4, config.in, configure: Regenerated.
7188
367ba2c2
MR
71892012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7190
7191 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7192
9d236627
PA
71932012-04-05 Pedro Alves <palves@redhat.com>
7194
7195 -Werror=strict-aliasing
7196
7197 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7198 pointer.
7199
111217b3
PA
72002012-04-04 Pedro Alves <palves@redhat.com>
7201
7202 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7203 (sparc_store_gregset_from_stack, sparc_store_gregset)
7204 (sparc_breakpoint_at): Fix formatting.
7205
8365dcf5
TJB
72062012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7207
7208 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7209 are available.
7210 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7211 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7212 * config.in: Regenerate.
7213 * configure: Likewise.
7214
689cc2ae
PA
72152012-03-29 Pedro Alves <palves@redhat.com>
7216
7217 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7218 Correct ptrace arguments.
7219
c14dfd32
PA
72202012-03-28 Pedro Alves <palves@redhat.com>
7221
7222 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7223 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7224 (IA64_FR1_REGNUM): New defines.
7225 (ia64_fetch_register): New.
7226 (the_low_target): Install it.
7227 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7228 field.
7229 * linux-low.c (linux_fetch_registers): Try the
7230 the_low_target.fetch_register hook first.
7231
7232 * linux-arm-low.c (the_low_target): Adjust.
7233 * linux-bfin-low.c (the_low_target): Adjust.
7234 * linux-cris-low.c (the_low_target): Adjust.
7235 * linux-crisv32-low.c (the_low_target): Adjust.
7236 * linux-m32r-low.c (the_low_target): Adjust.
7237 * linux-m68k-low.c (the_low_target): Adjust.
7238 * linux-mips-low.c (the_low_target): Adjust.
7239 * linux-ppc-low.c (the_low_target): Adjust.
7240 * linux-s390-low.c (the_low_target): Adjust.
7241 * linux-sh-low.c (the_low_target): Adjust.
7242 * linux-sparc-low.c (the_low_target): Adjust.
7243 * linux-tic6x-low.c (the_low_target): Adjust.
7244 * linux-x86-low.c (the_low_target): Adjust.
7245 * linux-xtensa-low.c (the_low_target): Adjust.
7246
63c88e13
PA
72472012-03-26 Pedro Alves <palves@redhat.com>
7248
7249 * server.c (handle_qxfer_libraries): Don't bail early if
7250 the_target->qxfer_libraries_svr4 is not NULL.
7251
fb723180
PA
72522012-03-26 Pedro Alves <palves@redhat.com>
7253
7254 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7255
0afae3cf
PA
72562012-03-23 Pedro Alves <palves@redhat.com>
7257
7258 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7259 "library-list-svr4" element's start tag when the the DSO list is
7260 empty.
7261
485f1ee4
PA
72622012-03-23 Pedro Alves <palves@redhat.com>
7263
7264 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7265 a variable whose type size is the same as the inferior's pointer
7266 size.
7267
a5362b9a
TS
72682012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7269
7270 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7271 struct siginfo.
7272 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7273 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7274 * linux-low.h: Include <signal.h>.
7275 (struct siginfo): Remove forward declaration.
7276 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7277 struct siginfo.
7278
d226c142
MF
72792012-03-21 Mike Frysinger <vapier@gentoo.org>
7280
7281 * .gitignore: Ignore more files.
7282
122f36ef
PA
72832012-03-19 Pedro Alves <palves@redhat.com>
7284 Jan Kratochvil <jan.kratochvil@redhat.com>
7285
7286 * server.c (cont_thread, general_thread): Add describing comments.
7287 (start_inferior): Clear `cont_thread'.
7288 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7289 of a process.
7290
fc3e5175
YQ
72912012-03-15 Yao Qi <yao@codesourcery.com>
7292
7293 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7294 handling to ...
7295 (cmd_qtdp): ... here.
7296
8d0d92cd
YQ
72972012-03-15 Yao Qi <yao@codesourcery.com>
7298
7299 * tracepoint.c (struct tracepoint_action_ops): New.
7300 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7301 (m_tracepoint_action_download): New.
7302 (r_tracepoint_action_download): New.
7303 (x_tracepoint_action_download): New.
7304 (l_tracepoint_action_download): New.
7305 (add_tracepoint_action): Install `action->ops' according type.
7306 (download_tracepoint_1): Move code `download' function pointer
7307 of various tracepoint_action_ops.
7308
87b0bb13
JK
73092012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7310
7311 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7312 linux_ptrace_attach_warnings.
7313
5f572dec
JK
73142012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7315
7316 * Makefile.in (linux-ptrace.o): New.
7317 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7318 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7319 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7320 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7321 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7322 of these targets.
7323 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7324
f4647387
YQ
73252012-03-08 Yao Qi <yao@codesourcery.com>
7326 Pedro Alves <palves@redhat.com>
7327
7328 Fix PR server/13392.
7329 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7330 offset of JMP insn.
7331 * tracepoint.c (remove_tracepoint): New.
7332 (cmd_qtdp): Call remove_tracepoint when failed to install.
7333
9b224c5e
PA
73342012-03-07 Pedro Alves <palves@redhat.com>
7335
7336 * linux-low.c (get_detach_signal): New.
7337 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7338 Pass on pending signals to PTRACE_DETACH. Check the result of the
7339 ptrace call.
7340 * server.c (program_signals, program_signals_p): New.
7341 (handle_general_set): Handle QProgramSignals.
7342 * server.h (program_signals, program_signals_p): Declare.
7343
e237a7e2
JK
73442012-03-05 Pedro Alves <palves@redhat.com>
7345 Jan Kratochvil <jan.kratochvil@redhat.com>
7346
7347 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7348 New comment why.
7349
5808517f
YQ
73502012-03-03 Yao Qi <yao@codesourcery.com>
7351
7352 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7353 agent_look_up_symbols.
7354
58b4daa5
YQ
73552012-03-03 Yao Qi <yao@codesourcery.com>
7356
7357 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7358 (linux-x86-low.o): Likewise.
7359 * server.h: Remove in_process_agent_loaded.
7360 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7361 common/agent.c.
7362 Update callers.
7363
8ffcbaaf
YQ
73642012-03-03 Yao Qi <yao@codesourcery.com>
7365
7366 * tracepoint.c (gdb_agent_capability): New global.
7367 (in_process_agent_loaded_ust): Renamed to
7368 `in_process_agent_supports_ust'.
7369 Update callers.
7370 (in_process_agent_supports_ust): Call agent_capability_check.
7371 (clear_installed_tracepoints): Assert that agent supports
7372 agent.
7373
d1feda86
YQ
73742012-03-03 Yao Qi <yao@codesourcery.com>
7375
7376 * linux-low.c (linux_supports_agent): New.
7377 (linux_target_ops): Initialize field `supports_agent' with
7378 linux_supports_agent.
7379 * target.h (struct target_ops) <supports_agent>: New.
7380 (target_supports_agent): New macro.
7381 * server.c (handle_general_set): Handle packet 'QAgent'.
7382 (handle_query): Send `QAgent+'.
7383 * Makefile.in (server.o): Depends on agent.h.
7384
2fa291ac
YQ
73852012-03-03 Yao Qi <yao@codesourcery.com>
7386
7387 * Makefile.in (OBS): Add agent.o.
7388 Add new rule for agent.o.
7389 Track dependence of tracepoint.c on agent.h.
7390 * tracepoint.c (run_inferior_command_1):
7391 (run_inferior_command): Call agent_run_command.
7392 (gdb_ust_connect_sync_socket): Deleted. Move it to
7393 common/agent.c.
7394 (resume_thread, stop_thread): Likewise.
7395 (gdb_ust_socket_init): Renamed to ...
7396 (gdb_agent_socket_init): ... New.
7397 (gdb_ust_thread): Renamed to ...
7398 (gdb_agent_helper_thread): ... New.
7399 (gdb_ust_init): Move some code to ...
7400 (gdb_agent_init): ... here. New.
7401 [HAVE_UST]: Call gdb_ust_init.
7402 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7403 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7404 * config.in, configure: Regenerated.
7405
05044653
PA
74062012-03-02 Pedro Alves <palves@redhat.com>
7407
7408 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7409 * linux-low.c (struct simple_pid_list): New.
7410 (stopped_pids): New a struct simple_pid_list pointer.
7411 (add_to_pid_list, pull_pid_from_list): New.
7412 (handle_extended_wait): Don't assume the first signal new children
7413 report is SIGSTOP. Adjust call to pull_pid_from_list.
7414 (linux_wait_for_lwp): Adjust.
7415
8d00225b
YQ
74162012-03-02 Yao Qi <yao@codesourcery.com>
7417
7418 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7419 debug log.
7420
19560ba5
YQ
74212012-03-02 Yao Qi <yao@codesourcery.com>
7422
7423 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7424 `stop_pc' and `tpoint'. Update caller.
7425
1faeff08
MR
74262012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7427
7428 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7429 * linux-low.c (use_linux_regsets): New macro.
7430 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7431 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7432 (linux_register_in_regsets): New function.
7433 (usr_fetch_inferior_registers): Skip registers covered by
7434 regsets.
7435 (usr_store_inferior_registers): Likewise.
7436 (usr_fetch_inferior_registers): New macro.
7437 (usr_store_inferior_registers): Likewise.
7438 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7439 (linux_store_registers): Likewise.
7440 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7441 prototype.
7442 (init_registers_mips64_dsp_linux): Likewise.
7443 (init_registers_mips_linux): New macro.
7444 (init_registers_mips_dsp_linux): Likewise.
7445 (mips_dsp_num_regs): Likewise.
7446 (DSP_BASE, DSP_CONTROL): New fallback macros.
7447 (mips_base_regs): New macro.
7448 (mips_regmap): Use it. Fix the size.
7449 (mips_dsp_regmap): New variable.
7450 (mips_dsp_regset_bitmap): Likewise.
7451 (mips_arch_setup): New function.
7452 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7453 than mips_regmap.
7454 (mips_cannot_store_register): Likewise.
7455 (the_low_target): Update .arch_setup, .num_regs and .regmap
7456 initializers. Add .regset_bitmap initializer.
7457 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7458 initializer.
7459 * linux-bfin-low.c (the_low_target): Likewise.
7460 * linux-cris-low.c (the_low_target): Likewise.
7461 * linux-crisv32-low.c (the_low_target): Likewise.
7462 * linux-ia64-low.c (the_low_target): Likewise.
7463 * linux-m32r-low.c (the_low_target): Likewise.
7464 * linux-m68k-low.c (the_low_target): Likewise.
7465 * linux-ppc-low.c (the_low_target): Likewise.
7466 * linux-s390-low.c (the_low_target): Likewise.
7467 * linux-sh-low.c (the_low_target): Likewise.
7468 * linux-sparc-low.c (the_low_target): Likewise.
7469 * linux-tic6x-low.c (the_low_target): Likewise.
7470 * linux-x86-low.c (the_low_target): Likewise.
7471 * linux-xtensa-low.c (the_low_target): Likewise.
7472 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7473 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7474 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7475 srv_xmlfiles.
7476 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7477 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7478
c03e6ccc
YQ
74792012-02-29 Yao Qi <yao@codesourcery.com>
7480 Pedro Alves <palves@redhat.com>
7481
7482 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7483 `step_over_finished' is true.
7484
644cebc9
PA
74852012-02-27 Pedro Alves <palves@redhat.com>
7486
7487 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7488 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7489
c14d7ab2
PA
74902012-02-27 Pedro Alves <palves@redhat.com>
7491
7492 PR server/9684
7493 * linux-low.c (pid_is_stopped): New.
7494 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7495
412c89dd
LM
74962012-02-25 Luis Machado <lgustavo@codesourcery.com>
7497
7498 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7499 of conditions.
7500
b745defe
MR
75012012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7502
7503 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7504
9f3a5c85
LM
75052012-02-24 Luis Machado <lgustavo@codesourcery>
7506
7507 * server.c (handle_query): Advertise support for target-side
7508 breakpoint condition evaluation.
7509 (process_point_options): New function.
7510 (process_serial_event): When inserting a breakpoint, check for
7511 a target-side condition that should be evaluated.
7512
7513 * mem-break.c: Include regcache.h and ax.h.
7514 (point_cond_list_t): New data structure.
7515 (breakpoint) <cond_list>: New field.
7516 (find_gdb_breakpoint_at): Make non-static.
7517 (delete_gdb_breakpoint_at): Clear any target-side
7518 conditions.
7519 (clear_gdb_breakpoint_conditions): New function.
7520 (add_condition_to_breakpoint): Likewise.
7521 (add_breakpoint_condition): Likewise.
7522 (gdb_condition_true_at_breakpoint): Likewise.
7523 (gdb_breakpoint_here): Return result directly instead
7524 of going through a local variable.
7525
7526 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7527 (clear_gdb_breakpoint_conditions): Likewise.
7528 (add_breakpoint_condition): Likewise.
7529 (gdb_condition_true_at_breakpoint): Likewise.
7530
7531 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7532 (need_step_over_p): Take target-side breakpoint condition into
7533 consideration.
7534
5e1dc496
LM
75352012-02-24 Luis Machado <lgustavo@codesourcery>
7536
7537 * server.h: Include tracepoint.h.
7538 (agent_mem_read, agent_get_trace_state_variable_value,
7539 agent_set_trace_state_variable_value,
7540 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7541 get_set_tsv_func_addr): New prototypes.
7542
7543 * ax.h: New include file.
7544 * ax.c: New source file.
7545
7546 * tracepoint.c: Include ax.h.
7547 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7548 agent_expr, eval_result_type): Move to ax.h.
7549 (parse_agent_expr): Rename to ...
7550 (gdb_parse_agent_expr): ... this, make it non-static and move
7551 to ax.h.
7552 (unparse_agent_expr) Rename to ...
7553 (gdb_unparse_agent_expr): ... this, make it non-static and move
7554 to ax.h.
7555 (eval_agent_expr): Rename to ...
7556 (eval_tracepoint_agent_expr): ... this.
7557 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7558 forward declarations.
7559 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7560 (agent_get_trace_state_variable_value): New function.
7561 (agent_set_trace_state_variable_value): New function.
7562 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7563 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7564 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7565 (condition_true_at_tracepoint): Likewise.
7566 (parse_agent_expr): Rename to ...
7567 (gdb_parse_agent_expr): ... this and move to ax.c.
7568 (unparse_agent_expr): Rename to ...
7569 (gdb_unparse_agent_expr): ... this and move to ax.c.
7570 (gdb_agent_op_name): Move to ax.c.
7571 (eval_agent_expr): Rename to ...
7572 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7573 and move to ax.c.
7574 (eval_tracepoint_agent_expr): New function.
7575 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 7576 non-static.
5e1dc496
LM
7577 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7578 ax.c.
7579 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7580 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7581 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7582 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7583 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7584 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7585 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7586 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7587 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7588 (compile_bytecodes): Remove forward declaration.
7589 (is_goto_target): Move to ax.c.
7590 (compile_bytecodes): Move to ax.c and call
7591 agent_get_trace_state_variable_value (...) and
7592 agent_set_trace_state_variable_value (...).
7593
7594 * Makefile.in: Update ax.c and IPA dependencies.
7595
277e4e52
PA
75962012-02-24 Pedro Alves <palves@redhat.com>
7597
7598 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7599 (cmd_bigqtbuffer_circular): ... this. Only handle
7600 'QTBuffer:circular:'.
7601 (handle_tracepoint_general_set): Adjust.
7602
bf4c19f7
YQ
76032012-02-16 Yao Qi <yao@codesourcery.com>
7604
7605 * inferiors.c: Move code to ...
7606 * dll.c: .... here. New.
7607 * server.h: Declare clear_dlls.
7608 * Makefile.in (SFILES): Add dll.c.
7609 (OBS): Add dll.o
7610 (dll.o): New rule.
7611
d73f2619
YQ
76122012-02-11 Yao Qi <yao@codesourcery.com>
7613
7614 * server.c: (handle_monitor_command): Add a new parameter
7615 `own_buf'.
7616 (handle_query): Update caller.
7617
f8255c2a
JB
76182012-02-09 Joel Brobecker <brobecker@adacore.com>
7619
7620 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7621 * configure, config.in: Regenerate.
7622 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7623 is not defined.
7624
da84f473
PA
76252012-02-02 Pedro Alves <palves@redhat.com>
7626
7627 Try SIGKILL first, then PTRACE_KILL.
7628 * linux-low.c (linux_kill_one_lwp): New.
7629 (linux_kill_one_lwp): Rename to ...
7630 (kill_one_lwp_callback): ... this. Use the new
7631 linux_kill_one_lwp.
7632
e886a173
PA
76332012-02-02 Pedro Alves <palves@redhat.com>
7634
7635 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7636 inferior.
7637
be07f1a2
PA
76382012-01-27 Pedro Alves <palves@redhat.com>
7639
7640 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7641 (elf_64_file_p): Make static.
7642 (linux_pid_exe_is_elf_64_file): New.
7643 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7644 Delete declarations.
7645 (linux_pid_exe_is_elf_64_file): Declare.
7646 * linux-x86-low.c (x86_arch_setup): Use
7647 linux_pid_exe_is_elf_64_file.
7648
d8301ad1
JK
76492012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7650
7651 * linux-low.c (linux_wait_for_event_1): Rename to ...
7652 (linux_wait_for_event): ... here and merge it with former
7653 linux_wait_for_event - new variable wait_ptid, use it.
7654 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7655
01b17894
PA
76562012-01-23 Pedro Alves <palves@redhat.com>
7657
7658 * server.c (main): Avoid yet another case of infinite loop while
7659 detaching/killing after a longjmp.
7660
e825046f
JK
76612012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7662
7663 Code cleanup.
7664 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7665
b9e7b9c3
UW
76662012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7667
7668 * hostio.c (handle_readlink): New function.
7669 (handle_vFile): Call it to handle "vFile:readlink" packets.
7670
901f9912
UW
76712012-01-20 Pedro Alves <palves@redhat.com>
7672 Ulrich Weigand <ulrich.weigand@linaro.org>
7673
7674 * server.c (handle_v_requests): Only support vAttach and vRun to
7675 start multiple processes when in extended protocol mode.
7676
fc1ab1a0
PA
76772012-01-17 Pedro Alves <palves@redhat.com>
7678
7679 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7680 memalign plus mprotect to allocate the scratch buffer.
7681
7d5d4e98
PA
76822012-01-13 Pedro Alves <palves@redhat.com>
7683
7684 * server.c (attach_inferior): Clear `cont_thread'.
7685
f128d5e9
PA
76862012-01-13 Pedro Alves <palves@redhat.com>
7687
7688 * server.c (main): Avoid infinite loop while detaching/killing
7689 after a longjmp.
7690
06db92f0
DE
76912012-01-09 Doug Evans <dje@google.com>
7692
7693 * server.c (start_inferior): Set last_ptid in --wrapper case.
7694
32d92999
YQ
76952012-01-06 Yao Qi <yao@codesourcery.com>
7696
7697 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7698 defined.
7699 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7700
5e0a92a9
YQ
77012012-01-04 Yao Qi <yao@codesourcery.com>
7702
7703 * tracepoint.c (cmd_qtdp): Print debug message
7704 for static tracepoint.
7705
ae639e8c
YQ
77062012-01-04 Yao Qi <yao@codesourcery.com>
7707
7708 * tracepoint.c (trace_vdebug): Differentiate debug message
7709 between gdbserver and IPA.
7710
f72429c5
YQ
77112012-01-03 Yao Qi <yao@codesourcery.com>
7712
7713 * tracepoint.c (tracepoint_was_hit): Don't collect for
7714 static tracepoint.
7715
12c3e59c
JB
77162012-01-02 Joel Brobecker <brobecker@adacore.com>
7717
7718 * terminal.h: Reformat copyright header.
7719
67827812
JB
77202012-01-02 Joel Brobecker <brobecker@adacore.com>
7721
7722 * server.c (gdbserver_version): Update copyright year.
7723 * gdbreplay.c (gdbreplay_version): Likewise.
7724
3e52c33d
JK
77252011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7726
7727 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7728
7729 Revert:
7730 2011-12-18 Hui Zhu <teawater@gmail.com>
7731 * linux-low.c (linux_create_inferior): Save return value to ret.
7732
66f1260e
HZ
77332011-12-18 Hui Zhu <teawater@gmail.com>
7734
7735 * linux-low.c (linux_create_inferior): Save return value to ret.
7736
e77616d7
DE
77372011-12-16 Doug Evans <dje@google.com>
7738
e7b06c57
DE
7739 * linux-low.c (linux_create_inferior): If stdio connection,
7740 redirect stdin from /dev/null, stdout to stderr.
7741 * remote-utils.c (remote_is_stdio): New static global.
7742 (remote_connection_is_stdio): New function.
7743 (remote_prepare): Handle stdio connection.
7744 (remote_open): Ditto.
7745 (remote_close): Don't close stdin for stdio connections.
7746 (read_prim,write_prim): New functions. Replace all calls to
7747 read/write to these.
7748 * server.c (main): Watch for "-" argument. Move call to
7749 remote_prepare before start_inferior.
7750 * server.h (STDIO_CONNECTION_NAME): New macro.
7751 (remote_connection_is_stdio): Declare.
7752
e77616d7
DE
7753 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7754 in debugging output.
7755
82067193
YQ
77562011-12-15 Yao Qi <yao@codesourcery.com>
7757
7758 * tracepoint.c: Include sys/syscall.h.
7759 (gdb_ust_thread): Remove preprocessor conditional.
7760
82bfbe7e
PA
77612011-12-14 Pedro Alves <pedro@codesourcery.com>
7762
7763 * linux-low.c (linux_detach_one_lwp): Call
7764 the_low_target.prepare_to_resume before detaching.
7765
712c6575
YQ
77662011-12-14 Yao Qi <yao@codesourcery.com>
7767
7768 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7769 of write.
7770
d54d1edf
YQ
77712011-12-14 Yao Qi <yao@codesourcery.com>
7772
7773 * i386-low.c (i386_low_stopped_data_address): Initialize local
7774 variable `control'.
7775
6210a125
PA
77762011-12-13 Pedro Alves <pedro@codesourcery.com>
7777
7778 PR remote/13492
7779
7780 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7781 DR_CONTROL unless necessary. Extend comments.
7782 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7783 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7784
2ece8244
YQ
77852011-12-13 Yao Qi <yao@codesourcery.com>
7786
7787 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7788 macros.
7789 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7790
784867a5
JK
77912011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7792
7793 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7794 Print new debug message for such case.
7795
6bf36717
JK
77962011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7797
7798 Fix overlapping memcpy.
7799 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7800 the read_inferior_memory transfer.
7801 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7802 write_inferior_memory transfer.
7803 (set_fast_tracepoint_jump): New variable buf. Use it for the
7804 read_inferior_memory and write_inferior_memory transfers.
7805 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7806 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7807 Use it for the write_inferior_memory transfer.
7808 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7809 buffers.
7810
50275556
MR
78112011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7812
7813 * linux-low.c (fetch_register, store_register): Make code
7814 consistent, fix formatting.
7815
7325beb4
MR
78162011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7817
7818 * linux-low.c (usr_store_inferior_registers): Factor out code
7819 to handle individual registers into...
7820 (store_register): ... this new function.
7821
c642a434
UW
78222011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7823
7824 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7825 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7826 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7827 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7828 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7829 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7830 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7831 (srv_xmlfiles): Add new XML files.
7832
7833 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7834 and <sys/uio.h>.
7835 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7836 (init_registers_s390_linux32v1): Add prototype.
7837 (init_registers_s390_linux32v2): Likewise.
7838 (init_registers_s390_linux64v1): Likewise.
7839 (init_registers_s390_linux64v2): Likewise.
7840 (init_registers_s390x_linux64v1): Likewise.
7841 (init_registers_s390x_linux64v2): Likewise.
7842 (s390_num_regs): Increment to 52.
7843 (s390_regmap): Add orig_r2 register.
7844 (s390_num_regs_3264): Increment to 68.
7845 (s390_regmap_3264): Add orig_r2 register.
7846 (s390_collect_ptrace_register): Handle orig_r2 register.
7847 (s390_supply_ptrace_register): Likewise.
7848 (s390_fill_last_break): New function.
7849 (s390_store_last_break): Likewise.
7850 (s390_fill_system_call): New function.
7851 (s390_store_system_call): Likewise.
7852 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7853 register sets.
7854 (s390_check_regset): New function.
7855 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7856 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7857 Update target_regsets for available register sets.
7858
2268b414
JK
78592011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7860 Jan Kratochvil <jan.kratochvil@redhat.com>
7861
7862 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7863 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7864 New.
7865 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7866 * linux-low.h (struct process_info_private): New member r_debug.
7867 * server.c (handle_qxfer_libraries): Call
7868 the_target->qxfer_libraries_svr4.
7869 (handle_qxfer_libraries_svr4): New function.
7870 (qxfer_packets): New entry "libraries-svr4".
7871 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7872 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7873 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7874 PACKET_qXfer_libraries_svr4.
7875
d6db1fab
UW
78762011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7877
7878 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7879 PSW address/mask between 8-byte and 16-byte formats.
7880 (s390_supply_ptrace_register): Likewise.
7881 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7882 basic addressing mode bit.
7883
242f5f1c
SS
78842011-11-24 Stan Shebs <stan@codesourcery.com>
7885
7886 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7887
f196051f
SS
78882011-11-17 Stan Shebs <stan@codesourcery.com>
7889
7890 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7891 (tracing_start_time): New global.
7892 (tracing_stop_time): New global.
7893 (tracing_user_name): New global.
7894 (tracing_notes): New global.
7895 (tracing_stop_note): New global.
7896 (cmd_qtstart): Set traceframe_usage, start_time.
7897 (stop_tracing): Set stop_time.
7898 (cmd_qtstatus): Report additional status.
7899 (cmd_qtp): New function.
7900 (handle_tracepoint_query): Call it.
7901 (cmd_qtnotes): New function.
7902 (handle_tracepoint_general_set): Call it.
7903 (get_timestamp): Rename from tsv_get_timestamp.
7904
405f8e94
SS
79052011-11-14 Stan Shebs <stan@codesourcery.com>
7906 Kwok Cheung Yeung <kcy@codesourcery.com>
7907
7908 * linux-x86-low.c (small_jump_insn): New.
7909 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7910 trampoline and error message, build a trampoline and issue a small
7911 jump instruction to it.
7912 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7913 trampoline and error message.
7914 (x86_get_min_fast_tracepoint_insn_len): New.
7915 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7916 * linux-low.h (struct linux_target_ops): Add arguments to
7917 install_fast_tracepoint_jump_pad operation, add new operation.
7918 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7919 arguments.
7920 (linux_get_min_fast_tracepoint_insn_len): New function.
7921 (linux_target_op): Add new operation.
7922 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7923 (gdb_trampoline_buffer_end): Ditto.
7924 (gdb_trampoline_buffer_error): Ditto.
7925 (struct ipa_sym_addresses): Add fields for new IPA variables.
7926 (symbol_list): Add entries for new IPA variables.
7927 (struct tracepoint): Add fields to hold the address range of the
7928 trampoline used by the tracepoint.
7929 (trampoline_buffer_head): New static variable.
7930 (trampoline_buffer_tail): Ditto.
7931 (claim_trampoline_space): New function.
7932 (have_fast_tracepoint_trampoline_buffer): New function.
7933 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7934 structure.
7935 (install_fast_tracepoint): Ditto, also add error buffer argument.
7936 (cmd_qtminftpilen): New function.
7937 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7938 (fast_tracepoint_from_trampoline_address): New function.
7939 (fast_tracepoint_collecting): Handle trampoline as part of jump
7940 pad space.
7941 (set_trampoline_buffer_space): New function.
7942 (initialize_tracepoint): Initialize new IPA variables.
7943 * target.h (struct target_ops): Add arguments to
7944 install_fast_tracepoint_jump_pad operation, add new
7945 get_min_fast_tracepoint_insn_len operation.
7946 (target_get_min_fast_tracepoint_insn_len): New.
7947 (install_fast_tracepoint_jump_pad): Add arguments.
7948 * server.h (IPA_BUFSIZ): Define.
7949 * linux-i386-ipa.c: Include extra header files.
7950 (initialize_fast_tracepoint_trampoline_buffer): New function.
7951 (initialize_low_tracepoint): Call it.
7952 * server.h (set_trampoline_buffer_space): Declare.
7953 (claim_trampoline_space): Ditto.
7954 (have_fast_tracepoint_trampoline_buffer): Ditto.
7955
1e4d1764
YQ
79562011-11-14 Yao Qi <yao@codesourcery.com>
7957
7958 * server.c (handle_query): Handle InstallInTrace for qSupported.
7959 * tracepoint.c (add_tracepoint): Sort list.
7960 (install_tracepoint, download_tracepoint): New.
7961 (cmd_qtdp): Call them to install and download tracepoints.
7962 (sort_tracepoints): Removed.
7963 (cmd_qtstart): Update.
7964
5c73ff4e
YQ
79652011-11-14 Yao Qi <yao@codesourcery.com>
7966
7967 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7968 * mem-break.h: Declare.
7969 * tracepoint.c (cmd_qtstart): Move some code to ...
7970 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7971 New.
7972 (download_tracepoints): Move some code to ...
7973 (download_tracepoint_1): ... here. New.
7974
86a30030
YQ
79752011-11-08 Yao Qi <yao@codesourcery.com>
7976
7977 * remote-utils.c (relocate_instruction): A comment fix.
7978
8d26e50c
JB
79792011-11-07 Joel Brobecker <brobecker@adacore.com>
7980
7981 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7982 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7983 dr_status_mirror and dr_control_mirror from debug_reg_state.
7984 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7985 (i386_initial_stuff): Remove use of deleted globals.
7986 (i386_get_thread_context, i386_set_thread_context,
7987 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7988 from debug_reg_state.
7989
a59306a3
YQ
79902011-11-05 Yao Qi <yao@codesourcery.com>
7991
7992 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7993 address as TPOINT's.
7994
3065dfb6
SS
79952011-11-02 Stan Shebs <stan@codesourcery.com>
7996
7997 * tracepoint.c (agent_mem_read_string): New function.
7998 (eval_agent_expr): Call it for tracenz.
7999 * server.c (handle_query): Report support for tracenz.
8000
fd0d8c7c
YQ
80012011-11-02 Yao Qi <yao@codesourcery.com>
8002
8003 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8004
609086b1
YQ
80052011-11-02 Yao Qi <yao@codesourcery.com>
8006
8007 * target.h: Fix a typo in comment.
8008
b9fd1791
PA
80092011-10-31 Pedro Alves <pedro@codesourcery.com>
8010
8011 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8012 clobber the breakpoints' shadows with fast tracepoint jumps.
8013 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8014 * target.c (write_inferior_memory): Also pass MYADDR down to
8015 check_mem_write.
8016
03583c20
UW
80172011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8018
8019 * configure.ac: Check support for personality routine.
8020 * configure: Regenerate.
8021 * config.in: Likewise.
8022 * linux-low.c: Include <sys/personality.h>.
8023 Define ADDR_NO_RANDOMIZE if necessary.
8024 (linux_create_inferior): Disable address space randomization when
8025 forking inferior, if requested.
8026 (linux_supports_disable_randomization): New function.
8027 (linux_target_ops): Install it.
8028 * server.h (disable_randomization): Declare.
8029 * server.c (disable_randomization): New global variable.
8030 (handle_general_set): Handle QDisableRandomization.
8031 (handle_query): Likewise for qSupported.
8032 (main): Support --disable-randomization and --no-disable-randomization
8033 command line arguments.
8034 * target.h (struct target_ops): Add supports_disable_randomization.
8035 (target_supports_disable_randomization): New macro.
8036
723b724b
MF
80372011-09-29 Mike Frysinger <vapier@gentoo.org>
8038
8039 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8040 ifdef check.
8041 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8042 [!PT_GETDSBT] (target_loadmap): New definition.
8043 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8044 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8045 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8046 and PT_GETDSBT to LINUX_LOADMAP.
8047 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8048 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8049
55329a5c 80502011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8051
8052 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8053 (arm_linux_hwbp_cap): New static variable.
8054 (arm_linux_get_hwbp_cap): Replace by ...
8055 (arm_linux_init_hwbp_cap): ... this new function.
8056 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8057 (arm_linux_get_hw_watchpoint_count): Likewise.
8058 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8059 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8060 (arm_prepare_to_resume): Use perror_with_name instead of error.
8061
55329a5c 80622011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8063
8064 * linux-arm-low.c: Include <signal.h>.
8065 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8066 (struct arm_linux_hwbp_cap): New data type.
8067 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8068 (struct arm_linux_hw_breakpoint): New data type.
8069 (MAX_BPTS, MAX_WPTS): Define.
8070 (struct arch_process_info, struct arch_lwp_info): New data types.
8071 (arm_linux_get_hwbp_cap): New function.
8072 (arm_linux_get_hw_breakpoint_count): Likewise.
8073 (arm_linux_get_hw_watchpoint_count): Likewise.
8074 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8075 (arm_hwbp_control_initialize): Likewise.
8076 (arm_hwbp_control_is_enabled): Likewise.
8077 (arm_hwbp_control_is_initialized): Likewise.
8078 (arm_hwbp_control_disable): Likewise.
8079 (arm_linux_hw_breakpoint_equal): Likewise.
8080 (arm_linux_hw_point_initialize): Likewise.
8081 (struct update_registers_data): New data structure.
8082 (update_registers_callback: New function.
8083 (arm_insert_point): Likewise.
8084 (arm_remove_point): Likewise.
8085 (arm_stopped_by_watchpoint): Likewise.
8086 (arm_stopped_data_address): Likewise.
8087 (arm_new_process): Likewise.
8088 (arm_new_thread): Likewise.
8089 (arm_prepare_to_resume): Likewise.
8090 (the_low_target): Register arm_insert_point, arm_remove_point,
8091 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8092 arm_new_thread, and arm_prepare_to_resume.
8093
6b9801d4
SS
80942011-09-15 Stan Shebs <stan@codesourcery.com>
8095
8096 * server.h (struct emit_ops): Add compare-goto fields.
8097 * tracepoint.c (gdb_agent_op_sizes): New table.
8098 (emit_eq_goto): New function.
8099 (emit_ne_goto): New function.
8100 (emit_lt_goto): New function.
8101 (emit_le_goto): New function.
8102 (emit_gt_goto): New function.
8103 (emit_ge_goto): New function.
8104 (is_goto_target): New function.
8105 (compile_bytecodes): Recognize special cases of compare-goto
8106 combinations and call specialized emitters for them.
8107 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8108 (amd64_emit_ne_goto): New function.
8109 (amd64_emit_lt_goto): New function.
8110 (amd64_emit_le_goto): New function.
8111 (amd64_emit_gt_goto): New function.
8112 (amd64_emit_ge_goto): New function.
8113 (amd64_emit_ops): Add the new functions.
8114 (i386_emit_eq_goto): New function.
8115 (i386_emit_ne_goto): New function.
8116 (i386_emit_lt_goto): New function.
8117 (i386_emit_le_goto): New function.
8118 (i386_emit_gt_goto): New function.
8119 (i386_emit_ge_goto): New function.
8120 (i386_emit_ops): Add the new functions.
8121
bf15cbda
SS
81222011-09-08 Stan Shebs <stan@codesourcery.com>
8123
8124 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8125 (i386_emit_epilogue): Restore %ebx.
8126
943ca1dd
JZ
81272011-08-31 Jie Zhang <jzhang918@gmail.com>
8128
8129 * server.c (step_thread): Remove definition.
8130 (process_serial_event): Don't handle Hs.
8131 * server.h (step_thread): Remove declaration.
8132 * target.c (set_desired_inferior): Remove use of step_thread.
8133
e3deef73
LM
81342011-08-24 Luis Machado <lgustavo@codesourcery.com>
8135
8136 * linux-low.c: Include linux-procfs.h.
8137 (linux_attach_lwp_1): Update comments.
8138 (linux_attach): Scan for existing threads when attaching to a
8139 process that is the tgid.
8140 * Makefile.in: Update dependencies.
8141
13da1c97
LM
81422011-08-24 Luis Machado <lgustavo@codesourcery.com>
8143
8144 * configure.srv: Add linux-procfs.o dependencies.
8145
881127c9
YQ
81462011-08-14 Yao Qi <yao@codesourcery.com>
8147
8148 * target.h (struct target_ops): Fix indent.
8149 * win32-low.c (win32_target_ops): Fix comment.
8150
58dbd541
YQ
81512011-08-14 Andrew Jenner <andrew@codesourcery.com>
8152 Yao Qi <yao@codesourcery.com>
8153
8154 * Makefile.in (clean): Remove tic6x-*.c files.
8155 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8156 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8157 (tic6x-c64xp-linux.c): Likewise.
8158 * configure.srv: Add support for tic6x-*-uclinux.
8159 * linux-tic6x-low.c: New.
8160 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8161
78d85199
YQ
81622011-08-14 Andrew Stubbs <ams@codesourcery.com>
8163 Yao Qi <yao@codesourcery.com>
8164
8165 * target.h (struct target_ops): Add read_loadmap.
8166 * linux-low.c (struct target_loadseg): New type.
8167 (struct target_loadmap): New type.
8168 (linux_read_loadmap): New function.
8169 (linux_target_ops): Add linux_read_loadmap.
8170 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8171 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8172 to NULL.
78d85199 8173
a959a88d
EZ
81742011-08-05 Eli Zaretskii <eliz@gnu.org>
8175
8176 * win32-low.c: Include <stdint.h>.
8177
1ced966e
PA
81782011-07-22 Pedro Alves <pedro@codesourcery.com>
8179
8180 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8181 to the inferior here.
8182 (i386_remove_aligned_watchpoint): Ditto.
8183 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8184 fit part of the watchpoint in the debug registers.
8185 (i386_update_inferior_debug_regs): New.
8186 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8187 registers, and only update the inferior on success.
8188 (i386_low_remove_watchpoint): Ditto.
8189
d26e3629
KY
81902011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8191
8192 * linux-low.c (compare_ints, unique, list_threads, show_process,
8193 linux_core_of_thread): Delete.
8194 (linux_target_ops): Change linux_core_of_thread to
8195 linux_common_core_of_thread.
8196 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8197 * utils.c (malloc_failure): Change type of argument.
8198 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8199 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8200 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8201 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8202 (IPA_OBJS): Add common-utils-ipa.o.
8203 (ptid_h, linux_osdata_h): New macros.
8204 (server_h): Add common/common-utils.h, common/xml-utils.h,
8205 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8206 common/ptid.h.
8207 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8208 ptid.o, buffer.o): New rules.
8209 (linux-low.o): Add common/linux-osdata.h as a dependency.
8210 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8211 * configure.ac: Add AC_HEADER_DIRENT check.
8212 * config.in: Regenerate.
8213 * configure: Regenerate.
8214 * remote-utils.c (xml_escape_text): Delete.
8215 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8216 buffer_xml_printf): Move to common/buffer.c.
8217 * server.c (main): Remove call to initialize_inferiors.
8218 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8219 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8220 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8221 internal_error, gdb_assert, gdb_assert_fail): Delete.
8222 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8223 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8224 common/buffer.h.
8225 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8226 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8227 initialize_inferiors): Delete.
8228
2275a1a7
PA
82292011-07-20 Pedro Alves <pedro@codesourcery.com>
8230
8231 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8232 symbol error.
8233
0a5b1e09
PA
82342011-05-31 Pedro Alves <pedro@codesourcery.com>
8235
8236 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8237 assertion.
8238 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8239
6938fd34
YQ
82402011-05-26 Yao Qi <yao@codesourcery.com>
8241
8242 * Makefile.in (thread-db.o): Track dependence to
8243 common/gdb_thread_db.h.
8244 * thread-db.c: include gdb_thread_db.h from right place.
8245
b481f9e0
TT
82462011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8247
8248 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8249 __FILE__ and __LINE__ to internal_error.
8250
98a5dd13
DE
82512011-05-13 Doug Evans <dje@google.com>
8252
8253 * thread-db.c (try_thread_db_load_from_sdir): New function.
8254 (try_thread_db_load_from_dir): New function.
8255 (thread_db_load_search): Handle $sdir, ignore $pdir.
8256 Remove trying of system directories if search of
8257 libthread-db-search-path fails, that is now done via $sdir.
8258
d248b706
KY
82592011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8260
8261 * server.c (handle_query): Add EnableDisableTracepoints to the list
8262 of supported features.
43aaf8b6 8263 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8264 tracepoints.
43aaf8b6
PA
8265 (cmd_qtenable_disable): New.
8266 (cmd_qtstart): Install tracepoints even if disabled.
8267 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8268 receiving a QTEnable or QTDisable packet.
8269 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8270 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8271 tracepoints.
8272 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8273
84e578fb
DE
82742011-05-10 Doug Evans <dje@google.com>
8275
8276 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8277
71f55dd8
DE
82782011-05-04 Doug Evans <dje@google.com>
8279
8280 * linux-low.c (linux_join): Skip process lookup.
8281 * spu-low.c (spu_join): Ditto.
8282 * server.c (join_inferiors_callback): Delete.
8283 (process_serial_event): For 'D' packet (detach) call join_inferior
8284 directly.
8285
4d393d60
JM
82862011-05-04 Joseph Myers <joseph@codesourcery.com>
8287
8288 * README: Don't mention xscale*-*-linux*.
8289 * configure.srv (xscale*-*-linux*): Don't handle target.
8290
b00ad6ff
NF
82912011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8292
8293 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8294 casting pointers.
8295 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8296 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8297 (i386_emit_void_call_2): Likewise.
8298
af96c192
YQ
82992011-04-26 Yao Qi <yao@codesourcery.com>
8300
43aaf8b6
PA
8301 * linux-low.c: Move common macros to linux-ptrace.h.
8302 Include linux-ptrace.h.
af96c192
YQ
8303 * Makefile.in (linux_ptrace_h): New.
8304 (linux-low.o): Depends on linux-ptrace.h.
8305
03f2bd59
JK
83062011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8307
8308 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8309 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8310 (remote_prepare): New function with most of the TCP code from ...
8311 (remote_open): ... here. Detect PORT here unconditionally. Move also
8312 setting transport_is_reliable.
8313 * server.c (run_once): New variable.
8314 (gdbserver_usage): Document it.
8315 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8316 the first run if RUN_ONCE.
8317 * server.h (run_once, remote_prepare): New declarations.
8318
7a9dd1b2
TT
83192011-04-19 Tom Tromey <tromey@redhat.com>
8320
8321 * win32-low.c (handle_load_dll): Remove duplicate "the".
8322
81239425
PM
83232011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8324
8325 Remove support for old Cygwin 1.5 versions.
8326 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8327 function to avoid warning.
8328 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8329 warning.
8330
9e0627f1
PM
83312011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8332
8333 * gdbserver/server.h (Macro _): Define it if not available.
8334
588eebee
MS
83352011-03-14 Michael Snyder <msnyder@vmware.com>
8336
348af9f7 8337 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8338
43f70d4c
JB
83392011-03-10 Joel Brobecker <brobecker@adacore.com>
8340
8341 * Makefile.in (maintainer-clean realclean distclean): Remove
8342 "make ... subdir_do" command.
8343
348af9f7
MS
83442011-03-10 Michael Snyder <msnyder@vmware.com>
8345
8346 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8347
8348 * server.c (handle_v_run): Free alloced buffer on early return.
8349
e637a4f5
YQ
83502011-03-09 Yao Qi <yao@codesourcery.com>
8351
8352 Revert:
8353 2011-03-04 Yao Qi <yao@codesourcery.com>
8354
8355 * Makefile.in: Remove GNU make feature --directory.
8356
8357 2011-03-05 Yao Qi <yao@codesourcery.com>
8358
8359 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8360 (subdir_do): New make target. Copied from gdb/Makefile.
8361 (maintainer-clean, realclean, distclean, clean): Call corresponding
8362 make targets in common/Makefile.
8363
8364 2011-02-11 Yao Qi <yao@codesourcery.com>
8365
8366 * configure.ac: Call AC_PROG_RANLIB.
8367 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8368 * configure: Regenerate.
8369
e6edda56
JK
83702011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8371
8372 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8373
e5141119
JB
83742011-03-06 Yao Qi <yao@codesourcery.com>
8375
8376 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8377
64794aa4
JB
83782011-03-05 Yao Qi <yao@codesourcery.com>
8379
8380 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8381 (subdir_do): New make target. Copied from gdb/Makefile.
8382 (maintainer-clean, realclean, distclean, clean): Call corresponding
8383 make targets in common/Makefile.
8384
7a762829
YQ
83852011-03-04 Yao Qi <yao@codesourcery.com>
8386
8387 * Makefile.in: Remove GNU make feature --directory.
8388
348af9f7
MS
83892011-03-04 Michael Snyder <msnyder@vmware.com>
8390
8391 * server.c (queue_stop_reply): Call xmalloc not malloc.
8392
83932011-03-02 Michael Snyder <msnyder@vmware.com>
8394
8395 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8396
9f72fee2
MS
83972011-02-28 Michael Snyder <msnyder@vmware.com>
8398
588eebee
MS
8399 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8400 (cmd_qtframe): Ditto.
8401 (cmd_qtbuffer): Ditto.
8402 (cmd_bigqtbuffer): Ditto.
8403
9f72fee2
MS
8404 * utils.c (decimal2str): Initialize 'width' to nine, then
8405 don't mess with it.
8406
8040bd49
UW
84072011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8408
8409 * hostio.c (require_data): Free *data, not data.
8410
7e52cbd0
JK
84112011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8412
8413 * hostio.c (require_data): Use free, not xfree.
8414
9130f83e
MS
84152011-02-27 Michael Snyder <msnyder@vmware.com>
8416
4b812f4e
MS
8417 * server.c (handle_query): Discard unused value.
8418
9130f83e
MS
8419 * hostio.c (require_data): Free malloc memory before returning
8420 error.
8421
69d37113
MS
84222011-02-26 Michael Snyder <msnyder@vmware.com>
8423
8424 * linux-low.c (list_threads): Call closedir for dirent.
8425
35f5825a
MS
84262011-02-27 Michael Snyder <msnyder@vmware.com>
8427
2a589cef
MS
8428 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8429 a case statement falls through.
8430
0adea5f7
MS
8431 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8432
35f5825a
MS
8433 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8434 in comparison.
8435
238f1c74
MS
84362011-02-26 Michael Snyder <msnyder@vmware.com>
8437
8438 * utils.c (decimal2str): Eliminate dead code and dead param.
8439 (pulongest): Drop dead param from call to decimal2str.
8440 (plongest): Ditto.
8441
633ff500
JB
84422011-02-24 Joel Brobecker <brobecker@adacore.com>
8443
8444 Revert the following patch (not approved yet):
8445 2011-02-21 Hui Zhu <teawater@gmail.com>
8446 * tracepoint.c (tp_printf): New function.
8447 (eval_agent_expr): Handle gdb_agent_op_printf.
8448
f9c6ff72
HZ
84492011-02-21 Hui Zhu <teawater@gmail.com>
8450
8451 * tracepoint.c (tp_printf): New function.
8452 (eval_agent_expr): Handle gdb_agent_op_printf.
8453
94d5e490
TT
84542011-02-18 Tom Tromey <tromey@redhat.com>
8455
8456 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8457 (tracepoint.o): Likewise.
8458 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8459 (gdb_agent_op_names): Likewise.
8460
c7f96d2b
TT
84612011-02-18 Tom Tromey <tromey@redhat.com>
8462
8463 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8464 gdb_agent_op_rot>: New constants.
8465 (gdb_agent_op_names): Add pick and roll.
8466 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8467 cases.
8468
0feedb2c
JK
84692011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8470
8471 * aclocal.m4: Regenerated with aclocal-1.11.1.
8472
b3b9301e
PA
84732011-02-14 Pedro Alves <pedro@codesourcery.com>
8474
8475 * server.c (handle_qxfer_traceframe_info): New.
8476 (qxfer_packets): Register "traceframe-info".
8477 (handle_query): Report support for qXfer:traceframe-info:read+.
8478 * tracepoint.c (match_blocktype): New.
8479 (traceframe_find_block_type): Rename to ...
8480 (traceframe_walk_blocks): ... this. Add callback filter argument,
8481 and use it.
8482 (traceframe_find_block_type): New, reimplemented on top of
8483 traceframe_walk_blocks.
8484 (build_traceframe_info_xml): New.
8485 (traceframe_read_info): New.
8486 * server.h (traceframe_read_info): Declare.
8487
4f3e6fb7
YQ
84882011-02-11 Yao Qi <yao@codesourcery.com>
8489
8490 * configure.ac: Call AC_PROG_RANLIB.
8491 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8492 * configure: Regenerate.
8493
764880b7
PA
84942011-02-07 Pedro Alves <pedro@codesourcery.com>
8495
8496 * server.c (gdb_read_memory): Change return semantics to allow
8497 partial transfers.
8498 (handle_search_memory_1): Adjust.
8499 (process_serial_event) <'m' packet>: Handle partial transfers.
8500 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8501
1c79eb8a
PA
85022011-01-28 Pedro Alves <pedro@codesourcery.com>
8503
8504 * regcache.c (init_register_cache): Initialize
8505 regcache->register_status.
8506 (free_register_cache): Release regcache->register_status.
8507 (regcache_cpy): Copy register_status.
8508 (registers_to_string): Print 'x's for unavailable registers.
8509 (supply_register): Mark the register's status valid or
8510 unavailable, depending on whether a buffer was passed in or not.
8511 (supply_register_zeroed): New.
8512 (supply_regblock): Mark the registers' status valid or
8513 unavailable, depending on whether a buffer was passed in or not.
8514 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8515 (struct regcache): New `register_status' field.
8516 (supply_register_zeroed): Declare.
8517 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8518 supply_register_zeroed, rather than passing a NULL buffer to
8519 supply_register.
8520 * tracepoint.c (fetch_traceframe_registers): Update comment.
8521
85724a0e
PA
85222011-01-28 Pedro Alves <pedro@codesourcery.com>
8523
8524 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8525 buffer explicit.
8526
d08aafef
PA
85272011-01-25 Pedro Alves <pedro@codesourcery.com>
8528
8529 * server.h (decode_xfer_write): Change prototype.
8530 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8531 and don't extract the annex here.
8532 * server.c (decode_xfer_read): Remove `annex' parameter,
8533 and don't extract the annex here.
8534 (decode_xfer): New.
8535 (struct qxfer): New.
8536 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8537 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8538 (handle_qxfer_statictrace): New functions, abstracted out from
8539 handle_query, and made to use the struct qxfer interface.
8540 (handle_threads_qxfer_proper): Rename to ...
8541 (handle_qxfer_threads_proper): ... this.
8542 (handle_threads_qxfer): Rename to ...
8543 (handle_qxfer_threads): ... this. Adjust.
8544 (qxfer_packets): New array.
8545 (handle_qxfer): New function.
8546 (handle_query): Use handle_qxfer.
8547
493e2a69
MS
85482011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8549
8550 * gdbreplay.c: Shorten lines of >= 80 columns.
8551 * linux-low.c: Ditto.
8552 * linux-ppc-low.c: Ditto.
8553 * linux-s390-low.c: Ditto.
8554 * linux-sparc-low.c: Ditto.
8555 * linux-x86-low.c: Ditto.
8556 * linux-xtensa-low.c: Ditto.
8557 * mem-break.c: Ditto.
8558 * nto-low.c: Ditto.
8559 * regcache.h: Ditto.
8560 * remote-utils.c: Ditto.
8561 * server.c: Ditto.
8562 * server.h: Ditto.
8563 * thread-db.c: Ditto.
8564 * tracepoint.c: Ditto.
8565 * utils.c: Ditto.
8566 * win32-low.h: Ditto.
8567
44944448
JB
85682011-01-05 Joel Brobecker <brobecker@adacore.com>
8569
8570 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8571 update.
8572
71ce852c
JB
85732011-01-01 Joel Brobecker <brobecker@adacore.com>
8574
8575 * server.c (gdbserver_version): Update copyright year in version
8576 output.
8577 * gdbreplay.c (gdbreplay_version): Ditto.
8578
eb826dc6
MF
85792010-12-29 Jie Zhang <jie.zhang@analog.com>
8580
8581 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8582 * linux-bfin-low.c: New file.
8583 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8584 PT_DATA_ADDR for BFIN targets.
8585 * Makefile.in (SFILES): Add linux-bfin-low.c.
8586 (clean): Remove reg-bfin.c.
8587 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8588 * README: Mention supported Blackfin targets.
8589
39ab222a
MF
85902010-12-23 Mike Frysinger <vapier@gentoo.org>
8591
8592 * .gitignore: New file.
8593
a1f2ce7d
MF
85942010-11-16 Mike Frysinger <vapier@gentoo.org>
8595
8596 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8597
f474844c
JZ
85982010-10-22 Jie Zhang <jie@codesourcery.com>
8599
8600 * Makefile.in: Add FLAGS_TO_PASS variable.
8601 (install): Remove dependency of install-only and recursively
8602 invoke make for install-only.
8603
f1048712
DE
86042010-10-04 Doug Evans <dje@google.com>
8605
8606 * Makefile.in (uninstall): Use $(DESTDIR).
8607
b53a1623
PA
86082010-09-24 Pedro Alves <pedro@codesourcery.com>
8609
e6ee044d
PA
8610 PR gdb/11842
8611
b53a1623
PA
8612 * linux-x86-low.c (compat_siginfo_from_siginfo)
8613 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8614 si_code is < 0. Check for si_code == SI_TIMER before checking for
8615 si_code < 0.
8616
fa1bd1e4
JB
86172010-09-13 Joel Brobecker <brobecker@adacore.com>
8618
8619 * lynx-i386-low.c: New file.
8620 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8621
47fac8f8
JB
86222010-09-13 Joel Brobecker <brobecker@adacore.com>
8623
8624 * lynx-low.c (ptrace_request_to_str): Remove handling for
8625 request values that have been removed in LynxOS 5.x.
8626
1adfc54d
JB
86272010-09-13 Joel Brobecker <brobecker@adacore.com>
8628
8629 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8630 <ptrace.h>
8631
c2a66c29
NS
86322010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8633
8634 * configure.ac: Add --enable-inprocess-agent option.
8635 * configure: Rebuilt.
8636
32fcada3
YQ
86372010-09-06 Yao Qi <yao@codesourcery.com>
8638
8639 * linux-low.c (linux_kill): Remove unused variable.
8640 (linux_stabilize_threads): Likewise.
8641 * server.c (start_inferior): Likewise.
8642 (queue_stop_reply_callback): Likewise.
8643 * tracepoint.c (do_action_at_tracepoint): Likewise.
8644
0cccb683
YQ
86452010-09-06 Yao Qi <yao@codesourcery.com>
8646
8647 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8648 on return.
8649
423ec54c
JK
86502010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8651
8652 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8653
12ac6819
PA
86542010-09-06 Pedro Alves <pedro@codesourcery.com>
8655
8656 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8657 "$(IPA_DEPFILES)".
8658
8ed54b31
JB
86592010-09-01 Joel Brobecker <brobecker@adacore.com>
8660
8661 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8662 gdbserver/lynx-ppc-low.c: New files.
8663 * Makefile.in (lynx_low_h): New variable.
8664 (lynx-low.o, lynx-ppc-low.o): New rules.
8665 * configure.ac: On LynxOS, link with -lnetinet.
8666 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8667 * configure: regenerate.
8668
bb0116a4
JB
86692010-09-01 Joel Brobecker <brobecker@adacore.com>
8670
8671 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8672 * configure.ac: Add check for vasprintf and vsnprintf.
8673 * configure, config.in: Regenerate.
8674 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8675
a778ab81 86762010-09-01 Joel Brobecker <brobecker@adacore.com>
8677
8678 * gdbreplay.c: Move include of alloca.h up, next to include of
8679 malloc.h.
8680 * server.h: Add include of malloc.h.
8681 * mem-break.c: Remove include of malloc.h.
8682 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8683
8b034a19 86842010-09-01 Joel Brobecker <brobecker@adacore.com>
8685
8686 * Makefile.in (memmem.o): Build with -Wno-error.
8687
86882010-09-01 Joel Brobecker <brobecker@adacore.com>
8689
8690 * utils.c (xsnprintf): Make non-static.
8691 * server.h: Add xsnprintf declaration.
8692 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8693 replace calls to snprintf by calls to xsnprintf throughout.
8694
86952010-09-01 Joel Brobecker <brobecker@adacore.com>
8696
8697 * configure.ac: Add configure check for alloca.
8698 * configure, config.in: Regenerate.
8699 * server.h: Include alloca.h if it exists.
8700 * gdbreplay.c: Include alloca.h if it exists.
8701
1a981360
PA
87022010-08-28 Pedro Alves <pedro@codesourcery.com>
8703
8704 * linux-low.c (__SIGRTMIN): Define if not already defined.
8705 (linux_create_inferior): Check for __ANDROID__ rather than
8706 __SIGRTMIN.
8707 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8708 are already deferred.
8709 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8710 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8711 stopped and already has a pending signal to report.
8712 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8713 a pending signal to report or is moving out of a jump pad.
8714 (linux_init_signals): Check for __ANDROID__ rather than
8715 __SIGRTMIN.
8716
b4d51a55
PA
87172010-08-28 Pedro Alves <pedro@codesourcery.com>
8718
8719 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8720 debug_threads check. Avoid a linear search when not doing debug
8721 output.
8722
ec48365d
PA
87232010-08-27 Pedro Alves <pedro@codesourcery.com>
8724
8725 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8726 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8727 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8728 (process_event): Change local fd's type to gdb_fildes_t.
8729 (create_file_handler): Adjust prototype.
8730 (delete_file_handler): Adjust prototype.
8731 (handle_file_event): Adjust prototype. Use pfildes.
8732 (create_file_event): Adjsut prototype.
8733 * remote-utils.c (remote_desc, listen_desc): Change type to
8734 gdb_fildes_t.
8735 * server.h: New gdb_fildes_t typedef.
8736 [USE_WIN32API]: Include winsock2.h.
8737 (delete_file_handler, add_file_handler): Adjust prototypes.
8738 (pfildes): Declare.
8739 * utils.c (pfildes): New.
8740
854d88f0
PA
87412010-08-27 Pedro Alves <pedro@codesourcery.com>
8742
8743 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8744 * configure: Regenerate.
8745
0146f85b
PA
87462010-08-27 Pedro Alves <pedro@codesourcery.com>
8747
8748 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8749 (linux_done_accessing_memory): ... this.
8750 (linux_target_ops): Adjust.
8751 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8752 * nto-low.c (nto_target_ops): Adjust comment.
8753 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8754 * spu-low.c (spu_target_ops): Adjust comment.
8755 * target.h (target_ops): Rename unprepare_to_access_memory field
8756 to done_accessing_memory.
8757 (unprepare_to_access_memory): Rename to ...
8758 (done_accessing_memory): ... this.
8759
90d74c30
PA
87602010-08-26 Pedro Alves <pedro@codesourcery.com>
8761
8762 * linux-low.c (linux_prepare_to_access_memory): New.
8763 (linux_unprepare_to_access_memory): New.
8764 (linux_target_ops): Install them.
8765 * server.c (read_memory): Rename to ...
8766 (gdb_read_memory): ... this. Use
8767 prepare_to_access_memory/prepare_to_access_memory.
8768 (write_memory): Rename to ...
8769 (gdb_write_memory): ... this. Use
8770 prepare_to_access_memory/prepare_to_access_memory.
8771 (handle_search_memory_1): Adjust.
8772 (process_serial_event): Adjust.
8773 * target.h (struct target_ops): New fields
8774 prepare_to_access_memory and unprepare_to_access_memory.
8775 (prepare_to_access_memory, unprepare_to_access_memory): New.
8776 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8777 prepare_to_access_memory/prepare_to_access_memory.
8778 * nto-low.c (nto_target_ops): Adjust.
8779 * spu-low.c (spu_target_ops): Adjust.
8780 * win32-low.c (win32_target_ops): Adjust.
8781
fd467969
PA
87822010-08-26 Pedro Alves <pedro@codesourcery.com>
8783
8784 * Makefile.in (WARN_CFLAGS): Get it from configure.
8785 (WERROR_CFLAGS): New.
8786 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8787 * configure.ac: Introduce --enable-werror, which adds -Werror to
8788 the compiler command line. Enabled by default. Disable with
8789 --disable-werror. Add -Wdeclaration-after-statement
8790 Wpointer-arith and -Wformat-nonliteral to warning flags.
8791 * configure: Regenerate.
8792
331e2f5f
PA
87932010-08-26 Pedro Alves <pedro@codesourcery.com>
8794
8795 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8796
e581f2b4
PA
87972010-08-26 Pedro Alves <pedro@codesourcery.com>
8798
8799 * gdbreplay.c (remote_error): New.
8800 (gdbchar): New.
8801 (expect): Use gdbchar. Check for error reading from GDB.
8802 Clarify sync error output.
8803 (play): Check for errors writing to GDB.
8804 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8805 * remote-utils.c (getpkt): Check for errors writing to the remote
8806 descriptor.
8807
3c11dd79
PA
88082010-08-25 Pedro Alves <pedro@codesourcery.com>
8809
8810 * linux-low.c (linux_wait_1): Move non-debugging code out of
8811 `debug_threads' control.
8812
d20a8ad9
PA
88132010-08-25 Pedro Alves <pedro@codesourcery.com>
8814
8815 * linux-low.c (linux_wait_1): Don't set last_status here.
8816 * server.c (push_event, queue_stop_reply_callback): Assert we're
8817 not pushing a TARGET_WAITKIND_IGNORE event.
8818 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8819 (myresume, handle_target_event): Set the thread's last_resume_kind
8820 and last_status from the target returned status.
8821
964e4306
PA
88222010-08-25 Pedro Alves <pedro@codesourcery.com>
8823
8824 PR threads/10729
8825
8826 * linux-x86-low.c (update_debug_registers_callback): New.
8827 (i386_dr_low_set_addr): Use it.
8828 (i386_dr_low_get_addr): New.
8829 (i386_dr_low_set_control): Use update_debug_registers_callback.
8830 (i386_dr_low_get_control): New.
8831 (i386_dr_low_get_status): Adjust.
8832 * linux-low.c (linux_stop_lwp): New.
8833 * linux-low.h (linux_stop_lwp): Declare.
8834
8835 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8836 argument instead of a i386_debug_reg_state.
8837 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8838 a i386_debug_reg_state.
8839 (i386_insert_aligned_watchpoint): Adjust.
8840 (i386_remove_aligned_watchpoint): Adjust.
8841 (i386_low_stopped_data_address): Read the debug registers from the
8842 inferior instead of from the mirrors.
8843 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8844 (i386_dr_low_get_addr): Declare.
8845 (i386_dr_low_get_control): Declare.
8846 (i386_dr_low_get_status): Change prototype.
8847
8848 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8849 (i386_dr_low_get_addr): New.
8850 (i386_dr_low_get_control): New.
8851 (i386_dr_low_get_status): Adjust prototype. Return
8852 dr_status_mirror.
8853 (i386_initial_stuff): Clear dr_status_mirror and
8854 dr_control_mirror.
8855 (i386_get_thread_context): Adjust.
8856 (i386_set_thread_context): Adjust.
8857 (i386_thread_added): Adjust.
8858
5f21a75b
PA
88592010-08-24 Pedro Alves <pedro@codesourcery.com>
8860
8861 * linux-low.h (linux_thread_area): Delete declaration.
8862
3e4c1235
TS
88632010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8864
8865 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8866 after its termination.
8867
1971b033
PA
88682010-08-09 Pedro Alves <pedro@codesourcery.com>
8869
8870 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8871 (gdb_wants_all_stopped): Delete.
8872 (linux_wait_1): Don't call them.
8873 * server.c (handle_v_cont): Tag all threads as want-stopped.
8874 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8875 stopped as "client-wants-stopped".
8876
310444ac
PA
88772010-07-31 Pedro Alves <pedro@codesourcery.com>
8878
8879 * Makefile.in (signals_h): New.
8880 (server_h): Depend on it.
8881 (server.o): Don't depend on $(signals_def).
8882 (signals.o): Depend on $(signals_def).
8883
a19cae16
JK
88842010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8885
8886 * Makefile.in (signals_def): New.
8887 (server_h): Append include/gdb/signals.h and signals_def.
8888 (server.o): Append signals_def.
8889
30d50328
JK
88902010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8891
8892 * server.c (handle_target_event): Use target_signal_to_host for
8893 resume_info.sig initialization.
8894 * target.h (struct thread_resume) <sig>: New comment.
8895
5c3216e2
OS
88962010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8897
c6f46ca0
OS
8898 * server.c (handle_query): strcpy() the returned string from paddress()
8899 instead of sprintf().
5c3216e2
OS
8900 * utils.c (paddress): Return phex_nz().
8901
6bd31874
JB
89022010-07-07 Joel Brobecker <brobecker@adacore.com>
8903
8904 * server.c (handle_v_cont): Call mourn_inferior if process
8905 just exited.
8906 (myresume): Likewise.
8907
0fb4aa4b
PA
89082010-07-01 Pedro Alves <pedro@codesourcery.com>
8909
8910 Static tracepoints, and integration with UST.
8911
8912 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8913 * mem-break.c (uninsert_all_breakpoints)
8914 (reinsert_all_breakpoints): New.
8915 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8916 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8917 (gdb_agent_ust_loaded, helper_thread_id)
8918 (gdb_agent_helper_thread_id): New macros.
8919 (struct ipa_sym_addresses): Add addr_ust_loaded,
8920 addr_helper_thread_id, addr_cmd_buf.
8921 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8922 (in_process_agent_loaded_ust): New.
8923 (write_e_ust_not_loaded): New.
8924 (maybe_write_ipa_ust_not_loaded): New.
8925 (struct collect_static_trace_data_action): New.
8926 (enum tracepoint_type) <static_tracepoint>: New.
8927 (struct tracepoint) <handle>: Mention static tracepoints.
8928 (struct static_tracepoint_ctx): New.
8929 (CMD_BUF_SIZE): New.
8930 (add_tracepoint_action): Handle static tracepoint actions.
8931 (unprobe_marker_at): New.
8932 (clear_installed_tracepoints): Handle static tracepoints.
8933 (cmd_qtdp): Handle static tracepoints.
8934 (probe_marker_at): New.
8935 (cmd_qtstart): Handle static tracepoints.
8936 (response_tracepoint): Handle static tracepoints.
8937 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8938 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8939 (get_context_regcache): Handle static tracepoints.
8940 (do_action_at_tracepoint): Handle static tracepoint actions.
8941 (traceframe_find_block_type): Handle static trace data blocks.
8942 (traceframe_read_sdata): New.
8943 (download_tracepoints): Download static tracepoint actions.
8944 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8945 (GDB_PROBE_NAME): New.
8946 (ust_ops): New.
8947 (GET_UST_SYM): New.
8948 (USTF): New.
8949 (dlsym_ust): New.
8950 (ust_marker_to_static_tracepoint): New.
8951 (gdb_probe): New.
8952 (collect_ust_data_at_tracepoint): New.
8953 (gdb_ust_probe): New.
8954 (UNIX_PATH_MAX, SOCK_DIR): New.
8955 (gdb_ust_connect_sync_socket): New.
8956 (resume_thread, stop_thread): New.
8957 (run_inferior_command): New.
8958 (init_named_socket): New.
8959 (gdb_ust_socket_init): New.
8960 (cstr_to_hexstr): New.
8961 (next_st): New.
8962 (first_marker, next_marker): New.
8963 (response_ust_marker): New.
8964 (cmd_qtfstm, cmd_qtsstm): New.
8965 (unprobe_marker_at, probe_marker_at): New.
8966 (cmd_qtstmat, gdb_ust_thread): New.
8967 (gdb_ust_init): New.
8968 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8969 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8970 (ST_REGENTRY): New.
8971 (x86_64_st_collect_regmap): New.
8972 (X86_64_NUM_ST_COLLECT_GREGS): New.
8973 (AMD64_RIP_REGNUM): New.
8974 (supply_static_tracepoint_registers): New.
8975 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8976 (ST_REGENTRY): New.
8977 (i386_st_collect_regmap): New.
8978 (i386_NUM_ST_COLLECT_GREGS): New.
8979 (supply_static_tracepoint_registers): New.
8980 * server.c (handle_query): Handle qXfer:statictrace:read.
8981 <qSupported>: Report support for StaticTracepoints, and
8982 qXfer:statictrace:read features.
8983 * server.h (traceframe_read_sdata)
8984 (supply_static_tracepoint_registers): Declare.
8985 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8986 (unpack_varlen_hex): Include in IPA build.
8987 * Makefile.in (ustlibs, ustinc): New.
8988 (IPA_OBJS): Add remote-utils-ipa.o.
8989 ($(IPA_LIB)): Link -ldl and -lpthread.
8990 (UST_CFLAGS): New.
8991 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8992 * config.in, configure: Regenerate.
8993
9e4344e5
PA
89942010-06-20 Ian Lance Taylor <iant@google.com>
8995 Pedro Alves <pedro@codesourcery.com>
8996
8997 * linux-x86-low.c (always_true): Delete.
8998 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8999 trying to fool the compiler with always_true.
9000
c6beb2cb
PA
90012010-06-20 Pedro Alves <pedro@codesourcery.com>
9002
9003 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9004 conditions in gdbserver.
9005
d2ed6730
UW
90062010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9007
9008 * spu-low.c (spu_read_memory): Wrap around local store limit.
9009 (spu_write_memory): Likewise.
9010
4e29fb54
PA
90112010-06-15 Pedro Alves <pedro@codesourcery.com>
9012
9013 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9014 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9015 LONGEST uses.
9016 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9017 uses.
9018 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9019 uses with LONGEST uses.
9020
6a271cae
PA
90212010-06-14 Stan Shebs <stan@codesourcery.com>
9022 Pedro Alves <pedro@codesourcery.com>
9023
9024 Bytecode compiler.
9025
9026 * linux-x86-low.c: Include limits.h.
9027 (add_insns): New.
9028 (always_true): New.
9029 (EMIT_ASM): New.
9030 (EMIT_ASM32): New.
9031 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9032 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9033 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9034 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9035 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9036 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9037 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9038 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9039 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9040 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9041 (amd64_emit_void_call_2): New.
9042 (amd64_emit_ops): New.
9043 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9044 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9045 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9046 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9047 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9048 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9049 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9050 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9051 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9052 (i386_emit_stack_adjust, i386_emit_int_call_1)
9053 (i386_emit_void_call_2): New.
9054 (i386_emit_ops): New.
9055 (x86_emit_ops): New.
9056 (the_low_target): Install x86_emit_ops.
9057 * server.h (struct emit_ops): New.
9058 (get_raw_reg_func_addr): Declare.
9059 (current_insn_ptr, emit_error): Declare.
9060 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9061 (set_trace_state_variable_value): New defines.
9062 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9063 addr_get_trace_state_variable_value and
9064 addr_set_trace_state_variable_value.
9065 (symbol_list): New fields for get_raw_reg,
9066 get_trace_state_variable_value and set_trace_state_variable_value.
9067 (condfn): New typedef.
9068 (struct tracepoint): New field `compiled_cond'.
9069 (do_action_at_tracepoint): Clear compiled_cond.
9070 (get_trace_state_variable_value, set_trace_state_variable_value):
9071 Export in the IPA.
9072 (condition_true_at_tracepoint): If there's a compiled condition,
9073 run that.
9074 (current_insn_ptr, emit_error): New globals.
9075 (struct bytecode_address): New.
9076 (get_raw_reg_func_addr): New.
9077 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9078 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9079 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9080 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9081 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9082 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9083 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9084 (compile_tracepoint_condition, compile_bytecodes): New.
9085 * target.h (emit_ops): Forward declare.
9086 (struct target_ops): New field emit_ops.
9087 (target_emit_ops): New.
9088 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9089 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9090 * linux-low.c (linux_emit_ops): New.
9091 (linux_target_ops): Install it.
9092 * linux-low.h (struct linux_target_ops): New field emit_ops.
9093
92b72907
UW
90942010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9095
9096 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9097 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9098
fa593d66
PA
90992010-06-01 Pedro Alves <pedro@codesourcery.com>
9100 Stan Shebs <stan@codesourcery.com>
9101
9102 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9103 (all): Depend on $(extra_libraries).
9104 (install-only): Install the IPA.
9105 (IPA_OBJS, IPA_LIB): New.
9106 (clean): Remove the IPA lib.
9107 (IPAGENT_CFLAGS): New.
9108 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9109 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9110 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9111 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9112 * configure.ac: Check for atomic builtins support in the compiler.
9113 (IPA_DEPFILES, extra_libraries): Define.
9114 * configure.srv (ipa_obj): Add description.
9115 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9116 (i[34567]86-*-linux*): Set ipa_obj.
9117 (x86_64-*-linux*): Set ipa_obj.
9118 * linux-low.c (stabilizing_threads): New.
9119 (supports_fast_tracepoints): New.
9120 (linux_detach): Stabilize threads before detaching.
9121 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9122 the lwp is either not stabilizing, or is moving out of a jump pad.
9123 (linux_fast_tracepoint_collecting): New.
9124 (maybe_move_out_of_jump_pad): New.
9125 (enqueue_one_deferred_signal): New.
9126 (dequeue_one_deferred_signal): New.
9127 (linux_wait_for_event_1): If moving out of a jump pad, defer
9128 pending signals to later.
9129 (linux_stabilize_threads): New.
9130 (linux_wait_1): Check if threads need moving out of jump pads, and
9131 do it if so.
9132 (stuck_in_jump_pad_callback): New.
9133 (move_out_of_jump_pad_callback): New.
9134 (lwp_running): New.
9135 (linux_resume_one_lwp): Handle moving out of jump pads.
9136 (linux_set_resume_request): Dequeue deferred signals.
9137 (need_step_over_p): Also step over fast tracepoint jumps.
9138 (start_step_over): Also uninsert fast tracepoint jumps.
9139 (finish_step_over): Also reinsert fast tracepoint jumps.
9140 (linux_install_fast_tracepoint_jump): New.
9141 (linux_target_ops): Install linux_stabilize_threads and
9142 linux_install_fast_tracepoint_jump_pad.
9143 * linux-low.h (linux_target_ops) <get_thread_area,
9144 install_fast_tracepoint_jump_pad>: New fields.
9145 (struct lwp_info) <collecting_fast_tracepoint,
9146 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9147 (linux_get_thread_area): Declare.
9148 * linux-x86-low.c (jump_insn): New.
9149 (x86_get_thread_area): New.
9150 (append_insns): New.
9151 (push_opcode): New.
9152 (amd64_install_fast_tracepoint_jump_pad): New.
9153 (i386_install_fast_tracepoint_jump_pad): New.
9154 (x86_install_fast_tracepoint_jump_pad): New.
9155 (the_low_target): Install x86_get_thread_area and
9156 x86_install_fast_tracepoint_jump_pad.
9157 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9158 (struct fast_tracepoint_jump): New.
9159 (fast_tracepoint_jump_insn): New.
9160 (fast_tracepoint_jump_shadow): New.
9161 (find_fast_tracepoint_jump_at): New.
9162 (fast_tracepoint_jump_here): New.
9163 (delete_fast_tracepoint_jump): New.
9164 (set_fast_tracepoint_jump): New.
9165 (uninsert_fast_tracepoint_jumps_at): New.
9166 (reinsert_fast_tracepoint_jumps_at): New.
9167 (set_breakpoint_at): Use write_inferior_memory.
9168 (uninsert_raw_breakpoint): Use write_inferior_memory.
9169 (check_mem_read): Mask out fast tracepoint jumps.
9170 (check_mem_write): Mask out fast tracepoint jumps.
9171 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9172 (set_fast_tracepoint_jump): Declare.
9173 (delete_fast_tracepoint_jump)
9174 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9175 (reinsert_fast_tracepoint_jumps_at): Declare.
9176 * regcache.c: Don't compile many functions when building the
9177 in-process agent library.
9178 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9179 the register buffer in the heap.
9180 (free_register_cache): If the register buffer isn't owned by the
9181 regcache, don't free it.
9182 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9183 pre-existing register caches.
9184 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9185 type.
9186 (convert_ascii_to_int): : Constify `from' parameter type.
9187 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9188 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9189 the needed buffer in-place.
9190 (relocate_instruction): New.
9191 * server.c (handle_query) <qSymbols>: If the target supports
9192 tracepoints, give it a chance of looking up symbols. Report
9193 support for fast tracepoints.
9194 (handle_status): Stabilize threads.
9195 (process_serial_event): Adjust.
9196 * server.h (struct fast_tracepoint_jump): Forward declare.
9197 (struct process_info) <fast_tracepoint_jumps>: New field.
9198 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9199 (decode_X_packet, decode_M_packet): Adjust.
9200 (relocate_instruction): Declare.
9201 (in_process_agent_loaded): Declare.
9202 (tracepoint_look_up_symbols): Declare.
9203 (struct fast_tpoint_collect_status): Declare.
9204 (fast_tracepoint_collecting): Declare.
9205 (force_unlock_trace_buffer): Declare.
9206 (handle_tracepoint_bkpts): Declare.
9207 (initialize_low_tracepoint)
9208 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9209 * target.h (struct target_ops) <stabilize_threads,
9210 install_fast_tracepoint_jump_pad>: New fields.
9211 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9212 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9213 [HAVE_STDINT_H]: Include stdint.h.
9214 (trace_debug_1): Rename to ...
9215 (trace_vdebug): ... this.
9216 (trace_debug): Rename to ...
9217 (trace_debug_1): ... this. Add `level' parameter.
9218 (trace_debug): New.
9219 (ATTR_USED, ATTR_NOINLINE): New.
9220 (IP_AGENT_EXPORT): New.
9221 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9222 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9223 (about_to_request_buffer_space, trace_buffer_is_full)
9224 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9225 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9226 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9227 (traceframe_write_count, traceframes_created)
9228 (trace_state_variables)
9229 New renaming defines.
9230 (struct ipa_sym_addresses): New.
9231 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9232 (symbol_list): New.
9233 (ipa_sym_addrs): New.
9234 (all_tracepoint_symbols_looked_up): New.
9235 (in_process_agent_loaded): New.
9236 (write_e_ipa_not_loaded): New.
9237 (maybe_write_ipa_not_loaded): New.
9238 (tracepoint_look_up_symbols): New.
9239 (debug_threads) [IN_PROCESS_AGENT]: New.
9240 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9241 (UNKNOWN_SIDE_EFFECTS): New.
9242 (stop_tracing): New.
9243 (flush_trace_buffer): New.
9244 (stop_tracing_bkpt): New.
9245 (flush_trace_buffer_bkpt): New.
9246 (read_inferior_integer): New.
9247 (read_inferior_uinteger): New.
9248 (read_inferior_data_pointer): New.
9249 (write_inferior_data_pointer): New.
9250 (write_inferior_integer): New.
9251 (write_inferior_uinteger): New.
9252 (struct collect_static_trace_data_action): Delete.
9253 (enum tracepoint_type): New.
9254 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9255 <actions_str, step_actions, step_actions_str>: Only include in
9256 GDBserver.
fa593d66
PA
9257 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9258 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9259 (tracepoints): Use IP_AGENT_EXPORT.
9260 (last_tracepoint): Don't include in the IPA.
9261 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9262 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9263 (alloced_trace_state_variables): New.
9264 (trace_state_variables): Use IP_AGENT_EXPORT.
9265 (traceframe_t): Delete unused variable.
9266 (circular_trace_buffer): Don't include in the IPA.
9267 (trace_buffer_start): Delete.
9268 (struct trace_buffer_control): New.
9269 (trace_buffer_free): Delete.
9270 (struct ipa_trace_buffer_control): New.
9271 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9272 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9273 New.
9274 (trace_buffer_ctrl): New.
9275 (TRACE_BUFFER_CTRL_CURR): New.
9276 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9277 Reimplement as macros.
9278 (trace_buffer_wrap): Delete.
9279 (traceframe_write_count, traceframe_read_count)
9280 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9281 (struct tracepoint_hit_ctx) <type>: New field.
9282 (struct fast_tracepoint_ctx): New.
9283 (memory_barrier): New.
9284 (cmpxchg): New.
9285 (record_tracepoint_error): Update atomically in the IPA.
9286 (clear_inferior_trace_buffer): New.
9287 (about_to_request_buffer_space): New.
9288 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9289 updating the same buffer.
9290 (add_tracepoint): Default the tracepoint's type to trap
9291 tracepoint, and orig_size to -1.
9292 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9293 internal variables.
9294 (create_trace_state_variable): New parameter `gdb'. Handle it.
9295 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9296 (cmd_qtdp): Handle fast tracepoints.
9297 (cmd_qtdv): Adjust.
9298 (max_jump_pad_size): New.
9299 (gdb_jump_pad_head): New.
9300 (get_jump_space_head): New.
9301 (claim_jump_space): New.
9302 (sort_tracepoints): New.
9303 (MAX_JUMP_SIZE): New.
9304 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9305 IPA.
9306 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9307 support. Upload fast traceframes, and delete internal IPA
9308 breakpoints.
9309 (stop_tracing_handler): New.
9310 (flush_trace_buffer_handler): New.
9311 (cmd_qtstop): Upload fast tracepoints.
9312 (response_tracepoint): Handle fast tracepoints.
9313 (tracepoint_finished_step): Upload fast traceframes. Set the
9314 tracepoint hit context's tracepoint type.
9315 (handle_tracepoint_bkpts): New.
9316 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9317 type. Add comment about fast tracepoints.
9318 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9319 non-existing action_str field.
9320 (get_context_regcache): Handle fast tracepoints.
9321 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9322 to the regcache.
9323 (fast_tracepoint_from_jump_pad_address): New.
9324 (fast_tracepoint_from_ipa_tpoint_address): New.
9325 (collecting_t): New.
9326 (force_unlock_trace_buffer): New.
9327 (fast_tracepoint_collecting): New.
9328 (collecting): New.
9329 (gdb_collect): New.
9330 (write_inferior_data_ptr): New.
9331 (target_tp_heap): New.
9332 (target_malloc): New.
9333 (download_agent_expr): New.
9334 (UALIGN): New.
9335 (download_tracepoints): New.
9336 (download_trace_state_variables): New.
9337 (upload_fast_traceframes): New.
9338 (IPA_FIRST_TRACEFRAME): New.
9339 (IPA_NEXT_TRACEFRAME_1): New.
9340 (IPA_NEXT_TRACEFRAME): New.
9341 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9342 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9343 (gdb_jump_pad_buffer_end): New.
9344 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9345 (initialize_tracepoint): Adjust.
9346 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9347 buffer. Initialize the low module.
9348 * utils.c (PREFIX, TOOLNAME): New.
9349 (malloc_failure): Use PREFIX.
9350 (error): In the IPA, an error causes an exit.
9351 (fatal, warning): Use PREFIX.
9352 (internal_error): Use TOOLNAME.
9353 (NUMCELLS): Increase to 10.
9354 * configure, config.in: Regenerate.
9355
d149dd1d
PA
93562010-06-01 Pedro Alves <pedro@codesourcery.com>
9357
9358 * server.c (handle_query) <qSupported>: Do two passes over the
9359 qSupported string to avoid nesting strtok.
9360
f6528abd
JK
93612010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9362
9363 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9364 (CDEPS): New.
9365 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9366 -Wl,--dynamic-list.
9367 * configure: Regenerate.
9368 * proc-service.list: New.
9369
ca2a87a0
JK
93702010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9371
9372 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9373 New comment.
9374
363a6e9f
OS
93752010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9376
9377 * gdbreplay.c (remote_open): Check error return from socket() call by
9378 its equality to -1 not by it being negative.
9379 * remote-utils.c (remote_open): Likewise.
9380
d23b6cb1
PA
93812010-05-23 Pedro Alves <pedro@codesourcery.com>
9382
9383 * config.h: Regenerate.
9384
28d3cf85
MK
93852010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9386
9387 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9388 doesn't provide PTRACE_GET_THREAD_AREA.
9389
fea36a59
MK
93902010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9391
9392 * linux-m68k-low.c: Include <asm/ptrace.h>
9393 (ps_get_thread_area): Implement.
9394
24b066ba
DE
93952010-05-03 Doug Evans <dje@google.com>
9396
9397 * event-loop.c (struct callback_event): New struct.
9398 (callback_list): New global.
9399 (append_callback_event, delete_callback_event): New functions.
9400 (process_callback): New function.
9401 (start_event_loop): Call it.
9402 * remote-utils.c (NOT_SCHEDULED): Define.
9403 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9404 moved out of readchar.
9405 (readchar): Rewrite. Call reschedule before returning.
9406 (reset_readchar): New function.
9407 (remote_close): Call it.
9408 (process_remaining, reschedule): New functions.
9409 * server.h (callback_handler_func): New typedef.
9410 (append_callback_event, delete_callback_event): Declare.
9411
9836d6ea
PA
94122010-05-03 Pedro Alves <pedro@codesourcery.com>
9413
9414 * proc-service.c (ps_pglobal_lookup): Use
9415 thread_db_look_up_one_symbol.
9416 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9417 parameter. Use it instead of all_symbols_looked_up.
9418 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9419 field.
9420 (all_symbols_looked_up): Don't declare.
9421 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9422 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9423 field.
9424 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9425 Set all_symbols_looked_up here.
9426 (thread_db_look_up_one_symbol): New.
9427 (thread_db_get_tls_address): Adjust.
9428 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9429 thread_db object on the heap, and tentatively set it in the
9430 process structure.
9431 (thread_db_init): Don't set all_symbols_looked_up here.
9432 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9433
7984d532
PA
94342010-05-03 Pedro Alves <pedro@codesourcery.com>
9435
9436 * linux-low.c (linux_kill, linux_detach): Adjust.
9437 (status_pending_p_callback): Remove redundant statement. Check
9438 for !TARGET_WAITIKIND_IGNORE, instead of
9439 TARGET_WAITKIND_STOPPED.
9440 (handle_tracepoints): Make sure LWP is locked. Adjust.
9441 (linux_wait_for_event_1): Adjust.
9442 (linux_cancel_breakpoints): New.
9443 (unsuspend_one_lwp): New.
9444 (unsuspend_all_lwps): New.
9445 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9446 (send_sigstop_callback): Change return type to int, add new
9447 `except' parameter and handle it.
9448 (suspend_and_send_sigstop_callback): New.
9449 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9450 pass them down. If SUSPEND, also increment the lwp's suspend
9451 count.
9452 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9453 (need_step_over_p): Don't consider suspended LWPs.
9454 (start_step_over): Adjust.
9455 (proceed_one_lwp): Change return type to int, add new `except'
9456 parameter and handle it.
9457 (unsuspend_and_proceed_one_lwp): New.
9458 (proceed_all_lwps): Use find_inferior instead of
9459 for_each_inferior.
9460 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9461 also decrement the suspend count of LWPs. Pass `except' down,
9462 instead of hacking its suspend count.
9463 (linux_pause_all): Add `freeze' parameter. Adjust.
9464 (linux_unpause_all): New.
9465 (linux_target_ops): Install linux_unpause_all.
9466 * server.c (handle_status): Adjust.
9467 * target.h (struct target_ops): New fields `unpause_all' and
9468 `cancel_breakpoints'. Add new parameter to `pause_all'.
9469 (pause_all): Add new `freeze' parameter.
9470 (unpause_all): New.
9471 (cancel_breakpoints): New.
9472 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9473 cancel breakpoints.
9474 (cmd_qtstart): Pause threads.
9475 (stop_tracing): Pause threads, and cancel breakpoints.
9476 * win32-low.c (win32_target_ops): Adjust.
9477
e471f25b
PA
94782010-05-03 Pedro Alves <pedro@codesourcery.com>
9479
9480 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9481 the inferior right away from here...
9482 (linux_wait_1): ... to here, and adjust to check the thread's
9483 last_resume_kind instead of the lwp's step or stop_expected flags.
9484
1915ef4f
PA
94852010-05-02 Pedro Alves <pedro@codesourcery.com>
9486
9487 * README: Use consistent `GDB' and `GDBserver' spellings.
9488
f9e39928
PA
94892010-05-02 Pedro Alves <pedro@codesourcery.com>
9490
9491 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9492 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9493 (linux_detach_one_lwp): Assume the lwp is stopped.
9494 (any_thread_of): Delete.
9495 (linux_detach): Stop all lwps here. Don't blindly delete all
9496 breakpoints.
9497 (delete_lwp_callback): New.
9498 (linux_mourn): Delete all lwps of the process that is gone.
9499 (linux_wait_1): Don't delete the last lwp of the process here.
9500 * mem-break.h (mark_breakpoints_out): Declare.
9501 * mem-break.c (mark_breakpoints_out): New.
9502 (free_all_breakpoints): Use it.
9503 * server.c (handle_target_event): If the process is gone, mark
9504 breakpoints out.
9505 * thread-db.c (struct thread_db) <create_bp>: New field.
9506 (thread_db_enable_reporting): Fix prototype. Store a thread event
9507 breakpoint reference in the thread_db struct.
9508 (thread_db_load_search): Clear the thread_db object.
9509 (try_thread_db_load_1): Ditto.
9510 (switch_to_process): New.
9511 (disable_thread_event_reporting): Use it.
9512 (remove_thread_event_breakpoints): New.
9513 (thread_db_detach, thread_db_mourn): Use it.
9514
1e7fc18c
PA
95152010-05-01 Pedro Alves <pedro@codesourcery.com>
9516
9517 * linux-low.c (linux_enable_event_reporting): New.
9518 (linux_wait_for_event_1, handle_extended_wait): Use it.
9519
02fc4de7
PA
95202010-04-30 Pedro Alves <pedro@codesourcery.com>
9521
9522 * linux-low.c (linux_kill_one_lwp, linux_kill)
9523 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9524 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9525 SIGSTOP even if the LWP is stopped.
9526 (send_sigstop_callback): New.
9527 (stop_all_lwps): Use send_sigstop_callback instead.
9528 (linux_resume_one_thread): Adjust.
9529 (proceed_one_lwp): Still proceed an LWP that the client has
9530 requested to stop, if we haven't reported it as stopped yet. Make
9531 sure that LWPs the client want stopped, have a pending SIGSTOP.
9532
bc3b5632
DE
95332010-04-26 Doug Evans <dje@google.com>
9534
ae1ada35
DE
9535 * server.c (handle_general_set): Make static.
9536
bc3b5632
DE
9537 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9538 Print received char after testing for error/eof instead of before.
9539 (input_interrupt): Tweak comment.
9540
65730243
DE
95412010-04-23 Doug Evans <dje@google.com>
9542
9543 * server.c (start_inferior): Print inferior argv if --debug.
9544
a8ae7dc0
AR
95452010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9546
9547 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9548 * nto-x86-low.c: Include server.h
9549
1c07cc19
PM
95502010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9551
9552 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9553 be consistent with other sources of this directory.
9554 (init_registers_amd64): Correct name of source file of this function
9555 in the comment.
9556
e0a61e09
PM
95572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9558
9559 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9560 64-bit executables.
9561
54709339
PM
95622010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9563
9564 * win32-i386-low.c: Add 64-bit support.
9565 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9566 (init_registers_amd64): Declare.
9567 (mappings): Add 64-bit version of array.
9568 (init_windows_x86): New function.
9569 (the_low_target): Change init_arch field to init_windows_x86.
9570
e8f0053d
PM
95712010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9572
9573 * win32-low.c: Adapt to support also 64-bit architecture.
9574 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9575 (get_image_name): Use SIZE_T type for local variable `done'.
9576 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9577 (toolhelp_get_dll_name): Idem.
9578 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9579 Use uintptr_t typecast to avoid warning.
9580 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9581 (handle_exception): Use phex_nz to avoid warning.
9582 (win32_wait): Remove unused local variable `process'.
9583
c481e77e
PM
95842010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9585
9586 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9587 `amd64-avx.o'.
9588
12ea4b69
PM
95892010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9590
9591 * configure.ac: Use `ws2_32' library for srv_mingw.
9592 * configure: Regenerate.
9593 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9594 * remote-utils.c: Likewise.
9595
f6d1620c
L
95962010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9597
9598 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9599 if __x86_64__ is defined.
9600
8e642873
PM
96012010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9602
9603 * configure: Regenerate.
9604
711e434b
PM
96052010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9606
9607 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9608 * target.h (target_ops): New get_tib_address field.
9609 * win32-low.h (win32_thread_info): Add thread_local_base field.
9610 * win32-low.c (child_add_thread): Add tlb argument.
9611 Set thread_local_base field to TLB.
9612 (get_child_debug_event): Adapt to child_add_thread change.
9613 (win32_get_tib_address): New function.
9614 (win32_target_ops): Set get_tib_address field to
9615 win32_get_tib_address.
9616 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9617
505106cd
PA
96182010-04-12 Pedro Alves <pedro@codesourcery.com>
9619
505106cd
PA
9620 * linux-low.c (linux_mourn): Also remove the process.
9621 * server.c (handle_target_event): Don't remove the process here.
9622 * nto-low.c (nto_mourn): New.
9623 (nto_target_ops): Install it.
9624 * spu-low.c (spu_mourn): New.
9625 (spu_target_ops): Install it.
9626 * win32-low.c (win32_mourn): New.
9627 (win32_target_ops): Install it.
9628
e8470a06
PA
96292010-04-12 Pedro Alves <pedro@codesourcery.com>
9630
9631 * server.h (buffer_xml_printf): Remove redundant `;'.
9632
45ba0d02
PA
96332010-04-12 Pedro Alves <pedro@codesourcery.com>
9634
9635 * regcache.c (set_register_cache): Invalidate regcaches before
9636 changing the register cache layout.
9637 (regcache_invalidate_one): Allow a NULL regcache.
9638 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9639 regcaches before changing the register cache layout or the target
9640 regsets.
9641
59e04013
L
96422010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9643
9644 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9645 variable warning on Linux/x86-64.
9646
8336d594
PA
96472010-04-11 Pedro Alves <pedro@codesourcery.com>
9648
9649 GDBserver disconnected tracing support.
9650
9651 * linux-low.c (linux_remove_process): Delete.
9652 (add_lwp): Don't set last_resume_kind here.
9653 (linux_kill): Use `mourn'.
9654 (linux_detach): Use `thread_db_detach', and `mourn'.
9655 (linux_mourn): New.
9656 (linux_attach_lwp_1): Adjust comment.
9657 (linux_attach): last_resume_kind moved the thread_info; adjust.
9658 (status_pending_p_callback): Adjust.
9659 (linux_wait_for_event_1): Adjust.
9660 (count_events_callback, select_singlestep_lwp_callback)
9661 (select_event_lwp_callback, cancel_breakpoints_callback)
9662 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9663 (proceed_one_lwp): Adjust.
9664 (linux_async): Add debug output.
9665 (linux_thread_stopped): New.
9666 (linux_pause_all): New.
9667 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9668 linux_pause_all.
9669 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9670 (thread_db_free): Delete declaration.
9671 (thread_db_detach, thread_db_mourn): Declare.
9672 * thread-db.c (thread_db_init): Use thread_db_mourn.
9673 (thread_db_free): Delete, split in two.
9674 (disable_thread_event_reporting): New.
9675 (thread_db_detach): New.
9676 (thread_db_mourn): New.
9677
9678 * server.h (struct thread_info) <last_resume_kind>: New field.
9679 <attached>: Add comment.
9680 <gdb_detached>: New field.
9681 (handler_func): Change return type to int.
9682 (handle_serial_event, handle_target_event): Ditto.
9683 (gdb_connected): Declare.
9684 (tracing): Delete.
9685 (disconnected_tracing): Declare.
9686 (stop_tracing): Declare.
9687
9688 * server.c (handle_query) <qSupported>: Report support for
9689 disconnected tracing.
9690 (queue_stop_reply_callback): Account for running threads.
9691 (gdb_wants_thread_stopped): New.
9692 (gdb_wants_all_threads_stopped): New.
9693 (gdb_reattached_process): New.
9694 (handle_status): Clear the `gdb_detached' flag of all processes.
9695 In all-stop, stop all threads.
9696 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9697 (process_serial_event): If the remote connection breaks, or if an
9698 exit was forced with "monitor exit", force an event loop exit.
9699 Handle disconnected tracing on detach.
9700 (handle_serial_event): Adjust.
9701 (handle_target_event): If GDB isn't connected, forward events back
9702 to the inferior, unless the last process exited, in which case,
9703 exit gdbserver. Adjust interface.
9704
9705 * remote-utils.c (remote_open): Don't block in accept. Instead
9706 register an event loop source on the listen socket file
9707 descriptor. Refactor bits into ...
9708 (listen_desc): ... this new global.
9709 (gdb_connected): ... this new function.
9710 (enable_async_notification): ... this new function.
9711 (handle_accept_event): ... this new function.
9712 (remote_close): Clear remote_desc.
9713
9714 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9715
9716 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9717 New fields.
9718 (mourn_inferior): Define.
9719 (target_process_qsupported): Avoid the dangling else problem.
9720 (thread_stopped): Define.
9721 (pause_all): Define.
9722 (target_waitstatus_to_string): Declare.
9723 * target.c (target_waitstatus_to_string): New.
9724
9725 * tracepoint.c (tracing): Make extern.
9726 (disconnected_tracing): New.
9727 (stop_tracing): Make extern. Handle tracing stops due to GDB
9728 disconnecting.
9729 (cmd_qtdisconnected): New.
9730 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9731 (handle_tracepoint_general_set): Handle QTDisconnected.
9732
9733 * event-loop.c (event_handler_func): Change return type to int.
9734 (process_event): Bail out if the event handler wants the event
9735 loop to stop.
9736 (handle_file_event): Ditto.
9737 (start_event_loop): Bail out if the event handler wants the event
9738 loop to stop.
9739
9740 * nto-low.c (nto_target_ops): Adjust.
9741 * spu-low.c (spu_wait): Don't remove the process here.
9742 (spu_target_ops): Adjust.
9743 * win32-low.c (win32_wait): Don't remove the process here.
9744 (win32_target_ops): Adjust.
9745
5d267c4c
PA
97462010-04-11 Pedro Alves <pedro@codesourcery.com>
9747
9748 * regcache.c (realloc_register_cache): Invalidate inferior's
9749 regcache before recreating it.
9750
623ccd72
PA
97512010-04-09 Pedro Alves <pedro@codesourcery.com>
9752
9753 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9754
219f2f23
PA
97552010-04-09 Stan Shebs <stan@codesourcery.com>
9756 Pedro Alves <pedro@codesourcery.com>
9757
9758 * server.h (LONGEST): New.
9759 (struct thread_info) <while_stepping>: New field.
9760 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9761 Declare.
9762 (initialize_tracepoint, handle_tracepoint_general_set)
9763 (handle_tracepoint_query, tracepoint_finished_step)
9764 (tracepoint_was_hit, release_while_stepping_state_list):
9765 (current_traceframe): Declare.
9766 * server.c (handle_general_set): Handle tracepoint packets.
9767 (read_memory): New.
9768 (write_memory): New.
9769 (handle_search_memory_1): Use read_memory.
9770 (handle_query): Report support for conditional tracepoints, trace
9771 state variables, and tracepoint sources. Handle tracepoint
9772 queries.
9773 (main): Initialize the tracepoints module.
9774 (process_serial_event): Handle traceframe reads/writes.
9775
9776 * linux-low.c (handle_tracepoints): New.
9777 (linux_wait_1): Call it.
9778 (linux_resume_one_lwp): Handle while-stepping.
9779 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9780 (linux_target_ops): Install them.
9781 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9782 New field.
9783 * linux-x86-low.c (x86_supports_tracepoints): New.
9784 (the_low_target). Install it.
9785
9786 * mem-break.h (delete_breakpoint): Declare.
9787 * mem-break.c (delete_breakpoint): Make external.
9788
9789 * target.h (struct target_ops): Add `supports_tracepoints',
9790 `read_pc', and `write_pc' fields.
9791 (target_supports_tracepoints): Define.
9792 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9793 (phex_nz): New.
9794
9795 * regcache.h (struct regcache) <registers_owned>: New field.
9796 (init_register_cache, regcache_cpy): Declare.
9797 (regcache_read_pc, regcache_write_pc): Declare.
9798 (register_cache_size): Declare.
9799 (supply_regblock): Declare.
9800 * regcache.c (init_register_cache): New.
9801 (new_register_cache): Use it.
9802 (regcache_cpy): New.
9803 (register_cache_size): New.
9804 (supply_regblock): New.
9805 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9806
219f2f23
PA
9807 * tracepoint.c: New.
9808
9809 * Makefile.in (OBS): Add tracepoint.o.
9810 (tracepoint.o): New rule.
9811
3a13a53b
L
98122010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9813
9814 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9815 (i386-mmx.o): New.
9816 (i386-mmx.c): Likewise.
9817 (i386-mmx-linux.o): Likewise.
9818 (i386-mmx-linux.c): Likewise.
9819
9820 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9821 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9822 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9823 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9824
9825 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9826 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9827 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9828
1570b33e
L
98292010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9830
9831 * Makefile.in (clean): Updated.
9832 (i386-avx.o): New.
9833 (i386-avx.c): Likewise.
9834 (i386-avx-linux.o): Likewise.
9835 (i386-avx-linux.c): Likewise.
9836 (amd64-avx.o): Likewise.
9837 (amd64-avx.c): Likewise.
9838 (amd64-avx-linux.o): Likewise.
9839 (amd64-avx-linux.c): Likewise.
9840
9841 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9842 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9843 (srv_amd64_regobj): Add amd64-avx.o.
9844 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9845 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9846 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9847 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9848 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9849 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9850 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9851
9852 * i387-fp.c: Include "i386-xstate.h".
9853 (i387_xsave): New.
9854 (i387_cache_to_xsave): Likewise.
9855 (i387_xsave_to_cache): Likewise.
9856 (x86_xcr0): Likewise.
9857
9858 * i387-fp.h (i387_cache_to_xsave): Likewise.
9859 (i387_xsave_to_cache): Likewise.
9860 (x86_xcr0): Likewise.
9861
9862 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9863 * linux-crisv32-low.c (target_regsets): Likewise.
9864 * linux-m68k-low.c (target_regsets): Likewise.
9865 * linux-mips-low.c (target_regsets): Likewise.
9866 * linux-ppc-low.c (target_regsets): Likewise.
9867 * linux-s390-low.c (target_regsets): Likewise.
9868 * linux-sh-low.c (target_regsets): Likewise.
9869 * linux-sparc-low.c (target_regsets): Likewise.
9870 * linux-xtensa-low.c (target_regsets): Likewise.
9871
9872 * linux-low.c: Include <sys/uio.h>.
9873 (regsets_fetch_inferior_registers): Support nt_type.
9874 (regsets_store_inferior_registers): Likewise.
9875 (linux_process_qsupported): New.
9876 (linux_target_ops): Add linux_process_qsupported.
9877
9878 * linux-low.h (regset_info): Add nt_type.
9879 (linux_target_ops): Add process_qsupported.
9880
9881 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9882 and <sys/uio.h>.
9883 (init_registers_i386_avx_linux): New.
9884 (init_registers_amd64_avx_linux): Likewise.
9885 (xmltarget_i386_linux_no_xml): Likewise.
9886 (xmltarget_amd64_linux_no_xml): Likewise.
9887 (PTRACE_GETREGSET): Likewise.
9888 (PTRACE_SETREGSET): Likewise.
9889 (x86_fill_xstateregset): Likewise.
9890 (x86_store_xstateregset): Likewise.
9891 (use_xml): Likewise.
9892 (x86_linux_update_xmltarget): Likewise.
9893 (x86_linux_process_qsupported): Likewise.
9894 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9895 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9896 init_registers_i386_linux here. Call
9897 x86_linux_update_xmltarget.
9898 (the_low_target): Add x86_linux_process_qsupported.
9899
9900 * server.c (handle_query): Call target_process_qsupported.
9901
9902 * target.h (target_ops): Add process_qsupported.
9903 (target_process_qsupported): New.
9904
fc7238bb
PA
99052010-04-03 Pedro Alves <pedro@codesourcery.com>
9906
9907 * inferiors.c (add_thread): Set last_status kind to
9908 TARGET_WAITKIND_IGNORE.
9909 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9910 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9911 (linux_wait_1): Move `thread' local definition to block that uses
9912 it. Don't NULL initialize `event_child'.
9913 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9914 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9915 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9916
bdabb078
PA
99172010-04-01 Pedro Alves <pedro@codesourcery.com>
9918
9919 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9920 an extended waitstatus, or by a watchpoint.
9921 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9922 thread was stepping or has been stopped by a watchpoint.
9923
d3bbe7a0
PA
99242010-04-01 Pedro Alves <pedro@codesourcery.com>
9925
9926 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9927 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9928 of another, then delete the previous, and validate all
9929 breakpoints.
9930 (validate_inserted_breakpoint): New.
9931 (delete_disabled_breakpoints): New.
9932 (validate_breakpoints): New.
9933 (check_mem_read): Validate breakpoints before trusting their
9934 shadow. Delete disabled breakpoints.
9935 (check_mem_write): Validate breakpoints before trusting they
9936 should be inserted. Delete disabled breakpoints.
9937 * mem-break.h (validate_breakpoints):
9938 * server.c (handle_query): Validate breakpoints when we see a
9939 qSymbol query.
9940
8b07ae33
PA
99412010-04-01 Pedro Alves <pedro@codesourcery.com>
9942
9943 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9944 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9945 if we could tell there's a GDB breakpoint at stop_pc.
9946 (need_step_over_p): Don't do a step over if we find a GDB
9947 breakpoint at the resume PC.
9948
9949 * mem-break.c (struct raw_breakpoint): New.
9950 (enum bkpt_type): New type `gdb_breakpoint'.
9951 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9952 fields. New field `raw'.
9953 (find_raw_breakpoint_at): New.
9954 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9955 breakpoint instead.
9956 (set_breakpoint_at): Adjust.
9957 (delete_raw_breakpoint): New.
9958 (release_breakpoint): New.
9959 (delete_breakpoint): Rename to...
9960 (delete_breakpoint_1): ... this. Add proc parameter. Use
9961 release_breakpoint. Return ENOENT.
9962 (delete_breakpoint): Reimplement.
9963 (find_breakpoint_at): Delete.
9964 (find_gdb_breakpoint_at): New.
9965 (delete_breakpoint_at): Delete.
9966 (set_gdb_breakpoint_at): New.
9967 (delete_gdb_breakpoint_at): New.
9968 (gdb_breakpoint_here): New.
9969 (set_reinsert_breakpoint): Use release_breakpoint.
9970 (uninsert_breakpoint): Rename to ...
9971 (uninsert_raw_breakpoint): ... this.
9972 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9973 (reinsert_raw_breakpoint): Change parameter type to
9974 raw_breakpoint.
9975 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9976 instead.
9977 (check_breakpoints): Adjust. Use release_breakpoint.
9978 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9979 (breakpoint_inserted_here): Ditto.
9980 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9981 Don't trust the breakpoint's shadow if it is not inserted.
9982 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9983 (delete_all_breakpoints): Adjust.
9984 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9985 use delete_breakpoint_1.
9986
9987 * mem-break.h (breakpoints_supported): Delete declaration.
9988 (set_gdb_breakpoint_at): Declare.
9989 (gdb_breakpoint_here): Declare.
9990 (delete_breakpoint_at): Delete.
9991 (delete_gdb_breakpoint_at): Declare.
9992
9993 * server.h (struct raw_breakpoint): Forward declare.
9994 (struct process_info): New field `raw_breakpoints'.
9995
9996 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9997 breakpoints.
9998
6bf5e0ba
PA
99992010-03-24 Pedro Alves <pedro@codesourcery.com>
10000
10001 * linux-low.c (status_pending_p_callback): Fix comment.
10002 (linux_wait_for_event_1): Move most of the internal breakpoint
10003 handling from here...
10004 (linux_wait_1): ... to here.
10005 (count_events_callback): New.
10006 (select_singlestep_lwp_callback): New.
10007 (select_event_lwp_callback): New.
10008 (cancel_breakpoints_callback): New.
10009 (select_event_lwp): New.
10010 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10011 priority to all LWPs that have had events that should be reported
10012 to the client. Cancel breakpoints when about to reporting the
10013 event to the client, not while stopping lwps. No longer cancel
10014 finished single-steps here.
10015 (cancel_finished_single_step): Delete.
10016 (cancel_finished_single_steps): Delete.
10017
414a389f
PA
100182010-03-24 Pedro Alves <pedro@codesourcery.com>
10019
10020 * mem-break.c (enum bkpt_type): New.
10021 (struct breakpoint): New field `type'.
10022 (set_breakpoint_at): Change return type to struct breakpoint
10023 pointer. Set type to `other_breakpoint' by default.
10024 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10025 in the breakpoint list.
10026 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10027 (reinsert_breakpoint): Rename to ...
10028 (reinsert_raw_breakpoint): ... this.
10029 (reinsert_breakpoints_at): Adjust.
10030 * mem-break.h (struct breakpoint): Declare.
10031 (set_breakpoint_at): Change return type to struct breakpoint
10032 pointer.
10033
2280c721
PA
100342010-03-24 Pedro Alves <pedro@codesourcery.com>
10035
10036 * server.c (handle_query): Assign, not compare.
10037
d50171e4
PA
100382010-03-24 Pedro Alves <pedro@codesourcery.com>
10039
10040 Teach linux gdbserver to step-over-breakpoints.
10041
10042 * linux-low.c (can_hardware_single_step): New.
10043 (supports_breakpoints): New.
10044 (handle_extended_wait): If stopping threads, read the stop pc of
10045 the new cloned LWP.
10046 (get_pc): New.
10047 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10048 low target doesn't support retrieving the PC.
10049 (add_lwp): Set last_resume_kind to resume_continue.
10050 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10051 (linux_attach): Don't clear stop_expected. Set the lwp's
10052 last_resume_kind to resume_stop.
10053 (linux_detach_one_lwp): Don't check for removed breakpoints.
10054 (check_removed_breakpoint): Delete.
10055 (status_pending_p): Rename to ...
10056 (status_pending_p_callback): ... this. Don't check for removed
10057 breakpoints. Don't consider threads that are stopped from GDB's
10058 perspective.
10059 (linux_wait_for_lwp): Always read the stop_pc here.
10060 (cancel_breakpoint): New.
10061 (step_over_bkpt): New global.
10062 (linux_wait_for_event_1): Implement stepping over breakpoints.
10063 (gdb_wants_lwp_stopped): New.
10064 (gdb_wants_all_stopped): New.
10065 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10066 single-step traps here. Store the thread's last reported target
10067 wait status.
10068 (send_sigstop): Don't clear stop_expected. Always set it,
10069 instead.
10070 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10071 (cancel_finished_single_step): New.
10072 (cancel_finished_single_steps): New.
10073 (wait_for_sigstop): Don't cancel finished single-step traps here.
10074 (linux_resume_one_lwp): Don't check for removed breakpoints.
10075 Don't set `step' on non-hardware step archs.
10076 (linux_set_resume_request): Ignore resume_stop requests if already
10077 stopping or stopped. Set the lwp's last_resume_kind.
10078 (resume_status_pending_p): Don't check for removed breakpoints.
10079 (need_step_over_p): New.
10080 (start_step_over): New.
10081 (finish_step_over): New.
10082 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10083 requests. Clear the thread's last reported target waitstatus.
10084 Don't use the `suspended' flag. Don't consider pending breakpoints.
10085 (linux_resume): Start a step-over if necessary.
10086 (proceed_one_lwp): New.
10087 (proceed_all_lwps): New.
10088 (unstop_all_lwps): New.
10089 * linux-low.h (struct lwp_info): Rewrite comment for the
10090 `suspended' flag. Add the `stop_pc' field. Delete the
10091 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10092 Add `'last_resume_kind' and `need_step_over' fields.
10093 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10094 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10095 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10096 (set_raw_breakpoint_at): New.
10097 (set_breakpoint_at): Rewrite to use it.
10098 (reinsert_breakpoint_handler): Delete.
10099 (set_reinsert_breakpoint): New.
10100 (reinsert_breakpoint_by_bp): Delete.
10101 (delete_reinsert_breakpoints): New.
10102 (uninsert_breakpoint): Rewrite.
10103 (uninsert_breakpoints_at): New.
10104 (reinsert_breakpoint): Rewrite.
10105 (reinsert_breakpoints_at): New.
10106 (check_breakpoints): Rewrite.
10107 (breakpoint_here): New.
10108 (breakpoint_inserted_here): New.
10109 (check_mem_read): Adjust.
10110 * mem-break.h (breakpoints_supported, breakpoint_here)
10111 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10112 (reinsert_breakpoint_by_bp): Delete declaration.
10113 (delete_reinsert_breakpoints): Declare.
10114 (reinsert_breakpoint): Delete declaration.
10115 (reinsert_breakpoints_at): Declare.
10116 (uninsert_breakpoint): Delete declaration.
10117 (uninsert_breakpoints_at): Declare.
10118 (check_breakpoints): Adjust prototype.
10119 * server.h: Adjust include order.
10120 (struct thread_info): Declare here. Add a `last_status' field.
10121
30ba68cb
MS
101222010-03-23 Michael Snyder <msnyder@vmware.com>
10123
10124 * server.c (crc32): New function.
10125 (handle_query): Add handling for 'qCRC:' request.
10126
b9a881c2
PA
101272010-03-23 Pedro Alves <pedro@codesourcery.com>
10128
10129 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10130 lwp had been stopped by a watchpoint.
10131
e92d13d5
PA
101322010-03-16 Pedro Alves <pedro@codesourcery.com>
10133
10134 * server.h (internal_error): Declare.
10135 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10136 * utils.c (internal_error): New function.
10137
64daa791
AS
101382010-03-15 Andreas Schwab <schwab@redhat.com>
10139
10140 * configure.srv: Fix typo setting srv_regobj.
10141
f52cd8cd
PA
101422010-03-15 Pedro Alves <pedro@codesourcery.com>
10143
10144 * linux-low.c (fetch_register): Avoid passing a non string literal
10145 format to `error'.
10146 (usr_store_inferior_registers): Ditto.
10147
93ae6fdc
PA
101482010-03-14 Pedro Alves <pedro@codesourcery.com>
10149
10150 * linux-low.c (linux_write_memory): Bail out early if peeking
10151 memory failed.
10152
c3adc08c
PA
101532010-03-14 Pedro Alves <pedro@codesourcery.com>
10154
10155 * linux-low.h (struct lwp_info): New fields
10156 `stopped_by_watchpoint' and `stopped_data_address'.
10157 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10158 here, and cache them in the lwp object.
10159 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10160 directly.
10161 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10162 field.
10163 (linux_stopped_by_watchpoint): Rewrite.
10164 (linux_stopped_data_address): Rewrite.
10165
bce522a2
PA
101662010-03-06 Simo Melenius <simo.melenius@iki.fi>
10167
10168 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10169 switching the current inferior, not before.
10170
90884b2b
L
101712010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10172
10173 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10174 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10175 i386-linux.c and amd64-linux.c.
10176 (reg-i386.o): Removed.
10177 (reg-i386.c): Likewise.
10178 (reg-i386-linux.o): Likewise.
10179 (reg-i386-linux.c): Likewise.
10180 (reg-x86-64.o): Likewise.
10181 (reg-x86-64.c): Likewise.
10182 (reg-x86-64-linux.o): Likewise.
10183 (reg-x86-64-linux.c): Likewise.
10184 (i386.o): New.
10185 (i386.c): Likewise.
10186 (i386-linux.o): Likewise.
10187 (i386-linux.c): Likewise.
10188 (amd64.o): Likewise.
10189 (amd64.c): Likewise.
10190 (amd64-linux.o): Likewise.
10191 (amd64-linux.c): Likewise.
10192
10193 * configure.srv (srv_i386_regobj): New.
10194 (srv_i386_linux_regobj): Likewise.
10195 (srv_amd64_regobj): Likewise.
10196 (srv_amd64_linux_regobj): Likewise.
10197 (srv_i386_32bit_xmlfiles): Likewise.
10198 (srv_i386_64bit_xmlfiles): Likewise.
10199 (srv_i386_xmlfiles): Likewise.
10200 (srv_amd64_xmlfiles): Likewise.
10201 (srv_i386_linux_xmlfiles): Likewise.
10202 (srv_amd64_linux_xmlfiles): Likewise.
10203 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10204 srv_xmlfiles to $srv_i386_xmlfiles.
10205 (i[34567]86-*-mingw32ce*): Likewise.
10206 (i[34567]86-*-mingw*): Likewise.
10207 (i[34567]86-*-nto*): Likewise.
10208 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10209 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10210 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10211 (x86_64-*-linux*): Likewise.
10212
10213 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10214 (init_registers_amd64_linux): New.
10215 (x86_arch_setup): Replace init_registers_x86_64_linux with
10216 init_registers_amd64_linux.
10217
193f13e6
MK
102182010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10219
10220 * configure.ac: Check for libdl. If it is not available link against
10221 static libthread_db.
10222 * configure: Regenerate.
10223
85d721b8
PA
102242010-02-22 Pedro Alves <pedro@codesourcery.com>
10225
10226 PR9605
10227
10228 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10229 handing a read watchpoint.
10230 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10231
6076632b
DE
102322010-02-12 Doug Evans <dje@google.com>
10233
10234 * linux-low.c (linux_supports_tracefork_flag): Document.
10235 (linux_look_up_symbols): Add comment.
10236
3327ccf7
L
102372010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10238
10239 * regcache.c (supply_register): Clear regcache if buf is NULL.
10240
0718675c 102412010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10242 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10243
10244 * inferiors.c (find_inferior): Add function documentation.
10245 (unloaded_dll): Handle the case where the unloaded dll has not
10246 been previously registered in the dll list.
10247
177321bd
DJ
102482010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10249
10250 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10251 (thumb2_breakpoint): New.
10252 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10253
2b009048
DJ
102542010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10255
10256 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10257 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10258 breakpoints.
10259
3be029c7
PA
102602010-01-21 Pedro Alves <pedro@codesourcery.com>
10261
10262 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10263
18f5de3b
JK
102642010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10265
10266 * linux-s390-low.c (s390_collect_ptrace_register)
10267 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10268
3743bb4f
DE
102692010-01-21 Doug Evans <dje@google.com>
10270
14ce3065
DE
10271 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10272 (PTRACE_ARG4_TYPE): New macro.
10273 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10274 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10275 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10276 (usr_store_inferior_registers): Ditto.
10277 (linux_read_memory, linux_write_memory): Ditto.
10278 (linux_test_for_tracefork): Ditto.
10279
3743bb4f
DE
10280 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10281 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10282
8b315be5
PA
102832010-01-21 Pedro Alves <pedro@codesourcery.com>
10284
10285 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10286 target.
10287
85492558
PA
102882010-01-21 Pedro Alves <pedro@codesourcery.com>
10289
10290 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10291 prototype to take a regcache. Adjust.
10292
442ea881
PA
102932010-01-20 Pedro Alves <pedro@codesourcery.com>
10294
10295 * regcache.h (struct thread_info): Forward declare.
10296 (struct regcache): New.
10297 (new_register_cache): Adjust prototype.
10298 (get_thread_regcache): Declare.
10299 (free_register_cache): Adjust prototype.
10300 (registers_to_string, registers_from_string): Ditto.
10301 (supply_register, supply_register_by_name, collect_register)
10302 (collect_register_as_string, collect_register_by_name): Ditto.
10303 * regcache.c (struct inferior_regcache_data): Delete.
10304 (get_regcache): Rename to ...
10305 (get_thread_regcache): ... this. Adjust. Switch inferior before
10306 fetching registers.
10307 (regcache_invalidate_one): Adjust.
10308 (regcache_invalidate): Fix prototype.
10309 (new_register_cache): Return the new register cache.
10310 (free_register_cache): Change prototype.
10311 (realloc_register_cache): Adjust.
10312 (registers_to_string): Change prototype to take a regcache. Adjust.
10313 (registers_from_string): Ditto.
10314 (register_data): Ditto.
10315 (supply_register): Ditto.
10316 (supply_register_by_name): Ditto.
10317 (collect_register): Ditto.
10318 (collect_register_as_string): Ditto.
10319 (collect_register_by_name): Ditto.
10320 * server.c (process_serial_event): Adjust.
10321 * linux-low.h (regset_fill_func, regset_store_func): Change
10322 prototype.
10323 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10324 Change prototype.
10325 * linux-low.c (get_stop_pc): Adjust.
10326 (check_removed_breakpoint): Adjust.
10327 (linux_wait_for_event): Adjust.
10328 (linux_resume_one_lwp): Adjust.
10329 (fetch_register): Add regcache parameter. Adjust.
10330 (usr_store_inferior_registers): Ditto.
10331 (regsets_fetch_inferior_registers): Ditto.
10332 (regsets_store_inferior_registers): Ditto.
10333 (linux_fetch_registers, linux_store_registers): Ditto.
10334 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10335 regcache. Adjust.
43aaf8b6
PA
10336 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10337 Ditto.
442ea881
PA
10338 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10339 prototype to take a regcache.
10340 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10341 * remote-utils.c (convert_ascii_to_int, outreg)
10342 (prepare_resume_reply): Change prototype to take a regcache.
10343 Adjust.
10344 * target.h (struct target_ops) <fetch_registers, store_registers>:
10345 Change prototype to take a regcache.
10346 (fetch_inferior_registers, store_inferior_registers): Change
10347 prototype to take a regcache. Adjust.
10348 * proc-service.c (ps_lgetregs): Adjust.
10349 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10350 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10351 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10352 take a regcache. Adjust.
10353 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10354 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10355 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10356 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10357 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10358 (cris_cannot_fetch_register):
10359 (cris_breakpoint_at): Change prototype to take a regcache.
10360 Adjust.
10361 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10362 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10363 to take a regcache. Adjust.
10364 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10365 Adjust.
10366 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10367 take a regcache. Adjust.
10368 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10369 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10370 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10371 * linux-mips-low.c (mips_get_pc):
10372 (mips_set_pc): Change prototype to take a regcache. Adjust.
10373 (mips_reinsert_addr): Adjust.
10374 (mips_collect_register): Change prototype to take a regcache.
10375 Adjust.
10376 (mips_supply_register):
10377 (mips_collect_register_32bit, mips_supply_register_32bit)
10378 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10379 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10380 * linux-ppc-low.c (ppc_supply_ptrace_register)
10381 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10382 (parse_spufs_run): Adjust.
10383 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10384 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10385 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10386 take a regcache. Adjust.
10387 * linux-s390-low.c (s390_collect_ptrace_register)
10388 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10389 (s390_set_pc): Change prototype to take a regcache. Adjust.
10390 (s390_arch_setup): Adjust.
10391 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10392 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10393 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10394 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10395 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10396 regcache. Adjust.
10397 (sparc_breakpoint_at): Adjust.
10398 * linux-xtensa-low.c (xtensa_fill_gregset):
10399 (xtensa_store_gregset):
10400 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10401 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10402 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10403 prototype to take a regcache. Adjust.
10404 * win32-arm-low.c (arm_fetch_inferior_register)
10405 (arm_store_inferior_register): Change prototype to take a
10406 regcache. Adjust.
10407 * win32-i386-low.c (i386_fetch_inferior_register)
10408 (i386_store_inferior_register): Change prototype to take a
10409 regcache. Adjust.
10410 * win32-low.c (child_fetch_inferior_registers)
10411 (child_store_inferior_registers): Change prototype to take a
10412 regcache. Adjust.
10413 (win32_wait): Adjust.
10414 (win32_fetch_inferior_registers): Change prototype to take a
10415 regcache. Adjust.
10416 (win32_store_inferior_registers): Adjust.
10417 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10418 store_inferior_register>: Change prototype to take a regcache.
10419
60c3d7b0
DE
104202010-01-20 Doug Evans <dje@google.com>
10421
10422 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10423 #ifdef.
10424 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10425 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10426
dc146f7c
VP
104272010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10428
10429 * linux-low.c (linux_core_of_thread): New.
10430 (compare_ints, show_process, list_threads): New.
10431 (linux_qxfer_osdata): Report threads and cores.
10432 (linux_target_op): Register linux_core_of_thread.
10433 * remote-utils.c (prepare_resume_reply): Report the core.
10434 (buffer_xml_printf): Support %d specifier.
10435 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10436 New.
10437 (handle_query): Handle qXfer:threads. Announce availability
10438 thereof.
10439 * target.h (struct target_ops): New field core_of_thread.
10440
7803799a
UW
104412010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10442
10443 * Makefile.in (clean): Remove new generated files.
10444 (reg-s390.o, reg-s390.c): Remove rules.
10445 (reg-s390x.o, reg-s390x.c): Likewise.
10446 (s390-linux32.o, s390-linux32.c): Add rules.
10447 (s390-linux64.o, s390-linux64.c): Likewise.
10448 (s390x-linux64.o, s390x-linux64.c): Likewise.
10449 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10450 * linux-s390-low.c: Include <elf.h>.
10451 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10452 (init_registers_s390): Remove prototype.
10453 (init_registers_s390x): Likewise.
10454 (init_registers_s390_linux32): Add prototype.
10455 (init_registers_s390_linux64): Likewise.
10456 (init_registers_s390x_linux64): Likewise.
10457 (s390_num_regs_3264): New define.
10458 (s390_regmap_3264): New global variable.
10459 (s390_cannot_fetch_register): Remove obsolete check.
10460 (s390_cannot_store_register): Likewise.
10461 (s390_collect_ptrace_register): Handle upper/lower register halves.
10462 (s390_supply_ptrace_register): Likewise.
10463 (s390_fill_gregset): Update to register number changes.
10464 (s390_get_hwcap): New routine.
10465 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10466 Install appropriate regmap and register set.
10467
6e7ffa39
JB
104682010-01-01 Joel Brobecker <brobecker@adacore.com>
10469
10470 * server.c (gdbserver_version): Update copyright year to 2010.
10471 * gdbreplay.c (gdbreplay_version): Likewise.
10472
957f3f49
DE
104732009-12-28 Doug Evans <dje@google.com>
10474
10475 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10476 elf/external.h. Include <elf.h> instead but only if necessary.
10477
ca5c370d
PA
104782009-12-28 Pedro Alves <pedro@codesourcery.com>
10479
10480 * linux-low.c (linux_remove_process): Remove `detaching'
10481 parameter. Don't release/detach from thread_db here.
10482 (linux_kill): Release/detach from thread_db here, ...
10483 (linux_detach): ... and here, before actually detaching.
10484 (linux_wait_1): ... and here, when a process exits.
10485 * thread-db.c (any_thread_of): New.
10486 (thread_db_free): Switch the current inferior to a thread of the
10487 passed in process.
10488
4ee62156
DE
104892009-12-21 Doug Evans <dje@google.com>
10490
d90e6a88
DE
10491 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10492
c5f62d5f
DE
10493 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10494 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10495 warning ifndef __NR_tkill. Move setting of errno there too.
10496 Delete unnecessary resetting of errno after syscall.
10497 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10498
10e86dd7
DE
10499 * configure.ac: Check for dladdr.
10500 * config.in: Regenerate.
10501 * configure: Regenerate.
10502 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10503 (try_thread_db_load): Update.
10504
4ee62156
DE
10505 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10506
00f515da
DE
105072009-12-18 Doug Evans <dje@google.com>
10508
e9464885
DE
10509 * event-loop.c: Include unistd.h if it exists.
10510
07d4f67e
DE
10511 * linux-low.c (my_waitpid): Move definition away from being in
10512 between linux_tracefork_child/linux_test_for_tracefork.
10513
00f515da
DE
10514 * gdb_proc_service.h (psaddr_t): Fix type.
10515 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10516 signature to match glibc.
10517
1de1badb
DE
105182009-12-16 Doug Evans <dje@google.com>
10519
10520 * linux-low.c (linux_read_memory): Fix argument to read.
10521
aeeb81d1
PA
105222009-11-26 Pedro Alves <pedro@codesourcery.com>
10523
10524 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10525 events, don't leave current_inferior pointing at null.
10526
10357975
PA
105272009-11-26 Pedro Alves <pedro@codesourcery.com>
10528
10529 * win32-low.c (LOG): Delete.
10530 (OUTMSG): Output to stderr.
10531 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10532 on compile time LOG macro.
10533 (win32_wait): Fix debug output.
10534
cf6e3471
PA
105352009-11-26 Pedro Alves <pedro@codesourcery.com>
10536
10537 * win32-low.c (win32_add_one_solib): If the dll name is
10538 "ntdll.dll", prepend the system directory to the dll path.
10539
0c85e18e
MK
105402009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10541
10542 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10543
9ac544ce 105442009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 10545 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
10546
10547 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10548 * configure.ac: Check for __mcoldfire__ and set
10549 gdb_cv_m68k_is_coldfire.
10550 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10551 reg-cf.o and reg-m68k.o.
10552 * configure: Regenerated.
10553
fd7dd3e6
PA
105542009-11-16 Pedro Alves <pedro@codesourcery.com>
10555
10556 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10557 Pass it to thread_db_free.
10558 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10559 proper `detaching' argument to linux_remove_process.
10560 * linux-low.h (thread_db_free): Add `detaching' parameter.
10561 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10562 to thread_db_free.
10563 (thread_db_free): Add `detaching' parameter. Only
10564 call td_ta_clear_event if detaching from process.
10565
75aa492e
MK
105662009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10567
10568 * thread-db.c (thread_db_free): Fix typo.
10569
21e1bee4
PP
105702009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10571
10572 PR gdb/10838
10573 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10574
8838b45e
NS
105752009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10576
10577 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10578 with an i686 compiler.
10579 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10580 needed.
10581 * configure: Rebuilt.
10582
8a35fb51
SL
105832009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10584
10585 PR gdb/10783
10586
10587 * server.c (handle_search_memory_1): Correct read_addr initialization
10588 in loop for searching subsequent chunks.
10589
96f15937
PP
105902009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10591
10592 * configure.ac: New --with-libthread-db option.
10593 * thread-db.c: Allow direct dependence on libthread_db.
10594 (thread_db_free): Adjust.
10595 * config.in: Regenerate.
10596 * configure: Likewise.
889bf7c5 10597
5f7d1694
PP
105982009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10599
10600 PR gdb/10757
10601 * thread-db.c (attach_thread): New function.
10602 (maybe_attach_thread): Return success/failure.
10603 (find_new_threads_callback): Adjust.
889bf7c5
PA
10604 (thread_db_find_new_threads): Loop until no new threads.
10605
88e3b899
PA
106062009-10-13 Pedro Alves <pedro@codesourcery.com>
10607
10608 * proc-service.c (ps_lgetregs): Formatting.
10609
cdbfd419
PP
106102009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10611
10612 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10613 * configure.ac: Adjust.
10614 * linux-low.h (struct process_info_private): Move members to struct
10615 thread_db.
10616 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10617 * linux-low.c (linux_remove_process): Adjust.
10618 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10619 * server.c (handle_query): Move code ...
10620 (handle_monitor_command): ... here. New function.
10621 * target.h (struct target_ops): New member.
10622 * thread-db.c (struct thread_db): New.
10623 (libthread_db_search_path): New variable.
10624 (thread_db_create_event, thread_db_enable_reporting)
10625 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10626 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10627 (try_thread_db_load_1, dladdr_to_soname): New functions.
10628 (try_thread_db_load, thread_db_load_search): New functions.
10629 (thread_db_init): Search for libthread_db.
10630 (thread_db_free): New function.
10631 (thread_db_handle_monitor_command): Likewise.
10632 * config.in: Regenerate.
10633 * configure: Regenerate.
889bf7c5 10634
4168d2d6
UW
106352009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10636
10637 * spu-low.c (spu_kill): Wait for inferior to terminate.
10638 Call clear_inferiors.
10639 (spu_detach): Call clear_inferiors.
10640
81ecdfbb
RW
106412009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10642
10643 * aclocal.m4: Regenerate.
10644 * config.in: Likewise.
10645 * configure: Likewise.
10646
0b9ff2c0
UW
106472009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10648
10649 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10650 (parse_spufs_run): New function.
10651 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10652 (ppc_breakpoint_at): Handle SPU breakpoints.
10653
efcbbd14
UW
106542009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10655
10656 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10657 (SPUFS_MAGIC): Define.
10658 (spu_enumerate_spu_ids): New function.
10659 (linux_qxfer_spu): New function.
10660 (linux_target_ops): Install linux_qxfer_spu.
10661
f4d9bade
UW
106622009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10663
10664 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10665 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10666 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10667 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10668 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10669 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10670 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10671 (init_registers_powerpc_cell32l): Add prototype.
10672 (init_registers_powerpc_cell64l): Likewise.
10673 (ppc_arch_setup): Detect Cell/B.E. architecture.
10674
96e946ca
RW
106752009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10676
10677 * Makefile.in (datarootdir): New variable.
10678
58d6951d
DJ
106792009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10680
10681 * linux-low.c (linux_write_memory): Update debugging output.
10682 * Makefile.in (clean): Add new descriptions.
10683 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10684 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10685 * configure.srv: Add new files for arm*-*-linux*.
10686 * linux-arm-low.c: Add new declarations.
10687 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10688 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10689 (HWCAP_VFPv3D16): New.
10690 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10691 instead of __IWMMXT__.
10692 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10693 (arm_arch_setup): New.
10694 (target_regsets): Remove #ifdef. Add VFP regset.
10695 (the_low_target): Use arm_arch_setup.
10696
12b42a12
DJ
106972009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10698
10699 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10700 the main thread again.
10701
ac8c974e
AR
107022009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10703
10704 Adding Neutrino gdbserver.
10705 * configure: Regenerated.
10706 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10707 * configure.srv (i[34567]86-*-nto*): New target.
10708 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10709 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10710 (nto_comctrl) [__QNX__]: New function.
10711 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10712
4424e0c3 107132009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
10714
10715 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10716 srv_tgtobj.
10717
912cf4ba
PA
107182009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10719 Pedro Alves <pedro@codesourcery.com>
10720
10721 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10722 don't support CONTEXT_EXTENDED_REGISTERS.
10723 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10724 (the_low_target): Install them.
10725 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10726 failing with ERROR_PIPE_NOT_CONNECTED.
10727
aa5ca48f
DE
107282009-06-30 Doug Evans <dje@google.com>
10729 Pierre Muller <muller@ics.u-strasbg.fr>
10730
10731 Add h/w watchpoint support to x86-linux, win32-i386.
10732 * Makefile.in (SFILES): Add i386-low.c
10733 (i386_low_h): Define.
10734 (i386-low.o): Add dependencies.
10735 (linux-x86-low.o): Add i386-low.h dependency.
10736 (win32-i386-low.o): Ditto.
10737 * i386-low.c: New file.
10738 * i386-low.h: New file.
10739 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10740 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10741 * linux-low.c (linux_add_process): Initialize arch_private.
10742 (linux_remove_process): Free arch_private.
10743 (add_lwp): Initialize arch_private.
10744 (delete_lwp): Free arch_private.
10745 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10746 provided.
10747 * linux-low.h (process_info_private): New member arch_private.
10748 (lwp_info): New member arch_private.
10749 (linux_target_ops): New members new_process, new_thread,
10750 prepare_to_resume.
10751 (ptid_of): New macro.
10752 * linux-x86-low.c: Include stddef.h, i386-low.h.
10753 (arch_process_info): New struct.
10754 (arch_lwp_info): New struct.
10755 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10756 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10757 (i386_dr_low_get_status): New function.
10758 (x86_insert_point, x86_remove_point): New functions.
10759 (x86_stopped_by_watchpoint): New function.
10760 (x86_stopped_data_address): New function.
10761 (x86_linux_new_process, x86_linux_new_thread): New functions.
10762 (x86_linux_prepare_to_resume): New function.
10763 (the_low_target): Add entries for insert_point, remove_point,
10764 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10765 prepare_to_resume.
10766 * server.c (debug_hw_points): New global.
10767 (monitor_show_help): Document set debug-hw-points.
10768 (handle_query): Process "set debug-hw-points".
10769 * server.h (debug_hw_points): Declare.
10770 (paddress): Declare.
10771 * utils.c (NUMCELLS, CELLSIZE): New macros.
10772 (get_sell, xsnprintf, paddress): New functions.
10773 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10774 remove_point, stopped_by_watchpoint, stopped_data_address.
10775 * win32-i386-low.c: Include i386-low.h.
10776 (debug_reg_state): Replaces dr.
10777 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10778 (i386_dr_low_get_status): New function.
10779 (i386_insert_point, i386_remove_point): New functions.
10780 (i386_stopped_by_watchpoint): New function.
10781 (i386_stopped_data_address): New function.
10782 (i386_initial_stuff): Update.
10783 (get_thread_context,set_thread_context,i386_thread_added): Update.
10784 (the_low_target): Add entries for insert_point,
10785 remove_point, stopped_by_watchpoint, stopped_data_address.
10786 * win32-low.c (win32_insert_watchpoint): New function.
10787 (win32_remove_watchpoint): New function.
10788 (win32_stopped_by_watchpoint): New function.
10789 (win32_stopped_data_address): New function.
10790 (win32_target_ops): Add entries for insert_watchpoint,
10791 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10792 * win32-low.h (win32_target_ops): New members insert_point,
10793 remove_point, stopped_by_watchpoint, stopped_data_address.
10794
d993e290
PA
107952009-06-25 Pedro Alves <pedro@codesourcery.com>
10796
10797 * server.c (process_serial_event): Re-return unsupported, not
10798 error, if the type isn't recognized. Re-allow supporting only
10799 insert or remove packets. Also call require_running for
10800 breakpoints. Add missing break statement to default case. Tidy.
10801 * target.h (struct target_ops): Rename insert_watchpoint to
10802 insert_point, and remove_watchpoint to remove_point.
10803
10804 * linux-low.h (struct linux_target_ops): Likewise.
10805 * linux-low.c (linux_insert_watchpoint): Rename to ...
10806 (linux_insert_point): ... this. Adjust.
10807 (linux_remove_watchpoint): Rename to ...
10808 (linux_remove_point): ... this. Adjust.
10809 (linux_target_ops): Adjust.
10810 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10811 (cris_insert_point): ... this.
10812 (cris_remove_watchpoint): Rename to ...
10813 (cris_remove_point): ... this.
10814 (the_low_target): Adjust.
10815
0f54c268
PM
108162009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10817
10818 * server.c (handle_v_kill): Pass signal_pid to
10819 kill_inferior if multi_process is zero.
10820
c6314022
AR
108212009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10822
10823 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10824 * target.h (target_ops): Comment for *_watchpoint to make it clear
10825 the functions can get types '0' and '1'.
10826
4463ce24
AR
108272009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10828
10829 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10830 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10831 * regcache.c (get_regcache): Likewise.
10832 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10833 * win32-low.c (child_fetch_inferior_registers): Remove check for
10834 regno 0.
10835
cf8fd78b
PA
108362009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10837 Pedro Alves <pedro@codesourcery.com>
10838
10839 * target.h (struct target_ops) <supports_multi_process>: New
10840 callback.
10841 (target_supports_multi_process): New.
10842 * server.c (handle_query): Even if GDB reports support, only
10843 enable multi-process if the target also supports it. Report
10844 multi-process support only if the target backend supports it.
10845 * linux-low.c (linux_supports_multi_process): New function.
10846 (linux_target_ops): Install it as target_supports_multi_process
10847 callback.
10848
47c0c975
DE
108492009-05-24 Doug Evans <dje@google.com>
10850
e09875d4
DE
10851 Global renaming of find_thread_pid to find_thread_ptid.
10852 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10853 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10854 All callers updated.
10855
e27d73f6
DE
10856 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10857 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10858 directly.
10859
47c0c975
DE
10860 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10861 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10862 (linux_resume_one_lwp): Ditto.
10863
2acc282a
DE
108642009-05-23 Doug Evans <dje@google.com>
10865
10866 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10867 from struct inferior_list_entry * to struct lwp_info *.
10868 All callers updated.
10869
9f1036c1
DE
108702009-05-13 Doug Evans <dje@google.com>
10871
10872 * linux-x86-low.c: Don't include assert.h.
10873 (x86_siginfo_fixup): Use fatal, not assert.
10874 (x86_arch_setup): Fix comment.
10875
d0722149
DE
108762009-05-12 Doug Evans <dje@google.com>
10877
10878 Biarch support for i386/amd64 gdbserver.
10879 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10880 Add linux-x86-low.c.
10881 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10882 (linux-x86-low.o): Add.
10883 * linux-x86-64-low.c: Delete.
10884 * linux-i386-low.c: Delete.
10885 * linux-x86-low.c: New file.
10886 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10887 linux-x86-low.o.
10888 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10889 linux-x86-low.o.
10890 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10891 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10892 (linux_child_pid_to_exec_file): New function.
10893 (elf_64_header_p, elf_64_file_p): New functions.
10894 (siginfo_fixup): New function.
10895 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10896 give target a chance to convert layout.
10897 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10898 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10899
fdeb2a12
DE
109002009-05-07 Doug Evans <dje@google.com>
10901
10902 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10903 (regsets_store_inferior_registers): Ditto.
10904
a6dbe5df
PA
109052009-05-06 Pedro Alves <pedro@codesourcery.com>
10906
10907 PR server/10048
10908
10909 * linux-low.c (must_set_ptrace_flags): Delete.
10910 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10911 of the global.
10912 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10913 `lwp->must_set_ptrace_flags' instead.
ba42693b 10914 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10915 (linux_wait_1): ... not here.
10916
5091eb23
DE
109172009-04-30 Doug Evans <dje@google.com>
10918
9f767825
DE
10919 * inferiors.c (started_inferior_callback): New function.
10920 (attached_inferior_callback): New function.
10921 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10922 * server.c (print_started_pid, print_attached_pid): New functions.
10923 (detach_or_kill_for_exit): New function.
10924 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10925 * server.h (have_started_inferiors_p): Declare.
10926 (have_attached_inferiors_p): Declare.
10927
5091eb23
DE
10928 * inferiors.c (remove_process): Fix memory leak, free process.
10929 * linux-low.c (linux_remove_process): New function.
10930 (linux_kill): Call it instead of remove_process.
10931 (linux_detach, linux_wait_1): Ditto.
10932
155c8968
PA
109332009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10934
10935 * configure.srv: Add x86 Windows CE target.
10936
7fe519cb
UW
109372009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10938
10939 * inferiors.c (get_thread_process): Make global.
10940 * server.h (get_thread_process): Add prototype.
10941 * thread-db.c (find_one_thread): Use get_thread_process
10942 instead of current_process.
10943 (thread_db_get_tls_address): Do not crash if called when
10944 thread layer is not yet initialized.
10945
5472f405
UW
109462009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10947
10948 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10949 * spu-low.c (current_tid): Rename to ...
10950 (current_ptid): ... this.
10951 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10952 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10953 ptid_get_lwp (current_ptid) instead of current_tid.
10954 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10955 instead of current_tid. Use find_process_pid to verify pid
10956 argument is valid. Pass proper argument to remove_process.
10957 (spu_thread_alive): Compare current_ptid instead of current_tid.
10958 (spu_resume): Likewise.
10959
55ac2b99
PA
109602009-04-02 Pedro Alves <pedro@codesourcery.com>
10961
10962 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10963 variable.
10964
95954743
PA
109652009-04-01 Pedro Alves <pedro@codesourcery.com>
10966
10967 Implement the multiprocess extensions, and add linux multiprocess
10968 support.
10969
10970 * server.h (ULONGEST): Declare.
10971 (struct ptid, ptid_t): New.
10972 (minus_one_ptid, null_ptid): Declare.
10973 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10974 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10975 (struct inferior_list_entry): Change `id' type from unsigned from
10976 to ptid_t.
10977 (struct sym_cache, struct breakpoint, struct
10978 process_info_private): Forward declare.
10979 (struct process_info): Declare.
10980 (current_process): Declare.
10981 (all_processes): Declare.
10982 (initialize_inferiors): Declare.
10983 (add_thread): Adjust to use ptid_t.
10984 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10985 (add_process, remove_process, find_thread_pid): Declare.
10986 (find_inferior_id): Adjust to use ptid_t.
10987 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10988 (multi_process): Declare.
10989 (push_event): Adjust to use ptid_t.
10990 (read_ptid, write_ptid): Declare.
10991 (prepare_resume_reply): Adjust to use ptid_t.
10992 (clear_symbol_cache): Declare.
10993 * inferiors.c (all_processes): New.
10994 (null_ptid, minus_one_ptid): New.
10995 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10996 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10997 (add_thread): Change unsigned long to ptid. Remove gdb_id
10998 parameter. Adjust.
10999 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11000 (gdb_id_to_thread): Rename to ...
11001 (find_thread_pid): ... this. Change unsigned long to ptid.
11002 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11003 (loaded_dll, pull_pid_from_list): Adjust.
11004 (add_process, remove_process, find_process_pid)
11005 (get_thread_process, current_process, initialize_inferiors): New.
11006 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11007 (struct target_waitstatus) <related_pid>: Ditto.
11008 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11009 return type to int.
11010 (struct target_ops) <join>: Add `pid' argument.
11011 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11012 (struct target_ops) <wait>: Add `ptid' field. Change return type
11013 to ptid.
11014 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11015 (mywait): Add `ptid' argument. Change return type to ptid_t.
11016 (target_pid_to_str): Declare.
11017 * target.c (set_desired_inferior): Adjust to use ptids.
11018 (mywait): Add new `ptid' argument. Adjust.
11019 (target_pid_to_str): New.
11020 * mem-break.h (free_all_breakpoints): Declare.
11021 * mem-break.c (breakpoints): Delelete.
11022 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11023 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11024 to use per-process breakpoint list.
11025 (free_all_breakpoints): New.
11026 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11027 (symbol_cache, all_symbols_looked_up): Delete.
11028 (hexchars): New.
11029 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11030 read_ptid): New.
11031 (prepare_resume_reply): Change ptid argument's type from unsigned
11032 long to ptid_t. Adjust. Implement W;process and X;process.
11033 (free_sym_cache, clear_symbol_cache): New.
11034 (look_up_one_symbol): Adjust to per-process symbol cache. *
11035 * server.c (cont_thread, general_thread, step_thread): Change type
11036 to ptid_t.
11037 (attached): Delete.
11038 (multi_process): New.
11039 (last_ptid): Change type to ptid_t.
11040 (struct vstop_notif) <ptid>: Change type to ptid_t.
11041 (queue_stop_reply, push_event): Change `ptid' argument's type to
11042 ptid_t.
11043 (discard_queued_stop_replies): Add `pid' argument.
11044 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11045 changes. Don't reference the `attached' global.
11046 (attach_inferior): Adjust to mywait interface changes.
11047 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11048 features. Handle and report "multiprocess+". Handle
11049 "qAttached:PID".
11050 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11051 changes.
11052 (handle_v_kill): New.
11053 (handle_v_stopped): Adjust to use target_pid_to_str.
11054 (handle_v_requests): Allow multiple attaches and runs when
11055 multiprocess extensions are in effect. Handle "vKill".
11056 (myresume): Adjust to use ptids.
11057 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11058 (handle_status): Adjust to discard_queued_stop_replies interface
11059 change.
11060 (first_thread_of, kill_inferior_callback)
11061 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11062 (main): Call initialize_inferiors. Adjust to use ptids, killing
11063 and detaching from all inferiors. Handle multiprocess packet
11064 variants.
11065 * linux-low.h: Include gdb_proc_service.h.
11066 (struct process_info_private): New.
11067 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11068 <lwpid_of>: Use ptid_get_lwp.
11069 (get_lwp_thread): Adjust.
11070 (struct lwp_info): Add `dead' member.
11071 (find_lwp_pid): Declare.
11072 * linux-low.c (thread_db_active): Delete.
11073 (new_inferior): Adjust comment.
11074 (inferior_pid): Delete.
11075 (linux_add_process): New.
11076 (handle_extended_wait): Adjust.
11077 (add_lwp): Change unsigned long to ptid.
11078 (linux_create_inferior): Add process to processes table. Adjust
11079 to use ptids. Don't set new_inferior here.
11080 (linux_attach_lwp): Rename to ...
11081 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11082 it. Adjust to use ptids.
11083 (linux_attach_lwp): New.
11084 (linux_attach): Add process to processes table. Don't set
11085 new_inferior here.
11086 (struct counter): New.
11087 (second_thread_of_pid_p, last_thread_of_process_p): New.
11088 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11089 multiple processes.
11090 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11091 processes. Remove process from process table.
11092 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11093 to multiple processes.
11094 (any_thread_of): New.
11095 (linux_detach): Add `pid' argument, and handle it. Remove process
11096 from processes table.
11097 (linux_join): Add `pid' argument. Handle it.
11098 (linux_thread_alive): Change unsighed long argument to ptid_t.
11099 Consider dead lwps as not being alive.
11100 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11101 threads we're not interested in.
11102 (same_lwp, find_lwp_pid): New.
11103 (linux_wait_for_lwp): Change `pid' argument's type from int to
11104 ptid_t. Adjust.
11105 (linux_wait_for_event): Rename to ...
11106 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11107 from int to ptid_t. Adjust.
11108 (linux_wait_for_event): New.
11109 (linux_wait_1): Add `ptid' argument. Change return type to
11110 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11111 that exit from the process table.
11112 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11113 Adjust.
11114 (mark_lwp_dead): New.
11115 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11116 stopping all threads, mark its main lwp as dead.
11117 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11118 ptids.
11119 (fetch_register, usr_store_inferior_registers)
11120 (regsets_fetch_inferior_registers)
11121 (regsets_store_inferior_registers, linux_read_memory)
11122 (linux_write_memory): Inline `inferior_pid'.
11123 (linux_look_up_symbols): Adjust to use per-process
11124 `thread_db_active'.
11125 (linux_request_interrupt): Adjust to use ptids.
11126 (linux_read_auxv): Inline `inferior_pid'.
11127 (initialize_low): Don't reference thread_db_active.
11128 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11129 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11130 (ps_getpid): Return the pid of the current inferior.
11131 * thread-db.c (proc_handle, thread_agent): Delete.
11132 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11133 per-process data.
11134 (find_one_thread): Change argument type to ptid_t. Adjust to
11135 per-process data.
11136 (maybe_attach_thread): Adjust to per-process data and ptids.
11137 (thread_db_find_new_threads): Ditto.
11138 (thread_db_init): Ditto.
11139 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11140 processes table. Adjust to use ptids.
11141 (spu_kill, spu_detach): Adjust interface. Remove process from
11142 processes table.
11143 (spu_join, spu_thread_alive): Adjust interface.
11144 (spu_wait): Adjust interface. Remove process from processes
11145 table. Adjust to use ptids.
11146 * win32-low.c (current_inferior_tid): Delete.
11147 (current_inferior_ptid): New.
11148 (debug_event_ptid): New.
11149 (thread_rec): Take a ptid. Adjust.
11150 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11151 (child_delete_thread): Ditto.
11152 (do_initial_child_stuff): Add `attached' argument. Add process to
11153 processes table.
11154 (child_fetch_inferior_registers, child_store_inferior_registers):
11155 Adjust.
11156 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11157 (win32_attach): Pass 1 to do_initial_child_stuff.
11158 (win32_kill): Adjust interface. Remove process from processes
11159 table.
11160 (win32_detach): Ditto.
11161 (win32_join): Adjust interface.
11162 (win32_thread_alive): Take a ptid.
11163 (win32_resume): Adjust to use ptids.
11164 (get_child_debug_event): Ditto.
11165 (win32_wait): Adjust interface. Remove exiting process from
11166 processes table.
11167
bd99dc85
PA
111682009-04-01 Pedro Alves <pedro@codesourcery.com>
11169
11170 Non-stop mode support.
11171
11172 * server.h (non_stop): Declare.
11173 (gdb_client_data, handler_func): Declare.
11174 (delete_file_handler, add_file_handler, start_event_loop):
11175 Declare.
11176 (handle_serial_event, handle_target_event, push_event)
11177 (putpkt_notif): Declare.
11178 * target.h (enum resume_kind): New.
11179 (struct thread_resume): Replace `step' field by `kind' field.
11180 (TARGET_WNOHANG): Define.
11181 (struct target_ops) <wait>: Add `options' argument.
11182 <supports_non_stop, async, start_non_stop>: New fields.
11183 (target_supports_non_stop, target_async): New.
11184 (start_non_stop): Declare.
11185 (mywait): Add `options' argument.
11186 * target.c (mywait): Add `options' argument. Print child exit
11187 notifications here.
11188 (start_non_stop): New.
11189 * server.c (non_stop, own_buf, mem_buf): New globals.
11190 (struct vstop_notif): New.
11191 (notif_queue): New global.
11192 (queue_stop_reply, push_event, discard_queued_stop_replies)
11193 (send_next_stop_reply): New.
11194 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11195 interface changes.
11196 (attach_inferior): In non-stop mode, don't wait for the target
11197 here.
11198 (handle_general_set): Handle QNonStop.
11199 (handle_query): When handling qC, return the current general
11200 thread, instead of the first thread of the list.
11201 (handle_query): If the backend supports non-stop mode, include
11202 QNonStop+ in the qSupported query response.
11203 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11204 and non-stop mode.
11205 (handle_v_attach, handle_v_run): Handle non-stop mode.
11206 (handle_v_stopped): New.
11207 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11208 (myresume): Adjust to use resume_kind. Handle non-stop.
11209 (queue_stop_reply_callback): New.
11210 (handle_status): Handle non-stop mode.
11211 (main): Clear non_stop flag on reconnection. Use the event-loop.
11212 Refactor serial protocol handling from here ...
11213 (process_serial_event): ... to this new function. When GDB
11214 selects any thread, select one here. In non-stop mode, wait until
11215 GDB acks all pending events before exiting.
11216 (handle_serial_event, handle_target_event): New.
11217 * remote-utils.c (remote_open): Install remote_desc in the event
11218 loop.
11219 (remote_close): Remove remote_desc from the event loop.
11220 (putpkt_binary): Rename to...
11221 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11222 (putpkt_binary): New as wrapper around putpkt_binary_1.
11223 (putpkt_notif): New.
11224 (prepare_resume_reply): In non-stop mode, don't change the
11225 general_thread.
11226 * event-loop.c: New.
11227 * Makefile.in (OBJ): Add event-loop.o.
11228 (event-loop.o): New rule.
11229
11230 * linux-low.h (pid_of): Moved here.
11231 (lwpid_of): New.
11232 (get_lwp_thread): Use lwpid_of.
11233 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11234 * linux-low.c (pid_of): Delete.
11235 (inferior_pid): Use lwpid_of.
11236 (linux_event_pipe): New.
11237 (target_is_async_p): New.
11238 (delete_lwp): New.
11239 (handle_extended_wait): Use lwpid_of.
11240 (add_lwp): Don't set lwpid field.
11241 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11242 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11243 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11244 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11245 first. Adjust to linux_wait_for_event interface changes. Use
11246 lwpid_of.
11247 (linux_detach): Don't delete the main lwp here.
11248 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11249 (status_pending_p): Don't consider explicitly suspended lwps.
11250 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11251 pointer. Add OPTIONS argument. Change return type to int. Use
11252 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11253 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11254 pointer. Add status pointer argument. Return a pid instead of a
11255 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11256 changes. In non-stop mode, don't switch to a random thread.
11257 (linux_wait): Rename to...
11258 (linux_wait_1): ... this. Add target_options argument, and handle
11259 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11260 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11261 clean exit and signal exit code. Don't stop all threads in
11262 non-stop mode. In all-stop mode, only stop all threads when
11263 reporting a stop to GDB. Handle explicit thread stop requests.
11264 (async_file_flush, async_file_mark): New.
11265 (linux_wait): New.
11266 (send_sigstop): Use lwpid_of.
11267 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11268 interface changes. In non-stop mode, don't switch to a random
11269 thread.
11270 (linux_resume_one_lwp): Use lwpid_of.
11271 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11272 (linux_resume_one_thread): ... this. Handle resume_stop. In
11273 non-stop mode, don't look for pending flag in all threads.
11274 (resume_status_pending_p): Don't consider explicitly suspended
11275 threads.
11276 (my_waitpid): Reimplement. Emulate __WALL.
11277 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11278 Use lwpid_of.
11279 (sigchld_handler, linux_supports_non_stop, linux_async)
11280 (linux_start_non_stop): New.
11281 (linux_target_ops): Register linux_supports_non_stop, linux_async
11282 and linux_start_non_stop.
11283 (initialize_low): Install SIGCHLD handler.
11284 * thread-db.c (thread_db_create_event, find_one_thread)
11285 (thread_db_get_tls_address): Use lwpid_of.
11286 * win32-low.c (win32_detach): Adjust to use resume_kind.
11287 (win32_wait): Add `options' argument.
11288 * spu-low.c (spu_resume): Adjust to use resume_kind.
11289 (spu_wait): Add `options' argument.
11290
5b1c542e
PA
112912009-04-01 Pedro Alves <pedro@codesourcery.com>
11292
11293 Decouple target code from remote protocol.
11294
11295 * target.h (enum target_waitkind): New.
11296 (struct target_waitstatus): New.
11297 (struct target_ops) <wait>: Return an unsigned long. Take a
11298 target_waitstatus pointer instead of a char pointer.
11299 (mywait): Likewise.
11300 * target.c (mywait): Change prototype to return an unsigned long.
11301 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11302 * server.h (thread_from_wait, old_thread_from_wait): Delete
11303 declarations.
11304 (prepare_resume_reply): Change prototype to take a
11305 target_waitstatus.
11306 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11307 (last_status, last_ptid): New.
11308 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11309 pid instead of a signal.
11310 (attach_inferior): Remove "status" and "signal" parameters.
11311 Adjust.
11312 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11313 not as an address.
11314 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11315 (handle_v_requests, myresume): Remove "status" and "signal"
11316 parameters. Adjust.
11317 (handle_status): New.
11318 (main): Delete local `status'. Adjust.
11319 * remote-utils.c: Include target.h.
11320 (prepare_resume_reply): Change prototype to take a
11321 target_waitstatus. Adjust.
11322
11323 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11324 interface.
11325 * spu-low.c (spu_wait): Adjust.
11326 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11327 Delete.
11328 (win32_wait): Adjust.
11329
2bd7c093
PA
113302009-04-01 Pedro Alves <pedro@codesourcery.com>
11331
11332 * target.h (struct thread_resume): Delete leave_stopped member.
11333 (struct target_ops): Add a `n' argument to the `resume' callback.
11334 * server.c (start_inferior): Adjust.
11335 (handle_v_cont, myresume): Adjust.
11336 * linux-low.c (check_removed_breakpoint): Adjust to resume
11337 interface change, and to removed leave_stopped field.
11338 (resume_ptr): Delete.
11339 (struct thread_resume_array): New.
11340 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11341 resume interface change.
11342 (linux_continue_one_thread, linux_queue_one_thread)
11343 (resume_status_pending_p): Check if the resume field is NULL
11344 instead of checking the leave_stopped member.
11345 (linux_resume): Adjust to the target resume interface change.
11346 * spu-low.c (spu_resume): Adjust to the target resume interface
11347 change.
11348 * win32-low.c (win32_detach, win32_resume): Ditto.
11349
c35fafde
PA
113502009-04-01 Pedro Alves <pedro@codesourcery.com>
11351
11352 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11353 flag.
11354 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11355 pending.
11356 (linux_continue_one_thread): Only preserve the stepping flag if
11357 there's a pending breakpoint.
11358
0a59d50b
PA
113592009-03-31 Pedro Alves <pedro@codesourcery.com>
11360
11361 * server.c (main): After the inferior having exited, call
11362 remote_close before exiting gdbserver.
11363
f04c6d38
TJB
113642009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11365
11366 Fix size of FPSCR in Power 7 processors.
11367 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11368 (PPC_FEATURE_HAS_DFP): New #define.
11369 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11370 size of the FPSCR.
11371
78e5cee6
PA
113722009-03-23 Pedro Alves <pedro@codesourcery.com>
11373
11374 * server.c (handle_query) Whitespace and formatting.
11375
1b3f6016
PA
113762009-03-22 Pedro Alves <pedro@codesourcery.com>
11377
11378 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11379 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11380 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11381 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11382 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11383 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11384 Makefile.in, configure.ac: Fix whitespace throughout.
11385 * configure: Regenerate.
11386
a07b2135
PA
113872009-03-22 Pedro Alves <pedro@codesourcery.com>
11388
11389 * inferiors.c (find_inferior): Make it safe for the callback
11390 function to delete the currently iterated inferior.
11391
67cc2626
PA
113922009-03-22 Pedro Alves <pedro@codesourcery.com>
11393
11394 * Makefile.in (linuw_low_h): Move higher.
11395 (thread-db.o): Depend on $(linux_low_h).
11396
54a0b537
PA
113972009-03-17 Pedro Alves <pedro@codesourcery.com>
11398
11399 Rename "process" to "lwp" throughout.
11400
11401 * linux-low.c (all_processes): Rename to...
11402 (all_lwps): ... this.
11403 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11404 (add_process): Rename to ...
11405 (add_lwp): ... this. Adjust.
11406 (linux_create_inferior): Adjust.
11407 (linux_attach_lwp): Adjust.
11408 (linux_attach): Adjust.
11409 (linux_kill_one_process): Rename to ...
11410 (linux_kill_one_lwp): ... this. Adjust.
11411 (linux_kill): Adjust.
11412 (linux_detach_one_process): Rename to ...
11413 (linux_detach_one_lwp): ... this. Adjust.
11414 (linux_detach): Adjust.
11415 (check_removed_breakpoint): Adjust.
11416 (status_pending_p): Adjust.
11417 (linux_wait_for_process): Rename to ...
11418 (linux_wait_for_lwp): ... this. Adjust.
11419 (linux_wait_for_event): Adjust.
11420 (send_sigstop): Adjust.
11421 (wait_for_sigstop): Adjust.
11422 (stop_all_processes): Rename to ...
11423 (stop_all_lwps): ... this.
11424 (linux_resume_one_process): Rename to ...
11425 (linux_resume_one_lwp): ... this. Adjust.
11426 (linux_set_resume_request, linux_continue_one_thread)
11427 (linux_queue_one_thread, resume_status_pending_p)
11428 (usr_store_inferior_registers, regsets_store_inferior_registers)
11429 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11430 Adjust.
11431 * linux-low.h (get_process): Rename to ...
11432 (get_lwp): ... this. Adjust.
11433 (get_thread_process): Rename to ...
11434 (get_thread_lwp): ... this. Adjust.
11435 (get_process_thread): Rename to ...
11436 (get_lwp_thread): ... this. Adjust.
11437 (struct process_info): Rename to ...
11438 (struct lwp_info): ... this.
11439 (all_processes): Rename to ...
11440 (all_lwps): ... this.
11441 * proc-service.c (ps_lgetregs): Adjust.
11442 * thread-db.c (thread_db_create_event, find_one_thread)
11443 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11444
0b16c5cf
PA
114452009-03-14 Pedro Alves <pedro@codesourcery.com>
11446
11447 * server.c (handle_query): Handle "qAttached".
11448
32de4b9d
NS
114492009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11450
11451 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11452 GPLv3, update license URL.
11453
2aecd87f
DE
114542009-03-01 Doug Evans <dje@google.com>
11455
93efd302 11456 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11457 (server_h): Add gdb_signals.h.
11458 (signals.o): Update.
11459 * server.h (target_signal_from_host,target_signal_to_host_p)
11460 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11461
86b1f9c5
PM
114622009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11463
11464 * remote-utils.c (getpkt): Also generate remote-debug
11465 information if noack_mode is set.
11466
4aa995e1
PA
114672009-02-06 Pedro Alves <pedro@codesourcery.com>
11468
11469 * server.c (handle_query): Report qXfer:siginfo:read and
11470 qXfer:siginfo:write as supported and handle them.
11471 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11472 * linux-low.c (linux_xfer_siginfo): New.
11473 (linux_target_ops): Set it.
11474
62709adf
PA
114752009-01-26 Pedro Alves <pedro@codesourcery.com>
11476
11477 * server.c (gdbserver_usage): Mention --remote-debug.
11478 (main): Accept '--remote-debug' switch.
11479
aef93bd7
DE
114802009-01-18 Doug Evans <dje@google.com>
11481
11482 * regcache.c (new_register_cache): No need to check result of xcalloc.
11483 * server.c (handle_search_memory): Back out calls to xmalloc,
11484 result is checked and error is returned to user upon failure.
11485 (handle_query): Ditto. Add more checks for result of malloc.
11486 (handle_v_cont): Check result of malloc, report error back to
11487 user upon failure.
11488 (handle_v_run): Ditto. Call freeargv.
11489 * server.h (freeargv): Declare.
11490 * utils.c (freeargv): New fn.
11491
54363045
DE
114922009-01-15 Doug Evans <dje@google.com>
11493
f626972c
DE
11494 * gdbreplay.c (perror_with_name): Make arg const char *.
11495 * server.h (target_signal_to_name): Make return type const char *.
0842e787 11496 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 11497 * utils.c (perror_with_name): Make arg const char *.
54363045 11498
18aae699
PA
114992009-01-14 Pedro Alves <pedro@codesourcery.com>
11500
11501 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11502 when handling a EXIT_PROCESS_DEBUG_EVENT.
11503
ff703abe
JB
115042009-01-06 Joel Brobecker <brobecker@adacore.com>
11505
11506 * gdbreplay.c (gdbreplay_version): Update copyright year.
11507 * server.c (gdbserver_version): Likewise.
11508
f21cc1a2 115092009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
11510
11511 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 11512 (handle_extended_wait): Improve comment.
0e21c1ec 11513
bca929d3
DE
115142008-12-13 Doug Evans <dje@google.com>
11515
11516 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11517 * server.h (ATTR_MALLOC): New macro.
11518 (xmalloc,xcalloc,xstrdup): Declare.
11519 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11520 * inferiors.c: Ditto.
11521 * linux-low.c: Ditto.
11522 * mem-break.c: Ditto.
11523 * regcache.c: Ditto.
11524 * remote-utils.c: Ditto.
11525 * server.c: Ditto.
11526 * target.c: Ditto.
11527 * win32-low.c: Ditto.
11528
97438e3f
DE
115292008-12-12 Doug Evans <dje@google.com>
11530
896c7fbb
DE
11531 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11532 in debugging printf.
11533
97438e3f
DE
11534 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11535
e3b886f8
DE
115362008-12-09 Doug Evans <dje@google.com>
11537
11538 * linux-low.h (struct process_info): Delete member tid, unused.
11539 * thread-db.c (find_one_thread): Update.
11540 (maybe_attach_thread): Update.
11541
07e059b5
VP
115422008-12-02 Pedro Alves <pedro@codesourcery.com>
11543
889bf7c5
PA
11544 * target.h (struct target_ops): Add qxfer_osdata member.
11545 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11546 and dirent.h.
11547 (linux_qxfer_osdata): New functions.
11548 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11549 callback.
11550 * server.c (handle_query): Handle "qXfer:osdata:read:".
11551 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11552 (buffer_xml_printf): New functions.
11553 * server.h (struct buffer): New.
11554 (buffer_grow_str, buffer_grow_str0): New macros.
11555 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11556 (buffer_xml_printf): Declare.
07e059b5 11557
4cab47ab
DE
115582008-11-24 Doug Evans <dje@google.com>
11559
11560 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11561
f142445f
DJ
115622008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11563
11564 * server.c (handle_v_run): Always use the supplied argument list.
11565
d0107bb6 115662008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 11567
d0107bb6
BW
11568 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11569 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 11570
2c4ad781
TJB
115712008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11572
11573 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11574 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11575 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11576 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11577 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11578 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11579 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11580 XML target descriptions.
11581 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11582 when inferior is running on an ISA 2.05 or later processor. Add
11583 special case to return offset for full 64-bit slot of FPSCR when
11584 in 32-bits.
11585
dfb64f85
DJ
115862008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11587
11588 * Makefile.in (SFILES, clean): Added sparc64 files.
11589 (reg-sparc64.o, reg-sparc64.c): New.
11590 * configure.srv (sparc*-*-linux*): New configuration.
11591 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11592 syscall arguments for SPARC.
11593 (regsets_store_inferior_registers): Likewise.
11594 * linux-sparc-low.c: New file.
11595
66b6e1dd
DE
115962008-10-21 Doug Evans <dje@google.com>
11597
11598 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11599 (READLINE_DIR,READLINE_DEP): Delete.
11600 (INTERNAL_CFLAGS): Update.
11601 (LINTFLAGS): Update.
11602
9b710a42
PA
116032008-10-10 Pedro Alves <pedro@codesourcery.com>
11604
11605 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11606 whole argv from the last run, not just argv[0].
11607
5822d809
PA
116082008-09-08 Pedro Alves <pedro@codesourcery.com>
11609
11610 * regcache.c (new_register_cache): Return NULL if the register
11611 cache size isn't known yet.
11612 (free_register_cache): Avoid dereferencing a NULL regcache.
11613
74aac56f
DJ
116142008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11615
11616 * configure.srv: Merge MIPS and MIPS64.
11617
400b20f5
MR
116182008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11619
11620 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11621
677c5bb1
LM
116222008-08-18 Luis Machado <luisgpm@br.ibm.com>
11623
11624 * Makefile.in: Add required vsx dependencies.
11625
11626 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11627 Declare init_registers_powerpc_vsx32l.
11628 Declare init_registers_powerpc_vsx64l.
11629 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11630 (ppc_arch_setup): Check for VSX in hwcap.
11631 (ppc_fill_vsxregset): New function.
11632 (ppc_store_vsxregset): New function.
11633 Add new VSX entry in regset_info target_regsets.
11634
11635 * configure.srv: Add new VSX dependencies.
11636
a6f3e723
SL
116372008-08-12 Pedro Alves <pedro@codesourcery.com>
11638
11639 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11640 (remote_open): Set or clear transport_is_reliable.
11641 (putpkt_binary): Don't expect acks in noack mode.
11642 (getpkt): Don't send ack/nac in noack mode.
11643 * server.c (handle_general_set): Handle QStartNoAckMode.
11644 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11645 qSupported.
11646 (main): Reset noack_mode on every connection.
11647 * server.h (noack_mode): Declare.
11648
a417dc56
RW
116492008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11650
11651 * Makefile.in (GDBREPLAY_OBS): New variable.
11652 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11653
3221518c
UW
116542008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11655 Daniel Jacobowitz <dan@codesourcery.com>
11656
11657 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11658 (usr_store_inferior_registers): Likewise.
11659 (regsets_store_inferior_registers): Likewise.
11660
ec56be1b
PA
116612008-07-31 Rolf Jansen <rj@surtec.com>
11662 Pedro Alves <pedro@codesourcery.com>
11663
11664 * configure.ac: Check for memmem declaration.
11665 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11666 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11667 (disable_packet_qfThreadInfo): Unconditionally compile.
11668 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11669 * configure, config.in: Regenerate.
11670
2fe5e3ff
DE
116712008-07-28 Doug Kwan <dougkwan@google.com>
11672
11673 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11674 (linux_write_memory): Remove declaration of errno.
11675
836acd6d
UW
116762008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11677
11678 * linux-low.c (handle_extended_wait): Do not use "status"
11679 variable uninitialized.
11680
aeba519e
PA
116812008-07-07 Pedro Alves <pedro@codesourcery.com>
11682
11683 * server.c (handle_v_attach): Inhibit reporting dll changes.
11684
db42f210
PA
116852008-06-27 Pedro Alves <pedro@codesourcery.com>
11686
11687 * remote-utils.c (prepare_resume_reply): If requested, don't
11688 output "thread:TID" in the T stop reply.
11689
11690 * server.c (disable_packet_vCont, disable_packet_Tthread)
11691 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11692 (handle_query): If requested, disable support for qC, qfThreadInfo
11693 and qsThreadInfo.
11694 (handle_v_requests): If requested, disable support for vCont.
11695 (gdbserver_show_disableable): New.
11696 (main): Handle --disable-packet and --disable-packet=LIST.
11697
11698 * server.h (disable_packet_vCont, disable_packet_Tthread)
11699 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11700
8e4c5421
CD
117012008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11702
11703 * server.c (gdbserver_usage): Mention --version.
11704
6e23a804
DJ
117052008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11706
11707 * Makefile.in (gdbreplay.o): New rule.
11708
90aa6a40
JM
117092008-06-06 Joseph Myers <joseph@codesourcery.com>
11710
11711 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11712 message, not gdbserver.
11713
c16158bc 117142008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
11715 Nathan Sidwell <nathan@codesourcery.com>
11716 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11717
11718 * acinclude.m4: Include ../../config/acx.m4.
11719 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11720 * configure, config.in: Regenerate.
11721 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11722 * server.c (gdbserver_version): Print PKGVERSION.
11723 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11724 (main): Adjust gdbserver_usage calls.
11725 * gdbreplay.c (version, host_name): Add declarations.
11726 (gdbreplay_version, gdbreplay_usage): New.
11727 (main): Accept --version and --help options.
11728
aeb75bf5
DJ
117292008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11730
11731 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11732 (arm_breakpoint_at): Handle Thumb.
11733 (the_low_target): Add comment.
11734
76b233dd
UW
117352008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11736
11737 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11738
08388c79
DE
117392008-05-09 Doug Evans <dje@google.com>
11740
a3c83fae
DE
11741 * server.h (decode_search_memory_packet): Declare.
11742 * remote-utils.c (decode_search_memory_packet): New fn.
11743 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11744 (handle_search_memory): New fn.
11745 (handle_query): Process qSearch:memory packets.
11746
bb9c3d36
UW
117472008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11748
11749 * regcache.c (registers_length): Remove.
11750 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11751 full register packet.
11752 * regcache.h (registers_length): Remove prototype.
11753 * server.h (PBUFSIZ): Define to 16384.
11754
7284e1be
UW
117552008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11756
11757 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11758 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11759 powerpc-64l.o, and powerpc-altivec64l.o.
11760 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11761 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11762 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11763 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11764 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11765 to srv_xmlfiles.
11766
11767 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11768 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11769 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11770 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11771 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11772 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11773 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11774 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11775 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11776 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11777 (clean): Update.
11778
11779 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11780 (init_registers_powerpc_32l): ... this new prototype.
11781 (init_registers_powerpc_32): Remove, replace by ...
11782 (init_registers_powerpc_altivec32l): ... this new prototype.
11783 (init_registers_powerpc_e500): Remove, replace by ...
11784 (init_registers_powerpc_e500l): ... this new prototype.
11785 (init_registers_ppc64): Remove, replace by ...
11786 (init_registers_powerpc_64l): ... this new prototype.
11787 (init_registers_powerpc_64): Remove, replace by ...
11788 (init_registers_powerpc_altivec64l): ... this new prototype.
11789 (ppc_num_regs): Set to 73.
11790 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11791 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11792 (ppc_cannot_store_register): Handle orig_r3 and trap.
11793 (ppc_arch_setup): Update init_registers_... calls.
11794 (ppc_fill_gregset): Handle orig_r3 and trap.
11795
11796 * inferiors.c (clear_inferiors): Reset current_inferior.
11797
fdc59709
PB
117982008-04-23 Paolo Bonzini <bonzini@gnu.org>
11799
889bf7c5
PA
11800 * acinclude.m4: Add override.m4.
11801 * configure: Regenerate.
fdc59709 11802
c9b2f845
UW
118032008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11804
11805 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11806 initial call to init_register_ppc64.
11807
550512b8
UW
118082008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11809
43aaf8b6
PA
11810 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11811 single powerpc*-*-linux* case.
550512b8
UW
11812 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11813
b6430ec3
UW
118142008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11815
11816 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11817 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11818 from reg_xmlfiles.
11819 * linux-ppc-low.c: Include <elf.h>.
11820 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11821 (ppc_hwcap): New global variable.
11822 (ppc_regmap): Remove __SPE__ #ifdef sections.
11823 (ppc_regmap_e500): New global variable.
11824 (ppc_cannot_store_register): Update __SPE__ special case.
11825 (ppc_get_hwcap): New function.
11826 (ppc_arch_setup): Use it to determine whether inferior supports
11827 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11828 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11829 Do not access registers if target does not support AltiVec.
11830 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11831 Do not access registers if target does not support SPE.
11832 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11833
52fa2412
UW
118342008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11835
11836 * linux-low.c (disabled_regsets, num_regsets): New.
11837 (use_regsets_p): Delete.
11838 (linux_wait_for_process): Clear disabled_regsets.
11839 (regsets_fetch_inferior_registers): Check and set it.
11840 (regsets_store_inferior_registers): Likewise.
11841 (linux_fetch_registers, linux_store_registers): Do not use
11842 use_regsets_p.
11843 (initialize_low): Allocate disabled_regsets.
11844
e28b3332
DJ
118452008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11846
11847 * Makefile.in (LIBOBJS): New.
11848 (OBS): Use LIBOBJS.
11849 (memmem.o): New rule.
11850 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11851 * configure: Regenerated.
11852
4536995d
UW
118532008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11854
11855 * server.c (handle_query): Never return "unsupported" for
11856 qXfer:features:read queries.
11857
221c031f
UW
118582008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11859
11860 * server.c (get_features_xml): Fix inverted condition.
11861 (handle_query): Always support qXfer:feature:read.
11862
ccd213ac
DJ
118632008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11864
11865 * server.c (wrapper_argv): New.
11866 (start_inferior): Handle wrapper_argv. If set, expect an extra
11867 trap.
11868 (gdbserver_usage): Document --wrapper.
11869 (main): Parse --wrapper.
11870
6fe305f7
UW
118712008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11872
11873 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11874 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11875 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11876 (ppc_set_pc): Likewise.
11877 (ppc_arch_setup): New function.
11878 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11879 of collect_register.
889bf7c5 11880 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11881
5b0a002e
UW
118822008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11883
11884 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11885 instead of linux-ppc64-low.o.
11886 * linux-ppc64-low.c: Remove file.
11887 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11888 (linux-ppc64-low.o): Remove rule.
11889
11890 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11891 (init_registers_powerpc_64): Likewise.
11892 (ppc_regmap): Conditionally define depending on __powerpc64__.
11893 (ppc_cannot_store_register): Do not special-case "fpscr" when
11894 compiled on __powerpc64__.
11895 (ppc_collect_ptrace_register): New function.
11896 (ppc_supply_ptrace_register): New function.
11897 (ppc_breakpoint): Change type to "unsigned int".
11898 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11899 (the_low_target): Conditionally provide initializers for the
889bf7c5 11900 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11901 collect_ptrace_register and supply_ptrace_register members.
11902
9b4b61c8
UW
119032008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11904
11905 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11906 * server.c (gdbserver_xmltarget): Define.
11907 (get_features_xml): Use it to replace "target.xml" and arch_string.
11908
11909 * configure.srv: Remove srv_xmltarget. Add XML files that were
11910 mentioned there to srv_xmlfiles instead. Remove conditional tests
11911 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11912 srv_xmlfiles and srv_regobj to include all possible choices.
11913 * configure.ac (srv_xmltarget): Remove.
11914 (srv_xmlfiles): Do not add "target.xml".
11915 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11916 checks for supplementary target information.
11917 * configure: Regenerate.
11918 * Makefile.in (XML_TARGET): Remove.
11919 (target.xml): Remove rule.
11920 (clean): Do not clean up target.xml.
11921 (.PRECIOUS): Do not mention target.xml.
11922
11923 * target.h (struct target_ops): Remove arch_string member.
11924 * linux-low.c (linux_arch_string): Remove.
11925 (linux_target_ops): Remove arch_string initializer.
11926 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11927 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11928 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11929 * spu-low.c (spu_arch_string): Remove.
11930 (spu_target_ops): Remove arch_string initializer.
11931 * win32-low.c (win32_arch_string): Remove.
11932 (win32_target_ops): Remove arch_string initializer.
11933 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11934 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11935 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11936
ee1a7ae4
UW
119372008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11938
11939 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11940 by collect_ptrace_register and supply_ptrace_register hooks.
11941 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11942 instead of checking for the_low_target.left_pad_xfer.
11943 (usr_store_inferior_registers): Use collect_ptrace_register callback
11944 instead of checking for the_low_target.left_pad_xfer.
11945
11946 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11947 (s390_supply_ptrace_register): Likewise.
11948 (s390_fill_gregset): Call s390_collect_ptrace_register.
11949 (the_low_target): Update.
11950
11951 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11952 (ppc_supply_ptrace_register): Likewise.
11953 (the_low_target): Update.
11954
11955 * linux-i386-low.c (the_low_target): Update.
11956 * linux-x86-64-low.c (the_low_target): Update.
11957
d61ddec4
UW
119582008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11959
11960 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11961 reg-s390.o and reg-s390x.o.
11962
11963 * linux-low.c (new_inferior): New global variable.
11964 (linux_create_inferior, linux_attach): Set it.
11965 (linux_wait_for_process): Call the_low_target.arch_setup after the
11966 target has stopped for the first time.
11967 (initialize_low): Do not call the_low_target.arch_setup.
11968
11969 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11970 (s390_set_pc): Likewise.
11971 (s390_arch_setup): New function.
11972 (the_low_target): Use s390_arch_setup as arch_setup routine.
11973
11974 * regcache.c (realloc_register_cache): New function.
11975 (set_register_cache): Call it for each existing regcache.
11976
d05b4ac3
UW
119772008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11978
11979 * server.h (init_registers): Remove prototype.
11980
11981 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11982 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11983 instead of init_registers ().
11984 * linux-arm-low.c (init_registers_arm): Add prototype.
11985 (init_registers_arm_with_iwmmxt): Likewise.
11986 (the_low_target): Add initializer for arch_setup field.
11987 * linux-cris-low.c (init_registers_cris): Add prototype.
11988 (the_low_target): Add initializer for arch_setup field.
11989 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11990 (the_low_target): Add initializer for arch_setup field.
11991 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11992 (the_low_target): Add initializer for arch_setup field.
11993 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11994 (the_low_target): Add initializer for arch_setup field.
11995 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11996 (the_low_target): Add initializer for arch_setup field.
11997 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11998 (the_low_target): Add initializer for arch_setup field.
11999 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12000 (init_registers_mips64_linux): Likewise.
12001 (the_low_target): Add initializer for arch_setup field.
12002 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12003 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12004 (the_low_target): Add initializer for arch_setup field.
12005 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12006 (init_registers_powerpc_64): Likewise.
12007 (the_low_target): Add initializer for arch_setup field.
12008 * linux-s390-low.c (init_registers_s390): Add prototype.
12009 (init_registers_s390x): Likewise.
12010 (the_low_target): Add initializer for arch_setup field.
12011 * linux-sh-low.c (init_registers_sh): Add prototype.
12012 (the_low_target): Add initializer for arch_setup field.
12013 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12014 (the_low_target): Add initializer for arch_setup field.
12015 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12016 (the_low_target): Add initializer for arch_setup field.
12017
12018 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12019 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12020 instead of init_registers ().
12021 * win32-arm-low.c (init_registers_arm): Add prototype.
12022 (the_low_target): Add initializer for arch_setup field.
12023 * win32-i386-low.c (init_registers_i386): Add prototype.
12024 (the_low_target): Add initializer for arch_setup field.
12025
12026 * spu-low.c (init_registers_spu): Add prototype.
12027 (initialize_low): Call initialie_registers_spu () instead of
12028 initialize_registers ().
12029
fd96d250
PA
120302008-02-19 Pedro Alves <pedro@codesourcery.com>
12031
12032 * server.c (handle_v_requests): When handling the vRun and vAttach
12033 packets, if already debugging a process, don't kill it. Return an
12034 error instead.
12035
d41b6bb4
DJ
120362008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12037
12038 * server.c (handle_query): Correct length check.
12039
5ac588cf
PA
120402008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12041
12042 * win32-low.c (do_initial_child_stuff): Add process handle
12043 parameter. Set current_process_handle and current_process_id from the
12044 parameters. Clear globals.
12045 (win32_create_inferior): Don't set current_process_handle and
12046 current_process_id here. Instead pass them on the call to
12047 do_initial_child_stuff.
12048 (win32_attach): Likewise.
12049 (win32_clear_inferiors): New.
12050 (win32_kill): Don't close the current process handle or the
12051 current thread handle here. Instead call win32_clear_inferiors.
12052 (win32_detach): Don't open a new handle to the process. Call
12053 win32_clear_inferiors.
12054 (win32_join): Don't rely on current_process_handle; open a new
12055 handle using the process id.
12056 (win32_wait): Call win32_clear_inferiors when the inferior process
12057 has exited.
12058
ecd7ecbc
DJ
120592008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12060
12061 * server.c (monitor_show_help): Add "exit".
12062
1525d545
MG
120632008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12064
ecd7ecbc 12065 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12066 (clean): Add reg-xtensa.c.
12067 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12068 * configure.srv (xtensa*-*-linux*) New target.
12069 * linux-xtensa-low.c: New.
12070 * xtensa-xtregs.c: New.
1525d545 12071
59a016f0
PA
120722008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12073
12074 * hostio.c: Don't include errno.h.
12075 (errno_to_fileio_errno): Move to hostio-errno.
12076 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12077 error number outputting to the target->hostio_last_error callback.
12078 (hostio_packet_error): Use FILEIO_EINVAL directly.
12079 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12080 calls to hostio_error.
12081 * hostio-errno.c: New.
12082 * server.h (hostio_last_error_from_errno): Declare.
12083 * target.h (target_ops): Add hostio_last_error member.
12084 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12085 as hostio_last_error handler.
889bf7c5 12086 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12087 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12088 (wince_hostio_last_error): New functions.
12089 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12090 as hostio_last_error handler.
12091 (win32_target_ops) [!_WIN32_WCE]: Register
12092 hostio_last_error_from_errno as hostio_last_error handler.
12093 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12094 (hostio-errno.o): New rule.
12095 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12096 * configure.srv (srv_hostio_err_objs): New variable. Default to
12097 hostio-errno.o.
12098 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12099 * configure: Regenerate.
12100
2d717e4f
DJ
121012008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12102
12103 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12104 (linux_kill, linux_detach): Clean up the process list.
12105 * remote-utils.c (remote_open): Improve port number parsing.
12106 (putpkt_binary, input_interrupt): Only send interrupts if the target
12107 is running.
12108 * server.c (extended_protocol): Make static.
12109 (attached): Define earlier.
12110 (exit_requested, response_needed, program_argv): New variables.
12111 (target_running): New.
12112 (start_inferior): Clear attached here.
12113 (attach_inferior): Set attached here.
12114 (require_running): Define.
12115 (handle_query): Use require_running and target_running. Implement
12116 "monitor exit".
12117 (handle_v_attach, handle_v_run): New.
12118 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12119 (gdbserver_usage): Update.
12120 (main): Redo argument parsing. Handle --debug and --multi. Handle
12121 --attach along with other options or after the port. Save
12122 program_argv. Support no initial program. Resynchronize
12123 communication with GDB after an error. Handle "monitor exit".
12124 Use require_running and target_running. Always allow the extended
12125 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12126 restart in extended mode.
12127 * README: Refer to the GDB manual. Update --attach usage.
12128
7407e2de
AS
121292007-12-20 Andreas Schwab <schwab@suse.de>
12130
12131 * linux-low.c (STACK_SIZE): Define.
12132 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12133 (linux_test_for_tracefork): Likewise.
12134
b65d95c5
DJ
121352007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12136
12137 * linux-low.c (linux_wait_for_event): Update messages. Do not
12138 reinsert auto-delete breakpoints.
12139 * mem-break.c (struct breakpoint): Change return type of handler to
12140 int.
12141 (set_breakpoint_at): Update handler type.
12142 (reinsert_breakpoint_handler): Return 1 instead of calling
12143 delete_breakpoint.
12144 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12145 setting a new one.
12146 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12147 * mem-break.h (set_breakpoint_at): Update handler type.
12148 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12149 * win32-low.c (auto_delete_breakpoint): New.
12150 (get_child_debug_event): Use it.
12151
4e799345
DJ
121522007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12153
12154 * configure.ac: Check for pread and pwrite.
12155 * hostio.c (handle_pread): Fall back to lseek and read.
12156 (handle_pwrite): Fall back to lseek and write.
12157 * config.in, configure: Regenerated.
12158
27524b67
DJ
121592007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12160
12161 * server.c (myresume): Add own_buf argument.
12162 (main): Update calls.
12163
a20d5e98
DJ
121642007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12165
12166 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12167 * remote-utils.c (remote_open): Do not call disable_async_io.
12168 (block_async_io): Delete.
12169 (unblock_async_io): Make static.
12170 (initialize_async_io): New.
12171 * server.c (handle_v_cont): Handle async I/O here.
12172 (myresume): Likewise. Move other common resume tasks here...
12173 (main): ... from here. Call initialize_async_io. Disable async
12174 I/O before the main loop.
12175 * server.h (initialize_async_io): Declare.
12176 (block_async_io, unblock_async_io): Delete prototypes.
12177 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12178
b79d787e
DJ
121792007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12180
12181 * remote-utils.c (readchar): Allow binary data in received messages.
12182
d97903b2
PA
121832007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12184
12185 * win32-low.c (attaching): New global.
12186 (win32_create_inferior): Clear the `attaching' global.
12187 (win32_attach): Set the `attaching' global.
12188 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12189 attaching. Only set a breakpoint at the entry point if not
12190 attaching.
12191
311de423
PA
121922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12193
12194 * server.c (main): Don't report dll events on the initial
12195 connection on attaches.
12196
6c2d16d2
PA
121972007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12198
12199 * server.c (main): Relax numerical bases supported for the pid of
12200 the --attach command line argument.
12201
5ca906e6
PA
122022007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12203
12204 * win32-low.c (win32_attach): Call OpenProcess before
12205 DebugActiveProcess, not after. Add last error output to error
12206 call.
12207
9c6c8194
PA
122082007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12209
12210 * win32-low.c (win32_get_thread_context)
12211 (win32_set_thread_context): New functions.
12212 (thread_rec): Use win32_get_thread_context.
12213 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12214 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12215 field.
12216
4d5d1aaa
PA
122172007-12-03 Leo Zayas
12218 Pedro Alves <pedro_alves@portugalmail.pt>
12219
12220 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12221 global variables.
12222 (child_add_thread): Minor cleanup.
12223 (child_continue): Resume artificially suspended threads before
12224 calling ContinueDebugEvent.
12225 (suspend_one_thread): New.
12226 (fake_breakpoint_event): New.
12227 (get_child_debug_event): Change return type to int. Check here if
12228 gdb sent an interrupt request. If a soft interrupt was requested,
12229 fake a breakpoint event. Return 0 if there is no event to handle,
12230 and 1 otherwise.
12231 (win32_wait): Don't check here if gdb sent an interrupt request.
12232 Ensure there is a valid event to handle.
12233 (win32_request_interrupt): Add soft interruption method as last
12234 resort.
12235
c436e841
PA
122362007-12-03 Leo Zayas
12237 Pedro Alves <pedro_alves@portugalmail.pt>
12238
12239 * win32-low.h (win32_thread_info): Add descriptions to the
12240 structure members. Replace `suspend_count' counter by a
12241 `suspended' flag.
12242 * win32-low.c (thread_rec): Update condition of when to get the
12243 context from the inferior. Rely on ContextFlags being set if it
12244 has already been retrieved. Only suspend the inferior thread if
12245 we haven't already. Warn if that fails.
12246 (continue_one_thread): s/suspend_count/suspended/. Only call
12247 ResumeThread once. Warn if that fails.
12248
e7b5fa67
PA
122492007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12250
12251 * win32-low.c (win32_wait): Don't read from the inferior when it
12252 has already exited.
12253
a385171d
PA
122542007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12255
12256 * Makefile.in (win32_low_h): New variable.
12257 (win32-low.o): Add dependency on $(win32_low_h).
12258 (win32-arm-low.o, win32-i386-low.o): New rules.
12259
f80c84b3
DJ
122602007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12261
12262 * hostio.c: Correct copyright year.
12263
a6b151f1
DJ
122642007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12265
12266 * Makefile.in (OBS): Add hostio.o.
12267 (hostio.o): New rule.
12268 * server.h (handle_vFile): Declare.
12269 * hostio.c: New file.
12270 * server.c (handle_v_requests): Take packet_len and new_packet_len
12271 for binary packets. Call handle_vFile.
12272 (main): Update call to handle_v_requests.
12273
f9387fc3
DJ
122742007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12275
12276 * linux-low.c: Include <sched.h>.
12277
51c2684e
DJ
122782007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12279
12280 * linux-low.c (linux_tracefork_grandchild): New.
12281 (linux_tracefork_child): Use clone.
12282 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12283
75f83163
JB
122842007-10-31 Joel Brobecker <brobecker@adacore.com>
12285
12286 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12287
da5898ce
DJ
122882007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12289
12290 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12291
24a09b5f
DJ
122922007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12293
12294 * inferiors.c (change_inferior_id): Delete.
12295 (add_pid_to_list, pull_pid_from_list): New.
12296 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12297 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12298 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12299 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12300 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12301 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12302 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12303 (using_threads): Always set to 1.
12304 (handle_extended_wait): New.
12305 (add_process): Do not set TID.
12306 (linux_create_inferior): Set must_set_ptrace_flags.
12307 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12308 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12309 (linux_thread_alive): Rename TID argument to LWPID.
12310 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12311 (linux_wait_for_event): Do not use TID or check using_threads. Update
12312 call to dead_thread_notify. Call handle_extended_wait.
12313 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12314 (send_sigstop): Delete sigstop_sent.
12315 (wait_for_sigstop): Avoid TID.
12316 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12317 (linux_test_for_tracefork): New.
12318 (linux_lookup_signals): Use thread_db_active and
12319 linux_supports_tracefork_flag.
12320 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12321 * linux-low.h (get_process_thread): Avoid TID.
12322 (struct process_ifo): Move thread_known and tid to the end. Remove
12323 sigstop_sent.
12324 (linux_attach_lwp, thread_db_init): Update prototypes.
12325 * server.h (change_inferior_id): Delete prototype.
12326 (add_pid_to_list, pull_pid_from_list): New prototypes.
12327 * thread-db.c (thread_db_use_events): New.
12328 (find_first_thread): Rename to...
12329 (find_one_thread): ...this. Update callers and messages. Do not
12330 call fatal. Check thread_db_use_events. Do not call
12331 change_inferior_id or new_thread_notify.
12332 (maybe_attach_thread): Update. Do not call new_thread_notify.
12333 (thread_db_init): Set thread_db_use_events. Check use_events.
12334 * utils.c (fatal, warning): Correct message prefix.
12335
30ed0a8f
DJ
123362007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12337
12338 * Makefile.in (clean): Remove new files.
12339 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12340 (powerpc-64.o, powerpc-64.c): New rules.
12341 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12342 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12343 with SPE.
12344 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12345 SPE targets.
12346 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12347 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12348 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12349 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12350 (target_regsets): Add AltiVec and SPE register sets.
12351 * configure.ac: Check for AltiVec and SPE.
12352 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12353 (ppc_fill_vrregset, ppc_store_vrregset): New.
12354 (target_regsets): Add AltiVec register set.
12355 * configure: Regenerated.
12356
fd462a61
DJ
123572007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12358
12359 * linux-low.c (O_LARGEFILE): Define.
12360 (linux_read_memory): Use /proc/PID/mem.
12361 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12362 * configure, config.in: Regenerated.
12363
69f223ed
DJ
123642007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12365
12366 * linux-low.c (linux_wait_for_event): Do not pass signals while
12367 single-stepping.
12368
aec18585
PA
123692007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12370
12371 * win32-low.c (create_process): New.
12372 (win32_create_inferior): Use create_process instead of
12373 CreateProcess. If create_process failed retry appending an ".exe"
12374 suffix. Store the GetLastError result immediatelly after
12375 create_process calls and use it on the call to error.
12376
34d86ddd
PA
123772007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12378
12379 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12380
5a0e3bd0
JB
123812007-08-23 Joel Brobecker <brobecker@adacore.com>
12382
12383 * configure.ac: Switch license to GPLv3.
12384
f88c79e6
MS
123852007-08-01 Michael Snyder <msnyder@access-company.com>
12386
12387 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12388
6b3d9b83
PA
123892007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12390
12391 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12392 typedef.
12393 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12394 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12395 CloseToolhelp32Snapshot.
12396 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12397 CloseToolhelp32Snapshot.
12398
c588c53c
MS
123992007-07-27 Michael Snyder <michael.snyder@access-company.com>
12400
12401 * server.c (main): Check for inferior exit before main loop.
12402
aa0403d9
PA
124032007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12404
12405 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12406 instead of on tmp_desc.
12407
255e7678
DJ
124082007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12409 Daniel Jacobowitz <dan@codesourcery.com>
12410
12411 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12412 (add_thread): Minor cleanups.
12413 (clear_inferiors): Move lower in the file. Clear the DLL
12414 list.
12415 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12416 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12417 (xml_escape_text): New.
12418 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12419 for qSupported.
12420 (handle_v_cont): Report errors.
12421 (gdbserver_version): Update.
12422 (main): Correct size of own_buf. Do not report initial DLL events.
12423 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12424 (unloaded_dll, xml_escape_text): New.
12425 * win32-low.c (enum target_waitkind): Update comments.
12426 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12427 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12428 (win32_EnumProcessModules, win32_GetModuleInformation)
12429 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12430 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12431 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12432 (win32_Module32First, win32_Module32Next, load_toolhelp)
12433 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12434 (get_child_debug_event): Handle DLL events.
12435 (win32_wait): Likewise.
12436
0d37add9
DJ
124372007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12438
12439 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12440 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12441
45e2715e
PA
124422007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12443
12444 * win32-low.c (handle_output_debug_string): Ignore event if not
12445 waiting.
12446
c5674cf1
PA
124472007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12448
12449 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12450
2bbe3cc1
DJ
124512007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12452
12453 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12454
ae13219e
DJ
124552007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12456
12457 * inferiors.c (change_inferior_id): Add comment.
12458 * linux-low.c (check_removed_breakpoint): Add an early
12459 prototype. Improve debug output.
12460 (linux_attach): Doc update.
12461 (linux_detach_one_process, linux_detach): Clean up before releasing
12462 each process.
12463 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12464 * linux-low.h (struct process_info): Doc improvement.
12465 * mem-break.c (delete_all_breakpoints): New.
12466 * mem-break.h (delete_all_breakpoints): New prototype.
12467 * thread-db.c (find_first_thread): New.
12468 (thread_db_create_event): Call it instead of
12469 thread_db_find_new_threads. Clean up unused variables.
12470 (maybe_attach_thread): Remove first thread handling.
12471 (thread_db_find_new_threads): Use find_first_thread.
12472 (thread_db_get_tls_address): Likewise.
12473
4105de34
DJ
124742007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12475
12476 * thread-db.c (thread_db_find_new_threads): Add prototype.
12477 (thread_db_create_event): Check for the main thread before adding
12478 a new thread.
12479 (maybe_attach_thread): Only enable event reporting if TID == 0.
12480 (thread_db_get_tls_address): Check for new threads.
12481
2b876972
DJ
124822007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12483
12484 * linux-low.c (linux_create_inferior): Try execv before execvp.
12485 * spu-low.c (spu_create_inferior): Likewise.
12486
7a245884
DJ
124872007-06-13 Mike Frysinger <vapier@gentoo.org>
12488
12489 * linux-low.c (linux_create_inferior): Change execv to execvp.
12490 * spu-low.c (spu_create_inferior): Likewies.
12491
117ce543
DJ
124922007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12493
12494 * Makefile.in (clean): Clean new files instead of deleted ones.
12495 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12496 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12497 rules.
12498 * configure.srv: Specify XML files and new regformats for MIPS and
12499 MIPS64 GNU/Linux.
12500 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12501 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12502 an entry for the restart register.
12503 (mips_cannot_fetch_register, mips_cannot_store_register)
12504 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12505 register names to match the XML descriptions.
12506 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12507 restart register instead of $0.
12508
0e7f50da
UW
125092007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12510 Markus Deuling <deuling@de.ibm.com>
12511
12512 * remote-utils.c (decode_xfer_write): New function.
12513 * server.h (decode_xfer_write): Add prototype.
12514 * server.c (handle_query): Add PACKET_LEN argument. Support
12515 qXfer:spu:read and qXfer:spu:write packets.
12516 (main): Pass packet_len to handle_query.
12517 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12518 * target.h (target_ops): Add qxfer_spu.
12519
374c1d38
UW
125202007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12521
12522 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12523 accessing non-seekable spufs files.
12524
bb63802a
UW
125252007-05-16 Markus Deuling <deuling@de.ibm.com>
12526
889bf7c5 12527 * server.c (handle_query): Add reply for qC packet.
bb63802a 12528
7390519e
PA
125292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12530 Leo Zayas <lerele@champenstudios@com>
12531
12532 * server.h (check_remote_input_interrupt_request): New function.
12533 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12534 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12535 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12536 (check_remote_input_interrupt_request): New function.
12537 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 12538 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
12539 winapi_GenerateConsoleCtrlEvent): New typedefs.
12540 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12541 to 250 ms.
12542 (win32_wait): Check for remote interrupt request
12543 with check_remote_input_interrupt_request.
12544 (win32_request_interrupt): New function.
12545 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12546
34b34921
PA
125472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12548
12549 * win32-low.c (debug_registers_changed,
12550 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12551 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12552 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12553 (thread_rec): Get context using the low target.
12554 (child_add_thread): Call thread_added on the low target,
12555 which does the same thing.
12556 (regptr): Delete.
12557 (do_initial_child_stuff): Remove debug registers references.
12558 Set context using the low target. Resume threads after
12559 setting the contexts.
12560 (child_continue): Remove dead variable. Remove debug
12561 registers references.
12562 (child_fetch_inferior_registers): Go through the low target.
12563 (do_child_store_inferior_registers): Remove.
12564 (child_store_inferior_registers): Go through the low target.
12565 (win32_resume): Remove debug registers references.
12566 Set context using the low target.
12567 (handle_exception): Change return type to void. Don't record
12568 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12569 first chance exception.
889bf7c5 12570 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
12571 goto loop. Always return after waiting for debug event.
12572 (win32_wait): Convert to switch statement. Handle spurious
12573 events.
12574
12575 * win32-i386-low.c (debug_registers_changed,
12576 debug_registers_used): New.
12577 (initial_stuff): Rename to ...
12578 (i386_initial_stuff): ... this. Clear debug registers
12579 state variables.
12580 (store_debug_registers): Delete.
12581 (i386_get_thread_context): New.
12582 (load_debug_registers): Delete.
12583 (i386_set_thread_context): New.
12584 (i386_thread_added): New.
12585 (single_step): Rename to ...
12586 (i386_single_step): ... this.
12587 (do_fetch_inferior_registers): Rename to ...
12588 (i386_fetch_inferior_register): ... this.
12589 (i386_store_inferior_register): New.
12590 (the_low_target): Adapt to new interface.
12591
12592 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12593 (arm_get_thread_context): New.
12594 (arm_set_thread_context): New.
12595 (regptr): New.
12596 (do_fetch_inferior_registers): Rename to ...
12597 (arm_fetch_inferior_register): ... this.
12598 (arm_store_inferior_register): New.
12599 (arm_wince_breakpoint): Reimplement as unsigned long.
12600 (arm_wince_breakpoint_len): Define.
12601 (the_low_target): Adapt to new interface.
12602
12603 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12604 load_debug_registers. Add get_thread_context, set_thread_context,
12605 thread_added and store_inferior_register. Rename
12606 fetch_inferior_registers to fetch_inferior_register.
12607 (regptr): Remove declaration.
12608
dd6953e1
PA
126092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12610
12611 * linux-low.c (linux_detach): Change return type to int. Return 0.
12612 * spu-low.c (spu_detach): Likewise.
12613
444d6139
PA
126142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12615
12616 * target.h (target_ops): Change return type of detach to int.
12617 Add join.
12618 (join_inferior): New.
12619 * server.c (main): Don't skip detach support on mingw32.
12620 If the inferior doesn't support detaching return error.
12621 Call join_inferior instead of using waitpid.
12622 * linux-low.c (linux_join): New.
12623 (linux_target_op): Add linux_join.
12624 * spu-low.c (spu_join): New.
12625 (spu_target_ops): Add spu_join.
12626 * win32-low.c (win32_detach): Adapt to new interface.
12627 Reopen current_process_handle before detaching. Issue a child
12628 resume before detaching.
12629 (win32_join): New.
12630 (win32_target_op): Add win32_join.
12631
1d5315fe
PA
126322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12633
12634 * win32-low.c (win32-attach): Fix return value.
12635 * target.h (target_ops): Describe ATTACH return values.
12636
bf914831
PA
126372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12638
12639 * win32-low.c (GETPROCADDRESS): Define.
12640 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12641 (winapi_DebugSetProcessKillOnExit): Likewise.
12642 (win32_create_inferior): Force usage of ansi CreateProcessA.
12643 (win32_attach): Use GETPROCADDRESS.
12644 (win32_detach): Likewise.
12645
f72f3e60
PA
126462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12647
12648 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12649
ed50f18f
PA
126502007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12651
12652 * win32-low.c: Commit leftover changes from 2007-03-29.
12653
0c2ead7e
DJ
126542007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12655
12656 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12657 fields short instead of int. Add explicit padding.
12658 (i387_cache_to_fsave): Remove unnecessary casts.
12659 (i387_fsave_to_cache): Doc fix.
12660 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12661
73725ff3
DJ
126622007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12663
12664 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12665 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12666
d99f33d8
PA
126672007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12668
12669 * configure.srv (arm*-*-mingw32ce*): Move near the other
12670 arm targets.
12671
68070c10
PA
126722007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12673
2482afc6 12674 * configure.ac: Add errno checking.
68070c10
PA
12675 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12676 sys/file.h and malloc.h.
12677 (AC_CHECK_DECLS): Add perror.
12678 (srv_mingwce): Handle.
2482afc6 12679 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
12680 win32-i386-low.o to srv_tgtobj.
12681 (i[34567]86-*-mingw*): Likewise.
12682 (arm*-*-mingw32ce*): Add case.
12683 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12684 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12685 [__MINGW32CE__] (strerror): New function.
12686 [__MINGW32CE__] (errno): Define to GetLastError.
12687 [__MINGW32CE__] (COUNTOF): New macro.
12688 (remote_open): Remove extra close call.
12689 * mem-break.c (delete_breakpoint_at): New function.
12690 * mem-break.h (delete_breakpoint_at): Declare.
12691 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12692 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12693 [USE_WIN32API] (read, write): Add char* casts.
12694 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12695 * server.h: Include wincecompat.h on Windows CE.
12696 [HAVE_ERRNO_H]: Check.
12697 (perror): Declare if not declared.
12698 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12699 (perror_with_name): Remove errno declaration.
12700 * wincecompat.h: New.
12701 * wincecompat.c: New.
12702 * win32-low.h: New.
12703 * win32-arm-low.c: New.
12704 * win32-i386-low.c: New.
12705 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12706 (OUTMSG2): Make it safe.
12707 (_T): New macro.
12708 (COUNTOF): New macro.
12709 (NUM_REGS): Get it from the low target.
12710 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12711 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12712 (thread_rec): Let low target handle debug registers.
12713 (child_add_thread): Likewise.
12714 (child_init_thread_list): Likewise.
12715 (continue_one_thread): Likewise.
12716 (regptr): New.
12717 (do_child_fetch_inferior_registers): Move to ...
12718 * win32-i386-low.c: ... here, and rename to ...
12719 (do_fetch_inferior_registers): ... this.
889bf7c5 12720 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12721 Go through the low target.
12722 (do_child_store_inferior_registers): Use regptr.
12723 (strwinerror): New function.
12724 (win32_create_inferior): Handle Windows CE.
12725 Use strwinerror instead of strerror on Windows error
12726 codes. Add program to the error output.
12727 Don't close the main thread handle on Windows CE.
12728 (win32_attach): Use coredll.dll on Windows CE.
12729 (win32_kill): Close current process and current
12730 thread handles.
12731 (win32_detach): Use coredll.dll on Windows CE.
12732 (win32_resume): Let low target handle debug registers, and
12733 step request.
12734 (handle_exception): Add/Remove initial breakpoint. Avoid
12735 non-existant WSTOPSIG on Windows CE.
12736 (win32_read_inferior_memory): Cast to remove warning.
12737 (win32_arch_string): Go through the low target.
12738 (initialize_low): Call set_breakpoint_data with the low
12739 target's breakpoint.
12740 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12741 FOP_REGNUM, mappings): Move to ...
12742 * win32-i386-low.c: ... here.
12743 * win32-low.c (win32_thread_info): Move to ...
12744 * win32-low.h: ... here.
12745 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12746 win32-arm-low.c and wincecompat.c.
12747 (all:): Add $EXEEXT.
12748 (install-only:): Likewise.
12749 (gdbserver:): Likewise.
12750 (gdbreplay:): Likewise.
12751 * config.in: Regenerate.
12752 * configure: Regenerate.
12753
41093d81
PA
127542007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12755
12756 * win32-low.c: Rename typedef thread_info to
12757 win32_thread_info throughout.
12758
544afa54
PA
127592007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12760
12761 * win32-i386-low.c: Rename to ...
12762 * win32-low.c: ... this.
12763 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12764 * Makefile.in: Likewise.
12765
bce7165d
PA
127662007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12767
12768 * remote-utils.c (monitor_output): Constify msg parameter.
12769 * server.h (monitor_output): Likewise.
12770 * win32-i386-low.c (handle_output_debug_string): New.
12771 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12772 handle_output_debug_string.
12773 (get_child_debug_event): Likewise.
12774
506c7aa0
DJ
127752007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12776
12777 * server.c (main): Correct strtoul check.
12778
42c81e2a
DJ
127792007-03-27 Jon Ringle <jon@ringle.org>
12780
12781 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12782
9453113a
DJ
127832007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12784
12785 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12786
64a69107
DJ
127872007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12788
12789 * terminal.h: Check HAVE_SGTTY_H.
12790
127912007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12792
12793 * remote-utils.c (remote_open): Print out the assigned port number.
12794
c74d0ad8
DJ
127952007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12796
12797 * remote-utils.c (monitor_output): New function.
12798 * server.c (debug_threads): Define here.
12799 (monitor_show_help): New function.
12800 (handle_query): Handle qRcmd.
12801 (main): Do not handle 'd' packet.
12802 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12803 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12804 of debug_threads.
12805
de7c3b4a
PA
128062007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12807
12808 * Makefile.in (EXEEXT): New.
12809 (clean): Use $(EXEEXT).
12810
ef57601b
PA
128112007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12812
12813 * target.h (target_ops): Rename send_signal to request_interrupt,
12814 and remove enum target_signal parameter.
12815 * linux-low.c (linux_request_interrupt): Rename from
12816 linux_send_signal, and always send SIGINT.
12817 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12818 and always send SIGINT.
12819 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12820 of send_signal.
12821 (input_interrupt): Likewise.
12822
820f2bda
PA
128232007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12824
12825 * server.c (get_features_xml): Check if target implemented
12826 arch_string.
12827 * win32-i386-low.c (win32_arch_string): New.
12828 (win32_target_ops): Add win32_arch_string as arch_string member.
12829
ab39bf24
UW
128302007-02-22 Markus Deuling <deuling@de.ibm.com>
12831
12832 * spu-low.c (spu_arch_string): New.
12833 (spu_target_ops): Add spu_arch_string.
12834
61ff6e04
DJ
128352007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12836
12837 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12838 * configure.ac: Do not check for terminal.h.
12839 * configure, config.in: Regenerated.
12840
fb1e4ffc
DJ
128412007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12842
12843 * Makefile.in (OBS): Add $(XML_BUILTIN).
12844 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12845 (clean): Update.
12846 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12847 (arm-with-iwmmxt.c): New.
12848 * config.in, configure: Regenerate.
12849 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12850 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12851 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12852 (arm*-*-linux*): Add iWMMXt and regset support.
12853 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12854 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12855 (arm_store_wmmxregset, target_regsets): New.
12856 * server.c (get_features_xml): Take annex argument. Check builtin
12857 XML documents.
12858 (handle_query): Handle multiple annexes.
12859
0f48aa01
DJ
128602007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12861
12862 * remote-utils.c [USE_WIN32API] (read, write): Define.
12863 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12864 write.
12865
23181151
DJ
128662007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12867
12868 * linux-i386-low.c (the_low_target): Set arch_string.
12869 * linux-x86-64-low.c (the_low_target): Likewise.
12870 * linux-low.c (linux_arch_string): New.
12871 (linux_target_ops): Add it.
12872 * linux-low.h (struct linux_target_ops): Add arch_string.
12873 * server.c (write_qxfer_response): Use const void * for DATA.
12874 (get_features_xml): New.
12875 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12876 * target.h (struct target_ops): Add arch_string method.
12877
9d606399
DJ
128782007-01-03 Denis Pilat <denis.pilat@st.com>
12879 Daniel Jacobowitz <dan@codesourcery.com>
12880
12881 * linux-low.c (linux_kill): Handle being called with no threads.
12882 * win32-i386-low.c (win32_kill): Likewise.
12883 (get_child_debug_event): Clear current_process_handle.
12884
128852006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12886 Daniel Jacobowitz <dan@codesourcery.com>
12887
12888 * remote-utils.c (remote_open): Check the type of specified
12889 serial port devices before opening them.
12890 * server.c (main): Kill the inferior if an error occurs during
12891 the first remote_open.
12892
a5e13d24
DJ
128932006-12-05 Markus Deuling <deuling@de.ibm.com>
12894
12895 * README: Update supported targets.
12896
186947f7
DJ
128972006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12898
12899 * Makefile.in (clean): Remove reg-mips64.c.
12900 (reg-mips64.c, reg-mips64.o): New rules.
12901 * configure.srv: Handle mips64. Include regset support for mips.
12902 * linux-mips-low.c (union mips_register): New.
12903 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12904 (mips_breakpoint, mips_breakpoint_at): Use int.
12905 (mips_collect_register, mips_supply_register)
12906 (mips_collect_register_32bit, mips_supply_register_32bit)
12907 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12908 (mips_store_fpregset, target_regsets): New.
12909 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12910
a13e2c95
UW
129112006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12912
12913 * configure.srv: Add target "spu*-*-*".
12914 * Makefile.in (clean): Remove reg-spu.c.
12915 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12916 * spu-low.c: New file.
12917
cb7283db
DJ
129182006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12919
12920 * configure.ac: Correct td_thr_tls_get_addr test.
12921 * configure: Regenerated.
12922
89be2091
DJ
129232006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12924
12925 * linux-low.c (linux_wait_for_event): Reformat. Use the
12926 pass_signals array.
12927 * remote-utils.c (decode_address_to_semicolon): New.
12928 * server.c (pass_signals, handle_general_set): New.
12929 (handle_query): Mention QPassSignals for qSupported.
12930 (main): Call handle_general_set.
12931 * server.h (pass_signals, decode_address_to_semicolon): New.
12932
000ef4f0
DJ
129332006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12934
12935 * server.c (handle_query): Correct error handling for read_auxv.
12936
b7149293
UW
129372005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12938
12939 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12940 and srv_linux_thread_db to yes.
12941 * linux-s390-low.c (s390_fill_gregset): New function.
12942 (target_regsets): Define data structure.
12943
dae5f5cf
DJ
129442006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12945
12946 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12947 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12948 * config.in, configure: Regenerated.
12949 * inferiors.c (gdb_id_to_thread): New function.
12950 (gdb_id_to_thread_id): Use it.
12951 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12952 * linux-low.h (struct process_info): Add th member.
12953 (thread_db_get_tls_address): New prototype.
12954 * remote-utils.c (decode_address): Make non-static.
12955 * server.c (handle_query): Handle qGetTLSAddr.
12956 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12957 * target.h (struct target_ops): Add get_tls_address.
12958 * thread-db.c (maybe_attach_thread): Save the thread handle.
12959 (thread_db_get_tls_address): New.
12960
32ca6d61
DJ
129612006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12962
12963 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12964 (linux_resume_one_process): Take a siginfo_t *. Update all
12965 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12966 (struct pending_signals): Add a siginfo_t.
12967 (linux_wait_for_process): Always set last_status.
12968 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12969 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12970 * linux-low.h (struct process_info): Add last_status.
12971
5ffff7c1
DJ
129722006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12973
12974 * remote-utils.c (try_rle): New function.
12975 (putpkt_binary): Use it.
12976
8695c747
DJ
129772006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12978
12979 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12980 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12981 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12982 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12983 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12984 point registers.
12985
290fadea
RS
129862006-08-08 Richard Sandiford <richard@codesourcery.com>
12987
12988 * server.c (terminal_fd): New variable.
12989 (old_foreground_pgrp): Likewise.
12990 (restore_old_foreground_pgrp): New function.
12991 (start_inferior): Record the terminal file descriptor in terminal_fd
12992 and its original foreground group in old_foreground_pgrp. Register
12993 restore_old_foreground_pgrp with atexit().
12994
9f2e1e63
DJ
129952006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12996
12997 * server.c (handle_query): Correct qPart to qXfer.
12998
b80864fb
DJ
129992006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13000
13001 * configure.ac: Check for more headers which are missing on
13002 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13003 * configure.srv: Add Cygwin and mingw32.
13004 * remote-utils.c: Don't include headers unconditionally which
13005 are missing on mingw32. Include <winsock.h> for mingw32.
13006 (remote_open): Adjust for mingw32 support. Flush
13007 standard error after writing to it.
13008 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13009 (unblock_async_io, enable_async_io, disable_async_io)
13010 (readchar, getpkt): Update for Winsock support.
13011 (prepare_resume_reply): Expect a protocol signal number.
13012 * server.c: Disable <sys/wait.h> on mingw32.
13013 (start_inferior): Adjust for mingw32 support. Flush
13014 standard error after writing to it.
13015 (attach_inferior): Likewise. Use protocol signal
13016 numbers.
13017 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13018 and names.
13019 * win32-i386-low.c: New file.
13020 * Makefile.in (XM_CLIBS): Set.
13021 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13022 (win32-i386-low.o): New dependency rule.
13023 * linux-low.c (linux_wait): Use target signal numbers.
13024 * target.h (struct target_ops): Doc fix.
13025 * server.h (target_signal_to_name): New prototype.
13026 * gdbreplay.c: Don't include headers unconditionally which
13027 are missing on mingw32. Include <winsock.h> for mingw32.
13028 (remote_close, remote_open): Adjust for Winsock support.
13029 * configure, config.in: Regenerated.
13030
0876f84a
DJ
130312006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13032
13033 * server.c (decode_xfer_read, write_qxfer_response): New.
13034 (handle_query): Take a packet length argument. Handle
13035 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13036 the qSupported response.
13037 (main): Update call to handle_query.
13038
01f9e8fa
DJ
130392006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13040
13041 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13042 (putpkt_binary): Renamed from putpkt and adjusted for binary
13043 data.
13044 (putpkt): New wrapper for putpkt_binary.
13045 (readchar): Don't mask off the high bit.
13046 (decode_X_packet): New function.
13047 * server.c (main): Call putpkt_binary if a handler sets the packet
13048 length. Save the length of the incoming packet. Handle 'X'.
13049 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13050
be2a5f71
DJ
130512006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13052
13053 * server.c (handle_query): Handle qSupported.
13054
ea025f5f
DJ
130552006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13056
13057 * remote-utils.c (all_symbols_looked_up): New variable.
13058 (look_up_one_symbol): Check it.
13059 * server.h (look_up_one_symbol): New declaration.
13060 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13061
9308fc88
DJ
130622006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13063
13064 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13065 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13066 (PTRACE_GET_THREAD_AREA): Define.
13067 (ps_get_thread_area): New function.
13068
52fb6437
NS
130692006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13070
13071 * configure.srv (m68k*-*-uclinux*): New target.
13072 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13073 (linux_resume_one_process): Remove extraneous cast.
13074 (linux_read_offsets): New.
13075 (linux_target_op): Add linux_read_offsets on mmuless systems.
13076 * server.c (handle_query): Add qOffsets logic.
13077 * target.h (struct target_ops): Add read_offsets.
13078
21b0f40c
DJ
130792006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13080
13081 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13082 (PTRACE_GET_THREAD_AREA): Define.
13083 (ps_get_thread_area): New function.
13084 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13085 (linux-x86-64-low.o): Update.
13086
0050a760
DJ
130872006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13088
13089 * configure.ac: Remove checks for prfpregset_t.
13090 * gdb_proc_service.h: New file.
13091 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13092 new "gdb_proc_service.h".
13093 * proc-service.c: Likewise.
13094 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13095 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13096 * Makefile.in (gdb_proc_service_h): Updated.
13097 * configure, config.in: Regenerated.
13098
b92a518e
DJ
130992006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13100
13101 * remote-utils.c (prepare_resume_reply): Move declaration
13102 of gdb_id_from_wait to the top of the block.
13103
545587ee
DJ
131042006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13105
13106 * linux-low.c (regsets_store_inferior_registers): Read the regset
13107 from the target before filling it.
13108
9db87ebd
DJ
131092006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13110
13111 * server.c (attach_inferior): Return SIGTRAP for a successful
13112 attach.
13113
dd24457d
DJ
131142006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13115
13116 * Makefile.in (OBS): Add version.o.
13117 (STAGESTUFF): Delete.
13118 (version.o): Add dependencies.
13119 (version.c): Replace rule.
13120 (clean): Remove version.c.
13121 * server.c (gdbserver_version): New.
13122 (gdbserver_usage): Use printf.
13123 (main): Handle --version and --help.
13124 * server.h (version, host_name): Add declarations.
13125
6f0f660e
EZ
131262005-12-23 Eli Zaretskii <eliz@gnu.org>
13127
889bf7c5
PA
13128 * linux-arm-low.c:
13129 * linux-arm-low.c:
13130 * inferiors.c:
13131 * i387-fp.h:
13132 * i387-fp.c:
13133 * gdbreplay.c:
13134 * regcache.c:
13135 * proc-service.c:
13136 * mem-break.h:
13137 * mem-break.c:
13138 * linux-x86-64-low.c:
13139 * linux-sh-low.c:
13140 * linux-s390-low.c:
13141 * linux-ppc64-low.c:
13142 * linux-ppc-low.c:
13143 * linux-mips-low.c:
13144 * linux-m68k-low.c:
13145 * linux-m32r-low.c:
13146 * linux-low.h:
13147 * linux-low.c:
13148 * linux-ia64-low.c:
13149 * linux-i386-low.c:
13150 * linux-crisv32-low.c:
13151 * thread-db.c:
13152 * terminal.h:
13153 * target.h:
13154 * target.c:
13155 * server.h:
13156 * server.c:
13157 * remote-utils.c:
13158 * regcache.h:
13159 * utils.c:
13160 * Makefile.in:
13161 * configure.ac:
6f0f660e
EZ
13162 * gdbserver.1: Add (C) after Copyright. Update the FSF
13163 address.
13164
9d1fb177
DJ
131652005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13166
13167 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13168 (arm_breakpoint_at): Recognize both breakpoints.
13169 (the_low_target): Use the correct breakpoint instruction.
13170
011a70c2
DJ
131712005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13172
13173 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13174 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13175 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13176 (the_low_target): Update.
13177
7fb85e41
AS
131782005-10-25 Andreas Schwab <schwab@suse.de>
13179
13180 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13181
13182 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13183 (ia64_num_regs): Reduce to 462.
13184
3db0444b
DJ
131852005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13186
13187 * acinclude.m4: Correct quoting.
13188 * aclocal.m4: Regenerated.
13189
13190 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13191 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13192 (thread_db_init): Call thread_db_err_str.
13193 * configure.ac: Check for TD_VERSION.
13194 * config.in, configure: Regenerated.
13195
bee0189a
DJ
131962005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13197
13198 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13199
e9d25b98
DJ
132002005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13201
13202 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13203 is not available. Define HAVE_PTRACE_GETREGS if it is.
13204 * config.in, configure: Regenerated.
13205 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13206 * linux-i386-low.c, linux-m68k-low.c: Update to use
13207 HAVE_PTRACE_GETREGS.
13208 * linux-low.c (regsets_fetch_inferior_registers)
13209 (regsets_store_inferior_registers): Only return 0 if we processed
13210 GENERAL_REGS.
13211 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13212 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13213
a06660f7
DJ
132142005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13215
13216 * inferiors.c (struct thread_info): Add gdb_id.
13217 (add_thread): Add gdb_id argument.
13218 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13219 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13220 calls to add_thread.
13221 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13222 * server.c (handle_query): Use thread_to_gdb_id.
13223 (handle_v_cont, main): Use gdb_id_to_thread_id.
13224 * server.h (add_thread): Update prototype.
13225 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13226 prototypes.
13227
5a1f5858
DJ
132282005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13229
13230 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13231 left-padded registers.
13232 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13233 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13234
e122f1f5
SE
132352005-07-01 Steve Ellcey <sje@cup.hp.com>
13236
13237 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13238 * configure: Regenerate.
13239 * config.in: Regenerate.
13240 * server.h (NEED_DECLARATION_STRERROR):
13241 Replace with !HAVE_DECL_STRERROR.
13242
d592fa2f
DJ
132432005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13244
13245 * linux-low.c (linux_wait, linux_send_signal): Don't test
13246 an unsigned long variable for > 0 if it could be MAX_ULONG.
13247 * server.c (myresume): Likewise.
13248 * target.c (set_desired_inferior): Likewise.
13249
ccbd4912
MK
132502005-06-13 Mark Kettenis <kettenis@gnu.org>
13251
13252 * configure.ac: Simplify and improve check for socklen_t.
13253 * configure, config.in: Regenerate.
13254
f450004a
DJ
132552005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13256
13257 * acconfig.h: Remove.
13258 * configure.ac: Add a test for socklen_t. Use three-argument
13259 AC_DEFINE throughout.
13260 * config.in: Regenerated using autoheader 2.59.
13261 * configure: Regenerated.
13262
13263 * gdbreplay.c (socklen_t): Provide a default.
13264 (remote_open): Use socklen_t.
13265 * remote-utils.c (socklen_t): Provide a default.
13266 (remote_open): Use socklen_t.
13267 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13268 unsigned char.
13269
13270 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13271 char for buffers.
13272 * linux-low.c (linux_read_memory, linux_write_memory)
13273 (linux_read_auxv): Likewise.
13274 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13275 (check_mem_write): Likewise.
13276 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13277 Likewise.
13278 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13279 (registers_from_string, register_data): Likewise.
13280 * server.c (handle_query, main): Likewise.
13281 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13282 (decode_M_packet): Likewise.
13283 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13284 * target.h (struct target_ops): Update read_memory, write_memory,
13285 and read_auxv.
13286 (read_inferior_memory, write_inferior_memory): Update.
13287 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13288 to unsigned char *.
13289 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13290 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13291 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13292 linux-s390-low.c, linux-sh-low.c: Update for changes in
13293 read_inferior_memory and the_low_target->breakpoint.
13294
eee84df1
DJ
132952005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13296
13297 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13298 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13299 * configure.srv: Add powerpc64-*-linux*.
13300 * linux-ppc64-low.c: New file.
13301
45b134e5
OF
133022005-05-23 Orjan Friberg <orjanf@axis.com>
13303
13304 * linux-cris-low.c: New file with support for CRIS.
13305 * linux-crisv32-low.c: Ditto for CRISv32.
13306 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13307 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13308 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13309 reg-crisv32.o, and reg-crisv32.c to make rules.
13310 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13311 recognized targets.
13312
48d93c75
UW
133132005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13314
13315 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13316 of sizeof (PTRACE_XFER_TYPE).
13317 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13318
e013ee27
OF
133192005-05-12 Orjan Friberg <orjanf@axis.com>
13320
889bf7c5 13321 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13322 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13323 pointers for hardware watchpoint support.
13324 * linux-low.h (struct linux_target_ops): Ditto.
13325 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13326 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13327 to linux_target_ops.
13328 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13329 reply packet.
13330 * server.c (main): Recognize 'Z' and 'z' packets.
13331
b0ded00b
UW
133322005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13333
13334 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13335 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13336 (the_low_target): Add new members.
13337
8643e2ad
DJ
133382005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13339
13340 * proc-service.c (ps_lgetregs): Search all_processes instead of
13341 all_threads.
13342
fc620387
DJ
133432005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13344
13345 * server.c (start_inferior): Change return type to int.
13346 (attach_inferior): Change sigptr to int *.
13347 (handle_v_cont, handle_v_requests): Change signal to int *.
13348 (main): Change signal to int.
13349
133502005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13351
13352 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13353 * configure.srv: Add m32r*-*-linux*.
13354 * linux-m32r-low.c: New file.
13355
e0e76420
DJ
133562005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13357
13358 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13359
a1928bad
DJ
133602005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13361
13362 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13363 Take unsigned long arguments for PIDs.
13364 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13365 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13366 (wait_for_sigstop, linux_resume_one_process)
13367 (regsets_fetch_inferior_registers, linux_send_signal)
13368 (linux_read_auxv): Likewise. Update the types of variables holding
13369 PIDs. Update format string specifiers.
13370 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13371 * remote-utils.c (prepare_resume_reply): Likewise.
13372 * server.c (cont_thread, general_thread, step_thread)
13373 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13374 unsigned long.
13375 (handle_query): Update format specifiers.
13376 (handle_v_cont, main): Use strtoul for thread IDs.
13377 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13378 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13379 (general_thread, step_thread, thread_from_wait)
13380 (old_thread_from_wait): Update.
13381 * target.h (struct thread_resume): Use unsigned long for THREAD.
13382 (struct target_ops): Use unsigned long for arguments to attach and
13383 thread_alive.
13384
dcdb98d2
DJ
133852005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13386
13387 * acinclude.m4: Include bfd/bfd.m4 directly.
13388 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13389 <agriffis@toolchain.org>.
13390 * aclocal.m4, configure: Regenerated.
13391
bec39cab
AC
133922005-01-07 Andrew Cagney <cagney@gnu.org>
13393
13394 * configure.ac: Rename configure.in, require autoconf 2.59.
13395 * configure: Re-generate.
13396
434c4c77
DJ
133972004-12-08 Daniel Jacobowitz <dan@debian.org>
13398
13399 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13400 LIBS when finished.
13401 * aclocal.m4: Regenerated.
13402 * configure: Regenerated.
13403
db1d3e1b
AS
134042004-11-21 Andreas Schwab <schwab@suse.de>
13405
13406 * linux-m68k-low.c (m68k_num_gregs): Define.
13407 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13408 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13409 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13410 (m68k_breakpoint_at): New. Add to the_low_target.
13411
13412 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13413 srv_linux_thread_db to yes.
13414
43360365
JB
134152004-10-20 Joel Brobecker <brobecker@gnat.com>
13416
13417 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13418 (ARCH_SET_FS): Likewise.
13419 (ARCH_GET_FS): Likewise.
13420 (ARCH_GET_GS): Likewise.
13421
fd500816
DJ
134222004-10-16 Daniel Jacobowitz <dan@debian.org>
13423
13424 * linux-i386-low.c (ps_get_thread_area): New.
13425 * linux-x86-64-low.c (ps_get_thread_area): New.
13426 * linux-low.c: Include <sys/syscall.h>.
13427 (linux_kill_one_process): Don't kill the first thread here.
13428 (linux_kill): Kill the first thread here.
13429 (kill_lwp): New function.
13430 (send_sigstop, linux_send_signal): Use it.
13431 * proc-service.c: Clean up #ifdefs.
13432 (fpregset_info): Delete.
13433 (ps_lgetregs): Update and enable implementation.
13434 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13435 implementations.
13436 * remote-utils.c (struct sym_cache, symbol_cache): New.
13437 (input_interrupt): Print a clearer message.
13438 (async_io_enabled): New variable.
13439 (enable_async_io, disable_async_io): Use it. Update comments.
13440 (look_up_one_symbol): Use the symbol cache.
13441 * thread-db.c (thread_db_look_up_symbols): New function.
13442 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13443
f6de3c42
DJ
134442004-10-16 Daniel Jacobowitz <dan@debian.org>
13445
13446 * configure.in: Test for -rdynamic.
13447 * configure: Regenerated.
13448 * Makefile (INTERNAL_LDFLAGS): New.
13449 (gdbserver, gdbreplay): Use it.
13450
2c0fc042
AC
134512004-09-02 Andrew Cagney <cagney@gnu.org>
13452
13453 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13454
075b3282
DJ
134552004-03-23 Daniel Jacobowitz <drow@mvista.com>
13456
13457 * linux-low.c (linux_wait): Clear all_processes list also.
13458
fa6a77dc
DJ
134592004-03-12 Daniel Jacobowitz <drow@mvista.com>
13460
13461 * linux-low.c: Include <errno.h>. Remove extern declaration of
13462 errno.
13463
6d782a97
DJ
134642004-03-12 Daniel Jacobowitz <drow@mvista.com>
13465
13466 * gdbreplay.c, server.h, utils.c: Update copyright years.
13467
3a7fb99b
DJ
134682004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13469
13470 * server.c (main): Print child status or termination signal from
13471 variable 'signal', not 'sig'.
13472
c3e735a6
DJ
134732004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13474
13475 * linux-low.c (linux_read_memory): Change return type to
13476 int. Check for and return error from ptrace().
13477 * target.c (read_inferior_memory): Change return type to int. Pass
13478 back return status from the_target->read_memory().
13479 * target.h (struct target_ops): Adapt *read_memory() prototype.
13480 Update comment.
13481 (read_inferior_memory): Adapt prototype.
13482 * server.c (main): Return an error packet if
13483 read_inferior_memory() returns an error.
13484
a59d1c82
DJ
134852004-03-04 Daniel Jacobowitz <drow@mvista.com>
13486
13487 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13488 Unify with other clean targets.
13489
dc3f8883
DJ
134902004-02-29 Daniel Jacobowitz <drow@mvista.com>
13491
13492 * server.c (handle_v_cont): Call set_desired_inferior.
13493
89a208da
DJ
134942004-02-29 Daniel Jacobowitz <drow@mvista.com>
13495
13496 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13497
62ea82f5
DJ
134982004-02-29 Daniel Jacobowitz <drow@mvista.com>
13499
13500 * linux-low.c (linux_wait): Unblock async I/O.
13501 (linux_resume): Block and enable async I/O.
13502 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13503 * server.h (block_async_io, unblock_async_io): Add prototypes.
13504
6910d122
DJ
135052004-02-29 Daniel Jacobowitz <drow@mvista.com>
13506
13507 * remote-utils.c (remote_open): Print a status notice after
13508 opening a TCP port.
13509 * server.c (attach_inferior): Print a status notice after
13510 attaching.
13511
135122004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
13513
13514 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13515
c89dc5d4
DJ
135162004-02-26 Daniel Jacobowitz <drow@mvista.com>
13517
13518 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13519 error packet.
13520 * server.c, target.h: Update copyright years.
13521
4b8dad4a
RM
135222004-02-25 Roland McGrath <roland@redhat.com>
13523
13524 * target.h (struct target_ops): New member `read_auxv'.
13525 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13526 * linux-low.c (linux_read_auxv): New function.
13527 (linux_target_ops): Initialize `read_auxv' member to that.
13528
d7446758
JB
135292004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13530
13531 Committed by Jim Blandy <jimb@redhat.com>.
13532
13533 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 13534 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
13535 instead of GPR_SIZE to distiguish s390 and s390x targets.
13536
5544ad89
DJ
135372004-01-31 Daniel Jacobowitz <drow@mvista.com>
13538
13539 * linux-low.c: Update copyright year.
13540 (check_removed_breakpoint): Clear pending_is_breakpoint.
13541 (linux_set_resume_request, linux_queue_one_thread)
13542 (resume_status_pending_p): New functions.
13543 (linux_continue_one_thread): Use process->resume.
13544 (linux_resume): Only resume threads if there are no pending events.
13545 * linux-low.h (struct process_info): Add resume request
13546 pointer.
13547
2a68b70e
DJ
135482004-01-30 Daniel Jacobowitz <drow@mvista.com>
13549
13550 * regcache.c (new_register_cache): Clear the allocated register
13551 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13552
64386c31
DJ
135532003-10-13 Daniel Jacobowitz <drow@mvista.com>
13554
13555 * linux-low.c (linux_resume): Take a struct thread_resume *
13556 argument.
13557 (linux_wait): Update call.
13558 (resume_ptr): New static variable.
13559 (linux_continue_one_thread): Renamed from
13560 linux_continue_one_process. Use resume_ptr.
13561 (linux_resume): Use linux_continue_one_thread.
13562 * server.c (handle_v_cont, handle_v_requests): New functions.
13563 (myresume): New function.
13564 (main): Handle 'v' case.
13565 * target.h (struct thread_resume): New type.
13566 (struct target_ops): Change argument of "resume" to struct
13567 thread_resume *.
13568 (myresume): Delete macro.
13569
c938e9b0
L
135702003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13571
13572 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13573 (uninstall): Support DESTDIR.
13574
7f313d07
BC
13575Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13576
13577 * configure.srv: Add xscale*linux copy of arm*linux entry.
13578
3b2fc2ea
DJ
135792003-07-24 Daniel Jacobowitz <drow@mvista.com>
13580
13581 * linux-arm-low.c (arm_reinsert_addr): New function.
13582 (the_low_target): Add arm_reinsert_addr.
13583
1c0a559e
MK
135842003-07-08 Mark Kettenis <kettenis@gnu.org>
13585
13586 * mem-break.c: Remove whitespace at end of file.
13587
43d5792c
DJ
135882003-06-28 Daniel Jacobowitz <drow@mvista.com>
13589
13590 * configure.in: Check whether we need to prototype strerror.
13591 * server.h: Optionally prototype strerror.
13592 * gdbreplay.c (perror_with_name): Use strerror.
13593 * linux-low.c (linux_attach_lwp): Use strerror.
13594 * utils.c (perror_with_name): Use strerror.
13595 * config.in, configure: Regenerated.
13596
c8a86edf
DJ
135972003-06-28 Daniel Jacobowitz <drow@mvista.com>
13598
13599 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13600 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13601
73d37363
DJ
136022003-06-20 Daniel Jacobowitz <drow@mvista.com>
13603
13604 * Makefile.in (SFILES): Update.
13605 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13606 low-sun3.c: Remove files.
13607
6ad8ae5c
DJ
136082003-06-17 Daniel Jacobowitz <drow@mvista.com>
13609
13610 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13611 (linux_detach_one_process, linux_detach): New functions.
13612 (linux_target_ops): Add linux_detach.
13613 * server.c (main): Handle 'D' packet.
13614 * target.h (struct target_ops): Add "detach" member.
13615 (detach_inferior): Define.
13616
1581182a
MK
136172003-06-13 Mark Kettenis <kettenis@gnu.org>
13618
13619 From Kelley Cook <kelleycook@wideopenwest.com>:
13620 * configure.srv: Accept i[34567]86 variants.
13621
e5379b03
DJ
136222003-06-05 Daniel Jacobowitz <drow@mvista.com>
13623
13624 * linux-low.c (linux_wait_for_event): Correct comment typos.
13625 (linux_resume_one_process): Call check_removed_breakpoint.
13626 (linux_send_signal): New function.
13627 (linux_target_ops): Add linux_send_signal.
13628 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13629 of kill.
13630 * target.h (struct target_ops): Add send_signal.
13631
2ff29de4
JB
136322003-05-29 Jim Blandy <jimb@redhat.com>
13633
13634 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13635 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13636 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13637 away part of the register's value.
13638
254787d4
DJ
136392003-03-26 Daniel Jacobowitz <drow@mvista.com>
13640
13641 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13642 (linux_wait_for_event, linux_init_signals): Likewise.
13643
94e10508
DJ
136442003-03-17 Daniel Jacobowitz <drow@mvista.com>
13645
13646 * configure.in: Check for stdlib.h.
13647 * configure: Regenerated.
13648 * config.in: Regenerated.
13649
4c0711e0
DJ
136502003-01-04 Andreas Schwab <schwab@suse.de>
13651
13652 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13653
ef66e766
AC
136542003-01-02 Andrew Cagney <ac131313@redhat.com>
13655
13656 * Makefile.in: Remove obsolete code.
13657
a1358604
DJ
136582002-11-20 Daniel Jacobowitz <drow@mvista.com>
13659
13660 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13661 defined(PT_FPR0_HI).
13662
23ce3b1c
DJ
136632002-11-17 Stuart Hughes <seh@zee2.com>
13664
13665 * linux-arm-low.c (arm_num_regs): Increase.
13666 (arm_regmap): Include status register.
13667
136682002-11-17 Daniel Jacobowitz <drow@mvista.com>
13669
13670 * linux-low.c (register_addr): Remove incorrect -1 check.
13671
a9fa9f7d
DJ
136722002-08-29 Daniel Jacobowitz <drow@mvista.com>
13673
13674 * linux-low.c (linux_create_inferior): Call setpgid. Return
13675 the new PID.
13676 (unstopped_p, linux_signal_pid): Remove.
13677 (linux_target_ops): Remove linux_signal_pid.
13678 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13679 global instead of target method.
13680 * target.h (struct target_ops): Remove signal_pid. Update comment
13681 for create_inferior.
13682 * server.c (signal_pid): New variable.
13683 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 13684 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
13685 (attach_inferior): Set signal_pid.
13686
17574093
DJ
136872002-08-23 Daniel Jacobowitz <drow@mvista.com>
13688
13689 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13690
136912002-08-20 Jim Blandy <jimb@redhat.com>
13692
13693 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13694 default for this.
13695
136962002-08-01 Andrew Cagney <cagney@redhat.com>
13697
13698 * Makefile.in: Make chill references obsolete.
13699
137002002-07-24 Kevin Buettner <kevinb@redhat.com>
13701
13702 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13703 * configure: Regenerate.
13704 * config.in: Regenerate.
13705
137062002-07-09 David O'Brien <obrien@FreeBSD.org>
13707
13708 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13709 (perror_with_name, remote_close, remote_open, expect, play): Static.
13710
137112002-07-04 Michal Ludvig <mludvig@suse.cz>
13712
4b8dad4a 13713 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
13714 byte offsets instead of an array of indexes.
13715 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13716
137172002-06-13 Daniel Jacobowitz <drow@mvista.com>
13718
13719 * regcache.c: Add comment.
13720
137212002-06-11 Daniel Jacobowitz <drow@mvista.com>
13722
13723 * thread-db.c: New file.
13724 * proc-service.c: New file.
13725 * acinclude.m4: New file.
13726 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13727 proc-service.o, and thread-db.o.
13728 (linux-low.o): Add USE_THREAD_DB.
13729 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13730 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13731 * aclocal.m4: Regenerated.
13732 * config.in: Regenerated.
13733 * configure: Regenerated.
13734 * configure.in: Check for proc_service.h, sys/procfs.h,
13735 thread_db.h, and linux/elf.h headrs.
13736 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13737 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13738 Check for -lthread_db and thread support.
13739 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13740 PowerPC, and SuperH.
13741 * i387-fp.c: Constify arguments.
13742 * i387-fp.h: Likewise.
13743 * inferiors.c: (struct thread_info): Renamed from
13744 `struct inferior_info'. Remove PID member. Use generic inferior
13745 list header. All uses updated.
13746 (inferiors, signal_pid): Removed.
13747 (all_threads): New variable.
13748 (get_thread): Define.
13749 (add_inferior_to_list): New function.
13750 (for_each_inferior): New function.
13751 (change_inferior_id): New function.
13752 (add_inferior): Removed.
13753 (remove_inferior): New function.
13754 (add_thread): New function.
13755 (free_one_thread): New function.
13756 (remove_thread): New function.
13757 (clear_inferiors): Use for_each_inferior and free_one_thread.
13758 (find_inferior): New function.
13759 (find_inferior_id): New function.
13760 (inferior_target_data): Update argument type.
13761 (set_inferior_target_data): Likewise.
13762 (inferior_regcache_data): Likewise.
13763 (set_inferior_regcache_data): Likewise.
13764 * linux-low.c (linux_bp_reinsert): Remove.
13765 (all_processes, stopping_threads, using_thrads)
13766 (struct pending_signals, debug_threads, pid_of): New.
13767 (inferior_pid): Replace with macro.
13768 (struct inferior_linux_data): Remove.
13769 (get_stop_pc, add_process): New functions.
13770 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13771 Use add_process and add_thread.
13772 (linux_attach_lwp): New function, based on old linux_attach. Use
13773 add_process and add_thread. Set stop_expected for new threads.
13774 (linux_attach): New function.
13775 (linux_kill_one_process): New function.
13776 (linux_kill): Kill all LWPs.
13777 (linux_thread_alive): Use find_inferior_id.
13778 (check_removed_breakpoints, status_pending_p): New functions.
13779 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13780 Update. Use WNOHANG. Wait for cloned processes also. Update process
13781 struct for the found process.
13782 (linux_wait_for_event): New function.
13783 (linux_wait): Use it. Support LWPs.
13784 (send_sigstop, wait_for_sigstop, stop_all_processes)
13785 (linux_resume_one_process, linux_continue_one_process): New functions.
13786 (linux_resume): Support LWPs.
13787 (REGISTER_RAW_SIZE): Remove.
13788 (fetch_register): Use register_size instead. Call supply_register.
13789 (usr_store_inferior_registers): Likewise. Call collect_register.
13790 Fix recursive case.
13791 (regsets_fetch_inferior_registers): Improve error message.
13792 (regsets_store_inferior_registers): Add debugging.
13793 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13794 (unstopped_p, linux_signal_pid): New functions.
13795 (linux_target_ops): Add linux_signal_pid.
13796 (linux_init_signals): New function.
13797 (initialize_low): Call it. Initialize using_threads.
13798 * regcache.c (inferior_regcache_data): Add valid
13799 flag.
13800 (get_regcache): Fetch registers lazily. Add fetch argument
13801 and update all callers.
13802 (regcache_invalidate_one, regcache_invalidate): New
13803 functions.
13804 (new_register_cache): Renamed from create_register_cache.
13805 Return the new regcache.
13806 (free_register_cache): Change argument to a void *.
13807 (registers_to_string, registers_from_string): Call get_regcache
13808 with fetch flag set.
13809 (register_data): Make static. Pass fetch flag to get_regcache.
13810 (supply_register): Call get_regcache with fetch flag clear.
13811 (collect_register): Call get_regcache with fetch flag set.
13812 (collect_register_as_string): New function.
13813 * regcache.h: Update.
13814 * remote-utils.c (putpkt): Flush after debug output and use
13815 stderr.
13816 Handle input interrupts while waiting for an ACK.
13817 (input_interrupt): Use signal_pid method.
13818 (getpkt): Flush after debug output and use stderr.
13819 (outreg): Use collect_register_as_string.
13820 (new_thread_notify, dead_thread_notify): New functions.
13821 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13822 and general_thread.
13823 (look_up_one_symbol): Flush after debug output.
13824 * server.c (step_thread, server_waiting): New variables.
13825 (start_inferior): Don't use signal_pid. Update call to mywait.
13826 (attach_inferior): Update call to mywait.
13827 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13828 (main): Don't fetch/store registers explicitly. Use
13829 set_desired_inferior. Support proposed ``Hs'' packet. Update
13830 calls to mywait.
13831 * server.h: Update.
13832 (struct inferior_list, struct_inferior_list_entry): New.
13833 * target.c (set_desired_inferior): New.
13834 (write_inferior_memory): Constify.
13835 (mywait): New function.
13836 * target.h: Update.
13837 (struct target_ops): New signal_pid method.
13838 (mywait): Removed macro, added prototype.
13839
13840 * linux-low.h (regset_func): Removed.
13841 (regset_fill_func, regset_store_func): New.
13842 (enum regset_type): New.
13843 (struct regset_info): Add type field. Use new operation types.
13844 (struct linux_target_ops): stop_pc renamed to get_pc.
13845 Add decr_pc_after_break and breakpoint_at.
13846 (get_process, get_thread_proess, get_process_thread)
13847 (strut process_info, all_processes, linux_attach_lwp)
13848 (thread_db_init): New.
13849
13850 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13851 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13852 (the_low_target): Add new members.
13853 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13854 (i386_store_fpxregset): Constify.
13855 (target_regsets): Add new kind identifier.
13856 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13857 (i386_set_pc): Add debugging.
13858 (i386_breakpoint_at): New function.
13859 (the_low_target): Add new members.
13860 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13861 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13862 (mips_breakpoint_at): New.
13863 (the_low_target): Add new members.
13864 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13865 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13866 (the_low_target): Add new members.
13867 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13868 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13869 (the_low_target): Add new members.
13870 * linux-x86-64-low.c (target_regsets): Add new kind
13871 identifier.
13872
138732002-05-15 Daniel Jacobowitz <drow@mvista.com>
13874
13875 From Martin Pool <mbp@samba.org>:
13876 * server.c (gdbserver_usage): New function.
13877 (main): Call it.
13878
138792002-05-14 Daniel Jacobowitz <drow@mvista.com>
13880
13881 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13882 stop_at -> stop_pc.
13883
138842002-05-04 Andrew Cagney <ac131313@redhat.com>
13885
13886 * Makefile.in: Remove obsolete code.
13887
138882002-04-24 Michal Ludvig <mludvig@suse.cz>
13889
13890 * linux-low.c (regsets_fetch_inferior_registers),
13891 (regsets_store_inferior_registers): Removed cast to int from
13892 ptrace() calls.
13893 * regcache.h: Added declaration of struct inferior_info.
13894
138952002-04-20 Daniel Jacobowitz <drow@mvista.com>
13896
13897 * inferiors.c (struct inferior_info): Add regcache_data.
13898 (add_inferior): Call create_register_cache.
13899 (clear_inferiors): Call free_register_cache.
13900 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13901 * regcache.c (struct inferior_regcache_data): New.
13902 (registers): Remove.
13903 (get_regcache): New function.
13904 (create_register_cache, free_register_cache): New functions.
13905 (set_register_cache): Don't initialize the register cache here.
13906 (registers_to_string, registers_from_string, register_data): Call
13907 get_regcache.
13908 * regcache.h: Add prototypes.
13909 * server.h: Likewise.
13910
139112002-04-20 Daniel Jacobowitz <drow@mvista.com>
13912
13913 * mem-break.c: New file.
13914 * mem-break.h: New file.
13915 * Makefile.in: Add mem-break.o rule; update server.h
13916 dependencies.
13917 * inferiors.c (struct inferior_info): Add target_data
13918 member.
13919 (clear_inferiors): Free target_data member if set.
13920 (inferior_target_data, set_inferior_target_data): New functions.
13921 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13922 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13923 * linux-low.c (linux_bp_reinsert): New variable.
13924 (struct inferior_linux_data): New.
13925 (linux_create_inferior): Use set_inferior_target_data.
13926 (linux_attach): Likewise. Call add_inferior.
13927 (linux_wait_for_one_inferior): New function.
13928 (linux_wait): Call it.
13929 (linux_write_memory): Add const.
13930 (initialize_low): Call set_breakpoint_data.
13931 * linux-low.h (struct linux_target_ops): Add breakpoint
13932 handling members.
13933 * server.c (attach_inferior): Remove extra add_inferior
13934 call.
13935 * server.h: Include mem-break.h. Update inferior.c
13936 prototypes.
13937 * target.c (read_inferior_memory)
13938 (write_inferior_memory): New functions.
13939 * target.h (read_inferior_memory)
13940 (write_inferior_memory): Change macros to prototypes.
13941 (struct target_ops): Update comments. Add const to write_memory
13942 definition.
13943
139442002-04-11 Daniel Jacobowitz <drow@mvista.com>
13945
13946 * linux-low.c (usr_store_inferior_registers): Support
13947 registers which are allowed to fail to store.
13948 * linux-low.h (linux_target_ops): Likewise.
13949 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13950 (ppc_cannot_store_register): FPSCR may not be storable.
13951
139522002-04-09 Daniel Jacobowitz <drow@mvista.com>
13953
13954 * server.h: Include <string.h> if HAVE_STRING_H.
13955 * ChangeLog: Correct paths in last ChangeLog entry.
13956
139572002-04-09 Daniel Jacobowitz <drow@mvista.com>
13958
13959 * linux-low.h: Remove obsolete prototypes.
13960 (struct linux_target_ops): New.
13961 (extern the_low_target): New.
13962 * linux-low.c (num_regs, regmap): Remove declarations.
13963 (register_addr): Use the_low_target explicitly.
13964 (fetch_register): Likewise.
13965 (usr_fetch_inferior_registers): Likewise.
13966 (usr_store_inferior_registers): Likewise.
13967 * linux-arm-low.c (num_regs): Remove.
13968 (arm_num_regs): Define.
13969 (arm_regmap): Renamed from regmap, made static.
13970 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13971 made static.
13972 (arm_cannot_store_register): Renamed from cannot_store_register,
13973 made static.
13974 (the_low_target): New.
13975 * linux-i386-low.c (num_regs): Remove.
13976 (i386_num_regs): Define.
13977 (i386_regmap): Renamed from regmap, made static.
13978 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13979 made static.
13980 (i386_cannot_store_register): Renamed from cannot_store_register,
13981 made static.
13982 (the_low_target): New.
13983 * linux-ia64-low.c (num_regs): Remove.
13984 (ia64_num_regs): Define.
13985 (ia64_regmap): Renamed from regmap, made static.
13986 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13987 made static.
13988 (ia64_cannot_store_register): Renamed from cannot_store_register,
13989 made static.
13990 (the_low_target): New.
13991 * linux-m68k-low.c (num_regs): Remove.
13992 (m68k_num_regs): Define.
13993 (m68k_regmap): Renamed from regmap, made static.
13994 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13995 made static.
13996 (m68k_cannot_store_register): Renamed from cannot_store_register,
13997 made static.
13998 (the_low_target): New.
13999 * linux-mips-low.c (num_regs): Remove.
14000 (mips_num_regs): Define.
14001 (mips_regmap): Renamed from regmap, made static.
14002 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14003 made static.
14004 (mips_cannot_store_register): Renamed from cannot_store_register,
14005 made static.
14006 (the_low_target): New.
14007 * linux-ppc-low.c (num_regs): Remove.
14008 (ppc_num_regs): Define.
14009 (ppc_regmap): Renamed from regmap, made static.
14010 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14011 made static.
14012 (ppc_cannot_store_register): Renamed from cannot_store_register,
14013 made static.
14014 (the_low_target): New.
14015 * linux-s390-low.c (num_regs): Remove.
14016 (s390_num_regs): Define.
14017 (s390_regmap): Renamed from regmap, made static.
14018 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14019 made static.
14020 (s390_cannot_store_register): Renamed from cannot_store_register,
14021 made static.
14022 (the_low_target): New.
14023 * linux-sh-low.c (num_regs): Remove.
14024 (sh_num_regs): Define.
14025 (sh_regmap): Renamed from regmap, made static.
14026 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14027 made static.
14028 (sh_cannot_store_register): Renamed from cannot_store_register,
14029 made static.
14030 (the_low_target): New.
14031 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14032 (the_low_target): New.
14033
140342002-04-09 Daniel Jacobowitz <drow@mvista.com>
14035
14036 * Makefile.in: Add stamp-h target.
14037 * configure.in: Create stamp-h.
14038 * configure: Regenerated.
14039
140402002-04-09 Daniel Jacobowitz <drow@mvista.com>
14041
14042 * inferiors.c: New file.
14043 * target.c: New file.
14044 * target.h: New file.
14045 * Makefile.in: Add target.o and inferiors.o. Update
14046 dependencies.
14047 * linux-low.c (inferior_pid): New static variable,
14048 moved from server.c.
14049 (linux_create_inferior): Renamed from create_inferior.
14050 Call add_inferior. Return 0 on success instead of a PID.
14051 (linux_attach): Renamed from myattach.
14052 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14053 (linux_thread_alive): Renamed from mythread_alive.
14054 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14055 child dies.
14056 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14057 (regsets_store_inferior_registers): Correct error message.
14058 Add missing ``return 0''.
14059 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14060 (linux_store_registers): Renamed from store_inferior_registers.
14061 (linux_read_memory): Renamed from read_inferior_memory.
14062 (linux_write_memory): Renamed from write_inferior_memory.
14063 (linux_target_ops): New structure.
14064 (initialize_low): Call set_target_ops ().
14065 * remote-utils.c (unhexify): New function.
14066 (hexify): New function.
14067 (input_interrupt): Send signals to ``signal_pid''.
14068 * server.c (inferior_pid): Remove.
14069 (start_inferior): Update create_inferior call.
14070 (attach_inferior): Call add_inferior.
14071 (handle_query): New function.
14072 (main): Call handle_query for `q' packets.
14073 * server.h: Include "target.h". Remove obsolete prototypes.
14074 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14075
140762002-04-09 Daniel Jacobowitz <drow@mvista.com>
14077
14078 * Makefile.in: Add WARN_CFLAGS. Update configury
14079 dependencies.
14080 * configure.in: Check for <string.h>
14081 * configure: Regenerate.
14082 * config.in: Regenerate.
14083 * gdbreplay.c: Include needed system headers.
14084 (remote_open): Remove strchr prototype.
14085 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14086 * regcache.c (supply_register): Change buf argument to const void *.
14087 (supply_register_by_name): Likewise.
14088 (collect_register): Change buf argument to void *.
14089 (collect_register_by_name): Likewise.
14090 * regcache.h: Add missing prototypes.
14091 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14092 * server.c (handle_query): New function.
14093 (attached): New static variable, moved out of main.
14094 (main): Quiet longjmp clobber warnings.
14095 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14096 * utils.c (error): Remove NORETURN.
14097 (fatal): Likewise.