]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Add missing sentinel 'char *' casts in concat/reconcat calls
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
a2358508
PA
12016-04-20 Pedro Alves <palves@redhat.com>
2
3 * configure: Renegerate.
4
6885166d
YQ
52016-04-20 Yao Qi <yao.qi@linaro.org>
6
7 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
9 number 16.
10 (arm_store_gregset): Likewise.
11
2b863f51
WT
122016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
13
14 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
15 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
16 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
17 (amd64-avx-mpx-linux.c): New rules.
18 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
19 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
20 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
21 (srv_amd64_regobj): Add amd64-avx-mpx.o.
22 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
23 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
24 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
25 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
26 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
27 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
28 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
29 * linux-x86-low.c (x86_linux_read_description): Add case for
30 X86_XSTATE_AVX_MPX_MASK.
31 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
32 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
33 init_registers_i386_avx_mpx_linux.
34 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
35 (initialize_low_tracepoint): Call
36 init_registers_i386_avx_mpx_linux.
37 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
38 (initialize_low_tracepoint): Call
39 init_registers_amd64_avx_mpx_linux.
40 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
41 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
42 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
43 declarations.
44
9b30624b
PA
452016-04-18 Pedro Alves <palves@redhat.com>
46
47 * configure: Regenerate.
48
45e3745e
AT
492016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
50
51 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
52 (aarch64_emit_sub): Likewise.
53
2afc13ff
PA
542016-04-12 Pedro Alves <palves@redhat.com>
55
56 * utils.c (prepare_to_throw_exception): Delete.
57
6e774b13
SM
582016-04-05 Simon Marchi <simon.marchi@ericsson.com>
59
60 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
61
4dca19f8
MK
622016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
63
64 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
65
d0a9981f
MK
662016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
67
68 * linux-aarch64-ipa.c: Add <elf.h> include.
69 * linux-ppc-ipa.c: Add <elf.h> include.
70 * linux-s390-ipa.c: Add <elf.h> include.
71
252db07e
MK
722016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
73
74 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
75 (get_raw_reg_ptr): Likewise.
76 (get_trace_state_variable_value_ptr): Likewise.
77 (set_trace_state_variable_value_ptr): Likewise.
78 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
79 char *.
80
14e2b6d9
MK
812016-03-31 Wei-cheng Wang <cole945@gmail.com>
82 Marcin Kościelnicki <koriakin@0x04.net>
83
84 PR/17221
85 * linux-ppc-low.c (emit_insns): New function.
86 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
87 (ppc_emit_prologue): New function.
88 (ppc_emit_epilogue): New function.
89 (ppc_emit_add): New function.
90 (ppc_emit_sub): New function.
91 (ppc_emit_mul): New function.
92 (ppc_emit_lsh): New function.
93 (ppc_emit_rsh_signed): New function.
94 (ppc_emit_rsh_unsigned): New function.
95 (ppc_emit_ext): New function.
96 (ppc_emit_zero_ext): New function.
97 (ppc_emit_log_not): New function.
98 (ppc_emit_bit_and): New function.
99 (ppc_emit_bit_or): New function.
100 (ppc_emit_bit_xor): New function.
101 (ppc_emit_bit_not): New function.
102 (ppc_emit_equal): New function.
103 (ppc_emit_less_signed): New function.
104 (ppc_emit_less_unsigned): New function.
105 (ppc_emit_ref): New function.
106 (ppc_emit_const): New function.
107 (ppc_emit_reg): New function.
108 (ppc_emit_pop): New function.
109 (ppc_emit_stack_flush): New function.
110 (ppc_emit_swap): New function.
111 (ppc_emit_stack_adjust): New function.
112 (ppc_emit_call): New function.
113 (ppc_emit_int_call_1): New function.
114 (ppc_emit_void_call_2): New function.
115 (ppc_emit_if_goto): New function.
116 (ppc_emit_goto): New function.
117 (ppc_emit_eq_goto): New function.
118 (ppc_emit_ne_goto): New function.
119 (ppc_emit_lt_goto): New function.
120 (ppc_emit_le_goto): New function.
121 (ppc_emit_gt_goto): New function.
122 (ppc_emit_ge_goto): New function.
123 (ppc_write_goto_address): New function.
124 (ppc_emit_ops_impl): New static variable.
125 (ppc64v1_emit_prologue): New function.
126 (ppc64v2_emit_prologue): New function.
127 (ppc64_emit_epilogue): New function.
128 (ppc64_emit_add): New function.
129 (ppc64_emit_sub): New function.
130 (ppc64_emit_mul): New function.
131 (ppc64_emit_lsh): New function.
132 (ppc64_emit_rsh_signed): New function.
133 (ppc64_emit_rsh_unsigned): New function.
134 (ppc64_emit_ext): New function.
135 (ppc64_emit_zero_ext): New function.
136 (ppc64_emit_log_not): New function.
137 (ppc64_emit_bit_and): New function.
138 (ppc64_emit_bit_or): New function.
139 (ppc64_emit_bit_xor): New function.
140 (ppc64_emit_bit_not): New function.
141 (ppc64_emit_equal): New function.
142 (ppc64_emit_less_signed): New function.
143 (ppc64_emit_less_unsigned): New function.
144 (ppc64_emit_ref): New function.
145 (ppc64_emit_const): New function.
146 (ppc64v1_emit_reg): New function.
147 (ppc64v2_emit_reg): New function.
148 (ppc64_emit_pop): New function.
149 (ppc64_emit_stack_flush): New function.
150 (ppc64_emit_swap): New function.
151 (ppc64v1_emit_call): New function.
152 (ppc64v2_emit_call): New function.
153 (ppc64v1_emit_int_call_1): New function.
154 (ppc64v2_emit_int_call_1): New function.
155 (ppc64v1_emit_void_call_2): New function.
156 (ppc64v2_emit_void_call_2): New function.
157 (ppc64_emit_if_goto): New function.
158 (ppc64_emit_eq_goto): New function.
159 (ppc64_emit_ne_goto): New function.
160 (ppc64_emit_lt_goto): New function.
161 (ppc64_emit_le_goto): New function.
162 (ppc64_emit_gt_goto): New function.
163 (ppc64_emit_ge_goto): New function.
164 (ppc64v1_emit_ops_impl): New static variable.
165 (ppc64v2_emit_ops_impl): New static variable.
166 (ppc_emit_ops): New function.
167 (linux_low_target): Wire in ppc_emit_ops.
168
a2174ba4
MK
1692016-03-31 Wei-cheng Wang <cole945@gmail.com>
170 Marcin Kościelnicki <koriakin@0x04.net>
171
172 PR/17221
173 * Makefile.in: Add powerpc-*-ipa.o
174 * configure.srv: Add ipa_obj for powerpc*-linux.
175 * linux-ppc-ipa.c: New file.
176 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
177 includes.
178 (PPC_FIELD): New macro.
179 (PPC_SEXT): New macro.
180 (PPC_OP6): New macro.
181 (PPC_BO): New macro.
182 (PPC_LI): New macro.
183 (PPC_BD): New macro.
184 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
185 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
186 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
187 (ppc_get_thread_area): New function.
188 (is_elfv2_inferior): New function.
189 (gen_ds_form): New function.
190 (GEN_STD): New macro.
191 (GEN_STDU): New macro.
192 (GEN_LD): New macro.
193 (GEN_LDU): New macro.
194 (gen_d_form): New function.
195 (GEN_ADDI): New macro.
196 (GEN_ADDIS): New macro.
197 (GEN_LI): New macro.
198 (GEN_LIS): New macro.
199 (GEN_ORI): New macro.
200 (GEN_ORIS): New macro.
201 (GEN_LWZ): New macro.
202 (GEN_STW): New macro.
203 (GEN_STWU): New macro.
204 (gen_xfx_form): New function.
205 (GEN_MFSPR): New macro.
206 (GEN_MTSPR): New macro.
207 (GEN_MFCR): New macro.
208 (GEN_MTCR): New macro.
209 (GEN_SYNC): New macro.
210 (GEN_LWSYNC): New macro.
211 (gen_x_form): New function.
212 (GEN_OR): New macro.
213 (GEN_MR): New macro.
214 (GEN_LWARX): New macro.
215 (GEN_STWCX): New macro.
216 (GEN_CMPW): New macro.
217 (gen_md_form): New function.
218 (GEN_RLDICL): New macro.
219 (GEN_RLDICR): New macro.
220 (gen_i_form): New function.
221 (GEN_B): New macro.
222 (GEN_BL): New macro.
223 (gen_b_form): New function.
224 (GEN_BNE): New macro.
225 (GEN_LOAD): New macro.
226 (GEN_STORE): New macro.
227 (gen_limm): New function.
228 (gen_atomic_xchg): New function.
229 (gen_call): New function.
230 (ppc_relocate_instruction): New function.
231 (ppc_install_fast_tracepoint_jump_pad): New function.
232 (ppc_get_min_fast_tracepoint_insn_len): New function.
233 (ppc_get_ipa_tdesc_idx): New function.
234 (the_low_target): Wire in the new functions.
235 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
236 tdescs.
237 * linux-ppc-tdesc.h: New file.
238
a13c4696
MK
2392016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
240
241 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
242 (alloc_jump_pad_buffer): New function.
243 * linux-amd64-ipa.c: Add <sys/mman.h> include.
244 (alloc_jump_pad_buffer): New function.
245 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
246 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
247 (alloc_jump_pad_buffer): New function.
248 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
249 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
250 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
251 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
252
1cda1512
MK
2532016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
254
255 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
256 * linux-amd64-ipa.c: Likewise.
257 * linux-i386-ipa.c: Likewise.
258 * linux-s390-ipa.c: Likewise.
259 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
260 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
261 set_trace_state_variable_value_ptr.
262 (struct ipa_sym_addresses): Likewise.
263 (symbol_list): Likewise.
264 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
265 accessing gdb_collect directly.
266 (gdb_collect_ptr_type): New typedef.
267 (get_raw_reg_ptr_type): New typedef.
268 (get_trace_state_variable_value_ptr_type): New typedef.
269 (set_trace_state_variable_value_ptr_type): New typedef.
270 (gdb_collect_ptr): New global.
271 (get_raw_reg_ptr): New global.
272 (get_trace_state_variable_value_ptr): New global.
273 (set_trace_state_variable_value_ptr): New global.
274 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
275 accessing get_raw_reg directly.
276 (get_get_tsv_func_addr): Likewise for
277 get_trace_state_variable_value_ptr.
278 (get_set_tsv_func_addr): Likewise for
279 set_trace_state_variable_value_ptr.
280 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
281
72fb5488
SM
2822016-03-30 Simon Marchi <simon.marchi@ericsson.com>
283
284 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
285
28170b88
MK
2862016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
287
288 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
289 packets.
290 (relocate_instruction): Remove own_buf.
291 * server.c (own_buf): Make global.
292 (handle_v_requests): Make global.
293 * server.h (own_buf): New declaration.
294 (handle_v_requests): New prototype.
295
f39e8743
MK
2962016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
297
298 PR 18377
299 * linux-s390-low.c (add_insns): New function.
300 (s390_emit_prologue): New function.
301 (s390_emit_epilogue): New function.
302 (s390_emit_add): New function.
303 (s390_emit_sub): New function.
304 (s390_emit_mul): New function.
305 (s390_emit_lsh): New function.
306 (s390_emit_rsh_signed): New function.
307 (s390_emit_rsh_unsigned): New function.
308 (s390_emit_ext): New function.
309 (s390_emit_log_not): New function.
310 (s390_emit_bit_and): New function.
311 (s390_emit_bit_or): New function.
312 (s390_emit_bit_xor): New function.
313 (s390_emit_bit_not): New function.
314 (s390_emit_equal): New function.
315 (s390_emit_less_signed): New function.
316 (s390_emit_less_unsigned): New function.
317 (s390_emit_ref): New function.
318 (s390_emit_if_goto): New function.
319 (s390_emit_goto): New function.
320 (s390_write_goto_address): New function.
321 (s390_emit_litpool): New function.
322 (s390_emit_const): New function.
323 (s390_emit_call): New function.
324 (s390_emit_reg): New function.
325 (s390_emit_pop): New function.
326 (s390_emit_stack_flush): New function.
327 (s390_emit_zero_ext): New function.
328 (s390_emit_swap): New function.
329 (s390_emit_stack_adjust): New function.
330 (s390_emit_set_r2): New function.
331 (s390_emit_int_call_1): New function.
332 (s390_emit_void_call_2): New function.
333 (s390_emit_eq_goto): New function.
334 (s390_emit_ne_goto): New function.
335 (s390_emit_lt_goto): New function.
336 (s390_emit_le_goto): New function.
337 (s390_emit_gt_goto): New function.
338 (s390_emit_ge_goto): New function.
339 (s390x_emit_prologue): New function.
340 (s390x_emit_epilogue): New function.
341 (s390x_emit_add): New function.
342 (s390x_emit_sub): New function.
343 (s390x_emit_mul): New function.
344 (s390x_emit_lsh): New function.
345 (s390x_emit_rsh_signed): New function.
346 (s390x_emit_rsh_unsigned): New function.
347 (s390x_emit_ext): New function.
348 (s390x_emit_log_not): New function.
349 (s390x_emit_bit_and): New function.
350 (s390x_emit_bit_or): New function.
351 (s390x_emit_bit_xor): New function.
352 (s390x_emit_bit_not): New function.
353 (s390x_emit_equal): New function.
354 (s390x_emit_less_signed): New function.
355 (s390x_emit_less_unsigned): New function.
356 (s390x_emit_ref): New function.
357 (s390x_emit_if_goto): New function.
358 (s390x_emit_const): New function.
359 (s390x_emit_call): New function.
360 (s390x_emit_reg): New function.
361 (s390x_emit_pop): New function.
362 (s390x_emit_stack_flush): New function.
363 (s390x_emit_zero_ext): New function.
364 (s390x_emit_swap): New function.
365 (s390x_emit_stack_adjust): New function.
366 (s390x_emit_int_call_1): New function.
367 (s390x_emit_void_call_2): New function.
368 (s390x_emit_eq_goto): New function.
369 (s390x_emit_ne_goto): New function.
370 (s390x_emit_lt_goto): New function.
371 (s390x_emit_le_goto): New function.
372 (s390x_emit_gt_goto): New function.
373 (s390x_emit_ge_goto): New function.
374 (s390_emit_ops): New function.
375 (struct linux_target_ops): Fill in emit_ops hook.
376
abd9baf9
MK
3772016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
378
379 PR 18377
380 * Makefile.in: Add s390 IPA files.
381 * configure.srv: Build IPA for s390.
382 * linux-s390-ipa.c: New file.
383 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
384 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
385 (tdesc_s390_linux32): Likewise.
386 (init_registers_s390_linux32v1): Likewise.
387 (tdesc_s390_linux32v1): Likewise.
388 (init_registers_s390_linux32v2): Likewise.
389 (tdesc_s390_linux32v2): Likewise.
390 (init_registers_s390_linux64): Likewise.
391 (tdesc_s390_linux64): Likewise.
392 (init_registers_s390_linux64v1): Likewise.
393 (tdesc_s390_linux64v1): Likewise.
394 (init_registers_s390_linux64v2): Likewise.
395 (tdesc_s390_linux64v2): Likewise.
396 (init_registers_s390_te_linux64): Likewise.
397 (tdesc_s390_te_linux64): Likewise.
398 (init_registers_s390_vx_linux64): Likewise.
399 (tdesc_s390_vx_linux64): Likewise.
400 (init_registers_s390_tevx_linux64): Likewise.
401 (tdesc_s390_tevx_linux64): Likewise.
402 (init_registers_s390x_linux64): Likewise.
403 (tdesc_s390x_linux64): Likewise.
404 (init_registers_s390x_linux64v1): Likewise.
405 (tdesc_s390x_linux64v1): Likewise.
406 (init_registers_s390x_linux64v2): Likewise.
407 (tdesc_s390x_linux64v2): Likewise.
408 (init_registers_s390x_te_linux64): Likewise.
409 (tdesc_s390x_te_linux64): Likewise.
410 (init_registers_s390x_vx_linux64): Likewise.
411 (tdesc_s390x_vx_linux64): Likewise.
412 (init_registers_s390x_tevx_linux64): Likewise.
413 (tdesc_s390x_tevx_linux64): Likewise.
414 (have_hwcap_s390_vx): New static variable.
415 (s390_arch_setup): Fill have_hwcap_s390_vx.
416 (s390_get_thread_area): New function.
417 (s390_ft_entry_gpr_esa): New const.
418 (s390_ft_entry_gpr_zarch): New const.
419 (s390_ft_entry_misc): New const.
420 (s390_ft_entry_fr): New const.
421 (s390_ft_entry_vr): New const.
422 (s390_ft_main_31): New const.
423 (s390_ft_main_64): New const.
424 (s390_ft_exit_fr): New const.
425 (s390_ft_exit_vr): New const.
426 (s390_ft_exit_misc): New const.
427 (s390_ft_exit_gpr_esa): New const.
428 (s390_ft_exit_gpr_zarch): New const.
429 (append_insns): New function.
430 (s390_relocate_instruction): New function.
431 (s390_install_fast_tracepoint_jump_pad): New function.
432 (s390_get_min_fast_tracepoint_insn_len): New function.
433 (s390_get_ipa_tdesc_idx): New function.
434 (struct linux_target_ops): Wire in the above functions.
435 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
436 * linux-s390-tdesc.h: New file.
437
a4105d04
MK
4382016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
439
440 * linux-s390-low.c (s390_supports_tracepoints): New function.
441 (struct linux_target_ops): Fill supports_tracepoints hook.
442
35ac8b3e
YQ
4432016-03-18 Yao Qi <yao.qi@linaro.org>
444
445 * linux-low.c (lwp_signal_can_be_delivered): New function.
446 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
447
94610ec4
YQ
4482016-03-18 Yao Qi <yao.qi@linaro.org>
449
450 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
451 0 if signal is enqueued. Remove 'signal' from one debugging
452 message. Move one debugging message to some lines below.
453 Remove code setting 'signal' to 0.
454
80aea927
YQ
4552016-03-18 Yao Qi <yao.qi@linaro.org>
456
457 * linux-low.c (linux_low_filter_event): Remove redundant
458 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
459
b04fd3be
MK
4602016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
461
462 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
463 (struct linux_target_ops): Wire in the above.
464
c40c8d4b
YQ
4652016-03-03 Yao Qi <yao.qi@linaro.org>
466
467 * linux-low.c: Update comments to start_step_over.
468
0f8288ae
YQ
4692016-03-03 Yao Qi <yao.qi@linaro.org>
470
471 PR server/19736
472 * linux-low.c (handle_extended_wait): Set child suspended
473 if event_lwp->bp_reinsert isn't zero.
474
fdbd04a8
YQ
4752016-03-02 Yao Qi <yao.qi@linaro.org>
476
477 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
478 enqueue_pending_signal.
479
6896a8fa
MK
4802016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
481
482 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
483 is actually loaded.
484
ab503087
MK
4852016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
486
487 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
488 (s390_regmap_3264) [!__s390x__]: New global.
489 (s390_collect_ptrace_register): Skip map entries containing -1.
490 (s390_supply_ptrace_register): Ditto.
491 (s390_fill_gprs_high): New function.
492 (s390_store_gprs_high): New function.
493 (s390_regsets): Add NT_S390_HIGH_GPRS.
494 (s390_get_hwcap): Enable on 31-bit.
495 (have_hwcap_s390_high_gprs): Enable on 31-bit.
496 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
497 Detect NT_S390_HIGH_GPRS.
498 (s390_usrregs_info_3264): Enable on 31-bit.
499 (s390_regs_info): Enable regs_info_3264 on 31-bit.
500 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
501
ae91f625
MK
5022016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
503
504 PR gdb/13808
505 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
506 * configure.srv: Ditto.
507 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
508 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
509 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
510 (init_registers_amd64_linux): Remove prototype.
511 (tdesc_amd64_linux): Remove declaration.
512 (get_ipa_tdesc): New function.
513 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
514 initialize remaining tdescs.
515 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
516 (init_registers_i386_linux): Remove prototype.
517 (tdesc_i386_linux): Remove declaration.
518 (get_ipa_tdesc): New function.
519 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
520 initialize remaining tdescs.
521 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
522 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
523 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
524 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
525 (x86_get_ipa_tdesc_idx): New function.
526 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
527 * linux-x86-tdesc.h: New file.
528 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
529 (target_get_ipa_tdesc_idx): New macro.
530 * tracepoint.c (ipa_tdesc_idx): New macro.
531 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
532 (symbol_list): Add ipa_tdesc_idx.
533 (cmd_qtstart): Write ipa_tdesc_idx in the target.
534 (ipa_tdesc): Remove.
535 (ipa_tdesc_idx): New variable.
536 (get_context_regcache): Use get_ipa_tdesc.
537 (gdb_collect): Ditto.
538 (gdb_probe): Ditto.
539 * tracepoint.h (get_ipa_tdesc): New prototype.
540 (ipa_tdesc): Remove.
541
e7ad2f14
PA
5422016-02-24 Pedro Alves <palves@redhat.com>
543
544 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
545 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
546 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
547 Factor out common code between the USE_SIGTRAP_SIGINFO and
548 !USE_SIGTRAP_SIGINFO blocks.
549 (linux_low_filter_event): Call save_stop_reason instead of
550 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
551 Update comments.
552 (linux_wait_1): Update comments.
553
657f9cde
WW
5542016-02-24 Wei-cheng Wang <cole945@gmail.com>
555
556 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
557 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
558 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
559 ppc_insert_point, ppc_remove_point.
560
b00b61e1
MK
5612016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
562
563 * linux-s390-low.c (s390_supports_z_point_type): New function.
564 (struct linux_target_ops): Wire s390_supports_z_point_type in.
565
553cb527
YQ
5662016-02-16 Yao Qi <yao.qi@linaro.org>
567
568 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
569 PC. Get pc from regcache_read_pc.
570
a5652c21
YQ
5712016-02-12 Yao Qi <yao.qi@linaro.org>
572
573 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
574 or linux_get_pc_32bit.
575 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
576
ed443b61
YQ
5772016-02-12 Yao Qi <yao.qi@linaro.org>
578
579 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
580 arm_linux_get_next_pcs_fixup.
581
020ecd38
MK
5822016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
583
584 * tracepoint.c (x_tracepoint_action_download): Change
585 write_inferior_data_ptr to write_inferior_data_pointer.
586 (cmd_qtstart): Likewise.
587 (write_inferior_data_ptr): Remove.
588 (download_agent_expr): Change write_inferior_data_ptr to
589 write_inferior_data_pointer.
590 (download_tracepoint_1): Likewise.
591 (download_tracepoint): Likewise.
592 (download_trace_state_variables): Likewise.
593
7cae9051
WW
5942016-02-11 Wei-cheng Wang <cole945@gmail.com>
595 Marcin Kościelnicki <koriakin@0x04.net>
596
597 * tracepoint.c (struct tracepoint_action_ops): Remove.
598 (struct tracepoint_action): Remove ops.
599 (m_tracepoint_action_download, r_tracepoint_action_download)
600 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
601 size and offset accordingly.
602 (m_tracepoint_action_ops, r_tracepoint_action_ops)
603 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
604 (tracepoint_action_send, tracepoint_action_download): New functions.
605 Helpers for trace action handlers.
606 (add_tracepoint_action): Remove setup actions ops.
607 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
608
9f6a71b4
YQ
6092016-02-10 Yao Qi <yao.qi@linaro.org>
610
611 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
612
1e94266c
SM
6132016-02-09 Simon Marchi <simon.marchi@ericsson.com>
614
615 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
616 to AC_OUTPUT.
617 * configure: Regenerate.
618
8adce034
SM
6192016-02-09 Simon Marchi <simon.marchi@ericsson.com>
620
621 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
622 void * to gdb_byte *.
623 * linux-low.c (siginfo_fixup): Likewise.
624 (linux_xfer_siginfo): Likewise.
625 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
626 Likewise.
627 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
628
93813b37
WT
6292016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
630
631 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
632 to srv_tgtobj.
633 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
634 to srv_tgtobj.
635 * linux-x86-low.c [__x86_64__]: Include
636 "nat/amd64-linux-siginfo.h".
637 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
638 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
639 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
640 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
641 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
642 (cpt_si_fd, si_timerid, si_overrun): Move from
643 nat/amd64-linux-siginfo.c.
644 * Makefile.in (amd64-linux-siginfo.o:): New rule.
645
8424cc97
SM
6462016-01-28 Simon Marchi <simon.marchi@ericsson.com>
647
648 * server.c (skip_to_semicolon): Remove.
649 (process_point_options): Use strchrnul instead of
650 skip_to_semicolon.
651
4d18591b
YQ
6522016-01-26 Yao Qi <yao.qi@linaro.org>
653
654 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
655 * linux-low.c (install_software_single_step_breakpoints): Don't
656 call regcache_read_pc.
657 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
658 argument pc.
659
d8020970
YQ
6602016-01-26 Yao Qi <yao.qi@linaro.org>
661
662 * linux-low.c (install_software_single_step_breakpoints): Call
663 regcache_read_pc instead of get_pc.
664
8b207339
YQ
6652016-01-26 Yao Qi <yao.qi@linaro.org>
666
667 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
668 (unblock_async_io): Rename to ...
669 (block_unblock_async_io): ... it. New function.
670 (enable_async_io): Don't install SIGIO handler. Unblock it
671 instead.
672 (disable_async_io): Don't ignore SIGIO. Block it instead.
673 (initialize_async_io): Install SIGIO handler. Don't call
674 unblock_async_io.
675
18879fef
YQ
6762016-01-26 Yao Qi <yao.qi@linaro.org>
677
678 * remote-utils.c (getpkt): If the buffer isn't empty, and the
679 first character is '\003', call *the_target->request_interrupt.
680
a0f8e08a
YQ
6812016-01-25 Yao Qi <yao.qi@linaro.org>
682
683 * remote-utils.c (new_thread_notify): Remove.
684 (dead_thread_notify): Likewise.
685 * remote-utils.h (new_thread_notify): Remove declaration.
686 (dead_thread_notify): Likewise.
687
cc5fd9ab
MK
6882016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
689
690 * gdb.trace/pending.exp: Fix expected message on continue.
691
99e8eb11
MK
6922016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
693
694 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
695 it works properly on big-endian machines where sizeof (CORE_ADDR)
696 != sizeof (void *).
697
a994041d
PA
6982016-01-21 Pedro Alves <palves@redhat.com>
699
700 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
701 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
702 * configure: Regenerate.
703
f7a6a40d
YQ
7042016-01-21 Yao Qi <yao.qi@linaro.org>
705
706 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
707 is_thumb and set it according to CPSR saved on the stack.
708 (get_next_pcs_syscall_next_pc): Pass is_thumb to
709 arm_sigreturn_next_pc.
710
6f69e520
YQ
7112016-01-18 Yao Qi <yao.qi@linaro.org>
712
713 * linux-low.c (linux_set_pc_64bit): New function.
714 (linux_get_pc_64bit): New function.
715 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
716 Declare.
717 * linux-sparc-low.c (debug_threads): Remove declaration.
718 (sparc_get_pc): Remove.
719 (the_low_target): Use linux_get_pc_64bit instead of
720 sparc_get_pc.
721 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
722 (the_low_target): Use linux_get_pc_64bit and
723 linux_set_pc_64bit.
724
276d4552
YQ
7252016-01-18 Yao Qi <yao.qi@linaro.org>
726
727 * linux-arm-low.c (debug_threads): Remove declaration.
728 (arm_get_pc, arm_set_pc): Remove.
729 (the_low_target): Use linux_get_pc_32bit and
730 linux_set_pc_32bit.
731 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
732 (the_low_target): Use linux_get_pc_32bit and
733 linux_set_pc_32bit.
734 * linux-cris-low.c (debug_threads): Remove declaration.
735 (cris_get_pc, cris_set_pc,): Remove.
736 (the_low_target): Use linux_get_pc_32bit and
737 linux_set_pc_32bit.
738 * linux-crisv32-low.c (debug_threads): Remove declaration.
739 (cris_get_pc, cris_set_pc): Remove.
740 (the_low_target): Use linux_get_pc_32bit and
741 linux_set_pc_32bit.
742 * linux-low.c: Include inttypes.h.
743 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
744 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
745 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
746 (the_low_target): Use linux_get_pc_32bit and
747 linux_set_pc_32bit.
748 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
749 (the_low_target): Use linux_get_pc_32bit and
750 linux_set_pc_32bit.
751 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
752 (the_low_target): Use linux_get_pc_32bit and
753 linux_set_pc_32bit.
754 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
755 (the_low_target): Use linux_get_pc_32bit and
756 linux_set_pc_32bit.
757 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
758 (the_low_target): Use linux_get_pc_32bit and
759 linux_set_pc_32bit.
760
eb0edac8
GB
7612016-01-18 Gary Benson <gbenson@redhat.com>
762
763 * configure.ac (AC_FUNC_FORK): New check.
764 * config.in: Regenerate.
765 * configure: Likewise.
766
1b451dda
YQ
7672016-01-14 Yao Qi <yao.qi@linaro.org>
768
769 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
770 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
771 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
772 arm_get_next_pcs_ctor.
773
82075af2
JS
7742016-01-12 Josh Stone <jistone@redhat.com>
775 Philippe Waroquiers <philippe.waroquiers@skynet.be>
776
777 * inferiors.h: Include "gdb_vecs.h".
778 (struct process_info): Add syscalls_to_catch.
779 * inferiors.c (remove_process): Free syscalls_to_catch.
780 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
781 syscall_return stops.
782 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
783 * server.c (handle_general_set): Handle QCatchSyscalls.
784 (handle_query): Report support for QCatchSyscalls.
785 * target.h (struct target_ops): Add supports_catch_syscall.
786 (target_supports_catch_syscall): New macro.
787 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
788 (struct lwp_info): Add syscall_state.
789 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
790 Maintain syscall_state and syscalls_to_catch across exec.
791 (get_syscall_trapinfo): New function, proxy to the_low_target.
792 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
793 (linux_low_filter_event): Toggle syscall_state entry/return for
794 syscall traps, and set it ignored for all others.
795 (gdb_catching_syscalls_p): New function.
796 (gdb_catch_this_syscall_p): New function.
797 (linux_wait_1): Handle SYSCALL_SIGTRAP.
798 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
799 (linux_supports_catch_syscall): New function.
800 (linux_target_ops): Install it.
801 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
802 (the_low_target): Install it.
803
8f13a3ce
MF
8042016-01-12 Mike Frysinger <vapier@gentoo.org>
805
806 * acinclude.m4: Include new ../warning.m4 file.
807 * configure: Regenerated.
808 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
809
5b3da067
MF
8102016-01-12 Mike Frysinger <vapier@gentoo.org>
811
812 * ax.c (is_goto_target): Mark static.
813 * linux-low.c (register_addr): Likewise.
814 (linux_fetch_registers, linux_store_registers): Likewise.
815 * mem-break.c (any_persistent_commands): Fix old prototype.
816 (add_commands_to_breakpoint): Mark static.
817 * regcache.c (find_register_by_name): Delete unused func.
818 * remote-utils.c (hex_or_minus_one): Mark static.
819 * server.c (monitor_show_help): Mark static.
820 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
821 handle_v_requests): Likewise.
822
bc504a31
PA
8232016-01-12 Pedro Alves <palves@redhat.com>
824
825 Remove use of the registered trademark symbol throughout.
826
5a0dd67a
YQ
8272016-01-08 Yao Qi <yao.qi@linaro.org>
828
829 * remote-utils.c (getpkt): If c is '\003', call target hook
830 request_interrupt.
831
b2ca446f
YQ
8322016-01-06 Yao Qi <yao.qi@linaro.org>
833
834 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
835 linux-aarch32-low.c.
836 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
837 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
838 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
839 (thumb2_breakpoint): Declare.
840 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
841 linux-aarch32-low.h.
842 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
843 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
844 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
845
edd88788
JB
8462016-01-01 Joel Brobecker <brobecker@adacore.com>
847
848 * gdbreplay.c (gdbreplay_version): Change copyright year in
849 version message.
850 * server.c (gdbserver_version): Likewise.
851
65da7f14
PP
8522015-12-28 Patrick Palka <patrick@parcs.ath.cx>
853
854 * server.c (crc32_table): Delete.
855 (crc32): Use libiberty's xcrc32 function.
856
4abd5ed2
JB
8572015-12-22 Joel Brobecker <brobecker@adacore.com>
858
859 * lynx-low.c (lynx_delete_thread_callback): New function.
860 (lynx_mourn): Properly delete our process and all of its
861 threads. Remove call to clear_inferiors.
862
0e50fe5c
JB
8632015-12-22 Joel Brobecker <brobecker@adacore.com>
864
865 * target.c (thread_search_callback): Add check that
866 the thread_stopped target callback is not NULL before
867 calling it.
868
35adc03f
YQ
8692015-12-21 Yao Qi <yao.qi@linaro.org>
870
871 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
872 arm breakpoint.
873
bd2b2909
AT
8742015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
875
876 * server.c (handle_query): Call target_supports_software_single_step.
877
7fe5e27e
AT
8782015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
879
880 * linux-low.c (single_step): New function.
881 (linux_resume_one_lwp_throw): Call single_step.
882 (start_step_over): Likewise.
883
d9311bfa
AT
8842015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
885
886 * Makefile.in (SFILES): Append arch/arm-linux.c,
887 arch/arm-get-next-pcs.c.
888 (arm-linux.o): New rule.
889 (arm-get-next-pcs.o): New rule.
890 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
891 arm-linux.o.
892 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
893 to linux-aarch32-low.c.
894 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
895 (arm_breakpoint_len, thumb_breakpoint): Likewise.
896 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
897 (thumb2_breakpoint_len): Likewise.
898 (arm_is_thumb_mode): Make non-static.
899 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
900 from 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): New declaration.
906 * linux-arm-low.c: Include arch/arm-linux.h
907 aarch/arm-get-next-pcs.h, sys/syscall.h.
908 (get_next_pcs_ops): New struct.
909 (get_next_pcs_addr_bits_remove): New function.
910 (get_next_pcs_is_thumb): New function.
911 (get_next_pcs_read_memory_unsigned_integer): Likewise.
912 (arm_sigreturn_next_pc): Likewise.
913 (get_next_pcs_syscall_next_pc): Likewise.
914 (arm_gdbserver_get_next_pcs): Likewise.
915 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
916 Initialize.
917 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
918 * server.h: Include gdb_vecs.h.
919
68ce2059
AT
9202015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
921
922 * Makefile.in (SFILES): Append common/common-regcache.c.
923 (OBS): Append common-regcache.o.
924 (common-regcache.o): New rule.
925 * regcache.c (init_register_cache): Initialize cache to
926 REG_UNAVAILABLE.
927 (regcache_raw_read_unsigned): New function.
928 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
929 register_status enum.
930
fa5308bd
AT
9312015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
932
933 * linux-aarch64-low.c (the_low_targets): Rename
934 breakpoint_reinsert_addr to get_next_pcs.
935 * linux-arm-low.c (the_low_targets): Likewise.
936 * linux-bfin-low.c (the_low_targets): Likewise.
937 * linux-cris-low.c (the_low_targets): Likewise.
938 * linux-crisv32-low.c (the_low_targets): Likewise.
939 * linux-low.c (can_software_single_step): Likewise.
940 (install_software_single_step_breakpoints): New function.
941 (start_step_over): Use install_software_single_step_breakpoints.
942 * linux-low.h: New CORE_ADDR vector.
943 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
944 get_next_pcs.
945 * linux-mips-low.c (the_low_targets): Likewise.
946 * linux-nios2-low.c (the_low_targets): Likewise.
947 * linux-sparc-low.c (the_low_targets): Likewise.
948
4a6ed09b
PA
9492015-12-17 Pedro Alves <palves@redhat.com>
950
951 * linux-low.c (linux_kill_one_lwp): Remove references to
952 LinuxThreads.
953 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
954 to 'kill'.
955 (linux_init_signals): Delete.
956 (initialize_low): Adjust.
957 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
958
7544db95
PA
9592015-12-16 Pedro Alves <palves@redhat.com>
960
961 * configure.ac (compiler warning flags): When testing a
962 -Wno-foo option, check whether -Wfoo works instead.
963 * configure: Regenerate.
964
8020350c
DB
9652015-12-11 Don Breazeal <donb@codesourcery.com>
966
967 * server.c (process_serial_event): Don't exit from gdbserver
968 in remote mode if there are still active inferiors.
969
db91f502
YQ
9702015-12-11 Yao Qi <yao.qi@linaro.org>
971
972 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
973 arm_breakpoint_at if the process is 32-bit.
974
b37a6290
YQ
9752015-12-11 Yao Qi <yao.qi@linaro.org>
976
977 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
978 arm breakpoint.
979
17b1509a
YQ
9802015-12-07 Yao Qi <yao.qi@linaro.org>
981
982 * configure.srv: Append arm.o to srv_tgtobj for
983 aarch64*-*-linux* target.
984 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
985 from linux-arm-low.c.
986 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
987 (arm_breakpoint_len, thumb_breakpoint): Likewise.
988 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
989 (thumb2_breakpoint_len): Likewise.
990 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
991 (arm_breakpoint_kinds): Likewise.
992 (arm_breakpoint_kind_from_pc): Likewise.
993 (arm_sw_breakpoint_from_kind): Likewise.
994 (arm_breakpoint_kind_from_current_state): Likewise.
995 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
996 (arm_sw_breakpoint_from_kind): Declare.
997 (arm_breakpoint_kind_from_current_state): Declare.
998 (arm_breakpoint_at): Declare.
999 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1000 arm_sw_breakpoint_from_kind if process is 32-bit.
1001 (aarch64_breakpoint_kind_from_pc): New function.
1002 (aarch64_breakpoint_kind_from_current_state): New function.
1003 (the_low_target): Initialize fields breakpoint_kind_from_pc
1004 and breakpoint_kind_from_current_state.
1005 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1006 linux-aarch32-low.c.
1007 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1008 (arm_breakpoint, arm_breakpoint_len): Likewise.
1009 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1010 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1011 (arm_is_thumb_mode): Likewise.
1012 (arm_breakpoint_at): Likewise.
1013 (arm_breakpoint_kind_from_pc): Likewise.
1014 (arm_sw_breakpoint_from_kind): Likewise.
1015 (arm_breakpoint_kind_from_current_state): Likewise.
1016
1017 Revert:
1018 2015-08-04 Yao Qi <yao.qi@linaro.org>
1019
1020 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1021 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1022 * server.c (extended_protocol): Remove "static".
1023 * server.h (extended_protocol): Declare it.
1024
ece66d65
JS
10252015-12-04 Josh Stone <jistone@redhat.com>
1026
1027 * target.h (struct target_ops) <arch_setup>: Rename to ...
1028 (struct target_ops) <post_create_inferior>: ... this.
1029 (target_arch_setup): Rename to ...
1030 (target_post_create_inferior): ... this, calling post_create_inferior.
1031 * server.c (start_inferior): Update target_arch_setup calls to
1032 target_post_create_inferior.
1033 * linux-low.c (linux_low_ptrace_options): Forward declare.
1034 (linux_arch_setup): Update its comment for general use.
1035 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1036 (struct linux_target_ops): Use linux_post_create_inferior.
1037 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1038 to post_create_inferior.
1039 * nto-low.c (struct nto_target_ops): Likewise.
1040 * spu-low.c (struct spu_target_ops): Likewise.
1041 * win32-low.c (struct win32_target_ops): Likewise.
1042
e58c48b4
AT
10432015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1044
1045 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1046
fbec8956
AT
10472015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1048
1049 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1050 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1051 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1052 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1053 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1054 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1055 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1056 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1057 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1058 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1059 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1060 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1061
9b4c5f87
AT
10622015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1063
1064 * linux-low.c (linux_look_up_symbols): Don't call
1065 linux_supports_traceclone.
1066 * linux-low.h (thread_db_init): Remove use_events argument.
1067 * thread-db.c (thread_db_use_event): Remove global variable.
1068 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1069 (struct thread_db) <td_create_bp>: Remove field.
1070 (thread_db_create_event): Remove function.
1071 (thread_db_enable_reporting): Likewise.
1072 (find_one_thread): Don't check for thread_db_use_events.
1073 (attach_thread): Likewise.
1074 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1075 (try_thread_db_load_1): Don't check for thread_db_use_events.
1076 (thread_db_init): Remove use_events argument and thread events
1077 handling.
1078 (remove_thread_event_breakpoints): Remove function.
1079 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1080
7d00775e
AT
10812015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1082
1083 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1084 New function.
1085 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1086 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1087 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1088 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1089 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1090 Initialize.
1091 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1092 New function.
1093 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1094 * linux-low.c (can_hardware_single_step): Use
1095 supports_hardware_single_step.
1096 (can_software_single_step): New function.
1097 (start_step_over): Call can_software_single_step.
1098 (linux_supports_hardware_single_step): New function.
1099 (struct target_ops) <supports_software_single_step>: Initialize.
1100 * linux-low.h (struct linux_target_ops)
1101 <supports_hardware_single_step>: Initialize.
1102 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1103 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1104 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1105 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1106 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1107 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1108 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1109 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1110 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1111 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1112 Initialize.
1113 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1114 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1115 Initialize.
1116 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1117 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1118 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1119 New function.
1120 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1121 * target.h (struct target_ops): <supports_software_single_step>:
1122 New field.
1123 (target_supports_software_single_step): New macro.
1124
2d97cd35
AT
11252015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1126
1127 * linux-low.c (linux_wait_1): Fix pc advance condition.
1128 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1129 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1130
769ef81f
AT
11312015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1132
1133 * linux-arm-low.c (arm_is_thumb_mode): New function.
1134 (arm_breakpoint_at): Use arm_is_thumb_mode.
1135 (arm_breakpoint_kind_from_current_state): New function.
1136 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1137 Initialize.
1138 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1139 (linux_breakpoint_kind_from_current_state): New function.
1140 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1141 * linux-low.h (struct linux_target_ops)
1142 <breakpoint_kind_from_current_state>: New field.
1143 * target.h (struct target_ops): Likewise.
1144 (target_breakpoint_kind_from_current_state): New macro.
1145
1bebeeca
PA
11462015-11-30 Pedro Alves <palves@redhat.com>
1147
1148 * linux-low.c (linux_resume): Wake up the event loop before
1149 returning.
1150
a67a9fae
PA
11512015-11-30 Pedro Alves <palves@redhat.com>
1152
1153 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1154 check.
1155 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1156 to -1.
1157 * target.c (struct thread_search): New structure.
1158 (thread_search_callback): New function.
1159 (prev_general_thread): New global.
1160 (prepare_to_access_memory, done_accessing_memory): New functions.
1161 * target.h (prepare_to_access_memory, done_accessing_memory):
1162 Replace macros with function declarations.
1163
f2faf941
PA
11642015-11-30 Pedro Alves <palves@redhat.com>
1165
1166 PR 14618
1167 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1168 report TARGET_WAITKIND_NO_RESUMED.
1169 * remote-utils.c (prepare_resume_reply): Handle
1170 TARGET_WAITKIND_NO_RESUMED.
1171 * server.c (report_no_resumed): New global.
1172 (handle_query) <qSupported>: Handle "no-resumed+". Report
1173 "no-resumed+" support.
1174 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1175 return error if the client doesn't support no-resumed events.
1176 (push_stop_notification): New function.
1177 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1178 events if the client supports them.
1179
a681f9c9
PA
11802015-11-30 Pedro Alves <palves@redhat.com>
1181
1182 * linux-low.c (thread_still_has_status_pending_p): Don't check
1183 vCont;t here.
1184 (lwp_resumed): New function.
1185 (status_pending_p_callback): Return early if the LWP is not
1186 supposed to be resumed.
1187
65706a29
PA
11882015-11-30 Pedro Alves <palves@redhat.com>
1189
1190 * linux-low.c (handle_extended_wait): Assert that the LWP's
1191 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1192 thread create events, leave the new child's status pending.
1193 (linux_low_filter_event): If GDB wants to hear about thread exit
1194 events, leave the LWP marked dead and don't delete it.
1195 (linux_wait_for_event_filtered): Don't check for thread exit.
1196 (filter_exit_event): New function.
1197 (linux_wait_1): Use it, when returning an exit event.
1198 (linux_resume_one_lwp_throw): Assert that the LWP's
1199 waitstatus is TARGET_WAITKIND_IGNORE.
1200 * remote-utils.c (prepare_resume_reply): Handle
1201 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1202 * server.c (report_thread_events): New global.
1203 (handle_general_set): Handle QThreadEvents.
1204 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1205 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1206 TARGET_WAITKIND_THREAD_EXITED.
1207 * server.h (report_thread_events): Declare.
1208
56cf4bed
PA
12092015-11-30 Pedro Alves <palves@redhat.com>
1210
1211 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1212 the thread's last_resume_kind was resume_stop.
1213
500c1d85
PA
12142015-11-30 Pedro Alves <palves@redhat.com>
1215
1216 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1217 before returning.
1218
de979965
PA
12192015-11-30 Pedro Alves <palves@redhat.com>
1220
1221 * server.c (handle_v_requests): Handle vCtrlC.
1222
34c65914
PA
12232015-11-30 Pedro Alves <palves@redhat.com>
1224
1225 * gdbthread.h (find_any_thread_of_pid): Declare.
1226 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1227 functions.
1228 * server.c (handle_query): If current_thread is NULL, look for
1229 another thread of the selected process.
1230
79efa585 12312015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1232 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1233
1234 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1235 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1236 name in reply.
1237 * target.h (struct target_ops) <thread_name>: New field.
1238 (target_thread_name): New macro.
1239
80d82c19
JB
12402015-11-23 Joel Brobecker <brobecker@adacore.com>
1241
1242 * regcache.h (regcache_invalidate_pid): Add declaration.
1243 * regcache.c (regcache_invalidate_pid): New function, extracted
1244 from regcache_invalidate.
1245 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1246 Add trivial documentation comment.
1247 * lynx-low.c: Use regcache_invalidate_pid instead of
1248 regcache_invalidate.
1249
64da5dd5
JB
12502015-11-23 Joel Brobecker <brobecker@adacore.com>
1251
1252 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1253 and Elf64_auxv_t if the target is Android.
1254
37ce4055
DE
12552015-11-22 Doug Evans <xdje42@gmail.com>
1256
1257 * target.h: #include <sys/types.h>.
1258
06e03fff
PA
12592015-11-19 Pedro Alves <palves@redhat.com>
1260
1261 * linux-low.c (linux_process_qsupported): Change prototype.
1262 Adjust.
1263 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1264 Change prototype.
1265 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1266 and adjust to loop over all features.
1267 * server.c (handle_query) <qSupported>: Adjust to call
1268 target_process_qsupported once, passing it a vector of unprocessed
1269 features.
1270 * target.h (struct target_ops) <process_qsupported>: Change
1271 prototype.
1272 (target_process_qsupported): Adjust.
1273
9a084706
PA
12742015-11-19 Pedro Alves <palves@redhat.com>
1275
1276 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1277 mode.
1278 * configure: Regenerate.
1279
dad44a1f
PA
12802015-11-19 Pedro Alves <palves@redhat.com>
1281
1282 * configure: Regenerate.
1283
231c0592
YQ
12842015-11-19 Yao Qi <yao.qi@linaro.org>
1285
1286 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1287 type to uint32_t.
1288
6c1c9a8b
YQ
12892015-11-19 Yao Qi <yao.qi@linaro.org>
1290
1291 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1292 (struct aarch64_operand): Move enum out.
1293
9caa3311
YQ
12942015-11-19 Yao Qi <yao.qi@linaro.org>
1295
1296 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1297 struct user_fpsimd_state *.
1298 (aarch64_store_fpregset): Likewise.
1299
6a69a054
YQ
13002015-11-19 Yao Qi <yao.qi@linaro.org>
1301
1302 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1303 struct user_pt_regs *.
1304 (aarch64_store_gregset): Likewise.
1305
1798301e
PA
13062015-11-18 Pedro Alves <palves@redhat.com>
1307
1308 * Makefile.in (all_object_files): Add $IPA_OBJS.
1309
ce7715e2
PA
13102015-11-17 Pedro Alves <palves@redhat.com>
1311
1312 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1313 GDB_SIGNAL_0 and gdb_signal_to_string.
1314
c0879059
PA
13152015-11-17 Pedro Alves <palves@redhat.com>
1316
1317 * win32-low.c (handle_output_debug_string): Remove parameter.
1318 (win32_kill): Remove our_status local and adjust call to
1319 handle_output_debug_string.
1320 (get_child_debug_event): Adjust call to
1321 handle_output_debug_string.
1322
1996e237
SM
13232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1324
1325 * linux-mips-low.c (mips_fill_gregset): Add cast.
1326 (mips_store_gregset): Likewise.
1327 (mips_fill_fpregset): Likewise.
1328 (mips_store_fpregset): Likewise.
1329
cbec665b
SM
13302015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1331
1332 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1333 priv.
1334
eb3e3c67
SM
13352015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1336
1337 * linux-mips-low.c (mips_linux_new_thread): Change type of
1338 watch_type to enum target_hw_bp_type.
1339
171de4b8
SM
13402015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1341
1342 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1343 Change return type to arm_hwbp_type.
1344
04248ead
SM
13452015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1346
1347 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1348 (arm_store_gregset): Likewise.
1349 * linux-arm-low.c (arm_get_hwcap): Likewise.
1350 (arm_read_description): Likewise.
1351
04b3479c
SM
13522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1353
1354 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1355
2bc84e8a
SM
13562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1357
1358 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1359 (ppc_fill_vsxregset): Likewise.
1360 (ppc_store_vsxregset): Likewise.
1361 (ppc_fill_vrregset): Likewise.
1362 (ppc_store_vrregset): Likewise.
1363 (ppc_fill_evrregset): Likewise.
1364 (ppc_store_evrregset): Likewise.
1365
e6c5bb05
SM
13662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1367
1368 * linux-ppc-low.c (ppc_usrregs_info): Remove
1369 forward-declaration.
1370 (ppc_arch_setup): Move lower in file.
1371
7ea45d72
SM
13722015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1373
1374 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1375 (ps_pdwrite): Likewise.
1376
69291610
HW
13772015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1378
1379 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1380 to after assert checks.
1381
b42945fd
SM
13822015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1383
1384 * proc-service.c (ps_pdread): Add/adjust casts.
1385 (ps_pdwrite): Add/adjust casts.
1386
d6f85c84
SM
13872015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1388
1389 * server.c (handle_search_memory_1): Cast return value of
1390 memmem.
1391
f98cd059
SM
13922015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1393
1394 * server.c (write_qxfer_response): Change type of data to
1395 gdb_byte *.
1396
d2412fa5
PA
13972015-10-29 Pedro Alves <palves@redhat.com>
1398
1399 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1400
c17414a2
PA
14012015-10-29 Pedro Alves <palves@redhat.com>
1402
1403 * tracepoint.c (clear_installed_tracepoints): Add casts.
1404
e053fbc4
PA
14052015-10-29 Pedro Alves <palves@redhat.com>
1406
1407 * server.c (handle_v_cont, process_serial_event): Add enum
1408 gdb_signal casts to signal parsing code.
1409
add67df8
PA
14102015-10-29 Pedro Alves <palves@redhat.com>
1411
1412 * linux-low.h (NULL_REGSET): Define.
1413 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1414 * linux-arm-low.c (arm_regsets): Likewise.
1415 * linux-crisv32-low.c (cris_regsets): Likewise.
1416 * linux-m68k-low.c (m68k_regsets): Likewise.
1417 * linux-mips-low.c (mips_regsets): Likewise.
1418 * linux-nios2-low.c (nios2_regsets): Likewise.
1419 * linux-ppc-low.c (ppc_regsets): Likewise.
1420 * linux-s390-low.c (s390_regsets): Likewise.
1421 * linux-sh-low.c (sh_regsets): Likewise.
1422 * linux-sparc-low.c (sparc_regsets): Likewise.
1423 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1424 * linux-tile-low.c (tile_regsets): Likewise.
1425 * linux-x86-low.c (x86_regsets): Likewise.
1426 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1427
50bc912a
PA
14282015-10-29 Pedro Alves <palves@redhat.com>
1429
1430 * linux-low.h (NULL_REGSET): Define.
1431 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1432 * linux-arm-low.c (arm_regsets): Likewise.
1433 * linux-crisv32-low.c (cris_regsets): Likewise.
1434 * linux-m68k-low.c (m68k_regsets): Likewise.
1435 * linux-mips-low.c (mips_regsets): Likewise.
1436 * linux-nios2-low.c (nios2_regsets): Likewise.
1437 * linux-ppc-low.c (ppc_regsets): Likewise.
1438 * linux-s390-low.c (s390_regsets): Likewise.
1439 * linux-sh-low.c (sh_regsets): Likewise.
1440 * linux-sparc-low.c (sparc_regsets): Likewise.
1441 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1442 * linux-tile-low.c (tile_regsets): Likewise.
1443 * linux-x86-low.c (x86_regsets): Likewise.
1444 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1445
682b2546
DE
14462015-10-26 Doug Evans <dje@google.com>
1447
1448 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1449
963843d4
DE
14502015-10-26 Doug Evans <dje@google.com>
1451
1452 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1453
d41401ac
DE
14542015-10-26 Doug Evans <dje@google.com>
1455
1456 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1457 for debug_printf.
1458 (attach_thread, find_new_threads_callback): Ditto.
1459
3db28855
AT
14602015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1461
1462 * mem-break.h (set_breakpoint_data): Remove.
1463
fb78e89c
AT
14642015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1465
1466 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1467 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1468 (initialize_low): Remove set_breakpoint_data call.
1469 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1470 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1471 (initialize_low): Remove set_breakpoint_data call.
1472 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1473 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1474 (initialize_low): Remove set_breakpoint_data call.
1475
2e6ee069
AT
14762015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1477
1478 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1479 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1480 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1481 * target.h (target_breakpoint_kind_from_pc): New macro.
1482
1652a986
AT
14832015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1484
1485 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1486 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1487 the default breakpoint kind.
1488
abeead09
AT
14892015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1490
1491 * linux-arm-low.c (arm_supports_z_point_type): Add software
1492 breakpoint support.
1493
b0b4b501
AT
14942015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1495
1496 * linux-arm-low.c: Refactor breakpoint definitions.
1497 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1498 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1499
8689682c
AT
15002015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1501
1502 * Makefile.in: Add arm.c/o.
1503 * configure.srv: Likewise.
1504 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1505 (arm_breakpoint_kind_from_pc): New function.
1506 (arm_sw_breakpoint_from_kind): Return proper kind.
1507 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1508
27165294
AT
15092015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1510
1511 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1512 removal.
1513 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1514 (struct raw_breakpoint) <size>: Remove.
1515 (struct raw_breakpoint) <kind>: Add.
1516 (bp_size): New function.
1517 (bp_opcode): Likewise.
1518 (find_raw_breakpoint_at): Adjust for kind.
1519 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1520 (remove_memory_breakpoint): Adjust for kind call bp_size.
1521 (set_raw_breakpoint_at): Adjust for kind.
1522 (set_breakpoint): Likewise.
1523 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1524 (delete_raw_breakpoint): Adjust for kind.
1525 (delete_breakpoint): Likewise.
1526 (find_gdb_breakpoint): Likewise.
1527 (set_gdb_breakpoint_1): Likewise.
1528 (set_gdb_breakpoint): Likewise.
1529 (delete_gdb_breakpoint_1): Likewise.
1530 (delete_gdb_breakpoint): Likewise.
1531 (uninsert_raw_breakpoint): Likewise.
1532 (reinsert_raw_breakpoint): Likewise.
1533 (set_breakpoint_data): Remove.
1534 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1535 (check_mem_read): Adjust for kind call bp_size.
1536 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1537 (clone_one_breakpoint): Adjust for kind.
1538 * mem-break.h (set_gdb_breakpoint): Likewise.
1539 (delete_gdb_breakpoint): Likewise.
1540 * server.c (process_serial_event): Likewise.
1541
dd373349
AT
15422015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1543
1544 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1545 (struct linux_target_ops) <breakpoint>: Remove.
1546 (struct linux_target_ops) <breakpoint_len>: Remove.
1547 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1548 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1549 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1550 (arm_sw_breakpoint_from_kind): New function.
1551 * linux-bfin-low.c (bfin_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-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1557 (struct linux_target_ops) <breakpoint>: Remove.
1558 (struct linux_target_ops) <breakpoint_len>: Remove.
1559 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1560 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1561 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1562 (struct linux_target_ops) <breakpoint>: Remove.
1563 (struct linux_target_ops) <breakpoint_len>: Remove.
1564 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1565 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1566 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1567 and sw_breakpoint_from_kind to increment the pc.
1568 (linux_breakpoint_kind_from_pc): New function.
1569 (linux_sw_breakpoint_from_kind): New function.
1570 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1571 (initialize_low): Call breakpoint_kind_from_pc and
1572 sw_breakpoint_from_kind to replace breakpoint_data/len.
1573 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1574 New field.
1575 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1576 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1577 (struct linux_target_ops) <breakpoint>: Remove.
1578 (struct linux_target_ops) <breakpoint_len>: Remove.
1579 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1580 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1581 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1582 (struct linux_target_ops) <breakpoint>: Remove.
1583 (struct linux_target_ops) <breakpoint_len>: Remove.
1584 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1585 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1586 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1587 (struct linux_target_ops) <breakpoint>: Remove.
1588 (struct linux_target_ops) <breakpoint_len>: Remove.
1589 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1590 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1591 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1592 (struct linux_target_ops) <breakpoint>: Remove.
1593 (struct linux_target_ops) <breakpoint_len>: Remove.
1594 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1595 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1596 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1597 (struct linux_target_ops) <breakpoint>: Remove.
1598 (struct linux_target_ops) <breakpoint_len>: Remove.
1599 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1600 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1601 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1602 (struct linux_target_ops) <breakpoint>: Remove.
1603 (struct linux_target_ops) <breakpoint_len>: Remove.
1604 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1605 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1606 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1607 (struct linux_target_ops) <breakpoint>: Remove.
1608 (struct linux_target_ops) <breakpoint_len>: Remove.
1609 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1610 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1611 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1612 (struct linux_target_ops) <breakpoint>: Remove.
1613 (struct linux_target_ops) <breakpoint_len>: Remove.
1614 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1615 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1616 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1617 (struct linux_target_ops) <breakpoint>: Remove.
1618 (struct linux_target_ops) <breakpoint_len>: Remove.
1619 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1620 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1621 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1622 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1623 (struct linux_target_ops) <breakpoint>: Remove.
1624 (struct linux_target_ops) <breakpoint_len>: Remove.
1625 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1626 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1627 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1628 (struct linux_target_ops) <breakpoint>: Remove.
1629 (struct linux_target_ops) <breakpoint_len>: Remove.
1630 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1631 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1632
4cd98a19
AT
16332015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1634
1635 * linux-cris-low.c (cris_get_pc): Remove void arg.
1636
774ee6d2
AR
16372015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1638
1639 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1640 variable name.
1641
833dcd29
AR
16422015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1643
1644 * inferiors.c (thread_pid_matches_callback): New function.
1645 (find_thread_process): New function.
1646 (remove_thread): Reset current_thread.
1647 (remove_process): Assert threads have been removed first.
1648
8d689ee5
YQ
16492015-10-15 Yao Qi <yao.qi@linaro.org>
1650
1651 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1652 if it is 3.
1653 (aarch64_remove_point): Likewise.
1654 * regcache.c (regcache_register_size): New function.
1655
1c2e1515
YQ
16562015-10-12 Yao Qi <yao.qi@linaro.org>
1657
1658 * linux-aarch64-low.c: Update all callers as emit_load_store
1659 is renamed to aarch64_emit_load_store.
1660
e1c587c3
YQ
16612015-10-12 Yao Qi <yao.qi@linaro.org>
1662
1663 * linux-aarch64-low.c: Update all callers of function renaming
1664 from emit_insn to aarch64_emit_insn.
1665
b6542f81
YQ
16662015-10-12 Yao Qi <yao.qi@linaro.org>
1667
1668 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1669 arch/aarch64-insn.h.
1670 (struct aarch64_memory_operand): Likewise.
1671 (ENCODE): Likewise.
1672 (emit_insn): Move to arch/aarch64-insn.c.
1673 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1674 (emit_load_store): Move to arch/aarch64-insn.c.
1675 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1676 (can_encode_int32): Remove.
1677
246994ce
YQ
16782015-10-12 Yao Qi <yao.qi@linaro.org>
1679
1680 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1681 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1682 (aarch64_relocate_instruction): Likewise.
1683 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1684 (struct aarch64_insn_visitor): Likewise.
1685
0badd99f
YQ
16862015-10-12 Yao Qi <yao.qi@linaro.org>
1687
1688 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1689 (struct aarch64_insn_visitor): New.
1690 (struct aarch64_insn_relocation_data): New.
1691 (aarch64_ftrace_insn_reloc_b): New function.
1692 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1693 (aarch64_ftrace_insn_reloc_cb): Likewise.
1694 (aarch64_ftrace_insn_reloc_tb): Likewise.
1695 (aarch64_ftrace_insn_reloc_adr): Likewise.
1696 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1697 (aarch64_ftrace_insn_reloc_others): Likewise.
1698 (visitor): New.
1699 (aarch64_relocate_instruction): Use visitor.
1700
dfaffe9d
YQ
17012015-10-12 Yao Qi <yao.qi@linaro.org>
1702
1703 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1704 int. Add argument buf.
1705 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1706 aarch64_relocate_instruction.
1707
70b439f0
YQ
17082015-10-12 Yao Qi <yao.qi@linaro.org>
1709
1710 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1711 argument insn. Remove local variable insn. Don't call
1712 target_read_uint32.
1713 (aarch64_install_fast_tracepoint_jump_pad): Call
1714 target_read_uint32.
1715
7781c06f
YQ
17162015-09-30 Yao Qi <yao.qi@linaro.org>
1717
1718 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1719 (emit_load_store_pair): Likewise.
1720
9a3c8263
SM
17212015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1722
1723 * dll.c (match_dll): Add cast(s).
1724 (unloaded_dll): Likewise.
1725 * linux-low.c (second_thread_of_pid_p): Likewise.
1726 (delete_lwp_callback): Likewise.
1727 (count_events_callback): Likewise.
1728 (select_event_lwp_callback): Likewise.
1729 (linux_set_resume_request): Likewise.
1730 * server.c (accumulate_file_name_length): Likewise.
1731 (emit_dll_description): Likewise.
1732 (handle_qxfer_threads_worker): Likewise.
1733 (visit_actioned_threads): Likewise.
1734 * thread-db.c (any_thread_of): Likewise.
1735 * tracepoint.c (same_process_p): Likewise.
1736 (match_blocktype): Likewise.
1737 (build_traceframe_info_xml): Likewise.
1738
224c3ddb
SM
17392015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1740
1741 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1742 assignment.
1743 (gdb_unparse_agent_expr): Likewise.
1744 * hostio.c (require_data): Likewise.
1745 (handle_pread): Likewise.
1746 * linux-low.c (disable_regset): Likewise.
1747 (fetch_register): Likewise.
1748 (store_register): Likewise.
1749 (get_dynamic): Likewise.
1750 (linux_qxfer_libraries_svr4): Likewise.
1751 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1752 (set_fast_tracepoint_jump): Likewise.
1753 (uninsert_fast_tracepoint_jumps_at): Likewise.
1754 (reinsert_fast_tracepoint_jumps_at): Likewise.
1755 (validate_inserted_breakpoint): Likewise.
1756 (clone_agent_expr): Likewise.
1757 * regcache.c (init_register_cache): Likewise.
1758 * remote-utils.c (putpkt_binary_1): Likewise.
1759 (decode_M_packet): Likewise.
1760 (decode_X_packet): Likewise.
1761 (look_up_one_symbol): Likewise.
1762 (relocate_instruction): Likewise.
1763 (monitor_output): Likewise.
1764 * server.c (handle_search_memory): Likewise.
1765 (handle_qxfer_exec_file): Likewise.
1766 (handle_qxfer_libraries): Likewise.
1767 (handle_qxfer): Likewise.
1768 (handle_query): Likewise.
1769 (handle_v_cont): Likewise.
1770 (handle_v_run): Likewise.
1771 (captured_main): Likewise.
1772 * target.c (write_inferior_memory): Likewise.
1773 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1774 * tracepoint.c (init_trace_buffer): Likewise.
1775 (add_tracepoint_action): Likewise.
1776 (add_traceframe): Likewise.
1777 (add_traceframe_block): Likewise.
1778 (cmd_qtdpsrc): Likewise.
1779 (cmd_qtdv): Likewise.
1780 (cmd_qtstatus): Likewise.
1781 (response_source): Likewise.
1782 (response_tsv): Likewise.
1783 (cmd_qtnotes): Likewise.
1784 (gdb_collect): Likewise.
1785 (initialize_tracepoint): Likewise.
1786
afbe19f8
PL
17872015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1788
1789 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1790 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1791 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1792 <NOP>: New.
1793 (enum aarch64_condition_codes): New enum.
1794 (w0): New static global.
1795 (fp): Likewise.
1796 (lr): Likewise.
1797 (struct aarch64_memory_operand) <type>: New
1798 MEMORY_OPERAND_POSTINDEX type.
1799 (postindex_memory_operand): New helper function.
1800 (emit_ret): New function.
1801 (emit_load_store_pair): New function, factored out of emit_stp
1802 with support for MEMORY_OPERAND_POSTINDEX.
1803 (emit_stp): Rewrite using emit_load_store_pair.
1804 (emit_ldp): New function.
1805 (emit_load_store): Likewise.
1806 (emit_ldr): Mention post-index instruction in comment.
1807 (emit_ldrh): New function.
1808 (emit_ldrb): New function.
1809 (emit_ldrsw): Mention post-index instruction in comment.
1810 (emit_str): Likewise.
1811 (emit_subs): New function.
1812 (emit_cmp): Likewise.
1813 (emit_and): Likewise.
1814 (emit_orr): Likewise.
1815 (emit_orn): Likewise.
1816 (emit_eor): Likewise.
1817 (emit_mvn): Likewise.
1818 (emit_lslv): Likewise.
1819 (emit_lsrv): Likewise.
1820 (emit_asrv): Likewise.
1821 (emit_mul): Likewise.
1822 (emit_sbfm): Likewise.
1823 (emit_sbfx): Likewise.
1824 (emit_ubfm): Likewise.
1825 (emit_ubfx): Likewise.
1826 (emit_csinc): Likewise.
1827 (emit_cset): Likewise.
1828 (emit_nop): Likewise.
1829 (emit_ops_insns): New helper function.
1830 (emit_pop): Likewise.
1831 (emit_push): Likewise.
1832 (aarch64_emit_prologue): New function.
1833 (aarch64_emit_epilogue): Likewise.
1834 (aarch64_emit_add): Likewise.
1835 (aarch64_emit_sub): Likewise.
1836 (aarch64_emit_mul): Likewise.
1837 (aarch64_emit_lsh): Likewise.
1838 (aarch64_emit_rsh_signed): Likewise.
1839 (aarch64_emit_rsh_unsigned): Likewise.
1840 (aarch64_emit_ext): Likewise.
1841 (aarch64_emit_log_not): Likewise.
1842 (aarch64_emit_bit_and): Likewise.
1843 (aarch64_emit_bit_or): Likewise.
1844 (aarch64_emit_bit_xor): Likewise.
1845 (aarch64_emit_bit_not): Likewise.
1846 (aarch64_emit_equal): Likewise.
1847 (aarch64_emit_less_signed): Likewise.
1848 (aarch64_emit_less_unsigned): Likewise.
1849 (aarch64_emit_ref): Likewise.
1850 (aarch64_emit_if_goto): Likewise.
1851 (aarch64_emit_goto): Likewise.
1852 (aarch64_write_goto_address): Likewise.
1853 (aarch64_emit_const): Likewise.
1854 (aarch64_emit_call): Likewise.
1855 (aarch64_emit_reg): Likewise.
1856 (aarch64_emit_pop): Likewise.
1857 (aarch64_emit_stack_flush): Likewise.
1858 (aarch64_emit_zero_ext): Likewise.
1859 (aarch64_emit_swap): Likewise.
1860 (aarch64_emit_stack_adjust): Likewise.
1861 (aarch64_emit_int_call_1): Likewise.
1862 (aarch64_emit_void_call_2): Likewise.
1863 (aarch64_emit_eq_goto): Likewise.
1864 (aarch64_emit_ne_goto): Likewise.
1865 (aarch64_emit_lt_goto): Likewise.
1866 (aarch64_emit_le_goto): Likewise.
1867 (aarch64_emit_gt_goto): Likewise.
1868 (aarch64_emit_ge_got): Likewise.
1869 (aarch64_emit_ops_impl): New static global variable.
1870 (aarch64_emit_ops): New target function, return
1871 &aarch64_emit_ops_impl.
1872 (struct linux_target_ops): Install it.
1873
bb903df0
PL
18742015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1875
1876 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1877 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1878 aarch64-ipa.o.
1879 * linux-aarch64-ipa.c: New file.
1880 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1881 and endian.h.
1882 (aarch64_get_thread_area): New target method.
1883 (extract_signed_bitfield): New helper function.
1884 (aarch64_decode_ldr_literal): New function.
1885 (enum aarch64_opcodes): New enum.
1886 (struct aarch64_register): New struct.
1887 (struct aarch64_operand): New struct.
1888 (x0): New static global.
1889 (x1): Likewise.
1890 (x2): Likewise.
1891 (x3): Likewise.
1892 (x4): Likewise.
1893 (w2): Likewise.
1894 (ip0): Likewise.
1895 (sp): Likewise.
1896 (xzr): Likewise.
1897 (aarch64_register): New helper function.
1898 (register_operand): Likewise.
1899 (immediate_operand): Likewise.
1900 (struct aarch64_memory_operand): New struct.
1901 (offset_memory_operand): New helper function.
1902 (preindex_memory_operand): Likewise.
1903 (enum aarch64_system_control_registers): New enum.
1904 (ENCODE): New macro.
1905 (emit_insn): New helper function.
1906 (emit_b): New function.
1907 (emit_bcond): Likewise.
1908 (emit_cb): Likewise.
1909 (emit_tb): Likewise.
1910 (emit_blr): Likewise.
1911 (emit_stp): Likewise.
1912 (emit_ldp_q_offset): Likewise.
1913 (emit_stp_q_offset): Likewise.
1914 (emit_load_store): Likewise.
1915 (emit_ldr): Likewise.
1916 (emit_ldrsw): Likewise.
1917 (emit_str): Likewise.
1918 (emit_ldaxr): Likewise.
1919 (emit_stxr): Likewise.
1920 (emit_stlr): Likewise.
1921 (emit_data_processing_reg): Likewise.
1922 (emit_data_processing): Likewise.
1923 (emit_add): Likewise.
1924 (emit_sub): Likewise.
1925 (emit_mov): Likewise.
1926 (emit_movk): Likewise.
1927 (emit_mov_addr): Likewise.
1928 (emit_mrs): Likewise.
1929 (emit_msr): Likewise.
1930 (emit_sevl): Likewise.
1931 (emit_wfe): Likewise.
1932 (append_insns): Likewise.
1933 (can_encode_int32_in): New helper function.
1934 (aarch64_relocate_instruction): New function.
1935 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1936 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1937 (struct linux_target_ops): Install aarch64_get_thread_area,
1938 aarch64_install_fast_tracepoint_jump_pad and
1939 aarch64_get_min_fast_tracepoint_insn_len.
1940
787749ea
PL
19412015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1942
1943 * Makefile.in (aarch64-insn.o): New rule.
1944 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1945
9812b2e6
YQ
19462015-09-21 Yao Qi <yao.qi@linaro.org>
1947
1948 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1949
18fe412b
YQ
19502015-09-21 Yao Qi <yao.qi@linaro.org>
1951
1952 * tracepoint.c (max_jump_pad_size): Remove.
1953
a0cc84cd
YQ
19542015-09-18 Yao Qi <yao.qi@linaro.org>
1955
1956 * linux-aarch64-low.c: Don't include sys/uio.h.
1957 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1958
d78908cf
WW
19592015-09-16 Wei-cheng Wang <cole945@gmail.com>
1960
1961 * tracepoint.c (eval_result_type): Change prototype.
1962 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1963
d57e0d50
PA
19642015-09-15 Pedro Alves <palves@redhat.com>
1965
1966 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1967 Check whether to report exec events instead of checking whether
1968 multiprocess is enabled.
1969
5a676acc
PA
19702015-09-15 Pedro Alves <palves@redhat.com>
1971
1972 PR remote/18965
1973 * remote-utils.c (prepare_resume_reply): Merge
1974 TARGET_WAITKIND_VFORK_DONE switch case with the
1975 TARGET_WAITKIND_FORKED case.
1976
7c5d0fad
YQ
19772015-09-15 Yao Qi <yao.qi@linaro.org>
1978
1979 * server.c (handle_query): Check string comparison using
1980 "else if" instead of "if".
1981
750ce8d1
YQ
19822015-09-15 Yao Qi <yao.qi@linaro.org>
1983
1984 * server.c (vCont_supported): New global variable.
1985 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1986 matches. Append ";vContSupported+" to own_buf.
1987 (handle_v_requests): Append ";s;S" to own_buf if target supports
1988 hardware single step or vCont_supported is false.
1989 (capture_main): Set vCont_supported to zero.
1990
70b90b91
YQ
19912015-09-15 Yao Qi <yao.qi@linaro.org>
1992
1993 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1994 it to ...
1995 (linux_supports_hardware_single_step): ... New function.
1996 (linux_target_ops): Update.
1997 * lynx-low.c (lynx_target_ops): Set field
1998 supports_hardware_single_step to target_can_do_hardware_single_step.
1999 * nto-low.c (nto_target_ops): Likewise.
2000 * spu-low.c (spu_target_ops): Likewise.
2001 * win32-low.c (win32_target_ops): Likewise.
2002 * target.c (target_can_do_hardware_single_step): New function.
2003 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2004 Remove. <supports_hardware_single_step>: New field.
2005 (target_supports_conditional_breakpoints): Remove.
2006 (target_supports_hardware_single_step): New macro.
2007 (target_can_do_hardware_single_step): Declare.
2008 * server.c (handle_query): Use target_supports_hardware_single_step
2009 instead of target_supports_conditional_breakpoints.
2010
ade90bde
YQ
20112015-09-15 Yao Qi <yao.qi@linaro.org>
2012
2013 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2014 function.
2015 (struct linux_target_ops the_low_target): Install
2016 aarch64_linux_siginfo_fixup.
2017
94585166
DB
20182015-09-11 Don Breazeal <donb@codesourcery.com>
2019 Luis Machado <lgustavo@codesourcery.com>
2020
2021 * linux-low.c (linux_mourn): Static declaration.
2022 (linux_arch_setup): Move in front of
2023 handle_extended_wait.
2024 (linux_arch_setup_thread): New function.
2025 (handle_extended_wait): Handle exec events. Call
2026 linux_arch_setup_thread. Make event_lwp argument a
2027 pointer-to-a-pointer.
2028 (check_zombie_leaders): Do not check stopped threads.
2029 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2030 (linux_low_filter_event): Add lwp and thread for exec'ing
2031 non-leader thread if leader thread has been deleted.
2032 Refactor code into linux_arch_setup_thread and call it.
2033 Pass child lwp pointer by reference to handle_extended_wait.
2034 (linux_wait_for_event_filtered): Update comment.
2035 (linux_wait_1): Prevent clobbering exec event status.
2036 (linux_supports_exec_events): New function.
2037 (linux_target_ops) <supports_exec_events>: Initialize new member.
2038 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2039 new member.
2040 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2041 * server.c (report_exec_events): New global variable.
2042 (handle_query): Handle qSupported query for exec-events feature.
2043 (captured_main): Initialize report_exec_events.
2044 * server.h (report_exec_events): Declare new global variable.
2045 * target.h (struct target_ops) <supports_exec_events>: New
2046 member.
2047 (target_supports_exec_events): New macro.
2048 * win32-low.c (win32_target_ops) <supports_exec_events>:
2049 Initialize new member.
2050
0568462b
MM
20512015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2052
2053 * linux-low.c (linux_low_enable_btrace): Remove.
2054 (linux_target_ops): Replace linux_low_enable_btrace with
2055 linux_enable_btrace.
2056
39edd165
YQ
20572015-09-03 Yao Qi <yao.qi@linaro.org>
2058
2059 * linux-aarch64-low.c (aarch64_insert_point): Call
2060 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2061 returns true.
2062
1db33b5a
UW
20632015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2064
2065 * linux-low.c (check_stopped_by_breakpoint): Use
2066 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2067
ab290430
PA
20682015-08-27 Pedro Alves <palves@redhat.com>
2069
2070 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2071
8d749320
SM
20722015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2073
6711b7f8
SM
2074 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2075 the XNEW-family equivalent.
8d749320
SM
2076 (compile_bytecodes): Likewise.
2077 * dll.c (loaded_dll): Likewise.
2078 * event-loop.c (append_callback_event): Likewise.
2079 (create_file_handler): Likewise.
2080 (create_file_event): Likewise.
2081 * hostio.c (handle_open): Likewise.
2082 * inferiors.c (add_thread): Likewise.
2083 (add_process): Likewise.
2084 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2085 * linux-arm-low.c (arm_new_process): Likewise.
2086 (arm_new_thread): Likewise.
2087 * linux-low.c (add_to_pid_list): Likewise.
2088 (linux_add_process): Likewise.
2089 (handle_extended_wait): Likewise.
2090 (add_lwp): Likewise.
2091 (enqueue_one_deferred_signal): Likewise.
2092 (enqueue_pending_signal): Likewise.
2093 (linux_resume_one_lwp_throw): Likewise.
2094 (linux_resume_one_thread): Likewise.
2095 (linux_read_memory): Likewise.
2096 (linux_write_memory): Likewise.
2097 * linux-mips-low.c (mips_linux_new_process): Likewise.
2098 (mips_linux_new_thread): Likewise.
2099 (mips_add_watchpoint): Likewise.
2100 * linux-x86-low.c (initialize_low_arch): Likewise.
2101 * lynx-low.c (lynx_add_process): Likewise.
2102 * mem-break.c (set_raw_breakpoint_at): Likewise.
2103 (set_breakpoint): Likewise.
2104 (add_condition_to_breakpoint): Likewise.
2105 (add_commands_to_breakpoint): Likewise.
2106 (clone_agent_expr): Likewise.
2107 (clone_one_breakpoint): Likewise.
2108 * regcache.c (new_register_cache): Likewise.
2109 * remote-utils.c (look_up_one_symbol): Likewise.
2110 * server.c (queue_stop_reply): Likewise.
2111 (start_inferior): Likewise.
2112 (queue_stop_reply_callback): Likewise.
2113 (handle_target_event): Likewise.
2114 * spu-low.c (fetch_ppc_memory): Likewise.
2115 (store_ppc_memory): Likewise.
2116 * target.c (set_target_ops): Likewise.
2117 * thread-db.c (thread_db_load_search): Likewise.
2118 (try_thread_db_load_1): Likewise.
2119 * tracepoint.c (add_tracepoint): Likewise.
2120 (add_tracepoint_action): Likewise.
2121 (create_trace_state_variable): Likewise.
2122 (cmd_qtdpsrc): Likewise.
2123 (cmd_qtro): Likewise.
2124 (add_while_stepping_state): Likewise.
2125 * win32-low.c (child_add_thread): Likewise.
2126 (get_image_name): Likewise.
2127
ed8b7b42
YQ
21282015-08-25 Yao Qi <yao.qi@linaro.org>
2129
2130 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2131
db3cb7cb
YQ
21322015-08-25 Yao Qi <yao.qi@linaro.org>
2133
2134 * Makefile.in (aarch64-linux.o): New rule.
2135 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2136 srv_tgtobj.
2137 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2138 (aarch64_init_debug_reg_state): Make it extern.
2139 (aarch64_linux_prepare_to_resume): Remove.
2140
f6011a1c
YQ
21412015-08-25 Yao Qi <yao.qi@linaro.org>
2142
2143 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2144 lwp_arch_private_info and ptid_of_lwp.
2145
88e2cf7e
YQ
21462015-08-25 Yao Qi <yao.qi@linaro.org>
2147
2148 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2149 Find proc_info by find_process_pid. All callers updated.
2150
5e35436e
YQ
21512015-08-25 Yao Qi <yao.qi@linaro.org>
2152
2153 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2154 Remove.
2155 (debug_reg_change_callback): Remove.
2156 (aarch64_notify_debug_reg_change): Remove.
2157
4a8a7965
YQ
21582015-08-25 Yao Qi <yao.qi@linaro.org>
2159
2160 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2161 Call current_lwp_ptid.
2162
32a271ee
YQ
21632015-08-25 Yao Qi <yao.qi@linaro.org>
2164
2165 * linux-aarch64-low.c (debug_reg_change_callback): Use
2166 debug_printf.
2167
0d51c8d7
YQ
21682015-08-25 Yao Qi <yao.qi@linaro.org>
2169
2170 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2171
31a43dd5
YQ
21722015-08-25 Yao Qi <yao.qi@linaro.org>
2173
2174 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2175
8ee52567
YQ
21762015-08-25 Yao Qi <yao.qi@linaro.org>
2177
2178 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2179 the code.
2180
ff3f0f45
YQ
21812015-08-25 Yao Qi <yao.qi@linaro.org>
2182
2183 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2184 Remove.
2185 (debug_reg_change_callback): Remove argument entry and add argument
2186 lwp. Remove local variable thread. Don't print thread id in the
2187 debugging output. Don't check whether pid of thread equals to pid.
2188 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2189 iterate_over_lwps instead find_inferior.
2190
3d40fbb5
PA
21912015-08-24 Pedro Alves <palves@redhat.com>
2192
2193 * inferiors.c (get_first_process): New function.
2194 * inferiors.h (get_first_process): New declaration.
2195 * remote-utils.c (read_ptid): Default to the first process in the
2196 list, instead of to the current thread's process.
2197
438e1e42
PA
21982015-08-24 Pedro Alves <palves@redhat.com>
2199
2200 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2201 * event-loop.c: Likewise.
2202 * remote-utils.c: Likewise.
2203 * tracepoint.c: Likewise.
2204
a8c6d4fc
PA
22052015-08-24 Pedro Alves <palves@redhat.com>
2206
2207 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2208 ptid_get_lwp.
2209
99b0bb12
PA
22102015-08-21 Pedro Alves <palves@redhat.com>
2211
2212 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2213 instead of literal 1.
2214
f8904751
PA
22152015-08-21 Pedro Alves <palves@redhat.com>
2216
2217 * tdesc.c (default_description): Explicitly zero-initialize.
2218
465a859e
PA
22192015-08-21 Pedro Alves <palves@redhat.com>
2220
2221 PR gdb/18749
2222 * inferiors.c (remove_thread): Discard any pending stop reply for
2223 this thread.
2224 * server.c (remove_all_on_match_pid): Rename to ...
2225 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2226 instead of a pid.
2227 (discard_queued_stop_replies): Change parameter to a ptid. Now
2228 extern.
2229 (handle_v_kill, kill_inferior_callback, captured_main)
2230 (process_serial_event): Adjust.
2231 * server.h (discard_queued_stop_replies): Declare.
2232
f0db101d
PA
22332015-08-21 Pedro Alves <palves@redhat.com>
2234
2235 * linux-low.c (wait_for_sigstop): Always switch to no thread
2236 selected if the previously current thread dies.
2237 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2238 process instead of the current thread's.
2239 * remote-utils.c (input_interrupt): Don't check if there's no
2240 current thread.
2241 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2242 current thread to the general thread fails, error out.
2243 (handle_qxfer_auxv, handle_qxfer_libraries)
2244 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2245 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2246 (handle_query): Check if there's a thread selected instead of
2247 checking whether there's any thread in the thread list.
2248 (handle_qxfer_threads, handle_qxfer_btrace)
2249 (handle_qxfer_btrace_conf): Don't error out early if there's no
2250 thread in the thread list.
2251 (handle_v_cont, myresume): Don't set the current thread to the
2252 continue thread.
2253 (process_serial_event) <Hg handling>: Also set thread_id if the
2254 previous general thread is still alive.
2255 (process_serial_event) <g/G handling>: If setting the current
2256 thread to the general thread fails, error out.
2257 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2258 thread's lwp instead of the current thread's.
2259 * target.c (set_desired_thread): If the desired thread was not
2260 found, leave the current thread pointing to NULL. Return an int
2261 (boolean) indicating success.
2262 * target.h (set_desired_thread): Change return type to int.
2263
40045d91
MF
22642015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2265
2266 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2267 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2268 #includes.
2269 (ps_get_thread_area): New function.
2270
45face3b
GB
22712015-08-19 Gary Benson <gbenson@redhat.com>
2272
2273 * hostio.c (handle_pread): Do not attempt to read more data
2274 than hostio_reply_with_data can fit in a packet.
2275
16d5f642
JB
22762015-08-18 Joel Brobecker <brobecker@adacore.com>
2277
2278 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2279
a738da3a
MF
22802015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2281
2282 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2283
33ebda9d
PA
22842015-08-06 Pedro Alves <palves@redhat.com>
2285
2286 * tracepoint.c (expr_eval_result): Now an int.
2287
a44892be
PA
22882015-08-06 Pedro Alves <palves@redhat.com>
2289
2290 * gdbthread.h (struct regcache): Forward declare.
2291 (struct thread_info) <regcache_data>: Now a struct regcache
2292 pointer.
2293 * inferiors.c (inferior_regcache_data)
2294 (set_inferior_regcache_data): Now work with struct regcache
2295 pointers.
2296 * inferiors.h (struct regcache): Forward declare.
2297 (inferior_regcache_data, set_inferior_regcache_data): Now work
2298 with struct regcache pointers.
2299 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2300 (free_register_cache_thread): Remove struct regcache pointer
2301 casts.
2302
608a1e46
PA
23032015-08-06 Pedro Alves <palves@redhat.com>
2304
2305 * server.c (captured_main): On error, print the exception message
2306 to stderr, and if run_once is set, throw a quit.
2307
f0ce0d3a
PA
23082015-08-06 Pedro Alves <palves@redhat.com>
2309
2310 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2311 the current thread.
2312
bf47e248
PA
23132015-08-06 Pedro Alves <palves@redhat.com>
2314
2315 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2316 reading beyond the passed in buffer length.
2317
b6b9ffcc
PL
23182015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2319
2320 * tracepoint.c (symbol_list) <required>: Remove.
2321
863d01bd
PA
23222015-08-06 Pedro Alves <palves@redhat.com>
2323
2324 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2325 count if stopping and suspending threads.
2326 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2327 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2328 (linux_detach): Complete an ongoing step-over.
2329 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2330 throughout.
2331 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2332 (linux_wait_1): If passing a signal to the inferior after
2333 finishing a step-over, unsuspend and re-resume all lwps. If we
2334 see a single-step event but the thread should be continuing, don't
2335 pass the trap to gdb.
2336 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2337 internal_error instead of gdb_assert.
2338 (enqueue_pending_signal): New function.
2339 (check_ptrace_stopped_lwp_gone): Add debug output.
2340 (start_step_over): Use internal_error instead of gdb_assert.
2341 (complete_ongoing_step_over): New function.
2342 (linux_resume_one_thread): Don't resume a suspended thread.
2343 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2344 it stepping.
2345
00db26fa
PA
23462015-08-06 Pedro Alves <palves@redhat.com>
2347
2348 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2349 (linux_thread_alive): Use lwp_is_marked_dead.
2350 (extended_event_reported): Delete.
2351 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2352 instead of extended_event_reported.
2353 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2354 as well.
2355 (lwp_is_marked_dead): New function.
2356 (lwp_running): Use lwp_is_marked_dead.
2357 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2358 comment.
2359
ad071a30
PA
23602015-08-06 Pedro Alves <palves@redhat.com>
2361
2362 * linux-low.c (linux_wait_1): Move fork event output out of the
2363 !report_to_gdb check. Pass event_child->waitstatus to
2364 target_waitstatus_to_string instead of ourstatus.
2365
524b57e6
YQ
23662015-08-04 Yao Qi <yao.qi@linaro.org>
2367
2368 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2369 if current_thread is 32 bit.
2370
6085d6f6
YQ
23712015-08-04 Yao Qi <yao.qi@linaro.org>
2372
2373 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2374 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2375 * server.c (extended_protocol): Remove "static".
2376 * server.h (extended_protocol): Declare it.
2377
8a7e4587
YQ
23782015-08-04 Yao Qi <yao.qi@linaro.org>
2379
2380 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2381 both aarch64 and aarch32.
2382 (aarch64_set_pc): Likewise.
2383
3b53ae99
YQ
23842015-08-04 Yao Qi <yao.qi@linaro.org>
2385
2386 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2387 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2388 arm-with-neon.xml to srv_xmlfiles.
2389 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2390 (is_64bit_tdesc): New function.
2391 (aarch64_linux_read_description): New function.
2392 (aarch64_arch_setup): Call aarch64_linux_read_description.
2393 (regs_info): Rename to regs_info_aarch64.
2394 (aarch64_regs_info): Return right regs_info.
2395 (initialize_low_arch): Call initialize_low_arch_aarch32.
2396
bd9e6534
YQ
23972015-08-04 Yao Qi <yao.qi@linaro.org>
2398
2399 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2400 * linux-aarch32-low.c: New file.
2401 * linux-aarch32-low.h: New file.
2402 * linux-arm-low.c (arm_fill_gregset): Move it to
2403 linux-aarch32-low.c.
2404 (arm_store_gregset): Likewise.
2405 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2406 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2407 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2408 (regs_info): Rename to regs_info_arm.
2409 (arm_regs_info): Return regs_info_aarch32 if
2410 have_ptrace_getregset is 1 and target description is
2411 arm_with_neon or arm_with_vfpv3.
2412 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2413 Call initialize_low_arch_aarch32 instead.
2414
ded48a5e
YQ
24152015-08-04 Yao Qi <yao.qi@linaro.org>
2416
2417 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2418 * linux-low.c: ... here.
2419 * linux-low.h (have_ptrace_getregset): Declare it.
2420
96e9210f
PA
24212015-08-04 Pedro Alves <palves@redhat.com>
2422
2423 * thread-db.c (struct thread_db): Use new typedefs.
2424 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2425 CHK calls.
2426 (disable_thread_event_reporting): Cast result of dlsym to
2427 destination function pointer type.
2428 (thread_db_mourn): Use td_ta_delete_ftype.
2429
af60a1ef
SL
24302015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2431
2432 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2433 arch variant.
2434 (CDX_BREAKPOINT): Define for R2.
2435 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2436 (the_low_target): Add comments.
2437
e8b41681
YQ
24382015-07-30 Yao Qi <yao.qi@linaro.org>
2439
2440 * linux-arm-low.c (arm_hwcap): Remove it.
2441 (arm_read_description): New local variable arm_hwcap. Don't
2442 set arm_hwcap to zero.
2443
89abb039
YQ
24442015-07-30 Yao Qi <yao.qi@linaro.org>
2445
2446 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2447 Use regcache->tdesc instead.
2448 (arm_store_wmmxregset): Likewise.
2449 (arm_fill_vfpregset): Likewise.
2450 (arm_store_vfpregset): Likewise.
2451
deca266c
YQ
24522015-07-30 Yao Qi <yao.qi@linaro.org>
2453
2454 * linux-arm-low.c: Include arch/arm.h.
2455 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2456 (arm_store_gregset): Likewise.
2457
aa58a496
SM
24582015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2459
2460 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2461 ptrace's 4th parameter.
2462
50904b25
YQ
24632015-07-27 Yao Qi <yao.qi@linaro.org>
2464
2465 * configure.srv (case aarch64*-*-linux*): Don't set
2466 srv_linux_usrregs.
2467
5826e159
PA
24682015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2469
2470 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2471 sys/ptrace.h.
2472 * linux-arm-low.c: Likewise.
2473 * linux-cris-low.c: Likewise.
2474 * linux-crisv32-low.c: Likewise.
2475 * linux-low.c: Likewise.
2476 * linux-m68k-low.c: Likewise.
2477 * linux-mips-low.c: Likewise.
2478 * linux-nios2-low.c: Likewise.
2479 * linux-s390-low.c: Likewise.
2480 * linux-sparc-low.c: Likewise.
2481 * linux-tic6x-low.c: Likewise.
2482 * linux-tile-low.c: Likewise.
2483 * linux-x86-low.c: Likewise.
2484
54019719
PA
24852015-07-24 Pedro Alves <palves@redhat.com>
2486
2487 * config.in: Regenerate.
2488 * configure: Regenerate.
2489
eb7aa561
PA
24902015-07-24 Pedro Alves <palves@redhat.com>
2491
2492 * acinclude.m4: Include ../ptrace.m4.
2493 * configure.ac: Call GDB_AC_PTRACE.
2494 * config.in, configure: Regenerate.
2495
55d7b841
YQ
24962015-07-24 Yao Qi <yao.qi@linaro.org>
2497
2498 * linux-low.c (linux_create_inferior): Remove setting to
2499 proc->priv->new_inferior.
2500 (linux_attach): Likewise.
2501 (linux_low_filter_event): Likewise.
2502 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2503
c06cbd92
YQ
25042015-07-24 Yao Qi <yao.qi@linaro.org>
2505
2506 * linux-low.c (linux_arch_setup): New function.
2507 (linux_low_filter_event): If proc->tdesc is NULL and
2508 proc->attached is true, call the_low_target.arch_setup.
2509 Otherwise, keep status pending, and return.
2510 (linux_resume_one_lwp_throw): Don't call get_pc if
2511 thread->while_stepping isn't NULL. Don't call
2512 get_thread_regcache if proc->tdesc is NULL.
2513 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2514 (linux_target_ops): Install arch_setup.
2515 * server.c (start_inferior): Call the_target->arch_setup.
2516 * target.h (struct target_ops) <arch_setup>: New field.
2517 (target_arch_setup): New marco.
2518 * lynx-low.c (lynx_target_ops): Update.
2519 * nto-low.c (nto_target_ops): Update.
2520 * spu-low.c (spu_target_ops): Update.
2521 * win32-low.c (win32_target_ops): Update.
2522
5ae3ebba
YQ
25232015-07-24 Yao Qi <yao.qi@linaro.org>
2524
2525 * linux-low.c (linux_add_process): Don't set
2526 proc->priv->new_inferior.
2527 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2528 (linux_attach): Likewise.
2529
eb97750b
YQ
25302015-07-24 Yao Qi <yao.qi@linaro.org>
2531
2532 * server.c (start_inferior): Code refactor.
2533
51aee833
YQ
25342015-07-24 Yao Qi <yao.qi@linaro.org>
2535
2536 * server.c (process_serial_event): Set general_thread.
2537
af1b22f3
YQ
25382015-07-21 Yao Qi <yao.qi@linaro.org>
2539
2540 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2541 aarch64_linux_get_debug_reg_capacity.
2542
554717a3
YQ
25432015-07-17 Yao Qi <yao.qi@linaro.org>
2544
2545 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2546 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2547 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2548 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2549 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2550 (AARCH64_HWP_ALIGNMENT): Likewise.
2551 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2552 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2553 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2554 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2555 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2556 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2557 (struct aarch64_debug_reg_state): Likewise.
2558 (struct arch_lwp_info): Likewise.
2559 (aarch64_align_watchpoint): Likewise.
2560 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2561 (aarch64_watchpoint_length): Likewise.
2562 (aarch64_point_encode_ctrl_reg): Likewise
2563 (aarch64_point_is_aligned): Likewise.
2564 (aarch64_align_watchpoint): Likewise.
2565 (aarch64_linux_set_debug_regs):
2566 (aarch64_dr_state_insert_one_point): Likewise.
2567 (aarch64_dr_state_remove_one_point): Likewise.
2568 (aarch64_handle_breakpoint): Likewise.
2569 (aarch64_handle_aligned_watchpoint): Likewise.
2570 (aarch64_handle_unaligned_watchpoint): Likewise.
2571 (aarch64_handle_watchpoint): Likewise.
2572
c67ca4de
YQ
25732015-07-17 Yao Qi <yao.qi@linaro.org>
2574
2575 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2576 and don't aarch64_get_debug_reg_state. All callers update.
2577 (aarch64_handle_aligned_watchpoint): Likewise.
2578 (aarch64_handle_unaligned_watchpoint): Likewise.
2579 (aarch64_handle_watchpoint): Likewise.
2580 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2581 (aarch64_remove_point): Likewise.
2582
25abf979
YQ
25832015-07-17 Yao Qi <yao.qi@linaro.org>
2584
2585 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2586 debug_printf.
2587 (aarch64_handle_unaligned_watchpoint): Likewise.
2588
db1ff28b
JK
25892015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2590
2591 Revert the previous 3 commits:
2592 Move gdb_regex* to common/
2593 Move linux_find_memory_regions_full & co.
2594 gdbserver build-id attribute generator
2595
700ca40f
JK
25962015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2597 Jan Kratochvil <jan.kratochvil@redhat.com>
2598
2599 gdbserver build-id attribute generator.
2600 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2601 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2602 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2603 (find_phdr): New.
2604 (get_dynamic): Use find_pdhr to traverse program headers.
2605 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2606 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2607 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2608 (get_hex_build_id): New.
2609 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2610 to reply XML document.
2611
9904185c
JK
26122015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2613 Jan Kratochvil <jan.kratochvil@redhat.com>
2614
2615 * target.c: Include target/target-utils.h and fcntl.h.
2616 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2617 (target_fileio_read_stralloc): New functions.
2618
6e5b4429
JK
26192015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2620
2621 * Makefile.in (OBS): Add gdb_regex.o.
2622 (gdb_regex.o): New.
2623 * config.in: Rebuilt.
2624 * configure: Rebuilt.
2625
ddc98fbf
JK
26262015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2627 Jan Kratochvil <jan.kratochvil@redhat.com>
2628
2629 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2630 * Makefile.in (OBS): Add target-utils.o.
2631 (linux-maps.o, target-utils.o): New.
2632 * configure.srv (srv_linux_obj): Add linux-maps.o.
2633
e57bb7a0
PL
26342015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2635
2636 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2637 function, return 1.
2638 (the_low_target): Install it.
2639
586b02a9
PA
26402015-07-14 Pedro Alves <palves@redhat.com>
2641
2642 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2643 Instead, ignore ECHILD, and throw an error for other errnos.
2644
58c1b36c
PA
26452015-07-10 Pedro Alves <palves@redhat.com>
2646
2647 * event-loop.c (struct callback_event) <data>: Change type to
2648 gdb_client_data instance instead of gdb_client_data pointer.
2649 (append_callback_event): Adjust.
2650
421530db
PL
26512015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2652
2653 * linux-aarch64-low.c: Add comments for each linux_target_ops
2654 method. Remove comments already covered in target_ops and
2655 linux_target_ops definitions.
2656 (the_low_target): Add comments for each unimplemented method.
2657
c2d65f38
YQ
26582015-07-09 Yao Qi <yao.qi@linaro.org>
2659
2660 * linux-aarch64-low.c (aarch64_regmap): Remove.
2661 (aarch64_usrregs_info): Remove.
2662 (regs_info): Set field usrregs to NULL.
2663
b20a6524
MM
26642015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2665
2666 * linux-low.c: Include "rsp-low.h"
2667 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2668 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2669 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2670 (handle_btrace_enable_pt): New.
2671 (handle_btrace_general_set): Support "pt".
2672 (handle_btrace_conf_general_set): Support "pt:size".
2673
96c97461
PL
26742015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2675
2676 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2677 Z_PACKET_SW_BP.
2678
37d66942
PL
26792015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2680
2681 * linux-aarch64-low.c: Remove comment about endianness.
2682 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2683 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2684 memcmp.
2685
dc06243f
GB
26862015-06-24 Gary Benson <gbenson@redhat.com>
2687
2688 * linux-i386-ipa.c (stdint.h): Do not include.
2689 * lynx-i386-low.c (stdint.h): Likewise.
2690 * lynx-ppc-low.c (stdint.h): Likewise.
2691 * mem-break.c (stdint.h): Likewise.
2692 * thread-db.c (stdint.h): Likewise.
2693 * tracepoint.c (stdint.h): Likewise.
2694 * win32-low.c (stdint.h): Likewise.
2695
124e13d9
SM
26962015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2697
2698 * server.c (write_qxfer_response): Update call to
2699 remote_escape_output.
2700
909c2cda
JK
27012015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2702 Jan Kratochvil <jan.kratochvil@redhat.com>
2703
2704 Merge multiple hex conversions.
2705 * gdbreplay.c (tohex): Rename to 'fromhex'.
2706 (logchar): Use fromhex.
2707
24c05f46
JK
27082015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2709
2710 * server.c (handle_qxfer_libraries): Set `version' attribute for
2711 <library-list>.
2712
14d2069a
GB
27132015-06-10 Gary Benson <gbenson@redhat.com>
2714
2715 * target.h (struct target_ops) <multifs_open>: New field.
2716 <multifs_unlink>: Likewise.
2717 <multifs_readlink>: Likewise.
2718 * linux-low.c (nat/linux-namespaces.h): New include.
2719 (linux_target_ops): Initialize the_target->multifs_open,
2720 the_target->multifs_unlink and the_target->multifs_readlink.
2721 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2722 * hostio.c (hostio_fs_pid): New static variable.
2723 (hostio_handle_new_gdb_connection): New function.
2724 (handle_setfs): Likewise.
2725 (handle_open): Use the_target->multifs_open as appropriate.
2726 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2727 (handle_readlink): Use the_target->multifs_readlink as
2728 appropriate.
2729 (handle_vFile): Handle vFile:setfs packets.
2730 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2731 after target_handle_new_gdb_connection.
2732
4b8b5e72
GB
27332015-06-10 Gary Benson <gbenson@redhat.com>
2734
2735 * configure.ac (AC_CHECK_FUNCS): Add setns.
2736 * config.in: Regenerate.
2737 * configure: Likewise.
2738 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2739 (linux-namespaces.o): New rule.
2740 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2741
3ac2e371
GB
27422015-06-09 Gary Benson <gbenson@redhat.com>
2743
2744 * hostio.c (handle_open): Process mode argument with
2745 fileio_to_host_mode.
2746
ca9b78ce
YQ
27472015-06-01 Yao Qi <yao.qi@linaro.org>
2748
2749 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2750 * linux-x86-low.c: Likewise.
2751
bfacd19d
DB
27522015-05-28 Don Breazeal <donb@codesourcery.com>
2753
2754 * linux-low.c (handle_extended_wait): Initialize
2755 thread_info.last_resume_kind for new fork children.
2756
452003ef
PA
27572015-05-15 Pedro Alves <palves@redhat.com>
2758
2759 * target.h (target_handle_new_gdb_connection): Rewrite using if
2760 wrapped in do/while.
2761
1041a03c
JB
27622015-05-14 Joel Brobecker <brobecker@adacore.com>
2763
2764 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2765 * configure, config.in: Regenerate.
2766 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2767 Declare typedef.
2768
c269dbdb
DB
27692015-05-12 Don Breazeal <donb@codesourcery.com>
2770
2771 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2772 PTRACE_EVENT_VFORK_DONE.
2773 (linux_low_ptrace_options, extended_event_reported): Add vfork
2774 events.
2775 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2776 and "vforkdone" for RSP 'T' Stop Reply Packet.
2777 * server.h (report_vfork_events): Declare
2778 global variable.
2779
3a8a0396
DB
27802015-05-12 Don Breazeal <donb@codesourcery.com>
2781
2782 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2783 (the_low_target) <new_fork>: Initialize new member.
2784 * linux-arm-low.c (arm_new_fork): New function.
2785 (the_low_target) <new_fork>: Initialize new member.
2786 * linux-low.c (handle_extended_wait): Call new target function
2787 new_fork.
2788 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2789 * linux-mips-low.c (mips_add_watchpoint): New function
2790 extracted from mips_insert_point.
2791 (the_low_target) <new_fork>: Initialize new member.
2792 (mips_linux_new_fork): New function.
2793 (mips_insert_point): Call mips_add_watchpoint.
2794 * linux-x86-low.c (x86_linux_new_fork): New function.
2795 (the_low_target) <new_fork>: Initialize new member.
2796
de0d863e
DB
27972015-05-12 Don Breazeal <donb@codesourcery.com>
2798
2799 * linux-low.c (handle_extended_wait): Implement return value,
2800 rename argument 'event_child' to 'event_lwp', handle
2801 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2802 (linux_low_ptrace_options): New function.
2803 (linux_low_filter_event): Call linux_low_ptrace_options,
2804 use different argument fo linux_enable_event_reporting,
2805 use return value from handle_extended_wait.
2806 (extended_event_reported): New function.
2807 (linux_wait_1): Call extended_event_reported and set
2808 status to report fork events.
2809 (linux_write_memory): Add pid to debug message.
2810 (reset_lwp_ptrace_options_callback): New function.
2811 (linux_handle_new_gdb_connection): New function.
2812 (linux_target_ops): Initialize new structure member.
2813 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2814 * lynx-low.c: Initialize new structure member.
2815 * remote-utils.c (prepare_resume_reply): Implement stop reason
2816 "fork" for "T" stop message.
2817 * server.c (handle_query): Call handle_new_gdb_connection.
2818 * server.h (report_fork_events): Declare global flag.
2819 * target.h (struct target_ops) <handle_new_gdb_connection>:
2820 New member.
2821 (target_handle_new_gdb_connection): New macro.
2822 * win32-low.c: Initialize new structure member.
2823
ddcbc397
DB
28242015-05-12 Don Breazeal <donb@codesourcery.com>
2825
2826 * mem-break.c (APPEND_TO_LIST): Define macro.
2827 (clone_agent_expr): New function.
2828 (clone_one_breakpoint): New function.
2829 (clone_all_breakpoints): New function.
2830 * mem-break.h: Declare new functions.
2831
89245bc0
DB
28322015-05-12 Don Breazeal <donb@codesourcery.com>
2833
2834 * linux-low.c (linux_supports_fork_events): New function.
2835 (linux_supports_vfork_events): New function.
2836 (linux_target_ops): Initialize new structure members.
2837 (initialize_low): Call linux_check_ptrace_features.
2838 * lynx-low.c (lynx_target_ops): Initialize new structure
2839 members.
2840 * server.c (report_fork_events, report_vfork_events):
2841 New global flags.
2842 (handle_query): Add new features to qSupported packet and
2843 response.
2844 (captured_main): Initialize new global variables.
2845 * target.h (struct target_ops) <supports_fork_events>:
2846 New member.
2847 <supports_vfork_events>: New member.
2848 (target_supports_fork_events): New macro.
2849 (target_supports_vfork_events): New macro.
2850 * win32-low.c (win32_target_ops): Initialize new structure
2851 members.
2852
835205d0
GB
28532015-05-12 Gary Benson <gbenson@redhat.com>
2854
2855 * server.c (handle_qxfer_exec_file): Use current process
2856 if annex is empty.
2857
21e94bd9
SL
28582015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2859
2860 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2861 Remove HAVE_PTRACE_GETREGS conditionals.
2862 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2863 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2864
45614f15
YQ
28652015-05-08 Yao Qi <yao.qi@linaro.org>
2866
2867 * linux-low.c (linux_supports_conditional_breakpoints): New
2868 function.
2869 (linux_target_ops): Install new target method.
2870 * lynx-low.c (lynx_target_ops): Install NULL hook for
2871 supports_conditional_breakpoints.
2872 * nto-low.c (nto_target_ops): Likewise.
2873 * spu-low.c (spu_target_ops): Likewise.
2874 * win32-low.c (win32_target_ops): Likewise.
2875 * server.c (handle_query): Check
2876 target_supports_conditional_breakpoints.
2877 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2878 New field.
2879 (target_supports_conditional_breakpoints): New macro.
2880
80ad801e
PA
28812015-05-06 Pedro Alves <palves@redhat.com>
2882
2883 PR server/18081
2884 * server.c (start_inferior): If the process exits, mourn it.
2885
819843c7
GB
28862015-04-21 Gary Benson <gbenson@redhat.com>
2887
2888 * hostio.c (fileio_open_flags_to_host): Factored out to
2889 fileio_to_host_openflags in common/fileio.c. Single use
2890 updated.
2891
a2d5a9d7
MF
28922015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2893
2894 * linux-xtensa-low.c (xtensa_fill_gregset)
2895 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2896 XCHAL_HAVE_LOOP.
2897
deb44829
MF
28982015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2899
2900 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2901 (regs_info): Replace usrregs pointer with NULL.
2902
e57f1de3
GB
29032015-04-17 Gary Benson <gbenson@redhat.com>
2904
2905 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2906 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2907 * server.c (handle_qxfer_exec_file): New function.
2908 (qxfer_packets): Add exec-file entry.
2909 (handle_query): Report qXfer:exec-file:read as supported packet.
2910
62828379
RN
29112015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2912
2913 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2914
b88bb450
GB
29152015-04-09 Gary Benson <gbenson@redhat.com>
2916
2917 * hostio-errno.c (errno_to_fileio_error): Remove function.
2918 Update caller to use remote_fileio_to_fio_error.
2919
c8f4bfdd
YQ
29202015-04-09 Yao Qi <yao.qi@linaro.org>
2921
2922 * linux-low.c (linux_insert_point): Call
2923 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2924 (linux_remove_point): Call remove_memory_breakpoint if type is
2925 raw_bkpt_type_sw.
2926 * linux-x86-low.c (x86_insert_point): Don't call
2927 insert_memory_breakpoint.
2928 (x86_remove_point): Don't call remove_memory_breakpoint.
2929
41f98f02
PA
29302015-04-01 Pedro Alves <palves@redhat.com>
2931 Cleber Rosa <crosa@redhat.com>
2932
2933 * server.c (gdbserver_usage): Reorganize and extend the usage
2934 message.
2935
2bf6fb9d
PA
29362015-03-24 Pedro Alves <palves@redhat.com>
2937
2938 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2939 output. Also dump TRAP_TRACE.
2940 (linux_low_filter_event): In debug output, distinguish a
2941 resume_stop SIGSTOP from a delayed SIGSTOP.
2942
369f6daa
GB
29432015-03-24 Gary Benson <gbenson@redhat.com>
2944
2945 * linux-x86-low.c (x86_linux_new_thread): Moved to
2946 nat/x86-linux.c.
2947 (x86_linux_prepare_to_resume): Likewise.
2948
8e5d4070
GB
29492015-03-24 Gary Benson <gbenson@redhat.com>
2950
2951 * Makefile.in (x86-linux-dregs.o): New rule.
2952 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2953 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2954 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2955 (x86_linux_dr_get): Likewise.
2956 (x86_linux_dr_set): Likewise.
2957 (update_debug_registers_callback): Likewise.
2958 (x86_linux_dr_set_addr): Likewise.
2959 (x86_linux_dr_get_addr): Likewise.
2960 (x86_linux_dr_set_control): Likewise.
2961 (x86_linux_dr_get_control): Likewise.
2962 (x86_linux_dr_get_status): Likewise.
2963 (x86_linux_update_debug_registers): Likewise.
2964
2b95d440
GB
29652015-03-24 Gary Benson <gbenson@redhat.com>
2966
2967 * linux-x86-low.c (x86_linux_update_debug_registers):
2968 New function, factored out from...
2969 (x86_linux_prepare_to_resume): ...this.
2970
14b0bc68
GB
29712015-03-24 Gary Benson <gbenson@redhat.com>
2972
2973 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2974 (x86_linux_dr_set): Likewise.
2975 (update_debug_registers_callback): Likewise.
2976 (x86_linux_dr_set_addr): Likewise.
2977 (x86_linux_dr_get_addr): Likewise.
2978 (x86_linux_dr_set_control): Likewise.
2979 (x86_linux_dr_get_control): Likewise.
2980 (x86_linux_dr_get_status): Likewise.
2981 (x86_linux_prepare_to_resume): Likewise.
2982
5dfe6ca8
GB
29832015-03-24 Gary Benson <gbenson@redhat.com>
2984
2985 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2986 Use perror_with_name. Pass string through gettext.
2987 (x86_linux_dr_set): Likewise.
2988
d33472ad
GB
29892015-03-24 Gary Benson <gbenson@redhat.com>
2990
2991 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2992 (x86_linux_dr_set_addr): ...this.
2993 (x86_dr_low_get_addr): Rename to...
2994 (x86_linux_dr_get_addr): ...this.
2995 (x86_dr_low_set_control): Rename to...
2996 (x86_linux_dr_set_control): ...this.
2997 (x86_dr_low_get_control): Rename to...
2998 (x86_linux_dr_get_control): ...this.
2999 (x86_dr_low_get_status): Rename to...
3000 (x86_linux_dr_get_status): ...this.
3001 (x86_dr_low): Update with new function names.
3002
4b134ca1
GB
30032015-03-24 Gary Benson <gbenson@redhat.com>
3004
3005 * Makefile.in (x86-linux.o): New rule.
3006 * configure.srv: Add x86-linux.o to relevant targets.
3007 * linux-low.c (lwp_set_arch_private_info): New function.
3008 (lwp_arch_private_info): Likewise.
3009 * linux-x86-low.c: Include nat/x86-linux.h.
3010 (arch_lwp_info): Removed structure.
3011 (update_debug_registers_callback):
3012 Use lwp_set_debug_registers_changed.
3013 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3014 and lwp_set_debug_registers_changed.
3015 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3016
34c703da
GB
30172015-03-24 Gary Benson <gbenson@redhat.com>
3018
3019 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3020 * linux-arm-low.c (arm_new_thread): Likewise.
3021 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3022 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3023 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3024 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3025
cff068da
GB
30262015-03-24 Gary Benson <gbenson@redhat.com>
3027
3028 * linux-low.c (ptid_of_lwp): New function.
3029 (lwp_is_stopped): Likewise.
3030 (lwp_stop_reason): Likewise.
3031 * linux-x86-low.c (update_debug_registers_callback):
3032 Use lwp_is_stopped.
3033 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3034 lwp_stop_reason.
3035
b2f7c7e8
GB
30362015-03-24 Gary Benson <gbenson@redhat.com>
3037
3038 * linux-low.h (linux_stop_lwp): Remove declaration.
3039
6d4ee8c6
GB
30402015-03-24 Gary Benson <gbenson@redhat.com>
3041
3042 * linux-low.h: Include nat/linux-nat.h.
3043 * linux-low.c (iterate_over_lwps_args): New structure.
3044 (iterate_over_lwps_filter): New function.
3045 (iterate_over_lwps): Likewise.
3046 * linux-x86-low.c (update_debug_registers_callback):
3047 Update signature to what iterate_over_lwps expects.
3048 Remove PID check that iterate_over_lwps now performs.
3049 (x86_dr_low_set_addr): Use iterate_over_lwps.
3050 (x86_dr_low_set_control): Likewise.
3051
70a0bb6b
GB
30522015-03-24 Gary Benson <gbenson@redhat.com>
3053
3054 * linux-x86-low.c (x86_debug_reg_state): New function.
3055 (x86_linux_prepare_to_resume): Use the above.
3056
7b669087
GB
30572015-03-24 Gary Benson <gbenson@redhat.com>
3058
3059 * linux-low.c (current_lwp_ptid): New function.
3060 * linux-x86-low.c: Include nat/linux-nat.h.
3061 (x86_dr_low_get_addr): Use current_lwp_ptid.
3062 (x86_dr_low_get_control): Likewise.
3063 (x86_dr_low_get_status): Likewise.
3064
eef49a3d
PA
30652015-03-20 Pedro Alves <palves@redhat.com>
3066
3067 * tracepoint.c (cmd_qtstatus): Make "str" const.
3068
b2333d22
PA
30692015-03-20 Pedro Alves <palves@redhat.com>
3070
3071 * server.c (handle_general_set): Make "req_str" const.
3072
23f238d3
PA
30732015-03-19 Pedro Alves <palves@redhat.com>
3074
3075 * linux-low.c (linux_resume_one_lwp): Rename to ...
3076 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3077 instead call perror_with_name.
3078 (check_ptrace_stopped_lwp_gone): New function.
3079 (linux_resume_one_lwp): Reimplement as wrapper around
3080 linux_resume_one_lwp_throw that swallows errors if the LWP is
3081 gone.
3082
91baf43f
PA
30832015-03-19 Pedro Alves <palves@redhat.com>
3084
3085 * linux-low.c (count_events_callback, select_event_lwp_callback):
3086 No longer check whether the thread has resume_stop as last resume
3087 kind.
3088
8bf3b159
PA
30892015-03-19 Pedro Alves <palves@redhat.com>
3090
3091 * linux-low.c (count_events_callback, select_event_lwp_callback):
3092 Use the lwp's status_pending_p field, not the thread's.
3093
b90fc188
PA
30942015-03-19 Pedro Alves <palves@redhat.com>
3095
3096 * linux-low.c (select_event_lwp_callback): Update comments to
3097 no longer mention SIGTRAP.
3098
464b0089
GB
30992015-03-18 Gary Benson <gbenson@redhat.com>
3100
3101 * server.c (handle_query): Do not report vFile:fstat as supported.
3102
aa9e327f
GB
31032015-03-11 Gary Benson <gbenson@redhat.com>
3104
3105 * hostio.c (sys/types.h): New include.
3106 (sys/stat.h): Likewise.
3107 (common-remote-fileio.h): Likewise.
3108 (handle_fstat): New function.
3109 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3110
791c0056
GB
31112015-03-11 Gary Benson <gbenson@redhat.com>
3112
3113 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3114 struct stat.st_blocks and struct stat.st_blksize.
3115 * configure: Regenerate.
3116 * config.in: Likewise.
3117 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3118 (OBS): Add common-remote-fileio.o.
3119 (common-remote-fileio.o): New rule.
3120
9a9df970
PA
31212015-03-09 Pedro Alves <palves@redhat.com>
3122
3123 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3124 'struct sockaddr' pointer in 'accept' call.
3125
9eb1356e
PA
31262015-03-09 Pedro Alves <palves@redhat.com>
3127
3128 Revert:
3129 2015-03-07 Pedro Alves <palves@redhat.com>
3130 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3131 or <winsock2.h> here. Instead include "gdb_socket.h".
3132 (remote_open): Use union gdb_sockaddr_u.
3133 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3134 or <winsock2.h> here. Instead include "gdb_socket.h".
3135 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3136 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3137 or <sys/un.h>.
3138 (init_named_socket, gdb_agent_helper_thread): Use union
3139 gdb_sockaddr_u.
3140
aac331e4
PA
31412015-03-07 Pedro Alves <palves@redhat.com>
3142
3143 * configure.ac (build_warnings): Move
3144 -Wdeclaration-after-statement to the C-specific set.
3145 * configure: Regenerate.
3146
366c75fc
PA
31472015-03-07 Pedro Alves <palves@redhat.com>
3148
3149 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3150 or <winsock2.h> here. Instead include "gdb_socket.h".
3151 (remote_open): Use union gdb_sockaddr_u.
3152 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3153 or <winsock2.h> here. Instead include "gdb_socket.h".
3154 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3155 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3156 or <sys/un.h>.
3157 (init_named_socket, gdb_agent_helper_thread): Use union
3158 gdb_sockaddr_u.
3159
492d29ea
PA
31602015-03-07 Pedro Alves <palves@redhat.com>
3161
3162 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3163 instead.
3164
60a191ed
YQ
31652015-03-06 Yao Qi <yao.qi@linaro.org>
3166
3167 * linux-aarch64-low.c (aarch64_insert_point): Use
3168 show_debug_regs as a boolean.
3169 (aarch64_remove_point): Likewise.
3170
f5771b1d
PA
31712015-03-05 Pedro Alves <palves@redhat.com>
3172
3173 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3174 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3175 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3176 * nto-low.c (nto_target_ops): Likewise.
3177 * spu-low.c (spu_target_ops): Likewise.
3178 * win32-low.c (win32_target_ops): Likewise.
3179
3e572f71
PA
31802015-03-04 Pedro Alves <palves@redhat.com>
3181
72f4393d 3182 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3183 Decide whether a breakpoint triggered based on the SIGTRAP's
3184 siginfo.si_code.
72f4393d
L
3185 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3186 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3187 (linux_low_filter_event): Check for breakpoints before checking
3188 watchpoints.
3189 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3190 siginfo.si_code.
72f4393d
L
3191 (linux_stopped_by_sw_breakpoint)
3192 (linux_supports_stopped_by_sw_breakpoint)
3193 (linux_stopped_by_hw_breakpoint)
3194 (linux_supports_stopped_by_hw_breakpoint): New functions.
3195 (linux_target_ops): Install new target methods.
3e572f71 3196
1ec68e26
PA
31972015-03-04 Pedro Alves <palves@redhat.com>
3198
3199 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3200 * server.c (swbreak_feature, hwbreak_feature): New globals.
3201 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3202 (captured_main): Clear swbreak_feature and hwbreak_feature.
3203 * server.h (swbreak_feature, hwbreak_feature): Declare.
3204 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3205 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3206 supports_stopped_by_hw_breakpoint>: New fields.
3207 (target_supports_stopped_by_sw_breakpoint)
3208 (target_stopped_by_sw_breakpoint)
3209 (target_supports_stopped_by_hw_breakpoint)
3210 (target_stopped_by_hw_breakpoint): Declare.
3211
15c66dd6
PA
32122015-03-04 Pedro Alves <palves@redhat.com>
3213
3214 enum lwp_stop_reason -> enum target_stop_reason
3215 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3216 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3217 (linux_wait_1, stuck_in_jump_pad_callback)
3218 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3219 (linux_stopped_by_watchpoint):
3220 * linux-low.h (enum lwp_stop_reason): Delete.
3221 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3222 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3223
98fc70d6
YQ
32242015-03-04 Yao Qi <yao.qi@linaro.org>
3225
3226 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3227
dd2ac174
GB
32282015-03-03 Gary Benson <gbenson@redhat.com>
3229
3230 * hostio.c (handle_vFile): Fix prefix lengths.
3231
d68e53f4
MM
32322015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3233
3234 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3235 ptr_bits.
3236
bf2d68ab
AA
32372015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3238
3239 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3240 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3241 (clean): Add "rm -f" for above C files.
3242 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3243 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3244 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3245 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3246 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3247 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3248 (init_registers_s390x_vx_linux64)
3249 (init_registers_s390x_tevx_linux64)
3250 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3251 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3252 declarations.
3253 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3254 (s390_store_vxrs_high): New functions.
3255 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3256 NT_S390_VXRS_HIGH.
3257 (s390_arch_setup): Add logic for selecting one of the new target
3258 descriptions. Activate the new vector regsets if applicable.
3259 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3260 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3261 and init_registers_s390x_tevx_linux64.
3262
c966a859
PA
32632015-03-01 Pedro Alves <palves@redhat.com>
3264
3265 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3266 parameter.
3267
4180215b
PA
32682015-02-27 Pedro Alves <palves@redhat.com>
3269
3270 * linux-x86-low.c (u_debugreg_offset): New function.
3271 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3272
749bab01
PA
32732015-02-27 Pedro Alves <palves@redhat.com>
3274
3275 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3276 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3277 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3278 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3279 (ps_lsetfpregs, ps_getpid)
3280 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3281 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3282 (ps_lsetxregs, ps_plog): Declare.
3283
3c14e5a3
PA
32842015-02-27 Pedro Alves <palves@redhat.com>
3285
3286 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3287 IP_AGENT_EXPORT_FUNC.
3288 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3289 IP_AGENT_EXPORT_FUNC.
3290 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3291 (IP_AGENT_EXPORT): Delete.
3292 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3293 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3294 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3295 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3296 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3297 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3298 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3299 (traceframe_read_count, traceframe_write_count)
3300 (traceframes_created, trace_state_variables, get_raw_reg)
3301 (get_trace_state_variable_value, set_trace_state_variable_value)
3302 (ust_loaded, helper_thread_id, cmd_buf): Use
3303 IPA_SYM_EXPORTED_NAME.
3304 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3305 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3306 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3307 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3308 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3309 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3310 EXTERN_C_PUSH/EXTERN_C_POP.
3311 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3312 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3313 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3314 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3315 (traceframe_write_count, traceframe_read_count)
3316 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3317 (about_to_request_buffer_space, get_trace_state_variable_value)
3318 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3319 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3320 EXTERN_C_PUSH/EXTERN_C_POP.
3321 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3322 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3323 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3324 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3325 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3326 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3327 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3328 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3329 Define.
3330 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3331 (IP_AGENT_EXPORT_VAR_DECL): Define.
3332 (tracing): Declare.
3333 (gdb_agent_get_raw_reg): Declare.
3334
fe978cb0
PA
33352015-02-27 Tom Tromey <tromey@redhat.com>
3336 Pedro Alves <palves@redhat.com>
3337
3338 Rename symbols whose names are reserved C++ keywords throughout.
3339
3bc3d82a
PA
33402015-02-27 Pedro Alves <palves@redhat.com>
3341
3342 * Makefile.in (COMPILER): New, get it from autoconf.
3343 (CXX): Get from autoconf instead.
3344 (COMPILE.pre): Use COMPILER.
3345 (CC-LD): Rename to ...
3346 (CC_LD): ... this. Use COMPILER.
3347 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3348 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3349 * acinclude.m4: Include build-with-cxx.m4.
3350 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3351 Disable -Werror by default if building in C++ mode.
3352 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3353 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3354 the C++ compiler. Save/restore CXXFLAGS too.
3355 * configure: Regenerate.
3356
07697489
PA
33572015-02-27 Pedro Alves <palves@redhat.com>
3358
3359 * acinclude.m4: Include libiberty.m4.
3360 * configure.ac: Call libiberty_INIT.
3361 * config.in, configure: Regenerate.
3362
9beb7c4e
PA
33632015-02-26 Pedro Alves <palves@redhat.com>
3364
3365 * linux-low.c (linux_wait_1): When incrementing the PC past a
3366 program breakpoint always use the_low_target.breakpoint_len as
3367 increment, rather than the maximum between that and
3368 the_low_target.decr_pc_after_break.
3369
8090aef2
PA
33702015-02-23 Pedro Alves <palves@redhat.com>
3371
3372 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3373 thread was doing a step-over; always adjust the PC if
3374 we stepped over a permanent breakpoint.
3375 (linux_wait_1): If we stepped over breakpoint that was on top of a
3376 permanent breakpoint, manually advance the PC past it.
3377
bc9540e8
PA
33782015-02-23 Pedro Alves <palves@redhat.com>
3379
3380 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3381 modes.
3382 (x86_fill_gregset, x86_store_gregset): Use it when handling
3383 $orig_eax.
3384
2db9a427
PA
33852015-02-20 Pedro Alves <palves@redhat.com>
3386
3387 * thread-db.c: Include "nat/linux-procfs.h".
3388 (thread_db_init): Skip listing new threads if the kernel supports
3389 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3390
afa8d396
PA
33912015-02-20 Pedro Alves <palves@redhat.com>
3392
3393 * linux-low.c (status_pending_p_callback): Use ptid_match.
3394
c9587f88
AT
33952015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3396
3397 PR breakpoints/16812
3398 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3399 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3400 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3401
b05ec7a5
AT
34022015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3403
3404 PR breakpoints/15956
3405 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3406
d33501a5
MM
34072015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3408
3409 * linux-low.c (linux_low_btrace_conf): Print size.
3410 * server.c (handle_btrace_conf_general_set): New.
3411 (hanle_general_set): Call handle_btrace_conf_general_set.
3412 (handle_query): Report Qbtrace-conf:bts:size as supported.
3413
f4abbc16
MM
34142015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3415
3416 * linux-low.c (linux_low_enable_btrace): Update parameters.
3417 (linux_low_btrace_conf): New.
3418 (linux_target_ops)<to_btrace_conf>: Initialize.
3419 * server.c (current_btrace_conf): New.
3420 (handle_btrace_enable): Rename to ...
3421 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3422 to target_enable_btrace. Update comment. Update users.
3423 (handle_qxfer_btrace_conf): New.
3424 (qxfer_packets): Add btrace-conf entry.
3425 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3426 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3427 (target_ops)<read_btrace_conf>: New.
3428 (target_enable_btrace): Update parameters.
3429 (target_read_btrace_conf): New.
3430
043c3577
MM
34312015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3432
3433 * server.c (handle_btrace_general_set): Remove call to
3434 target_supports_btrace.
3435 (supported_btrace_packets): New.
3436 (handle_query): Call supported_btrace_packets.
3437 * target.h: include btrace-common.h.
3438 (btrace_target_info): Removed.
3439 (supports_btrace, target_supports_btrace): Update parameters.
3440
734b0e4b
MM
34412015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3442
3443 * Makefile.in (SFILES): Add common/btrace-common.c.
3444 (OBS): Add common/btrace-common.o.
3445 (btrace-common.o): Add build rules.
3446 * linux-low: Include btrace-common.h.
3447 (linux_low_read_btrace): Use struct btrace_data. Call
3448 btrace_data_init and btrace_data_fini.
3449
d6c146e9
PA
34502015-02-06 Pedro Alves <palves@redhat.com>
3451
3452 * thread-db.c (find_new_threads_callback): Add debug output.
3453
20ba1ce6
PA
34542015-02-04 Pedro Alves <palves@redhat.com>
3455
3456 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3457 (resume_stopped_resumed_lwps): New function.
3458 (linux_wait_for_event_filtered): Use it.
3459
8cc73a39
SDJ
34602015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3461
3462 * Makefile.in (SFILES): Add linux-personality.c.
3463 (linux-personality.o): New rule.
3464 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3465 list of objects to be built.
3466 * linux-low.c: Include nat/linux-personality.h.
3467 (linux_create_inferior): Remove code to disable address space
3468 randomization (moved to ../nat/linux-personality.c). Create
3469 cleanup to disable address space randomization.
3470
fb23d554
SDJ
34712015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3472
3473 * Makefile.in (posix-strerror.o): New rule.
3474 (mingw-strerror.o): Likewise.
3475 * configure: Regenerated.
3476 * configure.ac: Source file ../common/common.host. Initialize new
3477 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3478
cdf43629
YQ
34792015-01-14 Yao Qi <yao@codesourcery.com>
3480
3481 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3482 (ppc-linux.o): New rule.
3483 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3484 * configure.ac: AC_CHECK_FUNCS(getauxval).
3485 * config.in: Re-generated.
3486 * configure: Re-generated.
3487 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3488 ppc64_64bit_inferior_p
3489
514c5338
YQ
34902015-01-14 Yao Qi <yao@codesourcery.com>
3491
3492 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3493 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3494 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3495 (PT_ORIG_R3, PT_TRAP): Likewise.
3496 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3497 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3498 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3499
3368c1e5
JB
35002015-01-10 Joel Brobecker <brobecker@adacore.com>
3501
3502 * i387-fp.c (i387_cache_to_xsave): In look over
3503 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3504 zmmh_low_space field by use of zmmh_high_space.
3505
582511be
PA
35062015-01-09 Pedro Alves <palves@redhat.com>
3507
3508 * linux-low.c (step_over_bkpt): Move higher up in the file.
3509 (handle_extended_wait): Don't store the stop_pc here.
3510 (get_stop_pc): Adjust comments and rename to ...
3511 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3512 stopped for a software breakpoint or hardware breakpoint.
3513 (thread_still_has_status_pending_p): New function.
3514 (status_pending_p_callback): Use
3515 thread_still_has_status_pending_p. If the event is no longer
3516 interesting, resume the LWP.
3517 (handle_tracepoints): Add assert.
3518 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3519 (wstatus_maybe_breakpoint): New function.
3520 (cancel_breakpoint): Delete function.
3521 (check_stopped_by_watchpoint): New function, factored out from
3522 linux_low_filter_event.
3523 (lp_status_maybe_breakpoint): Delete function.
3524 (linux_low_filter_event): Remove filter_ptid argument.
3525 Leave thread group exits pending here. Store the LWP's stop PC.
3526 Always leave events pending.
3527 (linux_wait_for_event_filtered): Pull all events out of the
3528 kernel, and leave them all pending.
3529 (count_events_callback, select_event_lwp_callback): Consider all
3530 events.
3531 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3532 (select_event_lwp): Only give preference to the stepping LWP in
3533 all-stop mode. Adjust comments.
3534 (ignore_event): New function.
3535 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3536 references to cancel_breakpoints. Adjust to renames. Also give
3537 equal priority to all LWPs that have had events in non-stop mode.
3538 If reporting a software breakpoint event, unadjust the LWP's PC.
3539 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3540 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3541 Adjust.
3542 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3543 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3544 (linux_stopped_by_watchpoint): Adjust.
3545 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3546 * linux-low.h (enum lwp_stop_reason): New.
3547 (struct lwp_info) <stop_pc>: Adjust comment.
3548 <stopped_by_watchpoint>: Delete field.
3549 <stop_reason>: New field.
3550 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3551 * mem-break.c (software_breakpoint_inserted_here)
3552 (hardware_breakpoint_inserted_here): New function.
3553 * mem-break.h (software_breakpoint_inserted_here)
3554 (hardware_breakpoint_inserted_here): Declare.
3555 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3556 (cancel_breakpoints): Delete.
3557 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3558 (upload_fast_traceframes): Remove references to
3559 cancel_breakpoints.
3560
a33e3959
PA
35612015-01-09 Pedro Alves <palves@redhat.com>
3562
3563 * thread-db.c (find_new_threads_callback): Ignore thread if the
3564 kernel thread ID is -1.
3565
8784d563
PA
35662015-01-09 Pedro Alves <palves@redhat.com>
3567
3568 * linux-low.c (linux_attach_fail_reason_string): Move to
3569 nat/linux-ptrace.c, and rename.
3570 (linux_attach_lwp): Update comment.
3571 (attach_proc_task_lwp_callback): New function.
3572 (linux_attach): Adjust to rename and use
3573 linux_proc_attach_tgid_threads.
3574 (linux_attach_fail_reason_string): Delete declaration.
3575
76f2b779
JB
35762015-01-01 Joel Brobecker <brobecker@adacore.com>
3577
3578 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3579 * server.c (gdbserver_version): Likewise.
3580
fafcc06a
SDJ
35812014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3582
3583 * remote-utils.c: Include ctype.h.
3584 (input_interrupt): Explicitly handle the case when the char
3585 received is the NUL byte. Improve the printing of non-ASCII
3586 characters.
3587
beed38b8
JB
35882014-12-16 Joel Brobecker <brobecker@adacore.com>
3589
3590 * linux-low.c (linux_low_filter_event): Update call to
3591 linux_enable_event_reporting following the addition of
3592 a new parameter to that function.
3593
bf330350
CU
35942014-12-16 Catalin Udma <catalin.udma@freescale.com>
3595
3596 PR server/17457
3597 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3598 (AARCH64_FPCR_REGNO): Likewise.
3599 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3600 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3601 (aarch64_store_fpregset): Likewise.
3602
5227d625
JB
36032014-12-15 Joel Brobecker <brobecker@adacore.com>
3604
3605 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3606 Remove FIXME comment about assumption about N.
3607
f93b65a0
JB
36082014-12-13 Joel Brobecker <brobecker@adacore.com>
3609
3610 * configure.ac: If large-file support is disabled in GDBserver,
3611 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3612 * configure: Regenerate.
3613
e5a9158d
AA
36142014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3615
3616 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3617 warning upon ENODATA from ptrace.
3618 * linux-s390-low.c (s390_store_tdb): New.
3619 (s390_regsets): Add regset for NT_S390_TDB.
3620
feea5f36
AA
36212014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3622
3623 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3624 without a fill_function.
3625 * linux-s390-low.c (s390_fill_last_break): Remove.
3626 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3627 (s390_arch_setup): Use regset's size instead of fill_function for
3628 loop end condition.
3629
098dbe61
AA
36302014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3631
3632 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3633 the regset's store function when ptrace returned an error.
3634 * regcache.c (get_thread_regcache): Invalidate register cache
3635 before fetching inferior's registers.
3636
28eef672
AA
36372014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3638
3639 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3640 while-loop as for-loop.
3641 (regsets_store_inferior_registers): Likewise.
3642
bdca27a2
YQ
36432014-11-28 Yao Qi <yao@codesourcery.com>
3644
3645 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3646 * config.in, configure: Re-generate.
3647 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3648 is defined.
3649
9c232dda
YQ
36502014-11-21 Yao Qi <yao@codesourcery.com>
3651
3652 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3653 (AC_CHECK_HEADERS): Remove malloc.h.
3654 * configure: Re-generated.
3655 * config.in: Re-generated.
3656 * server.h: Don't include alloca.h and malloc.h.
3657 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3658 Don't include malloc.h.
3659
43968415
JB
36602014-11-17 Joel Brobecker <brobecker@adacore.com>
3661
3662 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3663 corresponding ERRNO check in same block.
3664
40e91bc7
PA
36652014-11-12 Pedro Alves <palves@redhat.com>
3666
3667 * server.c (cont_thread): Update comment.
3668 (start_inferior, attach_inferior): No longer clear cont_thread.
3669 (handle_v_cont): No longer set cont_thread.
3670 (captured_main): Clear cont_thread each time a GDB connects.
3671
c2c118cf
PA
36722014-11-12 Pedro Alves <palves@redhat.com>
3673
3674 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3675 thread, and don't resume all threads if the Hc thread has exited.
3676
78708b7c
PA
36772014-11-12 Pedro Alves <palves@redhat.com>
3678
3679 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3680 the process group instead of to a specific LWP.
3681
a2abc7de
PA
36822014-10-15 Pedro Alves <palves@redhat.com>
3683
3684 PR server/17487
3685 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3686 parameter.
3687 (arm_set_thread_context): Delete.
3688 (the_low_target): Adjust.
3689 * win32-i386-low.c (debug_registers_changed)
3690 (debug_registers_used): Delete.
3691 (update_debug_registers_callback): New function.
3692 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3693 needing to update their debug registers.
3694 (win32_get_current_dr): New function.
3695 (x86_dr_low_get_addr, x86_dr_low_get_control)
3696 (x86_dr_low_get_status): Fetch the debug register from the thread
3697 record's context.
3698 (i386_initial_stuff): Adjust.
3699 (i386_get_thread_context): Remove current_event parameter. Don't
3700 clear debug_registers_changed nor copy DR values to
3701 debug_reg_state.
3702 (i386_set_thread_context): Delete.
3703 (i386_prepare_to_resume): New function.
3704 (i386_thread_added): Mark the thread as needing to update irs
3705 debug registers.
3706 (the_low_target): Remove i386_set_thread_context and install
3707 i386_prepare_to_resume.
3708 * win32-low.c (win32_get_thread_context): Adjust.
3709 (win32_set_thread_context): Use SetThreadContext
3710 directly.
3711 (win32_prepare_to_resume): New function.
3712 (win32_require_context): New function, factored out from ...
3713 (thread_rec): ... this.
3714 (continue_one_thread): Call win32_prepare_to_resume on each thread
3715 we're about to continue.
3716 (win32_resume): Call win32_prepare_to_resume on the event thread.
3717 * win32-low.h (struct win32_thread_info)
3718 <debug_registers_changed>: New field.
3719 (struct win32_target_ops): Change prototype of set_thread_context,
3720 delete set_thread_context and add prepare_to_resume.
3721 (win32_require_context): New declaration.
3722
a442d071
GB
37232014-10-08 Gary Benson <gbenson@redhat.com>
3724
3725 * server.h: Do not include common-exceptions.h.
3726
6f1947e8
GB
37272014-10-08 Gary Benson <gbenson@redhat.com>
3728
3729 * server.h: Do not include cleanups.h.
3730
63b434a4
JH
37312014-09-30 James Hogan <james.hogan@imgtec.com>
3732
3733 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3734 mips64-dsp-linux.c.
3735
c4d9ceb6
YQ
37362014-09-23 Yao Qi <yao@codesourcery.com>
3737
3738 * linux-low.c (lp_status_maybe_breakpoint): New function.
3739 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3740 (count_events_callback): Likewise.
3741 (select_event_lwp_callback): Likewise.
3742 (cancel_breakpoints_callback): Likewise.
3743
89a5711c
DB
37442014-09-19 Don Breazeal <donb@codesourcery.com>
3745
3746 * linux-low.c (handle_extended_wait): Call
3747 linux_ptrace_get_extended_event.
3748 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3749 linux_is_extended_waitstatus.
3750
bffc0964
JB
37512014-09-16 Joel Brobecker <brobecker@adacore.com>
3752
3753 * Makefile.in (CPPFLAGS): Define.
3754 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3755 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3756
0bfdf32f
GB
37572014-09-16 Gary Benson <gbenson@redhat.com>
3758
3759 * inferiors.h (current_inferior): Renamed as...
3760 (current_thread): New variable. All uses updated.
3761 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3762 (maybe_move_out_of_jump_pad): Likewise.
3763 (cancel_breakpoint): Likewise.
3764 (linux_low_filter_event): Likewise.
3765 (wait_for_sigstop): Likewise.
3766 (linux_resume_one_lwp): Likewise.
3767 (need_step_over_p): Likewise.
3768 (start_step_over): Likewise.
3769 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3770 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3771 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3772 and save_inferior as saved_thread.
3773 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3774 saved_thread.
3775 (regcache_invalidate_thread): Likewise.
3776 * remote-utils.c (prepare_resume_reply): Likewise.
3777 * thread-db.c (thread_db_get_tls_address): Likewise.
3778 (disable_thread_event_reporting): Likewise.
3779 (remove_thread_event_breakpoints): Likewise.
3780 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3781 as saved_thread.
3782 * target.h (set_desired_inferior): Renamed as...
3783 (set_desired_thread): New declaration. All uses updated.
3784 * server.c (myresume): Updated comment to reference thread instead
3785 of inferior.
3786 (handle_serial_event): Likewise.
3787 (handle_target_event): Likewise.
3788
361c8ade
GB
37892014-09-12 Tom Tromey <tromey@redhat.com>
3790 Gary Benson <gbenson@redhat.com>
3791
3792 * regcache.h: Include common-regcache.h.
3793 (regcache_read_pc): Don't declare.
3794 * regcache.c (get_thread_regcache_for_ptid): New function.
3795
bd9269f7
GB
37962014-09-11 Tom Tromey <tromey@redhat.com>
3797 Gary Benson <gbenson@redhat.com>
3798
3799 * symbol.c: New file.
3800 * Makefile.in (SFILES): Add symbol.c.
3801 (OBS): Add symbol.o.
3802
f8c1d06b
GB
38032014-09-11 Gary Benson <gbenson@redhat.com>
3804
3805 * target.c (target_stop_ptid, target_continue_ptid): New
3806 functions.
3807
721ec300
GB
38082014-09-11 Tom Tromey <tromey@redhat.com>
3809 Gary Benson <gbenson@redhat.com>
3810
3811 * target.h: Include target/target.h.
3812 * target.c (target_read_memory, target_read_uint32)
3813 (target_write_memory): New functions.
3814
c5e92cca
GB
38152014-09-11 Gary Benson <gbenson@redhat.com>
3816
3817 * server.h (debug_hw_points): Don't declare.
3818 * server.c (debug_hw_points): Don't define. Replace all uses
3819 with show_debug_regs.
3820 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3821 all uses with show_debug_regs.
3822
2e4bb98a
EBM
38232014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3824
3825 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3826 endianness into account.
3827 (ppc_supply_ptrace_register): Likewise.
3828
ac740bc7
JH
38292014-09-03 James Hogan <james.hogan@imgtec.com>
3830
3831 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3832 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3833
97ea6506
GB
38342014-09-03 Gary Benson <gbenson@redhat.com>
3835
3836 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3837 ALL_DEBUG_ADDRESS_REGISTERS.
3838
df7e5265
GB
38392014-09-02 Gary Benson <gbenson@redhat.com>
3840
3841 * i386-low.h: Renamed as...
3842 * x86-low.h: New file. All type, function and variable name
3843 prefixes changed from "i386_" to "x86_". All references updated.
3844 * i386-low.c: Renamed as...
3845 * x86-low.c: New file. All type, function and variable name
3846 prefixes changed from "i386_" to "x86_". All references updated.
3847
ed859da7
GB
38482014-09-02 Gary Benson <gbenson@redhat.com>
3849
3850 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3851 (x86_linux_new_thread): Likewise.
3852
860789c7
GB
38532014-08-29 Gary Benson <gbenson@redhat.com>
3854
3855 * server.h (setjmp.h): Do not include.
3856 (toplevel): Do not declare.
3857 (common-exceptions.h): Include.
3858 (cleanups.h): Likewise.
3859 * server.c (toplevel): Do not define.
3860 (exit_code): New static global.
3861 (detach_or_kill_for_exit_cleanup): New function.
3862 (main): New function. Original main renamed to...
3863 (captured_main): New function.
3864 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3865
ff55e1b5
GB
38662014-08-29 Gary Benson <gbenson@redhat.com>
3867
3868 * Makefile.in (SFILES): Add common/common-exceptions.c.
3869 (OBS): Add common-exceptions.o.
3870 (common-exceptions.o): New rule.
3871 * utils.c (prepare_to_throw_exception): New function.
3872
e9bcb658
GB
38732014-08-29 Gary Benson <gbenson@redhat.com>
3874
3875 * config.in: Regenerate.
3876 * configure: Likewise.
3877
e3180625
GB
38782014-08-29 Gary Benson <gbenson@redhat.com>
3879
3880 * Makefile.in (SFILES): Add common/cleanups.c.
3881 (OBS): cleanups.o.
3882 (cleanups.o): New rule.
3883
e3d6ba5d
GB
38842014-08-29 Gary Benson <gbenson@redhat.com>
3885
3886 * utils.c (internal_vwarning): New function.
3887
7096e886
GB
38882014-08-28 Gary Benson <gbenson@redhat.com>
3889
3890 * utils.h (fatal): Remove declaration.
3891 * utils.c (fatal): Remove function.
3892
14ce3192
GB
38932014-08-28 Gary Benson <gbenson@redhat.com>
3894
3895 * tracepoint.c (gdb_agent_init): Replace fatal with
3896 perror_with_name.
3897 (initialize_tracepoint): Likewise.
3898
50278d59
GB
38992014-08-28 Gary Benson <gbenson@redhat.com>
3900
3901 * remote-utils.c (remote_prepare): Replace fatal with error.
3902
aa96c426
GB
39032014-08-28 Gary Benson <gbenson@redhat.com>
3904
3905 * linux-low.c (linux_async): Replace fatal with warning.
3906 Tidy up and return.
3907 (linux_start_non_stop): Return -1 if linux_async failed.
3908
f7160e97
GB
39092014-08-28 Gary Benson <gbenson@redhat.com>
3910
3911 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3912 gdb_assert.
3913 (i386_dr_low_get_addr): Remove vague comment.
3914 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3915 gdb_assert.
3916
38e08fca
GB
39172014-08-28 Gary Benson <gbenson@redhat.com>
3918
3919 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3920 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3921 internal_error.
3922 (linux_resume_one_lwp): Likewise.
3923 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3924 gdb_assert.
3925 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3926 with internal_error.
3927 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3928 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3929 (find_register_by_name): Replace fatal with internal_error.
3930 (find_regno): Likewise.
3931 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3932 * thread-db.c (thread_db_create_event): Likewise.
3933 (thread_db_load_search): Likewise.
3934 (try_thread_db_load_1): Likewise.
3935 * tracepoint.c (get_jump_space_head): Replace fatal with
3936 internal_error.
3937 (claim_trampoline_space): Likewise.
3938 (have_fast_tracepoint_trampoline_buffer): Likewise.
3939 (cmd_qtstart): Likewise.
3940 (stop_tracing): Likewise.
3941 (fast_tracepoint_collecting): Likewise.
3942 (target_malloc): Likewise.
3943 (download_tracepoint): Likewise.
3944 (download_trace_state_variables): Replace check with gdb_assert.
3945 (upload_fast_traceframes): Replace fatal with internal_error.
3946
34abf635
GB
39472014-08-19 Tom Tromey <tromey@redhat.com>
3948 Gary Benson <gbenson@redhat.com>
3949
3950 * Makefile.in (SFILES): Add common/common-debug.c.
3951 (OBS): Add common-debug.o.
3952 (common-debug.o): New rule.
3953 * debug.h (debug_printf): Don't declare.
3954 * debug.c (debug_printf): Renamed and rewritten as...
3955 (debug_vprintf): New function.
3956
f6e94d78
GB
39572014-08-19 Gary Benson <gbenson@redhat.com>
3958
3959 * utils.h: Do not include print-utils.h.
3960
9239eeab
GB
39612014-08-19 Tom Tromey <tromey@redhat.com>
3962 Gary Benson <gbenson@redhat.com>
3963
3964 * server.h: Add static assertion.
3965 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3966
ef87c8bb
GB
39672014-08-19 Tom Tromey <tromey@redhat.com>
3968 Gary Benson <gbenson@redhat.com>
3969
3970 * Makefile.in (SFILES): Add common/errors.c.
3971 (OBS): Add errors.o.
3972 (IPA_OBS): Add errors-ipa.o.
3973 (errors.o): New rule.
3974 (errors-ipa.o): Likewise.
3975 * utils.h (perror_with_name, error, warning): Don't declare.
3976 * utils.c (warning): Renamed and rewritten as...
3977 (vwarning): New function.
3978 (error): Renamed and rewritten as...
3979 (verror): New function.
3980 (internal_error): Renamed and rewritten as...
3981 (internal_verror): New function.
3982
bb974a24
GB
39832014-08-07 Gary Benson <gbenson@redhat.com>
3984
3985 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3986 * configure: Regenerate.
3987 * config.in: Likewise.
3988 * server.h: Do not include errno.h.
3989 * event-loop.c: Likewise.
3990 * hostio-errno.c: Likewise.
3991 * linux-low.c: Likewise.
3992 * remote-utils.c: Likewise.
3993 * spu-low.c: Likewise.
3994 * utils.c: Likewise.
3995 * gdbreplay.c: Unconditionally include errno.h.
3996
6d3d12eb
GB
39972014-08-07 Gary Benson <gbenson@redhat.com>
3998
3999 * server.h: Do not include string.h.
4000 * event-loop.c: Likewise.
4001 * linux-low.c: Likewise.
4002 * regcache.c: Likewise.
4003 * remote-utils.c: Likewise.
4004 * spu-low.c: Likewise.
4005 * utils.c: Likewise.
4006
dccbb609
GB
40072014-08-07 Gary Benson <gbenson@redhat.com>
4008
4009 * server.h: Do not include gdb_assert.h.
4010
e76df0d0
GB
40112014-08-07 Gary Benson <gbenson@redhat.com>
4012
4013 * server.h: Do not include common-utils.h.
4014
4cb9c816
GB
40152014-08-07 Gary Benson <gbenson@redhat.com>
4016
4017 * server.h: Do not include ptid.h.
4018 * notif.h: Likewise.
4019
3995eeee
GB
40202014-08-07 Gary Benson <gbenson@redhat.com>
4021
4022 * server.h: Do not include gdb_locale.h.
4023
cb9f1a9b
GB
40242014-08-07 Gary Benson <gbenson@redhat.com>
4025
4026 * server.h: Do not include gdb/signals.h.
4027 * win32-low.c: Likewise.
4028
a5fceff8
GB
40292014-08-07 Gary Benson <gbenson@redhat.com>
4030
4031 * server.h: Do not include pathmax.h.
4032
b9391142
GB
40332014-08-07 Gary Benson <gbenson@redhat.com>
4034
4035 * server.h: Do not include libiberty.h.
4036 * linux-bfin-low.c: Likewise.
4037
0e443c87
GB
40382014-08-07 Gary Benson <gbenson@redhat.com>
4039
4040 * server.h: Do not include ansidecl.h.
4041
8ebb3f56
GB
40422014-08-07 Gary Benson <gbenson@redhat.com>
4043
4044 * linux-x86-low.c: Do not include stddef.h.
4045 * lynx-ppc-low.c: Likewise.
4046 * tracepoint.c: Likewise.
4047
8980bdf6
GB
40482014-08-07 Gary Benson <gbenson@redhat.com>
4049
4050 * server.h: Do not include stdarg.h.
4051 * nto-low.c: Likewise.
4052
d7096f71
GB
40532014-08-07 Gary Benson <gbenson@redhat.com>
4054
4055 * server.h: Do not include stdlib.h.
4056 * inferiors.c: Likewise.
4057 * linux-low.c: Likewise.
4058 * regcache.c: Likewise.
4059 * spu-low.c: Likewise.
4060 * tracepoint.c: Likewise.
4061 * utils.c: Likewise.
4062
d02f550d
GB
40632014-08-07 Gary Benson <gbenson@redhat.com>
4064
4065 * server.h: Do not include stdio.h.
4066 * linux-low.c: Likewise.
4067 * remote-utils.c: Likewise.
4068 * spu-low.c: Likewise.
4069 * utils.c: Likewise.
4070 * wincecompat.c: Likewise.
4071
87f6c4e3
GB
40722014-08-06 Gary Benson <gbenson@redhat.com>
4073
4074 * regcache.c (init_register_cache): Move conditionals inside if.
4075
7089dca4
GB
40762014-08-06 Gary Benson <gbenson@redhat.com>
4077
4078 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4079
462f517e
GB
40802014-07-31 Gary Benson <gbenson@redhat.com>
4081
4082 * ax.h: Do not include server.h.
4083 * gdbthread.h: Likewise.
4084 * lynx-low.h: Likewise.
4085 * notif.h: Likewise.
4086
976411d6
GB
40872014-07-30 Gary Benson <gbenson@redhat.com>
4088
4089 * server.h: Include common-defs.h.
4090 Do not include config.h or build-gnulib-gdbserver/config.h.
4091
d41f6d8e
GB
40922014-07-30 Gary Benson <gbenson@redhat.com>
4093
4094 * hostio-errno.c: Move server.h to top of includes list.
4095 * inferiors.c: Likewise.
4096 * linux-x86-low.c: Likewise.
4097 * notif.c: Include server.h.
4098
314c6a35
TT
40992014-07-24 Tom Tromey <tromey@redhat.com>
4100 Gary Benson <gbenson@redhat.com>
4101
4102 * server.h (CORE_ADDR): Now unsigned.
4103
69ff6be5
PA
41042014-07-16 Pedro Alves <palves@redhat.com>
4105
4106 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4107
ce9e3fe7
PA
41082014-07-15 Pedro Alves <palves@redhat.com>
4109
4110 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4111 copy.
4112
e76126e8
PA
41132014-07-11 Pedro Alves <palves@redhat.com>
4114
4115 * linux-low.c (kill_wait_lwp): New function, based on
4116 kill_one_lwp_callback, but use my_waitpid directly.
4117 (kill_one_lwp_callback, linux_kill): Use it.
4118
8e9db26e
PA
41192014-06-23 Pedro Alves <palves@redhat.com>
4120
4121 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4122 before setting DR0..DR3.
4123
698b3e08
GB
41242014-06-20 Gary Benson <gbenson@redhat.com>
4125
4126 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4127 * configure: Regenerated.
4128 * config.in: Likewise.
4129
125f8a3d
GB
41302014-06-20 Gary Benson <gbenson@redhat.com>
4131
4132 * Makefile.in (SFILES): Update locations for files moved
4133 from common to nat.
4134 (object file files): Reordered.
4135
42995dbd
GB
41362014-06-20 Gary Benson <gbenson@redhat.com>
4137
4138 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4139 (i386_dr_low_set_addr): Likewise.
4140 (i386_dr_low_get_addr): Likewise.
4141 (i386_dr_low_can_set_control): Likewise.
4142 (i386_dr_low_set_control): Likewise.
4143 (i386_dr_low_get_control): Likewise.
4144 (i386_dr_low_get_status): Likewise.
4145 (i386_get_debug_register_length): Likewise.
4146 * linux-x86-low.c (i386_dr_low_set_addr):
4147 Changed signature. Made static.
4148 (i386_dr_low_get_addr): Likewise.
4149 (i386_dr_low_set_control): Likewise.
4150 (i386_dr_low_get_control): Likewise.
4151 (i386_dr_low_get_status): Likewise.
4152 (i386_dr_low): New global variable.
4153 * win32-i386-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
e1d2394b
MS
41612014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4162
4163 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4164 * Makefile.in (AR, AR_FLAGS): Define.
4165 * configure: Regenerate.
4166
3a8ee006
GB
41672014-06-19 Gary Benson <gbenson@redhat.com>
4168
4169 * Makefile.in (i386-dregs.o): New rule.
4170 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4171 * i386-low.c (target.h): Remove include.
4172 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4173 (DR_CONTROL_SHIFT): Likewise.
4174 (DR_CONTROL_SIZE): Likewise.
4175 (DR_RW_EXECUTE): Likewise.
4176 (DR_RW_WRITE): Likewise.
4177 (DR_RW_READ): Likewise.
4178 (DR_RW_IORW): Likewise.
4179 (DR_LEN_1): Likewise.
4180 (DR_LEN_2): Likewise.
4181 (DR_LEN_4): Likewise.
4182 (DR_LEN_8): Likewise.
4183 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4184 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4185 (DR_ENABLE_SIZE): Likewise.
4186 (DR_LOCAL_SLOWDOWN): Likewise.
4187 (DR_GLOBAL_SLOWDOWN): Likewise.
4188 (DR_CONTROL_RESERVED): Likewise.
4189 (I386_DR_CONTROL_MASK): Likewise.
4190 (I386_DR_VACANT): Likewise.
4191 (I386_DR_LOCAL_ENABLE): Likewise.
4192 (I386_DR_GLOBAL_ENABLE): Likewise.
4193 (I386_DR_DISABLE): Likewise.
4194 (I386_DR_SET_RW_LEN): Likewise.
4195 (I386_DR_GET_RW_LEN): Likewise.
4196 (I386_DR_WATCH_HIT): Likewise.
4197 (i386_wp_op_t): Likewise.
4198 (i386_show_dr): Likewise.
4199 (i386_length_and_rw_bits): Likewise.
4200 (i386_insert_aligned_watchpoint): Likewise.
4201 (i386_remove_aligned_watchpoint): Likewise.
4202 (i386_handle_nonaligned_watchpoint): Likewise.
4203 i386_update_inferior_debug_regs(): Likewise.
4204 (i386_dr_insert_watchpoint): Likewise.
4205 (i386_dr_remove_watchpoint): Likewise.
4206 (i386_dr_region_ok_for_watchpoint): Likewise.
4207 (i386_dr_stopped_data_address): Likewise.
4208 (i386_dr_stopped_by_watchpoint): Likewise.
4209
8f26655c
GB
42102014-06-19 Gary Benson <gbenson@redhat.com>
4211
4212 * i386-low.c (i386_dr_show): Renamed to
4213 i386_show_dr and made static. All uses updated.
4214 (i386_dr_length_and_rw_bits): Renamed to
4215 i386_length_and_rw_bits and made static.
4216 All uses updated.
4217 (i386_dr_insert_aligned_watchpoint): Renamed to
4218 i386_insert_aligned_watchpoint and made static.
4219 All uses updated.
4220 (i386_dr_remove_aligned_watchpoint): Renamed to
4221 i386_remove_aligned_watchpoint and made static.
4222 All uses updated.
4223 (i386_dr_update_inferior_debug_regs): Renamed to
4224 i386_update_inferior_debug_regs and made static.
4225 All uses updated.
4226
b9228891
GB
42272014-06-18 Gary Benson <gbenson@redhat.com>
4228
5171def3
GB
4229 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4230 (i386_dr_low_can_set_control): Likewise.
4231 (i386_get_debug_register_length): Likewise.
4232 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4233 (i386_dr_low_can_set_control): Likewise.
4234 (i386_get_debug_register_length): Likewise.
4235
42362014-06-17 Gary Benson <gbenson@redhat.com>
4237
b9228891
GB
4238 * i386-low.h (i386-dregs.h): New include.
4239 (DR_FIRSTADDR): Now in i386-dregs.h.
4240 (DR_LASTADDR): Likewise.
4241 (DR_NADDR): Likewise.
4242 (DR_STATUS): Likewise.
4243 (DR_CONTROL): Likewise.
4244 (i386_debug_reg_state): Likewise.
4245 (i386_dr_insert_watchpoint): Likewise.
4246 (i386_dr_remove_watchpoint): Likewise.
4247 (i386_dr_region_ok_for_watchpoint): Likewise.
4248 (i386_dr_stopped_data_address): Likewise.
4249 (i386_dr_stopped_by_watchpoint): Likewise.
4250 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4251
4be83cc2
GB
42522014-06-18 Gary Benson <gbenson@redhat.com>
4253
4254 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4255 i386_dr_insert_watchpoint.
4256 (i386_low_remove_watchpoint): Renamed to
4257 i386_dr_remove_watchpoint.
4258 (i386_low_region_ok_for_watchpoint): Renamed to
4259 i386_dr_region_ok_for_watchpoint.
4260 (i386_low_stopped_data_address): Renamed to
4261 i386_dr_stopped_data_address.
4262 (i386_low_stopped_by_watchpoint): Renamed to
4263 i386_dr_stopped_by_watchpoint.
4264 * i386-low.c (i386_show_dr): Renamed to
4265 i386_dr_show and made nonstatic. All uses updated.
4266 (i386_length_and_rw_bits): Renamed to
4267 i386_dr_length_and_rw_bits and made nonstatic.
4268 All uses updated.
4269 (i386_insert_aligned_watchpoint): Renamed to
4270 i386_dr_insert_aligned_watchpoint and made nonstatic.
4271 All uses updated.
4272 (i386_remove_aligned_watchpoint): Renamed to
4273 i386_dr_remove_aligned_watchpoint and made nonstatic.
4274 All uses updated.
4275 (i386_update_inferior_debug_regs): Renamed to
4276 i386_dr_update_inferior_debug_regs and made nonstatic.
4277 All uses updated.
4278 (i386_low_insert_watchpoint): Renamed to
4279 i386_dr_insert_watchpoint. All uses updated.
4280 (i386_low_remove_watchpoint): Renamed to
4281 i386_dr_remove_watchpoint. All uses updated.
4282 (i386_low_region_ok_for_watchpoint): Renamed to
4283 i386_dr_region_ok_for_watchpoint. All uses updated.
4284 (i386_low_stopped_data_address): Renamed to
4285 i386_dr_stopped_data_address. All uses updated.
4286 (i386_low_stopped_by_watchpoint): Renamed to
4287 i386_dr_stopped_by_watchpoint. All uses updated.
4288
131aa0d4
GB
42892014-06-18 Gary Benson <gbenson@redhat.com>
4290
4291 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4292 (i386_dr_low_can_set_control): Likewise.
4293 (i386_insert_aligned_watchpoint): New check.
4294
d9305f7f
GB
42952014-06-18 Gary Benson <gbenson@redhat.com>
4296
4297 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4298 Renamed to state.
4299
e927c9fc
GB
43002014-06-18 Gary Benson <gbenson@redhat.com>
4301
4302 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4303 instead of fatal and error.
4304 (i386_handle_nonaligned_watchpoint): Likewise.
4305
1b6d4134
GB
43062014-06-18 Gary Benson <gbenson@redhat.com>
4307
4308 * i386-low.c (i386_get_debug_register_length): New macro.
4309 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4310 (i386_show_dr): Use debug_printf instead of fprintf. Use
4311 phex to format values.
4312
6e62758f
GB
43132014-06-18 Gary Benson <gbenson@redhat.com>
4314
4315 * i386-low.h: Comment changes.
4316 * i386-low.c: Likewise.
4317
fc6e2f03
GB
43182014-06-18 Gary Benson <gbenson@redhat.com>
4319
4320 * i386-low.c: Whitespace changes.
4321
f9d1eeed
TT
43222014-06-12 Tom Tromey <tromey@redhat.com>
4323
4324 * utils.c (freeargv): Remove.
4325
0b04e523
TT
43262014-06-12 Tom Tromey <tromey@redhat.com>
4327
4328 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4329 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4330 (parse_debug_format_options): Likewise.
4331 (gdbserver_usage): Likewise.
4332 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4333 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4334 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4335 against libiberty.
4336 ($(LIBGNU)): Depend on libiberty.
4337 (all-lib): Recurse into all subdirs.
4338 (install-only): Invoke "install" target in subdirs.
4339 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4340 targets.
4341 * configure: Rebuild.
4342 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4343 for vasprintf, vsnprintf, or gettimeofday.
4344 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4345 srv_tgtobj.
4346
270c9937
JB
43472014-06-05 Joel Brobecker <brobecker@adacore.com>
4348
4349 * development.sh: Delete.
4350 * Makefile.in (config.status): Adjust dependency on development.sh.
4351 * configure.ac: Adjust development.sh source call.
4352 * configure: Regenerate.
4353
0a261ed8
PA
43542014-06-02 Pedro Alves <palves@redhat.com>
4355
4356 * ax.c (gdb_free_agent_expr): New function.
4357 * ax.h (gdb_free_agent_expr): New declaration.
4358 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4359 list.
4360 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4361 static.
4362 (clear_breakpoint_conditions_and_commands): New function.
4363 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4364 (clear_breakpoint_conditions_and_commands): New declaration.
4365
e9dae05e
RR
43662014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4367
4368 * linux-aarch64-low.c (asm/ptrace.h): Include.
4369
5876f503
JK
43702014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4371
4372 Fix TLS access for -static -pthread.
4373 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4374 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4375 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4376
802e8e6d
PA
43772014-05-20 Pedro Alves <palves@redhat.com>
4378
4379 * linux-aarch64-low.c (aarch64_insert_point)
4380 (aarch64_remove_point): No longer check whether the type is
4381 supported here. Adjust to new interface.
4382 (the_low_target): Install aarch64_supports_z_point_type as
4383 supports_z_point_type method.
4384 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4385 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4386 instead of a Z packet char. Adjust.
4387 (arm_supports_z_point_type): New function.
4388 (arm_insert_point, arm_remove_point): Adjust to new interface.
4389 (the_low_target): Install arm_supports_z_point_type.
4390 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4391 (cris_insert_point, cris_remove_point): Adjust to new interface.
4392 Don't check whether the type is supported here.
4393 (the_low_target): Install cris_supports_z_point_type.
4394 * linux-low.c (linux_supports_z_point_type): New function.
4395 (linux_insert_point, linux_remove_point): Adjust to new interface.
4396 * linux-low.h (struct linux_target_ops) <insert_point,
4397 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4398 raw_breakpoint pointer parameter.
4399 <supports_z_point_type>: New method.
4400 * linux-mips-low.c (mips_supports_z_point_type): New function.
4401 (mips_insert_point, mips_remove_point): Adjust to new interface.
4402 Use mips_supports_z_point_type.
4403 (the_low_target): Install mips_supports_z_point_type.
4404 * linux-ppc-low.c (the_low_target): Install NULL as
4405 supports_z_point_type method.
4406 * linux-s390-low.c (the_low_target): Install NULL as
4407 supports_z_point_type method.
4408 * linux-sparc-low.c (the_low_target): Install NULL as
4409 supports_z_point_type method.
4410 * linux-x86-low.c (x86_supports_z_point_type): New function.
4411 (x86_insert_point): Adjust to new insert_point interface. Use
4412 insert_memory_breakpoint. Adjust to new
4413 i386_low_insert_watchpoint interface.
4414 (x86_remove_point): Adjust to remove_point interface. Use
4415 remove_memory_breakpoint. Adjust to new
4416 i386_low_remove_watchpoint interface.
4417 (the_low_target): Install x86_supports_z_point_type.
4418 * lynx-low.c (lynx_target_ops): Install NULL as
4419 supports_z_point_type callback.
4420 * nto-low.c (nto_supports_z_point_type): New.
4421 (nto_insert_point, nto_remove_point): Adjust to new interface.
4422 (nto_target_ops): Install nto_supports_z_point_type.
4423 * mem-break.c: Adjust intro comment.
4424 (struct raw_breakpoint) <raw_type, size>: New fields.
4425 <inserted>: Update comment.
4426 <shlib_disabled>: Delete field.
4427 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4428 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4429 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4430 (raw_bkpt_type_to_target_hw_bp_type): New function.
4431 (find_enabled_raw_code_breakpoint_at): New function.
4432 (find_raw_breakpoint_at): New type and size parameters. Use them.
4433 (insert_memory_breakpoint): New function, based off
4434 set_raw_breakpoint_at.
4435 (remove_memory_breakpoint): New function.
4436 (set_raw_breakpoint_at): Reimplement.
4437 (set_breakpoint): New, based on set_breakpoint_at.
4438 (set_breakpoint_at): Reimplement.
4439 (delete_raw_breakpoint): Go through the_target->remove_point
4440 instead of assuming memory breakpoints.
4441 (find_gdb_breakpoint_at): Delete.
4442 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4443 (find_gdb_breakpoint): New function.
4444 (set_gdb_breakpoint_at): Delete.
4445 (z_type_supported): New function.
4446 (set_gdb_breakpoint_1): New function, loosely based off
4447 set_gdb_breakpoint_at.
4448 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4449 (delete_gdb_breakpoint_at): Delete.
4450 (delete_gdb_breakpoint_1): New function, loosely based off
4451 delete_gdb_breakpoint_at.
4452 (delete_gdb_breakpoint): New function.
4453 (clear_gdb_breakpoint_conditions): Rename to ...
4454 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4455 breakpoint.
4456 (add_condition_to_breakpoint): Make static.
4457 (add_breakpoint_condition): Take a struct breakpoint pointer
4458 instead of an address. Adjust.
4459 (gdb_condition_true_at_breakpoint): Rename to ...
4460 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4461 z_type parameter.
4462 (gdb_condition_true_at_breakpoint): Reimplement.
4463 (add_breakpoint_commands): Take a struct breakpoint pointer
4464 instead of an address. Adjust.
4465 (gdb_no_commands_at_breakpoint): Rename to ...
4466 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4467 parameter. Return true if no breakpoint was found. Change debug
4468 output.
4469 (gdb_no_commands_at_breakpoint): Reimplement.
4470 (run_breakpoint_commands): Rename to ...
4471 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4472 and change return type to boolean.
4473 (run_breakpoint_commands): New function.
4474 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4475 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4476 breakpoint. Go through the_target->remove_point instead of
4477 assuming memory breakpoint.
4478 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4479 software and hardware breakpoints.
4480 (reinsert_raw_breakpoint): Go through the_target->insert_point
4481 instead of assuming memory breakpoint.
4482 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4483 software and hardware breakpoints.
4484 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4485 Check both software and hardware breakpoints.
4486 (validate_inserted_breakpoint): Assert the breakpoint is a
4487 software breakpoint. Set the inserted flag to -1 instead of
4488 setting shlib_disabled.
4489 (delete_disabled_breakpoints): Adjust.
4490 (validate_breakpoints): Only validate software breakpoints.
4491 Adjust to inserted flag change.
4492 (check_mem_read, check_mem_write): Skip breakpoint types other
4493 than software breakpoints. Adjust to inserted flag change.
4494 * mem-break.h (enum raw_bkpt_type): New enum.
4495 (raw_breakpoint, struct process_info): Forward declare.
4496 (Z_packet_to_target_hw_bp_type): Delete declaration.
4497 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4498 (set_gdb_breakpoint, delete_gdb_breakpoint)
4499 (clear_breakpoint_conditions): New declarations.
4500 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4501 (breakpoint_inserted_here): Update comment.
4502 (add_breakpoint_condition, add_breakpoint_commands): Replace
4503 address parameter with a breakpoint pointer parameter.
4504 (gdb_breakpoint_here): Update comment.
4505 (delete_gdb_breakpoint_at): Delete.
4506 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4507 * server.c (process_point_options): Take a struct breakpoint
4508 pointer instead of an address. Adjust.
4509 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4510 delete_gdb_breakpoint.
4511 * spu-low.c (spu_target_ops): Install NULL as
4512 supports_z_point_type method.
4513 * target.h: Include mem-break.h.
4514 (struct target_ops) <prepare_to_access_memory>: Update comment.
4515 <supports_z_point_type>: New field.
4516 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4517 instead of a char. Also take a raw breakpoint pointer.
4518 * win32-arm-low.c (the_low_target): Install NULL as
4519 supports_z_point_type.
4520 * win32-i386-low.c (i386_supports_z_point_type): New function.
4521 (i386_insert_point, i386_remove_point): Adjust to new interface.
4522 (the_low_target): Install i386_supports_z_point_type.
4523 * win32-low.c (win32_supports_z_point_type): New function.
4524 (win32_insert_point, win32_remove_point): Adjust to new interface.
4525 (win32_target_ops): Install win32_supports_z_point_type.
4526 * win32-low.h (struct win32_target_ops):
4527 <supports_z_point_type>: New method.
4528 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4529 instead of a char. Also take a raw breakpoint pointer.
4530
932539e3
PA
45312014-05-20 Pedro Alves <palves@redhat.com>
4532
4533 * mem-break.h: Include break-common.h.
4534 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4535 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4536 (Z_packet_to_target_hw_bp_type): New declaration.
4537 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4538 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4539 (Z_PACKET_ACCESS_WP): Delete macros.
4540 (Z_packet_to_hw_type): Delete function.
4541 * i386-low.h: Don't include break-common.h here.
4542 (Z_packet_to_hw_type): Delete declaration.
4543 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4544 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4545 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4546 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4547 * linux-aarch64-low.c: Don't include break-common.h here.
4548 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4549 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4550 (Z_packet_to_target_hw_bp_type): Delete function.
4551 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4552 function.
4553 (mips_insert_point, mips_remove_point): Use
4554 Z_packet_to_target_hw_bp_type.
4555
4ff0d3d8
PA
45562014-05-20 Pedro Alves <palves@redhat.com>
4557
4558 * linux-aarch64-low.c: Include break-common.h.
4559 (enum target_point_type): Delete.
4560 (Z_packet_to_point_type): Rename to ...
4561 (Z_packet_to_target_hw_bp_type): ... this, and return a
4562 target_hw_bp_type instead.
4563 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4564 instead of an enum target_point_type.
4565 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4566 breakpoint type.
4567 (aarch64_dr_state_insert_one_point)
4568 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4569 (aarch64_handle_aligned_watchpoint)
4570 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4571 Take an enum target_hw_bp_type instead of an enum
4572 target_point_type.
4573 (aarch64_supports_z_point_type): New function.
4574 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4575 use Z_packet_to_target_hw_bp_type.
4576
786dc519
JB
45772014-05-20 Joel Brobecker <brobecker@adacore.com>
4578
4579 * configure.ac: Only use -Werror by default when DEVELOPMENT
4580 is true.
4581 * configure: Regenerate.
4582
9e0aa64f
JK
45832014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4584
4585 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4586 * linux-x86-low.c (X86_64_USER_REGS): New.
4587 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4588
2b577b92
YQ
45892014-04-28 Yao Qi <yao@codesourcery.com>
4590
4591 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4592 name.
4593
94611da2
PA
45942014-04-25 Pedro Alves <palves@redhat.com>
4595
4596 PR server/16255
4597 * linux-low.c (linux_attach_fail_reason_string): New function.
4598 (linux_attach_lwp): Delete.
4599 (linux_attach_lwp_1): Rename to ...
4600 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4601 argument. Remove "initial" parameter. Return int instead of
4602 void. Don't error or warn here.
4603 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4604 failure to attach to the tgid. Call warning when failing to
4605 attach to an lwp.
4606 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4607 argument. Remove "initial" parameter. Return int instead of
4608 void. Don't error or warn here.
4609 (linux_attach_fail_reason_string): New declaration.
4610 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4611 interface change. Use linux_attach_fail_reason_string.
4612
01f9f808
MS
46132014-04-24 Michael Sturm <michael.sturm@mintel.com>
4614 Walfred Tedeschi <walfred.tedeschi@intel.com>
4615
4616 * Makefile.in: Added rules to handle new files
4617 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4618 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4619 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4620 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4621 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4622 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4623 x32-avx512-linux.o.
4624 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4625 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4626 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4627 i386/x32-avx512.xml.
4628 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4629 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4630 i386/x32-avx512-linux.xml.
4631 * i387-fp.c (num_avx512_k_registers): New constant for number
4632 of K registers.
4633 (num_avx512_zmmh_low_registers): New constant for number of
4634 lower ZMM registers (0-15).
4635 (num_avx512_zmmh_high_registers): New constant for number of
4636 higher ZMM registers (16-31).
4637 (num_avx512_ymmh_registers): New contant for number of higher
4638 YMM registers (ymm16-31 added by avx521 on x86_64).
4639 (num_avx512_xmm_registers): New constant for number of higher
4640 XMM registers (xmm16-31 added by AVX512 on x86_64).
4641 (struct i387_xsave): Add space for AVX512 registers.
4642 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4643 Add code to handle AVX512 registers.
4644 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4645 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4646 prototypei from generated file.
4647 (tdesc_amd64_avx512_linux): Likewise.
4648 (init_registers_x32_avx512_linux): Likewise.
4649 (tdesc_x32_avx512_linux): Likewise.
4650 (init_registers_i386_avx512_linux): Likewise.
4651 (tdesc_i386_avx512_linux): Likewise.
4652 (x86_64_regmap): Add AVX512 registers.
4653 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4654 mask.
4655 (initialize_low_arch): Add code to initialize AVX512 registers.
4656
51aa91f9
PA
46572014-04-23 Pedro Alves <palves@redhat.com>
4658
4659 * mem-break.c (find_gdb_breakpoint_at): Make static.
4660 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4661
a4165e94
PA
46622014-04-23 Pedro Alves <palves@redhat.com>
4663
4664 * i386-low.c: Don't include break-common.h here.
4665 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4666 prototype to take target_hw_bp_type as argument instead of a Z
4667 packet char.
4668 * i386-low.h: Include break-common.h here.
4669 (Z_packet_to_hw_type): Declare.
4670 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4671 prototypes.
4672 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4673 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4674 (x86_remove_point): Convert the packet number to a
4675 target_hw_bp_type before calling i386_low_remove_watchpoint.
4676 * win32-i386-low.c (i386_insert_point): Convert the packet number
4677 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4678 (i386_remove_point): Convert the packet number to a
4679 target_hw_bp_type before calling i386_low_remove_watchpoint.
4680
b8acf843
PA
46812014-04-23 Pedro Alves <palves@redhat.com>
4682
4683 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4684
d708bcd1
PA
46852014-04-10 Pedro Alves <palves@redhat.com>
4686
4687 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4688 Check if the condition or command is NULL before checking if the
4689 breakpoint is known. On success, return true.
4690 * mem-break.h (add_breakpoint_condition): Document return.
4691 (add_breakpoint_commands): Add describing comment.
4692 * server.c (skip_to_semicolon): New function.
4693 (process_point_options): Use it.
4694
2eec7d5b
PA
46952014-04-09 Pedro Alves <palves@redhat.com>
4696
4697 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4698 to lwpid_of.
4699
fa96cb38
PA
47002014-02-27 Pedro Alves <palves@redhat.com>
4701
4702 PR 12702
4703 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4704 macros.
4705 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4706 output.
4707 (last_thread_of_process_p): Take a PID argument instead of a
4708 thread pointer.
4709 (linux_wait_for_lwp): Delete.
4710 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4711 functions.
4712 (linux_low_filter_event): New function, party factored out from
4713 linux_wait_for_event.
4714 (linux_wait_for_event): Rename to ...
4715 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4716 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4717 sigsuspend. Check for zombie leaders.
4718 (linux_wait_for_event): Reimplement as wrapper around
4719 linux_wait_for_event_filtered.
4720 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4721 a normal or signal exit is seen, it's the whole process exiting.
4722 (wait_for_sigstop): No longer a for_each_inferior callback.
4723 Rewrite on top of linux_wait_for_event_filtered.
4724 (stop_all_lwps): Call wait_for_sigstop directly.
4725 * server.c (resume, handle_target_event): Handle
4726 TARGET_WAITKIND_NO_RESUMED.
4727
d763de10
JB
47282014-02-26 Joel Brobecker <brobecker@adacore.com>
4729
4730 * win32-low.c (psapi_get_dll_name,
4731 * win32_CreateToolhelp32Snapshot): Delete.
4732 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4733 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4734 Delete.
4735 (handle_load_dll): Add function description.
4736 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4737
850a0f76
JB
47382014-02-26 Joel Brobecker <brobecker@adacore.com>
4739
4740 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4741 Add comment.
4742 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4743 base address when calling win32_add_one_solib.
4744 (handle_load_dll): Delete local variable load_addr.
4745 Remove 0x1000 offset applied to DLL base address when calling
4746 win32_add_one_solib.
4747 (handle_unload_dll): Add comment.
4748
f25b3fc3
JB
47492014-02-26 Joel Brobecker <brobecker@adacore.com>
4750
4751 * win32-low.c (win32_add_all_dlls): Renames
4752 win32_ensure_ntdll_loaded. Rewrite function documentation.
4753 Adjust implementation to always load all DLLs.
4754 Add 0x1000 offset to DLL base address when calling
4755 win32_add_one_solib.
4756 (child_initialization_done): New static global.
4757 (do_initial_child_stuff): Set child_initialization_done to
4758 zero during child initialization, and 1 after. Replace call
4759 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4760 Add comment.
4761 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4762 (handle_unload_dll): Add function documentation.
4763 (get_child_debug_event): Ignore load and unload DLL events
4764 during child initialization.
4765
d86d4aaf
DE
47662014-02-20 Doug Evans <dje@google.com>
4767
3bc32da3 4768 Remove global all_lwps.
d86d4aaf
DE
4769 * inferiors.h (ptid_of): Move here from linux-low.h.
4770 (pid_of, lwpid_of): Ditto.
4771 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4772 parameter is a struct thread_info * now.
4773 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4774 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4775 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4776 directly.
4777 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4778 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4779 * linux-arm-low.c (update_registers_callback): Update, "entry"
4780 parameter is a struct thread_info * now.
4781 Fetch lwpid from current_inferior directly.
4782 (arm_insert_point): Pass &all_threads to find_inferior instead of
4783 &all_lwps.
4784 (arm_remove_point): Ditto.
4785 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4786 (arm_prepare_to_resume): Fetch pid from thread.
4787 (arm_read_description): Fetch lwpid from current_inferior directly.
4788 * linux-low.c (all_lwps): Delete.
4789 (delete_lwp): Delete call to remove_inferior.
4790 (handle_extended_wait): Fetch lwpid from thread.
4791 (add_lwp): Don't set lwp->entry.id. Remove call to
4792 add_inferior_to_list.
4793 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4794 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4795 (kill_one_lwp_callback): Ditto.
4796 (linux_kill): Don't dereference NULL pointer.
4797 Fetch ptid,lwpid from thread.
4798 (get_detach_signal): Fetch ptid from thread.
4799 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4800 Simplify call to regcache_invalidate_thread.
4801 (delete_lwp_callback): Update, "entry" parameter is a
4802 struct thread_info * now. Fetch pid from thread.
4803 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4804 (status_pending_p_callback): Update, "entry" parameter is a
4805 struct thread_info * now. Fetch ptid from thread.
4806 (find_lwp_pid): Update, "entry" parameter is a
4807 struct thread_info * now.
4808 (linux_wait_for_lwp): Fetch pid from thread.
4809 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4810 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4811 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4812 (dequeue_one_deferred_signal): Ditto.
4813 (cancel_breakpoint): Fetch ptid from current_inferior.
4814 (linux_wait_for_event): Pass &all_threads to find_inferior,
4815 not &all_lwps. Fetch ptid, lwpid from thread.
4816 (count_events_callback): Update, "entry" parameter is a
4817 struct thread_info * now.
4818 (select_singlestep_lwp_callback): Ditto.
4819 (select_event_lwp_callback): Ditto.
4820 (cancel_breakpoints_callback): Ditto.
4821 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4822 not &all_lwps.
4823 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4824 (unsuspend_one_lwp): Update, "entry" parameter is a
4825 struct thread_info * now.
4826 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4827 not &all_lwps.
4828 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4829 Fetch lwpid from thread, not lwp.
4830 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4831 Pass &all_threads to find_inferior, not &all_lwps.
4832 (send_sigstop): Fetch lwpid from thread, not lwp.
4833 (send_sigstop_callback): Update, "entry" parameter is a
4834 struct thread_info * now.
4835 (suspend_and_send_sigstop_callback): Ditto.
4836 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4837 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4838 struct thread_info * now.
4839 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4840 from thread, lwp.
4841 (lwp_running): Update, "entry" parameter is a
4842 struct thread_info * now.
4843 (stop_all_lwps): Fetch ptid from thread.
4844 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4845 (linux_resume_one_lwp): Fetch lwpid from thread.
4846 (linux_set_resume_request): Update, "entry" parameter is a
4847 struct thread_info * now. Fetch pid, lwpid from thread.
4848 (resume_status_pending_p): Update, "entry" parameter is a
4849 struct thread_info * now.
4850 (need_step_over_p): Ditto. Fetch lwpid from thread.
4851 (start_step_over): Fetch lwpid from thread.
4852 (linux_resume_one_thread): Update, "entry" parameter is a
4853 struct thread_info * now. Fetch lwpid from thread.
4854 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4855 (proceed_one_lwp): Update, "entry" parameter is a
4856 struct thread_info * now. Fetch lwpid from thread.
4857 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4858 struct thread_info * now.
4859 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4860 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4861 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4862 directly.
4863 (regsets_store_inferior_registers): Ditto.
4864 (fetch_register, store_register): Ditto.
4865 (linux_read_memory, linux_write_memory): Ditto.
4866 (linux_request_interrupt): Ditto.
4867 (linux_read_auxv): Ditto.
4868 (linux_xfer_siginfo): Ditto.
4869 (linux_qxfer_spu): Ditto.
4870 (linux_qxfer_libraries_svr4): Ditto.
4871 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4872 moved to inferiors.h.
4873 (get_lwp): Delete.
4874 (get_thread_lwp): Update.
4875 (struct lwp_info): Delete member "entry". Simplify comment for
4876 member "thread".
4877 (all_lwps): Delete.
4878 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4879 current_inferior directly.
4880 (update_watch_registers_callback): Update, "entry" parameter is a
4881 struct thread_info * now. Fetch pid from thread.
4882 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4883 (mips_insert_point): Fetch lwpid from current_inferior.
4884 Pass &all_threads to find_inferior, not &all_lwps.
4885 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4886 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4887 directly.
4888 (mips_stopped_data_address): Ditto.
4889 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4890 directly.
4891 * linux-tile-low.c (tile_arch_setup): Ditto.
4892 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4893 (update_debug_registers_callback): Update, "entry" parameter is a
4894 struct thread_info * now. Fetch pid from thread.
4895 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4896 Pass &all_threads to find_inferior, not &all_lwps.
4897 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4898 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4899 Pass &all_threads to find_inferior, not &all_lwps.
4900 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4901 (i386_dr_low_get_status): Ditto.
4902 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4903 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4904 (x86_linux_read_description): Ditto.
4905 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4906
3b8361aa
DE
49072014-02-20 Doug Evans <dje@google.com>
4908
4909 * inferiors.c (get_first_inferior): Fix buglet.
4910
f7667f0d
DE
49112014-02-19 Doug Evans <dje@google.com>
4912
4913 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4914 * inferiors.c (add_thread): Change result type to struct thread_info *.
4915 All callers updated.
4916 (add_lwp): Call add_thread here instead of in callers.
4917 All callers updated.
4918 * linux-low.h (get_lwp_thread): Rewrite.
4919 (struct lwp_info): New member "thread".
4920
b3312d80
DE
49212014-02-19 Doug Evans <dje@google.com>
4922
4923 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4924 All callers updated.
4925
ecc6f45c
DE
49262014-02-19 Doug Evans <dje@google.com>
4927
4928 * inferiors.c (add_thread): Fix whitespace.
4929
649ebbca
DE
49302014-02-19 Doug Evans <dje@google.com>
4931
4932 * dll.c (clear_dlls): Replace accessing list implemention details
4933 with API function.
4934 * gdbthread.h (get_first_thread): Declare.
4935 * inferiors.c (for_each_inferior_with_data): New function.
4936 (get_first_thread): New function.
4937 (find_thread_ptid): Simplify.
4938 (get_first_inferior): New function.
4939 (clear_list): Delete.
4940 (one_inferior_p): New function.
4941 (clear_inferior_list): New function.
4942 (clear_inferiors): Update.
4943 * inferiors.h (for_each_inferior_with_data): Declare.
4944 (clear_inferior_list): Declare.
4945 (one_inferior_p): Declare.
4946 (get_first_inferior): Declare.
4947 * linux-low.c (linux_wait_for_event): Replace accessing list
4948 implemention details with API function.
4949 * server.c (target_running): Ditto.
4950 (accumulate_file_name_length): New function.
4951 (emit_dll_description): New function.
4952 (handle_qxfer_libraries): Replace accessing list implemention
4953 details with API function.
4954 (handle_qxfer_threads_worker): New function.
4955 (handle_qxfer_threads_proper): Replace accessing list implemention
4956 details with API function.
4957 (handle_query): Ditto.
4958 (visit_actioned_threads_callback_ftype): New typedef.
4959 (visit_actioned_threads_data): New struct.
4960 (visit_actioned_threads): Rewrite to be find_inferior callback.
4961 (resume): Call find_inferior.
4962 (handle_status): Replace accessing list implemention
4963 details with API function.
4964 (process_serial_event): Replace accessing list implemention details
4965 with API function.
4966 * target.c (set_desired_inferior): Replace accessing list implemention
4967 details with API function.
4968 * tracepoint.c (same_process_p): New function.
4969 (gdb_agent_about_to_close): Replace accessing list implemention
4970 details with API function.
4971 * win32-low.c (child_delete_thread): Replace accessing list
4972 implemention details with API function.
4973 (match_dll_by_basename): New function.
4974 (dll_is_loaded_by_basename): New function.
4975 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4976 details call to dll_is_loaded_by_basename.
4977
80894984
DE
49782014-02-19 Doug Evans <dje@google.com>
4979
4980 * dll.h (struct dll_info): Add comment.
4981 * gdbthread.h (struct thread_info): Add comment.
4982 (current_ptid): Simplify.
4983 * inferiors.c (add_process): Update.
4984 (remove_process): Update.
4985 * inferiors.h (struct process_info): Rename member "head" to "entry".
4986 * linux-low.c (delete_lwp): Update.
4987 (add_lwp): Update.
4988 (last_thread_of_process_p): Update.
4989 (kill_one_lwp_callback, linux_kill): Update.
4990 (status_pending_p_callback): Update.
4991 (wait_for_sigstop): Update. Simplify read of ptid.
4992 (start_step_over): Update.
4993 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4994 (get_lwp_thread): Update.
4995 (struct lwp_info): Rename member "head" to "entry".
4996 * regcache.h (inferior_list_entry): Delete.
4997 * server.c (kill_inferior_callback): Update.
4998 (detach_or_kill_inferior_callback): Update.
4999 (print_started_pid): Update.
5000 (print_attached_pid): Update.
5001 (process_serial_event): Simplify read of ptid.
5002 * thread-db.c (thread_db_create_event): Update.
5003 (thread_db_get_tls_address): Update.
5004 * win32-low.c (current_inferior_ptid): Simplify.
5005
46917d26
TT
50062014-02-19 Tom Tromey <tromey@redhat.com>
5007
5008 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5009 argument.
5010 (target_supports_btrace): Update.
5011
0759a81e
YQ
50122014-02-14 Yao Qi <yao@codesourcery.com>
5013
5014 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5015 (rsp-low-ipa.o): New target.
5016
a7191e8b
TT
50172014-02-12 Tom Tromey <tromey@redhat.com>
5018
5019 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5020 convert_ascii_to_int.
5021 * regcache.c (registers_to_string): Likewise.
5022 * remote-utils.c (decode_M_packet): Likewise.
5023 * server.c (process_serial_event): Likewise.
5024
ff0e980e
TT
50252014-02-12 Tom Tromey <tromey@redhat.com>
5026
5027 * server.c (handle_query, handle_v_run): Use hex2bin, not
5028 unhexify.
5029 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5030
e9371aff
TT
50312014-02-12 Tom Tromey <tromey@redhat.com>
5032
5033 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5034 convert_int_to_ascii.
5035 * regcache.c (registers_to_string, collect_register_as_string):
5036 Likewise.
5037 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5038 Likewise.
5039 * server.c (process_serial_event): Likewise.
5040 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5041 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5042
971dc0b8
TT
50432014-02-12 Tom Tromey <tromey@redhat.com>
5044
5045 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5046 bin2hex, not hexify.
5047 * tracepoint.c (cmd_qtstatus): Likewise.
5048
0a822afb
TT
50492014-02-12 Tom Tromey <tromey@redhat.com>
5050
5051 * remote-utils.c (monitor_output): Pass explicit length to
5052 hexify.
5053
9c3d6531
TT
50542014-02-12 Tom Tromey <tromey@redhat.com>
5055
5056 * tracepoint.c: Include rsp-low.h.
5057 * server.c: Include rsp-low.h.
5058 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5059 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5060 declare.
5061 * remote-utils.c: Include rsp-low.h.
5062 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5063 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5064 (convert_int_to_ascii, convert_ascii_to_int): Move to
5065 common/rsp-low.c.
5066 * regcache.c: Include rsp-low.h.
5067 * ax.c: Include rsp-low.h.
5068 * Makefile.in (SFILES): Add common/rsp-low.c.
5069 (OBS): Add rsp-low.o.
5070 (rsp-low.o): New target.
5071
01fd3ea5
TT
50722014-02-12 Tom Tromey <tromey@redhat.com>
5073
5074 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5075 Include print-utils.h.
5076 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5077 (plongest, thirty_two, phex_nz): Remove.
5078 * Makefile.in (SFILES): Add common/print-utils.c.
5079 (OBS): Add print-utils.o.
5080 (print-utils-ipa.o): New target.
5081 (print-utils.o): New target.
5082 (IPA_OBJS): Add print-utils-ipa.o.
5083
e99dc820
TT
50842014-02-06 Tom Tromey <tromey@redhat.com>
5085
5086 * Makefile.in (SFILES): Fix indentation.
5087
ee1e2d4f
DE
50882014-02-05 Doug Evans <dje@google.com>
5089
5090 * linux-low.c (linux_wait_for_event): Improve comment.
5091 (linux_wait_1): Keep current_inferior in sync with event_child.
5092
f5a02773
DE
50932014-01-22 Doug Evans <dje@google.com>
5094
5095 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5096
87ce2a04
DE
50972014-01-22 Doug Evans <dje@google.com>
5098
5099 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5100 * configure: Regenerate.
5101 * config.in: Regenerate.
5102 * Makefile.in (SFILES): Add debug.c.
5103 (OBS): Add debug.o.
5104 * debug.c: New file.
5105 * debug.h: New file.
5106 * linux-aarch64-low.c (*): Update all debugging printfs to use
5107 debug_printf instead of fprintf.
5108 * linux-arm-low.c (*): Ditto.
5109 * linux-cris-low.c (*): Ditto.
5110 * linux-crisv32-low.c (*): Ditto.
5111 * linux-m32r-low.c (*): Ditto.
5112 * linux-sparc-low.c (*): Ditto.
5113 * linux-x86.c (*): Ditto.
5114 * linux-low.c (*): Ditto.
5115 (linux_wait_1): Add calls to debug_enter, debug_exit.
5116 (linux_wait): Remove redundant debugging printf.
5117 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5118 (linux_resume, unstop_all_lwps): Ditto.
5119 * mem-break.c (*): Update all debugging printfs to use
5120 debug_printf instead of fprintf.
5121 * remote-utils.c (*): Ditto.
5122 * thread-db.c (*): Ditto.
5123 * server.c #include <ctype.h>, "gdb_vecs.h".
5124 (debug_threads): Moved to debug.c.
5125 (*): Update all debugging printfs to use debug_printf instead of
5126 fprintf.
5127 (start_inferior): Replace call to fflush with call to debug_flush.
5128 (monitor_show_help): Mention set debug-format.
5129 (parse_debug_format_options): New function.
5130 (handle_monitor_command): Handle "monitor set debug-format".
5131 (gdbserver_usage): Mention --debug-format.
5132 (main): Parse --debug-format.
5133 * server.h (debug_threads): Declaration moved to debug.h.
5134 #include "debug.h".
5135 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5136 trace_debug_1 that uses debug_printf.
5137 (tracepoint_look_up_symbols): Update all debugging printfs to use
5138 debug_printf instead of fprintf.
5139
e671835b
BS
51402014-01-20 Baruch Siach <baruch@tkos.co.il>
5141
5142 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5143 sys/ptrace.h.
5144
b5737fa9
PA
51452014-01-17 Pedro Alves <palves@redhat.com>
5146
ea38d2a9 5147 PR build/16445
c7faa97a
PA
5148 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5149 defined after including gdb_proc_service.h.
b5737fa9 5150
40ed484e
DE
51512014-01-16 Doug Evans <dje@google.com>
5152
5153 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5154 (match_dll): Use it.
5155
969c39fb
MM
51562014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5157
5158 * target.h (target_ops) <read_btrace>: Change parameters and
5159 return type to allow error reporting.
5160 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5161 trace reading errors on.
5162 * linux-low.c (linux_low_read_btrace): Pass trace reading
5163 errors on.
5164 (linux_low_disable_btrace): New.
5165
ab7f45ba
DE
51662014-01-15 Doug Evans <dje@google.com>
5167
5168 * inferiors.c (thread_id_to_gdb_id): Delete.
5169 * inferiors.h (thread_id_to_gdb_id): Delete.
5170
66af0f44
EZ
51712014-01-13 Eli Zaretskii <eliz@gnu.org>
5172
5173 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5174 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5175 versions.
5176
9939e131
PA
51772014-01-08 Pedro Alves <palves@redhat.com>
5178
5179 * server.c (handle_status): Don't discard previous queued stop
5180 replies or thread's pending status here.
5181 (main) <disconnection>: Do it here instead.
5182
b7ea362b
PA
51832014-01-08 Pedro Alves <palves@redhat.com>
5184
5185 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5186 * server.c (visit_actioned_threads, handle_pending_status): New
5187 function.
5188 (handle_v_cont): Factor out parts to ...
5189 (resume): ... this new function. If in all-stop, and a thread
5190 being resumed has a pending status, report it without actually
5191 resuming.
5192 (myresume): Adjust to use the new 'resume' function.
5193 (clear_pending_status_callback, set_pending_status_callback)
5194 (find_status_pending_thread_callback): New functions.
5195 (handle_status): Handle the case of multiple threads having
5196 interesting statuses to report. Report threads' real last signal
5197 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5198 with an interesting thread to report the status for, instead of
5199 always reporting the status of the first thread.
5200
28498c42
JB
52012014-01-01 Joel Brobecker <brobecker@adacore.com>
5202
5203 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5204 * gdbreplay.c (gdbreplay_version): Likewise.
5205
f45c82da
YZ
52062013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5207
5208 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5209 iov.iov_len with the real length in use.
5210
379a5e2d
JB
52112013-12-13 Joel Brobecker <brobecker@adacore.com>
5212
5213 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5214 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5215 for all targets that use win32-low.c.
5216 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5217 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5218
4210d83e
PA
52192013-12-13 Pedro Alves <palves@redhat.com>
5220
5221 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5222 if equal to TARGET_WAITKIND_LOADED.
5223 * win32-low.c (cached_status): New static global.
5224 (win32_wait): Add declaration.
5225 (do_initial_child_stuff): Flush all initial pending debug events
5226 up to the initial breakpoint.
5227 (win32_wait): If CACHED_STATUS was set, return that instead
5228 of doing a real wait. Remove the code resuming the execution
5229 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5230 during the initial phase. Also remove the code changing
5231 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5232 TARGET_WAITKIND_STOPPED.
5233
e7f0d979
YQ
52342013-12-11 Yao Qi <yao@codesourcery.com>
5235
5236 * notif.c (handle_notif_ack): Return 0 if no notification
5237 matches.
5238
ebcf782c
DE
52392013-11-20 Doug Evans <dje@google.com>
5240
5241 * linux-low.c (linux_set_resume_request): Fix comment.
5242
20ad9378
DE
52432013-11-20 Doug Evans <dje@google.com>
5244
5245 * linux-low.c (resume_status_pending_p): Tweak comment.
5246
a196ebeb
WT
52472013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5248
5249 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5250 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5251 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5252 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5253 (srv_amd64_regobj): Add amd64-mpx.o.
5254 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5255 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5256 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5257 * i387-fp.c (num_pl_bnd_register) Added constant.
5258 (num_pl_bnd_cfg_registers) Added constant.
5259 (struct i387_xsave) Added reserved area and MPX fields.
5260 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5261 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5262 function.
5263 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5264 (init_registers_amd64_mpx_linux): Declare new function.
5265 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5266 (x86_64_regmap): Add MPX registers.
5267 (x86_linux_read_description): Add MPX case.
5268 (initialize_low_arch): Initialize MPX targets.
5269
0080a2f6
TT
52702013-11-18 Tom Tromey <tromey@redhat.com>
5271
5272 * configure: Rebuild.
5273 * configure.ac: Don't check for stdlib.h.
5274 * gdbreplay.c: Unconditionally include stdlib.h.
5275
2978b111
TT
52762013-11-18 Tom Tromey <tromey@redhat.com>
5277
5278 * config.in: Rebuild.
5279 * configure: Rebuild.
5280 * configure.ac: Don't use AC_HEADER_DIRENT.
5281
a3d08894
TT
52822013-11-18 Tom Tromey <tromey@redhat.com>
5283
5284 * server.h: Don't check HAVE_STRING_H.
5285 * gdbreplay.c: Don't check HAVE_STRING_H.
5286 * configure: Rebuild.
5287
0a5dd17d
TT
52882013-11-18 Tom Tromey <tromey@redhat.com>
5289
5290 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5291 LIBGNU.
5292
1bd2f0ba
TT
52932013-11-08 Tom Tromey <tromey@redhat.com>
5294
5295 * configure, config.in: Rebuild.
5296 * configure.ac: Remove unused configury.
5297
3266f10b
TT
52982013-11-08 Tom Tromey <tromey@redhat.com>
5299
5300 * acinclude.m4: Include common.m4, codeset.m4.
5301 * configure, config.in: Rebuild.
5302 * configure.ac: Use GDB_AC_COMMON.
5303
6682d959
AA
53042013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5305
5306 * linux-s390-low.c (HWCAP_S390_TE): New define.
5307 (s390_arch_setup): Consider the TE field in the HWCAP for
5308 determining 'have_regset_tdb'.
5309
fd0a4d76
SDJ
53102013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5311
5312 PR gdb/16014
5313 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5314 call to sizeof.
5315
1a3d890b
PA
53162013-10-02 Pedro Alves <palves@redhat.com>
5317
5318 * server.c (process_serial_event): Don't output "GDBserver
5319 exiting" if GDB is connected through stdio.
5320 * target.c (mywait): Likewise, be silent if GDB is connected
5321 through stdio.
5322
97ad4581
JB
53232013-10-01 Joel Brobecker <brobecker@adacore.com>
5324
5325 * lynx-low.c (lynx_add_threads_after_attach): New function.
5326 (lynx_attach): Remove call to add_thread. Add call to
5327 lynx_add_threads_after_attach instead.
5328
5b4e221c
MF
53292013-09-28 Mike Frysinger <vapier@gentoo.org>
5330
5331 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5332 * config.in, configure: Regenerated.
5333
ee47b2f8
YQ
53342013-09-18 Yao Qi <yao@codesourcery.com>
5335
5336 PR server/15959
5337 * server.c (start_inferior): Clear 'resume_info'.
5338
d6707650 53392013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5340
d6707650
JW
5341 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5342 for each register.
5343
9243dd0e 53442013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5345
9243dd0e
JW
5346 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5347 linux-tile-low.o to srv_tgtobj.
5348
c623a6ef
WN
53492013-09-16 Will Newton <will.newton@linaro.org>
5350
5351 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5352 out regs.
5353
fb71d39e
PA
53542013-09-06 Pedro Alves <palves@redhat.com>
5355
5356 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5357 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5358 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5359 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5360 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5361 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5362
8e7e9910
PA
53632013-09-06 Pedro Alves <palves@redhat.com>
5364
5365 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5366 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5367
7c3a12ca
PA
53682013-09-06 Pedro Alves <palves@redhat.com>
5369
5370 * linux-amd64-ipa.c: Include tracepoint.h.
5371 * linux-i386-ipa.c: Include tracepoint.h.
5372
8eb3d7b6
RW
53732013-09-06 Ricard Wanderlof <ricardw@axis.com>
5374
5375 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5376 (ps_get_thread_area): New function.
5377
eddddb9d
RW
53782013-09-06 Ricard Wanderlof <ricardw@axis.com>
5379
5380 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5381 (initialize_low_arch): Call init_registers_crisv32 rather than
5382 init_register_crisv32.
5383
533b0600
PA
53842013-09-05 Pedro Alves <palves@redhat.com>
5385
5386 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5387 to ...
5388 * hostio.h: ... this new file.
5389 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5390 win32-low.c: Include hostio.h.
5391
0ce3d3b5
PA
53922013-09-05 Pedro Alves <palves@redhat.com>
5393
5394 * server.h (gdb_client_data, handler_func, callback_handler_func)
5395 (delete_file_handler, add_file_handler, append_callback_event)
5396 (delete_callback_event, start_event_loop, initialize_event_loop):
5397 Move to event-loop.h and include it.
5398 * event-loop.h: New file.
5399
799cdc37
PA
54002013-09-05 Pedro Alves <palves@redhat.com>
5401
5402 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5403 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5404 (loaded_dll, unloaded_dll): Move to ...
5405 * dll.h: ... this new file.
5406 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5407
6a6bbd9d
PA
54082013-09-05 Pedro Alves <palves@redhat.com>
5409
5410 * server.h (current_process, get_thread_process, all_processes)
5411 (add_inferior_to_list, for_each_inferior, current_inferior)
5412 (remove_inferior, add_process, remove_process, find_process_pid)
5413 (have_started_inferiors_p, have_attached_inferiors_p)
5414 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5415 (clear_inferiors, find_inferior, find_inferior_id)
5416 (inferior_target_data, set_inferior_target_data)
5417 (inferior_regcache_data, set_inferior_regcache_data): Move to
5418 inferiors.h, and include it.
5419 * inferiors.h: New file.
5420
f699aaba
PA
54212013-09-05 Pedro Alves <palves@redhat.com>
5422
5423 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5424 Move ...
72f4393d 5425 * ax.h: ... here.
f699aaba 5426
c144c7a0
PA
54272013-09-05 Pedro Alves <palves@redhat.com>
5428
5429 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5430 tracepoint.h.
5431 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5432 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5433 (handle_tracepoint_general_set, handle_tracepoint_query)
5434 (tracepoint_finished_step, tracepoint_was_hit)
5435 (release_while_stepping_state_list, current_traceframe)
5436 (in_readonly_region, traceframe_read_mem)
5437 (fetch_traceframe_registers, traceframe_read_sdata)
5438 (traceframe_read_info, struct fast_tpoint_collect_status)
5439 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5440 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5441 (supply_fast_tracepoint_registers)
5442 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5443 (ipa_tdesc, claim_trampoline_space)
5444 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5445 (agent_mem_read, agent_get_trace_state_variable_value)
5446 (agent_set_trace_state_variable_value, agent_tsv_read)
5447 (agent_mem_read_string, get_raw_reg_func_addr)
5448 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5449 * tracepoint.h: ... this new file.
5450
ff42e6ab
PA
54512013-09-05 Pedro Alves <palves@redhat.com>
5452
5453 * server.h (perror_with_name, error, fatal, warning, paddress)
5454 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5455 include it.
5456 * utils.h: New file.
5457
541af0f4
PA
54582013-09-05 Pedro Alves <palves@redhat.com>
5459
5460 * server.h (remote_debug, noack_mode, transport_is_reliable)
5461 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5462 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5463 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5464 (write_enn, initialize_async_io, enable_async_io)
5465 (disable_async_io, check_remote_input_interrupt_request)
5466 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5467 (dead_thread_notify, prepare_resume_reply)
5468 (decode_address_to_semicolon, decode_address, decode_m_packet)
5469 (decode_M_packet, decode_X_packet, decode_xfer_write)
5470 (decode_search_memory_packet, unhexify, hexify)
5471 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5472 (look_up_one_symbol, relocate_instruction)
5473 (monitor_output): Move to remote-utils.h, and include it.
5474 * remote-utils.h: New file.
5475
eebdf26b
PA
54762013-09-05 Pedro Alves <palves@redhat.com>
5477
5478 * server.h (_): Delete.
5479
3aafd2ff
PA
54802013-09-02 Pedro Alves <palves@redhat.com>
5481
5482 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5483 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5484 allocated.
5485 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5486
cee83bcb
PM
54872013-09-02 Pierre Muller <muller@sourceware.org>
5488
5489 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5490 or WriteProcessMemory complete successfully and handle
5491 ERROR_PARTIAL_COPY error.
5492
9a13b2fa
PA
54932013-09-02 Pedro Alves <palves@redhat.com>
5494
5495 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5496 error instead of EIO.
5497
602e3198
JK
54982013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5499
5500 PR server/15604
5501 * linux-low.c: Include filestuff.h.
5502 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5503 * lynx-low.c: Include filestuff.h.
5504 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5505 * server.c: Include filestuff.h.
5506 (main): Call notice_open_fds.
5507 * spu-low.c: Include filestuff.h.
5508 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5509
96d7229d
LM
55102013-08-22 Luis Machado <lgustavo@codesourcery.com>
5511
5512 * Makefile.in: Explain why ../target and ../nat are not
5513 listed as include file search paths.
5514 (linux-waitpid.o): New object file rule.
5515 * configure.srv (srv_native_linux_obj): New variable.
5516 Replace all occurrences of linux native object files with
5517 $srv_native_linux_obj.
5518 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5519 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5520 (linux_enable_event_reporting): Remove declaration.
5521 (my_waitpid): Moved to common/linux-waitpid.c.
5522 (linux_wait_for_event): Pass ptid when calling
5523 linux_enable_event_reporting.
5524 (linux_supports_tracefork_flag): Remove.
5525 (linux_enable_event_reporting): Likewise.
5526 (linux_tracefork_grandchild): Remove.
5527 (STACK_SIZE): Moved to common/linux-ptrace.c.
5528 (linux_tracefork_child): Remove.
5529 (linux_test_for_tracefork): Remove.
5530 (linux_look_up_symbols): Call linux_supports_traceclone.
5531 (initialize_low): Remove call to linux_test_for_tracefork.
5532 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5533 common/linux-ptrace.h.
5534 (PTRACE_TYPE_ARG4): Likewise.
5535 Include linux-ptrace.h.
5536
32940073
PA
55372013-08-21 Pedro Alves <palves@redhat.com>
5538
5539 * config.in: Renegerate.
5540
33b60d58 55412013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 5542
33b60d58
LM
5543 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5544 (SFILES): Remove $(srcdir)/common/target-common.c and
5545 add $(srcdir)/target/waitstatus.c.
5546 (OBS): Remove target-common.o and add waitstatus.o.
5547 (server_h): Remove $(srcdir)/../common/target-common.h and
5548 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5549 and $(srcdir)/../target/waitstatus.h.
5550 (target-common.o): Remove.
5551 (waitstatus.o): New target object file.
5552 * target.h: Do not include target-common.h and
5553 include target/resume.h, target/wait.h and
5554 target/waitstatus.h.
5555
b8e1b30e
LM
55562013-08-13 Luis Machado <lgustavo@codesourcery.com>
5557
5558 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5559 to PTRACE_TYPE_ARG3.
5560 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5561 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5562 PTRACE_TYPE_ARG4.
5563 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5564 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5565
7a60ad40
YQ
55662013-07-27 Jie Zhang <jie@codesourcery.com>
5567 Daniel Jacobowitz <dan@codesourcery.com>
5568 Yao Qi <yao@codesourcery.com>
5569
5570 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5571 (mips-linux-watch.o): New rule.
5572 (mips_linux_watch_h): New variable.
5573 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5574 srv_tgtobj.
5575 * linux-mips-low.c: Include mips-linux-watch.h.
5576 (struct arch_process_info, struct arch_lwp_info): New.
5577 (update_watch_registers_callback): New function.
5578 (mips_linux_new_process, mips_linux_new_thread) New functions.
5579 (mips_linux_prepare_to_resume, mips_insert_point): New
5580 functions.
5581 (mips_remove_point, mips_stopped_by_watchpoint): New
5582 functions.
5583 (rsp_bp_type_to_target_hw_bp_type): New function.
5584 (mips_stopped_data_address): New function.
5585 (the_low_target): Add watchpoint support functions.
5586
de6f69ad
YQ
55872013-07-27 Yao Qi <yao@codesourcery.com>
5588
5589 * i386-low.c: Include break-common.h.
5590 (enum target_hw_bp_type): Remove.
5591
3360c0bf
LM
55922013-07-24 Luis Machado <lgustavo@codesourcery.com>
5593
5594 * Makefile.in (SFILES): /common/target-common.c.
5595 (OBS): Add target-common.o.
5596 (server_h): Add $(srcdir)/../common/target-common.h.
5597 (target-common.o): New target.
5598 * server.c (queue_stop_reply_callback): Free
5599 status string after use.
5600 * target.c (target_waitstatus_to_string): Remove.
5601 * target.h: Include target-common.h.
5602 (resume_kind): Likewise.
5603 (target_waitkind): Likewise.
5604 (target_waitstatus): Likewise.
5605 (TARGET_WNOHANG): Likewise.
5606
bd885420
YQ
56072013-07-04 Yao Qi <yao@codesourcery.com>
5608
5609 * Makefile.in (host_alias): Use @host_noncanonical@.
5610 (target_alias): Use @target_noncanonical@.
5611 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5612 ACX_NONCANONICAL_HOST.
5613 * configure: Regenerated.
5614
5615 Revert:
5616 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5617
5618 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5619 * configure: Rebuild.
5620 * Makefile.in (version_host, version_target): Get from configure.
5621 (version.c): Use $(version_host) and $(version_target).
5622
17ef446e
PA
56232013-07-03 Pedro Alves <palves@redhat.com>
5624
5625 * Makefile.in (config.status): Depend on development.sh.
5626 * acinclude.m4: Include libmcheck.m4.
5627 * configure: Regenerate.
5628
7a9a7487
MG
56292013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5630
5631 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5632 attribute inside the parentheses.
5633 (winapi_DebugSetProcessKillOnExit): Ditto.
5634 (winapi_DebugBreakProcess): Ditto.
5635 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 5636
49b64de6
MG
56372013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5638
5639 * notif.h (notif_event): Add a dummy member to avoid compiler
5640 errors.
5641
d5749ee7
PA
56422013-07-01 Pedro Alves <palves@redhat.com>
5643
5644 * hostio.c (HOSTIO_PATH_MAX): Define.
5645 (require_filename, handle_open, handle_unlink, handle_readlink):
5646 Use it.
5647
d8d2a3ee
PA
56482013-07-01 Pedro Alves <palves@redhat.com>
5649
5650 * server.h: Include "pathmax.h".
5651 * linux-low.c: Don't include sys/param.h.
5652 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5653 MAXPATHLEN.
5654 * win32-low.c: Don't include sys/param.h.
5655 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5656
bc7dea8d
PA
56572013-07-01 Pedro Alves <palves@redhat.com>
5658
5659 * event-loop.c: Don't check HAVE_UNISTD_H before including
5660 <unistd.h>.
5661 * gdbreplay.c: Likewise.
5662 * remote-utils.c: Likewise.
5663 * server.c: Likewise.
5664 * configure.ac: Don't check for unistd.h.
5665 * configure: Regenerate.
5666
d6c2da54
TT
56672013-06-28 Tom Tromey <tromey@redhat.com>
5668
5669 * Makefile.in (version.c): Use version.in, not
5670 common/version.in.
5671
257b6bec
MG
56722013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5673
5674 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5675 * configure: Rebuild.
5676 * Makefile.in (version_host, version_target): Get from configure.
5677 (version.c): Use $(version_host) and $(version_target).
5678
86ebe149
DK
56792013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5680
5681 Fix trace-status to output user name without trailing colon.
5682 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5683
f30aa5af
DK
56842013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5685
5686 Fix trace-status to output proper start-time and stop-time.
5687 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5688 output start time and stop time in hex as gdb expects.
5689
28a93511
YQ
56902013-06-26 Pedro Alves <pedro@codesourcery.com>
5691
5692 * tracepoint.c (build_traceframe_info_xml): Output trace state
5693 variables present in the trace buffer.
5694
01208463
TT
56952013-06-24 Tom Tromey <tromey@redhat.com>
5696
5697 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5698 create-version.sh.
5699 (version.o): Remove.
5700 * gdbreplay.c: Include version.h.
5701 (version, host_name): Don't declare.
5702 * server.h: Include version.h.
5703 (version, host_name): Don't declare.
5704
760256f9
PA
57052013-06-12 Pedro Alves <palves@redhat.com>
5706
5707 * linux-x86-low.c (linux_is_elf64): Delete global.
5708 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5709 with local linux_pid_exe_is_elf_64_file use.
5710
030031ee
PA
57112013-06-11 Pedro Alves <palves@redhat.com>
5712
5713 * linux-low.c (regset_disabled, disable_regset): New functions.
5714 (regsets_fetch_inferior_registers)
5715 (regsets_store_inferior_registers): Use them.
5716 (initialize_regsets_info); Don't allocate the disabled_regsets
5717 array here.
5718 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5719 comment.
5720
5da6eb0a
PA
57212013-06-11 Pedro Alves <palves@redhat.com>
5722
5723 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5724 xmalloc.
5725
7e5aaa09
PA
57262013-06-11 Pedro Alves <palves@redhat.com>
5727
5728 * linux-x86-low.c (initialize_low_arch): Call
5729 init_registers_x32_avx_linux.
5730
d878444c
JK
57312013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5732
5733 Fix compatibility with Android Bionic.
5734 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5735 it is not empty.
5736
3aee8918
PA
57372013-06-07 Pedro Alves <palves@redhat.com>
5738
5f2b57b5 5739 PR server/14823
3aee8918
PA
5740 * Makefile.in (OBS): Add tdesc.o.
5741 (IPA_OBJS): Add tdesc-ipa.o.
5742 (tdesc-ipa.o): New rule.
5743 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5744 interface.
5745 * linux-low.c (new_inferior): Delete.
5746 (disabled_regsets, num_regsets): Delete.
5747 (linux_add_process): Adjust to set the new per-process
5748 new_inferior flag.
5749 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5750 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5751 was a stop. When calling arch_setup, switch the current inferior
5752 to the thread that got an event.
5753 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5754 (regsets_fetch_inferior_registers)
5755 (regsets_store_inferior_registers): New regsets_info parameter.
5756 Adjust to use it.
5757 (linux_register_in_regsets): New regs_info parameter. Adjust to
5758 use it.
5759 (register_addr, fetch_register, store_register): New usrregs_info
5760 parameter. Adjust to use it.
5761 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5762 parameter regs_info. Adjust to use it.
5763 (linux_fetch_registers): Get the current inferior's regs_info, and
5764 adjust to use it.
5765 (linux_store_registers): Ditto.
5766 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5767 (initialize_low): Don't initialize the target_regsets here. Call
5768 initialize_low_arch.
5769 * linux-low.h (target_regsets): Delete declaration.
5770 (struct regsets_info): New.
5771 (struct usrregs_info): New.
5772 (struct regs_info): New.
5773 (struct process_info_private) <new_inferior>: New field.
5774 (struct linux_target_ops): Delete the num_regs, regmap, and
5775 regset_bitmap fields. New field regs_info.
5776 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5777 * i387-fp.c (num_xmm_registers): Delete.
5778 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5779 calls to new interface.
5780 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5781 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5782 Infer the number of xmm registers from the regcache's target
5783 description.
5784 * i387-fp.h (num_xmm_registers): Delete.
5785 * inferiors.c (add_thread): Don't install the thread's regcache
5786 here.
5787 * proc-service.c (gregset_info): Fetch the current inferior's
5788 regs_info. Adjust to use it.
5789 * regcache.c: Include tdesc.h.
5790 (register_bytes, reg_defs, num_registers)
5791 (gdbserver_expedite_regs): Delete.
5792 (get_thread_regcache): If the thread doesn't have a regcache yet,
5793 create one, instead of aborting gdbserver.
5794 (regcache_invalidate_one): Rename to ...
5795 (regcache_invalidate_thread): ... this.
5796 (regcache_invalidate_one): New.
5797 (regcache_invalidate): Only invalidate registers of the current
5798 process.
5799 (init_register_cache): Add target_desc parameter, and use it.
5800 (new_register_cache): Ditto. Assert the target description has a
5801 non zero registers_size.
5802 (regcache_cpy): Add assertions. Adjust.
5803 (realloc_register_cache, set_register_cache): Delete.
5804 (registers_to_string, registers_from_string): Adjust.
5805 (find_register_by_name, find_regno, find_register_by_number)
5806 (register_cache_size): Add target_desc parameter, and use it.
5807 (free_register_cache_thread, free_register_cache_thread_one)
5808 (regcache_release, register_cache_size): New.
5809 (register_size): Add target_desc parameter, and use it.
5810 (register_data, supply_register, supply_register_zeroed)
5811 (supply_regblock, supply_register_by_name, collect_register)
5812 (collect_register_as_string, collect_register_by_name): Adjust.
5813 * regcache.h (struct target_desc): Forward declare.
5814 (struct regcache) <tdesc>: New field.
5815 (init_register_cache, new_register_cache): Add target_desc
5816 parameter.
5817 (regcache_invalidate_thread): Declare.
5818 (regcache_invalidate_one): Delete declaration.
5819 (regcache_release): Declare.
5820 (find_register_by_number, register_cache_size, register_size)
5821 (find_regno): Add target_desc parameter.
5822 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5823 declarations.
5824 * remote-utils.c: Include tdesc.h.
5825 (outreg, prepare_resume_reply): Adjust.
5826 * server.c: Include tdesc.h.
5827 (gdbserver_xmltarget): Delete declaration.
5828 (get_features_xml, process_serial_event): Adjust.
5829 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5830 declare.
5831 (struct process_info) <tdesc>: New field.
5832 (ipa_tdesc): Declare.
5833 * tdesc.c: New file.
5834 * tdesc.h: New file.
5835 * tracepoint.c: Include tdesc.h.
5836 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5837 (get_context_regcache): Adjust to pass ipa_tdesc down.
5838 (do_action_at_tracepoint): Adjust to get the register cache size
5839 from the context regcache's description.
5840 (traceframe_walk_blocks): Adjust to get the register cache size
5841 from the current trace frame's description.
5842 (traceframe_get_pc): Adjust to get current trace frame's
5843 description and pass it down.
5844 (gdb_collect): Adjust to get the register cache size from the
5845 IPA's description.
5846 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5847 (gdbserver_xmltarget): Delete.
5848 (initialize_low_tracepoint): Set the ipa's target description.
5849 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5850 (initialize_low_tracepoint): Set the ipa's target description.
5851 * linux-x86-low.c: Include tdesc.h.
5852 [__x86_64__] (is_64bit_tdesc): New.
5853 (ps_get_thread_area, x86_get_thread_area): Use it.
5854 (i386_cannot_store_register): Rename to ...
5855 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5856 (i386_cannot_fetch_register): Rename to ...
5857 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5858 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5859 to new interface.
5860 (target_regsets): Rename to ...
5861 (x86_regsets): ... this.
5862 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5863 interface.
5864 (x86_siginfo_fixup): Use is_64bit_tdesc.
5865 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5866 (tdesc_x32_avx_linux, tdesc_x32_linux)
5867 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5868 Declare.
5869 (x86_linux_update_xmltarget): Delete.
5870 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5871 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5872 (AMD64_LINUX_USER64_CS): New.
5873 (x86_linux_read_description): New, based on
5874 x86_linux_update_xmltarget.
5875 (same_process_callback): New.
5876 (x86_arch_setup_process_callback): New.
5877 (x86_linux_update_xmltarget): New.
5878 (x86_regsets_info): New.
5879 (amd64_linux_regs_info): New.
5880 (i386_linux_usrregs_info): New.
5881 (i386_linux_regs_info): New.
5882 (x86_linux_regs_info): New.
5883 (x86_arch_setup): Reimplement.
5884 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5885 (x86_emit_ops): Ditto.
5886 (the_low_target): Adjust. Install x86_linux_regs_info,
5887 x86_cannot_fetch_register, and x86_cannot_store_register.
5888 (initialize_low_arch): New.
5889 * linux-ia64-low.c (tdesc_ia64): Declare.
5890 (ia64_fetch_register): Adjust.
5891 (ia64_usrregs_info, regs_info): New globals.
5892 (ia64_regs_info): New function.
5893 (the_low_target): Adjust.
5894 (initialize_low_arch): New function.
5895 * linux-sparc-low.c (tdesc_sparc64): Declare.
5896 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5897 Adjust.
5898 (sparc_arch_setup): New function.
5899 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5900 (the_low_target): Adjust.
5901 (initialize_low_arch): New function.
5902 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5903 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5904 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5905 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5906 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5907 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5908 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5909 (tdesc_powerpc_isa205_vsx64l): Declare.
5910 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5911 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5912 (ppc_set_pc, ppc_get_hwcap): Adjust.
5913 (ppc_usrregs_info): Forward declare.
5914 (!__powerpc64__) ppc_regmap_adjusted: New global.
5915 (ppc_arch_setup): Adjust to the current process'es target
5916 description.
5917 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5918 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5919 (ppc_store_evrregset): Adjust.
5920 (target_regsets): Rename to ...
5921 (ppc_regsets): ... this, and make static.
5922 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5923 (ppc_regs_info): New function.
5924 (the_low_target): Adjust.
5925 (initialize_low_arch): New function.
5926 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5927 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5928 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5929 (tdesc_s390x_linux64v2): Declare.
5930 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5931 (s390_fill_gregset, s390_store_last_break): Adjust.
5932 (target_regsets): Rename to ...
5933 (s390_regsets): ... this, and make static.
5934 (s390_get_pc, s390_set_pc): Adjust.
5935 (s390_get_hwcap): New target_desc parameter, and use it.
5936 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5937 (s390_arch_setup): Adjust to set the current process'es target
5938 description. Don't adjust the regmap.
5939 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5940 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5941 (regs_info_3264): New globals.
5942 (s390_regs_info): New function.
5943 (the_low_target): Adjust.
5944 (initialize_low_arch): New function.
5945 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5946 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5947 [__mips64] (init_registers_mips_linux)
5948 (init_registers_mips_dsp_linux): Delete defines.
5949 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5950 (have_dsp): New global.
5951 (mips_read_description): New, based on mips_arch_setup.
5952 (mips_arch_setup): Reimplement.
5953 (get_usrregs_info): New function.
5954 (mips_cannot_fetch_register, mips_cannot_store_register)
5955 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5956 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5957 (target_regsets): Rename to ...
5958 (mips_regsets): ... this, and make static.
5959 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5960 (dsp_regs_info, regs_info): New globals.
5961 (mips_regs_info): New function.
5962 (the_low_target): Adjust.
5963 (initialize_low_arch): New function.
5964 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5965 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5966 Declare.
5967 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5968 (arm_read_description): New, with bits factored from
5969 arm_arch_setup.
5970 (arm_arch_setup): Reimplement.
5971 (target_regsets): Rename to ...
5972 (arm_regsets): ... this, and make static.
5973 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5974 (arm_regs_info): New function.
5975 (the_low_target): Adjust.
5976 (initialize_low_arch): New function.
5977 * linux-m68k-low.c (tdesc_m68k): Declare.
5978 (target_regsets): Rename to ...
5979 (m68k_regsets): ... this, and make static.
5980 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5981 (m68k_regs_info): New function.
5982 (m68k_arch_setup): New function.
5983 (the_low_target): Adjust.
5984 (initialize_low_arch): New function.
5985 * linux-sh-low.c (tdesc_sharch): Declare.
5986 (target_regsets): Rename to ...
5987 (sh_regsets): ... this, and make static.
5988 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5989 (sh_regs_info, sh_arch_setup): New functions.
5990 (the_low_target): Adjust.
5991 (initialize_low_arch): New function.
5992 * linux-bfin-low.c (tdesc_bfin): Declare.
5993 (bfin_arch_setup): New function.
5994 (bfin_usrregs_info, regs_info): New globals.
5995 (bfin_regs_info): New function.
5996 (the_low_target): Adjust.
5997 (initialize_low_arch): New function.
5998 * linux-cris-low.c (tdesc_cris): Declare.
5999 (cris_arch_setup): New function.
6000 (cris_usrregs_info, regs_info): New globals.
6001 (cris_regs_info): New function.
6002 (the_low_target): Adjust.
6003 (initialize_low_arch): New function.
6004 * linux-cris-low.c (tdesc_crisv32): Declare.
6005 (cris_arch_setup): New function.
6006 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6007 (cris_regs_info): New function.
6008 (the_low_target): Adjust.
6009 (initialize_low_arch): New function.
6010 * linux-m32r-low.c (tdesc_m32r): Declare.
6011 (m32r_arch_setup): New function.
6012 (m32r_usrregs_info, regs_info): New globals.
6013 (m32r_regs_info): Adjust.
6014 (initialize_low_arch): New function.
6015 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6016 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6017 (tic6x_usrregs_info): Forward declare.
6018 (tic6x_read_description): New function, based on ...
6019 (tic6x_arch_setup): ... this. Reimplement.
6020 (target_regsets): Rename to ...
6021 (tic6x_regsets): ... this, and make static.
6022 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6023 (tic6x_regs_info): New function.
6024 (the_low_target): Adjust.
6025 (initialize_low_arch): New function.
6026 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6027 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6028 (target_regsets): Rename to ...
6029 (xtensa_regsets): ... this, and make static.
6030 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6031 globals.
6032 (xtensa_arch_setup, xtensa_regs_info): New functions.
6033 (the_low_target): Adjust.
6034 (initialize_low_arch): New function.
6035 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6036 (nios2_arch_setup): Set the current process'es tdesc.
6037 (target_regsets): Rename to ...
6038 (nios2_regsets): ... this.
6039 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6040 (nios2_regs_info): New function.
6041 (the_low_target): Adjust.
6042 (initialize_low_arch): New function.
a261b8f5
PA
6043 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6044 (aarch64_arch_setup): Set the current process'es tdesc.
6045 (target_regsets): Rename to ...
6046 (aarch64_regsets): ... this.
6047 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6048 (aarch64_regs_info): New function.
6049 (the_low_target): Adjust.
6050 (initialize_low_arch): New function.
3aee8918
PA
6051 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6052 globals.
6053 (target_regsets): Rename to ...
6054 (tile_regsets): ... this.
6055 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6056 (tile_regs_info): New function.
6057 (tile_arch_setup): Set the current process'es tdesc.
6058 (the_low_target): Adjust.
6059 (initialize_low_arch): New function.
6060 * spu-low.c (tdesc_spu): Declare.
6061 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6062 * win32-arm-low.c (tdesc_arm): Declare.
6063 (arm_arch_setup): New function.
6064 (the_low_target): Install arm_arch_setup instead of
6065 init_registers_arm.
6066 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6067 (init_windows_x86): Rename to ...
6068 (i386_arch_setup): ... this. Set `win32_tdesc'.
6069 (the_low_target): Adjust.
6070 * win32-low.c (win32_tdesc): New global.
6071 (child_add_thread): Don't create the thread cache here.
6072 (do_initial_child_stuff): Set the new process'es tdesc.
6073 * win32-low.h (struct target_desc): Forward declare.
6074 (win32_tdesc): Declare.
6075 * lynx-i386-low.c (tdesc_i386): Declare global.
6076 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6077 * lynx-low.c (lynx_tdesc): New global.
6078 (lynx_add_process): Set the new process'es tdesc.
6079 * lynx-low.h (struct target_desc): Forward declare.
6080 (lynx_tdesc): Declare global.
6081 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6082 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6083 * nto-low.c (nto_tdesc): New global.
6084 (do_attach): Set the new process'es tdesc.
6085 * nto-low.h (struct target_desc): Forward declare.
6086 (nto_tdesc): Declare.
6087 * nto-x86-low.c (tdesc_i386): Declare.
6088 (nto_x86_arch_setup): Set `nto_tdesc'.
6089
b1fbec62
GB
60902013-06-04 Gary Benson <gbenson@redhat.com>
6091
6092 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6093 to qSupported response when appropriate.
6094 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6095 with nonzero-length annex.
6096 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6097 arguments supplied in annex.
6098
d1ec4ce7
DE
60992013-05-31 Doug Evans <dje@google.com>
6100
ac44adcb 6101 PR server/15594
d1ec4ce7
DE
6102 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6103 64 bits in 64-cross-32 environment.
6104
9b25f2d3
PA
61052013-05-28 Pedro Alves <palves@redhat.com>
6106
6107 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6108 (aarch64-without-fpu.c): Delete rule.
6109 * configure.srv (aarch64*-*-linux*): Remove references to
6110 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6111 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6112 declaration.
6113
6740dc9c
PA
61142013-05-24 Pedro Alves <palves@redhat.com>
6115
6116 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6117 instead of strchr/decode_address. Error if the range isn't split
6118 with a ','. Don't assume there's be a ':' in the action.
6119
c2d6af84
PA
61202013-05-23 Yao Qi <yao@codesourcery.com>
6121 Pedro Alves <palves@redhat.com>
6122
6123 * linux-low.c (lwp_in_step_range): New function.
6124 (linux_wait_1): If the thread was range stepping and stopped
6125 outside the stepping range, report the stop to GDB. Otherwise,
6126 continue stepping. Add range stepping debug output.
6127 (linux_set_resume_request): Copy the step range from the resume
6128 request to the lwp.
6129 (linux_supports_range_stepping): New.
6130 (linux_target_ops) <supports_range_stepping>: Set to
6131 linux_supports_range_stepping.
6132 * linux-low.h (struct linux_target_ops)
6133 <supports_range_stepping>: New field.
6134 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6135 * linux-x86-low.c (x86_supports_range_stepping): New.
6136 (the_low_target) <supports_range_stepping>: Set to
6137 x86_supports_range_stepping.
6138 * server.c (handle_v_cont): Handle 'r' action.
6139 (handle_v_requests): Append ";r" if the target supports range
6140 stepping.
6141 * target.h (struct thread_resume) <step_range_start,
6142 step_range_end>: New fields.
6143 (struct target_ops) <supports_range_stepping>:
6144 New field.
6145 (target_supports_range_stepping): New macro.
6146
58794e1a
JB
61472013-05-17 Joel Brobecker <brobecker@adacore.com>
6148
6149 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6150 confusion in comment.
6151
d631c5a7
JB
61522013-05-17 Joel Brobecker <brobecker@adacore.com>
6153
6154 * lynx-low.c (struct process_info_private): New type.
6155 (lynx_add_process): New function.
6156 (lynx_create_inferior, lynx_attach): Replace calls to
6157 add_process by calls to lynx_add_process.
6158 (lynx_resume): If PTID is null, then try using
6159 current_process()->private->last_wait_event_ptid.
6160 Add comments.
6161 (lynx_clear_inferiors): Delete. The contents of that function
6162 has been inlined in lynx_mourn;
6163 (lynx_wait_1): Save the ptid in the process's private data.
6164 (lynx_mourn): Free the process' private data. Replace call
6165 to lynx_clear_inferiors by call to clear_inferiors.
6166
96f7a20f
YQ
61672013-05-17 Yao Qi <yao@codesourcery.com>
6168
6169 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6170 the right place.
6171
db0dfaa0
LM
61722013-05-16 Luis Machado <lgustavo@codesourcery.com>
6173
6174 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6175 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6176 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6177 PT_TEXT_END_ADDR guards. Update comments.
6178 (linux_target_op) <read_offsets>: Conditionally define to
6179 linux_read_offsets if the target is UCLIBC and if it defines
6180 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6181
68f5f838
SL
61822013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6183 Andrew Jenner <andrew@codesourcery.com>
6184
6185 * Makefile.in (SFILES): Add linux-nios2-low.c.
6186 (clean): Add action to delete nios2-linux.c.
6187 (nios2-linux.c): New rule.
6188 * configure.srv: Add nios2*-*-linux*.
6189 * linux-nios2-low.c: New.
6190
1ebff1fd
HAQ
61912013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6192
6193 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6194
f6150862
HZ
61952013-04-25 Hui Zhu <hui@codesourcery.com>
6196
6197 PR gdb/15186
f6150862
HZ
6198 * ax.c (ax_printf): Add fflush.
6199
614c279d
TT
62002013-04-22 Tom Tromey <tromey@redhat.com>
6201
6202 * Makefile.in (SFILES): Add filestuff.c.
6203 (OBS): Add filestuff.o.
6204 (filestuff.o): New target.
6205 * config.in, configure: Rebuild.
6206 * configure.ac: Check for fdwalk, pipe2.
6207
7d4e5717
PA
62082013-04-17 Pedro Alves <palves@redhat.com>
6209
6210 * configure.ac (USE_THREAD_DB): Delete variable.
6211 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6212 Don't AC_SUBST USE_THREAD_DB.
6213 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6214 * config.in, configure: Regenerate.
6215
d5c93e41
PA
62162013-04-16 Pedro Alves <palves@redhat.com>
6217
6218 * linux-low.h (struct lwp_info) <thread_known>: Move under
6219 the USE_THREAD_DB #ifdef.
6220
04f5fe89
PA
62212013-04-16 Pedro Alves <palves@redhat.com>
6222
6223 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6224 (linux-low.o): Delete rule.
6225 * linux-low.h: Always include "gdb_thread_db.h" instead of
6226 conditionally including thread_db.h.
6227 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6228 HAVE_THREAD_DB_H.
6229
480b27bf
JK
62302013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6231
6232 * Makefile.in (install-only): Fix make install regression.
6233
43662968
JK
62342013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6235
6236 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6237 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6238 installation.
6239 * gdbserver.1: Remove.
6240
3e74e146
PA
62412013-03-22 Pedro Alves <palves@redhat.com>
6242
6243 * linux-low.c (handle_extended_wait): Don't call
6244 linux_enable_event_reporting.
6245
a8347a2a
TT
62462013-03-15 Tony Theodore <tonyt@logyst.com>
6247
6248 PR build/9098:
6249 * Makefile.in (SHELL): Use @SHELL@.
6250
eeb56fa7
SDJ
62512013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6252
6253 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6254 compiler warning.
6255
4fa7e2ff
JB
62562013-03-13 Joel Brobecker <brobecker@adacore.com>
6257
6258 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6259 Remove extraneous NULL element.
6260
8ddb1965
YQ
62612013-03-13 Yao Qi <yao@codesourcery.com>
6262
6263 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6264 'V' block in trace frame.
6265
9accd112
MM
62662013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6267
6268 * target.h (struct target_ops): Add btrace ops.
6269 (target_supports_btrace): New macro.
6270 (target_enable_btrace): New macro.
6271 (target_disable_btrace): New macro.
6272 (target_read_btrace): New macro.
6273 * gdbthread.h (struct thread_info): Add btrace field.
6274 * server.c: Include btrace-common.h.
6275 (handle_btrace_general_set): New function.
6276 (handle_btrace_enable): New function.
6277 (handle_btrace_disable): New function.
6278 (handle_general_set): Call handle_btrace_general_set.
6279 (handle_qxfer_btrace): New function.
6280 (struct qxfer qxfer_packets[]): Add btrace entry.
6281 * inferiors.c (remove_thread): Disable btrace.
6282 * linux-low: Include linux-btrace.h.
6283 (linux_low_enable_btrace): New function.
6284 (linux_low_read_btrace): New function.
6285 (linux_target_ops): Add btrace ops.
6286 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6287 Add srv_linux_btrace=yes.
6288 (x86_64-*-linux*): Add linux-btrace.o.
6289 Add srv_linux_btrace=yes.
6290 * configure.ac: Define HAVE_LINUX_BTRACE.
6291 * config.in: Regenerated.
6292 * configure: Regenerated.
6293
5cc22e4c
MM
62942013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6295
6296 * server.c (handle_qxfer): Preserve error message if -3 is
6297 returned.
6298 (qxfer): Document the -3 return value.
6299
7c97f91e
MM
63002013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6301
6302 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6303 (linux_btrace_h): New variable.
6304 (linux-btrace.o): New rule.
6305
be9a119c 63062013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6307 Hafiz Abid Qadeer <abidh@codesourcery.com>
6308
6309 * tracepoint.c (trace_buffer_size): New global.
6310 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6311 (init_trace_buffer): Change to one-argument function. Allocate
6312 trace buffer memory.
6313 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6314 handle QTBuffer:size packet.
6315 (cmd_bigqtbuffer_size): New function.
6316 (initialize_tracepoint): Call init_trace_buffer with
6317 DEFAULT_TRACE_BUFFER_SIZE.
6318 * server.c (handle_query): Add QTBuffer:size in the
6319 supported packets.
6320
e64f7499
YQ
63212013-03-07 Yao Qi <yao@codesourcery.com>
6322
6323 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6324 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6325 of -1.
6326 (cmd_qtsp): Adjust condition. Do post increment.
6327 Set cur_action and cur_step_action back to 0.
6328
f0ae6fc3
PA
63292013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6330
6331 PR server/15236
6332 * linux-low.c (linux_write_memory): Return early success if LEN is
6333 zero.
6334
b5b0b0af
CV
63352013-03-05 Corinna Vinschen <vinschen@redhat.de>
6336
334ad4a8 6337 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6338
589bc927
TT
63392013-02-28 Tom Tromey <tromey@redhat.com>
6340
6341 * configure.ac: Invoke AC_SYS_LARGEFILE.
6342 * configure, config.in: Rebuild.
6343
dfe07582
CV
63442013-02-28 Corinna Vinschen <vinschen@redhat.com>
6345
6346 * win32-low.c: Throughout, fix format strings and casts of
6347 printf-like functions to avoid type related warnings on all
6348 platforms.
6349 (get_child_debug_event): Print dwDebugEventCode as hex since
6350 that's how it's usually documented.
6351
736cd585
YQ
63522013-02-28 Yao Qi <yao@codesourcery.com>
6353
6354 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6355 pulongest.
6356
e1f58301
JW
63572013-02-27 Jiong Wang <jiwang@tilera.com>
6358
6359 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6360 (reg-tilegx32.c): New rule.
6361 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6362 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6363 different register info initializer according to elf class.
6364 (init_registers_tilgx32): New function. The tilegx32 register info
6365 initializer.
6366 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6367 (tile_store_gregset): Likewise.
6368
d171ca78
YQ
63692013-02-27 Yao Qi <yao@codesourcery.com>
6370
6371 * server.c (process_point_options): Print debug message when
6372 debug_threads is true.
6373
282bbdf3
YQ
63742013-02-26 Yao Qi <yao@codesourcery.com>
6375
6376 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6377
aca22551
PA
63782013-02-19 Pedro Alves <palves@redhat.com>
6379 Kai Tietz <ktietz@redhat.com>
6380
6381 PR gdb/15161
6382
6383 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6384 instead of strtoul to extract address from packet.
6385 (process_serial_event) <'z'>: Likewise.
6386
4f3cee1c
YQ
63872013-02-18 Yao Qi <yao@codesourcery.com>
6388
6389 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6390
8e1d55a3
PA
63912013-02-14 Pedro Alves <palves@redhat.com>
6392
6393 Plug memory leak.
6394
6395 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6396 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6397
458820da
PA
63982013-02-14 Pedro Alves <palves@redhat.com>
6399
6400 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6401
baea0dae
PA
64022013-02-14 Pedro Alves <palves@redhat.com>
6403
6404 * tracepoint.c (save_string): Delete.
6405 (add_tracepoint_action): Use savestring instead of save_string.
6406
0b1afbb3
PA
64072013-02-12 Pedro Alves <palves@redhat.com>
6408
6409 * linux-xtensa-low.c: Ditto.
6410 * xtensa-xtregs.c: Ditto.
6411
8a4ac37e
PA
64122013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6413
6414 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6415 thread_db.
6416
148de6bb
MS
64172013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6418
6419 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6420 aarch64_num_wp_regs and aarch64_num_bp_regs to
6421 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6422
55fac6e0
MS
64232013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6424
6425 * linux-aarch64-low.c (ps_get_thread_area): Replace
6426 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6427
176eb98c
MS
64282013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6429 Marcus Shawcroft <marcus.shawcroft@arm.com>
6430 Nigel Stephens <nigel.stephens@arm.com>
6431 Yufeng Zhang <yufeng.zhang@arm.com>
6432
6433 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6434 (aarch64.c, aarch64-without-fpu.c): New targets.
6435 * configure.srv (aarch64*-*-linux*): New.
6436 * linux-aarch64-low.c: New file.
6437
56f7af9c
MS
64382013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6439
43aaf8b6 6440 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
6441 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6442 (dequeue_one_deferred_signal, linux_resume_one_thread)
6443 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6444 (linux_tracefork_grandchild, linux_test_for_tracefork)
6445 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6446 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6447 where the argument is 0.
6448
60f662b0
YQ
64492013-01-25 Yao Qi <yao@codesourcery.com>
6450
6451 * event-loop.c: Include "queue.h".
6452 (gdb_event_p): New typedef.
6453 (struct gdb_event) <next_event>: Remove.
6454 (event_queue): Change to QUEUE(gdb_event_p).
6455 (async_queue_event): Remove.
6456 (gdb_event_xfree): New.
6457 (initialize_event_loop): New.
6458 (process_event): Use API from QUEUE.
6459 (wait_for_event): Likewise.
6460 * server.c (main): Call initialize_event_loop.
6461 * server.h (initialize_event_loop): Declare.
6462
5ae4861a
YQ
64632013-01-18 Yao Qi <yao@codesourcery.com>
6464
6465 * ax.h (struct eval_agent_expr_context): New.
6466 (gdb_eval_agent_expr): Update declaration.
6467 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6468 TFRAME. Add new argument CTX.
6469 * server.h (struct eval_agent_expr_context): Declare.
6470 (agent_mem_read, agent_tsv_read): Update declaration.
6471 (agent_mem_read_string): Likewise.
6472 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6473 (add_traceframe_block): Add new argument TPOINT.
6474 Increase TPOINT->traceframe_usage.
6475 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6476 eval_tracepoint_agent_expr.
6477 (condition_true_at_tracepoint): Likewise.
6478 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6479 (agent_mem_read_string, agent_tsv_read): Likewise.
6480
85e00e85
YQ
64812013-01-16 Yao Qi <yao@codesourcery.com>
6482
6483 * linux-low.c (linux_resume_one_lwp): Don't check
6484 'lwp->bp_reinsert != 0'.
6485
4039cf45
JB
64862013-01-07 Joel Brobecker <brobecker@adacore.com>
6487 Pedro Alves <palves@redhat.com>
6488
6489 * lynx-low.c (ptrace_request_to_str): Define a temporary
6490 macro and use it to simplify this function's implementation.
6491
9044dee2
JB
64922013-01-07 Joel Brobecker <brobecker@adacore.com>
6493
6494 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6495 sets errno.
6496
e6352c8f
JB
64972013-01-07 Joel Brobecker <brobecker@adacore.com>
6498
6499 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6500
50681a27
JB
65012013-01-07 Joel Brobecker <brobecker@adacore.com>
6502
6503 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6504
3f6e77ef
JB
65052013-01-07 Joel Brobecker <brobecker@adacore.com>
6506
6507 * lynx-low.c (lynx_resume): Use the resume_info parameter
6508 to determine the ptid for the lynx_ptrace call, unless
6509 it is equal to minus_one_ptid, in which case we use the
6510 ptid of the current_inferior.
6511 (lynx_wait_1): After having received a thread create/exit
6512 event, resume the inferior's execution using the signaling
6513 thread's ptid, rather than the old ptid.
6514
7fda33ae
JB
65152013-01-07 Joel Brobecker <brobecker@adacore.com>
6516
6517 * lynx-low.c (lynx_resume): Delete variable ret.
6518
b9786c74
JB
65192013-01-01 Joel Brobecker <brobecker@adacore.com>
6520
6521 * gdbreplay.c (gdbreplay_version): Update copyright year.
6522 * server.c (gdbserver_version): Likewise.
6523
8b93d60f
JB
65242012-12-17 Joel Brobecker <brobecker@adacore.com>
6525
6526 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6527 new thread.
6528
037335a7
JB
65292012-12-17 Joel Brobecker <brobecker@adacore.com>
6530
6531 * lynx-low.c (ptrace_request_to_str): Add handling for
6532 PTRACE_GETTRACESIG.
6533
52d4cbd8
JB
65342012-12-17 Joel Brobecker <brobecker@adacore.com>
6535
6536 * lynx-low.c (lynx_attach): Delete variable new_process.
6537
ab8f6ca9
JB
65382012-12-17 Joel Brobecker <brobecker@adacore.com>
6539
6540 * lynx-low.c (lynx_create_inferior): Delete variable
6541 new_process.
6542
78cbc024
JB
65432012-12-17 Joel Brobecker <brobecker@adacore.com>
6544
6545 * lynx-low.c (ptrace_request_to_str): Do not handle
6546 PTRACE_GETTHREADLIST if this macro does not exist.
6547
14a00470
YQ
65482012-12-15 Yao Qi <yao@codesourcery.com>
6549
6550 * Makefile.in (OBS): Add notif.o.
6551 * notif.c, notif.h: New.
6552 * server.c: Include "notif.h".
6553 (struct vstop_notif) <next>: Remove.
6554 <base>: New field.
6555 (queue_stop_reply): Update.
6556 (push_event, send_next_stop_reply): Remove.
6557 (discard_queued_stop_replies): Update.
6558 (notif_stop): New variable.
6559 (handle_v_stopped): Remove.
6560 (handle_v_requests): Don't call handle_v_stopped. Call
6561 handle_ack_notif instead.
6562 (queue_stop_reply_callback): Call notif_event_enque instead
6563 of queue_stop_reply.
6564 (handle_status): Don't call send_next_stop_reply, call
6565 notif_write_event instead.
6566 (kill_inferior_callback): Likewise.
6567 (detach_or_kill_inferior_callback): Likewise.
6568 (main): Call initialize_notif.
6569 (process_serial_event): Call QUEUE_is_empty.
6570 (handle_target_event): Call notif_push instead of push event.
6571 * server.h (push_event): Remove declaration.
6572
61c125b9
TT
65732012-12-10 Tom Tromey <tromey@redhat.com>
6574
6575 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6576 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6577 macros.
6578 (.c.o): Rewrite.
6579 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6580 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6581 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6582 (amd64-linux-ipa.o, ax.o): Rewrite.
6583 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6584 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6585 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6586 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6587 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6588 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6589 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6590 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6591 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6592 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6593 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6594 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6595 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6596 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6597 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6598 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6599 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6600 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6601 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6602 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6603 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6604 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6605 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6606 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6607 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6608 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6609 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6610 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6611 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6612 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6613 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6614 (reg-tilegx.o): Remove.
6615 (all_object_files): New macro.
6616 Include .deps files.
6617 * aclocal.m4, configure: Rebuild.
6618 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6619 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6620 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6621
e90e9ad9
TT
66222012-12-05 Tom Tromey <tromey@redhat.com>
6623
6624 PR gdb/14917:
6625 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6626
02d403bf 66272012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
6628
6629 * configure.ac: Check for linux/perf_event.h.
6630 * config.in: Regenerated.
6631 * configure: Regenerated.
6632
0270a750
PA
66332012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6634
6635 * hostio.c (handle_readlink): Decrease buffer size
6636 parameter passed to readlink by one byte.
6637
8c29b58e
YQ
66382012-11-26 Yao Qi <yao@codesourcery.com>
6639
6640 * configure.ac (build_warnings): Append '-Wempty-body'.
6641 * configure: Regenerated.
6642 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6643 body.
6644
8bdce1ff
PM
66452012-11-15 Pierre Muller <muller@sourceware.org>
6646
6647 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6648 * config.in: Regenerate.
6649 * configure: Regenerate.
6650 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6651 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6652 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6653 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6654 header.
6655 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6656 instead of <sys/wait.h> header.
6657 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6658
02d403bf 66592012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6660
6661 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6662 (various make rules): Remove -DGDBSERVER
6663
fbd5db48
YQ
66642012-11-09 Yao Qi <yao@codesourcery.com>
6665
6666 * spu-low.c (current_ptid): Move it to ..
6667 * gdbthread.h: ... here. New.
6668 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6669 * server.c (myresume, process_serial_event): Likewise.
6670 * thread-db.c (thread_db_find_new_threads): Likewise.
6671 * tracepoint.c (run_inferior_command): Likewise.
6672
b3dc46ff
AB
66732012-10-01 Andrew Burgess <aburgess@broadcom.com>
6674
6675 * server.c (handle_search_memory_1): Include access length in
6676 warning message.
6677
07c04788
HPN
66782012-09-05 Michael Brandt <michael.brandt@axis.com>
6679
6680 * linux-crisv32-low.c: Fix compile errors.
6681
918d227b
YQ
66822012-09-04 Yao Qi <yao@codesourcery.com>
6683
6684 * tracepoint.c (cmd_qtsv): Adjust debug message.
6685 Don't check CUR_TPOINT.
6686
18c1b81a
YQ
66872012-08-28 Yao Qi <yao@codesourcery.com>
6688
6689 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6690 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6691 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6692 Remove declarations of xmalloc, xreallloc, xstrdup and
6693 freeargv.
6694 * Makefile.in (libiberty_h): New.
6695 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6696 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6697
dc82f37b
YQ
66982012-08-23 Yao Qi <yao@codesourcery.com>
6699
6700 * server.h: Remove declaration of 'xsnprintf'.
6701
406b1477
KS
67022012-08-22 Keith Seitz <keiths@redhat.com>
6703
6704 * server.h: Include build-gnulib-gbserver/config.h.
6705 * gdbreplay.c: Likewise.
6706
e6712ff1
DE
67072012-08-08 Doug Evans <dje@google.com>
6708
6709 * Makefile.in (SFILES): Add gdb_vecs.c.
6710 (OBS): Add gdb_vecs.o.
6711 (gdb_vecs_h, host_defs_h): New variables.
6712 (thread-db.o): Add $(gdb_vecs_h) dependency.
6713 (gdb_vecs.o): New rule.
6714 * thread-db.c: #include "gdb_vecs.h".
6715 (thread_db_load_search): Use a vector to iterate over path elements.
6716 Handle text appearing after "$pdir".
6717
6718 * configure.ac: Add check for strstr.
6719 * config.in: Regenerate.
6720 * configure: Regenerate.
6721
7c3270ae
UW
67222012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6723
6724 * hostio.c (handle_pread): If pread fails, fall back to attempting
6725 lseek/read.
6726 (handle_pwrite): Likewise for pwrite.
6727
b62e2b27
UW
67282012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6729
6730 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6731 between unsupported TYPE and unimplementable ADDR/LEN combination.
6732 (arm_insert_point): Act on new return value.
6733
78a99e91
PA
67342012-07-31 Pedro Alves <palves@redhat.com>
6735
6736 * server.c (process_point_options): Only skip tokens if we find
6737 one that is unrecognized. Don't treat 'X' specially while
6738 skipping unrecognized tokens.
6739
fcf303ab
UW
67402012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6741
6742 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6743 to 4-byte-align HW breakpoint addresses for Thumb.
6744
7255706c
YQ
67452012-07-27 Yao Qi <yao@codesourcery.com>
6746
6747 PR remote/14161.
6748
6749 * server.h: Declare gdb_agent_about_to_close.
6750 * target.c (kill_inferior): Include "agent.h".
6751 New. Send command 'kill'.
6752 * target.h (kill_inferior): Removed macro.
6753 * tracepoint.c (gdb_agent_about_to_close): New.
6754 (gdb_agent_helper_thread): Handle command 'close'.
6755 Wait endlessly until the inferior stops.
6756 Install gdb_agent_remove_socket to atexit hook.
6757 (agent_socket_name): New static variable.
6758 (gdb_agent_socket_init): Replace local variable 'name' with
6759 'agent_socket_name'.
6760 (gdb_agent_remove_socket): New.
6761
5a3f286f
YQ
67622012-07-27 Yao Qi <yao@codesourcery.com>
6763
6764 * server.c (process_point_options): Stop at 'X' when parsing.
6765
961bd387
ME
67662012-07-19 Michael Eager <eager@eagercon.com>
6767
a261b8f5 6768 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6769 to hw_execute.
6770 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6771 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6772 hardware breakpoint.
6773
aa7c7447
JK
67742012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6775
6776 * gdbserver/linux-low.c (initialize_low): Call
6777 linux_ptrace_init_warnings.
6778
7f216e7c
DE
67792012-07-02 Doug Evans <dje@google.com>
6780
6781 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6782 pointer to int.
6783
d3ce09f5
SS
67842012-07-02 Stan Shebs <stan@codesourcery.com>
6785
6786 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6787 (ax.o): Add it to build rule.
6788 (ax-ipa.o): Ditto.
6789 (OBS): Add format.o.
6790 (IPA_OBS): Add format.o.
6791 * server.c (handle_query): Claim support for breakpoint commands.
6792 (process_point_options): Add command case.
6793 (process_serial_event): Leave running if there are printfs in
6794 effect.
6795 * mem-break.h (any_persistent_commands): Declare.
6796 (add_breakpoint_commands): Declare.
6797 (gdb_no_commands_at_breakpoint): Declare.
6798 (run_breakpoint_commands): Declare.
6799 * mem-break.c (struct point_command_list): New struct.
6800 (struct breakpoint): New field command_list.
6801 (any_persistent_commands): New function.
6802 (add_commands_to_breakpoint): New function.
6803 (add_breakpoint_commands): New function.
6804 (gdb_no_commands_at_breakpoint): New function.
6805 (run_breakpoint_commands): New function.
6806 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6807 locally.
6808 * ax.c: Include format.h.
6809 (ax_printf): New function.
6810 (gdb_eval_agent_expr): Add printf opcode.
6811
2f8f6aed
YQ
68122012-06-13 Yao Qi <yao@codesourcery.com>
6813
6814 * server.c (start_inferior): Remove duplicated writes to fields
6815 'last_resume_kind' and 'last_status' of 'current_inferior'.
6816
0c9070b3
YQ
68172012-06-12 Yao Qi <yao@codesourcery.com>
6818 Pedro Alves <palves@redhat.com>
6819
6820 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6821 comment.
6822 * server.c (handle_v_cont): Extend comment.
6823
c52daf70
YQ
68242012-06-11 Yao Qi <yao@codesourcery.com>
6825
6826 * linux-low.c (linux_attach): Add 'static'.
6827
d38bbb0a
YQ
68282012-06-06 Yao Qi <yao@codesourcery.com>
6829
6830 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6831
89dc0afd
JK
68322012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6833
6834 Fix gcc -flto compilation warning.
6835 * server.c (main): Make variable multi_mode and attach volatile.
6836
75f62ce7
TJB
68372012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6838
6839 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6840 if the platform doesn't know about it.
6841
65f479b6
PA
68422012-05-30 Jeff Kenton <jkenton@tilera.com>
6843
6844 * Makefile.in (SFILES): Add linux-tile-low.c.
6845 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6846 * configure.srv: Handle tilegx-*-linux*.
6847 * linux-tile-low.c: New file.
6848
0c5bf5a9
JK
68492012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6850
6851 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6852
a493e3e2
PA
68532012-05-24 Pedro Alves <palves@redhat.com>
6854
6855 PR gdb/7205
6856
43aaf8b6 6857 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6858
2ea28649
PA
68592012-05-24 Pedro Alves <palves@redhat.com>
6860
6861 PR gdb/7205
6862
6863 Replace target_signal with gdb_signal throughout.
6864
8d409d16
MR
68652012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6866
6867 * linux-low.c (linux_store_registers): Avoid the copying sequence
6868 when no data has been retrieved by ptrace.
6869
23512c01
MGD
68702012-05-22 Will Deacon <will.deacon@arm.com>
6871
6872 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6873 Include asm/ptrace.h.
6874 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6875 already defined.
6876
4934b29e
MR
68772012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6878
6879 * linux-low.c (linux_store_registers): Don't re-retrieve data
6880 with ptrace that has already been obtained from /proc. Always
6881 copy any data retrieved with ptrace to the buffer supplied.
6882
bde24c0a
PA
68832012-05-11 Yao Qi <yao@codesourcery.com>
6884 Pedro Alves <palves@redhat.com>
6885
6886 * linux-low.c (enum stopping_threads_kind): New.
6887 (stopping_threads): Change type to `enum stopping_threads_kind'.
6888 (handle_extended_wait): If stopping and suspending threads, leave
6889 the new_lwp suspended too.
6890 (linux_wait_for_event): Adjust.
6891 (stop_all_lwps): Set `stopping_threads' to
6892 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6893 whether we're suspending threads or just stopping them. Assert no
6894 recursion happens.
6895
623b6bdf
YQ
68962012-04-29 Yao Qi <yao@codesourcery.com>
6897
6898 * server.h: Move some code to ...
6899 * gdbthread.h: ... here. New.
6900 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6901 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6902 (nto-low.o, win32-low.o): Likewise.
6903 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6904 * regcache.c, remote-utils.c, server.c: Likewise.
6905 * target.c, tracepoint.c, win32-low.c: Likewise.
6906
f15f9948
TJB
69072012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6908
6909 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6910 (PTRACE_ARG4_TYPE): Likewise.
6911 (PTRACE_XFER_TYPE): Likewise.
6912 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6913 ptrace to PTRACE_ARG3_TYPE.
6914 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6915 (PTRACE_ARG4_TYPE): Likewise.
6916 (PTRACE_XFER_TYPE): Likewise.
6917 (linux_detach_one_lwp): Cast fourth argument of
6918 ptrace to long then PTRACE_ARG4_TYPE.
6919 (regsets_fetch_inferior_registers): Cast third argument of
6920 ptrace to long then PTRACE_ARG3_TYPE.
6921 (regsets_store_inferior_registers): Likewise.
6922
38ea300a
PA
69232012-04-20 Pedro Alves <palves@redhat.com>
6924
6925 * configure: Regenerate.
6926
c971b7fa
PA
69272012-04-19 Pedro Alves <palves@redhat.com>
6928
43aaf8b6 6929 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6930 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6931 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6932 (all, install-only, uninstall, clean-info, all-lib, clean): No
6933 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6934 (maintainer-clean realclean distclean): Use subdir_do.
6935 (subdir_do): New.
6936 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6937 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6938 * acinclude.m4: Include acx_configure_dir.m4.
6939 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6940 calls. Call AC_PROG_RANLIB. Configure gnulib using
6941 ACX_CONFIGURE_DIR.
6942 (GNULIB): New.
6943 (GNULIB_STDINT_H): Adjust.
6944 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6945 * gdbreplay.c: Include build-gnulib/config.h.
6946 * server.h: Likewise.
6947 * aclocal.m4: Regenerate.
6948 * config.in: Regenerate.
6949 * configure: Regenerate.
c971b7fa 6950
809277f8
PA
69512012-04-19 Pedro Alves <palves@redhat.com>
6952
6953 * Makefile.in (LIBGNU, INCGNU): Adjust.
6954 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6955 (all, install-only, uninstall, clean-info, all-lib, clean)
6956 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6957 * configure.ac: Adjust AC_OUTPUT output.
6958 * aclocal.m4: Regenerate.
6959 * configure: Regenerate.
6960
fd9bb8b8
PA
69612012-04-19 Pedro Alves <palves@redhat.com>
6962
6963 * Makefile.in (generated_files): New.
6964 (server_h): Remove the explicit dependency on config.h, and depend
6965 on $generated_files.
6966
1c298c66
PA
69672012-04-19 Pedro Alves <palves@redhat.com>
6968
6969 * Makefile.in (INCGNU): Add -Ignulib.
6970
57c4b50b
PA
69712012-04-19 Pedro Alves <palves@redhat.com>
6972
6973 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6974 (INCGNU): ... this, and spell out -I here.
6975 (GNULIB_LIB): Rename to ...
6976 (LIBGNU): ... this.
6977 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6978
1030e047
PA
69792012-04-19 Pedro Alves <palves@redhat.com>
6980
6981 * config.in: Regenerate.
6982
447d4319
PA
69832012-04-19 Pedro Alves <palves@redhat.com>
6984
6985 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6986 * server.h (memmem): Remove declaration.
6987 * config.in: Regenerate.
6988 * configure: Regenerate.
6989
aad9eab9
YQ
69902012-04-19 Yao Qi <yao@codesourcery.com>
6991
6992 * Makefile.in (SFILES): Add common/vec.c.
6993 (OBS): Add vec.o.
6994 (vec.o): New rule.
6995
3e10640f
YQ
69962012-04-19 Yao Qi <yao@codesourcery.com>
6997
6998 * remote-utils.c (prepare_resume_reply): Replace with macro
6999 target_core_of_thread.
7000 * server.c (handle_qxfer_threads_proper): Likewise.
7001 * target.h (traget_core_of_thread): New macro.
7002
71622373
PA
70032012-04-18 Pedro Alves <palves@redhat.com>
7004
7005 * aclocal.m4: Regenerate.
7006 * configure: Regenerate.
7007
80d26939
YQ
70082012-04-16 Yao Qi <yao@codesourcery.com>
7009
7010 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7011 duplicated on address.
7012
42476b70
YQ
70132012-04-16 Yao Qi <yao@codesourcery.com>
7014
7015 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7016 (struct tracepoint_action_ops) <send>: New field.
7017 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7018 (agent_expr_send, x_tracepoint_action_send): New.
7019 (l_tracepoint_action_send): New.
7020 (cmd_qtdp): Download and install tracepoint
7021 according to `use_agent'.
7022 (run_inferior_command): Add one more parameter `len'.
7023 Update callers.
7024 (tracepoint_send_agent): New.
7025 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7026
7bc83639
YQ
70272012-04-16 Yao Qi <yao@codesourcery.com>
7028
7029 * tracepoint.c (download_tracepoints): Moved to ...
7030 (cmd_qtstart): ... here.
7031
5f18041e
YQ
70322012-04-14 Yao Qi <yao@codesourcery.com>
7033
7034 * tracepoint.c: Include inttypes.h.
7035 (struct collect_memory_action): Use sized types.
7036 (struct tracepoint): Likewise.
7037 (cmd_qtdp, stop_tracing): Update print specifiers.
7038 (cmd_qtp, response_tracepoint): Likewise.
7039 (collect_data_at_tracepoint): Likewise.
7040 (collect_data_at_step): Likewise.
7041
55a8c076
YQ
70422012-04-14 Yao Qi <yao@codesourcery.com>
7043
7044 Import gnulib module inttypes.
7045 * aclocal.m4, config.in, configure: Regenerated.
7046
dc750257
YQ
70472012-04-14 Yao Qi <yao@codesourcery.com>
7048
7049 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7050 Makefile and config.status at last.
7051
0ab5faf9
YQ
70522012-04-13 Yao Qi <yao@codesourcery.com>
7053
7054 * tracepoint.c: Include stdint.h unconditionally.
7055
18f5fd81
TJB
70562012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7057
7058 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7059 on BFD_HAVE_SYS_PROCFS_TYPE.
7060 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7061 * configure: Regenerate.
7062 * config.in: Likewise.
7063
4d47af5c
L
70642012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7065
7066 * Makefile.in (clean): Also remove x32.c x32-linux.c
7067 x32-avx.c x32-avx-linux.c.
7068 (x32.o): New target.
7069 (x32.c): Likewise.
7070 (x32-linux.o): Likewise.
7071 (x32-linux.c): Likewise.
7072 (x32-avx.o): Likewise.
7073 (x32-avx.c): Likewise.
7074 (x32-avx-linux.o): Likewise.
7075 (x32-avx-linux.c): Likewise.
7076
7077 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7078 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7079 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7080 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7081 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7082 i386/x32-avx-linux.xml.
7083
7084 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7085 (init_registers_x32_avx_linux): Likwise.
7086 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7087 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7088
ecedbe58
PA
70892012-04-13 Pedro Alves <palves@redhat.com>
7090
7091 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7092 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7093 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7094 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7095 the sub-make.
7096
c92b5177
L
70972012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7098
7099 * linux-x86-low.c (compat_x32_clock_t): New.
7100 (compat_x32_siginfo_t): Likewise.
7101 (compat_x32_siginfo_from_siginfo): Likewise.
7102 (siginfo_from_compat_x32_siginfo): Likewise.
7103 (linux_is_elf64): Likewise.
7104 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7105 and siginfo_from_compat_x32_siginfo for x32.
7106 (x86_arch_setup): Set linux_is_elf64.
7107
214d508e
L
71082012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7109
7110 PR gdb/13969
7111 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7112 e_machine field.
7113 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7114 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7115 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7116 compatible with process.
7117
c9a1864a
YQ
71182012-04-12 Yao Qi <yao@codesourcery.com>
7119
7120 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7121 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7122 (install-only, install-info, clean): Handle sub dir gnulib.
7123 (all-lib, am--refresh): New targets.
7124 (memmem.o): Remove target.
7125 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7126 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7127 (AC_REPLACE_FUNCS): Remove memmem.
7128 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7129 (AC_OUTPUT): Generate Makefile in gnulib/.
7130 * aclocal.m4, config.in, configure: Regenerated.
7131
367ba2c2
MR
71322012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7133
7134 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7135
9d236627
PA
71362012-04-05 Pedro Alves <palves@redhat.com>
7137
7138 -Werror=strict-aliasing
7139
7140 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7141 pointer.
7142
111217b3
PA
71432012-04-04 Pedro Alves <palves@redhat.com>
7144
7145 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7146 (sparc_store_gregset_from_stack, sparc_store_gregset)
7147 (sparc_breakpoint_at): Fix formatting.
7148
8365dcf5
TJB
71492012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7150
7151 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7152 are available.
7153 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7154 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7155 * config.in: Regenerate.
7156 * configure: Likewise.
7157
689cc2ae
PA
71582012-03-29 Pedro Alves <palves@redhat.com>
7159
7160 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7161 Correct ptrace arguments.
7162
c14dfd32
PA
71632012-03-28 Pedro Alves <palves@redhat.com>
7164
7165 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7166 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7167 (IA64_FR1_REGNUM): New defines.
7168 (ia64_fetch_register): New.
7169 (the_low_target): Install it.
7170 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7171 field.
7172 * linux-low.c (linux_fetch_registers): Try the
7173 the_low_target.fetch_register hook first.
7174
7175 * linux-arm-low.c (the_low_target): Adjust.
7176 * linux-bfin-low.c (the_low_target): Adjust.
7177 * linux-cris-low.c (the_low_target): Adjust.
7178 * linux-crisv32-low.c (the_low_target): Adjust.
7179 * linux-m32r-low.c (the_low_target): Adjust.
7180 * linux-m68k-low.c (the_low_target): Adjust.
7181 * linux-mips-low.c (the_low_target): Adjust.
7182 * linux-ppc-low.c (the_low_target): Adjust.
7183 * linux-s390-low.c (the_low_target): Adjust.
7184 * linux-sh-low.c (the_low_target): Adjust.
7185 * linux-sparc-low.c (the_low_target): Adjust.
7186 * linux-tic6x-low.c (the_low_target): Adjust.
7187 * linux-x86-low.c (the_low_target): Adjust.
7188 * linux-xtensa-low.c (the_low_target): Adjust.
7189
63c88e13
PA
71902012-03-26 Pedro Alves <palves@redhat.com>
7191
7192 * server.c (handle_qxfer_libraries): Don't bail early if
7193 the_target->qxfer_libraries_svr4 is not NULL.
7194
fb723180
PA
71952012-03-26 Pedro Alves <palves@redhat.com>
7196
7197 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7198
0afae3cf
PA
71992012-03-23 Pedro Alves <palves@redhat.com>
7200
7201 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7202 "library-list-svr4" element's start tag when the the DSO list is
7203 empty.
7204
485f1ee4
PA
72052012-03-23 Pedro Alves <palves@redhat.com>
7206
7207 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7208 a variable whose type size is the same as the inferior's pointer
7209 size.
7210
a5362b9a
TS
72112012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7212
7213 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7214 struct siginfo.
7215 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7216 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7217 * linux-low.h: Include <signal.h>.
7218 (struct siginfo): Remove forward declaration.
7219 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7220 struct siginfo.
7221
d226c142
MF
72222012-03-21 Mike Frysinger <vapier@gentoo.org>
7223
7224 * .gitignore: Ignore more files.
7225
122f36ef
PA
72262012-03-19 Pedro Alves <palves@redhat.com>
7227 Jan Kratochvil <jan.kratochvil@redhat.com>
7228
7229 * server.c (cont_thread, general_thread): Add describing comments.
7230 (start_inferior): Clear `cont_thread'.
7231 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7232 of a process.
7233
fc3e5175
YQ
72342012-03-15 Yao Qi <yao@codesourcery.com>
7235
7236 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7237 handling to ...
7238 (cmd_qtdp): ... here.
7239
8d0d92cd
YQ
72402012-03-15 Yao Qi <yao@codesourcery.com>
7241
7242 * tracepoint.c (struct tracepoint_action_ops): New.
7243 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7244 (m_tracepoint_action_download): New.
7245 (r_tracepoint_action_download): New.
7246 (x_tracepoint_action_download): New.
7247 (l_tracepoint_action_download): New.
7248 (add_tracepoint_action): Install `action->ops' according type.
7249 (download_tracepoint_1): Move code `download' function pointer
7250 of various tracepoint_action_ops.
7251
87b0bb13
JK
72522012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7253
7254 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7255 linux_ptrace_attach_warnings.
7256
5f572dec
JK
72572012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7258
7259 * Makefile.in (linux-ptrace.o): New.
7260 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7261 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7262 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7263 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7264 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7265 of these targets.
7266 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7267
f4647387
YQ
72682012-03-08 Yao Qi <yao@codesourcery.com>
7269 Pedro Alves <palves@redhat.com>
7270
7271 Fix PR server/13392.
7272 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7273 offset of JMP insn.
7274 * tracepoint.c (remove_tracepoint): New.
7275 (cmd_qtdp): Call remove_tracepoint when failed to install.
7276
9b224c5e
PA
72772012-03-07 Pedro Alves <palves@redhat.com>
7278
7279 * linux-low.c (get_detach_signal): New.
7280 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7281 Pass on pending signals to PTRACE_DETACH. Check the result of the
7282 ptrace call.
7283 * server.c (program_signals, program_signals_p): New.
7284 (handle_general_set): Handle QProgramSignals.
7285 * server.h (program_signals, program_signals_p): Declare.
7286
e237a7e2
JK
72872012-03-05 Pedro Alves <palves@redhat.com>
7288 Jan Kratochvil <jan.kratochvil@redhat.com>
7289
7290 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7291 New comment why.
7292
5808517f
YQ
72932012-03-03 Yao Qi <yao@codesourcery.com>
7294
7295 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7296 agent_look_up_symbols.
7297
58b4daa5
YQ
72982012-03-03 Yao Qi <yao@codesourcery.com>
7299
7300 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7301 (linux-x86-low.o): Likewise.
7302 * server.h: Remove in_process_agent_loaded.
7303 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7304 common/agent.c.
7305 Update callers.
7306
8ffcbaaf
YQ
73072012-03-03 Yao Qi <yao@codesourcery.com>
7308
7309 * tracepoint.c (gdb_agent_capability): New global.
7310 (in_process_agent_loaded_ust): Renamed to
7311 `in_process_agent_supports_ust'.
7312 Update callers.
7313 (in_process_agent_supports_ust): Call agent_capability_check.
7314 (clear_installed_tracepoints): Assert that agent supports
7315 agent.
7316
d1feda86
YQ
73172012-03-03 Yao Qi <yao@codesourcery.com>
7318
7319 * linux-low.c (linux_supports_agent): New.
7320 (linux_target_ops): Initialize field `supports_agent' with
7321 linux_supports_agent.
7322 * target.h (struct target_ops) <supports_agent>: New.
7323 (target_supports_agent): New macro.
7324 * server.c (handle_general_set): Handle packet 'QAgent'.
7325 (handle_query): Send `QAgent+'.
7326 * Makefile.in (server.o): Depends on agent.h.
7327
2fa291ac
YQ
73282012-03-03 Yao Qi <yao@codesourcery.com>
7329
7330 * Makefile.in (OBS): Add agent.o.
7331 Add new rule for agent.o.
7332 Track dependence of tracepoint.c on agent.h.
7333 * tracepoint.c (run_inferior_command_1):
7334 (run_inferior_command): Call agent_run_command.
7335 (gdb_ust_connect_sync_socket): Deleted. Move it to
7336 common/agent.c.
7337 (resume_thread, stop_thread): Likewise.
7338 (gdb_ust_socket_init): Renamed to ...
7339 (gdb_agent_socket_init): ... New.
7340 (gdb_ust_thread): Renamed to ...
7341 (gdb_agent_helper_thread): ... New.
7342 (gdb_ust_init): Move some code to ...
7343 (gdb_agent_init): ... here. New.
7344 [HAVE_UST]: Call gdb_ust_init.
7345 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7346 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7347 * config.in, configure: Regenerated.
7348
05044653
PA
73492012-03-02 Pedro Alves <palves@redhat.com>
7350
7351 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7352 * linux-low.c (struct simple_pid_list): New.
7353 (stopped_pids): New a struct simple_pid_list pointer.
7354 (add_to_pid_list, pull_pid_from_list): New.
7355 (handle_extended_wait): Don't assume the first signal new children
7356 report is SIGSTOP. Adjust call to pull_pid_from_list.
7357 (linux_wait_for_lwp): Adjust.
7358
8d00225b
YQ
73592012-03-02 Yao Qi <yao@codesourcery.com>
7360
7361 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7362 debug log.
7363
19560ba5
YQ
73642012-03-02 Yao Qi <yao@codesourcery.com>
7365
7366 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7367 `stop_pc' and `tpoint'. Update caller.
7368
1faeff08
MR
73692012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7370
7371 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7372 * linux-low.c (use_linux_regsets): New macro.
7373 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7374 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7375 (linux_register_in_regsets): New function.
7376 (usr_fetch_inferior_registers): Skip registers covered by
7377 regsets.
7378 (usr_store_inferior_registers): Likewise.
7379 (usr_fetch_inferior_registers): New macro.
7380 (usr_store_inferior_registers): Likewise.
7381 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7382 (linux_store_registers): Likewise.
7383 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7384 prototype.
7385 (init_registers_mips64_dsp_linux): Likewise.
7386 (init_registers_mips_linux): New macro.
7387 (init_registers_mips_dsp_linux): Likewise.
7388 (mips_dsp_num_regs): Likewise.
7389 (DSP_BASE, DSP_CONTROL): New fallback macros.
7390 (mips_base_regs): New macro.
7391 (mips_regmap): Use it. Fix the size.
7392 (mips_dsp_regmap): New variable.
7393 (mips_dsp_regset_bitmap): Likewise.
7394 (mips_arch_setup): New function.
7395 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7396 than mips_regmap.
7397 (mips_cannot_store_register): Likewise.
7398 (the_low_target): Update .arch_setup, .num_regs and .regmap
7399 initializers. Add .regset_bitmap initializer.
7400 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7401 initializer.
7402 * linux-bfin-low.c (the_low_target): Likewise.
7403 * linux-cris-low.c (the_low_target): Likewise.
7404 * linux-crisv32-low.c (the_low_target): Likewise.
7405 * linux-ia64-low.c (the_low_target): Likewise.
7406 * linux-m32r-low.c (the_low_target): Likewise.
7407 * linux-m68k-low.c (the_low_target): Likewise.
7408 * linux-ppc-low.c (the_low_target): Likewise.
7409 * linux-s390-low.c (the_low_target): Likewise.
7410 * linux-sh-low.c (the_low_target): Likewise.
7411 * linux-sparc-low.c (the_low_target): Likewise.
7412 * linux-tic6x-low.c (the_low_target): Likewise.
7413 * linux-x86-low.c (the_low_target): Likewise.
7414 * linux-xtensa-low.c (the_low_target): Likewise.
7415 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7416 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7417 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7418 srv_xmlfiles.
7419 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7420 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7421
c03e6ccc
YQ
74222012-02-29 Yao Qi <yao@codesourcery.com>
7423 Pedro Alves <palves@redhat.com>
7424
7425 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7426 `step_over_finished' is true.
7427
644cebc9
PA
74282012-02-27 Pedro Alves <palves@redhat.com>
7429
7430 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7431 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7432
c14d7ab2
PA
74332012-02-27 Pedro Alves <palves@redhat.com>
7434
7435 PR server/9684
7436 * linux-low.c (pid_is_stopped): New.
7437 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7438
412c89dd
LM
74392012-02-25 Luis Machado <lgustavo@codesourcery.com>
7440
7441 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7442 of conditions.
7443
b745defe
MR
74442012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7445
7446 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7447
9f3a5c85
LM
74482012-02-24 Luis Machado <lgustavo@codesourcery>
7449
7450 * server.c (handle_query): Advertise support for target-side
7451 breakpoint condition evaluation.
7452 (process_point_options): New function.
7453 (process_serial_event): When inserting a breakpoint, check for
7454 a target-side condition that should be evaluated.
7455
7456 * mem-break.c: Include regcache.h and ax.h.
7457 (point_cond_list_t): New data structure.
7458 (breakpoint) <cond_list>: New field.
7459 (find_gdb_breakpoint_at): Make non-static.
7460 (delete_gdb_breakpoint_at): Clear any target-side
7461 conditions.
7462 (clear_gdb_breakpoint_conditions): New function.
7463 (add_condition_to_breakpoint): Likewise.
7464 (add_breakpoint_condition): Likewise.
7465 (gdb_condition_true_at_breakpoint): Likewise.
7466 (gdb_breakpoint_here): Return result directly instead
7467 of going through a local variable.
7468
7469 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7470 (clear_gdb_breakpoint_conditions): Likewise.
7471 (add_breakpoint_condition): Likewise.
7472 (gdb_condition_true_at_breakpoint): Likewise.
7473
7474 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7475 (need_step_over_p): Take target-side breakpoint condition into
7476 consideration.
7477
5e1dc496
LM
74782012-02-24 Luis Machado <lgustavo@codesourcery>
7479
7480 * server.h: Include tracepoint.h.
7481 (agent_mem_read, agent_get_trace_state_variable_value,
7482 agent_set_trace_state_variable_value,
7483 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7484 get_set_tsv_func_addr): New prototypes.
7485
7486 * ax.h: New include file.
7487 * ax.c: New source file.
7488
7489 * tracepoint.c: Include ax.h.
7490 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7491 agent_expr, eval_result_type): Move to ax.h.
7492 (parse_agent_expr): Rename to ...
7493 (gdb_parse_agent_expr): ... this, make it non-static and move
7494 to ax.h.
7495 (unparse_agent_expr) Rename to ...
7496 (gdb_unparse_agent_expr): ... this, make it non-static and move
7497 to ax.h.
7498 (eval_agent_expr): Rename to ...
7499 (eval_tracepoint_agent_expr): ... this.
7500 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7501 forward declarations.
7502 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7503 (agent_get_trace_state_variable_value): New function.
7504 (agent_set_trace_state_variable_value): New function.
7505 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7506 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7507 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7508 (condition_true_at_tracepoint): Likewise.
7509 (parse_agent_expr): Rename to ...
7510 (gdb_parse_agent_expr): ... this and move to ax.c.
7511 (unparse_agent_expr): Rename to ...
7512 (gdb_unparse_agent_expr): ... this and move to ax.c.
7513 (gdb_agent_op_name): Move to ax.c.
7514 (eval_agent_expr): Rename to ...
7515 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7516 and move to ax.c.
7517 (eval_tracepoint_agent_expr): New function.
7518 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 7519 non-static.
5e1dc496
LM
7520 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7521 ax.c.
7522 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7523 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7524 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7525 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7526 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7527 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7528 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7529 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7530 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7531 (compile_bytecodes): Remove forward declaration.
7532 (is_goto_target): Move to ax.c.
7533 (compile_bytecodes): Move to ax.c and call
7534 agent_get_trace_state_variable_value (...) and
7535 agent_set_trace_state_variable_value (...).
7536
7537 * Makefile.in: Update ax.c and IPA dependencies.
7538
277e4e52
PA
75392012-02-24 Pedro Alves <palves@redhat.com>
7540
7541 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7542 (cmd_bigqtbuffer_circular): ... this. Only handle
7543 'QTBuffer:circular:'.
7544 (handle_tracepoint_general_set): Adjust.
7545
bf4c19f7
YQ
75462012-02-16 Yao Qi <yao@codesourcery.com>
7547
7548 * inferiors.c: Move code to ...
7549 * dll.c: .... here. New.
7550 * server.h: Declare clear_dlls.
7551 * Makefile.in (SFILES): Add dll.c.
7552 (OBS): Add dll.o
7553 (dll.o): New rule.
7554
d73f2619
YQ
75552012-02-11 Yao Qi <yao@codesourcery.com>
7556
7557 * server.c: (handle_monitor_command): Add a new parameter
7558 `own_buf'.
7559 (handle_query): Update caller.
7560
f8255c2a
JB
75612012-02-09 Joel Brobecker <brobecker@adacore.com>
7562
7563 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7564 * configure, config.in: Regenerate.
7565 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7566 is not defined.
7567
da84f473
PA
75682012-02-02 Pedro Alves <palves@redhat.com>
7569
7570 Try SIGKILL first, then PTRACE_KILL.
7571 * linux-low.c (linux_kill_one_lwp): New.
7572 (linux_kill_one_lwp): Rename to ...
7573 (kill_one_lwp_callback): ... this. Use the new
7574 linux_kill_one_lwp.
7575
e886a173
PA
75762012-02-02 Pedro Alves <palves@redhat.com>
7577
7578 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7579 inferior.
7580
be07f1a2
PA
75812012-01-27 Pedro Alves <palves@redhat.com>
7582
7583 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7584 (elf_64_file_p): Make static.
7585 (linux_pid_exe_is_elf_64_file): New.
7586 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7587 Delete declarations.
7588 (linux_pid_exe_is_elf_64_file): Declare.
7589 * linux-x86-low.c (x86_arch_setup): Use
7590 linux_pid_exe_is_elf_64_file.
7591
d8301ad1
JK
75922012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7593
7594 * linux-low.c (linux_wait_for_event_1): Rename to ...
7595 (linux_wait_for_event): ... here and merge it with former
7596 linux_wait_for_event - new variable wait_ptid, use it.
7597 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7598
01b17894
PA
75992012-01-23 Pedro Alves <palves@redhat.com>
7600
7601 * server.c (main): Avoid yet another case of infinite loop while
7602 detaching/killing after a longjmp.
7603
e825046f
JK
76042012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7605
7606 Code cleanup.
7607 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7608
b9e7b9c3
UW
76092012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7610
7611 * hostio.c (handle_readlink): New function.
7612 (handle_vFile): Call it to handle "vFile:readlink" packets.
7613
901f9912
UW
76142012-01-20 Pedro Alves <palves@redhat.com>
7615 Ulrich Weigand <ulrich.weigand@linaro.org>
7616
7617 * server.c (handle_v_requests): Only support vAttach and vRun to
7618 start multiple processes when in extended protocol mode.
7619
fc1ab1a0
PA
76202012-01-17 Pedro Alves <palves@redhat.com>
7621
7622 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7623 memalign plus mprotect to allocate the scratch buffer.
7624
7d5d4e98
PA
76252012-01-13 Pedro Alves <palves@redhat.com>
7626
7627 * server.c (attach_inferior): Clear `cont_thread'.
7628
f128d5e9
PA
76292012-01-13 Pedro Alves <palves@redhat.com>
7630
7631 * server.c (main): Avoid infinite loop while detaching/killing
7632 after a longjmp.
7633
06db92f0
DE
76342012-01-09 Doug Evans <dje@google.com>
7635
7636 * server.c (start_inferior): Set last_ptid in --wrapper case.
7637
32d92999
YQ
76382012-01-06 Yao Qi <yao@codesourcery.com>
7639
7640 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7641 defined.
7642 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7643
5e0a92a9
YQ
76442012-01-04 Yao Qi <yao@codesourcery.com>
7645
7646 * tracepoint.c (cmd_qtdp): Print debug message
7647 for static tracepoint.
7648
ae639e8c
YQ
76492012-01-04 Yao Qi <yao@codesourcery.com>
7650
7651 * tracepoint.c (trace_vdebug): Differentiate debug message
7652 between gdbserver and IPA.
7653
f72429c5
YQ
76542012-01-03 Yao Qi <yao@codesourcery.com>
7655
7656 * tracepoint.c (tracepoint_was_hit): Don't collect for
7657 static tracepoint.
7658
12c3e59c
JB
76592012-01-02 Joel Brobecker <brobecker@adacore.com>
7660
7661 * terminal.h: Reformat copyright header.
7662
67827812
JB
76632012-01-02 Joel Brobecker <brobecker@adacore.com>
7664
7665 * server.c (gdbserver_version): Update copyright year.
7666 * gdbreplay.c (gdbreplay_version): Likewise.
7667
3e52c33d
JK
76682011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7669
7670 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7671
7672 Revert:
7673 2011-12-18 Hui Zhu <teawater@gmail.com>
7674 * linux-low.c (linux_create_inferior): Save return value to ret.
7675
66f1260e
HZ
76762011-12-18 Hui Zhu <teawater@gmail.com>
7677
7678 * linux-low.c (linux_create_inferior): Save return value to ret.
7679
e77616d7
DE
76802011-12-16 Doug Evans <dje@google.com>
7681
e7b06c57
DE
7682 * linux-low.c (linux_create_inferior): If stdio connection,
7683 redirect stdin from /dev/null, stdout to stderr.
7684 * remote-utils.c (remote_is_stdio): New static global.
7685 (remote_connection_is_stdio): New function.
7686 (remote_prepare): Handle stdio connection.
7687 (remote_open): Ditto.
7688 (remote_close): Don't close stdin for stdio connections.
7689 (read_prim,write_prim): New functions. Replace all calls to
7690 read/write to these.
7691 * server.c (main): Watch for "-" argument. Move call to
7692 remote_prepare before start_inferior.
7693 * server.h (STDIO_CONNECTION_NAME): New macro.
7694 (remote_connection_is_stdio): Declare.
7695
e77616d7
DE
7696 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7697 in debugging output.
7698
82067193
YQ
76992011-12-15 Yao Qi <yao@codesourcery.com>
7700
7701 * tracepoint.c: Include sys/syscall.h.
7702 (gdb_ust_thread): Remove preprocessor conditional.
7703
82bfbe7e
PA
77042011-12-14 Pedro Alves <pedro@codesourcery.com>
7705
7706 * linux-low.c (linux_detach_one_lwp): Call
7707 the_low_target.prepare_to_resume before detaching.
7708
712c6575
YQ
77092011-12-14 Yao Qi <yao@codesourcery.com>
7710
7711 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7712 of write.
7713
d54d1edf
YQ
77142011-12-14 Yao Qi <yao@codesourcery.com>
7715
7716 * i386-low.c (i386_low_stopped_data_address): Initialize local
7717 variable `control'.
7718
6210a125
PA
77192011-12-13 Pedro Alves <pedro@codesourcery.com>
7720
7721 PR remote/13492
7722
7723 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7724 DR_CONTROL unless necessary. Extend comments.
7725 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7726 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7727
2ece8244
YQ
77282011-12-13 Yao Qi <yao@codesourcery.com>
7729
7730 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7731 macros.
7732 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7733
784867a5
JK
77342011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7735
7736 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7737 Print new debug message for such case.
7738
6bf36717
JK
77392011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7740
7741 Fix overlapping memcpy.
7742 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7743 the read_inferior_memory transfer.
7744 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7745 write_inferior_memory transfer.
7746 (set_fast_tracepoint_jump): New variable buf. Use it for the
7747 read_inferior_memory and write_inferior_memory transfers.
7748 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7749 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7750 Use it for the write_inferior_memory transfer.
7751 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7752 buffers.
7753
50275556
MR
77542011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7755
7756 * linux-low.c (fetch_register, store_register): Make code
7757 consistent, fix formatting.
7758
7325beb4
MR
77592011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7760
7761 * linux-low.c (usr_store_inferior_registers): Factor out code
7762 to handle individual registers into...
7763 (store_register): ... this new function.
7764
c642a434
UW
77652011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7766
7767 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7768 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7769 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7770 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7771 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7772 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7773 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7774 (srv_xmlfiles): Add new XML files.
7775
7776 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7777 and <sys/uio.h>.
7778 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7779 (init_registers_s390_linux32v1): Add prototype.
7780 (init_registers_s390_linux32v2): Likewise.
7781 (init_registers_s390_linux64v1): Likewise.
7782 (init_registers_s390_linux64v2): Likewise.
7783 (init_registers_s390x_linux64v1): Likewise.
7784 (init_registers_s390x_linux64v2): Likewise.
7785 (s390_num_regs): Increment to 52.
7786 (s390_regmap): Add orig_r2 register.
7787 (s390_num_regs_3264): Increment to 68.
7788 (s390_regmap_3264): Add orig_r2 register.
7789 (s390_collect_ptrace_register): Handle orig_r2 register.
7790 (s390_supply_ptrace_register): Likewise.
7791 (s390_fill_last_break): New function.
7792 (s390_store_last_break): Likewise.
7793 (s390_fill_system_call): New function.
7794 (s390_store_system_call): Likewise.
7795 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7796 register sets.
7797 (s390_check_regset): New function.
7798 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7799 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7800 Update target_regsets for available register sets.
7801
2268b414
JK
78022011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7803 Jan Kratochvil <jan.kratochvil@redhat.com>
7804
7805 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7806 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7807 New.
7808 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7809 * linux-low.h (struct process_info_private): New member r_debug.
7810 * server.c (handle_qxfer_libraries): Call
7811 the_target->qxfer_libraries_svr4.
7812 (handle_qxfer_libraries_svr4): New function.
7813 (qxfer_packets): New entry "libraries-svr4".
7814 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7815 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7816 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7817 PACKET_qXfer_libraries_svr4.
7818
d6db1fab
UW
78192011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7820
7821 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7822 PSW address/mask between 8-byte and 16-byte formats.
7823 (s390_supply_ptrace_register): Likewise.
7824 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7825 basic addressing mode bit.
7826
242f5f1c
SS
78272011-11-24 Stan Shebs <stan@codesourcery.com>
7828
7829 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7830
f196051f
SS
78312011-11-17 Stan Shebs <stan@codesourcery.com>
7832
7833 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7834 (tracing_start_time): New global.
7835 (tracing_stop_time): New global.
7836 (tracing_user_name): New global.
7837 (tracing_notes): New global.
7838 (tracing_stop_note): New global.
7839 (cmd_qtstart): Set traceframe_usage, start_time.
7840 (stop_tracing): Set stop_time.
7841 (cmd_qtstatus): Report additional status.
7842 (cmd_qtp): New function.
7843 (handle_tracepoint_query): Call it.
7844 (cmd_qtnotes): New function.
7845 (handle_tracepoint_general_set): Call it.
7846 (get_timestamp): Rename from tsv_get_timestamp.
7847
405f8e94
SS
78482011-11-14 Stan Shebs <stan@codesourcery.com>
7849 Kwok Cheung Yeung <kcy@codesourcery.com>
7850
7851 * linux-x86-low.c (small_jump_insn): New.
7852 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7853 trampoline and error message, build a trampoline and issue a small
7854 jump instruction to it.
7855 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7856 trampoline and error message.
7857 (x86_get_min_fast_tracepoint_insn_len): New.
7858 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7859 * linux-low.h (struct linux_target_ops): Add arguments to
7860 install_fast_tracepoint_jump_pad operation, add new operation.
7861 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7862 arguments.
7863 (linux_get_min_fast_tracepoint_insn_len): New function.
7864 (linux_target_op): Add new operation.
7865 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7866 (gdb_trampoline_buffer_end): Ditto.
7867 (gdb_trampoline_buffer_error): Ditto.
7868 (struct ipa_sym_addresses): Add fields for new IPA variables.
7869 (symbol_list): Add entries for new IPA variables.
7870 (struct tracepoint): Add fields to hold the address range of the
7871 trampoline used by the tracepoint.
7872 (trampoline_buffer_head): New static variable.
7873 (trampoline_buffer_tail): Ditto.
7874 (claim_trampoline_space): New function.
7875 (have_fast_tracepoint_trampoline_buffer): New function.
7876 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7877 structure.
7878 (install_fast_tracepoint): Ditto, also add error buffer argument.
7879 (cmd_qtminftpilen): New function.
7880 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7881 (fast_tracepoint_from_trampoline_address): New function.
7882 (fast_tracepoint_collecting): Handle trampoline as part of jump
7883 pad space.
7884 (set_trampoline_buffer_space): New function.
7885 (initialize_tracepoint): Initialize new IPA variables.
7886 * target.h (struct target_ops): Add arguments to
7887 install_fast_tracepoint_jump_pad operation, add new
7888 get_min_fast_tracepoint_insn_len operation.
7889 (target_get_min_fast_tracepoint_insn_len): New.
7890 (install_fast_tracepoint_jump_pad): Add arguments.
7891 * server.h (IPA_BUFSIZ): Define.
7892 * linux-i386-ipa.c: Include extra header files.
7893 (initialize_fast_tracepoint_trampoline_buffer): New function.
7894 (initialize_low_tracepoint): Call it.
7895 * server.h (set_trampoline_buffer_space): Declare.
7896 (claim_trampoline_space): Ditto.
7897 (have_fast_tracepoint_trampoline_buffer): Ditto.
7898
1e4d1764
YQ
78992011-11-14 Yao Qi <yao@codesourcery.com>
7900
7901 * server.c (handle_query): Handle InstallInTrace for qSupported.
7902 * tracepoint.c (add_tracepoint): Sort list.
7903 (install_tracepoint, download_tracepoint): New.
7904 (cmd_qtdp): Call them to install and download tracepoints.
7905 (sort_tracepoints): Removed.
7906 (cmd_qtstart): Update.
7907
5c73ff4e
YQ
79082011-11-14 Yao Qi <yao@codesourcery.com>
7909
7910 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7911 * mem-break.h: Declare.
7912 * tracepoint.c (cmd_qtstart): Move some code to ...
7913 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7914 New.
7915 (download_tracepoints): Move some code to ...
7916 (download_tracepoint_1): ... here. New.
7917
86a30030
YQ
79182011-11-08 Yao Qi <yao@codesourcery.com>
7919
7920 * remote-utils.c (relocate_instruction): A comment fix.
7921
8d26e50c
JB
79222011-11-07 Joel Brobecker <brobecker@adacore.com>
7923
7924 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7925 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7926 dr_status_mirror and dr_control_mirror from debug_reg_state.
7927 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7928 (i386_initial_stuff): Remove use of deleted globals.
7929 (i386_get_thread_context, i386_set_thread_context,
7930 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7931 from debug_reg_state.
7932
a59306a3
YQ
79332011-11-05 Yao Qi <yao@codesourcery.com>
7934
7935 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7936 address as TPOINT's.
7937
3065dfb6
SS
79382011-11-02 Stan Shebs <stan@codesourcery.com>
7939
7940 * tracepoint.c (agent_mem_read_string): New function.
7941 (eval_agent_expr): Call it for tracenz.
7942 * server.c (handle_query): Report support for tracenz.
7943
fd0d8c7c
YQ
79442011-11-02 Yao Qi <yao@codesourcery.com>
7945
7946 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7947
609086b1
YQ
79482011-11-02 Yao Qi <yao@codesourcery.com>
7949
7950 * target.h: Fix a typo in comment.
7951
b9fd1791
PA
79522011-10-31 Pedro Alves <pedro@codesourcery.com>
7953
7954 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7955 clobber the breakpoints' shadows with fast tracepoint jumps.
7956 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7957 * target.c (write_inferior_memory): Also pass MYADDR down to
7958 check_mem_write.
7959
03583c20
UW
79602011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7961
7962 * configure.ac: Check support for personality routine.
7963 * configure: Regenerate.
7964 * config.in: Likewise.
7965 * linux-low.c: Include <sys/personality.h>.
7966 Define ADDR_NO_RANDOMIZE if necessary.
7967 (linux_create_inferior): Disable address space randomization when
7968 forking inferior, if requested.
7969 (linux_supports_disable_randomization): New function.
7970 (linux_target_ops): Install it.
7971 * server.h (disable_randomization): Declare.
7972 * server.c (disable_randomization): New global variable.
7973 (handle_general_set): Handle QDisableRandomization.
7974 (handle_query): Likewise for qSupported.
7975 (main): Support --disable-randomization and --no-disable-randomization
7976 command line arguments.
7977 * target.h (struct target_ops): Add supports_disable_randomization.
7978 (target_supports_disable_randomization): New macro.
7979
723b724b
MF
79802011-09-29 Mike Frysinger <vapier@gentoo.org>
7981
7982 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7983 ifdef check.
7984 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7985 [!PT_GETDSBT] (target_loadmap): New definition.
7986 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7987 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7988 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7989 and PT_GETDSBT to LINUX_LOADMAP.
7990 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7991 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7992
55329a5c 79932011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
7994
7995 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7996 (arm_linux_hwbp_cap): New static variable.
7997 (arm_linux_get_hwbp_cap): Replace by ...
7998 (arm_linux_init_hwbp_cap): ... this new function.
7999 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8000 (arm_linux_get_hw_watchpoint_count): Likewise.
8001 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8002 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8003 (arm_prepare_to_resume): Use perror_with_name instead of error.
8004
55329a5c 80052011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8006
8007 * linux-arm-low.c: Include <signal.h>.
8008 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8009 (struct arm_linux_hwbp_cap): New data type.
8010 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8011 (struct arm_linux_hw_breakpoint): New data type.
8012 (MAX_BPTS, MAX_WPTS): Define.
8013 (struct arch_process_info, struct arch_lwp_info): New data types.
8014 (arm_linux_get_hwbp_cap): New function.
8015 (arm_linux_get_hw_breakpoint_count): Likewise.
8016 (arm_linux_get_hw_watchpoint_count): Likewise.
8017 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8018 (arm_hwbp_control_initialize): Likewise.
8019 (arm_hwbp_control_is_enabled): Likewise.
8020 (arm_hwbp_control_is_initialized): Likewise.
8021 (arm_hwbp_control_disable): Likewise.
8022 (arm_linux_hw_breakpoint_equal): Likewise.
8023 (arm_linux_hw_point_initialize): Likewise.
8024 (struct update_registers_data): New data structure.
8025 (update_registers_callback: New function.
8026 (arm_insert_point): Likewise.
8027 (arm_remove_point): Likewise.
8028 (arm_stopped_by_watchpoint): Likewise.
8029 (arm_stopped_data_address): Likewise.
8030 (arm_new_process): Likewise.
8031 (arm_new_thread): Likewise.
8032 (arm_prepare_to_resume): Likewise.
8033 (the_low_target): Register arm_insert_point, arm_remove_point,
8034 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8035 arm_new_thread, and arm_prepare_to_resume.
8036
6b9801d4
SS
80372011-09-15 Stan Shebs <stan@codesourcery.com>
8038
8039 * server.h (struct emit_ops): Add compare-goto fields.
8040 * tracepoint.c (gdb_agent_op_sizes): New table.
8041 (emit_eq_goto): New function.
8042 (emit_ne_goto): New function.
8043 (emit_lt_goto): New function.
8044 (emit_le_goto): New function.
8045 (emit_gt_goto): New function.
8046 (emit_ge_goto): New function.
8047 (is_goto_target): New function.
8048 (compile_bytecodes): Recognize special cases of compare-goto
8049 combinations and call specialized emitters for them.
8050 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8051 (amd64_emit_ne_goto): New function.
8052 (amd64_emit_lt_goto): New function.
8053 (amd64_emit_le_goto): New function.
8054 (amd64_emit_gt_goto): New function.
8055 (amd64_emit_ge_goto): New function.
8056 (amd64_emit_ops): Add the new functions.
8057 (i386_emit_eq_goto): New function.
8058 (i386_emit_ne_goto): New function.
8059 (i386_emit_lt_goto): New function.
8060 (i386_emit_le_goto): New function.
8061 (i386_emit_gt_goto): New function.
8062 (i386_emit_ge_goto): New function.
8063 (i386_emit_ops): Add the new functions.
8064
bf15cbda
SS
80652011-09-08 Stan Shebs <stan@codesourcery.com>
8066
8067 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8068 (i386_emit_epilogue): Restore %ebx.
8069
943ca1dd
JZ
80702011-08-31 Jie Zhang <jzhang918@gmail.com>
8071
8072 * server.c (step_thread): Remove definition.
8073 (process_serial_event): Don't handle Hs.
8074 * server.h (step_thread): Remove declaration.
8075 * target.c (set_desired_inferior): Remove use of step_thread.
8076
e3deef73
LM
80772011-08-24 Luis Machado <lgustavo@codesourcery.com>
8078
8079 * linux-low.c: Include linux-procfs.h.
8080 (linux_attach_lwp_1): Update comments.
8081 (linux_attach): Scan for existing threads when attaching to a
8082 process that is the tgid.
8083 * Makefile.in: Update dependencies.
8084
13da1c97
LM
80852011-08-24 Luis Machado <lgustavo@codesourcery.com>
8086
8087 * configure.srv: Add linux-procfs.o dependencies.
8088
881127c9
YQ
80892011-08-14 Yao Qi <yao@codesourcery.com>
8090
8091 * target.h (struct target_ops): Fix indent.
8092 * win32-low.c (win32_target_ops): Fix comment.
8093
58dbd541
YQ
80942011-08-14 Andrew Jenner <andrew@codesourcery.com>
8095 Yao Qi <yao@codesourcery.com>
8096
8097 * Makefile.in (clean): Remove tic6x-*.c files.
8098 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8099 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8100 (tic6x-c64xp-linux.c): Likewise.
8101 * configure.srv: Add support for tic6x-*-uclinux.
8102 * linux-tic6x-low.c: New.
8103 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8104
78d85199
YQ
81052011-08-14 Andrew Stubbs <ams@codesourcery.com>
8106 Yao Qi <yao@codesourcery.com>
8107
8108 * target.h (struct target_ops): Add read_loadmap.
8109 * linux-low.c (struct target_loadseg): New type.
8110 (struct target_loadmap): New type.
8111 (linux_read_loadmap): New function.
8112 (linux_target_ops): Add linux_read_loadmap.
8113 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8114 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8115 to NULL.
78d85199 8116
a959a88d
EZ
81172011-08-05 Eli Zaretskii <eliz@gnu.org>
8118
8119 * win32-low.c: Include <stdint.h>.
8120
1ced966e
PA
81212011-07-22 Pedro Alves <pedro@codesourcery.com>
8122
8123 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8124 to the inferior here.
8125 (i386_remove_aligned_watchpoint): Ditto.
8126 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8127 fit part of the watchpoint in the debug registers.
8128 (i386_update_inferior_debug_regs): New.
8129 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8130 registers, and only update the inferior on success.
8131 (i386_low_remove_watchpoint): Ditto.
8132
d26e3629
KY
81332011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8134
8135 * linux-low.c (compare_ints, unique, list_threads, show_process,
8136 linux_core_of_thread): Delete.
8137 (linux_target_ops): Change linux_core_of_thread to
8138 linux_common_core_of_thread.
8139 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8140 * utils.c (malloc_failure): Change type of argument.
8141 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8142 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8143 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8144 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8145 (IPA_OBJS): Add common-utils-ipa.o.
8146 (ptid_h, linux_osdata_h): New macros.
8147 (server_h): Add common/common-utils.h, common/xml-utils.h,
8148 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8149 common/ptid.h.
8150 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8151 ptid.o, buffer.o): New rules.
8152 (linux-low.o): Add common/linux-osdata.h as a dependency.
8153 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8154 * configure.ac: Add AC_HEADER_DIRENT check.
8155 * config.in: Regenerate.
8156 * configure: Regenerate.
8157 * remote-utils.c (xml_escape_text): Delete.
8158 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8159 buffer_xml_printf): Move to common/buffer.c.
8160 * server.c (main): Remove call to initialize_inferiors.
8161 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8162 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8163 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8164 internal_error, gdb_assert, gdb_assert_fail): Delete.
8165 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8166 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8167 common/buffer.h.
8168 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8169 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8170 initialize_inferiors): Delete.
8171
2275a1a7
PA
81722011-07-20 Pedro Alves <pedro@codesourcery.com>
8173
8174 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8175 symbol error.
8176
0a5b1e09
PA
81772011-05-31 Pedro Alves <pedro@codesourcery.com>
8178
8179 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8180 assertion.
8181 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8182
6938fd34
YQ
81832011-05-26 Yao Qi <yao@codesourcery.com>
8184
8185 * Makefile.in (thread-db.o): Track dependence to
8186 common/gdb_thread_db.h.
8187 * thread-db.c: include gdb_thread_db.h from right place.
8188
b481f9e0
TT
81892011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8190
8191 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8192 __FILE__ and __LINE__ to internal_error.
8193
98a5dd13
DE
81942011-05-13 Doug Evans <dje@google.com>
8195
8196 * thread-db.c (try_thread_db_load_from_sdir): New function.
8197 (try_thread_db_load_from_dir): New function.
8198 (thread_db_load_search): Handle $sdir, ignore $pdir.
8199 Remove trying of system directories if search of
8200 libthread-db-search-path fails, that is now done via $sdir.
8201
d248b706
KY
82022011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8203
8204 * server.c (handle_query): Add EnableDisableTracepoints to the list
8205 of supported features.
43aaf8b6 8206 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8207 tracepoints.
43aaf8b6
PA
8208 (cmd_qtenable_disable): New.
8209 (cmd_qtstart): Install tracepoints even if disabled.
8210 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8211 receiving a QTEnable or QTDisable packet.
8212 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8213 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8214 tracepoints.
8215 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8216
84e578fb
DE
82172011-05-10 Doug Evans <dje@google.com>
8218
8219 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8220
71f55dd8
DE
82212011-05-04 Doug Evans <dje@google.com>
8222
8223 * linux-low.c (linux_join): Skip process lookup.
8224 * spu-low.c (spu_join): Ditto.
8225 * server.c (join_inferiors_callback): Delete.
8226 (process_serial_event): For 'D' packet (detach) call join_inferior
8227 directly.
8228
4d393d60
JM
82292011-05-04 Joseph Myers <joseph@codesourcery.com>
8230
8231 * README: Don't mention xscale*-*-linux*.
8232 * configure.srv (xscale*-*-linux*): Don't handle target.
8233
b00ad6ff
NF
82342011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8235
8236 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8237 casting pointers.
8238 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8239 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8240 (i386_emit_void_call_2): Likewise.
8241
af96c192
YQ
82422011-04-26 Yao Qi <yao@codesourcery.com>
8243
43aaf8b6
PA
8244 * linux-low.c: Move common macros to linux-ptrace.h.
8245 Include linux-ptrace.h.
af96c192
YQ
8246 * Makefile.in (linux_ptrace_h): New.
8247 (linux-low.o): Depends on linux-ptrace.h.
8248
03f2bd59
JK
82492011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8250
8251 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8252 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8253 (remote_prepare): New function with most of the TCP code from ...
8254 (remote_open): ... here. Detect PORT here unconditionally. Move also
8255 setting transport_is_reliable.
8256 * server.c (run_once): New variable.
8257 (gdbserver_usage): Document it.
8258 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8259 the first run if RUN_ONCE.
8260 * server.h (run_once, remote_prepare): New declarations.
8261
7a9dd1b2
TT
82622011-04-19 Tom Tromey <tromey@redhat.com>
8263
8264 * win32-low.c (handle_load_dll): Remove duplicate "the".
8265
81239425
PM
82662011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8267
8268 Remove support for old Cygwin 1.5 versions.
8269 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8270 function to avoid warning.
8271 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8272 warning.
8273
9e0627f1
PM
82742011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8275
8276 * gdbserver/server.h (Macro _): Define it if not available.
8277
588eebee
MS
82782011-03-14 Michael Snyder <msnyder@vmware.com>
8279
348af9f7 8280 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8281
43f70d4c
JB
82822011-03-10 Joel Brobecker <brobecker@adacore.com>
8283
8284 * Makefile.in (maintainer-clean realclean distclean): Remove
8285 "make ... subdir_do" command.
8286
348af9f7
MS
82872011-03-10 Michael Snyder <msnyder@vmware.com>
8288
8289 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8290
8291 * server.c (handle_v_run): Free alloced buffer on early return.
8292
e637a4f5
YQ
82932011-03-09 Yao Qi <yao@codesourcery.com>
8294
8295 Revert:
8296 2011-03-04 Yao Qi <yao@codesourcery.com>
8297
8298 * Makefile.in: Remove GNU make feature --directory.
8299
8300 2011-03-05 Yao Qi <yao@codesourcery.com>
8301
8302 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8303 (subdir_do): New make target. Copied from gdb/Makefile.
8304 (maintainer-clean, realclean, distclean, clean): Call corresponding
8305 make targets in common/Makefile.
8306
8307 2011-02-11 Yao Qi <yao@codesourcery.com>
8308
8309 * configure.ac: Call AC_PROG_RANLIB.
8310 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8311 * configure: Regenerate.
8312
e6edda56
JK
83132011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8314
8315 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8316
e5141119
JB
83172011-03-06 Yao Qi <yao@codesourcery.com>
8318
8319 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8320
64794aa4
JB
83212011-03-05 Yao Qi <yao@codesourcery.com>
8322
8323 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8324 (subdir_do): New make target. Copied from gdb/Makefile.
8325 (maintainer-clean, realclean, distclean, clean): Call corresponding
8326 make targets in common/Makefile.
8327
7a762829
YQ
83282011-03-04 Yao Qi <yao@codesourcery.com>
8329
8330 * Makefile.in: Remove GNU make feature --directory.
8331
348af9f7
MS
83322011-03-04 Michael Snyder <msnyder@vmware.com>
8333
8334 * server.c (queue_stop_reply): Call xmalloc not malloc.
8335
83362011-03-02 Michael Snyder <msnyder@vmware.com>
8337
8338 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8339
9f72fee2
MS
83402011-02-28 Michael Snyder <msnyder@vmware.com>
8341
588eebee
MS
8342 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8343 (cmd_qtframe): Ditto.
8344 (cmd_qtbuffer): Ditto.
8345 (cmd_bigqtbuffer): Ditto.
8346
9f72fee2
MS
8347 * utils.c (decimal2str): Initialize 'width' to nine, then
8348 don't mess with it.
8349
8040bd49
UW
83502011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8351
8352 * hostio.c (require_data): Free *data, not data.
8353
7e52cbd0
JK
83542011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8355
8356 * hostio.c (require_data): Use free, not xfree.
8357
9130f83e
MS
83582011-02-27 Michael Snyder <msnyder@vmware.com>
8359
4b812f4e
MS
8360 * server.c (handle_query): Discard unused value.
8361
9130f83e
MS
8362 * hostio.c (require_data): Free malloc memory before returning
8363 error.
8364
69d37113
MS
83652011-02-26 Michael Snyder <msnyder@vmware.com>
8366
8367 * linux-low.c (list_threads): Call closedir for dirent.
8368
35f5825a
MS
83692011-02-27 Michael Snyder <msnyder@vmware.com>
8370
2a589cef
MS
8371 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8372 a case statement falls through.
8373
0adea5f7
MS
8374 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8375
35f5825a
MS
8376 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8377 in comparison.
8378
238f1c74
MS
83792011-02-26 Michael Snyder <msnyder@vmware.com>
8380
8381 * utils.c (decimal2str): Eliminate dead code and dead param.
8382 (pulongest): Drop dead param from call to decimal2str.
8383 (plongest): Ditto.
8384
633ff500
JB
83852011-02-24 Joel Brobecker <brobecker@adacore.com>
8386
8387 Revert the following patch (not approved yet):
8388 2011-02-21 Hui Zhu <teawater@gmail.com>
8389 * tracepoint.c (tp_printf): New function.
8390 (eval_agent_expr): Handle gdb_agent_op_printf.
8391
f9c6ff72
HZ
83922011-02-21 Hui Zhu <teawater@gmail.com>
8393
8394 * tracepoint.c (tp_printf): New function.
8395 (eval_agent_expr): Handle gdb_agent_op_printf.
8396
94d5e490
TT
83972011-02-18 Tom Tromey <tromey@redhat.com>
8398
8399 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8400 (tracepoint.o): Likewise.
8401 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8402 (gdb_agent_op_names): Likewise.
8403
c7f96d2b
TT
84042011-02-18 Tom Tromey <tromey@redhat.com>
8405
8406 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8407 gdb_agent_op_rot>: New constants.
8408 (gdb_agent_op_names): Add pick and roll.
8409 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8410 cases.
8411
0feedb2c
JK
84122011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8413
8414 * aclocal.m4: Regenerated with aclocal-1.11.1.
8415
b3b9301e
PA
84162011-02-14 Pedro Alves <pedro@codesourcery.com>
8417
8418 * server.c (handle_qxfer_traceframe_info): New.
8419 (qxfer_packets): Register "traceframe-info".
8420 (handle_query): Report support for qXfer:traceframe-info:read+.
8421 * tracepoint.c (match_blocktype): New.
8422 (traceframe_find_block_type): Rename to ...
8423 (traceframe_walk_blocks): ... this. Add callback filter argument,
8424 and use it.
8425 (traceframe_find_block_type): New, reimplemented on top of
8426 traceframe_walk_blocks.
8427 (build_traceframe_info_xml): New.
8428 (traceframe_read_info): New.
8429 * server.h (traceframe_read_info): Declare.
8430
4f3e6fb7
YQ
84312011-02-11 Yao Qi <yao@codesourcery.com>
8432
8433 * configure.ac: Call AC_PROG_RANLIB.
8434 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8435 * configure: Regenerate.
8436
764880b7
PA
84372011-02-07 Pedro Alves <pedro@codesourcery.com>
8438
8439 * server.c (gdb_read_memory): Change return semantics to allow
8440 partial transfers.
8441 (handle_search_memory_1): Adjust.
8442 (process_serial_event) <'m' packet>: Handle partial transfers.
8443 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8444
1c79eb8a
PA
84452011-01-28 Pedro Alves <pedro@codesourcery.com>
8446
8447 * regcache.c (init_register_cache): Initialize
8448 regcache->register_status.
8449 (free_register_cache): Release regcache->register_status.
8450 (regcache_cpy): Copy register_status.
8451 (registers_to_string): Print 'x's for unavailable registers.
8452 (supply_register): Mark the register's status valid or
8453 unavailable, depending on whether a buffer was passed in or not.
8454 (supply_register_zeroed): New.
8455 (supply_regblock): Mark the registers' status valid or
8456 unavailable, depending on whether a buffer was passed in or not.
8457 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8458 (struct regcache): New `register_status' field.
8459 (supply_register_zeroed): Declare.
8460 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8461 supply_register_zeroed, rather than passing a NULL buffer to
8462 supply_register.
8463 * tracepoint.c (fetch_traceframe_registers): Update comment.
8464
85724a0e
PA
84652011-01-28 Pedro Alves <pedro@codesourcery.com>
8466
8467 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8468 buffer explicit.
8469
d08aafef
PA
84702011-01-25 Pedro Alves <pedro@codesourcery.com>
8471
8472 * server.h (decode_xfer_write): Change prototype.
8473 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8474 and don't extract the annex here.
8475 * server.c (decode_xfer_read): Remove `annex' parameter,
8476 and don't extract the annex here.
8477 (decode_xfer): New.
8478 (struct qxfer): New.
8479 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8480 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8481 (handle_qxfer_statictrace): New functions, abstracted out from
8482 handle_query, and made to use the struct qxfer interface.
8483 (handle_threads_qxfer_proper): Rename to ...
8484 (handle_qxfer_threads_proper): ... this.
8485 (handle_threads_qxfer): Rename to ...
8486 (handle_qxfer_threads): ... this. Adjust.
8487 (qxfer_packets): New array.
8488 (handle_qxfer): New function.
8489 (handle_query): Use handle_qxfer.
8490
493e2a69
MS
84912011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8492
8493 * gdbreplay.c: Shorten lines of >= 80 columns.
8494 * linux-low.c: Ditto.
8495 * linux-ppc-low.c: Ditto.
8496 * linux-s390-low.c: Ditto.
8497 * linux-sparc-low.c: Ditto.
8498 * linux-x86-low.c: Ditto.
8499 * linux-xtensa-low.c: Ditto.
8500 * mem-break.c: Ditto.
8501 * nto-low.c: Ditto.
8502 * regcache.h: Ditto.
8503 * remote-utils.c: Ditto.
8504 * server.c: Ditto.
8505 * server.h: Ditto.
8506 * thread-db.c: Ditto.
8507 * tracepoint.c: Ditto.
8508 * utils.c: Ditto.
8509 * win32-low.h: Ditto.
8510
44944448
JB
85112011-01-05 Joel Brobecker <brobecker@adacore.com>
8512
8513 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8514 update.
8515
71ce852c
JB
85162011-01-01 Joel Brobecker <brobecker@adacore.com>
8517
8518 * server.c (gdbserver_version): Update copyright year in version
8519 output.
8520 * gdbreplay.c (gdbreplay_version): Ditto.
8521
eb826dc6
MF
85222010-12-29 Jie Zhang <jie.zhang@analog.com>
8523
8524 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8525 * linux-bfin-low.c: New file.
8526 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8527 PT_DATA_ADDR for BFIN targets.
8528 * Makefile.in (SFILES): Add linux-bfin-low.c.
8529 (clean): Remove reg-bfin.c.
8530 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8531 * README: Mention supported Blackfin targets.
8532
39ab222a
MF
85332010-12-23 Mike Frysinger <vapier@gentoo.org>
8534
8535 * .gitignore: New file.
8536
a1f2ce7d
MF
85372010-11-16 Mike Frysinger <vapier@gentoo.org>
8538
8539 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8540
f474844c
JZ
85412010-10-22 Jie Zhang <jie@codesourcery.com>
8542
8543 * Makefile.in: Add FLAGS_TO_PASS variable.
8544 (install): Remove dependency of install-only and recursively
8545 invoke make for install-only.
8546
f1048712
DE
85472010-10-04 Doug Evans <dje@google.com>
8548
8549 * Makefile.in (uninstall): Use $(DESTDIR).
8550
b53a1623
PA
85512010-09-24 Pedro Alves <pedro@codesourcery.com>
8552
e6ee044d
PA
8553 PR gdb/11842
8554
b53a1623
PA
8555 * linux-x86-low.c (compat_siginfo_from_siginfo)
8556 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8557 si_code is < 0. Check for si_code == SI_TIMER before checking for
8558 si_code < 0.
8559
fa1bd1e4
JB
85602010-09-13 Joel Brobecker <brobecker@adacore.com>
8561
8562 * lynx-i386-low.c: New file.
8563 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8564
47fac8f8
JB
85652010-09-13 Joel Brobecker <brobecker@adacore.com>
8566
8567 * lynx-low.c (ptrace_request_to_str): Remove handling for
8568 request values that have been removed in LynxOS 5.x.
8569
1adfc54d
JB
85702010-09-13 Joel Brobecker <brobecker@adacore.com>
8571
8572 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8573 <ptrace.h>
8574
c2a66c29
NS
85752010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8576
8577 * configure.ac: Add --enable-inprocess-agent option.
8578 * configure: Rebuilt.
8579
32fcada3
YQ
85802010-09-06 Yao Qi <yao@codesourcery.com>
8581
8582 * linux-low.c (linux_kill): Remove unused variable.
8583 (linux_stabilize_threads): Likewise.
8584 * server.c (start_inferior): Likewise.
8585 (queue_stop_reply_callback): Likewise.
8586 * tracepoint.c (do_action_at_tracepoint): Likewise.
8587
0cccb683
YQ
85882010-09-06 Yao Qi <yao@codesourcery.com>
8589
8590 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8591 on return.
8592
423ec54c
JK
85932010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8594
8595 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8596
12ac6819
PA
85972010-09-06 Pedro Alves <pedro@codesourcery.com>
8598
8599 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8600 "$(IPA_DEPFILES)".
8601
8ed54b31
JB
86022010-09-01 Joel Brobecker <brobecker@adacore.com>
8603
8604 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8605 gdbserver/lynx-ppc-low.c: New files.
8606 * Makefile.in (lynx_low_h): New variable.
8607 (lynx-low.o, lynx-ppc-low.o): New rules.
8608 * configure.ac: On LynxOS, link with -lnetinet.
8609 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8610 * configure: regenerate.
8611
bb0116a4
JB
86122010-09-01 Joel Brobecker <brobecker@adacore.com>
8613
8614 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8615 * configure.ac: Add check for vasprintf and vsnprintf.
8616 * configure, config.in: Regenerate.
8617 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8618
a778ab81 86192010-09-01 Joel Brobecker <brobecker@adacore.com>
8620
8621 * gdbreplay.c: Move include of alloca.h up, next to include of
8622 malloc.h.
8623 * server.h: Add include of malloc.h.
8624 * mem-break.c: Remove include of malloc.h.
8625 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8626
8b034a19 86272010-09-01 Joel Brobecker <brobecker@adacore.com>
8628
8629 * Makefile.in (memmem.o): Build with -Wno-error.
8630
86312010-09-01 Joel Brobecker <brobecker@adacore.com>
8632
8633 * utils.c (xsnprintf): Make non-static.
8634 * server.h: Add xsnprintf declaration.
8635 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8636 replace calls to snprintf by calls to xsnprintf throughout.
8637
86382010-09-01 Joel Brobecker <brobecker@adacore.com>
8639
8640 * configure.ac: Add configure check for alloca.
8641 * configure, config.in: Regenerate.
8642 * server.h: Include alloca.h if it exists.
8643 * gdbreplay.c: Include alloca.h if it exists.
8644
1a981360
PA
86452010-08-28 Pedro Alves <pedro@codesourcery.com>
8646
8647 * linux-low.c (__SIGRTMIN): Define if not already defined.
8648 (linux_create_inferior): Check for __ANDROID__ rather than
8649 __SIGRTMIN.
8650 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8651 are already deferred.
8652 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8653 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8654 stopped and already has a pending signal to report.
8655 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8656 a pending signal to report or is moving out of a jump pad.
8657 (linux_init_signals): Check for __ANDROID__ rather than
8658 __SIGRTMIN.
8659
b4d51a55
PA
86602010-08-28 Pedro Alves <pedro@codesourcery.com>
8661
8662 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8663 debug_threads check. Avoid a linear search when not doing debug
8664 output.
8665
ec48365d
PA
86662010-08-27 Pedro Alves <pedro@codesourcery.com>
8667
8668 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8669 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8670 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8671 (process_event): Change local fd's type to gdb_fildes_t.
8672 (create_file_handler): Adjust prototype.
8673 (delete_file_handler): Adjust prototype.
8674 (handle_file_event): Adjust prototype. Use pfildes.
8675 (create_file_event): Adjsut prototype.
8676 * remote-utils.c (remote_desc, listen_desc): Change type to
8677 gdb_fildes_t.
8678 * server.h: New gdb_fildes_t typedef.
8679 [USE_WIN32API]: Include winsock2.h.
8680 (delete_file_handler, add_file_handler): Adjust prototypes.
8681 (pfildes): Declare.
8682 * utils.c (pfildes): New.
8683
854d88f0
PA
86842010-08-27 Pedro Alves <pedro@codesourcery.com>
8685
8686 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8687 * configure: Regenerate.
8688
0146f85b
PA
86892010-08-27 Pedro Alves <pedro@codesourcery.com>
8690
8691 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8692 (linux_done_accessing_memory): ... this.
8693 (linux_target_ops): Adjust.
8694 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8695 * nto-low.c (nto_target_ops): Adjust comment.
8696 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8697 * spu-low.c (spu_target_ops): Adjust comment.
8698 * target.h (target_ops): Rename unprepare_to_access_memory field
8699 to done_accessing_memory.
8700 (unprepare_to_access_memory): Rename to ...
8701 (done_accessing_memory): ... this.
8702
90d74c30
PA
87032010-08-26 Pedro Alves <pedro@codesourcery.com>
8704
8705 * linux-low.c (linux_prepare_to_access_memory): New.
8706 (linux_unprepare_to_access_memory): New.
8707 (linux_target_ops): Install them.
8708 * server.c (read_memory): Rename to ...
8709 (gdb_read_memory): ... this. Use
8710 prepare_to_access_memory/prepare_to_access_memory.
8711 (write_memory): Rename to ...
8712 (gdb_write_memory): ... this. Use
8713 prepare_to_access_memory/prepare_to_access_memory.
8714 (handle_search_memory_1): Adjust.
8715 (process_serial_event): Adjust.
8716 * target.h (struct target_ops): New fields
8717 prepare_to_access_memory and unprepare_to_access_memory.
8718 (prepare_to_access_memory, unprepare_to_access_memory): New.
8719 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8720 prepare_to_access_memory/prepare_to_access_memory.
8721 * nto-low.c (nto_target_ops): Adjust.
8722 * spu-low.c (spu_target_ops): Adjust.
8723 * win32-low.c (win32_target_ops): Adjust.
8724
fd467969
PA
87252010-08-26 Pedro Alves <pedro@codesourcery.com>
8726
8727 * Makefile.in (WARN_CFLAGS): Get it from configure.
8728 (WERROR_CFLAGS): New.
8729 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8730 * configure.ac: Introduce --enable-werror, which adds -Werror to
8731 the compiler command line. Enabled by default. Disable with
8732 --disable-werror. Add -Wdeclaration-after-statement
8733 Wpointer-arith and -Wformat-nonliteral to warning flags.
8734 * configure: Regenerate.
8735
331e2f5f
PA
87362010-08-26 Pedro Alves <pedro@codesourcery.com>
8737
8738 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8739
e581f2b4
PA
87402010-08-26 Pedro Alves <pedro@codesourcery.com>
8741
8742 * gdbreplay.c (remote_error): New.
8743 (gdbchar): New.
8744 (expect): Use gdbchar. Check for error reading from GDB.
8745 Clarify sync error output.
8746 (play): Check for errors writing to GDB.
8747 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8748 * remote-utils.c (getpkt): Check for errors writing to the remote
8749 descriptor.
8750
3c11dd79
PA
87512010-08-25 Pedro Alves <pedro@codesourcery.com>
8752
8753 * linux-low.c (linux_wait_1): Move non-debugging code out of
8754 `debug_threads' control.
8755
d20a8ad9
PA
87562010-08-25 Pedro Alves <pedro@codesourcery.com>
8757
8758 * linux-low.c (linux_wait_1): Don't set last_status here.
8759 * server.c (push_event, queue_stop_reply_callback): Assert we're
8760 not pushing a TARGET_WAITKIND_IGNORE event.
8761 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8762 (myresume, handle_target_event): Set the thread's last_resume_kind
8763 and last_status from the target returned status.
8764
964e4306
PA
87652010-08-25 Pedro Alves <pedro@codesourcery.com>
8766
8767 PR threads/10729
8768
8769 * linux-x86-low.c (update_debug_registers_callback): New.
8770 (i386_dr_low_set_addr): Use it.
8771 (i386_dr_low_get_addr): New.
8772 (i386_dr_low_set_control): Use update_debug_registers_callback.
8773 (i386_dr_low_get_control): New.
8774 (i386_dr_low_get_status): Adjust.
8775 * linux-low.c (linux_stop_lwp): New.
8776 * linux-low.h (linux_stop_lwp): Declare.
8777
8778 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8779 argument instead of a i386_debug_reg_state.
8780 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8781 a i386_debug_reg_state.
8782 (i386_insert_aligned_watchpoint): Adjust.
8783 (i386_remove_aligned_watchpoint): Adjust.
8784 (i386_low_stopped_data_address): Read the debug registers from the
8785 inferior instead of from the mirrors.
8786 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8787 (i386_dr_low_get_addr): Declare.
8788 (i386_dr_low_get_control): Declare.
8789 (i386_dr_low_get_status): Change prototype.
8790
8791 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8792 (i386_dr_low_get_addr): New.
8793 (i386_dr_low_get_control): New.
8794 (i386_dr_low_get_status): Adjust prototype. Return
8795 dr_status_mirror.
8796 (i386_initial_stuff): Clear dr_status_mirror and
8797 dr_control_mirror.
8798 (i386_get_thread_context): Adjust.
8799 (i386_set_thread_context): Adjust.
8800 (i386_thread_added): Adjust.
8801
5f21a75b
PA
88022010-08-24 Pedro Alves <pedro@codesourcery.com>
8803
8804 * linux-low.h (linux_thread_area): Delete declaration.
8805
3e4c1235
TS
88062010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8807
8808 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8809 after its termination.
8810
1971b033
PA
88112010-08-09 Pedro Alves <pedro@codesourcery.com>
8812
8813 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8814 (gdb_wants_all_stopped): Delete.
8815 (linux_wait_1): Don't call them.
8816 * server.c (handle_v_cont): Tag all threads as want-stopped.
8817 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8818 stopped as "client-wants-stopped".
8819
310444ac
PA
88202010-07-31 Pedro Alves <pedro@codesourcery.com>
8821
8822 * Makefile.in (signals_h): New.
8823 (server_h): Depend on it.
8824 (server.o): Don't depend on $(signals_def).
8825 (signals.o): Depend on $(signals_def).
8826
a19cae16
JK
88272010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8828
8829 * Makefile.in (signals_def): New.
8830 (server_h): Append include/gdb/signals.h and signals_def.
8831 (server.o): Append signals_def.
8832
30d50328
JK
88332010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8834
8835 * server.c (handle_target_event): Use target_signal_to_host for
8836 resume_info.sig initialization.
8837 * target.h (struct thread_resume) <sig>: New comment.
8838
5c3216e2
OS
88392010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8840
c6f46ca0
OS
8841 * server.c (handle_query): strcpy() the returned string from paddress()
8842 instead of sprintf().
5c3216e2
OS
8843 * utils.c (paddress): Return phex_nz().
8844
6bd31874
JB
88452010-07-07 Joel Brobecker <brobecker@adacore.com>
8846
8847 * server.c (handle_v_cont): Call mourn_inferior if process
8848 just exited.
8849 (myresume): Likewise.
8850
0fb4aa4b
PA
88512010-07-01 Pedro Alves <pedro@codesourcery.com>
8852
8853 Static tracepoints, and integration with UST.
8854
8855 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8856 * mem-break.c (uninsert_all_breakpoints)
8857 (reinsert_all_breakpoints): New.
8858 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8859 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8860 (gdb_agent_ust_loaded, helper_thread_id)
8861 (gdb_agent_helper_thread_id): New macros.
8862 (struct ipa_sym_addresses): Add addr_ust_loaded,
8863 addr_helper_thread_id, addr_cmd_buf.
8864 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8865 (in_process_agent_loaded_ust): New.
8866 (write_e_ust_not_loaded): New.
8867 (maybe_write_ipa_ust_not_loaded): New.
8868 (struct collect_static_trace_data_action): New.
8869 (enum tracepoint_type) <static_tracepoint>: New.
8870 (struct tracepoint) <handle>: Mention static tracepoints.
8871 (struct static_tracepoint_ctx): New.
8872 (CMD_BUF_SIZE): New.
8873 (add_tracepoint_action): Handle static tracepoint actions.
8874 (unprobe_marker_at): New.
8875 (clear_installed_tracepoints): Handle static tracepoints.
8876 (cmd_qtdp): Handle static tracepoints.
8877 (probe_marker_at): New.
8878 (cmd_qtstart): Handle static tracepoints.
8879 (response_tracepoint): Handle static tracepoints.
8880 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8881 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8882 (get_context_regcache): Handle static tracepoints.
8883 (do_action_at_tracepoint): Handle static tracepoint actions.
8884 (traceframe_find_block_type): Handle static trace data blocks.
8885 (traceframe_read_sdata): New.
8886 (download_tracepoints): Download static tracepoint actions.
8887 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8888 (GDB_PROBE_NAME): New.
8889 (ust_ops): New.
8890 (GET_UST_SYM): New.
8891 (USTF): New.
8892 (dlsym_ust): New.
8893 (ust_marker_to_static_tracepoint): New.
8894 (gdb_probe): New.
8895 (collect_ust_data_at_tracepoint): New.
8896 (gdb_ust_probe): New.
8897 (UNIX_PATH_MAX, SOCK_DIR): New.
8898 (gdb_ust_connect_sync_socket): New.
8899 (resume_thread, stop_thread): New.
8900 (run_inferior_command): New.
8901 (init_named_socket): New.
8902 (gdb_ust_socket_init): New.
8903 (cstr_to_hexstr): New.
8904 (next_st): New.
8905 (first_marker, next_marker): New.
8906 (response_ust_marker): New.
8907 (cmd_qtfstm, cmd_qtsstm): New.
8908 (unprobe_marker_at, probe_marker_at): New.
8909 (cmd_qtstmat, gdb_ust_thread): New.
8910 (gdb_ust_init): New.
8911 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8912 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8913 (ST_REGENTRY): New.
8914 (x86_64_st_collect_regmap): New.
8915 (X86_64_NUM_ST_COLLECT_GREGS): New.
8916 (AMD64_RIP_REGNUM): New.
8917 (supply_static_tracepoint_registers): New.
8918 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8919 (ST_REGENTRY): New.
8920 (i386_st_collect_regmap): New.
8921 (i386_NUM_ST_COLLECT_GREGS): New.
8922 (supply_static_tracepoint_registers): New.
8923 * server.c (handle_query): Handle qXfer:statictrace:read.
8924 <qSupported>: Report support for StaticTracepoints, and
8925 qXfer:statictrace:read features.
8926 * server.h (traceframe_read_sdata)
8927 (supply_static_tracepoint_registers): Declare.
8928 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8929 (unpack_varlen_hex): Include in IPA build.
8930 * Makefile.in (ustlibs, ustinc): New.
8931 (IPA_OBJS): Add remote-utils-ipa.o.
8932 ($(IPA_LIB)): Link -ldl and -lpthread.
8933 (UST_CFLAGS): New.
8934 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8935 * config.in, configure: Regenerate.
8936
9e4344e5
PA
89372010-06-20 Ian Lance Taylor <iant@google.com>
8938 Pedro Alves <pedro@codesourcery.com>
8939
8940 * linux-x86-low.c (always_true): Delete.
8941 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8942 trying to fool the compiler with always_true.
8943
c6beb2cb
PA
89442010-06-20 Pedro Alves <pedro@codesourcery.com>
8945
8946 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8947 conditions in gdbserver.
8948
d2ed6730
UW
89492010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8950
8951 * spu-low.c (spu_read_memory): Wrap around local store limit.
8952 (spu_write_memory): Likewise.
8953
4e29fb54
PA
89542010-06-15 Pedro Alves <pedro@codesourcery.com>
8955
8956 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8957 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8958 LONGEST uses.
8959 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8960 uses.
8961 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8962 uses with LONGEST uses.
8963
6a271cae
PA
89642010-06-14 Stan Shebs <stan@codesourcery.com>
8965 Pedro Alves <pedro@codesourcery.com>
8966
8967 Bytecode compiler.
8968
8969 * linux-x86-low.c: Include limits.h.
8970 (add_insns): New.
8971 (always_true): New.
8972 (EMIT_ASM): New.
8973 (EMIT_ASM32): New.
8974 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8975 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8976 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8977 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8978 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8979 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8980 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8981 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8982 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8983 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8984 (amd64_emit_void_call_2): New.
8985 (amd64_emit_ops): New.
8986 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8987 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8988 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8989 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8990 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8991 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8992 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8993 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8994 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8995 (i386_emit_stack_adjust, i386_emit_int_call_1)
8996 (i386_emit_void_call_2): New.
8997 (i386_emit_ops): New.
8998 (x86_emit_ops): New.
8999 (the_low_target): Install x86_emit_ops.
9000 * server.h (struct emit_ops): New.
9001 (get_raw_reg_func_addr): Declare.
9002 (current_insn_ptr, emit_error): Declare.
9003 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9004 (set_trace_state_variable_value): New defines.
9005 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9006 addr_get_trace_state_variable_value and
9007 addr_set_trace_state_variable_value.
9008 (symbol_list): New fields for get_raw_reg,
9009 get_trace_state_variable_value and set_trace_state_variable_value.
9010 (condfn): New typedef.
9011 (struct tracepoint): New field `compiled_cond'.
9012 (do_action_at_tracepoint): Clear compiled_cond.
9013 (get_trace_state_variable_value, set_trace_state_variable_value):
9014 Export in the IPA.
9015 (condition_true_at_tracepoint): If there's a compiled condition,
9016 run that.
9017 (current_insn_ptr, emit_error): New globals.
9018 (struct bytecode_address): New.
9019 (get_raw_reg_func_addr): New.
9020 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9021 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9022 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9023 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9024 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9025 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9026 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9027 (compile_tracepoint_condition, compile_bytecodes): New.
9028 * target.h (emit_ops): Forward declare.
9029 (struct target_ops): New field emit_ops.
9030 (target_emit_ops): New.
9031 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9032 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9033 * linux-low.c (linux_emit_ops): New.
9034 (linux_target_ops): Install it.
9035 * linux-low.h (struct linux_target_ops): New field emit_ops.
9036
92b72907
UW
90372010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9038
9039 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9040 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9041
fa593d66
PA
90422010-06-01 Pedro Alves <pedro@codesourcery.com>
9043 Stan Shebs <stan@codesourcery.com>
9044
9045 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9046 (all): Depend on $(extra_libraries).
9047 (install-only): Install the IPA.
9048 (IPA_OBJS, IPA_LIB): New.
9049 (clean): Remove the IPA lib.
9050 (IPAGENT_CFLAGS): New.
9051 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9052 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9053 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9054 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9055 * configure.ac: Check for atomic builtins support in the compiler.
9056 (IPA_DEPFILES, extra_libraries): Define.
9057 * configure.srv (ipa_obj): Add description.
9058 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9059 (i[34567]86-*-linux*): Set ipa_obj.
9060 (x86_64-*-linux*): Set ipa_obj.
9061 * linux-low.c (stabilizing_threads): New.
9062 (supports_fast_tracepoints): New.
9063 (linux_detach): Stabilize threads before detaching.
9064 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9065 the lwp is either not stabilizing, or is moving out of a jump pad.
9066 (linux_fast_tracepoint_collecting): New.
9067 (maybe_move_out_of_jump_pad): New.
9068 (enqueue_one_deferred_signal): New.
9069 (dequeue_one_deferred_signal): New.
9070 (linux_wait_for_event_1): If moving out of a jump pad, defer
9071 pending signals to later.
9072 (linux_stabilize_threads): New.
9073 (linux_wait_1): Check if threads need moving out of jump pads, and
9074 do it if so.
9075 (stuck_in_jump_pad_callback): New.
9076 (move_out_of_jump_pad_callback): New.
9077 (lwp_running): New.
9078 (linux_resume_one_lwp): Handle moving out of jump pads.
9079 (linux_set_resume_request): Dequeue deferred signals.
9080 (need_step_over_p): Also step over fast tracepoint jumps.
9081 (start_step_over): Also uninsert fast tracepoint jumps.
9082 (finish_step_over): Also reinsert fast tracepoint jumps.
9083 (linux_install_fast_tracepoint_jump): New.
9084 (linux_target_ops): Install linux_stabilize_threads and
9085 linux_install_fast_tracepoint_jump_pad.
9086 * linux-low.h (linux_target_ops) <get_thread_area,
9087 install_fast_tracepoint_jump_pad>: New fields.
9088 (struct lwp_info) <collecting_fast_tracepoint,
9089 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9090 (linux_get_thread_area): Declare.
9091 * linux-x86-low.c (jump_insn): New.
9092 (x86_get_thread_area): New.
9093 (append_insns): New.
9094 (push_opcode): New.
9095 (amd64_install_fast_tracepoint_jump_pad): New.
9096 (i386_install_fast_tracepoint_jump_pad): New.
9097 (x86_install_fast_tracepoint_jump_pad): New.
9098 (the_low_target): Install x86_get_thread_area and
9099 x86_install_fast_tracepoint_jump_pad.
9100 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9101 (struct fast_tracepoint_jump): New.
9102 (fast_tracepoint_jump_insn): New.
9103 (fast_tracepoint_jump_shadow): New.
9104 (find_fast_tracepoint_jump_at): New.
9105 (fast_tracepoint_jump_here): New.
9106 (delete_fast_tracepoint_jump): New.
9107 (set_fast_tracepoint_jump): New.
9108 (uninsert_fast_tracepoint_jumps_at): New.
9109 (reinsert_fast_tracepoint_jumps_at): New.
9110 (set_breakpoint_at): Use write_inferior_memory.
9111 (uninsert_raw_breakpoint): Use write_inferior_memory.
9112 (check_mem_read): Mask out fast tracepoint jumps.
9113 (check_mem_write): Mask out fast tracepoint jumps.
9114 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9115 (set_fast_tracepoint_jump): Declare.
9116 (delete_fast_tracepoint_jump)
9117 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9118 (reinsert_fast_tracepoint_jumps_at): Declare.
9119 * regcache.c: Don't compile many functions when building the
9120 in-process agent library.
9121 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9122 the register buffer in the heap.
9123 (free_register_cache): If the register buffer isn't owned by the
9124 regcache, don't free it.
9125 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9126 pre-existing register caches.
9127 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9128 type.
9129 (convert_ascii_to_int): : Constify `from' parameter type.
9130 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9131 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9132 the needed buffer in-place.
9133 (relocate_instruction): New.
9134 * server.c (handle_query) <qSymbols>: If the target supports
9135 tracepoints, give it a chance of looking up symbols. Report
9136 support for fast tracepoints.
9137 (handle_status): Stabilize threads.
9138 (process_serial_event): Adjust.
9139 * server.h (struct fast_tracepoint_jump): Forward declare.
9140 (struct process_info) <fast_tracepoint_jumps>: New field.
9141 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9142 (decode_X_packet, decode_M_packet): Adjust.
9143 (relocate_instruction): Declare.
9144 (in_process_agent_loaded): Declare.
9145 (tracepoint_look_up_symbols): Declare.
9146 (struct fast_tpoint_collect_status): Declare.
9147 (fast_tracepoint_collecting): Declare.
9148 (force_unlock_trace_buffer): Declare.
9149 (handle_tracepoint_bkpts): Declare.
9150 (initialize_low_tracepoint)
9151 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9152 * target.h (struct target_ops) <stabilize_threads,
9153 install_fast_tracepoint_jump_pad>: New fields.
9154 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9155 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9156 [HAVE_STDINT_H]: Include stdint.h.
9157 (trace_debug_1): Rename to ...
9158 (trace_vdebug): ... this.
9159 (trace_debug): Rename to ...
9160 (trace_debug_1): ... this. Add `level' parameter.
9161 (trace_debug): New.
9162 (ATTR_USED, ATTR_NOINLINE): New.
9163 (IP_AGENT_EXPORT): New.
9164 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9165 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9166 (about_to_request_buffer_space, trace_buffer_is_full)
9167 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9168 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9169 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9170 (traceframe_write_count, traceframes_created)
9171 (trace_state_variables)
9172 New renaming defines.
9173 (struct ipa_sym_addresses): New.
9174 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9175 (symbol_list): New.
9176 (ipa_sym_addrs): New.
9177 (all_tracepoint_symbols_looked_up): New.
9178 (in_process_agent_loaded): New.
9179 (write_e_ipa_not_loaded): New.
9180 (maybe_write_ipa_not_loaded): New.
9181 (tracepoint_look_up_symbols): New.
9182 (debug_threads) [IN_PROCESS_AGENT]: New.
9183 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9184 (UNKNOWN_SIDE_EFFECTS): New.
9185 (stop_tracing): New.
9186 (flush_trace_buffer): New.
9187 (stop_tracing_bkpt): New.
9188 (flush_trace_buffer_bkpt): New.
9189 (read_inferior_integer): New.
9190 (read_inferior_uinteger): New.
9191 (read_inferior_data_pointer): New.
9192 (write_inferior_data_pointer): New.
9193 (write_inferior_integer): New.
9194 (write_inferior_uinteger): New.
9195 (struct collect_static_trace_data_action): Delete.
9196 (enum tracepoint_type): New.
9197 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9198 <actions_str, step_actions, step_actions_str>: Only include in
9199 GDBserver.
fa593d66
PA
9200 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9201 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9202 (tracepoints): Use IP_AGENT_EXPORT.
9203 (last_tracepoint): Don't include in the IPA.
9204 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9205 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9206 (alloced_trace_state_variables): New.
9207 (trace_state_variables): Use IP_AGENT_EXPORT.
9208 (traceframe_t): Delete unused variable.
9209 (circular_trace_buffer): Don't include in the IPA.
9210 (trace_buffer_start): Delete.
9211 (struct trace_buffer_control): New.
9212 (trace_buffer_free): Delete.
9213 (struct ipa_trace_buffer_control): New.
9214 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9215 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9216 New.
9217 (trace_buffer_ctrl): New.
9218 (TRACE_BUFFER_CTRL_CURR): New.
9219 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9220 Reimplement as macros.
9221 (trace_buffer_wrap): Delete.
9222 (traceframe_write_count, traceframe_read_count)
9223 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9224 (struct tracepoint_hit_ctx) <type>: New field.
9225 (struct fast_tracepoint_ctx): New.
9226 (memory_barrier): New.
9227 (cmpxchg): New.
9228 (record_tracepoint_error): Update atomically in the IPA.
9229 (clear_inferior_trace_buffer): New.
9230 (about_to_request_buffer_space): New.
9231 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9232 updating the same buffer.
9233 (add_tracepoint): Default the tracepoint's type to trap
9234 tracepoint, and orig_size to -1.
9235 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9236 internal variables.
9237 (create_trace_state_variable): New parameter `gdb'. Handle it.
9238 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9239 (cmd_qtdp): Handle fast tracepoints.
9240 (cmd_qtdv): Adjust.
9241 (max_jump_pad_size): New.
9242 (gdb_jump_pad_head): New.
9243 (get_jump_space_head): New.
9244 (claim_jump_space): New.
9245 (sort_tracepoints): New.
9246 (MAX_JUMP_SIZE): New.
9247 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9248 IPA.
9249 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9250 support. Upload fast traceframes, and delete internal IPA
9251 breakpoints.
9252 (stop_tracing_handler): New.
9253 (flush_trace_buffer_handler): New.
9254 (cmd_qtstop): Upload fast tracepoints.
9255 (response_tracepoint): Handle fast tracepoints.
9256 (tracepoint_finished_step): Upload fast traceframes. Set the
9257 tracepoint hit context's tracepoint type.
9258 (handle_tracepoint_bkpts): New.
9259 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9260 type. Add comment about fast tracepoints.
9261 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9262 non-existing action_str field.
9263 (get_context_regcache): Handle fast tracepoints.
9264 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9265 to the regcache.
9266 (fast_tracepoint_from_jump_pad_address): New.
9267 (fast_tracepoint_from_ipa_tpoint_address): New.
9268 (collecting_t): New.
9269 (force_unlock_trace_buffer): New.
9270 (fast_tracepoint_collecting): New.
9271 (collecting): New.
9272 (gdb_collect): New.
9273 (write_inferior_data_ptr): New.
9274 (target_tp_heap): New.
9275 (target_malloc): New.
9276 (download_agent_expr): New.
9277 (UALIGN): New.
9278 (download_tracepoints): New.
9279 (download_trace_state_variables): New.
9280 (upload_fast_traceframes): New.
9281 (IPA_FIRST_TRACEFRAME): New.
9282 (IPA_NEXT_TRACEFRAME_1): New.
9283 (IPA_NEXT_TRACEFRAME): New.
9284 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9285 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9286 (gdb_jump_pad_buffer_end): New.
9287 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9288 (initialize_tracepoint): Adjust.
9289 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9290 buffer. Initialize the low module.
9291 * utils.c (PREFIX, TOOLNAME): New.
9292 (malloc_failure): Use PREFIX.
9293 (error): In the IPA, an error causes an exit.
9294 (fatal, warning): Use PREFIX.
9295 (internal_error): Use TOOLNAME.
9296 (NUMCELLS): Increase to 10.
9297 * configure, config.in: Regenerate.
9298
d149dd1d
PA
92992010-06-01 Pedro Alves <pedro@codesourcery.com>
9300
9301 * server.c (handle_query) <qSupported>: Do two passes over the
9302 qSupported string to avoid nesting strtok.
9303
f6528abd
JK
93042010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9305
9306 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9307 (CDEPS): New.
9308 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9309 -Wl,--dynamic-list.
9310 * configure: Regenerate.
9311 * proc-service.list: New.
9312
ca2a87a0
JK
93132010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9314
9315 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9316 New comment.
9317
363a6e9f
OS
93182010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9319
9320 * gdbreplay.c (remote_open): Check error return from socket() call by
9321 its equality to -1 not by it being negative.
9322 * remote-utils.c (remote_open): Likewise.
9323
d23b6cb1
PA
93242010-05-23 Pedro Alves <pedro@codesourcery.com>
9325
9326 * config.h: Regenerate.
9327
28d3cf85
MK
93282010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9329
9330 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9331 doesn't provide PTRACE_GET_THREAD_AREA.
9332
fea36a59
MK
93332010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9334
9335 * linux-m68k-low.c: Include <asm/ptrace.h>
9336 (ps_get_thread_area): Implement.
9337
24b066ba
DE
93382010-05-03 Doug Evans <dje@google.com>
9339
9340 * event-loop.c (struct callback_event): New struct.
9341 (callback_list): New global.
9342 (append_callback_event, delete_callback_event): New functions.
9343 (process_callback): New function.
9344 (start_event_loop): Call it.
9345 * remote-utils.c (NOT_SCHEDULED): Define.
9346 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9347 moved out of readchar.
9348 (readchar): Rewrite. Call reschedule before returning.
9349 (reset_readchar): New function.
9350 (remote_close): Call it.
9351 (process_remaining, reschedule): New functions.
9352 * server.h (callback_handler_func): New typedef.
9353 (append_callback_event, delete_callback_event): Declare.
9354
9836d6ea
PA
93552010-05-03 Pedro Alves <pedro@codesourcery.com>
9356
9357 * proc-service.c (ps_pglobal_lookup): Use
9358 thread_db_look_up_one_symbol.
9359 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9360 parameter. Use it instead of all_symbols_looked_up.
9361 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9362 field.
9363 (all_symbols_looked_up): Don't declare.
9364 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9365 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9366 field.
9367 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9368 Set all_symbols_looked_up here.
9369 (thread_db_look_up_one_symbol): New.
9370 (thread_db_get_tls_address): Adjust.
9371 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9372 thread_db object on the heap, and tentatively set it in the
9373 process structure.
9374 (thread_db_init): Don't set all_symbols_looked_up here.
9375 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9376
7984d532
PA
93772010-05-03 Pedro Alves <pedro@codesourcery.com>
9378
9379 * linux-low.c (linux_kill, linux_detach): Adjust.
9380 (status_pending_p_callback): Remove redundant statement. Check
9381 for !TARGET_WAITIKIND_IGNORE, instead of
9382 TARGET_WAITKIND_STOPPED.
9383 (handle_tracepoints): Make sure LWP is locked. Adjust.
9384 (linux_wait_for_event_1): Adjust.
9385 (linux_cancel_breakpoints): New.
9386 (unsuspend_one_lwp): New.
9387 (unsuspend_all_lwps): New.
9388 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9389 (send_sigstop_callback): Change return type to int, add new
9390 `except' parameter and handle it.
9391 (suspend_and_send_sigstop_callback): New.
9392 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9393 pass them down. If SUSPEND, also increment the lwp's suspend
9394 count.
9395 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9396 (need_step_over_p): Don't consider suspended LWPs.
9397 (start_step_over): Adjust.
9398 (proceed_one_lwp): Change return type to int, add new `except'
9399 parameter and handle it.
9400 (unsuspend_and_proceed_one_lwp): New.
9401 (proceed_all_lwps): Use find_inferior instead of
9402 for_each_inferior.
9403 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9404 also decrement the suspend count of LWPs. Pass `except' down,
9405 instead of hacking its suspend count.
9406 (linux_pause_all): Add `freeze' parameter. Adjust.
9407 (linux_unpause_all): New.
9408 (linux_target_ops): Install linux_unpause_all.
9409 * server.c (handle_status): Adjust.
9410 * target.h (struct target_ops): New fields `unpause_all' and
9411 `cancel_breakpoints'. Add new parameter to `pause_all'.
9412 (pause_all): Add new `freeze' parameter.
9413 (unpause_all): New.
9414 (cancel_breakpoints): New.
9415 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9416 cancel breakpoints.
9417 (cmd_qtstart): Pause threads.
9418 (stop_tracing): Pause threads, and cancel breakpoints.
9419 * win32-low.c (win32_target_ops): Adjust.
9420
e471f25b
PA
94212010-05-03 Pedro Alves <pedro@codesourcery.com>
9422
9423 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9424 the inferior right away from here...
9425 (linux_wait_1): ... to here, and adjust to check the thread's
9426 last_resume_kind instead of the lwp's step or stop_expected flags.
9427
1915ef4f
PA
94282010-05-02 Pedro Alves <pedro@codesourcery.com>
9429
9430 * README: Use consistent `GDB' and `GDBserver' spellings.
9431
f9e39928
PA
94322010-05-02 Pedro Alves <pedro@codesourcery.com>
9433
9434 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9435 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9436 (linux_detach_one_lwp): Assume the lwp is stopped.
9437 (any_thread_of): Delete.
9438 (linux_detach): Stop all lwps here. Don't blindly delete all
9439 breakpoints.
9440 (delete_lwp_callback): New.
9441 (linux_mourn): Delete all lwps of the process that is gone.
9442 (linux_wait_1): Don't delete the last lwp of the process here.
9443 * mem-break.h (mark_breakpoints_out): Declare.
9444 * mem-break.c (mark_breakpoints_out): New.
9445 (free_all_breakpoints): Use it.
9446 * server.c (handle_target_event): If the process is gone, mark
9447 breakpoints out.
9448 * thread-db.c (struct thread_db) <create_bp>: New field.
9449 (thread_db_enable_reporting): Fix prototype. Store a thread event
9450 breakpoint reference in the thread_db struct.
9451 (thread_db_load_search): Clear the thread_db object.
9452 (try_thread_db_load_1): Ditto.
9453 (switch_to_process): New.
9454 (disable_thread_event_reporting): Use it.
9455 (remove_thread_event_breakpoints): New.
9456 (thread_db_detach, thread_db_mourn): Use it.
9457
1e7fc18c
PA
94582010-05-01 Pedro Alves <pedro@codesourcery.com>
9459
9460 * linux-low.c (linux_enable_event_reporting): New.
9461 (linux_wait_for_event_1, handle_extended_wait): Use it.
9462
02fc4de7
PA
94632010-04-30 Pedro Alves <pedro@codesourcery.com>
9464
9465 * linux-low.c (linux_kill_one_lwp, linux_kill)
9466 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9467 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9468 SIGSTOP even if the LWP is stopped.
9469 (send_sigstop_callback): New.
9470 (stop_all_lwps): Use send_sigstop_callback instead.
9471 (linux_resume_one_thread): Adjust.
9472 (proceed_one_lwp): Still proceed an LWP that the client has
9473 requested to stop, if we haven't reported it as stopped yet. Make
9474 sure that LWPs the client want stopped, have a pending SIGSTOP.
9475
bc3b5632
DE
94762010-04-26 Doug Evans <dje@google.com>
9477
ae1ada35
DE
9478 * server.c (handle_general_set): Make static.
9479
bc3b5632
DE
9480 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9481 Print received char after testing for error/eof instead of before.
9482 (input_interrupt): Tweak comment.
9483
65730243
DE
94842010-04-23 Doug Evans <dje@google.com>
9485
9486 * server.c (start_inferior): Print inferior argv if --debug.
9487
a8ae7dc0
AR
94882010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9489
9490 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9491 * nto-x86-low.c: Include server.h
9492
1c07cc19
PM
94932010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9494
9495 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9496 be consistent with other sources of this directory.
9497 (init_registers_amd64): Correct name of source file of this function
9498 in the comment.
9499
e0a61e09
PM
95002010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9501
9502 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9503 64-bit executables.
9504
54709339
PM
95052010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9506
9507 * win32-i386-low.c: Add 64-bit support.
9508 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9509 (init_registers_amd64): Declare.
9510 (mappings): Add 64-bit version of array.
9511 (init_windows_x86): New function.
9512 (the_low_target): Change init_arch field to init_windows_x86.
9513
e8f0053d
PM
95142010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9515
9516 * win32-low.c: Adapt to support also 64-bit architecture.
9517 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9518 (get_image_name): Use SIZE_T type for local variable `done'.
9519 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9520 (toolhelp_get_dll_name): Idem.
9521 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9522 Use uintptr_t typecast to avoid warning.
9523 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9524 (handle_exception): Use phex_nz to avoid warning.
9525 (win32_wait): Remove unused local variable `process'.
9526
c481e77e
PM
95272010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9528
9529 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9530 `amd64-avx.o'.
9531
12ea4b69
PM
95322010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9533
9534 * configure.ac: Use `ws2_32' library for srv_mingw.
9535 * configure: Regenerate.
9536 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9537 * remote-utils.c: Likewise.
9538
f6d1620c
L
95392010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9540
9541 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9542 if __x86_64__ is defined.
9543
8e642873
PM
95442010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9545
9546 * configure: Regenerate.
9547
711e434b
PM
95482010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9549
9550 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9551 * target.h (target_ops): New get_tib_address field.
9552 * win32-low.h (win32_thread_info): Add thread_local_base field.
9553 * win32-low.c (child_add_thread): Add tlb argument.
9554 Set thread_local_base field to TLB.
9555 (get_child_debug_event): Adapt to child_add_thread change.
9556 (win32_get_tib_address): New function.
9557 (win32_target_ops): Set get_tib_address field to
9558 win32_get_tib_address.
9559 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9560
505106cd
PA
95612010-04-12 Pedro Alves <pedro@codesourcery.com>
9562
505106cd
PA
9563 * linux-low.c (linux_mourn): Also remove the process.
9564 * server.c (handle_target_event): Don't remove the process here.
9565 * nto-low.c (nto_mourn): New.
9566 (nto_target_ops): Install it.
9567 * spu-low.c (spu_mourn): New.
9568 (spu_target_ops): Install it.
9569 * win32-low.c (win32_mourn): New.
9570 (win32_target_ops): Install it.
9571
e8470a06
PA
95722010-04-12 Pedro Alves <pedro@codesourcery.com>
9573
9574 * server.h (buffer_xml_printf): Remove redundant `;'.
9575
45ba0d02
PA
95762010-04-12 Pedro Alves <pedro@codesourcery.com>
9577
9578 * regcache.c (set_register_cache): Invalidate regcaches before
9579 changing the register cache layout.
9580 (regcache_invalidate_one): Allow a NULL regcache.
9581 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9582 regcaches before changing the register cache layout or the target
9583 regsets.
9584
59e04013
L
95852010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9586
9587 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9588 variable warning on Linux/x86-64.
9589
8336d594
PA
95902010-04-11 Pedro Alves <pedro@codesourcery.com>
9591
9592 GDBserver disconnected tracing support.
9593
9594 * linux-low.c (linux_remove_process): Delete.
9595 (add_lwp): Don't set last_resume_kind here.
9596 (linux_kill): Use `mourn'.
9597 (linux_detach): Use `thread_db_detach', and `mourn'.
9598 (linux_mourn): New.
9599 (linux_attach_lwp_1): Adjust comment.
9600 (linux_attach): last_resume_kind moved the thread_info; adjust.
9601 (status_pending_p_callback): Adjust.
9602 (linux_wait_for_event_1): Adjust.
9603 (count_events_callback, select_singlestep_lwp_callback)
9604 (select_event_lwp_callback, cancel_breakpoints_callback)
9605 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9606 (proceed_one_lwp): Adjust.
9607 (linux_async): Add debug output.
9608 (linux_thread_stopped): New.
9609 (linux_pause_all): New.
9610 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9611 linux_pause_all.
9612 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9613 (thread_db_free): Delete declaration.
9614 (thread_db_detach, thread_db_mourn): Declare.
9615 * thread-db.c (thread_db_init): Use thread_db_mourn.
9616 (thread_db_free): Delete, split in two.
9617 (disable_thread_event_reporting): New.
9618 (thread_db_detach): New.
9619 (thread_db_mourn): New.
9620
9621 * server.h (struct thread_info) <last_resume_kind>: New field.
9622 <attached>: Add comment.
9623 <gdb_detached>: New field.
9624 (handler_func): Change return type to int.
9625 (handle_serial_event, handle_target_event): Ditto.
9626 (gdb_connected): Declare.
9627 (tracing): Delete.
9628 (disconnected_tracing): Declare.
9629 (stop_tracing): Declare.
9630
9631 * server.c (handle_query) <qSupported>: Report support for
9632 disconnected tracing.
9633 (queue_stop_reply_callback): Account for running threads.
9634 (gdb_wants_thread_stopped): New.
9635 (gdb_wants_all_threads_stopped): New.
9636 (gdb_reattached_process): New.
9637 (handle_status): Clear the `gdb_detached' flag of all processes.
9638 In all-stop, stop all threads.
9639 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9640 (process_serial_event): If the remote connection breaks, or if an
9641 exit was forced with "monitor exit", force an event loop exit.
9642 Handle disconnected tracing on detach.
9643 (handle_serial_event): Adjust.
9644 (handle_target_event): If GDB isn't connected, forward events back
9645 to the inferior, unless the last process exited, in which case,
9646 exit gdbserver. Adjust interface.
9647
9648 * remote-utils.c (remote_open): Don't block in accept. Instead
9649 register an event loop source on the listen socket file
9650 descriptor. Refactor bits into ...
9651 (listen_desc): ... this new global.
9652 (gdb_connected): ... this new function.
9653 (enable_async_notification): ... this new function.
9654 (handle_accept_event): ... this new function.
9655 (remote_close): Clear remote_desc.
9656
9657 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9658
9659 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9660 New fields.
9661 (mourn_inferior): Define.
9662 (target_process_qsupported): Avoid the dangling else problem.
9663 (thread_stopped): Define.
9664 (pause_all): Define.
9665 (target_waitstatus_to_string): Declare.
9666 * target.c (target_waitstatus_to_string): New.
9667
9668 * tracepoint.c (tracing): Make extern.
9669 (disconnected_tracing): New.
9670 (stop_tracing): Make extern. Handle tracing stops due to GDB
9671 disconnecting.
9672 (cmd_qtdisconnected): New.
9673 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9674 (handle_tracepoint_general_set): Handle QTDisconnected.
9675
9676 * event-loop.c (event_handler_func): Change return type to int.
9677 (process_event): Bail out if the event handler wants the event
9678 loop to stop.
9679 (handle_file_event): Ditto.
9680 (start_event_loop): Bail out if the event handler wants the event
9681 loop to stop.
9682
9683 * nto-low.c (nto_target_ops): Adjust.
9684 * spu-low.c (spu_wait): Don't remove the process here.
9685 (spu_target_ops): Adjust.
9686 * win32-low.c (win32_wait): Don't remove the process here.
9687 (win32_target_ops): Adjust.
9688
5d267c4c
PA
96892010-04-11 Pedro Alves <pedro@codesourcery.com>
9690
9691 * regcache.c (realloc_register_cache): Invalidate inferior's
9692 regcache before recreating it.
9693
623ccd72
PA
96942010-04-09 Pedro Alves <pedro@codesourcery.com>
9695
9696 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9697
219f2f23
PA
96982010-04-09 Stan Shebs <stan@codesourcery.com>
9699 Pedro Alves <pedro@codesourcery.com>
9700
9701 * server.h (LONGEST): New.
9702 (struct thread_info) <while_stepping>: New field.
9703 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9704 Declare.
9705 (initialize_tracepoint, handle_tracepoint_general_set)
9706 (handle_tracepoint_query, tracepoint_finished_step)
9707 (tracepoint_was_hit, release_while_stepping_state_list):
9708 (current_traceframe): Declare.
9709 * server.c (handle_general_set): Handle tracepoint packets.
9710 (read_memory): New.
9711 (write_memory): New.
9712 (handle_search_memory_1): Use read_memory.
9713 (handle_query): Report support for conditional tracepoints, trace
9714 state variables, and tracepoint sources. Handle tracepoint
9715 queries.
9716 (main): Initialize the tracepoints module.
9717 (process_serial_event): Handle traceframe reads/writes.
9718
9719 * linux-low.c (handle_tracepoints): New.
9720 (linux_wait_1): Call it.
9721 (linux_resume_one_lwp): Handle while-stepping.
9722 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9723 (linux_target_ops): Install them.
9724 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9725 New field.
9726 * linux-x86-low.c (x86_supports_tracepoints): New.
9727 (the_low_target). Install it.
9728
9729 * mem-break.h (delete_breakpoint): Declare.
9730 * mem-break.c (delete_breakpoint): Make external.
9731
9732 * target.h (struct target_ops): Add `supports_tracepoints',
9733 `read_pc', and `write_pc' fields.
9734 (target_supports_tracepoints): Define.
9735 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9736 (phex_nz): New.
9737
9738 * regcache.h (struct regcache) <registers_owned>: New field.
9739 (init_register_cache, regcache_cpy): Declare.
9740 (regcache_read_pc, regcache_write_pc): Declare.
9741 (register_cache_size): Declare.
9742 (supply_regblock): Declare.
9743 * regcache.c (init_register_cache): New.
9744 (new_register_cache): Use it.
9745 (regcache_cpy): New.
9746 (register_cache_size): New.
9747 (supply_regblock): New.
9748 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9749
219f2f23
PA
9750 * tracepoint.c: New.
9751
9752 * Makefile.in (OBS): Add tracepoint.o.
9753 (tracepoint.o): New rule.
9754
3a13a53b
L
97552010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9756
9757 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9758 (i386-mmx.o): New.
9759 (i386-mmx.c): Likewise.
9760 (i386-mmx-linux.o): Likewise.
9761 (i386-mmx-linux.c): Likewise.
9762
9763 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9764 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9765 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9766 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9767
9768 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9769 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9770 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9771
1570b33e
L
97722010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9773
9774 * Makefile.in (clean): Updated.
9775 (i386-avx.o): New.
9776 (i386-avx.c): Likewise.
9777 (i386-avx-linux.o): Likewise.
9778 (i386-avx-linux.c): Likewise.
9779 (amd64-avx.o): Likewise.
9780 (amd64-avx.c): Likewise.
9781 (amd64-avx-linux.o): Likewise.
9782 (amd64-avx-linux.c): Likewise.
9783
9784 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9785 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9786 (srv_amd64_regobj): Add amd64-avx.o.
9787 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9788 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9789 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9790 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9791 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9792 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9793 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9794
9795 * i387-fp.c: Include "i386-xstate.h".
9796 (i387_xsave): New.
9797 (i387_cache_to_xsave): Likewise.
9798 (i387_xsave_to_cache): Likewise.
9799 (x86_xcr0): Likewise.
9800
9801 * i387-fp.h (i387_cache_to_xsave): Likewise.
9802 (i387_xsave_to_cache): Likewise.
9803 (x86_xcr0): Likewise.
9804
9805 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9806 * linux-crisv32-low.c (target_regsets): Likewise.
9807 * linux-m68k-low.c (target_regsets): Likewise.
9808 * linux-mips-low.c (target_regsets): Likewise.
9809 * linux-ppc-low.c (target_regsets): Likewise.
9810 * linux-s390-low.c (target_regsets): Likewise.
9811 * linux-sh-low.c (target_regsets): Likewise.
9812 * linux-sparc-low.c (target_regsets): Likewise.
9813 * linux-xtensa-low.c (target_regsets): Likewise.
9814
9815 * linux-low.c: Include <sys/uio.h>.
9816 (regsets_fetch_inferior_registers): Support nt_type.
9817 (regsets_store_inferior_registers): Likewise.
9818 (linux_process_qsupported): New.
9819 (linux_target_ops): Add linux_process_qsupported.
9820
9821 * linux-low.h (regset_info): Add nt_type.
9822 (linux_target_ops): Add process_qsupported.
9823
9824 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9825 and <sys/uio.h>.
9826 (init_registers_i386_avx_linux): New.
9827 (init_registers_amd64_avx_linux): Likewise.
9828 (xmltarget_i386_linux_no_xml): Likewise.
9829 (xmltarget_amd64_linux_no_xml): Likewise.
9830 (PTRACE_GETREGSET): Likewise.
9831 (PTRACE_SETREGSET): Likewise.
9832 (x86_fill_xstateregset): Likewise.
9833 (x86_store_xstateregset): Likewise.
9834 (use_xml): Likewise.
9835 (x86_linux_update_xmltarget): Likewise.
9836 (x86_linux_process_qsupported): Likewise.
9837 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9838 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9839 init_registers_i386_linux here. Call
9840 x86_linux_update_xmltarget.
9841 (the_low_target): Add x86_linux_process_qsupported.
9842
9843 * server.c (handle_query): Call target_process_qsupported.
9844
9845 * target.h (target_ops): Add process_qsupported.
9846 (target_process_qsupported): New.
9847
fc7238bb
PA
98482010-04-03 Pedro Alves <pedro@codesourcery.com>
9849
9850 * inferiors.c (add_thread): Set last_status kind to
9851 TARGET_WAITKIND_IGNORE.
9852 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9853 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9854 (linux_wait_1): Move `thread' local definition to block that uses
9855 it. Don't NULL initialize `event_child'.
9856 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9857 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9858 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9859
bdabb078
PA
98602010-04-01 Pedro Alves <pedro@codesourcery.com>
9861
9862 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9863 an extended waitstatus, or by a watchpoint.
9864 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9865 thread was stepping or has been stopped by a watchpoint.
9866
d3bbe7a0
PA
98672010-04-01 Pedro Alves <pedro@codesourcery.com>
9868
9869 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9870 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9871 of another, then delete the previous, and validate all
9872 breakpoints.
9873 (validate_inserted_breakpoint): New.
9874 (delete_disabled_breakpoints): New.
9875 (validate_breakpoints): New.
9876 (check_mem_read): Validate breakpoints before trusting their
9877 shadow. Delete disabled breakpoints.
9878 (check_mem_write): Validate breakpoints before trusting they
9879 should be inserted. Delete disabled breakpoints.
9880 * mem-break.h (validate_breakpoints):
9881 * server.c (handle_query): Validate breakpoints when we see a
9882 qSymbol query.
9883
8b07ae33
PA
98842010-04-01 Pedro Alves <pedro@codesourcery.com>
9885
9886 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9887 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9888 if we could tell there's a GDB breakpoint at stop_pc.
9889 (need_step_over_p): Don't do a step over if we find a GDB
9890 breakpoint at the resume PC.
9891
9892 * mem-break.c (struct raw_breakpoint): New.
9893 (enum bkpt_type): New type `gdb_breakpoint'.
9894 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9895 fields. New field `raw'.
9896 (find_raw_breakpoint_at): New.
9897 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9898 breakpoint instead.
9899 (set_breakpoint_at): Adjust.
9900 (delete_raw_breakpoint): New.
9901 (release_breakpoint): New.
9902 (delete_breakpoint): Rename to...
9903 (delete_breakpoint_1): ... this. Add proc parameter. Use
9904 release_breakpoint. Return ENOENT.
9905 (delete_breakpoint): Reimplement.
9906 (find_breakpoint_at): Delete.
9907 (find_gdb_breakpoint_at): New.
9908 (delete_breakpoint_at): Delete.
9909 (set_gdb_breakpoint_at): New.
9910 (delete_gdb_breakpoint_at): New.
9911 (gdb_breakpoint_here): New.
9912 (set_reinsert_breakpoint): Use release_breakpoint.
9913 (uninsert_breakpoint): Rename to ...
9914 (uninsert_raw_breakpoint): ... this.
9915 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9916 (reinsert_raw_breakpoint): Change parameter type to
9917 raw_breakpoint.
9918 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9919 instead.
9920 (check_breakpoints): Adjust. Use release_breakpoint.
9921 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9922 (breakpoint_inserted_here): Ditto.
9923 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9924 Don't trust the breakpoint's shadow if it is not inserted.
9925 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9926 (delete_all_breakpoints): Adjust.
9927 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9928 use delete_breakpoint_1.
9929
9930 * mem-break.h (breakpoints_supported): Delete declaration.
9931 (set_gdb_breakpoint_at): Declare.
9932 (gdb_breakpoint_here): Declare.
9933 (delete_breakpoint_at): Delete.
9934 (delete_gdb_breakpoint_at): Declare.
9935
9936 * server.h (struct raw_breakpoint): Forward declare.
9937 (struct process_info): New field `raw_breakpoints'.
9938
9939 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9940 breakpoints.
9941
6bf5e0ba
PA
99422010-03-24 Pedro Alves <pedro@codesourcery.com>
9943
9944 * linux-low.c (status_pending_p_callback): Fix comment.
9945 (linux_wait_for_event_1): Move most of the internal breakpoint
9946 handling from here...
9947 (linux_wait_1): ... to here.
9948 (count_events_callback): New.
9949 (select_singlestep_lwp_callback): New.
9950 (select_event_lwp_callback): New.
9951 (cancel_breakpoints_callback): New.
9952 (select_event_lwp): New.
9953 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9954 priority to all LWPs that have had events that should be reported
9955 to the client. Cancel breakpoints when about to reporting the
9956 event to the client, not while stopping lwps. No longer cancel
9957 finished single-steps here.
9958 (cancel_finished_single_step): Delete.
9959 (cancel_finished_single_steps): Delete.
9960
414a389f
PA
99612010-03-24 Pedro Alves <pedro@codesourcery.com>
9962
9963 * mem-break.c (enum bkpt_type): New.
9964 (struct breakpoint): New field `type'.
9965 (set_breakpoint_at): Change return type to struct breakpoint
9966 pointer. Set type to `other_breakpoint' by default.
9967 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9968 in the breakpoint list.
9969 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9970 (reinsert_breakpoint): Rename to ...
9971 (reinsert_raw_breakpoint): ... this.
9972 (reinsert_breakpoints_at): Adjust.
9973 * mem-break.h (struct breakpoint): Declare.
9974 (set_breakpoint_at): Change return type to struct breakpoint
9975 pointer.
9976
2280c721
PA
99772010-03-24 Pedro Alves <pedro@codesourcery.com>
9978
9979 * server.c (handle_query): Assign, not compare.
9980
d50171e4
PA
99812010-03-24 Pedro Alves <pedro@codesourcery.com>
9982
9983 Teach linux gdbserver to step-over-breakpoints.
9984
9985 * linux-low.c (can_hardware_single_step): New.
9986 (supports_breakpoints): New.
9987 (handle_extended_wait): If stopping threads, read the stop pc of
9988 the new cloned LWP.
9989 (get_pc): New.
9990 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9991 low target doesn't support retrieving the PC.
9992 (add_lwp): Set last_resume_kind to resume_continue.
9993 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9994 (linux_attach): Don't clear stop_expected. Set the lwp's
9995 last_resume_kind to resume_stop.
9996 (linux_detach_one_lwp): Don't check for removed breakpoints.
9997 (check_removed_breakpoint): Delete.
9998 (status_pending_p): Rename to ...
9999 (status_pending_p_callback): ... this. Don't check for removed
10000 breakpoints. Don't consider threads that are stopped from GDB's
10001 perspective.
10002 (linux_wait_for_lwp): Always read the stop_pc here.
10003 (cancel_breakpoint): New.
10004 (step_over_bkpt): New global.
10005 (linux_wait_for_event_1): Implement stepping over breakpoints.
10006 (gdb_wants_lwp_stopped): New.
10007 (gdb_wants_all_stopped): New.
10008 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10009 single-step traps here. Store the thread's last reported target
10010 wait status.
10011 (send_sigstop): Don't clear stop_expected. Always set it,
10012 instead.
10013 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10014 (cancel_finished_single_step): New.
10015 (cancel_finished_single_steps): New.
10016 (wait_for_sigstop): Don't cancel finished single-step traps here.
10017 (linux_resume_one_lwp): Don't check for removed breakpoints.
10018 Don't set `step' on non-hardware step archs.
10019 (linux_set_resume_request): Ignore resume_stop requests if already
10020 stopping or stopped. Set the lwp's last_resume_kind.
10021 (resume_status_pending_p): Don't check for removed breakpoints.
10022 (need_step_over_p): New.
10023 (start_step_over): New.
10024 (finish_step_over): New.
10025 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10026 requests. Clear the thread's last reported target waitstatus.
10027 Don't use the `suspended' flag. Don't consider pending breakpoints.
10028 (linux_resume): Start a step-over if necessary.
10029 (proceed_one_lwp): New.
10030 (proceed_all_lwps): New.
10031 (unstop_all_lwps): New.
10032 * linux-low.h (struct lwp_info): Rewrite comment for the
10033 `suspended' flag. Add the `stop_pc' field. Delete the
10034 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10035 Add `'last_resume_kind' and `need_step_over' fields.
10036 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10037 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10038 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10039 (set_raw_breakpoint_at): New.
10040 (set_breakpoint_at): Rewrite to use it.
10041 (reinsert_breakpoint_handler): Delete.
10042 (set_reinsert_breakpoint): New.
10043 (reinsert_breakpoint_by_bp): Delete.
10044 (delete_reinsert_breakpoints): New.
10045 (uninsert_breakpoint): Rewrite.
10046 (uninsert_breakpoints_at): New.
10047 (reinsert_breakpoint): Rewrite.
10048 (reinsert_breakpoints_at): New.
10049 (check_breakpoints): Rewrite.
10050 (breakpoint_here): New.
10051 (breakpoint_inserted_here): New.
10052 (check_mem_read): Adjust.
10053 * mem-break.h (breakpoints_supported, breakpoint_here)
10054 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10055 (reinsert_breakpoint_by_bp): Delete declaration.
10056 (delete_reinsert_breakpoints): Declare.
10057 (reinsert_breakpoint): Delete declaration.
10058 (reinsert_breakpoints_at): Declare.
10059 (uninsert_breakpoint): Delete declaration.
10060 (uninsert_breakpoints_at): Declare.
10061 (check_breakpoints): Adjust prototype.
10062 * server.h: Adjust include order.
10063 (struct thread_info): Declare here. Add a `last_status' field.
10064
30ba68cb
MS
100652010-03-23 Michael Snyder <msnyder@vmware.com>
10066
10067 * server.c (crc32): New function.
10068 (handle_query): Add handling for 'qCRC:' request.
10069
b9a881c2
PA
100702010-03-23 Pedro Alves <pedro@codesourcery.com>
10071
10072 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10073 lwp had been stopped by a watchpoint.
10074
e92d13d5
PA
100752010-03-16 Pedro Alves <pedro@codesourcery.com>
10076
10077 * server.h (internal_error): Declare.
10078 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10079 * utils.c (internal_error): New function.
10080
64daa791
AS
100812010-03-15 Andreas Schwab <schwab@redhat.com>
10082
10083 * configure.srv: Fix typo setting srv_regobj.
10084
f52cd8cd
PA
100852010-03-15 Pedro Alves <pedro@codesourcery.com>
10086
10087 * linux-low.c (fetch_register): Avoid passing a non string literal
10088 format to `error'.
10089 (usr_store_inferior_registers): Ditto.
10090
93ae6fdc
PA
100912010-03-14 Pedro Alves <pedro@codesourcery.com>
10092
10093 * linux-low.c (linux_write_memory): Bail out early if peeking
10094 memory failed.
10095
c3adc08c
PA
100962010-03-14 Pedro Alves <pedro@codesourcery.com>
10097
10098 * linux-low.h (struct lwp_info): New fields
10099 `stopped_by_watchpoint' and `stopped_data_address'.
10100 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10101 here, and cache them in the lwp object.
10102 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10103 directly.
10104 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10105 field.
10106 (linux_stopped_by_watchpoint): Rewrite.
10107 (linux_stopped_data_address): Rewrite.
10108
bce522a2
PA
101092010-03-06 Simo Melenius <simo.melenius@iki.fi>
10110
10111 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10112 switching the current inferior, not before.
10113
90884b2b
L
101142010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10115
10116 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10117 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10118 i386-linux.c and amd64-linux.c.
10119 (reg-i386.o): Removed.
10120 (reg-i386.c): Likewise.
10121 (reg-i386-linux.o): Likewise.
10122 (reg-i386-linux.c): Likewise.
10123 (reg-x86-64.o): Likewise.
10124 (reg-x86-64.c): Likewise.
10125 (reg-x86-64-linux.o): Likewise.
10126 (reg-x86-64-linux.c): Likewise.
10127 (i386.o): New.
10128 (i386.c): Likewise.
10129 (i386-linux.o): Likewise.
10130 (i386-linux.c): Likewise.
10131 (amd64.o): Likewise.
10132 (amd64.c): Likewise.
10133 (amd64-linux.o): Likewise.
10134 (amd64-linux.c): Likewise.
10135
10136 * configure.srv (srv_i386_regobj): New.
10137 (srv_i386_linux_regobj): Likewise.
10138 (srv_amd64_regobj): Likewise.
10139 (srv_amd64_linux_regobj): Likewise.
10140 (srv_i386_32bit_xmlfiles): Likewise.
10141 (srv_i386_64bit_xmlfiles): Likewise.
10142 (srv_i386_xmlfiles): Likewise.
10143 (srv_amd64_xmlfiles): Likewise.
10144 (srv_i386_linux_xmlfiles): Likewise.
10145 (srv_amd64_linux_xmlfiles): Likewise.
10146 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10147 srv_xmlfiles to $srv_i386_xmlfiles.
10148 (i[34567]86-*-mingw32ce*): Likewise.
10149 (i[34567]86-*-mingw*): Likewise.
10150 (i[34567]86-*-nto*): Likewise.
10151 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10152 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10153 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10154 (x86_64-*-linux*): Likewise.
10155
10156 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10157 (init_registers_amd64_linux): New.
10158 (x86_arch_setup): Replace init_registers_x86_64_linux with
10159 init_registers_amd64_linux.
10160
193f13e6
MK
101612010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10162
10163 * configure.ac: Check for libdl. If it is not available link against
10164 static libthread_db.
10165 * configure: Regenerate.
10166
85d721b8
PA
101672010-02-22 Pedro Alves <pedro@codesourcery.com>
10168
10169 PR9605
10170
10171 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10172 handing a read watchpoint.
10173 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10174
6076632b
DE
101752010-02-12 Doug Evans <dje@google.com>
10176
10177 * linux-low.c (linux_supports_tracefork_flag): Document.
10178 (linux_look_up_symbols): Add comment.
10179
3327ccf7
L
101802010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10181
10182 * regcache.c (supply_register): Clear regcache if buf is NULL.
10183
0718675c 101842010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10185 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10186
10187 * inferiors.c (find_inferior): Add function documentation.
10188 (unloaded_dll): Handle the case where the unloaded dll has not
10189 been previously registered in the dll list.
10190
177321bd
DJ
101912010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10192
10193 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10194 (thumb2_breakpoint): New.
10195 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10196
2b009048
DJ
101972010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10198
10199 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10200 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10201 breakpoints.
10202
3be029c7
PA
102032010-01-21 Pedro Alves <pedro@codesourcery.com>
10204
10205 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10206
18f5de3b
JK
102072010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10208
10209 * linux-s390-low.c (s390_collect_ptrace_register)
10210 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10211
3743bb4f
DE
102122010-01-21 Doug Evans <dje@google.com>
10213
14ce3065
DE
10214 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10215 (PTRACE_ARG4_TYPE): New macro.
10216 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10217 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10218 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10219 (usr_store_inferior_registers): Ditto.
10220 (linux_read_memory, linux_write_memory): Ditto.
10221 (linux_test_for_tracefork): Ditto.
10222
3743bb4f
DE
10223 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10224 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10225
8b315be5
PA
102262010-01-21 Pedro Alves <pedro@codesourcery.com>
10227
10228 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10229 target.
10230
85492558
PA
102312010-01-21 Pedro Alves <pedro@codesourcery.com>
10232
10233 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10234 prototype to take a regcache. Adjust.
10235
442ea881
PA
102362010-01-20 Pedro Alves <pedro@codesourcery.com>
10237
10238 * regcache.h (struct thread_info): Forward declare.
10239 (struct regcache): New.
10240 (new_register_cache): Adjust prototype.
10241 (get_thread_regcache): Declare.
10242 (free_register_cache): Adjust prototype.
10243 (registers_to_string, registers_from_string): Ditto.
10244 (supply_register, supply_register_by_name, collect_register)
10245 (collect_register_as_string, collect_register_by_name): Ditto.
10246 * regcache.c (struct inferior_regcache_data): Delete.
10247 (get_regcache): Rename to ...
10248 (get_thread_regcache): ... this. Adjust. Switch inferior before
10249 fetching registers.
10250 (regcache_invalidate_one): Adjust.
10251 (regcache_invalidate): Fix prototype.
10252 (new_register_cache): Return the new register cache.
10253 (free_register_cache): Change prototype.
10254 (realloc_register_cache): Adjust.
10255 (registers_to_string): Change prototype to take a regcache. Adjust.
10256 (registers_from_string): Ditto.
10257 (register_data): Ditto.
10258 (supply_register): Ditto.
10259 (supply_register_by_name): Ditto.
10260 (collect_register): Ditto.
10261 (collect_register_as_string): Ditto.
10262 (collect_register_by_name): Ditto.
10263 * server.c (process_serial_event): Adjust.
10264 * linux-low.h (regset_fill_func, regset_store_func): Change
10265 prototype.
10266 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10267 Change prototype.
10268 * linux-low.c (get_stop_pc): Adjust.
10269 (check_removed_breakpoint): Adjust.
10270 (linux_wait_for_event): Adjust.
10271 (linux_resume_one_lwp): Adjust.
10272 (fetch_register): Add regcache parameter. Adjust.
10273 (usr_store_inferior_registers): Ditto.
10274 (regsets_fetch_inferior_registers): Ditto.
10275 (regsets_store_inferior_registers): Ditto.
10276 (linux_fetch_registers, linux_store_registers): Ditto.
10277 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10278 regcache. Adjust.
43aaf8b6
PA
10279 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10280 Ditto.
442ea881
PA
10281 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10282 prototype to take a regcache.
10283 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10284 * remote-utils.c (convert_ascii_to_int, outreg)
10285 (prepare_resume_reply): Change prototype to take a regcache.
10286 Adjust.
10287 * target.h (struct target_ops) <fetch_registers, store_registers>:
10288 Change prototype to take a regcache.
10289 (fetch_inferior_registers, store_inferior_registers): Change
10290 prototype to take a regcache. Adjust.
10291 * proc-service.c (ps_lgetregs): Adjust.
10292 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10293 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10294 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10295 take a regcache. Adjust.
10296 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10297 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10298 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10299 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10300 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10301 (cris_cannot_fetch_register):
10302 (cris_breakpoint_at): Change prototype to take a regcache.
10303 Adjust.
10304 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10305 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10306 to take a regcache. Adjust.
10307 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10308 Adjust.
10309 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10310 take a regcache. Adjust.
10311 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10312 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10313 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10314 * linux-mips-low.c (mips_get_pc):
10315 (mips_set_pc): Change prototype to take a regcache. Adjust.
10316 (mips_reinsert_addr): Adjust.
10317 (mips_collect_register): Change prototype to take a regcache.
10318 Adjust.
10319 (mips_supply_register):
10320 (mips_collect_register_32bit, mips_supply_register_32bit)
10321 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10322 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10323 * linux-ppc-low.c (ppc_supply_ptrace_register)
10324 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10325 (parse_spufs_run): Adjust.
10326 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10327 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10328 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10329 take a regcache. Adjust.
10330 * linux-s390-low.c (s390_collect_ptrace_register)
10331 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10332 (s390_set_pc): Change prototype to take a regcache. Adjust.
10333 (s390_arch_setup): Adjust.
10334 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10335 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10336 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10337 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10338 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10339 regcache. Adjust.
10340 (sparc_breakpoint_at): Adjust.
10341 * linux-xtensa-low.c (xtensa_fill_gregset):
10342 (xtensa_store_gregset):
10343 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10344 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10345 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10346 prototype to take a regcache. Adjust.
10347 * win32-arm-low.c (arm_fetch_inferior_register)
10348 (arm_store_inferior_register): Change prototype to take a
10349 regcache. Adjust.
10350 * win32-i386-low.c (i386_fetch_inferior_register)
10351 (i386_store_inferior_register): Change prototype to take a
10352 regcache. Adjust.
10353 * win32-low.c (child_fetch_inferior_registers)
10354 (child_store_inferior_registers): Change prototype to take a
10355 regcache. Adjust.
10356 (win32_wait): Adjust.
10357 (win32_fetch_inferior_registers): Change prototype to take a
10358 regcache. Adjust.
10359 (win32_store_inferior_registers): Adjust.
10360 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10361 store_inferior_register>: Change prototype to take a regcache.
10362
60c3d7b0
DE
103632010-01-20 Doug Evans <dje@google.com>
10364
10365 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10366 #ifdef.
10367 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10368 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10369
dc146f7c
VP
103702010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10371
10372 * linux-low.c (linux_core_of_thread): New.
10373 (compare_ints, show_process, list_threads): New.
10374 (linux_qxfer_osdata): Report threads and cores.
10375 (linux_target_op): Register linux_core_of_thread.
10376 * remote-utils.c (prepare_resume_reply): Report the core.
10377 (buffer_xml_printf): Support %d specifier.
10378 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10379 New.
10380 (handle_query): Handle qXfer:threads. Announce availability
10381 thereof.
10382 * target.h (struct target_ops): New field core_of_thread.
10383
7803799a
UW
103842010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10385
10386 * Makefile.in (clean): Remove new generated files.
10387 (reg-s390.o, reg-s390.c): Remove rules.
10388 (reg-s390x.o, reg-s390x.c): Likewise.
10389 (s390-linux32.o, s390-linux32.c): Add rules.
10390 (s390-linux64.o, s390-linux64.c): Likewise.
10391 (s390x-linux64.o, s390x-linux64.c): Likewise.
10392 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10393 * linux-s390-low.c: Include <elf.h>.
10394 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10395 (init_registers_s390): Remove prototype.
10396 (init_registers_s390x): Likewise.
10397 (init_registers_s390_linux32): Add prototype.
10398 (init_registers_s390_linux64): Likewise.
10399 (init_registers_s390x_linux64): Likewise.
10400 (s390_num_regs_3264): New define.
10401 (s390_regmap_3264): New global variable.
10402 (s390_cannot_fetch_register): Remove obsolete check.
10403 (s390_cannot_store_register): Likewise.
10404 (s390_collect_ptrace_register): Handle upper/lower register halves.
10405 (s390_supply_ptrace_register): Likewise.
10406 (s390_fill_gregset): Update to register number changes.
10407 (s390_get_hwcap): New routine.
10408 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10409 Install appropriate regmap and register set.
10410
6e7ffa39
JB
104112010-01-01 Joel Brobecker <brobecker@adacore.com>
10412
10413 * server.c (gdbserver_version): Update copyright year to 2010.
10414 * gdbreplay.c (gdbreplay_version): Likewise.
10415
957f3f49
DE
104162009-12-28 Doug Evans <dje@google.com>
10417
10418 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10419 elf/external.h. Include <elf.h> instead but only if necessary.
10420
ca5c370d
PA
104212009-12-28 Pedro Alves <pedro@codesourcery.com>
10422
10423 * linux-low.c (linux_remove_process): Remove `detaching'
10424 parameter. Don't release/detach from thread_db here.
10425 (linux_kill): Release/detach from thread_db here, ...
10426 (linux_detach): ... and here, before actually detaching.
10427 (linux_wait_1): ... and here, when a process exits.
10428 * thread-db.c (any_thread_of): New.
10429 (thread_db_free): Switch the current inferior to a thread of the
10430 passed in process.
10431
4ee62156
DE
104322009-12-21 Doug Evans <dje@google.com>
10433
d90e6a88
DE
10434 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10435
c5f62d5f
DE
10436 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10437 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10438 warning ifndef __NR_tkill. Move setting of errno there too.
10439 Delete unnecessary resetting of errno after syscall.
10440 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10441
10e86dd7
DE
10442 * configure.ac: Check for dladdr.
10443 * config.in: Regenerate.
10444 * configure: Regenerate.
10445 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10446 (try_thread_db_load): Update.
10447
4ee62156
DE
10448 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10449
00f515da
DE
104502009-12-18 Doug Evans <dje@google.com>
10451
e9464885
DE
10452 * event-loop.c: Include unistd.h if it exists.
10453
07d4f67e
DE
10454 * linux-low.c (my_waitpid): Move definition away from being in
10455 between linux_tracefork_child/linux_test_for_tracefork.
10456
00f515da
DE
10457 * gdb_proc_service.h (psaddr_t): Fix type.
10458 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10459 signature to match glibc.
10460
1de1badb
DE
104612009-12-16 Doug Evans <dje@google.com>
10462
10463 * linux-low.c (linux_read_memory): Fix argument to read.
10464
aeeb81d1
PA
104652009-11-26 Pedro Alves <pedro@codesourcery.com>
10466
10467 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10468 events, don't leave current_inferior pointing at null.
10469
10357975
PA
104702009-11-26 Pedro Alves <pedro@codesourcery.com>
10471
10472 * win32-low.c (LOG): Delete.
10473 (OUTMSG): Output to stderr.
10474 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10475 on compile time LOG macro.
10476 (win32_wait): Fix debug output.
10477
cf6e3471
PA
104782009-11-26 Pedro Alves <pedro@codesourcery.com>
10479
10480 * win32-low.c (win32_add_one_solib): If the dll name is
10481 "ntdll.dll", prepend the system directory to the dll path.
10482
0c85e18e
MK
104832009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10484
10485 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10486
9ac544ce 104872009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 10488 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
10489
10490 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10491 * configure.ac: Check for __mcoldfire__ and set
10492 gdb_cv_m68k_is_coldfire.
10493 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10494 reg-cf.o and reg-m68k.o.
10495 * configure: Regenerated.
10496
fd7dd3e6
PA
104972009-11-16 Pedro Alves <pedro@codesourcery.com>
10498
10499 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10500 Pass it to thread_db_free.
10501 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10502 proper `detaching' argument to linux_remove_process.
10503 * linux-low.h (thread_db_free): Add `detaching' parameter.
10504 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10505 to thread_db_free.
10506 (thread_db_free): Add `detaching' parameter. Only
10507 call td_ta_clear_event if detaching from process.
10508
75aa492e
MK
105092009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10510
10511 * thread-db.c (thread_db_free): Fix typo.
10512
21e1bee4
PP
105132009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10514
10515 PR gdb/10838
10516 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10517
8838b45e
NS
105182009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10519
10520 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10521 with an i686 compiler.
10522 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10523 needed.
10524 * configure: Rebuilt.
10525
8a35fb51
SL
105262009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10527
10528 PR gdb/10783
10529
10530 * server.c (handle_search_memory_1): Correct read_addr initialization
10531 in loop for searching subsequent chunks.
10532
96f15937
PP
105332009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10534
10535 * configure.ac: New --with-libthread-db option.
10536 * thread-db.c: Allow direct dependence on libthread_db.
10537 (thread_db_free): Adjust.
10538 * config.in: Regenerate.
10539 * configure: Likewise.
889bf7c5 10540
5f7d1694
PP
105412009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10542
10543 PR gdb/10757
10544 * thread-db.c (attach_thread): New function.
10545 (maybe_attach_thread): Return success/failure.
10546 (find_new_threads_callback): Adjust.
889bf7c5
PA
10547 (thread_db_find_new_threads): Loop until no new threads.
10548
88e3b899
PA
105492009-10-13 Pedro Alves <pedro@codesourcery.com>
10550
10551 * proc-service.c (ps_lgetregs): Formatting.
10552
cdbfd419
PP
105532009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10554
10555 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10556 * configure.ac: Adjust.
10557 * linux-low.h (struct process_info_private): Move members to struct
10558 thread_db.
10559 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10560 * linux-low.c (linux_remove_process): Adjust.
10561 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10562 * server.c (handle_query): Move code ...
10563 (handle_monitor_command): ... here. New function.
10564 * target.h (struct target_ops): New member.
10565 * thread-db.c (struct thread_db): New.
10566 (libthread_db_search_path): New variable.
10567 (thread_db_create_event, thread_db_enable_reporting)
10568 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10569 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10570 (try_thread_db_load_1, dladdr_to_soname): New functions.
10571 (try_thread_db_load, thread_db_load_search): New functions.
10572 (thread_db_init): Search for libthread_db.
10573 (thread_db_free): New function.
10574 (thread_db_handle_monitor_command): Likewise.
10575 * config.in: Regenerate.
10576 * configure: Regenerate.
889bf7c5 10577
4168d2d6
UW
105782009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10579
10580 * spu-low.c (spu_kill): Wait for inferior to terminate.
10581 Call clear_inferiors.
10582 (spu_detach): Call clear_inferiors.
10583
81ecdfbb
RW
105842009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10585
10586 * aclocal.m4: Regenerate.
10587 * config.in: Likewise.
10588 * configure: Likewise.
10589
0b9ff2c0
UW
105902009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10591
10592 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10593 (parse_spufs_run): New function.
10594 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10595 (ppc_breakpoint_at): Handle SPU breakpoints.
10596
efcbbd14
UW
105972009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10598
10599 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10600 (SPUFS_MAGIC): Define.
10601 (spu_enumerate_spu_ids): New function.
10602 (linux_qxfer_spu): New function.
10603 (linux_target_ops): Install linux_qxfer_spu.
10604
f4d9bade
UW
106052009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10606
10607 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10608 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10609 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10610 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10611 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10612 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10613 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10614 (init_registers_powerpc_cell32l): Add prototype.
10615 (init_registers_powerpc_cell64l): Likewise.
10616 (ppc_arch_setup): Detect Cell/B.E. architecture.
10617
96e946ca
RW
106182009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10619
10620 * Makefile.in (datarootdir): New variable.
10621
58d6951d
DJ
106222009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10623
10624 * linux-low.c (linux_write_memory): Update debugging output.
10625 * Makefile.in (clean): Add new descriptions.
10626 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10627 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10628 * configure.srv: Add new files for arm*-*-linux*.
10629 * linux-arm-low.c: Add new declarations.
10630 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10631 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10632 (HWCAP_VFPv3D16): New.
10633 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10634 instead of __IWMMXT__.
10635 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10636 (arm_arch_setup): New.
10637 (target_regsets): Remove #ifdef. Add VFP regset.
10638 (the_low_target): Use arm_arch_setup.
10639
12b42a12
DJ
106402009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10641
10642 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10643 the main thread again.
10644
ac8c974e
AR
106452009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10646
10647 Adding Neutrino gdbserver.
10648 * configure: Regenerated.
10649 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10650 * configure.srv (i[34567]86-*-nto*): New target.
10651 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10652 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10653 (nto_comctrl) [__QNX__]: New function.
10654 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10655
4424e0c3 106562009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
10657
10658 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10659 srv_tgtobj.
10660
912cf4ba
PA
106612009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10662 Pedro Alves <pedro@codesourcery.com>
10663
10664 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10665 don't support CONTEXT_EXTENDED_REGISTERS.
10666 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10667 (the_low_target): Install them.
10668 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10669 failing with ERROR_PIPE_NOT_CONNECTED.
10670
aa5ca48f
DE
106712009-06-30 Doug Evans <dje@google.com>
10672 Pierre Muller <muller@ics.u-strasbg.fr>
10673
10674 Add h/w watchpoint support to x86-linux, win32-i386.
10675 * Makefile.in (SFILES): Add i386-low.c
10676 (i386_low_h): Define.
10677 (i386-low.o): Add dependencies.
10678 (linux-x86-low.o): Add i386-low.h dependency.
10679 (win32-i386-low.o): Ditto.
10680 * i386-low.c: New file.
10681 * i386-low.h: New file.
10682 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10683 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10684 * linux-low.c (linux_add_process): Initialize arch_private.
10685 (linux_remove_process): Free arch_private.
10686 (add_lwp): Initialize arch_private.
10687 (delete_lwp): Free arch_private.
10688 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10689 provided.
10690 * linux-low.h (process_info_private): New member arch_private.
10691 (lwp_info): New member arch_private.
10692 (linux_target_ops): New members new_process, new_thread,
10693 prepare_to_resume.
10694 (ptid_of): New macro.
10695 * linux-x86-low.c: Include stddef.h, i386-low.h.
10696 (arch_process_info): New struct.
10697 (arch_lwp_info): New struct.
10698 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10699 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10700 (i386_dr_low_get_status): New function.
10701 (x86_insert_point, x86_remove_point): New functions.
10702 (x86_stopped_by_watchpoint): New function.
10703 (x86_stopped_data_address): New function.
10704 (x86_linux_new_process, x86_linux_new_thread): New functions.
10705 (x86_linux_prepare_to_resume): New function.
10706 (the_low_target): Add entries for insert_point, remove_point,
10707 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10708 prepare_to_resume.
10709 * server.c (debug_hw_points): New global.
10710 (monitor_show_help): Document set debug-hw-points.
10711 (handle_query): Process "set debug-hw-points".
10712 * server.h (debug_hw_points): Declare.
10713 (paddress): Declare.
10714 * utils.c (NUMCELLS, CELLSIZE): New macros.
10715 (get_sell, xsnprintf, paddress): New functions.
10716 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10717 remove_point, stopped_by_watchpoint, stopped_data_address.
10718 * win32-i386-low.c: Include i386-low.h.
10719 (debug_reg_state): Replaces dr.
10720 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10721 (i386_dr_low_get_status): New function.
10722 (i386_insert_point, i386_remove_point): New functions.
10723 (i386_stopped_by_watchpoint): New function.
10724 (i386_stopped_data_address): New function.
10725 (i386_initial_stuff): Update.
10726 (get_thread_context,set_thread_context,i386_thread_added): Update.
10727 (the_low_target): Add entries for insert_point,
10728 remove_point, stopped_by_watchpoint, stopped_data_address.
10729 * win32-low.c (win32_insert_watchpoint): New function.
10730 (win32_remove_watchpoint): New function.
10731 (win32_stopped_by_watchpoint): New function.
10732 (win32_stopped_data_address): New function.
10733 (win32_target_ops): Add entries for insert_watchpoint,
10734 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10735 * win32-low.h (win32_target_ops): New members insert_point,
10736 remove_point, stopped_by_watchpoint, stopped_data_address.
10737
d993e290
PA
107382009-06-25 Pedro Alves <pedro@codesourcery.com>
10739
10740 * server.c (process_serial_event): Re-return unsupported, not
10741 error, if the type isn't recognized. Re-allow supporting only
10742 insert or remove packets. Also call require_running for
10743 breakpoints. Add missing break statement to default case. Tidy.
10744 * target.h (struct target_ops): Rename insert_watchpoint to
10745 insert_point, and remove_watchpoint to remove_point.
10746
10747 * linux-low.h (struct linux_target_ops): Likewise.
10748 * linux-low.c (linux_insert_watchpoint): Rename to ...
10749 (linux_insert_point): ... this. Adjust.
10750 (linux_remove_watchpoint): Rename to ...
10751 (linux_remove_point): ... this. Adjust.
10752 (linux_target_ops): Adjust.
10753 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10754 (cris_insert_point): ... this.
10755 (cris_remove_watchpoint): Rename to ...
10756 (cris_remove_point): ... this.
10757 (the_low_target): Adjust.
10758
0f54c268
PM
107592009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10760
10761 * server.c (handle_v_kill): Pass signal_pid to
10762 kill_inferior if multi_process is zero.
10763
c6314022
AR
107642009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10765
10766 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10767 * target.h (target_ops): Comment for *_watchpoint to make it clear
10768 the functions can get types '0' and '1'.
10769
4463ce24
AR
107702009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10771
10772 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10773 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10774 * regcache.c (get_regcache): Likewise.
10775 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10776 * win32-low.c (child_fetch_inferior_registers): Remove check for
10777 regno 0.
10778
cf8fd78b
PA
107792009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10780 Pedro Alves <pedro@codesourcery.com>
10781
10782 * target.h (struct target_ops) <supports_multi_process>: New
10783 callback.
10784 (target_supports_multi_process): New.
10785 * server.c (handle_query): Even if GDB reports support, only
10786 enable multi-process if the target also supports it. Report
10787 multi-process support only if the target backend supports it.
10788 * linux-low.c (linux_supports_multi_process): New function.
10789 (linux_target_ops): Install it as target_supports_multi_process
10790 callback.
10791
47c0c975
DE
107922009-05-24 Doug Evans <dje@google.com>
10793
e09875d4
DE
10794 Global renaming of find_thread_pid to find_thread_ptid.
10795 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10796 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10797 All callers updated.
10798
e27d73f6
DE
10799 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10800 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10801 directly.
10802
47c0c975
DE
10803 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10804 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10805 (linux_resume_one_lwp): Ditto.
10806
2acc282a
DE
108072009-05-23 Doug Evans <dje@google.com>
10808
10809 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10810 from struct inferior_list_entry * to struct lwp_info *.
10811 All callers updated.
10812
9f1036c1
DE
108132009-05-13 Doug Evans <dje@google.com>
10814
10815 * linux-x86-low.c: Don't include assert.h.
10816 (x86_siginfo_fixup): Use fatal, not assert.
10817 (x86_arch_setup): Fix comment.
10818
d0722149
DE
108192009-05-12 Doug Evans <dje@google.com>
10820
10821 Biarch support for i386/amd64 gdbserver.
10822 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10823 Add linux-x86-low.c.
10824 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10825 (linux-x86-low.o): Add.
10826 * linux-x86-64-low.c: Delete.
10827 * linux-i386-low.c: Delete.
10828 * linux-x86-low.c: New file.
10829 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10830 linux-x86-low.o.
10831 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10832 linux-x86-low.o.
10833 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10834 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10835 (linux_child_pid_to_exec_file): New function.
10836 (elf_64_header_p, elf_64_file_p): New functions.
10837 (siginfo_fixup): New function.
10838 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10839 give target a chance to convert layout.
10840 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10841 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10842
fdeb2a12
DE
108432009-05-07 Doug Evans <dje@google.com>
10844
10845 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10846 (regsets_store_inferior_registers): Ditto.
10847
a6dbe5df
PA
108482009-05-06 Pedro Alves <pedro@codesourcery.com>
10849
10850 PR server/10048
10851
10852 * linux-low.c (must_set_ptrace_flags): Delete.
10853 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10854 of the global.
10855 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10856 `lwp->must_set_ptrace_flags' instead.
ba42693b 10857 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10858 (linux_wait_1): ... not here.
10859
5091eb23
DE
108602009-04-30 Doug Evans <dje@google.com>
10861
9f767825
DE
10862 * inferiors.c (started_inferior_callback): New function.
10863 (attached_inferior_callback): New function.
10864 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10865 * server.c (print_started_pid, print_attached_pid): New functions.
10866 (detach_or_kill_for_exit): New function.
10867 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10868 * server.h (have_started_inferiors_p): Declare.
10869 (have_attached_inferiors_p): Declare.
10870
5091eb23
DE
10871 * inferiors.c (remove_process): Fix memory leak, free process.
10872 * linux-low.c (linux_remove_process): New function.
10873 (linux_kill): Call it instead of remove_process.
10874 (linux_detach, linux_wait_1): Ditto.
10875
155c8968
PA
108762009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10877
10878 * configure.srv: Add x86 Windows CE target.
10879
7fe519cb
UW
108802009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10881
10882 * inferiors.c (get_thread_process): Make global.
10883 * server.h (get_thread_process): Add prototype.
10884 * thread-db.c (find_one_thread): Use get_thread_process
10885 instead of current_process.
10886 (thread_db_get_tls_address): Do not crash if called when
10887 thread layer is not yet initialized.
10888
5472f405
UW
108892009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10890
10891 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10892 * spu-low.c (current_tid): Rename to ...
10893 (current_ptid): ... this.
10894 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10895 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10896 ptid_get_lwp (current_ptid) instead of current_tid.
10897 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10898 instead of current_tid. Use find_process_pid to verify pid
10899 argument is valid. Pass proper argument to remove_process.
10900 (spu_thread_alive): Compare current_ptid instead of current_tid.
10901 (spu_resume): Likewise.
10902
55ac2b99
PA
109032009-04-02 Pedro Alves <pedro@codesourcery.com>
10904
10905 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10906 variable.
10907
95954743
PA
109082009-04-01 Pedro Alves <pedro@codesourcery.com>
10909
10910 Implement the multiprocess extensions, and add linux multiprocess
10911 support.
10912
10913 * server.h (ULONGEST): Declare.
10914 (struct ptid, ptid_t): New.
10915 (minus_one_ptid, null_ptid): Declare.
10916 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10917 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10918 (struct inferior_list_entry): Change `id' type from unsigned from
10919 to ptid_t.
10920 (struct sym_cache, struct breakpoint, struct
10921 process_info_private): Forward declare.
10922 (struct process_info): Declare.
10923 (current_process): Declare.
10924 (all_processes): Declare.
10925 (initialize_inferiors): Declare.
10926 (add_thread): Adjust to use ptid_t.
10927 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10928 (add_process, remove_process, find_thread_pid): Declare.
10929 (find_inferior_id): Adjust to use ptid_t.
10930 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10931 (multi_process): Declare.
10932 (push_event): Adjust to use ptid_t.
10933 (read_ptid, write_ptid): Declare.
10934 (prepare_resume_reply): Adjust to use ptid_t.
10935 (clear_symbol_cache): Declare.
10936 * inferiors.c (all_processes): New.
10937 (null_ptid, minus_one_ptid): New.
10938 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10939 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10940 (add_thread): Change unsigned long to ptid. Remove gdb_id
10941 parameter. Adjust.
10942 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10943 (gdb_id_to_thread): Rename to ...
10944 (find_thread_pid): ... this. Change unsigned long to ptid.
10945 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10946 (loaded_dll, pull_pid_from_list): Adjust.
10947 (add_process, remove_process, find_process_pid)
10948 (get_thread_process, current_process, initialize_inferiors): New.
10949 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10950 (struct target_waitstatus) <related_pid>: Ditto.
10951 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10952 return type to int.
10953 (struct target_ops) <join>: Add `pid' argument.
10954 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10955 (struct target_ops) <wait>: Add `ptid' field. Change return type
10956 to ptid.
10957 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10958 (mywait): Add `ptid' argument. Change return type to ptid_t.
10959 (target_pid_to_str): Declare.
10960 * target.c (set_desired_inferior): Adjust to use ptids.
10961 (mywait): Add new `ptid' argument. Adjust.
10962 (target_pid_to_str): New.
10963 * mem-break.h (free_all_breakpoints): Declare.
10964 * mem-break.c (breakpoints): Delelete.
10965 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10966 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10967 to use per-process breakpoint list.
10968 (free_all_breakpoints): New.
10969 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10970 (symbol_cache, all_symbols_looked_up): Delete.
10971 (hexchars): New.
10972 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10973 read_ptid): New.
10974 (prepare_resume_reply): Change ptid argument's type from unsigned
10975 long to ptid_t. Adjust. Implement W;process and X;process.
10976 (free_sym_cache, clear_symbol_cache): New.
10977 (look_up_one_symbol): Adjust to per-process symbol cache. *
10978 * server.c (cont_thread, general_thread, step_thread): Change type
10979 to ptid_t.
10980 (attached): Delete.
10981 (multi_process): New.
10982 (last_ptid): Change type to ptid_t.
10983 (struct vstop_notif) <ptid>: Change type to ptid_t.
10984 (queue_stop_reply, push_event): Change `ptid' argument's type to
10985 ptid_t.
10986 (discard_queued_stop_replies): Add `pid' argument.
10987 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10988 changes. Don't reference the `attached' global.
10989 (attach_inferior): Adjust to mywait interface changes.
10990 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10991 features. Handle and report "multiprocess+". Handle
10992 "qAttached:PID".
10993 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10994 changes.
10995 (handle_v_kill): New.
10996 (handle_v_stopped): Adjust to use target_pid_to_str.
10997 (handle_v_requests): Allow multiple attaches and runs when
10998 multiprocess extensions are in effect. Handle "vKill".
10999 (myresume): Adjust to use ptids.
11000 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11001 (handle_status): Adjust to discard_queued_stop_replies interface
11002 change.
11003 (first_thread_of, kill_inferior_callback)
11004 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11005 (main): Call initialize_inferiors. Adjust to use ptids, killing
11006 and detaching from all inferiors. Handle multiprocess packet
11007 variants.
11008 * linux-low.h: Include gdb_proc_service.h.
11009 (struct process_info_private): New.
11010 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11011 <lwpid_of>: Use ptid_get_lwp.
11012 (get_lwp_thread): Adjust.
11013 (struct lwp_info): Add `dead' member.
11014 (find_lwp_pid): Declare.
11015 * linux-low.c (thread_db_active): Delete.
11016 (new_inferior): Adjust comment.
11017 (inferior_pid): Delete.
11018 (linux_add_process): New.
11019 (handle_extended_wait): Adjust.
11020 (add_lwp): Change unsigned long to ptid.
11021 (linux_create_inferior): Add process to processes table. Adjust
11022 to use ptids. Don't set new_inferior here.
11023 (linux_attach_lwp): Rename to ...
11024 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11025 it. Adjust to use ptids.
11026 (linux_attach_lwp): New.
11027 (linux_attach): Add process to processes table. Don't set
11028 new_inferior here.
11029 (struct counter): New.
11030 (second_thread_of_pid_p, last_thread_of_process_p): New.
11031 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11032 multiple processes.
11033 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11034 processes. Remove process from process table.
11035 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11036 to multiple processes.
11037 (any_thread_of): New.
11038 (linux_detach): Add `pid' argument, and handle it. Remove process
11039 from processes table.
11040 (linux_join): Add `pid' argument. Handle it.
11041 (linux_thread_alive): Change unsighed long argument to ptid_t.
11042 Consider dead lwps as not being alive.
11043 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11044 threads we're not interested in.
11045 (same_lwp, find_lwp_pid): New.
11046 (linux_wait_for_lwp): Change `pid' argument's type from int to
11047 ptid_t. Adjust.
11048 (linux_wait_for_event): Rename to ...
11049 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11050 from int to ptid_t. Adjust.
11051 (linux_wait_for_event): New.
11052 (linux_wait_1): Add `ptid' argument. Change return type to
11053 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11054 that exit from the process table.
11055 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11056 Adjust.
11057 (mark_lwp_dead): New.
11058 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11059 stopping all threads, mark its main lwp as dead.
11060 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11061 ptids.
11062 (fetch_register, usr_store_inferior_registers)
11063 (regsets_fetch_inferior_registers)
11064 (regsets_store_inferior_registers, linux_read_memory)
11065 (linux_write_memory): Inline `inferior_pid'.
11066 (linux_look_up_symbols): Adjust to use per-process
11067 `thread_db_active'.
11068 (linux_request_interrupt): Adjust to use ptids.
11069 (linux_read_auxv): Inline `inferior_pid'.
11070 (initialize_low): Don't reference thread_db_active.
11071 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11072 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11073 (ps_getpid): Return the pid of the current inferior.
11074 * thread-db.c (proc_handle, thread_agent): Delete.
11075 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11076 per-process data.
11077 (find_one_thread): Change argument type to ptid_t. Adjust to
11078 per-process data.
11079 (maybe_attach_thread): Adjust to per-process data and ptids.
11080 (thread_db_find_new_threads): Ditto.
11081 (thread_db_init): Ditto.
11082 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11083 processes table. Adjust to use ptids.
11084 (spu_kill, spu_detach): Adjust interface. Remove process from
11085 processes table.
11086 (spu_join, spu_thread_alive): Adjust interface.
11087 (spu_wait): Adjust interface. Remove process from processes
11088 table. Adjust to use ptids.
11089 * win32-low.c (current_inferior_tid): Delete.
11090 (current_inferior_ptid): New.
11091 (debug_event_ptid): New.
11092 (thread_rec): Take a ptid. Adjust.
11093 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11094 (child_delete_thread): Ditto.
11095 (do_initial_child_stuff): Add `attached' argument. Add process to
11096 processes table.
11097 (child_fetch_inferior_registers, child_store_inferior_registers):
11098 Adjust.
11099 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11100 (win32_attach): Pass 1 to do_initial_child_stuff.
11101 (win32_kill): Adjust interface. Remove process from processes
11102 table.
11103 (win32_detach): Ditto.
11104 (win32_join): Adjust interface.
11105 (win32_thread_alive): Take a ptid.
11106 (win32_resume): Adjust to use ptids.
11107 (get_child_debug_event): Ditto.
11108 (win32_wait): Adjust interface. Remove exiting process from
11109 processes table.
11110
bd99dc85
PA
111112009-04-01 Pedro Alves <pedro@codesourcery.com>
11112
11113 Non-stop mode support.
11114
11115 * server.h (non_stop): Declare.
11116 (gdb_client_data, handler_func): Declare.
11117 (delete_file_handler, add_file_handler, start_event_loop):
11118 Declare.
11119 (handle_serial_event, handle_target_event, push_event)
11120 (putpkt_notif): Declare.
11121 * target.h (enum resume_kind): New.
11122 (struct thread_resume): Replace `step' field by `kind' field.
11123 (TARGET_WNOHANG): Define.
11124 (struct target_ops) <wait>: Add `options' argument.
11125 <supports_non_stop, async, start_non_stop>: New fields.
11126 (target_supports_non_stop, target_async): New.
11127 (start_non_stop): Declare.
11128 (mywait): Add `options' argument.
11129 * target.c (mywait): Add `options' argument. Print child exit
11130 notifications here.
11131 (start_non_stop): New.
11132 * server.c (non_stop, own_buf, mem_buf): New globals.
11133 (struct vstop_notif): New.
11134 (notif_queue): New global.
11135 (queue_stop_reply, push_event, discard_queued_stop_replies)
11136 (send_next_stop_reply): New.
11137 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11138 interface changes.
11139 (attach_inferior): In non-stop mode, don't wait for the target
11140 here.
11141 (handle_general_set): Handle QNonStop.
11142 (handle_query): When handling qC, return the current general
11143 thread, instead of the first thread of the list.
11144 (handle_query): If the backend supports non-stop mode, include
11145 QNonStop+ in the qSupported query response.
11146 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11147 and non-stop mode.
11148 (handle_v_attach, handle_v_run): Handle non-stop mode.
11149 (handle_v_stopped): New.
11150 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11151 (myresume): Adjust to use resume_kind. Handle non-stop.
11152 (queue_stop_reply_callback): New.
11153 (handle_status): Handle non-stop mode.
11154 (main): Clear non_stop flag on reconnection. Use the event-loop.
11155 Refactor serial protocol handling from here ...
11156 (process_serial_event): ... to this new function. When GDB
11157 selects any thread, select one here. In non-stop mode, wait until
11158 GDB acks all pending events before exiting.
11159 (handle_serial_event, handle_target_event): New.
11160 * remote-utils.c (remote_open): Install remote_desc in the event
11161 loop.
11162 (remote_close): Remove remote_desc from the event loop.
11163 (putpkt_binary): Rename to...
11164 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11165 (putpkt_binary): New as wrapper around putpkt_binary_1.
11166 (putpkt_notif): New.
11167 (prepare_resume_reply): In non-stop mode, don't change the
11168 general_thread.
11169 * event-loop.c: New.
11170 * Makefile.in (OBJ): Add event-loop.o.
11171 (event-loop.o): New rule.
11172
11173 * linux-low.h (pid_of): Moved here.
11174 (lwpid_of): New.
11175 (get_lwp_thread): Use lwpid_of.
11176 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11177 * linux-low.c (pid_of): Delete.
11178 (inferior_pid): Use lwpid_of.
11179 (linux_event_pipe): New.
11180 (target_is_async_p): New.
11181 (delete_lwp): New.
11182 (handle_extended_wait): Use lwpid_of.
11183 (add_lwp): Don't set lwpid field.
11184 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11185 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11186 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11187 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11188 first. Adjust to linux_wait_for_event interface changes. Use
11189 lwpid_of.
11190 (linux_detach): Don't delete the main lwp here.
11191 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11192 (status_pending_p): Don't consider explicitly suspended lwps.
11193 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11194 pointer. Add OPTIONS argument. Change return type to int. Use
11195 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11196 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11197 pointer. Add status pointer argument. Return a pid instead of a
11198 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11199 changes. In non-stop mode, don't switch to a random thread.
11200 (linux_wait): Rename to...
11201 (linux_wait_1): ... this. Add target_options argument, and handle
11202 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11203 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11204 clean exit and signal exit code. Don't stop all threads in
11205 non-stop mode. In all-stop mode, only stop all threads when
11206 reporting a stop to GDB. Handle explicit thread stop requests.
11207 (async_file_flush, async_file_mark): New.
11208 (linux_wait): New.
11209 (send_sigstop): Use lwpid_of.
11210 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11211 interface changes. In non-stop mode, don't switch to a random
11212 thread.
11213 (linux_resume_one_lwp): Use lwpid_of.
11214 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11215 (linux_resume_one_thread): ... this. Handle resume_stop. In
11216 non-stop mode, don't look for pending flag in all threads.
11217 (resume_status_pending_p): Don't consider explicitly suspended
11218 threads.
11219 (my_waitpid): Reimplement. Emulate __WALL.
11220 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11221 Use lwpid_of.
11222 (sigchld_handler, linux_supports_non_stop, linux_async)
11223 (linux_start_non_stop): New.
11224 (linux_target_ops): Register linux_supports_non_stop, linux_async
11225 and linux_start_non_stop.
11226 (initialize_low): Install SIGCHLD handler.
11227 * thread-db.c (thread_db_create_event, find_one_thread)
11228 (thread_db_get_tls_address): Use lwpid_of.
11229 * win32-low.c (win32_detach): Adjust to use resume_kind.
11230 (win32_wait): Add `options' argument.
11231 * spu-low.c (spu_resume): Adjust to use resume_kind.
11232 (spu_wait): Add `options' argument.
11233
5b1c542e
PA
112342009-04-01 Pedro Alves <pedro@codesourcery.com>
11235
11236 Decouple target code from remote protocol.
11237
11238 * target.h (enum target_waitkind): New.
11239 (struct target_waitstatus): New.
11240 (struct target_ops) <wait>: Return an unsigned long. Take a
11241 target_waitstatus pointer instead of a char pointer.
11242 (mywait): Likewise.
11243 * target.c (mywait): Change prototype to return an unsigned long.
11244 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11245 * server.h (thread_from_wait, old_thread_from_wait): Delete
11246 declarations.
11247 (prepare_resume_reply): Change prototype to take a
11248 target_waitstatus.
11249 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11250 (last_status, last_ptid): New.
11251 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11252 pid instead of a signal.
11253 (attach_inferior): Remove "status" and "signal" parameters.
11254 Adjust.
11255 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11256 not as an address.
11257 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11258 (handle_v_requests, myresume): Remove "status" and "signal"
11259 parameters. Adjust.
11260 (handle_status): New.
11261 (main): Delete local `status'. Adjust.
11262 * remote-utils.c: Include target.h.
11263 (prepare_resume_reply): Change prototype to take a
11264 target_waitstatus. Adjust.
11265
11266 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11267 interface.
11268 * spu-low.c (spu_wait): Adjust.
11269 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11270 Delete.
11271 (win32_wait): Adjust.
11272
2bd7c093
PA
112732009-04-01 Pedro Alves <pedro@codesourcery.com>
11274
11275 * target.h (struct thread_resume): Delete leave_stopped member.
11276 (struct target_ops): Add a `n' argument to the `resume' callback.
11277 * server.c (start_inferior): Adjust.
11278 (handle_v_cont, myresume): Adjust.
11279 * linux-low.c (check_removed_breakpoint): Adjust to resume
11280 interface change, and to removed leave_stopped field.
11281 (resume_ptr): Delete.
11282 (struct thread_resume_array): New.
11283 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11284 resume interface change.
11285 (linux_continue_one_thread, linux_queue_one_thread)
11286 (resume_status_pending_p): Check if the resume field is NULL
11287 instead of checking the leave_stopped member.
11288 (linux_resume): Adjust to the target resume interface change.
11289 * spu-low.c (spu_resume): Adjust to the target resume interface
11290 change.
11291 * win32-low.c (win32_detach, win32_resume): Ditto.
11292
c35fafde
PA
112932009-04-01 Pedro Alves <pedro@codesourcery.com>
11294
11295 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11296 flag.
11297 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11298 pending.
11299 (linux_continue_one_thread): Only preserve the stepping flag if
11300 there's a pending breakpoint.
11301
0a59d50b
PA
113022009-03-31 Pedro Alves <pedro@codesourcery.com>
11303
11304 * server.c (main): After the inferior having exited, call
11305 remote_close before exiting gdbserver.
11306
f04c6d38
TJB
113072009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11308
11309 Fix size of FPSCR in Power 7 processors.
11310 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11311 (PPC_FEATURE_HAS_DFP): New #define.
11312 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11313 size of the FPSCR.
11314
78e5cee6
PA
113152009-03-23 Pedro Alves <pedro@codesourcery.com>
11316
11317 * server.c (handle_query) Whitespace and formatting.
11318
1b3f6016
PA
113192009-03-22 Pedro Alves <pedro@codesourcery.com>
11320
11321 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11322 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11323 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11324 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11325 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11326 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11327 Makefile.in, configure.ac: Fix whitespace throughout.
11328 * configure: Regenerate.
11329
a07b2135
PA
113302009-03-22 Pedro Alves <pedro@codesourcery.com>
11331
11332 * inferiors.c (find_inferior): Make it safe for the callback
11333 function to delete the currently iterated inferior.
11334
67cc2626
PA
113352009-03-22 Pedro Alves <pedro@codesourcery.com>
11336
11337 * Makefile.in (linuw_low_h): Move higher.
11338 (thread-db.o): Depend on $(linux_low_h).
11339
54a0b537
PA
113402009-03-17 Pedro Alves <pedro@codesourcery.com>
11341
11342 Rename "process" to "lwp" throughout.
11343
11344 * linux-low.c (all_processes): Rename to...
11345 (all_lwps): ... this.
11346 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11347 (add_process): Rename to ...
11348 (add_lwp): ... this. Adjust.
11349 (linux_create_inferior): Adjust.
11350 (linux_attach_lwp): Adjust.
11351 (linux_attach): Adjust.
11352 (linux_kill_one_process): Rename to ...
11353 (linux_kill_one_lwp): ... this. Adjust.
11354 (linux_kill): Adjust.
11355 (linux_detach_one_process): Rename to ...
11356 (linux_detach_one_lwp): ... this. Adjust.
11357 (linux_detach): Adjust.
11358 (check_removed_breakpoint): Adjust.
11359 (status_pending_p): Adjust.
11360 (linux_wait_for_process): Rename to ...
11361 (linux_wait_for_lwp): ... this. Adjust.
11362 (linux_wait_for_event): Adjust.
11363 (send_sigstop): Adjust.
11364 (wait_for_sigstop): Adjust.
11365 (stop_all_processes): Rename to ...
11366 (stop_all_lwps): ... this.
11367 (linux_resume_one_process): Rename to ...
11368 (linux_resume_one_lwp): ... this. Adjust.
11369 (linux_set_resume_request, linux_continue_one_thread)
11370 (linux_queue_one_thread, resume_status_pending_p)
11371 (usr_store_inferior_registers, regsets_store_inferior_registers)
11372 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11373 Adjust.
11374 * linux-low.h (get_process): Rename to ...
11375 (get_lwp): ... this. Adjust.
11376 (get_thread_process): Rename to ...
11377 (get_thread_lwp): ... this. Adjust.
11378 (get_process_thread): Rename to ...
11379 (get_lwp_thread): ... this. Adjust.
11380 (struct process_info): Rename to ...
11381 (struct lwp_info): ... this.
11382 (all_processes): Rename to ...
11383 (all_lwps): ... this.
11384 * proc-service.c (ps_lgetregs): Adjust.
11385 * thread-db.c (thread_db_create_event, find_one_thread)
11386 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11387
0b16c5cf
PA
113882009-03-14 Pedro Alves <pedro@codesourcery.com>
11389
11390 * server.c (handle_query): Handle "qAttached".
11391
32de4b9d
NS
113922009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11393
11394 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11395 GPLv3, update license URL.
11396
2aecd87f
DE
113972009-03-01 Doug Evans <dje@google.com>
11398
93efd302 11399 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11400 (server_h): Add gdb_signals.h.
11401 (signals.o): Update.
11402 * server.h (target_signal_from_host,target_signal_to_host_p)
11403 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11404
86b1f9c5
PM
114052009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11406
11407 * remote-utils.c (getpkt): Also generate remote-debug
11408 information if noack_mode is set.
11409
4aa995e1
PA
114102009-02-06 Pedro Alves <pedro@codesourcery.com>
11411
11412 * server.c (handle_query): Report qXfer:siginfo:read and
11413 qXfer:siginfo:write as supported and handle them.
11414 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11415 * linux-low.c (linux_xfer_siginfo): New.
11416 (linux_target_ops): Set it.
11417
62709adf
PA
114182009-01-26 Pedro Alves <pedro@codesourcery.com>
11419
11420 * server.c (gdbserver_usage): Mention --remote-debug.
11421 (main): Accept '--remote-debug' switch.
11422
aef93bd7
DE
114232009-01-18 Doug Evans <dje@google.com>
11424
11425 * regcache.c (new_register_cache): No need to check result of xcalloc.
11426 * server.c (handle_search_memory): Back out calls to xmalloc,
11427 result is checked and error is returned to user upon failure.
11428 (handle_query): Ditto. Add more checks for result of malloc.
11429 (handle_v_cont): Check result of malloc, report error back to
11430 user upon failure.
11431 (handle_v_run): Ditto. Call freeargv.
11432 * server.h (freeargv): Declare.
11433 * utils.c (freeargv): New fn.
11434
54363045
DE
114352009-01-15 Doug Evans <dje@google.com>
11436
f626972c
DE
11437 * gdbreplay.c (perror_with_name): Make arg const char *.
11438 * server.h (target_signal_to_name): Make return type const char *.
0842e787 11439 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 11440 * utils.c (perror_with_name): Make arg const char *.
54363045 11441
18aae699
PA
114422009-01-14 Pedro Alves <pedro@codesourcery.com>
11443
11444 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11445 when handling a EXIT_PROCESS_DEBUG_EVENT.
11446
ff703abe
JB
114472009-01-06 Joel Brobecker <brobecker@adacore.com>
11448
11449 * gdbreplay.c (gdbreplay_version): Update copyright year.
11450 * server.c (gdbserver_version): Likewise.
11451
f21cc1a2 114522009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
11453
11454 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 11455 (handle_extended_wait): Improve comment.
0e21c1ec 11456
bca929d3
DE
114572008-12-13 Doug Evans <dje@google.com>
11458
11459 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11460 * server.h (ATTR_MALLOC): New macro.
11461 (xmalloc,xcalloc,xstrdup): Declare.
11462 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11463 * inferiors.c: Ditto.
11464 * linux-low.c: Ditto.
11465 * mem-break.c: Ditto.
11466 * regcache.c: Ditto.
11467 * remote-utils.c: Ditto.
11468 * server.c: Ditto.
11469 * target.c: Ditto.
11470 * win32-low.c: Ditto.
11471
97438e3f
DE
114722008-12-12 Doug Evans <dje@google.com>
11473
896c7fbb
DE
11474 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11475 in debugging printf.
11476
97438e3f
DE
11477 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11478
e3b886f8
DE
114792008-12-09 Doug Evans <dje@google.com>
11480
11481 * linux-low.h (struct process_info): Delete member tid, unused.
11482 * thread-db.c (find_one_thread): Update.
11483 (maybe_attach_thread): Update.
11484
07e059b5
VP
114852008-12-02 Pedro Alves <pedro@codesourcery.com>
11486
889bf7c5
PA
11487 * target.h (struct target_ops): Add qxfer_osdata member.
11488 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11489 and dirent.h.
11490 (linux_qxfer_osdata): New functions.
11491 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11492 callback.
11493 * server.c (handle_query): Handle "qXfer:osdata:read:".
11494 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11495 (buffer_xml_printf): New functions.
11496 * server.h (struct buffer): New.
11497 (buffer_grow_str, buffer_grow_str0): New macros.
11498 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11499 (buffer_xml_printf): Declare.
07e059b5 11500
4cab47ab
DE
115012008-11-24 Doug Evans <dje@google.com>
11502
11503 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11504
f142445f
DJ
115052008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11506
11507 * server.c (handle_v_run): Always use the supplied argument list.
11508
d0107bb6 115092008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 11510
d0107bb6
BW
11511 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11512 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 11513
2c4ad781
TJB
115142008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11515
11516 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11517 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11518 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11519 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11520 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11521 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11522 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11523 XML target descriptions.
11524 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11525 when inferior is running on an ISA 2.05 or later processor. Add
11526 special case to return offset for full 64-bit slot of FPSCR when
11527 in 32-bits.
11528
dfb64f85
DJ
115292008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11530
11531 * Makefile.in (SFILES, clean): Added sparc64 files.
11532 (reg-sparc64.o, reg-sparc64.c): New.
11533 * configure.srv (sparc*-*-linux*): New configuration.
11534 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11535 syscall arguments for SPARC.
11536 (regsets_store_inferior_registers): Likewise.
11537 * linux-sparc-low.c: New file.
11538
66b6e1dd
DE
115392008-10-21 Doug Evans <dje@google.com>
11540
11541 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11542 (READLINE_DIR,READLINE_DEP): Delete.
11543 (INTERNAL_CFLAGS): Update.
11544 (LINTFLAGS): Update.
11545
9b710a42
PA
115462008-10-10 Pedro Alves <pedro@codesourcery.com>
11547
11548 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11549 whole argv from the last run, not just argv[0].
11550
5822d809
PA
115512008-09-08 Pedro Alves <pedro@codesourcery.com>
11552
11553 * regcache.c (new_register_cache): Return NULL if the register
11554 cache size isn't known yet.
11555 (free_register_cache): Avoid dereferencing a NULL regcache.
11556
74aac56f
DJ
115572008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11558
11559 * configure.srv: Merge MIPS and MIPS64.
11560
400b20f5
MR
115612008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11562
11563 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11564
677c5bb1
LM
115652008-08-18 Luis Machado <luisgpm@br.ibm.com>
11566
11567 * Makefile.in: Add required vsx dependencies.
11568
11569 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11570 Declare init_registers_powerpc_vsx32l.
11571 Declare init_registers_powerpc_vsx64l.
11572 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11573 (ppc_arch_setup): Check for VSX in hwcap.
11574 (ppc_fill_vsxregset): New function.
11575 (ppc_store_vsxregset): New function.
11576 Add new VSX entry in regset_info target_regsets.
11577
11578 * configure.srv: Add new VSX dependencies.
11579
a6f3e723
SL
115802008-08-12 Pedro Alves <pedro@codesourcery.com>
11581
11582 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11583 (remote_open): Set or clear transport_is_reliable.
11584 (putpkt_binary): Don't expect acks in noack mode.
11585 (getpkt): Don't send ack/nac in noack mode.
11586 * server.c (handle_general_set): Handle QStartNoAckMode.
11587 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11588 qSupported.
11589 (main): Reset noack_mode on every connection.
11590 * server.h (noack_mode): Declare.
11591
a417dc56
RW
115922008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11593
11594 * Makefile.in (GDBREPLAY_OBS): New variable.
11595 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11596
3221518c
UW
115972008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11598 Daniel Jacobowitz <dan@codesourcery.com>
11599
11600 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11601 (usr_store_inferior_registers): Likewise.
11602 (regsets_store_inferior_registers): Likewise.
11603
ec56be1b
PA
116042008-07-31 Rolf Jansen <rj@surtec.com>
11605 Pedro Alves <pedro@codesourcery.com>
11606
11607 * configure.ac: Check for memmem declaration.
11608 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11609 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11610 (disable_packet_qfThreadInfo): Unconditionally compile.
11611 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11612 * configure, config.in: Regenerate.
11613
2fe5e3ff
DE
116142008-07-28 Doug Kwan <dougkwan@google.com>
11615
11616 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11617 (linux_write_memory): Remove declaration of errno.
11618
836acd6d
UW
116192008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11620
11621 * linux-low.c (handle_extended_wait): Do not use "status"
11622 variable uninitialized.
11623
aeba519e
PA
116242008-07-07 Pedro Alves <pedro@codesourcery.com>
11625
11626 * server.c (handle_v_attach): Inhibit reporting dll changes.
11627
db42f210
PA
116282008-06-27 Pedro Alves <pedro@codesourcery.com>
11629
11630 * remote-utils.c (prepare_resume_reply): If requested, don't
11631 output "thread:TID" in the T stop reply.
11632
11633 * server.c (disable_packet_vCont, disable_packet_Tthread)
11634 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11635 (handle_query): If requested, disable support for qC, qfThreadInfo
11636 and qsThreadInfo.
11637 (handle_v_requests): If requested, disable support for vCont.
11638 (gdbserver_show_disableable): New.
11639 (main): Handle --disable-packet and --disable-packet=LIST.
11640
11641 * server.h (disable_packet_vCont, disable_packet_Tthread)
11642 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11643
8e4c5421
CD
116442008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11645
11646 * server.c (gdbserver_usage): Mention --version.
11647
6e23a804
DJ
116482008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11649
11650 * Makefile.in (gdbreplay.o): New rule.
11651
90aa6a40
JM
116522008-06-06 Joseph Myers <joseph@codesourcery.com>
11653
11654 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11655 message, not gdbserver.
11656
c16158bc 116572008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
11658 Nathan Sidwell <nathan@codesourcery.com>
11659 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11660
11661 * acinclude.m4: Include ../../config/acx.m4.
11662 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11663 * configure, config.in: Regenerate.
11664 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11665 * server.c (gdbserver_version): Print PKGVERSION.
11666 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11667 (main): Adjust gdbserver_usage calls.
11668 * gdbreplay.c (version, host_name): Add declarations.
11669 (gdbreplay_version, gdbreplay_usage): New.
11670 (main): Accept --version and --help options.
11671
aeb75bf5
DJ
116722008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11673
11674 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11675 (arm_breakpoint_at): Handle Thumb.
11676 (the_low_target): Add comment.
11677
76b233dd
UW
116782008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11679
11680 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11681
08388c79
DE
116822008-05-09 Doug Evans <dje@google.com>
11683
a3c83fae
DE
11684 * server.h (decode_search_memory_packet): Declare.
11685 * remote-utils.c (decode_search_memory_packet): New fn.
11686 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11687 (handle_search_memory): New fn.
11688 (handle_query): Process qSearch:memory packets.
11689
bb9c3d36
UW
116902008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11691
11692 * regcache.c (registers_length): Remove.
11693 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11694 full register packet.
11695 * regcache.h (registers_length): Remove prototype.
11696 * server.h (PBUFSIZ): Define to 16384.
11697
7284e1be
UW
116982008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11699
11700 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11701 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11702 powerpc-64l.o, and powerpc-altivec64l.o.
11703 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11704 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11705 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11706 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11707 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11708 to srv_xmlfiles.
11709
11710 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11711 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11712 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11713 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11714 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11715 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11716 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11717 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11718 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11719 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11720 (clean): Update.
11721
11722 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11723 (init_registers_powerpc_32l): ... this new prototype.
11724 (init_registers_powerpc_32): Remove, replace by ...
11725 (init_registers_powerpc_altivec32l): ... this new prototype.
11726 (init_registers_powerpc_e500): Remove, replace by ...
11727 (init_registers_powerpc_e500l): ... this new prototype.
11728 (init_registers_ppc64): Remove, replace by ...
11729 (init_registers_powerpc_64l): ... this new prototype.
11730 (init_registers_powerpc_64): Remove, replace by ...
11731 (init_registers_powerpc_altivec64l): ... this new prototype.
11732 (ppc_num_regs): Set to 73.
11733 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11734 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11735 (ppc_cannot_store_register): Handle orig_r3 and trap.
11736 (ppc_arch_setup): Update init_registers_... calls.
11737 (ppc_fill_gregset): Handle orig_r3 and trap.
11738
11739 * inferiors.c (clear_inferiors): Reset current_inferior.
11740
fdc59709
PB
117412008-04-23 Paolo Bonzini <bonzini@gnu.org>
11742
889bf7c5
PA
11743 * acinclude.m4: Add override.m4.
11744 * configure: Regenerate.
fdc59709 11745
c9b2f845
UW
117462008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11747
11748 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11749 initial call to init_register_ppc64.
11750
550512b8
UW
117512008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11752
43aaf8b6
PA
11753 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11754 single powerpc*-*-linux* case.
550512b8
UW
11755 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11756
b6430ec3
UW
117572008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11758
11759 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11760 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11761 from reg_xmlfiles.
11762 * linux-ppc-low.c: Include <elf.h>.
11763 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11764 (ppc_hwcap): New global variable.
11765 (ppc_regmap): Remove __SPE__ #ifdef sections.
11766 (ppc_regmap_e500): New global variable.
11767 (ppc_cannot_store_register): Update __SPE__ special case.
11768 (ppc_get_hwcap): New function.
11769 (ppc_arch_setup): Use it to determine whether inferior supports
11770 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11771 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11772 Do not access registers if target does not support AltiVec.
11773 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11774 Do not access registers if target does not support SPE.
11775 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11776
52fa2412
UW
117772008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11778
11779 * linux-low.c (disabled_regsets, num_regsets): New.
11780 (use_regsets_p): Delete.
11781 (linux_wait_for_process): Clear disabled_regsets.
11782 (regsets_fetch_inferior_registers): Check and set it.
11783 (regsets_store_inferior_registers): Likewise.
11784 (linux_fetch_registers, linux_store_registers): Do not use
11785 use_regsets_p.
11786 (initialize_low): Allocate disabled_regsets.
11787
e28b3332
DJ
117882008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11789
11790 * Makefile.in (LIBOBJS): New.
11791 (OBS): Use LIBOBJS.
11792 (memmem.o): New rule.
11793 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11794 * configure: Regenerated.
11795
4536995d
UW
117962008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11797
11798 * server.c (handle_query): Never return "unsupported" for
11799 qXfer:features:read queries.
11800
221c031f
UW
118012008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11802
11803 * server.c (get_features_xml): Fix inverted condition.
11804 (handle_query): Always support qXfer:feature:read.
11805
ccd213ac
DJ
118062008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11807
11808 * server.c (wrapper_argv): New.
11809 (start_inferior): Handle wrapper_argv. If set, expect an extra
11810 trap.
11811 (gdbserver_usage): Document --wrapper.
11812 (main): Parse --wrapper.
11813
6fe305f7
UW
118142008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11815
11816 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11817 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11818 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11819 (ppc_set_pc): Likewise.
11820 (ppc_arch_setup): New function.
11821 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11822 of collect_register.
889bf7c5 11823 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11824
5b0a002e
UW
118252008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11826
11827 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11828 instead of linux-ppc64-low.o.
11829 * linux-ppc64-low.c: Remove file.
11830 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11831 (linux-ppc64-low.o): Remove rule.
11832
11833 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11834 (init_registers_powerpc_64): Likewise.
11835 (ppc_regmap): Conditionally define depending on __powerpc64__.
11836 (ppc_cannot_store_register): Do not special-case "fpscr" when
11837 compiled on __powerpc64__.
11838 (ppc_collect_ptrace_register): New function.
11839 (ppc_supply_ptrace_register): New function.
11840 (ppc_breakpoint): Change type to "unsigned int".
11841 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11842 (the_low_target): Conditionally provide initializers for the
889bf7c5 11843 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11844 collect_ptrace_register and supply_ptrace_register members.
11845
9b4b61c8
UW
118462008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11847
11848 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11849 * server.c (gdbserver_xmltarget): Define.
11850 (get_features_xml): Use it to replace "target.xml" and arch_string.
11851
11852 * configure.srv: Remove srv_xmltarget. Add XML files that were
11853 mentioned there to srv_xmlfiles instead. Remove conditional tests
11854 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11855 srv_xmlfiles and srv_regobj to include all possible choices.
11856 * configure.ac (srv_xmltarget): Remove.
11857 (srv_xmlfiles): Do not add "target.xml".
11858 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11859 checks for supplementary target information.
11860 * configure: Regenerate.
11861 * Makefile.in (XML_TARGET): Remove.
11862 (target.xml): Remove rule.
11863 (clean): Do not clean up target.xml.
11864 (.PRECIOUS): Do not mention target.xml.
11865
11866 * target.h (struct target_ops): Remove arch_string member.
11867 * linux-low.c (linux_arch_string): Remove.
11868 (linux_target_ops): Remove arch_string initializer.
11869 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11870 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11871 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11872 * spu-low.c (spu_arch_string): Remove.
11873 (spu_target_ops): Remove arch_string initializer.
11874 * win32-low.c (win32_arch_string): Remove.
11875 (win32_target_ops): Remove arch_string initializer.
11876 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11877 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11878 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11879
ee1a7ae4
UW
118802008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11881
11882 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11883 by collect_ptrace_register and supply_ptrace_register hooks.
11884 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11885 instead of checking for the_low_target.left_pad_xfer.
11886 (usr_store_inferior_registers): Use collect_ptrace_register callback
11887 instead of checking for the_low_target.left_pad_xfer.
11888
11889 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11890 (s390_supply_ptrace_register): Likewise.
11891 (s390_fill_gregset): Call s390_collect_ptrace_register.
11892 (the_low_target): Update.
11893
11894 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11895 (ppc_supply_ptrace_register): Likewise.
11896 (the_low_target): Update.
11897
11898 * linux-i386-low.c (the_low_target): Update.
11899 * linux-x86-64-low.c (the_low_target): Update.
11900
d61ddec4
UW
119012008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11902
11903 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11904 reg-s390.o and reg-s390x.o.
11905
11906 * linux-low.c (new_inferior): New global variable.
11907 (linux_create_inferior, linux_attach): Set it.
11908 (linux_wait_for_process): Call the_low_target.arch_setup after the
11909 target has stopped for the first time.
11910 (initialize_low): Do not call the_low_target.arch_setup.
11911
11912 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11913 (s390_set_pc): Likewise.
11914 (s390_arch_setup): New function.
11915 (the_low_target): Use s390_arch_setup as arch_setup routine.
11916
11917 * regcache.c (realloc_register_cache): New function.
11918 (set_register_cache): Call it for each existing regcache.
11919
d05b4ac3
UW
119202008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11921
11922 * server.h (init_registers): Remove prototype.
11923
11924 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11925 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11926 instead of init_registers ().
11927 * linux-arm-low.c (init_registers_arm): Add prototype.
11928 (init_registers_arm_with_iwmmxt): Likewise.
11929 (the_low_target): Add initializer for arch_setup field.
11930 * linux-cris-low.c (init_registers_cris): Add prototype.
11931 (the_low_target): Add initializer for arch_setup field.
11932 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11933 (the_low_target): Add initializer for arch_setup field.
11934 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11935 (the_low_target): Add initializer for arch_setup field.
11936 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11937 (the_low_target): Add initializer for arch_setup field.
11938 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11939 (the_low_target): Add initializer for arch_setup field.
11940 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11941 (the_low_target): Add initializer for arch_setup field.
11942 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11943 (init_registers_mips64_linux): Likewise.
11944 (the_low_target): Add initializer for arch_setup field.
11945 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11946 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11947 (the_low_target): Add initializer for arch_setup field.
11948 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11949 (init_registers_powerpc_64): Likewise.
11950 (the_low_target): Add initializer for arch_setup field.
11951 * linux-s390-low.c (init_registers_s390): Add prototype.
11952 (init_registers_s390x): Likewise.
11953 (the_low_target): Add initializer for arch_setup field.
11954 * linux-sh-low.c (init_registers_sh): Add prototype.
11955 (the_low_target): Add initializer for arch_setup field.
11956 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11957 (the_low_target): Add initializer for arch_setup field.
11958 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11959 (the_low_target): Add initializer for arch_setup field.
11960
11961 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11962 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11963 instead of init_registers ().
11964 * win32-arm-low.c (init_registers_arm): Add prototype.
11965 (the_low_target): Add initializer for arch_setup field.
11966 * win32-i386-low.c (init_registers_i386): Add prototype.
11967 (the_low_target): Add initializer for arch_setup field.
11968
11969 * spu-low.c (init_registers_spu): Add prototype.
11970 (initialize_low): Call initialie_registers_spu () instead of
11971 initialize_registers ().
11972
fd96d250
PA
119732008-02-19 Pedro Alves <pedro@codesourcery.com>
11974
11975 * server.c (handle_v_requests): When handling the vRun and vAttach
11976 packets, if already debugging a process, don't kill it. Return an
11977 error instead.
11978
d41b6bb4
DJ
119792008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11980
11981 * server.c (handle_query): Correct length check.
11982
5ac588cf
PA
119832008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11984
11985 * win32-low.c (do_initial_child_stuff): Add process handle
11986 parameter. Set current_process_handle and current_process_id from the
11987 parameters. Clear globals.
11988 (win32_create_inferior): Don't set current_process_handle and
11989 current_process_id here. Instead pass them on the call to
11990 do_initial_child_stuff.
11991 (win32_attach): Likewise.
11992 (win32_clear_inferiors): New.
11993 (win32_kill): Don't close the current process handle or the
11994 current thread handle here. Instead call win32_clear_inferiors.
11995 (win32_detach): Don't open a new handle to the process. Call
11996 win32_clear_inferiors.
11997 (win32_join): Don't rely on current_process_handle; open a new
11998 handle using the process id.
11999 (win32_wait): Call win32_clear_inferiors when the inferior process
12000 has exited.
12001
ecd7ecbc
DJ
120022008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12003
12004 * server.c (monitor_show_help): Add "exit".
12005
1525d545
MG
120062008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12007
ecd7ecbc 12008 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12009 (clean): Add reg-xtensa.c.
12010 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12011 * configure.srv (xtensa*-*-linux*) New target.
12012 * linux-xtensa-low.c: New.
12013 * xtensa-xtregs.c: New.
1525d545 12014
59a016f0
PA
120152008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12016
12017 * hostio.c: Don't include errno.h.
12018 (errno_to_fileio_errno): Move to hostio-errno.
12019 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12020 error number outputting to the target->hostio_last_error callback.
12021 (hostio_packet_error): Use FILEIO_EINVAL directly.
12022 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12023 calls to hostio_error.
12024 * hostio-errno.c: New.
12025 * server.h (hostio_last_error_from_errno): Declare.
12026 * target.h (target_ops): Add hostio_last_error member.
12027 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12028 as hostio_last_error handler.
889bf7c5 12029 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12030 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12031 (wince_hostio_last_error): New functions.
12032 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12033 as hostio_last_error handler.
12034 (win32_target_ops) [!_WIN32_WCE]: Register
12035 hostio_last_error_from_errno as hostio_last_error handler.
12036 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12037 (hostio-errno.o): New rule.
12038 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12039 * configure.srv (srv_hostio_err_objs): New variable. Default to
12040 hostio-errno.o.
12041 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12042 * configure: Regenerate.
12043
2d717e4f
DJ
120442008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12045
12046 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12047 (linux_kill, linux_detach): Clean up the process list.
12048 * remote-utils.c (remote_open): Improve port number parsing.
12049 (putpkt_binary, input_interrupt): Only send interrupts if the target
12050 is running.
12051 * server.c (extended_protocol): Make static.
12052 (attached): Define earlier.
12053 (exit_requested, response_needed, program_argv): New variables.
12054 (target_running): New.
12055 (start_inferior): Clear attached here.
12056 (attach_inferior): Set attached here.
12057 (require_running): Define.
12058 (handle_query): Use require_running and target_running. Implement
12059 "monitor exit".
12060 (handle_v_attach, handle_v_run): New.
12061 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12062 (gdbserver_usage): Update.
12063 (main): Redo argument parsing. Handle --debug and --multi. Handle
12064 --attach along with other options or after the port. Save
12065 program_argv. Support no initial program. Resynchronize
12066 communication with GDB after an error. Handle "monitor exit".
12067 Use require_running and target_running. Always allow the extended
12068 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12069 restart in extended mode.
12070 * README: Refer to the GDB manual. Update --attach usage.
12071
7407e2de
AS
120722007-12-20 Andreas Schwab <schwab@suse.de>
12073
12074 * linux-low.c (STACK_SIZE): Define.
12075 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12076 (linux_test_for_tracefork): Likewise.
12077
b65d95c5
DJ
120782007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12079
12080 * linux-low.c (linux_wait_for_event): Update messages. Do not
12081 reinsert auto-delete breakpoints.
12082 * mem-break.c (struct breakpoint): Change return type of handler to
12083 int.
12084 (set_breakpoint_at): Update handler type.
12085 (reinsert_breakpoint_handler): Return 1 instead of calling
12086 delete_breakpoint.
12087 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12088 setting a new one.
12089 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12090 * mem-break.h (set_breakpoint_at): Update handler type.
12091 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12092 * win32-low.c (auto_delete_breakpoint): New.
12093 (get_child_debug_event): Use it.
12094
4e799345
DJ
120952007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12096
12097 * configure.ac: Check for pread and pwrite.
12098 * hostio.c (handle_pread): Fall back to lseek and read.
12099 (handle_pwrite): Fall back to lseek and write.
12100 * config.in, configure: Regenerated.
12101
27524b67
DJ
121022007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12103
12104 * server.c (myresume): Add own_buf argument.
12105 (main): Update calls.
12106
a20d5e98
DJ
121072007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12108
12109 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12110 * remote-utils.c (remote_open): Do not call disable_async_io.
12111 (block_async_io): Delete.
12112 (unblock_async_io): Make static.
12113 (initialize_async_io): New.
12114 * server.c (handle_v_cont): Handle async I/O here.
12115 (myresume): Likewise. Move other common resume tasks here...
12116 (main): ... from here. Call initialize_async_io. Disable async
12117 I/O before the main loop.
12118 * server.h (initialize_async_io): Declare.
12119 (block_async_io, unblock_async_io): Delete prototypes.
12120 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12121
b79d787e
DJ
121222007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12123
12124 * remote-utils.c (readchar): Allow binary data in received messages.
12125
d97903b2
PA
121262007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12127
12128 * win32-low.c (attaching): New global.
12129 (win32_create_inferior): Clear the `attaching' global.
12130 (win32_attach): Set the `attaching' global.
12131 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12132 attaching. Only set a breakpoint at the entry point if not
12133 attaching.
12134
311de423
PA
121352007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12136
12137 * server.c (main): Don't report dll events on the initial
12138 connection on attaches.
12139
6c2d16d2
PA
121402007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12141
12142 * server.c (main): Relax numerical bases supported for the pid of
12143 the --attach command line argument.
12144
5ca906e6
PA
121452007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12146
12147 * win32-low.c (win32_attach): Call OpenProcess before
12148 DebugActiveProcess, not after. Add last error output to error
12149 call.
12150
9c6c8194
PA
121512007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12152
12153 * win32-low.c (win32_get_thread_context)
12154 (win32_set_thread_context): New functions.
12155 (thread_rec): Use win32_get_thread_context.
12156 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12157 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12158 field.
12159
4d5d1aaa
PA
121602007-12-03 Leo Zayas
12161 Pedro Alves <pedro_alves@portugalmail.pt>
12162
12163 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12164 global variables.
12165 (child_add_thread): Minor cleanup.
12166 (child_continue): Resume artificially suspended threads before
12167 calling ContinueDebugEvent.
12168 (suspend_one_thread): New.
12169 (fake_breakpoint_event): New.
12170 (get_child_debug_event): Change return type to int. Check here if
12171 gdb sent an interrupt request. If a soft interrupt was requested,
12172 fake a breakpoint event. Return 0 if there is no event to handle,
12173 and 1 otherwise.
12174 (win32_wait): Don't check here if gdb sent an interrupt request.
12175 Ensure there is a valid event to handle.
12176 (win32_request_interrupt): Add soft interruption method as last
12177 resort.
12178
c436e841
PA
121792007-12-03 Leo Zayas
12180 Pedro Alves <pedro_alves@portugalmail.pt>
12181
12182 * win32-low.h (win32_thread_info): Add descriptions to the
12183 structure members. Replace `suspend_count' counter by a
12184 `suspended' flag.
12185 * win32-low.c (thread_rec): Update condition of when to get the
12186 context from the inferior. Rely on ContextFlags being set if it
12187 has already been retrieved. Only suspend the inferior thread if
12188 we haven't already. Warn if that fails.
12189 (continue_one_thread): s/suspend_count/suspended/. Only call
12190 ResumeThread once. Warn if that fails.
12191
e7b5fa67
PA
121922007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12193
12194 * win32-low.c (win32_wait): Don't read from the inferior when it
12195 has already exited.
12196
a385171d
PA
121972007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12198
12199 * Makefile.in (win32_low_h): New variable.
12200 (win32-low.o): Add dependency on $(win32_low_h).
12201 (win32-arm-low.o, win32-i386-low.o): New rules.
12202
f80c84b3
DJ
122032007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12204
12205 * hostio.c: Correct copyright year.
12206
a6b151f1
DJ
122072007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12208
12209 * Makefile.in (OBS): Add hostio.o.
12210 (hostio.o): New rule.
12211 * server.h (handle_vFile): Declare.
12212 * hostio.c: New file.
12213 * server.c (handle_v_requests): Take packet_len and new_packet_len
12214 for binary packets. Call handle_vFile.
12215 (main): Update call to handle_v_requests.
12216
f9387fc3
DJ
122172007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12218
12219 * linux-low.c: Include <sched.h>.
12220
51c2684e
DJ
122212007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12222
12223 * linux-low.c (linux_tracefork_grandchild): New.
12224 (linux_tracefork_child): Use clone.
12225 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12226
75f83163
JB
122272007-10-31 Joel Brobecker <brobecker@adacore.com>
12228
12229 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12230
da5898ce
DJ
122312007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12232
12233 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12234
24a09b5f
DJ
122352007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12236
12237 * inferiors.c (change_inferior_id): Delete.
12238 (add_pid_to_list, pull_pid_from_list): New.
12239 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12240 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12241 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12242 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12243 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12244 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12245 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12246 (using_threads): Always set to 1.
12247 (handle_extended_wait): New.
12248 (add_process): Do not set TID.
12249 (linux_create_inferior): Set must_set_ptrace_flags.
12250 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12251 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12252 (linux_thread_alive): Rename TID argument to LWPID.
12253 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12254 (linux_wait_for_event): Do not use TID or check using_threads. Update
12255 call to dead_thread_notify. Call handle_extended_wait.
12256 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12257 (send_sigstop): Delete sigstop_sent.
12258 (wait_for_sigstop): Avoid TID.
12259 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12260 (linux_test_for_tracefork): New.
12261 (linux_lookup_signals): Use thread_db_active and
12262 linux_supports_tracefork_flag.
12263 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12264 * linux-low.h (get_process_thread): Avoid TID.
12265 (struct process_ifo): Move thread_known and tid to the end. Remove
12266 sigstop_sent.
12267 (linux_attach_lwp, thread_db_init): Update prototypes.
12268 * server.h (change_inferior_id): Delete prototype.
12269 (add_pid_to_list, pull_pid_from_list): New prototypes.
12270 * thread-db.c (thread_db_use_events): New.
12271 (find_first_thread): Rename to...
12272 (find_one_thread): ...this. Update callers and messages. Do not
12273 call fatal. Check thread_db_use_events. Do not call
12274 change_inferior_id or new_thread_notify.
12275 (maybe_attach_thread): Update. Do not call new_thread_notify.
12276 (thread_db_init): Set thread_db_use_events. Check use_events.
12277 * utils.c (fatal, warning): Correct message prefix.
12278
30ed0a8f
DJ
122792007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12280
12281 * Makefile.in (clean): Remove new files.
12282 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12283 (powerpc-64.o, powerpc-64.c): New rules.
12284 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12285 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12286 with SPE.
12287 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12288 SPE targets.
12289 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12290 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12291 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12292 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12293 (target_regsets): Add AltiVec and SPE register sets.
12294 * configure.ac: Check for AltiVec and SPE.
12295 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12296 (ppc_fill_vrregset, ppc_store_vrregset): New.
12297 (target_regsets): Add AltiVec register set.
12298 * configure: Regenerated.
12299
fd462a61
DJ
123002007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12301
12302 * linux-low.c (O_LARGEFILE): Define.
12303 (linux_read_memory): Use /proc/PID/mem.
12304 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12305 * configure, config.in: Regenerated.
12306
69f223ed
DJ
123072007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12308
12309 * linux-low.c (linux_wait_for_event): Do not pass signals while
12310 single-stepping.
12311
aec18585
PA
123122007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12313
12314 * win32-low.c (create_process): New.
12315 (win32_create_inferior): Use create_process instead of
12316 CreateProcess. If create_process failed retry appending an ".exe"
12317 suffix. Store the GetLastError result immediatelly after
12318 create_process calls and use it on the call to error.
12319
34d86ddd
PA
123202007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12321
12322 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12323
5a0e3bd0
JB
123242007-08-23 Joel Brobecker <brobecker@adacore.com>
12325
12326 * configure.ac: Switch license to GPLv3.
12327
f88c79e6
MS
123282007-08-01 Michael Snyder <msnyder@access-company.com>
12329
12330 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12331
6b3d9b83
PA
123322007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12333
12334 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12335 typedef.
12336 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12337 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12338 CloseToolhelp32Snapshot.
12339 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12340 CloseToolhelp32Snapshot.
12341
c588c53c
MS
123422007-07-27 Michael Snyder <michael.snyder@access-company.com>
12343
12344 * server.c (main): Check for inferior exit before main loop.
12345
aa0403d9
PA
123462007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12347
12348 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12349 instead of on tmp_desc.
12350
255e7678
DJ
123512007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12352 Daniel Jacobowitz <dan@codesourcery.com>
12353
12354 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12355 (add_thread): Minor cleanups.
12356 (clear_inferiors): Move lower in the file. Clear the DLL
12357 list.
12358 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12359 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12360 (xml_escape_text): New.
12361 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12362 for qSupported.
12363 (handle_v_cont): Report errors.
12364 (gdbserver_version): Update.
12365 (main): Correct size of own_buf. Do not report initial DLL events.
12366 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12367 (unloaded_dll, xml_escape_text): New.
12368 * win32-low.c (enum target_waitkind): Update comments.
12369 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12370 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12371 (win32_EnumProcessModules, win32_GetModuleInformation)
12372 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12373 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12374 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12375 (win32_Module32First, win32_Module32Next, load_toolhelp)
12376 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12377 (get_child_debug_event): Handle DLL events.
12378 (win32_wait): Likewise.
12379
0d37add9
DJ
123802007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12381
12382 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12383 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12384
45e2715e
PA
123852007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12386
12387 * win32-low.c (handle_output_debug_string): Ignore event if not
12388 waiting.
12389
c5674cf1
PA
123902007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12391
12392 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12393
2bbe3cc1
DJ
123942007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12395
12396 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12397
ae13219e
DJ
123982007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12399
12400 * inferiors.c (change_inferior_id): Add comment.
12401 * linux-low.c (check_removed_breakpoint): Add an early
12402 prototype. Improve debug output.
12403 (linux_attach): Doc update.
12404 (linux_detach_one_process, linux_detach): Clean up before releasing
12405 each process.
12406 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12407 * linux-low.h (struct process_info): Doc improvement.
12408 * mem-break.c (delete_all_breakpoints): New.
12409 * mem-break.h (delete_all_breakpoints): New prototype.
12410 * thread-db.c (find_first_thread): New.
12411 (thread_db_create_event): Call it instead of
12412 thread_db_find_new_threads. Clean up unused variables.
12413 (maybe_attach_thread): Remove first thread handling.
12414 (thread_db_find_new_threads): Use find_first_thread.
12415 (thread_db_get_tls_address): Likewise.
12416
4105de34
DJ
124172007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12418
12419 * thread-db.c (thread_db_find_new_threads): Add prototype.
12420 (thread_db_create_event): Check for the main thread before adding
12421 a new thread.
12422 (maybe_attach_thread): Only enable event reporting if TID == 0.
12423 (thread_db_get_tls_address): Check for new threads.
12424
2b876972
DJ
124252007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12426
12427 * linux-low.c (linux_create_inferior): Try execv before execvp.
12428 * spu-low.c (spu_create_inferior): Likewise.
12429
7a245884
DJ
124302007-06-13 Mike Frysinger <vapier@gentoo.org>
12431
12432 * linux-low.c (linux_create_inferior): Change execv to execvp.
12433 * spu-low.c (spu_create_inferior): Likewies.
12434
117ce543
DJ
124352007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12436
12437 * Makefile.in (clean): Clean new files instead of deleted ones.
12438 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12439 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12440 rules.
12441 * configure.srv: Specify XML files and new regformats for MIPS and
12442 MIPS64 GNU/Linux.
12443 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12444 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12445 an entry for the restart register.
12446 (mips_cannot_fetch_register, mips_cannot_store_register)
12447 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12448 register names to match the XML descriptions.
12449 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12450 restart register instead of $0.
12451
0e7f50da
UW
124522007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12453 Markus Deuling <deuling@de.ibm.com>
12454
12455 * remote-utils.c (decode_xfer_write): New function.
12456 * server.h (decode_xfer_write): Add prototype.
12457 * server.c (handle_query): Add PACKET_LEN argument. Support
12458 qXfer:spu:read and qXfer:spu:write packets.
12459 (main): Pass packet_len to handle_query.
12460 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12461 * target.h (target_ops): Add qxfer_spu.
12462
374c1d38
UW
124632007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12464
12465 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12466 accessing non-seekable spufs files.
12467
bb63802a
UW
124682007-05-16 Markus Deuling <deuling@de.ibm.com>
12469
889bf7c5 12470 * server.c (handle_query): Add reply for qC packet.
bb63802a 12471
7390519e
PA
124722007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12473 Leo Zayas <lerele@champenstudios@com>
12474
12475 * server.h (check_remote_input_interrupt_request): New function.
12476 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12477 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12478 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12479 (check_remote_input_interrupt_request): New function.
12480 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 12481 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
12482 winapi_GenerateConsoleCtrlEvent): New typedefs.
12483 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12484 to 250 ms.
12485 (win32_wait): Check for remote interrupt request
12486 with check_remote_input_interrupt_request.
12487 (win32_request_interrupt): New function.
12488 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12489
34b34921
PA
124902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12491
12492 * win32-low.c (debug_registers_changed,
12493 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12494 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12495 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12496 (thread_rec): Get context using the low target.
12497 (child_add_thread): Call thread_added on the low target,
12498 which does the same thing.
12499 (regptr): Delete.
12500 (do_initial_child_stuff): Remove debug registers references.
12501 Set context using the low target. Resume threads after
12502 setting the contexts.
12503 (child_continue): Remove dead variable. Remove debug
12504 registers references.
12505 (child_fetch_inferior_registers): Go through the low target.
12506 (do_child_store_inferior_registers): Remove.
12507 (child_store_inferior_registers): Go through the low target.
12508 (win32_resume): Remove debug registers references.
12509 Set context using the low target.
12510 (handle_exception): Change return type to void. Don't record
12511 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12512 first chance exception.
889bf7c5 12513 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
12514 goto loop. Always return after waiting for debug event.
12515 (win32_wait): Convert to switch statement. Handle spurious
12516 events.
12517
12518 * win32-i386-low.c (debug_registers_changed,
12519 debug_registers_used): New.
12520 (initial_stuff): Rename to ...
12521 (i386_initial_stuff): ... this. Clear debug registers
12522 state variables.
12523 (store_debug_registers): Delete.
12524 (i386_get_thread_context): New.
12525 (load_debug_registers): Delete.
12526 (i386_set_thread_context): New.
12527 (i386_thread_added): New.
12528 (single_step): Rename to ...
12529 (i386_single_step): ... this.
12530 (do_fetch_inferior_registers): Rename to ...
12531 (i386_fetch_inferior_register): ... this.
12532 (i386_store_inferior_register): New.
12533 (the_low_target): Adapt to new interface.
12534
12535 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12536 (arm_get_thread_context): New.
12537 (arm_set_thread_context): New.
12538 (regptr): New.
12539 (do_fetch_inferior_registers): Rename to ...
12540 (arm_fetch_inferior_register): ... this.
12541 (arm_store_inferior_register): New.
12542 (arm_wince_breakpoint): Reimplement as unsigned long.
12543 (arm_wince_breakpoint_len): Define.
12544 (the_low_target): Adapt to new interface.
12545
12546 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12547 load_debug_registers. Add get_thread_context, set_thread_context,
12548 thread_added and store_inferior_register. Rename
12549 fetch_inferior_registers to fetch_inferior_register.
12550 (regptr): Remove declaration.
12551
dd6953e1
PA
125522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12553
12554 * linux-low.c (linux_detach): Change return type to int. Return 0.
12555 * spu-low.c (spu_detach): Likewise.
12556
444d6139
PA
125572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12558
12559 * target.h (target_ops): Change return type of detach to int.
12560 Add join.
12561 (join_inferior): New.
12562 * server.c (main): Don't skip detach support on mingw32.
12563 If the inferior doesn't support detaching return error.
12564 Call join_inferior instead of using waitpid.
12565 * linux-low.c (linux_join): New.
12566 (linux_target_op): Add linux_join.
12567 * spu-low.c (spu_join): New.
12568 (spu_target_ops): Add spu_join.
12569 * win32-low.c (win32_detach): Adapt to new interface.
12570 Reopen current_process_handle before detaching. Issue a child
12571 resume before detaching.
12572 (win32_join): New.
12573 (win32_target_op): Add win32_join.
12574
1d5315fe
PA
125752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12576
12577 * win32-low.c (win32-attach): Fix return value.
12578 * target.h (target_ops): Describe ATTACH return values.
12579
bf914831
PA
125802007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12581
12582 * win32-low.c (GETPROCADDRESS): Define.
12583 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12584 (winapi_DebugSetProcessKillOnExit): Likewise.
12585 (win32_create_inferior): Force usage of ansi CreateProcessA.
12586 (win32_attach): Use GETPROCADDRESS.
12587 (win32_detach): Likewise.
12588
f72f3e60
PA
125892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12590
12591 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12592
ed50f18f
PA
125932007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12594
12595 * win32-low.c: Commit leftover changes from 2007-03-29.
12596
0c2ead7e
DJ
125972007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12598
12599 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12600 fields short instead of int. Add explicit padding.
12601 (i387_cache_to_fsave): Remove unnecessary casts.
12602 (i387_fsave_to_cache): Doc fix.
12603 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12604
73725ff3
DJ
126052007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12606
12607 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12608 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12609
d99f33d8
PA
126102007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12611
12612 * configure.srv (arm*-*-mingw32ce*): Move near the other
12613 arm targets.
12614
68070c10
PA
126152007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12616
2482afc6 12617 * configure.ac: Add errno checking.
68070c10
PA
12618 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12619 sys/file.h and malloc.h.
12620 (AC_CHECK_DECLS): Add perror.
12621 (srv_mingwce): Handle.
2482afc6 12622 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
12623 win32-i386-low.o to srv_tgtobj.
12624 (i[34567]86-*-mingw*): Likewise.
12625 (arm*-*-mingw32ce*): Add case.
12626 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12627 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12628 [__MINGW32CE__] (strerror): New function.
12629 [__MINGW32CE__] (errno): Define to GetLastError.
12630 [__MINGW32CE__] (COUNTOF): New macro.
12631 (remote_open): Remove extra close call.
12632 * mem-break.c (delete_breakpoint_at): New function.
12633 * mem-break.h (delete_breakpoint_at): Declare.
12634 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12635 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12636 [USE_WIN32API] (read, write): Add char* casts.
12637 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12638 * server.h: Include wincecompat.h on Windows CE.
12639 [HAVE_ERRNO_H]: Check.
12640 (perror): Declare if not declared.
12641 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12642 (perror_with_name): Remove errno declaration.
12643 * wincecompat.h: New.
12644 * wincecompat.c: New.
12645 * win32-low.h: New.
12646 * win32-arm-low.c: New.
12647 * win32-i386-low.c: New.
12648 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12649 (OUTMSG2): Make it safe.
12650 (_T): New macro.
12651 (COUNTOF): New macro.
12652 (NUM_REGS): Get it from the low target.
12653 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12654 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12655 (thread_rec): Let low target handle debug registers.
12656 (child_add_thread): Likewise.
12657 (child_init_thread_list): Likewise.
12658 (continue_one_thread): Likewise.
12659 (regptr): New.
12660 (do_child_fetch_inferior_registers): Move to ...
12661 * win32-i386-low.c: ... here, and rename to ...
12662 (do_fetch_inferior_registers): ... this.
889bf7c5 12663 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12664 Go through the low target.
12665 (do_child_store_inferior_registers): Use regptr.
12666 (strwinerror): New function.
12667 (win32_create_inferior): Handle Windows CE.
12668 Use strwinerror instead of strerror on Windows error
12669 codes. Add program to the error output.
12670 Don't close the main thread handle on Windows CE.
12671 (win32_attach): Use coredll.dll on Windows CE.
12672 (win32_kill): Close current process and current
12673 thread handles.
12674 (win32_detach): Use coredll.dll on Windows CE.
12675 (win32_resume): Let low target handle debug registers, and
12676 step request.
12677 (handle_exception): Add/Remove initial breakpoint. Avoid
12678 non-existant WSTOPSIG on Windows CE.
12679 (win32_read_inferior_memory): Cast to remove warning.
12680 (win32_arch_string): Go through the low target.
12681 (initialize_low): Call set_breakpoint_data with the low
12682 target's breakpoint.
12683 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12684 FOP_REGNUM, mappings): Move to ...
12685 * win32-i386-low.c: ... here.
12686 * win32-low.c (win32_thread_info): Move to ...
12687 * win32-low.h: ... here.
12688 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12689 win32-arm-low.c and wincecompat.c.
12690 (all:): Add $EXEEXT.
12691 (install-only:): Likewise.
12692 (gdbserver:): Likewise.
12693 (gdbreplay:): Likewise.
12694 * config.in: Regenerate.
12695 * configure: Regenerate.
12696
41093d81
PA
126972007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12698
12699 * win32-low.c: Rename typedef thread_info to
12700 win32_thread_info throughout.
12701
544afa54
PA
127022007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12703
12704 * win32-i386-low.c: Rename to ...
12705 * win32-low.c: ... this.
12706 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12707 * Makefile.in: Likewise.
12708
bce7165d
PA
127092007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12710
12711 * remote-utils.c (monitor_output): Constify msg parameter.
12712 * server.h (monitor_output): Likewise.
12713 * win32-i386-low.c (handle_output_debug_string): New.
12714 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12715 handle_output_debug_string.
12716 (get_child_debug_event): Likewise.
12717
506c7aa0
DJ
127182007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12719
12720 * server.c (main): Correct strtoul check.
12721
42c81e2a
DJ
127222007-03-27 Jon Ringle <jon@ringle.org>
12723
12724 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12725
9453113a
DJ
127262007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12727
12728 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12729
64a69107
DJ
127302007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12731
12732 * terminal.h: Check HAVE_SGTTY_H.
12733
127342007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12735
12736 * remote-utils.c (remote_open): Print out the assigned port number.
12737
c74d0ad8
DJ
127382007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12739
12740 * remote-utils.c (monitor_output): New function.
12741 * server.c (debug_threads): Define here.
12742 (monitor_show_help): New function.
12743 (handle_query): Handle qRcmd.
12744 (main): Do not handle 'd' packet.
12745 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12746 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12747 of debug_threads.
12748
de7c3b4a
PA
127492007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12750
12751 * Makefile.in (EXEEXT): New.
12752 (clean): Use $(EXEEXT).
12753
ef57601b
PA
127542007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12755
12756 * target.h (target_ops): Rename send_signal to request_interrupt,
12757 and remove enum target_signal parameter.
12758 * linux-low.c (linux_request_interrupt): Rename from
12759 linux_send_signal, and always send SIGINT.
12760 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12761 and always send SIGINT.
12762 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12763 of send_signal.
12764 (input_interrupt): Likewise.
12765
820f2bda
PA
127662007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12767
12768 * server.c (get_features_xml): Check if target implemented
12769 arch_string.
12770 * win32-i386-low.c (win32_arch_string): New.
12771 (win32_target_ops): Add win32_arch_string as arch_string member.
12772
ab39bf24
UW
127732007-02-22 Markus Deuling <deuling@de.ibm.com>
12774
12775 * spu-low.c (spu_arch_string): New.
12776 (spu_target_ops): Add spu_arch_string.
12777
61ff6e04
DJ
127782007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12779
12780 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12781 * configure.ac: Do not check for terminal.h.
12782 * configure, config.in: Regenerated.
12783
fb1e4ffc
DJ
127842007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12785
12786 * Makefile.in (OBS): Add $(XML_BUILTIN).
12787 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12788 (clean): Update.
12789 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12790 (arm-with-iwmmxt.c): New.
12791 * config.in, configure: Regenerate.
12792 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12793 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12794 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12795 (arm*-*-linux*): Add iWMMXt and regset support.
12796 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12797 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12798 (arm_store_wmmxregset, target_regsets): New.
12799 * server.c (get_features_xml): Take annex argument. Check builtin
12800 XML documents.
12801 (handle_query): Handle multiple annexes.
12802
0f48aa01
DJ
128032007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12804
12805 * remote-utils.c [USE_WIN32API] (read, write): Define.
12806 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12807 write.
12808
23181151
DJ
128092007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12810
12811 * linux-i386-low.c (the_low_target): Set arch_string.
12812 * linux-x86-64-low.c (the_low_target): Likewise.
12813 * linux-low.c (linux_arch_string): New.
12814 (linux_target_ops): Add it.
12815 * linux-low.h (struct linux_target_ops): Add arch_string.
12816 * server.c (write_qxfer_response): Use const void * for DATA.
12817 (get_features_xml): New.
12818 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12819 * target.h (struct target_ops): Add arch_string method.
12820
9d606399
DJ
128212007-01-03 Denis Pilat <denis.pilat@st.com>
12822 Daniel Jacobowitz <dan@codesourcery.com>
12823
12824 * linux-low.c (linux_kill): Handle being called with no threads.
12825 * win32-i386-low.c (win32_kill): Likewise.
12826 (get_child_debug_event): Clear current_process_handle.
12827
128282006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12829 Daniel Jacobowitz <dan@codesourcery.com>
12830
12831 * remote-utils.c (remote_open): Check the type of specified
12832 serial port devices before opening them.
12833 * server.c (main): Kill the inferior if an error occurs during
12834 the first remote_open.
12835
a5e13d24
DJ
128362006-12-05 Markus Deuling <deuling@de.ibm.com>
12837
12838 * README: Update supported targets.
12839
186947f7
DJ
128402006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12841
12842 * Makefile.in (clean): Remove reg-mips64.c.
12843 (reg-mips64.c, reg-mips64.o): New rules.
12844 * configure.srv: Handle mips64. Include regset support for mips.
12845 * linux-mips-low.c (union mips_register): New.
12846 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12847 (mips_breakpoint, mips_breakpoint_at): Use int.
12848 (mips_collect_register, mips_supply_register)
12849 (mips_collect_register_32bit, mips_supply_register_32bit)
12850 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12851 (mips_store_fpregset, target_regsets): New.
12852 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12853
a13e2c95
UW
128542006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12855
12856 * configure.srv: Add target "spu*-*-*".
12857 * Makefile.in (clean): Remove reg-spu.c.
12858 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12859 * spu-low.c: New file.
12860
cb7283db
DJ
128612006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12862
12863 * configure.ac: Correct td_thr_tls_get_addr test.
12864 * configure: Regenerated.
12865
89be2091
DJ
128662006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12867
12868 * linux-low.c (linux_wait_for_event): Reformat. Use the
12869 pass_signals array.
12870 * remote-utils.c (decode_address_to_semicolon): New.
12871 * server.c (pass_signals, handle_general_set): New.
12872 (handle_query): Mention QPassSignals for qSupported.
12873 (main): Call handle_general_set.
12874 * server.h (pass_signals, decode_address_to_semicolon): New.
12875
000ef4f0
DJ
128762006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12877
12878 * server.c (handle_query): Correct error handling for read_auxv.
12879
b7149293
UW
128802005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12881
12882 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12883 and srv_linux_thread_db to yes.
12884 * linux-s390-low.c (s390_fill_gregset): New function.
12885 (target_regsets): Define data structure.
12886
dae5f5cf
DJ
128872006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12888
12889 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12890 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12891 * config.in, configure: Regenerated.
12892 * inferiors.c (gdb_id_to_thread): New function.
12893 (gdb_id_to_thread_id): Use it.
12894 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12895 * linux-low.h (struct process_info): Add th member.
12896 (thread_db_get_tls_address): New prototype.
12897 * remote-utils.c (decode_address): Make non-static.
12898 * server.c (handle_query): Handle qGetTLSAddr.
12899 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12900 * target.h (struct target_ops): Add get_tls_address.
12901 * thread-db.c (maybe_attach_thread): Save the thread handle.
12902 (thread_db_get_tls_address): New.
12903
32ca6d61
DJ
129042006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12905
12906 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12907 (linux_resume_one_process): Take a siginfo_t *. Update all
12908 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12909 (struct pending_signals): Add a siginfo_t.
12910 (linux_wait_for_process): Always set last_status.
12911 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12912 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12913 * linux-low.h (struct process_info): Add last_status.
12914
5ffff7c1
DJ
129152006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12916
12917 * remote-utils.c (try_rle): New function.
12918 (putpkt_binary): Use it.
12919
8695c747
DJ
129202006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12921
12922 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12923 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12924 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12925 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12926 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12927 point registers.
12928
290fadea
RS
129292006-08-08 Richard Sandiford <richard@codesourcery.com>
12930
12931 * server.c (terminal_fd): New variable.
12932 (old_foreground_pgrp): Likewise.
12933 (restore_old_foreground_pgrp): New function.
12934 (start_inferior): Record the terminal file descriptor in terminal_fd
12935 and its original foreground group in old_foreground_pgrp. Register
12936 restore_old_foreground_pgrp with atexit().
12937
9f2e1e63
DJ
129382006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12939
12940 * server.c (handle_query): Correct qPart to qXfer.
12941
b80864fb
DJ
129422006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12943
12944 * configure.ac: Check for more headers which are missing on
12945 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12946 * configure.srv: Add Cygwin and mingw32.
12947 * remote-utils.c: Don't include headers unconditionally which
12948 are missing on mingw32. Include <winsock.h> for mingw32.
12949 (remote_open): Adjust for mingw32 support. Flush
12950 standard error after writing to it.
12951 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12952 (unblock_async_io, enable_async_io, disable_async_io)
12953 (readchar, getpkt): Update for Winsock support.
12954 (prepare_resume_reply): Expect a protocol signal number.
12955 * server.c: Disable <sys/wait.h> on mingw32.
12956 (start_inferior): Adjust for mingw32 support. Flush
12957 standard error after writing to it.
12958 (attach_inferior): Likewise. Use protocol signal
12959 numbers.
12960 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12961 and names.
12962 * win32-i386-low.c: New file.
12963 * Makefile.in (XM_CLIBS): Set.
12964 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12965 (win32-i386-low.o): New dependency rule.
12966 * linux-low.c (linux_wait): Use target signal numbers.
12967 * target.h (struct target_ops): Doc fix.
12968 * server.h (target_signal_to_name): New prototype.
12969 * gdbreplay.c: Don't include headers unconditionally which
12970 are missing on mingw32. Include <winsock.h> for mingw32.
12971 (remote_close, remote_open): Adjust for Winsock support.
12972 * configure, config.in: Regenerated.
12973
0876f84a
DJ
129742006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12975
12976 * server.c (decode_xfer_read, write_qxfer_response): New.
12977 (handle_query): Take a packet length argument. Handle
12978 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12979 the qSupported response.
12980 (main): Update call to handle_query.
12981
01f9e8fa
DJ
129822006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12983
12984 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12985 (putpkt_binary): Renamed from putpkt and adjusted for binary
12986 data.
12987 (putpkt): New wrapper for putpkt_binary.
12988 (readchar): Don't mask off the high bit.
12989 (decode_X_packet): New function.
12990 * server.c (main): Call putpkt_binary if a handler sets the packet
12991 length. Save the length of the incoming packet. Handle 'X'.
12992 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12993
be2a5f71
DJ
129942006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12995
12996 * server.c (handle_query): Handle qSupported.
12997
ea025f5f
DJ
129982006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12999
13000 * remote-utils.c (all_symbols_looked_up): New variable.
13001 (look_up_one_symbol): Check it.
13002 * server.h (look_up_one_symbol): New declaration.
13003 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13004
9308fc88
DJ
130052006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13006
13007 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13008 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13009 (PTRACE_GET_THREAD_AREA): Define.
13010 (ps_get_thread_area): New function.
13011
52fb6437
NS
130122006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13013
13014 * configure.srv (m68k*-*-uclinux*): New target.
13015 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13016 (linux_resume_one_process): Remove extraneous cast.
13017 (linux_read_offsets): New.
13018 (linux_target_op): Add linux_read_offsets on mmuless systems.
13019 * server.c (handle_query): Add qOffsets logic.
13020 * target.h (struct target_ops): Add read_offsets.
13021
21b0f40c
DJ
130222006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13023
13024 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13025 (PTRACE_GET_THREAD_AREA): Define.
13026 (ps_get_thread_area): New function.
13027 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13028 (linux-x86-64-low.o): Update.
13029
0050a760
DJ
130302006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13031
13032 * configure.ac: Remove checks for prfpregset_t.
13033 * gdb_proc_service.h: New file.
13034 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13035 new "gdb_proc_service.h".
13036 * proc-service.c: Likewise.
13037 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13038 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13039 * Makefile.in (gdb_proc_service_h): Updated.
13040 * configure, config.in: Regenerated.
13041
b92a518e
DJ
130422006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13043
13044 * remote-utils.c (prepare_resume_reply): Move declaration
13045 of gdb_id_from_wait to the top of the block.
13046
545587ee
DJ
130472006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13048
13049 * linux-low.c (regsets_store_inferior_registers): Read the regset
13050 from the target before filling it.
13051
9db87ebd
DJ
130522006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13053
13054 * server.c (attach_inferior): Return SIGTRAP for a successful
13055 attach.
13056
dd24457d
DJ
130572006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13058
13059 * Makefile.in (OBS): Add version.o.
13060 (STAGESTUFF): Delete.
13061 (version.o): Add dependencies.
13062 (version.c): Replace rule.
13063 (clean): Remove version.c.
13064 * server.c (gdbserver_version): New.
13065 (gdbserver_usage): Use printf.
13066 (main): Handle --version and --help.
13067 * server.h (version, host_name): Add declarations.
13068
6f0f660e
EZ
130692005-12-23 Eli Zaretskii <eliz@gnu.org>
13070
889bf7c5
PA
13071 * linux-arm-low.c:
13072 * linux-arm-low.c:
13073 * inferiors.c:
13074 * i387-fp.h:
13075 * i387-fp.c:
13076 * gdbreplay.c:
13077 * regcache.c:
13078 * proc-service.c:
13079 * mem-break.h:
13080 * mem-break.c:
13081 * linux-x86-64-low.c:
13082 * linux-sh-low.c:
13083 * linux-s390-low.c:
13084 * linux-ppc64-low.c:
13085 * linux-ppc-low.c:
13086 * linux-mips-low.c:
13087 * linux-m68k-low.c:
13088 * linux-m32r-low.c:
13089 * linux-low.h:
13090 * linux-low.c:
13091 * linux-ia64-low.c:
13092 * linux-i386-low.c:
13093 * linux-crisv32-low.c:
13094 * thread-db.c:
13095 * terminal.h:
13096 * target.h:
13097 * target.c:
13098 * server.h:
13099 * server.c:
13100 * remote-utils.c:
13101 * regcache.h:
13102 * utils.c:
13103 * Makefile.in:
13104 * configure.ac:
6f0f660e
EZ
13105 * gdbserver.1: Add (C) after Copyright. Update the FSF
13106 address.
13107
9d1fb177
DJ
131082005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13109
13110 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13111 (arm_breakpoint_at): Recognize both breakpoints.
13112 (the_low_target): Use the correct breakpoint instruction.
13113
011a70c2
DJ
131142005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13115
13116 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13117 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13118 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13119 (the_low_target): Update.
13120
7fb85e41
AS
131212005-10-25 Andreas Schwab <schwab@suse.de>
13122
13123 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13124
13125 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13126 (ia64_num_regs): Reduce to 462.
13127
3db0444b
DJ
131282005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13129
13130 * acinclude.m4: Correct quoting.
13131 * aclocal.m4: Regenerated.
13132
13133 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13134 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13135 (thread_db_init): Call thread_db_err_str.
13136 * configure.ac: Check for TD_VERSION.
13137 * config.in, configure: Regenerated.
13138
bee0189a
DJ
131392005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13140
13141 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13142
e9d25b98
DJ
131432005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13144
13145 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13146 is not available. Define HAVE_PTRACE_GETREGS if it is.
13147 * config.in, configure: Regenerated.
13148 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13149 * linux-i386-low.c, linux-m68k-low.c: Update to use
13150 HAVE_PTRACE_GETREGS.
13151 * linux-low.c (regsets_fetch_inferior_registers)
13152 (regsets_store_inferior_registers): Only return 0 if we processed
13153 GENERAL_REGS.
13154 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13155 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13156
a06660f7
DJ
131572005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13158
13159 * inferiors.c (struct thread_info): Add gdb_id.
13160 (add_thread): Add gdb_id argument.
13161 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13162 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13163 calls to add_thread.
13164 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13165 * server.c (handle_query): Use thread_to_gdb_id.
13166 (handle_v_cont, main): Use gdb_id_to_thread_id.
13167 * server.h (add_thread): Update prototype.
13168 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13169 prototypes.
13170
5a1f5858
DJ
131712005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13172
13173 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13174 left-padded registers.
13175 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13176 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13177
e122f1f5
SE
131782005-07-01 Steve Ellcey <sje@cup.hp.com>
13179
13180 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13181 * configure: Regenerate.
13182 * config.in: Regenerate.
13183 * server.h (NEED_DECLARATION_STRERROR):
13184 Replace with !HAVE_DECL_STRERROR.
13185
d592fa2f
DJ
131862005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13187
13188 * linux-low.c (linux_wait, linux_send_signal): Don't test
13189 an unsigned long variable for > 0 if it could be MAX_ULONG.
13190 * server.c (myresume): Likewise.
13191 * target.c (set_desired_inferior): Likewise.
13192
ccbd4912
MK
131932005-06-13 Mark Kettenis <kettenis@gnu.org>
13194
13195 * configure.ac: Simplify and improve check for socklen_t.
13196 * configure, config.in: Regenerate.
13197
f450004a
DJ
131982005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13199
13200 * acconfig.h: Remove.
13201 * configure.ac: Add a test for socklen_t. Use three-argument
13202 AC_DEFINE throughout.
13203 * config.in: Regenerated using autoheader 2.59.
13204 * configure: Regenerated.
13205
13206 * gdbreplay.c (socklen_t): Provide a default.
13207 (remote_open): Use socklen_t.
13208 * remote-utils.c (socklen_t): Provide a default.
13209 (remote_open): Use socklen_t.
13210 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13211 unsigned char.
13212
13213 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13214 char for buffers.
13215 * linux-low.c (linux_read_memory, linux_write_memory)
13216 (linux_read_auxv): Likewise.
13217 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13218 (check_mem_write): Likewise.
13219 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13220 Likewise.
13221 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13222 (registers_from_string, register_data): Likewise.
13223 * server.c (handle_query, main): Likewise.
13224 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13225 (decode_M_packet): Likewise.
13226 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13227 * target.h (struct target_ops): Update read_memory, write_memory,
13228 and read_auxv.
13229 (read_inferior_memory, write_inferior_memory): Update.
13230 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13231 to unsigned char *.
13232 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13233 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13234 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13235 linux-s390-low.c, linux-sh-low.c: Update for changes in
13236 read_inferior_memory and the_low_target->breakpoint.
13237
eee84df1
DJ
132382005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13239
13240 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13241 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13242 * configure.srv: Add powerpc64-*-linux*.
13243 * linux-ppc64-low.c: New file.
13244
45b134e5
OF
132452005-05-23 Orjan Friberg <orjanf@axis.com>
13246
13247 * linux-cris-low.c: New file with support for CRIS.
13248 * linux-crisv32-low.c: Ditto for CRISv32.
13249 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13250 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13251 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13252 reg-crisv32.o, and reg-crisv32.c to make rules.
13253 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13254 recognized targets.
13255
48d93c75
UW
132562005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13257
13258 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13259 of sizeof (PTRACE_XFER_TYPE).
13260 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13261
e013ee27
OF
132622005-05-12 Orjan Friberg <orjanf@axis.com>
13263
889bf7c5 13264 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13265 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13266 pointers for hardware watchpoint support.
13267 * linux-low.h (struct linux_target_ops): Ditto.
13268 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13269 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13270 to linux_target_ops.
13271 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13272 reply packet.
13273 * server.c (main): Recognize 'Z' and 'z' packets.
13274
b0ded00b
UW
132752005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13276
13277 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13278 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13279 (the_low_target): Add new members.
13280
8643e2ad
DJ
132812005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13282
13283 * proc-service.c (ps_lgetregs): Search all_processes instead of
13284 all_threads.
13285
fc620387
DJ
132862005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13287
13288 * server.c (start_inferior): Change return type to int.
13289 (attach_inferior): Change sigptr to int *.
13290 (handle_v_cont, handle_v_requests): Change signal to int *.
13291 (main): Change signal to int.
13292
132932005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13294
13295 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13296 * configure.srv: Add m32r*-*-linux*.
13297 * linux-m32r-low.c: New file.
13298
e0e76420
DJ
132992005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13300
13301 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13302
a1928bad
DJ
133032005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13304
13305 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13306 Take unsigned long arguments for PIDs.
13307 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13308 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13309 (wait_for_sigstop, linux_resume_one_process)
13310 (regsets_fetch_inferior_registers, linux_send_signal)
13311 (linux_read_auxv): Likewise. Update the types of variables holding
13312 PIDs. Update format string specifiers.
13313 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13314 * remote-utils.c (prepare_resume_reply): Likewise.
13315 * server.c (cont_thread, general_thread, step_thread)
13316 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13317 unsigned long.
13318 (handle_query): Update format specifiers.
13319 (handle_v_cont, main): Use strtoul for thread IDs.
13320 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13321 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13322 (general_thread, step_thread, thread_from_wait)
13323 (old_thread_from_wait): Update.
13324 * target.h (struct thread_resume): Use unsigned long for THREAD.
13325 (struct target_ops): Use unsigned long for arguments to attach and
13326 thread_alive.
13327
dcdb98d2
DJ
133282005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13329
13330 * acinclude.m4: Include bfd/bfd.m4 directly.
13331 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13332 <agriffis@toolchain.org>.
13333 * aclocal.m4, configure: Regenerated.
13334
bec39cab
AC
133352005-01-07 Andrew Cagney <cagney@gnu.org>
13336
13337 * configure.ac: Rename configure.in, require autoconf 2.59.
13338 * configure: Re-generate.
13339
434c4c77
DJ
133402004-12-08 Daniel Jacobowitz <dan@debian.org>
13341
13342 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13343 LIBS when finished.
13344 * aclocal.m4: Regenerated.
13345 * configure: Regenerated.
13346
db1d3e1b
AS
133472004-11-21 Andreas Schwab <schwab@suse.de>
13348
13349 * linux-m68k-low.c (m68k_num_gregs): Define.
13350 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13351 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13352 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13353 (m68k_breakpoint_at): New. Add to the_low_target.
13354
13355 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13356 srv_linux_thread_db to yes.
13357
43360365
JB
133582004-10-20 Joel Brobecker <brobecker@gnat.com>
13359
13360 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13361 (ARCH_SET_FS): Likewise.
13362 (ARCH_GET_FS): Likewise.
13363 (ARCH_GET_GS): Likewise.
13364
fd500816
DJ
133652004-10-16 Daniel Jacobowitz <dan@debian.org>
13366
13367 * linux-i386-low.c (ps_get_thread_area): New.
13368 * linux-x86-64-low.c (ps_get_thread_area): New.
13369 * linux-low.c: Include <sys/syscall.h>.
13370 (linux_kill_one_process): Don't kill the first thread here.
13371 (linux_kill): Kill the first thread here.
13372 (kill_lwp): New function.
13373 (send_sigstop, linux_send_signal): Use it.
13374 * proc-service.c: Clean up #ifdefs.
13375 (fpregset_info): Delete.
13376 (ps_lgetregs): Update and enable implementation.
13377 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13378 implementations.
13379 * remote-utils.c (struct sym_cache, symbol_cache): New.
13380 (input_interrupt): Print a clearer message.
13381 (async_io_enabled): New variable.
13382 (enable_async_io, disable_async_io): Use it. Update comments.
13383 (look_up_one_symbol): Use the symbol cache.
13384 * thread-db.c (thread_db_look_up_symbols): New function.
13385 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13386
f6de3c42
DJ
133872004-10-16 Daniel Jacobowitz <dan@debian.org>
13388
13389 * configure.in: Test for -rdynamic.
13390 * configure: Regenerated.
13391 * Makefile (INTERNAL_LDFLAGS): New.
13392 (gdbserver, gdbreplay): Use it.
13393
2c0fc042
AC
133942004-09-02 Andrew Cagney <cagney@gnu.org>
13395
13396 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13397
075b3282
DJ
133982004-03-23 Daniel Jacobowitz <drow@mvista.com>
13399
13400 * linux-low.c (linux_wait): Clear all_processes list also.
13401
fa6a77dc
DJ
134022004-03-12 Daniel Jacobowitz <drow@mvista.com>
13403
13404 * linux-low.c: Include <errno.h>. Remove extern declaration of
13405 errno.
13406
6d782a97
DJ
134072004-03-12 Daniel Jacobowitz <drow@mvista.com>
13408
13409 * gdbreplay.c, server.h, utils.c: Update copyright years.
13410
3a7fb99b
DJ
134112004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13412
13413 * server.c (main): Print child status or termination signal from
13414 variable 'signal', not 'sig'.
13415
c3e735a6
DJ
134162004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13417
13418 * linux-low.c (linux_read_memory): Change return type to
13419 int. Check for and return error from ptrace().
13420 * target.c (read_inferior_memory): Change return type to int. Pass
13421 back return status from the_target->read_memory().
13422 * target.h (struct target_ops): Adapt *read_memory() prototype.
13423 Update comment.
13424 (read_inferior_memory): Adapt prototype.
13425 * server.c (main): Return an error packet if
13426 read_inferior_memory() returns an error.
13427
a59d1c82
DJ
134282004-03-04 Daniel Jacobowitz <drow@mvista.com>
13429
13430 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13431 Unify with other clean targets.
13432
dc3f8883
DJ
134332004-02-29 Daniel Jacobowitz <drow@mvista.com>
13434
13435 * server.c (handle_v_cont): Call set_desired_inferior.
13436
89a208da
DJ
134372004-02-29 Daniel Jacobowitz <drow@mvista.com>
13438
13439 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13440
62ea82f5
DJ
134412004-02-29 Daniel Jacobowitz <drow@mvista.com>
13442
13443 * linux-low.c (linux_wait): Unblock async I/O.
13444 (linux_resume): Block and enable async I/O.
13445 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13446 * server.h (block_async_io, unblock_async_io): Add prototypes.
13447
6910d122
DJ
134482004-02-29 Daniel Jacobowitz <drow@mvista.com>
13449
13450 * remote-utils.c (remote_open): Print a status notice after
13451 opening a TCP port.
13452 * server.c (attach_inferior): Print a status notice after
13453 attaching.
13454
134552004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
13456
13457 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13458
c89dc5d4
DJ
134592004-02-26 Daniel Jacobowitz <drow@mvista.com>
13460
13461 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13462 error packet.
13463 * server.c, target.h: Update copyright years.
13464
4b8dad4a
RM
134652004-02-25 Roland McGrath <roland@redhat.com>
13466
13467 * target.h (struct target_ops): New member `read_auxv'.
13468 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13469 * linux-low.c (linux_read_auxv): New function.
13470 (linux_target_ops): Initialize `read_auxv' member to that.
13471
d7446758
JB
134722004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13473
13474 Committed by Jim Blandy <jimb@redhat.com>.
13475
13476 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 13477 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
13478 instead of GPR_SIZE to distiguish s390 and s390x targets.
13479
5544ad89
DJ
134802004-01-31 Daniel Jacobowitz <drow@mvista.com>
13481
13482 * linux-low.c: Update copyright year.
13483 (check_removed_breakpoint): Clear pending_is_breakpoint.
13484 (linux_set_resume_request, linux_queue_one_thread)
13485 (resume_status_pending_p): New functions.
13486 (linux_continue_one_thread): Use process->resume.
13487 (linux_resume): Only resume threads if there are no pending events.
13488 * linux-low.h (struct process_info): Add resume request
13489 pointer.
13490
2a68b70e
DJ
134912004-01-30 Daniel Jacobowitz <drow@mvista.com>
13492
13493 * regcache.c (new_register_cache): Clear the allocated register
13494 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13495
64386c31
DJ
134962003-10-13 Daniel Jacobowitz <drow@mvista.com>
13497
13498 * linux-low.c (linux_resume): Take a struct thread_resume *
13499 argument.
13500 (linux_wait): Update call.
13501 (resume_ptr): New static variable.
13502 (linux_continue_one_thread): Renamed from
13503 linux_continue_one_process. Use resume_ptr.
13504 (linux_resume): Use linux_continue_one_thread.
13505 * server.c (handle_v_cont, handle_v_requests): New functions.
13506 (myresume): New function.
13507 (main): Handle 'v' case.
13508 * target.h (struct thread_resume): New type.
13509 (struct target_ops): Change argument of "resume" to struct
13510 thread_resume *.
13511 (myresume): Delete macro.
13512
c938e9b0
L
135132003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13514
13515 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13516 (uninstall): Support DESTDIR.
13517
7f313d07
BC
13518Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13519
13520 * configure.srv: Add xscale*linux copy of arm*linux entry.
13521
3b2fc2ea
DJ
135222003-07-24 Daniel Jacobowitz <drow@mvista.com>
13523
13524 * linux-arm-low.c (arm_reinsert_addr): New function.
13525 (the_low_target): Add arm_reinsert_addr.
13526
1c0a559e
MK
135272003-07-08 Mark Kettenis <kettenis@gnu.org>
13528
13529 * mem-break.c: Remove whitespace at end of file.
13530
43d5792c
DJ
135312003-06-28 Daniel Jacobowitz <drow@mvista.com>
13532
13533 * configure.in: Check whether we need to prototype strerror.
13534 * server.h: Optionally prototype strerror.
13535 * gdbreplay.c (perror_with_name): Use strerror.
13536 * linux-low.c (linux_attach_lwp): Use strerror.
13537 * utils.c (perror_with_name): Use strerror.
13538 * config.in, configure: Regenerated.
13539
c8a86edf
DJ
135402003-06-28 Daniel Jacobowitz <drow@mvista.com>
13541
13542 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13543 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13544
73d37363
DJ
135452003-06-20 Daniel Jacobowitz <drow@mvista.com>
13546
13547 * Makefile.in (SFILES): Update.
13548 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13549 low-sun3.c: Remove files.
13550
6ad8ae5c
DJ
135512003-06-17 Daniel Jacobowitz <drow@mvista.com>
13552
13553 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13554 (linux_detach_one_process, linux_detach): New functions.
13555 (linux_target_ops): Add linux_detach.
13556 * server.c (main): Handle 'D' packet.
13557 * target.h (struct target_ops): Add "detach" member.
13558 (detach_inferior): Define.
13559
1581182a
MK
135602003-06-13 Mark Kettenis <kettenis@gnu.org>
13561
13562 From Kelley Cook <kelleycook@wideopenwest.com>:
13563 * configure.srv: Accept i[34567]86 variants.
13564
e5379b03
DJ
135652003-06-05 Daniel Jacobowitz <drow@mvista.com>
13566
13567 * linux-low.c (linux_wait_for_event): Correct comment typos.
13568 (linux_resume_one_process): Call check_removed_breakpoint.
13569 (linux_send_signal): New function.
13570 (linux_target_ops): Add linux_send_signal.
13571 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13572 of kill.
13573 * target.h (struct target_ops): Add send_signal.
13574
2ff29de4
JB
135752003-05-29 Jim Blandy <jimb@redhat.com>
13576
13577 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13578 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13579 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13580 away part of the register's value.
13581
254787d4
DJ
135822003-03-26 Daniel Jacobowitz <drow@mvista.com>
13583
13584 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13585 (linux_wait_for_event, linux_init_signals): Likewise.
13586
94e10508
DJ
135872003-03-17 Daniel Jacobowitz <drow@mvista.com>
13588
13589 * configure.in: Check for stdlib.h.
13590 * configure: Regenerated.
13591 * config.in: Regenerated.
13592
4c0711e0
DJ
135932003-01-04 Andreas Schwab <schwab@suse.de>
13594
13595 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13596
ef66e766
AC
135972003-01-02 Andrew Cagney <ac131313@redhat.com>
13598
13599 * Makefile.in: Remove obsolete code.
13600
a1358604
DJ
136012002-11-20 Daniel Jacobowitz <drow@mvista.com>
13602
13603 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13604 defined(PT_FPR0_HI).
13605
23ce3b1c
DJ
136062002-11-17 Stuart Hughes <seh@zee2.com>
13607
13608 * linux-arm-low.c (arm_num_regs): Increase.
13609 (arm_regmap): Include status register.
13610
136112002-11-17 Daniel Jacobowitz <drow@mvista.com>
13612
13613 * linux-low.c (register_addr): Remove incorrect -1 check.
13614
a9fa9f7d
DJ
136152002-08-29 Daniel Jacobowitz <drow@mvista.com>
13616
13617 * linux-low.c (linux_create_inferior): Call setpgid. Return
13618 the new PID.
13619 (unstopped_p, linux_signal_pid): Remove.
13620 (linux_target_ops): Remove linux_signal_pid.
13621 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13622 global instead of target method.
13623 * target.h (struct target_ops): Remove signal_pid. Update comment
13624 for create_inferior.
13625 * server.c (signal_pid): New variable.
13626 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 13627 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
13628 (attach_inferior): Set signal_pid.
13629
17574093
DJ
136302002-08-23 Daniel Jacobowitz <drow@mvista.com>
13631
13632 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13633
136342002-08-20 Jim Blandy <jimb@redhat.com>
13635
13636 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13637 default for this.
13638
136392002-08-01 Andrew Cagney <cagney@redhat.com>
13640
13641 * Makefile.in: Make chill references obsolete.
13642
136432002-07-24 Kevin Buettner <kevinb@redhat.com>
13644
13645 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13646 * configure: Regenerate.
13647 * config.in: Regenerate.
13648
136492002-07-09 David O'Brien <obrien@FreeBSD.org>
13650
13651 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13652 (perror_with_name, remote_close, remote_open, expect, play): Static.
13653
136542002-07-04 Michal Ludvig <mludvig@suse.cz>
13655
4b8dad4a 13656 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
13657 byte offsets instead of an array of indexes.
13658 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13659
136602002-06-13 Daniel Jacobowitz <drow@mvista.com>
13661
13662 * regcache.c: Add comment.
13663
136642002-06-11 Daniel Jacobowitz <drow@mvista.com>
13665
13666 * thread-db.c: New file.
13667 * proc-service.c: New file.
13668 * acinclude.m4: New file.
13669 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13670 proc-service.o, and thread-db.o.
13671 (linux-low.o): Add USE_THREAD_DB.
13672 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13673 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13674 * aclocal.m4: Regenerated.
13675 * config.in: Regenerated.
13676 * configure: Regenerated.
13677 * configure.in: Check for proc_service.h, sys/procfs.h,
13678 thread_db.h, and linux/elf.h headrs.
13679 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13680 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13681 Check for -lthread_db and thread support.
13682 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13683 PowerPC, and SuperH.
13684 * i387-fp.c: Constify arguments.
13685 * i387-fp.h: Likewise.
13686 * inferiors.c: (struct thread_info): Renamed from
13687 `struct inferior_info'. Remove PID member. Use generic inferior
13688 list header. All uses updated.
13689 (inferiors, signal_pid): Removed.
13690 (all_threads): New variable.
13691 (get_thread): Define.
13692 (add_inferior_to_list): New function.
13693 (for_each_inferior): New function.
13694 (change_inferior_id): New function.
13695 (add_inferior): Removed.
13696 (remove_inferior): New function.
13697 (add_thread): New function.
13698 (free_one_thread): New function.
13699 (remove_thread): New function.
13700 (clear_inferiors): Use for_each_inferior and free_one_thread.
13701 (find_inferior): New function.
13702 (find_inferior_id): New function.
13703 (inferior_target_data): Update argument type.
13704 (set_inferior_target_data): Likewise.
13705 (inferior_regcache_data): Likewise.
13706 (set_inferior_regcache_data): Likewise.
13707 * linux-low.c (linux_bp_reinsert): Remove.
13708 (all_processes, stopping_threads, using_thrads)
13709 (struct pending_signals, debug_threads, pid_of): New.
13710 (inferior_pid): Replace with macro.
13711 (struct inferior_linux_data): Remove.
13712 (get_stop_pc, add_process): New functions.
13713 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13714 Use add_process and add_thread.
13715 (linux_attach_lwp): New function, based on old linux_attach. Use
13716 add_process and add_thread. Set stop_expected for new threads.
13717 (linux_attach): New function.
13718 (linux_kill_one_process): New function.
13719 (linux_kill): Kill all LWPs.
13720 (linux_thread_alive): Use find_inferior_id.
13721 (check_removed_breakpoints, status_pending_p): New functions.
13722 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13723 Update. Use WNOHANG. Wait for cloned processes also. Update process
13724 struct for the found process.
13725 (linux_wait_for_event): New function.
13726 (linux_wait): Use it. Support LWPs.
13727 (send_sigstop, wait_for_sigstop, stop_all_processes)
13728 (linux_resume_one_process, linux_continue_one_process): New functions.
13729 (linux_resume): Support LWPs.
13730 (REGISTER_RAW_SIZE): Remove.
13731 (fetch_register): Use register_size instead. Call supply_register.
13732 (usr_store_inferior_registers): Likewise. Call collect_register.
13733 Fix recursive case.
13734 (regsets_fetch_inferior_registers): Improve error message.
13735 (regsets_store_inferior_registers): Add debugging.
13736 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13737 (unstopped_p, linux_signal_pid): New functions.
13738 (linux_target_ops): Add linux_signal_pid.
13739 (linux_init_signals): New function.
13740 (initialize_low): Call it. Initialize using_threads.
13741 * regcache.c (inferior_regcache_data): Add valid
13742 flag.
13743 (get_regcache): Fetch registers lazily. Add fetch argument
13744 and update all callers.
13745 (regcache_invalidate_one, regcache_invalidate): New
13746 functions.
13747 (new_register_cache): Renamed from create_register_cache.
13748 Return the new regcache.
13749 (free_register_cache): Change argument to a void *.
13750 (registers_to_string, registers_from_string): Call get_regcache
13751 with fetch flag set.
13752 (register_data): Make static. Pass fetch flag to get_regcache.
13753 (supply_register): Call get_regcache with fetch flag clear.
13754 (collect_register): Call get_regcache with fetch flag set.
13755 (collect_register_as_string): New function.
13756 * regcache.h: Update.
13757 * remote-utils.c (putpkt): Flush after debug output and use
13758 stderr.
13759 Handle input interrupts while waiting for an ACK.
13760 (input_interrupt): Use signal_pid method.
13761 (getpkt): Flush after debug output and use stderr.
13762 (outreg): Use collect_register_as_string.
13763 (new_thread_notify, dead_thread_notify): New functions.
13764 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13765 and general_thread.
13766 (look_up_one_symbol): Flush after debug output.
13767 * server.c (step_thread, server_waiting): New variables.
13768 (start_inferior): Don't use signal_pid. Update call to mywait.
13769 (attach_inferior): Update call to mywait.
13770 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13771 (main): Don't fetch/store registers explicitly. Use
13772 set_desired_inferior. Support proposed ``Hs'' packet. Update
13773 calls to mywait.
13774 * server.h: Update.
13775 (struct inferior_list, struct_inferior_list_entry): New.
13776 * target.c (set_desired_inferior): New.
13777 (write_inferior_memory): Constify.
13778 (mywait): New function.
13779 * target.h: Update.
13780 (struct target_ops): New signal_pid method.
13781 (mywait): Removed macro, added prototype.
13782
13783 * linux-low.h (regset_func): Removed.
13784 (regset_fill_func, regset_store_func): New.
13785 (enum regset_type): New.
13786 (struct regset_info): Add type field. Use new operation types.
13787 (struct linux_target_ops): stop_pc renamed to get_pc.
13788 Add decr_pc_after_break and breakpoint_at.
13789 (get_process, get_thread_proess, get_process_thread)
13790 (strut process_info, all_processes, linux_attach_lwp)
13791 (thread_db_init): New.
13792
13793 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13794 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13795 (the_low_target): Add new members.
13796 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13797 (i386_store_fpxregset): Constify.
13798 (target_regsets): Add new kind identifier.
13799 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13800 (i386_set_pc): Add debugging.
13801 (i386_breakpoint_at): New function.
13802 (the_low_target): Add new members.
13803 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13804 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13805 (mips_breakpoint_at): New.
13806 (the_low_target): Add new members.
13807 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13808 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13809 (the_low_target): Add new members.
13810 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13811 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13812 (the_low_target): Add new members.
13813 * linux-x86-64-low.c (target_regsets): Add new kind
13814 identifier.
13815
138162002-05-15 Daniel Jacobowitz <drow@mvista.com>
13817
13818 From Martin Pool <mbp@samba.org>:
13819 * server.c (gdbserver_usage): New function.
13820 (main): Call it.
13821
138222002-05-14 Daniel Jacobowitz <drow@mvista.com>
13823
13824 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13825 stop_at -> stop_pc.
13826
138272002-05-04 Andrew Cagney <ac131313@redhat.com>
13828
13829 * Makefile.in: Remove obsolete code.
13830
138312002-04-24 Michal Ludvig <mludvig@suse.cz>
13832
13833 * linux-low.c (regsets_fetch_inferior_registers),
13834 (regsets_store_inferior_registers): Removed cast to int from
13835 ptrace() calls.
13836 * regcache.h: Added declaration of struct inferior_info.
13837
138382002-04-20 Daniel Jacobowitz <drow@mvista.com>
13839
13840 * inferiors.c (struct inferior_info): Add regcache_data.
13841 (add_inferior): Call create_register_cache.
13842 (clear_inferiors): Call free_register_cache.
13843 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13844 * regcache.c (struct inferior_regcache_data): New.
13845 (registers): Remove.
13846 (get_regcache): New function.
13847 (create_register_cache, free_register_cache): New functions.
13848 (set_register_cache): Don't initialize the register cache here.
13849 (registers_to_string, registers_from_string, register_data): Call
13850 get_regcache.
13851 * regcache.h: Add prototypes.
13852 * server.h: Likewise.
13853
138542002-04-20 Daniel Jacobowitz <drow@mvista.com>
13855
13856 * mem-break.c: New file.
13857 * mem-break.h: New file.
13858 * Makefile.in: Add mem-break.o rule; update server.h
13859 dependencies.
13860 * inferiors.c (struct inferior_info): Add target_data
13861 member.
13862 (clear_inferiors): Free target_data member if set.
13863 (inferior_target_data, set_inferior_target_data): New functions.
13864 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13865 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13866 * linux-low.c (linux_bp_reinsert): New variable.
13867 (struct inferior_linux_data): New.
13868 (linux_create_inferior): Use set_inferior_target_data.
13869 (linux_attach): Likewise. Call add_inferior.
13870 (linux_wait_for_one_inferior): New function.
13871 (linux_wait): Call it.
13872 (linux_write_memory): Add const.
13873 (initialize_low): Call set_breakpoint_data.
13874 * linux-low.h (struct linux_target_ops): Add breakpoint
13875 handling members.
13876 * server.c (attach_inferior): Remove extra add_inferior
13877 call.
13878 * server.h: Include mem-break.h. Update inferior.c
13879 prototypes.
13880 * target.c (read_inferior_memory)
13881 (write_inferior_memory): New functions.
13882 * target.h (read_inferior_memory)
13883 (write_inferior_memory): Change macros to prototypes.
13884 (struct target_ops): Update comments. Add const to write_memory
13885 definition.
13886
138872002-04-11 Daniel Jacobowitz <drow@mvista.com>
13888
13889 * linux-low.c (usr_store_inferior_registers): Support
13890 registers which are allowed to fail to store.
13891 * linux-low.h (linux_target_ops): Likewise.
13892 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13893 (ppc_cannot_store_register): FPSCR may not be storable.
13894
138952002-04-09 Daniel Jacobowitz <drow@mvista.com>
13896
13897 * server.h: Include <string.h> if HAVE_STRING_H.
13898 * ChangeLog: Correct paths in last ChangeLog entry.
13899
139002002-04-09 Daniel Jacobowitz <drow@mvista.com>
13901
13902 * linux-low.h: Remove obsolete prototypes.
13903 (struct linux_target_ops): New.
13904 (extern the_low_target): New.
13905 * linux-low.c (num_regs, regmap): Remove declarations.
13906 (register_addr): Use the_low_target explicitly.
13907 (fetch_register): Likewise.
13908 (usr_fetch_inferior_registers): Likewise.
13909 (usr_store_inferior_registers): Likewise.
13910 * linux-arm-low.c (num_regs): Remove.
13911 (arm_num_regs): Define.
13912 (arm_regmap): Renamed from regmap, made static.
13913 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13914 made static.
13915 (arm_cannot_store_register): Renamed from cannot_store_register,
13916 made static.
13917 (the_low_target): New.
13918 * linux-i386-low.c (num_regs): Remove.
13919 (i386_num_regs): Define.
13920 (i386_regmap): Renamed from regmap, made static.
13921 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13922 made static.
13923 (i386_cannot_store_register): Renamed from cannot_store_register,
13924 made static.
13925 (the_low_target): New.
13926 * linux-ia64-low.c (num_regs): Remove.
13927 (ia64_num_regs): Define.
13928 (ia64_regmap): Renamed from regmap, made static.
13929 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13930 made static.
13931 (ia64_cannot_store_register): Renamed from cannot_store_register,
13932 made static.
13933 (the_low_target): New.
13934 * linux-m68k-low.c (num_regs): Remove.
13935 (m68k_num_regs): Define.
13936 (m68k_regmap): Renamed from regmap, made static.
13937 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13938 made static.
13939 (m68k_cannot_store_register): Renamed from cannot_store_register,
13940 made static.
13941 (the_low_target): New.
13942 * linux-mips-low.c (num_regs): Remove.
13943 (mips_num_regs): Define.
13944 (mips_regmap): Renamed from regmap, made static.
13945 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13946 made static.
13947 (mips_cannot_store_register): Renamed from cannot_store_register,
13948 made static.
13949 (the_low_target): New.
13950 * linux-ppc-low.c (num_regs): Remove.
13951 (ppc_num_regs): Define.
13952 (ppc_regmap): Renamed from regmap, made static.
13953 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13954 made static.
13955 (ppc_cannot_store_register): Renamed from cannot_store_register,
13956 made static.
13957 (the_low_target): New.
13958 * linux-s390-low.c (num_regs): Remove.
13959 (s390_num_regs): Define.
13960 (s390_regmap): Renamed from regmap, made static.
13961 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13962 made static.
13963 (s390_cannot_store_register): Renamed from cannot_store_register,
13964 made static.
13965 (the_low_target): New.
13966 * linux-sh-low.c (num_regs): Remove.
13967 (sh_num_regs): Define.
13968 (sh_regmap): Renamed from regmap, made static.
13969 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13970 made static.
13971 (sh_cannot_store_register): Renamed from cannot_store_register,
13972 made static.
13973 (the_low_target): New.
13974 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13975 (the_low_target): New.
13976
139772002-04-09 Daniel Jacobowitz <drow@mvista.com>
13978
13979 * Makefile.in: Add stamp-h target.
13980 * configure.in: Create stamp-h.
13981 * configure: Regenerated.
13982
139832002-04-09 Daniel Jacobowitz <drow@mvista.com>
13984
13985 * inferiors.c: New file.
13986 * target.c: New file.
13987 * target.h: New file.
13988 * Makefile.in: Add target.o and inferiors.o. Update
13989 dependencies.
13990 * linux-low.c (inferior_pid): New static variable,
13991 moved from server.c.
13992 (linux_create_inferior): Renamed from create_inferior.
13993 Call add_inferior. Return 0 on success instead of a PID.
13994 (linux_attach): Renamed from myattach.
13995 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13996 (linux_thread_alive): Renamed from mythread_alive.
13997 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13998 child dies.
13999 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14000 (regsets_store_inferior_registers): Correct error message.
14001 Add missing ``return 0''.
14002 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14003 (linux_store_registers): Renamed from store_inferior_registers.
14004 (linux_read_memory): Renamed from read_inferior_memory.
14005 (linux_write_memory): Renamed from write_inferior_memory.
14006 (linux_target_ops): New structure.
14007 (initialize_low): Call set_target_ops ().
14008 * remote-utils.c (unhexify): New function.
14009 (hexify): New function.
14010 (input_interrupt): Send signals to ``signal_pid''.
14011 * server.c (inferior_pid): Remove.
14012 (start_inferior): Update create_inferior call.
14013 (attach_inferior): Call add_inferior.
14014 (handle_query): New function.
14015 (main): Call handle_query for `q' packets.
14016 * server.h: Include "target.h". Remove obsolete prototypes.
14017 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14018
140192002-04-09 Daniel Jacobowitz <drow@mvista.com>
14020
14021 * Makefile.in: Add WARN_CFLAGS. Update configury
14022 dependencies.
14023 * configure.in: Check for <string.h>
14024 * configure: Regenerate.
14025 * config.in: Regenerate.
14026 * gdbreplay.c: Include needed system headers.
14027 (remote_open): Remove strchr prototype.
14028 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14029 * regcache.c (supply_register): Change buf argument to const void *.
14030 (supply_register_by_name): Likewise.
14031 (collect_register): Change buf argument to void *.
14032 (collect_register_by_name): Likewise.
14033 * regcache.h: Add missing prototypes.
14034 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14035 * server.c (handle_query): New function.
14036 (attached): New static variable, moved out of main.
14037 (main): Quiet longjmp clobber warnings.
14038 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14039 * utils.c (error): Remove NORETURN.
14040 (fatal): Likewise.