Fix s390 GNU/Linux gdb and gdbserver builds
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
3451269c
PA
12016-04-21 Pedro Alves <palves@redhat.com>
2
3 * linux-s390-low.c (s390_collect_ptrace_register)
4 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5 add casts.
6 (s390_check_regset): Use void * instead of gdb_byte *.
7
a2358508
PA
82016-04-20 Pedro Alves <palves@redhat.com>
9
10 * configure: Renegerate.
11
6885166d
YQ
122016-04-20 Yao Qi <yao.qi@linaro.org>
13
14 * linux-aarch32-low.c: Include "arch/arm-linux.h".
15 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
16 number 16.
17 (arm_store_gregset): Likewise.
18
2b863f51
WT
192016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
20
21 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
22 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
23 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
24 (amd64-avx-mpx-linux.c): New rules.
25 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
26 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
27 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
28 (srv_amd64_regobj): Add amd64-avx-mpx.o.
29 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
30 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
31 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
32 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
33 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
34 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
35 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
36 * linux-x86-low.c (x86_linux_read_description): Add case for
37 X86_XSTATE_AVX_MPX_MASK.
38 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
39 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
40 init_registers_i386_avx_mpx_linux.
41 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
42 (initialize_low_tracepoint): Call
43 init_registers_i386_avx_mpx_linux.
44 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
45 (initialize_low_tracepoint): Call
46 init_registers_amd64_avx_mpx_linux.
47 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
48 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
49 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
50 declarations.
51
9b30624b
PA
522016-04-18 Pedro Alves <palves@redhat.com>
53
54 * configure: Regenerate.
55
45e3745e
AT
562016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
57
58 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
59 (aarch64_emit_sub): Likewise.
60
2afc13ff
PA
612016-04-12 Pedro Alves <palves@redhat.com>
62
63 * utils.c (prepare_to_throw_exception): Delete.
64
6e774b13
SM
652016-04-05 Simon Marchi <simon.marchi@ericsson.com>
66
67 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
68
4dca19f8
MK
692016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
70
71 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
72
d0a9981f
MK
732016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
74
75 * linux-aarch64-ipa.c: Add <elf.h> include.
76 * linux-ppc-ipa.c: Add <elf.h> include.
77 * linux-s390-ipa.c: Add <elf.h> include.
78
252db07e
MK
792016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
80
81 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
82 (get_raw_reg_ptr): Likewise.
83 (get_trace_state_variable_value_ptr): Likewise.
84 (set_trace_state_variable_value_ptr): Likewise.
85 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
86 char *.
87
14e2b6d9
MK
882016-03-31 Wei-cheng Wang <cole945@gmail.com>
89 Marcin Kościelnicki <koriakin@0x04.net>
90
91 PR/17221
92 * linux-ppc-low.c (emit_insns): New function.
93 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
94 (ppc_emit_prologue): New function.
95 (ppc_emit_epilogue): New function.
96 (ppc_emit_add): New function.
97 (ppc_emit_sub): New function.
98 (ppc_emit_mul): New function.
99 (ppc_emit_lsh): New function.
100 (ppc_emit_rsh_signed): New function.
101 (ppc_emit_rsh_unsigned): New function.
102 (ppc_emit_ext): New function.
103 (ppc_emit_zero_ext): New function.
104 (ppc_emit_log_not): New function.
105 (ppc_emit_bit_and): New function.
106 (ppc_emit_bit_or): New function.
107 (ppc_emit_bit_xor): New function.
108 (ppc_emit_bit_not): New function.
109 (ppc_emit_equal): New function.
110 (ppc_emit_less_signed): New function.
111 (ppc_emit_less_unsigned): New function.
112 (ppc_emit_ref): New function.
113 (ppc_emit_const): New function.
114 (ppc_emit_reg): New function.
115 (ppc_emit_pop): New function.
116 (ppc_emit_stack_flush): New function.
117 (ppc_emit_swap): New function.
118 (ppc_emit_stack_adjust): New function.
119 (ppc_emit_call): New function.
120 (ppc_emit_int_call_1): New function.
121 (ppc_emit_void_call_2): New function.
122 (ppc_emit_if_goto): New function.
123 (ppc_emit_goto): New function.
124 (ppc_emit_eq_goto): New function.
125 (ppc_emit_ne_goto): New function.
126 (ppc_emit_lt_goto): New function.
127 (ppc_emit_le_goto): New function.
128 (ppc_emit_gt_goto): New function.
129 (ppc_emit_ge_goto): New function.
130 (ppc_write_goto_address): New function.
131 (ppc_emit_ops_impl): New static variable.
132 (ppc64v1_emit_prologue): New function.
133 (ppc64v2_emit_prologue): New function.
134 (ppc64_emit_epilogue): New function.
135 (ppc64_emit_add): New function.
136 (ppc64_emit_sub): New function.
137 (ppc64_emit_mul): New function.
138 (ppc64_emit_lsh): New function.
139 (ppc64_emit_rsh_signed): New function.
140 (ppc64_emit_rsh_unsigned): New function.
141 (ppc64_emit_ext): New function.
142 (ppc64_emit_zero_ext): New function.
143 (ppc64_emit_log_not): New function.
144 (ppc64_emit_bit_and): New function.
145 (ppc64_emit_bit_or): New function.
146 (ppc64_emit_bit_xor): New function.
147 (ppc64_emit_bit_not): New function.
148 (ppc64_emit_equal): New function.
149 (ppc64_emit_less_signed): New function.
150 (ppc64_emit_less_unsigned): New function.
151 (ppc64_emit_ref): New function.
152 (ppc64_emit_const): New function.
153 (ppc64v1_emit_reg): New function.
154 (ppc64v2_emit_reg): New function.
155 (ppc64_emit_pop): New function.
156 (ppc64_emit_stack_flush): New function.
157 (ppc64_emit_swap): New function.
158 (ppc64v1_emit_call): New function.
159 (ppc64v2_emit_call): New function.
160 (ppc64v1_emit_int_call_1): New function.
161 (ppc64v2_emit_int_call_1): New function.
162 (ppc64v1_emit_void_call_2): New function.
163 (ppc64v2_emit_void_call_2): New function.
164 (ppc64_emit_if_goto): New function.
165 (ppc64_emit_eq_goto): New function.
166 (ppc64_emit_ne_goto): New function.
167 (ppc64_emit_lt_goto): New function.
168 (ppc64_emit_le_goto): New function.
169 (ppc64_emit_gt_goto): New function.
170 (ppc64_emit_ge_goto): New function.
171 (ppc64v1_emit_ops_impl): New static variable.
172 (ppc64v2_emit_ops_impl): New static variable.
173 (ppc_emit_ops): New function.
174 (linux_low_target): Wire in ppc_emit_ops.
175
a2174ba4
MK
1762016-03-31 Wei-cheng Wang <cole945@gmail.com>
177 Marcin Kościelnicki <koriakin@0x04.net>
178
179 PR/17221
180 * Makefile.in: Add powerpc-*-ipa.o
181 * configure.srv: Add ipa_obj for powerpc*-linux.
182 * linux-ppc-ipa.c: New file.
183 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
184 includes.
185 (PPC_FIELD): New macro.
186 (PPC_SEXT): New macro.
187 (PPC_OP6): New macro.
188 (PPC_BO): New macro.
189 (PPC_LI): New macro.
190 (PPC_BD): New macro.
191 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
192 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
193 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
194 (ppc_get_thread_area): New function.
195 (is_elfv2_inferior): New function.
196 (gen_ds_form): New function.
197 (GEN_STD): New macro.
198 (GEN_STDU): New macro.
199 (GEN_LD): New macro.
200 (GEN_LDU): New macro.
201 (gen_d_form): New function.
202 (GEN_ADDI): New macro.
203 (GEN_ADDIS): New macro.
204 (GEN_LI): New macro.
205 (GEN_LIS): New macro.
206 (GEN_ORI): New macro.
207 (GEN_ORIS): New macro.
208 (GEN_LWZ): New macro.
209 (GEN_STW): New macro.
210 (GEN_STWU): New macro.
211 (gen_xfx_form): New function.
212 (GEN_MFSPR): New macro.
213 (GEN_MTSPR): New macro.
214 (GEN_MFCR): New macro.
215 (GEN_MTCR): New macro.
216 (GEN_SYNC): New macro.
217 (GEN_LWSYNC): New macro.
218 (gen_x_form): New function.
219 (GEN_OR): New macro.
220 (GEN_MR): New macro.
221 (GEN_LWARX): New macro.
222 (GEN_STWCX): New macro.
223 (GEN_CMPW): New macro.
224 (gen_md_form): New function.
225 (GEN_RLDICL): New macro.
226 (GEN_RLDICR): New macro.
227 (gen_i_form): New function.
228 (GEN_B): New macro.
229 (GEN_BL): New macro.
230 (gen_b_form): New function.
231 (GEN_BNE): New macro.
232 (GEN_LOAD): New macro.
233 (GEN_STORE): New macro.
234 (gen_limm): New function.
235 (gen_atomic_xchg): New function.
236 (gen_call): New function.
237 (ppc_relocate_instruction): New function.
238 (ppc_install_fast_tracepoint_jump_pad): New function.
239 (ppc_get_min_fast_tracepoint_insn_len): New function.
240 (ppc_get_ipa_tdesc_idx): New function.
241 (the_low_target): Wire in the new functions.
242 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
243 tdescs.
244 * linux-ppc-tdesc.h: New file.
245
a13c4696
MK
2462016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
247
248 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
249 (alloc_jump_pad_buffer): New function.
250 * linux-amd64-ipa.c: Add <sys/mman.h> include.
251 (alloc_jump_pad_buffer): New function.
252 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
253 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
254 (alloc_jump_pad_buffer): New function.
255 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
256 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
257 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
258 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
259
1cda1512
MK
2602016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
261
262 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
263 * linux-amd64-ipa.c: Likewise.
264 * linux-i386-ipa.c: Likewise.
265 * linux-s390-ipa.c: Likewise.
266 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
267 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
268 set_trace_state_variable_value_ptr.
269 (struct ipa_sym_addresses): Likewise.
270 (symbol_list): Likewise.
271 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
272 accessing gdb_collect directly.
273 (gdb_collect_ptr_type): New typedef.
274 (get_raw_reg_ptr_type): New typedef.
275 (get_trace_state_variable_value_ptr_type): New typedef.
276 (set_trace_state_variable_value_ptr_type): New typedef.
277 (gdb_collect_ptr): New global.
278 (get_raw_reg_ptr): New global.
279 (get_trace_state_variable_value_ptr): New global.
280 (set_trace_state_variable_value_ptr): New global.
281 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
282 accessing get_raw_reg directly.
283 (get_get_tsv_func_addr): Likewise for
284 get_trace_state_variable_value_ptr.
285 (get_set_tsv_func_addr): Likewise for
286 set_trace_state_variable_value_ptr.
287 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
288
72fb5488
SM
2892016-03-30 Simon Marchi <simon.marchi@ericsson.com>
290
291 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
292
28170b88
MK
2932016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
294
295 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
296 packets.
297 (relocate_instruction): Remove own_buf.
298 * server.c (own_buf): Make global.
299 (handle_v_requests): Make global.
300 * server.h (own_buf): New declaration.
301 (handle_v_requests): New prototype.
302
f39e8743
MK
3032016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
304
305 PR 18377
306 * linux-s390-low.c (add_insns): New function.
307 (s390_emit_prologue): New function.
308 (s390_emit_epilogue): New function.
309 (s390_emit_add): New function.
310 (s390_emit_sub): New function.
311 (s390_emit_mul): New function.
312 (s390_emit_lsh): New function.
313 (s390_emit_rsh_signed): New function.
314 (s390_emit_rsh_unsigned): New function.
315 (s390_emit_ext): New function.
316 (s390_emit_log_not): New function.
317 (s390_emit_bit_and): New function.
318 (s390_emit_bit_or): New function.
319 (s390_emit_bit_xor): New function.
320 (s390_emit_bit_not): New function.
321 (s390_emit_equal): New function.
322 (s390_emit_less_signed): New function.
323 (s390_emit_less_unsigned): New function.
324 (s390_emit_ref): New function.
325 (s390_emit_if_goto): New function.
326 (s390_emit_goto): New function.
327 (s390_write_goto_address): New function.
328 (s390_emit_litpool): New function.
329 (s390_emit_const): New function.
330 (s390_emit_call): New function.
331 (s390_emit_reg): New function.
332 (s390_emit_pop): New function.
333 (s390_emit_stack_flush): New function.
334 (s390_emit_zero_ext): New function.
335 (s390_emit_swap): New function.
336 (s390_emit_stack_adjust): New function.
337 (s390_emit_set_r2): New function.
338 (s390_emit_int_call_1): New function.
339 (s390_emit_void_call_2): New function.
340 (s390_emit_eq_goto): New function.
341 (s390_emit_ne_goto): New function.
342 (s390_emit_lt_goto): New function.
343 (s390_emit_le_goto): New function.
344 (s390_emit_gt_goto): New function.
345 (s390_emit_ge_goto): New function.
346 (s390x_emit_prologue): New function.
347 (s390x_emit_epilogue): New function.
348 (s390x_emit_add): New function.
349 (s390x_emit_sub): New function.
350 (s390x_emit_mul): New function.
351 (s390x_emit_lsh): New function.
352 (s390x_emit_rsh_signed): New function.
353 (s390x_emit_rsh_unsigned): New function.
354 (s390x_emit_ext): New function.
355 (s390x_emit_log_not): New function.
356 (s390x_emit_bit_and): New function.
357 (s390x_emit_bit_or): New function.
358 (s390x_emit_bit_xor): New function.
359 (s390x_emit_bit_not): New function.
360 (s390x_emit_equal): New function.
361 (s390x_emit_less_signed): New function.
362 (s390x_emit_less_unsigned): New function.
363 (s390x_emit_ref): New function.
364 (s390x_emit_if_goto): New function.
365 (s390x_emit_const): New function.
366 (s390x_emit_call): New function.
367 (s390x_emit_reg): New function.
368 (s390x_emit_pop): New function.
369 (s390x_emit_stack_flush): New function.
370 (s390x_emit_zero_ext): New function.
371 (s390x_emit_swap): New function.
372 (s390x_emit_stack_adjust): New function.
373 (s390x_emit_int_call_1): New function.
374 (s390x_emit_void_call_2): New function.
375 (s390x_emit_eq_goto): New function.
376 (s390x_emit_ne_goto): New function.
377 (s390x_emit_lt_goto): New function.
378 (s390x_emit_le_goto): New function.
379 (s390x_emit_gt_goto): New function.
380 (s390x_emit_ge_goto): New function.
381 (s390_emit_ops): New function.
382 (struct linux_target_ops): Fill in emit_ops hook.
383
abd9baf9
MK
3842016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
385
386 PR 18377
387 * Makefile.in: Add s390 IPA files.
388 * configure.srv: Build IPA for s390.
389 * linux-s390-ipa.c: New file.
390 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
391 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
392 (tdesc_s390_linux32): Likewise.
393 (init_registers_s390_linux32v1): Likewise.
394 (tdesc_s390_linux32v1): Likewise.
395 (init_registers_s390_linux32v2): Likewise.
396 (tdesc_s390_linux32v2): Likewise.
397 (init_registers_s390_linux64): Likewise.
398 (tdesc_s390_linux64): Likewise.
399 (init_registers_s390_linux64v1): Likewise.
400 (tdesc_s390_linux64v1): Likewise.
401 (init_registers_s390_linux64v2): Likewise.
402 (tdesc_s390_linux64v2): Likewise.
403 (init_registers_s390_te_linux64): Likewise.
404 (tdesc_s390_te_linux64): Likewise.
405 (init_registers_s390_vx_linux64): Likewise.
406 (tdesc_s390_vx_linux64): Likewise.
407 (init_registers_s390_tevx_linux64): Likewise.
408 (tdesc_s390_tevx_linux64): Likewise.
409 (init_registers_s390x_linux64): Likewise.
410 (tdesc_s390x_linux64): Likewise.
411 (init_registers_s390x_linux64v1): Likewise.
412 (tdesc_s390x_linux64v1): Likewise.
413 (init_registers_s390x_linux64v2): Likewise.
414 (tdesc_s390x_linux64v2): Likewise.
415 (init_registers_s390x_te_linux64): Likewise.
416 (tdesc_s390x_te_linux64): Likewise.
417 (init_registers_s390x_vx_linux64): Likewise.
418 (tdesc_s390x_vx_linux64): Likewise.
419 (init_registers_s390x_tevx_linux64): Likewise.
420 (tdesc_s390x_tevx_linux64): Likewise.
421 (have_hwcap_s390_vx): New static variable.
422 (s390_arch_setup): Fill have_hwcap_s390_vx.
423 (s390_get_thread_area): New function.
424 (s390_ft_entry_gpr_esa): New const.
425 (s390_ft_entry_gpr_zarch): New const.
426 (s390_ft_entry_misc): New const.
427 (s390_ft_entry_fr): New const.
428 (s390_ft_entry_vr): New const.
429 (s390_ft_main_31): New const.
430 (s390_ft_main_64): New const.
431 (s390_ft_exit_fr): New const.
432 (s390_ft_exit_vr): New const.
433 (s390_ft_exit_misc): New const.
434 (s390_ft_exit_gpr_esa): New const.
435 (s390_ft_exit_gpr_zarch): New const.
436 (append_insns): New function.
437 (s390_relocate_instruction): New function.
438 (s390_install_fast_tracepoint_jump_pad): New function.
439 (s390_get_min_fast_tracepoint_insn_len): New function.
440 (s390_get_ipa_tdesc_idx): New function.
441 (struct linux_target_ops): Wire in the above functions.
442 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
443 * linux-s390-tdesc.h: New file.
444
a4105d04
MK
4452016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
446
447 * linux-s390-low.c (s390_supports_tracepoints): New function.
448 (struct linux_target_ops): Fill supports_tracepoints hook.
449
35ac8b3e
YQ
4502016-03-18 Yao Qi <yao.qi@linaro.org>
451
452 * linux-low.c (lwp_signal_can_be_delivered): New function.
453 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
454
94610ec4
YQ
4552016-03-18 Yao Qi <yao.qi@linaro.org>
456
457 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
458 0 if signal is enqueued. Remove 'signal' from one debugging
459 message. Move one debugging message to some lines below.
460 Remove code setting 'signal' to 0.
461
80aea927
YQ
4622016-03-18 Yao Qi <yao.qi@linaro.org>
463
464 * linux-low.c (linux_low_filter_event): Remove redundant
465 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
466
b04fd3be
MK
4672016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
468
469 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
470 (struct linux_target_ops): Wire in the above.
471
c40c8d4b
YQ
4722016-03-03 Yao Qi <yao.qi@linaro.org>
473
474 * linux-low.c: Update comments to start_step_over.
475
0f8288ae
YQ
4762016-03-03 Yao Qi <yao.qi@linaro.org>
477
478 PR server/19736
479 * linux-low.c (handle_extended_wait): Set child suspended
480 if event_lwp->bp_reinsert isn't zero.
481
fdbd04a8
YQ
4822016-03-02 Yao Qi <yao.qi@linaro.org>
483
484 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
485 enqueue_pending_signal.
486
6896a8fa
MK
4872016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
488
489 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
490 is actually loaded.
491
ab503087
MK
4922016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
493
494 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
495 (s390_regmap_3264) [!__s390x__]: New global.
496 (s390_collect_ptrace_register): Skip map entries containing -1.
497 (s390_supply_ptrace_register): Ditto.
498 (s390_fill_gprs_high): New function.
499 (s390_store_gprs_high): New function.
500 (s390_regsets): Add NT_S390_HIGH_GPRS.
501 (s390_get_hwcap): Enable on 31-bit.
502 (have_hwcap_s390_high_gprs): Enable on 31-bit.
503 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
504 Detect NT_S390_HIGH_GPRS.
505 (s390_usrregs_info_3264): Enable on 31-bit.
506 (s390_regs_info): Enable regs_info_3264 on 31-bit.
507 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
508
ae91f625
MK
5092016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
510
511 PR gdb/13808
512 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
513 * configure.srv: Ditto.
514 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
515 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
516 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
517 (init_registers_amd64_linux): Remove prototype.
518 (tdesc_amd64_linux): Remove declaration.
519 (get_ipa_tdesc): New function.
520 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
521 initialize remaining tdescs.
522 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
523 (init_registers_i386_linux): Remove prototype.
524 (tdesc_i386_linux): Remove declaration.
525 (get_ipa_tdesc): New function.
526 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
527 initialize remaining tdescs.
528 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
529 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
530 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
531 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
532 (x86_get_ipa_tdesc_idx): New function.
533 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
534 * linux-x86-tdesc.h: New file.
535 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
536 (target_get_ipa_tdesc_idx): New macro.
537 * tracepoint.c (ipa_tdesc_idx): New macro.
538 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
539 (symbol_list): Add ipa_tdesc_idx.
540 (cmd_qtstart): Write ipa_tdesc_idx in the target.
541 (ipa_tdesc): Remove.
542 (ipa_tdesc_idx): New variable.
543 (get_context_regcache): Use get_ipa_tdesc.
544 (gdb_collect): Ditto.
545 (gdb_probe): Ditto.
546 * tracepoint.h (get_ipa_tdesc): New prototype.
547 (ipa_tdesc): Remove.
548
e7ad2f14
PA
5492016-02-24 Pedro Alves <palves@redhat.com>
550
551 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
552 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
553 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
554 Factor out common code between the USE_SIGTRAP_SIGINFO and
555 !USE_SIGTRAP_SIGINFO blocks.
556 (linux_low_filter_event): Call save_stop_reason instead of
557 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
558 Update comments.
559 (linux_wait_1): Update comments.
560
657f9cde
WW
5612016-02-24 Wei-cheng Wang <cole945@gmail.com>
562
563 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
564 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
565 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
566 ppc_insert_point, ppc_remove_point.
567
b00b61e1
MK
5682016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
569
570 * linux-s390-low.c (s390_supports_z_point_type): New function.
571 (struct linux_target_ops): Wire s390_supports_z_point_type in.
572
553cb527
YQ
5732016-02-16 Yao Qi <yao.qi@linaro.org>
574
575 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
576 PC. Get pc from regcache_read_pc.
577
a5652c21
YQ
5782016-02-12 Yao Qi <yao.qi@linaro.org>
579
580 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
581 or linux_get_pc_32bit.
582 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
583
ed443b61
YQ
5842016-02-12 Yao Qi <yao.qi@linaro.org>
585
586 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
587 arm_linux_get_next_pcs_fixup.
588
020ecd38
MK
5892016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
590
591 * tracepoint.c (x_tracepoint_action_download): Change
592 write_inferior_data_ptr to write_inferior_data_pointer.
593 (cmd_qtstart): Likewise.
594 (write_inferior_data_ptr): Remove.
595 (download_agent_expr): Change write_inferior_data_ptr to
596 write_inferior_data_pointer.
597 (download_tracepoint_1): Likewise.
598 (download_tracepoint): Likewise.
599 (download_trace_state_variables): Likewise.
600
7cae9051
WW
6012016-02-11 Wei-cheng Wang <cole945@gmail.com>
602 Marcin Kościelnicki <koriakin@0x04.net>
603
604 * tracepoint.c (struct tracepoint_action_ops): Remove.
605 (struct tracepoint_action): Remove ops.
606 (m_tracepoint_action_download, r_tracepoint_action_download)
607 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
608 size and offset accordingly.
609 (m_tracepoint_action_ops, r_tracepoint_action_ops)
610 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
611 (tracepoint_action_send, tracepoint_action_download): New functions.
612 Helpers for trace action handlers.
613 (add_tracepoint_action): Remove setup actions ops.
614 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
615
9f6a71b4
YQ
6162016-02-10 Yao Qi <yao.qi@linaro.org>
617
618 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
619
1e94266c
SM
6202016-02-09 Simon Marchi <simon.marchi@ericsson.com>
621
622 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
623 to AC_OUTPUT.
624 * configure: Regenerate.
625
8adce034
SM
6262016-02-09 Simon Marchi <simon.marchi@ericsson.com>
627
628 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
629 void * to gdb_byte *.
630 * linux-low.c (siginfo_fixup): Likewise.
631 (linux_xfer_siginfo): Likewise.
632 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
633 Likewise.
634 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
635
93813b37
WT
6362016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
637
638 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
639 to srv_tgtobj.
640 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
641 to srv_tgtobj.
642 * linux-x86-low.c [__x86_64__]: Include
643 "nat/amd64-linux-siginfo.h".
644 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
645 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
646 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
647 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
648 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
649 (cpt_si_fd, si_timerid, si_overrun): Move from
650 nat/amd64-linux-siginfo.c.
651 * Makefile.in (amd64-linux-siginfo.o:): New rule.
652
8424cc97
SM
6532016-01-28 Simon Marchi <simon.marchi@ericsson.com>
654
655 * server.c (skip_to_semicolon): Remove.
656 (process_point_options): Use strchrnul instead of
657 skip_to_semicolon.
658
4d18591b
YQ
6592016-01-26 Yao Qi <yao.qi@linaro.org>
660
661 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
662 * linux-low.c (install_software_single_step_breakpoints): Don't
663 call regcache_read_pc.
664 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
665 argument pc.
666
d8020970
YQ
6672016-01-26 Yao Qi <yao.qi@linaro.org>
668
669 * linux-low.c (install_software_single_step_breakpoints): Call
670 regcache_read_pc instead of get_pc.
671
8b207339
YQ
6722016-01-26 Yao Qi <yao.qi@linaro.org>
673
674 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
675 (unblock_async_io): Rename to ...
676 (block_unblock_async_io): ... it. New function.
677 (enable_async_io): Don't install SIGIO handler. Unblock it
678 instead.
679 (disable_async_io): Don't ignore SIGIO. Block it instead.
680 (initialize_async_io): Install SIGIO handler. Don't call
681 unblock_async_io.
682
18879fef
YQ
6832016-01-26 Yao Qi <yao.qi@linaro.org>
684
685 * remote-utils.c (getpkt): If the buffer isn't empty, and the
686 first character is '\003', call *the_target->request_interrupt.
687
a0f8e08a
YQ
6882016-01-25 Yao Qi <yao.qi@linaro.org>
689
690 * remote-utils.c (new_thread_notify): Remove.
691 (dead_thread_notify): Likewise.
692 * remote-utils.h (new_thread_notify): Remove declaration.
693 (dead_thread_notify): Likewise.
694
cc5fd9ab
MK
6952016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
696
697 * gdb.trace/pending.exp: Fix expected message on continue.
698
99e8eb11
MK
6992016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
700
701 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
702 it works properly on big-endian machines where sizeof (CORE_ADDR)
703 != sizeof (void *).
704
a994041d
PA
7052016-01-21 Pedro Alves <palves@redhat.com>
706
707 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
708 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
709 * configure: Regenerate.
710
f7a6a40d
YQ
7112016-01-21 Yao Qi <yao.qi@linaro.org>
712
713 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
714 is_thumb and set it according to CPSR saved on the stack.
715 (get_next_pcs_syscall_next_pc): Pass is_thumb to
716 arm_sigreturn_next_pc.
717
6f69e520
YQ
7182016-01-18 Yao Qi <yao.qi@linaro.org>
719
720 * linux-low.c (linux_set_pc_64bit): New function.
721 (linux_get_pc_64bit): New function.
722 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
723 Declare.
724 * linux-sparc-low.c (debug_threads): Remove declaration.
725 (sparc_get_pc): Remove.
726 (the_low_target): Use linux_get_pc_64bit instead of
727 sparc_get_pc.
728 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
729 (the_low_target): Use linux_get_pc_64bit and
730 linux_set_pc_64bit.
731
276d4552
YQ
7322016-01-18 Yao Qi <yao.qi@linaro.org>
733
734 * linux-arm-low.c (debug_threads): Remove declaration.
735 (arm_get_pc, arm_set_pc): Remove.
736 (the_low_target): Use linux_get_pc_32bit and
737 linux_set_pc_32bit.
738 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
739 (the_low_target): Use linux_get_pc_32bit and
740 linux_set_pc_32bit.
741 * linux-cris-low.c (debug_threads): Remove declaration.
742 (cris_get_pc, cris_set_pc,): Remove.
743 (the_low_target): Use linux_get_pc_32bit and
744 linux_set_pc_32bit.
745 * linux-crisv32-low.c (debug_threads): Remove declaration.
746 (cris_get_pc, cris_set_pc): Remove.
747 (the_low_target): Use linux_get_pc_32bit and
748 linux_set_pc_32bit.
749 * linux-low.c: Include inttypes.h.
750 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
751 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
752 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
753 (the_low_target): Use linux_get_pc_32bit and
754 linux_set_pc_32bit.
755 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
756 (the_low_target): Use linux_get_pc_32bit and
757 linux_set_pc_32bit.
758 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
759 (the_low_target): Use linux_get_pc_32bit and
760 linux_set_pc_32bit.
761 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
762 (the_low_target): Use linux_get_pc_32bit and
763 linux_set_pc_32bit.
764 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
765 (the_low_target): Use linux_get_pc_32bit and
766 linux_set_pc_32bit.
767
eb0edac8
GB
7682016-01-18 Gary Benson <gbenson@redhat.com>
769
770 * configure.ac (AC_FUNC_FORK): New check.
771 * config.in: Regenerate.
772 * configure: Likewise.
773
1b451dda
YQ
7742016-01-14 Yao Qi <yao.qi@linaro.org>
775
776 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
777 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
778 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
779 arm_get_next_pcs_ctor.
780
82075af2
JS
7812016-01-12 Josh Stone <jistone@redhat.com>
782 Philippe Waroquiers <philippe.waroquiers@skynet.be>
783
784 * inferiors.h: Include "gdb_vecs.h".
785 (struct process_info): Add syscalls_to_catch.
786 * inferiors.c (remove_process): Free syscalls_to_catch.
787 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
788 syscall_return stops.
789 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
790 * server.c (handle_general_set): Handle QCatchSyscalls.
791 (handle_query): Report support for QCatchSyscalls.
792 * target.h (struct target_ops): Add supports_catch_syscall.
793 (target_supports_catch_syscall): New macro.
794 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
795 (struct lwp_info): Add syscall_state.
796 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
797 Maintain syscall_state and syscalls_to_catch across exec.
798 (get_syscall_trapinfo): New function, proxy to the_low_target.
799 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
800 (linux_low_filter_event): Toggle syscall_state entry/return for
801 syscall traps, and set it ignored for all others.
802 (gdb_catching_syscalls_p): New function.
803 (gdb_catch_this_syscall_p): New function.
804 (linux_wait_1): Handle SYSCALL_SIGTRAP.
805 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
806 (linux_supports_catch_syscall): New function.
807 (linux_target_ops): Install it.
808 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
809 (the_low_target): Install it.
810
8f13a3ce
MF
8112016-01-12 Mike Frysinger <vapier@gentoo.org>
812
813 * acinclude.m4: Include new ../warning.m4 file.
814 * configure: Regenerated.
815 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
816
5b3da067
MF
8172016-01-12 Mike Frysinger <vapier@gentoo.org>
818
819 * ax.c (is_goto_target): Mark static.
820 * linux-low.c (register_addr): Likewise.
821 (linux_fetch_registers, linux_store_registers): Likewise.
822 * mem-break.c (any_persistent_commands): Fix old prototype.
823 (add_commands_to_breakpoint): Mark static.
824 * regcache.c (find_register_by_name): Delete unused func.
825 * remote-utils.c (hex_or_minus_one): Mark static.
826 * server.c (monitor_show_help): Mark static.
827 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
828 handle_v_requests): Likewise.
829
bc504a31
PA
8302016-01-12 Pedro Alves <palves@redhat.com>
831
832 Remove use of the registered trademark symbol throughout.
833
5a0dd67a
YQ
8342016-01-08 Yao Qi <yao.qi@linaro.org>
835
836 * remote-utils.c (getpkt): If c is '\003', call target hook
837 request_interrupt.
838
b2ca446f
YQ
8392016-01-06 Yao Qi <yao.qi@linaro.org>
840
841 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
842 linux-aarch32-low.c.
843 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
844 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
845 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
846 (thumb2_breakpoint): Declare.
847 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
848 linux-aarch32-low.h.
849 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
850 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
851 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
852
edd88788
JB
8532016-01-01 Joel Brobecker <brobecker@adacore.com>
854
855 * gdbreplay.c (gdbreplay_version): Change copyright year in
856 version message.
857 * server.c (gdbserver_version): Likewise.
858
65da7f14
PP
8592015-12-28 Patrick Palka <patrick@parcs.ath.cx>
860
861 * server.c (crc32_table): Delete.
862 (crc32): Use libiberty's xcrc32 function.
863
4abd5ed2
JB
8642015-12-22 Joel Brobecker <brobecker@adacore.com>
865
866 * lynx-low.c (lynx_delete_thread_callback): New function.
867 (lynx_mourn): Properly delete our process and all of its
868 threads. Remove call to clear_inferiors.
869
0e50fe5c
JB
8702015-12-22 Joel Brobecker <brobecker@adacore.com>
871
872 * target.c (thread_search_callback): Add check that
873 the thread_stopped target callback is not NULL before
874 calling it.
875
35adc03f
YQ
8762015-12-21 Yao Qi <yao.qi@linaro.org>
877
878 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
879 arm breakpoint.
880
bd2b2909
AT
8812015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
882
883 * server.c (handle_query): Call target_supports_software_single_step.
884
7fe5e27e
AT
8852015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
886
887 * linux-low.c (single_step): New function.
888 (linux_resume_one_lwp_throw): Call single_step.
889 (start_step_over): Likewise.
890
d9311bfa
AT
8912015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
892
893 * Makefile.in (SFILES): Append arch/arm-linux.c,
894 arch/arm-get-next-pcs.c.
895 (arm-linux.o): New rule.
896 (arm-get-next-pcs.o): New rule.
897 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
898 arm-linux.o.
899 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
900 to linux-aarch32-low.c.
901 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
902 (arm_breakpoint_len, thumb_breakpoint): Likewise.
903 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
904 (thumb2_breakpoint_len): Likewise.
905 (arm_is_thumb_mode): Make non-static.
906 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
907 from linux-aarch32-low.c.
908 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
909 (arm_breakpoint_len, thumb_breakpoint): Likewise.
910 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
911 (thumb2_breakpoint_len): Likewise.
912 (arm_is_thumb_mode): New declaration.
913 * linux-arm-low.c: Include arch/arm-linux.h
914 aarch/arm-get-next-pcs.h, sys/syscall.h.
915 (get_next_pcs_ops): New struct.
916 (get_next_pcs_addr_bits_remove): New function.
917 (get_next_pcs_is_thumb): New function.
918 (get_next_pcs_read_memory_unsigned_integer): Likewise.
919 (arm_sigreturn_next_pc): Likewise.
920 (get_next_pcs_syscall_next_pc): Likewise.
921 (arm_gdbserver_get_next_pcs): Likewise.
922 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
923 Initialize.
924 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
925 * server.h: Include gdb_vecs.h.
926
68ce2059
AT
9272015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
928
929 * Makefile.in (SFILES): Append common/common-regcache.c.
930 (OBS): Append common-regcache.o.
931 (common-regcache.o): New rule.
932 * regcache.c (init_register_cache): Initialize cache to
933 REG_UNAVAILABLE.
934 (regcache_raw_read_unsigned): New function.
935 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
936 register_status enum.
937
fa5308bd
AT
9382015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
939
940 * linux-aarch64-low.c (the_low_targets): Rename
941 breakpoint_reinsert_addr to get_next_pcs.
942 * linux-arm-low.c (the_low_targets): Likewise.
943 * linux-bfin-low.c (the_low_targets): Likewise.
944 * linux-cris-low.c (the_low_targets): Likewise.
945 * linux-crisv32-low.c (the_low_targets): Likewise.
946 * linux-low.c (can_software_single_step): Likewise.
947 (install_software_single_step_breakpoints): New function.
948 (start_step_over): Use install_software_single_step_breakpoints.
949 * linux-low.h: New CORE_ADDR vector.
950 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
951 get_next_pcs.
952 * linux-mips-low.c (the_low_targets): Likewise.
953 * linux-nios2-low.c (the_low_targets): Likewise.
954 * linux-sparc-low.c (the_low_targets): Likewise.
955
4a6ed09b
PA
9562015-12-17 Pedro Alves <palves@redhat.com>
957
958 * linux-low.c (linux_kill_one_lwp): Remove references to
959 LinuxThreads.
960 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
961 to 'kill'.
962 (linux_init_signals): Delete.
963 (initialize_low): Adjust.
964 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
965
7544db95
PA
9662015-12-16 Pedro Alves <palves@redhat.com>
967
968 * configure.ac (compiler warning flags): When testing a
969 -Wno-foo option, check whether -Wfoo works instead.
970 * configure: Regenerate.
971
8020350c
DB
9722015-12-11 Don Breazeal <donb@codesourcery.com>
973
974 * server.c (process_serial_event): Don't exit from gdbserver
975 in remote mode if there are still active inferiors.
976
db91f502
YQ
9772015-12-11 Yao Qi <yao.qi@linaro.org>
978
979 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
980 arm_breakpoint_at if the process is 32-bit.
981
b37a6290
YQ
9822015-12-11 Yao Qi <yao.qi@linaro.org>
983
984 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
985 arm breakpoint.
986
17b1509a
YQ
9872015-12-07 Yao Qi <yao.qi@linaro.org>
988
989 * configure.srv: Append arm.o to srv_tgtobj for
990 aarch64*-*-linux* target.
991 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
992 from linux-arm-low.c.
993 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
994 (arm_breakpoint_len, thumb_breakpoint): Likewise.
995 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
996 (thumb2_breakpoint_len): Likewise.
997 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
998 (arm_breakpoint_kinds): Likewise.
999 (arm_breakpoint_kind_from_pc): Likewise.
1000 (arm_sw_breakpoint_from_kind): Likewise.
1001 (arm_breakpoint_kind_from_current_state): Likewise.
1002 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1003 (arm_sw_breakpoint_from_kind): Declare.
1004 (arm_breakpoint_kind_from_current_state): Declare.
1005 (arm_breakpoint_at): Declare.
1006 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1007 arm_sw_breakpoint_from_kind if process is 32-bit.
1008 (aarch64_breakpoint_kind_from_pc): New function.
1009 (aarch64_breakpoint_kind_from_current_state): New function.
1010 (the_low_target): Initialize fields breakpoint_kind_from_pc
1011 and breakpoint_kind_from_current_state.
1012 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1013 linux-aarch32-low.c.
1014 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1015 (arm_breakpoint, arm_breakpoint_len): Likewise.
1016 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1017 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1018 (arm_is_thumb_mode): Likewise.
1019 (arm_breakpoint_at): Likewise.
1020 (arm_breakpoint_kind_from_pc): Likewise.
1021 (arm_sw_breakpoint_from_kind): Likewise.
1022 (arm_breakpoint_kind_from_current_state): Likewise.
1023
1024 Revert:
1025 2015-08-04 Yao Qi <yao.qi@linaro.org>
1026
1027 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1028 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1029 * server.c (extended_protocol): Remove "static".
1030 * server.h (extended_protocol): Declare it.
1031
ece66d65
JS
10322015-12-04 Josh Stone <jistone@redhat.com>
1033
1034 * target.h (struct target_ops) <arch_setup>: Rename to ...
1035 (struct target_ops) <post_create_inferior>: ... this.
1036 (target_arch_setup): Rename to ...
1037 (target_post_create_inferior): ... this, calling post_create_inferior.
1038 * server.c (start_inferior): Update target_arch_setup calls to
1039 target_post_create_inferior.
1040 * linux-low.c (linux_low_ptrace_options): Forward declare.
1041 (linux_arch_setup): Update its comment for general use.
1042 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1043 (struct linux_target_ops): Use linux_post_create_inferior.
1044 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1045 to post_create_inferior.
1046 * nto-low.c (struct nto_target_ops): Likewise.
1047 * spu-low.c (struct spu_target_ops): Likewise.
1048 * win32-low.c (struct win32_target_ops): Likewise.
1049
e58c48b4
AT
10502015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1051
1052 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1053
fbec8956
AT
10542015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1055
1056 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1057 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1058 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1059 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1060 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1061 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1062 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1063 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1064 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1065 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1066 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1067 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1068
9b4c5f87
AT
10692015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1070
1071 * linux-low.c (linux_look_up_symbols): Don't call
1072 linux_supports_traceclone.
1073 * linux-low.h (thread_db_init): Remove use_events argument.
1074 * thread-db.c (thread_db_use_event): Remove global variable.
1075 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1076 (struct thread_db) <td_create_bp>: Remove field.
1077 (thread_db_create_event): Remove function.
1078 (thread_db_enable_reporting): Likewise.
1079 (find_one_thread): Don't check for thread_db_use_events.
1080 (attach_thread): Likewise.
1081 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1082 (try_thread_db_load_1): Don't check for thread_db_use_events.
1083 (thread_db_init): Remove use_events argument and thread events
1084 handling.
1085 (remove_thread_event_breakpoints): Remove function.
1086 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1087
7d00775e
AT
10882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1089
1090 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1091 New function.
1092 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1093 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1094 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1095 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1096 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1097 Initialize.
1098 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1099 New function.
1100 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1101 * linux-low.c (can_hardware_single_step): Use
1102 supports_hardware_single_step.
1103 (can_software_single_step): New function.
1104 (start_step_over): Call can_software_single_step.
1105 (linux_supports_hardware_single_step): New function.
1106 (struct target_ops) <supports_software_single_step>: Initialize.
1107 * linux-low.h (struct linux_target_ops)
1108 <supports_hardware_single_step>: Initialize.
1109 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1110 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1111 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1112 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1113 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1114 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1115 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1116 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1117 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1118 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1119 Initialize.
1120 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1121 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1122 Initialize.
1123 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1124 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1125 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1126 New function.
1127 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1128 * target.h (struct target_ops): <supports_software_single_step>:
1129 New field.
1130 (target_supports_software_single_step): New macro.
1131
2d97cd35
AT
11322015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1133
1134 * linux-low.c (linux_wait_1): Fix pc advance condition.
1135 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1136 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1137
769ef81f
AT
11382015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1139
1140 * linux-arm-low.c (arm_is_thumb_mode): New function.
1141 (arm_breakpoint_at): Use arm_is_thumb_mode.
1142 (arm_breakpoint_kind_from_current_state): New function.
1143 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1144 Initialize.
1145 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1146 (linux_breakpoint_kind_from_current_state): New function.
1147 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1148 * linux-low.h (struct linux_target_ops)
1149 <breakpoint_kind_from_current_state>: New field.
1150 * target.h (struct target_ops): Likewise.
1151 (target_breakpoint_kind_from_current_state): New macro.
1152
1bebeeca
PA
11532015-11-30 Pedro Alves <palves@redhat.com>
1154
1155 * linux-low.c (linux_resume): Wake up the event loop before
1156 returning.
1157
a67a9fae
PA
11582015-11-30 Pedro Alves <palves@redhat.com>
1159
1160 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1161 check.
1162 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1163 to -1.
1164 * target.c (struct thread_search): New structure.
1165 (thread_search_callback): New function.
1166 (prev_general_thread): New global.
1167 (prepare_to_access_memory, done_accessing_memory): New functions.
1168 * target.h (prepare_to_access_memory, done_accessing_memory):
1169 Replace macros with function declarations.
1170
f2faf941
PA
11712015-11-30 Pedro Alves <palves@redhat.com>
1172
1173 PR 14618
1174 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1175 report TARGET_WAITKIND_NO_RESUMED.
1176 * remote-utils.c (prepare_resume_reply): Handle
1177 TARGET_WAITKIND_NO_RESUMED.
1178 * server.c (report_no_resumed): New global.
1179 (handle_query) <qSupported>: Handle "no-resumed+". Report
1180 "no-resumed+" support.
1181 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1182 return error if the client doesn't support no-resumed events.
1183 (push_stop_notification): New function.
1184 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1185 events if the client supports them.
1186
a681f9c9
PA
11872015-11-30 Pedro Alves <palves@redhat.com>
1188
1189 * linux-low.c (thread_still_has_status_pending_p): Don't check
1190 vCont;t here.
1191 (lwp_resumed): New function.
1192 (status_pending_p_callback): Return early if the LWP is not
1193 supposed to be resumed.
1194
65706a29
PA
11952015-11-30 Pedro Alves <palves@redhat.com>
1196
1197 * linux-low.c (handle_extended_wait): Assert that the LWP's
1198 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1199 thread create events, leave the new child's status pending.
1200 (linux_low_filter_event): If GDB wants to hear about thread exit
1201 events, leave the LWP marked dead and don't delete it.
1202 (linux_wait_for_event_filtered): Don't check for thread exit.
1203 (filter_exit_event): New function.
1204 (linux_wait_1): Use it, when returning an exit event.
1205 (linux_resume_one_lwp_throw): Assert that the LWP's
1206 waitstatus is TARGET_WAITKIND_IGNORE.
1207 * remote-utils.c (prepare_resume_reply): Handle
1208 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1209 * server.c (report_thread_events): New global.
1210 (handle_general_set): Handle QThreadEvents.
1211 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1212 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1213 TARGET_WAITKIND_THREAD_EXITED.
1214 * server.h (report_thread_events): Declare.
1215
56cf4bed
PA
12162015-11-30 Pedro Alves <palves@redhat.com>
1217
1218 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1219 the thread's last_resume_kind was resume_stop.
1220
500c1d85
PA
12212015-11-30 Pedro Alves <palves@redhat.com>
1222
1223 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1224 before returning.
1225
de979965
PA
12262015-11-30 Pedro Alves <palves@redhat.com>
1227
1228 * server.c (handle_v_requests): Handle vCtrlC.
1229
34c65914
PA
12302015-11-30 Pedro Alves <palves@redhat.com>
1231
1232 * gdbthread.h (find_any_thread_of_pid): Declare.
1233 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1234 functions.
1235 * server.c (handle_query): If current_thread is NULL, look for
1236 another thread of the selected process.
1237
79efa585 12382015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1239 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1240
1241 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1242 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1243 name in reply.
1244 * target.h (struct target_ops) <thread_name>: New field.
1245 (target_thread_name): New macro.
1246
80d82c19
JB
12472015-11-23 Joel Brobecker <brobecker@adacore.com>
1248
1249 * regcache.h (regcache_invalidate_pid): Add declaration.
1250 * regcache.c (regcache_invalidate_pid): New function, extracted
1251 from regcache_invalidate.
1252 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1253 Add trivial documentation comment.
1254 * lynx-low.c: Use regcache_invalidate_pid instead of
1255 regcache_invalidate.
1256
64da5dd5
JB
12572015-11-23 Joel Brobecker <brobecker@adacore.com>
1258
1259 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1260 and Elf64_auxv_t if the target is Android.
1261
37ce4055
DE
12622015-11-22 Doug Evans <xdje42@gmail.com>
1263
1264 * target.h: #include <sys/types.h>.
1265
06e03fff
PA
12662015-11-19 Pedro Alves <palves@redhat.com>
1267
1268 * linux-low.c (linux_process_qsupported): Change prototype.
1269 Adjust.
1270 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1271 Change prototype.
1272 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1273 and adjust to loop over all features.
1274 * server.c (handle_query) <qSupported>: Adjust to call
1275 target_process_qsupported once, passing it a vector of unprocessed
1276 features.
1277 * target.h (struct target_ops) <process_qsupported>: Change
1278 prototype.
1279 (target_process_qsupported): Adjust.
1280
9a084706
PA
12812015-11-19 Pedro Alves <palves@redhat.com>
1282
1283 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1284 mode.
1285 * configure: Regenerate.
1286
dad44a1f
PA
12872015-11-19 Pedro Alves <palves@redhat.com>
1288
1289 * configure: Regenerate.
1290
231c0592
YQ
12912015-11-19 Yao Qi <yao.qi@linaro.org>
1292
1293 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1294 type to uint32_t.
1295
6c1c9a8b
YQ
12962015-11-19 Yao Qi <yao.qi@linaro.org>
1297
1298 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1299 (struct aarch64_operand): Move enum out.
1300
9caa3311
YQ
13012015-11-19 Yao Qi <yao.qi@linaro.org>
1302
1303 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1304 struct user_fpsimd_state *.
1305 (aarch64_store_fpregset): Likewise.
1306
6a69a054
YQ
13072015-11-19 Yao Qi <yao.qi@linaro.org>
1308
1309 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1310 struct user_pt_regs *.
1311 (aarch64_store_gregset): Likewise.
1312
1798301e
PA
13132015-11-18 Pedro Alves <palves@redhat.com>
1314
1315 * Makefile.in (all_object_files): Add $IPA_OBJS.
1316
ce7715e2
PA
13172015-11-17 Pedro Alves <palves@redhat.com>
1318
1319 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1320 GDB_SIGNAL_0 and gdb_signal_to_string.
1321
c0879059
PA
13222015-11-17 Pedro Alves <palves@redhat.com>
1323
1324 * win32-low.c (handle_output_debug_string): Remove parameter.
1325 (win32_kill): Remove our_status local and adjust call to
1326 handle_output_debug_string.
1327 (get_child_debug_event): Adjust call to
1328 handle_output_debug_string.
1329
1996e237
SM
13302015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1331
1332 * linux-mips-low.c (mips_fill_gregset): Add cast.
1333 (mips_store_gregset): Likewise.
1334 (mips_fill_fpregset): Likewise.
1335 (mips_store_fpregset): Likewise.
1336
cbec665b
SM
13372015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1338
1339 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1340 priv.
1341
eb3e3c67
SM
13422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1343
1344 * linux-mips-low.c (mips_linux_new_thread): Change type of
1345 watch_type to enum target_hw_bp_type.
1346
171de4b8
SM
13472015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1348
1349 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1350 Change return type to arm_hwbp_type.
1351
04248ead
SM
13522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1353
1354 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1355 (arm_store_gregset): Likewise.
1356 * linux-arm-low.c (arm_get_hwcap): Likewise.
1357 (arm_read_description): Likewise.
1358
04b3479c
SM
13592015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1360
1361 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1362
2bc84e8a
SM
13632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1364
1365 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1366 (ppc_fill_vsxregset): Likewise.
1367 (ppc_store_vsxregset): Likewise.
1368 (ppc_fill_vrregset): Likewise.
1369 (ppc_store_vrregset): Likewise.
1370 (ppc_fill_evrregset): Likewise.
1371 (ppc_store_evrregset): Likewise.
1372
e6c5bb05
SM
13732015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1374
1375 * linux-ppc-low.c (ppc_usrregs_info): Remove
1376 forward-declaration.
1377 (ppc_arch_setup): Move lower in file.
1378
7ea45d72
SM
13792015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1380
1381 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1382 (ps_pdwrite): Likewise.
1383
69291610
HW
13842015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1385
1386 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1387 to after assert checks.
1388
b42945fd
SM
13892015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1390
1391 * proc-service.c (ps_pdread): Add/adjust casts.
1392 (ps_pdwrite): Add/adjust casts.
1393
d6f85c84
SM
13942015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1395
1396 * server.c (handle_search_memory_1): Cast return value of
1397 memmem.
1398
f98cd059
SM
13992015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1400
1401 * server.c (write_qxfer_response): Change type of data to
1402 gdb_byte *.
1403
d2412fa5
PA
14042015-10-29 Pedro Alves <palves@redhat.com>
1405
1406 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1407
c17414a2
PA
14082015-10-29 Pedro Alves <palves@redhat.com>
1409
1410 * tracepoint.c (clear_installed_tracepoints): Add casts.
1411
e053fbc4
PA
14122015-10-29 Pedro Alves <palves@redhat.com>
1413
1414 * server.c (handle_v_cont, process_serial_event): Add enum
1415 gdb_signal casts to signal parsing code.
1416
add67df8
PA
14172015-10-29 Pedro Alves <palves@redhat.com>
1418
1419 * linux-low.h (NULL_REGSET): Define.
1420 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1421 * linux-arm-low.c (arm_regsets): Likewise.
1422 * linux-crisv32-low.c (cris_regsets): Likewise.
1423 * linux-m68k-low.c (m68k_regsets): Likewise.
1424 * linux-mips-low.c (mips_regsets): Likewise.
1425 * linux-nios2-low.c (nios2_regsets): Likewise.
1426 * linux-ppc-low.c (ppc_regsets): Likewise.
1427 * linux-s390-low.c (s390_regsets): Likewise.
1428 * linux-sh-low.c (sh_regsets): Likewise.
1429 * linux-sparc-low.c (sparc_regsets): Likewise.
1430 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1431 * linux-tile-low.c (tile_regsets): Likewise.
1432 * linux-x86-low.c (x86_regsets): Likewise.
1433 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1434
50bc912a
PA
14352015-10-29 Pedro Alves <palves@redhat.com>
1436
1437 * linux-low.h (NULL_REGSET): Define.
1438 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1439 * linux-arm-low.c (arm_regsets): Likewise.
1440 * linux-crisv32-low.c (cris_regsets): Likewise.
1441 * linux-m68k-low.c (m68k_regsets): Likewise.
1442 * linux-mips-low.c (mips_regsets): Likewise.
1443 * linux-nios2-low.c (nios2_regsets): Likewise.
1444 * linux-ppc-low.c (ppc_regsets): Likewise.
1445 * linux-s390-low.c (s390_regsets): Likewise.
1446 * linux-sh-low.c (sh_regsets): Likewise.
1447 * linux-sparc-low.c (sparc_regsets): Likewise.
1448 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1449 * linux-tile-low.c (tile_regsets): Likewise.
1450 * linux-x86-low.c (x86_regsets): Likewise.
1451 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1452
682b2546
DE
14532015-10-26 Doug Evans <dje@google.com>
1454
1455 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1456
963843d4
DE
14572015-10-26 Doug Evans <dje@google.com>
1458
1459 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1460
d41401ac
DE
14612015-10-26 Doug Evans <dje@google.com>
1462
1463 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1464 for debug_printf.
1465 (attach_thread, find_new_threads_callback): Ditto.
1466
3db28855
AT
14672015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1468
1469 * mem-break.h (set_breakpoint_data): Remove.
1470
fb78e89c
AT
14712015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1472
1473 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1474 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1475 (initialize_low): Remove set_breakpoint_data call.
1476 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1477 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1478 (initialize_low): Remove set_breakpoint_data call.
1479 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1480 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1481 (initialize_low): Remove set_breakpoint_data call.
1482
2e6ee069
AT
14832015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1484
1485 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1486 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1487 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1488 * target.h (target_breakpoint_kind_from_pc): New macro.
1489
1652a986
AT
14902015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1491
1492 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1493 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1494 the default breakpoint kind.
1495
abeead09
AT
14962015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1497
1498 * linux-arm-low.c (arm_supports_z_point_type): Add software
1499 breakpoint support.
1500
b0b4b501
AT
15012015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1502
1503 * linux-arm-low.c: Refactor breakpoint definitions.
1504 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1505 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1506
8689682c
AT
15072015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1508
1509 * Makefile.in: Add arm.c/o.
1510 * configure.srv: Likewise.
1511 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1512 (arm_breakpoint_kind_from_pc): New function.
1513 (arm_sw_breakpoint_from_kind): Return proper kind.
1514 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1515
27165294
AT
15162015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1517
1518 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1519 removal.
1520 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1521 (struct raw_breakpoint) <size>: Remove.
1522 (struct raw_breakpoint) <kind>: Add.
1523 (bp_size): New function.
1524 (bp_opcode): Likewise.
1525 (find_raw_breakpoint_at): Adjust for kind.
1526 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1527 (remove_memory_breakpoint): Adjust for kind call bp_size.
1528 (set_raw_breakpoint_at): Adjust for kind.
1529 (set_breakpoint): Likewise.
1530 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1531 (delete_raw_breakpoint): Adjust for kind.
1532 (delete_breakpoint): Likewise.
1533 (find_gdb_breakpoint): Likewise.
1534 (set_gdb_breakpoint_1): Likewise.
1535 (set_gdb_breakpoint): Likewise.
1536 (delete_gdb_breakpoint_1): Likewise.
1537 (delete_gdb_breakpoint): Likewise.
1538 (uninsert_raw_breakpoint): Likewise.
1539 (reinsert_raw_breakpoint): Likewise.
1540 (set_breakpoint_data): Remove.
1541 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1542 (check_mem_read): Adjust for kind call bp_size.
1543 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1544 (clone_one_breakpoint): Adjust for kind.
1545 * mem-break.h (set_gdb_breakpoint): Likewise.
1546 (delete_gdb_breakpoint): Likewise.
1547 * server.c (process_serial_event): Likewise.
1548
dd373349
AT
15492015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1550
1551 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1552 (struct linux_target_ops) <breakpoint>: Remove.
1553 (struct linux_target_ops) <breakpoint_len>: Remove.
1554 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1555 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1556 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1557 (arm_sw_breakpoint_from_kind): New function.
1558 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1559 (struct linux_target_ops) <breakpoint>: Remove.
1560 (struct linux_target_ops) <breakpoint_len>: Remove.
1561 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1562 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1563 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1564 (struct linux_target_ops) <breakpoint>: Remove.
1565 (struct linux_target_ops) <breakpoint_len>: Remove.
1566 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1567 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1568 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1569 (struct linux_target_ops) <breakpoint>: Remove.
1570 (struct linux_target_ops) <breakpoint_len>: Remove.
1571 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1572 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1573 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1574 and sw_breakpoint_from_kind to increment the pc.
1575 (linux_breakpoint_kind_from_pc): New function.
1576 (linux_sw_breakpoint_from_kind): New function.
1577 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1578 (initialize_low): Call breakpoint_kind_from_pc and
1579 sw_breakpoint_from_kind to replace breakpoint_data/len.
1580 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1581 New field.
1582 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1583 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1584 (struct linux_target_ops) <breakpoint>: Remove.
1585 (struct linux_target_ops) <breakpoint_len>: Remove.
1586 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1587 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1588 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1589 (struct linux_target_ops) <breakpoint>: Remove.
1590 (struct linux_target_ops) <breakpoint_len>: Remove.
1591 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1592 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1593 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1594 (struct linux_target_ops) <breakpoint>: Remove.
1595 (struct linux_target_ops) <breakpoint_len>: Remove.
1596 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1597 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1598 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1599 (struct linux_target_ops) <breakpoint>: Remove.
1600 (struct linux_target_ops) <breakpoint_len>: Remove.
1601 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1602 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1603 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1604 (struct linux_target_ops) <breakpoint>: Remove.
1605 (struct linux_target_ops) <breakpoint_len>: Remove.
1606 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1607 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1608 * linux-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_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-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1624 (struct linux_target_ops) <breakpoint>: Remove.
1625 (struct linux_target_ops) <breakpoint_len>: Remove.
1626 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1627 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1628 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1629 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1630 (struct linux_target_ops) <breakpoint>: Remove.
1631 (struct linux_target_ops) <breakpoint_len>: Remove.
1632 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1633 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1634 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1635 (struct linux_target_ops) <breakpoint>: Remove.
1636 (struct linux_target_ops) <breakpoint_len>: Remove.
1637 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1638 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1639
4cd98a19
AT
16402015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1641
1642 * linux-cris-low.c (cris_get_pc): Remove void arg.
1643
774ee6d2
AR
16442015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1645
1646 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1647 variable name.
1648
833dcd29
AR
16492015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1650
1651 * inferiors.c (thread_pid_matches_callback): New function.
1652 (find_thread_process): New function.
1653 (remove_thread): Reset current_thread.
1654 (remove_process): Assert threads have been removed first.
1655
8d689ee5
YQ
16562015-10-15 Yao Qi <yao.qi@linaro.org>
1657
1658 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1659 if it is 3.
1660 (aarch64_remove_point): Likewise.
1661 * regcache.c (regcache_register_size): New function.
1662
1c2e1515
YQ
16632015-10-12 Yao Qi <yao.qi@linaro.org>
1664
1665 * linux-aarch64-low.c: Update all callers as emit_load_store
1666 is renamed to aarch64_emit_load_store.
1667
e1c587c3
YQ
16682015-10-12 Yao Qi <yao.qi@linaro.org>
1669
1670 * linux-aarch64-low.c: Update all callers of function renaming
1671 from emit_insn to aarch64_emit_insn.
1672
b6542f81
YQ
16732015-10-12 Yao Qi <yao.qi@linaro.org>
1674
1675 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1676 arch/aarch64-insn.h.
1677 (struct aarch64_memory_operand): Likewise.
1678 (ENCODE): Likewise.
1679 (emit_insn): Move to arch/aarch64-insn.c.
1680 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1681 (emit_load_store): Move to arch/aarch64-insn.c.
1682 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1683 (can_encode_int32): Remove.
1684
246994ce
YQ
16852015-10-12 Yao Qi <yao.qi@linaro.org>
1686
1687 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1688 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1689 (aarch64_relocate_instruction): Likewise.
1690 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1691 (struct aarch64_insn_visitor): Likewise.
1692
0badd99f
YQ
16932015-10-12 Yao Qi <yao.qi@linaro.org>
1694
1695 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1696 (struct aarch64_insn_visitor): New.
1697 (struct aarch64_insn_relocation_data): New.
1698 (aarch64_ftrace_insn_reloc_b): New function.
1699 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1700 (aarch64_ftrace_insn_reloc_cb): Likewise.
1701 (aarch64_ftrace_insn_reloc_tb): Likewise.
1702 (aarch64_ftrace_insn_reloc_adr): Likewise.
1703 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1704 (aarch64_ftrace_insn_reloc_others): Likewise.
1705 (visitor): New.
1706 (aarch64_relocate_instruction): Use visitor.
1707
dfaffe9d
YQ
17082015-10-12 Yao Qi <yao.qi@linaro.org>
1709
1710 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1711 int. Add argument buf.
1712 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1713 aarch64_relocate_instruction.
1714
70b439f0
YQ
17152015-10-12 Yao Qi <yao.qi@linaro.org>
1716
1717 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1718 argument insn. Remove local variable insn. Don't call
1719 target_read_uint32.
1720 (aarch64_install_fast_tracepoint_jump_pad): Call
1721 target_read_uint32.
1722
7781c06f
YQ
17232015-09-30 Yao Qi <yao.qi@linaro.org>
1724
1725 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1726 (emit_load_store_pair): Likewise.
1727
9a3c8263
SM
17282015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1729
1730 * dll.c (match_dll): Add cast(s).
1731 (unloaded_dll): Likewise.
1732 * linux-low.c (second_thread_of_pid_p): Likewise.
1733 (delete_lwp_callback): Likewise.
1734 (count_events_callback): Likewise.
1735 (select_event_lwp_callback): Likewise.
1736 (linux_set_resume_request): Likewise.
1737 * server.c (accumulate_file_name_length): Likewise.
1738 (emit_dll_description): Likewise.
1739 (handle_qxfer_threads_worker): Likewise.
1740 (visit_actioned_threads): Likewise.
1741 * thread-db.c (any_thread_of): Likewise.
1742 * tracepoint.c (same_process_p): Likewise.
1743 (match_blocktype): Likewise.
1744 (build_traceframe_info_xml): Likewise.
1745
224c3ddb
SM
17462015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1747
1748 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1749 assignment.
1750 (gdb_unparse_agent_expr): Likewise.
1751 * hostio.c (require_data): Likewise.
1752 (handle_pread): Likewise.
1753 * linux-low.c (disable_regset): Likewise.
1754 (fetch_register): Likewise.
1755 (store_register): Likewise.
1756 (get_dynamic): Likewise.
1757 (linux_qxfer_libraries_svr4): Likewise.
1758 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1759 (set_fast_tracepoint_jump): Likewise.
1760 (uninsert_fast_tracepoint_jumps_at): Likewise.
1761 (reinsert_fast_tracepoint_jumps_at): Likewise.
1762 (validate_inserted_breakpoint): Likewise.
1763 (clone_agent_expr): Likewise.
1764 * regcache.c (init_register_cache): Likewise.
1765 * remote-utils.c (putpkt_binary_1): Likewise.
1766 (decode_M_packet): Likewise.
1767 (decode_X_packet): Likewise.
1768 (look_up_one_symbol): Likewise.
1769 (relocate_instruction): Likewise.
1770 (monitor_output): Likewise.
1771 * server.c (handle_search_memory): Likewise.
1772 (handle_qxfer_exec_file): Likewise.
1773 (handle_qxfer_libraries): Likewise.
1774 (handle_qxfer): Likewise.
1775 (handle_query): Likewise.
1776 (handle_v_cont): Likewise.
1777 (handle_v_run): Likewise.
1778 (captured_main): Likewise.
1779 * target.c (write_inferior_memory): Likewise.
1780 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1781 * tracepoint.c (init_trace_buffer): Likewise.
1782 (add_tracepoint_action): Likewise.
1783 (add_traceframe): Likewise.
1784 (add_traceframe_block): Likewise.
1785 (cmd_qtdpsrc): Likewise.
1786 (cmd_qtdv): Likewise.
1787 (cmd_qtstatus): Likewise.
1788 (response_source): Likewise.
1789 (response_tsv): Likewise.
1790 (cmd_qtnotes): Likewise.
1791 (gdb_collect): Likewise.
1792 (initialize_tracepoint): Likewise.
1793
afbe19f8
PL
17942015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1795
1796 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1797 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1798 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1799 <NOP>: New.
1800 (enum aarch64_condition_codes): New enum.
1801 (w0): New static global.
1802 (fp): Likewise.
1803 (lr): Likewise.
1804 (struct aarch64_memory_operand) <type>: New
1805 MEMORY_OPERAND_POSTINDEX type.
1806 (postindex_memory_operand): New helper function.
1807 (emit_ret): New function.
1808 (emit_load_store_pair): New function, factored out of emit_stp
1809 with support for MEMORY_OPERAND_POSTINDEX.
1810 (emit_stp): Rewrite using emit_load_store_pair.
1811 (emit_ldp): New function.
1812 (emit_load_store): Likewise.
1813 (emit_ldr): Mention post-index instruction in comment.
1814 (emit_ldrh): New function.
1815 (emit_ldrb): New function.
1816 (emit_ldrsw): Mention post-index instruction in comment.
1817 (emit_str): Likewise.
1818 (emit_subs): New function.
1819 (emit_cmp): Likewise.
1820 (emit_and): Likewise.
1821 (emit_orr): Likewise.
1822 (emit_orn): Likewise.
1823 (emit_eor): Likewise.
1824 (emit_mvn): Likewise.
1825 (emit_lslv): Likewise.
1826 (emit_lsrv): Likewise.
1827 (emit_asrv): Likewise.
1828 (emit_mul): Likewise.
1829 (emit_sbfm): Likewise.
1830 (emit_sbfx): Likewise.
1831 (emit_ubfm): Likewise.
1832 (emit_ubfx): Likewise.
1833 (emit_csinc): Likewise.
1834 (emit_cset): Likewise.
1835 (emit_nop): Likewise.
1836 (emit_ops_insns): New helper function.
1837 (emit_pop): Likewise.
1838 (emit_push): Likewise.
1839 (aarch64_emit_prologue): New function.
1840 (aarch64_emit_epilogue): Likewise.
1841 (aarch64_emit_add): Likewise.
1842 (aarch64_emit_sub): Likewise.
1843 (aarch64_emit_mul): Likewise.
1844 (aarch64_emit_lsh): Likewise.
1845 (aarch64_emit_rsh_signed): Likewise.
1846 (aarch64_emit_rsh_unsigned): Likewise.
1847 (aarch64_emit_ext): Likewise.
1848 (aarch64_emit_log_not): Likewise.
1849 (aarch64_emit_bit_and): Likewise.
1850 (aarch64_emit_bit_or): Likewise.
1851 (aarch64_emit_bit_xor): Likewise.
1852 (aarch64_emit_bit_not): Likewise.
1853 (aarch64_emit_equal): Likewise.
1854 (aarch64_emit_less_signed): Likewise.
1855 (aarch64_emit_less_unsigned): Likewise.
1856 (aarch64_emit_ref): Likewise.
1857 (aarch64_emit_if_goto): Likewise.
1858 (aarch64_emit_goto): Likewise.
1859 (aarch64_write_goto_address): Likewise.
1860 (aarch64_emit_const): Likewise.
1861 (aarch64_emit_call): Likewise.
1862 (aarch64_emit_reg): Likewise.
1863 (aarch64_emit_pop): Likewise.
1864 (aarch64_emit_stack_flush): Likewise.
1865 (aarch64_emit_zero_ext): Likewise.
1866 (aarch64_emit_swap): Likewise.
1867 (aarch64_emit_stack_adjust): Likewise.
1868 (aarch64_emit_int_call_1): Likewise.
1869 (aarch64_emit_void_call_2): Likewise.
1870 (aarch64_emit_eq_goto): Likewise.
1871 (aarch64_emit_ne_goto): Likewise.
1872 (aarch64_emit_lt_goto): Likewise.
1873 (aarch64_emit_le_goto): Likewise.
1874 (aarch64_emit_gt_goto): Likewise.
1875 (aarch64_emit_ge_got): Likewise.
1876 (aarch64_emit_ops_impl): New static global variable.
1877 (aarch64_emit_ops): New target function, return
1878 &aarch64_emit_ops_impl.
1879 (struct linux_target_ops): Install it.
1880
bb903df0
PL
18812015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1882
1883 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1884 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1885 aarch64-ipa.o.
1886 * linux-aarch64-ipa.c: New file.
1887 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1888 and endian.h.
1889 (aarch64_get_thread_area): New target method.
1890 (extract_signed_bitfield): New helper function.
1891 (aarch64_decode_ldr_literal): New function.
1892 (enum aarch64_opcodes): New enum.
1893 (struct aarch64_register): New struct.
1894 (struct aarch64_operand): New struct.
1895 (x0): New static global.
1896 (x1): Likewise.
1897 (x2): Likewise.
1898 (x3): Likewise.
1899 (x4): Likewise.
1900 (w2): Likewise.
1901 (ip0): Likewise.
1902 (sp): Likewise.
1903 (xzr): Likewise.
1904 (aarch64_register): New helper function.
1905 (register_operand): Likewise.
1906 (immediate_operand): Likewise.
1907 (struct aarch64_memory_operand): New struct.
1908 (offset_memory_operand): New helper function.
1909 (preindex_memory_operand): Likewise.
1910 (enum aarch64_system_control_registers): New enum.
1911 (ENCODE): New macro.
1912 (emit_insn): New helper function.
1913 (emit_b): New function.
1914 (emit_bcond): Likewise.
1915 (emit_cb): Likewise.
1916 (emit_tb): Likewise.
1917 (emit_blr): Likewise.
1918 (emit_stp): Likewise.
1919 (emit_ldp_q_offset): Likewise.
1920 (emit_stp_q_offset): Likewise.
1921 (emit_load_store): Likewise.
1922 (emit_ldr): Likewise.
1923 (emit_ldrsw): Likewise.
1924 (emit_str): Likewise.
1925 (emit_ldaxr): Likewise.
1926 (emit_stxr): Likewise.
1927 (emit_stlr): Likewise.
1928 (emit_data_processing_reg): Likewise.
1929 (emit_data_processing): Likewise.
1930 (emit_add): Likewise.
1931 (emit_sub): Likewise.
1932 (emit_mov): Likewise.
1933 (emit_movk): Likewise.
1934 (emit_mov_addr): Likewise.
1935 (emit_mrs): Likewise.
1936 (emit_msr): Likewise.
1937 (emit_sevl): Likewise.
1938 (emit_wfe): Likewise.
1939 (append_insns): Likewise.
1940 (can_encode_int32_in): New helper function.
1941 (aarch64_relocate_instruction): New function.
1942 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1943 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1944 (struct linux_target_ops): Install aarch64_get_thread_area,
1945 aarch64_install_fast_tracepoint_jump_pad and
1946 aarch64_get_min_fast_tracepoint_insn_len.
1947
787749ea
PL
19482015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1949
1950 * Makefile.in (aarch64-insn.o): New rule.
1951 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1952
9812b2e6
YQ
19532015-09-21 Yao Qi <yao.qi@linaro.org>
1954
1955 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1956
18fe412b
YQ
19572015-09-21 Yao Qi <yao.qi@linaro.org>
1958
1959 * tracepoint.c (max_jump_pad_size): Remove.
1960
a0cc84cd
YQ
19612015-09-18 Yao Qi <yao.qi@linaro.org>
1962
1963 * linux-aarch64-low.c: Don't include sys/uio.h.
1964 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1965
d78908cf
WW
19662015-09-16 Wei-cheng Wang <cole945@gmail.com>
1967
1968 * tracepoint.c (eval_result_type): Change prototype.
1969 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1970
d57e0d50
PA
19712015-09-15 Pedro Alves <palves@redhat.com>
1972
1973 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1974 Check whether to report exec events instead of checking whether
1975 multiprocess is enabled.
1976
5a676acc
PA
19772015-09-15 Pedro Alves <palves@redhat.com>
1978
1979 PR remote/18965
1980 * remote-utils.c (prepare_resume_reply): Merge
1981 TARGET_WAITKIND_VFORK_DONE switch case with the
1982 TARGET_WAITKIND_FORKED case.
1983
7c5d0fad
YQ
19842015-09-15 Yao Qi <yao.qi@linaro.org>
1985
1986 * server.c (handle_query): Check string comparison using
1987 "else if" instead of "if".
1988
750ce8d1
YQ
19892015-09-15 Yao Qi <yao.qi@linaro.org>
1990
1991 * server.c (vCont_supported): New global variable.
1992 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1993 matches. Append ";vContSupported+" to own_buf.
1994 (handle_v_requests): Append ";s;S" to own_buf if target supports
1995 hardware single step or vCont_supported is false.
1996 (capture_main): Set vCont_supported to zero.
1997
70b90b91
YQ
19982015-09-15 Yao Qi <yao.qi@linaro.org>
1999
2000 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2001 it to ...
2002 (linux_supports_hardware_single_step): ... New function.
2003 (linux_target_ops): Update.
2004 * lynx-low.c (lynx_target_ops): Set field
2005 supports_hardware_single_step to target_can_do_hardware_single_step.
2006 * nto-low.c (nto_target_ops): Likewise.
2007 * spu-low.c (spu_target_ops): Likewise.
2008 * win32-low.c (win32_target_ops): Likewise.
2009 * target.c (target_can_do_hardware_single_step): New function.
2010 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2011 Remove. <supports_hardware_single_step>: New field.
2012 (target_supports_conditional_breakpoints): Remove.
2013 (target_supports_hardware_single_step): New macro.
2014 (target_can_do_hardware_single_step): Declare.
2015 * server.c (handle_query): Use target_supports_hardware_single_step
2016 instead of target_supports_conditional_breakpoints.
2017
ade90bde
YQ
20182015-09-15 Yao Qi <yao.qi@linaro.org>
2019
2020 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2021 function.
2022 (struct linux_target_ops the_low_target): Install
2023 aarch64_linux_siginfo_fixup.
2024
94585166
DB
20252015-09-11 Don Breazeal <donb@codesourcery.com>
2026 Luis Machado <lgustavo@codesourcery.com>
2027
2028 * linux-low.c (linux_mourn): Static declaration.
2029 (linux_arch_setup): Move in front of
2030 handle_extended_wait.
2031 (linux_arch_setup_thread): New function.
2032 (handle_extended_wait): Handle exec events. Call
2033 linux_arch_setup_thread. Make event_lwp argument a
2034 pointer-to-a-pointer.
2035 (check_zombie_leaders): Do not check stopped threads.
2036 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2037 (linux_low_filter_event): Add lwp and thread for exec'ing
2038 non-leader thread if leader thread has been deleted.
2039 Refactor code into linux_arch_setup_thread and call it.
2040 Pass child lwp pointer by reference to handle_extended_wait.
2041 (linux_wait_for_event_filtered): Update comment.
2042 (linux_wait_1): Prevent clobbering exec event status.
2043 (linux_supports_exec_events): New function.
2044 (linux_target_ops) <supports_exec_events>: Initialize new member.
2045 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2046 new member.
2047 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2048 * server.c (report_exec_events): New global variable.
2049 (handle_query): Handle qSupported query for exec-events feature.
2050 (captured_main): Initialize report_exec_events.
2051 * server.h (report_exec_events): Declare new global variable.
2052 * target.h (struct target_ops) <supports_exec_events>: New
2053 member.
2054 (target_supports_exec_events): New macro.
2055 * win32-low.c (win32_target_ops) <supports_exec_events>:
2056 Initialize new member.
2057
0568462b
MM
20582015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2059
2060 * linux-low.c (linux_low_enable_btrace): Remove.
2061 (linux_target_ops): Replace linux_low_enable_btrace with
2062 linux_enable_btrace.
2063
39edd165
YQ
20642015-09-03 Yao Qi <yao.qi@linaro.org>
2065
2066 * linux-aarch64-low.c (aarch64_insert_point): Call
2067 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2068 returns true.
2069
1db33b5a
UW
20702015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2071
2072 * linux-low.c (check_stopped_by_breakpoint): Use
2073 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2074
ab290430
PA
20752015-08-27 Pedro Alves <palves@redhat.com>
2076
2077 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2078
8d749320
SM
20792015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2080
6711b7f8
SM
2081 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2082 the XNEW-family equivalent.
8d749320
SM
2083 (compile_bytecodes): Likewise.
2084 * dll.c (loaded_dll): Likewise.
2085 * event-loop.c (append_callback_event): Likewise.
2086 (create_file_handler): Likewise.
2087 (create_file_event): Likewise.
2088 * hostio.c (handle_open): Likewise.
2089 * inferiors.c (add_thread): Likewise.
2090 (add_process): Likewise.
2091 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2092 * linux-arm-low.c (arm_new_process): Likewise.
2093 (arm_new_thread): Likewise.
2094 * linux-low.c (add_to_pid_list): Likewise.
2095 (linux_add_process): Likewise.
2096 (handle_extended_wait): Likewise.
2097 (add_lwp): Likewise.
2098 (enqueue_one_deferred_signal): Likewise.
2099 (enqueue_pending_signal): Likewise.
2100 (linux_resume_one_lwp_throw): Likewise.
2101 (linux_resume_one_thread): Likewise.
2102 (linux_read_memory): Likewise.
2103 (linux_write_memory): Likewise.
2104 * linux-mips-low.c (mips_linux_new_process): Likewise.
2105 (mips_linux_new_thread): Likewise.
2106 (mips_add_watchpoint): Likewise.
2107 * linux-x86-low.c (initialize_low_arch): Likewise.
2108 * lynx-low.c (lynx_add_process): Likewise.
2109 * mem-break.c (set_raw_breakpoint_at): Likewise.
2110 (set_breakpoint): Likewise.
2111 (add_condition_to_breakpoint): Likewise.
2112 (add_commands_to_breakpoint): Likewise.
2113 (clone_agent_expr): Likewise.
2114 (clone_one_breakpoint): Likewise.
2115 * regcache.c (new_register_cache): Likewise.
2116 * remote-utils.c (look_up_one_symbol): Likewise.
2117 * server.c (queue_stop_reply): Likewise.
2118 (start_inferior): Likewise.
2119 (queue_stop_reply_callback): Likewise.
2120 (handle_target_event): Likewise.
2121 * spu-low.c (fetch_ppc_memory): Likewise.
2122 (store_ppc_memory): Likewise.
2123 * target.c (set_target_ops): Likewise.
2124 * thread-db.c (thread_db_load_search): Likewise.
2125 (try_thread_db_load_1): Likewise.
2126 * tracepoint.c (add_tracepoint): Likewise.
2127 (add_tracepoint_action): Likewise.
2128 (create_trace_state_variable): Likewise.
2129 (cmd_qtdpsrc): Likewise.
2130 (cmd_qtro): Likewise.
2131 (add_while_stepping_state): Likewise.
2132 * win32-low.c (child_add_thread): Likewise.
2133 (get_image_name): Likewise.
2134
ed8b7b42
YQ
21352015-08-25 Yao Qi <yao.qi@linaro.org>
2136
2137 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2138
db3cb7cb
YQ
21392015-08-25 Yao Qi <yao.qi@linaro.org>
2140
2141 * Makefile.in (aarch64-linux.o): New rule.
2142 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2143 srv_tgtobj.
2144 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2145 (aarch64_init_debug_reg_state): Make it extern.
2146 (aarch64_linux_prepare_to_resume): Remove.
2147
f6011a1c
YQ
21482015-08-25 Yao Qi <yao.qi@linaro.org>
2149
2150 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2151 lwp_arch_private_info and ptid_of_lwp.
2152
88e2cf7e
YQ
21532015-08-25 Yao Qi <yao.qi@linaro.org>
2154
2155 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2156 Find proc_info by find_process_pid. All callers updated.
2157
5e35436e
YQ
21582015-08-25 Yao Qi <yao.qi@linaro.org>
2159
2160 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2161 Remove.
2162 (debug_reg_change_callback): Remove.
2163 (aarch64_notify_debug_reg_change): Remove.
2164
4a8a7965
YQ
21652015-08-25 Yao Qi <yao.qi@linaro.org>
2166
2167 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2168 Call current_lwp_ptid.
2169
32a271ee
YQ
21702015-08-25 Yao Qi <yao.qi@linaro.org>
2171
2172 * linux-aarch64-low.c (debug_reg_change_callback): Use
2173 debug_printf.
2174
0d51c8d7
YQ
21752015-08-25 Yao Qi <yao.qi@linaro.org>
2176
2177 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2178
31a43dd5
YQ
21792015-08-25 Yao Qi <yao.qi@linaro.org>
2180
2181 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2182
8ee52567
YQ
21832015-08-25 Yao Qi <yao.qi@linaro.org>
2184
2185 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2186 the code.
2187
ff3f0f45
YQ
21882015-08-25 Yao Qi <yao.qi@linaro.org>
2189
2190 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2191 Remove.
2192 (debug_reg_change_callback): Remove argument entry and add argument
2193 lwp. Remove local variable thread. Don't print thread id in the
2194 debugging output. Don't check whether pid of thread equals to pid.
2195 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2196 iterate_over_lwps instead find_inferior.
2197
3d40fbb5
PA
21982015-08-24 Pedro Alves <palves@redhat.com>
2199
2200 * inferiors.c (get_first_process): New function.
2201 * inferiors.h (get_first_process): New declaration.
2202 * remote-utils.c (read_ptid): Default to the first process in the
2203 list, instead of to the current thread's process.
2204
438e1e42
PA
22052015-08-24 Pedro Alves <palves@redhat.com>
2206
2207 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2208 * event-loop.c: Likewise.
2209 * remote-utils.c: Likewise.
2210 * tracepoint.c: Likewise.
2211
a8c6d4fc
PA
22122015-08-24 Pedro Alves <palves@redhat.com>
2213
2214 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2215 ptid_get_lwp.
2216
99b0bb12
PA
22172015-08-21 Pedro Alves <palves@redhat.com>
2218
2219 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2220 instead of literal 1.
2221
f8904751
PA
22222015-08-21 Pedro Alves <palves@redhat.com>
2223
2224 * tdesc.c (default_description): Explicitly zero-initialize.
2225
465a859e
PA
22262015-08-21 Pedro Alves <palves@redhat.com>
2227
2228 PR gdb/18749
2229 * inferiors.c (remove_thread): Discard any pending stop reply for
2230 this thread.
2231 * server.c (remove_all_on_match_pid): Rename to ...
2232 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2233 instead of a pid.
2234 (discard_queued_stop_replies): Change parameter to a ptid. Now
2235 extern.
2236 (handle_v_kill, kill_inferior_callback, captured_main)
2237 (process_serial_event): Adjust.
2238 * server.h (discard_queued_stop_replies): Declare.
2239
f0db101d
PA
22402015-08-21 Pedro Alves <palves@redhat.com>
2241
2242 * linux-low.c (wait_for_sigstop): Always switch to no thread
2243 selected if the previously current thread dies.
2244 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2245 process instead of the current thread's.
2246 * remote-utils.c (input_interrupt): Don't check if there's no
2247 current thread.
2248 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2249 current thread to the general thread fails, error out.
2250 (handle_qxfer_auxv, handle_qxfer_libraries)
2251 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2252 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2253 (handle_query): Check if there's a thread selected instead of
2254 checking whether there's any thread in the thread list.
2255 (handle_qxfer_threads, handle_qxfer_btrace)
2256 (handle_qxfer_btrace_conf): Don't error out early if there's no
2257 thread in the thread list.
2258 (handle_v_cont, myresume): Don't set the current thread to the
2259 continue thread.
2260 (process_serial_event) <Hg handling>: Also set thread_id if the
2261 previous general thread is still alive.
2262 (process_serial_event) <g/G handling>: If setting the current
2263 thread to the general thread fails, error out.
2264 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2265 thread's lwp instead of the current thread's.
2266 * target.c (set_desired_thread): If the desired thread was not
2267 found, leave the current thread pointing to NULL. Return an int
2268 (boolean) indicating success.
2269 * target.h (set_desired_thread): Change return type to int.
2270
40045d91
MF
22712015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2272
2273 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2274 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2275 #includes.
2276 (ps_get_thread_area): New function.
2277
45face3b
GB
22782015-08-19 Gary Benson <gbenson@redhat.com>
2279
2280 * hostio.c (handle_pread): Do not attempt to read more data
2281 than hostio_reply_with_data can fit in a packet.
2282
16d5f642
JB
22832015-08-18 Joel Brobecker <brobecker@adacore.com>
2284
2285 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2286
a738da3a
MF
22872015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2288
2289 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2290
33ebda9d
PA
22912015-08-06 Pedro Alves <palves@redhat.com>
2292
2293 * tracepoint.c (expr_eval_result): Now an int.
2294
a44892be
PA
22952015-08-06 Pedro Alves <palves@redhat.com>
2296
2297 * gdbthread.h (struct regcache): Forward declare.
2298 (struct thread_info) <regcache_data>: Now a struct regcache
2299 pointer.
2300 * inferiors.c (inferior_regcache_data)
2301 (set_inferior_regcache_data): Now work with struct regcache
2302 pointers.
2303 * inferiors.h (struct regcache): Forward declare.
2304 (inferior_regcache_data, set_inferior_regcache_data): Now work
2305 with struct regcache pointers.
2306 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2307 (free_register_cache_thread): Remove struct regcache pointer
2308 casts.
2309
608a1e46
PA
23102015-08-06 Pedro Alves <palves@redhat.com>
2311
2312 * server.c (captured_main): On error, print the exception message
2313 to stderr, and if run_once is set, throw a quit.
2314
f0ce0d3a
PA
23152015-08-06 Pedro Alves <palves@redhat.com>
2316
2317 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2318 the current thread.
2319
bf47e248
PA
23202015-08-06 Pedro Alves <palves@redhat.com>
2321
2322 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2323 reading beyond the passed in buffer length.
2324
b6b9ffcc
PL
23252015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2326
2327 * tracepoint.c (symbol_list) <required>: Remove.
2328
863d01bd
PA
23292015-08-06 Pedro Alves <palves@redhat.com>
2330
2331 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2332 count if stopping and suspending threads.
2333 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2334 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2335 (linux_detach): Complete an ongoing step-over.
2336 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2337 throughout.
2338 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2339 (linux_wait_1): If passing a signal to the inferior after
2340 finishing a step-over, unsuspend and re-resume all lwps. If we
2341 see a single-step event but the thread should be continuing, don't
2342 pass the trap to gdb.
2343 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2344 internal_error instead of gdb_assert.
2345 (enqueue_pending_signal): New function.
2346 (check_ptrace_stopped_lwp_gone): Add debug output.
2347 (start_step_over): Use internal_error instead of gdb_assert.
2348 (complete_ongoing_step_over): New function.
2349 (linux_resume_one_thread): Don't resume a suspended thread.
2350 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2351 it stepping.
2352
00db26fa
PA
23532015-08-06 Pedro Alves <palves@redhat.com>
2354
2355 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2356 (linux_thread_alive): Use lwp_is_marked_dead.
2357 (extended_event_reported): Delete.
2358 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2359 instead of extended_event_reported.
2360 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2361 as well.
2362 (lwp_is_marked_dead): New function.
2363 (lwp_running): Use lwp_is_marked_dead.
2364 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2365 comment.
2366
ad071a30
PA
23672015-08-06 Pedro Alves <palves@redhat.com>
2368
2369 * linux-low.c (linux_wait_1): Move fork event output out of the
2370 !report_to_gdb check. Pass event_child->waitstatus to
2371 target_waitstatus_to_string instead of ourstatus.
2372
524b57e6
YQ
23732015-08-04 Yao Qi <yao.qi@linaro.org>
2374
2375 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2376 if current_thread is 32 bit.
2377
6085d6f6
YQ
23782015-08-04 Yao Qi <yao.qi@linaro.org>
2379
2380 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2381 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2382 * server.c (extended_protocol): Remove "static".
2383 * server.h (extended_protocol): Declare it.
2384
8a7e4587
YQ
23852015-08-04 Yao Qi <yao.qi@linaro.org>
2386
2387 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2388 both aarch64 and aarch32.
2389 (aarch64_set_pc): Likewise.
2390
3b53ae99
YQ
23912015-08-04 Yao Qi <yao.qi@linaro.org>
2392
2393 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2394 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2395 arm-with-neon.xml to srv_xmlfiles.
2396 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2397 (is_64bit_tdesc): New function.
2398 (aarch64_linux_read_description): New function.
2399 (aarch64_arch_setup): Call aarch64_linux_read_description.
2400 (regs_info): Rename to regs_info_aarch64.
2401 (aarch64_regs_info): Return right regs_info.
2402 (initialize_low_arch): Call initialize_low_arch_aarch32.
2403
bd9e6534
YQ
24042015-08-04 Yao Qi <yao.qi@linaro.org>
2405
2406 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2407 * linux-aarch32-low.c: New file.
2408 * linux-aarch32-low.h: New file.
2409 * linux-arm-low.c (arm_fill_gregset): Move it to
2410 linux-aarch32-low.c.
2411 (arm_store_gregset): Likewise.
2412 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2413 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2414 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2415 (regs_info): Rename to regs_info_arm.
2416 (arm_regs_info): Return regs_info_aarch32 if
2417 have_ptrace_getregset is 1 and target description is
2418 arm_with_neon or arm_with_vfpv3.
2419 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2420 Call initialize_low_arch_aarch32 instead.
2421
ded48a5e
YQ
24222015-08-04 Yao Qi <yao.qi@linaro.org>
2423
2424 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2425 * linux-low.c: ... here.
2426 * linux-low.h (have_ptrace_getregset): Declare it.
2427
96e9210f
PA
24282015-08-04 Pedro Alves <palves@redhat.com>
2429
2430 * thread-db.c (struct thread_db): Use new typedefs.
2431 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2432 CHK calls.
2433 (disable_thread_event_reporting): Cast result of dlsym to
2434 destination function pointer type.
2435 (thread_db_mourn): Use td_ta_delete_ftype.
2436
af60a1ef
SL
24372015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2438
2439 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2440 arch variant.
2441 (CDX_BREAKPOINT): Define for R2.
2442 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2443 (the_low_target): Add comments.
2444
e8b41681
YQ
24452015-07-30 Yao Qi <yao.qi@linaro.org>
2446
2447 * linux-arm-low.c (arm_hwcap): Remove it.
2448 (arm_read_description): New local variable arm_hwcap. Don't
2449 set arm_hwcap to zero.
2450
89abb039
YQ
24512015-07-30 Yao Qi <yao.qi@linaro.org>
2452
2453 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2454 Use regcache->tdesc instead.
2455 (arm_store_wmmxregset): Likewise.
2456 (arm_fill_vfpregset): Likewise.
2457 (arm_store_vfpregset): Likewise.
2458
deca266c
YQ
24592015-07-30 Yao Qi <yao.qi@linaro.org>
2460
2461 * linux-arm-low.c: Include arch/arm.h.
2462 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2463 (arm_store_gregset): Likewise.
2464
aa58a496
SM
24652015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2466
2467 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2468 ptrace's 4th parameter.
2469
50904b25
YQ
24702015-07-27 Yao Qi <yao.qi@linaro.org>
2471
2472 * configure.srv (case aarch64*-*-linux*): Don't set
2473 srv_linux_usrregs.
2474
5826e159
PA
24752015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2476
2477 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2478 sys/ptrace.h.
2479 * linux-arm-low.c: Likewise.
2480 * linux-cris-low.c: Likewise.
2481 * linux-crisv32-low.c: Likewise.
2482 * linux-low.c: Likewise.
2483 * linux-m68k-low.c: Likewise.
2484 * linux-mips-low.c: Likewise.
2485 * linux-nios2-low.c: Likewise.
2486 * linux-s390-low.c: Likewise.
2487 * linux-sparc-low.c: Likewise.
2488 * linux-tic6x-low.c: Likewise.
2489 * linux-tile-low.c: Likewise.
2490 * linux-x86-low.c: Likewise.
2491
54019719
PA
24922015-07-24 Pedro Alves <palves@redhat.com>
2493
2494 * config.in: Regenerate.
2495 * configure: Regenerate.
2496
eb7aa561
PA
24972015-07-24 Pedro Alves <palves@redhat.com>
2498
2499 * acinclude.m4: Include ../ptrace.m4.
2500 * configure.ac: Call GDB_AC_PTRACE.
2501 * config.in, configure: Regenerate.
2502
55d7b841
YQ
25032015-07-24 Yao Qi <yao.qi@linaro.org>
2504
2505 * linux-low.c (linux_create_inferior): Remove setting to
2506 proc->priv->new_inferior.
2507 (linux_attach): Likewise.
2508 (linux_low_filter_event): Likewise.
2509 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2510
c06cbd92
YQ
25112015-07-24 Yao Qi <yao.qi@linaro.org>
2512
2513 * linux-low.c (linux_arch_setup): New function.
2514 (linux_low_filter_event): If proc->tdesc is NULL and
2515 proc->attached is true, call the_low_target.arch_setup.
2516 Otherwise, keep status pending, and return.
2517 (linux_resume_one_lwp_throw): Don't call get_pc if
2518 thread->while_stepping isn't NULL. Don't call
2519 get_thread_regcache if proc->tdesc is NULL.
2520 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2521 (linux_target_ops): Install arch_setup.
2522 * server.c (start_inferior): Call the_target->arch_setup.
2523 * target.h (struct target_ops) <arch_setup>: New field.
2524 (target_arch_setup): New marco.
2525 * lynx-low.c (lynx_target_ops): Update.
2526 * nto-low.c (nto_target_ops): Update.
2527 * spu-low.c (spu_target_ops): Update.
2528 * win32-low.c (win32_target_ops): Update.
2529
5ae3ebba
YQ
25302015-07-24 Yao Qi <yao.qi@linaro.org>
2531
2532 * linux-low.c (linux_add_process): Don't set
2533 proc->priv->new_inferior.
2534 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2535 (linux_attach): Likewise.
2536
eb97750b
YQ
25372015-07-24 Yao Qi <yao.qi@linaro.org>
2538
2539 * server.c (start_inferior): Code refactor.
2540
51aee833
YQ
25412015-07-24 Yao Qi <yao.qi@linaro.org>
2542
2543 * server.c (process_serial_event): Set general_thread.
2544
af1b22f3
YQ
25452015-07-21 Yao Qi <yao.qi@linaro.org>
2546
2547 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2548 aarch64_linux_get_debug_reg_capacity.
2549
554717a3
YQ
25502015-07-17 Yao Qi <yao.qi@linaro.org>
2551
2552 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2553 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2554 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2555 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2556 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2557 (AARCH64_HWP_ALIGNMENT): Likewise.
2558 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2559 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2560 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2561 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2562 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2563 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2564 (struct aarch64_debug_reg_state): Likewise.
2565 (struct arch_lwp_info): Likewise.
2566 (aarch64_align_watchpoint): Likewise.
2567 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2568 (aarch64_watchpoint_length): Likewise.
2569 (aarch64_point_encode_ctrl_reg): Likewise
2570 (aarch64_point_is_aligned): Likewise.
2571 (aarch64_align_watchpoint): Likewise.
2572 (aarch64_linux_set_debug_regs):
2573 (aarch64_dr_state_insert_one_point): Likewise.
2574 (aarch64_dr_state_remove_one_point): Likewise.
2575 (aarch64_handle_breakpoint): Likewise.
2576 (aarch64_handle_aligned_watchpoint): Likewise.
2577 (aarch64_handle_unaligned_watchpoint): Likewise.
2578 (aarch64_handle_watchpoint): Likewise.
2579
c67ca4de
YQ
25802015-07-17 Yao Qi <yao.qi@linaro.org>
2581
2582 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2583 and don't aarch64_get_debug_reg_state. All callers update.
2584 (aarch64_handle_aligned_watchpoint): Likewise.
2585 (aarch64_handle_unaligned_watchpoint): Likewise.
2586 (aarch64_handle_watchpoint): Likewise.
2587 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2588 (aarch64_remove_point): Likewise.
2589
25abf979
YQ
25902015-07-17 Yao Qi <yao.qi@linaro.org>
2591
2592 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2593 debug_printf.
2594 (aarch64_handle_unaligned_watchpoint): Likewise.
2595
db1ff28b
JK
25962015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2597
2598 Revert the previous 3 commits:
2599 Move gdb_regex* to common/
2600 Move linux_find_memory_regions_full & co.
2601 gdbserver build-id attribute generator
2602
700ca40f
JK
26032015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2604 Jan Kratochvil <jan.kratochvil@redhat.com>
2605
2606 gdbserver build-id attribute generator.
2607 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2608 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2609 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2610 (find_phdr): New.
2611 (get_dynamic): Use find_pdhr to traverse program headers.
2612 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2613 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2614 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2615 (get_hex_build_id): New.
2616 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2617 to reply XML document.
2618
9904185c
JK
26192015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2620 Jan Kratochvil <jan.kratochvil@redhat.com>
2621
2622 * target.c: Include target/target-utils.h and fcntl.h.
2623 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2624 (target_fileio_read_stralloc): New functions.
2625
6e5b4429
JK
26262015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2627
2628 * Makefile.in (OBS): Add gdb_regex.o.
2629 (gdb_regex.o): New.
2630 * config.in: Rebuilt.
2631 * configure: Rebuilt.
2632
ddc98fbf
JK
26332015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2634 Jan Kratochvil <jan.kratochvil@redhat.com>
2635
2636 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2637 * Makefile.in (OBS): Add target-utils.o.
2638 (linux-maps.o, target-utils.o): New.
2639 * configure.srv (srv_linux_obj): Add linux-maps.o.
2640
e57bb7a0
PL
26412015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2642
2643 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2644 function, return 1.
2645 (the_low_target): Install it.
2646
586b02a9
PA
26472015-07-14 Pedro Alves <palves@redhat.com>
2648
2649 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2650 Instead, ignore ECHILD, and throw an error for other errnos.
2651
58c1b36c
PA
26522015-07-10 Pedro Alves <palves@redhat.com>
2653
2654 * event-loop.c (struct callback_event) <data>: Change type to
2655 gdb_client_data instance instead of gdb_client_data pointer.
2656 (append_callback_event): Adjust.
2657
421530db
PL
26582015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2659
2660 * linux-aarch64-low.c: Add comments for each linux_target_ops
2661 method. Remove comments already covered in target_ops and
2662 linux_target_ops definitions.
2663 (the_low_target): Add comments for each unimplemented method.
2664
c2d65f38
YQ
26652015-07-09 Yao Qi <yao.qi@linaro.org>
2666
2667 * linux-aarch64-low.c (aarch64_regmap): Remove.
2668 (aarch64_usrregs_info): Remove.
2669 (regs_info): Set field usrregs to NULL.
2670
b20a6524
MM
26712015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2672
2673 * linux-low.c: Include "rsp-low.h"
2674 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2675 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2676 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2677 (handle_btrace_enable_pt): New.
2678 (handle_btrace_general_set): Support "pt".
2679 (handle_btrace_conf_general_set): Support "pt:size".
2680
96c97461
PL
26812015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2682
2683 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2684 Z_PACKET_SW_BP.
2685
37d66942
PL
26862015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2687
2688 * linux-aarch64-low.c: Remove comment about endianness.
2689 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2690 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2691 memcmp.
2692
dc06243f
GB
26932015-06-24 Gary Benson <gbenson@redhat.com>
2694
2695 * linux-i386-ipa.c (stdint.h): Do not include.
2696 * lynx-i386-low.c (stdint.h): Likewise.
2697 * lynx-ppc-low.c (stdint.h): Likewise.
2698 * mem-break.c (stdint.h): Likewise.
2699 * thread-db.c (stdint.h): Likewise.
2700 * tracepoint.c (stdint.h): Likewise.
2701 * win32-low.c (stdint.h): Likewise.
2702
124e13d9
SM
27032015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2704
2705 * server.c (write_qxfer_response): Update call to
2706 remote_escape_output.
2707
909c2cda
JK
27082015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2709 Jan Kratochvil <jan.kratochvil@redhat.com>
2710
2711 Merge multiple hex conversions.
2712 * gdbreplay.c (tohex): Rename to 'fromhex'.
2713 (logchar): Use fromhex.
2714
24c05f46
JK
27152015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2716
2717 * server.c (handle_qxfer_libraries): Set `version' attribute for
2718 <library-list>.
2719
14d2069a
GB
27202015-06-10 Gary Benson <gbenson@redhat.com>
2721
2722 * target.h (struct target_ops) <multifs_open>: New field.
2723 <multifs_unlink>: Likewise.
2724 <multifs_readlink>: Likewise.
2725 * linux-low.c (nat/linux-namespaces.h): New include.
2726 (linux_target_ops): Initialize the_target->multifs_open,
2727 the_target->multifs_unlink and the_target->multifs_readlink.
2728 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2729 * hostio.c (hostio_fs_pid): New static variable.
2730 (hostio_handle_new_gdb_connection): New function.
2731 (handle_setfs): Likewise.
2732 (handle_open): Use the_target->multifs_open as appropriate.
2733 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2734 (handle_readlink): Use the_target->multifs_readlink as
2735 appropriate.
2736 (handle_vFile): Handle vFile:setfs packets.
2737 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2738 after target_handle_new_gdb_connection.
2739
4b8b5e72
GB
27402015-06-10 Gary Benson <gbenson@redhat.com>
2741
2742 * configure.ac (AC_CHECK_FUNCS): Add setns.
2743 * config.in: Regenerate.
2744 * configure: Likewise.
2745 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2746 (linux-namespaces.o): New rule.
2747 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2748
3ac2e371
GB
27492015-06-09 Gary Benson <gbenson@redhat.com>
2750
2751 * hostio.c (handle_open): Process mode argument with
2752 fileio_to_host_mode.
2753
ca9b78ce
YQ
27542015-06-01 Yao Qi <yao.qi@linaro.org>
2755
2756 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2757 * linux-x86-low.c: Likewise.
2758
bfacd19d
DB
27592015-05-28 Don Breazeal <donb@codesourcery.com>
2760
2761 * linux-low.c (handle_extended_wait): Initialize
2762 thread_info.last_resume_kind for new fork children.
2763
452003ef
PA
27642015-05-15 Pedro Alves <palves@redhat.com>
2765
2766 * target.h (target_handle_new_gdb_connection): Rewrite using if
2767 wrapped in do/while.
2768
1041a03c
JB
27692015-05-14 Joel Brobecker <brobecker@adacore.com>
2770
2771 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2772 * configure, config.in: Regenerate.
2773 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2774 Declare typedef.
2775
c269dbdb
DB
27762015-05-12 Don Breazeal <donb@codesourcery.com>
2777
2778 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2779 PTRACE_EVENT_VFORK_DONE.
2780 (linux_low_ptrace_options, extended_event_reported): Add vfork
2781 events.
2782 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2783 and "vforkdone" for RSP 'T' Stop Reply Packet.
2784 * server.h (report_vfork_events): Declare
2785 global variable.
2786
3a8a0396
DB
27872015-05-12 Don Breazeal <donb@codesourcery.com>
2788
2789 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2790 (the_low_target) <new_fork>: Initialize new member.
2791 * linux-arm-low.c (arm_new_fork): New function.
2792 (the_low_target) <new_fork>: Initialize new member.
2793 * linux-low.c (handle_extended_wait): Call new target function
2794 new_fork.
2795 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2796 * linux-mips-low.c (mips_add_watchpoint): New function
2797 extracted from mips_insert_point.
2798 (the_low_target) <new_fork>: Initialize new member.
2799 (mips_linux_new_fork): New function.
2800 (mips_insert_point): Call mips_add_watchpoint.
2801 * linux-x86-low.c (x86_linux_new_fork): New function.
2802 (the_low_target) <new_fork>: Initialize new member.
2803
de0d863e
DB
28042015-05-12 Don Breazeal <donb@codesourcery.com>
2805
2806 * linux-low.c (handle_extended_wait): Implement return value,
2807 rename argument 'event_child' to 'event_lwp', handle
2808 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2809 (linux_low_ptrace_options): New function.
2810 (linux_low_filter_event): Call linux_low_ptrace_options,
2811 use different argument fo linux_enable_event_reporting,
2812 use return value from handle_extended_wait.
2813 (extended_event_reported): New function.
2814 (linux_wait_1): Call extended_event_reported and set
2815 status to report fork events.
2816 (linux_write_memory): Add pid to debug message.
2817 (reset_lwp_ptrace_options_callback): New function.
2818 (linux_handle_new_gdb_connection): New function.
2819 (linux_target_ops): Initialize new structure member.
2820 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2821 * lynx-low.c: Initialize new structure member.
2822 * remote-utils.c (prepare_resume_reply): Implement stop reason
2823 "fork" for "T" stop message.
2824 * server.c (handle_query): Call handle_new_gdb_connection.
2825 * server.h (report_fork_events): Declare global flag.
2826 * target.h (struct target_ops) <handle_new_gdb_connection>:
2827 New member.
2828 (target_handle_new_gdb_connection): New macro.
2829 * win32-low.c: Initialize new structure member.
2830
ddcbc397
DB
28312015-05-12 Don Breazeal <donb@codesourcery.com>
2832
2833 * mem-break.c (APPEND_TO_LIST): Define macro.
2834 (clone_agent_expr): New function.
2835 (clone_one_breakpoint): New function.
2836 (clone_all_breakpoints): New function.
2837 * mem-break.h: Declare new functions.
2838
89245bc0
DB
28392015-05-12 Don Breazeal <donb@codesourcery.com>
2840
2841 * linux-low.c (linux_supports_fork_events): New function.
2842 (linux_supports_vfork_events): New function.
2843 (linux_target_ops): Initialize new structure members.
2844 (initialize_low): Call linux_check_ptrace_features.
2845 * lynx-low.c (lynx_target_ops): Initialize new structure
2846 members.
2847 * server.c (report_fork_events, report_vfork_events):
2848 New global flags.
2849 (handle_query): Add new features to qSupported packet and
2850 response.
2851 (captured_main): Initialize new global variables.
2852 * target.h (struct target_ops) <supports_fork_events>:
2853 New member.
2854 <supports_vfork_events>: New member.
2855 (target_supports_fork_events): New macro.
2856 (target_supports_vfork_events): New macro.
2857 * win32-low.c (win32_target_ops): Initialize new structure
2858 members.
2859
835205d0
GB
28602015-05-12 Gary Benson <gbenson@redhat.com>
2861
2862 * server.c (handle_qxfer_exec_file): Use current process
2863 if annex is empty.
2864
21e94bd9
SL
28652015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2866
2867 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2868 Remove HAVE_PTRACE_GETREGS conditionals.
2869 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2870 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2871
45614f15
YQ
28722015-05-08 Yao Qi <yao.qi@linaro.org>
2873
2874 * linux-low.c (linux_supports_conditional_breakpoints): New
2875 function.
2876 (linux_target_ops): Install new target method.
2877 * lynx-low.c (lynx_target_ops): Install NULL hook for
2878 supports_conditional_breakpoints.
2879 * nto-low.c (nto_target_ops): Likewise.
2880 * spu-low.c (spu_target_ops): Likewise.
2881 * win32-low.c (win32_target_ops): Likewise.
2882 * server.c (handle_query): Check
2883 target_supports_conditional_breakpoints.
2884 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2885 New field.
2886 (target_supports_conditional_breakpoints): New macro.
2887
80ad801e
PA
28882015-05-06 Pedro Alves <palves@redhat.com>
2889
2890 PR server/18081
2891 * server.c (start_inferior): If the process exits, mourn it.
2892
819843c7
GB
28932015-04-21 Gary Benson <gbenson@redhat.com>
2894
2895 * hostio.c (fileio_open_flags_to_host): Factored out to
2896 fileio_to_host_openflags in common/fileio.c. Single use
2897 updated.
2898
a2d5a9d7
MF
28992015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2900
2901 * linux-xtensa-low.c (xtensa_fill_gregset)
2902 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2903 XCHAL_HAVE_LOOP.
2904
deb44829
MF
29052015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2906
2907 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2908 (regs_info): Replace usrregs pointer with NULL.
2909
e57f1de3
GB
29102015-04-17 Gary Benson <gbenson@redhat.com>
2911
2912 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2913 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2914 * server.c (handle_qxfer_exec_file): New function.
2915 (qxfer_packets): Add exec-file entry.
2916 (handle_query): Report qXfer:exec-file:read as supported packet.
2917
62828379
RN
29182015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2919
2920 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2921
b88bb450
GB
29222015-04-09 Gary Benson <gbenson@redhat.com>
2923
2924 * hostio-errno.c (errno_to_fileio_error): Remove function.
2925 Update caller to use remote_fileio_to_fio_error.
2926
c8f4bfdd
YQ
29272015-04-09 Yao Qi <yao.qi@linaro.org>
2928
2929 * linux-low.c (linux_insert_point): Call
2930 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2931 (linux_remove_point): Call remove_memory_breakpoint if type is
2932 raw_bkpt_type_sw.
2933 * linux-x86-low.c (x86_insert_point): Don't call
2934 insert_memory_breakpoint.
2935 (x86_remove_point): Don't call remove_memory_breakpoint.
2936
41f98f02
PA
29372015-04-01 Pedro Alves <palves@redhat.com>
2938 Cleber Rosa <crosa@redhat.com>
2939
2940 * server.c (gdbserver_usage): Reorganize and extend the usage
2941 message.
2942
2bf6fb9d
PA
29432015-03-24 Pedro Alves <palves@redhat.com>
2944
2945 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2946 output. Also dump TRAP_TRACE.
2947 (linux_low_filter_event): In debug output, distinguish a
2948 resume_stop SIGSTOP from a delayed SIGSTOP.
2949
369f6daa
GB
29502015-03-24 Gary Benson <gbenson@redhat.com>
2951
2952 * linux-x86-low.c (x86_linux_new_thread): Moved to
2953 nat/x86-linux.c.
2954 (x86_linux_prepare_to_resume): Likewise.
2955
8e5d4070
GB
29562015-03-24 Gary Benson <gbenson@redhat.com>
2957
2958 * Makefile.in (x86-linux-dregs.o): New rule.
2959 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2960 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2961 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2962 (x86_linux_dr_get): Likewise.
2963 (x86_linux_dr_set): Likewise.
2964 (update_debug_registers_callback): Likewise.
2965 (x86_linux_dr_set_addr): Likewise.
2966 (x86_linux_dr_get_addr): Likewise.
2967 (x86_linux_dr_set_control): Likewise.
2968 (x86_linux_dr_get_control): Likewise.
2969 (x86_linux_dr_get_status): Likewise.
2970 (x86_linux_update_debug_registers): Likewise.
2971
2b95d440
GB
29722015-03-24 Gary Benson <gbenson@redhat.com>
2973
2974 * linux-x86-low.c (x86_linux_update_debug_registers):
2975 New function, factored out from...
2976 (x86_linux_prepare_to_resume): ...this.
2977
14b0bc68
GB
29782015-03-24 Gary Benson <gbenson@redhat.com>
2979
2980 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2981 (x86_linux_dr_set): Likewise.
2982 (update_debug_registers_callback): Likewise.
2983 (x86_linux_dr_set_addr): Likewise.
2984 (x86_linux_dr_get_addr): Likewise.
2985 (x86_linux_dr_set_control): Likewise.
2986 (x86_linux_dr_get_control): Likewise.
2987 (x86_linux_dr_get_status): Likewise.
2988 (x86_linux_prepare_to_resume): Likewise.
2989
5dfe6ca8
GB
29902015-03-24 Gary Benson <gbenson@redhat.com>
2991
2992 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2993 Use perror_with_name. Pass string through gettext.
2994 (x86_linux_dr_set): Likewise.
2995
d33472ad
GB
29962015-03-24 Gary Benson <gbenson@redhat.com>
2997
2998 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2999 (x86_linux_dr_set_addr): ...this.
3000 (x86_dr_low_get_addr): Rename to...
3001 (x86_linux_dr_get_addr): ...this.
3002 (x86_dr_low_set_control): Rename to...
3003 (x86_linux_dr_set_control): ...this.
3004 (x86_dr_low_get_control): Rename to...
3005 (x86_linux_dr_get_control): ...this.
3006 (x86_dr_low_get_status): Rename to...
3007 (x86_linux_dr_get_status): ...this.
3008 (x86_dr_low): Update with new function names.
3009
4b134ca1
GB
30102015-03-24 Gary Benson <gbenson@redhat.com>
3011
3012 * Makefile.in (x86-linux.o): New rule.
3013 * configure.srv: Add x86-linux.o to relevant targets.
3014 * linux-low.c (lwp_set_arch_private_info): New function.
3015 (lwp_arch_private_info): Likewise.
3016 * linux-x86-low.c: Include nat/x86-linux.h.
3017 (arch_lwp_info): Removed structure.
3018 (update_debug_registers_callback):
3019 Use lwp_set_debug_registers_changed.
3020 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3021 and lwp_set_debug_registers_changed.
3022 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3023
34c703da
GB
30242015-03-24 Gary Benson <gbenson@redhat.com>
3025
3026 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3027 * linux-arm-low.c (arm_new_thread): Likewise.
3028 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3029 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3030 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3031 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3032
cff068da
GB
30332015-03-24 Gary Benson <gbenson@redhat.com>
3034
3035 * linux-low.c (ptid_of_lwp): New function.
3036 (lwp_is_stopped): Likewise.
3037 (lwp_stop_reason): Likewise.
3038 * linux-x86-low.c (update_debug_registers_callback):
3039 Use lwp_is_stopped.
3040 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3041 lwp_stop_reason.
3042
b2f7c7e8
GB
30432015-03-24 Gary Benson <gbenson@redhat.com>
3044
3045 * linux-low.h (linux_stop_lwp): Remove declaration.
3046
6d4ee8c6
GB
30472015-03-24 Gary Benson <gbenson@redhat.com>
3048
3049 * linux-low.h: Include nat/linux-nat.h.
3050 * linux-low.c (iterate_over_lwps_args): New structure.
3051 (iterate_over_lwps_filter): New function.
3052 (iterate_over_lwps): Likewise.
3053 * linux-x86-low.c (update_debug_registers_callback):
3054 Update signature to what iterate_over_lwps expects.
3055 Remove PID check that iterate_over_lwps now performs.
3056 (x86_dr_low_set_addr): Use iterate_over_lwps.
3057 (x86_dr_low_set_control): Likewise.
3058
70a0bb6b
GB
30592015-03-24 Gary Benson <gbenson@redhat.com>
3060
3061 * linux-x86-low.c (x86_debug_reg_state): New function.
3062 (x86_linux_prepare_to_resume): Use the above.
3063
7b669087
GB
30642015-03-24 Gary Benson <gbenson@redhat.com>
3065
3066 * linux-low.c (current_lwp_ptid): New function.
3067 * linux-x86-low.c: Include nat/linux-nat.h.
3068 (x86_dr_low_get_addr): Use current_lwp_ptid.
3069 (x86_dr_low_get_control): Likewise.
3070 (x86_dr_low_get_status): Likewise.
3071
eef49a3d
PA
30722015-03-20 Pedro Alves <palves@redhat.com>
3073
3074 * tracepoint.c (cmd_qtstatus): Make "str" const.
3075
b2333d22
PA
30762015-03-20 Pedro Alves <palves@redhat.com>
3077
3078 * server.c (handle_general_set): Make "req_str" const.
3079
23f238d3
PA
30802015-03-19 Pedro Alves <palves@redhat.com>
3081
3082 * linux-low.c (linux_resume_one_lwp): Rename to ...
3083 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3084 instead call perror_with_name.
3085 (check_ptrace_stopped_lwp_gone): New function.
3086 (linux_resume_one_lwp): Reimplement as wrapper around
3087 linux_resume_one_lwp_throw that swallows errors if the LWP is
3088 gone.
3089
91baf43f
PA
30902015-03-19 Pedro Alves <palves@redhat.com>
3091
3092 * linux-low.c (count_events_callback, select_event_lwp_callback):
3093 No longer check whether the thread has resume_stop as last resume
3094 kind.
3095
8bf3b159
PA
30962015-03-19 Pedro Alves <palves@redhat.com>
3097
3098 * linux-low.c (count_events_callback, select_event_lwp_callback):
3099 Use the lwp's status_pending_p field, not the thread's.
3100
b90fc188
PA
31012015-03-19 Pedro Alves <palves@redhat.com>
3102
3103 * linux-low.c (select_event_lwp_callback): Update comments to
3104 no longer mention SIGTRAP.
3105
464b0089
GB
31062015-03-18 Gary Benson <gbenson@redhat.com>
3107
3108 * server.c (handle_query): Do not report vFile:fstat as supported.
3109
aa9e327f
GB
31102015-03-11 Gary Benson <gbenson@redhat.com>
3111
3112 * hostio.c (sys/types.h): New include.
3113 (sys/stat.h): Likewise.
3114 (common-remote-fileio.h): Likewise.
3115 (handle_fstat): New function.
3116 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3117
791c0056
GB
31182015-03-11 Gary Benson <gbenson@redhat.com>
3119
3120 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3121 struct stat.st_blocks and struct stat.st_blksize.
3122 * configure: Regenerate.
3123 * config.in: Likewise.
3124 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3125 (OBS): Add common-remote-fileio.o.
3126 (common-remote-fileio.o): New rule.
3127
9a9df970
PA
31282015-03-09 Pedro Alves <palves@redhat.com>
3129
3130 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3131 'struct sockaddr' pointer in 'accept' call.
3132
9eb1356e
PA
31332015-03-09 Pedro Alves <palves@redhat.com>
3134
3135 Revert:
3136 2015-03-07 Pedro Alves <palves@redhat.com>
3137 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3138 or <winsock2.h> here. Instead include "gdb_socket.h".
3139 (remote_open): Use union gdb_sockaddr_u.
3140 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3141 or <winsock2.h> here. Instead include "gdb_socket.h".
3142 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3143 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3144 or <sys/un.h>.
3145 (init_named_socket, gdb_agent_helper_thread): Use union
3146 gdb_sockaddr_u.
3147
aac331e4
PA
31482015-03-07 Pedro Alves <palves@redhat.com>
3149
3150 * configure.ac (build_warnings): Move
3151 -Wdeclaration-after-statement to the C-specific set.
3152 * configure: Regenerate.
3153
366c75fc
PA
31542015-03-07 Pedro Alves <palves@redhat.com>
3155
3156 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3157 or <winsock2.h> here. Instead include "gdb_socket.h".
3158 (remote_open): Use union gdb_sockaddr_u.
3159 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3160 or <winsock2.h> here. Instead include "gdb_socket.h".
3161 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3162 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3163 or <sys/un.h>.
3164 (init_named_socket, gdb_agent_helper_thread): Use union
3165 gdb_sockaddr_u.
3166
492d29ea
PA
31672015-03-07 Pedro Alves <palves@redhat.com>
3168
3169 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3170 instead.
3171
60a191ed
YQ
31722015-03-06 Yao Qi <yao.qi@linaro.org>
3173
3174 * linux-aarch64-low.c (aarch64_insert_point): Use
3175 show_debug_regs as a boolean.
3176 (aarch64_remove_point): Likewise.
3177
f5771b1d
PA
31782015-03-05 Pedro Alves <palves@redhat.com>
3179
3180 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3181 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3182 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3183 * nto-low.c (nto_target_ops): Likewise.
3184 * spu-low.c (spu_target_ops): Likewise.
3185 * win32-low.c (win32_target_ops): Likewise.
3186
3e572f71
PA
31872015-03-04 Pedro Alves <palves@redhat.com>
3188
72f4393d 3189 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3190 Decide whether a breakpoint triggered based on the SIGTRAP's
3191 siginfo.si_code.
72f4393d
L
3192 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3193 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3194 (linux_low_filter_event): Check for breakpoints before checking
3195 watchpoints.
3196 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3197 siginfo.si_code.
72f4393d
L
3198 (linux_stopped_by_sw_breakpoint)
3199 (linux_supports_stopped_by_sw_breakpoint)
3200 (linux_stopped_by_hw_breakpoint)
3201 (linux_supports_stopped_by_hw_breakpoint): New functions.
3202 (linux_target_ops): Install new target methods.
3e572f71 3203
1ec68e26
PA
32042015-03-04 Pedro Alves <palves@redhat.com>
3205
3206 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3207 * server.c (swbreak_feature, hwbreak_feature): New globals.
3208 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3209 (captured_main): Clear swbreak_feature and hwbreak_feature.
3210 * server.h (swbreak_feature, hwbreak_feature): Declare.
3211 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3212 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3213 supports_stopped_by_hw_breakpoint>: New fields.
3214 (target_supports_stopped_by_sw_breakpoint)
3215 (target_stopped_by_sw_breakpoint)
3216 (target_supports_stopped_by_hw_breakpoint)
3217 (target_stopped_by_hw_breakpoint): Declare.
3218
15c66dd6
PA
32192015-03-04 Pedro Alves <palves@redhat.com>
3220
3221 enum lwp_stop_reason -> enum target_stop_reason
3222 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3223 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3224 (linux_wait_1, stuck_in_jump_pad_callback)
3225 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3226 (linux_stopped_by_watchpoint):
3227 * linux-low.h (enum lwp_stop_reason): Delete.
3228 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3229 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3230
98fc70d6
YQ
32312015-03-04 Yao Qi <yao.qi@linaro.org>
3232
3233 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3234
dd2ac174
GB
32352015-03-03 Gary Benson <gbenson@redhat.com>
3236
3237 * hostio.c (handle_vFile): Fix prefix lengths.
3238
d68e53f4
MM
32392015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3240
3241 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3242 ptr_bits.
3243
bf2d68ab
AA
32442015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3245
3246 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3247 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3248 (clean): Add "rm -f" for above C files.
3249 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3250 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3251 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3252 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3253 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3254 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3255 (init_registers_s390x_vx_linux64)
3256 (init_registers_s390x_tevx_linux64)
3257 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3258 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3259 declarations.
3260 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3261 (s390_store_vxrs_high): New functions.
3262 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3263 NT_S390_VXRS_HIGH.
3264 (s390_arch_setup): Add logic for selecting one of the new target
3265 descriptions. Activate the new vector regsets if applicable.
3266 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3267 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3268 and init_registers_s390x_tevx_linux64.
3269
c966a859
PA
32702015-03-01 Pedro Alves <palves@redhat.com>
3271
3272 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3273 parameter.
3274
4180215b
PA
32752015-02-27 Pedro Alves <palves@redhat.com>
3276
3277 * linux-x86-low.c (u_debugreg_offset): New function.
3278 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3279
749bab01
PA
32802015-02-27 Pedro Alves <palves@redhat.com>
3281
3282 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3283 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3284 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3285 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3286 (ps_lsetfpregs, ps_getpid)
3287 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3288 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3289 (ps_lsetxregs, ps_plog): Declare.
3290
3c14e5a3
PA
32912015-02-27 Pedro Alves <palves@redhat.com>
3292
3293 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3294 IP_AGENT_EXPORT_FUNC.
3295 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3296 IP_AGENT_EXPORT_FUNC.
3297 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3298 (IP_AGENT_EXPORT): Delete.
3299 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3300 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3301 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3302 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3303 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3304 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3305 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3306 (traceframe_read_count, traceframe_write_count)
3307 (traceframes_created, trace_state_variables, get_raw_reg)
3308 (get_trace_state_variable_value, set_trace_state_variable_value)
3309 (ust_loaded, helper_thread_id, cmd_buf): Use
3310 IPA_SYM_EXPORTED_NAME.
3311 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3312 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3313 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3314 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3315 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3316 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3317 EXTERN_C_PUSH/EXTERN_C_POP.
3318 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3319 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3320 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3321 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3322 (traceframe_write_count, traceframe_read_count)
3323 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3324 (about_to_request_buffer_space, get_trace_state_variable_value)
3325 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3326 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3327 EXTERN_C_PUSH/EXTERN_C_POP.
3328 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3329 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3330 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3331 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3332 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3333 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3334 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3335 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3336 Define.
3337 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3338 (IP_AGENT_EXPORT_VAR_DECL): Define.
3339 (tracing): Declare.
3340 (gdb_agent_get_raw_reg): Declare.
3341
fe978cb0
PA
33422015-02-27 Tom Tromey <tromey@redhat.com>
3343 Pedro Alves <palves@redhat.com>
3344
3345 Rename symbols whose names are reserved C++ keywords throughout.
3346
3bc3d82a
PA
33472015-02-27 Pedro Alves <palves@redhat.com>
3348
3349 * Makefile.in (COMPILER): New, get it from autoconf.
3350 (CXX): Get from autoconf instead.
3351 (COMPILE.pre): Use COMPILER.
3352 (CC-LD): Rename to ...
3353 (CC_LD): ... this. Use COMPILER.
3354 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3355 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3356 * acinclude.m4: Include build-with-cxx.m4.
3357 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3358 Disable -Werror by default if building in C++ mode.
3359 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3360 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3361 the C++ compiler. Save/restore CXXFLAGS too.
3362 * configure: Regenerate.
3363
07697489
PA
33642015-02-27 Pedro Alves <palves@redhat.com>
3365
3366 * acinclude.m4: Include libiberty.m4.
3367 * configure.ac: Call libiberty_INIT.
3368 * config.in, configure: Regenerate.
3369
9beb7c4e
PA
33702015-02-26 Pedro Alves <palves@redhat.com>
3371
3372 * linux-low.c (linux_wait_1): When incrementing the PC past a
3373 program breakpoint always use the_low_target.breakpoint_len as
3374 increment, rather than the maximum between that and
3375 the_low_target.decr_pc_after_break.
3376
8090aef2
PA
33772015-02-23 Pedro Alves <palves@redhat.com>
3378
3379 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3380 thread was doing a step-over; always adjust the PC if
3381 we stepped over a permanent breakpoint.
3382 (linux_wait_1): If we stepped over breakpoint that was on top of a
3383 permanent breakpoint, manually advance the PC past it.
3384
bc9540e8
PA
33852015-02-23 Pedro Alves <palves@redhat.com>
3386
3387 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3388 modes.
3389 (x86_fill_gregset, x86_store_gregset): Use it when handling
3390 $orig_eax.
3391
2db9a427
PA
33922015-02-20 Pedro Alves <palves@redhat.com>
3393
3394 * thread-db.c: Include "nat/linux-procfs.h".
3395 (thread_db_init): Skip listing new threads if the kernel supports
3396 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3397
afa8d396
PA
33982015-02-20 Pedro Alves <palves@redhat.com>
3399
3400 * linux-low.c (status_pending_p_callback): Use ptid_match.
3401
c9587f88
AT
34022015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3403
3404 PR breakpoints/16812
3405 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3406 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3407 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3408
b05ec7a5
AT
34092015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3410
3411 PR breakpoints/15956
3412 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3413
d33501a5
MM
34142015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3415
3416 * linux-low.c (linux_low_btrace_conf): Print size.
3417 * server.c (handle_btrace_conf_general_set): New.
3418 (hanle_general_set): Call handle_btrace_conf_general_set.
3419 (handle_query): Report Qbtrace-conf:bts:size as supported.
3420
f4abbc16
MM
34212015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3422
3423 * linux-low.c (linux_low_enable_btrace): Update parameters.
3424 (linux_low_btrace_conf): New.
3425 (linux_target_ops)<to_btrace_conf>: Initialize.
3426 * server.c (current_btrace_conf): New.
3427 (handle_btrace_enable): Rename to ...
3428 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3429 to target_enable_btrace. Update comment. Update users.
3430 (handle_qxfer_btrace_conf): New.
3431 (qxfer_packets): Add btrace-conf entry.
3432 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3433 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3434 (target_ops)<read_btrace_conf>: New.
3435 (target_enable_btrace): Update parameters.
3436 (target_read_btrace_conf): New.
3437
043c3577
MM
34382015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3439
3440 * server.c (handle_btrace_general_set): Remove call to
3441 target_supports_btrace.
3442 (supported_btrace_packets): New.
3443 (handle_query): Call supported_btrace_packets.
3444 * target.h: include btrace-common.h.
3445 (btrace_target_info): Removed.
3446 (supports_btrace, target_supports_btrace): Update parameters.
3447
734b0e4b
MM
34482015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3449
3450 * Makefile.in (SFILES): Add common/btrace-common.c.
3451 (OBS): Add common/btrace-common.o.
3452 (btrace-common.o): Add build rules.
3453 * linux-low: Include btrace-common.h.
3454 (linux_low_read_btrace): Use struct btrace_data. Call
3455 btrace_data_init and btrace_data_fini.
3456
d6c146e9
PA
34572015-02-06 Pedro Alves <palves@redhat.com>
3458
3459 * thread-db.c (find_new_threads_callback): Add debug output.
3460
20ba1ce6
PA
34612015-02-04 Pedro Alves <palves@redhat.com>
3462
3463 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3464 (resume_stopped_resumed_lwps): New function.
3465 (linux_wait_for_event_filtered): Use it.
3466
8cc73a39
SDJ
34672015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3468
3469 * Makefile.in (SFILES): Add linux-personality.c.
3470 (linux-personality.o): New rule.
3471 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3472 list of objects to be built.
3473 * linux-low.c: Include nat/linux-personality.h.
3474 (linux_create_inferior): Remove code to disable address space
3475 randomization (moved to ../nat/linux-personality.c). Create
3476 cleanup to disable address space randomization.
3477
fb23d554
SDJ
34782015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3479
3480 * Makefile.in (posix-strerror.o): New rule.
3481 (mingw-strerror.o): Likewise.
3482 * configure: Regenerated.
3483 * configure.ac: Source file ../common/common.host. Initialize new
3484 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3485
cdf43629
YQ
34862015-01-14 Yao Qi <yao@codesourcery.com>
3487
3488 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3489 (ppc-linux.o): New rule.
3490 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3491 * configure.ac: AC_CHECK_FUNCS(getauxval).
3492 * config.in: Re-generated.
3493 * configure: Re-generated.
3494 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3495 ppc64_64bit_inferior_p
3496
514c5338
YQ
34972015-01-14 Yao Qi <yao@codesourcery.com>
3498
3499 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3500 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3501 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3502 (PT_ORIG_R3, PT_TRAP): Likewise.
3503 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3504 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3505 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3506
3368c1e5
JB
35072015-01-10 Joel Brobecker <brobecker@adacore.com>
3508
3509 * i387-fp.c (i387_cache_to_xsave): In look over
3510 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3511 zmmh_low_space field by use of zmmh_high_space.
3512
582511be
PA
35132015-01-09 Pedro Alves <palves@redhat.com>
3514
3515 * linux-low.c (step_over_bkpt): Move higher up in the file.
3516 (handle_extended_wait): Don't store the stop_pc here.
3517 (get_stop_pc): Adjust comments and rename to ...
3518 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3519 stopped for a software breakpoint or hardware breakpoint.
3520 (thread_still_has_status_pending_p): New function.
3521 (status_pending_p_callback): Use
3522 thread_still_has_status_pending_p. If the event is no longer
3523 interesting, resume the LWP.
3524 (handle_tracepoints): Add assert.
3525 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3526 (wstatus_maybe_breakpoint): New function.
3527 (cancel_breakpoint): Delete function.
3528 (check_stopped_by_watchpoint): New function, factored out from
3529 linux_low_filter_event.
3530 (lp_status_maybe_breakpoint): Delete function.
3531 (linux_low_filter_event): Remove filter_ptid argument.
3532 Leave thread group exits pending here. Store the LWP's stop PC.
3533 Always leave events pending.
3534 (linux_wait_for_event_filtered): Pull all events out of the
3535 kernel, and leave them all pending.
3536 (count_events_callback, select_event_lwp_callback): Consider all
3537 events.
3538 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3539 (select_event_lwp): Only give preference to the stepping LWP in
3540 all-stop mode. Adjust comments.
3541 (ignore_event): New function.
3542 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3543 references to cancel_breakpoints. Adjust to renames. Also give
3544 equal priority to all LWPs that have had events in non-stop mode.
3545 If reporting a software breakpoint event, unadjust the LWP's PC.
3546 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3547 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3548 Adjust.
3549 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3550 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3551 (linux_stopped_by_watchpoint): Adjust.
3552 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3553 * linux-low.h (enum lwp_stop_reason): New.
3554 (struct lwp_info) <stop_pc>: Adjust comment.
3555 <stopped_by_watchpoint>: Delete field.
3556 <stop_reason>: New field.
3557 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3558 * mem-break.c (software_breakpoint_inserted_here)
3559 (hardware_breakpoint_inserted_here): New function.
3560 * mem-break.h (software_breakpoint_inserted_here)
3561 (hardware_breakpoint_inserted_here): Declare.
3562 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3563 (cancel_breakpoints): Delete.
3564 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3565 (upload_fast_traceframes): Remove references to
3566 cancel_breakpoints.
3567
a33e3959
PA
35682015-01-09 Pedro Alves <palves@redhat.com>
3569
3570 * thread-db.c (find_new_threads_callback): Ignore thread if the
3571 kernel thread ID is -1.
3572
8784d563
PA
35732015-01-09 Pedro Alves <palves@redhat.com>
3574
3575 * linux-low.c (linux_attach_fail_reason_string): Move to
3576 nat/linux-ptrace.c, and rename.
3577 (linux_attach_lwp): Update comment.
3578 (attach_proc_task_lwp_callback): New function.
3579 (linux_attach): Adjust to rename and use
3580 linux_proc_attach_tgid_threads.
3581 (linux_attach_fail_reason_string): Delete declaration.
3582
76f2b779
JB
35832015-01-01 Joel Brobecker <brobecker@adacore.com>
3584
3585 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3586 * server.c (gdbserver_version): Likewise.
3587
fafcc06a
SDJ
35882014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3589
3590 * remote-utils.c: Include ctype.h.
3591 (input_interrupt): Explicitly handle the case when the char
3592 received is the NUL byte. Improve the printing of non-ASCII
3593 characters.
3594
beed38b8
JB
35952014-12-16 Joel Brobecker <brobecker@adacore.com>
3596
3597 * linux-low.c (linux_low_filter_event): Update call to
3598 linux_enable_event_reporting following the addition of
3599 a new parameter to that function.
3600
bf330350
CU
36012014-12-16 Catalin Udma <catalin.udma@freescale.com>
3602
3603 PR server/17457
3604 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3605 (AARCH64_FPCR_REGNO): Likewise.
3606 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3607 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3608 (aarch64_store_fpregset): Likewise.
3609
5227d625
JB
36102014-12-15 Joel Brobecker <brobecker@adacore.com>
3611
3612 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3613 Remove FIXME comment about assumption about N.
3614
f93b65a0
JB
36152014-12-13 Joel Brobecker <brobecker@adacore.com>
3616
3617 * configure.ac: If large-file support is disabled in GDBserver,
3618 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3619 * configure: Regenerate.
3620
e5a9158d
AA
36212014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3622
3623 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3624 warning upon ENODATA from ptrace.
3625 * linux-s390-low.c (s390_store_tdb): New.
3626 (s390_regsets): Add regset for NT_S390_TDB.
3627
feea5f36
AA
36282014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3629
3630 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3631 without a fill_function.
3632 * linux-s390-low.c (s390_fill_last_break): Remove.
3633 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3634 (s390_arch_setup): Use regset's size instead of fill_function for
3635 loop end condition.
3636
098dbe61
AA
36372014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3638
3639 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3640 the regset's store function when ptrace returned an error.
3641 * regcache.c (get_thread_regcache): Invalidate register cache
3642 before fetching inferior's registers.
3643
28eef672
AA
36442014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3645
3646 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3647 while-loop as for-loop.
3648 (regsets_store_inferior_registers): Likewise.
3649
bdca27a2
YQ
36502014-11-28 Yao Qi <yao@codesourcery.com>
3651
3652 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3653 * config.in, configure: Re-generate.
3654 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3655 is defined.
3656
9c232dda
YQ
36572014-11-21 Yao Qi <yao@codesourcery.com>
3658
3659 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3660 (AC_CHECK_HEADERS): Remove malloc.h.
3661 * configure: Re-generated.
3662 * config.in: Re-generated.
3663 * server.h: Don't include alloca.h and malloc.h.
3664 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3665 Don't include malloc.h.
3666
43968415
JB
36672014-11-17 Joel Brobecker <brobecker@adacore.com>
3668
3669 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3670 corresponding ERRNO check in same block.
3671
40e91bc7
PA
36722014-11-12 Pedro Alves <palves@redhat.com>
3673
3674 * server.c (cont_thread): Update comment.
3675 (start_inferior, attach_inferior): No longer clear cont_thread.
3676 (handle_v_cont): No longer set cont_thread.
3677 (captured_main): Clear cont_thread each time a GDB connects.
3678
c2c118cf
PA
36792014-11-12 Pedro Alves <palves@redhat.com>
3680
3681 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3682 thread, and don't resume all threads if the Hc thread has exited.
3683
78708b7c
PA
36842014-11-12 Pedro Alves <palves@redhat.com>
3685
3686 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3687 the process group instead of to a specific LWP.
3688
a2abc7de
PA
36892014-10-15 Pedro Alves <palves@redhat.com>
3690
3691 PR server/17487
3692 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3693 parameter.
3694 (arm_set_thread_context): Delete.
3695 (the_low_target): Adjust.
3696 * win32-i386-low.c (debug_registers_changed)
3697 (debug_registers_used): Delete.
3698 (update_debug_registers_callback): New function.
3699 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3700 needing to update their debug registers.
3701 (win32_get_current_dr): New function.
3702 (x86_dr_low_get_addr, x86_dr_low_get_control)
3703 (x86_dr_low_get_status): Fetch the debug register from the thread
3704 record's context.
3705 (i386_initial_stuff): Adjust.
3706 (i386_get_thread_context): Remove current_event parameter. Don't
3707 clear debug_registers_changed nor copy DR values to
3708 debug_reg_state.
3709 (i386_set_thread_context): Delete.
3710 (i386_prepare_to_resume): New function.
3711 (i386_thread_added): Mark the thread as needing to update irs
3712 debug registers.
3713 (the_low_target): Remove i386_set_thread_context and install
3714 i386_prepare_to_resume.
3715 * win32-low.c (win32_get_thread_context): Adjust.
3716 (win32_set_thread_context): Use SetThreadContext
3717 directly.
3718 (win32_prepare_to_resume): New function.
3719 (win32_require_context): New function, factored out from ...
3720 (thread_rec): ... this.
3721 (continue_one_thread): Call win32_prepare_to_resume on each thread
3722 we're about to continue.
3723 (win32_resume): Call win32_prepare_to_resume on the event thread.
3724 * win32-low.h (struct win32_thread_info)
3725 <debug_registers_changed>: New field.
3726 (struct win32_target_ops): Change prototype of set_thread_context,
3727 delete set_thread_context and add prepare_to_resume.
3728 (win32_require_context): New declaration.
3729
a442d071
GB
37302014-10-08 Gary Benson <gbenson@redhat.com>
3731
3732 * server.h: Do not include common-exceptions.h.
3733
6f1947e8
GB
37342014-10-08 Gary Benson <gbenson@redhat.com>
3735
3736 * server.h: Do not include cleanups.h.
3737
63b434a4
JH
37382014-09-30 James Hogan <james.hogan@imgtec.com>
3739
3740 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3741 mips64-dsp-linux.c.
3742
c4d9ceb6
YQ
37432014-09-23 Yao Qi <yao@codesourcery.com>
3744
3745 * linux-low.c (lp_status_maybe_breakpoint): New function.
3746 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3747 (count_events_callback): Likewise.
3748 (select_event_lwp_callback): Likewise.
3749 (cancel_breakpoints_callback): Likewise.
3750
89a5711c
DB
37512014-09-19 Don Breazeal <donb@codesourcery.com>
3752
3753 * linux-low.c (handle_extended_wait): Call
3754 linux_ptrace_get_extended_event.
3755 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3756 linux_is_extended_waitstatus.
3757
bffc0964
JB
37582014-09-16 Joel Brobecker <brobecker@adacore.com>
3759
3760 * Makefile.in (CPPFLAGS): Define.
3761 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3762 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3763
0bfdf32f
GB
37642014-09-16 Gary Benson <gbenson@redhat.com>
3765
3766 * inferiors.h (current_inferior): Renamed as...
3767 (current_thread): New variable. All uses updated.
3768 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3769 (maybe_move_out_of_jump_pad): Likewise.
3770 (cancel_breakpoint): Likewise.
3771 (linux_low_filter_event): Likewise.
3772 (wait_for_sigstop): Likewise.
3773 (linux_resume_one_lwp): Likewise.
3774 (need_step_over_p): Likewise.
3775 (start_step_over): Likewise.
3776 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3777 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3778 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3779 and save_inferior as saved_thread.
3780 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3781 saved_thread.
3782 (regcache_invalidate_thread): Likewise.
3783 * remote-utils.c (prepare_resume_reply): Likewise.
3784 * thread-db.c (thread_db_get_tls_address): Likewise.
3785 (disable_thread_event_reporting): Likewise.
3786 (remove_thread_event_breakpoints): Likewise.
3787 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3788 as saved_thread.
3789 * target.h (set_desired_inferior): Renamed as...
3790 (set_desired_thread): New declaration. All uses updated.
3791 * server.c (myresume): Updated comment to reference thread instead
3792 of inferior.
3793 (handle_serial_event): Likewise.
3794 (handle_target_event): Likewise.
3795
361c8ade
GB
37962014-09-12 Tom Tromey <tromey@redhat.com>
3797 Gary Benson <gbenson@redhat.com>
3798
3799 * regcache.h: Include common-regcache.h.
3800 (regcache_read_pc): Don't declare.
3801 * regcache.c (get_thread_regcache_for_ptid): New function.
3802
bd9269f7
GB
38032014-09-11 Tom Tromey <tromey@redhat.com>
3804 Gary Benson <gbenson@redhat.com>
3805
3806 * symbol.c: New file.
3807 * Makefile.in (SFILES): Add symbol.c.
3808 (OBS): Add symbol.o.
3809
f8c1d06b
GB
38102014-09-11 Gary Benson <gbenson@redhat.com>
3811
3812 * target.c (target_stop_ptid, target_continue_ptid): New
3813 functions.
3814
721ec300
GB
38152014-09-11 Tom Tromey <tromey@redhat.com>
3816 Gary Benson <gbenson@redhat.com>
3817
3818 * target.h: Include target/target.h.
3819 * target.c (target_read_memory, target_read_uint32)
3820 (target_write_memory): New functions.
3821
c5e92cca
GB
38222014-09-11 Gary Benson <gbenson@redhat.com>
3823
3824 * server.h (debug_hw_points): Don't declare.
3825 * server.c (debug_hw_points): Don't define. Replace all uses
3826 with show_debug_regs.
3827 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3828 all uses with show_debug_regs.
3829
2e4bb98a
EBM
38302014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3831
3832 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3833 endianness into account.
3834 (ppc_supply_ptrace_register): Likewise.
3835
ac740bc7
JH
38362014-09-03 James Hogan <james.hogan@imgtec.com>
3837
3838 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3839 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3840
97ea6506
GB
38412014-09-03 Gary Benson <gbenson@redhat.com>
3842
3843 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3844 ALL_DEBUG_ADDRESS_REGISTERS.
3845
df7e5265
GB
38462014-09-02 Gary Benson <gbenson@redhat.com>
3847
3848 * i386-low.h: Renamed as...
3849 * x86-low.h: New file. All type, function and variable name
3850 prefixes changed from "i386_" to "x86_". All references updated.
3851 * i386-low.c: Renamed as...
3852 * x86-low.c: New file. All type, function and variable name
3853 prefixes changed from "i386_" to "x86_". All references updated.
3854
ed859da7
GB
38552014-09-02 Gary Benson <gbenson@redhat.com>
3856
3857 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3858 (x86_linux_new_thread): Likewise.
3859
860789c7
GB
38602014-08-29 Gary Benson <gbenson@redhat.com>
3861
3862 * server.h (setjmp.h): Do not include.
3863 (toplevel): Do not declare.
3864 (common-exceptions.h): Include.
3865 (cleanups.h): Likewise.
3866 * server.c (toplevel): Do not define.
3867 (exit_code): New static global.
3868 (detach_or_kill_for_exit_cleanup): New function.
3869 (main): New function. Original main renamed to...
3870 (captured_main): New function.
3871 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3872
ff55e1b5
GB
38732014-08-29 Gary Benson <gbenson@redhat.com>
3874
3875 * Makefile.in (SFILES): Add common/common-exceptions.c.
3876 (OBS): Add common-exceptions.o.
3877 (common-exceptions.o): New rule.
3878 * utils.c (prepare_to_throw_exception): New function.
3879
e9bcb658
GB
38802014-08-29 Gary Benson <gbenson@redhat.com>
3881
3882 * config.in: Regenerate.
3883 * configure: Likewise.
3884
e3180625
GB
38852014-08-29 Gary Benson <gbenson@redhat.com>
3886
3887 * Makefile.in (SFILES): Add common/cleanups.c.
3888 (OBS): cleanups.o.
3889 (cleanups.o): New rule.
3890
e3d6ba5d
GB
38912014-08-29 Gary Benson <gbenson@redhat.com>
3892
3893 * utils.c (internal_vwarning): New function.
3894
7096e886
GB
38952014-08-28 Gary Benson <gbenson@redhat.com>
3896
3897 * utils.h (fatal): Remove declaration.
3898 * utils.c (fatal): Remove function.
3899
14ce3192
GB
39002014-08-28 Gary Benson <gbenson@redhat.com>
3901
3902 * tracepoint.c (gdb_agent_init): Replace fatal with
3903 perror_with_name.
3904 (initialize_tracepoint): Likewise.
3905
50278d59
GB
39062014-08-28 Gary Benson <gbenson@redhat.com>
3907
3908 * remote-utils.c (remote_prepare): Replace fatal with error.
3909
aa96c426
GB
39102014-08-28 Gary Benson <gbenson@redhat.com>
3911
3912 * linux-low.c (linux_async): Replace fatal with warning.
3913 Tidy up and return.
3914 (linux_start_non_stop): Return -1 if linux_async failed.
3915
f7160e97
GB
39162014-08-28 Gary Benson <gbenson@redhat.com>
3917
3918 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3919 gdb_assert.
3920 (i386_dr_low_get_addr): Remove vague comment.
3921 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3922 gdb_assert.
3923
38e08fca
GB
39242014-08-28 Gary Benson <gbenson@redhat.com>
3925
3926 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3927 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3928 internal_error.
3929 (linux_resume_one_lwp): Likewise.
3930 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3931 gdb_assert.
3932 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3933 with internal_error.
3934 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3935 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3936 (find_register_by_name): Replace fatal with internal_error.
3937 (find_regno): Likewise.
3938 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3939 * thread-db.c (thread_db_create_event): Likewise.
3940 (thread_db_load_search): Likewise.
3941 (try_thread_db_load_1): Likewise.
3942 * tracepoint.c (get_jump_space_head): Replace fatal with
3943 internal_error.
3944 (claim_trampoline_space): Likewise.
3945 (have_fast_tracepoint_trampoline_buffer): Likewise.
3946 (cmd_qtstart): Likewise.
3947 (stop_tracing): Likewise.
3948 (fast_tracepoint_collecting): Likewise.
3949 (target_malloc): Likewise.
3950 (download_tracepoint): Likewise.
3951 (download_trace_state_variables): Replace check with gdb_assert.
3952 (upload_fast_traceframes): Replace fatal with internal_error.
3953
34abf635
GB
39542014-08-19 Tom Tromey <tromey@redhat.com>
3955 Gary Benson <gbenson@redhat.com>
3956
3957 * Makefile.in (SFILES): Add common/common-debug.c.
3958 (OBS): Add common-debug.o.
3959 (common-debug.o): New rule.
3960 * debug.h (debug_printf): Don't declare.
3961 * debug.c (debug_printf): Renamed and rewritten as...
3962 (debug_vprintf): New function.
3963
f6e94d78
GB
39642014-08-19 Gary Benson <gbenson@redhat.com>
3965
3966 * utils.h: Do not include print-utils.h.
3967
9239eeab
GB
39682014-08-19 Tom Tromey <tromey@redhat.com>
3969 Gary Benson <gbenson@redhat.com>
3970
3971 * server.h: Add static assertion.
3972 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3973
ef87c8bb
GB
39742014-08-19 Tom Tromey <tromey@redhat.com>
3975 Gary Benson <gbenson@redhat.com>
3976
3977 * Makefile.in (SFILES): Add common/errors.c.
3978 (OBS): Add errors.o.
3979 (IPA_OBS): Add errors-ipa.o.
3980 (errors.o): New rule.
3981 (errors-ipa.o): Likewise.
3982 * utils.h (perror_with_name, error, warning): Don't declare.
3983 * utils.c (warning): Renamed and rewritten as...
3984 (vwarning): New function.
3985 (error): Renamed and rewritten as...
3986 (verror): New function.
3987 (internal_error): Renamed and rewritten as...
3988 (internal_verror): New function.
3989
bb974a24
GB
39902014-08-07 Gary Benson <gbenson@redhat.com>
3991
3992 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3993 * configure: Regenerate.
3994 * config.in: Likewise.
3995 * server.h: Do not include errno.h.
3996 * event-loop.c: Likewise.
3997 * hostio-errno.c: Likewise.
3998 * linux-low.c: Likewise.
3999 * remote-utils.c: Likewise.
4000 * spu-low.c: Likewise.
4001 * utils.c: Likewise.
4002 * gdbreplay.c: Unconditionally include errno.h.
4003
6d3d12eb
GB
40042014-08-07 Gary Benson <gbenson@redhat.com>
4005
4006 * server.h: Do not include string.h.
4007 * event-loop.c: Likewise.
4008 * linux-low.c: Likewise.
4009 * regcache.c: Likewise.
4010 * remote-utils.c: Likewise.
4011 * spu-low.c: Likewise.
4012 * utils.c: Likewise.
4013
dccbb609
GB
40142014-08-07 Gary Benson <gbenson@redhat.com>
4015
4016 * server.h: Do not include gdb_assert.h.
4017
e76df0d0
GB
40182014-08-07 Gary Benson <gbenson@redhat.com>
4019
4020 * server.h: Do not include common-utils.h.
4021
4cb9c816
GB
40222014-08-07 Gary Benson <gbenson@redhat.com>
4023
4024 * server.h: Do not include ptid.h.
4025 * notif.h: Likewise.
4026
3995eeee
GB
40272014-08-07 Gary Benson <gbenson@redhat.com>
4028
4029 * server.h: Do not include gdb_locale.h.
4030
cb9f1a9b
GB
40312014-08-07 Gary Benson <gbenson@redhat.com>
4032
4033 * server.h: Do not include gdb/signals.h.
4034 * win32-low.c: Likewise.
4035
a5fceff8
GB
40362014-08-07 Gary Benson <gbenson@redhat.com>
4037
4038 * server.h: Do not include pathmax.h.
4039
b9391142
GB
40402014-08-07 Gary Benson <gbenson@redhat.com>
4041
4042 * server.h: Do not include libiberty.h.
4043 * linux-bfin-low.c: Likewise.
4044
0e443c87
GB
40452014-08-07 Gary Benson <gbenson@redhat.com>
4046
4047 * server.h: Do not include ansidecl.h.
4048
8ebb3f56
GB
40492014-08-07 Gary Benson <gbenson@redhat.com>
4050
4051 * linux-x86-low.c: Do not include stddef.h.
4052 * lynx-ppc-low.c: Likewise.
4053 * tracepoint.c: Likewise.
4054
8980bdf6
GB
40552014-08-07 Gary Benson <gbenson@redhat.com>
4056
4057 * server.h: Do not include stdarg.h.
4058 * nto-low.c: Likewise.
4059
d7096f71
GB
40602014-08-07 Gary Benson <gbenson@redhat.com>
4061
4062 * server.h: Do not include stdlib.h.
4063 * inferiors.c: Likewise.
4064 * linux-low.c: Likewise.
4065 * regcache.c: Likewise.
4066 * spu-low.c: Likewise.
4067 * tracepoint.c: Likewise.
4068 * utils.c: Likewise.
4069
d02f550d
GB
40702014-08-07 Gary Benson <gbenson@redhat.com>
4071
4072 * server.h: Do not include stdio.h.
4073 * linux-low.c: Likewise.
4074 * remote-utils.c: Likewise.
4075 * spu-low.c: Likewise.
4076 * utils.c: Likewise.
4077 * wincecompat.c: Likewise.
4078
87f6c4e3
GB
40792014-08-06 Gary Benson <gbenson@redhat.com>
4080
4081 * regcache.c (init_register_cache): Move conditionals inside if.
4082
7089dca4
GB
40832014-08-06 Gary Benson <gbenson@redhat.com>
4084
4085 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4086
462f517e
GB
40872014-07-31 Gary Benson <gbenson@redhat.com>
4088
4089 * ax.h: Do not include server.h.
4090 * gdbthread.h: Likewise.
4091 * lynx-low.h: Likewise.
4092 * notif.h: Likewise.
4093
976411d6
GB
40942014-07-30 Gary Benson <gbenson@redhat.com>
4095
4096 * server.h: Include common-defs.h.
4097 Do not include config.h or build-gnulib-gdbserver/config.h.
4098
d41f6d8e
GB
40992014-07-30 Gary Benson <gbenson@redhat.com>
4100
4101 * hostio-errno.c: Move server.h to top of includes list.
4102 * inferiors.c: Likewise.
4103 * linux-x86-low.c: Likewise.
4104 * notif.c: Include server.h.
4105
314c6a35
TT
41062014-07-24 Tom Tromey <tromey@redhat.com>
4107 Gary Benson <gbenson@redhat.com>
4108
4109 * server.h (CORE_ADDR): Now unsigned.
4110
69ff6be5
PA
41112014-07-16 Pedro Alves <palves@redhat.com>
4112
4113 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4114
ce9e3fe7
PA
41152014-07-15 Pedro Alves <palves@redhat.com>
4116
4117 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4118 copy.
4119
e76126e8
PA
41202014-07-11 Pedro Alves <palves@redhat.com>
4121
4122 * linux-low.c (kill_wait_lwp): New function, based on
4123 kill_one_lwp_callback, but use my_waitpid directly.
4124 (kill_one_lwp_callback, linux_kill): Use it.
4125
8e9db26e
PA
41262014-06-23 Pedro Alves <palves@redhat.com>
4127
4128 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4129 before setting DR0..DR3.
4130
698b3e08
GB
41312014-06-20 Gary Benson <gbenson@redhat.com>
4132
4133 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4134 * configure: Regenerated.
4135 * config.in: Likewise.
4136
125f8a3d
GB
41372014-06-20 Gary Benson <gbenson@redhat.com>
4138
4139 * Makefile.in (SFILES): Update locations for files moved
4140 from common to nat.
4141 (object file files): Reordered.
4142
42995dbd
GB
41432014-06-20 Gary Benson <gbenson@redhat.com>
4144
4145 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4146 (i386_dr_low_set_addr): Likewise.
4147 (i386_dr_low_get_addr): Likewise.
4148 (i386_dr_low_can_set_control): Likewise.
4149 (i386_dr_low_set_control): Likewise.
4150 (i386_dr_low_get_control): Likewise.
4151 (i386_dr_low_get_status): Likewise.
4152 (i386_get_debug_register_length): Likewise.
4153 * linux-x86-low.c (i386_dr_low_set_addr):
4154 Changed signature. Made static.
4155 (i386_dr_low_get_addr): Likewise.
4156 (i386_dr_low_set_control): Likewise.
4157 (i386_dr_low_get_control): Likewise.
4158 (i386_dr_low_get_status): Likewise.
4159 (i386_dr_low): New global variable.
4160 * win32-i386-low.c (i386_dr_low_set_addr):
4161 Changed signature. Made static.
4162 (i386_dr_low_get_addr): Likewise.
4163 (i386_dr_low_set_control): Likewise.
4164 (i386_dr_low_get_control): Likewise.
4165 (i386_dr_low_get_status): Likewise.
4166 (i386_dr_low): New global variable.
4167
e1d2394b
MS
41682014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4169
4170 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4171 * Makefile.in (AR, AR_FLAGS): Define.
4172 * configure: Regenerate.
4173
3a8ee006
GB
41742014-06-19 Gary Benson <gbenson@redhat.com>
4175
4176 * Makefile.in (i386-dregs.o): New rule.
4177 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4178 * i386-low.c (target.h): Remove include.
4179 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4180 (DR_CONTROL_SHIFT): Likewise.
4181 (DR_CONTROL_SIZE): Likewise.
4182 (DR_RW_EXECUTE): Likewise.
4183 (DR_RW_WRITE): Likewise.
4184 (DR_RW_READ): Likewise.
4185 (DR_RW_IORW): Likewise.
4186 (DR_LEN_1): Likewise.
4187 (DR_LEN_2): Likewise.
4188 (DR_LEN_4): Likewise.
4189 (DR_LEN_8): Likewise.
4190 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4191 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4192 (DR_ENABLE_SIZE): Likewise.
4193 (DR_LOCAL_SLOWDOWN): Likewise.
4194 (DR_GLOBAL_SLOWDOWN): Likewise.
4195 (DR_CONTROL_RESERVED): Likewise.
4196 (I386_DR_CONTROL_MASK): Likewise.
4197 (I386_DR_VACANT): Likewise.
4198 (I386_DR_LOCAL_ENABLE): Likewise.
4199 (I386_DR_GLOBAL_ENABLE): Likewise.
4200 (I386_DR_DISABLE): Likewise.
4201 (I386_DR_SET_RW_LEN): Likewise.
4202 (I386_DR_GET_RW_LEN): Likewise.
4203 (I386_DR_WATCH_HIT): Likewise.
4204 (i386_wp_op_t): Likewise.
4205 (i386_show_dr): Likewise.
4206 (i386_length_and_rw_bits): Likewise.
4207 (i386_insert_aligned_watchpoint): Likewise.
4208 (i386_remove_aligned_watchpoint): Likewise.
4209 (i386_handle_nonaligned_watchpoint): Likewise.
4210 i386_update_inferior_debug_regs(): Likewise.
4211 (i386_dr_insert_watchpoint): Likewise.
4212 (i386_dr_remove_watchpoint): Likewise.
4213 (i386_dr_region_ok_for_watchpoint): Likewise.
4214 (i386_dr_stopped_data_address): Likewise.
4215 (i386_dr_stopped_by_watchpoint): Likewise.
4216
8f26655c
GB
42172014-06-19 Gary Benson <gbenson@redhat.com>
4218
4219 * i386-low.c (i386_dr_show): Renamed to
4220 i386_show_dr and made static. All uses updated.
4221 (i386_dr_length_and_rw_bits): Renamed to
4222 i386_length_and_rw_bits and made static.
4223 All uses updated.
4224 (i386_dr_insert_aligned_watchpoint): Renamed to
4225 i386_insert_aligned_watchpoint and made static.
4226 All uses updated.
4227 (i386_dr_remove_aligned_watchpoint): Renamed to
4228 i386_remove_aligned_watchpoint and made static.
4229 All uses updated.
4230 (i386_dr_update_inferior_debug_regs): Renamed to
4231 i386_update_inferior_debug_regs and made static.
4232 All uses updated.
4233
b9228891
GB
42342014-06-18 Gary Benson <gbenson@redhat.com>
4235
5171def3
GB
4236 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4237 (i386_dr_low_can_set_control): Likewise.
4238 (i386_get_debug_register_length): Likewise.
4239 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4240 (i386_dr_low_can_set_control): Likewise.
4241 (i386_get_debug_register_length): Likewise.
4242
42432014-06-17 Gary Benson <gbenson@redhat.com>
4244
b9228891
GB
4245 * i386-low.h (i386-dregs.h): New include.
4246 (DR_FIRSTADDR): Now in i386-dregs.h.
4247 (DR_LASTADDR): Likewise.
4248 (DR_NADDR): Likewise.
4249 (DR_STATUS): Likewise.
4250 (DR_CONTROL): Likewise.
4251 (i386_debug_reg_state): Likewise.
4252 (i386_dr_insert_watchpoint): Likewise.
4253 (i386_dr_remove_watchpoint): Likewise.
4254 (i386_dr_region_ok_for_watchpoint): Likewise.
4255 (i386_dr_stopped_data_address): Likewise.
4256 (i386_dr_stopped_by_watchpoint): Likewise.
4257 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4258
4be83cc2
GB
42592014-06-18 Gary Benson <gbenson@redhat.com>
4260
4261 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4262 i386_dr_insert_watchpoint.
4263 (i386_low_remove_watchpoint): Renamed to
4264 i386_dr_remove_watchpoint.
4265 (i386_low_region_ok_for_watchpoint): Renamed to
4266 i386_dr_region_ok_for_watchpoint.
4267 (i386_low_stopped_data_address): Renamed to
4268 i386_dr_stopped_data_address.
4269 (i386_low_stopped_by_watchpoint): Renamed to
4270 i386_dr_stopped_by_watchpoint.
4271 * i386-low.c (i386_show_dr): Renamed to
4272 i386_dr_show and made nonstatic. All uses updated.
4273 (i386_length_and_rw_bits): Renamed to
4274 i386_dr_length_and_rw_bits and made nonstatic.
4275 All uses updated.
4276 (i386_insert_aligned_watchpoint): Renamed to
4277 i386_dr_insert_aligned_watchpoint and made nonstatic.
4278 All uses updated.
4279 (i386_remove_aligned_watchpoint): Renamed to
4280 i386_dr_remove_aligned_watchpoint and made nonstatic.
4281 All uses updated.
4282 (i386_update_inferior_debug_regs): Renamed to
4283 i386_dr_update_inferior_debug_regs and made nonstatic.
4284 All uses updated.
4285 (i386_low_insert_watchpoint): Renamed to
4286 i386_dr_insert_watchpoint. All uses updated.
4287 (i386_low_remove_watchpoint): Renamed to
4288 i386_dr_remove_watchpoint. All uses updated.
4289 (i386_low_region_ok_for_watchpoint): Renamed to
4290 i386_dr_region_ok_for_watchpoint. All uses updated.
4291 (i386_low_stopped_data_address): Renamed to
4292 i386_dr_stopped_data_address. All uses updated.
4293 (i386_low_stopped_by_watchpoint): Renamed to
4294 i386_dr_stopped_by_watchpoint. All uses updated.
4295
131aa0d4
GB
42962014-06-18 Gary Benson <gbenson@redhat.com>
4297
4298 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4299 (i386_dr_low_can_set_control): Likewise.
4300 (i386_insert_aligned_watchpoint): New check.
4301
d9305f7f
GB
43022014-06-18 Gary Benson <gbenson@redhat.com>
4303
4304 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4305 Renamed to state.
4306
e927c9fc
GB
43072014-06-18 Gary Benson <gbenson@redhat.com>
4308
4309 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4310 instead of fatal and error.
4311 (i386_handle_nonaligned_watchpoint): Likewise.
4312
1b6d4134
GB
43132014-06-18 Gary Benson <gbenson@redhat.com>
4314
4315 * i386-low.c (i386_get_debug_register_length): New macro.
4316 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4317 (i386_show_dr): Use debug_printf instead of fprintf. Use
4318 phex to format values.
4319
6e62758f
GB
43202014-06-18 Gary Benson <gbenson@redhat.com>
4321
4322 * i386-low.h: Comment changes.
4323 * i386-low.c: Likewise.
4324
fc6e2f03
GB
43252014-06-18 Gary Benson <gbenson@redhat.com>
4326
4327 * i386-low.c: Whitespace changes.
4328
f9d1eeed
TT
43292014-06-12 Tom Tromey <tromey@redhat.com>
4330
4331 * utils.c (freeargv): Remove.
4332
0b04e523
TT
43332014-06-12 Tom Tromey <tromey@redhat.com>
4334
4335 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4336 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4337 (parse_debug_format_options): Likewise.
4338 (gdbserver_usage): Likewise.
4339 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4340 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4341 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4342 against libiberty.
4343 ($(LIBGNU)): Depend on libiberty.
4344 (all-lib): Recurse into all subdirs.
4345 (install-only): Invoke "install" target in subdirs.
4346 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4347 targets.
4348 * configure: Rebuild.
4349 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4350 for vasprintf, vsnprintf, or gettimeofday.
4351 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4352 srv_tgtobj.
4353
270c9937
JB
43542014-06-05 Joel Brobecker <brobecker@adacore.com>
4355
4356 * development.sh: Delete.
4357 * Makefile.in (config.status): Adjust dependency on development.sh.
4358 * configure.ac: Adjust development.sh source call.
4359 * configure: Regenerate.
4360
0a261ed8
PA
43612014-06-02 Pedro Alves <palves@redhat.com>
4362
4363 * ax.c (gdb_free_agent_expr): New function.
4364 * ax.h (gdb_free_agent_expr): New declaration.
4365 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4366 list.
4367 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4368 static.
4369 (clear_breakpoint_conditions_and_commands): New function.
4370 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4371 (clear_breakpoint_conditions_and_commands): New declaration.
4372
e9dae05e
RR
43732014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4374
4375 * linux-aarch64-low.c (asm/ptrace.h): Include.
4376
5876f503
JK
43772014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4378
4379 Fix TLS access for -static -pthread.
4380 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4381 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4382 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4383
802e8e6d
PA
43842014-05-20 Pedro Alves <palves@redhat.com>
4385
4386 * linux-aarch64-low.c (aarch64_insert_point)
4387 (aarch64_remove_point): No longer check whether the type is
4388 supported here. Adjust to new interface.
4389 (the_low_target): Install aarch64_supports_z_point_type as
4390 supports_z_point_type method.
4391 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4392 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4393 instead of a Z packet char. Adjust.
4394 (arm_supports_z_point_type): New function.
4395 (arm_insert_point, arm_remove_point): Adjust to new interface.
4396 (the_low_target): Install arm_supports_z_point_type.
4397 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4398 (cris_insert_point, cris_remove_point): Adjust to new interface.
4399 Don't check whether the type is supported here.
4400 (the_low_target): Install cris_supports_z_point_type.
4401 * linux-low.c (linux_supports_z_point_type): New function.
4402 (linux_insert_point, linux_remove_point): Adjust to new interface.
4403 * linux-low.h (struct linux_target_ops) <insert_point,
4404 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4405 raw_breakpoint pointer parameter.
4406 <supports_z_point_type>: New method.
4407 * linux-mips-low.c (mips_supports_z_point_type): New function.
4408 (mips_insert_point, mips_remove_point): Adjust to new interface.
4409 Use mips_supports_z_point_type.
4410 (the_low_target): Install mips_supports_z_point_type.
4411 * linux-ppc-low.c (the_low_target): Install NULL as
4412 supports_z_point_type method.
4413 * linux-s390-low.c (the_low_target): Install NULL as
4414 supports_z_point_type method.
4415 * linux-sparc-low.c (the_low_target): Install NULL as
4416 supports_z_point_type method.
4417 * linux-x86-low.c (x86_supports_z_point_type): New function.
4418 (x86_insert_point): Adjust to new insert_point interface. Use
4419 insert_memory_breakpoint. Adjust to new
4420 i386_low_insert_watchpoint interface.
4421 (x86_remove_point): Adjust to remove_point interface. Use
4422 remove_memory_breakpoint. Adjust to new
4423 i386_low_remove_watchpoint interface.
4424 (the_low_target): Install x86_supports_z_point_type.
4425 * lynx-low.c (lynx_target_ops): Install NULL as
4426 supports_z_point_type callback.
4427 * nto-low.c (nto_supports_z_point_type): New.
4428 (nto_insert_point, nto_remove_point): Adjust to new interface.
4429 (nto_target_ops): Install nto_supports_z_point_type.
4430 * mem-break.c: Adjust intro comment.
4431 (struct raw_breakpoint) <raw_type, size>: New fields.
4432 <inserted>: Update comment.
4433 <shlib_disabled>: Delete field.
4434 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4435 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4436 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4437 (raw_bkpt_type_to_target_hw_bp_type): New function.
4438 (find_enabled_raw_code_breakpoint_at): New function.
4439 (find_raw_breakpoint_at): New type and size parameters. Use them.
4440 (insert_memory_breakpoint): New function, based off
4441 set_raw_breakpoint_at.
4442 (remove_memory_breakpoint): New function.
4443 (set_raw_breakpoint_at): Reimplement.
4444 (set_breakpoint): New, based on set_breakpoint_at.
4445 (set_breakpoint_at): Reimplement.
4446 (delete_raw_breakpoint): Go through the_target->remove_point
4447 instead of assuming memory breakpoints.
4448 (find_gdb_breakpoint_at): Delete.
4449 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4450 (find_gdb_breakpoint): New function.
4451 (set_gdb_breakpoint_at): Delete.
4452 (z_type_supported): New function.
4453 (set_gdb_breakpoint_1): New function, loosely based off
4454 set_gdb_breakpoint_at.
4455 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4456 (delete_gdb_breakpoint_at): Delete.
4457 (delete_gdb_breakpoint_1): New function, loosely based off
4458 delete_gdb_breakpoint_at.
4459 (delete_gdb_breakpoint): New function.
4460 (clear_gdb_breakpoint_conditions): Rename to ...
4461 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4462 breakpoint.
4463 (add_condition_to_breakpoint): Make static.
4464 (add_breakpoint_condition): Take a struct breakpoint pointer
4465 instead of an address. Adjust.
4466 (gdb_condition_true_at_breakpoint): Rename to ...
4467 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4468 z_type parameter.
4469 (gdb_condition_true_at_breakpoint): Reimplement.
4470 (add_breakpoint_commands): Take a struct breakpoint pointer
4471 instead of an address. Adjust.
4472 (gdb_no_commands_at_breakpoint): Rename to ...
4473 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4474 parameter. Return true if no breakpoint was found. Change debug
4475 output.
4476 (gdb_no_commands_at_breakpoint): Reimplement.
4477 (run_breakpoint_commands): Rename to ...
4478 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4479 and change return type to boolean.
4480 (run_breakpoint_commands): New function.
4481 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4482 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4483 breakpoint. Go through the_target->remove_point instead of
4484 assuming memory breakpoint.
4485 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4486 software and hardware breakpoints.
4487 (reinsert_raw_breakpoint): Go through the_target->insert_point
4488 instead of assuming memory breakpoint.
4489 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4490 software and hardware breakpoints.
4491 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4492 Check both software and hardware breakpoints.
4493 (validate_inserted_breakpoint): Assert the breakpoint is a
4494 software breakpoint. Set the inserted flag to -1 instead of
4495 setting shlib_disabled.
4496 (delete_disabled_breakpoints): Adjust.
4497 (validate_breakpoints): Only validate software breakpoints.
4498 Adjust to inserted flag change.
4499 (check_mem_read, check_mem_write): Skip breakpoint types other
4500 than software breakpoints. Adjust to inserted flag change.
4501 * mem-break.h (enum raw_bkpt_type): New enum.
4502 (raw_breakpoint, struct process_info): Forward declare.
4503 (Z_packet_to_target_hw_bp_type): Delete declaration.
4504 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4505 (set_gdb_breakpoint, delete_gdb_breakpoint)
4506 (clear_breakpoint_conditions): New declarations.
4507 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4508 (breakpoint_inserted_here): Update comment.
4509 (add_breakpoint_condition, add_breakpoint_commands): Replace
4510 address parameter with a breakpoint pointer parameter.
4511 (gdb_breakpoint_here): Update comment.
4512 (delete_gdb_breakpoint_at): Delete.
4513 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4514 * server.c (process_point_options): Take a struct breakpoint
4515 pointer instead of an address. Adjust.
4516 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4517 delete_gdb_breakpoint.
4518 * spu-low.c (spu_target_ops): Install NULL as
4519 supports_z_point_type method.
4520 * target.h: Include mem-break.h.
4521 (struct target_ops) <prepare_to_access_memory>: Update comment.
4522 <supports_z_point_type>: New field.
4523 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4524 instead of a char. Also take a raw breakpoint pointer.
4525 * win32-arm-low.c (the_low_target): Install NULL as
4526 supports_z_point_type.
4527 * win32-i386-low.c (i386_supports_z_point_type): New function.
4528 (i386_insert_point, i386_remove_point): Adjust to new interface.
4529 (the_low_target): Install i386_supports_z_point_type.
4530 * win32-low.c (win32_supports_z_point_type): New function.
4531 (win32_insert_point, win32_remove_point): Adjust to new interface.
4532 (win32_target_ops): Install win32_supports_z_point_type.
4533 * win32-low.h (struct win32_target_ops):
4534 <supports_z_point_type>: New method.
4535 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4536 instead of a char. Also take a raw breakpoint pointer.
4537
932539e3
PA
45382014-05-20 Pedro Alves <palves@redhat.com>
4539
4540 * mem-break.h: Include break-common.h.
4541 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4542 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4543 (Z_packet_to_target_hw_bp_type): New declaration.
4544 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4545 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4546 (Z_PACKET_ACCESS_WP): Delete macros.
4547 (Z_packet_to_hw_type): Delete function.
4548 * i386-low.h: Don't include break-common.h here.
4549 (Z_packet_to_hw_type): Delete declaration.
4550 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4551 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4552 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4553 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4554 * linux-aarch64-low.c: Don't include break-common.h here.
4555 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4556 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4557 (Z_packet_to_target_hw_bp_type): Delete function.
4558 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4559 function.
4560 (mips_insert_point, mips_remove_point): Use
4561 Z_packet_to_target_hw_bp_type.
4562
4ff0d3d8
PA
45632014-05-20 Pedro Alves <palves@redhat.com>
4564
4565 * linux-aarch64-low.c: Include break-common.h.
4566 (enum target_point_type): Delete.
4567 (Z_packet_to_point_type): Rename to ...
4568 (Z_packet_to_target_hw_bp_type): ... this, and return a
4569 target_hw_bp_type instead.
4570 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4571 instead of an enum target_point_type.
4572 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4573 breakpoint type.
4574 (aarch64_dr_state_insert_one_point)
4575 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4576 (aarch64_handle_aligned_watchpoint)
4577 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4578 Take an enum target_hw_bp_type instead of an enum
4579 target_point_type.
4580 (aarch64_supports_z_point_type): New function.
4581 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4582 use Z_packet_to_target_hw_bp_type.
4583
786dc519
JB
45842014-05-20 Joel Brobecker <brobecker@adacore.com>
4585
4586 * configure.ac: Only use -Werror by default when DEVELOPMENT
4587 is true.
4588 * configure: Regenerate.
4589
9e0aa64f
JK
45902014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4591
4592 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4593 * linux-x86-low.c (X86_64_USER_REGS): New.
4594 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4595
2b577b92
YQ
45962014-04-28 Yao Qi <yao@codesourcery.com>
4597
4598 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4599 name.
4600
94611da2
PA
46012014-04-25 Pedro Alves <palves@redhat.com>
4602
4603 PR server/16255
4604 * linux-low.c (linux_attach_fail_reason_string): New function.
4605 (linux_attach_lwp): Delete.
4606 (linux_attach_lwp_1): Rename to ...
4607 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4608 argument. Remove "initial" parameter. Return int instead of
4609 void. Don't error or warn here.
4610 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4611 failure to attach to the tgid. Call warning when failing to
4612 attach to an lwp.
4613 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4614 argument. Remove "initial" parameter. Return int instead of
4615 void. Don't error or warn here.
4616 (linux_attach_fail_reason_string): New declaration.
4617 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4618 interface change. Use linux_attach_fail_reason_string.
4619
01f9f808
MS
46202014-04-24 Michael Sturm <michael.sturm@mintel.com>
4621 Walfred Tedeschi <walfred.tedeschi@intel.com>
4622
4623 * Makefile.in: Added rules to handle new files
4624 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4625 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4626 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4627 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4628 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4629 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4630 x32-avx512-linux.o.
4631 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4632 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4633 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4634 i386/x32-avx512.xml.
4635 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4636 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4637 i386/x32-avx512-linux.xml.
4638 * i387-fp.c (num_avx512_k_registers): New constant for number
4639 of K registers.
4640 (num_avx512_zmmh_low_registers): New constant for number of
4641 lower ZMM registers (0-15).
4642 (num_avx512_zmmh_high_registers): New constant for number of
4643 higher ZMM registers (16-31).
4644 (num_avx512_ymmh_registers): New contant for number of higher
4645 YMM registers (ymm16-31 added by avx521 on x86_64).
4646 (num_avx512_xmm_registers): New constant for number of higher
4647 XMM registers (xmm16-31 added by AVX512 on x86_64).
4648 (struct i387_xsave): Add space for AVX512 registers.
4649 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4650 Add code to handle AVX512 registers.
4651 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4652 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4653 prototypei from generated file.
4654 (tdesc_amd64_avx512_linux): Likewise.
4655 (init_registers_x32_avx512_linux): Likewise.
4656 (tdesc_x32_avx512_linux): Likewise.
4657 (init_registers_i386_avx512_linux): Likewise.
4658 (tdesc_i386_avx512_linux): Likewise.
4659 (x86_64_regmap): Add AVX512 registers.
4660 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4661 mask.
4662 (initialize_low_arch): Add code to initialize AVX512 registers.
4663
51aa91f9
PA
46642014-04-23 Pedro Alves <palves@redhat.com>
4665
4666 * mem-break.c (find_gdb_breakpoint_at): Make static.
4667 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4668
a4165e94
PA
46692014-04-23 Pedro Alves <palves@redhat.com>
4670
4671 * i386-low.c: Don't include break-common.h here.
4672 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4673 prototype to take target_hw_bp_type as argument instead of a Z
4674 packet char.
4675 * i386-low.h: Include break-common.h here.
4676 (Z_packet_to_hw_type): Declare.
4677 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4678 prototypes.
4679 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4680 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4681 (x86_remove_point): Convert the packet number to a
4682 target_hw_bp_type before calling i386_low_remove_watchpoint.
4683 * win32-i386-low.c (i386_insert_point): Convert the packet number
4684 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4685 (i386_remove_point): Convert the packet number to a
4686 target_hw_bp_type before calling i386_low_remove_watchpoint.
4687
b8acf843
PA
46882014-04-23 Pedro Alves <palves@redhat.com>
4689
4690 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4691
d708bcd1
PA
46922014-04-10 Pedro Alves <palves@redhat.com>
4693
4694 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4695 Check if the condition or command is NULL before checking if the
4696 breakpoint is known. On success, return true.
4697 * mem-break.h (add_breakpoint_condition): Document return.
4698 (add_breakpoint_commands): Add describing comment.
4699 * server.c (skip_to_semicolon): New function.
4700 (process_point_options): Use it.
4701
2eec7d5b
PA
47022014-04-09 Pedro Alves <palves@redhat.com>
4703
4704 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4705 to lwpid_of.
4706
fa96cb38
PA
47072014-02-27 Pedro Alves <palves@redhat.com>
4708
4709 PR 12702
4710 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4711 macros.
4712 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4713 output.
4714 (last_thread_of_process_p): Take a PID argument instead of a
4715 thread pointer.
4716 (linux_wait_for_lwp): Delete.
4717 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4718 functions.
4719 (linux_low_filter_event): New function, party factored out from
4720 linux_wait_for_event.
4721 (linux_wait_for_event): Rename to ...
4722 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4723 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4724 sigsuspend. Check for zombie leaders.
4725 (linux_wait_for_event): Reimplement as wrapper around
4726 linux_wait_for_event_filtered.
4727 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4728 a normal or signal exit is seen, it's the whole process exiting.
4729 (wait_for_sigstop): No longer a for_each_inferior callback.
4730 Rewrite on top of linux_wait_for_event_filtered.
4731 (stop_all_lwps): Call wait_for_sigstop directly.
4732 * server.c (resume, handle_target_event): Handle
4733 TARGET_WAITKIND_NO_RESUMED.
4734
d763de10
JB
47352014-02-26 Joel Brobecker <brobecker@adacore.com>
4736
4737 * win32-low.c (psapi_get_dll_name,
4738 * win32_CreateToolhelp32Snapshot): Delete.
4739 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4740 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4741 Delete.
4742 (handle_load_dll): Add function description.
4743 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4744
850a0f76
JB
47452014-02-26 Joel Brobecker <brobecker@adacore.com>
4746
4747 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4748 Add comment.
4749 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4750 base address when calling win32_add_one_solib.
4751 (handle_load_dll): Delete local variable load_addr.
4752 Remove 0x1000 offset applied to DLL base address when calling
4753 win32_add_one_solib.
4754 (handle_unload_dll): Add comment.
4755
f25b3fc3
JB
47562014-02-26 Joel Brobecker <brobecker@adacore.com>
4757
4758 * win32-low.c (win32_add_all_dlls): Renames
4759 win32_ensure_ntdll_loaded. Rewrite function documentation.
4760 Adjust implementation to always load all DLLs.
4761 Add 0x1000 offset to DLL base address when calling
4762 win32_add_one_solib.
4763 (child_initialization_done): New static global.
4764 (do_initial_child_stuff): Set child_initialization_done to
4765 zero during child initialization, and 1 after. Replace call
4766 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4767 Add comment.
4768 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4769 (handle_unload_dll): Add function documentation.
4770 (get_child_debug_event): Ignore load and unload DLL events
4771 during child initialization.
4772
d86d4aaf
DE
47732014-02-20 Doug Evans <dje@google.com>
4774
3bc32da3 4775 Remove global all_lwps.
d86d4aaf
DE
4776 * inferiors.h (ptid_of): Move here from linux-low.h.
4777 (pid_of, lwpid_of): Ditto.
4778 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4779 parameter is a struct thread_info * now.
4780 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4781 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4782 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4783 directly.
4784 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4785 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4786 * linux-arm-low.c (update_registers_callback): Update, "entry"
4787 parameter is a struct thread_info * now.
4788 Fetch lwpid from current_inferior directly.
4789 (arm_insert_point): Pass &all_threads to find_inferior instead of
4790 &all_lwps.
4791 (arm_remove_point): Ditto.
4792 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4793 (arm_prepare_to_resume): Fetch pid from thread.
4794 (arm_read_description): Fetch lwpid from current_inferior directly.
4795 * linux-low.c (all_lwps): Delete.
4796 (delete_lwp): Delete call to remove_inferior.
4797 (handle_extended_wait): Fetch lwpid from thread.
4798 (add_lwp): Don't set lwp->entry.id. Remove call to
4799 add_inferior_to_list.
4800 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4801 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4802 (kill_one_lwp_callback): Ditto.
4803 (linux_kill): Don't dereference NULL pointer.
4804 Fetch ptid,lwpid from thread.
4805 (get_detach_signal): Fetch ptid from thread.
4806 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4807 Simplify call to regcache_invalidate_thread.
4808 (delete_lwp_callback): Update, "entry" parameter is a
4809 struct thread_info * now. Fetch pid from thread.
4810 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4811 (status_pending_p_callback): Update, "entry" parameter is a
4812 struct thread_info * now. Fetch ptid from thread.
4813 (find_lwp_pid): Update, "entry" parameter is a
4814 struct thread_info * now.
4815 (linux_wait_for_lwp): Fetch pid from thread.
4816 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4817 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4818 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4819 (dequeue_one_deferred_signal): Ditto.
4820 (cancel_breakpoint): Fetch ptid from current_inferior.
4821 (linux_wait_for_event): Pass &all_threads to find_inferior,
4822 not &all_lwps. Fetch ptid, lwpid from thread.
4823 (count_events_callback): Update, "entry" parameter is a
4824 struct thread_info * now.
4825 (select_singlestep_lwp_callback): Ditto.
4826 (select_event_lwp_callback): Ditto.
4827 (cancel_breakpoints_callback): Ditto.
4828 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4829 not &all_lwps.
4830 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4831 (unsuspend_one_lwp): Update, "entry" parameter is a
4832 struct thread_info * now.
4833 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4834 not &all_lwps.
4835 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4836 Fetch lwpid from thread, not lwp.
4837 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4838 Pass &all_threads to find_inferior, not &all_lwps.
4839 (send_sigstop): Fetch lwpid from thread, not lwp.
4840 (send_sigstop_callback): Update, "entry" parameter is a
4841 struct thread_info * now.
4842 (suspend_and_send_sigstop_callback): Ditto.
4843 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4844 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4845 struct thread_info * now.
4846 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4847 from thread, lwp.
4848 (lwp_running): Update, "entry" parameter is a
4849 struct thread_info * now.
4850 (stop_all_lwps): Fetch ptid from thread.
4851 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4852 (linux_resume_one_lwp): Fetch lwpid from thread.
4853 (linux_set_resume_request): Update, "entry" parameter is a
4854 struct thread_info * now. Fetch pid, lwpid from thread.
4855 (resume_status_pending_p): Update, "entry" parameter is a
4856 struct thread_info * now.
4857 (need_step_over_p): Ditto. Fetch lwpid from thread.
4858 (start_step_over): Fetch lwpid from thread.
4859 (linux_resume_one_thread): Update, "entry" parameter is a
4860 struct thread_info * now. Fetch lwpid from thread.
4861 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4862 (proceed_one_lwp): Update, "entry" parameter is a
4863 struct thread_info * now. Fetch lwpid from thread.
4864 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4865 struct thread_info * now.
4866 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4867 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4868 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4869 directly.
4870 (regsets_store_inferior_registers): Ditto.
4871 (fetch_register, store_register): Ditto.
4872 (linux_read_memory, linux_write_memory): Ditto.
4873 (linux_request_interrupt): Ditto.
4874 (linux_read_auxv): Ditto.
4875 (linux_xfer_siginfo): Ditto.
4876 (linux_qxfer_spu): Ditto.
4877 (linux_qxfer_libraries_svr4): Ditto.
4878 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4879 moved to inferiors.h.
4880 (get_lwp): Delete.
4881 (get_thread_lwp): Update.
4882 (struct lwp_info): Delete member "entry". Simplify comment for
4883 member "thread".
4884 (all_lwps): Delete.
4885 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4886 current_inferior directly.
4887 (update_watch_registers_callback): Update, "entry" parameter is a
4888 struct thread_info * now. Fetch pid from thread.
4889 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4890 (mips_insert_point): Fetch lwpid from current_inferior.
4891 Pass &all_threads to find_inferior, not &all_lwps.
4892 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4893 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4894 directly.
4895 (mips_stopped_data_address): Ditto.
4896 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4897 directly.
4898 * linux-tile-low.c (tile_arch_setup): Ditto.
4899 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4900 (update_debug_registers_callback): Update, "entry" parameter is a
4901 struct thread_info * now. Fetch pid from thread.
4902 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4903 Pass &all_threads to find_inferior, not &all_lwps.
4904 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4905 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4906 Pass &all_threads to find_inferior, not &all_lwps.
4907 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4908 (i386_dr_low_get_status): Ditto.
4909 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4910 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4911 (x86_linux_read_description): Ditto.
4912 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4913
3b8361aa
DE
49142014-02-20 Doug Evans <dje@google.com>
4915
4916 * inferiors.c (get_first_inferior): Fix buglet.
4917
f7667f0d
DE
49182014-02-19 Doug Evans <dje@google.com>
4919
4920 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4921 * inferiors.c (add_thread): Change result type to struct thread_info *.
4922 All callers updated.
4923 (add_lwp): Call add_thread here instead of in callers.
4924 All callers updated.
4925 * linux-low.h (get_lwp_thread): Rewrite.
4926 (struct lwp_info): New member "thread".
4927
b3312d80
DE
49282014-02-19 Doug Evans <dje@google.com>
4929
4930 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4931 All callers updated.
4932
ecc6f45c
DE
49332014-02-19 Doug Evans <dje@google.com>
4934
4935 * inferiors.c (add_thread): Fix whitespace.
4936
649ebbca
DE
49372014-02-19 Doug Evans <dje@google.com>
4938
4939 * dll.c (clear_dlls): Replace accessing list implemention details
4940 with API function.
4941 * gdbthread.h (get_first_thread): Declare.
4942 * inferiors.c (for_each_inferior_with_data): New function.
4943 (get_first_thread): New function.
4944 (find_thread_ptid): Simplify.
4945 (get_first_inferior): New function.
4946 (clear_list): Delete.
4947 (one_inferior_p): New function.
4948 (clear_inferior_list): New function.
4949 (clear_inferiors): Update.
4950 * inferiors.h (for_each_inferior_with_data): Declare.
4951 (clear_inferior_list): Declare.
4952 (one_inferior_p): Declare.
4953 (get_first_inferior): Declare.
4954 * linux-low.c (linux_wait_for_event): Replace accessing list
4955 implemention details with API function.
4956 * server.c (target_running): Ditto.
4957 (accumulate_file_name_length): New function.
4958 (emit_dll_description): New function.
4959 (handle_qxfer_libraries): Replace accessing list implemention
4960 details with API function.
4961 (handle_qxfer_threads_worker): New function.
4962 (handle_qxfer_threads_proper): Replace accessing list implemention
4963 details with API function.
4964 (handle_query): Ditto.
4965 (visit_actioned_threads_callback_ftype): New typedef.
4966 (visit_actioned_threads_data): New struct.
4967 (visit_actioned_threads): Rewrite to be find_inferior callback.
4968 (resume): Call find_inferior.
4969 (handle_status): Replace accessing list implemention
4970 details with API function.
4971 (process_serial_event): Replace accessing list implemention details
4972 with API function.
4973 * target.c (set_desired_inferior): Replace accessing list implemention
4974 details with API function.
4975 * tracepoint.c (same_process_p): New function.
4976 (gdb_agent_about_to_close): Replace accessing list implemention
4977 details with API function.
4978 * win32-low.c (child_delete_thread): Replace accessing list
4979 implemention details with API function.
4980 (match_dll_by_basename): New function.
4981 (dll_is_loaded_by_basename): New function.
4982 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4983 details call to dll_is_loaded_by_basename.
4984
80894984
DE
49852014-02-19 Doug Evans <dje@google.com>
4986
4987 * dll.h (struct dll_info): Add comment.
4988 * gdbthread.h (struct thread_info): Add comment.
4989 (current_ptid): Simplify.
4990 * inferiors.c (add_process): Update.
4991 (remove_process): Update.
4992 * inferiors.h (struct process_info): Rename member "head" to "entry".
4993 * linux-low.c (delete_lwp): Update.
4994 (add_lwp): Update.
4995 (last_thread_of_process_p): Update.
4996 (kill_one_lwp_callback, linux_kill): Update.
4997 (status_pending_p_callback): Update.
4998 (wait_for_sigstop): Update. Simplify read of ptid.
4999 (start_step_over): Update.
5000 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5001 (get_lwp_thread): Update.
5002 (struct lwp_info): Rename member "head" to "entry".
5003 * regcache.h (inferior_list_entry): Delete.
5004 * server.c (kill_inferior_callback): Update.
5005 (detach_or_kill_inferior_callback): Update.
5006 (print_started_pid): Update.
5007 (print_attached_pid): Update.
5008 (process_serial_event): Simplify read of ptid.
5009 * thread-db.c (thread_db_create_event): Update.
5010 (thread_db_get_tls_address): Update.
5011 * win32-low.c (current_inferior_ptid): Simplify.
5012
46917d26
TT
50132014-02-19 Tom Tromey <tromey@redhat.com>
5014
5015 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5016 argument.
5017 (target_supports_btrace): Update.
5018
0759a81e
YQ
50192014-02-14 Yao Qi <yao@codesourcery.com>
5020
5021 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5022 (rsp-low-ipa.o): New target.
5023
a7191e8b
TT
50242014-02-12 Tom Tromey <tromey@redhat.com>
5025
5026 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5027 convert_ascii_to_int.
5028 * regcache.c (registers_to_string): Likewise.
5029 * remote-utils.c (decode_M_packet): Likewise.
5030 * server.c (process_serial_event): Likewise.
5031
ff0e980e
TT
50322014-02-12 Tom Tromey <tromey@redhat.com>
5033
5034 * server.c (handle_query, handle_v_run): Use hex2bin, not
5035 unhexify.
5036 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5037
e9371aff
TT
50382014-02-12 Tom Tromey <tromey@redhat.com>
5039
5040 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5041 convert_int_to_ascii.
5042 * regcache.c (registers_to_string, collect_register_as_string):
5043 Likewise.
5044 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5045 Likewise.
5046 * server.c (process_serial_event): Likewise.
5047 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5048 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5049
971dc0b8
TT
50502014-02-12 Tom Tromey <tromey@redhat.com>
5051
5052 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5053 bin2hex, not hexify.
5054 * tracepoint.c (cmd_qtstatus): Likewise.
5055
0a822afb
TT
50562014-02-12 Tom Tromey <tromey@redhat.com>
5057
5058 * remote-utils.c (monitor_output): Pass explicit length to
5059 hexify.
5060
9c3d6531
TT
50612014-02-12 Tom Tromey <tromey@redhat.com>
5062
5063 * tracepoint.c: Include rsp-low.h.
5064 * server.c: Include rsp-low.h.
5065 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5066 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5067 declare.
5068 * remote-utils.c: Include rsp-low.h.
5069 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5070 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5071 (convert_int_to_ascii, convert_ascii_to_int): Move to
5072 common/rsp-low.c.
5073 * regcache.c: Include rsp-low.h.
5074 * ax.c: Include rsp-low.h.
5075 * Makefile.in (SFILES): Add common/rsp-low.c.
5076 (OBS): Add rsp-low.o.
5077 (rsp-low.o): New target.
5078
01fd3ea5
TT
50792014-02-12 Tom Tromey <tromey@redhat.com>
5080
5081 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5082 Include print-utils.h.
5083 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5084 (plongest, thirty_two, phex_nz): Remove.
5085 * Makefile.in (SFILES): Add common/print-utils.c.
5086 (OBS): Add print-utils.o.
5087 (print-utils-ipa.o): New target.
5088 (print-utils.o): New target.
5089 (IPA_OBJS): Add print-utils-ipa.o.
5090
e99dc820
TT
50912014-02-06 Tom Tromey <tromey@redhat.com>
5092
5093 * Makefile.in (SFILES): Fix indentation.
5094
ee1e2d4f
DE
50952014-02-05 Doug Evans <dje@google.com>
5096
5097 * linux-low.c (linux_wait_for_event): Improve comment.
5098 (linux_wait_1): Keep current_inferior in sync with event_child.
5099
f5a02773
DE
51002014-01-22 Doug Evans <dje@google.com>
5101
5102 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5103
87ce2a04
DE
51042014-01-22 Doug Evans <dje@google.com>
5105
5106 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5107 * configure: Regenerate.
5108 * config.in: Regenerate.
5109 * Makefile.in (SFILES): Add debug.c.
5110 (OBS): Add debug.o.
5111 * debug.c: New file.
5112 * debug.h: New file.
5113 * linux-aarch64-low.c (*): Update all debugging printfs to use
5114 debug_printf instead of fprintf.
5115 * linux-arm-low.c (*): Ditto.
5116 * linux-cris-low.c (*): Ditto.
5117 * linux-crisv32-low.c (*): Ditto.
5118 * linux-m32r-low.c (*): Ditto.
5119 * linux-sparc-low.c (*): Ditto.
5120 * linux-x86.c (*): Ditto.
5121 * linux-low.c (*): Ditto.
5122 (linux_wait_1): Add calls to debug_enter, debug_exit.
5123 (linux_wait): Remove redundant debugging printf.
5124 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5125 (linux_resume, unstop_all_lwps): Ditto.
5126 * mem-break.c (*): Update all debugging printfs to use
5127 debug_printf instead of fprintf.
5128 * remote-utils.c (*): Ditto.
5129 * thread-db.c (*): Ditto.
5130 * server.c #include <ctype.h>, "gdb_vecs.h".
5131 (debug_threads): Moved to debug.c.
5132 (*): Update all debugging printfs to use debug_printf instead of
5133 fprintf.
5134 (start_inferior): Replace call to fflush with call to debug_flush.
5135 (monitor_show_help): Mention set debug-format.
5136 (parse_debug_format_options): New function.
5137 (handle_monitor_command): Handle "monitor set debug-format".
5138 (gdbserver_usage): Mention --debug-format.
5139 (main): Parse --debug-format.
5140 * server.h (debug_threads): Declaration moved to debug.h.
5141 #include "debug.h".
5142 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5143 trace_debug_1 that uses debug_printf.
5144 (tracepoint_look_up_symbols): Update all debugging printfs to use
5145 debug_printf instead of fprintf.
5146
e671835b
BS
51472014-01-20 Baruch Siach <baruch@tkos.co.il>
5148
5149 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5150 sys/ptrace.h.
5151
b5737fa9
PA
51522014-01-17 Pedro Alves <palves@redhat.com>
5153
ea38d2a9 5154 PR build/16445
c7faa97a
PA
5155 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5156 defined after including gdb_proc_service.h.
b5737fa9 5157
40ed484e
DE
51582014-01-16 Doug Evans <dje@google.com>
5159
5160 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5161 (match_dll): Use it.
5162
969c39fb
MM
51632014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5164
5165 * target.h (target_ops) <read_btrace>: Change parameters and
5166 return type to allow error reporting.
5167 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5168 trace reading errors on.
5169 * linux-low.c (linux_low_read_btrace): Pass trace reading
5170 errors on.
5171 (linux_low_disable_btrace): New.
5172
ab7f45ba
DE
51732014-01-15 Doug Evans <dje@google.com>
5174
5175 * inferiors.c (thread_id_to_gdb_id): Delete.
5176 * inferiors.h (thread_id_to_gdb_id): Delete.
5177
66af0f44
EZ
51782014-01-13 Eli Zaretskii <eliz@gnu.org>
5179
5180 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5181 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5182 versions.
5183
9939e131
PA
51842014-01-08 Pedro Alves <palves@redhat.com>
5185
5186 * server.c (handle_status): Don't discard previous queued stop
5187 replies or thread's pending status here.
5188 (main) <disconnection>: Do it here instead.
5189
b7ea362b
PA
51902014-01-08 Pedro Alves <palves@redhat.com>
5191
5192 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5193 * server.c (visit_actioned_threads, handle_pending_status): New
5194 function.
5195 (handle_v_cont): Factor out parts to ...
5196 (resume): ... this new function. If in all-stop, and a thread
5197 being resumed has a pending status, report it without actually
5198 resuming.
5199 (myresume): Adjust to use the new 'resume' function.
5200 (clear_pending_status_callback, set_pending_status_callback)
5201 (find_status_pending_thread_callback): New functions.
5202 (handle_status): Handle the case of multiple threads having
5203 interesting statuses to report. Report threads' real last signal
5204 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5205 with an interesting thread to report the status for, instead of
5206 always reporting the status of the first thread.
5207
28498c42
JB
52082014-01-01 Joel Brobecker <brobecker@adacore.com>
5209
5210 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5211 * gdbreplay.c (gdbreplay_version): Likewise.
5212
f45c82da
YZ
52132013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5214
5215 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5216 iov.iov_len with the real length in use.
5217
379a5e2d
JB
52182013-12-13 Joel Brobecker <brobecker@adacore.com>
5219
5220 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5221 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5222 for all targets that use win32-low.c.
5223 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5224 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5225
4210d83e
PA
52262013-12-13 Pedro Alves <palves@redhat.com>
5227
5228 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5229 if equal to TARGET_WAITKIND_LOADED.
5230 * win32-low.c (cached_status): New static global.
5231 (win32_wait): Add declaration.
5232 (do_initial_child_stuff): Flush all initial pending debug events
5233 up to the initial breakpoint.
5234 (win32_wait): If CACHED_STATUS was set, return that instead
5235 of doing a real wait. Remove the code resuming the execution
5236 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5237 during the initial phase. Also remove the code changing
5238 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5239 TARGET_WAITKIND_STOPPED.
5240
e7f0d979
YQ
52412013-12-11 Yao Qi <yao@codesourcery.com>
5242
5243 * notif.c (handle_notif_ack): Return 0 if no notification
5244 matches.
5245
ebcf782c
DE
52462013-11-20 Doug Evans <dje@google.com>
5247
5248 * linux-low.c (linux_set_resume_request): Fix comment.
5249
20ad9378
DE
52502013-11-20 Doug Evans <dje@google.com>
5251
5252 * linux-low.c (resume_status_pending_p): Tweak comment.
5253
a196ebeb
WT
52542013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5255
5256 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5257 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5258 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5259 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5260 (srv_amd64_regobj): Add amd64-mpx.o.
5261 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5262 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5263 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5264 * i387-fp.c (num_pl_bnd_register) Added constant.
5265 (num_pl_bnd_cfg_registers) Added constant.
5266 (struct i387_xsave) Added reserved area and MPX fields.
5267 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5268 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5269 function.
5270 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5271 (init_registers_amd64_mpx_linux): Declare new function.
5272 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5273 (x86_64_regmap): Add MPX registers.
5274 (x86_linux_read_description): Add MPX case.
5275 (initialize_low_arch): Initialize MPX targets.
5276
0080a2f6
TT
52772013-11-18 Tom Tromey <tromey@redhat.com>
5278
5279 * configure: Rebuild.
5280 * configure.ac: Don't check for stdlib.h.
5281 * gdbreplay.c: Unconditionally include stdlib.h.
5282
2978b111
TT
52832013-11-18 Tom Tromey <tromey@redhat.com>
5284
5285 * config.in: Rebuild.
5286 * configure: Rebuild.
5287 * configure.ac: Don't use AC_HEADER_DIRENT.
5288
a3d08894
TT
52892013-11-18 Tom Tromey <tromey@redhat.com>
5290
5291 * server.h: Don't check HAVE_STRING_H.
5292 * gdbreplay.c: Don't check HAVE_STRING_H.
5293 * configure: Rebuild.
5294
0a5dd17d
TT
52952013-11-18 Tom Tromey <tromey@redhat.com>
5296
5297 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5298 LIBGNU.
5299
1bd2f0ba
TT
53002013-11-08 Tom Tromey <tromey@redhat.com>
5301
5302 * configure, config.in: Rebuild.
5303 * configure.ac: Remove unused configury.
5304
3266f10b
TT
53052013-11-08 Tom Tromey <tromey@redhat.com>
5306
5307 * acinclude.m4: Include common.m4, codeset.m4.
5308 * configure, config.in: Rebuild.
5309 * configure.ac: Use GDB_AC_COMMON.
5310
6682d959
AA
53112013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5312
5313 * linux-s390-low.c (HWCAP_S390_TE): New define.
5314 (s390_arch_setup): Consider the TE field in the HWCAP for
5315 determining 'have_regset_tdb'.
5316
fd0a4d76
SDJ
53172013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5318
5319 PR gdb/16014
5320 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5321 call to sizeof.
5322
1a3d890b
PA
53232013-10-02 Pedro Alves <palves@redhat.com>
5324
5325 * server.c (process_serial_event): Don't output "GDBserver
5326 exiting" if GDB is connected through stdio.
5327 * target.c (mywait): Likewise, be silent if GDB is connected
5328 through stdio.
5329
97ad4581
JB
53302013-10-01 Joel Brobecker <brobecker@adacore.com>
5331
5332 * lynx-low.c (lynx_add_threads_after_attach): New function.
5333 (lynx_attach): Remove call to add_thread. Add call to
5334 lynx_add_threads_after_attach instead.
5335
5b4e221c
MF
53362013-09-28 Mike Frysinger <vapier@gentoo.org>
5337
5338 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5339 * config.in, configure: Regenerated.
5340
ee47b2f8
YQ
53412013-09-18 Yao Qi <yao@codesourcery.com>
5342
5343 PR server/15959
5344 * server.c (start_inferior): Clear 'resume_info'.
5345
d6707650 53462013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5347
d6707650
JW
5348 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5349 for each register.
5350
9243dd0e 53512013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5352
9243dd0e
JW
5353 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5354 linux-tile-low.o to srv_tgtobj.
5355
c623a6ef
WN
53562013-09-16 Will Newton <will.newton@linaro.org>
5357
5358 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5359 out regs.
5360
fb71d39e
PA
53612013-09-06 Pedro Alves <palves@redhat.com>
5362
5363 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5364 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5365 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5366 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5367 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5368 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5369
8e7e9910
PA
53702013-09-06 Pedro Alves <palves@redhat.com>
5371
5372 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5373 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5374
7c3a12ca
PA
53752013-09-06 Pedro Alves <palves@redhat.com>
5376
5377 * linux-amd64-ipa.c: Include tracepoint.h.
5378 * linux-i386-ipa.c: Include tracepoint.h.
5379
8eb3d7b6
RW
53802013-09-06 Ricard Wanderlof <ricardw@axis.com>
5381
5382 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5383 (ps_get_thread_area): New function.
5384
eddddb9d
RW
53852013-09-06 Ricard Wanderlof <ricardw@axis.com>
5386
5387 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5388 (initialize_low_arch): Call init_registers_crisv32 rather than
5389 init_register_crisv32.
5390
533b0600
PA
53912013-09-05 Pedro Alves <palves@redhat.com>
5392
5393 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5394 to ...
5395 * hostio.h: ... this new file.
5396 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5397 win32-low.c: Include hostio.h.
5398
0ce3d3b5
PA
53992013-09-05 Pedro Alves <palves@redhat.com>
5400
5401 * server.h (gdb_client_data, handler_func, callback_handler_func)
5402 (delete_file_handler, add_file_handler, append_callback_event)
5403 (delete_callback_event, start_event_loop, initialize_event_loop):
5404 Move to event-loop.h and include it.
5405 * event-loop.h: New file.
5406
799cdc37
PA
54072013-09-05 Pedro Alves <palves@redhat.com>
5408
5409 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5410 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5411 (loaded_dll, unloaded_dll): Move to ...
5412 * dll.h: ... this new file.
5413 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5414
6a6bbd9d
PA
54152013-09-05 Pedro Alves <palves@redhat.com>
5416
5417 * server.h (current_process, get_thread_process, all_processes)
5418 (add_inferior_to_list, for_each_inferior, current_inferior)
5419 (remove_inferior, add_process, remove_process, find_process_pid)
5420 (have_started_inferiors_p, have_attached_inferiors_p)
5421 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5422 (clear_inferiors, find_inferior, find_inferior_id)
5423 (inferior_target_data, set_inferior_target_data)
5424 (inferior_regcache_data, set_inferior_regcache_data): Move to
5425 inferiors.h, and include it.
5426 * inferiors.h: New file.
5427
f699aaba
PA
54282013-09-05 Pedro Alves <palves@redhat.com>
5429
5430 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5431 Move ...
72f4393d 5432 * ax.h: ... here.
f699aaba 5433
c144c7a0
PA
54342013-09-05 Pedro Alves <palves@redhat.com>
5435
5436 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5437 tracepoint.h.
5438 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5439 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5440 (handle_tracepoint_general_set, handle_tracepoint_query)
5441 (tracepoint_finished_step, tracepoint_was_hit)
5442 (release_while_stepping_state_list, current_traceframe)
5443 (in_readonly_region, traceframe_read_mem)
5444 (fetch_traceframe_registers, traceframe_read_sdata)
5445 (traceframe_read_info, struct fast_tpoint_collect_status)
5446 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5447 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5448 (supply_fast_tracepoint_registers)
5449 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5450 (ipa_tdesc, claim_trampoline_space)
5451 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5452 (agent_mem_read, agent_get_trace_state_variable_value)
5453 (agent_set_trace_state_variable_value, agent_tsv_read)
5454 (agent_mem_read_string, get_raw_reg_func_addr)
5455 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5456 * tracepoint.h: ... this new file.
5457
ff42e6ab
PA
54582013-09-05 Pedro Alves <palves@redhat.com>
5459
5460 * server.h (perror_with_name, error, fatal, warning, paddress)
5461 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5462 include it.
5463 * utils.h: New file.
5464
541af0f4
PA
54652013-09-05 Pedro Alves <palves@redhat.com>
5466
5467 * server.h (remote_debug, noack_mode, transport_is_reliable)
5468 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5469 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5470 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5471 (write_enn, initialize_async_io, enable_async_io)
5472 (disable_async_io, check_remote_input_interrupt_request)
5473 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5474 (dead_thread_notify, prepare_resume_reply)
5475 (decode_address_to_semicolon, decode_address, decode_m_packet)
5476 (decode_M_packet, decode_X_packet, decode_xfer_write)
5477 (decode_search_memory_packet, unhexify, hexify)
5478 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5479 (look_up_one_symbol, relocate_instruction)
5480 (monitor_output): Move to remote-utils.h, and include it.
5481 * remote-utils.h: New file.
5482
eebdf26b
PA
54832013-09-05 Pedro Alves <palves@redhat.com>
5484
5485 * server.h (_): Delete.
5486
3aafd2ff
PA
54872013-09-02 Pedro Alves <palves@redhat.com>
5488
5489 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5490 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5491 allocated.
5492 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5493
cee83bcb
PM
54942013-09-02 Pierre Muller <muller@sourceware.org>
5495
5496 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5497 or WriteProcessMemory complete successfully and handle
5498 ERROR_PARTIAL_COPY error.
5499
9a13b2fa
PA
55002013-09-02 Pedro Alves <palves@redhat.com>
5501
5502 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5503 error instead of EIO.
5504
602e3198
JK
55052013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5506
5507 PR server/15604
5508 * linux-low.c: Include filestuff.h.
5509 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5510 * lynx-low.c: Include filestuff.h.
5511 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5512 * server.c: Include filestuff.h.
5513 (main): Call notice_open_fds.
5514 * spu-low.c: Include filestuff.h.
5515 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5516
96d7229d
LM
55172013-08-22 Luis Machado <lgustavo@codesourcery.com>
5518
5519 * Makefile.in: Explain why ../target and ../nat are not
5520 listed as include file search paths.
5521 (linux-waitpid.o): New object file rule.
5522 * configure.srv (srv_native_linux_obj): New variable.
5523 Replace all occurrences of linux native object files with
5524 $srv_native_linux_obj.
5525 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5526 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5527 (linux_enable_event_reporting): Remove declaration.
5528 (my_waitpid): Moved to common/linux-waitpid.c.
5529 (linux_wait_for_event): Pass ptid when calling
5530 linux_enable_event_reporting.
5531 (linux_supports_tracefork_flag): Remove.
5532 (linux_enable_event_reporting): Likewise.
5533 (linux_tracefork_grandchild): Remove.
5534 (STACK_SIZE): Moved to common/linux-ptrace.c.
5535 (linux_tracefork_child): Remove.
5536 (linux_test_for_tracefork): Remove.
5537 (linux_look_up_symbols): Call linux_supports_traceclone.
5538 (initialize_low): Remove call to linux_test_for_tracefork.
5539 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5540 common/linux-ptrace.h.
5541 (PTRACE_TYPE_ARG4): Likewise.
5542 Include linux-ptrace.h.
5543
32940073
PA
55442013-08-21 Pedro Alves <palves@redhat.com>
5545
5546 * config.in: Renegerate.
5547
33b60d58 55482013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 5549
33b60d58
LM
5550 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5551 (SFILES): Remove $(srcdir)/common/target-common.c and
5552 add $(srcdir)/target/waitstatus.c.
5553 (OBS): Remove target-common.o and add waitstatus.o.
5554 (server_h): Remove $(srcdir)/../common/target-common.h and
5555 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5556 and $(srcdir)/../target/waitstatus.h.
5557 (target-common.o): Remove.
5558 (waitstatus.o): New target object file.
5559 * target.h: Do not include target-common.h and
5560 include target/resume.h, target/wait.h and
5561 target/waitstatus.h.
5562
b8e1b30e
LM
55632013-08-13 Luis Machado <lgustavo@codesourcery.com>
5564
5565 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5566 to PTRACE_TYPE_ARG3.
5567 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5568 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5569 PTRACE_TYPE_ARG4.
5570 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5571 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5572
7a60ad40
YQ
55732013-07-27 Jie Zhang <jie@codesourcery.com>
5574 Daniel Jacobowitz <dan@codesourcery.com>
5575 Yao Qi <yao@codesourcery.com>
5576
5577 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5578 (mips-linux-watch.o): New rule.
5579 (mips_linux_watch_h): New variable.
5580 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5581 srv_tgtobj.
5582 * linux-mips-low.c: Include mips-linux-watch.h.
5583 (struct arch_process_info, struct arch_lwp_info): New.
5584 (update_watch_registers_callback): New function.
5585 (mips_linux_new_process, mips_linux_new_thread) New functions.
5586 (mips_linux_prepare_to_resume, mips_insert_point): New
5587 functions.
5588 (mips_remove_point, mips_stopped_by_watchpoint): New
5589 functions.
5590 (rsp_bp_type_to_target_hw_bp_type): New function.
5591 (mips_stopped_data_address): New function.
5592 (the_low_target): Add watchpoint support functions.
5593
de6f69ad
YQ
55942013-07-27 Yao Qi <yao@codesourcery.com>
5595
5596 * i386-low.c: Include break-common.h.
5597 (enum target_hw_bp_type): Remove.
5598
3360c0bf
LM
55992013-07-24 Luis Machado <lgustavo@codesourcery.com>
5600
5601 * Makefile.in (SFILES): /common/target-common.c.
5602 (OBS): Add target-common.o.
5603 (server_h): Add $(srcdir)/../common/target-common.h.
5604 (target-common.o): New target.
5605 * server.c (queue_stop_reply_callback): Free
5606 status string after use.
5607 * target.c (target_waitstatus_to_string): Remove.
5608 * target.h: Include target-common.h.
5609 (resume_kind): Likewise.
5610 (target_waitkind): Likewise.
5611 (target_waitstatus): Likewise.
5612 (TARGET_WNOHANG): Likewise.
5613
bd885420
YQ
56142013-07-04 Yao Qi <yao@codesourcery.com>
5615
5616 * Makefile.in (host_alias): Use @host_noncanonical@.
5617 (target_alias): Use @target_noncanonical@.
5618 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5619 ACX_NONCANONICAL_HOST.
5620 * configure: Regenerated.
5621
5622 Revert:
5623 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5624
5625 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5626 * configure: Rebuild.
5627 * Makefile.in (version_host, version_target): Get from configure.
5628 (version.c): Use $(version_host) and $(version_target).
5629
17ef446e
PA
56302013-07-03 Pedro Alves <palves@redhat.com>
5631
5632 * Makefile.in (config.status): Depend on development.sh.
5633 * acinclude.m4: Include libmcheck.m4.
5634 * configure: Regenerate.
5635
7a9a7487
MG
56362013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5637
5638 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5639 attribute inside the parentheses.
5640 (winapi_DebugSetProcessKillOnExit): Ditto.
5641 (winapi_DebugBreakProcess): Ditto.
5642 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 5643
49b64de6
MG
56442013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5645
5646 * notif.h (notif_event): Add a dummy member to avoid compiler
5647 errors.
5648
d5749ee7
PA
56492013-07-01 Pedro Alves <palves@redhat.com>
5650
5651 * hostio.c (HOSTIO_PATH_MAX): Define.
5652 (require_filename, handle_open, handle_unlink, handle_readlink):
5653 Use it.
5654
d8d2a3ee
PA
56552013-07-01 Pedro Alves <palves@redhat.com>
5656
5657 * server.h: Include "pathmax.h".
5658 * linux-low.c: Don't include sys/param.h.
5659 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5660 MAXPATHLEN.
5661 * win32-low.c: Don't include sys/param.h.
5662 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5663
bc7dea8d
PA
56642013-07-01 Pedro Alves <palves@redhat.com>
5665
5666 * event-loop.c: Don't check HAVE_UNISTD_H before including
5667 <unistd.h>.
5668 * gdbreplay.c: Likewise.
5669 * remote-utils.c: Likewise.
5670 * server.c: Likewise.
5671 * configure.ac: Don't check for unistd.h.
5672 * configure: Regenerate.
5673
d6c2da54
TT
56742013-06-28 Tom Tromey <tromey@redhat.com>
5675
5676 * Makefile.in (version.c): Use version.in, not
5677 common/version.in.
5678
257b6bec
MG
56792013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5680
5681 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5682 * configure: Rebuild.
5683 * Makefile.in (version_host, version_target): Get from configure.
5684 (version.c): Use $(version_host) and $(version_target).
5685
86ebe149
DK
56862013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5687
5688 Fix trace-status to output user name without trailing colon.
5689 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5690
f30aa5af
DK
56912013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5692
5693 Fix trace-status to output proper start-time and stop-time.
5694 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5695 output start time and stop time in hex as gdb expects.
5696
28a93511
YQ
56972013-06-26 Pedro Alves <pedro@codesourcery.com>
5698
5699 * tracepoint.c (build_traceframe_info_xml): Output trace state
5700 variables present in the trace buffer.
5701
01208463
TT
57022013-06-24 Tom Tromey <tromey@redhat.com>
5703
5704 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5705 create-version.sh.
5706 (version.o): Remove.
5707 * gdbreplay.c: Include version.h.
5708 (version, host_name): Don't declare.
5709 * server.h: Include version.h.
5710 (version, host_name): Don't declare.
5711
760256f9
PA
57122013-06-12 Pedro Alves <palves@redhat.com>
5713
5714 * linux-x86-low.c (linux_is_elf64): Delete global.
5715 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5716 with local linux_pid_exe_is_elf_64_file use.
5717
030031ee
PA
57182013-06-11 Pedro Alves <palves@redhat.com>
5719
5720 * linux-low.c (regset_disabled, disable_regset): New functions.
5721 (regsets_fetch_inferior_registers)
5722 (regsets_store_inferior_registers): Use them.
5723 (initialize_regsets_info); Don't allocate the disabled_regsets
5724 array here.
5725 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5726 comment.
5727
5da6eb0a
PA
57282013-06-11 Pedro Alves <palves@redhat.com>
5729
5730 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5731 xmalloc.
5732
7e5aaa09
PA
57332013-06-11 Pedro Alves <palves@redhat.com>
5734
5735 * linux-x86-low.c (initialize_low_arch): Call
5736 init_registers_x32_avx_linux.
5737
d878444c
JK
57382013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5739
5740 Fix compatibility with Android Bionic.
5741 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5742 it is not empty.
5743
3aee8918
PA
57442013-06-07 Pedro Alves <palves@redhat.com>
5745
5f2b57b5 5746 PR server/14823
3aee8918
PA
5747 * Makefile.in (OBS): Add tdesc.o.
5748 (IPA_OBJS): Add tdesc-ipa.o.
5749 (tdesc-ipa.o): New rule.
5750 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5751 interface.
5752 * linux-low.c (new_inferior): Delete.
5753 (disabled_regsets, num_regsets): Delete.
5754 (linux_add_process): Adjust to set the new per-process
5755 new_inferior flag.
5756 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5757 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5758 was a stop. When calling arch_setup, switch the current inferior
5759 to the thread that got an event.
5760 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5761 (regsets_fetch_inferior_registers)
5762 (regsets_store_inferior_registers): New regsets_info parameter.
5763 Adjust to use it.
5764 (linux_register_in_regsets): New regs_info parameter. Adjust to
5765 use it.
5766 (register_addr, fetch_register, store_register): New usrregs_info
5767 parameter. Adjust to use it.
5768 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5769 parameter regs_info. Adjust to use it.
5770 (linux_fetch_registers): Get the current inferior's regs_info, and
5771 adjust to use it.
5772 (linux_store_registers): Ditto.
5773 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5774 (initialize_low): Don't initialize the target_regsets here. Call
5775 initialize_low_arch.
5776 * linux-low.h (target_regsets): Delete declaration.
5777 (struct regsets_info): New.
5778 (struct usrregs_info): New.
5779 (struct regs_info): New.
5780 (struct process_info_private) <new_inferior>: New field.
5781 (struct linux_target_ops): Delete the num_regs, regmap, and
5782 regset_bitmap fields. New field regs_info.
5783 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5784 * i387-fp.c (num_xmm_registers): Delete.
5785 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5786 calls to new interface.
5787 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5788 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5789 Infer the number of xmm registers from the regcache's target
5790 description.
5791 * i387-fp.h (num_xmm_registers): Delete.
5792 * inferiors.c (add_thread): Don't install the thread's regcache
5793 here.
5794 * proc-service.c (gregset_info): Fetch the current inferior's
5795 regs_info. Adjust to use it.
5796 * regcache.c: Include tdesc.h.
5797 (register_bytes, reg_defs, num_registers)
5798 (gdbserver_expedite_regs): Delete.
5799 (get_thread_regcache): If the thread doesn't have a regcache yet,
5800 create one, instead of aborting gdbserver.
5801 (regcache_invalidate_one): Rename to ...
5802 (regcache_invalidate_thread): ... this.
5803 (regcache_invalidate_one): New.
5804 (regcache_invalidate): Only invalidate registers of the current
5805 process.
5806 (init_register_cache): Add target_desc parameter, and use it.
5807 (new_register_cache): Ditto. Assert the target description has a
5808 non zero registers_size.
5809 (regcache_cpy): Add assertions. Adjust.
5810 (realloc_register_cache, set_register_cache): Delete.
5811 (registers_to_string, registers_from_string): Adjust.
5812 (find_register_by_name, find_regno, find_register_by_number)
5813 (register_cache_size): Add target_desc parameter, and use it.
5814 (free_register_cache_thread, free_register_cache_thread_one)
5815 (regcache_release, register_cache_size): New.
5816 (register_size): Add target_desc parameter, and use it.
5817 (register_data, supply_register, supply_register_zeroed)
5818 (supply_regblock, supply_register_by_name, collect_register)
5819 (collect_register_as_string, collect_register_by_name): Adjust.
5820 * regcache.h (struct target_desc): Forward declare.
5821 (struct regcache) <tdesc>: New field.
5822 (init_register_cache, new_register_cache): Add target_desc
5823 parameter.
5824 (regcache_invalidate_thread): Declare.
5825 (regcache_invalidate_one): Delete declaration.
5826 (regcache_release): Declare.
5827 (find_register_by_number, register_cache_size, register_size)
5828 (find_regno): Add target_desc parameter.
5829 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5830 declarations.
5831 * remote-utils.c: Include tdesc.h.
5832 (outreg, prepare_resume_reply): Adjust.
5833 * server.c: Include tdesc.h.
5834 (gdbserver_xmltarget): Delete declaration.
5835 (get_features_xml, process_serial_event): Adjust.
5836 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5837 declare.
5838 (struct process_info) <tdesc>: New field.
5839 (ipa_tdesc): Declare.
5840 * tdesc.c: New file.
5841 * tdesc.h: New file.
5842 * tracepoint.c: Include tdesc.h.
5843 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5844 (get_context_regcache): Adjust to pass ipa_tdesc down.
5845 (do_action_at_tracepoint): Adjust to get the register cache size
5846 from the context regcache's description.
5847 (traceframe_walk_blocks): Adjust to get the register cache size
5848 from the current trace frame's description.
5849 (traceframe_get_pc): Adjust to get current trace frame's
5850 description and pass it down.
5851 (gdb_collect): Adjust to get the register cache size from the
5852 IPA's description.
5853 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5854 (gdbserver_xmltarget): Delete.
5855 (initialize_low_tracepoint): Set the ipa's target description.
5856 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5857 (initialize_low_tracepoint): Set the ipa's target description.
5858 * linux-x86-low.c: Include tdesc.h.
5859 [__x86_64__] (is_64bit_tdesc): New.
5860 (ps_get_thread_area, x86_get_thread_area): Use it.
5861 (i386_cannot_store_register): Rename to ...
5862 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5863 (i386_cannot_fetch_register): Rename to ...
5864 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5865 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5866 to new interface.
5867 (target_regsets): Rename to ...
5868 (x86_regsets): ... this.
5869 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5870 interface.
5871 (x86_siginfo_fixup): Use is_64bit_tdesc.
5872 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5873 (tdesc_x32_avx_linux, tdesc_x32_linux)
5874 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5875 Declare.
5876 (x86_linux_update_xmltarget): Delete.
5877 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5878 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5879 (AMD64_LINUX_USER64_CS): New.
5880 (x86_linux_read_description): New, based on
5881 x86_linux_update_xmltarget.
5882 (same_process_callback): New.
5883 (x86_arch_setup_process_callback): New.
5884 (x86_linux_update_xmltarget): New.
5885 (x86_regsets_info): New.
5886 (amd64_linux_regs_info): New.
5887 (i386_linux_usrregs_info): New.
5888 (i386_linux_regs_info): New.
5889 (x86_linux_regs_info): New.
5890 (x86_arch_setup): Reimplement.
5891 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5892 (x86_emit_ops): Ditto.
5893 (the_low_target): Adjust. Install x86_linux_regs_info,
5894 x86_cannot_fetch_register, and x86_cannot_store_register.
5895 (initialize_low_arch): New.
5896 * linux-ia64-low.c (tdesc_ia64): Declare.
5897 (ia64_fetch_register): Adjust.
5898 (ia64_usrregs_info, regs_info): New globals.
5899 (ia64_regs_info): New function.
5900 (the_low_target): Adjust.
5901 (initialize_low_arch): New function.
5902 * linux-sparc-low.c (tdesc_sparc64): Declare.
5903 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5904 Adjust.
5905 (sparc_arch_setup): New function.
5906 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5907 (the_low_target): Adjust.
5908 (initialize_low_arch): New function.
5909 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5910 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5911 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5912 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5913 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5914 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5915 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5916 (tdesc_powerpc_isa205_vsx64l): Declare.
5917 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5918 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5919 (ppc_set_pc, ppc_get_hwcap): Adjust.
5920 (ppc_usrregs_info): Forward declare.
5921 (!__powerpc64__) ppc_regmap_adjusted: New global.
5922 (ppc_arch_setup): Adjust to the current process'es target
5923 description.
5924 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5925 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5926 (ppc_store_evrregset): Adjust.
5927 (target_regsets): Rename to ...
5928 (ppc_regsets): ... this, and make static.
5929 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5930 (ppc_regs_info): New function.
5931 (the_low_target): Adjust.
5932 (initialize_low_arch): New function.
5933 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5934 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5935 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5936 (tdesc_s390x_linux64v2): Declare.
5937 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5938 (s390_fill_gregset, s390_store_last_break): Adjust.
5939 (target_regsets): Rename to ...
5940 (s390_regsets): ... this, and make static.
5941 (s390_get_pc, s390_set_pc): Adjust.
5942 (s390_get_hwcap): New target_desc parameter, and use it.
5943 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5944 (s390_arch_setup): Adjust to set the current process'es target
5945 description. Don't adjust the regmap.
5946 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5947 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5948 (regs_info_3264): New globals.
5949 (s390_regs_info): New function.
5950 (the_low_target): Adjust.
5951 (initialize_low_arch): New function.
5952 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5953 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5954 [__mips64] (init_registers_mips_linux)
5955 (init_registers_mips_dsp_linux): Delete defines.
5956 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5957 (have_dsp): New global.
5958 (mips_read_description): New, based on mips_arch_setup.
5959 (mips_arch_setup): Reimplement.
5960 (get_usrregs_info): New function.
5961 (mips_cannot_fetch_register, mips_cannot_store_register)
5962 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5963 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5964 (target_regsets): Rename to ...
5965 (mips_regsets): ... this, and make static.
5966 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5967 (dsp_regs_info, regs_info): New globals.
5968 (mips_regs_info): New function.
5969 (the_low_target): Adjust.
5970 (initialize_low_arch): New function.
5971 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5972 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5973 Declare.
5974 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5975 (arm_read_description): New, with bits factored from
5976 arm_arch_setup.
5977 (arm_arch_setup): Reimplement.
5978 (target_regsets): Rename to ...
5979 (arm_regsets): ... this, and make static.
5980 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5981 (arm_regs_info): New function.
5982 (the_low_target): Adjust.
5983 (initialize_low_arch): New function.
5984 * linux-m68k-low.c (tdesc_m68k): Declare.
5985 (target_regsets): Rename to ...
5986 (m68k_regsets): ... this, and make static.
5987 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5988 (m68k_regs_info): New function.
5989 (m68k_arch_setup): New function.
5990 (the_low_target): Adjust.
5991 (initialize_low_arch): New function.
5992 * linux-sh-low.c (tdesc_sharch): Declare.
5993 (target_regsets): Rename to ...
5994 (sh_regsets): ... this, and make static.
5995 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5996 (sh_regs_info, sh_arch_setup): New functions.
5997 (the_low_target): Adjust.
5998 (initialize_low_arch): New function.
5999 * linux-bfin-low.c (tdesc_bfin): Declare.
6000 (bfin_arch_setup): New function.
6001 (bfin_usrregs_info, regs_info): New globals.
6002 (bfin_regs_info): New function.
6003 (the_low_target): Adjust.
6004 (initialize_low_arch): New function.
6005 * linux-cris-low.c (tdesc_cris): Declare.
6006 (cris_arch_setup): New function.
6007 (cris_usrregs_info, regs_info): New globals.
6008 (cris_regs_info): New function.
6009 (the_low_target): Adjust.
6010 (initialize_low_arch): New function.
6011 * linux-cris-low.c (tdesc_crisv32): Declare.
6012 (cris_arch_setup): New function.
6013 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6014 (cris_regs_info): New function.
6015 (the_low_target): Adjust.
6016 (initialize_low_arch): New function.
6017 * linux-m32r-low.c (tdesc_m32r): Declare.
6018 (m32r_arch_setup): New function.
6019 (m32r_usrregs_info, regs_info): New globals.
6020 (m32r_regs_info): Adjust.
6021 (initialize_low_arch): New function.
6022 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6023 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6024 (tic6x_usrregs_info): Forward declare.
6025 (tic6x_read_description): New function, based on ...
6026 (tic6x_arch_setup): ... this. Reimplement.
6027 (target_regsets): Rename to ...
6028 (tic6x_regsets): ... this, and make static.
6029 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6030 (tic6x_regs_info): New function.
6031 (the_low_target): Adjust.
6032 (initialize_low_arch): New function.
6033 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6034 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6035 (target_regsets): Rename to ...
6036 (xtensa_regsets): ... this, and make static.
6037 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6038 globals.
6039 (xtensa_arch_setup, xtensa_regs_info): New functions.
6040 (the_low_target): Adjust.
6041 (initialize_low_arch): New function.
6042 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6043 (nios2_arch_setup): Set the current process'es tdesc.
6044 (target_regsets): Rename to ...
6045 (nios2_regsets): ... this.
6046 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6047 (nios2_regs_info): New function.
6048 (the_low_target): Adjust.
6049 (initialize_low_arch): New function.
a261b8f5
PA
6050 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6051 (aarch64_arch_setup): Set the current process'es tdesc.
6052 (target_regsets): Rename to ...
6053 (aarch64_regsets): ... this.
6054 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6055 (aarch64_regs_info): New function.
6056 (the_low_target): Adjust.
6057 (initialize_low_arch): New function.
3aee8918
PA
6058 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6059 globals.
6060 (target_regsets): Rename to ...
6061 (tile_regsets): ... this.
6062 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6063 (tile_regs_info): New function.
6064 (tile_arch_setup): Set the current process'es tdesc.
6065 (the_low_target): Adjust.
6066 (initialize_low_arch): New function.
6067 * spu-low.c (tdesc_spu): Declare.
6068 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6069 * win32-arm-low.c (tdesc_arm): Declare.
6070 (arm_arch_setup): New function.
6071 (the_low_target): Install arm_arch_setup instead of
6072 init_registers_arm.
6073 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6074 (init_windows_x86): Rename to ...
6075 (i386_arch_setup): ... this. Set `win32_tdesc'.
6076 (the_low_target): Adjust.
6077 * win32-low.c (win32_tdesc): New global.
6078 (child_add_thread): Don't create the thread cache here.
6079 (do_initial_child_stuff): Set the new process'es tdesc.
6080 * win32-low.h (struct target_desc): Forward declare.
6081 (win32_tdesc): Declare.
6082 * lynx-i386-low.c (tdesc_i386): Declare global.
6083 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6084 * lynx-low.c (lynx_tdesc): New global.
6085 (lynx_add_process): Set the new process'es tdesc.
6086 * lynx-low.h (struct target_desc): Forward declare.
6087 (lynx_tdesc): Declare global.
6088 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6089 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6090 * nto-low.c (nto_tdesc): New global.
6091 (do_attach): Set the new process'es tdesc.
6092 * nto-low.h (struct target_desc): Forward declare.
6093 (nto_tdesc): Declare.
6094 * nto-x86-low.c (tdesc_i386): Declare.
6095 (nto_x86_arch_setup): Set `nto_tdesc'.
6096
b1fbec62
GB
60972013-06-04 Gary Benson <gbenson@redhat.com>
6098
6099 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6100 to qSupported response when appropriate.
6101 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6102 with nonzero-length annex.
6103 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6104 arguments supplied in annex.
6105
d1ec4ce7
DE
61062013-05-31 Doug Evans <dje@google.com>
6107
ac44adcb 6108 PR server/15594
d1ec4ce7
DE
6109 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6110 64 bits in 64-cross-32 environment.
6111
9b25f2d3
PA
61122013-05-28 Pedro Alves <palves@redhat.com>
6113
6114 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6115 (aarch64-without-fpu.c): Delete rule.
6116 * configure.srv (aarch64*-*-linux*): Remove references to
6117 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6118 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6119 declaration.
6120
6740dc9c
PA
61212013-05-24 Pedro Alves <palves@redhat.com>
6122
6123 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6124 instead of strchr/decode_address. Error if the range isn't split
6125 with a ','. Don't assume there's be a ':' in the action.
6126
c2d6af84
PA
61272013-05-23 Yao Qi <yao@codesourcery.com>
6128 Pedro Alves <palves@redhat.com>
6129
6130 * linux-low.c (lwp_in_step_range): New function.
6131 (linux_wait_1): If the thread was range stepping and stopped
6132 outside the stepping range, report the stop to GDB. Otherwise,
6133 continue stepping. Add range stepping debug output.
6134 (linux_set_resume_request): Copy the step range from the resume
6135 request to the lwp.
6136 (linux_supports_range_stepping): New.
6137 (linux_target_ops) <supports_range_stepping>: Set to
6138 linux_supports_range_stepping.
6139 * linux-low.h (struct linux_target_ops)
6140 <supports_range_stepping>: New field.
6141 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6142 * linux-x86-low.c (x86_supports_range_stepping): New.
6143 (the_low_target) <supports_range_stepping>: Set to
6144 x86_supports_range_stepping.
6145 * server.c (handle_v_cont): Handle 'r' action.
6146 (handle_v_requests): Append ";r" if the target supports range
6147 stepping.
6148 * target.h (struct thread_resume) <step_range_start,
6149 step_range_end>: New fields.
6150 (struct target_ops) <supports_range_stepping>:
6151 New field.
6152 (target_supports_range_stepping): New macro.
6153
58794e1a
JB
61542013-05-17 Joel Brobecker <brobecker@adacore.com>
6155
6156 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6157 confusion in comment.
6158
d631c5a7
JB
61592013-05-17 Joel Brobecker <brobecker@adacore.com>
6160
6161 * lynx-low.c (struct process_info_private): New type.
6162 (lynx_add_process): New function.
6163 (lynx_create_inferior, lynx_attach): Replace calls to
6164 add_process by calls to lynx_add_process.
6165 (lynx_resume): If PTID is null, then try using
6166 current_process()->private->last_wait_event_ptid.
6167 Add comments.
6168 (lynx_clear_inferiors): Delete. The contents of that function
6169 has been inlined in lynx_mourn;
6170 (lynx_wait_1): Save the ptid in the process's private data.
6171 (lynx_mourn): Free the process' private data. Replace call
6172 to lynx_clear_inferiors by call to clear_inferiors.
6173
96f7a20f
YQ
61742013-05-17 Yao Qi <yao@codesourcery.com>
6175
6176 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6177 the right place.
6178
db0dfaa0
LM
61792013-05-16 Luis Machado <lgustavo@codesourcery.com>
6180
6181 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6182 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6183 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6184 PT_TEXT_END_ADDR guards. Update comments.
6185 (linux_target_op) <read_offsets>: Conditionally define to
6186 linux_read_offsets if the target is UCLIBC and if it defines
6187 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6188
68f5f838
SL
61892013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6190 Andrew Jenner <andrew@codesourcery.com>
6191
6192 * Makefile.in (SFILES): Add linux-nios2-low.c.
6193 (clean): Add action to delete nios2-linux.c.
6194 (nios2-linux.c): New rule.
6195 * configure.srv: Add nios2*-*-linux*.
6196 * linux-nios2-low.c: New.
6197
1ebff1fd
HAQ
61982013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6199
6200 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6201
f6150862
HZ
62022013-04-25 Hui Zhu <hui@codesourcery.com>
6203
6204 PR gdb/15186
f6150862
HZ
6205 * ax.c (ax_printf): Add fflush.
6206
614c279d
TT
62072013-04-22 Tom Tromey <tromey@redhat.com>
6208
6209 * Makefile.in (SFILES): Add filestuff.c.
6210 (OBS): Add filestuff.o.
6211 (filestuff.o): New target.
6212 * config.in, configure: Rebuild.
6213 * configure.ac: Check for fdwalk, pipe2.
6214
7d4e5717
PA
62152013-04-17 Pedro Alves <palves@redhat.com>
6216
6217 * configure.ac (USE_THREAD_DB): Delete variable.
6218 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6219 Don't AC_SUBST USE_THREAD_DB.
6220 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6221 * config.in, configure: Regenerate.
6222
d5c93e41
PA
62232013-04-16 Pedro Alves <palves@redhat.com>
6224
6225 * linux-low.h (struct lwp_info) <thread_known>: Move under
6226 the USE_THREAD_DB #ifdef.
6227
04f5fe89
PA
62282013-04-16 Pedro Alves <palves@redhat.com>
6229
6230 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6231 (linux-low.o): Delete rule.
6232 * linux-low.h: Always include "gdb_thread_db.h" instead of
6233 conditionally including thread_db.h.
6234 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6235 HAVE_THREAD_DB_H.
6236
480b27bf
JK
62372013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6238
6239 * Makefile.in (install-only): Fix make install regression.
6240
43662968
JK
62412013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6242
6243 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6244 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6245 installation.
6246 * gdbserver.1: Remove.
6247
3e74e146
PA
62482013-03-22 Pedro Alves <palves@redhat.com>
6249
6250 * linux-low.c (handle_extended_wait): Don't call
6251 linux_enable_event_reporting.
6252
a8347a2a
TT
62532013-03-15 Tony Theodore <tonyt@logyst.com>
6254
6255 PR build/9098:
6256 * Makefile.in (SHELL): Use @SHELL@.
6257
eeb56fa7
SDJ
62582013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6259
6260 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6261 compiler warning.
6262
4fa7e2ff
JB
62632013-03-13 Joel Brobecker <brobecker@adacore.com>
6264
6265 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6266 Remove extraneous NULL element.
6267
8ddb1965
YQ
62682013-03-13 Yao Qi <yao@codesourcery.com>
6269
6270 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6271 'V' block in trace frame.
6272
9accd112
MM
62732013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6274
6275 * target.h (struct target_ops): Add btrace ops.
6276 (target_supports_btrace): New macro.
6277 (target_enable_btrace): New macro.
6278 (target_disable_btrace): New macro.
6279 (target_read_btrace): New macro.
6280 * gdbthread.h (struct thread_info): Add btrace field.
6281 * server.c: Include btrace-common.h.
6282 (handle_btrace_general_set): New function.
6283 (handle_btrace_enable): New function.
6284 (handle_btrace_disable): New function.
6285 (handle_general_set): Call handle_btrace_general_set.
6286 (handle_qxfer_btrace): New function.
6287 (struct qxfer qxfer_packets[]): Add btrace entry.
6288 * inferiors.c (remove_thread): Disable btrace.
6289 * linux-low: Include linux-btrace.h.
6290 (linux_low_enable_btrace): New function.
6291 (linux_low_read_btrace): New function.
6292 (linux_target_ops): Add btrace ops.
6293 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6294 Add srv_linux_btrace=yes.
6295 (x86_64-*-linux*): Add linux-btrace.o.
6296 Add srv_linux_btrace=yes.
6297 * configure.ac: Define HAVE_LINUX_BTRACE.
6298 * config.in: Regenerated.
6299 * configure: Regenerated.
6300
5cc22e4c
MM
63012013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6302
6303 * server.c (handle_qxfer): Preserve error message if -3 is
6304 returned.
6305 (qxfer): Document the -3 return value.
6306
7c97f91e
MM
63072013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6308
6309 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6310 (linux_btrace_h): New variable.
6311 (linux-btrace.o): New rule.
6312
be9a119c 63132013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6314 Hafiz Abid Qadeer <abidh@codesourcery.com>
6315
6316 * tracepoint.c (trace_buffer_size): New global.
6317 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6318 (init_trace_buffer): Change to one-argument function. Allocate
6319 trace buffer memory.
6320 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6321 handle QTBuffer:size packet.
6322 (cmd_bigqtbuffer_size): New function.
6323 (initialize_tracepoint): Call init_trace_buffer with
6324 DEFAULT_TRACE_BUFFER_SIZE.
6325 * server.c (handle_query): Add QTBuffer:size in the
6326 supported packets.
6327
e64f7499
YQ
63282013-03-07 Yao Qi <yao@codesourcery.com>
6329
6330 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6331 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6332 of -1.
6333 (cmd_qtsp): Adjust condition. Do post increment.
6334 Set cur_action and cur_step_action back to 0.
6335
f0ae6fc3
PA
63362013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6337
6338 PR server/15236
6339 * linux-low.c (linux_write_memory): Return early success if LEN is
6340 zero.
6341
b5b0b0af
CV
63422013-03-05 Corinna Vinschen <vinschen@redhat.de>
6343
334ad4a8 6344 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6345
589bc927
TT
63462013-02-28 Tom Tromey <tromey@redhat.com>
6347
6348 * configure.ac: Invoke AC_SYS_LARGEFILE.
6349 * configure, config.in: Rebuild.
6350
dfe07582
CV
63512013-02-28 Corinna Vinschen <vinschen@redhat.com>
6352
6353 * win32-low.c: Throughout, fix format strings and casts of
6354 printf-like functions to avoid type related warnings on all
6355 platforms.
6356 (get_child_debug_event): Print dwDebugEventCode as hex since
6357 that's how it's usually documented.
6358
736cd585
YQ
63592013-02-28 Yao Qi <yao@codesourcery.com>
6360
6361 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6362 pulongest.
6363
e1f58301
JW
63642013-02-27 Jiong Wang <jiwang@tilera.com>
6365
6366 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6367 (reg-tilegx32.c): New rule.
6368 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6369 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6370 different register info initializer according to elf class.
6371 (init_registers_tilgx32): New function. The tilegx32 register info
6372 initializer.
6373 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6374 (tile_store_gregset): Likewise.
6375
d171ca78
YQ
63762013-02-27 Yao Qi <yao@codesourcery.com>
6377
6378 * server.c (process_point_options): Print debug message when
6379 debug_threads is true.
6380
282bbdf3
YQ
63812013-02-26 Yao Qi <yao@codesourcery.com>
6382
6383 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6384
aca22551
PA
63852013-02-19 Pedro Alves <palves@redhat.com>
6386 Kai Tietz <ktietz@redhat.com>
6387
6388 PR gdb/15161
6389
6390 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6391 instead of strtoul to extract address from packet.
6392 (process_serial_event) <'z'>: Likewise.
6393
4f3cee1c
YQ
63942013-02-18 Yao Qi <yao@codesourcery.com>
6395
6396 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6397
8e1d55a3
PA
63982013-02-14 Pedro Alves <palves@redhat.com>
6399
6400 Plug memory leak.
6401
6402 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6403 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6404
458820da
PA
64052013-02-14 Pedro Alves <palves@redhat.com>
6406
6407 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6408
baea0dae
PA
64092013-02-14 Pedro Alves <palves@redhat.com>
6410
6411 * tracepoint.c (save_string): Delete.
6412 (add_tracepoint_action): Use savestring instead of save_string.
6413
0b1afbb3
PA
64142013-02-12 Pedro Alves <palves@redhat.com>
6415
6416 * linux-xtensa-low.c: Ditto.
6417 * xtensa-xtregs.c: Ditto.
6418
8a4ac37e
PA
64192013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6420
6421 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6422 thread_db.
6423
148de6bb
MS
64242013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6425
6426 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6427 aarch64_num_wp_regs and aarch64_num_bp_regs to
6428 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6429
55fac6e0
MS
64302013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6431
6432 * linux-aarch64-low.c (ps_get_thread_area): Replace
6433 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6434
176eb98c
MS
64352013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6436 Marcus Shawcroft <marcus.shawcroft@arm.com>
6437 Nigel Stephens <nigel.stephens@arm.com>
6438 Yufeng Zhang <yufeng.zhang@arm.com>
6439
6440 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6441 (aarch64.c, aarch64-without-fpu.c): New targets.
6442 * configure.srv (aarch64*-*-linux*): New.
6443 * linux-aarch64-low.c: New file.
6444
56f7af9c
MS
64452013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6446
43aaf8b6 6447 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
6448 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6449 (dequeue_one_deferred_signal, linux_resume_one_thread)
6450 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6451 (linux_tracefork_grandchild, linux_test_for_tracefork)
6452 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6453 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6454 where the argument is 0.
6455
60f662b0
YQ
64562013-01-25 Yao Qi <yao@codesourcery.com>
6457
6458 * event-loop.c: Include "queue.h".
6459 (gdb_event_p): New typedef.
6460 (struct gdb_event) <next_event>: Remove.
6461 (event_queue): Change to QUEUE(gdb_event_p).
6462 (async_queue_event): Remove.
6463 (gdb_event_xfree): New.
6464 (initialize_event_loop): New.
6465 (process_event): Use API from QUEUE.
6466 (wait_for_event): Likewise.
6467 * server.c (main): Call initialize_event_loop.
6468 * server.h (initialize_event_loop): Declare.
6469
5ae4861a
YQ
64702013-01-18 Yao Qi <yao@codesourcery.com>
6471
6472 * ax.h (struct eval_agent_expr_context): New.
6473 (gdb_eval_agent_expr): Update declaration.
6474 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6475 TFRAME. Add new argument CTX.
6476 * server.h (struct eval_agent_expr_context): Declare.
6477 (agent_mem_read, agent_tsv_read): Update declaration.
6478 (agent_mem_read_string): Likewise.
6479 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6480 (add_traceframe_block): Add new argument TPOINT.
6481 Increase TPOINT->traceframe_usage.
6482 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6483 eval_tracepoint_agent_expr.
6484 (condition_true_at_tracepoint): Likewise.
6485 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6486 (agent_mem_read_string, agent_tsv_read): Likewise.
6487
85e00e85
YQ
64882013-01-16 Yao Qi <yao@codesourcery.com>
6489
6490 * linux-low.c (linux_resume_one_lwp): Don't check
6491 'lwp->bp_reinsert != 0'.
6492
4039cf45
JB
64932013-01-07 Joel Brobecker <brobecker@adacore.com>
6494 Pedro Alves <palves@redhat.com>
6495
6496 * lynx-low.c (ptrace_request_to_str): Define a temporary
6497 macro and use it to simplify this function's implementation.
6498
9044dee2
JB
64992013-01-07 Joel Brobecker <brobecker@adacore.com>
6500
6501 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6502 sets errno.
6503
e6352c8f
JB
65042013-01-07 Joel Brobecker <brobecker@adacore.com>
6505
6506 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6507
50681a27
JB
65082013-01-07 Joel Brobecker <brobecker@adacore.com>
6509
6510 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6511
3f6e77ef
JB
65122013-01-07 Joel Brobecker <brobecker@adacore.com>
6513
6514 * lynx-low.c (lynx_resume): Use the resume_info parameter
6515 to determine the ptid for the lynx_ptrace call, unless
6516 it is equal to minus_one_ptid, in which case we use the
6517 ptid of the current_inferior.
6518 (lynx_wait_1): After having received a thread create/exit
6519 event, resume the inferior's execution using the signaling
6520 thread's ptid, rather than the old ptid.
6521
7fda33ae
JB
65222013-01-07 Joel Brobecker <brobecker@adacore.com>
6523
6524 * lynx-low.c (lynx_resume): Delete variable ret.
6525
b9786c74
JB
65262013-01-01 Joel Brobecker <brobecker@adacore.com>
6527
6528 * gdbreplay.c (gdbreplay_version): Update copyright year.
6529 * server.c (gdbserver_version): Likewise.
6530
8b93d60f
JB
65312012-12-17 Joel Brobecker <brobecker@adacore.com>
6532
6533 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6534 new thread.
6535
037335a7
JB
65362012-12-17 Joel Brobecker <brobecker@adacore.com>
6537
6538 * lynx-low.c (ptrace_request_to_str): Add handling for
6539 PTRACE_GETTRACESIG.
6540
52d4cbd8
JB
65412012-12-17 Joel Brobecker <brobecker@adacore.com>
6542
6543 * lynx-low.c (lynx_attach): Delete variable new_process.
6544
ab8f6ca9
JB
65452012-12-17 Joel Brobecker <brobecker@adacore.com>
6546
6547 * lynx-low.c (lynx_create_inferior): Delete variable
6548 new_process.
6549
78cbc024
JB
65502012-12-17 Joel Brobecker <brobecker@adacore.com>
6551
6552 * lynx-low.c (ptrace_request_to_str): Do not handle
6553 PTRACE_GETTHREADLIST if this macro does not exist.
6554
14a00470
YQ
65552012-12-15 Yao Qi <yao@codesourcery.com>
6556
6557 * Makefile.in (OBS): Add notif.o.
6558 * notif.c, notif.h: New.
6559 * server.c: Include "notif.h".
6560 (struct vstop_notif) <next>: Remove.
6561 <base>: New field.
6562 (queue_stop_reply): Update.
6563 (push_event, send_next_stop_reply): Remove.
6564 (discard_queued_stop_replies): Update.
6565 (notif_stop): New variable.
6566 (handle_v_stopped): Remove.
6567 (handle_v_requests): Don't call handle_v_stopped. Call
6568 handle_ack_notif instead.
6569 (queue_stop_reply_callback): Call notif_event_enque instead
6570 of queue_stop_reply.
6571 (handle_status): Don't call send_next_stop_reply, call
6572 notif_write_event instead.
6573 (kill_inferior_callback): Likewise.
6574 (detach_or_kill_inferior_callback): Likewise.
6575 (main): Call initialize_notif.
6576 (process_serial_event): Call QUEUE_is_empty.
6577 (handle_target_event): Call notif_push instead of push event.
6578 * server.h (push_event): Remove declaration.
6579
61c125b9
TT
65802012-12-10 Tom Tromey <tromey@redhat.com>
6581
6582 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6583 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6584 macros.
6585 (.c.o): Rewrite.
6586 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6587 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6588 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6589 (amd64-linux-ipa.o, ax.o): Rewrite.
6590 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6591 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6592 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6593 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6594 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6595 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6596 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6597 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6598 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6599 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6600 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6601 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6602 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6603 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6604 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6605 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6606 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6607 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6608 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6609 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6610 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6611 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6612 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6613 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6614 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6615 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6616 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6617 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6618 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6619 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6620 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6621 (reg-tilegx.o): Remove.
6622 (all_object_files): New macro.
6623 Include .deps files.
6624 * aclocal.m4, configure: Rebuild.
6625 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6626 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6627 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6628
e90e9ad9
TT
66292012-12-05 Tom Tromey <tromey@redhat.com>
6630
6631 PR gdb/14917:
6632 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6633
02d403bf 66342012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
6635
6636 * configure.ac: Check for linux/perf_event.h.
6637 * config.in: Regenerated.
6638 * configure: Regenerated.
6639
0270a750
PA
66402012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6641
6642 * hostio.c (handle_readlink): Decrease buffer size
6643 parameter passed to readlink by one byte.
6644
8c29b58e
YQ
66452012-11-26 Yao Qi <yao@codesourcery.com>
6646
6647 * configure.ac (build_warnings): Append '-Wempty-body'.
6648 * configure: Regenerated.
6649 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6650 body.
6651
8bdce1ff
PM
66522012-11-15 Pierre Muller <muller@sourceware.org>
6653
6654 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6655 * config.in: Regenerate.
6656 * configure: Regenerate.
6657 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6658 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6659 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6660 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6661 header.
6662 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6663 instead of <sys/wait.h> header.
6664 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6665
02d403bf 66662012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6667
6668 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6669 (various make rules): Remove -DGDBSERVER
6670
fbd5db48
YQ
66712012-11-09 Yao Qi <yao@codesourcery.com>
6672
6673 * spu-low.c (current_ptid): Move it to ..
6674 * gdbthread.h: ... here. New.
6675 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6676 * server.c (myresume, process_serial_event): Likewise.
6677 * thread-db.c (thread_db_find_new_threads): Likewise.
6678 * tracepoint.c (run_inferior_command): Likewise.
6679
b3dc46ff
AB
66802012-10-01 Andrew Burgess <aburgess@broadcom.com>
6681
6682 * server.c (handle_search_memory_1): Include access length in
6683 warning message.
6684
07c04788
HPN
66852012-09-05 Michael Brandt <michael.brandt@axis.com>
6686
6687 * linux-crisv32-low.c: Fix compile errors.
6688
918d227b
YQ
66892012-09-04 Yao Qi <yao@codesourcery.com>
6690
6691 * tracepoint.c (cmd_qtsv): Adjust debug message.
6692 Don't check CUR_TPOINT.
6693
18c1b81a
YQ
66942012-08-28 Yao Qi <yao@codesourcery.com>
6695
6696 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6697 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6698 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6699 Remove declarations of xmalloc, xreallloc, xstrdup and
6700 freeargv.
6701 * Makefile.in (libiberty_h): New.
6702 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6703 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6704
dc82f37b
YQ
67052012-08-23 Yao Qi <yao@codesourcery.com>
6706
6707 * server.h: Remove declaration of 'xsnprintf'.
6708
406b1477
KS
67092012-08-22 Keith Seitz <keiths@redhat.com>
6710
6711 * server.h: Include build-gnulib-gbserver/config.h.
6712 * gdbreplay.c: Likewise.
6713
e6712ff1
DE
67142012-08-08 Doug Evans <dje@google.com>
6715
6716 * Makefile.in (SFILES): Add gdb_vecs.c.
6717 (OBS): Add gdb_vecs.o.
6718 (gdb_vecs_h, host_defs_h): New variables.
6719 (thread-db.o): Add $(gdb_vecs_h) dependency.
6720 (gdb_vecs.o): New rule.
6721 * thread-db.c: #include "gdb_vecs.h".
6722 (thread_db_load_search): Use a vector to iterate over path elements.
6723 Handle text appearing after "$pdir".
6724
6725 * configure.ac: Add check for strstr.
6726 * config.in: Regenerate.
6727 * configure: Regenerate.
6728
7c3270ae
UW
67292012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6730
6731 * hostio.c (handle_pread): If pread fails, fall back to attempting
6732 lseek/read.
6733 (handle_pwrite): Likewise for pwrite.
6734
b62e2b27
UW
67352012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6736
6737 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6738 between unsupported TYPE and unimplementable ADDR/LEN combination.
6739 (arm_insert_point): Act on new return value.
6740
78a99e91
PA
67412012-07-31 Pedro Alves <palves@redhat.com>
6742
6743 * server.c (process_point_options): Only skip tokens if we find
6744 one that is unrecognized. Don't treat 'X' specially while
6745 skipping unrecognized tokens.
6746
fcf303ab
UW
67472012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6748
6749 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6750 to 4-byte-align HW breakpoint addresses for Thumb.
6751
7255706c
YQ
67522012-07-27 Yao Qi <yao@codesourcery.com>
6753
6754 PR remote/14161.
6755
6756 * server.h: Declare gdb_agent_about_to_close.
6757 * target.c (kill_inferior): Include "agent.h".
6758 New. Send command 'kill'.
6759 * target.h (kill_inferior): Removed macro.
6760 * tracepoint.c (gdb_agent_about_to_close): New.
6761 (gdb_agent_helper_thread): Handle command 'close'.
6762 Wait endlessly until the inferior stops.
6763 Install gdb_agent_remove_socket to atexit hook.
6764 (agent_socket_name): New static variable.
6765 (gdb_agent_socket_init): Replace local variable 'name' with
6766 'agent_socket_name'.
6767 (gdb_agent_remove_socket): New.
6768
5a3f286f
YQ
67692012-07-27 Yao Qi <yao@codesourcery.com>
6770
6771 * server.c (process_point_options): Stop at 'X' when parsing.
6772
961bd387
ME
67732012-07-19 Michael Eager <eager@eagercon.com>
6774
a261b8f5 6775 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6776 to hw_execute.
6777 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6778 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6779 hardware breakpoint.
6780
aa7c7447
JK
67812012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6782
6783 * gdbserver/linux-low.c (initialize_low): Call
6784 linux_ptrace_init_warnings.
6785
7f216e7c
DE
67862012-07-02 Doug Evans <dje@google.com>
6787
6788 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6789 pointer to int.
6790
d3ce09f5
SS
67912012-07-02 Stan Shebs <stan@codesourcery.com>
6792
6793 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6794 (ax.o): Add it to build rule.
6795 (ax-ipa.o): Ditto.
6796 (OBS): Add format.o.
6797 (IPA_OBS): Add format.o.
6798 * server.c (handle_query): Claim support for breakpoint commands.
6799 (process_point_options): Add command case.
6800 (process_serial_event): Leave running if there are printfs in
6801 effect.
6802 * mem-break.h (any_persistent_commands): Declare.
6803 (add_breakpoint_commands): Declare.
6804 (gdb_no_commands_at_breakpoint): Declare.
6805 (run_breakpoint_commands): Declare.
6806 * mem-break.c (struct point_command_list): New struct.
6807 (struct breakpoint): New field command_list.
6808 (any_persistent_commands): New function.
6809 (add_commands_to_breakpoint): New function.
6810 (add_breakpoint_commands): New function.
6811 (gdb_no_commands_at_breakpoint): New function.
6812 (run_breakpoint_commands): New function.
6813 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6814 locally.
6815 * ax.c: Include format.h.
6816 (ax_printf): New function.
6817 (gdb_eval_agent_expr): Add printf opcode.
6818
2f8f6aed
YQ
68192012-06-13 Yao Qi <yao@codesourcery.com>
6820
6821 * server.c (start_inferior): Remove duplicated writes to fields
6822 'last_resume_kind' and 'last_status' of 'current_inferior'.
6823
0c9070b3
YQ
68242012-06-12 Yao Qi <yao@codesourcery.com>
6825 Pedro Alves <palves@redhat.com>
6826
6827 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6828 comment.
6829 * server.c (handle_v_cont): Extend comment.
6830
c52daf70
YQ
68312012-06-11 Yao Qi <yao@codesourcery.com>
6832
6833 * linux-low.c (linux_attach): Add 'static'.
6834
d38bbb0a
YQ
68352012-06-06 Yao Qi <yao@codesourcery.com>
6836
6837 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6838
89dc0afd
JK
68392012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6840
6841 Fix gcc -flto compilation warning.
6842 * server.c (main): Make variable multi_mode and attach volatile.
6843
75f62ce7
TJB
68442012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6845
6846 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6847 if the platform doesn't know about it.
6848
65f479b6
PA
68492012-05-30 Jeff Kenton <jkenton@tilera.com>
6850
6851 * Makefile.in (SFILES): Add linux-tile-low.c.
6852 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6853 * configure.srv: Handle tilegx-*-linux*.
6854 * linux-tile-low.c: New file.
6855
0c5bf5a9
JK
68562012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6857
6858 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6859
a493e3e2
PA
68602012-05-24 Pedro Alves <palves@redhat.com>
6861
6862 PR gdb/7205
6863
43aaf8b6 6864 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6865
2ea28649
PA
68662012-05-24 Pedro Alves <palves@redhat.com>
6867
6868 PR gdb/7205
6869
6870 Replace target_signal with gdb_signal throughout.
6871
8d409d16
MR
68722012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6873
6874 * linux-low.c (linux_store_registers): Avoid the copying sequence
6875 when no data has been retrieved by ptrace.
6876
23512c01
MGD
68772012-05-22 Will Deacon <will.deacon@arm.com>
6878
6879 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6880 Include asm/ptrace.h.
6881 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6882 already defined.
6883
4934b29e
MR
68842012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6885
6886 * linux-low.c (linux_store_registers): Don't re-retrieve data
6887 with ptrace that has already been obtained from /proc. Always
6888 copy any data retrieved with ptrace to the buffer supplied.
6889
bde24c0a
PA
68902012-05-11 Yao Qi <yao@codesourcery.com>
6891 Pedro Alves <palves@redhat.com>
6892
6893 * linux-low.c (enum stopping_threads_kind): New.
6894 (stopping_threads): Change type to `enum stopping_threads_kind'.
6895 (handle_extended_wait): If stopping and suspending threads, leave
6896 the new_lwp suspended too.
6897 (linux_wait_for_event): Adjust.
6898 (stop_all_lwps): Set `stopping_threads' to
6899 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6900 whether we're suspending threads or just stopping them. Assert no
6901 recursion happens.
6902
623b6bdf
YQ
69032012-04-29 Yao Qi <yao@codesourcery.com>
6904
6905 * server.h: Move some code to ...
6906 * gdbthread.h: ... here. New.
6907 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6908 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6909 (nto-low.o, win32-low.o): Likewise.
6910 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6911 * regcache.c, remote-utils.c, server.c: Likewise.
6912 * target.c, tracepoint.c, win32-low.c: Likewise.
6913
f15f9948
TJB
69142012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6915
6916 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6917 (PTRACE_ARG4_TYPE): Likewise.
6918 (PTRACE_XFER_TYPE): Likewise.
6919 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6920 ptrace to PTRACE_ARG3_TYPE.
6921 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6922 (PTRACE_ARG4_TYPE): Likewise.
6923 (PTRACE_XFER_TYPE): Likewise.
6924 (linux_detach_one_lwp): Cast fourth argument of
6925 ptrace to long then PTRACE_ARG4_TYPE.
6926 (regsets_fetch_inferior_registers): Cast third argument of
6927 ptrace to long then PTRACE_ARG3_TYPE.
6928 (regsets_store_inferior_registers): Likewise.
6929
38ea300a
PA
69302012-04-20 Pedro Alves <palves@redhat.com>
6931
6932 * configure: Regenerate.
6933
c971b7fa
PA
69342012-04-19 Pedro Alves <palves@redhat.com>
6935
43aaf8b6 6936 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6937 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6938 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6939 (all, install-only, uninstall, clean-info, all-lib, clean): No
6940 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6941 (maintainer-clean realclean distclean): Use subdir_do.
6942 (subdir_do): New.
6943 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6944 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6945 * acinclude.m4: Include acx_configure_dir.m4.
6946 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6947 calls. Call AC_PROG_RANLIB. Configure gnulib using
6948 ACX_CONFIGURE_DIR.
6949 (GNULIB): New.
6950 (GNULIB_STDINT_H): Adjust.
6951 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6952 * gdbreplay.c: Include build-gnulib/config.h.
6953 * server.h: Likewise.
6954 * aclocal.m4: Regenerate.
6955 * config.in: Regenerate.
6956 * configure: Regenerate.
c971b7fa 6957
809277f8
PA
69582012-04-19 Pedro Alves <palves@redhat.com>
6959
6960 * Makefile.in (LIBGNU, INCGNU): Adjust.
6961 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6962 (all, install-only, uninstall, clean-info, all-lib, clean)
6963 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6964 * configure.ac: Adjust AC_OUTPUT output.
6965 * aclocal.m4: Regenerate.
6966 * configure: Regenerate.
6967
fd9bb8b8
PA
69682012-04-19 Pedro Alves <palves@redhat.com>
6969
6970 * Makefile.in (generated_files): New.
6971 (server_h): Remove the explicit dependency on config.h, and depend
6972 on $generated_files.
6973
1c298c66
PA
69742012-04-19 Pedro Alves <palves@redhat.com>
6975
6976 * Makefile.in (INCGNU): Add -Ignulib.
6977
57c4b50b
PA
69782012-04-19 Pedro Alves <palves@redhat.com>
6979
6980 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6981 (INCGNU): ... this, and spell out -I here.
6982 (GNULIB_LIB): Rename to ...
6983 (LIBGNU): ... this.
6984 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6985
1030e047
PA
69862012-04-19 Pedro Alves <palves@redhat.com>
6987
6988 * config.in: Regenerate.
6989
447d4319
PA
69902012-04-19 Pedro Alves <palves@redhat.com>
6991
6992 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6993 * server.h (memmem): Remove declaration.
6994 * config.in: Regenerate.
6995 * configure: Regenerate.
6996
aad9eab9
YQ
69972012-04-19 Yao Qi <yao@codesourcery.com>
6998
6999 * Makefile.in (SFILES): Add common/vec.c.
7000 (OBS): Add vec.o.
7001 (vec.o): New rule.
7002
3e10640f
YQ
70032012-04-19 Yao Qi <yao@codesourcery.com>
7004
7005 * remote-utils.c (prepare_resume_reply): Replace with macro
7006 target_core_of_thread.
7007 * server.c (handle_qxfer_threads_proper): Likewise.
7008 * target.h (traget_core_of_thread): New macro.
7009
71622373
PA
70102012-04-18 Pedro Alves <palves@redhat.com>
7011
7012 * aclocal.m4: Regenerate.
7013 * configure: Regenerate.
7014
80d26939
YQ
70152012-04-16 Yao Qi <yao@codesourcery.com>
7016
7017 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7018 duplicated on address.
7019
42476b70
YQ
70202012-04-16 Yao Qi <yao@codesourcery.com>
7021
7022 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7023 (struct tracepoint_action_ops) <send>: New field.
7024 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7025 (agent_expr_send, x_tracepoint_action_send): New.
7026 (l_tracepoint_action_send): New.
7027 (cmd_qtdp): Download and install tracepoint
7028 according to `use_agent'.
7029 (run_inferior_command): Add one more parameter `len'.
7030 Update callers.
7031 (tracepoint_send_agent): New.
7032 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7033
7bc83639
YQ
70342012-04-16 Yao Qi <yao@codesourcery.com>
7035
7036 * tracepoint.c (download_tracepoints): Moved to ...
7037 (cmd_qtstart): ... here.
7038
5f18041e
YQ
70392012-04-14 Yao Qi <yao@codesourcery.com>
7040
7041 * tracepoint.c: Include inttypes.h.
7042 (struct collect_memory_action): Use sized types.
7043 (struct tracepoint): Likewise.
7044 (cmd_qtdp, stop_tracing): Update print specifiers.
7045 (cmd_qtp, response_tracepoint): Likewise.
7046 (collect_data_at_tracepoint): Likewise.
7047 (collect_data_at_step): Likewise.
7048
55a8c076
YQ
70492012-04-14 Yao Qi <yao@codesourcery.com>
7050
7051 Import gnulib module inttypes.
7052 * aclocal.m4, config.in, configure: Regenerated.
7053
dc750257
YQ
70542012-04-14 Yao Qi <yao@codesourcery.com>
7055
7056 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7057 Makefile and config.status at last.
7058
0ab5faf9
YQ
70592012-04-13 Yao Qi <yao@codesourcery.com>
7060
7061 * tracepoint.c: Include stdint.h unconditionally.
7062
18f5fd81
TJB
70632012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7064
7065 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7066 on BFD_HAVE_SYS_PROCFS_TYPE.
7067 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7068 * configure: Regenerate.
7069 * config.in: Likewise.
7070
4d47af5c
L
70712012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7072
7073 * Makefile.in (clean): Also remove x32.c x32-linux.c
7074 x32-avx.c x32-avx-linux.c.
7075 (x32.o): New target.
7076 (x32.c): Likewise.
7077 (x32-linux.o): Likewise.
7078 (x32-linux.c): Likewise.
7079 (x32-avx.o): Likewise.
7080 (x32-avx.c): Likewise.
7081 (x32-avx-linux.o): Likewise.
7082 (x32-avx-linux.c): Likewise.
7083
7084 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7085 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7086 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7087 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7088 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7089 i386/x32-avx-linux.xml.
7090
7091 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7092 (init_registers_x32_avx_linux): Likwise.
7093 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7094 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7095
ecedbe58
PA
70962012-04-13 Pedro Alves <palves@redhat.com>
7097
7098 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7099 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7100 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7101 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7102 the sub-make.
7103
c92b5177
L
71042012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7105
7106 * linux-x86-low.c (compat_x32_clock_t): New.
7107 (compat_x32_siginfo_t): Likewise.
7108 (compat_x32_siginfo_from_siginfo): Likewise.
7109 (siginfo_from_compat_x32_siginfo): Likewise.
7110 (linux_is_elf64): Likewise.
7111 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7112 and siginfo_from_compat_x32_siginfo for x32.
7113 (x86_arch_setup): Set linux_is_elf64.
7114
214d508e
L
71152012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7116
7117 PR gdb/13969
7118 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7119 e_machine field.
7120 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7121 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7122 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7123 compatible with process.
7124
c9a1864a
YQ
71252012-04-12 Yao Qi <yao@codesourcery.com>
7126
7127 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7128 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7129 (install-only, install-info, clean): Handle sub dir gnulib.
7130 (all-lib, am--refresh): New targets.
7131 (memmem.o): Remove target.
7132 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7133 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7134 (AC_REPLACE_FUNCS): Remove memmem.
7135 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7136 (AC_OUTPUT): Generate Makefile in gnulib/.
7137 * aclocal.m4, config.in, configure: Regenerated.
7138
367ba2c2
MR
71392012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7140
7141 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7142
9d236627
PA
71432012-04-05 Pedro Alves <palves@redhat.com>
7144
7145 -Werror=strict-aliasing
7146
7147 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7148 pointer.
7149
111217b3
PA
71502012-04-04 Pedro Alves <palves@redhat.com>
7151
7152 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7153 (sparc_store_gregset_from_stack, sparc_store_gregset)
7154 (sparc_breakpoint_at): Fix formatting.
7155
8365dcf5
TJB
71562012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7157
7158 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7159 are available.
7160 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7161 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7162 * config.in: Regenerate.
7163 * configure: Likewise.
7164
689cc2ae
PA
71652012-03-29 Pedro Alves <palves@redhat.com>
7166
7167 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7168 Correct ptrace arguments.
7169
c14dfd32
PA
71702012-03-28 Pedro Alves <palves@redhat.com>
7171
7172 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7173 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7174 (IA64_FR1_REGNUM): New defines.
7175 (ia64_fetch_register): New.
7176 (the_low_target): Install it.
7177 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7178 field.
7179 * linux-low.c (linux_fetch_registers): Try the
7180 the_low_target.fetch_register hook first.
7181
7182 * linux-arm-low.c (the_low_target): Adjust.
7183 * linux-bfin-low.c (the_low_target): Adjust.
7184 * linux-cris-low.c (the_low_target): Adjust.
7185 * linux-crisv32-low.c (the_low_target): Adjust.
7186 * linux-m32r-low.c (the_low_target): Adjust.
7187 * linux-m68k-low.c (the_low_target): Adjust.
7188 * linux-mips-low.c (the_low_target): Adjust.
7189 * linux-ppc-low.c (the_low_target): Adjust.
7190 * linux-s390-low.c (the_low_target): Adjust.
7191 * linux-sh-low.c (the_low_target): Adjust.
7192 * linux-sparc-low.c (the_low_target): Adjust.
7193 * linux-tic6x-low.c (the_low_target): Adjust.
7194 * linux-x86-low.c (the_low_target): Adjust.
7195 * linux-xtensa-low.c (the_low_target): Adjust.
7196
63c88e13
PA
71972012-03-26 Pedro Alves <palves@redhat.com>
7198
7199 * server.c (handle_qxfer_libraries): Don't bail early if
7200 the_target->qxfer_libraries_svr4 is not NULL.
7201
fb723180
PA
72022012-03-26 Pedro Alves <palves@redhat.com>
7203
7204 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7205
0afae3cf
PA
72062012-03-23 Pedro Alves <palves@redhat.com>
7207
7208 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7209 "library-list-svr4" element's start tag when the the DSO list is
7210 empty.
7211
485f1ee4
PA
72122012-03-23 Pedro Alves <palves@redhat.com>
7213
7214 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7215 a variable whose type size is the same as the inferior's pointer
7216 size.
7217
a5362b9a
TS
72182012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7219
7220 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7221 struct siginfo.
7222 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7223 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7224 * linux-low.h: Include <signal.h>.
7225 (struct siginfo): Remove forward declaration.
7226 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7227 struct siginfo.
7228
d226c142
MF
72292012-03-21 Mike Frysinger <vapier@gentoo.org>
7230
7231 * .gitignore: Ignore more files.
7232
122f36ef
PA
72332012-03-19 Pedro Alves <palves@redhat.com>
7234 Jan Kratochvil <jan.kratochvil@redhat.com>
7235
7236 * server.c (cont_thread, general_thread): Add describing comments.
7237 (start_inferior): Clear `cont_thread'.
7238 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7239 of a process.
7240
fc3e5175
YQ
72412012-03-15 Yao Qi <yao@codesourcery.com>
7242
7243 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7244 handling to ...
7245 (cmd_qtdp): ... here.
7246
8d0d92cd
YQ
72472012-03-15 Yao Qi <yao@codesourcery.com>
7248
7249 * tracepoint.c (struct tracepoint_action_ops): New.
7250 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7251 (m_tracepoint_action_download): New.
7252 (r_tracepoint_action_download): New.
7253 (x_tracepoint_action_download): New.
7254 (l_tracepoint_action_download): New.
7255 (add_tracepoint_action): Install `action->ops' according type.
7256 (download_tracepoint_1): Move code `download' function pointer
7257 of various tracepoint_action_ops.
7258
87b0bb13
JK
72592012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7260
7261 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7262 linux_ptrace_attach_warnings.
7263
5f572dec
JK
72642012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7265
7266 * Makefile.in (linux-ptrace.o): New.
7267 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7268 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7269 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7270 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7271 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7272 of these targets.
7273 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7274
f4647387
YQ
72752012-03-08 Yao Qi <yao@codesourcery.com>
7276 Pedro Alves <palves@redhat.com>
7277
7278 Fix PR server/13392.
7279 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7280 offset of JMP insn.
7281 * tracepoint.c (remove_tracepoint): New.
7282 (cmd_qtdp): Call remove_tracepoint when failed to install.
7283
9b224c5e
PA
72842012-03-07 Pedro Alves <palves@redhat.com>
7285
7286 * linux-low.c (get_detach_signal): New.
7287 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7288 Pass on pending signals to PTRACE_DETACH. Check the result of the
7289 ptrace call.
7290 * server.c (program_signals, program_signals_p): New.
7291 (handle_general_set): Handle QProgramSignals.
7292 * server.h (program_signals, program_signals_p): Declare.
7293
e237a7e2
JK
72942012-03-05 Pedro Alves <palves@redhat.com>
7295 Jan Kratochvil <jan.kratochvil@redhat.com>
7296
7297 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7298 New comment why.
7299
5808517f
YQ
73002012-03-03 Yao Qi <yao@codesourcery.com>
7301
7302 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7303 agent_look_up_symbols.
7304
58b4daa5
YQ
73052012-03-03 Yao Qi <yao@codesourcery.com>
7306
7307 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7308 (linux-x86-low.o): Likewise.
7309 * server.h: Remove in_process_agent_loaded.
7310 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7311 common/agent.c.
7312 Update callers.
7313
8ffcbaaf
YQ
73142012-03-03 Yao Qi <yao@codesourcery.com>
7315
7316 * tracepoint.c (gdb_agent_capability): New global.
7317 (in_process_agent_loaded_ust): Renamed to
7318 `in_process_agent_supports_ust'.
7319 Update callers.
7320 (in_process_agent_supports_ust): Call agent_capability_check.
7321 (clear_installed_tracepoints): Assert that agent supports
7322 agent.
7323
d1feda86
YQ
73242012-03-03 Yao Qi <yao@codesourcery.com>
7325
7326 * linux-low.c (linux_supports_agent): New.
7327 (linux_target_ops): Initialize field `supports_agent' with
7328 linux_supports_agent.
7329 * target.h (struct target_ops) <supports_agent>: New.
7330 (target_supports_agent): New macro.
7331 * server.c (handle_general_set): Handle packet 'QAgent'.
7332 (handle_query): Send `QAgent+'.
7333 * Makefile.in (server.o): Depends on agent.h.
7334
2fa291ac
YQ
73352012-03-03 Yao Qi <yao@codesourcery.com>
7336
7337 * Makefile.in (OBS): Add agent.o.
7338 Add new rule for agent.o.
7339 Track dependence of tracepoint.c on agent.h.
7340 * tracepoint.c (run_inferior_command_1):
7341 (run_inferior_command): Call agent_run_command.
7342 (gdb_ust_connect_sync_socket): Deleted. Move it to
7343 common/agent.c.
7344 (resume_thread, stop_thread): Likewise.
7345 (gdb_ust_socket_init): Renamed to ...
7346 (gdb_agent_socket_init): ... New.
7347 (gdb_ust_thread): Renamed to ...
7348 (gdb_agent_helper_thread): ... New.
7349 (gdb_ust_init): Move some code to ...
7350 (gdb_agent_init): ... here. New.
7351 [HAVE_UST]: Call gdb_ust_init.
7352 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7353 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7354 * config.in, configure: Regenerated.
7355
05044653
PA
73562012-03-02 Pedro Alves <palves@redhat.com>
7357
7358 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7359 * linux-low.c (struct simple_pid_list): New.
7360 (stopped_pids): New a struct simple_pid_list pointer.
7361 (add_to_pid_list, pull_pid_from_list): New.
7362 (handle_extended_wait): Don't assume the first signal new children
7363 report is SIGSTOP. Adjust call to pull_pid_from_list.
7364 (linux_wait_for_lwp): Adjust.
7365
8d00225b
YQ
73662012-03-02 Yao Qi <yao@codesourcery.com>
7367
7368 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7369 debug log.
7370
19560ba5
YQ
73712012-03-02 Yao Qi <yao@codesourcery.com>
7372
7373 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7374 `stop_pc' and `tpoint'. Update caller.
7375
1faeff08
MR
73762012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7377
7378 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7379 * linux-low.c (use_linux_regsets): New macro.
7380 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7381 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7382 (linux_register_in_regsets): New function.
7383 (usr_fetch_inferior_registers): Skip registers covered by
7384 regsets.
7385 (usr_store_inferior_registers): Likewise.
7386 (usr_fetch_inferior_registers): New macro.
7387 (usr_store_inferior_registers): Likewise.
7388 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7389 (linux_store_registers): Likewise.
7390 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7391 prototype.
7392 (init_registers_mips64_dsp_linux): Likewise.
7393 (init_registers_mips_linux): New macro.
7394 (init_registers_mips_dsp_linux): Likewise.
7395 (mips_dsp_num_regs): Likewise.
7396 (DSP_BASE, DSP_CONTROL): New fallback macros.
7397 (mips_base_regs): New macro.
7398 (mips_regmap): Use it. Fix the size.
7399 (mips_dsp_regmap): New variable.
7400 (mips_dsp_regset_bitmap): Likewise.
7401 (mips_arch_setup): New function.
7402 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7403 than mips_regmap.
7404 (mips_cannot_store_register): Likewise.
7405 (the_low_target): Update .arch_setup, .num_regs and .regmap
7406 initializers. Add .regset_bitmap initializer.
7407 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7408 initializer.
7409 * linux-bfin-low.c (the_low_target): Likewise.
7410 * linux-cris-low.c (the_low_target): Likewise.
7411 * linux-crisv32-low.c (the_low_target): Likewise.
7412 * linux-ia64-low.c (the_low_target): Likewise.
7413 * linux-m32r-low.c (the_low_target): Likewise.
7414 * linux-m68k-low.c (the_low_target): Likewise.
7415 * linux-ppc-low.c (the_low_target): Likewise.
7416 * linux-s390-low.c (the_low_target): Likewise.
7417 * linux-sh-low.c (the_low_target): Likewise.
7418 * linux-sparc-low.c (the_low_target): Likewise.
7419 * linux-tic6x-low.c (the_low_target): Likewise.
7420 * linux-x86-low.c (the_low_target): Likewise.
7421 * linux-xtensa-low.c (the_low_target): Likewise.
7422 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7423 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7424 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7425 srv_xmlfiles.
7426 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7427 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7428
c03e6ccc
YQ
74292012-02-29 Yao Qi <yao@codesourcery.com>
7430 Pedro Alves <palves@redhat.com>
7431
7432 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7433 `step_over_finished' is true.
7434
644cebc9
PA
74352012-02-27 Pedro Alves <palves@redhat.com>
7436
7437 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7438 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7439
c14d7ab2
PA
74402012-02-27 Pedro Alves <palves@redhat.com>
7441
7442 PR server/9684
7443 * linux-low.c (pid_is_stopped): New.
7444 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7445
412c89dd
LM
74462012-02-25 Luis Machado <lgustavo@codesourcery.com>
7447
7448 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7449 of conditions.
7450
b745defe
MR
74512012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7452
7453 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7454
9f3a5c85
LM
74552012-02-24 Luis Machado <lgustavo@codesourcery>
7456
7457 * server.c (handle_query): Advertise support for target-side
7458 breakpoint condition evaluation.
7459 (process_point_options): New function.
7460 (process_serial_event): When inserting a breakpoint, check for
7461 a target-side condition that should be evaluated.
7462
7463 * mem-break.c: Include regcache.h and ax.h.
7464 (point_cond_list_t): New data structure.
7465 (breakpoint) <cond_list>: New field.
7466 (find_gdb_breakpoint_at): Make non-static.
7467 (delete_gdb_breakpoint_at): Clear any target-side
7468 conditions.
7469 (clear_gdb_breakpoint_conditions): New function.
7470 (add_condition_to_breakpoint): Likewise.
7471 (add_breakpoint_condition): Likewise.
7472 (gdb_condition_true_at_breakpoint): Likewise.
7473 (gdb_breakpoint_here): Return result directly instead
7474 of going through a local variable.
7475
7476 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7477 (clear_gdb_breakpoint_conditions): Likewise.
7478 (add_breakpoint_condition): Likewise.
7479 (gdb_condition_true_at_breakpoint): Likewise.
7480
7481 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7482 (need_step_over_p): Take target-side breakpoint condition into
7483 consideration.
7484
5e1dc496
LM
74852012-02-24 Luis Machado <lgustavo@codesourcery>
7486
7487 * server.h: Include tracepoint.h.
7488 (agent_mem_read, agent_get_trace_state_variable_value,
7489 agent_set_trace_state_variable_value,
7490 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7491 get_set_tsv_func_addr): New prototypes.
7492
7493 * ax.h: New include file.
7494 * ax.c: New source file.
7495
7496 * tracepoint.c: Include ax.h.
7497 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7498 agent_expr, eval_result_type): Move to ax.h.
7499 (parse_agent_expr): Rename to ...
7500 (gdb_parse_agent_expr): ... this, make it non-static and move
7501 to ax.h.
7502 (unparse_agent_expr) Rename to ...
7503 (gdb_unparse_agent_expr): ... this, make it non-static and move
7504 to ax.h.
7505 (eval_agent_expr): Rename to ...
7506 (eval_tracepoint_agent_expr): ... this.
7507 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7508 forward declarations.
7509 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7510 (agent_get_trace_state_variable_value): New function.
7511 (agent_set_trace_state_variable_value): New function.
7512 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7513 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7514 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7515 (condition_true_at_tracepoint): Likewise.
7516 (parse_agent_expr): Rename to ...
7517 (gdb_parse_agent_expr): ... this and move to ax.c.
7518 (unparse_agent_expr): Rename to ...
7519 (gdb_unparse_agent_expr): ... this and move to ax.c.
7520 (gdb_agent_op_name): Move to ax.c.
7521 (eval_agent_expr): Rename to ...
7522 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7523 and move to ax.c.
7524 (eval_tracepoint_agent_expr): New function.
7525 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 7526 non-static.
5e1dc496
LM
7527 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7528 ax.c.
7529 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7530 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7531 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7532 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7533 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7534 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7535 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7536 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7537 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7538 (compile_bytecodes): Remove forward declaration.
7539 (is_goto_target): Move to ax.c.
7540 (compile_bytecodes): Move to ax.c and call
7541 agent_get_trace_state_variable_value (...) and
7542 agent_set_trace_state_variable_value (...).
7543
7544 * Makefile.in: Update ax.c and IPA dependencies.
7545
277e4e52
PA
75462012-02-24 Pedro Alves <palves@redhat.com>
7547
7548 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7549 (cmd_bigqtbuffer_circular): ... this. Only handle
7550 'QTBuffer:circular:'.
7551 (handle_tracepoint_general_set): Adjust.
7552
bf4c19f7
YQ
75532012-02-16 Yao Qi <yao@codesourcery.com>
7554
7555 * inferiors.c: Move code to ...
7556 * dll.c: .... here. New.
7557 * server.h: Declare clear_dlls.
7558 * Makefile.in (SFILES): Add dll.c.
7559 (OBS): Add dll.o
7560 (dll.o): New rule.
7561
d73f2619
YQ
75622012-02-11 Yao Qi <yao@codesourcery.com>
7563
7564 * server.c: (handle_monitor_command): Add a new parameter
7565 `own_buf'.
7566 (handle_query): Update caller.
7567
f8255c2a
JB
75682012-02-09 Joel Brobecker <brobecker@adacore.com>
7569
7570 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7571 * configure, config.in: Regenerate.
7572 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7573 is not defined.
7574
da84f473
PA
75752012-02-02 Pedro Alves <palves@redhat.com>
7576
7577 Try SIGKILL first, then PTRACE_KILL.
7578 * linux-low.c (linux_kill_one_lwp): New.
7579 (linux_kill_one_lwp): Rename to ...
7580 (kill_one_lwp_callback): ... this. Use the new
7581 linux_kill_one_lwp.
7582
e886a173
PA
75832012-02-02 Pedro Alves <palves@redhat.com>
7584
7585 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7586 inferior.
7587
be07f1a2
PA
75882012-01-27 Pedro Alves <palves@redhat.com>
7589
7590 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7591 (elf_64_file_p): Make static.
7592 (linux_pid_exe_is_elf_64_file): New.
7593 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7594 Delete declarations.
7595 (linux_pid_exe_is_elf_64_file): Declare.
7596 * linux-x86-low.c (x86_arch_setup): Use
7597 linux_pid_exe_is_elf_64_file.
7598
d8301ad1
JK
75992012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7600
7601 * linux-low.c (linux_wait_for_event_1): Rename to ...
7602 (linux_wait_for_event): ... here and merge it with former
7603 linux_wait_for_event - new variable wait_ptid, use it.
7604 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7605
01b17894
PA
76062012-01-23 Pedro Alves <palves@redhat.com>
7607
7608 * server.c (main): Avoid yet another case of infinite loop while
7609 detaching/killing after a longjmp.
7610
e825046f
JK
76112012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7612
7613 Code cleanup.
7614 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7615
b9e7b9c3
UW
76162012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7617
7618 * hostio.c (handle_readlink): New function.
7619 (handle_vFile): Call it to handle "vFile:readlink" packets.
7620
901f9912
UW
76212012-01-20 Pedro Alves <palves@redhat.com>
7622 Ulrich Weigand <ulrich.weigand@linaro.org>
7623
7624 * server.c (handle_v_requests): Only support vAttach and vRun to
7625 start multiple processes when in extended protocol mode.
7626
fc1ab1a0
PA
76272012-01-17 Pedro Alves <palves@redhat.com>
7628
7629 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7630 memalign plus mprotect to allocate the scratch buffer.
7631
7d5d4e98
PA
76322012-01-13 Pedro Alves <palves@redhat.com>
7633
7634 * server.c (attach_inferior): Clear `cont_thread'.
7635
f128d5e9
PA
76362012-01-13 Pedro Alves <palves@redhat.com>
7637
7638 * server.c (main): Avoid infinite loop while detaching/killing
7639 after a longjmp.
7640
06db92f0
DE
76412012-01-09 Doug Evans <dje@google.com>
7642
7643 * server.c (start_inferior): Set last_ptid in --wrapper case.
7644
32d92999
YQ
76452012-01-06 Yao Qi <yao@codesourcery.com>
7646
7647 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7648 defined.
7649 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7650
5e0a92a9
YQ
76512012-01-04 Yao Qi <yao@codesourcery.com>
7652
7653 * tracepoint.c (cmd_qtdp): Print debug message
7654 for static tracepoint.
7655
ae639e8c
YQ
76562012-01-04 Yao Qi <yao@codesourcery.com>
7657
7658 * tracepoint.c (trace_vdebug): Differentiate debug message
7659 between gdbserver and IPA.
7660
f72429c5
YQ
76612012-01-03 Yao Qi <yao@codesourcery.com>
7662
7663 * tracepoint.c (tracepoint_was_hit): Don't collect for
7664 static tracepoint.
7665
12c3e59c
JB
76662012-01-02 Joel Brobecker <brobecker@adacore.com>
7667
7668 * terminal.h: Reformat copyright header.
7669
67827812
JB
76702012-01-02 Joel Brobecker <brobecker@adacore.com>
7671
7672 * server.c (gdbserver_version): Update copyright year.
7673 * gdbreplay.c (gdbreplay_version): Likewise.
7674
3e52c33d
JK
76752011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7676
7677 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7678
7679 Revert:
7680 2011-12-18 Hui Zhu <teawater@gmail.com>
7681 * linux-low.c (linux_create_inferior): Save return value to ret.
7682
66f1260e
HZ
76832011-12-18 Hui Zhu <teawater@gmail.com>
7684
7685 * linux-low.c (linux_create_inferior): Save return value to ret.
7686
e77616d7
DE
76872011-12-16 Doug Evans <dje@google.com>
7688
e7b06c57
DE
7689 * linux-low.c (linux_create_inferior): If stdio connection,
7690 redirect stdin from /dev/null, stdout to stderr.
7691 * remote-utils.c (remote_is_stdio): New static global.
7692 (remote_connection_is_stdio): New function.
7693 (remote_prepare): Handle stdio connection.
7694 (remote_open): Ditto.
7695 (remote_close): Don't close stdin for stdio connections.
7696 (read_prim,write_prim): New functions. Replace all calls to
7697 read/write to these.
7698 * server.c (main): Watch for "-" argument. Move call to
7699 remote_prepare before start_inferior.
7700 * server.h (STDIO_CONNECTION_NAME): New macro.
7701 (remote_connection_is_stdio): Declare.
7702
e77616d7
DE
7703 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7704 in debugging output.
7705
82067193
YQ
77062011-12-15 Yao Qi <yao@codesourcery.com>
7707
7708 * tracepoint.c: Include sys/syscall.h.
7709 (gdb_ust_thread): Remove preprocessor conditional.
7710
82bfbe7e
PA
77112011-12-14 Pedro Alves <pedro@codesourcery.com>
7712
7713 * linux-low.c (linux_detach_one_lwp): Call
7714 the_low_target.prepare_to_resume before detaching.
7715
712c6575
YQ
77162011-12-14 Yao Qi <yao@codesourcery.com>
7717
7718 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7719 of write.
7720
d54d1edf
YQ
77212011-12-14 Yao Qi <yao@codesourcery.com>
7722
7723 * i386-low.c (i386_low_stopped_data_address): Initialize local
7724 variable `control'.
7725
6210a125
PA
77262011-12-13 Pedro Alves <pedro@codesourcery.com>
7727
7728 PR remote/13492
7729
7730 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7731 DR_CONTROL unless necessary. Extend comments.
7732 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7733 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7734
2ece8244
YQ
77352011-12-13 Yao Qi <yao@codesourcery.com>
7736
7737 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7738 macros.
7739 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7740
784867a5
JK
77412011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7742
7743 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7744 Print new debug message for such case.
7745
6bf36717
JK
77462011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7747
7748 Fix overlapping memcpy.
7749 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7750 the read_inferior_memory transfer.
7751 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7752 write_inferior_memory transfer.
7753 (set_fast_tracepoint_jump): New variable buf. Use it for the
7754 read_inferior_memory and write_inferior_memory transfers.
7755 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7756 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7757 Use it for the write_inferior_memory transfer.
7758 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7759 buffers.
7760
50275556
MR
77612011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7762
7763 * linux-low.c (fetch_register, store_register): Make code
7764 consistent, fix formatting.
7765
7325beb4
MR
77662011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7767
7768 * linux-low.c (usr_store_inferior_registers): Factor out code
7769 to handle individual registers into...
7770 (store_register): ... this new function.
7771
c642a434
UW
77722011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7773
7774 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7775 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7776 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7777 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7778 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7779 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7780 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7781 (srv_xmlfiles): Add new XML files.
7782
7783 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7784 and <sys/uio.h>.
7785 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7786 (init_registers_s390_linux32v1): Add prototype.
7787 (init_registers_s390_linux32v2): Likewise.
7788 (init_registers_s390_linux64v1): Likewise.
7789 (init_registers_s390_linux64v2): Likewise.
7790 (init_registers_s390x_linux64v1): Likewise.
7791 (init_registers_s390x_linux64v2): Likewise.
7792 (s390_num_regs): Increment to 52.
7793 (s390_regmap): Add orig_r2 register.
7794 (s390_num_regs_3264): Increment to 68.
7795 (s390_regmap_3264): Add orig_r2 register.
7796 (s390_collect_ptrace_register): Handle orig_r2 register.
7797 (s390_supply_ptrace_register): Likewise.
7798 (s390_fill_last_break): New function.
7799 (s390_store_last_break): Likewise.
7800 (s390_fill_system_call): New function.
7801 (s390_store_system_call): Likewise.
7802 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7803 register sets.
7804 (s390_check_regset): New function.
7805 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7806 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7807 Update target_regsets for available register sets.
7808
2268b414
JK
78092011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7810 Jan Kratochvil <jan.kratochvil@redhat.com>
7811
7812 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7813 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7814 New.
7815 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7816 * linux-low.h (struct process_info_private): New member r_debug.
7817 * server.c (handle_qxfer_libraries): Call
7818 the_target->qxfer_libraries_svr4.
7819 (handle_qxfer_libraries_svr4): New function.
7820 (qxfer_packets): New entry "libraries-svr4".
7821 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7822 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7823 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7824 PACKET_qXfer_libraries_svr4.
7825
d6db1fab
UW
78262011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7827
7828 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7829 PSW address/mask between 8-byte and 16-byte formats.
7830 (s390_supply_ptrace_register): Likewise.
7831 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7832 basic addressing mode bit.
7833
242f5f1c
SS
78342011-11-24 Stan Shebs <stan@codesourcery.com>
7835
7836 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7837
f196051f
SS
78382011-11-17 Stan Shebs <stan@codesourcery.com>
7839
7840 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7841 (tracing_start_time): New global.
7842 (tracing_stop_time): New global.
7843 (tracing_user_name): New global.
7844 (tracing_notes): New global.
7845 (tracing_stop_note): New global.
7846 (cmd_qtstart): Set traceframe_usage, start_time.
7847 (stop_tracing): Set stop_time.
7848 (cmd_qtstatus): Report additional status.
7849 (cmd_qtp): New function.
7850 (handle_tracepoint_query): Call it.
7851 (cmd_qtnotes): New function.
7852 (handle_tracepoint_general_set): Call it.
7853 (get_timestamp): Rename from tsv_get_timestamp.
7854
405f8e94
SS
78552011-11-14 Stan Shebs <stan@codesourcery.com>
7856 Kwok Cheung Yeung <kcy@codesourcery.com>
7857
7858 * linux-x86-low.c (small_jump_insn): New.
7859 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7860 trampoline and error message, build a trampoline and issue a small
7861 jump instruction to it.
7862 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7863 trampoline and error message.
7864 (x86_get_min_fast_tracepoint_insn_len): New.
7865 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7866 * linux-low.h (struct linux_target_ops): Add arguments to
7867 install_fast_tracepoint_jump_pad operation, add new operation.
7868 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7869 arguments.
7870 (linux_get_min_fast_tracepoint_insn_len): New function.
7871 (linux_target_op): Add new operation.
7872 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7873 (gdb_trampoline_buffer_end): Ditto.
7874 (gdb_trampoline_buffer_error): Ditto.
7875 (struct ipa_sym_addresses): Add fields for new IPA variables.
7876 (symbol_list): Add entries for new IPA variables.
7877 (struct tracepoint): Add fields to hold the address range of the
7878 trampoline used by the tracepoint.
7879 (trampoline_buffer_head): New static variable.
7880 (trampoline_buffer_tail): Ditto.
7881 (claim_trampoline_space): New function.
7882 (have_fast_tracepoint_trampoline_buffer): New function.
7883 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7884 structure.
7885 (install_fast_tracepoint): Ditto, also add error buffer argument.
7886 (cmd_qtminftpilen): New function.
7887 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7888 (fast_tracepoint_from_trampoline_address): New function.
7889 (fast_tracepoint_collecting): Handle trampoline as part of jump
7890 pad space.
7891 (set_trampoline_buffer_space): New function.
7892 (initialize_tracepoint): Initialize new IPA variables.
7893 * target.h (struct target_ops): Add arguments to
7894 install_fast_tracepoint_jump_pad operation, add new
7895 get_min_fast_tracepoint_insn_len operation.
7896 (target_get_min_fast_tracepoint_insn_len): New.
7897 (install_fast_tracepoint_jump_pad): Add arguments.
7898 * server.h (IPA_BUFSIZ): Define.
7899 * linux-i386-ipa.c: Include extra header files.
7900 (initialize_fast_tracepoint_trampoline_buffer): New function.
7901 (initialize_low_tracepoint): Call it.
7902 * server.h (set_trampoline_buffer_space): Declare.
7903 (claim_trampoline_space): Ditto.
7904 (have_fast_tracepoint_trampoline_buffer): Ditto.
7905
1e4d1764
YQ
79062011-11-14 Yao Qi <yao@codesourcery.com>
7907
7908 * server.c (handle_query): Handle InstallInTrace for qSupported.
7909 * tracepoint.c (add_tracepoint): Sort list.
7910 (install_tracepoint, download_tracepoint): New.
7911 (cmd_qtdp): Call them to install and download tracepoints.
7912 (sort_tracepoints): Removed.
7913 (cmd_qtstart): Update.
7914
5c73ff4e
YQ
79152011-11-14 Yao Qi <yao@codesourcery.com>
7916
7917 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7918 * mem-break.h: Declare.
7919 * tracepoint.c (cmd_qtstart): Move some code to ...
7920 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7921 New.
7922 (download_tracepoints): Move some code to ...
7923 (download_tracepoint_1): ... here. New.
7924
86a30030
YQ
79252011-11-08 Yao Qi <yao@codesourcery.com>
7926
7927 * remote-utils.c (relocate_instruction): A comment fix.
7928
8d26e50c
JB
79292011-11-07 Joel Brobecker <brobecker@adacore.com>
7930
7931 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7932 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7933 dr_status_mirror and dr_control_mirror from debug_reg_state.
7934 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7935 (i386_initial_stuff): Remove use of deleted globals.
7936 (i386_get_thread_context, i386_set_thread_context,
7937 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7938 from debug_reg_state.
7939
a59306a3
YQ
79402011-11-05 Yao Qi <yao@codesourcery.com>
7941
7942 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7943 address as TPOINT's.
7944
3065dfb6
SS
79452011-11-02 Stan Shebs <stan@codesourcery.com>
7946
7947 * tracepoint.c (agent_mem_read_string): New function.
7948 (eval_agent_expr): Call it for tracenz.
7949 * server.c (handle_query): Report support for tracenz.
7950
fd0d8c7c
YQ
79512011-11-02 Yao Qi <yao@codesourcery.com>
7952
7953 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7954
609086b1
YQ
79552011-11-02 Yao Qi <yao@codesourcery.com>
7956
7957 * target.h: Fix a typo in comment.
7958
b9fd1791
PA
79592011-10-31 Pedro Alves <pedro@codesourcery.com>
7960
7961 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7962 clobber the breakpoints' shadows with fast tracepoint jumps.
7963 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7964 * target.c (write_inferior_memory): Also pass MYADDR down to
7965 check_mem_write.
7966
03583c20
UW
79672011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7968
7969 * configure.ac: Check support for personality routine.
7970 * configure: Regenerate.
7971 * config.in: Likewise.
7972 * linux-low.c: Include <sys/personality.h>.
7973 Define ADDR_NO_RANDOMIZE if necessary.
7974 (linux_create_inferior): Disable address space randomization when
7975 forking inferior, if requested.
7976 (linux_supports_disable_randomization): New function.
7977 (linux_target_ops): Install it.
7978 * server.h (disable_randomization): Declare.
7979 * server.c (disable_randomization): New global variable.
7980 (handle_general_set): Handle QDisableRandomization.
7981 (handle_query): Likewise for qSupported.
7982 (main): Support --disable-randomization and --no-disable-randomization
7983 command line arguments.
7984 * target.h (struct target_ops): Add supports_disable_randomization.
7985 (target_supports_disable_randomization): New macro.
7986
723b724b
MF
79872011-09-29 Mike Frysinger <vapier@gentoo.org>
7988
7989 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7990 ifdef check.
7991 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7992 [!PT_GETDSBT] (target_loadmap): New definition.
7993 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7994 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7995 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7996 and PT_GETDSBT to LINUX_LOADMAP.
7997 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7998 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7999
55329a5c 80002011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8001
8002 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8003 (arm_linux_hwbp_cap): New static variable.
8004 (arm_linux_get_hwbp_cap): Replace by ...
8005 (arm_linux_init_hwbp_cap): ... this new function.
8006 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8007 (arm_linux_get_hw_watchpoint_count): Likewise.
8008 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8009 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8010 (arm_prepare_to_resume): Use perror_with_name instead of error.
8011
55329a5c 80122011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8013
8014 * linux-arm-low.c: Include <signal.h>.
8015 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8016 (struct arm_linux_hwbp_cap): New data type.
8017 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8018 (struct arm_linux_hw_breakpoint): New data type.
8019 (MAX_BPTS, MAX_WPTS): Define.
8020 (struct arch_process_info, struct arch_lwp_info): New data types.
8021 (arm_linux_get_hwbp_cap): New function.
8022 (arm_linux_get_hw_breakpoint_count): Likewise.
8023 (arm_linux_get_hw_watchpoint_count): Likewise.
8024 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8025 (arm_hwbp_control_initialize): Likewise.
8026 (arm_hwbp_control_is_enabled): Likewise.
8027 (arm_hwbp_control_is_initialized): Likewise.
8028 (arm_hwbp_control_disable): Likewise.
8029 (arm_linux_hw_breakpoint_equal): Likewise.
8030 (arm_linux_hw_point_initialize): Likewise.
8031 (struct update_registers_data): New data structure.
8032 (update_registers_callback: New function.
8033 (arm_insert_point): Likewise.
8034 (arm_remove_point): Likewise.
8035 (arm_stopped_by_watchpoint): Likewise.
8036 (arm_stopped_data_address): Likewise.
8037 (arm_new_process): Likewise.
8038 (arm_new_thread): Likewise.
8039 (arm_prepare_to_resume): Likewise.
8040 (the_low_target): Register arm_insert_point, arm_remove_point,
8041 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8042 arm_new_thread, and arm_prepare_to_resume.
8043
6b9801d4
SS
80442011-09-15 Stan Shebs <stan@codesourcery.com>
8045
8046 * server.h (struct emit_ops): Add compare-goto fields.
8047 * tracepoint.c (gdb_agent_op_sizes): New table.
8048 (emit_eq_goto): New function.
8049 (emit_ne_goto): New function.
8050 (emit_lt_goto): New function.
8051 (emit_le_goto): New function.
8052 (emit_gt_goto): New function.
8053 (emit_ge_goto): New function.
8054 (is_goto_target): New function.
8055 (compile_bytecodes): Recognize special cases of compare-goto
8056 combinations and call specialized emitters for them.
8057 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8058 (amd64_emit_ne_goto): New function.
8059 (amd64_emit_lt_goto): New function.
8060 (amd64_emit_le_goto): New function.
8061 (amd64_emit_gt_goto): New function.
8062 (amd64_emit_ge_goto): New function.
8063 (amd64_emit_ops): Add the new functions.
8064 (i386_emit_eq_goto): New function.
8065 (i386_emit_ne_goto): New function.
8066 (i386_emit_lt_goto): New function.
8067 (i386_emit_le_goto): New function.
8068 (i386_emit_gt_goto): New function.
8069 (i386_emit_ge_goto): New function.
8070 (i386_emit_ops): Add the new functions.
8071
bf15cbda
SS
80722011-09-08 Stan Shebs <stan@codesourcery.com>
8073
8074 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8075 (i386_emit_epilogue): Restore %ebx.
8076
943ca1dd
JZ
80772011-08-31 Jie Zhang <jzhang918@gmail.com>
8078
8079 * server.c (step_thread): Remove definition.
8080 (process_serial_event): Don't handle Hs.
8081 * server.h (step_thread): Remove declaration.
8082 * target.c (set_desired_inferior): Remove use of step_thread.
8083
e3deef73
LM
80842011-08-24 Luis Machado <lgustavo@codesourcery.com>
8085
8086 * linux-low.c: Include linux-procfs.h.
8087 (linux_attach_lwp_1): Update comments.
8088 (linux_attach): Scan for existing threads when attaching to a
8089 process that is the tgid.
8090 * Makefile.in: Update dependencies.
8091
13da1c97
LM
80922011-08-24 Luis Machado <lgustavo@codesourcery.com>
8093
8094 * configure.srv: Add linux-procfs.o dependencies.
8095
881127c9
YQ
80962011-08-14 Yao Qi <yao@codesourcery.com>
8097
8098 * target.h (struct target_ops): Fix indent.
8099 * win32-low.c (win32_target_ops): Fix comment.
8100
58dbd541
YQ
81012011-08-14 Andrew Jenner <andrew@codesourcery.com>
8102 Yao Qi <yao@codesourcery.com>
8103
8104 * Makefile.in (clean): Remove tic6x-*.c files.
8105 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8106 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8107 (tic6x-c64xp-linux.c): Likewise.
8108 * configure.srv: Add support for tic6x-*-uclinux.
8109 * linux-tic6x-low.c: New.
8110 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8111
78d85199
YQ
81122011-08-14 Andrew Stubbs <ams@codesourcery.com>
8113 Yao Qi <yao@codesourcery.com>
8114
8115 * target.h (struct target_ops): Add read_loadmap.
8116 * linux-low.c (struct target_loadseg): New type.
8117 (struct target_loadmap): New type.
8118 (linux_read_loadmap): New function.
8119 (linux_target_ops): Add linux_read_loadmap.
8120 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8121 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8122 to NULL.
78d85199 8123
a959a88d
EZ
81242011-08-05 Eli Zaretskii <eliz@gnu.org>
8125
8126 * win32-low.c: Include <stdint.h>.
8127
1ced966e
PA
81282011-07-22 Pedro Alves <pedro@codesourcery.com>
8129
8130 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8131 to the inferior here.
8132 (i386_remove_aligned_watchpoint): Ditto.
8133 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8134 fit part of the watchpoint in the debug registers.
8135 (i386_update_inferior_debug_regs): New.
8136 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8137 registers, and only update the inferior on success.
8138 (i386_low_remove_watchpoint): Ditto.
8139
d26e3629
KY
81402011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8141
8142 * linux-low.c (compare_ints, unique, list_threads, show_process,
8143 linux_core_of_thread): Delete.
8144 (linux_target_ops): Change linux_core_of_thread to
8145 linux_common_core_of_thread.
8146 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8147 * utils.c (malloc_failure): Change type of argument.
8148 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8149 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8150 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8151 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8152 (IPA_OBJS): Add common-utils-ipa.o.
8153 (ptid_h, linux_osdata_h): New macros.
8154 (server_h): Add common/common-utils.h, common/xml-utils.h,
8155 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8156 common/ptid.h.
8157 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8158 ptid.o, buffer.o): New rules.
8159 (linux-low.o): Add common/linux-osdata.h as a dependency.
8160 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8161 * configure.ac: Add AC_HEADER_DIRENT check.
8162 * config.in: Regenerate.
8163 * configure: Regenerate.
8164 * remote-utils.c (xml_escape_text): Delete.
8165 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8166 buffer_xml_printf): Move to common/buffer.c.
8167 * server.c (main): Remove call to initialize_inferiors.
8168 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8169 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8170 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8171 internal_error, gdb_assert, gdb_assert_fail): Delete.
8172 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8173 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8174 common/buffer.h.
8175 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8176 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8177 initialize_inferiors): Delete.
8178
2275a1a7
PA
81792011-07-20 Pedro Alves <pedro@codesourcery.com>
8180
8181 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8182 symbol error.
8183
0a5b1e09
PA
81842011-05-31 Pedro Alves <pedro@codesourcery.com>
8185
8186 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8187 assertion.
8188 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8189
6938fd34
YQ
81902011-05-26 Yao Qi <yao@codesourcery.com>
8191
8192 * Makefile.in (thread-db.o): Track dependence to
8193 common/gdb_thread_db.h.
8194 * thread-db.c: include gdb_thread_db.h from right place.
8195
b481f9e0
TT
81962011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8197
8198 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8199 __FILE__ and __LINE__ to internal_error.
8200
98a5dd13
DE
82012011-05-13 Doug Evans <dje@google.com>
8202
8203 * thread-db.c (try_thread_db_load_from_sdir): New function.
8204 (try_thread_db_load_from_dir): New function.
8205 (thread_db_load_search): Handle $sdir, ignore $pdir.
8206 Remove trying of system directories if search of
8207 libthread-db-search-path fails, that is now done via $sdir.
8208
d248b706
KY
82092011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8210
8211 * server.c (handle_query): Add EnableDisableTracepoints to the list
8212 of supported features.
43aaf8b6 8213 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8214 tracepoints.
43aaf8b6
PA
8215 (cmd_qtenable_disable): New.
8216 (cmd_qtstart): Install tracepoints even if disabled.
8217 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8218 receiving a QTEnable or QTDisable packet.
8219 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8220 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8221 tracepoints.
8222 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8223
84e578fb
DE
82242011-05-10 Doug Evans <dje@google.com>
8225
8226 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8227
71f55dd8
DE
82282011-05-04 Doug Evans <dje@google.com>
8229
8230 * linux-low.c (linux_join): Skip process lookup.
8231 * spu-low.c (spu_join): Ditto.
8232 * server.c (join_inferiors_callback): Delete.
8233 (process_serial_event): For 'D' packet (detach) call join_inferior
8234 directly.
8235
4d393d60
JM
82362011-05-04 Joseph Myers <joseph@codesourcery.com>
8237
8238 * README: Don't mention xscale*-*-linux*.
8239 * configure.srv (xscale*-*-linux*): Don't handle target.
8240
b00ad6ff
NF
82412011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8242
8243 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8244 casting pointers.
8245 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8246 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8247 (i386_emit_void_call_2): Likewise.
8248
af96c192
YQ
82492011-04-26 Yao Qi <yao@codesourcery.com>
8250
43aaf8b6
PA
8251 * linux-low.c: Move common macros to linux-ptrace.h.
8252 Include linux-ptrace.h.
af96c192
YQ
8253 * Makefile.in (linux_ptrace_h): New.
8254 (linux-low.o): Depends on linux-ptrace.h.
8255
03f2bd59
JK
82562011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8257
8258 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8259 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8260 (remote_prepare): New function with most of the TCP code from ...
8261 (remote_open): ... here. Detect PORT here unconditionally. Move also
8262 setting transport_is_reliable.
8263 * server.c (run_once): New variable.
8264 (gdbserver_usage): Document it.
8265 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8266 the first run if RUN_ONCE.
8267 * server.h (run_once, remote_prepare): New declarations.
8268
7a9dd1b2
TT
82692011-04-19 Tom Tromey <tromey@redhat.com>
8270
8271 * win32-low.c (handle_load_dll): Remove duplicate "the".
8272
81239425
PM
82732011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8274
8275 Remove support for old Cygwin 1.5 versions.
8276 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8277 function to avoid warning.
8278 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8279 warning.
8280
9e0627f1
PM
82812011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8282
8283 * gdbserver/server.h (Macro _): Define it if not available.
8284
588eebee
MS
82852011-03-14 Michael Snyder <msnyder@vmware.com>
8286
348af9f7 8287 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8288
43f70d4c
JB
82892011-03-10 Joel Brobecker <brobecker@adacore.com>
8290
8291 * Makefile.in (maintainer-clean realclean distclean): Remove
8292 "make ... subdir_do" command.
8293
348af9f7
MS
82942011-03-10 Michael Snyder <msnyder@vmware.com>
8295
8296 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8297
8298 * server.c (handle_v_run): Free alloced buffer on early return.
8299
e637a4f5
YQ
83002011-03-09 Yao Qi <yao@codesourcery.com>
8301
8302 Revert:
8303 2011-03-04 Yao Qi <yao@codesourcery.com>
8304
8305 * Makefile.in: Remove GNU make feature --directory.
8306
8307 2011-03-05 Yao Qi <yao@codesourcery.com>
8308
8309 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8310 (subdir_do): New make target. Copied from gdb/Makefile.
8311 (maintainer-clean, realclean, distclean, clean): Call corresponding
8312 make targets in common/Makefile.
8313
8314 2011-02-11 Yao Qi <yao@codesourcery.com>
8315
8316 * configure.ac: Call AC_PROG_RANLIB.
8317 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8318 * configure: Regenerate.
8319
e6edda56
JK
83202011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8321
8322 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8323
e5141119
JB
83242011-03-06 Yao Qi <yao@codesourcery.com>
8325
8326 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8327
64794aa4
JB
83282011-03-05 Yao Qi <yao@codesourcery.com>
8329
8330 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8331 (subdir_do): New make target. Copied from gdb/Makefile.
8332 (maintainer-clean, realclean, distclean, clean): Call corresponding
8333 make targets in common/Makefile.
8334
7a762829
YQ
83352011-03-04 Yao Qi <yao@codesourcery.com>
8336
8337 * Makefile.in: Remove GNU make feature --directory.
8338
348af9f7
MS
83392011-03-04 Michael Snyder <msnyder@vmware.com>
8340
8341 * server.c (queue_stop_reply): Call xmalloc not malloc.
8342
83432011-03-02 Michael Snyder <msnyder@vmware.com>
8344
8345 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8346
9f72fee2
MS
83472011-02-28 Michael Snyder <msnyder@vmware.com>
8348
588eebee
MS
8349 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8350 (cmd_qtframe): Ditto.
8351 (cmd_qtbuffer): Ditto.
8352 (cmd_bigqtbuffer): Ditto.
8353
9f72fee2
MS
8354 * utils.c (decimal2str): Initialize 'width' to nine, then
8355 don't mess with it.
8356
8040bd49
UW
83572011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8358
8359 * hostio.c (require_data): Free *data, not data.
8360
7e52cbd0
JK
83612011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8362
8363 * hostio.c (require_data): Use free, not xfree.
8364
9130f83e
MS
83652011-02-27 Michael Snyder <msnyder@vmware.com>
8366
4b812f4e
MS
8367 * server.c (handle_query): Discard unused value.
8368
9130f83e
MS
8369 * hostio.c (require_data): Free malloc memory before returning
8370 error.
8371
69d37113
MS
83722011-02-26 Michael Snyder <msnyder@vmware.com>
8373
8374 * linux-low.c (list_threads): Call closedir for dirent.
8375
35f5825a
MS
83762011-02-27 Michael Snyder <msnyder@vmware.com>
8377
2a589cef
MS
8378 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8379 a case statement falls through.
8380
0adea5f7
MS
8381 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8382
35f5825a
MS
8383 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8384 in comparison.
8385
238f1c74
MS
83862011-02-26 Michael Snyder <msnyder@vmware.com>
8387
8388 * utils.c (decimal2str): Eliminate dead code and dead param.
8389 (pulongest): Drop dead param from call to decimal2str.
8390 (plongest): Ditto.
8391
633ff500
JB
83922011-02-24 Joel Brobecker <brobecker@adacore.com>
8393
8394 Revert the following patch (not approved yet):
8395 2011-02-21 Hui Zhu <teawater@gmail.com>
8396 * tracepoint.c (tp_printf): New function.
8397 (eval_agent_expr): Handle gdb_agent_op_printf.
8398
f9c6ff72
HZ
83992011-02-21 Hui Zhu <teawater@gmail.com>
8400
8401 * tracepoint.c (tp_printf): New function.
8402 (eval_agent_expr): Handle gdb_agent_op_printf.
8403
94d5e490
TT
84042011-02-18 Tom Tromey <tromey@redhat.com>
8405
8406 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8407 (tracepoint.o): Likewise.
8408 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8409 (gdb_agent_op_names): Likewise.
8410
c7f96d2b
TT
84112011-02-18 Tom Tromey <tromey@redhat.com>
8412
8413 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8414 gdb_agent_op_rot>: New constants.
8415 (gdb_agent_op_names): Add pick and roll.
8416 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8417 cases.
8418
0feedb2c
JK
84192011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8420
8421 * aclocal.m4: Regenerated with aclocal-1.11.1.
8422
b3b9301e
PA
84232011-02-14 Pedro Alves <pedro@codesourcery.com>
8424
8425 * server.c (handle_qxfer_traceframe_info): New.
8426 (qxfer_packets): Register "traceframe-info".
8427 (handle_query): Report support for qXfer:traceframe-info:read+.
8428 * tracepoint.c (match_blocktype): New.
8429 (traceframe_find_block_type): Rename to ...
8430 (traceframe_walk_blocks): ... this. Add callback filter argument,
8431 and use it.
8432 (traceframe_find_block_type): New, reimplemented on top of
8433 traceframe_walk_blocks.
8434 (build_traceframe_info_xml): New.
8435 (traceframe_read_info): New.
8436 * server.h (traceframe_read_info): Declare.
8437
4f3e6fb7
YQ
84382011-02-11 Yao Qi <yao@codesourcery.com>
8439
8440 * configure.ac: Call AC_PROG_RANLIB.
8441 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8442 * configure: Regenerate.
8443
764880b7
PA
84442011-02-07 Pedro Alves <pedro@codesourcery.com>
8445
8446 * server.c (gdb_read_memory): Change return semantics to allow
8447 partial transfers.
8448 (handle_search_memory_1): Adjust.
8449 (process_serial_event) <'m' packet>: Handle partial transfers.
8450 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8451
1c79eb8a
PA
84522011-01-28 Pedro Alves <pedro@codesourcery.com>
8453
8454 * regcache.c (init_register_cache): Initialize
8455 regcache->register_status.
8456 (free_register_cache): Release regcache->register_status.
8457 (regcache_cpy): Copy register_status.
8458 (registers_to_string): Print 'x's for unavailable registers.
8459 (supply_register): Mark the register's status valid or
8460 unavailable, depending on whether a buffer was passed in or not.
8461 (supply_register_zeroed): New.
8462 (supply_regblock): Mark the registers' status valid or
8463 unavailable, depending on whether a buffer was passed in or not.
8464 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8465 (struct regcache): New `register_status' field.
8466 (supply_register_zeroed): Declare.
8467 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8468 supply_register_zeroed, rather than passing a NULL buffer to
8469 supply_register.
8470 * tracepoint.c (fetch_traceframe_registers): Update comment.
8471
85724a0e
PA
84722011-01-28 Pedro Alves <pedro@codesourcery.com>
8473
8474 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8475 buffer explicit.
8476
d08aafef
PA
84772011-01-25 Pedro Alves <pedro@codesourcery.com>
8478
8479 * server.h (decode_xfer_write): Change prototype.
8480 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8481 and don't extract the annex here.
8482 * server.c (decode_xfer_read): Remove `annex' parameter,
8483 and don't extract the annex here.
8484 (decode_xfer): New.
8485 (struct qxfer): New.
8486 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8487 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8488 (handle_qxfer_statictrace): New functions, abstracted out from
8489 handle_query, and made to use the struct qxfer interface.
8490 (handle_threads_qxfer_proper): Rename to ...
8491 (handle_qxfer_threads_proper): ... this.
8492 (handle_threads_qxfer): Rename to ...
8493 (handle_qxfer_threads): ... this. Adjust.
8494 (qxfer_packets): New array.
8495 (handle_qxfer): New function.
8496 (handle_query): Use handle_qxfer.
8497
493e2a69
MS
84982011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8499
8500 * gdbreplay.c: Shorten lines of >= 80 columns.
8501 * linux-low.c: Ditto.
8502 * linux-ppc-low.c: Ditto.
8503 * linux-s390-low.c: Ditto.
8504 * linux-sparc-low.c: Ditto.
8505 * linux-x86-low.c: Ditto.
8506 * linux-xtensa-low.c: Ditto.
8507 * mem-break.c: Ditto.
8508 * nto-low.c: Ditto.
8509 * regcache.h: Ditto.
8510 * remote-utils.c: Ditto.
8511 * server.c: Ditto.
8512 * server.h: Ditto.
8513 * thread-db.c: Ditto.
8514 * tracepoint.c: Ditto.
8515 * utils.c: Ditto.
8516 * win32-low.h: Ditto.
8517
44944448
JB
85182011-01-05 Joel Brobecker <brobecker@adacore.com>
8519
8520 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8521 update.
8522
71ce852c
JB
85232011-01-01 Joel Brobecker <brobecker@adacore.com>
8524
8525 * server.c (gdbserver_version): Update copyright year in version
8526 output.
8527 * gdbreplay.c (gdbreplay_version): Ditto.
8528
eb826dc6
MF
85292010-12-29 Jie Zhang <jie.zhang@analog.com>
8530
8531 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8532 * linux-bfin-low.c: New file.
8533 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8534 PT_DATA_ADDR for BFIN targets.
8535 * Makefile.in (SFILES): Add linux-bfin-low.c.
8536 (clean): Remove reg-bfin.c.
8537 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8538 * README: Mention supported Blackfin targets.
8539
39ab222a
MF
85402010-12-23 Mike Frysinger <vapier@gentoo.org>
8541
8542 * .gitignore: New file.
8543
a1f2ce7d
MF
85442010-11-16 Mike Frysinger <vapier@gentoo.org>
8545
8546 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8547
f474844c
JZ
85482010-10-22 Jie Zhang <jie@codesourcery.com>
8549
8550 * Makefile.in: Add FLAGS_TO_PASS variable.
8551 (install): Remove dependency of install-only and recursively
8552 invoke make for install-only.
8553
f1048712
DE
85542010-10-04 Doug Evans <dje@google.com>
8555
8556 * Makefile.in (uninstall): Use $(DESTDIR).
8557
b53a1623
PA
85582010-09-24 Pedro Alves <pedro@codesourcery.com>
8559
e6ee044d
PA
8560 PR gdb/11842
8561
b53a1623
PA
8562 * linux-x86-low.c (compat_siginfo_from_siginfo)
8563 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8564 si_code is < 0. Check for si_code == SI_TIMER before checking for
8565 si_code < 0.
8566
fa1bd1e4
JB
85672010-09-13 Joel Brobecker <brobecker@adacore.com>
8568
8569 * lynx-i386-low.c: New file.
8570 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8571
47fac8f8
JB
85722010-09-13 Joel Brobecker <brobecker@adacore.com>
8573
8574 * lynx-low.c (ptrace_request_to_str): Remove handling for
8575 request values that have been removed in LynxOS 5.x.
8576
1adfc54d
JB
85772010-09-13 Joel Brobecker <brobecker@adacore.com>
8578
8579 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8580 <ptrace.h>
8581
c2a66c29
NS
85822010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8583
8584 * configure.ac: Add --enable-inprocess-agent option.
8585 * configure: Rebuilt.
8586
32fcada3
YQ
85872010-09-06 Yao Qi <yao@codesourcery.com>
8588
8589 * linux-low.c (linux_kill): Remove unused variable.
8590 (linux_stabilize_threads): Likewise.
8591 * server.c (start_inferior): Likewise.
8592 (queue_stop_reply_callback): Likewise.
8593 * tracepoint.c (do_action_at_tracepoint): Likewise.
8594
0cccb683
YQ
85952010-09-06 Yao Qi <yao@codesourcery.com>
8596
8597 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8598 on return.
8599
423ec54c
JK
86002010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8601
8602 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8603
12ac6819
PA
86042010-09-06 Pedro Alves <pedro@codesourcery.com>
8605
8606 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8607 "$(IPA_DEPFILES)".
8608
8ed54b31
JB
86092010-09-01 Joel Brobecker <brobecker@adacore.com>
8610
8611 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8612 gdbserver/lynx-ppc-low.c: New files.
8613 * Makefile.in (lynx_low_h): New variable.
8614 (lynx-low.o, lynx-ppc-low.o): New rules.
8615 * configure.ac: On LynxOS, link with -lnetinet.
8616 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8617 * configure: regenerate.
8618
bb0116a4
JB
86192010-09-01 Joel Brobecker <brobecker@adacore.com>
8620
8621 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8622 * configure.ac: Add check for vasprintf and vsnprintf.
8623 * configure, config.in: Regenerate.
8624 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8625
a778ab81 86262010-09-01 Joel Brobecker <brobecker@adacore.com>
8627
8628 * gdbreplay.c: Move include of alloca.h up, next to include of
8629 malloc.h.
8630 * server.h: Add include of malloc.h.
8631 * mem-break.c: Remove include of malloc.h.
8632 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8633
8b034a19 86342010-09-01 Joel Brobecker <brobecker@adacore.com>
8635
8636 * Makefile.in (memmem.o): Build with -Wno-error.
8637
86382010-09-01 Joel Brobecker <brobecker@adacore.com>
8639
8640 * utils.c (xsnprintf): Make non-static.
8641 * server.h: Add xsnprintf declaration.
8642 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8643 replace calls to snprintf by calls to xsnprintf throughout.
8644
86452010-09-01 Joel Brobecker <brobecker@adacore.com>
8646
8647 * configure.ac: Add configure check for alloca.
8648 * configure, config.in: Regenerate.
8649 * server.h: Include alloca.h if it exists.
8650 * gdbreplay.c: Include alloca.h if it exists.
8651
1a981360
PA
86522010-08-28 Pedro Alves <pedro@codesourcery.com>
8653
8654 * linux-low.c (__SIGRTMIN): Define if not already defined.
8655 (linux_create_inferior): Check for __ANDROID__ rather than
8656 __SIGRTMIN.
8657 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8658 are already deferred.
8659 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8660 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8661 stopped and already has a pending signal to report.
8662 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8663 a pending signal to report or is moving out of a jump pad.
8664 (linux_init_signals): Check for __ANDROID__ rather than
8665 __SIGRTMIN.
8666
b4d51a55
PA
86672010-08-28 Pedro Alves <pedro@codesourcery.com>
8668
8669 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8670 debug_threads check. Avoid a linear search when not doing debug
8671 output.
8672
ec48365d
PA
86732010-08-27 Pedro Alves <pedro@codesourcery.com>
8674
8675 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8676 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8677 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8678 (process_event): Change local fd's type to gdb_fildes_t.
8679 (create_file_handler): Adjust prototype.
8680 (delete_file_handler): Adjust prototype.
8681 (handle_file_event): Adjust prototype. Use pfildes.
8682 (create_file_event): Adjsut prototype.
8683 * remote-utils.c (remote_desc, listen_desc): Change type to
8684 gdb_fildes_t.
8685 * server.h: New gdb_fildes_t typedef.
8686 [USE_WIN32API]: Include winsock2.h.
8687 (delete_file_handler, add_file_handler): Adjust prototypes.
8688 (pfildes): Declare.
8689 * utils.c (pfildes): New.
8690
854d88f0
PA
86912010-08-27 Pedro Alves <pedro@codesourcery.com>
8692
8693 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8694 * configure: Regenerate.
8695
0146f85b
PA
86962010-08-27 Pedro Alves <pedro@codesourcery.com>
8697
8698 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8699 (linux_done_accessing_memory): ... this.
8700 (linux_target_ops): Adjust.
8701 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8702 * nto-low.c (nto_target_ops): Adjust comment.
8703 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8704 * spu-low.c (spu_target_ops): Adjust comment.
8705 * target.h (target_ops): Rename unprepare_to_access_memory field
8706 to done_accessing_memory.
8707 (unprepare_to_access_memory): Rename to ...
8708 (done_accessing_memory): ... this.
8709
90d74c30
PA
87102010-08-26 Pedro Alves <pedro@codesourcery.com>
8711
8712 * linux-low.c (linux_prepare_to_access_memory): New.
8713 (linux_unprepare_to_access_memory): New.
8714 (linux_target_ops): Install them.
8715 * server.c (read_memory): Rename to ...
8716 (gdb_read_memory): ... this. Use
8717 prepare_to_access_memory/prepare_to_access_memory.
8718 (write_memory): Rename to ...
8719 (gdb_write_memory): ... this. Use
8720 prepare_to_access_memory/prepare_to_access_memory.
8721 (handle_search_memory_1): Adjust.
8722 (process_serial_event): Adjust.
8723 * target.h (struct target_ops): New fields
8724 prepare_to_access_memory and unprepare_to_access_memory.
8725 (prepare_to_access_memory, unprepare_to_access_memory): New.
8726 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8727 prepare_to_access_memory/prepare_to_access_memory.
8728 * nto-low.c (nto_target_ops): Adjust.
8729 * spu-low.c (spu_target_ops): Adjust.
8730 * win32-low.c (win32_target_ops): Adjust.
8731
fd467969
PA
87322010-08-26 Pedro Alves <pedro@codesourcery.com>
8733
8734 * Makefile.in (WARN_CFLAGS): Get it from configure.
8735 (WERROR_CFLAGS): New.
8736 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8737 * configure.ac: Introduce --enable-werror, which adds -Werror to
8738 the compiler command line. Enabled by default. Disable with
8739 --disable-werror. Add -Wdeclaration-after-statement
8740 Wpointer-arith and -Wformat-nonliteral to warning flags.
8741 * configure: Regenerate.
8742
331e2f5f
PA
87432010-08-26 Pedro Alves <pedro@codesourcery.com>
8744
8745 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8746
e581f2b4
PA
87472010-08-26 Pedro Alves <pedro@codesourcery.com>
8748
8749 * gdbreplay.c (remote_error): New.
8750 (gdbchar): New.
8751 (expect): Use gdbchar. Check for error reading from GDB.
8752 Clarify sync error output.
8753 (play): Check for errors writing to GDB.
8754 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8755 * remote-utils.c (getpkt): Check for errors writing to the remote
8756 descriptor.
8757
3c11dd79
PA
87582010-08-25 Pedro Alves <pedro@codesourcery.com>
8759
8760 * linux-low.c (linux_wait_1): Move non-debugging code out of
8761 `debug_threads' control.
8762
d20a8ad9
PA
87632010-08-25 Pedro Alves <pedro@codesourcery.com>
8764
8765 * linux-low.c (linux_wait_1): Don't set last_status here.
8766 * server.c (push_event, queue_stop_reply_callback): Assert we're
8767 not pushing a TARGET_WAITKIND_IGNORE event.
8768 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8769 (myresume, handle_target_event): Set the thread's last_resume_kind
8770 and last_status from the target returned status.
8771
964e4306
PA
87722010-08-25 Pedro Alves <pedro@codesourcery.com>
8773
8774 PR threads/10729
8775
8776 * linux-x86-low.c (update_debug_registers_callback): New.
8777 (i386_dr_low_set_addr): Use it.
8778 (i386_dr_low_get_addr): New.
8779 (i386_dr_low_set_control): Use update_debug_registers_callback.
8780 (i386_dr_low_get_control): New.
8781 (i386_dr_low_get_status): Adjust.
8782 * linux-low.c (linux_stop_lwp): New.
8783 * linux-low.h (linux_stop_lwp): Declare.
8784
8785 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8786 argument instead of a i386_debug_reg_state.
8787 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8788 a i386_debug_reg_state.
8789 (i386_insert_aligned_watchpoint): Adjust.
8790 (i386_remove_aligned_watchpoint): Adjust.
8791 (i386_low_stopped_data_address): Read the debug registers from the
8792 inferior instead of from the mirrors.
8793 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8794 (i386_dr_low_get_addr): Declare.
8795 (i386_dr_low_get_control): Declare.
8796 (i386_dr_low_get_status): Change prototype.
8797
8798 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8799 (i386_dr_low_get_addr): New.
8800 (i386_dr_low_get_control): New.
8801 (i386_dr_low_get_status): Adjust prototype. Return
8802 dr_status_mirror.
8803 (i386_initial_stuff): Clear dr_status_mirror and
8804 dr_control_mirror.
8805 (i386_get_thread_context): Adjust.
8806 (i386_set_thread_context): Adjust.
8807 (i386_thread_added): Adjust.
8808
5f21a75b
PA
88092010-08-24 Pedro Alves <pedro@codesourcery.com>
8810
8811 * linux-low.h (linux_thread_area): Delete declaration.
8812
3e4c1235
TS
88132010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8814
8815 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8816 after its termination.
8817
1971b033
PA
88182010-08-09 Pedro Alves <pedro@codesourcery.com>
8819
8820 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8821 (gdb_wants_all_stopped): Delete.
8822 (linux_wait_1): Don't call them.
8823 * server.c (handle_v_cont): Tag all threads as want-stopped.
8824 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8825 stopped as "client-wants-stopped".
8826
310444ac
PA
88272010-07-31 Pedro Alves <pedro@codesourcery.com>
8828
8829 * Makefile.in (signals_h): New.
8830 (server_h): Depend on it.
8831 (server.o): Don't depend on $(signals_def).
8832 (signals.o): Depend on $(signals_def).
8833
a19cae16
JK
88342010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8835
8836 * Makefile.in (signals_def): New.
8837 (server_h): Append include/gdb/signals.h and signals_def.
8838 (server.o): Append signals_def.
8839
30d50328
JK
88402010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8841
8842 * server.c (handle_target_event): Use target_signal_to_host for
8843 resume_info.sig initialization.
8844 * target.h (struct thread_resume) <sig>: New comment.
8845
5c3216e2
OS
88462010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8847
c6f46ca0
OS
8848 * server.c (handle_query): strcpy() the returned string from paddress()
8849 instead of sprintf().
5c3216e2
OS
8850 * utils.c (paddress): Return phex_nz().
8851
6bd31874
JB
88522010-07-07 Joel Brobecker <brobecker@adacore.com>
8853
8854 * server.c (handle_v_cont): Call mourn_inferior if process
8855 just exited.
8856 (myresume): Likewise.
8857
0fb4aa4b
PA
88582010-07-01 Pedro Alves <pedro@codesourcery.com>
8859
8860 Static tracepoints, and integration with UST.
8861
8862 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8863 * mem-break.c (uninsert_all_breakpoints)
8864 (reinsert_all_breakpoints): New.
8865 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8866 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8867 (gdb_agent_ust_loaded, helper_thread_id)
8868 (gdb_agent_helper_thread_id): New macros.
8869 (struct ipa_sym_addresses): Add addr_ust_loaded,
8870 addr_helper_thread_id, addr_cmd_buf.
8871 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8872 (in_process_agent_loaded_ust): New.
8873 (write_e_ust_not_loaded): New.
8874 (maybe_write_ipa_ust_not_loaded): New.
8875 (struct collect_static_trace_data_action): New.
8876 (enum tracepoint_type) <static_tracepoint>: New.
8877 (struct tracepoint) <handle>: Mention static tracepoints.
8878 (struct static_tracepoint_ctx): New.
8879 (CMD_BUF_SIZE): New.
8880 (add_tracepoint_action): Handle static tracepoint actions.
8881 (unprobe_marker_at): New.
8882 (clear_installed_tracepoints): Handle static tracepoints.
8883 (cmd_qtdp): Handle static tracepoints.
8884 (probe_marker_at): New.
8885 (cmd_qtstart): Handle static tracepoints.
8886 (response_tracepoint): Handle static tracepoints.
8887 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8888 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8889 (get_context_regcache): Handle static tracepoints.
8890 (do_action_at_tracepoint): Handle static tracepoint actions.
8891 (traceframe_find_block_type): Handle static trace data blocks.
8892 (traceframe_read_sdata): New.
8893 (download_tracepoints): Download static tracepoint actions.
8894 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8895 (GDB_PROBE_NAME): New.
8896 (ust_ops): New.
8897 (GET_UST_SYM): New.
8898 (USTF): New.
8899 (dlsym_ust): New.
8900 (ust_marker_to_static_tracepoint): New.
8901 (gdb_probe): New.
8902 (collect_ust_data_at_tracepoint): New.
8903 (gdb_ust_probe): New.
8904 (UNIX_PATH_MAX, SOCK_DIR): New.
8905 (gdb_ust_connect_sync_socket): New.
8906 (resume_thread, stop_thread): New.
8907 (run_inferior_command): New.
8908 (init_named_socket): New.
8909 (gdb_ust_socket_init): New.
8910 (cstr_to_hexstr): New.
8911 (next_st): New.
8912 (first_marker, next_marker): New.
8913 (response_ust_marker): New.
8914 (cmd_qtfstm, cmd_qtsstm): New.
8915 (unprobe_marker_at, probe_marker_at): New.
8916 (cmd_qtstmat, gdb_ust_thread): New.
8917 (gdb_ust_init): New.
8918 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8919 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8920 (ST_REGENTRY): New.
8921 (x86_64_st_collect_regmap): New.
8922 (X86_64_NUM_ST_COLLECT_GREGS): New.
8923 (AMD64_RIP_REGNUM): New.
8924 (supply_static_tracepoint_registers): New.
8925 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8926 (ST_REGENTRY): New.
8927 (i386_st_collect_regmap): New.
8928 (i386_NUM_ST_COLLECT_GREGS): New.
8929 (supply_static_tracepoint_registers): New.
8930 * server.c (handle_query): Handle qXfer:statictrace:read.
8931 <qSupported>: Report support for StaticTracepoints, and
8932 qXfer:statictrace:read features.
8933 * server.h (traceframe_read_sdata)
8934 (supply_static_tracepoint_registers): Declare.
8935 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8936 (unpack_varlen_hex): Include in IPA build.
8937 * Makefile.in (ustlibs, ustinc): New.
8938 (IPA_OBJS): Add remote-utils-ipa.o.
8939 ($(IPA_LIB)): Link -ldl and -lpthread.
8940 (UST_CFLAGS): New.
8941 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8942 * config.in, configure: Regenerate.
8943
9e4344e5
PA
89442010-06-20 Ian Lance Taylor <iant@google.com>
8945 Pedro Alves <pedro@codesourcery.com>
8946
8947 * linux-x86-low.c (always_true): Delete.
8948 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8949 trying to fool the compiler with always_true.
8950
c6beb2cb
PA
89512010-06-20 Pedro Alves <pedro@codesourcery.com>
8952
8953 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8954 conditions in gdbserver.
8955
d2ed6730
UW
89562010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8957
8958 * spu-low.c (spu_read_memory): Wrap around local store limit.
8959 (spu_write_memory): Likewise.
8960
4e29fb54
PA
89612010-06-15 Pedro Alves <pedro@codesourcery.com>
8962
8963 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8964 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8965 LONGEST uses.
8966 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8967 uses.
8968 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8969 uses with LONGEST uses.
8970
6a271cae
PA
89712010-06-14 Stan Shebs <stan@codesourcery.com>
8972 Pedro Alves <pedro@codesourcery.com>
8973
8974 Bytecode compiler.
8975
8976 * linux-x86-low.c: Include limits.h.
8977 (add_insns): New.
8978 (always_true): New.
8979 (EMIT_ASM): New.
8980 (EMIT_ASM32): New.
8981 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8982 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8983 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8984 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8985 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8986 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8987 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8988 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8989 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8990 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8991 (amd64_emit_void_call_2): New.
8992 (amd64_emit_ops): New.
8993 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8994 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8995 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8996 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8997 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8998 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8999 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9000 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9001 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9002 (i386_emit_stack_adjust, i386_emit_int_call_1)
9003 (i386_emit_void_call_2): New.
9004 (i386_emit_ops): New.
9005 (x86_emit_ops): New.
9006 (the_low_target): Install x86_emit_ops.
9007 * server.h (struct emit_ops): New.
9008 (get_raw_reg_func_addr): Declare.
9009 (current_insn_ptr, emit_error): Declare.
9010 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9011 (set_trace_state_variable_value): New defines.
9012 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9013 addr_get_trace_state_variable_value and
9014 addr_set_trace_state_variable_value.
9015 (symbol_list): New fields for get_raw_reg,
9016 get_trace_state_variable_value and set_trace_state_variable_value.
9017 (condfn): New typedef.
9018 (struct tracepoint): New field `compiled_cond'.
9019 (do_action_at_tracepoint): Clear compiled_cond.
9020 (get_trace_state_variable_value, set_trace_state_variable_value):
9021 Export in the IPA.
9022 (condition_true_at_tracepoint): If there's a compiled condition,
9023 run that.
9024 (current_insn_ptr, emit_error): New globals.
9025 (struct bytecode_address): New.
9026 (get_raw_reg_func_addr): New.
9027 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9028 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9029 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9030 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9031 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9032 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9033 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9034 (compile_tracepoint_condition, compile_bytecodes): New.
9035 * target.h (emit_ops): Forward declare.
9036 (struct target_ops): New field emit_ops.
9037 (target_emit_ops): New.
9038 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9039 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9040 * linux-low.c (linux_emit_ops): New.
9041 (linux_target_ops): Install it.
9042 * linux-low.h (struct linux_target_ops): New field emit_ops.
9043
92b72907
UW
90442010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9045
9046 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9047 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9048
fa593d66
PA
90492010-06-01 Pedro Alves <pedro@codesourcery.com>
9050 Stan Shebs <stan@codesourcery.com>
9051
9052 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9053 (all): Depend on $(extra_libraries).
9054 (install-only): Install the IPA.
9055 (IPA_OBJS, IPA_LIB): New.
9056 (clean): Remove the IPA lib.
9057 (IPAGENT_CFLAGS): New.
9058 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9059 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9060 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9061 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9062 * configure.ac: Check for atomic builtins support in the compiler.
9063 (IPA_DEPFILES, extra_libraries): Define.
9064 * configure.srv (ipa_obj): Add description.
9065 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9066 (i[34567]86-*-linux*): Set ipa_obj.
9067 (x86_64-*-linux*): Set ipa_obj.
9068 * linux-low.c (stabilizing_threads): New.
9069 (supports_fast_tracepoints): New.
9070 (linux_detach): Stabilize threads before detaching.
9071 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9072 the lwp is either not stabilizing, or is moving out of a jump pad.
9073 (linux_fast_tracepoint_collecting): New.
9074 (maybe_move_out_of_jump_pad): New.
9075 (enqueue_one_deferred_signal): New.
9076 (dequeue_one_deferred_signal): New.
9077 (linux_wait_for_event_1): If moving out of a jump pad, defer
9078 pending signals to later.
9079 (linux_stabilize_threads): New.
9080 (linux_wait_1): Check if threads need moving out of jump pads, and
9081 do it if so.
9082 (stuck_in_jump_pad_callback): New.
9083 (move_out_of_jump_pad_callback): New.
9084 (lwp_running): New.
9085 (linux_resume_one_lwp): Handle moving out of jump pads.
9086 (linux_set_resume_request): Dequeue deferred signals.
9087 (need_step_over_p): Also step over fast tracepoint jumps.
9088 (start_step_over): Also uninsert fast tracepoint jumps.
9089 (finish_step_over): Also reinsert fast tracepoint jumps.
9090 (linux_install_fast_tracepoint_jump): New.
9091 (linux_target_ops): Install linux_stabilize_threads and
9092 linux_install_fast_tracepoint_jump_pad.
9093 * linux-low.h (linux_target_ops) <get_thread_area,
9094 install_fast_tracepoint_jump_pad>: New fields.
9095 (struct lwp_info) <collecting_fast_tracepoint,
9096 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9097 (linux_get_thread_area): Declare.
9098 * linux-x86-low.c (jump_insn): New.
9099 (x86_get_thread_area): New.
9100 (append_insns): New.
9101 (push_opcode): New.
9102 (amd64_install_fast_tracepoint_jump_pad): New.
9103 (i386_install_fast_tracepoint_jump_pad): New.
9104 (x86_install_fast_tracepoint_jump_pad): New.
9105 (the_low_target): Install x86_get_thread_area and
9106 x86_install_fast_tracepoint_jump_pad.
9107 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9108 (struct fast_tracepoint_jump): New.
9109 (fast_tracepoint_jump_insn): New.
9110 (fast_tracepoint_jump_shadow): New.
9111 (find_fast_tracepoint_jump_at): New.
9112 (fast_tracepoint_jump_here): New.
9113 (delete_fast_tracepoint_jump): New.
9114 (set_fast_tracepoint_jump): New.
9115 (uninsert_fast_tracepoint_jumps_at): New.
9116 (reinsert_fast_tracepoint_jumps_at): New.
9117 (set_breakpoint_at): Use write_inferior_memory.
9118 (uninsert_raw_breakpoint): Use write_inferior_memory.
9119 (check_mem_read): Mask out fast tracepoint jumps.
9120 (check_mem_write): Mask out fast tracepoint jumps.
9121 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9122 (set_fast_tracepoint_jump): Declare.
9123 (delete_fast_tracepoint_jump)
9124 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9125 (reinsert_fast_tracepoint_jumps_at): Declare.
9126 * regcache.c: Don't compile many functions when building the
9127 in-process agent library.
9128 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9129 the register buffer in the heap.
9130 (free_register_cache): If the register buffer isn't owned by the
9131 regcache, don't free it.
9132 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9133 pre-existing register caches.
9134 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9135 type.
9136 (convert_ascii_to_int): : Constify `from' parameter type.
9137 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9138 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9139 the needed buffer in-place.
9140 (relocate_instruction): New.
9141 * server.c (handle_query) <qSymbols>: If the target supports
9142 tracepoints, give it a chance of looking up symbols. Report
9143 support for fast tracepoints.
9144 (handle_status): Stabilize threads.
9145 (process_serial_event): Adjust.
9146 * server.h (struct fast_tracepoint_jump): Forward declare.
9147 (struct process_info) <fast_tracepoint_jumps>: New field.
9148 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9149 (decode_X_packet, decode_M_packet): Adjust.
9150 (relocate_instruction): Declare.
9151 (in_process_agent_loaded): Declare.
9152 (tracepoint_look_up_symbols): Declare.
9153 (struct fast_tpoint_collect_status): Declare.
9154 (fast_tracepoint_collecting): Declare.
9155 (force_unlock_trace_buffer): Declare.
9156 (handle_tracepoint_bkpts): Declare.
9157 (initialize_low_tracepoint)
9158 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9159 * target.h (struct target_ops) <stabilize_threads,
9160 install_fast_tracepoint_jump_pad>: New fields.
9161 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9162 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9163 [HAVE_STDINT_H]: Include stdint.h.
9164 (trace_debug_1): Rename to ...
9165 (trace_vdebug): ... this.
9166 (trace_debug): Rename to ...
9167 (trace_debug_1): ... this. Add `level' parameter.
9168 (trace_debug): New.
9169 (ATTR_USED, ATTR_NOINLINE): New.
9170 (IP_AGENT_EXPORT): New.
9171 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9172 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9173 (about_to_request_buffer_space, trace_buffer_is_full)
9174 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9175 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9176 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9177 (traceframe_write_count, traceframes_created)
9178 (trace_state_variables)
9179 New renaming defines.
9180 (struct ipa_sym_addresses): New.
9181 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9182 (symbol_list): New.
9183 (ipa_sym_addrs): New.
9184 (all_tracepoint_symbols_looked_up): New.
9185 (in_process_agent_loaded): New.
9186 (write_e_ipa_not_loaded): New.
9187 (maybe_write_ipa_not_loaded): New.
9188 (tracepoint_look_up_symbols): New.
9189 (debug_threads) [IN_PROCESS_AGENT]: New.
9190 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9191 (UNKNOWN_SIDE_EFFECTS): New.
9192 (stop_tracing): New.
9193 (flush_trace_buffer): New.
9194 (stop_tracing_bkpt): New.
9195 (flush_trace_buffer_bkpt): New.
9196 (read_inferior_integer): New.
9197 (read_inferior_uinteger): New.
9198 (read_inferior_data_pointer): New.
9199 (write_inferior_data_pointer): New.
9200 (write_inferior_integer): New.
9201 (write_inferior_uinteger): New.
9202 (struct collect_static_trace_data_action): Delete.
9203 (enum tracepoint_type): New.
9204 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9205 <actions_str, step_actions, step_actions_str>: Only include in
9206 GDBserver.
fa593d66
PA
9207 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9208 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9209 (tracepoints): Use IP_AGENT_EXPORT.
9210 (last_tracepoint): Don't include in the IPA.
9211 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9212 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9213 (alloced_trace_state_variables): New.
9214 (trace_state_variables): Use IP_AGENT_EXPORT.
9215 (traceframe_t): Delete unused variable.
9216 (circular_trace_buffer): Don't include in the IPA.
9217 (trace_buffer_start): Delete.
9218 (struct trace_buffer_control): New.
9219 (trace_buffer_free): Delete.
9220 (struct ipa_trace_buffer_control): New.
9221 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9222 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9223 New.
9224 (trace_buffer_ctrl): New.
9225 (TRACE_BUFFER_CTRL_CURR): New.
9226 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9227 Reimplement as macros.
9228 (trace_buffer_wrap): Delete.
9229 (traceframe_write_count, traceframe_read_count)
9230 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9231 (struct tracepoint_hit_ctx) <type>: New field.
9232 (struct fast_tracepoint_ctx): New.
9233 (memory_barrier): New.
9234 (cmpxchg): New.
9235 (record_tracepoint_error): Update atomically in the IPA.
9236 (clear_inferior_trace_buffer): New.
9237 (about_to_request_buffer_space): New.
9238 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9239 updating the same buffer.
9240 (add_tracepoint): Default the tracepoint's type to trap
9241 tracepoint, and orig_size to -1.
9242 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9243 internal variables.
9244 (create_trace_state_variable): New parameter `gdb'. Handle it.
9245 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9246 (cmd_qtdp): Handle fast tracepoints.
9247 (cmd_qtdv): Adjust.
9248 (max_jump_pad_size): New.
9249 (gdb_jump_pad_head): New.
9250 (get_jump_space_head): New.
9251 (claim_jump_space): New.
9252 (sort_tracepoints): New.
9253 (MAX_JUMP_SIZE): New.
9254 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9255 IPA.
9256 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9257 support. Upload fast traceframes, and delete internal IPA
9258 breakpoints.
9259 (stop_tracing_handler): New.
9260 (flush_trace_buffer_handler): New.
9261 (cmd_qtstop): Upload fast tracepoints.
9262 (response_tracepoint): Handle fast tracepoints.
9263 (tracepoint_finished_step): Upload fast traceframes. Set the
9264 tracepoint hit context's tracepoint type.
9265 (handle_tracepoint_bkpts): New.
9266 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9267 type. Add comment about fast tracepoints.
9268 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9269 non-existing action_str field.
9270 (get_context_regcache): Handle fast tracepoints.
9271 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9272 to the regcache.
9273 (fast_tracepoint_from_jump_pad_address): New.
9274 (fast_tracepoint_from_ipa_tpoint_address): New.
9275 (collecting_t): New.
9276 (force_unlock_trace_buffer): New.
9277 (fast_tracepoint_collecting): New.
9278 (collecting): New.
9279 (gdb_collect): New.
9280 (write_inferior_data_ptr): New.
9281 (target_tp_heap): New.
9282 (target_malloc): New.
9283 (download_agent_expr): New.
9284 (UALIGN): New.
9285 (download_tracepoints): New.
9286 (download_trace_state_variables): New.
9287 (upload_fast_traceframes): New.
9288 (IPA_FIRST_TRACEFRAME): New.
9289 (IPA_NEXT_TRACEFRAME_1): New.
9290 (IPA_NEXT_TRACEFRAME): New.
9291 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9292 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9293 (gdb_jump_pad_buffer_end): New.
9294 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9295 (initialize_tracepoint): Adjust.
9296 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9297 buffer. Initialize the low module.
9298 * utils.c (PREFIX, TOOLNAME): New.
9299 (malloc_failure): Use PREFIX.
9300 (error): In the IPA, an error causes an exit.
9301 (fatal, warning): Use PREFIX.
9302 (internal_error): Use TOOLNAME.
9303 (NUMCELLS): Increase to 10.
9304 * configure, config.in: Regenerate.
9305
d149dd1d
PA
93062010-06-01 Pedro Alves <pedro@codesourcery.com>
9307
9308 * server.c (handle_query) <qSupported>: Do two passes over the
9309 qSupported string to avoid nesting strtok.
9310
f6528abd
JK
93112010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9312
9313 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9314 (CDEPS): New.
9315 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9316 -Wl,--dynamic-list.
9317 * configure: Regenerate.
9318 * proc-service.list: New.
9319
ca2a87a0
JK
93202010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9321
9322 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9323 New comment.
9324
363a6e9f
OS
93252010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9326
9327 * gdbreplay.c (remote_open): Check error return from socket() call by
9328 its equality to -1 not by it being negative.
9329 * remote-utils.c (remote_open): Likewise.
9330
d23b6cb1
PA
93312010-05-23 Pedro Alves <pedro@codesourcery.com>
9332
9333 * config.h: Regenerate.
9334
28d3cf85
MK
93352010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9336
9337 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9338 doesn't provide PTRACE_GET_THREAD_AREA.
9339
fea36a59
MK
93402010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9341
9342 * linux-m68k-low.c: Include <asm/ptrace.h>
9343 (ps_get_thread_area): Implement.
9344
24b066ba
DE
93452010-05-03 Doug Evans <dje@google.com>
9346
9347 * event-loop.c (struct callback_event): New struct.
9348 (callback_list): New global.
9349 (append_callback_event, delete_callback_event): New functions.
9350 (process_callback): New function.
9351 (start_event_loop): Call it.
9352 * remote-utils.c (NOT_SCHEDULED): Define.
9353 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9354 moved out of readchar.
9355 (readchar): Rewrite. Call reschedule before returning.
9356 (reset_readchar): New function.
9357 (remote_close): Call it.
9358 (process_remaining, reschedule): New functions.
9359 * server.h (callback_handler_func): New typedef.
9360 (append_callback_event, delete_callback_event): Declare.
9361
9836d6ea
PA
93622010-05-03 Pedro Alves <pedro@codesourcery.com>
9363
9364 * proc-service.c (ps_pglobal_lookup): Use
9365 thread_db_look_up_one_symbol.
9366 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9367 parameter. Use it instead of all_symbols_looked_up.
9368 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9369 field.
9370 (all_symbols_looked_up): Don't declare.
9371 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9372 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9373 field.
9374 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9375 Set all_symbols_looked_up here.
9376 (thread_db_look_up_one_symbol): New.
9377 (thread_db_get_tls_address): Adjust.
9378 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9379 thread_db object on the heap, and tentatively set it in the
9380 process structure.
9381 (thread_db_init): Don't set all_symbols_looked_up here.
9382 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9383
7984d532
PA
93842010-05-03 Pedro Alves <pedro@codesourcery.com>
9385
9386 * linux-low.c (linux_kill, linux_detach): Adjust.
9387 (status_pending_p_callback): Remove redundant statement. Check
9388 for !TARGET_WAITIKIND_IGNORE, instead of
9389 TARGET_WAITKIND_STOPPED.
9390 (handle_tracepoints): Make sure LWP is locked. Adjust.
9391 (linux_wait_for_event_1): Adjust.
9392 (linux_cancel_breakpoints): New.
9393 (unsuspend_one_lwp): New.
9394 (unsuspend_all_lwps): New.
9395 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9396 (send_sigstop_callback): Change return type to int, add new
9397 `except' parameter and handle it.
9398 (suspend_and_send_sigstop_callback): New.
9399 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9400 pass them down. If SUSPEND, also increment the lwp's suspend
9401 count.
9402 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9403 (need_step_over_p): Don't consider suspended LWPs.
9404 (start_step_over): Adjust.
9405 (proceed_one_lwp): Change return type to int, add new `except'
9406 parameter and handle it.
9407 (unsuspend_and_proceed_one_lwp): New.
9408 (proceed_all_lwps): Use find_inferior instead of
9409 for_each_inferior.
9410 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9411 also decrement the suspend count of LWPs. Pass `except' down,
9412 instead of hacking its suspend count.
9413 (linux_pause_all): Add `freeze' parameter. Adjust.
9414 (linux_unpause_all): New.
9415 (linux_target_ops): Install linux_unpause_all.
9416 * server.c (handle_status): Adjust.
9417 * target.h (struct target_ops): New fields `unpause_all' and
9418 `cancel_breakpoints'. Add new parameter to `pause_all'.
9419 (pause_all): Add new `freeze' parameter.
9420 (unpause_all): New.
9421 (cancel_breakpoints): New.
9422 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9423 cancel breakpoints.
9424 (cmd_qtstart): Pause threads.
9425 (stop_tracing): Pause threads, and cancel breakpoints.
9426 * win32-low.c (win32_target_ops): Adjust.
9427
e471f25b
PA
94282010-05-03 Pedro Alves <pedro@codesourcery.com>
9429
9430 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9431 the inferior right away from here...
9432 (linux_wait_1): ... to here, and adjust to check the thread's
9433 last_resume_kind instead of the lwp's step or stop_expected flags.
9434
1915ef4f
PA
94352010-05-02 Pedro Alves <pedro@codesourcery.com>
9436
9437 * README: Use consistent `GDB' and `GDBserver' spellings.
9438
f9e39928
PA
94392010-05-02 Pedro Alves <pedro@codesourcery.com>
9440
9441 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9442 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9443 (linux_detach_one_lwp): Assume the lwp is stopped.
9444 (any_thread_of): Delete.
9445 (linux_detach): Stop all lwps here. Don't blindly delete all
9446 breakpoints.
9447 (delete_lwp_callback): New.
9448 (linux_mourn): Delete all lwps of the process that is gone.
9449 (linux_wait_1): Don't delete the last lwp of the process here.
9450 * mem-break.h (mark_breakpoints_out): Declare.
9451 * mem-break.c (mark_breakpoints_out): New.
9452 (free_all_breakpoints): Use it.
9453 * server.c (handle_target_event): If the process is gone, mark
9454 breakpoints out.
9455 * thread-db.c (struct thread_db) <create_bp>: New field.
9456 (thread_db_enable_reporting): Fix prototype. Store a thread event
9457 breakpoint reference in the thread_db struct.
9458 (thread_db_load_search): Clear the thread_db object.
9459 (try_thread_db_load_1): Ditto.
9460 (switch_to_process): New.
9461 (disable_thread_event_reporting): Use it.
9462 (remove_thread_event_breakpoints): New.
9463 (thread_db_detach, thread_db_mourn): Use it.
9464
1e7fc18c
PA
94652010-05-01 Pedro Alves <pedro@codesourcery.com>
9466
9467 * linux-low.c (linux_enable_event_reporting): New.
9468 (linux_wait_for_event_1, handle_extended_wait): Use it.
9469
02fc4de7
PA
94702010-04-30 Pedro Alves <pedro@codesourcery.com>
9471
9472 * linux-low.c (linux_kill_one_lwp, linux_kill)
9473 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9474 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9475 SIGSTOP even if the LWP is stopped.
9476 (send_sigstop_callback): New.
9477 (stop_all_lwps): Use send_sigstop_callback instead.
9478 (linux_resume_one_thread): Adjust.
9479 (proceed_one_lwp): Still proceed an LWP that the client has
9480 requested to stop, if we haven't reported it as stopped yet. Make
9481 sure that LWPs the client want stopped, have a pending SIGSTOP.
9482
bc3b5632
DE
94832010-04-26 Doug Evans <dje@google.com>
9484
ae1ada35
DE
9485 * server.c (handle_general_set): Make static.
9486
bc3b5632
DE
9487 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9488 Print received char after testing for error/eof instead of before.
9489 (input_interrupt): Tweak comment.
9490
65730243
DE
94912010-04-23 Doug Evans <dje@google.com>
9492
9493 * server.c (start_inferior): Print inferior argv if --debug.
9494
a8ae7dc0
AR
94952010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9496
9497 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9498 * nto-x86-low.c: Include server.h
9499
1c07cc19
PM
95002010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9501
9502 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9503 be consistent with other sources of this directory.
9504 (init_registers_amd64): Correct name of source file of this function
9505 in the comment.
9506
e0a61e09
PM
95072010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9508
9509 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9510 64-bit executables.
9511
54709339
PM
95122010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9513
9514 * win32-i386-low.c: Add 64-bit support.
9515 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9516 (init_registers_amd64): Declare.
9517 (mappings): Add 64-bit version of array.
9518 (init_windows_x86): New function.
9519 (the_low_target): Change init_arch field to init_windows_x86.
9520
e8f0053d
PM
95212010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9522
9523 * win32-low.c: Adapt to support also 64-bit architecture.
9524 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9525 (get_image_name): Use SIZE_T type for local variable `done'.
9526 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9527 (toolhelp_get_dll_name): Idem.
9528 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9529 Use uintptr_t typecast to avoid warning.
9530 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9531 (handle_exception): Use phex_nz to avoid warning.
9532 (win32_wait): Remove unused local variable `process'.
9533
c481e77e
PM
95342010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9535
9536 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9537 `amd64-avx.o'.
9538
12ea4b69
PM
95392010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9540
9541 * configure.ac: Use `ws2_32' library for srv_mingw.
9542 * configure: Regenerate.
9543 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9544 * remote-utils.c: Likewise.
9545
f6d1620c
L
95462010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9547
9548 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9549 if __x86_64__ is defined.
9550
8e642873
PM
95512010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9552
9553 * configure: Regenerate.
9554
711e434b
PM
95552010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9556
9557 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9558 * target.h (target_ops): New get_tib_address field.
9559 * win32-low.h (win32_thread_info): Add thread_local_base field.
9560 * win32-low.c (child_add_thread): Add tlb argument.
9561 Set thread_local_base field to TLB.
9562 (get_child_debug_event): Adapt to child_add_thread change.
9563 (win32_get_tib_address): New function.
9564 (win32_target_ops): Set get_tib_address field to
9565 win32_get_tib_address.
9566 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9567
505106cd
PA
95682010-04-12 Pedro Alves <pedro@codesourcery.com>
9569
505106cd
PA
9570 * linux-low.c (linux_mourn): Also remove the process.
9571 * server.c (handle_target_event): Don't remove the process here.
9572 * nto-low.c (nto_mourn): New.
9573 (nto_target_ops): Install it.
9574 * spu-low.c (spu_mourn): New.
9575 (spu_target_ops): Install it.
9576 * win32-low.c (win32_mourn): New.
9577 (win32_target_ops): Install it.
9578
e8470a06
PA
95792010-04-12 Pedro Alves <pedro@codesourcery.com>
9580
9581 * server.h (buffer_xml_printf): Remove redundant `;'.
9582
45ba0d02
PA
95832010-04-12 Pedro Alves <pedro@codesourcery.com>
9584
9585 * regcache.c (set_register_cache): Invalidate regcaches before
9586 changing the register cache layout.
9587 (regcache_invalidate_one): Allow a NULL regcache.
9588 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9589 regcaches before changing the register cache layout or the target
9590 regsets.
9591
59e04013
L
95922010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9593
9594 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9595 variable warning on Linux/x86-64.
9596
8336d594
PA
95972010-04-11 Pedro Alves <pedro@codesourcery.com>
9598
9599 GDBserver disconnected tracing support.
9600
9601 * linux-low.c (linux_remove_process): Delete.
9602 (add_lwp): Don't set last_resume_kind here.
9603 (linux_kill): Use `mourn'.
9604 (linux_detach): Use `thread_db_detach', and `mourn'.
9605 (linux_mourn): New.
9606 (linux_attach_lwp_1): Adjust comment.
9607 (linux_attach): last_resume_kind moved the thread_info; adjust.
9608 (status_pending_p_callback): Adjust.
9609 (linux_wait_for_event_1): Adjust.
9610 (count_events_callback, select_singlestep_lwp_callback)
9611 (select_event_lwp_callback, cancel_breakpoints_callback)
9612 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9613 (proceed_one_lwp): Adjust.
9614 (linux_async): Add debug output.
9615 (linux_thread_stopped): New.
9616 (linux_pause_all): New.
9617 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9618 linux_pause_all.
9619 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9620 (thread_db_free): Delete declaration.
9621 (thread_db_detach, thread_db_mourn): Declare.
9622 * thread-db.c (thread_db_init): Use thread_db_mourn.
9623 (thread_db_free): Delete, split in two.
9624 (disable_thread_event_reporting): New.
9625 (thread_db_detach): New.
9626 (thread_db_mourn): New.
9627
9628 * server.h (struct thread_info) <last_resume_kind>: New field.
9629 <attached>: Add comment.
9630 <gdb_detached>: New field.
9631 (handler_func): Change return type to int.
9632 (handle_serial_event, handle_target_event): Ditto.
9633 (gdb_connected): Declare.
9634 (tracing): Delete.
9635 (disconnected_tracing): Declare.
9636 (stop_tracing): Declare.
9637
9638 * server.c (handle_query) <qSupported>: Report support for
9639 disconnected tracing.
9640 (queue_stop_reply_callback): Account for running threads.
9641 (gdb_wants_thread_stopped): New.
9642 (gdb_wants_all_threads_stopped): New.
9643 (gdb_reattached_process): New.
9644 (handle_status): Clear the `gdb_detached' flag of all processes.
9645 In all-stop, stop all threads.
9646 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9647 (process_serial_event): If the remote connection breaks, or if an
9648 exit was forced with "monitor exit", force an event loop exit.
9649 Handle disconnected tracing on detach.
9650 (handle_serial_event): Adjust.
9651 (handle_target_event): If GDB isn't connected, forward events back
9652 to the inferior, unless the last process exited, in which case,
9653 exit gdbserver. Adjust interface.
9654
9655 * remote-utils.c (remote_open): Don't block in accept. Instead
9656 register an event loop source on the listen socket file
9657 descriptor. Refactor bits into ...
9658 (listen_desc): ... this new global.
9659 (gdb_connected): ... this new function.
9660 (enable_async_notification): ... this new function.
9661 (handle_accept_event): ... this new function.
9662 (remote_close): Clear remote_desc.
9663
9664 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9665
9666 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9667 New fields.
9668 (mourn_inferior): Define.
9669 (target_process_qsupported): Avoid the dangling else problem.
9670 (thread_stopped): Define.
9671 (pause_all): Define.
9672 (target_waitstatus_to_string): Declare.
9673 * target.c (target_waitstatus_to_string): New.
9674
9675 * tracepoint.c (tracing): Make extern.
9676 (disconnected_tracing): New.
9677 (stop_tracing): Make extern. Handle tracing stops due to GDB
9678 disconnecting.
9679 (cmd_qtdisconnected): New.
9680 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9681 (handle_tracepoint_general_set): Handle QTDisconnected.
9682
9683 * event-loop.c (event_handler_func): Change return type to int.
9684 (process_event): Bail out if the event handler wants the event
9685 loop to stop.
9686 (handle_file_event): Ditto.
9687 (start_event_loop): Bail out if the event handler wants the event
9688 loop to stop.
9689
9690 * nto-low.c (nto_target_ops): Adjust.
9691 * spu-low.c (spu_wait): Don't remove the process here.
9692 (spu_target_ops): Adjust.
9693 * win32-low.c (win32_wait): Don't remove the process here.
9694 (win32_target_ops): Adjust.
9695
5d267c4c
PA
96962010-04-11 Pedro Alves <pedro@codesourcery.com>
9697
9698 * regcache.c (realloc_register_cache): Invalidate inferior's
9699 regcache before recreating it.
9700
623ccd72
PA
97012010-04-09 Pedro Alves <pedro@codesourcery.com>
9702
9703 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9704
219f2f23
PA
97052010-04-09 Stan Shebs <stan@codesourcery.com>
9706 Pedro Alves <pedro@codesourcery.com>
9707
9708 * server.h (LONGEST): New.
9709 (struct thread_info) <while_stepping>: New field.
9710 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9711 Declare.
9712 (initialize_tracepoint, handle_tracepoint_general_set)
9713 (handle_tracepoint_query, tracepoint_finished_step)
9714 (tracepoint_was_hit, release_while_stepping_state_list):
9715 (current_traceframe): Declare.
9716 * server.c (handle_general_set): Handle tracepoint packets.
9717 (read_memory): New.
9718 (write_memory): New.
9719 (handle_search_memory_1): Use read_memory.
9720 (handle_query): Report support for conditional tracepoints, trace
9721 state variables, and tracepoint sources. Handle tracepoint
9722 queries.
9723 (main): Initialize the tracepoints module.
9724 (process_serial_event): Handle traceframe reads/writes.
9725
9726 * linux-low.c (handle_tracepoints): New.
9727 (linux_wait_1): Call it.
9728 (linux_resume_one_lwp): Handle while-stepping.
9729 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9730 (linux_target_ops): Install them.
9731 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9732 New field.
9733 * linux-x86-low.c (x86_supports_tracepoints): New.
9734 (the_low_target). Install it.
9735
9736 * mem-break.h (delete_breakpoint): Declare.
9737 * mem-break.c (delete_breakpoint): Make external.
9738
9739 * target.h (struct target_ops): Add `supports_tracepoints',
9740 `read_pc', and `write_pc' fields.
9741 (target_supports_tracepoints): Define.
9742 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9743 (phex_nz): New.
9744
9745 * regcache.h (struct regcache) <registers_owned>: New field.
9746 (init_register_cache, regcache_cpy): Declare.
9747 (regcache_read_pc, regcache_write_pc): Declare.
9748 (register_cache_size): Declare.
9749 (supply_regblock): Declare.
9750 * regcache.c (init_register_cache): New.
9751 (new_register_cache): Use it.
9752 (regcache_cpy): New.
9753 (register_cache_size): New.
9754 (supply_regblock): New.
9755 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9756
219f2f23
PA
9757 * tracepoint.c: New.
9758
9759 * Makefile.in (OBS): Add tracepoint.o.
9760 (tracepoint.o): New rule.
9761
3a13a53b
L
97622010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9763
9764 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9765 (i386-mmx.o): New.
9766 (i386-mmx.c): Likewise.
9767 (i386-mmx-linux.o): Likewise.
9768 (i386-mmx-linux.c): Likewise.
9769
9770 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9771 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9772 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9773 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9774
9775 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9776 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9777 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9778
1570b33e
L
97792010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9780
9781 * Makefile.in (clean): Updated.
9782 (i386-avx.o): New.
9783 (i386-avx.c): Likewise.
9784 (i386-avx-linux.o): Likewise.
9785 (i386-avx-linux.c): Likewise.
9786 (amd64-avx.o): Likewise.
9787 (amd64-avx.c): Likewise.
9788 (amd64-avx-linux.o): Likewise.
9789 (amd64-avx-linux.c): Likewise.
9790
9791 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9792 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9793 (srv_amd64_regobj): Add amd64-avx.o.
9794 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9795 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9796 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9797 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9798 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9799 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9800 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9801
9802 * i387-fp.c: Include "i386-xstate.h".
9803 (i387_xsave): New.
9804 (i387_cache_to_xsave): Likewise.
9805 (i387_xsave_to_cache): Likewise.
9806 (x86_xcr0): Likewise.
9807
9808 * i387-fp.h (i387_cache_to_xsave): Likewise.
9809 (i387_xsave_to_cache): Likewise.
9810 (x86_xcr0): Likewise.
9811
9812 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9813 * linux-crisv32-low.c (target_regsets): Likewise.
9814 * linux-m68k-low.c (target_regsets): Likewise.
9815 * linux-mips-low.c (target_regsets): Likewise.
9816 * linux-ppc-low.c (target_regsets): Likewise.
9817 * linux-s390-low.c (target_regsets): Likewise.
9818 * linux-sh-low.c (target_regsets): Likewise.
9819 * linux-sparc-low.c (target_regsets): Likewise.
9820 * linux-xtensa-low.c (target_regsets): Likewise.
9821
9822 * linux-low.c: Include <sys/uio.h>.
9823 (regsets_fetch_inferior_registers): Support nt_type.
9824 (regsets_store_inferior_registers): Likewise.
9825 (linux_process_qsupported): New.
9826 (linux_target_ops): Add linux_process_qsupported.
9827
9828 * linux-low.h (regset_info): Add nt_type.
9829 (linux_target_ops): Add process_qsupported.
9830
9831 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9832 and <sys/uio.h>.
9833 (init_registers_i386_avx_linux): New.
9834 (init_registers_amd64_avx_linux): Likewise.
9835 (xmltarget_i386_linux_no_xml): Likewise.
9836 (xmltarget_amd64_linux_no_xml): Likewise.
9837 (PTRACE_GETREGSET): Likewise.
9838 (PTRACE_SETREGSET): Likewise.
9839 (x86_fill_xstateregset): Likewise.
9840 (x86_store_xstateregset): Likewise.
9841 (use_xml): Likewise.
9842 (x86_linux_update_xmltarget): Likewise.
9843 (x86_linux_process_qsupported): Likewise.
9844 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9845 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9846 init_registers_i386_linux here. Call
9847 x86_linux_update_xmltarget.
9848 (the_low_target): Add x86_linux_process_qsupported.
9849
9850 * server.c (handle_query): Call target_process_qsupported.
9851
9852 * target.h (target_ops): Add process_qsupported.
9853 (target_process_qsupported): New.
9854
fc7238bb
PA
98552010-04-03 Pedro Alves <pedro@codesourcery.com>
9856
9857 * inferiors.c (add_thread): Set last_status kind to
9858 TARGET_WAITKIND_IGNORE.
9859 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9860 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9861 (linux_wait_1): Move `thread' local definition to block that uses
9862 it. Don't NULL initialize `event_child'.
9863 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9864 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9865 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9866
bdabb078
PA
98672010-04-01 Pedro Alves <pedro@codesourcery.com>
9868
9869 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9870 an extended waitstatus, or by a watchpoint.
9871 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9872 thread was stepping or has been stopped by a watchpoint.
9873
d3bbe7a0
PA
98742010-04-01 Pedro Alves <pedro@codesourcery.com>
9875
9876 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9877 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9878 of another, then delete the previous, and validate all
9879 breakpoints.
9880 (validate_inserted_breakpoint): New.
9881 (delete_disabled_breakpoints): New.
9882 (validate_breakpoints): New.
9883 (check_mem_read): Validate breakpoints before trusting their
9884 shadow. Delete disabled breakpoints.
9885 (check_mem_write): Validate breakpoints before trusting they
9886 should be inserted. Delete disabled breakpoints.
9887 * mem-break.h (validate_breakpoints):
9888 * server.c (handle_query): Validate breakpoints when we see a
9889 qSymbol query.
9890
8b07ae33
PA
98912010-04-01 Pedro Alves <pedro@codesourcery.com>
9892
9893 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9894 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9895 if we could tell there's a GDB breakpoint at stop_pc.
9896 (need_step_over_p): Don't do a step over if we find a GDB
9897 breakpoint at the resume PC.
9898
9899 * mem-break.c (struct raw_breakpoint): New.
9900 (enum bkpt_type): New type `gdb_breakpoint'.
9901 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9902 fields. New field `raw'.
9903 (find_raw_breakpoint_at): New.
9904 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9905 breakpoint instead.
9906 (set_breakpoint_at): Adjust.
9907 (delete_raw_breakpoint): New.
9908 (release_breakpoint): New.
9909 (delete_breakpoint): Rename to...
9910 (delete_breakpoint_1): ... this. Add proc parameter. Use
9911 release_breakpoint. Return ENOENT.
9912 (delete_breakpoint): Reimplement.
9913 (find_breakpoint_at): Delete.
9914 (find_gdb_breakpoint_at): New.
9915 (delete_breakpoint_at): Delete.
9916 (set_gdb_breakpoint_at): New.
9917 (delete_gdb_breakpoint_at): New.
9918 (gdb_breakpoint_here): New.
9919 (set_reinsert_breakpoint): Use release_breakpoint.
9920 (uninsert_breakpoint): Rename to ...
9921 (uninsert_raw_breakpoint): ... this.
9922 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9923 (reinsert_raw_breakpoint): Change parameter type to
9924 raw_breakpoint.
9925 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9926 instead.
9927 (check_breakpoints): Adjust. Use release_breakpoint.
9928 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9929 (breakpoint_inserted_here): Ditto.
9930 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9931 Don't trust the breakpoint's shadow if it is not inserted.
9932 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9933 (delete_all_breakpoints): Adjust.
9934 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9935 use delete_breakpoint_1.
9936
9937 * mem-break.h (breakpoints_supported): Delete declaration.
9938 (set_gdb_breakpoint_at): Declare.
9939 (gdb_breakpoint_here): Declare.
9940 (delete_breakpoint_at): Delete.
9941 (delete_gdb_breakpoint_at): Declare.
9942
9943 * server.h (struct raw_breakpoint): Forward declare.
9944 (struct process_info): New field `raw_breakpoints'.
9945
9946 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9947 breakpoints.
9948
6bf5e0ba
PA
99492010-03-24 Pedro Alves <pedro@codesourcery.com>
9950
9951 * linux-low.c (status_pending_p_callback): Fix comment.
9952 (linux_wait_for_event_1): Move most of the internal breakpoint
9953 handling from here...
9954 (linux_wait_1): ... to here.
9955 (count_events_callback): New.
9956 (select_singlestep_lwp_callback): New.
9957 (select_event_lwp_callback): New.
9958 (cancel_breakpoints_callback): New.
9959 (select_event_lwp): New.
9960 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9961 priority to all LWPs that have had events that should be reported
9962 to the client. Cancel breakpoints when about to reporting the
9963 event to the client, not while stopping lwps. No longer cancel
9964 finished single-steps here.
9965 (cancel_finished_single_step): Delete.
9966 (cancel_finished_single_steps): Delete.
9967
414a389f
PA
99682010-03-24 Pedro Alves <pedro@codesourcery.com>
9969
9970 * mem-break.c (enum bkpt_type): New.
9971 (struct breakpoint): New field `type'.
9972 (set_breakpoint_at): Change return type to struct breakpoint
9973 pointer. Set type to `other_breakpoint' by default.
9974 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9975 in the breakpoint list.
9976 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9977 (reinsert_breakpoint): Rename to ...
9978 (reinsert_raw_breakpoint): ... this.
9979 (reinsert_breakpoints_at): Adjust.
9980 * mem-break.h (struct breakpoint): Declare.
9981 (set_breakpoint_at): Change return type to struct breakpoint
9982 pointer.
9983
2280c721
PA
99842010-03-24 Pedro Alves <pedro@codesourcery.com>
9985
9986 * server.c (handle_query): Assign, not compare.
9987
d50171e4
PA
99882010-03-24 Pedro Alves <pedro@codesourcery.com>
9989
9990 Teach linux gdbserver to step-over-breakpoints.
9991
9992 * linux-low.c (can_hardware_single_step): New.
9993 (supports_breakpoints): New.
9994 (handle_extended_wait): If stopping threads, read the stop pc of
9995 the new cloned LWP.
9996 (get_pc): New.
9997 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9998 low target doesn't support retrieving the PC.
9999 (add_lwp): Set last_resume_kind to resume_continue.
10000 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10001 (linux_attach): Don't clear stop_expected. Set the lwp's
10002 last_resume_kind to resume_stop.
10003 (linux_detach_one_lwp): Don't check for removed breakpoints.
10004 (check_removed_breakpoint): Delete.
10005 (status_pending_p): Rename to ...
10006 (status_pending_p_callback): ... this. Don't check for removed
10007 breakpoints. Don't consider threads that are stopped from GDB's
10008 perspective.
10009 (linux_wait_for_lwp): Always read the stop_pc here.
10010 (cancel_breakpoint): New.
10011 (step_over_bkpt): New global.
10012 (linux_wait_for_event_1): Implement stepping over breakpoints.
10013 (gdb_wants_lwp_stopped): New.
10014 (gdb_wants_all_stopped): New.
10015 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10016 single-step traps here. Store the thread's last reported target
10017 wait status.
10018 (send_sigstop): Don't clear stop_expected. Always set it,
10019 instead.
10020 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10021 (cancel_finished_single_step): New.
10022 (cancel_finished_single_steps): New.
10023 (wait_for_sigstop): Don't cancel finished single-step traps here.
10024 (linux_resume_one_lwp): Don't check for removed breakpoints.
10025 Don't set `step' on non-hardware step archs.
10026 (linux_set_resume_request): Ignore resume_stop requests if already
10027 stopping or stopped. Set the lwp's last_resume_kind.
10028 (resume_status_pending_p): Don't check for removed breakpoints.
10029 (need_step_over_p): New.
10030 (start_step_over): New.
10031 (finish_step_over): New.
10032 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10033 requests. Clear the thread's last reported target waitstatus.
10034 Don't use the `suspended' flag. Don't consider pending breakpoints.
10035 (linux_resume): Start a step-over if necessary.
10036 (proceed_one_lwp): New.
10037 (proceed_all_lwps): New.
10038 (unstop_all_lwps): New.
10039 * linux-low.h (struct lwp_info): Rewrite comment for the
10040 `suspended' flag. Add the `stop_pc' field. Delete the
10041 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10042 Add `'last_resume_kind' and `need_step_over' fields.
10043 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10044 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10045 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10046 (set_raw_breakpoint_at): New.
10047 (set_breakpoint_at): Rewrite to use it.
10048 (reinsert_breakpoint_handler): Delete.
10049 (set_reinsert_breakpoint): New.
10050 (reinsert_breakpoint_by_bp): Delete.
10051 (delete_reinsert_breakpoints): New.
10052 (uninsert_breakpoint): Rewrite.
10053 (uninsert_breakpoints_at): New.
10054 (reinsert_breakpoint): Rewrite.
10055 (reinsert_breakpoints_at): New.
10056 (check_breakpoints): Rewrite.
10057 (breakpoint_here): New.
10058 (breakpoint_inserted_here): New.
10059 (check_mem_read): Adjust.
10060 * mem-break.h (breakpoints_supported, breakpoint_here)
10061 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10062 (reinsert_breakpoint_by_bp): Delete declaration.
10063 (delete_reinsert_breakpoints): Declare.
10064 (reinsert_breakpoint): Delete declaration.
10065 (reinsert_breakpoints_at): Declare.
10066 (uninsert_breakpoint): Delete declaration.
10067 (uninsert_breakpoints_at): Declare.
10068 (check_breakpoints): Adjust prototype.
10069 * server.h: Adjust include order.
10070 (struct thread_info): Declare here. Add a `last_status' field.
10071
30ba68cb
MS
100722010-03-23 Michael Snyder <msnyder@vmware.com>
10073
10074 * server.c (crc32): New function.
10075 (handle_query): Add handling for 'qCRC:' request.
10076
b9a881c2
PA
100772010-03-23 Pedro Alves <pedro@codesourcery.com>
10078
10079 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10080 lwp had been stopped by a watchpoint.
10081
e92d13d5
PA
100822010-03-16 Pedro Alves <pedro@codesourcery.com>
10083
10084 * server.h (internal_error): Declare.
10085 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10086 * utils.c (internal_error): New function.
10087
64daa791
AS
100882010-03-15 Andreas Schwab <schwab@redhat.com>
10089
10090 * configure.srv: Fix typo setting srv_regobj.
10091
f52cd8cd
PA
100922010-03-15 Pedro Alves <pedro@codesourcery.com>
10093
10094 * linux-low.c (fetch_register): Avoid passing a non string literal
10095 format to `error'.
10096 (usr_store_inferior_registers): Ditto.
10097
93ae6fdc
PA
100982010-03-14 Pedro Alves <pedro@codesourcery.com>
10099
10100 * linux-low.c (linux_write_memory): Bail out early if peeking
10101 memory failed.
10102
c3adc08c
PA
101032010-03-14 Pedro Alves <pedro@codesourcery.com>
10104
10105 * linux-low.h (struct lwp_info): New fields
10106 `stopped_by_watchpoint' and `stopped_data_address'.
10107 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10108 here, and cache them in the lwp object.
10109 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10110 directly.
10111 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10112 field.
10113 (linux_stopped_by_watchpoint): Rewrite.
10114 (linux_stopped_data_address): Rewrite.
10115
bce522a2
PA
101162010-03-06 Simo Melenius <simo.melenius@iki.fi>
10117
10118 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10119 switching the current inferior, not before.
10120
90884b2b
L
101212010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10122
10123 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10124 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10125 i386-linux.c and amd64-linux.c.
10126 (reg-i386.o): Removed.
10127 (reg-i386.c): Likewise.
10128 (reg-i386-linux.o): Likewise.
10129 (reg-i386-linux.c): Likewise.
10130 (reg-x86-64.o): Likewise.
10131 (reg-x86-64.c): Likewise.
10132 (reg-x86-64-linux.o): Likewise.
10133 (reg-x86-64-linux.c): Likewise.
10134 (i386.o): New.
10135 (i386.c): Likewise.
10136 (i386-linux.o): Likewise.
10137 (i386-linux.c): Likewise.
10138 (amd64.o): Likewise.
10139 (amd64.c): Likewise.
10140 (amd64-linux.o): Likewise.
10141 (amd64-linux.c): Likewise.
10142
10143 * configure.srv (srv_i386_regobj): New.
10144 (srv_i386_linux_regobj): Likewise.
10145 (srv_amd64_regobj): Likewise.
10146 (srv_amd64_linux_regobj): Likewise.
10147 (srv_i386_32bit_xmlfiles): Likewise.
10148 (srv_i386_64bit_xmlfiles): Likewise.
10149 (srv_i386_xmlfiles): Likewise.
10150 (srv_amd64_xmlfiles): Likewise.
10151 (srv_i386_linux_xmlfiles): Likewise.
10152 (srv_amd64_linux_xmlfiles): Likewise.
10153 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10154 srv_xmlfiles to $srv_i386_xmlfiles.
10155 (i[34567]86-*-mingw32ce*): Likewise.
10156 (i[34567]86-*-mingw*): Likewise.
10157 (i[34567]86-*-nto*): Likewise.
10158 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10159 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10160 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10161 (x86_64-*-linux*): Likewise.
10162
10163 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10164 (init_registers_amd64_linux): New.
10165 (x86_arch_setup): Replace init_registers_x86_64_linux with
10166 init_registers_amd64_linux.
10167
193f13e6
MK
101682010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10169
10170 * configure.ac: Check for libdl. If it is not available link against
10171 static libthread_db.
10172 * configure: Regenerate.
10173
85d721b8
PA
101742010-02-22 Pedro Alves <pedro@codesourcery.com>
10175
10176 PR9605
10177
10178 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10179 handing a read watchpoint.
10180 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10181
6076632b
DE
101822010-02-12 Doug Evans <dje@google.com>
10183
10184 * linux-low.c (linux_supports_tracefork_flag): Document.
10185 (linux_look_up_symbols): Add comment.
10186
3327ccf7
L
101872010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10188
10189 * regcache.c (supply_register): Clear regcache if buf is NULL.
10190
0718675c 101912010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10192 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10193
10194 * inferiors.c (find_inferior): Add function documentation.
10195 (unloaded_dll): Handle the case where the unloaded dll has not
10196 been previously registered in the dll list.
10197
177321bd
DJ
101982010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10199
10200 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10201 (thumb2_breakpoint): New.
10202 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10203
2b009048
DJ
102042010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10205
10206 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10207 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10208 breakpoints.
10209
3be029c7
PA
102102010-01-21 Pedro Alves <pedro@codesourcery.com>
10211
10212 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10213
18f5de3b
JK
102142010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10215
10216 * linux-s390-low.c (s390_collect_ptrace_register)
10217 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10218
3743bb4f
DE
102192010-01-21 Doug Evans <dje@google.com>
10220
14ce3065
DE
10221 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10222 (PTRACE_ARG4_TYPE): New macro.
10223 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10224 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10225 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10226 (usr_store_inferior_registers): Ditto.
10227 (linux_read_memory, linux_write_memory): Ditto.
10228 (linux_test_for_tracefork): Ditto.
10229
3743bb4f
DE
10230 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10231 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10232
8b315be5
PA
102332010-01-21 Pedro Alves <pedro@codesourcery.com>
10234
10235 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10236 target.
10237
85492558
PA
102382010-01-21 Pedro Alves <pedro@codesourcery.com>
10239
10240 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10241 prototype to take a regcache. Adjust.
10242
442ea881
PA
102432010-01-20 Pedro Alves <pedro@codesourcery.com>
10244
10245 * regcache.h (struct thread_info): Forward declare.
10246 (struct regcache): New.
10247 (new_register_cache): Adjust prototype.
10248 (get_thread_regcache): Declare.
10249 (free_register_cache): Adjust prototype.
10250 (registers_to_string, registers_from_string): Ditto.
10251 (supply_register, supply_register_by_name, collect_register)
10252 (collect_register_as_string, collect_register_by_name): Ditto.
10253 * regcache.c (struct inferior_regcache_data): Delete.
10254 (get_regcache): Rename to ...
10255 (get_thread_regcache): ... this. Adjust. Switch inferior before
10256 fetching registers.
10257 (regcache_invalidate_one): Adjust.
10258 (regcache_invalidate): Fix prototype.
10259 (new_register_cache): Return the new register cache.
10260 (free_register_cache): Change prototype.
10261 (realloc_register_cache): Adjust.
10262 (registers_to_string): Change prototype to take a regcache. Adjust.
10263 (registers_from_string): Ditto.
10264 (register_data): Ditto.
10265 (supply_register): Ditto.
10266 (supply_register_by_name): Ditto.
10267 (collect_register): Ditto.
10268 (collect_register_as_string): Ditto.
10269 (collect_register_by_name): Ditto.
10270 * server.c (process_serial_event): Adjust.
10271 * linux-low.h (regset_fill_func, regset_store_func): Change
10272 prototype.
10273 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10274 Change prototype.
10275 * linux-low.c (get_stop_pc): Adjust.
10276 (check_removed_breakpoint): Adjust.
10277 (linux_wait_for_event): Adjust.
10278 (linux_resume_one_lwp): Adjust.
10279 (fetch_register): Add regcache parameter. Adjust.
10280 (usr_store_inferior_registers): Ditto.
10281 (regsets_fetch_inferior_registers): Ditto.
10282 (regsets_store_inferior_registers): Ditto.
10283 (linux_fetch_registers, linux_store_registers): Ditto.
10284 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10285 regcache. Adjust.
43aaf8b6
PA
10286 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10287 Ditto.
442ea881
PA
10288 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10289 prototype to take a regcache.
10290 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10291 * remote-utils.c (convert_ascii_to_int, outreg)
10292 (prepare_resume_reply): Change prototype to take a regcache.
10293 Adjust.
10294 * target.h (struct target_ops) <fetch_registers, store_registers>:
10295 Change prototype to take a regcache.
10296 (fetch_inferior_registers, store_inferior_registers): Change
10297 prototype to take a regcache. Adjust.
10298 * proc-service.c (ps_lgetregs): Adjust.
10299 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10300 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10301 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10302 take a regcache. Adjust.
10303 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10304 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10305 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10306 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10307 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10308 (cris_cannot_fetch_register):
10309 (cris_breakpoint_at): Change prototype to take a regcache.
10310 Adjust.
10311 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10312 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10313 to take a regcache. Adjust.
10314 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10315 Adjust.
10316 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10317 take a regcache. Adjust.
10318 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10319 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10320 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10321 * linux-mips-low.c (mips_get_pc):
10322 (mips_set_pc): Change prototype to take a regcache. Adjust.
10323 (mips_reinsert_addr): Adjust.
10324 (mips_collect_register): Change prototype to take a regcache.
10325 Adjust.
10326 (mips_supply_register):
10327 (mips_collect_register_32bit, mips_supply_register_32bit)
10328 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10329 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10330 * linux-ppc-low.c (ppc_supply_ptrace_register)
10331 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10332 (parse_spufs_run): Adjust.
10333 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10334 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10335 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10336 take a regcache. Adjust.
10337 * linux-s390-low.c (s390_collect_ptrace_register)
10338 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10339 (s390_set_pc): Change prototype to take a regcache. Adjust.
10340 (s390_arch_setup): Adjust.
10341 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10342 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10343 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10344 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10345 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10346 regcache. Adjust.
10347 (sparc_breakpoint_at): Adjust.
10348 * linux-xtensa-low.c (xtensa_fill_gregset):
10349 (xtensa_store_gregset):
10350 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10351 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10352 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10353 prototype to take a regcache. Adjust.
10354 * win32-arm-low.c (arm_fetch_inferior_register)
10355 (arm_store_inferior_register): Change prototype to take a
10356 regcache. Adjust.
10357 * win32-i386-low.c (i386_fetch_inferior_register)
10358 (i386_store_inferior_register): Change prototype to take a
10359 regcache. Adjust.
10360 * win32-low.c (child_fetch_inferior_registers)
10361 (child_store_inferior_registers): Change prototype to take a
10362 regcache. Adjust.
10363 (win32_wait): Adjust.
10364 (win32_fetch_inferior_registers): Change prototype to take a
10365 regcache. Adjust.
10366 (win32_store_inferior_registers): Adjust.
10367 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10368 store_inferior_register>: Change prototype to take a regcache.
10369
60c3d7b0
DE
103702010-01-20 Doug Evans <dje@google.com>
10371
10372 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10373 #ifdef.
10374 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10375 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10376
dc146f7c
VP
103772010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10378
10379 * linux-low.c (linux_core_of_thread): New.
10380 (compare_ints, show_process, list_threads): New.
10381 (linux_qxfer_osdata): Report threads and cores.
10382 (linux_target_op): Register linux_core_of_thread.
10383 * remote-utils.c (prepare_resume_reply): Report the core.
10384 (buffer_xml_printf): Support %d specifier.
10385 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10386 New.
10387 (handle_query): Handle qXfer:threads. Announce availability
10388 thereof.
10389 * target.h (struct target_ops): New field core_of_thread.
10390
7803799a
UW
103912010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10392
10393 * Makefile.in (clean): Remove new generated files.
10394 (reg-s390.o, reg-s390.c): Remove rules.
10395 (reg-s390x.o, reg-s390x.c): Likewise.
10396 (s390-linux32.o, s390-linux32.c): Add rules.
10397 (s390-linux64.o, s390-linux64.c): Likewise.
10398 (s390x-linux64.o, s390x-linux64.c): Likewise.
10399 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10400 * linux-s390-low.c: Include <elf.h>.
10401 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10402 (init_registers_s390): Remove prototype.
10403 (init_registers_s390x): Likewise.
10404 (init_registers_s390_linux32): Add prototype.
10405 (init_registers_s390_linux64): Likewise.
10406 (init_registers_s390x_linux64): Likewise.
10407 (s390_num_regs_3264): New define.
10408 (s390_regmap_3264): New global variable.
10409 (s390_cannot_fetch_register): Remove obsolete check.
10410 (s390_cannot_store_register): Likewise.
10411 (s390_collect_ptrace_register): Handle upper/lower register halves.
10412 (s390_supply_ptrace_register): Likewise.
10413 (s390_fill_gregset): Update to register number changes.
10414 (s390_get_hwcap): New routine.
10415 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10416 Install appropriate regmap and register set.
10417
6e7ffa39
JB
104182010-01-01 Joel Brobecker <brobecker@adacore.com>
10419
10420 * server.c (gdbserver_version): Update copyright year to 2010.
10421 * gdbreplay.c (gdbreplay_version): Likewise.
10422
957f3f49
DE
104232009-12-28 Doug Evans <dje@google.com>
10424
10425 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10426 elf/external.h. Include <elf.h> instead but only if necessary.
10427
ca5c370d
PA
104282009-12-28 Pedro Alves <pedro@codesourcery.com>
10429
10430 * linux-low.c (linux_remove_process): Remove `detaching'
10431 parameter. Don't release/detach from thread_db here.
10432 (linux_kill): Release/detach from thread_db here, ...
10433 (linux_detach): ... and here, before actually detaching.
10434 (linux_wait_1): ... and here, when a process exits.
10435 * thread-db.c (any_thread_of): New.
10436 (thread_db_free): Switch the current inferior to a thread of the
10437 passed in process.
10438
4ee62156
DE
104392009-12-21 Doug Evans <dje@google.com>
10440
d90e6a88
DE
10441 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10442
c5f62d5f
DE
10443 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10444 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10445 warning ifndef __NR_tkill. Move setting of errno there too.
10446 Delete unnecessary resetting of errno after syscall.
10447 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10448
10e86dd7
DE
10449 * configure.ac: Check for dladdr.
10450 * config.in: Regenerate.
10451 * configure: Regenerate.
10452 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10453 (try_thread_db_load): Update.
10454
4ee62156
DE
10455 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10456
00f515da
DE
104572009-12-18 Doug Evans <dje@google.com>
10458
e9464885
DE
10459 * event-loop.c: Include unistd.h if it exists.
10460
07d4f67e
DE
10461 * linux-low.c (my_waitpid): Move definition away from being in
10462 between linux_tracefork_child/linux_test_for_tracefork.
10463
00f515da
DE
10464 * gdb_proc_service.h (psaddr_t): Fix type.
10465 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10466 signature to match glibc.
10467
1de1badb
DE
104682009-12-16 Doug Evans <dje@google.com>
10469
10470 * linux-low.c (linux_read_memory): Fix argument to read.
10471
aeeb81d1
PA
104722009-11-26 Pedro Alves <pedro@codesourcery.com>
10473
10474 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10475 events, don't leave current_inferior pointing at null.
10476
10357975
PA
104772009-11-26 Pedro Alves <pedro@codesourcery.com>
10478
10479 * win32-low.c (LOG): Delete.
10480 (OUTMSG): Output to stderr.
10481 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10482 on compile time LOG macro.
10483 (win32_wait): Fix debug output.
10484
cf6e3471
PA
104852009-11-26 Pedro Alves <pedro@codesourcery.com>
10486
10487 * win32-low.c (win32_add_one_solib): If the dll name is
10488 "ntdll.dll", prepend the system directory to the dll path.
10489
0c85e18e
MK
104902009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10491
10492 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10493
9ac544ce 104942009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 10495 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
10496
10497 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10498 * configure.ac: Check for __mcoldfire__ and set
10499 gdb_cv_m68k_is_coldfire.
10500 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10501 reg-cf.o and reg-m68k.o.
10502 * configure: Regenerated.
10503
fd7dd3e6
PA
105042009-11-16 Pedro Alves <pedro@codesourcery.com>
10505
10506 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10507 Pass it to thread_db_free.
10508 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10509 proper `detaching' argument to linux_remove_process.
10510 * linux-low.h (thread_db_free): Add `detaching' parameter.
10511 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10512 to thread_db_free.
10513 (thread_db_free): Add `detaching' parameter. Only
10514 call td_ta_clear_event if detaching from process.
10515
75aa492e
MK
105162009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10517
10518 * thread-db.c (thread_db_free): Fix typo.
10519
21e1bee4
PP
105202009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10521
10522 PR gdb/10838
10523 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10524
8838b45e
NS
105252009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10526
10527 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10528 with an i686 compiler.
10529 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10530 needed.
10531 * configure: Rebuilt.
10532
8a35fb51
SL
105332009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10534
10535 PR gdb/10783
10536
10537 * server.c (handle_search_memory_1): Correct read_addr initialization
10538 in loop for searching subsequent chunks.
10539
96f15937
PP
105402009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10541
10542 * configure.ac: New --with-libthread-db option.
10543 * thread-db.c: Allow direct dependence on libthread_db.
10544 (thread_db_free): Adjust.
10545 * config.in: Regenerate.
10546 * configure: Likewise.
889bf7c5 10547
5f7d1694
PP
105482009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10549
10550 PR gdb/10757
10551 * thread-db.c (attach_thread): New function.
10552 (maybe_attach_thread): Return success/failure.
10553 (find_new_threads_callback): Adjust.
889bf7c5
PA
10554 (thread_db_find_new_threads): Loop until no new threads.
10555
88e3b899
PA
105562009-10-13 Pedro Alves <pedro@codesourcery.com>
10557
10558 * proc-service.c (ps_lgetregs): Formatting.
10559
cdbfd419
PP
105602009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10561
10562 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10563 * configure.ac: Adjust.
10564 * linux-low.h (struct process_info_private): Move members to struct
10565 thread_db.
10566 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10567 * linux-low.c (linux_remove_process): Adjust.
10568 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10569 * server.c (handle_query): Move code ...
10570 (handle_monitor_command): ... here. New function.
10571 * target.h (struct target_ops): New member.
10572 * thread-db.c (struct thread_db): New.
10573 (libthread_db_search_path): New variable.
10574 (thread_db_create_event, thread_db_enable_reporting)
10575 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10576 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10577 (try_thread_db_load_1, dladdr_to_soname): New functions.
10578 (try_thread_db_load, thread_db_load_search): New functions.
10579 (thread_db_init): Search for libthread_db.
10580 (thread_db_free): New function.
10581 (thread_db_handle_monitor_command): Likewise.
10582 * config.in: Regenerate.
10583 * configure: Regenerate.
889bf7c5 10584
4168d2d6
UW
105852009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10586
10587 * spu-low.c (spu_kill): Wait for inferior to terminate.
10588 Call clear_inferiors.
10589 (spu_detach): Call clear_inferiors.
10590
81ecdfbb
RW
105912009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10592
10593 * aclocal.m4: Regenerate.
10594 * config.in: Likewise.
10595 * configure: Likewise.
10596
0b9ff2c0
UW
105972009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10598
10599 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10600 (parse_spufs_run): New function.
10601 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10602 (ppc_breakpoint_at): Handle SPU breakpoints.
10603
efcbbd14
UW
106042009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10605
10606 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10607 (SPUFS_MAGIC): Define.
10608 (spu_enumerate_spu_ids): New function.
10609 (linux_qxfer_spu): New function.
10610 (linux_target_ops): Install linux_qxfer_spu.
10611
f4d9bade
UW
106122009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10613
10614 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10615 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10616 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10617 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10618 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10619 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10620 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10621 (init_registers_powerpc_cell32l): Add prototype.
10622 (init_registers_powerpc_cell64l): Likewise.
10623 (ppc_arch_setup): Detect Cell/B.E. architecture.
10624
96e946ca
RW
106252009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10626
10627 * Makefile.in (datarootdir): New variable.
10628
58d6951d
DJ
106292009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10630
10631 * linux-low.c (linux_write_memory): Update debugging output.
10632 * Makefile.in (clean): Add new descriptions.
10633 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10634 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10635 * configure.srv: Add new files for arm*-*-linux*.
10636 * linux-arm-low.c: Add new declarations.
10637 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10638 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10639 (HWCAP_VFPv3D16): New.
10640 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10641 instead of __IWMMXT__.
10642 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10643 (arm_arch_setup): New.
10644 (target_regsets): Remove #ifdef. Add VFP regset.
10645 (the_low_target): Use arm_arch_setup.
10646
12b42a12
DJ
106472009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10648
10649 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10650 the main thread again.
10651
ac8c974e
AR
106522009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10653
10654 Adding Neutrino gdbserver.
10655 * configure: Regenerated.
10656 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10657 * configure.srv (i[34567]86-*-nto*): New target.
10658 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10659 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10660 (nto_comctrl) [__QNX__]: New function.
10661 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10662
4424e0c3 106632009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
10664
10665 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10666 srv_tgtobj.
10667
912cf4ba
PA
106682009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10669 Pedro Alves <pedro@codesourcery.com>
10670
10671 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10672 don't support CONTEXT_EXTENDED_REGISTERS.
10673 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10674 (the_low_target): Install them.
10675 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10676 failing with ERROR_PIPE_NOT_CONNECTED.
10677
aa5ca48f
DE
106782009-06-30 Doug Evans <dje@google.com>
10679 Pierre Muller <muller@ics.u-strasbg.fr>
10680
10681 Add h/w watchpoint support to x86-linux, win32-i386.
10682 * Makefile.in (SFILES): Add i386-low.c
10683 (i386_low_h): Define.
10684 (i386-low.o): Add dependencies.
10685 (linux-x86-low.o): Add i386-low.h dependency.
10686 (win32-i386-low.o): Ditto.
10687 * i386-low.c: New file.
10688 * i386-low.h: New file.
10689 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10690 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10691 * linux-low.c (linux_add_process): Initialize arch_private.
10692 (linux_remove_process): Free arch_private.
10693 (add_lwp): Initialize arch_private.
10694 (delete_lwp): Free arch_private.
10695 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10696 provided.
10697 * linux-low.h (process_info_private): New member arch_private.
10698 (lwp_info): New member arch_private.
10699 (linux_target_ops): New members new_process, new_thread,
10700 prepare_to_resume.
10701 (ptid_of): New macro.
10702 * linux-x86-low.c: Include stddef.h, i386-low.h.
10703 (arch_process_info): New struct.
10704 (arch_lwp_info): New struct.
10705 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10706 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10707 (i386_dr_low_get_status): New function.
10708 (x86_insert_point, x86_remove_point): New functions.
10709 (x86_stopped_by_watchpoint): New function.
10710 (x86_stopped_data_address): New function.
10711 (x86_linux_new_process, x86_linux_new_thread): New functions.
10712 (x86_linux_prepare_to_resume): New function.
10713 (the_low_target): Add entries for insert_point, remove_point,
10714 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10715 prepare_to_resume.
10716 * server.c (debug_hw_points): New global.
10717 (monitor_show_help): Document set debug-hw-points.
10718 (handle_query): Process "set debug-hw-points".
10719 * server.h (debug_hw_points): Declare.
10720 (paddress): Declare.
10721 * utils.c (NUMCELLS, CELLSIZE): New macros.
10722 (get_sell, xsnprintf, paddress): New functions.
10723 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10724 remove_point, stopped_by_watchpoint, stopped_data_address.
10725 * win32-i386-low.c: Include i386-low.h.
10726 (debug_reg_state): Replaces dr.
10727 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10728 (i386_dr_low_get_status): New function.
10729 (i386_insert_point, i386_remove_point): New functions.
10730 (i386_stopped_by_watchpoint): New function.
10731 (i386_stopped_data_address): New function.
10732 (i386_initial_stuff): Update.
10733 (get_thread_context,set_thread_context,i386_thread_added): Update.
10734 (the_low_target): Add entries for insert_point,
10735 remove_point, stopped_by_watchpoint, stopped_data_address.
10736 * win32-low.c (win32_insert_watchpoint): New function.
10737 (win32_remove_watchpoint): New function.
10738 (win32_stopped_by_watchpoint): New function.
10739 (win32_stopped_data_address): New function.
10740 (win32_target_ops): Add entries for insert_watchpoint,
10741 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10742 * win32-low.h (win32_target_ops): New members insert_point,
10743 remove_point, stopped_by_watchpoint, stopped_data_address.
10744
d993e290
PA
107452009-06-25 Pedro Alves <pedro@codesourcery.com>
10746
10747 * server.c (process_serial_event): Re-return unsupported, not
10748 error, if the type isn't recognized. Re-allow supporting only
10749 insert or remove packets. Also call require_running for
10750 breakpoints. Add missing break statement to default case. Tidy.
10751 * target.h (struct target_ops): Rename insert_watchpoint to
10752 insert_point, and remove_watchpoint to remove_point.
10753
10754 * linux-low.h (struct linux_target_ops): Likewise.
10755 * linux-low.c (linux_insert_watchpoint): Rename to ...
10756 (linux_insert_point): ... this. Adjust.
10757 (linux_remove_watchpoint): Rename to ...
10758 (linux_remove_point): ... this. Adjust.
10759 (linux_target_ops): Adjust.
10760 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10761 (cris_insert_point): ... this.
10762 (cris_remove_watchpoint): Rename to ...
10763 (cris_remove_point): ... this.
10764 (the_low_target): Adjust.
10765
0f54c268
PM
107662009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10767
10768 * server.c (handle_v_kill): Pass signal_pid to
10769 kill_inferior if multi_process is zero.
10770
c6314022
AR
107712009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10772
10773 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10774 * target.h (target_ops): Comment for *_watchpoint to make it clear
10775 the functions can get types '0' and '1'.
10776
4463ce24
AR
107772009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10778
10779 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10780 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10781 * regcache.c (get_regcache): Likewise.
10782 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10783 * win32-low.c (child_fetch_inferior_registers): Remove check for
10784 regno 0.
10785
cf8fd78b
PA
107862009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10787 Pedro Alves <pedro@codesourcery.com>
10788
10789 * target.h (struct target_ops) <supports_multi_process>: New
10790 callback.
10791 (target_supports_multi_process): New.
10792 * server.c (handle_query): Even if GDB reports support, only
10793 enable multi-process if the target also supports it. Report
10794 multi-process support only if the target backend supports it.
10795 * linux-low.c (linux_supports_multi_process): New function.
10796 (linux_target_ops): Install it as target_supports_multi_process
10797 callback.
10798
47c0c975
DE
107992009-05-24 Doug Evans <dje@google.com>
10800
e09875d4
DE
10801 Global renaming of find_thread_pid to find_thread_ptid.
10802 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10803 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10804 All callers updated.
10805
e27d73f6
DE
10806 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10807 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10808 directly.
10809
47c0c975
DE
10810 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10811 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10812 (linux_resume_one_lwp): Ditto.
10813
2acc282a
DE
108142009-05-23 Doug Evans <dje@google.com>
10815
10816 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10817 from struct inferior_list_entry * to struct lwp_info *.
10818 All callers updated.
10819
9f1036c1
DE
108202009-05-13 Doug Evans <dje@google.com>
10821
10822 * linux-x86-low.c: Don't include assert.h.
10823 (x86_siginfo_fixup): Use fatal, not assert.
10824 (x86_arch_setup): Fix comment.
10825
d0722149
DE
108262009-05-12 Doug Evans <dje@google.com>
10827
10828 Biarch support for i386/amd64 gdbserver.
10829 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10830 Add linux-x86-low.c.
10831 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10832 (linux-x86-low.o): Add.
10833 * linux-x86-64-low.c: Delete.
10834 * linux-i386-low.c: Delete.
10835 * linux-x86-low.c: New file.
10836 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10837 linux-x86-low.o.
10838 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10839 linux-x86-low.o.
10840 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10841 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10842 (linux_child_pid_to_exec_file): New function.
10843 (elf_64_header_p, elf_64_file_p): New functions.
10844 (siginfo_fixup): New function.
10845 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10846 give target a chance to convert layout.
10847 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10848 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10849
fdeb2a12
DE
108502009-05-07 Doug Evans <dje@google.com>
10851
10852 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10853 (regsets_store_inferior_registers): Ditto.
10854
a6dbe5df
PA
108552009-05-06 Pedro Alves <pedro@codesourcery.com>
10856
10857 PR server/10048
10858
10859 * linux-low.c (must_set_ptrace_flags): Delete.
10860 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10861 of the global.
10862 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10863 `lwp->must_set_ptrace_flags' instead.
ba42693b 10864 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10865 (linux_wait_1): ... not here.
10866
5091eb23
DE
108672009-04-30 Doug Evans <dje@google.com>
10868
9f767825
DE
10869 * inferiors.c (started_inferior_callback): New function.
10870 (attached_inferior_callback): New function.
10871 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10872 * server.c (print_started_pid, print_attached_pid): New functions.
10873 (detach_or_kill_for_exit): New function.
10874 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10875 * server.h (have_started_inferiors_p): Declare.
10876 (have_attached_inferiors_p): Declare.
10877
5091eb23
DE
10878 * inferiors.c (remove_process): Fix memory leak, free process.
10879 * linux-low.c (linux_remove_process): New function.
10880 (linux_kill): Call it instead of remove_process.
10881 (linux_detach, linux_wait_1): Ditto.
10882
155c8968
PA
108832009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10884
10885 * configure.srv: Add x86 Windows CE target.
10886
7fe519cb
UW
108872009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10888
10889 * inferiors.c (get_thread_process): Make global.
10890 * server.h (get_thread_process): Add prototype.
10891 * thread-db.c (find_one_thread): Use get_thread_process
10892 instead of current_process.
10893 (thread_db_get_tls_address): Do not crash if called when
10894 thread layer is not yet initialized.
10895
5472f405
UW
108962009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10897
10898 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10899 * spu-low.c (current_tid): Rename to ...
10900 (current_ptid): ... this.
10901 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10902 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10903 ptid_get_lwp (current_ptid) instead of current_tid.
10904 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10905 instead of current_tid. Use find_process_pid to verify pid
10906 argument is valid. Pass proper argument to remove_process.
10907 (spu_thread_alive): Compare current_ptid instead of current_tid.
10908 (spu_resume): Likewise.
10909
55ac2b99
PA
109102009-04-02 Pedro Alves <pedro@codesourcery.com>
10911
10912 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10913 variable.
10914
95954743
PA
109152009-04-01 Pedro Alves <pedro@codesourcery.com>
10916
10917 Implement the multiprocess extensions, and add linux multiprocess
10918 support.
10919
10920 * server.h (ULONGEST): Declare.
10921 (struct ptid, ptid_t): New.
10922 (minus_one_ptid, null_ptid): Declare.
10923 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10924 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10925 (struct inferior_list_entry): Change `id' type from unsigned from
10926 to ptid_t.
10927 (struct sym_cache, struct breakpoint, struct
10928 process_info_private): Forward declare.
10929 (struct process_info): Declare.
10930 (current_process): Declare.
10931 (all_processes): Declare.
10932 (initialize_inferiors): Declare.
10933 (add_thread): Adjust to use ptid_t.
10934 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10935 (add_process, remove_process, find_thread_pid): Declare.
10936 (find_inferior_id): Adjust to use ptid_t.
10937 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10938 (multi_process): Declare.
10939 (push_event): Adjust to use ptid_t.
10940 (read_ptid, write_ptid): Declare.
10941 (prepare_resume_reply): Adjust to use ptid_t.
10942 (clear_symbol_cache): Declare.
10943 * inferiors.c (all_processes): New.
10944 (null_ptid, minus_one_ptid): New.
10945 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10946 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10947 (add_thread): Change unsigned long to ptid. Remove gdb_id
10948 parameter. Adjust.
10949 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10950 (gdb_id_to_thread): Rename to ...
10951 (find_thread_pid): ... this. Change unsigned long to ptid.
10952 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10953 (loaded_dll, pull_pid_from_list): Adjust.
10954 (add_process, remove_process, find_process_pid)
10955 (get_thread_process, current_process, initialize_inferiors): New.
10956 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10957 (struct target_waitstatus) <related_pid>: Ditto.
10958 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10959 return type to int.
10960 (struct target_ops) <join>: Add `pid' argument.
10961 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10962 (struct target_ops) <wait>: Add `ptid' field. Change return type
10963 to ptid.
10964 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10965 (mywait): Add `ptid' argument. Change return type to ptid_t.
10966 (target_pid_to_str): Declare.
10967 * target.c (set_desired_inferior): Adjust to use ptids.
10968 (mywait): Add new `ptid' argument. Adjust.
10969 (target_pid_to_str): New.
10970 * mem-break.h (free_all_breakpoints): Declare.
10971 * mem-break.c (breakpoints): Delelete.
10972 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10973 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10974 to use per-process breakpoint list.
10975 (free_all_breakpoints): New.
10976 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10977 (symbol_cache, all_symbols_looked_up): Delete.
10978 (hexchars): New.
10979 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10980 read_ptid): New.
10981 (prepare_resume_reply): Change ptid argument's type from unsigned
10982 long to ptid_t. Adjust. Implement W;process and X;process.
10983 (free_sym_cache, clear_symbol_cache): New.
10984 (look_up_one_symbol): Adjust to per-process symbol cache. *
10985 * server.c (cont_thread, general_thread, step_thread): Change type
10986 to ptid_t.
10987 (attached): Delete.
10988 (multi_process): New.
10989 (last_ptid): Change type to ptid_t.
10990 (struct vstop_notif) <ptid>: Change type to ptid_t.
10991 (queue_stop_reply, push_event): Change `ptid' argument's type to
10992 ptid_t.
10993 (discard_queued_stop_replies): Add `pid' argument.
10994 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10995 changes. Don't reference the `attached' global.
10996 (attach_inferior): Adjust to mywait interface changes.
10997 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10998 features. Handle and report "multiprocess+". Handle
10999 "qAttached:PID".
11000 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11001 changes.
11002 (handle_v_kill): New.
11003 (handle_v_stopped): Adjust to use target_pid_to_str.
11004 (handle_v_requests): Allow multiple attaches and runs when
11005 multiprocess extensions are in effect. Handle "vKill".
11006 (myresume): Adjust to use ptids.
11007 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11008 (handle_status): Adjust to discard_queued_stop_replies interface
11009 change.
11010 (first_thread_of, kill_inferior_callback)
11011 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11012 (main): Call initialize_inferiors. Adjust to use ptids, killing
11013 and detaching from all inferiors. Handle multiprocess packet
11014 variants.
11015 * linux-low.h: Include gdb_proc_service.h.
11016 (struct process_info_private): New.
11017 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11018 <lwpid_of>: Use ptid_get_lwp.
11019 (get_lwp_thread): Adjust.
11020 (struct lwp_info): Add `dead' member.
11021 (find_lwp_pid): Declare.
11022 * linux-low.c (thread_db_active): Delete.
11023 (new_inferior): Adjust comment.
11024 (inferior_pid): Delete.
11025 (linux_add_process): New.
11026 (handle_extended_wait): Adjust.
11027 (add_lwp): Change unsigned long to ptid.
11028 (linux_create_inferior): Add process to processes table. Adjust
11029 to use ptids. Don't set new_inferior here.
11030 (linux_attach_lwp): Rename to ...
11031 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11032 it. Adjust to use ptids.
11033 (linux_attach_lwp): New.
11034 (linux_attach): Add process to processes table. Don't set
11035 new_inferior here.
11036 (struct counter): New.
11037 (second_thread_of_pid_p, last_thread_of_process_p): New.
11038 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11039 multiple processes.
11040 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11041 processes. Remove process from process table.
11042 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11043 to multiple processes.
11044 (any_thread_of): New.
11045 (linux_detach): Add `pid' argument, and handle it. Remove process
11046 from processes table.
11047 (linux_join): Add `pid' argument. Handle it.
11048 (linux_thread_alive): Change unsighed long argument to ptid_t.
11049 Consider dead lwps as not being alive.
11050 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11051 threads we're not interested in.
11052 (same_lwp, find_lwp_pid): New.
11053 (linux_wait_for_lwp): Change `pid' argument's type from int to
11054 ptid_t. Adjust.
11055 (linux_wait_for_event): Rename to ...
11056 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11057 from int to ptid_t. Adjust.
11058 (linux_wait_for_event): New.
11059 (linux_wait_1): Add `ptid' argument. Change return type to
11060 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11061 that exit from the process table.
11062 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11063 Adjust.
11064 (mark_lwp_dead): New.
11065 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11066 stopping all threads, mark its main lwp as dead.
11067 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11068 ptids.
11069 (fetch_register, usr_store_inferior_registers)
11070 (regsets_fetch_inferior_registers)
11071 (regsets_store_inferior_registers, linux_read_memory)
11072 (linux_write_memory): Inline `inferior_pid'.
11073 (linux_look_up_symbols): Adjust to use per-process
11074 `thread_db_active'.
11075 (linux_request_interrupt): Adjust to use ptids.
11076 (linux_read_auxv): Inline `inferior_pid'.
11077 (initialize_low): Don't reference thread_db_active.
11078 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11079 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11080 (ps_getpid): Return the pid of the current inferior.
11081 * thread-db.c (proc_handle, thread_agent): Delete.
11082 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11083 per-process data.
11084 (find_one_thread): Change argument type to ptid_t. Adjust to
11085 per-process data.
11086 (maybe_attach_thread): Adjust to per-process data and ptids.
11087 (thread_db_find_new_threads): Ditto.
11088 (thread_db_init): Ditto.
11089 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11090 processes table. Adjust to use ptids.
11091 (spu_kill, spu_detach): Adjust interface. Remove process from
11092 processes table.
11093 (spu_join, spu_thread_alive): Adjust interface.
11094 (spu_wait): Adjust interface. Remove process from processes
11095 table. Adjust to use ptids.
11096 * win32-low.c (current_inferior_tid): Delete.
11097 (current_inferior_ptid): New.
11098 (debug_event_ptid): New.
11099 (thread_rec): Take a ptid. Adjust.
11100 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11101 (child_delete_thread): Ditto.
11102 (do_initial_child_stuff): Add `attached' argument. Add process to
11103 processes table.
11104 (child_fetch_inferior_registers, child_store_inferior_registers):
11105 Adjust.
11106 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11107 (win32_attach): Pass 1 to do_initial_child_stuff.
11108 (win32_kill): Adjust interface. Remove process from processes
11109 table.
11110 (win32_detach): Ditto.
11111 (win32_join): Adjust interface.
11112 (win32_thread_alive): Take a ptid.
11113 (win32_resume): Adjust to use ptids.
11114 (get_child_debug_event): Ditto.
11115 (win32_wait): Adjust interface. Remove exiting process from
11116 processes table.
11117
bd99dc85
PA
111182009-04-01 Pedro Alves <pedro@codesourcery.com>
11119
11120 Non-stop mode support.
11121
11122 * server.h (non_stop): Declare.
11123 (gdb_client_data, handler_func): Declare.
11124 (delete_file_handler, add_file_handler, start_event_loop):
11125 Declare.
11126 (handle_serial_event, handle_target_event, push_event)
11127 (putpkt_notif): Declare.
11128 * target.h (enum resume_kind): New.
11129 (struct thread_resume): Replace `step' field by `kind' field.
11130 (TARGET_WNOHANG): Define.
11131 (struct target_ops) <wait>: Add `options' argument.
11132 <supports_non_stop, async, start_non_stop>: New fields.
11133 (target_supports_non_stop, target_async): New.
11134 (start_non_stop): Declare.
11135 (mywait): Add `options' argument.
11136 * target.c (mywait): Add `options' argument. Print child exit
11137 notifications here.
11138 (start_non_stop): New.
11139 * server.c (non_stop, own_buf, mem_buf): New globals.
11140 (struct vstop_notif): New.
11141 (notif_queue): New global.
11142 (queue_stop_reply, push_event, discard_queued_stop_replies)
11143 (send_next_stop_reply): New.
11144 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11145 interface changes.
11146 (attach_inferior): In non-stop mode, don't wait for the target
11147 here.
11148 (handle_general_set): Handle QNonStop.
11149 (handle_query): When handling qC, return the current general
11150 thread, instead of the first thread of the list.
11151 (handle_query): If the backend supports non-stop mode, include
11152 QNonStop+ in the qSupported query response.
11153 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11154 and non-stop mode.
11155 (handle_v_attach, handle_v_run): Handle non-stop mode.
11156 (handle_v_stopped): New.
11157 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11158 (myresume): Adjust to use resume_kind. Handle non-stop.
11159 (queue_stop_reply_callback): New.
11160 (handle_status): Handle non-stop mode.
11161 (main): Clear non_stop flag on reconnection. Use the event-loop.
11162 Refactor serial protocol handling from here ...
11163 (process_serial_event): ... to this new function. When GDB
11164 selects any thread, select one here. In non-stop mode, wait until
11165 GDB acks all pending events before exiting.
11166 (handle_serial_event, handle_target_event): New.
11167 * remote-utils.c (remote_open): Install remote_desc in the event
11168 loop.
11169 (remote_close): Remove remote_desc from the event loop.
11170 (putpkt_binary): Rename to...
11171 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11172 (putpkt_binary): New as wrapper around putpkt_binary_1.
11173 (putpkt_notif): New.
11174 (prepare_resume_reply): In non-stop mode, don't change the
11175 general_thread.
11176 * event-loop.c: New.
11177 * Makefile.in (OBJ): Add event-loop.o.
11178 (event-loop.o): New rule.
11179
11180 * linux-low.h (pid_of): Moved here.
11181 (lwpid_of): New.
11182 (get_lwp_thread): Use lwpid_of.
11183 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11184 * linux-low.c (pid_of): Delete.
11185 (inferior_pid): Use lwpid_of.
11186 (linux_event_pipe): New.
11187 (target_is_async_p): New.
11188 (delete_lwp): New.
11189 (handle_extended_wait): Use lwpid_of.
11190 (add_lwp): Don't set lwpid field.
11191 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11192 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11193 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11194 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11195 first. Adjust to linux_wait_for_event interface changes. Use
11196 lwpid_of.
11197 (linux_detach): Don't delete the main lwp here.
11198 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11199 (status_pending_p): Don't consider explicitly suspended lwps.
11200 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11201 pointer. Add OPTIONS argument. Change return type to int. Use
11202 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11203 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11204 pointer. Add status pointer argument. Return a pid instead of a
11205 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11206 changes. In non-stop mode, don't switch to a random thread.
11207 (linux_wait): Rename to...
11208 (linux_wait_1): ... this. Add target_options argument, and handle
11209 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11210 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11211 clean exit and signal exit code. Don't stop all threads in
11212 non-stop mode. In all-stop mode, only stop all threads when
11213 reporting a stop to GDB. Handle explicit thread stop requests.
11214 (async_file_flush, async_file_mark): New.
11215 (linux_wait): New.
11216 (send_sigstop): Use lwpid_of.
11217 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11218 interface changes. In non-stop mode, don't switch to a random
11219 thread.
11220 (linux_resume_one_lwp): Use lwpid_of.
11221 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11222 (linux_resume_one_thread): ... this. Handle resume_stop. In
11223 non-stop mode, don't look for pending flag in all threads.
11224 (resume_status_pending_p): Don't consider explicitly suspended
11225 threads.
11226 (my_waitpid): Reimplement. Emulate __WALL.
11227 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11228 Use lwpid_of.
11229 (sigchld_handler, linux_supports_non_stop, linux_async)
11230 (linux_start_non_stop): New.
11231 (linux_target_ops): Register linux_supports_non_stop, linux_async
11232 and linux_start_non_stop.
11233 (initialize_low): Install SIGCHLD handler.
11234 * thread-db.c (thread_db_create_event, find_one_thread)
11235 (thread_db_get_tls_address): Use lwpid_of.
11236 * win32-low.c (win32_detach): Adjust to use resume_kind.
11237 (win32_wait): Add `options' argument.
11238 * spu-low.c (spu_resume): Adjust to use resume_kind.
11239 (spu_wait): Add `options' argument.
11240
5b1c542e
PA
112412009-04-01 Pedro Alves <pedro@codesourcery.com>
11242
11243 Decouple target code from remote protocol.
11244
11245 * target.h (enum target_waitkind): New.
11246 (struct target_waitstatus): New.
11247 (struct target_ops) <wait>: Return an unsigned long. Take a
11248 target_waitstatus pointer instead of a char pointer.
11249 (mywait): Likewise.
11250 * target.c (mywait): Change prototype to return an unsigned long.
11251 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11252 * server.h (thread_from_wait, old_thread_from_wait): Delete
11253 declarations.
11254 (prepare_resume_reply): Change prototype to take a
11255 target_waitstatus.
11256 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11257 (last_status, last_ptid): New.
11258 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11259 pid instead of a signal.
11260 (attach_inferior): Remove "status" and "signal" parameters.
11261 Adjust.
11262 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11263 not as an address.
11264 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11265 (handle_v_requests, myresume): Remove "status" and "signal"
11266 parameters. Adjust.
11267 (handle_status): New.
11268 (main): Delete local `status'. Adjust.
11269 * remote-utils.c: Include target.h.
11270 (prepare_resume_reply): Change prototype to take a
11271 target_waitstatus. Adjust.
11272
11273 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11274 interface.
11275 * spu-low.c (spu_wait): Adjust.
11276 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11277 Delete.
11278 (win32_wait): Adjust.
11279
2bd7c093
PA
112802009-04-01 Pedro Alves <pedro@codesourcery.com>
11281
11282 * target.h (struct thread_resume): Delete leave_stopped member.
11283 (struct target_ops): Add a `n' argument to the `resume' callback.
11284 * server.c (start_inferior): Adjust.
11285 (handle_v_cont, myresume): Adjust.
11286 * linux-low.c (check_removed_breakpoint): Adjust to resume
11287 interface change, and to removed leave_stopped field.
11288 (resume_ptr): Delete.
11289 (struct thread_resume_array): New.
11290 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11291 resume interface change.
11292 (linux_continue_one_thread, linux_queue_one_thread)
11293 (resume_status_pending_p): Check if the resume field is NULL
11294 instead of checking the leave_stopped member.
11295 (linux_resume): Adjust to the target resume interface change.
11296 * spu-low.c (spu_resume): Adjust to the target resume interface
11297 change.
11298 * win32-low.c (win32_detach, win32_resume): Ditto.
11299
c35fafde
PA
113002009-04-01 Pedro Alves <pedro@codesourcery.com>
11301
11302 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11303 flag.
11304 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11305 pending.
11306 (linux_continue_one_thread): Only preserve the stepping flag if
11307 there's a pending breakpoint.
11308
0a59d50b
PA
113092009-03-31 Pedro Alves <pedro@codesourcery.com>
11310
11311 * server.c (main): After the inferior having exited, call
11312 remote_close before exiting gdbserver.
11313
f04c6d38
TJB
113142009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11315
11316 Fix size of FPSCR in Power 7 processors.
11317 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11318 (PPC_FEATURE_HAS_DFP): New #define.
11319 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11320 size of the FPSCR.
11321
78e5cee6
PA
113222009-03-23 Pedro Alves <pedro@codesourcery.com>
11323
11324 * server.c (handle_query) Whitespace and formatting.
11325
1b3f6016
PA
113262009-03-22 Pedro Alves <pedro@codesourcery.com>
11327
11328 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11329 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11330 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11331 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11332 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11333 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11334 Makefile.in, configure.ac: Fix whitespace throughout.
11335 * configure: Regenerate.
11336
a07b2135
PA
113372009-03-22 Pedro Alves <pedro@codesourcery.com>
11338
11339 * inferiors.c (find_inferior): Make it safe for the callback
11340 function to delete the currently iterated inferior.
11341
67cc2626
PA
113422009-03-22 Pedro Alves <pedro@codesourcery.com>
11343
11344 * Makefile.in (linuw_low_h): Move higher.
11345 (thread-db.o): Depend on $(linux_low_h).
11346
54a0b537
PA
113472009-03-17 Pedro Alves <pedro@codesourcery.com>
11348
11349 Rename "process" to "lwp" throughout.
11350
11351 * linux-low.c (all_processes): Rename to...
11352 (all_lwps): ... this.
11353 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11354 (add_process): Rename to ...
11355 (add_lwp): ... this. Adjust.
11356 (linux_create_inferior): Adjust.
11357 (linux_attach_lwp): Adjust.
11358 (linux_attach): Adjust.
11359 (linux_kill_one_process): Rename to ...
11360 (linux_kill_one_lwp): ... this. Adjust.
11361 (linux_kill): Adjust.
11362 (linux_detach_one_process): Rename to ...
11363 (linux_detach_one_lwp): ... this. Adjust.
11364 (linux_detach): Adjust.
11365 (check_removed_breakpoint): Adjust.
11366 (status_pending_p): Adjust.
11367 (linux_wait_for_process): Rename to ...
11368 (linux_wait_for_lwp): ... this. Adjust.
11369 (linux_wait_for_event): Adjust.
11370 (send_sigstop): Adjust.
11371 (wait_for_sigstop): Adjust.
11372 (stop_all_processes): Rename to ...
11373 (stop_all_lwps): ... this.
11374 (linux_resume_one_process): Rename to ...
11375 (linux_resume_one_lwp): ... this. Adjust.
11376 (linux_set_resume_request, linux_continue_one_thread)
11377 (linux_queue_one_thread, resume_status_pending_p)
11378 (usr_store_inferior_registers, regsets_store_inferior_registers)
11379 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11380 Adjust.
11381 * linux-low.h (get_process): Rename to ...
11382 (get_lwp): ... this. Adjust.
11383 (get_thread_process): Rename to ...
11384 (get_thread_lwp): ... this. Adjust.
11385 (get_process_thread): Rename to ...
11386 (get_lwp_thread): ... this. Adjust.
11387 (struct process_info): Rename to ...
11388 (struct lwp_info): ... this.
11389 (all_processes): Rename to ...
11390 (all_lwps): ... this.
11391 * proc-service.c (ps_lgetregs): Adjust.
11392 * thread-db.c (thread_db_create_event, find_one_thread)
11393 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11394
0b16c5cf
PA
113952009-03-14 Pedro Alves <pedro@codesourcery.com>
11396
11397 * server.c (handle_query): Handle "qAttached".
11398
32de4b9d
NS
113992009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11400
11401 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11402 GPLv3, update license URL.
11403
2aecd87f
DE
114042009-03-01 Doug Evans <dje@google.com>
11405
93efd302 11406 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11407 (server_h): Add gdb_signals.h.
11408 (signals.o): Update.
11409 * server.h (target_signal_from_host,target_signal_to_host_p)
11410 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11411
86b1f9c5
PM
114122009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11413
11414 * remote-utils.c (getpkt): Also generate remote-debug
11415 information if noack_mode is set.
11416
4aa995e1
PA
114172009-02-06 Pedro Alves <pedro@codesourcery.com>
11418
11419 * server.c (handle_query): Report qXfer:siginfo:read and
11420 qXfer:siginfo:write as supported and handle them.
11421 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11422 * linux-low.c (linux_xfer_siginfo): New.
11423 (linux_target_ops): Set it.
11424
62709adf
PA
114252009-01-26 Pedro Alves <pedro@codesourcery.com>
11426
11427 * server.c (gdbserver_usage): Mention --remote-debug.
11428 (main): Accept '--remote-debug' switch.
11429
aef93bd7
DE
114302009-01-18 Doug Evans <dje@google.com>
11431
11432 * regcache.c (new_register_cache): No need to check result of xcalloc.
11433 * server.c (handle_search_memory): Back out calls to xmalloc,
11434 result is checked and error is returned to user upon failure.
11435 (handle_query): Ditto. Add more checks for result of malloc.
11436 (handle_v_cont): Check result of malloc, report error back to
11437 user upon failure.
11438 (handle_v_run): Ditto. Call freeargv.
11439 * server.h (freeargv): Declare.
11440 * utils.c (freeargv): New fn.
11441
54363045
DE
114422009-01-15 Doug Evans <dje@google.com>
11443
f626972c
DE
11444 * gdbreplay.c (perror_with_name): Make arg const char *.
11445 * server.h (target_signal_to_name): Make return type const char *.
0842e787 11446 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 11447 * utils.c (perror_with_name): Make arg const char *.
54363045 11448
18aae699
PA
114492009-01-14 Pedro Alves <pedro@codesourcery.com>
11450
11451 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11452 when handling a EXIT_PROCESS_DEBUG_EVENT.
11453
ff703abe
JB
114542009-01-06 Joel Brobecker <brobecker@adacore.com>
11455
11456 * gdbreplay.c (gdbreplay_version): Update copyright year.
11457 * server.c (gdbserver_version): Likewise.
11458
f21cc1a2 114592009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
11460
11461 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 11462 (handle_extended_wait): Improve comment.
0e21c1ec 11463
bca929d3
DE
114642008-12-13 Doug Evans <dje@google.com>
11465
11466 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11467 * server.h (ATTR_MALLOC): New macro.
11468 (xmalloc,xcalloc,xstrdup): Declare.
11469 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11470 * inferiors.c: Ditto.
11471 * linux-low.c: Ditto.
11472 * mem-break.c: Ditto.
11473 * regcache.c: Ditto.
11474 * remote-utils.c: Ditto.
11475 * server.c: Ditto.
11476 * target.c: Ditto.
11477 * win32-low.c: Ditto.
11478
97438e3f
DE
114792008-12-12 Doug Evans <dje@google.com>
11480
896c7fbb
DE
11481 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11482 in debugging printf.
11483
97438e3f
DE
11484 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11485
e3b886f8
DE
114862008-12-09 Doug Evans <dje@google.com>
11487
11488 * linux-low.h (struct process_info): Delete member tid, unused.
11489 * thread-db.c (find_one_thread): Update.
11490 (maybe_attach_thread): Update.
11491
07e059b5
VP
114922008-12-02 Pedro Alves <pedro@codesourcery.com>
11493
889bf7c5
PA
11494 * target.h (struct target_ops): Add qxfer_osdata member.
11495 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11496 and dirent.h.
11497 (linux_qxfer_osdata): New functions.
11498 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11499 callback.
11500 * server.c (handle_query): Handle "qXfer:osdata:read:".
11501 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11502 (buffer_xml_printf): New functions.
11503 * server.h (struct buffer): New.
11504 (buffer_grow_str, buffer_grow_str0): New macros.
11505 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11506 (buffer_xml_printf): Declare.
07e059b5 11507
4cab47ab
DE
115082008-11-24 Doug Evans <dje@google.com>
11509
11510 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11511
f142445f
DJ
115122008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11513
11514 * server.c (handle_v_run): Always use the supplied argument list.
11515
d0107bb6 115162008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 11517
d0107bb6
BW
11518 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11519 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 11520
2c4ad781
TJB
115212008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11522
11523 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11524 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11525 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11526 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11527 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11528 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11529 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11530 XML target descriptions.
11531 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11532 when inferior is running on an ISA 2.05 or later processor. Add
11533 special case to return offset for full 64-bit slot of FPSCR when
11534 in 32-bits.
11535
dfb64f85
DJ
115362008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11537
11538 * Makefile.in (SFILES, clean): Added sparc64 files.
11539 (reg-sparc64.o, reg-sparc64.c): New.
11540 * configure.srv (sparc*-*-linux*): New configuration.
11541 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11542 syscall arguments for SPARC.
11543 (regsets_store_inferior_registers): Likewise.
11544 * linux-sparc-low.c: New file.
11545
66b6e1dd
DE
115462008-10-21 Doug Evans <dje@google.com>
11547
11548 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11549 (READLINE_DIR,READLINE_DEP): Delete.
11550 (INTERNAL_CFLAGS): Update.
11551 (LINTFLAGS): Update.
11552
9b710a42
PA
115532008-10-10 Pedro Alves <pedro@codesourcery.com>
11554
11555 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11556 whole argv from the last run, not just argv[0].
11557
5822d809
PA
115582008-09-08 Pedro Alves <pedro@codesourcery.com>
11559
11560 * regcache.c (new_register_cache): Return NULL if the register
11561 cache size isn't known yet.
11562 (free_register_cache): Avoid dereferencing a NULL regcache.
11563
74aac56f
DJ
115642008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11565
11566 * configure.srv: Merge MIPS and MIPS64.
11567
400b20f5
MR
115682008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11569
11570 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11571
677c5bb1
LM
115722008-08-18 Luis Machado <luisgpm@br.ibm.com>
11573
11574 * Makefile.in: Add required vsx dependencies.
11575
11576 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11577 Declare init_registers_powerpc_vsx32l.
11578 Declare init_registers_powerpc_vsx64l.
11579 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11580 (ppc_arch_setup): Check for VSX in hwcap.
11581 (ppc_fill_vsxregset): New function.
11582 (ppc_store_vsxregset): New function.
11583 Add new VSX entry in regset_info target_regsets.
11584
11585 * configure.srv: Add new VSX dependencies.
11586
a6f3e723
SL
115872008-08-12 Pedro Alves <pedro@codesourcery.com>
11588
11589 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11590 (remote_open): Set or clear transport_is_reliable.
11591 (putpkt_binary): Don't expect acks in noack mode.
11592 (getpkt): Don't send ack/nac in noack mode.
11593 * server.c (handle_general_set): Handle QStartNoAckMode.
11594 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11595 qSupported.
11596 (main): Reset noack_mode on every connection.
11597 * server.h (noack_mode): Declare.
11598
a417dc56
RW
115992008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11600
11601 * Makefile.in (GDBREPLAY_OBS): New variable.
11602 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11603
3221518c
UW
116042008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11605 Daniel Jacobowitz <dan@codesourcery.com>
11606
11607 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11608 (usr_store_inferior_registers): Likewise.
11609 (regsets_store_inferior_registers): Likewise.
11610
ec56be1b
PA
116112008-07-31 Rolf Jansen <rj@surtec.com>
11612 Pedro Alves <pedro@codesourcery.com>
11613
11614 * configure.ac: Check for memmem declaration.
11615 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11616 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11617 (disable_packet_qfThreadInfo): Unconditionally compile.
11618 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11619 * configure, config.in: Regenerate.
11620
2fe5e3ff
DE
116212008-07-28 Doug Kwan <dougkwan@google.com>
11622
11623 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11624 (linux_write_memory): Remove declaration of errno.
11625
836acd6d
UW
116262008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11627
11628 * linux-low.c (handle_extended_wait): Do not use "status"
11629 variable uninitialized.
11630
aeba519e
PA
116312008-07-07 Pedro Alves <pedro@codesourcery.com>
11632
11633 * server.c (handle_v_attach): Inhibit reporting dll changes.
11634
db42f210
PA
116352008-06-27 Pedro Alves <pedro@codesourcery.com>
11636
11637 * remote-utils.c (prepare_resume_reply): If requested, don't
11638 output "thread:TID" in the T stop reply.
11639
11640 * server.c (disable_packet_vCont, disable_packet_Tthread)
11641 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11642 (handle_query): If requested, disable support for qC, qfThreadInfo
11643 and qsThreadInfo.
11644 (handle_v_requests): If requested, disable support for vCont.
11645 (gdbserver_show_disableable): New.
11646 (main): Handle --disable-packet and --disable-packet=LIST.
11647
11648 * server.h (disable_packet_vCont, disable_packet_Tthread)
11649 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11650
8e4c5421
CD
116512008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11652
11653 * server.c (gdbserver_usage): Mention --version.
11654
6e23a804
DJ
116552008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11656
11657 * Makefile.in (gdbreplay.o): New rule.
11658
90aa6a40
JM
116592008-06-06 Joseph Myers <joseph@codesourcery.com>
11660
11661 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11662 message, not gdbserver.
11663
c16158bc 116642008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
11665 Nathan Sidwell <nathan@codesourcery.com>
11666 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11667
11668 * acinclude.m4: Include ../../config/acx.m4.
11669 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11670 * configure, config.in: Regenerate.
11671 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11672 * server.c (gdbserver_version): Print PKGVERSION.
11673 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11674 (main): Adjust gdbserver_usage calls.
11675 * gdbreplay.c (version, host_name): Add declarations.
11676 (gdbreplay_version, gdbreplay_usage): New.
11677 (main): Accept --version and --help options.
11678
aeb75bf5
DJ
116792008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11680
11681 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11682 (arm_breakpoint_at): Handle Thumb.
11683 (the_low_target): Add comment.
11684
76b233dd
UW
116852008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11686
11687 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11688
08388c79
DE
116892008-05-09 Doug Evans <dje@google.com>
11690
a3c83fae
DE
11691 * server.h (decode_search_memory_packet): Declare.
11692 * remote-utils.c (decode_search_memory_packet): New fn.
11693 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11694 (handle_search_memory): New fn.
11695 (handle_query): Process qSearch:memory packets.
11696
bb9c3d36
UW
116972008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11698
11699 * regcache.c (registers_length): Remove.
11700 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11701 full register packet.
11702 * regcache.h (registers_length): Remove prototype.
11703 * server.h (PBUFSIZ): Define to 16384.
11704
7284e1be
UW
117052008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11706
11707 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11708 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11709 powerpc-64l.o, and powerpc-altivec64l.o.
11710 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11711 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11712 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11713 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11714 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11715 to srv_xmlfiles.
11716
11717 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11718 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11719 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11720 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11721 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11722 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11723 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11724 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11725 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11726 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11727 (clean): Update.
11728
11729 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11730 (init_registers_powerpc_32l): ... this new prototype.
11731 (init_registers_powerpc_32): Remove, replace by ...
11732 (init_registers_powerpc_altivec32l): ... this new prototype.
11733 (init_registers_powerpc_e500): Remove, replace by ...
11734 (init_registers_powerpc_e500l): ... this new prototype.
11735 (init_registers_ppc64): Remove, replace by ...
11736 (init_registers_powerpc_64l): ... this new prototype.
11737 (init_registers_powerpc_64): Remove, replace by ...
11738 (init_registers_powerpc_altivec64l): ... this new prototype.
11739 (ppc_num_regs): Set to 73.
11740 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11741 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11742 (ppc_cannot_store_register): Handle orig_r3 and trap.
11743 (ppc_arch_setup): Update init_registers_... calls.
11744 (ppc_fill_gregset): Handle orig_r3 and trap.
11745
11746 * inferiors.c (clear_inferiors): Reset current_inferior.
11747
fdc59709
PB
117482008-04-23 Paolo Bonzini <bonzini@gnu.org>
11749
889bf7c5
PA
11750 * acinclude.m4: Add override.m4.
11751 * configure: Regenerate.
fdc59709 11752
c9b2f845
UW
117532008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11754
11755 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11756 initial call to init_register_ppc64.
11757
550512b8
UW
117582008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11759
43aaf8b6
PA
11760 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11761 single powerpc*-*-linux* case.
550512b8
UW
11762 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11763
b6430ec3
UW
117642008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11765
11766 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11767 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11768 from reg_xmlfiles.
11769 * linux-ppc-low.c: Include <elf.h>.
11770 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11771 (ppc_hwcap): New global variable.
11772 (ppc_regmap): Remove __SPE__ #ifdef sections.
11773 (ppc_regmap_e500): New global variable.
11774 (ppc_cannot_store_register): Update __SPE__ special case.
11775 (ppc_get_hwcap): New function.
11776 (ppc_arch_setup): Use it to determine whether inferior supports
11777 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11778 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11779 Do not access registers if target does not support AltiVec.
11780 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11781 Do not access registers if target does not support SPE.
11782 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11783
52fa2412
UW
117842008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11785
11786 * linux-low.c (disabled_regsets, num_regsets): New.
11787 (use_regsets_p): Delete.
11788 (linux_wait_for_process): Clear disabled_regsets.
11789 (regsets_fetch_inferior_registers): Check and set it.
11790 (regsets_store_inferior_registers): Likewise.
11791 (linux_fetch_registers, linux_store_registers): Do not use
11792 use_regsets_p.
11793 (initialize_low): Allocate disabled_regsets.
11794
e28b3332
DJ
117952008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11796
11797 * Makefile.in (LIBOBJS): New.
11798 (OBS): Use LIBOBJS.
11799 (memmem.o): New rule.
11800 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11801 * configure: Regenerated.
11802
4536995d
UW
118032008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11804
11805 * server.c (handle_query): Never return "unsupported" for
11806 qXfer:features:read queries.
11807
221c031f
UW
118082008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11809
11810 * server.c (get_features_xml): Fix inverted condition.
11811 (handle_query): Always support qXfer:feature:read.
11812
ccd213ac
DJ
118132008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11814
11815 * server.c (wrapper_argv): New.
11816 (start_inferior): Handle wrapper_argv. If set, expect an extra
11817 trap.
11818 (gdbserver_usage): Document --wrapper.
11819 (main): Parse --wrapper.
11820
6fe305f7
UW
118212008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11822
11823 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11824 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11825 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11826 (ppc_set_pc): Likewise.
11827 (ppc_arch_setup): New function.
11828 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11829 of collect_register.
889bf7c5 11830 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11831
5b0a002e
UW
118322008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11833
11834 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11835 instead of linux-ppc64-low.o.
11836 * linux-ppc64-low.c: Remove file.
11837 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11838 (linux-ppc64-low.o): Remove rule.
11839
11840 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11841 (init_registers_powerpc_64): Likewise.
11842 (ppc_regmap): Conditionally define depending on __powerpc64__.
11843 (ppc_cannot_store_register): Do not special-case "fpscr" when
11844 compiled on __powerpc64__.
11845 (ppc_collect_ptrace_register): New function.
11846 (ppc_supply_ptrace_register): New function.
11847 (ppc_breakpoint): Change type to "unsigned int".
11848 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11849 (the_low_target): Conditionally provide initializers for the
889bf7c5 11850 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11851 collect_ptrace_register and supply_ptrace_register members.
11852
9b4b61c8
UW
118532008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11854
11855 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11856 * server.c (gdbserver_xmltarget): Define.
11857 (get_features_xml): Use it to replace "target.xml" and arch_string.
11858
11859 * configure.srv: Remove srv_xmltarget. Add XML files that were
11860 mentioned there to srv_xmlfiles instead. Remove conditional tests
11861 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11862 srv_xmlfiles and srv_regobj to include all possible choices.
11863 * configure.ac (srv_xmltarget): Remove.
11864 (srv_xmlfiles): Do not add "target.xml".
11865 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11866 checks for supplementary target information.
11867 * configure: Regenerate.
11868 * Makefile.in (XML_TARGET): Remove.
11869 (target.xml): Remove rule.
11870 (clean): Do not clean up target.xml.
11871 (.PRECIOUS): Do not mention target.xml.
11872
11873 * target.h (struct target_ops): Remove arch_string member.
11874 * linux-low.c (linux_arch_string): Remove.
11875 (linux_target_ops): Remove arch_string initializer.
11876 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11877 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11878 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11879 * spu-low.c (spu_arch_string): Remove.
11880 (spu_target_ops): Remove arch_string initializer.
11881 * win32-low.c (win32_arch_string): Remove.
11882 (win32_target_ops): Remove arch_string initializer.
11883 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11884 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11885 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11886
ee1a7ae4
UW
118872008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11888
11889 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11890 by collect_ptrace_register and supply_ptrace_register hooks.
11891 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11892 instead of checking for the_low_target.left_pad_xfer.
11893 (usr_store_inferior_registers): Use collect_ptrace_register callback
11894 instead of checking for the_low_target.left_pad_xfer.
11895
11896 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11897 (s390_supply_ptrace_register): Likewise.
11898 (s390_fill_gregset): Call s390_collect_ptrace_register.
11899 (the_low_target): Update.
11900
11901 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11902 (ppc_supply_ptrace_register): Likewise.
11903 (the_low_target): Update.
11904
11905 * linux-i386-low.c (the_low_target): Update.
11906 * linux-x86-64-low.c (the_low_target): Update.
11907
d61ddec4
UW
119082008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11909
11910 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11911 reg-s390.o and reg-s390x.o.
11912
11913 * linux-low.c (new_inferior): New global variable.
11914 (linux_create_inferior, linux_attach): Set it.
11915 (linux_wait_for_process): Call the_low_target.arch_setup after the
11916 target has stopped for the first time.
11917 (initialize_low): Do not call the_low_target.arch_setup.
11918
11919 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11920 (s390_set_pc): Likewise.
11921 (s390_arch_setup): New function.
11922 (the_low_target): Use s390_arch_setup as arch_setup routine.
11923
11924 * regcache.c (realloc_register_cache): New function.
11925 (set_register_cache): Call it for each existing regcache.
11926
d05b4ac3
UW
119272008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11928
11929 * server.h (init_registers): Remove prototype.
11930
11931 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11932 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11933 instead of init_registers ().
11934 * linux-arm-low.c (init_registers_arm): Add prototype.
11935 (init_registers_arm_with_iwmmxt): Likewise.
11936 (the_low_target): Add initializer for arch_setup field.
11937 * linux-cris-low.c (init_registers_cris): Add prototype.
11938 (the_low_target): Add initializer for arch_setup field.
11939 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11940 (the_low_target): Add initializer for arch_setup field.
11941 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11942 (the_low_target): Add initializer for arch_setup field.
11943 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11944 (the_low_target): Add initializer for arch_setup field.
11945 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11946 (the_low_target): Add initializer for arch_setup field.
11947 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11948 (the_low_target): Add initializer for arch_setup field.
11949 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11950 (init_registers_mips64_linux): Likewise.
11951 (the_low_target): Add initializer for arch_setup field.
11952 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11953 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11954 (the_low_target): Add initializer for arch_setup field.
11955 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11956 (init_registers_powerpc_64): Likewise.
11957 (the_low_target): Add initializer for arch_setup field.
11958 * linux-s390-low.c (init_registers_s390): Add prototype.
11959 (init_registers_s390x): Likewise.
11960 (the_low_target): Add initializer for arch_setup field.
11961 * linux-sh-low.c (init_registers_sh): Add prototype.
11962 (the_low_target): Add initializer for arch_setup field.
11963 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11964 (the_low_target): Add initializer for arch_setup field.
11965 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11966 (the_low_target): Add initializer for arch_setup field.
11967
11968 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11969 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11970 instead of init_registers ().
11971 * win32-arm-low.c (init_registers_arm): Add prototype.
11972 (the_low_target): Add initializer for arch_setup field.
11973 * win32-i386-low.c (init_registers_i386): Add prototype.
11974 (the_low_target): Add initializer for arch_setup field.
11975
11976 * spu-low.c (init_registers_spu): Add prototype.
11977 (initialize_low): Call initialie_registers_spu () instead of
11978 initialize_registers ().
11979
fd96d250
PA
119802008-02-19 Pedro Alves <pedro@codesourcery.com>
11981
11982 * server.c (handle_v_requests): When handling the vRun and vAttach
11983 packets, if already debugging a process, don't kill it. Return an
11984 error instead.
11985
d41b6bb4
DJ
119862008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11987
11988 * server.c (handle_query): Correct length check.
11989
5ac588cf
PA
119902008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11991
11992 * win32-low.c (do_initial_child_stuff): Add process handle
11993 parameter. Set current_process_handle and current_process_id from the
11994 parameters. Clear globals.
11995 (win32_create_inferior): Don't set current_process_handle and
11996 current_process_id here. Instead pass them on the call to
11997 do_initial_child_stuff.
11998 (win32_attach): Likewise.
11999 (win32_clear_inferiors): New.
12000 (win32_kill): Don't close the current process handle or the
12001 current thread handle here. Instead call win32_clear_inferiors.
12002 (win32_detach): Don't open a new handle to the process. Call
12003 win32_clear_inferiors.
12004 (win32_join): Don't rely on current_process_handle; open a new
12005 handle using the process id.
12006 (win32_wait): Call win32_clear_inferiors when the inferior process
12007 has exited.
12008
ecd7ecbc
DJ
120092008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12010
12011 * server.c (monitor_show_help): Add "exit".
12012
1525d545
MG
120132008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12014
ecd7ecbc 12015 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12016 (clean): Add reg-xtensa.c.
12017 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12018 * configure.srv (xtensa*-*-linux*) New target.
12019 * linux-xtensa-low.c: New.
12020 * xtensa-xtregs.c: New.
1525d545 12021
59a016f0
PA
120222008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12023
12024 * hostio.c: Don't include errno.h.
12025 (errno_to_fileio_errno): Move to hostio-errno.
12026 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12027 error number outputting to the target->hostio_last_error callback.
12028 (hostio_packet_error): Use FILEIO_EINVAL directly.
12029 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12030 calls to hostio_error.
12031 * hostio-errno.c: New.
12032 * server.h (hostio_last_error_from_errno): Declare.
12033 * target.h (target_ops): Add hostio_last_error member.
12034 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12035 as hostio_last_error handler.
889bf7c5 12036 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12037 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12038 (wince_hostio_last_error): New functions.
12039 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12040 as hostio_last_error handler.
12041 (win32_target_ops) [!_WIN32_WCE]: Register
12042 hostio_last_error_from_errno as hostio_last_error handler.
12043 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12044 (hostio-errno.o): New rule.
12045 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12046 * configure.srv (srv_hostio_err_objs): New variable. Default to
12047 hostio-errno.o.
12048 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12049 * configure: Regenerate.
12050
2d717e4f
DJ
120512008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12052
12053 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12054 (linux_kill, linux_detach): Clean up the process list.
12055 * remote-utils.c (remote_open): Improve port number parsing.
12056 (putpkt_binary, input_interrupt): Only send interrupts if the target
12057 is running.
12058 * server.c (extended_protocol): Make static.
12059 (attached): Define earlier.
12060 (exit_requested, response_needed, program_argv): New variables.
12061 (target_running): New.
12062 (start_inferior): Clear attached here.
12063 (attach_inferior): Set attached here.
12064 (require_running): Define.
12065 (handle_query): Use require_running and target_running. Implement
12066 "monitor exit".
12067 (handle_v_attach, handle_v_run): New.
12068 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12069 (gdbserver_usage): Update.
12070 (main): Redo argument parsing. Handle --debug and --multi. Handle
12071 --attach along with other options or after the port. Save
12072 program_argv. Support no initial program. Resynchronize
12073 communication with GDB after an error. Handle "monitor exit".
12074 Use require_running and target_running. Always allow the extended
12075 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12076 restart in extended mode.
12077 * README: Refer to the GDB manual. Update --attach usage.
12078
7407e2de
AS
120792007-12-20 Andreas Schwab <schwab@suse.de>
12080
12081 * linux-low.c (STACK_SIZE): Define.
12082 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12083 (linux_test_for_tracefork): Likewise.
12084
b65d95c5
DJ
120852007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12086
12087 * linux-low.c (linux_wait_for_event): Update messages. Do not
12088 reinsert auto-delete breakpoints.
12089 * mem-break.c (struct breakpoint): Change return type of handler to
12090 int.
12091 (set_breakpoint_at): Update handler type.
12092 (reinsert_breakpoint_handler): Return 1 instead of calling
12093 delete_breakpoint.
12094 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12095 setting a new one.
12096 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12097 * mem-break.h (set_breakpoint_at): Update handler type.
12098 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12099 * win32-low.c (auto_delete_breakpoint): New.
12100 (get_child_debug_event): Use it.
12101
4e799345
DJ
121022007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12103
12104 * configure.ac: Check for pread and pwrite.
12105 * hostio.c (handle_pread): Fall back to lseek and read.
12106 (handle_pwrite): Fall back to lseek and write.
12107 * config.in, configure: Regenerated.
12108
27524b67
DJ
121092007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12110
12111 * server.c (myresume): Add own_buf argument.
12112 (main): Update calls.
12113
a20d5e98
DJ
121142007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12115
12116 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12117 * remote-utils.c (remote_open): Do not call disable_async_io.
12118 (block_async_io): Delete.
12119 (unblock_async_io): Make static.
12120 (initialize_async_io): New.
12121 * server.c (handle_v_cont): Handle async I/O here.
12122 (myresume): Likewise. Move other common resume tasks here...
12123 (main): ... from here. Call initialize_async_io. Disable async
12124 I/O before the main loop.
12125 * server.h (initialize_async_io): Declare.
12126 (block_async_io, unblock_async_io): Delete prototypes.
12127 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12128
b79d787e
DJ
121292007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12130
12131 * remote-utils.c (readchar): Allow binary data in received messages.
12132
d97903b2
PA
121332007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12134
12135 * win32-low.c (attaching): New global.
12136 (win32_create_inferior): Clear the `attaching' global.
12137 (win32_attach): Set the `attaching' global.
12138 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12139 attaching. Only set a breakpoint at the entry point if not
12140 attaching.
12141
311de423
PA
121422007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12143
12144 * server.c (main): Don't report dll events on the initial
12145 connection on attaches.
12146
6c2d16d2
PA
121472007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12148
12149 * server.c (main): Relax numerical bases supported for the pid of
12150 the --attach command line argument.
12151
5ca906e6
PA
121522007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12153
12154 * win32-low.c (win32_attach): Call OpenProcess before
12155 DebugActiveProcess, not after. Add last error output to error
12156 call.
12157
9c6c8194
PA
121582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12159
12160 * win32-low.c (win32_get_thread_context)
12161 (win32_set_thread_context): New functions.
12162 (thread_rec): Use win32_get_thread_context.
12163 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12164 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12165 field.
12166
4d5d1aaa
PA
121672007-12-03 Leo Zayas
12168 Pedro Alves <pedro_alves@portugalmail.pt>
12169
12170 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12171 global variables.
12172 (child_add_thread): Minor cleanup.
12173 (child_continue): Resume artificially suspended threads before
12174 calling ContinueDebugEvent.
12175 (suspend_one_thread): New.
12176 (fake_breakpoint_event): New.
12177 (get_child_debug_event): Change return type to int. Check here if
12178 gdb sent an interrupt request. If a soft interrupt was requested,
12179 fake a breakpoint event. Return 0 if there is no event to handle,
12180 and 1 otherwise.
12181 (win32_wait): Don't check here if gdb sent an interrupt request.
12182 Ensure there is a valid event to handle.
12183 (win32_request_interrupt): Add soft interruption method as last
12184 resort.
12185
c436e841
PA
121862007-12-03 Leo Zayas
12187 Pedro Alves <pedro_alves@portugalmail.pt>
12188
12189 * win32-low.h (win32_thread_info): Add descriptions to the
12190 structure members. Replace `suspend_count' counter by a
12191 `suspended' flag.
12192 * win32-low.c (thread_rec): Update condition of when to get the
12193 context from the inferior. Rely on ContextFlags being set if it
12194 has already been retrieved. Only suspend the inferior thread if
12195 we haven't already. Warn if that fails.
12196 (continue_one_thread): s/suspend_count/suspended/. Only call
12197 ResumeThread once. Warn if that fails.
12198
e7b5fa67
PA
121992007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12200
12201 * win32-low.c (win32_wait): Don't read from the inferior when it
12202 has already exited.
12203
a385171d
PA
122042007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12205
12206 * Makefile.in (win32_low_h): New variable.
12207 (win32-low.o): Add dependency on $(win32_low_h).
12208 (win32-arm-low.o, win32-i386-low.o): New rules.
12209
f80c84b3
DJ
122102007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12211
12212 * hostio.c: Correct copyright year.
12213
a6b151f1
DJ
122142007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12215
12216 * Makefile.in (OBS): Add hostio.o.
12217 (hostio.o): New rule.
12218 * server.h (handle_vFile): Declare.
12219 * hostio.c: New file.
12220 * server.c (handle_v_requests): Take packet_len and new_packet_len
12221 for binary packets. Call handle_vFile.
12222 (main): Update call to handle_v_requests.
12223
f9387fc3
DJ
122242007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12225
12226 * linux-low.c: Include <sched.h>.
12227
51c2684e
DJ
122282007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12229
12230 * linux-low.c (linux_tracefork_grandchild): New.
12231 (linux_tracefork_child): Use clone.
12232 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12233
75f83163
JB
122342007-10-31 Joel Brobecker <brobecker@adacore.com>
12235
12236 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12237
da5898ce
DJ
122382007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12239
12240 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12241
24a09b5f
DJ
122422007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12243
12244 * inferiors.c (change_inferior_id): Delete.
12245 (add_pid_to_list, pull_pid_from_list): New.
12246 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12247 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12248 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12249 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12250 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12251 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12252 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12253 (using_threads): Always set to 1.
12254 (handle_extended_wait): New.
12255 (add_process): Do not set TID.
12256 (linux_create_inferior): Set must_set_ptrace_flags.
12257 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12258 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12259 (linux_thread_alive): Rename TID argument to LWPID.
12260 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12261 (linux_wait_for_event): Do not use TID or check using_threads. Update
12262 call to dead_thread_notify. Call handle_extended_wait.
12263 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12264 (send_sigstop): Delete sigstop_sent.
12265 (wait_for_sigstop): Avoid TID.
12266 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12267 (linux_test_for_tracefork): New.
12268 (linux_lookup_signals): Use thread_db_active and
12269 linux_supports_tracefork_flag.
12270 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12271 * linux-low.h (get_process_thread): Avoid TID.
12272 (struct process_ifo): Move thread_known and tid to the end. Remove
12273 sigstop_sent.
12274 (linux_attach_lwp, thread_db_init): Update prototypes.
12275 * server.h (change_inferior_id): Delete prototype.
12276 (add_pid_to_list, pull_pid_from_list): New prototypes.
12277 * thread-db.c (thread_db_use_events): New.
12278 (find_first_thread): Rename to...
12279 (find_one_thread): ...this. Update callers and messages. Do not
12280 call fatal. Check thread_db_use_events. Do not call
12281 change_inferior_id or new_thread_notify.
12282 (maybe_attach_thread): Update. Do not call new_thread_notify.
12283 (thread_db_init): Set thread_db_use_events. Check use_events.
12284 * utils.c (fatal, warning): Correct message prefix.
12285
30ed0a8f
DJ
122862007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12287
12288 * Makefile.in (clean): Remove new files.
12289 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12290 (powerpc-64.o, powerpc-64.c): New rules.
12291 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12292 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12293 with SPE.
12294 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12295 SPE targets.
12296 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12297 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12298 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12299 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12300 (target_regsets): Add AltiVec and SPE register sets.
12301 * configure.ac: Check for AltiVec and SPE.
12302 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12303 (ppc_fill_vrregset, ppc_store_vrregset): New.
12304 (target_regsets): Add AltiVec register set.
12305 * configure: Regenerated.
12306
fd462a61
DJ
123072007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12308
12309 * linux-low.c (O_LARGEFILE): Define.
12310 (linux_read_memory): Use /proc/PID/mem.
12311 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12312 * configure, config.in: Regenerated.
12313
69f223ed
DJ
123142007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12315
12316 * linux-low.c (linux_wait_for_event): Do not pass signals while
12317 single-stepping.
12318
aec18585
PA
123192007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12320
12321 * win32-low.c (create_process): New.
12322 (win32_create_inferior): Use create_process instead of
12323 CreateProcess. If create_process failed retry appending an ".exe"
12324 suffix. Store the GetLastError result immediatelly after
12325 create_process calls and use it on the call to error.
12326
34d86ddd
PA
123272007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12328
12329 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12330
5a0e3bd0
JB
123312007-08-23 Joel Brobecker <brobecker@adacore.com>
12332
12333 * configure.ac: Switch license to GPLv3.
12334
f88c79e6
MS
123352007-08-01 Michael Snyder <msnyder@access-company.com>
12336
12337 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12338
6b3d9b83
PA
123392007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12340
12341 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12342 typedef.
12343 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12344 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12345 CloseToolhelp32Snapshot.
12346 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12347 CloseToolhelp32Snapshot.
12348
c588c53c
MS
123492007-07-27 Michael Snyder <michael.snyder@access-company.com>
12350
12351 * server.c (main): Check for inferior exit before main loop.
12352
aa0403d9
PA
123532007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12354
12355 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12356 instead of on tmp_desc.
12357
255e7678
DJ
123582007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12359 Daniel Jacobowitz <dan@codesourcery.com>
12360
12361 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12362 (add_thread): Minor cleanups.
12363 (clear_inferiors): Move lower in the file. Clear the DLL
12364 list.
12365 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12366 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12367 (xml_escape_text): New.
12368 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12369 for qSupported.
12370 (handle_v_cont): Report errors.
12371 (gdbserver_version): Update.
12372 (main): Correct size of own_buf. Do not report initial DLL events.
12373 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12374 (unloaded_dll, xml_escape_text): New.
12375 * win32-low.c (enum target_waitkind): Update comments.
12376 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12377 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12378 (win32_EnumProcessModules, win32_GetModuleInformation)
12379 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12380 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12381 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12382 (win32_Module32First, win32_Module32Next, load_toolhelp)
12383 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12384 (get_child_debug_event): Handle DLL events.
12385 (win32_wait): Likewise.
12386
0d37add9
DJ
123872007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12388
12389 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12390 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12391
45e2715e
PA
123922007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12393
12394 * win32-low.c (handle_output_debug_string): Ignore event if not
12395 waiting.
12396
c5674cf1
PA
123972007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12398
12399 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12400
2bbe3cc1
DJ
124012007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12402
12403 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12404
ae13219e
DJ
124052007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12406
12407 * inferiors.c (change_inferior_id): Add comment.
12408 * linux-low.c (check_removed_breakpoint): Add an early
12409 prototype. Improve debug output.
12410 (linux_attach): Doc update.
12411 (linux_detach_one_process, linux_detach): Clean up before releasing
12412 each process.
12413 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12414 * linux-low.h (struct process_info): Doc improvement.
12415 * mem-break.c (delete_all_breakpoints): New.
12416 * mem-break.h (delete_all_breakpoints): New prototype.
12417 * thread-db.c (find_first_thread): New.
12418 (thread_db_create_event): Call it instead of
12419 thread_db_find_new_threads. Clean up unused variables.
12420 (maybe_attach_thread): Remove first thread handling.
12421 (thread_db_find_new_threads): Use find_first_thread.
12422 (thread_db_get_tls_address): Likewise.
12423
4105de34
DJ
124242007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12425
12426 * thread-db.c (thread_db_find_new_threads): Add prototype.
12427 (thread_db_create_event): Check for the main thread before adding
12428 a new thread.
12429 (maybe_attach_thread): Only enable event reporting if TID == 0.
12430 (thread_db_get_tls_address): Check for new threads.
12431
2b876972
DJ
124322007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12433
12434 * linux-low.c (linux_create_inferior): Try execv before execvp.
12435 * spu-low.c (spu_create_inferior): Likewise.
12436
7a245884
DJ
124372007-06-13 Mike Frysinger <vapier@gentoo.org>
12438
12439 * linux-low.c (linux_create_inferior): Change execv to execvp.
12440 * spu-low.c (spu_create_inferior): Likewies.
12441
117ce543
DJ
124422007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12443
12444 * Makefile.in (clean): Clean new files instead of deleted ones.
12445 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12446 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12447 rules.
12448 * configure.srv: Specify XML files and new regformats for MIPS and
12449 MIPS64 GNU/Linux.
12450 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12451 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12452 an entry for the restart register.
12453 (mips_cannot_fetch_register, mips_cannot_store_register)
12454 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12455 register names to match the XML descriptions.
12456 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12457 restart register instead of $0.
12458
0e7f50da
UW
124592007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12460 Markus Deuling <deuling@de.ibm.com>
12461
12462 * remote-utils.c (decode_xfer_write): New function.
12463 * server.h (decode_xfer_write): Add prototype.
12464 * server.c (handle_query): Add PACKET_LEN argument. Support
12465 qXfer:spu:read and qXfer:spu:write packets.
12466 (main): Pass packet_len to handle_query.
12467 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12468 * target.h (target_ops): Add qxfer_spu.
12469
374c1d38
UW
124702007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12471
12472 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12473 accessing non-seekable spufs files.
12474
bb63802a
UW
124752007-05-16 Markus Deuling <deuling@de.ibm.com>
12476
889bf7c5 12477 * server.c (handle_query): Add reply for qC packet.
bb63802a 12478
7390519e
PA
124792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12480 Leo Zayas <lerele@champenstudios@com>
12481
12482 * server.h (check_remote_input_interrupt_request): New function.
12483 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12484 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12485 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12486 (check_remote_input_interrupt_request): New function.
12487 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 12488 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
12489 winapi_GenerateConsoleCtrlEvent): New typedefs.
12490 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12491 to 250 ms.
12492 (win32_wait): Check for remote interrupt request
12493 with check_remote_input_interrupt_request.
12494 (win32_request_interrupt): New function.
12495 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12496
34b34921
PA
124972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12498
12499 * win32-low.c (debug_registers_changed,
12500 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12501 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12502 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12503 (thread_rec): Get context using the low target.
12504 (child_add_thread): Call thread_added on the low target,
12505 which does the same thing.
12506 (regptr): Delete.
12507 (do_initial_child_stuff): Remove debug registers references.
12508 Set context using the low target. Resume threads after
12509 setting the contexts.
12510 (child_continue): Remove dead variable. Remove debug
12511 registers references.
12512 (child_fetch_inferior_registers): Go through the low target.
12513 (do_child_store_inferior_registers): Remove.
12514 (child_store_inferior_registers): Go through the low target.
12515 (win32_resume): Remove debug registers references.
12516 Set context using the low target.
12517 (handle_exception): Change return type to void. Don't record
12518 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12519 first chance exception.
889bf7c5 12520 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
12521 goto loop. Always return after waiting for debug event.
12522 (win32_wait): Convert to switch statement. Handle spurious
12523 events.
12524
12525 * win32-i386-low.c (debug_registers_changed,
12526 debug_registers_used): New.
12527 (initial_stuff): Rename to ...
12528 (i386_initial_stuff): ... this. Clear debug registers
12529 state variables.
12530 (store_debug_registers): Delete.
12531 (i386_get_thread_context): New.
12532 (load_debug_registers): Delete.
12533 (i386_set_thread_context): New.
12534 (i386_thread_added): New.
12535 (single_step): Rename to ...
12536 (i386_single_step): ... this.
12537 (do_fetch_inferior_registers): Rename to ...
12538 (i386_fetch_inferior_register): ... this.
12539 (i386_store_inferior_register): New.
12540 (the_low_target): Adapt to new interface.
12541
12542 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12543 (arm_get_thread_context): New.
12544 (arm_set_thread_context): New.
12545 (regptr): New.
12546 (do_fetch_inferior_registers): Rename to ...
12547 (arm_fetch_inferior_register): ... this.
12548 (arm_store_inferior_register): New.
12549 (arm_wince_breakpoint): Reimplement as unsigned long.
12550 (arm_wince_breakpoint_len): Define.
12551 (the_low_target): Adapt to new interface.
12552
12553 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12554 load_debug_registers. Add get_thread_context, set_thread_context,
12555 thread_added and store_inferior_register. Rename
12556 fetch_inferior_registers to fetch_inferior_register.
12557 (regptr): Remove declaration.
12558
dd6953e1
PA
125592007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12560
12561 * linux-low.c (linux_detach): Change return type to int. Return 0.
12562 * spu-low.c (spu_detach): Likewise.
12563
444d6139
PA
125642007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12565
12566 * target.h (target_ops): Change return type of detach to int.
12567 Add join.
12568 (join_inferior): New.
12569 * server.c (main): Don't skip detach support on mingw32.
12570 If the inferior doesn't support detaching return error.
12571 Call join_inferior instead of using waitpid.
12572 * linux-low.c (linux_join): New.
12573 (linux_target_op): Add linux_join.
12574 * spu-low.c (spu_join): New.
12575 (spu_target_ops): Add spu_join.
12576 * win32-low.c (win32_detach): Adapt to new interface.
12577 Reopen current_process_handle before detaching. Issue a child
12578 resume before detaching.
12579 (win32_join): New.
12580 (win32_target_op): Add win32_join.
12581
1d5315fe
PA
125822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12583
12584 * win32-low.c (win32-attach): Fix return value.
12585 * target.h (target_ops): Describe ATTACH return values.
12586
bf914831
PA
125872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12588
12589 * win32-low.c (GETPROCADDRESS): Define.
12590 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12591 (winapi_DebugSetProcessKillOnExit): Likewise.
12592 (win32_create_inferior): Force usage of ansi CreateProcessA.
12593 (win32_attach): Use GETPROCADDRESS.
12594 (win32_detach): Likewise.
12595
f72f3e60
PA
125962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12597
12598 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12599
ed50f18f
PA
126002007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12601
12602 * win32-low.c: Commit leftover changes from 2007-03-29.
12603
0c2ead7e
DJ
126042007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12605
12606 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12607 fields short instead of int. Add explicit padding.
12608 (i387_cache_to_fsave): Remove unnecessary casts.
12609 (i387_fsave_to_cache): Doc fix.
12610 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12611
73725ff3
DJ
126122007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12613
12614 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12615 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12616
d99f33d8
PA
126172007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12618
12619 * configure.srv (arm*-*-mingw32ce*): Move near the other
12620 arm targets.
12621
68070c10
PA
126222007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12623
2482afc6 12624 * configure.ac: Add errno checking.
68070c10
PA
12625 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12626 sys/file.h and malloc.h.
12627 (AC_CHECK_DECLS): Add perror.
12628 (srv_mingwce): Handle.
2482afc6 12629 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
12630 win32-i386-low.o to srv_tgtobj.
12631 (i[34567]86-*-mingw*): Likewise.
12632 (arm*-*-mingw32ce*): Add case.
12633 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12634 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12635 [__MINGW32CE__] (strerror): New function.
12636 [__MINGW32CE__] (errno): Define to GetLastError.
12637 [__MINGW32CE__] (COUNTOF): New macro.
12638 (remote_open): Remove extra close call.
12639 * mem-break.c (delete_breakpoint_at): New function.
12640 * mem-break.h (delete_breakpoint_at): Declare.
12641 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12642 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12643 [USE_WIN32API] (read, write): Add char* casts.
12644 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12645 * server.h: Include wincecompat.h on Windows CE.
12646 [HAVE_ERRNO_H]: Check.
12647 (perror): Declare if not declared.
12648 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12649 (perror_with_name): Remove errno declaration.
12650 * wincecompat.h: New.
12651 * wincecompat.c: New.
12652 * win32-low.h: New.
12653 * win32-arm-low.c: New.
12654 * win32-i386-low.c: New.
12655 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12656 (OUTMSG2): Make it safe.
12657 (_T): New macro.
12658 (COUNTOF): New macro.
12659 (NUM_REGS): Get it from the low target.
12660 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12661 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12662 (thread_rec): Let low target handle debug registers.
12663 (child_add_thread): Likewise.
12664 (child_init_thread_list): Likewise.
12665 (continue_one_thread): Likewise.
12666 (regptr): New.
12667 (do_child_fetch_inferior_registers): Move to ...
12668 * win32-i386-low.c: ... here, and rename to ...
12669 (do_fetch_inferior_registers): ... this.
889bf7c5 12670 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12671 Go through the low target.
12672 (do_child_store_inferior_registers): Use regptr.
12673 (strwinerror): New function.
12674 (win32_create_inferior): Handle Windows CE.
12675 Use strwinerror instead of strerror on Windows error
12676 codes. Add program to the error output.
12677 Don't close the main thread handle on Windows CE.
12678 (win32_attach): Use coredll.dll on Windows CE.
12679 (win32_kill): Close current process and current
12680 thread handles.
12681 (win32_detach): Use coredll.dll on Windows CE.
12682 (win32_resume): Let low target handle debug registers, and
12683 step request.
12684 (handle_exception): Add/Remove initial breakpoint. Avoid
12685 non-existant WSTOPSIG on Windows CE.
12686 (win32_read_inferior_memory): Cast to remove warning.
12687 (win32_arch_string): Go through the low target.
12688 (initialize_low): Call set_breakpoint_data with the low
12689 target's breakpoint.
12690 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12691 FOP_REGNUM, mappings): Move to ...
12692 * win32-i386-low.c: ... here.
12693 * win32-low.c (win32_thread_info): Move to ...
12694 * win32-low.h: ... here.
12695 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12696 win32-arm-low.c and wincecompat.c.
12697 (all:): Add $EXEEXT.
12698 (install-only:): Likewise.
12699 (gdbserver:): Likewise.
12700 (gdbreplay:): Likewise.
12701 * config.in: Regenerate.
12702 * configure: Regenerate.
12703
41093d81
PA
127042007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12705
12706 * win32-low.c: Rename typedef thread_info to
12707 win32_thread_info throughout.
12708
544afa54
PA
127092007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12710
12711 * win32-i386-low.c: Rename to ...
12712 * win32-low.c: ... this.
12713 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12714 * Makefile.in: Likewise.
12715
bce7165d
PA
127162007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12717
12718 * remote-utils.c (monitor_output): Constify msg parameter.
12719 * server.h (monitor_output): Likewise.
12720 * win32-i386-low.c (handle_output_debug_string): New.
12721 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12722 handle_output_debug_string.
12723 (get_child_debug_event): Likewise.
12724
506c7aa0
DJ
127252007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12726
12727 * server.c (main): Correct strtoul check.
12728
42c81e2a
DJ
127292007-03-27 Jon Ringle <jon@ringle.org>
12730
12731 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12732
9453113a
DJ
127332007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12734
12735 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12736
64a69107
DJ
127372007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12738
12739 * terminal.h: Check HAVE_SGTTY_H.
12740
127412007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12742
12743 * remote-utils.c (remote_open): Print out the assigned port number.
12744
c74d0ad8
DJ
127452007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12746
12747 * remote-utils.c (monitor_output): New function.
12748 * server.c (debug_threads): Define here.
12749 (monitor_show_help): New function.
12750 (handle_query): Handle qRcmd.
12751 (main): Do not handle 'd' packet.
12752 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12753 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12754 of debug_threads.
12755
de7c3b4a
PA
127562007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12757
12758 * Makefile.in (EXEEXT): New.
12759 (clean): Use $(EXEEXT).
12760
ef57601b
PA
127612007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12762
12763 * target.h (target_ops): Rename send_signal to request_interrupt,
12764 and remove enum target_signal parameter.
12765 * linux-low.c (linux_request_interrupt): Rename from
12766 linux_send_signal, and always send SIGINT.
12767 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12768 and always send SIGINT.
12769 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12770 of send_signal.
12771 (input_interrupt): Likewise.
12772
820f2bda
PA
127732007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12774
12775 * server.c (get_features_xml): Check if target implemented
12776 arch_string.
12777 * win32-i386-low.c (win32_arch_string): New.
12778 (win32_target_ops): Add win32_arch_string as arch_string member.
12779
ab39bf24
UW
127802007-02-22 Markus Deuling <deuling@de.ibm.com>
12781
12782 * spu-low.c (spu_arch_string): New.
12783 (spu_target_ops): Add spu_arch_string.
12784
61ff6e04
DJ
127852007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12786
12787 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12788 * configure.ac: Do not check for terminal.h.
12789 * configure, config.in: Regenerated.
12790
fb1e4ffc
DJ
127912007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12792
12793 * Makefile.in (OBS): Add $(XML_BUILTIN).
12794 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12795 (clean): Update.
12796 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12797 (arm-with-iwmmxt.c): New.
12798 * config.in, configure: Regenerate.
12799 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12800 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12801 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12802 (arm*-*-linux*): Add iWMMXt and regset support.
12803 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12804 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12805 (arm_store_wmmxregset, target_regsets): New.
12806 * server.c (get_features_xml): Take annex argument. Check builtin
12807 XML documents.
12808 (handle_query): Handle multiple annexes.
12809
0f48aa01
DJ
128102007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12811
12812 * remote-utils.c [USE_WIN32API] (read, write): Define.
12813 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12814 write.
12815
23181151
DJ
128162007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12817
12818 * linux-i386-low.c (the_low_target): Set arch_string.
12819 * linux-x86-64-low.c (the_low_target): Likewise.
12820 * linux-low.c (linux_arch_string): New.
12821 (linux_target_ops): Add it.
12822 * linux-low.h (struct linux_target_ops): Add arch_string.
12823 * server.c (write_qxfer_response): Use const void * for DATA.
12824 (get_features_xml): New.
12825 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12826 * target.h (struct target_ops): Add arch_string method.
12827
9d606399
DJ
128282007-01-03 Denis Pilat <denis.pilat@st.com>
12829 Daniel Jacobowitz <dan@codesourcery.com>
12830
12831 * linux-low.c (linux_kill): Handle being called with no threads.
12832 * win32-i386-low.c (win32_kill): Likewise.
12833 (get_child_debug_event): Clear current_process_handle.
12834
128352006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12836 Daniel Jacobowitz <dan@codesourcery.com>
12837
12838 * remote-utils.c (remote_open): Check the type of specified
12839 serial port devices before opening them.
12840 * server.c (main): Kill the inferior if an error occurs during
12841 the first remote_open.
12842
a5e13d24
DJ
128432006-12-05 Markus Deuling <deuling@de.ibm.com>
12844
12845 * README: Update supported targets.
12846
186947f7
DJ
128472006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12848
12849 * Makefile.in (clean): Remove reg-mips64.c.
12850 (reg-mips64.c, reg-mips64.o): New rules.
12851 * configure.srv: Handle mips64. Include regset support for mips.
12852 * linux-mips-low.c (union mips_register): New.
12853 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12854 (mips_breakpoint, mips_breakpoint_at): Use int.
12855 (mips_collect_register, mips_supply_register)
12856 (mips_collect_register_32bit, mips_supply_register_32bit)
12857 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12858 (mips_store_fpregset, target_regsets): New.
12859 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12860
a13e2c95
UW
128612006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12862
12863 * configure.srv: Add target "spu*-*-*".
12864 * Makefile.in (clean): Remove reg-spu.c.
12865 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12866 * spu-low.c: New file.
12867
cb7283db
DJ
128682006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12869
12870 * configure.ac: Correct td_thr_tls_get_addr test.
12871 * configure: Regenerated.
12872
89be2091
DJ
128732006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12874
12875 * linux-low.c (linux_wait_for_event): Reformat. Use the
12876 pass_signals array.
12877 * remote-utils.c (decode_address_to_semicolon): New.
12878 * server.c (pass_signals, handle_general_set): New.
12879 (handle_query): Mention QPassSignals for qSupported.
12880 (main): Call handle_general_set.
12881 * server.h (pass_signals, decode_address_to_semicolon): New.
12882
000ef4f0
DJ
128832006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12884
12885 * server.c (handle_query): Correct error handling for read_auxv.
12886
b7149293
UW
128872005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12888
12889 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12890 and srv_linux_thread_db to yes.
12891 * linux-s390-low.c (s390_fill_gregset): New function.
12892 (target_regsets): Define data structure.
12893
dae5f5cf
DJ
128942006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12895
12896 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12897 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12898 * config.in, configure: Regenerated.
12899 * inferiors.c (gdb_id_to_thread): New function.
12900 (gdb_id_to_thread_id): Use it.
12901 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12902 * linux-low.h (struct process_info): Add th member.
12903 (thread_db_get_tls_address): New prototype.
12904 * remote-utils.c (decode_address): Make non-static.
12905 * server.c (handle_query): Handle qGetTLSAddr.
12906 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12907 * target.h (struct target_ops): Add get_tls_address.
12908 * thread-db.c (maybe_attach_thread): Save the thread handle.
12909 (thread_db_get_tls_address): New.
12910
32ca6d61
DJ
129112006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12912
12913 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12914 (linux_resume_one_process): Take a siginfo_t *. Update all
12915 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12916 (struct pending_signals): Add a siginfo_t.
12917 (linux_wait_for_process): Always set last_status.
12918 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12919 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12920 * linux-low.h (struct process_info): Add last_status.
12921
5ffff7c1
DJ
129222006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12923
12924 * remote-utils.c (try_rle): New function.
12925 (putpkt_binary): Use it.
12926
8695c747
DJ
129272006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12928
12929 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12930 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12931 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12932 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12933 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12934 point registers.
12935
290fadea
RS
129362006-08-08 Richard Sandiford <richard@codesourcery.com>
12937
12938 * server.c (terminal_fd): New variable.
12939 (old_foreground_pgrp): Likewise.
12940 (restore_old_foreground_pgrp): New function.
12941 (start_inferior): Record the terminal file descriptor in terminal_fd
12942 and its original foreground group in old_foreground_pgrp. Register
12943 restore_old_foreground_pgrp with atexit().
12944
9f2e1e63
DJ
129452006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12946
12947 * server.c (handle_query): Correct qPart to qXfer.
12948
b80864fb
DJ
129492006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12950
12951 * configure.ac: Check for more headers which are missing on
12952 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12953 * configure.srv: Add Cygwin and mingw32.
12954 * remote-utils.c: Don't include headers unconditionally which
12955 are missing on mingw32. Include <winsock.h> for mingw32.
12956 (remote_open): Adjust for mingw32 support. Flush
12957 standard error after writing to it.
12958 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12959 (unblock_async_io, enable_async_io, disable_async_io)
12960 (readchar, getpkt): Update for Winsock support.
12961 (prepare_resume_reply): Expect a protocol signal number.
12962 * server.c: Disable <sys/wait.h> on mingw32.
12963 (start_inferior): Adjust for mingw32 support. Flush
12964 standard error after writing to it.
12965 (attach_inferior): Likewise. Use protocol signal
12966 numbers.
12967 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12968 and names.
12969 * win32-i386-low.c: New file.
12970 * Makefile.in (XM_CLIBS): Set.
12971 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12972 (win32-i386-low.o): New dependency rule.
12973 * linux-low.c (linux_wait): Use target signal numbers.
12974 * target.h (struct target_ops): Doc fix.
12975 * server.h (target_signal_to_name): New prototype.
12976 * gdbreplay.c: Don't include headers unconditionally which
12977 are missing on mingw32. Include <winsock.h> for mingw32.
12978 (remote_close, remote_open): Adjust for Winsock support.
12979 * configure, config.in: Regenerated.
12980
0876f84a
DJ
129812006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12982
12983 * server.c (decode_xfer_read, write_qxfer_response): New.
12984 (handle_query): Take a packet length argument. Handle
12985 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12986 the qSupported response.
12987 (main): Update call to handle_query.
12988
01f9e8fa
DJ
129892006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12990
12991 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12992 (putpkt_binary): Renamed from putpkt and adjusted for binary
12993 data.
12994 (putpkt): New wrapper for putpkt_binary.
12995 (readchar): Don't mask off the high bit.
12996 (decode_X_packet): New function.
12997 * server.c (main): Call putpkt_binary if a handler sets the packet
12998 length. Save the length of the incoming packet. Handle 'X'.
12999 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13000
be2a5f71
DJ
130012006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13002
13003 * server.c (handle_query): Handle qSupported.
13004
ea025f5f
DJ
130052006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13006
13007 * remote-utils.c (all_symbols_looked_up): New variable.
13008 (look_up_one_symbol): Check it.
13009 * server.h (look_up_one_symbol): New declaration.
13010 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13011
9308fc88
DJ
130122006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13013
13014 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13015 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13016 (PTRACE_GET_THREAD_AREA): Define.
13017 (ps_get_thread_area): New function.
13018
52fb6437
NS
130192006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13020
13021 * configure.srv (m68k*-*-uclinux*): New target.
13022 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13023 (linux_resume_one_process): Remove extraneous cast.
13024 (linux_read_offsets): New.
13025 (linux_target_op): Add linux_read_offsets on mmuless systems.
13026 * server.c (handle_query): Add qOffsets logic.
13027 * target.h (struct target_ops): Add read_offsets.
13028
21b0f40c
DJ
130292006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13030
13031 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13032 (PTRACE_GET_THREAD_AREA): Define.
13033 (ps_get_thread_area): New function.
13034 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13035 (linux-x86-64-low.o): Update.
13036
0050a760
DJ
130372006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13038
13039 * configure.ac: Remove checks for prfpregset_t.
13040 * gdb_proc_service.h: New file.
13041 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13042 new "gdb_proc_service.h".
13043 * proc-service.c: Likewise.
13044 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13045 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13046 * Makefile.in (gdb_proc_service_h): Updated.
13047 * configure, config.in: Regenerated.
13048
b92a518e
DJ
130492006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13050
13051 * remote-utils.c (prepare_resume_reply): Move declaration
13052 of gdb_id_from_wait to the top of the block.
13053
545587ee
DJ
130542006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13055
13056 * linux-low.c (regsets_store_inferior_registers): Read the regset
13057 from the target before filling it.
13058
9db87ebd
DJ
130592006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13060
13061 * server.c (attach_inferior): Return SIGTRAP for a successful
13062 attach.
13063
dd24457d
DJ
130642006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13065
13066 * Makefile.in (OBS): Add version.o.
13067 (STAGESTUFF): Delete.
13068 (version.o): Add dependencies.
13069 (version.c): Replace rule.
13070 (clean): Remove version.c.
13071 * server.c (gdbserver_version): New.
13072 (gdbserver_usage): Use printf.
13073 (main): Handle --version and --help.
13074 * server.h (version, host_name): Add declarations.
13075
6f0f660e
EZ
130762005-12-23 Eli Zaretskii <eliz@gnu.org>
13077
889bf7c5
PA
13078 * linux-arm-low.c:
13079 * linux-arm-low.c:
13080 * inferiors.c:
13081 * i387-fp.h:
13082 * i387-fp.c:
13083 * gdbreplay.c:
13084 * regcache.c:
13085 * proc-service.c:
13086 * mem-break.h:
13087 * mem-break.c:
13088 * linux-x86-64-low.c:
13089 * linux-sh-low.c:
13090 * linux-s390-low.c:
13091 * linux-ppc64-low.c:
13092 * linux-ppc-low.c:
13093 * linux-mips-low.c:
13094 * linux-m68k-low.c:
13095 * linux-m32r-low.c:
13096 * linux-low.h:
13097 * linux-low.c:
13098 * linux-ia64-low.c:
13099 * linux-i386-low.c:
13100 * linux-crisv32-low.c:
13101 * thread-db.c:
13102 * terminal.h:
13103 * target.h:
13104 * target.c:
13105 * server.h:
13106 * server.c:
13107 * remote-utils.c:
13108 * regcache.h:
13109 * utils.c:
13110 * Makefile.in:
13111 * configure.ac:
6f0f660e
EZ
13112 * gdbserver.1: Add (C) after Copyright. Update the FSF
13113 address.
13114
9d1fb177
DJ
131152005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13116
13117 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13118 (arm_breakpoint_at): Recognize both breakpoints.
13119 (the_low_target): Use the correct breakpoint instruction.
13120
011a70c2
DJ
131212005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13122
13123 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13124 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13125 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13126 (the_low_target): Update.
13127
7fb85e41
AS
131282005-10-25 Andreas Schwab <schwab@suse.de>
13129
13130 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13131
13132 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13133 (ia64_num_regs): Reduce to 462.
13134
3db0444b
DJ
131352005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13136
13137 * acinclude.m4: Correct quoting.
13138 * aclocal.m4: Regenerated.
13139
13140 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13141 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13142 (thread_db_init): Call thread_db_err_str.
13143 * configure.ac: Check for TD_VERSION.
13144 * config.in, configure: Regenerated.
13145
bee0189a
DJ
131462005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13147
13148 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13149
e9d25b98
DJ
131502005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13151
13152 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13153 is not available. Define HAVE_PTRACE_GETREGS if it is.
13154 * config.in, configure: Regenerated.
13155 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13156 * linux-i386-low.c, linux-m68k-low.c: Update to use
13157 HAVE_PTRACE_GETREGS.
13158 * linux-low.c (regsets_fetch_inferior_registers)
13159 (regsets_store_inferior_registers): Only return 0 if we processed
13160 GENERAL_REGS.
13161 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13162 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13163
a06660f7
DJ
131642005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13165
13166 * inferiors.c (struct thread_info): Add gdb_id.
13167 (add_thread): Add gdb_id argument.
13168 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13169 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13170 calls to add_thread.
13171 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13172 * server.c (handle_query): Use thread_to_gdb_id.
13173 (handle_v_cont, main): Use gdb_id_to_thread_id.
13174 * server.h (add_thread): Update prototype.
13175 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13176 prototypes.
13177
5a1f5858
DJ
131782005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13179
13180 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13181 left-padded registers.
13182 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13183 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13184
e122f1f5
SE
131852005-07-01 Steve Ellcey <sje@cup.hp.com>
13186
13187 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13188 * configure: Regenerate.
13189 * config.in: Regenerate.
13190 * server.h (NEED_DECLARATION_STRERROR):
13191 Replace with !HAVE_DECL_STRERROR.
13192
d592fa2f
DJ
131932005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13194
13195 * linux-low.c (linux_wait, linux_send_signal): Don't test
13196 an unsigned long variable for > 0 if it could be MAX_ULONG.
13197 * server.c (myresume): Likewise.
13198 * target.c (set_desired_inferior): Likewise.
13199
ccbd4912
MK
132002005-06-13 Mark Kettenis <kettenis@gnu.org>
13201
13202 * configure.ac: Simplify and improve check for socklen_t.
13203 * configure, config.in: Regenerate.
13204
f450004a
DJ
132052005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13206
13207 * acconfig.h: Remove.
13208 * configure.ac: Add a test for socklen_t. Use three-argument
13209 AC_DEFINE throughout.
13210 * config.in: Regenerated using autoheader 2.59.
13211 * configure: Regenerated.
13212
13213 * gdbreplay.c (socklen_t): Provide a default.
13214 (remote_open): Use socklen_t.
13215 * remote-utils.c (socklen_t): Provide a default.
13216 (remote_open): Use socklen_t.
13217 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13218 unsigned char.
13219
13220 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13221 char for buffers.
13222 * linux-low.c (linux_read_memory, linux_write_memory)
13223 (linux_read_auxv): Likewise.
13224 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13225 (check_mem_write): Likewise.
13226 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13227 Likewise.
13228 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13229 (registers_from_string, register_data): Likewise.
13230 * server.c (handle_query, main): Likewise.
13231 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13232 (decode_M_packet): Likewise.
13233 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13234 * target.h (struct target_ops): Update read_memory, write_memory,
13235 and read_auxv.
13236 (read_inferior_memory, write_inferior_memory): Update.
13237 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13238 to unsigned char *.
13239 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13240 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13241 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13242 linux-s390-low.c, linux-sh-low.c: Update for changes in
13243 read_inferior_memory and the_low_target->breakpoint.
13244
eee84df1
DJ
132452005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13246
13247 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13248 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13249 * configure.srv: Add powerpc64-*-linux*.
13250 * linux-ppc64-low.c: New file.
13251
45b134e5
OF
132522005-05-23 Orjan Friberg <orjanf@axis.com>
13253
13254 * linux-cris-low.c: New file with support for CRIS.
13255 * linux-crisv32-low.c: Ditto for CRISv32.
13256 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13257 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13258 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13259 reg-crisv32.o, and reg-crisv32.c to make rules.
13260 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13261 recognized targets.
13262
48d93c75
UW
132632005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13264
13265 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13266 of sizeof (PTRACE_XFER_TYPE).
13267 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13268
e013ee27
OF
132692005-05-12 Orjan Friberg <orjanf@axis.com>
13270
889bf7c5 13271 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13272 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13273 pointers for hardware watchpoint support.
13274 * linux-low.h (struct linux_target_ops): Ditto.
13275 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13276 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13277 to linux_target_ops.
13278 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13279 reply packet.
13280 * server.c (main): Recognize 'Z' and 'z' packets.
13281
b0ded00b
UW
132822005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13283
13284 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13285 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13286 (the_low_target): Add new members.
13287
8643e2ad
DJ
132882005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13289
13290 * proc-service.c (ps_lgetregs): Search all_processes instead of
13291 all_threads.
13292
fc620387
DJ
132932005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13294
13295 * server.c (start_inferior): Change return type to int.
13296 (attach_inferior): Change sigptr to int *.
13297 (handle_v_cont, handle_v_requests): Change signal to int *.
13298 (main): Change signal to int.
13299
133002005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13301
13302 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13303 * configure.srv: Add m32r*-*-linux*.
13304 * linux-m32r-low.c: New file.
13305
e0e76420
DJ
133062005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13307
13308 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13309
a1928bad
DJ
133102005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13311
13312 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13313 Take unsigned long arguments for PIDs.
13314 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13315 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13316 (wait_for_sigstop, linux_resume_one_process)
13317 (regsets_fetch_inferior_registers, linux_send_signal)
13318 (linux_read_auxv): Likewise. Update the types of variables holding
13319 PIDs. Update format string specifiers.
13320 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13321 * remote-utils.c (prepare_resume_reply): Likewise.
13322 * server.c (cont_thread, general_thread, step_thread)
13323 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13324 unsigned long.
13325 (handle_query): Update format specifiers.
13326 (handle_v_cont, main): Use strtoul for thread IDs.
13327 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13328 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13329 (general_thread, step_thread, thread_from_wait)
13330 (old_thread_from_wait): Update.
13331 * target.h (struct thread_resume): Use unsigned long for THREAD.
13332 (struct target_ops): Use unsigned long for arguments to attach and
13333 thread_alive.
13334
dcdb98d2
DJ
133352005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13336
13337 * acinclude.m4: Include bfd/bfd.m4 directly.
13338 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13339 <agriffis@toolchain.org>.
13340 * aclocal.m4, configure: Regenerated.
13341
bec39cab
AC
133422005-01-07 Andrew Cagney <cagney@gnu.org>
13343
13344 * configure.ac: Rename configure.in, require autoconf 2.59.
13345 * configure: Re-generate.
13346
434c4c77
DJ
133472004-12-08 Daniel Jacobowitz <dan@debian.org>
13348
13349 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13350 LIBS when finished.
13351 * aclocal.m4: Regenerated.
13352 * configure: Regenerated.
13353
db1d3e1b
AS
133542004-11-21 Andreas Schwab <schwab@suse.de>
13355
13356 * linux-m68k-low.c (m68k_num_gregs): Define.
13357 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13358 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13359 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13360 (m68k_breakpoint_at): New. Add to the_low_target.
13361
13362 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13363 srv_linux_thread_db to yes.
13364
43360365
JB
133652004-10-20 Joel Brobecker <brobecker@gnat.com>
13366
13367 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13368 (ARCH_SET_FS): Likewise.
13369 (ARCH_GET_FS): Likewise.
13370 (ARCH_GET_GS): Likewise.
13371
fd500816
DJ
133722004-10-16 Daniel Jacobowitz <dan@debian.org>
13373
13374 * linux-i386-low.c (ps_get_thread_area): New.
13375 * linux-x86-64-low.c (ps_get_thread_area): New.
13376 * linux-low.c: Include <sys/syscall.h>.
13377 (linux_kill_one_process): Don't kill the first thread here.
13378 (linux_kill): Kill the first thread here.
13379 (kill_lwp): New function.
13380 (send_sigstop, linux_send_signal): Use it.
13381 * proc-service.c: Clean up #ifdefs.
13382 (fpregset_info): Delete.
13383 (ps_lgetregs): Update and enable implementation.
13384 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13385 implementations.
13386 * remote-utils.c (struct sym_cache, symbol_cache): New.
13387 (input_interrupt): Print a clearer message.
13388 (async_io_enabled): New variable.
13389 (enable_async_io, disable_async_io): Use it. Update comments.
13390 (look_up_one_symbol): Use the symbol cache.
13391 * thread-db.c (thread_db_look_up_symbols): New function.
13392 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13393
f6de3c42
DJ
133942004-10-16 Daniel Jacobowitz <dan@debian.org>
13395
13396 * configure.in: Test for -rdynamic.
13397 * configure: Regenerated.
13398 * Makefile (INTERNAL_LDFLAGS): New.
13399 (gdbserver, gdbreplay): Use it.
13400
2c0fc042
AC
134012004-09-02 Andrew Cagney <cagney@gnu.org>
13402
13403 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13404
075b3282
DJ
134052004-03-23 Daniel Jacobowitz <drow@mvista.com>
13406
13407 * linux-low.c (linux_wait): Clear all_processes list also.
13408
fa6a77dc
DJ
134092004-03-12 Daniel Jacobowitz <drow@mvista.com>
13410
13411 * linux-low.c: Include <errno.h>. Remove extern declaration of
13412 errno.
13413
6d782a97
DJ
134142004-03-12 Daniel Jacobowitz <drow@mvista.com>
13415
13416 * gdbreplay.c, server.h, utils.c: Update copyright years.
13417
3a7fb99b
DJ
134182004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13419
13420 * server.c (main): Print child status or termination signal from
13421 variable 'signal', not 'sig'.
13422
c3e735a6
DJ
134232004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13424
13425 * linux-low.c (linux_read_memory): Change return type to
13426 int. Check for and return error from ptrace().
13427 * target.c (read_inferior_memory): Change return type to int. Pass
13428 back return status from the_target->read_memory().
13429 * target.h (struct target_ops): Adapt *read_memory() prototype.
13430 Update comment.
13431 (read_inferior_memory): Adapt prototype.
13432 * server.c (main): Return an error packet if
13433 read_inferior_memory() returns an error.
13434
a59d1c82
DJ
134352004-03-04 Daniel Jacobowitz <drow@mvista.com>
13436
13437 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13438 Unify with other clean targets.
13439
dc3f8883
DJ
134402004-02-29 Daniel Jacobowitz <drow@mvista.com>
13441
13442 * server.c (handle_v_cont): Call set_desired_inferior.
13443
89a208da
DJ
134442004-02-29 Daniel Jacobowitz <drow@mvista.com>
13445
13446 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13447
62ea82f5
DJ
134482004-02-29 Daniel Jacobowitz <drow@mvista.com>
13449
13450 * linux-low.c (linux_wait): Unblock async I/O.
13451 (linux_resume): Block and enable async I/O.
13452 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13453 * server.h (block_async_io, unblock_async_io): Add prototypes.
13454
6910d122
DJ
134552004-02-29 Daniel Jacobowitz <drow@mvista.com>
13456
13457 * remote-utils.c (remote_open): Print a status notice after
13458 opening a TCP port.
13459 * server.c (attach_inferior): Print a status notice after
13460 attaching.
13461
134622004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
13463
13464 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13465
c89dc5d4
DJ
134662004-02-26 Daniel Jacobowitz <drow@mvista.com>
13467
13468 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13469 error packet.
13470 * server.c, target.h: Update copyright years.
13471
4b8dad4a
RM
134722004-02-25 Roland McGrath <roland@redhat.com>
13473
13474 * target.h (struct target_ops): New member `read_auxv'.
13475 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13476 * linux-low.c (linux_read_auxv): New function.
13477 (linux_target_ops): Initialize `read_auxv' member to that.
13478
d7446758
JB
134792004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13480
13481 Committed by Jim Blandy <jimb@redhat.com>.
13482
13483 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 13484 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
13485 instead of GPR_SIZE to distiguish s390 and s390x targets.
13486
5544ad89
DJ
134872004-01-31 Daniel Jacobowitz <drow@mvista.com>
13488
13489 * linux-low.c: Update copyright year.
13490 (check_removed_breakpoint): Clear pending_is_breakpoint.
13491 (linux_set_resume_request, linux_queue_one_thread)
13492 (resume_status_pending_p): New functions.
13493 (linux_continue_one_thread): Use process->resume.
13494 (linux_resume): Only resume threads if there are no pending events.
13495 * linux-low.h (struct process_info): Add resume request
13496 pointer.
13497
2a68b70e
DJ
134982004-01-30 Daniel Jacobowitz <drow@mvista.com>
13499
13500 * regcache.c (new_register_cache): Clear the allocated register
13501 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13502
64386c31
DJ
135032003-10-13 Daniel Jacobowitz <drow@mvista.com>
13504
13505 * linux-low.c (linux_resume): Take a struct thread_resume *
13506 argument.
13507 (linux_wait): Update call.
13508 (resume_ptr): New static variable.
13509 (linux_continue_one_thread): Renamed from
13510 linux_continue_one_process. Use resume_ptr.
13511 (linux_resume): Use linux_continue_one_thread.
13512 * server.c (handle_v_cont, handle_v_requests): New functions.
13513 (myresume): New function.
13514 (main): Handle 'v' case.
13515 * target.h (struct thread_resume): New type.
13516 (struct target_ops): Change argument of "resume" to struct
13517 thread_resume *.
13518 (myresume): Delete macro.
13519
c938e9b0
L
135202003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13521
13522 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13523 (uninstall): Support DESTDIR.
13524
7f313d07
BC
13525Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13526
13527 * configure.srv: Add xscale*linux copy of arm*linux entry.
13528
3b2fc2ea
DJ
135292003-07-24 Daniel Jacobowitz <drow@mvista.com>
13530
13531 * linux-arm-low.c (arm_reinsert_addr): New function.
13532 (the_low_target): Add arm_reinsert_addr.
13533
1c0a559e
MK
135342003-07-08 Mark Kettenis <kettenis@gnu.org>
13535
13536 * mem-break.c: Remove whitespace at end of file.
13537
43d5792c
DJ
135382003-06-28 Daniel Jacobowitz <drow@mvista.com>
13539
13540 * configure.in: Check whether we need to prototype strerror.
13541 * server.h: Optionally prototype strerror.
13542 * gdbreplay.c (perror_with_name): Use strerror.
13543 * linux-low.c (linux_attach_lwp): Use strerror.
13544 * utils.c (perror_with_name): Use strerror.
13545 * config.in, configure: Regenerated.
13546
c8a86edf
DJ
135472003-06-28 Daniel Jacobowitz <drow@mvista.com>
13548
13549 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13550 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13551
73d37363
DJ
135522003-06-20 Daniel Jacobowitz <drow@mvista.com>
13553
13554 * Makefile.in (SFILES): Update.
13555 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13556 low-sun3.c: Remove files.
13557
6ad8ae5c
DJ
135582003-06-17 Daniel Jacobowitz <drow@mvista.com>
13559
13560 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13561 (linux_detach_one_process, linux_detach): New functions.
13562 (linux_target_ops): Add linux_detach.
13563 * server.c (main): Handle 'D' packet.
13564 * target.h (struct target_ops): Add "detach" member.
13565 (detach_inferior): Define.
13566
1581182a
MK
135672003-06-13 Mark Kettenis <kettenis@gnu.org>
13568
13569 From Kelley Cook <kelleycook@wideopenwest.com>:
13570 * configure.srv: Accept i[34567]86 variants.
13571
e5379b03
DJ
135722003-06-05 Daniel Jacobowitz <drow@mvista.com>
13573
13574 * linux-low.c (linux_wait_for_event): Correct comment typos.
13575 (linux_resume_one_process): Call check_removed_breakpoint.
13576 (linux_send_signal): New function.
13577 (linux_target_ops): Add linux_send_signal.
13578 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13579 of kill.
13580 * target.h (struct target_ops): Add send_signal.
13581
2ff29de4
JB
135822003-05-29 Jim Blandy <jimb@redhat.com>
13583
13584 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13585 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13586 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13587 away part of the register's value.
13588
254787d4
DJ
135892003-03-26 Daniel Jacobowitz <drow@mvista.com>
13590
13591 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13592 (linux_wait_for_event, linux_init_signals): Likewise.
13593
94e10508
DJ
135942003-03-17 Daniel Jacobowitz <drow@mvista.com>
13595
13596 * configure.in: Check for stdlib.h.
13597 * configure: Regenerated.
13598 * config.in: Regenerated.
13599
4c0711e0
DJ
136002003-01-04 Andreas Schwab <schwab@suse.de>
13601
13602 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13603
ef66e766
AC
136042003-01-02 Andrew Cagney <ac131313@redhat.com>
13605
13606 * Makefile.in: Remove obsolete code.
13607
a1358604
DJ
136082002-11-20 Daniel Jacobowitz <drow@mvista.com>
13609
13610 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13611 defined(PT_FPR0_HI).
13612
23ce3b1c
DJ
136132002-11-17 Stuart Hughes <seh@zee2.com>
13614
13615 * linux-arm-low.c (arm_num_regs): Increase.
13616 (arm_regmap): Include status register.
13617
136182002-11-17 Daniel Jacobowitz <drow@mvista.com>
13619
13620 * linux-low.c (register_addr): Remove incorrect -1 check.
13621
a9fa9f7d
DJ
136222002-08-29 Daniel Jacobowitz <drow@mvista.com>
13623
13624 * linux-low.c (linux_create_inferior): Call setpgid. Return
13625 the new PID.
13626 (unstopped_p, linux_signal_pid): Remove.
13627 (linux_target_ops): Remove linux_signal_pid.
13628 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13629 global instead of target method.
13630 * target.h (struct target_ops): Remove signal_pid. Update comment
13631 for create_inferior.
13632 * server.c (signal_pid): New variable.
13633 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 13634 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
13635 (attach_inferior): Set signal_pid.
13636
17574093
DJ
136372002-08-23 Daniel Jacobowitz <drow@mvista.com>
13638
13639 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13640
136412002-08-20 Jim Blandy <jimb@redhat.com>
13642
13643 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13644 default for this.
13645
136462002-08-01 Andrew Cagney <cagney@redhat.com>
13647
13648 * Makefile.in: Make chill references obsolete.
13649
136502002-07-24 Kevin Buettner <kevinb@redhat.com>
13651
13652 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13653 * configure: Regenerate.
13654 * config.in: Regenerate.
13655
136562002-07-09 David O'Brien <obrien@FreeBSD.org>
13657
13658 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13659 (perror_with_name, remote_close, remote_open, expect, play): Static.
13660
136612002-07-04 Michal Ludvig <mludvig@suse.cz>
13662
4b8dad4a 13663 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
13664 byte offsets instead of an array of indexes.
13665 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13666
136672002-06-13 Daniel Jacobowitz <drow@mvista.com>
13668
13669 * regcache.c: Add comment.
13670
136712002-06-11 Daniel Jacobowitz <drow@mvista.com>
13672
13673 * thread-db.c: New file.
13674 * proc-service.c: New file.
13675 * acinclude.m4: New file.
13676 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13677 proc-service.o, and thread-db.o.
13678 (linux-low.o): Add USE_THREAD_DB.
13679 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13680 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13681 * aclocal.m4: Regenerated.
13682 * config.in: Regenerated.
13683 * configure: Regenerated.
13684 * configure.in: Check for proc_service.h, sys/procfs.h,
13685 thread_db.h, and linux/elf.h headrs.
13686 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13687 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13688 Check for -lthread_db and thread support.
13689 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13690 PowerPC, and SuperH.
13691 * i387-fp.c: Constify arguments.
13692 * i387-fp.h: Likewise.
13693 * inferiors.c: (struct thread_info): Renamed from
13694 `struct inferior_info'. Remove PID member. Use generic inferior
13695 list header. All uses updated.
13696 (inferiors, signal_pid): Removed.
13697 (all_threads): New variable.
13698 (get_thread): Define.
13699 (add_inferior_to_list): New function.
13700 (for_each_inferior): New function.
13701 (change_inferior_id): New function.
13702 (add_inferior): Removed.
13703 (remove_inferior): New function.
13704 (add_thread): New function.
13705 (free_one_thread): New function.
13706 (remove_thread): New function.
13707 (clear_inferiors): Use for_each_inferior and free_one_thread.
13708 (find_inferior): New function.
13709 (find_inferior_id): New function.
13710 (inferior_target_data): Update argument type.
13711 (set_inferior_target_data): Likewise.
13712 (inferior_regcache_data): Likewise.
13713 (set_inferior_regcache_data): Likewise.
13714 * linux-low.c (linux_bp_reinsert): Remove.
13715 (all_processes, stopping_threads, using_thrads)
13716 (struct pending_signals, debug_threads, pid_of): New.
13717 (inferior_pid): Replace with macro.
13718 (struct inferior_linux_data): Remove.
13719 (get_stop_pc, add_process): New functions.
13720 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13721 Use add_process and add_thread.
13722 (linux_attach_lwp): New function, based on old linux_attach. Use
13723 add_process and add_thread. Set stop_expected for new threads.
13724 (linux_attach): New function.
13725 (linux_kill_one_process): New function.
13726 (linux_kill): Kill all LWPs.
13727 (linux_thread_alive): Use find_inferior_id.
13728 (check_removed_breakpoints, status_pending_p): New functions.
13729 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13730 Update. Use WNOHANG. Wait for cloned processes also. Update process
13731 struct for the found process.
13732 (linux_wait_for_event): New function.
13733 (linux_wait): Use it. Support LWPs.
13734 (send_sigstop, wait_for_sigstop, stop_all_processes)
13735 (linux_resume_one_process, linux_continue_one_process): New functions.
13736 (linux_resume): Support LWPs.
13737 (REGISTER_RAW_SIZE): Remove.
13738 (fetch_register): Use register_size instead. Call supply_register.
13739 (usr_store_inferior_registers): Likewise. Call collect_register.
13740 Fix recursive case.
13741 (regsets_fetch_inferior_registers): Improve error message.
13742 (regsets_store_inferior_registers): Add debugging.
13743 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13744 (unstopped_p, linux_signal_pid): New functions.
13745 (linux_target_ops): Add linux_signal_pid.
13746 (linux_init_signals): New function.
13747 (initialize_low): Call it. Initialize using_threads.
13748 * regcache.c (inferior_regcache_data): Add valid
13749 flag.
13750 (get_regcache): Fetch registers lazily. Add fetch argument
13751 and update all callers.
13752 (regcache_invalidate_one, regcache_invalidate): New
13753 functions.
13754 (new_register_cache): Renamed from create_register_cache.
13755 Return the new regcache.
13756 (free_register_cache): Change argument to a void *.
13757 (registers_to_string, registers_from_string): Call get_regcache
13758 with fetch flag set.
13759 (register_data): Make static. Pass fetch flag to get_regcache.
13760 (supply_register): Call get_regcache with fetch flag clear.
13761 (collect_register): Call get_regcache with fetch flag set.
13762 (collect_register_as_string): New function.
13763 * regcache.h: Update.
13764 * remote-utils.c (putpkt): Flush after debug output and use
13765 stderr.
13766 Handle input interrupts while waiting for an ACK.
13767 (input_interrupt): Use signal_pid method.
13768 (getpkt): Flush after debug output and use stderr.
13769 (outreg): Use collect_register_as_string.
13770 (new_thread_notify, dead_thread_notify): New functions.
13771 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13772 and general_thread.
13773 (look_up_one_symbol): Flush after debug output.
13774 * server.c (step_thread, server_waiting): New variables.
13775 (start_inferior): Don't use signal_pid. Update call to mywait.
13776 (attach_inferior): Update call to mywait.
13777 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13778 (main): Don't fetch/store registers explicitly. Use
13779 set_desired_inferior. Support proposed ``Hs'' packet. Update
13780 calls to mywait.
13781 * server.h: Update.
13782 (struct inferior_list, struct_inferior_list_entry): New.
13783 * target.c (set_desired_inferior): New.
13784 (write_inferior_memory): Constify.
13785 (mywait): New function.
13786 * target.h: Update.
13787 (struct target_ops): New signal_pid method.
13788 (mywait): Removed macro, added prototype.
13789
13790 * linux-low.h (regset_func): Removed.
13791 (regset_fill_func, regset_store_func): New.
13792 (enum regset_type): New.
13793 (struct regset_info): Add type field. Use new operation types.
13794 (struct linux_target_ops): stop_pc renamed to get_pc.
13795 Add decr_pc_after_break and breakpoint_at.
13796 (get_process, get_thread_proess, get_process_thread)
13797 (strut process_info, all_processes, linux_attach_lwp)
13798 (thread_db_init): New.
13799
13800 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13801 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13802 (the_low_target): Add new members.
13803 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13804 (i386_store_fpxregset): Constify.
13805 (target_regsets): Add new kind identifier.
13806 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13807 (i386_set_pc): Add debugging.
13808 (i386_breakpoint_at): New function.
13809 (the_low_target): Add new members.
13810 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13811 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13812 (mips_breakpoint_at): New.
13813 (the_low_target): Add new members.
13814 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13815 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13816 (the_low_target): Add new members.
13817 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13818 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13819 (the_low_target): Add new members.
13820 * linux-x86-64-low.c (target_regsets): Add new kind
13821 identifier.
13822
138232002-05-15 Daniel Jacobowitz <drow@mvista.com>
13824
13825 From Martin Pool <mbp@samba.org>:
13826 * server.c (gdbserver_usage): New function.
13827 (main): Call it.
13828
138292002-05-14 Daniel Jacobowitz <drow@mvista.com>
13830
13831 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13832 stop_at -> stop_pc.
13833
138342002-05-04 Andrew Cagney <ac131313@redhat.com>
13835
13836 * Makefile.in: Remove obsolete code.
13837
138382002-04-24 Michal Ludvig <mludvig@suse.cz>
13839
13840 * linux-low.c (regsets_fetch_inferior_registers),
13841 (regsets_store_inferior_registers): Removed cast to int from
13842 ptrace() calls.
13843 * regcache.h: Added declaration of struct inferior_info.
13844
138452002-04-20 Daniel Jacobowitz <drow@mvista.com>
13846
13847 * inferiors.c (struct inferior_info): Add regcache_data.
13848 (add_inferior): Call create_register_cache.
13849 (clear_inferiors): Call free_register_cache.
13850 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13851 * regcache.c (struct inferior_regcache_data): New.
13852 (registers): Remove.
13853 (get_regcache): New function.
13854 (create_register_cache, free_register_cache): New functions.
13855 (set_register_cache): Don't initialize the register cache here.
13856 (registers_to_string, registers_from_string, register_data): Call
13857 get_regcache.
13858 * regcache.h: Add prototypes.
13859 * server.h: Likewise.
13860
138612002-04-20 Daniel Jacobowitz <drow@mvista.com>
13862
13863 * mem-break.c: New file.
13864 * mem-break.h: New file.
13865 * Makefile.in: Add mem-break.o rule; update server.h
13866 dependencies.
13867 * inferiors.c (struct inferior_info): Add target_data
13868 member.
13869 (clear_inferiors): Free target_data member if set.
13870 (inferior_target_data, set_inferior_target_data): New functions.
13871 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13872 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13873 * linux-low.c (linux_bp_reinsert): New variable.
13874 (struct inferior_linux_data): New.
13875 (linux_create_inferior): Use set_inferior_target_data.
13876 (linux_attach): Likewise. Call add_inferior.
13877 (linux_wait_for_one_inferior): New function.
13878 (linux_wait): Call it.
13879 (linux_write_memory): Add const.
13880 (initialize_low): Call set_breakpoint_data.
13881 * linux-low.h (struct linux_target_ops): Add breakpoint
13882 handling members.
13883 * server.c (attach_inferior): Remove extra add_inferior
13884 call.
13885 * server.h: Include mem-break.h. Update inferior.c
13886 prototypes.
13887 * target.c (read_inferior_memory)
13888 (write_inferior_memory): New functions.
13889 * target.h (read_inferior_memory)
13890 (write_inferior_memory): Change macros to prototypes.
13891 (struct target_ops): Update comments. Add const to write_memory
13892 definition.
13893
138942002-04-11 Daniel Jacobowitz <drow@mvista.com>
13895
13896 * linux-low.c (usr_store_inferior_registers): Support
13897 registers which are allowed to fail to store.
13898 * linux-low.h (linux_target_ops): Likewise.
13899 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13900 (ppc_cannot_store_register): FPSCR may not be storable.
13901
139022002-04-09 Daniel Jacobowitz <drow@mvista.com>
13903
13904 * server.h: Include <string.h> if HAVE_STRING_H.
13905 * ChangeLog: Correct paths in last ChangeLog entry.
13906
139072002-04-09 Daniel Jacobowitz <drow@mvista.com>
13908
13909 * linux-low.h: Remove obsolete prototypes.
13910 (struct linux_target_ops): New.
13911 (extern the_low_target): New.
13912 * linux-low.c (num_regs, regmap): Remove declarations.
13913 (register_addr): Use the_low_target explicitly.
13914 (fetch_register): Likewise.
13915 (usr_fetch_inferior_registers): Likewise.
13916 (usr_store_inferior_registers): Likewise.
13917 * linux-arm-low.c (num_regs): Remove.
13918 (arm_num_regs): Define.
13919 (arm_regmap): Renamed from regmap, made static.
13920 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13921 made static.
13922 (arm_cannot_store_register): Renamed from cannot_store_register,
13923 made static.
13924 (the_low_target): New.
13925 * linux-i386-low.c (num_regs): Remove.
13926 (i386_num_regs): Define.
13927 (i386_regmap): Renamed from regmap, made static.
13928 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13929 made static.
13930 (i386_cannot_store_register): Renamed from cannot_store_register,
13931 made static.
13932 (the_low_target): New.
13933 * linux-ia64-low.c (num_regs): Remove.
13934 (ia64_num_regs): Define.
13935 (ia64_regmap): Renamed from regmap, made static.
13936 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13937 made static.
13938 (ia64_cannot_store_register): Renamed from cannot_store_register,
13939 made static.
13940 (the_low_target): New.
13941 * linux-m68k-low.c (num_regs): Remove.
13942 (m68k_num_regs): Define.
13943 (m68k_regmap): Renamed from regmap, made static.
13944 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13945 made static.
13946 (m68k_cannot_store_register): Renamed from cannot_store_register,
13947 made static.
13948 (the_low_target): New.
13949 * linux-mips-low.c (num_regs): Remove.
13950 (mips_num_regs): Define.
13951 (mips_regmap): Renamed from regmap, made static.
13952 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13953 made static.
13954 (mips_cannot_store_register): Renamed from cannot_store_register,
13955 made static.
13956 (the_low_target): New.
13957 * linux-ppc-low.c (num_regs): Remove.
13958 (ppc_num_regs): Define.
13959 (ppc_regmap): Renamed from regmap, made static.
13960 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13961 made static.
13962 (ppc_cannot_store_register): Renamed from cannot_store_register,
13963 made static.
13964 (the_low_target): New.
13965 * linux-s390-low.c (num_regs): Remove.
13966 (s390_num_regs): Define.
13967 (s390_regmap): Renamed from regmap, made static.
13968 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13969 made static.
13970 (s390_cannot_store_register): Renamed from cannot_store_register,
13971 made static.
13972 (the_low_target): New.
13973 * linux-sh-low.c (num_regs): Remove.
13974 (sh_num_regs): Define.
13975 (sh_regmap): Renamed from regmap, made static.
13976 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13977 made static.
13978 (sh_cannot_store_register): Renamed from cannot_store_register,
13979 made static.
13980 (the_low_target): New.
13981 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13982 (the_low_target): New.
13983
139842002-04-09 Daniel Jacobowitz <drow@mvista.com>
13985
13986 * Makefile.in: Add stamp-h target.
13987 * configure.in: Create stamp-h.
13988 * configure: Regenerated.
13989
139902002-04-09 Daniel Jacobowitz <drow@mvista.com>
13991
13992 * inferiors.c: New file.
13993 * target.c: New file.
13994 * target.h: New file.
13995 * Makefile.in: Add target.o and inferiors.o. Update
13996 dependencies.
13997 * linux-low.c (inferior_pid): New static variable,
13998 moved from server.c.
13999 (linux_create_inferior): Renamed from create_inferior.
14000 Call add_inferior. Return 0 on success instead of a PID.
14001 (linux_attach): Renamed from myattach.
14002 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14003 (linux_thread_alive): Renamed from mythread_alive.
14004 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14005 child dies.
14006 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14007 (regsets_store_inferior_registers): Correct error message.
14008 Add missing ``return 0''.
14009 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14010 (linux_store_registers): Renamed from store_inferior_registers.
14011 (linux_read_memory): Renamed from read_inferior_memory.
14012 (linux_write_memory): Renamed from write_inferior_memory.
14013 (linux_target_ops): New structure.
14014 (initialize_low): Call set_target_ops ().
14015 * remote-utils.c (unhexify): New function.
14016 (hexify): New function.
14017 (input_interrupt): Send signals to ``signal_pid''.
14018 * server.c (inferior_pid): Remove.
14019 (start_inferior): Update create_inferior call.
14020 (attach_inferior): Call add_inferior.
14021 (handle_query): New function.
14022 (main): Call handle_query for `q' packets.
14023 * server.h: Include "target.h". Remove obsolete prototypes.
14024 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14025
140262002-04-09 Daniel Jacobowitz <drow@mvista.com>
14027
14028 * Makefile.in: Add WARN_CFLAGS. Update configury
14029 dependencies.
14030 * configure.in: Check for <string.h>
14031 * configure: Regenerate.
14032 * config.in: Regenerate.
14033 * gdbreplay.c: Include needed system headers.
14034 (remote_open): Remove strchr prototype.
14035 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14036 * regcache.c (supply_register): Change buf argument to const void *.
14037 (supply_register_by_name): Likewise.
14038 (collect_register): Change buf argument to void *.
14039 (collect_register_by_name): Likewise.
14040 * regcache.h: Add missing prototypes.
14041 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14042 * server.c (handle_query): New function.
14043 (attached): New static variable, moved out of main.
14044 (main): Quiet longjmp clobber warnings.
14045 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14046 * utils.c (error): Remove NORETURN.
14047 (fatal): Likewise.
This page took 1.888819 seconds and 4 git commands to generate.