Fix PR gdb/19250: ptrace prototype is not detected properly in C++ mode
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2016-04-18 Pedro Alves <palves@redhat.com>
2
3 * configure: Regenerate.
4
5 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
6
7 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8 (aarch64_emit_sub): Likewise.
9
10 2016-04-12 Pedro Alves <palves@redhat.com>
11
12 * utils.c (prepare_to_throw_exception): Delete.
13
14 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
15
16 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
17
18 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
19
20 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
21
22 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
23
24 * linux-aarch64-ipa.c: Add <elf.h> include.
25 * linux-ppc-ipa.c: Add <elf.h> include.
26 * linux-s390-ipa.c: Add <elf.h> include.
27
28 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
29
30 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
31 (get_raw_reg_ptr): Likewise.
32 (get_trace_state_variable_value_ptr): Likewise.
33 (set_trace_state_variable_value_ptr): Likewise.
34 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
35 char *.
36
37 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
38 Marcin Kościelnicki <koriakin@0x04.net>
39
40 PR/17221
41 * linux-ppc-low.c (emit_insns): New function.
42 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
43 (ppc_emit_prologue): New function.
44 (ppc_emit_epilogue): New function.
45 (ppc_emit_add): New function.
46 (ppc_emit_sub): New function.
47 (ppc_emit_mul): New function.
48 (ppc_emit_lsh): New function.
49 (ppc_emit_rsh_signed): New function.
50 (ppc_emit_rsh_unsigned): New function.
51 (ppc_emit_ext): New function.
52 (ppc_emit_zero_ext): New function.
53 (ppc_emit_log_not): New function.
54 (ppc_emit_bit_and): New function.
55 (ppc_emit_bit_or): New function.
56 (ppc_emit_bit_xor): New function.
57 (ppc_emit_bit_not): New function.
58 (ppc_emit_equal): New function.
59 (ppc_emit_less_signed): New function.
60 (ppc_emit_less_unsigned): New function.
61 (ppc_emit_ref): New function.
62 (ppc_emit_const): New function.
63 (ppc_emit_reg): New function.
64 (ppc_emit_pop): New function.
65 (ppc_emit_stack_flush): New function.
66 (ppc_emit_swap): New function.
67 (ppc_emit_stack_adjust): New function.
68 (ppc_emit_call): New function.
69 (ppc_emit_int_call_1): New function.
70 (ppc_emit_void_call_2): New function.
71 (ppc_emit_if_goto): New function.
72 (ppc_emit_goto): New function.
73 (ppc_emit_eq_goto): New function.
74 (ppc_emit_ne_goto): New function.
75 (ppc_emit_lt_goto): New function.
76 (ppc_emit_le_goto): New function.
77 (ppc_emit_gt_goto): New function.
78 (ppc_emit_ge_goto): New function.
79 (ppc_write_goto_address): New function.
80 (ppc_emit_ops_impl): New static variable.
81 (ppc64v1_emit_prologue): New function.
82 (ppc64v2_emit_prologue): New function.
83 (ppc64_emit_epilogue): New function.
84 (ppc64_emit_add): New function.
85 (ppc64_emit_sub): New function.
86 (ppc64_emit_mul): New function.
87 (ppc64_emit_lsh): New function.
88 (ppc64_emit_rsh_signed): New function.
89 (ppc64_emit_rsh_unsigned): New function.
90 (ppc64_emit_ext): New function.
91 (ppc64_emit_zero_ext): New function.
92 (ppc64_emit_log_not): New function.
93 (ppc64_emit_bit_and): New function.
94 (ppc64_emit_bit_or): New function.
95 (ppc64_emit_bit_xor): New function.
96 (ppc64_emit_bit_not): New function.
97 (ppc64_emit_equal): New function.
98 (ppc64_emit_less_signed): New function.
99 (ppc64_emit_less_unsigned): New function.
100 (ppc64_emit_ref): New function.
101 (ppc64_emit_const): New function.
102 (ppc64v1_emit_reg): New function.
103 (ppc64v2_emit_reg): New function.
104 (ppc64_emit_pop): New function.
105 (ppc64_emit_stack_flush): New function.
106 (ppc64_emit_swap): New function.
107 (ppc64v1_emit_call): New function.
108 (ppc64v2_emit_call): New function.
109 (ppc64v1_emit_int_call_1): New function.
110 (ppc64v2_emit_int_call_1): New function.
111 (ppc64v1_emit_void_call_2): New function.
112 (ppc64v2_emit_void_call_2): New function.
113 (ppc64_emit_if_goto): New function.
114 (ppc64_emit_eq_goto): New function.
115 (ppc64_emit_ne_goto): New function.
116 (ppc64_emit_lt_goto): New function.
117 (ppc64_emit_le_goto): New function.
118 (ppc64_emit_gt_goto): New function.
119 (ppc64_emit_ge_goto): New function.
120 (ppc64v1_emit_ops_impl): New static variable.
121 (ppc64v2_emit_ops_impl): New static variable.
122 (ppc_emit_ops): New function.
123 (linux_low_target): Wire in ppc_emit_ops.
124
125 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
126 Marcin Kościelnicki <koriakin@0x04.net>
127
128 PR/17221
129 * Makefile.in: Add powerpc-*-ipa.o
130 * configure.srv: Add ipa_obj for powerpc*-linux.
131 * linux-ppc-ipa.c: New file.
132 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
133 includes.
134 (PPC_FIELD): New macro.
135 (PPC_SEXT): New macro.
136 (PPC_OP6): New macro.
137 (PPC_BO): New macro.
138 (PPC_LI): New macro.
139 (PPC_BD): New macro.
140 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
141 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
142 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
143 (ppc_get_thread_area): New function.
144 (is_elfv2_inferior): New function.
145 (gen_ds_form): New function.
146 (GEN_STD): New macro.
147 (GEN_STDU): New macro.
148 (GEN_LD): New macro.
149 (GEN_LDU): New macro.
150 (gen_d_form): New function.
151 (GEN_ADDI): New macro.
152 (GEN_ADDIS): New macro.
153 (GEN_LI): New macro.
154 (GEN_LIS): New macro.
155 (GEN_ORI): New macro.
156 (GEN_ORIS): New macro.
157 (GEN_LWZ): New macro.
158 (GEN_STW): New macro.
159 (GEN_STWU): New macro.
160 (gen_xfx_form): New function.
161 (GEN_MFSPR): New macro.
162 (GEN_MTSPR): New macro.
163 (GEN_MFCR): New macro.
164 (GEN_MTCR): New macro.
165 (GEN_SYNC): New macro.
166 (GEN_LWSYNC): New macro.
167 (gen_x_form): New function.
168 (GEN_OR): New macro.
169 (GEN_MR): New macro.
170 (GEN_LWARX): New macro.
171 (GEN_STWCX): New macro.
172 (GEN_CMPW): New macro.
173 (gen_md_form): New function.
174 (GEN_RLDICL): New macro.
175 (GEN_RLDICR): New macro.
176 (gen_i_form): New function.
177 (GEN_B): New macro.
178 (GEN_BL): New macro.
179 (gen_b_form): New function.
180 (GEN_BNE): New macro.
181 (GEN_LOAD): New macro.
182 (GEN_STORE): New macro.
183 (gen_limm): New function.
184 (gen_atomic_xchg): New function.
185 (gen_call): New function.
186 (ppc_relocate_instruction): New function.
187 (ppc_install_fast_tracepoint_jump_pad): New function.
188 (ppc_get_min_fast_tracepoint_insn_len): New function.
189 (ppc_get_ipa_tdesc_idx): New function.
190 (the_low_target): Wire in the new functions.
191 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
192 tdescs.
193 * linux-ppc-tdesc.h: New file.
194
195 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
196
197 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
198 (alloc_jump_pad_buffer): New function.
199 * linux-amd64-ipa.c: Add <sys/mman.h> include.
200 (alloc_jump_pad_buffer): New function.
201 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
202 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
203 (alloc_jump_pad_buffer): New function.
204 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
205 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
206 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
207 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
208
209 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
210
211 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
212 * linux-amd64-ipa.c: Likewise.
213 * linux-i386-ipa.c: Likewise.
214 * linux-s390-ipa.c: Likewise.
215 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
216 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
217 set_trace_state_variable_value_ptr.
218 (struct ipa_sym_addresses): Likewise.
219 (symbol_list): Likewise.
220 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
221 accessing gdb_collect directly.
222 (gdb_collect_ptr_type): New typedef.
223 (get_raw_reg_ptr_type): New typedef.
224 (get_trace_state_variable_value_ptr_type): New typedef.
225 (set_trace_state_variable_value_ptr_type): New typedef.
226 (gdb_collect_ptr): New global.
227 (get_raw_reg_ptr): New global.
228 (get_trace_state_variable_value_ptr): New global.
229 (set_trace_state_variable_value_ptr): New global.
230 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
231 accessing get_raw_reg directly.
232 (get_get_tsv_func_addr): Likewise for
233 get_trace_state_variable_value_ptr.
234 (get_set_tsv_func_addr): Likewise for
235 set_trace_state_variable_value_ptr.
236 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
237
238 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
239
240 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
241
242 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
243
244 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
245 packets.
246 (relocate_instruction): Remove own_buf.
247 * server.c (own_buf): Make global.
248 (handle_v_requests): Make global.
249 * server.h (own_buf): New declaration.
250 (handle_v_requests): New prototype.
251
252 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
253
254 PR 18377
255 * linux-s390-low.c (add_insns): New function.
256 (s390_emit_prologue): New function.
257 (s390_emit_epilogue): New function.
258 (s390_emit_add): New function.
259 (s390_emit_sub): New function.
260 (s390_emit_mul): New function.
261 (s390_emit_lsh): New function.
262 (s390_emit_rsh_signed): New function.
263 (s390_emit_rsh_unsigned): New function.
264 (s390_emit_ext): New function.
265 (s390_emit_log_not): New function.
266 (s390_emit_bit_and): New function.
267 (s390_emit_bit_or): New function.
268 (s390_emit_bit_xor): New function.
269 (s390_emit_bit_not): New function.
270 (s390_emit_equal): New function.
271 (s390_emit_less_signed): New function.
272 (s390_emit_less_unsigned): New function.
273 (s390_emit_ref): New function.
274 (s390_emit_if_goto): New function.
275 (s390_emit_goto): New function.
276 (s390_write_goto_address): New function.
277 (s390_emit_litpool): New function.
278 (s390_emit_const): New function.
279 (s390_emit_call): New function.
280 (s390_emit_reg): New function.
281 (s390_emit_pop): New function.
282 (s390_emit_stack_flush): New function.
283 (s390_emit_zero_ext): New function.
284 (s390_emit_swap): New function.
285 (s390_emit_stack_adjust): New function.
286 (s390_emit_set_r2): New function.
287 (s390_emit_int_call_1): New function.
288 (s390_emit_void_call_2): New function.
289 (s390_emit_eq_goto): New function.
290 (s390_emit_ne_goto): New function.
291 (s390_emit_lt_goto): New function.
292 (s390_emit_le_goto): New function.
293 (s390_emit_gt_goto): New function.
294 (s390_emit_ge_goto): New function.
295 (s390x_emit_prologue): New function.
296 (s390x_emit_epilogue): New function.
297 (s390x_emit_add): New function.
298 (s390x_emit_sub): New function.
299 (s390x_emit_mul): New function.
300 (s390x_emit_lsh): New function.
301 (s390x_emit_rsh_signed): New function.
302 (s390x_emit_rsh_unsigned): New function.
303 (s390x_emit_ext): New function.
304 (s390x_emit_log_not): New function.
305 (s390x_emit_bit_and): New function.
306 (s390x_emit_bit_or): New function.
307 (s390x_emit_bit_xor): New function.
308 (s390x_emit_bit_not): New function.
309 (s390x_emit_equal): New function.
310 (s390x_emit_less_signed): New function.
311 (s390x_emit_less_unsigned): New function.
312 (s390x_emit_ref): New function.
313 (s390x_emit_if_goto): New function.
314 (s390x_emit_const): New function.
315 (s390x_emit_call): New function.
316 (s390x_emit_reg): New function.
317 (s390x_emit_pop): New function.
318 (s390x_emit_stack_flush): New function.
319 (s390x_emit_zero_ext): New function.
320 (s390x_emit_swap): New function.
321 (s390x_emit_stack_adjust): New function.
322 (s390x_emit_int_call_1): New function.
323 (s390x_emit_void_call_2): New function.
324 (s390x_emit_eq_goto): New function.
325 (s390x_emit_ne_goto): New function.
326 (s390x_emit_lt_goto): New function.
327 (s390x_emit_le_goto): New function.
328 (s390x_emit_gt_goto): New function.
329 (s390x_emit_ge_goto): New function.
330 (s390_emit_ops): New function.
331 (struct linux_target_ops): Fill in emit_ops hook.
332
333 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
334
335 PR 18377
336 * Makefile.in: Add s390 IPA files.
337 * configure.srv: Build IPA for s390.
338 * linux-s390-ipa.c: New file.
339 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
340 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
341 (tdesc_s390_linux32): Likewise.
342 (init_registers_s390_linux32v1): Likewise.
343 (tdesc_s390_linux32v1): Likewise.
344 (init_registers_s390_linux32v2): Likewise.
345 (tdesc_s390_linux32v2): Likewise.
346 (init_registers_s390_linux64): Likewise.
347 (tdesc_s390_linux64): Likewise.
348 (init_registers_s390_linux64v1): Likewise.
349 (tdesc_s390_linux64v1): Likewise.
350 (init_registers_s390_linux64v2): Likewise.
351 (tdesc_s390_linux64v2): Likewise.
352 (init_registers_s390_te_linux64): Likewise.
353 (tdesc_s390_te_linux64): Likewise.
354 (init_registers_s390_vx_linux64): Likewise.
355 (tdesc_s390_vx_linux64): Likewise.
356 (init_registers_s390_tevx_linux64): Likewise.
357 (tdesc_s390_tevx_linux64): Likewise.
358 (init_registers_s390x_linux64): Likewise.
359 (tdesc_s390x_linux64): Likewise.
360 (init_registers_s390x_linux64v1): Likewise.
361 (tdesc_s390x_linux64v1): Likewise.
362 (init_registers_s390x_linux64v2): Likewise.
363 (tdesc_s390x_linux64v2): Likewise.
364 (init_registers_s390x_te_linux64): Likewise.
365 (tdesc_s390x_te_linux64): Likewise.
366 (init_registers_s390x_vx_linux64): Likewise.
367 (tdesc_s390x_vx_linux64): Likewise.
368 (init_registers_s390x_tevx_linux64): Likewise.
369 (tdesc_s390x_tevx_linux64): Likewise.
370 (have_hwcap_s390_vx): New static variable.
371 (s390_arch_setup): Fill have_hwcap_s390_vx.
372 (s390_get_thread_area): New function.
373 (s390_ft_entry_gpr_esa): New const.
374 (s390_ft_entry_gpr_zarch): New const.
375 (s390_ft_entry_misc): New const.
376 (s390_ft_entry_fr): New const.
377 (s390_ft_entry_vr): New const.
378 (s390_ft_main_31): New const.
379 (s390_ft_main_64): New const.
380 (s390_ft_exit_fr): New const.
381 (s390_ft_exit_vr): New const.
382 (s390_ft_exit_misc): New const.
383 (s390_ft_exit_gpr_esa): New const.
384 (s390_ft_exit_gpr_zarch): New const.
385 (append_insns): New function.
386 (s390_relocate_instruction): New function.
387 (s390_install_fast_tracepoint_jump_pad): New function.
388 (s390_get_min_fast_tracepoint_insn_len): New function.
389 (s390_get_ipa_tdesc_idx): New function.
390 (struct linux_target_ops): Wire in the above functions.
391 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
392 * linux-s390-tdesc.h: New file.
393
394 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
395
396 * linux-s390-low.c (s390_supports_tracepoints): New function.
397 (struct linux_target_ops): Fill supports_tracepoints hook.
398
399 2016-03-18 Yao Qi <yao.qi@linaro.org>
400
401 * linux-low.c (lwp_signal_can_be_delivered): New function.
402 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
403
404 2016-03-18 Yao Qi <yao.qi@linaro.org>
405
406 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
407 0 if signal is enqueued. Remove 'signal' from one debugging
408 message. Move one debugging message to some lines below.
409 Remove code setting 'signal' to 0.
410
411 2016-03-18 Yao Qi <yao.qi@linaro.org>
412
413 * linux-low.c (linux_low_filter_event): Remove redundant
414 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
415
416 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
417
418 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
419 (struct linux_target_ops): Wire in the above.
420
421 2016-03-03 Yao Qi <yao.qi@linaro.org>
422
423 * linux-low.c: Update comments to start_step_over.
424
425 2016-03-03 Yao Qi <yao.qi@linaro.org>
426
427 PR server/19736
428 * linux-low.c (handle_extended_wait): Set child suspended
429 if event_lwp->bp_reinsert isn't zero.
430
431 2016-03-02 Yao Qi <yao.qi@linaro.org>
432
433 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
434 enqueue_pending_signal.
435
436 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
437
438 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
439 is actually loaded.
440
441 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
442
443 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
444 (s390_regmap_3264) [!__s390x__]: New global.
445 (s390_collect_ptrace_register): Skip map entries containing -1.
446 (s390_supply_ptrace_register): Ditto.
447 (s390_fill_gprs_high): New function.
448 (s390_store_gprs_high): New function.
449 (s390_regsets): Add NT_S390_HIGH_GPRS.
450 (s390_get_hwcap): Enable on 31-bit.
451 (have_hwcap_s390_high_gprs): Enable on 31-bit.
452 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
453 Detect NT_S390_HIGH_GPRS.
454 (s390_usrregs_info_3264): Enable on 31-bit.
455 (s390_regs_info): Enable regs_info_3264 on 31-bit.
456 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
457
458 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
459
460 PR gdb/13808
461 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
462 * configure.srv: Ditto.
463 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
464 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
465 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
466 (init_registers_amd64_linux): Remove prototype.
467 (tdesc_amd64_linux): Remove declaration.
468 (get_ipa_tdesc): New function.
469 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
470 initialize remaining tdescs.
471 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
472 (init_registers_i386_linux): Remove prototype.
473 (tdesc_i386_linux): Remove declaration.
474 (get_ipa_tdesc): New function.
475 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
476 initialize remaining tdescs.
477 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
478 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
479 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
480 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
481 (x86_get_ipa_tdesc_idx): New function.
482 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
483 * linux-x86-tdesc.h: New file.
484 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
485 (target_get_ipa_tdesc_idx): New macro.
486 * tracepoint.c (ipa_tdesc_idx): New macro.
487 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
488 (symbol_list): Add ipa_tdesc_idx.
489 (cmd_qtstart): Write ipa_tdesc_idx in the target.
490 (ipa_tdesc): Remove.
491 (ipa_tdesc_idx): New variable.
492 (get_context_regcache): Use get_ipa_tdesc.
493 (gdb_collect): Ditto.
494 (gdb_probe): Ditto.
495 * tracepoint.h (get_ipa_tdesc): New prototype.
496 (ipa_tdesc): Remove.
497
498 2016-02-24 Pedro Alves <palves@redhat.com>
499
500 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
501 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
502 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
503 Factor out common code between the USE_SIGTRAP_SIGINFO and
504 !USE_SIGTRAP_SIGINFO blocks.
505 (linux_low_filter_event): Call save_stop_reason instead of
506 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
507 Update comments.
508 (linux_wait_1): Update comments.
509
510 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
511
512 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
513 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
514 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
515 ppc_insert_point, ppc_remove_point.
516
517 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
518
519 * linux-s390-low.c (s390_supports_z_point_type): New function.
520 (struct linux_target_ops): Wire s390_supports_z_point_type in.
521
522 2016-02-16 Yao Qi <yao.qi@linaro.org>
523
524 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
525 PC. Get pc from regcache_read_pc.
526
527 2016-02-12 Yao Qi <yao.qi@linaro.org>
528
529 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
530 or linux_get_pc_32bit.
531 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
532
533 2016-02-12 Yao Qi <yao.qi@linaro.org>
534
535 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
536 arm_linux_get_next_pcs_fixup.
537
538 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
539
540 * tracepoint.c (x_tracepoint_action_download): Change
541 write_inferior_data_ptr to write_inferior_data_pointer.
542 (cmd_qtstart): Likewise.
543 (write_inferior_data_ptr): Remove.
544 (download_agent_expr): Change write_inferior_data_ptr to
545 write_inferior_data_pointer.
546 (download_tracepoint_1): Likewise.
547 (download_tracepoint): Likewise.
548 (download_trace_state_variables): Likewise.
549
550 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
551 Marcin Kościelnicki <koriakin@0x04.net>
552
553 * tracepoint.c (struct tracepoint_action_ops): Remove.
554 (struct tracepoint_action): Remove ops.
555 (m_tracepoint_action_download, r_tracepoint_action_download)
556 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
557 size and offset accordingly.
558 (m_tracepoint_action_ops, r_tracepoint_action_ops)
559 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
560 (tracepoint_action_send, tracepoint_action_download): New functions.
561 Helpers for trace action handlers.
562 (add_tracepoint_action): Remove setup actions ops.
563 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
564
565 2016-02-10 Yao Qi <yao.qi@linaro.org>
566
567 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
568
569 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
570
571 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
572 to AC_OUTPUT.
573 * configure: Regenerate.
574
575 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
576
577 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
578 void * to gdb_byte *.
579 * linux-low.c (siginfo_fixup): Likewise.
580 (linux_xfer_siginfo): Likewise.
581 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
582 Likewise.
583 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
584
585 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
586
587 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
588 to srv_tgtobj.
589 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
590 to srv_tgtobj.
591 * linux-x86-low.c [__x86_64__]: Include
592 "nat/amd64-linux-siginfo.h".
593 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
594 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
595 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
596 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
597 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
598 (cpt_si_fd, si_timerid, si_overrun): Move from
599 nat/amd64-linux-siginfo.c.
600 * Makefile.in (amd64-linux-siginfo.o:): New rule.
601
602 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
603
604 * server.c (skip_to_semicolon): Remove.
605 (process_point_options): Use strchrnul instead of
606 skip_to_semicolon.
607
608 2016-01-26 Yao Qi <yao.qi@linaro.org>
609
610 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
611 * linux-low.c (install_software_single_step_breakpoints): Don't
612 call regcache_read_pc.
613 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
614 argument pc.
615
616 2016-01-26 Yao Qi <yao.qi@linaro.org>
617
618 * linux-low.c (install_software_single_step_breakpoints): Call
619 regcache_read_pc instead of get_pc.
620
621 2016-01-26 Yao Qi <yao.qi@linaro.org>
622
623 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
624 (unblock_async_io): Rename to ...
625 (block_unblock_async_io): ... it. New function.
626 (enable_async_io): Don't install SIGIO handler. Unblock it
627 instead.
628 (disable_async_io): Don't ignore SIGIO. Block it instead.
629 (initialize_async_io): Install SIGIO handler. Don't call
630 unblock_async_io.
631
632 2016-01-26 Yao Qi <yao.qi@linaro.org>
633
634 * remote-utils.c (getpkt): If the buffer isn't empty, and the
635 first character is '\003', call *the_target->request_interrupt.
636
637 2016-01-25 Yao Qi <yao.qi@linaro.org>
638
639 * remote-utils.c (new_thread_notify): Remove.
640 (dead_thread_notify): Likewise.
641 * remote-utils.h (new_thread_notify): Remove declaration.
642 (dead_thread_notify): Likewise.
643
644 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
645
646 * gdb.trace/pending.exp: Fix expected message on continue.
647
648 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
649
650 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
651 it works properly on big-endian machines where sizeof (CORE_ADDR)
652 != sizeof (void *).
653
654 2016-01-21 Pedro Alves <palves@redhat.com>
655
656 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
657 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
658 * configure: Regenerate.
659
660 2016-01-21 Yao Qi <yao.qi@linaro.org>
661
662 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
663 is_thumb and set it according to CPSR saved on the stack.
664 (get_next_pcs_syscall_next_pc): Pass is_thumb to
665 arm_sigreturn_next_pc.
666
667 2016-01-18 Yao Qi <yao.qi@linaro.org>
668
669 * linux-low.c (linux_set_pc_64bit): New function.
670 (linux_get_pc_64bit): New function.
671 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
672 Declare.
673 * linux-sparc-low.c (debug_threads): Remove declaration.
674 (sparc_get_pc): Remove.
675 (the_low_target): Use linux_get_pc_64bit instead of
676 sparc_get_pc.
677 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
678 (the_low_target): Use linux_get_pc_64bit and
679 linux_set_pc_64bit.
680
681 2016-01-18 Yao Qi <yao.qi@linaro.org>
682
683 * linux-arm-low.c (debug_threads): Remove declaration.
684 (arm_get_pc, arm_set_pc): Remove.
685 (the_low_target): Use linux_get_pc_32bit and
686 linux_set_pc_32bit.
687 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
688 (the_low_target): Use linux_get_pc_32bit and
689 linux_set_pc_32bit.
690 * linux-cris-low.c (debug_threads): Remove declaration.
691 (cris_get_pc, cris_set_pc,): Remove.
692 (the_low_target): Use linux_get_pc_32bit and
693 linux_set_pc_32bit.
694 * linux-crisv32-low.c (debug_threads): Remove declaration.
695 (cris_get_pc, cris_set_pc): Remove.
696 (the_low_target): Use linux_get_pc_32bit and
697 linux_set_pc_32bit.
698 * linux-low.c: Include inttypes.h.
699 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
700 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
701 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
702 (the_low_target): Use linux_get_pc_32bit and
703 linux_set_pc_32bit.
704 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
705 (the_low_target): Use linux_get_pc_32bit and
706 linux_set_pc_32bit.
707 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
708 (the_low_target): Use linux_get_pc_32bit and
709 linux_set_pc_32bit.
710 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
711 (the_low_target): Use linux_get_pc_32bit and
712 linux_set_pc_32bit.
713 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
714 (the_low_target): Use linux_get_pc_32bit and
715 linux_set_pc_32bit.
716
717 2016-01-18 Gary Benson <gbenson@redhat.com>
718
719 * configure.ac (AC_FUNC_FORK): New check.
720 * config.in: Regenerate.
721 * configure: Likewise.
722
723 2016-01-14 Yao Qi <yao.qi@linaro.org>
724
725 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
726 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
727 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
728 arm_get_next_pcs_ctor.
729
730 2016-01-12 Josh Stone <jistone@redhat.com>
731 Philippe Waroquiers <philippe.waroquiers@skynet.be>
732
733 * inferiors.h: Include "gdb_vecs.h".
734 (struct process_info): Add syscalls_to_catch.
735 * inferiors.c (remove_process): Free syscalls_to_catch.
736 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
737 syscall_return stops.
738 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
739 * server.c (handle_general_set): Handle QCatchSyscalls.
740 (handle_query): Report support for QCatchSyscalls.
741 * target.h (struct target_ops): Add supports_catch_syscall.
742 (target_supports_catch_syscall): New macro.
743 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
744 (struct lwp_info): Add syscall_state.
745 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
746 Maintain syscall_state and syscalls_to_catch across exec.
747 (get_syscall_trapinfo): New function, proxy to the_low_target.
748 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
749 (linux_low_filter_event): Toggle syscall_state entry/return for
750 syscall traps, and set it ignored for all others.
751 (gdb_catching_syscalls_p): New function.
752 (gdb_catch_this_syscall_p): New function.
753 (linux_wait_1): Handle SYSCALL_SIGTRAP.
754 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
755 (linux_supports_catch_syscall): New function.
756 (linux_target_ops): Install it.
757 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
758 (the_low_target): Install it.
759
760 2016-01-12 Mike Frysinger <vapier@gentoo.org>
761
762 * acinclude.m4: Include new ../warning.m4 file.
763 * configure: Regenerated.
764 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
765
766 2016-01-12 Mike Frysinger <vapier@gentoo.org>
767
768 * ax.c (is_goto_target): Mark static.
769 * linux-low.c (register_addr): Likewise.
770 (linux_fetch_registers, linux_store_registers): Likewise.
771 * mem-break.c (any_persistent_commands): Fix old prototype.
772 (add_commands_to_breakpoint): Mark static.
773 * regcache.c (find_register_by_name): Delete unused func.
774 * remote-utils.c (hex_or_minus_one): Mark static.
775 * server.c (monitor_show_help): Mark static.
776 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
777 handle_v_requests): Likewise.
778
779 2016-01-12 Pedro Alves <palves@redhat.com>
780
781 Remove use of the registered trademark symbol throughout.
782
783 2016-01-08 Yao Qi <yao.qi@linaro.org>
784
785 * remote-utils.c (getpkt): If c is '\003', call target hook
786 request_interrupt.
787
788 2016-01-06 Yao Qi <yao.qi@linaro.org>
789
790 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
791 linux-aarch32-low.c.
792 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
793 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
794 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
795 (thumb2_breakpoint): Declare.
796 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
797 linux-aarch32-low.h.
798 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
799 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
800 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
801
802 2016-01-01 Joel Brobecker <brobecker@adacore.com>
803
804 * gdbreplay.c (gdbreplay_version): Change copyright year in
805 version message.
806 * server.c (gdbserver_version): Likewise.
807
808 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
809
810 * server.c (crc32_table): Delete.
811 (crc32): Use libiberty's xcrc32 function.
812
813 2015-12-22 Joel Brobecker <brobecker@adacore.com>
814
815 * lynx-low.c (lynx_delete_thread_callback): New function.
816 (lynx_mourn): Properly delete our process and all of its
817 threads. Remove call to clear_inferiors.
818
819 2015-12-22 Joel Brobecker <brobecker@adacore.com>
820
821 * target.c (thread_search_callback): Add check that
822 the thread_stopped target callback is not NULL before
823 calling it.
824
825 2015-12-21 Yao Qi <yao.qi@linaro.org>
826
827 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
828 arm breakpoint.
829
830 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
831
832 * server.c (handle_query): Call target_supports_software_single_step.
833
834 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
835
836 * linux-low.c (single_step): New function.
837 (linux_resume_one_lwp_throw): Call single_step.
838 (start_step_over): Likewise.
839
840 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
841
842 * Makefile.in (SFILES): Append arch/arm-linux.c,
843 arch/arm-get-next-pcs.c.
844 (arm-linux.o): New rule.
845 (arm-get-next-pcs.o): New rule.
846 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
847 arm-linux.o.
848 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
849 to linux-aarch32-low.c.
850 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
851 (arm_breakpoint_len, thumb_breakpoint): Likewise.
852 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
853 (thumb2_breakpoint_len): Likewise.
854 (arm_is_thumb_mode): Make non-static.
855 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
856 from linux-aarch32-low.c.
857 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
858 (arm_breakpoint_len, thumb_breakpoint): Likewise.
859 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
860 (thumb2_breakpoint_len): Likewise.
861 (arm_is_thumb_mode): New declaration.
862 * linux-arm-low.c: Include arch/arm-linux.h
863 aarch/arm-get-next-pcs.h, sys/syscall.h.
864 (get_next_pcs_ops): New struct.
865 (get_next_pcs_addr_bits_remove): New function.
866 (get_next_pcs_is_thumb): New function.
867 (get_next_pcs_read_memory_unsigned_integer): Likewise.
868 (arm_sigreturn_next_pc): Likewise.
869 (get_next_pcs_syscall_next_pc): Likewise.
870 (arm_gdbserver_get_next_pcs): Likewise.
871 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
872 Initialize.
873 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
874 * server.h: Include gdb_vecs.h.
875
876 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
877
878 * Makefile.in (SFILES): Append common/common-regcache.c.
879 (OBS): Append common-regcache.o.
880 (common-regcache.o): New rule.
881 * regcache.c (init_register_cache): Initialize cache to
882 REG_UNAVAILABLE.
883 (regcache_raw_read_unsigned): New function.
884 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
885 register_status enum.
886
887 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
888
889 * linux-aarch64-low.c (the_low_targets): Rename
890 breakpoint_reinsert_addr to get_next_pcs.
891 * linux-arm-low.c (the_low_targets): Likewise.
892 * linux-bfin-low.c (the_low_targets): Likewise.
893 * linux-cris-low.c (the_low_targets): Likewise.
894 * linux-crisv32-low.c (the_low_targets): Likewise.
895 * linux-low.c (can_software_single_step): Likewise.
896 (install_software_single_step_breakpoints): New function.
897 (start_step_over): Use install_software_single_step_breakpoints.
898 * linux-low.h: New CORE_ADDR vector.
899 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
900 get_next_pcs.
901 * linux-mips-low.c (the_low_targets): Likewise.
902 * linux-nios2-low.c (the_low_targets): Likewise.
903 * linux-sparc-low.c (the_low_targets): Likewise.
904
905 2015-12-17 Pedro Alves <palves@redhat.com>
906
907 * linux-low.c (linux_kill_one_lwp): Remove references to
908 LinuxThreads.
909 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
910 to 'kill'.
911 (linux_init_signals): Delete.
912 (initialize_low): Adjust.
913 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
914
915 2015-12-16 Pedro Alves <palves@redhat.com>
916
917 * configure.ac (compiler warning flags): When testing a
918 -Wno-foo option, check whether -Wfoo works instead.
919 * configure: Regenerate.
920
921 2015-12-11 Don Breazeal <donb@codesourcery.com>
922
923 * server.c (process_serial_event): Don't exit from gdbserver
924 in remote mode if there are still active inferiors.
925
926 2015-12-11 Yao Qi <yao.qi@linaro.org>
927
928 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
929 arm_breakpoint_at if the process is 32-bit.
930
931 2015-12-11 Yao Qi <yao.qi@linaro.org>
932
933 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
934 arm breakpoint.
935
936 2015-12-07 Yao Qi <yao.qi@linaro.org>
937
938 * configure.srv: Append arm.o to srv_tgtobj for
939 aarch64*-*-linux* target.
940 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
941 from linux-arm-low.c.
942 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
943 (arm_breakpoint_len, thumb_breakpoint): Likewise.
944 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
945 (thumb2_breakpoint_len): Likewise.
946 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
947 (arm_breakpoint_kinds): Likewise.
948 (arm_breakpoint_kind_from_pc): Likewise.
949 (arm_sw_breakpoint_from_kind): Likewise.
950 (arm_breakpoint_kind_from_current_state): Likewise.
951 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
952 (arm_sw_breakpoint_from_kind): Declare.
953 (arm_breakpoint_kind_from_current_state): Declare.
954 (arm_breakpoint_at): Declare.
955 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
956 arm_sw_breakpoint_from_kind if process is 32-bit.
957 (aarch64_breakpoint_kind_from_pc): New function.
958 (aarch64_breakpoint_kind_from_current_state): New function.
959 (the_low_target): Initialize fields breakpoint_kind_from_pc
960 and breakpoint_kind_from_current_state.
961 * linux-arm-low.c (arm_breakpoint_kinds): Move to
962 linux-aarch32-low.c.
963 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
964 (arm_breakpoint, arm_breakpoint_len): Likewise.
965 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
966 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
967 (arm_is_thumb_mode): Likewise.
968 (arm_breakpoint_at): Likewise.
969 (arm_breakpoint_kind_from_pc): Likewise.
970 (arm_sw_breakpoint_from_kind): Likewise.
971 (arm_breakpoint_kind_from_current_state): Likewise.
972
973 Revert:
974 2015-08-04 Yao Qi <yao.qi@linaro.org>
975
976 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
977 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
978 * server.c (extended_protocol): Remove "static".
979 * server.h (extended_protocol): Declare it.
980
981 2015-12-04 Josh Stone <jistone@redhat.com>
982
983 * target.h (struct target_ops) <arch_setup>: Rename to ...
984 (struct target_ops) <post_create_inferior>: ... this.
985 (target_arch_setup): Rename to ...
986 (target_post_create_inferior): ... this, calling post_create_inferior.
987 * server.c (start_inferior): Update target_arch_setup calls to
988 target_post_create_inferior.
989 * linux-low.c (linux_low_ptrace_options): Forward declare.
990 (linux_arch_setup): Update its comment for general use.
991 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
992 (struct linux_target_ops): Use linux_post_create_inferior.
993 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
994 to post_create_inferior.
995 * nto-low.c (struct nto_target_ops): Likewise.
996 * spu-low.c (struct spu_target_ops): Likewise.
997 * win32-low.c (struct win32_target_ops): Likewise.
998
999 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1000
1001 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1002
1003 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1004
1005 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1006 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1007 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1008 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1009 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1010 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1011 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1012 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1013 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1014 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1015 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1016 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1017
1018 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1019
1020 * linux-low.c (linux_look_up_symbols): Don't call
1021 linux_supports_traceclone.
1022 * linux-low.h (thread_db_init): Remove use_events argument.
1023 * thread-db.c (thread_db_use_event): Remove global variable.
1024 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1025 (struct thread_db) <td_create_bp>: Remove field.
1026 (thread_db_create_event): Remove function.
1027 (thread_db_enable_reporting): Likewise.
1028 (find_one_thread): Don't check for thread_db_use_events.
1029 (attach_thread): Likewise.
1030 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1031 (try_thread_db_load_1): Don't check for thread_db_use_events.
1032 (thread_db_init): Remove use_events argument and thread events
1033 handling.
1034 (remove_thread_event_breakpoints): Remove function.
1035 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1036
1037 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1038
1039 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1040 New function.
1041 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1042 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1043 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1044 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1045 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1046 Initialize.
1047 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1048 New function.
1049 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1050 * linux-low.c (can_hardware_single_step): Use
1051 supports_hardware_single_step.
1052 (can_software_single_step): New function.
1053 (start_step_over): Call can_software_single_step.
1054 (linux_supports_hardware_single_step): New function.
1055 (struct target_ops) <supports_software_single_step>: Initialize.
1056 * linux-low.h (struct linux_target_ops)
1057 <supports_hardware_single_step>: Initialize.
1058 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1059 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1060 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1061 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1062 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1063 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1064 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1065 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1066 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1067 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1068 Initialize.
1069 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1070 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1071 Initialize.
1072 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1073 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1074 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1075 New function.
1076 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1077 * target.h (struct target_ops): <supports_software_single_step>:
1078 New field.
1079 (target_supports_software_single_step): New macro.
1080
1081 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1082
1083 * linux-low.c (linux_wait_1): Fix pc advance condition.
1084 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1085 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1086
1087 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1088
1089 * linux-arm-low.c (arm_is_thumb_mode): New function.
1090 (arm_breakpoint_at): Use arm_is_thumb_mode.
1091 (arm_breakpoint_kind_from_current_state): New function.
1092 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1093 Initialize.
1094 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1095 (linux_breakpoint_kind_from_current_state): New function.
1096 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1097 * linux-low.h (struct linux_target_ops)
1098 <breakpoint_kind_from_current_state>: New field.
1099 * target.h (struct target_ops): Likewise.
1100 (target_breakpoint_kind_from_current_state): New macro.
1101
1102 2015-11-30 Pedro Alves <palves@redhat.com>
1103
1104 * linux-low.c (linux_resume): Wake up the event loop before
1105 returning.
1106
1107 2015-11-30 Pedro Alves <palves@redhat.com>
1108
1109 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1110 check.
1111 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1112 to -1.
1113 * target.c (struct thread_search): New structure.
1114 (thread_search_callback): New function.
1115 (prev_general_thread): New global.
1116 (prepare_to_access_memory, done_accessing_memory): New functions.
1117 * target.h (prepare_to_access_memory, done_accessing_memory):
1118 Replace macros with function declarations.
1119
1120 2015-11-30 Pedro Alves <palves@redhat.com>
1121
1122 PR 14618
1123 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1124 report TARGET_WAITKIND_NO_RESUMED.
1125 * remote-utils.c (prepare_resume_reply): Handle
1126 TARGET_WAITKIND_NO_RESUMED.
1127 * server.c (report_no_resumed): New global.
1128 (handle_query) <qSupported>: Handle "no-resumed+". Report
1129 "no-resumed+" support.
1130 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1131 return error if the client doesn't support no-resumed events.
1132 (push_stop_notification): New function.
1133 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1134 events if the client supports them.
1135
1136 2015-11-30 Pedro Alves <palves@redhat.com>
1137
1138 * linux-low.c (thread_still_has_status_pending_p): Don't check
1139 vCont;t here.
1140 (lwp_resumed): New function.
1141 (status_pending_p_callback): Return early if the LWP is not
1142 supposed to be resumed.
1143
1144 2015-11-30 Pedro Alves <palves@redhat.com>
1145
1146 * linux-low.c (handle_extended_wait): Assert that the LWP's
1147 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1148 thread create events, leave the new child's status pending.
1149 (linux_low_filter_event): If GDB wants to hear about thread exit
1150 events, leave the LWP marked dead and don't delete it.
1151 (linux_wait_for_event_filtered): Don't check for thread exit.
1152 (filter_exit_event): New function.
1153 (linux_wait_1): Use it, when returning an exit event.
1154 (linux_resume_one_lwp_throw): Assert that the LWP's
1155 waitstatus is TARGET_WAITKIND_IGNORE.
1156 * remote-utils.c (prepare_resume_reply): Handle
1157 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1158 * server.c (report_thread_events): New global.
1159 (handle_general_set): Handle QThreadEvents.
1160 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1161 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1162 TARGET_WAITKIND_THREAD_EXITED.
1163 * server.h (report_thread_events): Declare.
1164
1165 2015-11-30 Pedro Alves <palves@redhat.com>
1166
1167 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1168 the thread's last_resume_kind was resume_stop.
1169
1170 2015-11-30 Pedro Alves <palves@redhat.com>
1171
1172 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1173 before returning.
1174
1175 2015-11-30 Pedro Alves <palves@redhat.com>
1176
1177 * server.c (handle_v_requests): Handle vCtrlC.
1178
1179 2015-11-30 Pedro Alves <palves@redhat.com>
1180
1181 * gdbthread.h (find_any_thread_of_pid): Declare.
1182 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1183 functions.
1184 * server.c (handle_query): If current_thread is NULL, look for
1185 another thread of the selected process.
1186
1187 2015-11-26 Daniel Colascione <dancol@dancol.org>
1188 Simon Marchi <simon.marchi@ericsson.com>
1189
1190 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1191 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1192 name in reply.
1193 * target.h (struct target_ops) <thread_name>: New field.
1194 (target_thread_name): New macro.
1195
1196 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1197
1198 * regcache.h (regcache_invalidate_pid): Add declaration.
1199 * regcache.c (regcache_invalidate_pid): New function, extracted
1200 from regcache_invalidate.
1201 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1202 Add trivial documentation comment.
1203 * lynx-low.c: Use regcache_invalidate_pid instead of
1204 regcache_invalidate.
1205
1206 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1207
1208 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1209 and Elf64_auxv_t if the target is Android.
1210
1211 2015-11-22 Doug Evans <xdje42@gmail.com>
1212
1213 * target.h: #include <sys/types.h>.
1214
1215 2015-11-19 Pedro Alves <palves@redhat.com>
1216
1217 * linux-low.c (linux_process_qsupported): Change prototype.
1218 Adjust.
1219 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1220 Change prototype.
1221 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1222 and adjust to loop over all features.
1223 * server.c (handle_query) <qSupported>: Adjust to call
1224 target_process_qsupported once, passing it a vector of unprocessed
1225 features.
1226 * target.h (struct target_ops) <process_qsupported>: Change
1227 prototype.
1228 (target_process_qsupported): Adjust.
1229
1230 2015-11-19 Pedro Alves <palves@redhat.com>
1231
1232 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1233 mode.
1234 * configure: Regenerate.
1235
1236 2015-11-19 Pedro Alves <palves@redhat.com>
1237
1238 * configure: Regenerate.
1239
1240 2015-11-19 Yao Qi <yao.qi@linaro.org>
1241
1242 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1243 type to uint32_t.
1244
1245 2015-11-19 Yao Qi <yao.qi@linaro.org>
1246
1247 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1248 (struct aarch64_operand): Move enum out.
1249
1250 2015-11-19 Yao Qi <yao.qi@linaro.org>
1251
1252 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1253 struct user_fpsimd_state *.
1254 (aarch64_store_fpregset): Likewise.
1255
1256 2015-11-19 Yao Qi <yao.qi@linaro.org>
1257
1258 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1259 struct user_pt_regs *.
1260 (aarch64_store_gregset): Likewise.
1261
1262 2015-11-18 Pedro Alves <palves@redhat.com>
1263
1264 * Makefile.in (all_object_files): Add $IPA_OBJS.
1265
1266 2015-11-17 Pedro Alves <palves@redhat.com>
1267
1268 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1269 GDB_SIGNAL_0 and gdb_signal_to_string.
1270
1271 2015-11-17 Pedro Alves <palves@redhat.com>
1272
1273 * win32-low.c (handle_output_debug_string): Remove parameter.
1274 (win32_kill): Remove our_status local and adjust call to
1275 handle_output_debug_string.
1276 (get_child_debug_event): Adjust call to
1277 handle_output_debug_string.
1278
1279 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1280
1281 * linux-mips-low.c (mips_fill_gregset): Add cast.
1282 (mips_store_gregset): Likewise.
1283 (mips_fill_fpregset): Likewise.
1284 (mips_store_fpregset): Likewise.
1285
1286 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1287
1288 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1289 priv.
1290
1291 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1292
1293 * linux-mips-low.c (mips_linux_new_thread): Change type of
1294 watch_type to enum target_hw_bp_type.
1295
1296 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1297
1298 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1299 Change return type to arm_hwbp_type.
1300
1301 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1302
1303 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1304 (arm_store_gregset): Likewise.
1305 * linux-arm-low.c (arm_get_hwcap): Likewise.
1306 (arm_read_description): Likewise.
1307
1308 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1309
1310 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1311
1312 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1313
1314 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1315 (ppc_fill_vsxregset): Likewise.
1316 (ppc_store_vsxregset): Likewise.
1317 (ppc_fill_vrregset): Likewise.
1318 (ppc_store_vrregset): Likewise.
1319 (ppc_fill_evrregset): Likewise.
1320 (ppc_store_evrregset): Likewise.
1321
1322 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1323
1324 * linux-ppc-low.c (ppc_usrregs_info): Remove
1325 forward-declaration.
1326 (ppc_arch_setup): Move lower in file.
1327
1328 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1329
1330 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1331 (ps_pdwrite): Likewise.
1332
1333 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1334
1335 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1336 to after assert checks.
1337
1338 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1339
1340 * proc-service.c (ps_pdread): Add/adjust casts.
1341 (ps_pdwrite): Add/adjust casts.
1342
1343 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1344
1345 * server.c (handle_search_memory_1): Cast return value of
1346 memmem.
1347
1348 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1349
1350 * server.c (write_qxfer_response): Change type of data to
1351 gdb_byte *.
1352
1353 2015-10-29 Pedro Alves <palves@redhat.com>
1354
1355 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1356
1357 2015-10-29 Pedro Alves <palves@redhat.com>
1358
1359 * tracepoint.c (clear_installed_tracepoints): Add casts.
1360
1361 2015-10-29 Pedro Alves <palves@redhat.com>
1362
1363 * server.c (handle_v_cont, process_serial_event): Add enum
1364 gdb_signal casts to signal parsing code.
1365
1366 2015-10-29 Pedro Alves <palves@redhat.com>
1367
1368 * linux-low.h (NULL_REGSET): Define.
1369 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1370 * linux-arm-low.c (arm_regsets): Likewise.
1371 * linux-crisv32-low.c (cris_regsets): Likewise.
1372 * linux-m68k-low.c (m68k_regsets): Likewise.
1373 * linux-mips-low.c (mips_regsets): Likewise.
1374 * linux-nios2-low.c (nios2_regsets): Likewise.
1375 * linux-ppc-low.c (ppc_regsets): Likewise.
1376 * linux-s390-low.c (s390_regsets): Likewise.
1377 * linux-sh-low.c (sh_regsets): Likewise.
1378 * linux-sparc-low.c (sparc_regsets): Likewise.
1379 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1380 * linux-tile-low.c (tile_regsets): Likewise.
1381 * linux-x86-low.c (x86_regsets): Likewise.
1382 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1383
1384 2015-10-29 Pedro Alves <palves@redhat.com>
1385
1386 * linux-low.h (NULL_REGSET): Define.
1387 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1388 * linux-arm-low.c (arm_regsets): Likewise.
1389 * linux-crisv32-low.c (cris_regsets): Likewise.
1390 * linux-m68k-low.c (m68k_regsets): Likewise.
1391 * linux-mips-low.c (mips_regsets): Likewise.
1392 * linux-nios2-low.c (nios2_regsets): Likewise.
1393 * linux-ppc-low.c (ppc_regsets): Likewise.
1394 * linux-s390-low.c (s390_regsets): Likewise.
1395 * linux-sh-low.c (sh_regsets): Likewise.
1396 * linux-sparc-low.c (sparc_regsets): Likewise.
1397 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1398 * linux-tile-low.c (tile_regsets): Likewise.
1399 * linux-x86-low.c (x86_regsets): Likewise.
1400 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1401
1402 2015-10-26 Doug Evans <dje@google.com>
1403
1404 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1405
1406 2015-10-26 Doug Evans <dje@google.com>
1407
1408 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1409
1410 2015-10-26 Doug Evans <dje@google.com>
1411
1412 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1413 for debug_printf.
1414 (attach_thread, find_new_threads_callback): Ditto.
1415
1416 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1417
1418 * mem-break.h (set_breakpoint_data): Remove.
1419
1420 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1421
1422 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1423 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1424 (initialize_low): Remove set_breakpoint_data call.
1425 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1426 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1427 (initialize_low): Remove set_breakpoint_data call.
1428 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1429 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1430 (initialize_low): Remove set_breakpoint_data call.
1431
1432 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1433
1434 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1435 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1436 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1437 * target.h (target_breakpoint_kind_from_pc): New macro.
1438
1439 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1440
1441 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1442 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1443 the default breakpoint kind.
1444
1445 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1446
1447 * linux-arm-low.c (arm_supports_z_point_type): Add software
1448 breakpoint support.
1449
1450 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1451
1452 * linux-arm-low.c: Refactor breakpoint definitions.
1453 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1454 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1455
1456 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1457
1458 * Makefile.in: Add arm.c/o.
1459 * configure.srv: Likewise.
1460 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1461 (arm_breakpoint_kind_from_pc): New function.
1462 (arm_sw_breakpoint_from_kind): Return proper kind.
1463 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1464
1465 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1466
1467 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1468 removal.
1469 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1470 (struct raw_breakpoint) <size>: Remove.
1471 (struct raw_breakpoint) <kind>: Add.
1472 (bp_size): New function.
1473 (bp_opcode): Likewise.
1474 (find_raw_breakpoint_at): Adjust for kind.
1475 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1476 (remove_memory_breakpoint): Adjust for kind call bp_size.
1477 (set_raw_breakpoint_at): Adjust for kind.
1478 (set_breakpoint): Likewise.
1479 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1480 (delete_raw_breakpoint): Adjust for kind.
1481 (delete_breakpoint): Likewise.
1482 (find_gdb_breakpoint): Likewise.
1483 (set_gdb_breakpoint_1): Likewise.
1484 (set_gdb_breakpoint): Likewise.
1485 (delete_gdb_breakpoint_1): Likewise.
1486 (delete_gdb_breakpoint): Likewise.
1487 (uninsert_raw_breakpoint): Likewise.
1488 (reinsert_raw_breakpoint): Likewise.
1489 (set_breakpoint_data): Remove.
1490 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1491 (check_mem_read): Adjust for kind call bp_size.
1492 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1493 (clone_one_breakpoint): Adjust for kind.
1494 * mem-break.h (set_gdb_breakpoint): Likewise.
1495 (delete_gdb_breakpoint): Likewise.
1496 * server.c (process_serial_event): Likewise.
1497
1498 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1499
1500 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1501 (struct linux_target_ops) <breakpoint>: Remove.
1502 (struct linux_target_ops) <breakpoint_len>: Remove.
1503 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1504 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1505 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1506 (arm_sw_breakpoint_from_kind): New function.
1507 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1508 (struct linux_target_ops) <breakpoint>: Remove.
1509 (struct linux_target_ops) <breakpoint_len>: Remove.
1510 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1511 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1512 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1513 (struct linux_target_ops) <breakpoint>: Remove.
1514 (struct linux_target_ops) <breakpoint_len>: Remove.
1515 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1516 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1517 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1518 (struct linux_target_ops) <breakpoint>: Remove.
1519 (struct linux_target_ops) <breakpoint_len>: Remove.
1520 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1521 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1522 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1523 and sw_breakpoint_from_kind to increment the pc.
1524 (linux_breakpoint_kind_from_pc): New function.
1525 (linux_sw_breakpoint_from_kind): New function.
1526 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1527 (initialize_low): Call breakpoint_kind_from_pc and
1528 sw_breakpoint_from_kind to replace breakpoint_data/len.
1529 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1530 New field.
1531 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1532 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1533 (struct linux_target_ops) <breakpoint>: Remove.
1534 (struct linux_target_ops) <breakpoint_len>: Remove.
1535 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1536 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1537 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1538 (struct linux_target_ops) <breakpoint>: Remove.
1539 (struct linux_target_ops) <breakpoint_len>: Remove.
1540 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1541 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1542 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1543 (struct linux_target_ops) <breakpoint>: Remove.
1544 (struct linux_target_ops) <breakpoint_len>: Remove.
1545 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1546 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1547 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1548 (struct linux_target_ops) <breakpoint>: Remove.
1549 (struct linux_target_ops) <breakpoint_len>: Remove.
1550 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1551 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1552 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1553 (struct linux_target_ops) <breakpoint>: Remove.
1554 (struct linux_target_ops) <breakpoint_len>: Remove.
1555 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1556 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1557 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1558 (struct linux_target_ops) <breakpoint>: Remove.
1559 (struct linux_target_ops) <breakpoint_len>: Remove.
1560 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1561 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1562 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1563 (struct linux_target_ops) <breakpoint>: Remove.
1564 (struct linux_target_ops) <breakpoint_len>: Remove.
1565 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1566 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1567 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1568 (struct linux_target_ops) <breakpoint>: Remove.
1569 (struct linux_target_ops) <breakpoint_len>: Remove.
1570 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1571 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1572 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1573 (struct linux_target_ops) <breakpoint>: Remove.
1574 (struct linux_target_ops) <breakpoint_len>: Remove.
1575 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1576 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1577 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1578 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1579 (struct linux_target_ops) <breakpoint>: Remove.
1580 (struct linux_target_ops) <breakpoint_len>: Remove.
1581 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1582 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1583 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1584 (struct linux_target_ops) <breakpoint>: Remove.
1585 (struct linux_target_ops) <breakpoint_len>: Remove.
1586 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1587 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1588
1589 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1590
1591 * linux-cris-low.c (cris_get_pc): Remove void arg.
1592
1593 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1594
1595 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1596 variable name.
1597
1598 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1599
1600 * inferiors.c (thread_pid_matches_callback): New function.
1601 (find_thread_process): New function.
1602 (remove_thread): Reset current_thread.
1603 (remove_process): Assert threads have been removed first.
1604
1605 2015-10-15 Yao Qi <yao.qi@linaro.org>
1606
1607 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1608 if it is 3.
1609 (aarch64_remove_point): Likewise.
1610 * regcache.c (regcache_register_size): New function.
1611
1612 2015-10-12 Yao Qi <yao.qi@linaro.org>
1613
1614 * linux-aarch64-low.c: Update all callers as emit_load_store
1615 is renamed to aarch64_emit_load_store.
1616
1617 2015-10-12 Yao Qi <yao.qi@linaro.org>
1618
1619 * linux-aarch64-low.c: Update all callers of function renaming
1620 from emit_insn to aarch64_emit_insn.
1621
1622 2015-10-12 Yao Qi <yao.qi@linaro.org>
1623
1624 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1625 arch/aarch64-insn.h.
1626 (struct aarch64_memory_operand): Likewise.
1627 (ENCODE): Likewise.
1628 (emit_insn): Move to arch/aarch64-insn.c.
1629 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1630 (emit_load_store): Move to arch/aarch64-insn.c.
1631 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1632 (can_encode_int32): Remove.
1633
1634 2015-10-12 Yao Qi <yao.qi@linaro.org>
1635
1636 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1637 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1638 (aarch64_relocate_instruction): Likewise.
1639 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1640 (struct aarch64_insn_visitor): Likewise.
1641
1642 2015-10-12 Yao Qi <yao.qi@linaro.org>
1643
1644 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1645 (struct aarch64_insn_visitor): New.
1646 (struct aarch64_insn_relocation_data): New.
1647 (aarch64_ftrace_insn_reloc_b): New function.
1648 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1649 (aarch64_ftrace_insn_reloc_cb): Likewise.
1650 (aarch64_ftrace_insn_reloc_tb): Likewise.
1651 (aarch64_ftrace_insn_reloc_adr): Likewise.
1652 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1653 (aarch64_ftrace_insn_reloc_others): Likewise.
1654 (visitor): New.
1655 (aarch64_relocate_instruction): Use visitor.
1656
1657 2015-10-12 Yao Qi <yao.qi@linaro.org>
1658
1659 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1660 int. Add argument buf.
1661 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1662 aarch64_relocate_instruction.
1663
1664 2015-10-12 Yao Qi <yao.qi@linaro.org>
1665
1666 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1667 argument insn. Remove local variable insn. Don't call
1668 target_read_uint32.
1669 (aarch64_install_fast_tracepoint_jump_pad): Call
1670 target_read_uint32.
1671
1672 2015-09-30 Yao Qi <yao.qi@linaro.org>
1673
1674 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1675 (emit_load_store_pair): Likewise.
1676
1677 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1678
1679 * dll.c (match_dll): Add cast(s).
1680 (unloaded_dll): Likewise.
1681 * linux-low.c (second_thread_of_pid_p): Likewise.
1682 (delete_lwp_callback): Likewise.
1683 (count_events_callback): Likewise.
1684 (select_event_lwp_callback): Likewise.
1685 (linux_set_resume_request): Likewise.
1686 * server.c (accumulate_file_name_length): Likewise.
1687 (emit_dll_description): Likewise.
1688 (handle_qxfer_threads_worker): Likewise.
1689 (visit_actioned_threads): Likewise.
1690 * thread-db.c (any_thread_of): Likewise.
1691 * tracepoint.c (same_process_p): Likewise.
1692 (match_blocktype): Likewise.
1693 (build_traceframe_info_xml): Likewise.
1694
1695 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1696
1697 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1698 assignment.
1699 (gdb_unparse_agent_expr): Likewise.
1700 * hostio.c (require_data): Likewise.
1701 (handle_pread): Likewise.
1702 * linux-low.c (disable_regset): Likewise.
1703 (fetch_register): Likewise.
1704 (store_register): Likewise.
1705 (get_dynamic): Likewise.
1706 (linux_qxfer_libraries_svr4): Likewise.
1707 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1708 (set_fast_tracepoint_jump): Likewise.
1709 (uninsert_fast_tracepoint_jumps_at): Likewise.
1710 (reinsert_fast_tracepoint_jumps_at): Likewise.
1711 (validate_inserted_breakpoint): Likewise.
1712 (clone_agent_expr): Likewise.
1713 * regcache.c (init_register_cache): Likewise.
1714 * remote-utils.c (putpkt_binary_1): Likewise.
1715 (decode_M_packet): Likewise.
1716 (decode_X_packet): Likewise.
1717 (look_up_one_symbol): Likewise.
1718 (relocate_instruction): Likewise.
1719 (monitor_output): Likewise.
1720 * server.c (handle_search_memory): Likewise.
1721 (handle_qxfer_exec_file): Likewise.
1722 (handle_qxfer_libraries): Likewise.
1723 (handle_qxfer): Likewise.
1724 (handle_query): Likewise.
1725 (handle_v_cont): Likewise.
1726 (handle_v_run): Likewise.
1727 (captured_main): Likewise.
1728 * target.c (write_inferior_memory): Likewise.
1729 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1730 * tracepoint.c (init_trace_buffer): Likewise.
1731 (add_tracepoint_action): Likewise.
1732 (add_traceframe): Likewise.
1733 (add_traceframe_block): Likewise.
1734 (cmd_qtdpsrc): Likewise.
1735 (cmd_qtdv): Likewise.
1736 (cmd_qtstatus): Likewise.
1737 (response_source): Likewise.
1738 (response_tsv): Likewise.
1739 (cmd_qtnotes): Likewise.
1740 (gdb_collect): Likewise.
1741 (initialize_tracepoint): Likewise.
1742
1743 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1744
1745 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1746 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1747 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1748 <NOP>: New.
1749 (enum aarch64_condition_codes): New enum.
1750 (w0): New static global.
1751 (fp): Likewise.
1752 (lr): Likewise.
1753 (struct aarch64_memory_operand) <type>: New
1754 MEMORY_OPERAND_POSTINDEX type.
1755 (postindex_memory_operand): New helper function.
1756 (emit_ret): New function.
1757 (emit_load_store_pair): New function, factored out of emit_stp
1758 with support for MEMORY_OPERAND_POSTINDEX.
1759 (emit_stp): Rewrite using emit_load_store_pair.
1760 (emit_ldp): New function.
1761 (emit_load_store): Likewise.
1762 (emit_ldr): Mention post-index instruction in comment.
1763 (emit_ldrh): New function.
1764 (emit_ldrb): New function.
1765 (emit_ldrsw): Mention post-index instruction in comment.
1766 (emit_str): Likewise.
1767 (emit_subs): New function.
1768 (emit_cmp): Likewise.
1769 (emit_and): Likewise.
1770 (emit_orr): Likewise.
1771 (emit_orn): Likewise.
1772 (emit_eor): Likewise.
1773 (emit_mvn): Likewise.
1774 (emit_lslv): Likewise.
1775 (emit_lsrv): Likewise.
1776 (emit_asrv): Likewise.
1777 (emit_mul): Likewise.
1778 (emit_sbfm): Likewise.
1779 (emit_sbfx): Likewise.
1780 (emit_ubfm): Likewise.
1781 (emit_ubfx): Likewise.
1782 (emit_csinc): Likewise.
1783 (emit_cset): Likewise.
1784 (emit_nop): Likewise.
1785 (emit_ops_insns): New helper function.
1786 (emit_pop): Likewise.
1787 (emit_push): Likewise.
1788 (aarch64_emit_prologue): New function.
1789 (aarch64_emit_epilogue): Likewise.
1790 (aarch64_emit_add): Likewise.
1791 (aarch64_emit_sub): Likewise.
1792 (aarch64_emit_mul): Likewise.
1793 (aarch64_emit_lsh): Likewise.
1794 (aarch64_emit_rsh_signed): Likewise.
1795 (aarch64_emit_rsh_unsigned): Likewise.
1796 (aarch64_emit_ext): Likewise.
1797 (aarch64_emit_log_not): Likewise.
1798 (aarch64_emit_bit_and): Likewise.
1799 (aarch64_emit_bit_or): Likewise.
1800 (aarch64_emit_bit_xor): Likewise.
1801 (aarch64_emit_bit_not): Likewise.
1802 (aarch64_emit_equal): Likewise.
1803 (aarch64_emit_less_signed): Likewise.
1804 (aarch64_emit_less_unsigned): Likewise.
1805 (aarch64_emit_ref): Likewise.
1806 (aarch64_emit_if_goto): Likewise.
1807 (aarch64_emit_goto): Likewise.
1808 (aarch64_write_goto_address): Likewise.
1809 (aarch64_emit_const): Likewise.
1810 (aarch64_emit_call): Likewise.
1811 (aarch64_emit_reg): Likewise.
1812 (aarch64_emit_pop): Likewise.
1813 (aarch64_emit_stack_flush): Likewise.
1814 (aarch64_emit_zero_ext): Likewise.
1815 (aarch64_emit_swap): Likewise.
1816 (aarch64_emit_stack_adjust): Likewise.
1817 (aarch64_emit_int_call_1): Likewise.
1818 (aarch64_emit_void_call_2): Likewise.
1819 (aarch64_emit_eq_goto): Likewise.
1820 (aarch64_emit_ne_goto): Likewise.
1821 (aarch64_emit_lt_goto): Likewise.
1822 (aarch64_emit_le_goto): Likewise.
1823 (aarch64_emit_gt_goto): Likewise.
1824 (aarch64_emit_ge_got): Likewise.
1825 (aarch64_emit_ops_impl): New static global variable.
1826 (aarch64_emit_ops): New target function, return
1827 &aarch64_emit_ops_impl.
1828 (struct linux_target_ops): Install it.
1829
1830 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1831
1832 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1833 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1834 aarch64-ipa.o.
1835 * linux-aarch64-ipa.c: New file.
1836 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1837 and endian.h.
1838 (aarch64_get_thread_area): New target method.
1839 (extract_signed_bitfield): New helper function.
1840 (aarch64_decode_ldr_literal): New function.
1841 (enum aarch64_opcodes): New enum.
1842 (struct aarch64_register): New struct.
1843 (struct aarch64_operand): New struct.
1844 (x0): New static global.
1845 (x1): Likewise.
1846 (x2): Likewise.
1847 (x3): Likewise.
1848 (x4): Likewise.
1849 (w2): Likewise.
1850 (ip0): Likewise.
1851 (sp): Likewise.
1852 (xzr): Likewise.
1853 (aarch64_register): New helper function.
1854 (register_operand): Likewise.
1855 (immediate_operand): Likewise.
1856 (struct aarch64_memory_operand): New struct.
1857 (offset_memory_operand): New helper function.
1858 (preindex_memory_operand): Likewise.
1859 (enum aarch64_system_control_registers): New enum.
1860 (ENCODE): New macro.
1861 (emit_insn): New helper function.
1862 (emit_b): New function.
1863 (emit_bcond): Likewise.
1864 (emit_cb): Likewise.
1865 (emit_tb): Likewise.
1866 (emit_blr): Likewise.
1867 (emit_stp): Likewise.
1868 (emit_ldp_q_offset): Likewise.
1869 (emit_stp_q_offset): Likewise.
1870 (emit_load_store): Likewise.
1871 (emit_ldr): Likewise.
1872 (emit_ldrsw): Likewise.
1873 (emit_str): Likewise.
1874 (emit_ldaxr): Likewise.
1875 (emit_stxr): Likewise.
1876 (emit_stlr): Likewise.
1877 (emit_data_processing_reg): Likewise.
1878 (emit_data_processing): Likewise.
1879 (emit_add): Likewise.
1880 (emit_sub): Likewise.
1881 (emit_mov): Likewise.
1882 (emit_movk): Likewise.
1883 (emit_mov_addr): Likewise.
1884 (emit_mrs): Likewise.
1885 (emit_msr): Likewise.
1886 (emit_sevl): Likewise.
1887 (emit_wfe): Likewise.
1888 (append_insns): Likewise.
1889 (can_encode_int32_in): New helper function.
1890 (aarch64_relocate_instruction): New function.
1891 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1892 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1893 (struct linux_target_ops): Install aarch64_get_thread_area,
1894 aarch64_install_fast_tracepoint_jump_pad and
1895 aarch64_get_min_fast_tracepoint_insn_len.
1896
1897 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1898
1899 * Makefile.in (aarch64-insn.o): New rule.
1900 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1901
1902 2015-09-21 Yao Qi <yao.qi@linaro.org>
1903
1904 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1905
1906 2015-09-21 Yao Qi <yao.qi@linaro.org>
1907
1908 * tracepoint.c (max_jump_pad_size): Remove.
1909
1910 2015-09-18 Yao Qi <yao.qi@linaro.org>
1911
1912 * linux-aarch64-low.c: Don't include sys/uio.h.
1913 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1914
1915 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1916
1917 * tracepoint.c (eval_result_type): Change prototype.
1918 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1919
1920 2015-09-15 Pedro Alves <palves@redhat.com>
1921
1922 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1923 Check whether to report exec events instead of checking whether
1924 multiprocess is enabled.
1925
1926 2015-09-15 Pedro Alves <palves@redhat.com>
1927
1928 PR remote/18965
1929 * remote-utils.c (prepare_resume_reply): Merge
1930 TARGET_WAITKIND_VFORK_DONE switch case with the
1931 TARGET_WAITKIND_FORKED case.
1932
1933 2015-09-15 Yao Qi <yao.qi@linaro.org>
1934
1935 * server.c (handle_query): Check string comparison using
1936 "else if" instead of "if".
1937
1938 2015-09-15 Yao Qi <yao.qi@linaro.org>
1939
1940 * server.c (vCont_supported): New global variable.
1941 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1942 matches. Append ";vContSupported+" to own_buf.
1943 (handle_v_requests): Append ";s;S" to own_buf if target supports
1944 hardware single step or vCont_supported is false.
1945 (capture_main): Set vCont_supported to zero.
1946
1947 2015-09-15 Yao Qi <yao.qi@linaro.org>
1948
1949 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1950 it to ...
1951 (linux_supports_hardware_single_step): ... New function.
1952 (linux_target_ops): Update.
1953 * lynx-low.c (lynx_target_ops): Set field
1954 supports_hardware_single_step to target_can_do_hardware_single_step.
1955 * nto-low.c (nto_target_ops): Likewise.
1956 * spu-low.c (spu_target_ops): Likewise.
1957 * win32-low.c (win32_target_ops): Likewise.
1958 * target.c (target_can_do_hardware_single_step): New function.
1959 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1960 Remove. <supports_hardware_single_step>: New field.
1961 (target_supports_conditional_breakpoints): Remove.
1962 (target_supports_hardware_single_step): New macro.
1963 (target_can_do_hardware_single_step): Declare.
1964 * server.c (handle_query): Use target_supports_hardware_single_step
1965 instead of target_supports_conditional_breakpoints.
1966
1967 2015-09-15 Yao Qi <yao.qi@linaro.org>
1968
1969 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1970 function.
1971 (struct linux_target_ops the_low_target): Install
1972 aarch64_linux_siginfo_fixup.
1973
1974 2015-09-11 Don Breazeal <donb@codesourcery.com>
1975 Luis Machado <lgustavo@codesourcery.com>
1976
1977 * linux-low.c (linux_mourn): Static declaration.
1978 (linux_arch_setup): Move in front of
1979 handle_extended_wait.
1980 (linux_arch_setup_thread): New function.
1981 (handle_extended_wait): Handle exec events. Call
1982 linux_arch_setup_thread. Make event_lwp argument a
1983 pointer-to-a-pointer.
1984 (check_zombie_leaders): Do not check stopped threads.
1985 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1986 (linux_low_filter_event): Add lwp and thread for exec'ing
1987 non-leader thread if leader thread has been deleted.
1988 Refactor code into linux_arch_setup_thread and call it.
1989 Pass child lwp pointer by reference to handle_extended_wait.
1990 (linux_wait_for_event_filtered): Update comment.
1991 (linux_wait_1): Prevent clobbering exec event status.
1992 (linux_supports_exec_events): New function.
1993 (linux_target_ops) <supports_exec_events>: Initialize new member.
1994 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1995 new member.
1996 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1997 * server.c (report_exec_events): New global variable.
1998 (handle_query): Handle qSupported query for exec-events feature.
1999 (captured_main): Initialize report_exec_events.
2000 * server.h (report_exec_events): Declare new global variable.
2001 * target.h (struct target_ops) <supports_exec_events>: New
2002 member.
2003 (target_supports_exec_events): New macro.
2004 * win32-low.c (win32_target_ops) <supports_exec_events>:
2005 Initialize new member.
2006
2007 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2008
2009 * linux-low.c (linux_low_enable_btrace): Remove.
2010 (linux_target_ops): Replace linux_low_enable_btrace with
2011 linux_enable_btrace.
2012
2013 2015-09-03 Yao Qi <yao.qi@linaro.org>
2014
2015 * linux-aarch64-low.c (aarch64_insert_point): Call
2016 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2017 returns true.
2018
2019 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2020
2021 * linux-low.c (check_stopped_by_breakpoint): Use
2022 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2023
2024 2015-08-27 Pedro Alves <palves@redhat.com>
2025
2026 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2027
2028 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2029
2030 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2031 the XNEW-family equivalent.
2032 (compile_bytecodes): Likewise.
2033 * dll.c (loaded_dll): Likewise.
2034 * event-loop.c (append_callback_event): Likewise.
2035 (create_file_handler): Likewise.
2036 (create_file_event): Likewise.
2037 * hostio.c (handle_open): Likewise.
2038 * inferiors.c (add_thread): Likewise.
2039 (add_process): Likewise.
2040 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2041 * linux-arm-low.c (arm_new_process): Likewise.
2042 (arm_new_thread): Likewise.
2043 * linux-low.c (add_to_pid_list): Likewise.
2044 (linux_add_process): Likewise.
2045 (handle_extended_wait): Likewise.
2046 (add_lwp): Likewise.
2047 (enqueue_one_deferred_signal): Likewise.
2048 (enqueue_pending_signal): Likewise.
2049 (linux_resume_one_lwp_throw): Likewise.
2050 (linux_resume_one_thread): Likewise.
2051 (linux_read_memory): Likewise.
2052 (linux_write_memory): Likewise.
2053 * linux-mips-low.c (mips_linux_new_process): Likewise.
2054 (mips_linux_new_thread): Likewise.
2055 (mips_add_watchpoint): Likewise.
2056 * linux-x86-low.c (initialize_low_arch): Likewise.
2057 * lynx-low.c (lynx_add_process): Likewise.
2058 * mem-break.c (set_raw_breakpoint_at): Likewise.
2059 (set_breakpoint): Likewise.
2060 (add_condition_to_breakpoint): Likewise.
2061 (add_commands_to_breakpoint): Likewise.
2062 (clone_agent_expr): Likewise.
2063 (clone_one_breakpoint): Likewise.
2064 * regcache.c (new_register_cache): Likewise.
2065 * remote-utils.c (look_up_one_symbol): Likewise.
2066 * server.c (queue_stop_reply): Likewise.
2067 (start_inferior): Likewise.
2068 (queue_stop_reply_callback): Likewise.
2069 (handle_target_event): Likewise.
2070 * spu-low.c (fetch_ppc_memory): Likewise.
2071 (store_ppc_memory): Likewise.
2072 * target.c (set_target_ops): Likewise.
2073 * thread-db.c (thread_db_load_search): Likewise.
2074 (try_thread_db_load_1): Likewise.
2075 * tracepoint.c (add_tracepoint): Likewise.
2076 (add_tracepoint_action): Likewise.
2077 (create_trace_state_variable): Likewise.
2078 (cmd_qtdpsrc): Likewise.
2079 (cmd_qtro): Likewise.
2080 (add_while_stepping_state): Likewise.
2081 * win32-low.c (child_add_thread): Likewise.
2082 (get_image_name): Likewise.
2083
2084 2015-08-25 Yao Qi <yao.qi@linaro.org>
2085
2086 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2087
2088 2015-08-25 Yao Qi <yao.qi@linaro.org>
2089
2090 * Makefile.in (aarch64-linux.o): New rule.
2091 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2092 srv_tgtobj.
2093 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2094 (aarch64_init_debug_reg_state): Make it extern.
2095 (aarch64_linux_prepare_to_resume): Remove.
2096
2097 2015-08-25 Yao Qi <yao.qi@linaro.org>
2098
2099 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2100 lwp_arch_private_info and ptid_of_lwp.
2101
2102 2015-08-25 Yao Qi <yao.qi@linaro.org>
2103
2104 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2105 Find proc_info by find_process_pid. All callers updated.
2106
2107 2015-08-25 Yao Qi <yao.qi@linaro.org>
2108
2109 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2110 Remove.
2111 (debug_reg_change_callback): Remove.
2112 (aarch64_notify_debug_reg_change): Remove.
2113
2114 2015-08-25 Yao Qi <yao.qi@linaro.org>
2115
2116 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2117 Call current_lwp_ptid.
2118
2119 2015-08-25 Yao Qi <yao.qi@linaro.org>
2120
2121 * linux-aarch64-low.c (debug_reg_change_callback): Use
2122 debug_printf.
2123
2124 2015-08-25 Yao Qi <yao.qi@linaro.org>
2125
2126 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2127
2128 2015-08-25 Yao Qi <yao.qi@linaro.org>
2129
2130 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2131
2132 2015-08-25 Yao Qi <yao.qi@linaro.org>
2133
2134 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2135 the code.
2136
2137 2015-08-25 Yao Qi <yao.qi@linaro.org>
2138
2139 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2140 Remove.
2141 (debug_reg_change_callback): Remove argument entry and add argument
2142 lwp. Remove local variable thread. Don't print thread id in the
2143 debugging output. Don't check whether pid of thread equals to pid.
2144 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2145 iterate_over_lwps instead find_inferior.
2146
2147 2015-08-24 Pedro Alves <palves@redhat.com>
2148
2149 * inferiors.c (get_first_process): New function.
2150 * inferiors.h (get_first_process): New declaration.
2151 * remote-utils.c (read_ptid): Default to the first process in the
2152 list, instead of to the current thread's process.
2153
2154 2015-08-24 Pedro Alves <palves@redhat.com>
2155
2156 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2157 * event-loop.c: Likewise.
2158 * remote-utils.c: Likewise.
2159 * tracepoint.c: Likewise.
2160
2161 2015-08-24 Pedro Alves <palves@redhat.com>
2162
2163 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2164 ptid_get_lwp.
2165
2166 2015-08-21 Pedro Alves <palves@redhat.com>
2167
2168 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2169 instead of literal 1.
2170
2171 2015-08-21 Pedro Alves <palves@redhat.com>
2172
2173 * tdesc.c (default_description): Explicitly zero-initialize.
2174
2175 2015-08-21 Pedro Alves <palves@redhat.com>
2176
2177 PR gdb/18749
2178 * inferiors.c (remove_thread): Discard any pending stop reply for
2179 this thread.
2180 * server.c (remove_all_on_match_pid): Rename to ...
2181 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2182 instead of a pid.
2183 (discard_queued_stop_replies): Change parameter to a ptid. Now
2184 extern.
2185 (handle_v_kill, kill_inferior_callback, captured_main)
2186 (process_serial_event): Adjust.
2187 * server.h (discard_queued_stop_replies): Declare.
2188
2189 2015-08-21 Pedro Alves <palves@redhat.com>
2190
2191 * linux-low.c (wait_for_sigstop): Always switch to no thread
2192 selected if the previously current thread dies.
2193 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2194 process instead of the current thread's.
2195 * remote-utils.c (input_interrupt): Don't check if there's no
2196 current thread.
2197 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2198 current thread to the general thread fails, error out.
2199 (handle_qxfer_auxv, handle_qxfer_libraries)
2200 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2201 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2202 (handle_query): Check if there's a thread selected instead of
2203 checking whether there's any thread in the thread list.
2204 (handle_qxfer_threads, handle_qxfer_btrace)
2205 (handle_qxfer_btrace_conf): Don't error out early if there's no
2206 thread in the thread list.
2207 (handle_v_cont, myresume): Don't set the current thread to the
2208 continue thread.
2209 (process_serial_event) <Hg handling>: Also set thread_id if the
2210 previous general thread is still alive.
2211 (process_serial_event) <g/G handling>: If setting the current
2212 thread to the general thread fails, error out.
2213 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2214 thread's lwp instead of the current thread's.
2215 * target.c (set_desired_thread): If the desired thread was not
2216 found, leave the current thread pointing to NULL. Return an int
2217 (boolean) indicating success.
2218 * target.h (set_desired_thread): Change return type to int.
2219
2220 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2221
2222 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2223 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2224 #includes.
2225 (ps_get_thread_area): New function.
2226
2227 2015-08-19 Gary Benson <gbenson@redhat.com>
2228
2229 * hostio.c (handle_pread): Do not attempt to read more data
2230 than hostio_reply_with_data can fit in a packet.
2231
2232 2015-08-18 Joel Brobecker <brobecker@adacore.com>
2233
2234 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2235
2236 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2237
2238 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2239
2240 2015-08-06 Pedro Alves <palves@redhat.com>
2241
2242 * tracepoint.c (expr_eval_result): Now an int.
2243
2244 2015-08-06 Pedro Alves <palves@redhat.com>
2245
2246 * gdbthread.h (struct regcache): Forward declare.
2247 (struct thread_info) <regcache_data>: Now a struct regcache
2248 pointer.
2249 * inferiors.c (inferior_regcache_data)
2250 (set_inferior_regcache_data): Now work with struct regcache
2251 pointers.
2252 * inferiors.h (struct regcache): Forward declare.
2253 (inferior_regcache_data, set_inferior_regcache_data): Now work
2254 with struct regcache pointers.
2255 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2256 (free_register_cache_thread): Remove struct regcache pointer
2257 casts.
2258
2259 2015-08-06 Pedro Alves <palves@redhat.com>
2260
2261 * server.c (captured_main): On error, print the exception message
2262 to stderr, and if run_once is set, throw a quit.
2263
2264 2015-08-06 Pedro Alves <palves@redhat.com>
2265
2266 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2267 the current thread.
2268
2269 2015-08-06 Pedro Alves <palves@redhat.com>
2270
2271 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2272 reading beyond the passed in buffer length.
2273
2274 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2275
2276 * tracepoint.c (symbol_list) <required>: Remove.
2277
2278 2015-08-06 Pedro Alves <palves@redhat.com>
2279
2280 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2281 count if stopping and suspending threads.
2282 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2283 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2284 (linux_detach): Complete an ongoing step-over.
2285 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2286 throughout.
2287 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2288 (linux_wait_1): If passing a signal to the inferior after
2289 finishing a step-over, unsuspend and re-resume all lwps. If we
2290 see a single-step event but the thread should be continuing, don't
2291 pass the trap to gdb.
2292 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2293 internal_error instead of gdb_assert.
2294 (enqueue_pending_signal): New function.
2295 (check_ptrace_stopped_lwp_gone): Add debug output.
2296 (start_step_over): Use internal_error instead of gdb_assert.
2297 (complete_ongoing_step_over): New function.
2298 (linux_resume_one_thread): Don't resume a suspended thread.
2299 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2300 it stepping.
2301
2302 2015-08-06 Pedro Alves <palves@redhat.com>
2303
2304 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2305 (linux_thread_alive): Use lwp_is_marked_dead.
2306 (extended_event_reported): Delete.
2307 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2308 instead of extended_event_reported.
2309 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2310 as well.
2311 (lwp_is_marked_dead): New function.
2312 (lwp_running): Use lwp_is_marked_dead.
2313 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2314 comment.
2315
2316 2015-08-06 Pedro Alves <palves@redhat.com>
2317
2318 * linux-low.c (linux_wait_1): Move fork event output out of the
2319 !report_to_gdb check. Pass event_child->waitstatus to
2320 target_waitstatus_to_string instead of ourstatus.
2321
2322 2015-08-04 Yao Qi <yao.qi@linaro.org>
2323
2324 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2325 if current_thread is 32 bit.
2326
2327 2015-08-04 Yao Qi <yao.qi@linaro.org>
2328
2329 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2330 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2331 * server.c (extended_protocol): Remove "static".
2332 * server.h (extended_protocol): Declare it.
2333
2334 2015-08-04 Yao Qi <yao.qi@linaro.org>
2335
2336 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2337 both aarch64 and aarch32.
2338 (aarch64_set_pc): Likewise.
2339
2340 2015-08-04 Yao Qi <yao.qi@linaro.org>
2341
2342 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2343 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2344 arm-with-neon.xml to srv_xmlfiles.
2345 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2346 (is_64bit_tdesc): New function.
2347 (aarch64_linux_read_description): New function.
2348 (aarch64_arch_setup): Call aarch64_linux_read_description.
2349 (regs_info): Rename to regs_info_aarch64.
2350 (aarch64_regs_info): Return right regs_info.
2351 (initialize_low_arch): Call initialize_low_arch_aarch32.
2352
2353 2015-08-04 Yao Qi <yao.qi@linaro.org>
2354
2355 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2356 * linux-aarch32-low.c: New file.
2357 * linux-aarch32-low.h: New file.
2358 * linux-arm-low.c (arm_fill_gregset): Move it to
2359 linux-aarch32-low.c.
2360 (arm_store_gregset): Likewise.
2361 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2362 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2363 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2364 (regs_info): Rename to regs_info_arm.
2365 (arm_regs_info): Return regs_info_aarch32 if
2366 have_ptrace_getregset is 1 and target description is
2367 arm_with_neon or arm_with_vfpv3.
2368 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2369 Call initialize_low_arch_aarch32 instead.
2370
2371 2015-08-04 Yao Qi <yao.qi@linaro.org>
2372
2373 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2374 * linux-low.c: ... here.
2375 * linux-low.h (have_ptrace_getregset): Declare it.
2376
2377 2015-08-04 Pedro Alves <palves@redhat.com>
2378
2379 * thread-db.c (struct thread_db): Use new typedefs.
2380 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2381 CHK calls.
2382 (disable_thread_event_reporting): Cast result of dlsym to
2383 destination function pointer type.
2384 (thread_db_mourn): Use td_ta_delete_ftype.
2385
2386 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2387
2388 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2389 arch variant.
2390 (CDX_BREAKPOINT): Define for R2.
2391 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2392 (the_low_target): Add comments.
2393
2394 2015-07-30 Yao Qi <yao.qi@linaro.org>
2395
2396 * linux-arm-low.c (arm_hwcap): Remove it.
2397 (arm_read_description): New local variable arm_hwcap. Don't
2398 set arm_hwcap to zero.
2399
2400 2015-07-30 Yao Qi <yao.qi@linaro.org>
2401
2402 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2403 Use regcache->tdesc instead.
2404 (arm_store_wmmxregset): Likewise.
2405 (arm_fill_vfpregset): Likewise.
2406 (arm_store_vfpregset): Likewise.
2407
2408 2015-07-30 Yao Qi <yao.qi@linaro.org>
2409
2410 * linux-arm-low.c: Include arch/arm.h.
2411 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2412 (arm_store_gregset): Likewise.
2413
2414 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2415
2416 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2417 ptrace's 4th parameter.
2418
2419 2015-07-27 Yao Qi <yao.qi@linaro.org>
2420
2421 * configure.srv (case aarch64*-*-linux*): Don't set
2422 srv_linux_usrregs.
2423
2424 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2425
2426 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2427 sys/ptrace.h.
2428 * linux-arm-low.c: Likewise.
2429 * linux-cris-low.c: Likewise.
2430 * linux-crisv32-low.c: Likewise.
2431 * linux-low.c: Likewise.
2432 * linux-m68k-low.c: Likewise.
2433 * linux-mips-low.c: Likewise.
2434 * linux-nios2-low.c: Likewise.
2435 * linux-s390-low.c: Likewise.
2436 * linux-sparc-low.c: Likewise.
2437 * linux-tic6x-low.c: Likewise.
2438 * linux-tile-low.c: Likewise.
2439 * linux-x86-low.c: Likewise.
2440
2441 2015-07-24 Pedro Alves <palves@redhat.com>
2442
2443 * config.in: Regenerate.
2444 * configure: Regenerate.
2445
2446 2015-07-24 Pedro Alves <palves@redhat.com>
2447
2448 * acinclude.m4: Include ../ptrace.m4.
2449 * configure.ac: Call GDB_AC_PTRACE.
2450 * config.in, configure: Regenerate.
2451
2452 2015-07-24 Yao Qi <yao.qi@linaro.org>
2453
2454 * linux-low.c (linux_create_inferior): Remove setting to
2455 proc->priv->new_inferior.
2456 (linux_attach): Likewise.
2457 (linux_low_filter_event): Likewise.
2458 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2459
2460 2015-07-24 Yao Qi <yao.qi@linaro.org>
2461
2462 * linux-low.c (linux_arch_setup): New function.
2463 (linux_low_filter_event): If proc->tdesc is NULL and
2464 proc->attached is true, call the_low_target.arch_setup.
2465 Otherwise, keep status pending, and return.
2466 (linux_resume_one_lwp_throw): Don't call get_pc if
2467 thread->while_stepping isn't NULL. Don't call
2468 get_thread_regcache if proc->tdesc is NULL.
2469 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2470 (linux_target_ops): Install arch_setup.
2471 * server.c (start_inferior): Call the_target->arch_setup.
2472 * target.h (struct target_ops) <arch_setup>: New field.
2473 (target_arch_setup): New marco.
2474 * lynx-low.c (lynx_target_ops): Update.
2475 * nto-low.c (nto_target_ops): Update.
2476 * spu-low.c (spu_target_ops): Update.
2477 * win32-low.c (win32_target_ops): Update.
2478
2479 2015-07-24 Yao Qi <yao.qi@linaro.org>
2480
2481 * linux-low.c (linux_add_process): Don't set
2482 proc->priv->new_inferior.
2483 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2484 (linux_attach): Likewise.
2485
2486 2015-07-24 Yao Qi <yao.qi@linaro.org>
2487
2488 * server.c (start_inferior): Code refactor.
2489
2490 2015-07-24 Yao Qi <yao.qi@linaro.org>
2491
2492 * server.c (process_serial_event): Set general_thread.
2493
2494 2015-07-21 Yao Qi <yao.qi@linaro.org>
2495
2496 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2497 aarch64_linux_get_debug_reg_capacity.
2498
2499 2015-07-17 Yao Qi <yao.qi@linaro.org>
2500
2501 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2502 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2503 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2504 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2505 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2506 (AARCH64_HWP_ALIGNMENT): Likewise.
2507 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2508 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2509 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2510 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2511 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2512 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2513 (struct aarch64_debug_reg_state): Likewise.
2514 (struct arch_lwp_info): Likewise.
2515 (aarch64_align_watchpoint): Likewise.
2516 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2517 (aarch64_watchpoint_length): Likewise.
2518 (aarch64_point_encode_ctrl_reg): Likewise
2519 (aarch64_point_is_aligned): Likewise.
2520 (aarch64_align_watchpoint): Likewise.
2521 (aarch64_linux_set_debug_regs):
2522 (aarch64_dr_state_insert_one_point): Likewise.
2523 (aarch64_dr_state_remove_one_point): Likewise.
2524 (aarch64_handle_breakpoint): Likewise.
2525 (aarch64_handle_aligned_watchpoint): Likewise.
2526 (aarch64_handle_unaligned_watchpoint): Likewise.
2527 (aarch64_handle_watchpoint): Likewise.
2528
2529 2015-07-17 Yao Qi <yao.qi@linaro.org>
2530
2531 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2532 and don't aarch64_get_debug_reg_state. All callers update.
2533 (aarch64_handle_aligned_watchpoint): Likewise.
2534 (aarch64_handle_unaligned_watchpoint): Likewise.
2535 (aarch64_handle_watchpoint): Likewise.
2536 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2537 (aarch64_remove_point): Likewise.
2538
2539 2015-07-17 Yao Qi <yao.qi@linaro.org>
2540
2541 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2542 debug_printf.
2543 (aarch64_handle_unaligned_watchpoint): Likewise.
2544
2545 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2546
2547 Revert the previous 3 commits:
2548 Move gdb_regex* to common/
2549 Move linux_find_memory_regions_full & co.
2550 gdbserver build-id attribute generator
2551
2552 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2553 Jan Kratochvil <jan.kratochvil@redhat.com>
2554
2555 gdbserver build-id attribute generator.
2556 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2557 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2558 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2559 (find_phdr): New.
2560 (get_dynamic): Use find_pdhr to traverse program headers.
2561 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2562 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2563 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2564 (get_hex_build_id): New.
2565 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2566 to reply XML document.
2567
2568 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2569 Jan Kratochvil <jan.kratochvil@redhat.com>
2570
2571 * target.c: Include target/target-utils.h and fcntl.h.
2572 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2573 (target_fileio_read_stralloc): New functions.
2574
2575 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2576
2577 * Makefile.in (OBS): Add gdb_regex.o.
2578 (gdb_regex.o): New.
2579 * config.in: Rebuilt.
2580 * configure: Rebuilt.
2581
2582 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2583 Jan Kratochvil <jan.kratochvil@redhat.com>
2584
2585 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2586 * Makefile.in (OBS): Add target-utils.o.
2587 (linux-maps.o, target-utils.o): New.
2588 * configure.srv (srv_linux_obj): Add linux-maps.o.
2589
2590 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2591
2592 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2593 function, return 1.
2594 (the_low_target): Install it.
2595
2596 2015-07-14 Pedro Alves <palves@redhat.com>
2597
2598 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2599 Instead, ignore ECHILD, and throw an error for other errnos.
2600
2601 2015-07-10 Pedro Alves <palves@redhat.com>
2602
2603 * event-loop.c (struct callback_event) <data>: Change type to
2604 gdb_client_data instance instead of gdb_client_data pointer.
2605 (append_callback_event): Adjust.
2606
2607 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2608
2609 * linux-aarch64-low.c: Add comments for each linux_target_ops
2610 method. Remove comments already covered in target_ops and
2611 linux_target_ops definitions.
2612 (the_low_target): Add comments for each unimplemented method.
2613
2614 2015-07-09 Yao Qi <yao.qi@linaro.org>
2615
2616 * linux-aarch64-low.c (aarch64_regmap): Remove.
2617 (aarch64_usrregs_info): Remove.
2618 (regs_info): Set field usrregs to NULL.
2619
2620 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2621
2622 * linux-low.c: Include "rsp-low.h"
2623 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2624 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2625 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2626 (handle_btrace_enable_pt): New.
2627 (handle_btrace_general_set): Support "pt".
2628 (handle_btrace_conf_general_set): Support "pt:size".
2629
2630 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2631
2632 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2633 Z_PACKET_SW_BP.
2634
2635 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2636
2637 * linux-aarch64-low.c: Remove comment about endianness.
2638 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2639 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2640 memcmp.
2641
2642 2015-06-24 Gary Benson <gbenson@redhat.com>
2643
2644 * linux-i386-ipa.c (stdint.h): Do not include.
2645 * lynx-i386-low.c (stdint.h): Likewise.
2646 * lynx-ppc-low.c (stdint.h): Likewise.
2647 * mem-break.c (stdint.h): Likewise.
2648 * thread-db.c (stdint.h): Likewise.
2649 * tracepoint.c (stdint.h): Likewise.
2650 * win32-low.c (stdint.h): Likewise.
2651
2652 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2653
2654 * server.c (write_qxfer_response): Update call to
2655 remote_escape_output.
2656
2657 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2658 Jan Kratochvil <jan.kratochvil@redhat.com>
2659
2660 Merge multiple hex conversions.
2661 * gdbreplay.c (tohex): Rename to 'fromhex'.
2662 (logchar): Use fromhex.
2663
2664 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2665
2666 * server.c (handle_qxfer_libraries): Set `version' attribute for
2667 <library-list>.
2668
2669 2015-06-10 Gary Benson <gbenson@redhat.com>
2670
2671 * target.h (struct target_ops) <multifs_open>: New field.
2672 <multifs_unlink>: Likewise.
2673 <multifs_readlink>: Likewise.
2674 * linux-low.c (nat/linux-namespaces.h): New include.
2675 (linux_target_ops): Initialize the_target->multifs_open,
2676 the_target->multifs_unlink and the_target->multifs_readlink.
2677 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2678 * hostio.c (hostio_fs_pid): New static variable.
2679 (hostio_handle_new_gdb_connection): New function.
2680 (handle_setfs): Likewise.
2681 (handle_open): Use the_target->multifs_open as appropriate.
2682 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2683 (handle_readlink): Use the_target->multifs_readlink as
2684 appropriate.
2685 (handle_vFile): Handle vFile:setfs packets.
2686 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2687 after target_handle_new_gdb_connection.
2688
2689 2015-06-10 Gary Benson <gbenson@redhat.com>
2690
2691 * configure.ac (AC_CHECK_FUNCS): Add setns.
2692 * config.in: Regenerate.
2693 * configure: Likewise.
2694 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2695 (linux-namespaces.o): New rule.
2696 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2697
2698 2015-06-09 Gary Benson <gbenson@redhat.com>
2699
2700 * hostio.c (handle_open): Process mode argument with
2701 fileio_to_host_mode.
2702
2703 2015-06-01 Yao Qi <yao.qi@linaro.org>
2704
2705 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2706 * linux-x86-low.c: Likewise.
2707
2708 2015-05-28 Don Breazeal <donb@codesourcery.com>
2709
2710 * linux-low.c (handle_extended_wait): Initialize
2711 thread_info.last_resume_kind for new fork children.
2712
2713 2015-05-15 Pedro Alves <palves@redhat.com>
2714
2715 * target.h (target_handle_new_gdb_connection): Rewrite using if
2716 wrapped in do/while.
2717
2718 2015-05-14 Joel Brobecker <brobecker@adacore.com>
2719
2720 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2721 * configure, config.in: Regenerate.
2722 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2723 Declare typedef.
2724
2725 2015-05-12 Don Breazeal <donb@codesourcery.com>
2726
2727 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2728 PTRACE_EVENT_VFORK_DONE.
2729 (linux_low_ptrace_options, extended_event_reported): Add vfork
2730 events.
2731 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2732 and "vforkdone" for RSP 'T' Stop Reply Packet.
2733 * server.h (report_vfork_events): Declare
2734 global variable.
2735
2736 2015-05-12 Don Breazeal <donb@codesourcery.com>
2737
2738 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2739 (the_low_target) <new_fork>: Initialize new member.
2740 * linux-arm-low.c (arm_new_fork): New function.
2741 (the_low_target) <new_fork>: Initialize new member.
2742 * linux-low.c (handle_extended_wait): Call new target function
2743 new_fork.
2744 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2745 * linux-mips-low.c (mips_add_watchpoint): New function
2746 extracted from mips_insert_point.
2747 (the_low_target) <new_fork>: Initialize new member.
2748 (mips_linux_new_fork): New function.
2749 (mips_insert_point): Call mips_add_watchpoint.
2750 * linux-x86-low.c (x86_linux_new_fork): New function.
2751 (the_low_target) <new_fork>: Initialize new member.
2752
2753 2015-05-12 Don Breazeal <donb@codesourcery.com>
2754
2755 * linux-low.c (handle_extended_wait): Implement return value,
2756 rename argument 'event_child' to 'event_lwp', handle
2757 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2758 (linux_low_ptrace_options): New function.
2759 (linux_low_filter_event): Call linux_low_ptrace_options,
2760 use different argument fo linux_enable_event_reporting,
2761 use return value from handle_extended_wait.
2762 (extended_event_reported): New function.
2763 (linux_wait_1): Call extended_event_reported and set
2764 status to report fork events.
2765 (linux_write_memory): Add pid to debug message.
2766 (reset_lwp_ptrace_options_callback): New function.
2767 (linux_handle_new_gdb_connection): New function.
2768 (linux_target_ops): Initialize new structure member.
2769 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2770 * lynx-low.c: Initialize new structure member.
2771 * remote-utils.c (prepare_resume_reply): Implement stop reason
2772 "fork" for "T" stop message.
2773 * server.c (handle_query): Call handle_new_gdb_connection.
2774 * server.h (report_fork_events): Declare global flag.
2775 * target.h (struct target_ops) <handle_new_gdb_connection>:
2776 New member.
2777 (target_handle_new_gdb_connection): New macro.
2778 * win32-low.c: Initialize new structure member.
2779
2780 2015-05-12 Don Breazeal <donb@codesourcery.com>
2781
2782 * mem-break.c (APPEND_TO_LIST): Define macro.
2783 (clone_agent_expr): New function.
2784 (clone_one_breakpoint): New function.
2785 (clone_all_breakpoints): New function.
2786 * mem-break.h: Declare new functions.
2787
2788 2015-05-12 Don Breazeal <donb@codesourcery.com>
2789
2790 * linux-low.c (linux_supports_fork_events): New function.
2791 (linux_supports_vfork_events): New function.
2792 (linux_target_ops): Initialize new structure members.
2793 (initialize_low): Call linux_check_ptrace_features.
2794 * lynx-low.c (lynx_target_ops): Initialize new structure
2795 members.
2796 * server.c (report_fork_events, report_vfork_events):
2797 New global flags.
2798 (handle_query): Add new features to qSupported packet and
2799 response.
2800 (captured_main): Initialize new global variables.
2801 * target.h (struct target_ops) <supports_fork_events>:
2802 New member.
2803 <supports_vfork_events>: New member.
2804 (target_supports_fork_events): New macro.
2805 (target_supports_vfork_events): New macro.
2806 * win32-low.c (win32_target_ops): Initialize new structure
2807 members.
2808
2809 2015-05-12 Gary Benson <gbenson@redhat.com>
2810
2811 * server.c (handle_qxfer_exec_file): Use current process
2812 if annex is empty.
2813
2814 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2815
2816 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2817 Remove HAVE_PTRACE_GETREGS conditionals.
2818 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2819 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2820
2821 2015-05-08 Yao Qi <yao.qi@linaro.org>
2822
2823 * linux-low.c (linux_supports_conditional_breakpoints): New
2824 function.
2825 (linux_target_ops): Install new target method.
2826 * lynx-low.c (lynx_target_ops): Install NULL hook for
2827 supports_conditional_breakpoints.
2828 * nto-low.c (nto_target_ops): Likewise.
2829 * spu-low.c (spu_target_ops): Likewise.
2830 * win32-low.c (win32_target_ops): Likewise.
2831 * server.c (handle_query): Check
2832 target_supports_conditional_breakpoints.
2833 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2834 New field.
2835 (target_supports_conditional_breakpoints): New macro.
2836
2837 2015-05-06 Pedro Alves <palves@redhat.com>
2838
2839 PR server/18081
2840 * server.c (start_inferior): If the process exits, mourn it.
2841
2842 2015-04-21 Gary Benson <gbenson@redhat.com>
2843
2844 * hostio.c (fileio_open_flags_to_host): Factored out to
2845 fileio_to_host_openflags in common/fileio.c. Single use
2846 updated.
2847
2848 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2849
2850 * linux-xtensa-low.c (xtensa_fill_gregset)
2851 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2852 XCHAL_HAVE_LOOP.
2853
2854 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2855
2856 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2857 (regs_info): Replace usrregs pointer with NULL.
2858
2859 2015-04-17 Gary Benson <gbenson@redhat.com>
2860
2861 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2862 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2863 * server.c (handle_qxfer_exec_file): New function.
2864 (qxfer_packets): Add exec-file entry.
2865 (handle_query): Report qXfer:exec-file:read as supported packet.
2866
2867 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2868
2869 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2870
2871 2015-04-09 Gary Benson <gbenson@redhat.com>
2872
2873 * hostio-errno.c (errno_to_fileio_error): Remove function.
2874 Update caller to use remote_fileio_to_fio_error.
2875
2876 2015-04-09 Yao Qi <yao.qi@linaro.org>
2877
2878 * linux-low.c (linux_insert_point): Call
2879 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2880 (linux_remove_point): Call remove_memory_breakpoint if type is
2881 raw_bkpt_type_sw.
2882 * linux-x86-low.c (x86_insert_point): Don't call
2883 insert_memory_breakpoint.
2884 (x86_remove_point): Don't call remove_memory_breakpoint.
2885
2886 2015-04-01 Pedro Alves <palves@redhat.com>
2887 Cleber Rosa <crosa@redhat.com>
2888
2889 * server.c (gdbserver_usage): Reorganize and extend the usage
2890 message.
2891
2892 2015-03-24 Pedro Alves <palves@redhat.com>
2893
2894 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2895 output. Also dump TRAP_TRACE.
2896 (linux_low_filter_event): In debug output, distinguish a
2897 resume_stop SIGSTOP from a delayed SIGSTOP.
2898
2899 2015-03-24 Gary Benson <gbenson@redhat.com>
2900
2901 * linux-x86-low.c (x86_linux_new_thread): Moved to
2902 nat/x86-linux.c.
2903 (x86_linux_prepare_to_resume): Likewise.
2904
2905 2015-03-24 Gary Benson <gbenson@redhat.com>
2906
2907 * Makefile.in (x86-linux-dregs.o): New rule.
2908 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2909 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2910 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2911 (x86_linux_dr_get): Likewise.
2912 (x86_linux_dr_set): Likewise.
2913 (update_debug_registers_callback): Likewise.
2914 (x86_linux_dr_set_addr): Likewise.
2915 (x86_linux_dr_get_addr): Likewise.
2916 (x86_linux_dr_set_control): Likewise.
2917 (x86_linux_dr_get_control): Likewise.
2918 (x86_linux_dr_get_status): Likewise.
2919 (x86_linux_update_debug_registers): Likewise.
2920
2921 2015-03-24 Gary Benson <gbenson@redhat.com>
2922
2923 * linux-x86-low.c (x86_linux_update_debug_registers):
2924 New function, factored out from...
2925 (x86_linux_prepare_to_resume): ...this.
2926
2927 2015-03-24 Gary Benson <gbenson@redhat.com>
2928
2929 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2930 (x86_linux_dr_set): Likewise.
2931 (update_debug_registers_callback): Likewise.
2932 (x86_linux_dr_set_addr): Likewise.
2933 (x86_linux_dr_get_addr): Likewise.
2934 (x86_linux_dr_set_control): Likewise.
2935 (x86_linux_dr_get_control): Likewise.
2936 (x86_linux_dr_get_status): Likewise.
2937 (x86_linux_prepare_to_resume): Likewise.
2938
2939 2015-03-24 Gary Benson <gbenson@redhat.com>
2940
2941 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2942 Use perror_with_name. Pass string through gettext.
2943 (x86_linux_dr_set): Likewise.
2944
2945 2015-03-24 Gary Benson <gbenson@redhat.com>
2946
2947 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2948 (x86_linux_dr_set_addr): ...this.
2949 (x86_dr_low_get_addr): Rename to...
2950 (x86_linux_dr_get_addr): ...this.
2951 (x86_dr_low_set_control): Rename to...
2952 (x86_linux_dr_set_control): ...this.
2953 (x86_dr_low_get_control): Rename to...
2954 (x86_linux_dr_get_control): ...this.
2955 (x86_dr_low_get_status): Rename to...
2956 (x86_linux_dr_get_status): ...this.
2957 (x86_dr_low): Update with new function names.
2958
2959 2015-03-24 Gary Benson <gbenson@redhat.com>
2960
2961 * Makefile.in (x86-linux.o): New rule.
2962 * configure.srv: Add x86-linux.o to relevant targets.
2963 * linux-low.c (lwp_set_arch_private_info): New function.
2964 (lwp_arch_private_info): Likewise.
2965 * linux-x86-low.c: Include nat/x86-linux.h.
2966 (arch_lwp_info): Removed structure.
2967 (update_debug_registers_callback):
2968 Use lwp_set_debug_registers_changed.
2969 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2970 and lwp_set_debug_registers_changed.
2971 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2972
2973 2015-03-24 Gary Benson <gbenson@redhat.com>
2974
2975 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2976 * linux-arm-low.c (arm_new_thread): Likewise.
2977 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2978 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2979 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2980 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2981
2982 2015-03-24 Gary Benson <gbenson@redhat.com>
2983
2984 * linux-low.c (ptid_of_lwp): New function.
2985 (lwp_is_stopped): Likewise.
2986 (lwp_stop_reason): Likewise.
2987 * linux-x86-low.c (update_debug_registers_callback):
2988 Use lwp_is_stopped.
2989 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2990 lwp_stop_reason.
2991
2992 2015-03-24 Gary Benson <gbenson@redhat.com>
2993
2994 * linux-low.h (linux_stop_lwp): Remove declaration.
2995
2996 2015-03-24 Gary Benson <gbenson@redhat.com>
2997
2998 * linux-low.h: Include nat/linux-nat.h.
2999 * linux-low.c (iterate_over_lwps_args): New structure.
3000 (iterate_over_lwps_filter): New function.
3001 (iterate_over_lwps): Likewise.
3002 * linux-x86-low.c (update_debug_registers_callback):
3003 Update signature to what iterate_over_lwps expects.
3004 Remove PID check that iterate_over_lwps now performs.
3005 (x86_dr_low_set_addr): Use iterate_over_lwps.
3006 (x86_dr_low_set_control): Likewise.
3007
3008 2015-03-24 Gary Benson <gbenson@redhat.com>
3009
3010 * linux-x86-low.c (x86_debug_reg_state): New function.
3011 (x86_linux_prepare_to_resume): Use the above.
3012
3013 2015-03-24 Gary Benson <gbenson@redhat.com>
3014
3015 * linux-low.c (current_lwp_ptid): New function.
3016 * linux-x86-low.c: Include nat/linux-nat.h.
3017 (x86_dr_low_get_addr): Use current_lwp_ptid.
3018 (x86_dr_low_get_control): Likewise.
3019 (x86_dr_low_get_status): Likewise.
3020
3021 2015-03-20 Pedro Alves <palves@redhat.com>
3022
3023 * tracepoint.c (cmd_qtstatus): Make "str" const.
3024
3025 2015-03-20 Pedro Alves <palves@redhat.com>
3026
3027 * server.c (handle_general_set): Make "req_str" const.
3028
3029 2015-03-19 Pedro Alves <palves@redhat.com>
3030
3031 * linux-low.c (linux_resume_one_lwp): Rename to ...
3032 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3033 instead call perror_with_name.
3034 (check_ptrace_stopped_lwp_gone): New function.
3035 (linux_resume_one_lwp): Reimplement as wrapper around
3036 linux_resume_one_lwp_throw that swallows errors if the LWP is
3037 gone.
3038
3039 2015-03-19 Pedro Alves <palves@redhat.com>
3040
3041 * linux-low.c (count_events_callback, select_event_lwp_callback):
3042 No longer check whether the thread has resume_stop as last resume
3043 kind.
3044
3045 2015-03-19 Pedro Alves <palves@redhat.com>
3046
3047 * linux-low.c (count_events_callback, select_event_lwp_callback):
3048 Use the lwp's status_pending_p field, not the thread's.
3049
3050 2015-03-19 Pedro Alves <palves@redhat.com>
3051
3052 * linux-low.c (select_event_lwp_callback): Update comments to
3053 no longer mention SIGTRAP.
3054
3055 2015-03-18 Gary Benson <gbenson@redhat.com>
3056
3057 * server.c (handle_query): Do not report vFile:fstat as supported.
3058
3059 2015-03-11 Gary Benson <gbenson@redhat.com>
3060
3061 * hostio.c (sys/types.h): New include.
3062 (sys/stat.h): Likewise.
3063 (common-remote-fileio.h): Likewise.
3064 (handle_fstat): New function.
3065 (handle_vFile): Handle vFile:fstat packets.
3066
3067 2015-03-11 Gary Benson <gbenson@redhat.com>
3068
3069 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3070 struct stat.st_blocks and struct stat.st_blksize.
3071 * configure: Regenerate.
3072 * config.in: Likewise.
3073 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3074 (OBS): Add common-remote-fileio.o.
3075 (common-remote-fileio.o): New rule.
3076
3077 2015-03-09 Pedro Alves <palves@redhat.com>
3078
3079 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3080 'struct sockaddr' pointer in 'accept' call.
3081
3082 2015-03-09 Pedro Alves <palves@redhat.com>
3083
3084 Revert:
3085 2015-03-07 Pedro Alves <palves@redhat.com>
3086 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3087 or <winsock2.h> here. Instead include "gdb_socket.h".
3088 (remote_open): Use union gdb_sockaddr_u.
3089 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3090 or <winsock2.h> here. Instead include "gdb_socket.h".
3091 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3092 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3093 or <sys/un.h>.
3094 (init_named_socket, gdb_agent_helper_thread): Use union
3095 gdb_sockaddr_u.
3096
3097 2015-03-07 Pedro Alves <palves@redhat.com>
3098
3099 * configure.ac (build_warnings): Move
3100 -Wdeclaration-after-statement to the C-specific set.
3101 * configure: Regenerate.
3102
3103 2015-03-07 Pedro Alves <palves@redhat.com>
3104
3105 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3106 or <winsock2.h> here. Instead include "gdb_socket.h".
3107 (remote_open): Use union gdb_sockaddr_u.
3108 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3109 or <winsock2.h> here. Instead include "gdb_socket.h".
3110 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3111 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3112 or <sys/un.h>.
3113 (init_named_socket, gdb_agent_helper_thread): Use union
3114 gdb_sockaddr_u.
3115
3116 2015-03-07 Pedro Alves <palves@redhat.com>
3117
3118 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3119 instead.
3120
3121 2015-03-06 Yao Qi <yao.qi@linaro.org>
3122
3123 * linux-aarch64-low.c (aarch64_insert_point): Use
3124 show_debug_regs as a boolean.
3125 (aarch64_remove_point): Likewise.
3126
3127 2015-03-05 Pedro Alves <palves@redhat.com>
3128
3129 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3130 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3131 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3132 * nto-low.c (nto_target_ops): Likewise.
3133 * spu-low.c (spu_target_ops): Likewise.
3134 * win32-low.c (win32_target_ops): Likewise.
3135
3136 2015-03-04 Pedro Alves <palves@redhat.com>
3137
3138 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3139 Decide whether a breakpoint triggered based on the SIGTRAP's
3140 siginfo.si_code.
3141 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3142 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3143 (linux_low_filter_event): Check for breakpoints before checking
3144 watchpoints.
3145 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3146 siginfo.si_code.
3147 (linux_stopped_by_sw_breakpoint)
3148 (linux_supports_stopped_by_sw_breakpoint)
3149 (linux_stopped_by_hw_breakpoint)
3150 (linux_supports_stopped_by_hw_breakpoint): New functions.
3151 (linux_target_ops): Install new target methods.
3152
3153 2015-03-04 Pedro Alves <palves@redhat.com>
3154
3155 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3156 * server.c (swbreak_feature, hwbreak_feature): New globals.
3157 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3158 (captured_main): Clear swbreak_feature and hwbreak_feature.
3159 * server.h (swbreak_feature, hwbreak_feature): Declare.
3160 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3161 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3162 supports_stopped_by_hw_breakpoint>: New fields.
3163 (target_supports_stopped_by_sw_breakpoint)
3164 (target_stopped_by_sw_breakpoint)
3165 (target_supports_stopped_by_hw_breakpoint)
3166 (target_stopped_by_hw_breakpoint): Declare.
3167
3168 2015-03-04 Pedro Alves <palves@redhat.com>
3169
3170 enum lwp_stop_reason -> enum target_stop_reason
3171 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3172 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3173 (linux_wait_1, stuck_in_jump_pad_callback)
3174 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3175 (linux_stopped_by_watchpoint):
3176 * linux-low.h (enum lwp_stop_reason): Delete.
3177 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3178 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3179
3180 2015-03-04 Yao Qi <yao.qi@linaro.org>
3181
3182 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3183
3184 2015-03-03 Gary Benson <gbenson@redhat.com>
3185
3186 * hostio.c (handle_vFile): Fix prefix lengths.
3187
3188 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3189
3190 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3191 ptr_bits.
3192
3193 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3194
3195 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3196 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3197 (clean): Add "rm -f" for above C files.
3198 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3199 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3200 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3201 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3202 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3203 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3204 (init_registers_s390x_vx_linux64)
3205 (init_registers_s390x_tevx_linux64)
3206 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3207 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3208 declarations.
3209 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3210 (s390_store_vxrs_high): New functions.
3211 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3212 NT_S390_VXRS_HIGH.
3213 (s390_arch_setup): Add logic for selecting one of the new target
3214 descriptions. Activate the new vector regsets if applicable.
3215 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3216 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3217 and init_registers_s390x_tevx_linux64.
3218
3219 2015-03-01 Pedro Alves <palves@redhat.com>
3220
3221 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3222 parameter.
3223
3224 2015-02-27 Pedro Alves <palves@redhat.com>
3225
3226 * linux-x86-low.c (u_debugreg_offset): New function.
3227 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3228
3229 2015-02-27 Pedro Alves <palves@redhat.com>
3230
3231 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3232 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3233 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3234 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3235 (ps_lsetfpregs, ps_getpid)
3236 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3237 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3238 (ps_lsetxregs, ps_plog): Declare.
3239
3240 2015-02-27 Pedro Alves <palves@redhat.com>
3241
3242 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3243 IP_AGENT_EXPORT_FUNC.
3244 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3245 IP_AGENT_EXPORT_FUNC.
3246 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3247 (IP_AGENT_EXPORT): Delete.
3248 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3249 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3250 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3251 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3252 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3253 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3254 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3255 (traceframe_read_count, traceframe_write_count)
3256 (traceframes_created, trace_state_variables, get_raw_reg)
3257 (get_trace_state_variable_value, set_trace_state_variable_value)
3258 (ust_loaded, helper_thread_id, cmd_buf): Use
3259 IPA_SYM_EXPORTED_NAME.
3260 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3261 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3262 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3263 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3264 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3265 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3266 EXTERN_C_PUSH/EXTERN_C_POP.
3267 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3268 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3269 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3270 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3271 (traceframe_write_count, traceframe_read_count)
3272 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3273 (about_to_request_buffer_space, get_trace_state_variable_value)
3274 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3275 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3276 EXTERN_C_PUSH/EXTERN_C_POP.
3277 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3278 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3279 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3280 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3281 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3282 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3283 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3284 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3285 Define.
3286 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3287 (IP_AGENT_EXPORT_VAR_DECL): Define.
3288 (tracing): Declare.
3289 (gdb_agent_get_raw_reg): Declare.
3290
3291 2015-02-27 Tom Tromey <tromey@redhat.com>
3292 Pedro Alves <palves@redhat.com>
3293
3294 Rename symbols whose names are reserved C++ keywords throughout.
3295
3296 2015-02-27 Pedro Alves <palves@redhat.com>
3297
3298 * Makefile.in (COMPILER): New, get it from autoconf.
3299 (CXX): Get from autoconf instead.
3300 (COMPILE.pre): Use COMPILER.
3301 (CC-LD): Rename to ...
3302 (CC_LD): ... this. Use COMPILER.
3303 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3304 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3305 * acinclude.m4: Include build-with-cxx.m4.
3306 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3307 Disable -Werror by default if building in C++ mode.
3308 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3309 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3310 the C++ compiler. Save/restore CXXFLAGS too.
3311 * configure: Regenerate.
3312
3313 2015-02-27 Pedro Alves <palves@redhat.com>
3314
3315 * acinclude.m4: Include libiberty.m4.
3316 * configure.ac: Call libiberty_INIT.
3317 * config.in, configure: Regenerate.
3318
3319 2015-02-26 Pedro Alves <palves@redhat.com>
3320
3321 * linux-low.c (linux_wait_1): When incrementing the PC past a
3322 program breakpoint always use the_low_target.breakpoint_len as
3323 increment, rather than the maximum between that and
3324 the_low_target.decr_pc_after_break.
3325
3326 2015-02-23 Pedro Alves <palves@redhat.com>
3327
3328 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3329 thread was doing a step-over; always adjust the PC if
3330 we stepped over a permanent breakpoint.
3331 (linux_wait_1): If we stepped over breakpoint that was on top of a
3332 permanent breakpoint, manually advance the PC past it.
3333
3334 2015-02-23 Pedro Alves <palves@redhat.com>
3335
3336 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3337 modes.
3338 (x86_fill_gregset, x86_store_gregset): Use it when handling
3339 $orig_eax.
3340
3341 2015-02-20 Pedro Alves <palves@redhat.com>
3342
3343 * thread-db.c: Include "nat/linux-procfs.h".
3344 (thread_db_init): Skip listing new threads if the kernel supports
3345 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3346
3347 2015-02-20 Pedro Alves <palves@redhat.com>
3348
3349 * linux-low.c (status_pending_p_callback): Use ptid_match.
3350
3351 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3352
3353 PR breakpoints/16812
3354 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3355 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3356 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3357
3358 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3359
3360 PR breakpoints/15956
3361 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3362
3363 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3364
3365 * linux-low.c (linux_low_btrace_conf): Print size.
3366 * server.c (handle_btrace_conf_general_set): New.
3367 (hanle_general_set): Call handle_btrace_conf_general_set.
3368 (handle_query): Report Qbtrace-conf:bts:size as supported.
3369
3370 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3371
3372 * linux-low.c (linux_low_enable_btrace): Update parameters.
3373 (linux_low_btrace_conf): New.
3374 (linux_target_ops)<to_btrace_conf>: Initialize.
3375 * server.c (current_btrace_conf): New.
3376 (handle_btrace_enable): Rename to ...
3377 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3378 to target_enable_btrace. Update comment. Update users.
3379 (handle_qxfer_btrace_conf): New.
3380 (qxfer_packets): Add btrace-conf entry.
3381 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3382 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3383 (target_ops)<read_btrace_conf>: New.
3384 (target_enable_btrace): Update parameters.
3385 (target_read_btrace_conf): New.
3386
3387 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3388
3389 * server.c (handle_btrace_general_set): Remove call to
3390 target_supports_btrace.
3391 (supported_btrace_packets): New.
3392 (handle_query): Call supported_btrace_packets.
3393 * target.h: include btrace-common.h.
3394 (btrace_target_info): Removed.
3395 (supports_btrace, target_supports_btrace): Update parameters.
3396
3397 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3398
3399 * Makefile.in (SFILES): Add common/btrace-common.c.
3400 (OBS): Add common/btrace-common.o.
3401 (btrace-common.o): Add build rules.
3402 * linux-low: Include btrace-common.h.
3403 (linux_low_read_btrace): Use struct btrace_data. Call
3404 btrace_data_init and btrace_data_fini.
3405
3406 2015-02-06 Pedro Alves <palves@redhat.com>
3407
3408 * thread-db.c (find_new_threads_callback): Add debug output.
3409
3410 2015-02-04 Pedro Alves <palves@redhat.com>
3411
3412 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3413 (resume_stopped_resumed_lwps): New function.
3414 (linux_wait_for_event_filtered): Use it.
3415
3416 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3417
3418 * Makefile.in (SFILES): Add linux-personality.c.
3419 (linux-personality.o): New rule.
3420 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3421 list of objects to be built.
3422 * linux-low.c: Include nat/linux-personality.h.
3423 (linux_create_inferior): Remove code to disable address space
3424 randomization (moved to ../nat/linux-personality.c). Create
3425 cleanup to disable address space randomization.
3426
3427 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3428
3429 * Makefile.in (posix-strerror.o): New rule.
3430 (mingw-strerror.o): Likewise.
3431 * configure: Regenerated.
3432 * configure.ac: Source file ../common/common.host. Initialize new
3433 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3434
3435 2015-01-14 Yao Qi <yao@codesourcery.com>
3436
3437 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3438 (ppc-linux.o): New rule.
3439 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3440 * configure.ac: AC_CHECK_FUNCS(getauxval).
3441 * config.in: Re-generated.
3442 * configure: Re-generated.
3443 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3444 ppc64_64bit_inferior_p
3445
3446 2015-01-14 Yao Qi <yao@codesourcery.com>
3447
3448 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3449 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3450 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3451 (PT_ORIG_R3, PT_TRAP): Likewise.
3452 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3453 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3454 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3455
3456 2015-01-10 Joel Brobecker <brobecker@adacore.com>
3457
3458 * i387-fp.c (i387_cache_to_xsave): In look over
3459 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3460 zmmh_low_space field by use of zmmh_high_space.
3461
3462 2015-01-09 Pedro Alves <palves@redhat.com>
3463
3464 * linux-low.c (step_over_bkpt): Move higher up in the file.
3465 (handle_extended_wait): Don't store the stop_pc here.
3466 (get_stop_pc): Adjust comments and rename to ...
3467 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3468 stopped for a software breakpoint or hardware breakpoint.
3469 (thread_still_has_status_pending_p): New function.
3470 (status_pending_p_callback): Use
3471 thread_still_has_status_pending_p. If the event is no longer
3472 interesting, resume the LWP.
3473 (handle_tracepoints): Add assert.
3474 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3475 (wstatus_maybe_breakpoint): New function.
3476 (cancel_breakpoint): Delete function.
3477 (check_stopped_by_watchpoint): New function, factored out from
3478 linux_low_filter_event.
3479 (lp_status_maybe_breakpoint): Delete function.
3480 (linux_low_filter_event): Remove filter_ptid argument.
3481 Leave thread group exits pending here. Store the LWP's stop PC.
3482 Always leave events pending.
3483 (linux_wait_for_event_filtered): Pull all events out of the
3484 kernel, and leave them all pending.
3485 (count_events_callback, select_event_lwp_callback): Consider all
3486 events.
3487 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3488 (select_event_lwp): Only give preference to the stepping LWP in
3489 all-stop mode. Adjust comments.
3490 (ignore_event): New function.
3491 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3492 references to cancel_breakpoints. Adjust to renames. Also give
3493 equal priority to all LWPs that have had events in non-stop mode.
3494 If reporting a software breakpoint event, unadjust the LWP's PC.
3495 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3496 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3497 Adjust.
3498 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3499 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3500 (linux_stopped_by_watchpoint): Adjust.
3501 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3502 * linux-low.h (enum lwp_stop_reason): New.
3503 (struct lwp_info) <stop_pc>: Adjust comment.
3504 <stopped_by_watchpoint>: Delete field.
3505 <stop_reason>: New field.
3506 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3507 * mem-break.c (software_breakpoint_inserted_here)
3508 (hardware_breakpoint_inserted_here): New function.
3509 * mem-break.h (software_breakpoint_inserted_here)
3510 (hardware_breakpoint_inserted_here): Declare.
3511 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3512 (cancel_breakpoints): Delete.
3513 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3514 (upload_fast_traceframes): Remove references to
3515 cancel_breakpoints.
3516
3517 2015-01-09 Pedro Alves <palves@redhat.com>
3518
3519 * thread-db.c (find_new_threads_callback): Ignore thread if the
3520 kernel thread ID is -1.
3521
3522 2015-01-09 Pedro Alves <palves@redhat.com>
3523
3524 * linux-low.c (linux_attach_fail_reason_string): Move to
3525 nat/linux-ptrace.c, and rename.
3526 (linux_attach_lwp): Update comment.
3527 (attach_proc_task_lwp_callback): New function.
3528 (linux_attach): Adjust to rename and use
3529 linux_proc_attach_tgid_threads.
3530 (linux_attach_fail_reason_string): Delete declaration.
3531
3532 2015-01-01 Joel Brobecker <brobecker@adacore.com>
3533
3534 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3535 * server.c (gdbserver_version): Likewise.
3536
3537 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3538
3539 * remote-utils.c: Include ctype.h.
3540 (input_interrupt): Explicitly handle the case when the char
3541 received is the NUL byte. Improve the printing of non-ASCII
3542 characters.
3543
3544 2014-12-16 Joel Brobecker <brobecker@adacore.com>
3545
3546 * linux-low.c (linux_low_filter_event): Update call to
3547 linux_enable_event_reporting following the addition of
3548 a new parameter to that function.
3549
3550 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
3551
3552 PR server/17457
3553 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3554 (AARCH64_FPCR_REGNO): Likewise.
3555 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3556 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3557 (aarch64_store_fpregset): Likewise.
3558
3559 2014-12-15 Joel Brobecker <brobecker@adacore.com>
3560
3561 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3562 Remove FIXME comment about assumption about N.
3563
3564 2014-12-13 Joel Brobecker <brobecker@adacore.com>
3565
3566 * configure.ac: If large-file support is disabled in GDBserver,
3567 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3568 * configure: Regenerate.
3569
3570 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3571
3572 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3573 warning upon ENODATA from ptrace.
3574 * linux-s390-low.c (s390_store_tdb): New.
3575 (s390_regsets): Add regset for NT_S390_TDB.
3576
3577 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3578
3579 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3580 without a fill_function.
3581 * linux-s390-low.c (s390_fill_last_break): Remove.
3582 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3583 (s390_arch_setup): Use regset's size instead of fill_function for
3584 loop end condition.
3585
3586 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3587
3588 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3589 the regset's store function when ptrace returned an error.
3590 * regcache.c (get_thread_regcache): Invalidate register cache
3591 before fetching inferior's registers.
3592
3593 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3594
3595 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3596 while-loop as for-loop.
3597 (regsets_store_inferior_registers): Likewise.
3598
3599 2014-11-28 Yao Qi <yao@codesourcery.com>
3600
3601 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3602 * config.in, configure: Re-generate.
3603 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3604 is defined.
3605
3606 2014-11-21 Yao Qi <yao@codesourcery.com>
3607
3608 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3609 (AC_CHECK_HEADERS): Remove malloc.h.
3610 * configure: Re-generated.
3611 * config.in: Re-generated.
3612 * server.h: Don't include alloca.h and malloc.h.
3613 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3614 Don't include malloc.h.
3615
3616 2014-11-17 Joel Brobecker <brobecker@adacore.com>
3617
3618 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3619 corresponding ERRNO check in same block.
3620
3621 2014-11-12 Pedro Alves <palves@redhat.com>
3622
3623 * server.c (cont_thread): Update comment.
3624 (start_inferior, attach_inferior): No longer clear cont_thread.
3625 (handle_v_cont): No longer set cont_thread.
3626 (captured_main): Clear cont_thread each time a GDB connects.
3627
3628 2014-11-12 Pedro Alves <palves@redhat.com>
3629
3630 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3631 thread, and don't resume all threads if the Hc thread has exited.
3632
3633 2014-11-12 Pedro Alves <palves@redhat.com>
3634
3635 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3636 the process group instead of to a specific LWP.
3637
3638 2014-10-15 Pedro Alves <palves@redhat.com>
3639
3640 PR server/17487
3641 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3642 parameter.
3643 (arm_set_thread_context): Delete.
3644 (the_low_target): Adjust.
3645 * win32-i386-low.c (debug_registers_changed)
3646 (debug_registers_used): Delete.
3647 (update_debug_registers_callback): New function.
3648 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3649 needing to update their debug registers.
3650 (win32_get_current_dr): New function.
3651 (x86_dr_low_get_addr, x86_dr_low_get_control)
3652 (x86_dr_low_get_status): Fetch the debug register from the thread
3653 record's context.
3654 (i386_initial_stuff): Adjust.
3655 (i386_get_thread_context): Remove current_event parameter. Don't
3656 clear debug_registers_changed nor copy DR values to
3657 debug_reg_state.
3658 (i386_set_thread_context): Delete.
3659 (i386_prepare_to_resume): New function.
3660 (i386_thread_added): Mark the thread as needing to update irs
3661 debug registers.
3662 (the_low_target): Remove i386_set_thread_context and install
3663 i386_prepare_to_resume.
3664 * win32-low.c (win32_get_thread_context): Adjust.
3665 (win32_set_thread_context): Use SetThreadContext
3666 directly.
3667 (win32_prepare_to_resume): New function.
3668 (win32_require_context): New function, factored out from ...
3669 (thread_rec): ... this.
3670 (continue_one_thread): Call win32_prepare_to_resume on each thread
3671 we're about to continue.
3672 (win32_resume): Call win32_prepare_to_resume on the event thread.
3673 * win32-low.h (struct win32_thread_info)
3674 <debug_registers_changed>: New field.
3675 (struct win32_target_ops): Change prototype of set_thread_context,
3676 delete set_thread_context and add prepare_to_resume.
3677 (win32_require_context): New declaration.
3678
3679 2014-10-08 Gary Benson <gbenson@redhat.com>
3680
3681 * server.h: Do not include common-exceptions.h.
3682
3683 2014-10-08 Gary Benson <gbenson@redhat.com>
3684
3685 * server.h: Do not include cleanups.h.
3686
3687 2014-09-30 James Hogan <james.hogan@imgtec.com>
3688
3689 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3690 mips64-dsp-linux.c.
3691
3692 2014-09-23 Yao Qi <yao@codesourcery.com>
3693
3694 * linux-low.c (lp_status_maybe_breakpoint): New function.
3695 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3696 (count_events_callback): Likewise.
3697 (select_event_lwp_callback): Likewise.
3698 (cancel_breakpoints_callback): Likewise.
3699
3700 2014-09-19 Don Breazeal <donb@codesourcery.com>
3701
3702 * linux-low.c (handle_extended_wait): Call
3703 linux_ptrace_get_extended_event.
3704 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3705 linux_is_extended_waitstatus.
3706
3707 2014-09-16 Joel Brobecker <brobecker@adacore.com>
3708
3709 * Makefile.in (CPPFLAGS): Define.
3710 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3711 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3712
3713 2014-09-16 Gary Benson <gbenson@redhat.com>
3714
3715 * inferiors.h (current_inferior): Renamed as...
3716 (current_thread): New variable. All uses updated.
3717 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3718 (maybe_move_out_of_jump_pad): Likewise.
3719 (cancel_breakpoint): Likewise.
3720 (linux_low_filter_event): Likewise.
3721 (wait_for_sigstop): Likewise.
3722 (linux_resume_one_lwp): Likewise.
3723 (need_step_over_p): Likewise.
3724 (start_step_over): Likewise.
3725 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3726 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3727 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3728 and save_inferior as saved_thread.
3729 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3730 saved_thread.
3731 (regcache_invalidate_thread): Likewise.
3732 * remote-utils.c (prepare_resume_reply): Likewise.
3733 * thread-db.c (thread_db_get_tls_address): Likewise.
3734 (disable_thread_event_reporting): Likewise.
3735 (remove_thread_event_breakpoints): Likewise.
3736 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3737 as saved_thread.
3738 * target.h (set_desired_inferior): Renamed as...
3739 (set_desired_thread): New declaration. All uses updated.
3740 * server.c (myresume): Updated comment to reference thread instead
3741 of inferior.
3742 (handle_serial_event): Likewise.
3743 (handle_target_event): Likewise.
3744
3745 2014-09-12 Tom Tromey <tromey@redhat.com>
3746 Gary Benson <gbenson@redhat.com>
3747
3748 * regcache.h: Include common-regcache.h.
3749 (regcache_read_pc): Don't declare.
3750 * regcache.c (get_thread_regcache_for_ptid): New function.
3751
3752 2014-09-11 Tom Tromey <tromey@redhat.com>
3753 Gary Benson <gbenson@redhat.com>
3754
3755 * symbol.c: New file.
3756 * Makefile.in (SFILES): Add symbol.c.
3757 (OBS): Add symbol.o.
3758
3759 2014-09-11 Gary Benson <gbenson@redhat.com>
3760
3761 * target.c (target_stop_ptid, target_continue_ptid): New
3762 functions.
3763
3764 2014-09-11 Tom Tromey <tromey@redhat.com>
3765 Gary Benson <gbenson@redhat.com>
3766
3767 * target.h: Include target/target.h.
3768 * target.c (target_read_memory, target_read_uint32)
3769 (target_write_memory): New functions.
3770
3771 2014-09-11 Gary Benson <gbenson@redhat.com>
3772
3773 * server.h (debug_hw_points): Don't declare.
3774 * server.c (debug_hw_points): Don't define. Replace all uses
3775 with show_debug_regs.
3776 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3777 all uses with show_debug_regs.
3778
3779 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3780
3781 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3782 endianness into account.
3783 (ppc_supply_ptrace_register): Likewise.
3784
3785 2014-09-03 James Hogan <james.hogan@imgtec.com>
3786
3787 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3788 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3789
3790 2014-09-03 Gary Benson <gbenson@redhat.com>
3791
3792 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3793 ALL_DEBUG_ADDRESS_REGISTERS.
3794
3795 2014-09-02 Gary Benson <gbenson@redhat.com>
3796
3797 * i386-low.h: Renamed as...
3798 * x86-low.h: New file. All type, function and variable name
3799 prefixes changed from "i386_" to "x86_". All references updated.
3800 * i386-low.c: Renamed as...
3801 * x86-low.c: New file. All type, function and variable name
3802 prefixes changed from "i386_" to "x86_". All references updated.
3803
3804 2014-09-02 Gary Benson <gbenson@redhat.com>
3805
3806 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3807 (x86_linux_new_thread): Likewise.
3808
3809 2014-08-29 Gary Benson <gbenson@redhat.com>
3810
3811 * server.h (setjmp.h): Do not include.
3812 (toplevel): Do not declare.
3813 (common-exceptions.h): Include.
3814 (cleanups.h): Likewise.
3815 * server.c (toplevel): Do not define.
3816 (exit_code): New static global.
3817 (detach_or_kill_for_exit_cleanup): New function.
3818 (main): New function. Original main renamed to...
3819 (captured_main): New function.
3820 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3821
3822 2014-08-29 Gary Benson <gbenson@redhat.com>
3823
3824 * Makefile.in (SFILES): Add common/common-exceptions.c.
3825 (OBS): Add common-exceptions.o.
3826 (common-exceptions.o): New rule.
3827 * utils.c (prepare_to_throw_exception): New function.
3828
3829 2014-08-29 Gary Benson <gbenson@redhat.com>
3830
3831 * config.in: Regenerate.
3832 * configure: Likewise.
3833
3834 2014-08-29 Gary Benson <gbenson@redhat.com>
3835
3836 * Makefile.in (SFILES): Add common/cleanups.c.
3837 (OBS): cleanups.o.
3838 (cleanups.o): New rule.
3839
3840 2014-08-29 Gary Benson <gbenson@redhat.com>
3841
3842 * utils.c (internal_vwarning): New function.
3843
3844 2014-08-28 Gary Benson <gbenson@redhat.com>
3845
3846 * utils.h (fatal): Remove declaration.
3847 * utils.c (fatal): Remove function.
3848
3849 2014-08-28 Gary Benson <gbenson@redhat.com>
3850
3851 * tracepoint.c (gdb_agent_init): Replace fatal with
3852 perror_with_name.
3853 (initialize_tracepoint): Likewise.
3854
3855 2014-08-28 Gary Benson <gbenson@redhat.com>
3856
3857 * remote-utils.c (remote_prepare): Replace fatal with error.
3858
3859 2014-08-28 Gary Benson <gbenson@redhat.com>
3860
3861 * linux-low.c (linux_async): Replace fatal with warning.
3862 Tidy up and return.
3863 (linux_start_non_stop): Return -1 if linux_async failed.
3864
3865 2014-08-28 Gary Benson <gbenson@redhat.com>
3866
3867 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3868 gdb_assert.
3869 (i386_dr_low_get_addr): Remove vague comment.
3870 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3871 gdb_assert.
3872
3873 2014-08-28 Gary Benson <gbenson@redhat.com>
3874
3875 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3876 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3877 internal_error.
3878 (linux_resume_one_lwp): Likewise.
3879 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3880 gdb_assert.
3881 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3882 with internal_error.
3883 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3884 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3885 (find_register_by_name): Replace fatal with internal_error.
3886 (find_regno): Likewise.
3887 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3888 * thread-db.c (thread_db_create_event): Likewise.
3889 (thread_db_load_search): Likewise.
3890 (try_thread_db_load_1): Likewise.
3891 * tracepoint.c (get_jump_space_head): Replace fatal with
3892 internal_error.
3893 (claim_trampoline_space): Likewise.
3894 (have_fast_tracepoint_trampoline_buffer): Likewise.
3895 (cmd_qtstart): Likewise.
3896 (stop_tracing): Likewise.
3897 (fast_tracepoint_collecting): Likewise.
3898 (target_malloc): Likewise.
3899 (download_tracepoint): Likewise.
3900 (download_trace_state_variables): Replace check with gdb_assert.
3901 (upload_fast_traceframes): Replace fatal with internal_error.
3902
3903 2014-08-19 Tom Tromey <tromey@redhat.com>
3904 Gary Benson <gbenson@redhat.com>
3905
3906 * Makefile.in (SFILES): Add common/common-debug.c.
3907 (OBS): Add common-debug.o.
3908 (common-debug.o): New rule.
3909 * debug.h (debug_printf): Don't declare.
3910 * debug.c (debug_printf): Renamed and rewritten as...
3911 (debug_vprintf): New function.
3912
3913 2014-08-19 Gary Benson <gbenson@redhat.com>
3914
3915 * utils.h: Do not include print-utils.h.
3916
3917 2014-08-19 Tom Tromey <tromey@redhat.com>
3918 Gary Benson <gbenson@redhat.com>
3919
3920 * server.h: Add static assertion.
3921 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3922
3923 2014-08-19 Tom Tromey <tromey@redhat.com>
3924 Gary Benson <gbenson@redhat.com>
3925
3926 * Makefile.in (SFILES): Add common/errors.c.
3927 (OBS): Add errors.o.
3928 (IPA_OBS): Add errors-ipa.o.
3929 (errors.o): New rule.
3930 (errors-ipa.o): Likewise.
3931 * utils.h (perror_with_name, error, warning): Don't declare.
3932 * utils.c (warning): Renamed and rewritten as...
3933 (vwarning): New function.
3934 (error): Renamed and rewritten as...
3935 (verror): New function.
3936 (internal_error): Renamed and rewritten as...
3937 (internal_verror): New function.
3938
3939 2014-08-07 Gary Benson <gbenson@redhat.com>
3940
3941 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3942 * configure: Regenerate.
3943 * config.in: Likewise.
3944 * server.h: Do not include errno.h.
3945 * event-loop.c: Likewise.
3946 * hostio-errno.c: Likewise.
3947 * linux-low.c: Likewise.
3948 * remote-utils.c: Likewise.
3949 * spu-low.c: Likewise.
3950 * utils.c: Likewise.
3951 * gdbreplay.c: Unconditionally include errno.h.
3952
3953 2014-08-07 Gary Benson <gbenson@redhat.com>
3954
3955 * server.h: Do not include string.h.
3956 * event-loop.c: Likewise.
3957 * linux-low.c: Likewise.
3958 * regcache.c: Likewise.
3959 * remote-utils.c: Likewise.
3960 * spu-low.c: Likewise.
3961 * utils.c: Likewise.
3962
3963 2014-08-07 Gary Benson <gbenson@redhat.com>
3964
3965 * server.h: Do not include gdb_assert.h.
3966
3967 2014-08-07 Gary Benson <gbenson@redhat.com>
3968
3969 * server.h: Do not include common-utils.h.
3970
3971 2014-08-07 Gary Benson <gbenson@redhat.com>
3972
3973 * server.h: Do not include ptid.h.
3974 * notif.h: Likewise.
3975
3976 2014-08-07 Gary Benson <gbenson@redhat.com>
3977
3978 * server.h: Do not include gdb_locale.h.
3979
3980 2014-08-07 Gary Benson <gbenson@redhat.com>
3981
3982 * server.h: Do not include gdb/signals.h.
3983 * win32-low.c: Likewise.
3984
3985 2014-08-07 Gary Benson <gbenson@redhat.com>
3986
3987 * server.h: Do not include pathmax.h.
3988
3989 2014-08-07 Gary Benson <gbenson@redhat.com>
3990
3991 * server.h: Do not include libiberty.h.
3992 * linux-bfin-low.c: Likewise.
3993
3994 2014-08-07 Gary Benson <gbenson@redhat.com>
3995
3996 * server.h: Do not include ansidecl.h.
3997
3998 2014-08-07 Gary Benson <gbenson@redhat.com>
3999
4000 * linux-x86-low.c: Do not include stddef.h.
4001 * lynx-ppc-low.c: Likewise.
4002 * tracepoint.c: Likewise.
4003
4004 2014-08-07 Gary Benson <gbenson@redhat.com>
4005
4006 * server.h: Do not include stdarg.h.
4007 * nto-low.c: Likewise.
4008
4009 2014-08-07 Gary Benson <gbenson@redhat.com>
4010
4011 * server.h: Do not include stdlib.h.
4012 * inferiors.c: Likewise.
4013 * linux-low.c: Likewise.
4014 * regcache.c: Likewise.
4015 * spu-low.c: Likewise.
4016 * tracepoint.c: Likewise.
4017 * utils.c: Likewise.
4018
4019 2014-08-07 Gary Benson <gbenson@redhat.com>
4020
4021 * server.h: Do not include stdio.h.
4022 * linux-low.c: Likewise.
4023 * remote-utils.c: Likewise.
4024 * spu-low.c: Likewise.
4025 * utils.c: Likewise.
4026 * wincecompat.c: Likewise.
4027
4028 2014-08-06 Gary Benson <gbenson@redhat.com>
4029
4030 * regcache.c (init_register_cache): Move conditionals inside if.
4031
4032 2014-08-06 Gary Benson <gbenson@redhat.com>
4033
4034 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4035
4036 2014-07-31 Gary Benson <gbenson@redhat.com>
4037
4038 * ax.h: Do not include server.h.
4039 * gdbthread.h: Likewise.
4040 * lynx-low.h: Likewise.
4041 * notif.h: Likewise.
4042
4043 2014-07-30 Gary Benson <gbenson@redhat.com>
4044
4045 * server.h: Include common-defs.h.
4046 Do not include config.h or build-gnulib-gdbserver/config.h.
4047
4048 2014-07-30 Gary Benson <gbenson@redhat.com>
4049
4050 * hostio-errno.c: Move server.h to top of includes list.
4051 * inferiors.c: Likewise.
4052 * linux-x86-low.c: Likewise.
4053 * notif.c: Include server.h.
4054
4055 2014-07-24 Tom Tromey <tromey@redhat.com>
4056 Gary Benson <gbenson@redhat.com>
4057
4058 * server.h (CORE_ADDR): Now unsigned.
4059
4060 2014-07-16 Pedro Alves <palves@redhat.com>
4061
4062 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4063
4064 2014-07-15 Pedro Alves <palves@redhat.com>
4065
4066 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4067 copy.
4068
4069 2014-07-11 Pedro Alves <palves@redhat.com>
4070
4071 * linux-low.c (kill_wait_lwp): New function, based on
4072 kill_one_lwp_callback, but use my_waitpid directly.
4073 (kill_one_lwp_callback, linux_kill): Use it.
4074
4075 2014-06-23 Pedro Alves <palves@redhat.com>
4076
4077 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4078 before setting DR0..DR3.
4079
4080 2014-06-20 Gary Benson <gbenson@redhat.com>
4081
4082 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4083 * configure: Regenerated.
4084 * config.in: Likewise.
4085
4086 2014-06-20 Gary Benson <gbenson@redhat.com>
4087
4088 * Makefile.in (SFILES): Update locations for files moved
4089 from common to nat.
4090 (object file files): Reordered.
4091
4092 2014-06-20 Gary Benson <gbenson@redhat.com>
4093
4094 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4095 (i386_dr_low_set_addr): Likewise.
4096 (i386_dr_low_get_addr): Likewise.
4097 (i386_dr_low_can_set_control): Likewise.
4098 (i386_dr_low_set_control): Likewise.
4099 (i386_dr_low_get_control): Likewise.
4100 (i386_dr_low_get_status): Likewise.
4101 (i386_get_debug_register_length): Likewise.
4102 * linux-x86-low.c (i386_dr_low_set_addr):
4103 Changed signature. Made static.
4104 (i386_dr_low_get_addr): Likewise.
4105 (i386_dr_low_set_control): Likewise.
4106 (i386_dr_low_get_control): Likewise.
4107 (i386_dr_low_get_status): Likewise.
4108 (i386_dr_low): New global variable.
4109 * win32-i386-low.c (i386_dr_low_set_addr):
4110 Changed signature. Made static.
4111 (i386_dr_low_get_addr): Likewise.
4112 (i386_dr_low_set_control): Likewise.
4113 (i386_dr_low_get_control): Likewise.
4114 (i386_dr_low_get_status): Likewise.
4115 (i386_dr_low): New global variable.
4116
4117 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4118
4119 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4120 * Makefile.in (AR, AR_FLAGS): Define.
4121 * configure: Regenerate.
4122
4123 2014-06-19 Gary Benson <gbenson@redhat.com>
4124
4125 * Makefile.in (i386-dregs.o): New rule.
4126 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4127 * i386-low.c (target.h): Remove include.
4128 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4129 (DR_CONTROL_SHIFT): Likewise.
4130 (DR_CONTROL_SIZE): Likewise.
4131 (DR_RW_EXECUTE): Likewise.
4132 (DR_RW_WRITE): Likewise.
4133 (DR_RW_READ): Likewise.
4134 (DR_RW_IORW): Likewise.
4135 (DR_LEN_1): Likewise.
4136 (DR_LEN_2): Likewise.
4137 (DR_LEN_4): Likewise.
4138 (DR_LEN_8): Likewise.
4139 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4140 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4141 (DR_ENABLE_SIZE): Likewise.
4142 (DR_LOCAL_SLOWDOWN): Likewise.
4143 (DR_GLOBAL_SLOWDOWN): Likewise.
4144 (DR_CONTROL_RESERVED): Likewise.
4145 (I386_DR_CONTROL_MASK): Likewise.
4146 (I386_DR_VACANT): Likewise.
4147 (I386_DR_LOCAL_ENABLE): Likewise.
4148 (I386_DR_GLOBAL_ENABLE): Likewise.
4149 (I386_DR_DISABLE): Likewise.
4150 (I386_DR_SET_RW_LEN): Likewise.
4151 (I386_DR_GET_RW_LEN): Likewise.
4152 (I386_DR_WATCH_HIT): Likewise.
4153 (i386_wp_op_t): Likewise.
4154 (i386_show_dr): Likewise.
4155 (i386_length_and_rw_bits): Likewise.
4156 (i386_insert_aligned_watchpoint): Likewise.
4157 (i386_remove_aligned_watchpoint): Likewise.
4158 (i386_handle_nonaligned_watchpoint): Likewise.
4159 i386_update_inferior_debug_regs(): Likewise.
4160 (i386_dr_insert_watchpoint): Likewise.
4161 (i386_dr_remove_watchpoint): Likewise.
4162 (i386_dr_region_ok_for_watchpoint): Likewise.
4163 (i386_dr_stopped_data_address): Likewise.
4164 (i386_dr_stopped_by_watchpoint): Likewise.
4165
4166 2014-06-19 Gary Benson <gbenson@redhat.com>
4167
4168 * i386-low.c (i386_dr_show): Renamed to
4169 i386_show_dr and made static. All uses updated.
4170 (i386_dr_length_and_rw_bits): Renamed to
4171 i386_length_and_rw_bits and made static.
4172 All uses updated.
4173 (i386_dr_insert_aligned_watchpoint): Renamed to
4174 i386_insert_aligned_watchpoint and made static.
4175 All uses updated.
4176 (i386_dr_remove_aligned_watchpoint): Renamed to
4177 i386_remove_aligned_watchpoint and made static.
4178 All uses updated.
4179 (i386_dr_update_inferior_debug_regs): Renamed to
4180 i386_update_inferior_debug_regs and made static.
4181 All uses updated.
4182
4183 2014-06-18 Gary Benson <gbenson@redhat.com>
4184
4185 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4186 (i386_dr_low_can_set_control): Likewise.
4187 (i386_get_debug_register_length): Likewise.
4188 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4189 (i386_dr_low_can_set_control): Likewise.
4190 (i386_get_debug_register_length): Likewise.
4191
4192 2014-06-17 Gary Benson <gbenson@redhat.com>
4193
4194 * i386-low.h (i386-dregs.h): New include.
4195 (DR_FIRSTADDR): Now in i386-dregs.h.
4196 (DR_LASTADDR): Likewise.
4197 (DR_NADDR): Likewise.
4198 (DR_STATUS): Likewise.
4199 (DR_CONTROL): Likewise.
4200 (i386_debug_reg_state): Likewise.
4201 (i386_dr_insert_watchpoint): Likewise.
4202 (i386_dr_remove_watchpoint): Likewise.
4203 (i386_dr_region_ok_for_watchpoint): Likewise.
4204 (i386_dr_stopped_data_address): Likewise.
4205 (i386_dr_stopped_by_watchpoint): Likewise.
4206 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4207
4208 2014-06-18 Gary Benson <gbenson@redhat.com>
4209
4210 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4211 i386_dr_insert_watchpoint.
4212 (i386_low_remove_watchpoint): Renamed to
4213 i386_dr_remove_watchpoint.
4214 (i386_low_region_ok_for_watchpoint): Renamed to
4215 i386_dr_region_ok_for_watchpoint.
4216 (i386_low_stopped_data_address): Renamed to
4217 i386_dr_stopped_data_address.
4218 (i386_low_stopped_by_watchpoint): Renamed to
4219 i386_dr_stopped_by_watchpoint.
4220 * i386-low.c (i386_show_dr): Renamed to
4221 i386_dr_show and made nonstatic. All uses updated.
4222 (i386_length_and_rw_bits): Renamed to
4223 i386_dr_length_and_rw_bits and made nonstatic.
4224 All uses updated.
4225 (i386_insert_aligned_watchpoint): Renamed to
4226 i386_dr_insert_aligned_watchpoint and made nonstatic.
4227 All uses updated.
4228 (i386_remove_aligned_watchpoint): Renamed to
4229 i386_dr_remove_aligned_watchpoint and made nonstatic.
4230 All uses updated.
4231 (i386_update_inferior_debug_regs): Renamed to
4232 i386_dr_update_inferior_debug_regs and made nonstatic.
4233 All uses updated.
4234 (i386_low_insert_watchpoint): Renamed to
4235 i386_dr_insert_watchpoint. All uses updated.
4236 (i386_low_remove_watchpoint): Renamed to
4237 i386_dr_remove_watchpoint. All uses updated.
4238 (i386_low_region_ok_for_watchpoint): Renamed to
4239 i386_dr_region_ok_for_watchpoint. All uses updated.
4240 (i386_low_stopped_data_address): Renamed to
4241 i386_dr_stopped_data_address. All uses updated.
4242 (i386_low_stopped_by_watchpoint): Renamed to
4243 i386_dr_stopped_by_watchpoint. All uses updated.
4244
4245 2014-06-18 Gary Benson <gbenson@redhat.com>
4246
4247 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4248 (i386_dr_low_can_set_control): Likewise.
4249 (i386_insert_aligned_watchpoint): New check.
4250
4251 2014-06-18 Gary Benson <gbenson@redhat.com>
4252
4253 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4254 Renamed to state.
4255
4256 2014-06-18 Gary Benson <gbenson@redhat.com>
4257
4258 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4259 instead of fatal and error.
4260 (i386_handle_nonaligned_watchpoint): Likewise.
4261
4262 2014-06-18 Gary Benson <gbenson@redhat.com>
4263
4264 * i386-low.c (i386_get_debug_register_length): New macro.
4265 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4266 (i386_show_dr): Use debug_printf instead of fprintf. Use
4267 phex to format values.
4268
4269 2014-06-18 Gary Benson <gbenson@redhat.com>
4270
4271 * i386-low.h: Comment changes.
4272 * i386-low.c: Likewise.
4273
4274 2014-06-18 Gary Benson <gbenson@redhat.com>
4275
4276 * i386-low.c: Whitespace changes.
4277
4278 2014-06-12 Tom Tromey <tromey@redhat.com>
4279
4280 * utils.c (freeargv): Remove.
4281
4282 2014-06-12 Tom Tromey <tromey@redhat.com>
4283
4284 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4285 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4286 (parse_debug_format_options): Likewise.
4287 (gdbserver_usage): Likewise.
4288 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4289 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4290 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4291 against libiberty.
4292 ($(LIBGNU)): Depend on libiberty.
4293 (all-lib): Recurse into all subdirs.
4294 (install-only): Invoke "install" target in subdirs.
4295 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4296 targets.
4297 * configure: Rebuild.
4298 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4299 for vasprintf, vsnprintf, or gettimeofday.
4300 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4301 srv_tgtobj.
4302
4303 2014-06-05 Joel Brobecker <brobecker@adacore.com>
4304
4305 * development.sh: Delete.
4306 * Makefile.in (config.status): Adjust dependency on development.sh.
4307 * configure.ac: Adjust development.sh source call.
4308 * configure: Regenerate.
4309
4310 2014-06-02 Pedro Alves <palves@redhat.com>
4311
4312 * ax.c (gdb_free_agent_expr): New function.
4313 * ax.h (gdb_free_agent_expr): New declaration.
4314 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4315 list.
4316 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4317 static.
4318 (clear_breakpoint_conditions_and_commands): New function.
4319 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4320 (clear_breakpoint_conditions_and_commands): New declaration.
4321
4322 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4323
4324 * linux-aarch64-low.c (asm/ptrace.h): Include.
4325
4326 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4327
4328 Fix TLS access for -static -pthread.
4329 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4330 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4331 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4332
4333 2014-05-20 Pedro Alves <palves@redhat.com>
4334
4335 * linux-aarch64-low.c (aarch64_insert_point)
4336 (aarch64_remove_point): No longer check whether the type is
4337 supported here. Adjust to new interface.
4338 (the_low_target): Install aarch64_supports_z_point_type as
4339 supports_z_point_type method.
4340 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4341 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4342 instead of a Z packet char. Adjust.
4343 (arm_supports_z_point_type): New function.
4344 (arm_insert_point, arm_remove_point): Adjust to new interface.
4345 (the_low_target): Install arm_supports_z_point_type.
4346 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4347 (cris_insert_point, cris_remove_point): Adjust to new interface.
4348 Don't check whether the type is supported here.
4349 (the_low_target): Install cris_supports_z_point_type.
4350 * linux-low.c (linux_supports_z_point_type): New function.
4351 (linux_insert_point, linux_remove_point): Adjust to new interface.
4352 * linux-low.h (struct linux_target_ops) <insert_point,
4353 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4354 raw_breakpoint pointer parameter.
4355 <supports_z_point_type>: New method.
4356 * linux-mips-low.c (mips_supports_z_point_type): New function.
4357 (mips_insert_point, mips_remove_point): Adjust to new interface.
4358 Use mips_supports_z_point_type.
4359 (the_low_target): Install mips_supports_z_point_type.
4360 * linux-ppc-low.c (the_low_target): Install NULL as
4361 supports_z_point_type method.
4362 * linux-s390-low.c (the_low_target): Install NULL as
4363 supports_z_point_type method.
4364 * linux-sparc-low.c (the_low_target): Install NULL as
4365 supports_z_point_type method.
4366 * linux-x86-low.c (x86_supports_z_point_type): New function.
4367 (x86_insert_point): Adjust to new insert_point interface. Use
4368 insert_memory_breakpoint. Adjust to new
4369 i386_low_insert_watchpoint interface.
4370 (x86_remove_point): Adjust to remove_point interface. Use
4371 remove_memory_breakpoint. Adjust to new
4372 i386_low_remove_watchpoint interface.
4373 (the_low_target): Install x86_supports_z_point_type.
4374 * lynx-low.c (lynx_target_ops): Install NULL as
4375 supports_z_point_type callback.
4376 * nto-low.c (nto_supports_z_point_type): New.
4377 (nto_insert_point, nto_remove_point): Adjust to new interface.
4378 (nto_target_ops): Install nto_supports_z_point_type.
4379 * mem-break.c: Adjust intro comment.
4380 (struct raw_breakpoint) <raw_type, size>: New fields.
4381 <inserted>: Update comment.
4382 <shlib_disabled>: Delete field.
4383 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4384 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4385 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4386 (raw_bkpt_type_to_target_hw_bp_type): New function.
4387 (find_enabled_raw_code_breakpoint_at): New function.
4388 (find_raw_breakpoint_at): New type and size parameters. Use them.
4389 (insert_memory_breakpoint): New function, based off
4390 set_raw_breakpoint_at.
4391 (remove_memory_breakpoint): New function.
4392 (set_raw_breakpoint_at): Reimplement.
4393 (set_breakpoint): New, based on set_breakpoint_at.
4394 (set_breakpoint_at): Reimplement.
4395 (delete_raw_breakpoint): Go through the_target->remove_point
4396 instead of assuming memory breakpoints.
4397 (find_gdb_breakpoint_at): Delete.
4398 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4399 (find_gdb_breakpoint): New function.
4400 (set_gdb_breakpoint_at): Delete.
4401 (z_type_supported): New function.
4402 (set_gdb_breakpoint_1): New function, loosely based off
4403 set_gdb_breakpoint_at.
4404 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4405 (delete_gdb_breakpoint_at): Delete.
4406 (delete_gdb_breakpoint_1): New function, loosely based off
4407 delete_gdb_breakpoint_at.
4408 (delete_gdb_breakpoint): New function.
4409 (clear_gdb_breakpoint_conditions): Rename to ...
4410 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4411 breakpoint.
4412 (add_condition_to_breakpoint): Make static.
4413 (add_breakpoint_condition): Take a struct breakpoint pointer
4414 instead of an address. Adjust.
4415 (gdb_condition_true_at_breakpoint): Rename to ...
4416 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4417 z_type parameter.
4418 (gdb_condition_true_at_breakpoint): Reimplement.
4419 (add_breakpoint_commands): Take a struct breakpoint pointer
4420 instead of an address. Adjust.
4421 (gdb_no_commands_at_breakpoint): Rename to ...
4422 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4423 parameter. Return true if no breakpoint was found. Change debug
4424 output.
4425 (gdb_no_commands_at_breakpoint): Reimplement.
4426 (run_breakpoint_commands): Rename to ...
4427 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4428 and change return type to boolean.
4429 (run_breakpoint_commands): New function.
4430 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4431 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4432 breakpoint. Go through the_target->remove_point instead of
4433 assuming memory breakpoint.
4434 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4435 software and hardware breakpoints.
4436 (reinsert_raw_breakpoint): Go through the_target->insert_point
4437 instead of assuming memory breakpoint.
4438 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4439 software and hardware breakpoints.
4440 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4441 Check both software and hardware breakpoints.
4442 (validate_inserted_breakpoint): Assert the breakpoint is a
4443 software breakpoint. Set the inserted flag to -1 instead of
4444 setting shlib_disabled.
4445 (delete_disabled_breakpoints): Adjust.
4446 (validate_breakpoints): Only validate software breakpoints.
4447 Adjust to inserted flag change.
4448 (check_mem_read, check_mem_write): Skip breakpoint types other
4449 than software breakpoints. Adjust to inserted flag change.
4450 * mem-break.h (enum raw_bkpt_type): New enum.
4451 (raw_breakpoint, struct process_info): Forward declare.
4452 (Z_packet_to_target_hw_bp_type): Delete declaration.
4453 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4454 (set_gdb_breakpoint, delete_gdb_breakpoint)
4455 (clear_breakpoint_conditions): New declarations.
4456 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4457 (breakpoint_inserted_here): Update comment.
4458 (add_breakpoint_condition, add_breakpoint_commands): Replace
4459 address parameter with a breakpoint pointer parameter.
4460 (gdb_breakpoint_here): Update comment.
4461 (delete_gdb_breakpoint_at): Delete.
4462 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4463 * server.c (process_point_options): Take a struct breakpoint
4464 pointer instead of an address. Adjust.
4465 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4466 delete_gdb_breakpoint.
4467 * spu-low.c (spu_target_ops): Install NULL as
4468 supports_z_point_type method.
4469 * target.h: Include mem-break.h.
4470 (struct target_ops) <prepare_to_access_memory>: Update comment.
4471 <supports_z_point_type>: New field.
4472 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4473 instead of a char. Also take a raw breakpoint pointer.
4474 * win32-arm-low.c (the_low_target): Install NULL as
4475 supports_z_point_type.
4476 * win32-i386-low.c (i386_supports_z_point_type): New function.
4477 (i386_insert_point, i386_remove_point): Adjust to new interface.
4478 (the_low_target): Install i386_supports_z_point_type.
4479 * win32-low.c (win32_supports_z_point_type): New function.
4480 (win32_insert_point, win32_remove_point): Adjust to new interface.
4481 (win32_target_ops): Install win32_supports_z_point_type.
4482 * win32-low.h (struct win32_target_ops):
4483 <supports_z_point_type>: New method.
4484 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4485 instead of a char. Also take a raw breakpoint pointer.
4486
4487 2014-05-20 Pedro Alves <palves@redhat.com>
4488
4489 * mem-break.h: Include break-common.h.
4490 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4491 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4492 (Z_packet_to_target_hw_bp_type): New declaration.
4493 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4494 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4495 (Z_PACKET_ACCESS_WP): Delete macros.
4496 (Z_packet_to_hw_type): Delete function.
4497 * i386-low.h: Don't include break-common.h here.
4498 (Z_packet_to_hw_type): Delete declaration.
4499 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4500 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4501 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4502 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4503 * linux-aarch64-low.c: Don't include break-common.h here.
4504 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4505 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4506 (Z_packet_to_target_hw_bp_type): Delete function.
4507 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4508 function.
4509 (mips_insert_point, mips_remove_point): Use
4510 Z_packet_to_target_hw_bp_type.
4511
4512 2014-05-20 Pedro Alves <palves@redhat.com>
4513
4514 * linux-aarch64-low.c: Include break-common.h.
4515 (enum target_point_type): Delete.
4516 (Z_packet_to_point_type): Rename to ...
4517 (Z_packet_to_target_hw_bp_type): ... this, and return a
4518 target_hw_bp_type instead.
4519 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4520 instead of an enum target_point_type.
4521 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4522 breakpoint type.
4523 (aarch64_dr_state_insert_one_point)
4524 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4525 (aarch64_handle_aligned_watchpoint)
4526 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4527 Take an enum target_hw_bp_type instead of an enum
4528 target_point_type.
4529 (aarch64_supports_z_point_type): New function.
4530 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4531 use Z_packet_to_target_hw_bp_type.
4532
4533 2014-05-20 Joel Brobecker <brobecker@adacore.com>
4534
4535 * configure.ac: Only use -Werror by default when DEVELOPMENT
4536 is true.
4537 * configure: Regenerate.
4538
4539 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4540
4541 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4542 * linux-x86-low.c (X86_64_USER_REGS): New.
4543 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4544
4545 2014-04-28 Yao Qi <yao@codesourcery.com>
4546
4547 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4548 name.
4549
4550 2014-04-25 Pedro Alves <palves@redhat.com>
4551
4552 PR server/16255
4553 * linux-low.c (linux_attach_fail_reason_string): New function.
4554 (linux_attach_lwp): Delete.
4555 (linux_attach_lwp_1): Rename to ...
4556 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4557 argument. Remove "initial" parameter. Return int instead of
4558 void. Don't error or warn here.
4559 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4560 failure to attach to the tgid. Call warning when failing to
4561 attach to an lwp.
4562 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4563 argument. Remove "initial" parameter. Return int instead of
4564 void. Don't error or warn here.
4565 (linux_attach_fail_reason_string): New declaration.
4566 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4567 interface change. Use linux_attach_fail_reason_string.
4568
4569 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
4570 Walfred Tedeschi <walfred.tedeschi@intel.com>
4571
4572 * Makefile.in: Added rules to handle new files
4573 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4574 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4575 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4576 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4577 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4578 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4579 x32-avx512-linux.o.
4580 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4581 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4582 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4583 i386/x32-avx512.xml.
4584 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4585 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4586 i386/x32-avx512-linux.xml.
4587 * i387-fp.c (num_avx512_k_registers): New constant for number
4588 of K registers.
4589 (num_avx512_zmmh_low_registers): New constant for number of
4590 lower ZMM registers (0-15).
4591 (num_avx512_zmmh_high_registers): New constant for number of
4592 higher ZMM registers (16-31).
4593 (num_avx512_ymmh_registers): New contant for number of higher
4594 YMM registers (ymm16-31 added by avx521 on x86_64).
4595 (num_avx512_xmm_registers): New constant for number of higher
4596 XMM registers (xmm16-31 added by AVX512 on x86_64).
4597 (struct i387_xsave): Add space for AVX512 registers.
4598 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4599 Add code to handle AVX512 registers.
4600 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4601 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4602 prototypei from generated file.
4603 (tdesc_amd64_avx512_linux): Likewise.
4604 (init_registers_x32_avx512_linux): Likewise.
4605 (tdesc_x32_avx512_linux): Likewise.
4606 (init_registers_i386_avx512_linux): Likewise.
4607 (tdesc_i386_avx512_linux): Likewise.
4608 (x86_64_regmap): Add AVX512 registers.
4609 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4610 mask.
4611 (initialize_low_arch): Add code to initialize AVX512 registers.
4612
4613 2014-04-23 Pedro Alves <palves@redhat.com>
4614
4615 * mem-break.c (find_gdb_breakpoint_at): Make static.
4616 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4617
4618 2014-04-23 Pedro Alves <palves@redhat.com>
4619
4620 * i386-low.c: Don't include break-common.h here.
4621 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4622 prototype to take target_hw_bp_type as argument instead of a Z
4623 packet char.
4624 * i386-low.h: Include break-common.h here.
4625 (Z_packet_to_hw_type): Declare.
4626 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4627 prototypes.
4628 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4629 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4630 (x86_remove_point): Convert the packet number to a
4631 target_hw_bp_type before calling i386_low_remove_watchpoint.
4632 * win32-i386-low.c (i386_insert_point): Convert the packet number
4633 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4634 (i386_remove_point): Convert the packet number to a
4635 target_hw_bp_type before calling i386_low_remove_watchpoint.
4636
4637 2014-04-23 Pedro Alves <palves@redhat.com>
4638
4639 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4640
4641 2014-04-10 Pedro Alves <palves@redhat.com>
4642
4643 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4644 Check if the condition or command is NULL before checking if the
4645 breakpoint is known. On success, return true.
4646 * mem-break.h (add_breakpoint_condition): Document return.
4647 (add_breakpoint_commands): Add describing comment.
4648 * server.c (skip_to_semicolon): New function.
4649 (process_point_options): Use it.
4650
4651 2014-04-09 Pedro Alves <palves@redhat.com>
4652
4653 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4654 to lwpid_of.
4655
4656 2014-02-27 Pedro Alves <palves@redhat.com>
4657
4658 PR 12702
4659 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4660 macros.
4661 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4662 output.
4663 (last_thread_of_process_p): Take a PID argument instead of a
4664 thread pointer.
4665 (linux_wait_for_lwp): Delete.
4666 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4667 functions.
4668 (linux_low_filter_event): New function, party factored out from
4669 linux_wait_for_event.
4670 (linux_wait_for_event): Rename to ...
4671 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4672 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4673 sigsuspend. Check for zombie leaders.
4674 (linux_wait_for_event): Reimplement as wrapper around
4675 linux_wait_for_event_filtered.
4676 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4677 a normal or signal exit is seen, it's the whole process exiting.
4678 (wait_for_sigstop): No longer a for_each_inferior callback.
4679 Rewrite on top of linux_wait_for_event_filtered.
4680 (stop_all_lwps): Call wait_for_sigstop directly.
4681 * server.c (resume, handle_target_event): Handle
4682 TARGET_WAITKIND_NO_RESUMED.
4683
4684 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4685
4686 * win32-low.c (psapi_get_dll_name,
4687 * win32_CreateToolhelp32Snapshot): Delete.
4688 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4689 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4690 Delete.
4691 (handle_load_dll): Add function description.
4692 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4693
4694 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4695
4696 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4697 Add comment.
4698 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4699 base address when calling win32_add_one_solib.
4700 (handle_load_dll): Delete local variable load_addr.
4701 Remove 0x1000 offset applied to DLL base address when calling
4702 win32_add_one_solib.
4703 (handle_unload_dll): Add comment.
4704
4705 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4706
4707 * win32-low.c (win32_add_all_dlls): Renames
4708 win32_ensure_ntdll_loaded. Rewrite function documentation.
4709 Adjust implementation to always load all DLLs.
4710 Add 0x1000 offset to DLL base address when calling
4711 win32_add_one_solib.
4712 (child_initialization_done): New static global.
4713 (do_initial_child_stuff): Set child_initialization_done to
4714 zero during child initialization, and 1 after. Replace call
4715 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4716 Add comment.
4717 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4718 (handle_unload_dll): Add function documentation.
4719 (get_child_debug_event): Ignore load and unload DLL events
4720 during child initialization.
4721
4722 2014-02-20 Doug Evans <dje@google.com>
4723
4724 Remove global all_lwps.
4725 * inferiors.h (ptid_of): Move here from linux-low.h.
4726 (pid_of, lwpid_of): Ditto.
4727 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4728 parameter is a struct thread_info * now.
4729 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4730 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4731 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4732 directly.
4733 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4734 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4735 * linux-arm-low.c (update_registers_callback): Update, "entry"
4736 parameter is a struct thread_info * now.
4737 Fetch lwpid from current_inferior directly.
4738 (arm_insert_point): Pass &all_threads to find_inferior instead of
4739 &all_lwps.
4740 (arm_remove_point): Ditto.
4741 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4742 (arm_prepare_to_resume): Fetch pid from thread.
4743 (arm_read_description): Fetch lwpid from current_inferior directly.
4744 * linux-low.c (all_lwps): Delete.
4745 (delete_lwp): Delete call to remove_inferior.
4746 (handle_extended_wait): Fetch lwpid from thread.
4747 (add_lwp): Don't set lwp->entry.id. Remove call to
4748 add_inferior_to_list.
4749 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4750 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4751 (kill_one_lwp_callback): Ditto.
4752 (linux_kill): Don't dereference NULL pointer.
4753 Fetch ptid,lwpid from thread.
4754 (get_detach_signal): Fetch ptid from thread.
4755 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4756 Simplify call to regcache_invalidate_thread.
4757 (delete_lwp_callback): Update, "entry" parameter is a
4758 struct thread_info * now. Fetch pid from thread.
4759 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4760 (status_pending_p_callback): Update, "entry" parameter is a
4761 struct thread_info * now. Fetch ptid from thread.
4762 (find_lwp_pid): Update, "entry" parameter is a
4763 struct thread_info * now.
4764 (linux_wait_for_lwp): Fetch pid from thread.
4765 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4766 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4767 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4768 (dequeue_one_deferred_signal): Ditto.
4769 (cancel_breakpoint): Fetch ptid from current_inferior.
4770 (linux_wait_for_event): Pass &all_threads to find_inferior,
4771 not &all_lwps. Fetch ptid, lwpid from thread.
4772 (count_events_callback): Update, "entry" parameter is a
4773 struct thread_info * now.
4774 (select_singlestep_lwp_callback): Ditto.
4775 (select_event_lwp_callback): Ditto.
4776 (cancel_breakpoints_callback): Ditto.
4777 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4778 not &all_lwps.
4779 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4780 (unsuspend_one_lwp): Update, "entry" parameter is a
4781 struct thread_info * now.
4782 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4783 not &all_lwps.
4784 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4785 Fetch lwpid from thread, not lwp.
4786 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4787 Pass &all_threads to find_inferior, not &all_lwps.
4788 (send_sigstop): Fetch lwpid from thread, not lwp.
4789 (send_sigstop_callback): Update, "entry" parameter is a
4790 struct thread_info * now.
4791 (suspend_and_send_sigstop_callback): Ditto.
4792 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4793 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4794 struct thread_info * now.
4795 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4796 from thread, lwp.
4797 (lwp_running): Update, "entry" parameter is a
4798 struct thread_info * now.
4799 (stop_all_lwps): Fetch ptid from thread.
4800 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4801 (linux_resume_one_lwp): Fetch lwpid from thread.
4802 (linux_set_resume_request): Update, "entry" parameter is a
4803 struct thread_info * now. Fetch pid, lwpid from thread.
4804 (resume_status_pending_p): Update, "entry" parameter is a
4805 struct thread_info * now.
4806 (need_step_over_p): Ditto. Fetch lwpid from thread.
4807 (start_step_over): Fetch lwpid from thread.
4808 (linux_resume_one_thread): Update, "entry" parameter is a
4809 struct thread_info * now. Fetch lwpid from thread.
4810 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4811 (proceed_one_lwp): Update, "entry" parameter is a
4812 struct thread_info * now. Fetch lwpid from thread.
4813 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4814 struct thread_info * now.
4815 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4816 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4817 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4818 directly.
4819 (regsets_store_inferior_registers): Ditto.
4820 (fetch_register, store_register): Ditto.
4821 (linux_read_memory, linux_write_memory): Ditto.
4822 (linux_request_interrupt): Ditto.
4823 (linux_read_auxv): Ditto.
4824 (linux_xfer_siginfo): Ditto.
4825 (linux_qxfer_spu): Ditto.
4826 (linux_qxfer_libraries_svr4): Ditto.
4827 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4828 moved to inferiors.h.
4829 (get_lwp): Delete.
4830 (get_thread_lwp): Update.
4831 (struct lwp_info): Delete member "entry". Simplify comment for
4832 member "thread".
4833 (all_lwps): Delete.
4834 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4835 current_inferior directly.
4836 (update_watch_registers_callback): Update, "entry" parameter is a
4837 struct thread_info * now. Fetch pid from thread.
4838 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4839 (mips_insert_point): Fetch lwpid from current_inferior.
4840 Pass &all_threads to find_inferior, not &all_lwps.
4841 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4842 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4843 directly.
4844 (mips_stopped_data_address): Ditto.
4845 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4846 directly.
4847 * linux-tile-low.c (tile_arch_setup): Ditto.
4848 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4849 (update_debug_registers_callback): Update, "entry" parameter is a
4850 struct thread_info * now. Fetch pid from thread.
4851 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4852 Pass &all_threads to find_inferior, not &all_lwps.
4853 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4854 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4855 Pass &all_threads to find_inferior, not &all_lwps.
4856 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4857 (i386_dr_low_get_status): Ditto.
4858 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4859 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4860 (x86_linux_read_description): Ditto.
4861 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4862
4863 2014-02-20 Doug Evans <dje@google.com>
4864
4865 * inferiors.c (get_first_inferior): Fix buglet.
4866
4867 2014-02-19 Doug Evans <dje@google.com>
4868
4869 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4870 * inferiors.c (add_thread): Change result type to struct thread_info *.
4871 All callers updated.
4872 (add_lwp): Call add_thread here instead of in callers.
4873 All callers updated.
4874 * linux-low.h (get_lwp_thread): Rewrite.
4875 (struct lwp_info): New member "thread".
4876
4877 2014-02-19 Doug Evans <dje@google.com>
4878
4879 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4880 All callers updated.
4881
4882 2014-02-19 Doug Evans <dje@google.com>
4883
4884 * inferiors.c (add_thread): Fix whitespace.
4885
4886 2014-02-19 Doug Evans <dje@google.com>
4887
4888 * dll.c (clear_dlls): Replace accessing list implemention details
4889 with API function.
4890 * gdbthread.h (get_first_thread): Declare.
4891 * inferiors.c (for_each_inferior_with_data): New function.
4892 (get_first_thread): New function.
4893 (find_thread_ptid): Simplify.
4894 (get_first_inferior): New function.
4895 (clear_list): Delete.
4896 (one_inferior_p): New function.
4897 (clear_inferior_list): New function.
4898 (clear_inferiors): Update.
4899 * inferiors.h (for_each_inferior_with_data): Declare.
4900 (clear_inferior_list): Declare.
4901 (one_inferior_p): Declare.
4902 (get_first_inferior): Declare.
4903 * linux-low.c (linux_wait_for_event): Replace accessing list
4904 implemention details with API function.
4905 * server.c (target_running): Ditto.
4906 (accumulate_file_name_length): New function.
4907 (emit_dll_description): New function.
4908 (handle_qxfer_libraries): Replace accessing list implemention
4909 details with API function.
4910 (handle_qxfer_threads_worker): New function.
4911 (handle_qxfer_threads_proper): Replace accessing list implemention
4912 details with API function.
4913 (handle_query): Ditto.
4914 (visit_actioned_threads_callback_ftype): New typedef.
4915 (visit_actioned_threads_data): New struct.
4916 (visit_actioned_threads): Rewrite to be find_inferior callback.
4917 (resume): Call find_inferior.
4918 (handle_status): Replace accessing list implemention
4919 details with API function.
4920 (process_serial_event): Replace accessing list implemention details
4921 with API function.
4922 * target.c (set_desired_inferior): Replace accessing list implemention
4923 details with API function.
4924 * tracepoint.c (same_process_p): New function.
4925 (gdb_agent_about_to_close): Replace accessing list implemention
4926 details with API function.
4927 * win32-low.c (child_delete_thread): Replace accessing list
4928 implemention details with API function.
4929 (match_dll_by_basename): New function.
4930 (dll_is_loaded_by_basename): New function.
4931 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4932 details call to dll_is_loaded_by_basename.
4933
4934 2014-02-19 Doug Evans <dje@google.com>
4935
4936 * dll.h (struct dll_info): Add comment.
4937 * gdbthread.h (struct thread_info): Add comment.
4938 (current_ptid): Simplify.
4939 * inferiors.c (add_process): Update.
4940 (remove_process): Update.
4941 * inferiors.h (struct process_info): Rename member "head" to "entry".
4942 * linux-low.c (delete_lwp): Update.
4943 (add_lwp): Update.
4944 (last_thread_of_process_p): Update.
4945 (kill_one_lwp_callback, linux_kill): Update.
4946 (status_pending_p_callback): Update.
4947 (wait_for_sigstop): Update. Simplify read of ptid.
4948 (start_step_over): Update.
4949 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4950 (get_lwp_thread): Update.
4951 (struct lwp_info): Rename member "head" to "entry".
4952 * regcache.h (inferior_list_entry): Delete.
4953 * server.c (kill_inferior_callback): Update.
4954 (detach_or_kill_inferior_callback): Update.
4955 (print_started_pid): Update.
4956 (print_attached_pid): Update.
4957 (process_serial_event): Simplify read of ptid.
4958 * thread-db.c (thread_db_create_event): Update.
4959 (thread_db_get_tls_address): Update.
4960 * win32-low.c (current_inferior_ptid): Simplify.
4961
4962 2014-02-19 Tom Tromey <tromey@redhat.com>
4963
4964 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4965 argument.
4966 (target_supports_btrace): Update.
4967
4968 2014-02-14 Yao Qi <yao@codesourcery.com>
4969
4970 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4971 (rsp-low-ipa.o): New target.
4972
4973 2014-02-12 Tom Tromey <tromey@redhat.com>
4974
4975 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4976 convert_ascii_to_int.
4977 * regcache.c (registers_to_string): Likewise.
4978 * remote-utils.c (decode_M_packet): Likewise.
4979 * server.c (process_serial_event): Likewise.
4980
4981 2014-02-12 Tom Tromey <tromey@redhat.com>
4982
4983 * server.c (handle_query, handle_v_run): Use hex2bin, not
4984 unhexify.
4985 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4986
4987 2014-02-12 Tom Tromey <tromey@redhat.com>
4988
4989 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4990 convert_int_to_ascii.
4991 * regcache.c (registers_to_string, collect_register_as_string):
4992 Likewise.
4993 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4994 Likewise.
4995 * server.c (process_serial_event): Likewise.
4996 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4997 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4998
4999 2014-02-12 Tom Tromey <tromey@redhat.com>
5000
5001 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5002 bin2hex, not hexify.
5003 * tracepoint.c (cmd_qtstatus): Likewise.
5004
5005 2014-02-12 Tom Tromey <tromey@redhat.com>
5006
5007 * remote-utils.c (monitor_output): Pass explicit length to
5008 hexify.
5009
5010 2014-02-12 Tom Tromey <tromey@redhat.com>
5011
5012 * tracepoint.c: Include rsp-low.h.
5013 * server.c: Include rsp-low.h.
5014 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5015 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5016 declare.
5017 * remote-utils.c: Include rsp-low.h.
5018 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5019 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5020 (convert_int_to_ascii, convert_ascii_to_int): Move to
5021 common/rsp-low.c.
5022 * regcache.c: Include rsp-low.h.
5023 * ax.c: Include rsp-low.h.
5024 * Makefile.in (SFILES): Add common/rsp-low.c.
5025 (OBS): Add rsp-low.o.
5026 (rsp-low.o): New target.
5027
5028 2014-02-12 Tom Tromey <tromey@redhat.com>
5029
5030 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5031 Include print-utils.h.
5032 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5033 (plongest, thirty_two, phex_nz): Remove.
5034 * Makefile.in (SFILES): Add common/print-utils.c.
5035 (OBS): Add print-utils.o.
5036 (print-utils-ipa.o): New target.
5037 (print-utils.o): New target.
5038 (IPA_OBJS): Add print-utils-ipa.o.
5039
5040 2014-02-06 Tom Tromey <tromey@redhat.com>
5041
5042 * Makefile.in (SFILES): Fix indentation.
5043
5044 2014-02-05 Doug Evans <dje@google.com>
5045
5046 * linux-low.c (linux_wait_for_event): Improve comment.
5047 (linux_wait_1): Keep current_inferior in sync with event_child.
5048
5049 2014-01-22 Doug Evans <dje@google.com>
5050
5051 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5052
5053 2014-01-22 Doug Evans <dje@google.com>
5054
5055 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5056 * configure: Regenerate.
5057 * config.in: Regenerate.
5058 * Makefile.in (SFILES): Add debug.c.
5059 (OBS): Add debug.o.
5060 * debug.c: New file.
5061 * debug.h: New file.
5062 * linux-aarch64-low.c (*): Update all debugging printfs to use
5063 debug_printf instead of fprintf.
5064 * linux-arm-low.c (*): Ditto.
5065 * linux-cris-low.c (*): Ditto.
5066 * linux-crisv32-low.c (*): Ditto.
5067 * linux-m32r-low.c (*): Ditto.
5068 * linux-sparc-low.c (*): Ditto.
5069 * linux-x86.c (*): Ditto.
5070 * linux-low.c (*): Ditto.
5071 (linux_wait_1): Add calls to debug_enter, debug_exit.
5072 (linux_wait): Remove redundant debugging printf.
5073 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5074 (linux_resume, unstop_all_lwps): Ditto.
5075 * mem-break.c (*): Update all debugging printfs to use
5076 debug_printf instead of fprintf.
5077 * remote-utils.c (*): Ditto.
5078 * thread-db.c (*): Ditto.
5079 * server.c #include <ctype.h>, "gdb_vecs.h".
5080 (debug_threads): Moved to debug.c.
5081 (*): Update all debugging printfs to use debug_printf instead of
5082 fprintf.
5083 (start_inferior): Replace call to fflush with call to debug_flush.
5084 (monitor_show_help): Mention set debug-format.
5085 (parse_debug_format_options): New function.
5086 (handle_monitor_command): Handle "monitor set debug-format".
5087 (gdbserver_usage): Mention --debug-format.
5088 (main): Parse --debug-format.
5089 * server.h (debug_threads): Declaration moved to debug.h.
5090 #include "debug.h".
5091 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5092 trace_debug_1 that uses debug_printf.
5093 (tracepoint_look_up_symbols): Update all debugging printfs to use
5094 debug_printf instead of fprintf.
5095
5096 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5097
5098 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5099 sys/ptrace.h.
5100
5101 2014-01-17 Pedro Alves <palves@redhat.com>
5102
5103 PR build/16445
5104 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5105 defined after including gdb_proc_service.h.
5106
5107 2014-01-16 Doug Evans <dje@google.com>
5108
5109 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5110 (match_dll): Use it.
5111
5112 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5113
5114 * target.h (target_ops) <read_btrace>: Change parameters and
5115 return type to allow error reporting.
5116 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5117 trace reading errors on.
5118 * linux-low.c (linux_low_read_btrace): Pass trace reading
5119 errors on.
5120 (linux_low_disable_btrace): New.
5121
5122 2014-01-15 Doug Evans <dje@google.com>
5123
5124 * inferiors.c (thread_id_to_gdb_id): Delete.
5125 * inferiors.h (thread_id_to_gdb_id): Delete.
5126
5127 2014-01-13 Eli Zaretskii <eliz@gnu.org>
5128
5129 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5130 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5131 versions.
5132
5133 2014-01-08 Pedro Alves <palves@redhat.com>
5134
5135 * server.c (handle_status): Don't discard previous queued stop
5136 replies or thread's pending status here.
5137 (main) <disconnection>: Do it here instead.
5138
5139 2014-01-08 Pedro Alves <palves@redhat.com>
5140
5141 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5142 * server.c (visit_actioned_threads, handle_pending_status): New
5143 function.
5144 (handle_v_cont): Factor out parts to ...
5145 (resume): ... this new function. If in all-stop, and a thread
5146 being resumed has a pending status, report it without actually
5147 resuming.
5148 (myresume): Adjust to use the new 'resume' function.
5149 (clear_pending_status_callback, set_pending_status_callback)
5150 (find_status_pending_thread_callback): New functions.
5151 (handle_status): Handle the case of multiple threads having
5152 interesting statuses to report. Report threads' real last signal
5153 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5154 with an interesting thread to report the status for, instead of
5155 always reporting the status of the first thread.
5156
5157 2014-01-01 Joel Brobecker <brobecker@adacore.com>
5158
5159 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5160 * gdbreplay.c (gdbreplay_version): Likewise.
5161
5162 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5163
5164 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5165 iov.iov_len with the real length in use.
5166
5167 2013-12-13 Joel Brobecker <brobecker@adacore.com>
5168
5169 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5170 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5171 for all targets that use win32-low.c.
5172 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5173 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5174
5175 2013-12-13 Pedro Alves <palves@redhat.com>
5176
5177 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5178 if equal to TARGET_WAITKIND_LOADED.
5179 * win32-low.c (cached_status): New static global.
5180 (win32_wait): Add declaration.
5181 (do_initial_child_stuff): Flush all initial pending debug events
5182 up to the initial breakpoint.
5183 (win32_wait): If CACHED_STATUS was set, return that instead
5184 of doing a real wait. Remove the code resuming the execution
5185 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5186 during the initial phase. Also remove the code changing
5187 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5188 TARGET_WAITKIND_STOPPED.
5189
5190 2013-12-11 Yao Qi <yao@codesourcery.com>
5191
5192 * notif.c (handle_notif_ack): Return 0 if no notification
5193 matches.
5194
5195 2013-11-20 Doug Evans <dje@google.com>
5196
5197 * linux-low.c (linux_set_resume_request): Fix comment.
5198
5199 2013-11-20 Doug Evans <dje@google.com>
5200
5201 * linux-low.c (resume_status_pending_p): Tweak comment.
5202
5203 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5204
5205 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5206 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5207 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5208 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5209 (srv_amd64_regobj): Add amd64-mpx.o.
5210 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5211 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5212 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5213 * i387-fp.c (num_pl_bnd_register) Added constant.
5214 (num_pl_bnd_cfg_registers) Added constant.
5215 (struct i387_xsave) Added reserved area and MPX fields.
5216 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5217 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5218 function.
5219 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5220 (init_registers_amd64_mpx_linux): Declare new function.
5221 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5222 (x86_64_regmap): Add MPX registers.
5223 (x86_linux_read_description): Add MPX case.
5224 (initialize_low_arch): Initialize MPX targets.
5225
5226 2013-11-18 Tom Tromey <tromey@redhat.com>
5227
5228 * configure: Rebuild.
5229 * configure.ac: Don't check for stdlib.h.
5230 * gdbreplay.c: Unconditionally include stdlib.h.
5231
5232 2013-11-18 Tom Tromey <tromey@redhat.com>
5233
5234 * config.in: Rebuild.
5235 * configure: Rebuild.
5236 * configure.ac: Don't use AC_HEADER_DIRENT.
5237
5238 2013-11-18 Tom Tromey <tromey@redhat.com>
5239
5240 * server.h: Don't check HAVE_STRING_H.
5241 * gdbreplay.c: Don't check HAVE_STRING_H.
5242 * configure: Rebuild.
5243
5244 2013-11-18 Tom Tromey <tromey@redhat.com>
5245
5246 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5247 LIBGNU.
5248
5249 2013-11-08 Tom Tromey <tromey@redhat.com>
5250
5251 * configure, config.in: Rebuild.
5252 * configure.ac: Remove unused configury.
5253
5254 2013-11-08 Tom Tromey <tromey@redhat.com>
5255
5256 * acinclude.m4: Include common.m4, codeset.m4.
5257 * configure, config.in: Rebuild.
5258 * configure.ac: Use GDB_AC_COMMON.
5259
5260 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5261
5262 * linux-s390-low.c (HWCAP_S390_TE): New define.
5263 (s390_arch_setup): Consider the TE field in the HWCAP for
5264 determining 'have_regset_tdb'.
5265
5266 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5267
5268 PR gdb/16014
5269 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5270 call to sizeof.
5271
5272 2013-10-02 Pedro Alves <palves@redhat.com>
5273
5274 * server.c (process_serial_event): Don't output "GDBserver
5275 exiting" if GDB is connected through stdio.
5276 * target.c (mywait): Likewise, be silent if GDB is connected
5277 through stdio.
5278
5279 2013-10-01 Joel Brobecker <brobecker@adacore.com>
5280
5281 * lynx-low.c (lynx_add_threads_after_attach): New function.
5282 (lynx_attach): Remove call to add_thread. Add call to
5283 lynx_add_threads_after_attach instead.
5284
5285 2013-09-28 Mike Frysinger <vapier@gentoo.org>
5286
5287 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5288 * config.in, configure: Regenerated.
5289
5290 2013-09-18 Yao Qi <yao@codesourcery.com>
5291
5292 PR server/15959
5293 * server.c (start_inferior): Clear 'resume_info'.
5294
5295 2013-09-16 Jiong Wang <jiwang@tilera.com>
5296
5297 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5298 for each register.
5299
5300 2013-09-16 Jiong Wang <jiwang@tilera.com>
5301
5302 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5303 linux-tile-low.o to srv_tgtobj.
5304
5305 2013-09-16 Will Newton <will.newton@linaro.org>
5306
5307 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5308 out regs.
5309
5310 2013-09-06 Pedro Alves <palves@redhat.com>
5311
5312 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5313 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5314 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5315 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5316 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5317 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5318
5319 2013-09-06 Pedro Alves <palves@redhat.com>
5320
5321 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5322 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5323
5324 2013-09-06 Pedro Alves <palves@redhat.com>
5325
5326 * linux-amd64-ipa.c: Include tracepoint.h.
5327 * linux-i386-ipa.c: Include tracepoint.h.
5328
5329 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5330
5331 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5332 (ps_get_thread_area): New function.
5333
5334 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5335
5336 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5337 (initialize_low_arch): Call init_registers_crisv32 rather than
5338 init_register_crisv32.
5339
5340 2013-09-05 Pedro Alves <palves@redhat.com>
5341
5342 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5343 to ...
5344 * hostio.h: ... this new file.
5345 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5346 win32-low.c: Include hostio.h.
5347
5348 2013-09-05 Pedro Alves <palves@redhat.com>
5349
5350 * server.h (gdb_client_data, handler_func, callback_handler_func)
5351 (delete_file_handler, add_file_handler, append_callback_event)
5352 (delete_callback_event, start_event_loop, initialize_event_loop):
5353 Move to event-loop.h and include it.
5354 * event-loop.h: New file.
5355
5356 2013-09-05 Pedro Alves <palves@redhat.com>
5357
5358 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5359 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5360 (loaded_dll, unloaded_dll): Move to ...
5361 * dll.h: ... this new file.
5362 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5363
5364 2013-09-05 Pedro Alves <palves@redhat.com>
5365
5366 * server.h (current_process, get_thread_process, all_processes)
5367 (add_inferior_to_list, for_each_inferior, current_inferior)
5368 (remove_inferior, add_process, remove_process, find_process_pid)
5369 (have_started_inferiors_p, have_attached_inferiors_p)
5370 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5371 (clear_inferiors, find_inferior, find_inferior_id)
5372 (inferior_target_data, set_inferior_target_data)
5373 (inferior_regcache_data, set_inferior_regcache_data): Move to
5374 inferiors.h, and include it.
5375 * inferiors.h: New file.
5376
5377 2013-09-05 Pedro Alves <palves@redhat.com>
5378
5379 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5380 Move ...
5381 * ax.h: ... here.
5382
5383 2013-09-05 Pedro Alves <palves@redhat.com>
5384
5385 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5386 tracepoint.h.
5387 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5388 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5389 (handle_tracepoint_general_set, handle_tracepoint_query)
5390 (tracepoint_finished_step, tracepoint_was_hit)
5391 (release_while_stepping_state_list, current_traceframe)
5392 (in_readonly_region, traceframe_read_mem)
5393 (fetch_traceframe_registers, traceframe_read_sdata)
5394 (traceframe_read_info, struct fast_tpoint_collect_status)
5395 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5396 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5397 (supply_fast_tracepoint_registers)
5398 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5399 (ipa_tdesc, claim_trampoline_space)
5400 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5401 (agent_mem_read, agent_get_trace_state_variable_value)
5402 (agent_set_trace_state_variable_value, agent_tsv_read)
5403 (agent_mem_read_string, get_raw_reg_func_addr)
5404 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5405 * tracepoint.h: ... this new file.
5406
5407 2013-09-05 Pedro Alves <palves@redhat.com>
5408
5409 * server.h (perror_with_name, error, fatal, warning, paddress)
5410 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5411 include it.
5412 * utils.h: New file.
5413
5414 2013-09-05 Pedro Alves <palves@redhat.com>
5415
5416 * server.h (remote_debug, noack_mode, transport_is_reliable)
5417 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5418 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5419 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5420 (write_enn, initialize_async_io, enable_async_io)
5421 (disable_async_io, check_remote_input_interrupt_request)
5422 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5423 (dead_thread_notify, prepare_resume_reply)
5424 (decode_address_to_semicolon, decode_address, decode_m_packet)
5425 (decode_M_packet, decode_X_packet, decode_xfer_write)
5426 (decode_search_memory_packet, unhexify, hexify)
5427 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5428 (look_up_one_symbol, relocate_instruction)
5429 (monitor_output): Move to remote-utils.h, and include it.
5430 * remote-utils.h: New file.
5431
5432 2013-09-05 Pedro Alves <palves@redhat.com>
5433
5434 * server.h (_): Delete.
5435
5436 2013-09-02 Pedro Alves <palves@redhat.com>
5437
5438 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5439 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5440 allocated.
5441 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5442
5443 2013-09-02 Pierre Muller <muller@sourceware.org>
5444
5445 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5446 or WriteProcessMemory complete successfully and handle
5447 ERROR_PARTIAL_COPY error.
5448
5449 2013-09-02 Pedro Alves <palves@redhat.com>
5450
5451 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5452 error instead of EIO.
5453
5454 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5455
5456 PR server/15604
5457 * linux-low.c: Include filestuff.h.
5458 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5459 * lynx-low.c: Include filestuff.h.
5460 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5461 * server.c: Include filestuff.h.
5462 (main): Call notice_open_fds.
5463 * spu-low.c: Include filestuff.h.
5464 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5465
5466 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
5467
5468 * Makefile.in: Explain why ../target and ../nat are not
5469 listed as include file search paths.
5470 (linux-waitpid.o): New object file rule.
5471 * configure.srv (srv_native_linux_obj): New variable.
5472 Replace all occurrences of linux native object files with
5473 $srv_native_linux_obj.
5474 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5475 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5476 (linux_enable_event_reporting): Remove declaration.
5477 (my_waitpid): Moved to common/linux-waitpid.c.
5478 (linux_wait_for_event): Pass ptid when calling
5479 linux_enable_event_reporting.
5480 (linux_supports_tracefork_flag): Remove.
5481 (linux_enable_event_reporting): Likewise.
5482 (linux_tracefork_grandchild): Remove.
5483 (STACK_SIZE): Moved to common/linux-ptrace.c.
5484 (linux_tracefork_child): Remove.
5485 (linux_test_for_tracefork): Remove.
5486 (linux_look_up_symbols): Call linux_supports_traceclone.
5487 (initialize_low): Remove call to linux_test_for_tracefork.
5488 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5489 common/linux-ptrace.h.
5490 (PTRACE_TYPE_ARG4): Likewise.
5491 Include linux-ptrace.h.
5492
5493 2013-08-21 Pedro Alves <palves@redhat.com>
5494
5495 * config.in: Renegerate.
5496
5497 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
5498
5499 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5500 (SFILES): Remove $(srcdir)/common/target-common.c and
5501 add $(srcdir)/target/waitstatus.c.
5502 (OBS): Remove target-common.o and add waitstatus.o.
5503 (server_h): Remove $(srcdir)/../common/target-common.h and
5504 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5505 and $(srcdir)/../target/waitstatus.h.
5506 (target-common.o): Remove.
5507 (waitstatus.o): New target object file.
5508 * target.h: Do not include target-common.h and
5509 include target/resume.h, target/wait.h and
5510 target/waitstatus.h.
5511
5512 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
5513
5514 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5515 to PTRACE_TYPE_ARG3.
5516 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5517 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5518 PTRACE_TYPE_ARG4.
5519 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5520 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5521
5522 2013-07-27 Jie Zhang <jie@codesourcery.com>
5523 Daniel Jacobowitz <dan@codesourcery.com>
5524 Yao Qi <yao@codesourcery.com>
5525
5526 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5527 (mips-linux-watch.o): New rule.
5528 (mips_linux_watch_h): New variable.
5529 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5530 srv_tgtobj.
5531 * linux-mips-low.c: Include mips-linux-watch.h.
5532 (struct arch_process_info, struct arch_lwp_info): New.
5533 (update_watch_registers_callback): New function.
5534 (mips_linux_new_process, mips_linux_new_thread) New functions.
5535 (mips_linux_prepare_to_resume, mips_insert_point): New
5536 functions.
5537 (mips_remove_point, mips_stopped_by_watchpoint): New
5538 functions.
5539 (rsp_bp_type_to_target_hw_bp_type): New function.
5540 (mips_stopped_data_address): New function.
5541 (the_low_target): Add watchpoint support functions.
5542
5543 2013-07-27 Yao Qi <yao@codesourcery.com>
5544
5545 * i386-low.c: Include break-common.h.
5546 (enum target_hw_bp_type): Remove.
5547
5548 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
5549
5550 * Makefile.in (SFILES): /common/target-common.c.
5551 (OBS): Add target-common.o.
5552 (server_h): Add $(srcdir)/../common/target-common.h.
5553 (target-common.o): New target.
5554 * server.c (queue_stop_reply_callback): Free
5555 status string after use.
5556 * target.c (target_waitstatus_to_string): Remove.
5557 * target.h: Include target-common.h.
5558 (resume_kind): Likewise.
5559 (target_waitkind): Likewise.
5560 (target_waitstatus): Likewise.
5561 (TARGET_WNOHANG): Likewise.
5562
5563 2013-07-04 Yao Qi <yao@codesourcery.com>
5564
5565 * Makefile.in (host_alias): Use @host_noncanonical@.
5566 (target_alias): Use @target_noncanonical@.
5567 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5568 ACX_NONCANONICAL_HOST.
5569 * configure: Regenerated.
5570
5571 Revert:
5572 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5573
5574 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5575 * configure: Rebuild.
5576 * Makefile.in (version_host, version_target): Get from configure.
5577 (version.c): Use $(version_host) and $(version_target).
5578
5579 2013-07-03 Pedro Alves <palves@redhat.com>
5580
5581 * Makefile.in (config.status): Depend on development.sh.
5582 * acinclude.m4: Include libmcheck.m4.
5583 * configure: Regenerate.
5584
5585 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5586
5587 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5588 attribute inside the parentheses.
5589 (winapi_DebugSetProcessKillOnExit): Ditto.
5590 (winapi_DebugBreakProcess): Ditto.
5591 (winapi_GenerateConsoleCtrlEvent): Ditto.
5592
5593 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5594
5595 * notif.h (notif_event): Add a dummy member to avoid compiler
5596 errors.
5597
5598 2013-07-01 Pedro Alves <palves@redhat.com>
5599
5600 * hostio.c (HOSTIO_PATH_MAX): Define.
5601 (require_filename, handle_open, handle_unlink, handle_readlink):
5602 Use it.
5603
5604 2013-07-01 Pedro Alves <palves@redhat.com>
5605
5606 * server.h: Include "pathmax.h".
5607 * linux-low.c: Don't include sys/param.h.
5608 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5609 MAXPATHLEN.
5610 * win32-low.c: Don't include sys/param.h.
5611 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5612
5613 2013-07-01 Pedro Alves <palves@redhat.com>
5614
5615 * event-loop.c: Don't check HAVE_UNISTD_H before including
5616 <unistd.h>.
5617 * gdbreplay.c: Likewise.
5618 * remote-utils.c: Likewise.
5619 * server.c: Likewise.
5620 * configure.ac: Don't check for unistd.h.
5621 * configure: Regenerate.
5622
5623 2013-06-28 Tom Tromey <tromey@redhat.com>
5624
5625 * Makefile.in (version.c): Use version.in, not
5626 common/version.in.
5627
5628 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5629
5630 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5631 * configure: Rebuild.
5632 * Makefile.in (version_host, version_target): Get from configure.
5633 (version.c): Use $(version_host) and $(version_target).
5634
5635 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5636
5637 Fix trace-status to output user name without trailing colon.
5638 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5639
5640 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5641
5642 Fix trace-status to output proper start-time and stop-time.
5643 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5644 output start time and stop time in hex as gdb expects.
5645
5646 2013-06-26 Pedro Alves <pedro@codesourcery.com>
5647
5648 * tracepoint.c (build_traceframe_info_xml): Output trace state
5649 variables present in the trace buffer.
5650
5651 2013-06-24 Tom Tromey <tromey@redhat.com>
5652
5653 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5654 create-version.sh.
5655 (version.o): Remove.
5656 * gdbreplay.c: Include version.h.
5657 (version, host_name): Don't declare.
5658 * server.h: Include version.h.
5659 (version, host_name): Don't declare.
5660
5661 2013-06-12 Pedro Alves <palves@redhat.com>
5662
5663 * linux-x86-low.c (linux_is_elf64): Delete global.
5664 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5665 with local linux_pid_exe_is_elf_64_file use.
5666
5667 2013-06-11 Pedro Alves <palves@redhat.com>
5668
5669 * linux-low.c (regset_disabled, disable_regset): New functions.
5670 (regsets_fetch_inferior_registers)
5671 (regsets_store_inferior_registers): Use them.
5672 (initialize_regsets_info); Don't allocate the disabled_regsets
5673 array here.
5674 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5675 comment.
5676
5677 2013-06-11 Pedro Alves <palves@redhat.com>
5678
5679 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5680 xmalloc.
5681
5682 2013-06-11 Pedro Alves <palves@redhat.com>
5683
5684 * linux-x86-low.c (initialize_low_arch): Call
5685 init_registers_x32_avx_linux.
5686
5687 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5688
5689 Fix compatibility with Android Bionic.
5690 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5691 it is not empty.
5692
5693 2013-06-07 Pedro Alves <palves@redhat.com>
5694
5695 PR server/14823
5696 * Makefile.in (OBS): Add tdesc.o.
5697 (IPA_OBJS): Add tdesc-ipa.o.
5698 (tdesc-ipa.o): New rule.
5699 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5700 interface.
5701 * linux-low.c (new_inferior): Delete.
5702 (disabled_regsets, num_regsets): Delete.
5703 (linux_add_process): Adjust to set the new per-process
5704 new_inferior flag.
5705 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5706 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5707 was a stop. When calling arch_setup, switch the current inferior
5708 to the thread that got an event.
5709 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5710 (regsets_fetch_inferior_registers)
5711 (regsets_store_inferior_registers): New regsets_info parameter.
5712 Adjust to use it.
5713 (linux_register_in_regsets): New regs_info parameter. Adjust to
5714 use it.
5715 (register_addr, fetch_register, store_register): New usrregs_info
5716 parameter. Adjust to use it.
5717 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5718 parameter regs_info. Adjust to use it.
5719 (linux_fetch_registers): Get the current inferior's regs_info, and
5720 adjust to use it.
5721 (linux_store_registers): Ditto.
5722 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5723 (initialize_low): Don't initialize the target_regsets here. Call
5724 initialize_low_arch.
5725 * linux-low.h (target_regsets): Delete declaration.
5726 (struct regsets_info): New.
5727 (struct usrregs_info): New.
5728 (struct regs_info): New.
5729 (struct process_info_private) <new_inferior>: New field.
5730 (struct linux_target_ops): Delete the num_regs, regmap, and
5731 regset_bitmap fields. New field regs_info.
5732 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5733 * i387-fp.c (num_xmm_registers): Delete.
5734 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5735 calls to new interface.
5736 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5737 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5738 Infer the number of xmm registers from the regcache's target
5739 description.
5740 * i387-fp.h (num_xmm_registers): Delete.
5741 * inferiors.c (add_thread): Don't install the thread's regcache
5742 here.
5743 * proc-service.c (gregset_info): Fetch the current inferior's
5744 regs_info. Adjust to use it.
5745 * regcache.c: Include tdesc.h.
5746 (register_bytes, reg_defs, num_registers)
5747 (gdbserver_expedite_regs): Delete.
5748 (get_thread_regcache): If the thread doesn't have a regcache yet,
5749 create one, instead of aborting gdbserver.
5750 (regcache_invalidate_one): Rename to ...
5751 (regcache_invalidate_thread): ... this.
5752 (regcache_invalidate_one): New.
5753 (regcache_invalidate): Only invalidate registers of the current
5754 process.
5755 (init_register_cache): Add target_desc parameter, and use it.
5756 (new_register_cache): Ditto. Assert the target description has a
5757 non zero registers_size.
5758 (regcache_cpy): Add assertions. Adjust.
5759 (realloc_register_cache, set_register_cache): Delete.
5760 (registers_to_string, registers_from_string): Adjust.
5761 (find_register_by_name, find_regno, find_register_by_number)
5762 (register_cache_size): Add target_desc parameter, and use it.
5763 (free_register_cache_thread, free_register_cache_thread_one)
5764 (regcache_release, register_cache_size): New.
5765 (register_size): Add target_desc parameter, and use it.
5766 (register_data, supply_register, supply_register_zeroed)
5767 (supply_regblock, supply_register_by_name, collect_register)
5768 (collect_register_as_string, collect_register_by_name): Adjust.
5769 * regcache.h (struct target_desc): Forward declare.
5770 (struct regcache) <tdesc>: New field.
5771 (init_register_cache, new_register_cache): Add target_desc
5772 parameter.
5773 (regcache_invalidate_thread): Declare.
5774 (regcache_invalidate_one): Delete declaration.
5775 (regcache_release): Declare.
5776 (find_register_by_number, register_cache_size, register_size)
5777 (find_regno): Add target_desc parameter.
5778 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5779 declarations.
5780 * remote-utils.c: Include tdesc.h.
5781 (outreg, prepare_resume_reply): Adjust.
5782 * server.c: Include tdesc.h.
5783 (gdbserver_xmltarget): Delete declaration.
5784 (get_features_xml, process_serial_event): Adjust.
5785 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5786 declare.
5787 (struct process_info) <tdesc>: New field.
5788 (ipa_tdesc): Declare.
5789 * tdesc.c: New file.
5790 * tdesc.h: New file.
5791 * tracepoint.c: Include tdesc.h.
5792 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5793 (get_context_regcache): Adjust to pass ipa_tdesc down.
5794 (do_action_at_tracepoint): Adjust to get the register cache size
5795 from the context regcache's description.
5796 (traceframe_walk_blocks): Adjust to get the register cache size
5797 from the current trace frame's description.
5798 (traceframe_get_pc): Adjust to get current trace frame's
5799 description and pass it down.
5800 (gdb_collect): Adjust to get the register cache size from the
5801 IPA's description.
5802 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5803 (gdbserver_xmltarget): Delete.
5804 (initialize_low_tracepoint): Set the ipa's target description.
5805 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5806 (initialize_low_tracepoint): Set the ipa's target description.
5807 * linux-x86-low.c: Include tdesc.h.
5808 [__x86_64__] (is_64bit_tdesc): New.
5809 (ps_get_thread_area, x86_get_thread_area): Use it.
5810 (i386_cannot_store_register): Rename to ...
5811 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5812 (i386_cannot_fetch_register): Rename to ...
5813 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5814 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5815 to new interface.
5816 (target_regsets): Rename to ...
5817 (x86_regsets): ... this.
5818 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5819 interface.
5820 (x86_siginfo_fixup): Use is_64bit_tdesc.
5821 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5822 (tdesc_x32_avx_linux, tdesc_x32_linux)
5823 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5824 Declare.
5825 (x86_linux_update_xmltarget): Delete.
5826 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5827 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5828 (AMD64_LINUX_USER64_CS): New.
5829 (x86_linux_read_description): New, based on
5830 x86_linux_update_xmltarget.
5831 (same_process_callback): New.
5832 (x86_arch_setup_process_callback): New.
5833 (x86_linux_update_xmltarget): New.
5834 (x86_regsets_info): New.
5835 (amd64_linux_regs_info): New.
5836 (i386_linux_usrregs_info): New.
5837 (i386_linux_regs_info): New.
5838 (x86_linux_regs_info): New.
5839 (x86_arch_setup): Reimplement.
5840 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5841 (x86_emit_ops): Ditto.
5842 (the_low_target): Adjust. Install x86_linux_regs_info,
5843 x86_cannot_fetch_register, and x86_cannot_store_register.
5844 (initialize_low_arch): New.
5845 * linux-ia64-low.c (tdesc_ia64): Declare.
5846 (ia64_fetch_register): Adjust.
5847 (ia64_usrregs_info, regs_info): New globals.
5848 (ia64_regs_info): New function.
5849 (the_low_target): Adjust.
5850 (initialize_low_arch): New function.
5851 * linux-sparc-low.c (tdesc_sparc64): Declare.
5852 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5853 Adjust.
5854 (sparc_arch_setup): New function.
5855 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5856 (the_low_target): Adjust.
5857 (initialize_low_arch): New function.
5858 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5859 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5860 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5861 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5862 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5863 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5864 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5865 (tdesc_powerpc_isa205_vsx64l): Declare.
5866 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5867 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5868 (ppc_set_pc, ppc_get_hwcap): Adjust.
5869 (ppc_usrregs_info): Forward declare.
5870 (!__powerpc64__) ppc_regmap_adjusted: New global.
5871 (ppc_arch_setup): Adjust to the current process'es target
5872 description.
5873 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5874 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5875 (ppc_store_evrregset): Adjust.
5876 (target_regsets): Rename to ...
5877 (ppc_regsets): ... this, and make static.
5878 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5879 (ppc_regs_info): New function.
5880 (the_low_target): Adjust.
5881 (initialize_low_arch): New function.
5882 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5883 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5884 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5885 (tdesc_s390x_linux64v2): Declare.
5886 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5887 (s390_fill_gregset, s390_store_last_break): Adjust.
5888 (target_regsets): Rename to ...
5889 (s390_regsets): ... this, and make static.
5890 (s390_get_pc, s390_set_pc): Adjust.
5891 (s390_get_hwcap): New target_desc parameter, and use it.
5892 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5893 (s390_arch_setup): Adjust to set the current process'es target
5894 description. Don't adjust the regmap.
5895 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5896 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5897 (regs_info_3264): New globals.
5898 (s390_regs_info): New function.
5899 (the_low_target): Adjust.
5900 (initialize_low_arch): New function.
5901 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5902 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5903 [__mips64] (init_registers_mips_linux)
5904 (init_registers_mips_dsp_linux): Delete defines.
5905 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5906 (have_dsp): New global.
5907 (mips_read_description): New, based on mips_arch_setup.
5908 (mips_arch_setup): Reimplement.
5909 (get_usrregs_info): New function.
5910 (mips_cannot_fetch_register, mips_cannot_store_register)
5911 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5912 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5913 (target_regsets): Rename to ...
5914 (mips_regsets): ... this, and make static.
5915 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5916 (dsp_regs_info, regs_info): New globals.
5917 (mips_regs_info): New function.
5918 (the_low_target): Adjust.
5919 (initialize_low_arch): New function.
5920 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5921 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5922 Declare.
5923 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5924 (arm_read_description): New, with bits factored from
5925 arm_arch_setup.
5926 (arm_arch_setup): Reimplement.
5927 (target_regsets): Rename to ...
5928 (arm_regsets): ... this, and make static.
5929 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5930 (arm_regs_info): New function.
5931 (the_low_target): Adjust.
5932 (initialize_low_arch): New function.
5933 * linux-m68k-low.c (tdesc_m68k): Declare.
5934 (target_regsets): Rename to ...
5935 (m68k_regsets): ... this, and make static.
5936 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5937 (m68k_regs_info): New function.
5938 (m68k_arch_setup): New function.
5939 (the_low_target): Adjust.
5940 (initialize_low_arch): New function.
5941 * linux-sh-low.c (tdesc_sharch): Declare.
5942 (target_regsets): Rename to ...
5943 (sh_regsets): ... this, and make static.
5944 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5945 (sh_regs_info, sh_arch_setup): New functions.
5946 (the_low_target): Adjust.
5947 (initialize_low_arch): New function.
5948 * linux-bfin-low.c (tdesc_bfin): Declare.
5949 (bfin_arch_setup): New function.
5950 (bfin_usrregs_info, regs_info): New globals.
5951 (bfin_regs_info): New function.
5952 (the_low_target): Adjust.
5953 (initialize_low_arch): New function.
5954 * linux-cris-low.c (tdesc_cris): Declare.
5955 (cris_arch_setup): New function.
5956 (cris_usrregs_info, regs_info): New globals.
5957 (cris_regs_info): New function.
5958 (the_low_target): Adjust.
5959 (initialize_low_arch): New function.
5960 * linux-cris-low.c (tdesc_crisv32): Declare.
5961 (cris_arch_setup): New function.
5962 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5963 (cris_regs_info): New function.
5964 (the_low_target): Adjust.
5965 (initialize_low_arch): New function.
5966 * linux-m32r-low.c (tdesc_m32r): Declare.
5967 (m32r_arch_setup): New function.
5968 (m32r_usrregs_info, regs_info): New globals.
5969 (m32r_regs_info): Adjust.
5970 (initialize_low_arch): New function.
5971 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5972 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5973 (tic6x_usrregs_info): Forward declare.
5974 (tic6x_read_description): New function, based on ...
5975 (tic6x_arch_setup): ... this. Reimplement.
5976 (target_regsets): Rename to ...
5977 (tic6x_regsets): ... this, and make static.
5978 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5979 (tic6x_regs_info): New function.
5980 (the_low_target): Adjust.
5981 (initialize_low_arch): New function.
5982 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5983 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5984 (target_regsets): Rename to ...
5985 (xtensa_regsets): ... this, and make static.
5986 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5987 globals.
5988 (xtensa_arch_setup, xtensa_regs_info): New functions.
5989 (the_low_target): Adjust.
5990 (initialize_low_arch): New function.
5991 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5992 (nios2_arch_setup): Set the current process'es tdesc.
5993 (target_regsets): Rename to ...
5994 (nios2_regsets): ... this.
5995 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5996 (nios2_regs_info): New function.
5997 (the_low_target): Adjust.
5998 (initialize_low_arch): New function.
5999 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6000 (aarch64_arch_setup): Set the current process'es tdesc.
6001 (target_regsets): Rename to ...
6002 (aarch64_regsets): ... this.
6003 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6004 (aarch64_regs_info): New function.
6005 (the_low_target): Adjust.
6006 (initialize_low_arch): New function.
6007 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6008 globals.
6009 (target_regsets): Rename to ...
6010 (tile_regsets): ... this.
6011 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6012 (tile_regs_info): New function.
6013 (tile_arch_setup): Set the current process'es tdesc.
6014 (the_low_target): Adjust.
6015 (initialize_low_arch): New function.
6016 * spu-low.c (tdesc_spu): Declare.
6017 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6018 * win32-arm-low.c (tdesc_arm): Declare.
6019 (arm_arch_setup): New function.
6020 (the_low_target): Install arm_arch_setup instead of
6021 init_registers_arm.
6022 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6023 (init_windows_x86): Rename to ...
6024 (i386_arch_setup): ... this. Set `win32_tdesc'.
6025 (the_low_target): Adjust.
6026 * win32-low.c (win32_tdesc): New global.
6027 (child_add_thread): Don't create the thread cache here.
6028 (do_initial_child_stuff): Set the new process'es tdesc.
6029 * win32-low.h (struct target_desc): Forward declare.
6030 (win32_tdesc): Declare.
6031 * lynx-i386-low.c (tdesc_i386): Declare global.
6032 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6033 * lynx-low.c (lynx_tdesc): New global.
6034 (lynx_add_process): Set the new process'es tdesc.
6035 * lynx-low.h (struct target_desc): Forward declare.
6036 (lynx_tdesc): Declare global.
6037 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6038 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6039 * nto-low.c (nto_tdesc): New global.
6040 (do_attach): Set the new process'es tdesc.
6041 * nto-low.h (struct target_desc): Forward declare.
6042 (nto_tdesc): Declare.
6043 * nto-x86-low.c (tdesc_i386): Declare.
6044 (nto_x86_arch_setup): Set `nto_tdesc'.
6045
6046 2013-06-04 Gary Benson <gbenson@redhat.com>
6047
6048 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6049 to qSupported response when appropriate.
6050 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6051 with nonzero-length annex.
6052 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6053 arguments supplied in annex.
6054
6055 2013-05-31 Doug Evans <dje@google.com>
6056
6057 PR server/15594
6058 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6059 64 bits in 64-cross-32 environment.
6060
6061 2013-05-28 Pedro Alves <palves@redhat.com>
6062
6063 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6064 (aarch64-without-fpu.c): Delete rule.
6065 * configure.srv (aarch64*-*-linux*): Remove references to
6066 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6067 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6068 declaration.
6069
6070 2013-05-24 Pedro Alves <palves@redhat.com>
6071
6072 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6073 instead of strchr/decode_address. Error if the range isn't split
6074 with a ','. Don't assume there's be a ':' in the action.
6075
6076 2013-05-23 Yao Qi <yao@codesourcery.com>
6077 Pedro Alves <palves@redhat.com>
6078
6079 * linux-low.c (lwp_in_step_range): New function.
6080 (linux_wait_1): If the thread was range stepping and stopped
6081 outside the stepping range, report the stop to GDB. Otherwise,
6082 continue stepping. Add range stepping debug output.
6083 (linux_set_resume_request): Copy the step range from the resume
6084 request to the lwp.
6085 (linux_supports_range_stepping): New.
6086 (linux_target_ops) <supports_range_stepping>: Set to
6087 linux_supports_range_stepping.
6088 * linux-low.h (struct linux_target_ops)
6089 <supports_range_stepping>: New field.
6090 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6091 * linux-x86-low.c (x86_supports_range_stepping): New.
6092 (the_low_target) <supports_range_stepping>: Set to
6093 x86_supports_range_stepping.
6094 * server.c (handle_v_cont): Handle 'r' action.
6095 (handle_v_requests): Append ";r" if the target supports range
6096 stepping.
6097 * target.h (struct thread_resume) <step_range_start,
6098 step_range_end>: New fields.
6099 (struct target_ops) <supports_range_stepping>:
6100 New field.
6101 (target_supports_range_stepping): New macro.
6102
6103 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6104
6105 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6106 confusion in comment.
6107
6108 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6109
6110 * lynx-low.c (struct process_info_private): New type.
6111 (lynx_add_process): New function.
6112 (lynx_create_inferior, lynx_attach): Replace calls to
6113 add_process by calls to lynx_add_process.
6114 (lynx_resume): If PTID is null, then try using
6115 current_process()->private->last_wait_event_ptid.
6116 Add comments.
6117 (lynx_clear_inferiors): Delete. The contents of that function
6118 has been inlined in lynx_mourn;
6119 (lynx_wait_1): Save the ptid in the process's private data.
6120 (lynx_mourn): Free the process' private data. Replace call
6121 to lynx_clear_inferiors by call to clear_inferiors.
6122
6123 2013-05-17 Yao Qi <yao@codesourcery.com>
6124
6125 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6126 the right place.
6127
6128 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
6129
6130 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6131 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6132 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6133 PT_TEXT_END_ADDR guards. Update comments.
6134 (linux_target_op) <read_offsets>: Conditionally define to
6135 linux_read_offsets if the target is UCLIBC and if it defines
6136 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6137
6138 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6139 Andrew Jenner <andrew@codesourcery.com>
6140
6141 * Makefile.in (SFILES): Add linux-nios2-low.c.
6142 (clean): Add action to delete nios2-linux.c.
6143 (nios2-linux.c): New rule.
6144 * configure.srv: Add nios2*-*-linux*.
6145 * linux-nios2-low.c: New.
6146
6147 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6148
6149 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6150
6151 2013-04-25 Hui Zhu <hui@codesourcery.com>
6152
6153 PR gdb/15186
6154 * ax.c (ax_printf): Add fflush.
6155
6156 2013-04-22 Tom Tromey <tromey@redhat.com>
6157
6158 * Makefile.in (SFILES): Add filestuff.c.
6159 (OBS): Add filestuff.o.
6160 (filestuff.o): New target.
6161 * config.in, configure: Rebuild.
6162 * configure.ac: Check for fdwalk, pipe2.
6163
6164 2013-04-17 Pedro Alves <palves@redhat.com>
6165
6166 * configure.ac (USE_THREAD_DB): Delete variable.
6167 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6168 Don't AC_SUBST USE_THREAD_DB.
6169 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6170 * config.in, configure: Regenerate.
6171
6172 2013-04-16 Pedro Alves <palves@redhat.com>
6173
6174 * linux-low.h (struct lwp_info) <thread_known>: Move under
6175 the USE_THREAD_DB #ifdef.
6176
6177 2013-04-16 Pedro Alves <palves@redhat.com>
6178
6179 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6180 (linux-low.o): Delete rule.
6181 * linux-low.h: Always include "gdb_thread_db.h" instead of
6182 conditionally including thread_db.h.
6183 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6184 HAVE_THREAD_DB_H.
6185
6186 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6187
6188 * Makefile.in (install-only): Fix make install regression.
6189
6190 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6191
6192 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6193 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6194 installation.
6195 * gdbserver.1: Remove.
6196
6197 2013-03-22 Pedro Alves <palves@redhat.com>
6198
6199 * linux-low.c (handle_extended_wait): Don't call
6200 linux_enable_event_reporting.
6201
6202 2013-03-15 Tony Theodore <tonyt@logyst.com>
6203
6204 PR build/9098:
6205 * Makefile.in (SHELL): Use @SHELL@.
6206
6207 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6208
6209 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6210 compiler warning.
6211
6212 2013-03-13 Joel Brobecker <brobecker@adacore.com>
6213
6214 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6215 Remove extraneous NULL element.
6216
6217 2013-03-13 Yao Qi <yao@codesourcery.com>
6218
6219 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6220 'V' block in trace frame.
6221
6222 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6223
6224 * target.h (struct target_ops): Add btrace ops.
6225 (target_supports_btrace): New macro.
6226 (target_enable_btrace): New macro.
6227 (target_disable_btrace): New macro.
6228 (target_read_btrace): New macro.
6229 * gdbthread.h (struct thread_info): Add btrace field.
6230 * server.c: Include btrace-common.h.
6231 (handle_btrace_general_set): New function.
6232 (handle_btrace_enable): New function.
6233 (handle_btrace_disable): New function.
6234 (handle_general_set): Call handle_btrace_general_set.
6235 (handle_qxfer_btrace): New function.
6236 (struct qxfer qxfer_packets[]): Add btrace entry.
6237 * inferiors.c (remove_thread): Disable btrace.
6238 * linux-low: Include linux-btrace.h.
6239 (linux_low_enable_btrace): New function.
6240 (linux_low_read_btrace): New function.
6241 (linux_target_ops): Add btrace ops.
6242 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6243 Add srv_linux_btrace=yes.
6244 (x86_64-*-linux*): Add linux-btrace.o.
6245 Add srv_linux_btrace=yes.
6246 * configure.ac: Define HAVE_LINUX_BTRACE.
6247 * config.in: Regenerated.
6248 * configure: Regenerated.
6249
6250 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6251
6252 * server.c (handle_qxfer): Preserve error message if -3 is
6253 returned.
6254 (qxfer): Document the -3 return value.
6255
6256 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6257
6258 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6259 (linux_btrace_h): New variable.
6260 (linux-btrace.o): New rule.
6261
6262 2013-03-08 Stan Shebs <stan@codesourcery.com>
6263 Hafiz Abid Qadeer <abidh@codesourcery.com>
6264
6265 * tracepoint.c (trace_buffer_size): New global.
6266 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6267 (init_trace_buffer): Change to one-argument function. Allocate
6268 trace buffer memory.
6269 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6270 handle QTBuffer:size packet.
6271 (cmd_bigqtbuffer_size): New function.
6272 (initialize_tracepoint): Call init_trace_buffer with
6273 DEFAULT_TRACE_BUFFER_SIZE.
6274 * server.c (handle_query): Add QTBuffer:size in the
6275 supported packets.
6276
6277 2013-03-07 Yao Qi <yao@codesourcery.com>
6278
6279 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6280 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6281 of -1.
6282 (cmd_qtsp): Adjust condition. Do post increment.
6283 Set cur_action and cur_step_action back to 0.
6284
6285 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6286
6287 PR server/15236
6288 * linux-low.c (linux_write_memory): Return early success if LEN is
6289 zero.
6290
6291 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
6292
6293 * configure.srv: Add x86_64-*-cygwin* as target.
6294
6295 2013-02-28 Tom Tromey <tromey@redhat.com>
6296
6297 * configure.ac: Invoke AC_SYS_LARGEFILE.
6298 * configure, config.in: Rebuild.
6299
6300 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
6301
6302 * win32-low.c: Throughout, fix format strings and casts of
6303 printf-like functions to avoid type related warnings on all
6304 platforms.
6305 (get_child_debug_event): Print dwDebugEventCode as hex since
6306 that's how it's usually documented.
6307
6308 2013-02-28 Yao Qi <yao@codesourcery.com>
6309
6310 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6311 pulongest.
6312
6313 2013-02-27 Jiong Wang <jiwang@tilera.com>
6314
6315 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6316 (reg-tilegx32.c): New rule.
6317 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6318 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6319 different register info initializer according to elf class.
6320 (init_registers_tilgx32): New function. The tilegx32 register info
6321 initializer.
6322 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6323 (tile_store_gregset): Likewise.
6324
6325 2013-02-27 Yao Qi <yao@codesourcery.com>
6326
6327 * server.c (process_point_options): Print debug message when
6328 debug_threads is true.
6329
6330 2013-02-26 Yao Qi <yao@codesourcery.com>
6331
6332 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6333
6334 2013-02-19 Pedro Alves <palves@redhat.com>
6335 Kai Tietz <ktietz@redhat.com>
6336
6337 PR gdb/15161
6338
6339 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6340 instead of strtoul to extract address from packet.
6341 (process_serial_event) <'z'>: Likewise.
6342
6343 2013-02-18 Yao Qi <yao@codesourcery.com>
6344
6345 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6346
6347 2013-02-14 Pedro Alves <palves@redhat.com>
6348
6349 Plug memory leak.
6350
6351 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6352 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6353
6354 2013-02-14 Pedro Alves <palves@redhat.com>
6355
6356 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6357
6358 2013-02-14 Pedro Alves <palves@redhat.com>
6359
6360 * tracepoint.c (save_string): Delete.
6361 (add_tracepoint_action): Use savestring instead of save_string.
6362
6363 2013-02-12 Pedro Alves <palves@redhat.com>
6364
6365 * linux-xtensa-low.c: Ditto.
6366 * xtensa-xtregs.c: Ditto.
6367
6368 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6369
6370 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6371 thread_db.
6372
6373 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6374
6375 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6376 aarch64_num_wp_regs and aarch64_num_bp_regs to
6377 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6378
6379 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6380
6381 * linux-aarch64-low.c (ps_get_thread_area): Replace
6382 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6383
6384 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6385 Marcus Shawcroft <marcus.shawcroft@arm.com>
6386 Nigel Stephens <nigel.stephens@arm.com>
6387 Yufeng Zhang <yufeng.zhang@arm.com>
6388
6389 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6390 (aarch64.c, aarch64-without-fpu.c): New targets.
6391 * configure.srv (aarch64*-*-linux*): New.
6392 * linux-aarch64-low.c: New file.
6393
6394 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6395
6396 * linux-low.c (handle_extended_wait, linux_create_inferior)
6397 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6398 (dequeue_one_deferred_signal, linux_resume_one_thread)
6399 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6400 (linux_tracefork_grandchild, linux_test_for_tracefork)
6401 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6402 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6403 where the argument is 0.
6404
6405 2013-01-25 Yao Qi <yao@codesourcery.com>
6406
6407 * event-loop.c: Include "queue.h".
6408 (gdb_event_p): New typedef.
6409 (struct gdb_event) <next_event>: Remove.
6410 (event_queue): Change to QUEUE(gdb_event_p).
6411 (async_queue_event): Remove.
6412 (gdb_event_xfree): New.
6413 (initialize_event_loop): New.
6414 (process_event): Use API from QUEUE.
6415 (wait_for_event): Likewise.
6416 * server.c (main): Call initialize_event_loop.
6417 * server.h (initialize_event_loop): Declare.
6418
6419 2013-01-18 Yao Qi <yao@codesourcery.com>
6420
6421 * ax.h (struct eval_agent_expr_context): New.
6422 (gdb_eval_agent_expr): Update declaration.
6423 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6424 TFRAME. Add new argument CTX.
6425 * server.h (struct eval_agent_expr_context): Declare.
6426 (agent_mem_read, agent_tsv_read): Update declaration.
6427 (agent_mem_read_string): Likewise.
6428 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6429 (add_traceframe_block): Add new argument TPOINT.
6430 Increase TPOINT->traceframe_usage.
6431 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6432 eval_tracepoint_agent_expr.
6433 (condition_true_at_tracepoint): Likewise.
6434 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6435 (agent_mem_read_string, agent_tsv_read): Likewise.
6436
6437 2013-01-16 Yao Qi <yao@codesourcery.com>
6438
6439 * linux-low.c (linux_resume_one_lwp): Don't check
6440 'lwp->bp_reinsert != 0'.
6441
6442 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6443 Pedro Alves <palves@redhat.com>
6444
6445 * lynx-low.c (ptrace_request_to_str): Define a temporary
6446 macro and use it to simplify this function's implementation.
6447
6448 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6449
6450 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6451 sets errno.
6452
6453 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6454
6455 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6456
6457 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6458
6459 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6460
6461 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6462
6463 * lynx-low.c (lynx_resume): Use the resume_info parameter
6464 to determine the ptid for the lynx_ptrace call, unless
6465 it is equal to minus_one_ptid, in which case we use the
6466 ptid of the current_inferior.
6467 (lynx_wait_1): After having received a thread create/exit
6468 event, resume the inferior's execution using the signaling
6469 thread's ptid, rather than the old ptid.
6470
6471 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6472
6473 * lynx-low.c (lynx_resume): Delete variable ret.
6474
6475 2013-01-01 Joel Brobecker <brobecker@adacore.com>
6476
6477 * gdbreplay.c (gdbreplay_version): Update copyright year.
6478 * server.c (gdbserver_version): Likewise.
6479
6480 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6481
6482 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6483 new thread.
6484
6485 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6486
6487 * lynx-low.c (ptrace_request_to_str): Add handling for
6488 PTRACE_GETTRACESIG.
6489
6490 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6491
6492 * lynx-low.c (lynx_attach): Delete variable new_process.
6493
6494 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6495
6496 * lynx-low.c (lynx_create_inferior): Delete variable
6497 new_process.
6498
6499 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6500
6501 * lynx-low.c (ptrace_request_to_str): Do not handle
6502 PTRACE_GETTHREADLIST if this macro does not exist.
6503
6504 2012-12-15 Yao Qi <yao@codesourcery.com>
6505
6506 * Makefile.in (OBS): Add notif.o.
6507 * notif.c, notif.h: New.
6508 * server.c: Include "notif.h".
6509 (struct vstop_notif) <next>: Remove.
6510 <base>: New field.
6511 (queue_stop_reply): Update.
6512 (push_event, send_next_stop_reply): Remove.
6513 (discard_queued_stop_replies): Update.
6514 (notif_stop): New variable.
6515 (handle_v_stopped): Remove.
6516 (handle_v_requests): Don't call handle_v_stopped. Call
6517 handle_ack_notif instead.
6518 (queue_stop_reply_callback): Call notif_event_enque instead
6519 of queue_stop_reply.
6520 (handle_status): Don't call send_next_stop_reply, call
6521 notif_write_event instead.
6522 (kill_inferior_callback): Likewise.
6523 (detach_or_kill_inferior_callback): Likewise.
6524 (main): Call initialize_notif.
6525 (process_serial_event): Call QUEUE_is_empty.
6526 (handle_target_event): Call notif_push instead of push event.
6527 * server.h (push_event): Remove declaration.
6528
6529 2012-12-10 Tom Tromey <tromey@redhat.com>
6530
6531 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6532 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6533 macros.
6534 (.c.o): Rewrite.
6535 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6536 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6537 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6538 (amd64-linux-ipa.o, ax.o): Rewrite.
6539 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6540 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6541 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6542 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6543 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6544 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6545 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6546 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6547 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6548 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6549 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6550 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6551 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6552 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6553 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6554 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6555 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6556 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6557 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6558 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6559 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6560 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6561 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6562 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6563 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6564 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6565 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6566 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6567 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6568 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6569 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6570 (reg-tilegx.o): Remove.
6571 (all_object_files): New macro.
6572 Include .deps files.
6573 * aclocal.m4, configure: Rebuild.
6574 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6575 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6576 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6577
6578 2012-12-05 Tom Tromey <tromey@redhat.com>
6579
6580 PR gdb/14917:
6581 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6582
6583 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
6584
6585 * configure.ac: Check for linux/perf_event.h.
6586 * config.in: Regenerated.
6587 * configure: Regenerated.
6588
6589 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6590
6591 * hostio.c (handle_readlink): Decrease buffer size
6592 parameter passed to readlink by one byte.
6593
6594 2012-11-26 Yao Qi <yao@codesourcery.com>
6595
6596 * configure.ac (build_warnings): Append '-Wempty-body'.
6597 * configure: Regenerated.
6598 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6599 body.
6600
6601 2012-11-15 Pierre Muller <muller@sourceware.org>
6602
6603 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6604 * config.in: Regenerate.
6605 * configure: Regenerate.
6606 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6607 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6608 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6609 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6610 header.
6611 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6612 instead of <sys/wait.h> header.
6613 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6614
6615 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6616
6617 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6618 (various make rules): Remove -DGDBSERVER
6619
6620 2012-11-09 Yao Qi <yao@codesourcery.com>
6621
6622 * spu-low.c (current_ptid): Move it to ..
6623 * gdbthread.h: ... here. New.
6624 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6625 * server.c (myresume, process_serial_event): Likewise.
6626 * thread-db.c (thread_db_find_new_threads): Likewise.
6627 * tracepoint.c (run_inferior_command): Likewise.
6628
6629 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
6630
6631 * server.c (handle_search_memory_1): Include access length in
6632 warning message.
6633
6634 2012-09-05 Michael Brandt <michael.brandt@axis.com>
6635
6636 * linux-crisv32-low.c: Fix compile errors.
6637
6638 2012-09-04 Yao Qi <yao@codesourcery.com>
6639
6640 * tracepoint.c (cmd_qtsv): Adjust debug message.
6641 Don't check CUR_TPOINT.
6642
6643 2012-08-28 Yao Qi <yao@codesourcery.com>
6644
6645 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6646 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6647 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6648 Remove declarations of xmalloc, xreallloc, xstrdup and
6649 freeargv.
6650 * Makefile.in (libiberty_h): New.
6651 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6652 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6653
6654 2012-08-23 Yao Qi <yao@codesourcery.com>
6655
6656 * server.h: Remove declaration of 'xsnprintf'.
6657
6658 2012-08-22 Keith Seitz <keiths@redhat.com>
6659
6660 * server.h: Include build-gnulib-gbserver/config.h.
6661 * gdbreplay.c: Likewise.
6662
6663 2012-08-08 Doug Evans <dje@google.com>
6664
6665 * Makefile.in (SFILES): Add gdb_vecs.c.
6666 (OBS): Add gdb_vecs.o.
6667 (gdb_vecs_h, host_defs_h): New variables.
6668 (thread-db.o): Add $(gdb_vecs_h) dependency.
6669 (gdb_vecs.o): New rule.
6670 * thread-db.c: #include "gdb_vecs.h".
6671 (thread_db_load_search): Use a vector to iterate over path elements.
6672 Handle text appearing after "$pdir".
6673
6674 * configure.ac: Add check for strstr.
6675 * config.in: Regenerate.
6676 * configure: Regenerate.
6677
6678 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6679
6680 * hostio.c (handle_pread): If pread fails, fall back to attempting
6681 lseek/read.
6682 (handle_pwrite): Likewise for pwrite.
6683
6684 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6685
6686 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6687 between unsupported TYPE and unimplementable ADDR/LEN combination.
6688 (arm_insert_point): Act on new return value.
6689
6690 2012-07-31 Pedro Alves <palves@redhat.com>
6691
6692 * server.c (process_point_options): Only skip tokens if we find
6693 one that is unrecognized. Don't treat 'X' specially while
6694 skipping unrecognized tokens.
6695
6696 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6697
6698 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6699 to 4-byte-align HW breakpoint addresses for Thumb.
6700
6701 2012-07-27 Yao Qi <yao@codesourcery.com>
6702
6703 PR remote/14161.
6704
6705 * server.h: Declare gdb_agent_about_to_close.
6706 * target.c (kill_inferior): Include "agent.h".
6707 New. Send command 'kill'.
6708 * target.h (kill_inferior): Removed macro.
6709 * tracepoint.c (gdb_agent_about_to_close): New.
6710 (gdb_agent_helper_thread): Handle command 'close'.
6711 Wait endlessly until the inferior stops.
6712 Install gdb_agent_remove_socket to atexit hook.
6713 (agent_socket_name): New static variable.
6714 (gdb_agent_socket_init): Replace local variable 'name' with
6715 'agent_socket_name'.
6716 (gdb_agent_remove_socket): New.
6717
6718 2012-07-27 Yao Qi <yao@codesourcery.com>
6719
6720 * server.c (process_point_options): Stop at 'X' when parsing.
6721
6722 2012-07-19 Michael Eager <eager@eagercon.com>
6723
6724 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6725 to hw_execute.
6726 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6727 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6728 hardware breakpoint.
6729
6730 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6731
6732 * gdbserver/linux-low.c (initialize_low): Call
6733 linux_ptrace_init_warnings.
6734
6735 2012-07-02 Doug Evans <dje@google.com>
6736
6737 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6738 pointer to int.
6739
6740 2012-07-02 Stan Shebs <stan@codesourcery.com>
6741
6742 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6743 (ax.o): Add it to build rule.
6744 (ax-ipa.o): Ditto.
6745 (OBS): Add format.o.
6746 (IPA_OBS): Add format.o.
6747 * server.c (handle_query): Claim support for breakpoint commands.
6748 (process_point_options): Add command case.
6749 (process_serial_event): Leave running if there are printfs in
6750 effect.
6751 * mem-break.h (any_persistent_commands): Declare.
6752 (add_breakpoint_commands): Declare.
6753 (gdb_no_commands_at_breakpoint): Declare.
6754 (run_breakpoint_commands): Declare.
6755 * mem-break.c (struct point_command_list): New struct.
6756 (struct breakpoint): New field command_list.
6757 (any_persistent_commands): New function.
6758 (add_commands_to_breakpoint): New function.
6759 (add_breakpoint_commands): New function.
6760 (gdb_no_commands_at_breakpoint): New function.
6761 (run_breakpoint_commands): New function.
6762 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6763 locally.
6764 * ax.c: Include format.h.
6765 (ax_printf): New function.
6766 (gdb_eval_agent_expr): Add printf opcode.
6767
6768 2012-06-13 Yao Qi <yao@codesourcery.com>
6769
6770 * server.c (start_inferior): Remove duplicated writes to fields
6771 'last_resume_kind' and 'last_status' of 'current_inferior'.
6772
6773 2012-06-12 Yao Qi <yao@codesourcery.com>
6774 Pedro Alves <palves@redhat.com>
6775
6776 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6777 comment.
6778 * server.c (handle_v_cont): Extend comment.
6779
6780 2012-06-11 Yao Qi <yao@codesourcery.com>
6781
6782 * linux-low.c (linux_attach): Add 'static'.
6783
6784 2012-06-06 Yao Qi <yao@codesourcery.com>
6785
6786 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6787
6788 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6789
6790 Fix gcc -flto compilation warning.
6791 * server.c (main): Make variable multi_mode and attach volatile.
6792
6793 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6794
6795 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6796 if the platform doesn't know about it.
6797
6798 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6799
6800 * Makefile.in (SFILES): Add linux-tile-low.c.
6801 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6802 * configure.srv: Handle tilegx-*-linux*.
6803 * linux-tile-low.c: New file.
6804
6805 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6806
6807 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6808
6809 2012-05-24 Pedro Alves <palves@redhat.com>
6810
6811 PR gdb/7205
6812
6813 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6814
6815 2012-05-24 Pedro Alves <palves@redhat.com>
6816
6817 PR gdb/7205
6818
6819 Replace target_signal with gdb_signal throughout.
6820
6821 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6822
6823 * linux-low.c (linux_store_registers): Avoid the copying sequence
6824 when no data has been retrieved by ptrace.
6825
6826 2012-05-22 Will Deacon <will.deacon@arm.com>
6827
6828 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6829 Include asm/ptrace.h.
6830 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6831 already defined.
6832
6833 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6834
6835 * linux-low.c (linux_store_registers): Don't re-retrieve data
6836 with ptrace that has already been obtained from /proc. Always
6837 copy any data retrieved with ptrace to the buffer supplied.
6838
6839 2012-05-11 Yao Qi <yao@codesourcery.com>
6840 Pedro Alves <palves@redhat.com>
6841
6842 * linux-low.c (enum stopping_threads_kind): New.
6843 (stopping_threads): Change type to `enum stopping_threads_kind'.
6844 (handle_extended_wait): If stopping and suspending threads, leave
6845 the new_lwp suspended too.
6846 (linux_wait_for_event): Adjust.
6847 (stop_all_lwps): Set `stopping_threads' to
6848 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6849 whether we're suspending threads or just stopping them. Assert no
6850 recursion happens.
6851
6852 2012-04-29 Yao Qi <yao@codesourcery.com>
6853
6854 * server.h: Move some code to ...
6855 * gdbthread.h: ... here. New.
6856 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6857 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6858 (nto-low.o, win32-low.o): Likewise.
6859 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6860 * regcache.c, remote-utils.c, server.c: Likewise.
6861 * target.c, tracepoint.c, win32-low.c: Likewise.
6862
6863 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6864
6865 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6866 (PTRACE_ARG4_TYPE): Likewise.
6867 (PTRACE_XFER_TYPE): Likewise.
6868 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6869 ptrace to PTRACE_ARG3_TYPE.
6870 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6871 (PTRACE_ARG4_TYPE): Likewise.
6872 (PTRACE_XFER_TYPE): Likewise.
6873 (linux_detach_one_lwp): Cast fourth argument of
6874 ptrace to long then PTRACE_ARG4_TYPE.
6875 (regsets_fetch_inferior_registers): Cast third argument of
6876 ptrace to long then PTRACE_ARG3_TYPE.
6877 (regsets_store_inferior_registers): Likewise.
6878
6879 2012-04-20 Pedro Alves <palves@redhat.com>
6880
6881 * configure: Regenerate.
6882
6883 2012-04-19 Pedro Alves <palves@redhat.com>
6884
6885 * Makefile.in (GNULIB_BUILDDIR): New.
6886 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6887 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6888 (all, install-only, uninstall, clean-info, all-lib, clean): No
6889 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6890 (maintainer-clean realclean distclean): Use subdir_do.
6891 (subdir_do): New.
6892 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6893 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6894 * acinclude.m4: Include acx_configure_dir.m4.
6895 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6896 calls. Call AC_PROG_RANLIB. Configure gnulib using
6897 ACX_CONFIGURE_DIR.
6898 (GNULIB): New.
6899 (GNULIB_STDINT_H): Adjust.
6900 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6901 * gdbreplay.c: Include build-gnulib/config.h.
6902 * server.h: Likewise.
6903 * aclocal.m4: Regenerate.
6904 * config.in: Regenerate.
6905 * configure: Regenerate.
6906
6907 2012-04-19 Pedro Alves <palves@redhat.com>
6908
6909 * Makefile.in (LIBGNU, INCGNU): Adjust.
6910 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6911 (all, install-only, uninstall, clean-info, all-lib, clean)
6912 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6913 * configure.ac: Adjust AC_OUTPUT output.
6914 * aclocal.m4: Regenerate.
6915 * configure: Regenerate.
6916
6917 2012-04-19 Pedro Alves <palves@redhat.com>
6918
6919 * Makefile.in (generated_files): New.
6920 (server_h): Remove the explicit dependency on config.h, and depend
6921 on $generated_files.
6922
6923 2012-04-19 Pedro Alves <palves@redhat.com>
6924
6925 * Makefile.in (INCGNU): Add -Ignulib.
6926
6927 2012-04-19 Pedro Alves <palves@redhat.com>
6928
6929 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6930 (INCGNU): ... this, and spell out -I here.
6931 (GNULIB_LIB): Rename to ...
6932 (LIBGNU): ... this.
6933 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6934
6935 2012-04-19 Pedro Alves <palves@redhat.com>
6936
6937 * config.in: Regenerate.
6938
6939 2012-04-19 Pedro Alves <palves@redhat.com>
6940
6941 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6942 * server.h (memmem): Remove declaration.
6943 * config.in: Regenerate.
6944 * configure: Regenerate.
6945
6946 2012-04-19 Yao Qi <yao@codesourcery.com>
6947
6948 * Makefile.in (SFILES): Add common/vec.c.
6949 (OBS): Add vec.o.
6950 (vec.o): New rule.
6951
6952 2012-04-19 Yao Qi <yao@codesourcery.com>
6953
6954 * remote-utils.c (prepare_resume_reply): Replace with macro
6955 target_core_of_thread.
6956 * server.c (handle_qxfer_threads_proper): Likewise.
6957 * target.h (traget_core_of_thread): New macro.
6958
6959 2012-04-18 Pedro Alves <palves@redhat.com>
6960
6961 * aclocal.m4: Regenerate.
6962 * configure: Regenerate.
6963
6964 2012-04-16 Yao Qi <yao@codesourcery.com>
6965
6966 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6967 duplicated on address.
6968
6969 2012-04-16 Yao Qi <yao@codesourcery.com>
6970
6971 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6972 (struct tracepoint_action_ops) <send>: New field.
6973 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6974 (agent_expr_send, x_tracepoint_action_send): New.
6975 (l_tracepoint_action_send): New.
6976 (cmd_qtdp): Download and install tracepoint
6977 according to `use_agent'.
6978 (run_inferior_command): Add one more parameter `len'.
6979 Update callers.
6980 (tracepoint_send_agent): New.
6981 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6982
6983 2012-04-16 Yao Qi <yao@codesourcery.com>
6984
6985 * tracepoint.c (download_tracepoints): Moved to ...
6986 (cmd_qtstart): ... here.
6987
6988 2012-04-14 Yao Qi <yao@codesourcery.com>
6989
6990 * tracepoint.c: Include inttypes.h.
6991 (struct collect_memory_action): Use sized types.
6992 (struct tracepoint): Likewise.
6993 (cmd_qtdp, stop_tracing): Update print specifiers.
6994 (cmd_qtp, response_tracepoint): Likewise.
6995 (collect_data_at_tracepoint): Likewise.
6996 (collect_data_at_step): Likewise.
6997
6998 2012-04-14 Yao Qi <yao@codesourcery.com>
6999
7000 Import gnulib module inttypes.
7001 * aclocal.m4, config.in, configure: Regenerated.
7002
7003 2012-04-14 Yao Qi <yao@codesourcery.com>
7004
7005 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7006 Makefile and config.status at last.
7007
7008 2012-04-13 Yao Qi <yao@codesourcery.com>
7009
7010 * tracepoint.c: Include stdint.h unconditionally.
7011
7012 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7013
7014 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7015 on BFD_HAVE_SYS_PROCFS_TYPE.
7016 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7017 * configure: Regenerate.
7018 * config.in: Likewise.
7019
7020 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7021
7022 * Makefile.in (clean): Also remove x32.c x32-linux.c
7023 x32-avx.c x32-avx-linux.c.
7024 (x32.o): New target.
7025 (x32.c): Likewise.
7026 (x32-linux.o): Likewise.
7027 (x32-linux.c): Likewise.
7028 (x32-avx.o): Likewise.
7029 (x32-avx.c): Likewise.
7030 (x32-avx-linux.o): Likewise.
7031 (x32-avx-linux.c): Likewise.
7032
7033 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7034 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7035 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7036 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7037 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7038 i386/x32-avx-linux.xml.
7039
7040 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7041 (init_registers_x32_avx_linux): Likwise.
7042 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7043 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7044
7045 2012-04-13 Pedro Alves <palves@redhat.com>
7046
7047 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7048 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7049 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7050 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7051 the sub-make.
7052
7053 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7054
7055 * linux-x86-low.c (compat_x32_clock_t): New.
7056 (compat_x32_siginfo_t): Likewise.
7057 (compat_x32_siginfo_from_siginfo): Likewise.
7058 (siginfo_from_compat_x32_siginfo): Likewise.
7059 (linux_is_elf64): Likewise.
7060 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7061 and siginfo_from_compat_x32_siginfo for x32.
7062 (x86_arch_setup): Set linux_is_elf64.
7063
7064 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7065
7066 PR gdb/13969
7067 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7068 e_machine field.
7069 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7070 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7071 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7072 compatible with process.
7073
7074 2012-04-12 Yao Qi <yao@codesourcery.com>
7075
7076 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7077 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7078 (install-only, install-info, clean): Handle sub dir gnulib.
7079 (all-lib, am--refresh): New targets.
7080 (memmem.o): Remove target.
7081 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7082 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7083 (AC_REPLACE_FUNCS): Remove memmem.
7084 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7085 (AC_OUTPUT): Generate Makefile in gnulib/.
7086 * aclocal.m4, config.in, configure: Regenerated.
7087
7088 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7089
7090 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7091
7092 2012-04-05 Pedro Alves <palves@redhat.com>
7093
7094 -Werror=strict-aliasing
7095
7096 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7097 pointer.
7098
7099 2012-04-04 Pedro Alves <palves@redhat.com>
7100
7101 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7102 (sparc_store_gregset_from_stack, sparc_store_gregset)
7103 (sparc_breakpoint_at): Fix formatting.
7104
7105 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7106
7107 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7108 are available.
7109 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7110 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7111 * config.in: Regenerate.
7112 * configure: Likewise.
7113
7114 2012-03-29 Pedro Alves <palves@redhat.com>
7115
7116 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7117 Correct ptrace arguments.
7118
7119 2012-03-28 Pedro Alves <palves@redhat.com>
7120
7121 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7122 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7123 (IA64_FR1_REGNUM): New defines.
7124 (ia64_fetch_register): New.
7125 (the_low_target): Install it.
7126 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7127 field.
7128 * linux-low.c (linux_fetch_registers): Try the
7129 the_low_target.fetch_register hook first.
7130
7131 * linux-arm-low.c (the_low_target): Adjust.
7132 * linux-bfin-low.c (the_low_target): Adjust.
7133 * linux-cris-low.c (the_low_target): Adjust.
7134 * linux-crisv32-low.c (the_low_target): Adjust.
7135 * linux-m32r-low.c (the_low_target): Adjust.
7136 * linux-m68k-low.c (the_low_target): Adjust.
7137 * linux-mips-low.c (the_low_target): Adjust.
7138 * linux-ppc-low.c (the_low_target): Adjust.
7139 * linux-s390-low.c (the_low_target): Adjust.
7140 * linux-sh-low.c (the_low_target): Adjust.
7141 * linux-sparc-low.c (the_low_target): Adjust.
7142 * linux-tic6x-low.c (the_low_target): Adjust.
7143 * linux-x86-low.c (the_low_target): Adjust.
7144 * linux-xtensa-low.c (the_low_target): Adjust.
7145
7146 2012-03-26 Pedro Alves <palves@redhat.com>
7147
7148 * server.c (handle_qxfer_libraries): Don't bail early if
7149 the_target->qxfer_libraries_svr4 is not NULL.
7150
7151 2012-03-26 Pedro Alves <palves@redhat.com>
7152
7153 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7154
7155 2012-03-23 Pedro Alves <palves@redhat.com>
7156
7157 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7158 "library-list-svr4" element's start tag when the the DSO list is
7159 empty.
7160
7161 2012-03-23 Pedro Alves <palves@redhat.com>
7162
7163 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7164 a variable whose type size is the same as the inferior's pointer
7165 size.
7166
7167 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7168
7169 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7170 struct siginfo.
7171 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7172 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7173 * linux-low.h: Include <signal.h>.
7174 (struct siginfo): Remove forward declaration.
7175 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7176 struct siginfo.
7177
7178 2012-03-21 Mike Frysinger <vapier@gentoo.org>
7179
7180 * .gitignore: Ignore more files.
7181
7182 2012-03-19 Pedro Alves <palves@redhat.com>
7183 Jan Kratochvil <jan.kratochvil@redhat.com>
7184
7185 * server.c (cont_thread, general_thread): Add describing comments.
7186 (start_inferior): Clear `cont_thread'.
7187 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7188 of a process.
7189
7190 2012-03-15 Yao Qi <yao@codesourcery.com>
7191
7192 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7193 handling to ...
7194 (cmd_qtdp): ... here.
7195
7196 2012-03-15 Yao Qi <yao@codesourcery.com>
7197
7198 * tracepoint.c (struct tracepoint_action_ops): New.
7199 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7200 (m_tracepoint_action_download): New.
7201 (r_tracepoint_action_download): New.
7202 (x_tracepoint_action_download): New.
7203 (l_tracepoint_action_download): New.
7204 (add_tracepoint_action): Install `action->ops' according type.
7205 (download_tracepoint_1): Move code `download' function pointer
7206 of various tracepoint_action_ops.
7207
7208 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7209
7210 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7211 linux_ptrace_attach_warnings.
7212
7213 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7214
7215 * Makefile.in (linux-ptrace.o): New.
7216 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7217 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7218 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7219 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7220 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7221 of these targets.
7222 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7223
7224 2012-03-08 Yao Qi <yao@codesourcery.com>
7225 Pedro Alves <palves@redhat.com>
7226
7227 Fix PR server/13392.
7228 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7229 offset of JMP insn.
7230 * tracepoint.c (remove_tracepoint): New.
7231 (cmd_qtdp): Call remove_tracepoint when failed to install.
7232
7233 2012-03-07 Pedro Alves <palves@redhat.com>
7234
7235 * linux-low.c (get_detach_signal): New.
7236 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7237 Pass on pending signals to PTRACE_DETACH. Check the result of the
7238 ptrace call.
7239 * server.c (program_signals, program_signals_p): New.
7240 (handle_general_set): Handle QProgramSignals.
7241 * server.h (program_signals, program_signals_p): Declare.
7242
7243 2012-03-05 Pedro Alves <palves@redhat.com>
7244 Jan Kratochvil <jan.kratochvil@redhat.com>
7245
7246 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7247 New comment why.
7248
7249 2012-03-03 Yao Qi <yao@codesourcery.com>
7250
7251 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7252 agent_look_up_symbols.
7253
7254 2012-03-03 Yao Qi <yao@codesourcery.com>
7255
7256 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7257 (linux-x86-low.o): Likewise.
7258 * server.h: Remove in_process_agent_loaded.
7259 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7260 common/agent.c.
7261 Update callers.
7262
7263 2012-03-03 Yao Qi <yao@codesourcery.com>
7264
7265 * tracepoint.c (gdb_agent_capability): New global.
7266 (in_process_agent_loaded_ust): Renamed to
7267 `in_process_agent_supports_ust'.
7268 Update callers.
7269 (in_process_agent_supports_ust): Call agent_capability_check.
7270 (clear_installed_tracepoints): Assert that agent supports
7271 agent.
7272
7273 2012-03-03 Yao Qi <yao@codesourcery.com>
7274
7275 * linux-low.c (linux_supports_agent): New.
7276 (linux_target_ops): Initialize field `supports_agent' with
7277 linux_supports_agent.
7278 * target.h (struct target_ops) <supports_agent>: New.
7279 (target_supports_agent): New macro.
7280 * server.c (handle_general_set): Handle packet 'QAgent'.
7281 (handle_query): Send `QAgent+'.
7282 * Makefile.in (server.o): Depends on agent.h.
7283
7284 2012-03-03 Yao Qi <yao@codesourcery.com>
7285
7286 * Makefile.in (OBS): Add agent.o.
7287 Add new rule for agent.o.
7288 Track dependence of tracepoint.c on agent.h.
7289 * tracepoint.c (run_inferior_command_1):
7290 (run_inferior_command): Call agent_run_command.
7291 (gdb_ust_connect_sync_socket): Deleted. Move it to
7292 common/agent.c.
7293 (resume_thread, stop_thread): Likewise.
7294 (gdb_ust_socket_init): Renamed to ...
7295 (gdb_agent_socket_init): ... New.
7296 (gdb_ust_thread): Renamed to ...
7297 (gdb_agent_helper_thread): ... New.
7298 (gdb_ust_init): Move some code to ...
7299 (gdb_agent_init): ... here. New.
7300 [HAVE_UST]: Call gdb_ust_init.
7301 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7302 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7303 * config.in, configure: Regenerated.
7304
7305 2012-03-02 Pedro Alves <palves@redhat.com>
7306
7307 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7308 * linux-low.c (struct simple_pid_list): New.
7309 (stopped_pids): New a struct simple_pid_list pointer.
7310 (add_to_pid_list, pull_pid_from_list): New.
7311 (handle_extended_wait): Don't assume the first signal new children
7312 report is SIGSTOP. Adjust call to pull_pid_from_list.
7313 (linux_wait_for_lwp): Adjust.
7314
7315 2012-03-02 Yao Qi <yao@codesourcery.com>
7316
7317 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7318 debug log.
7319
7320 2012-03-02 Yao Qi <yao@codesourcery.com>
7321
7322 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7323 `stop_pc' and `tpoint'. Update caller.
7324
7325 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7326
7327 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7328 * linux-low.c (use_linux_regsets): New macro.
7329 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7330 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7331 (linux_register_in_regsets): New function.
7332 (usr_fetch_inferior_registers): Skip registers covered by
7333 regsets.
7334 (usr_store_inferior_registers): Likewise.
7335 (usr_fetch_inferior_registers): New macro.
7336 (usr_store_inferior_registers): Likewise.
7337 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7338 (linux_store_registers): Likewise.
7339 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7340 prototype.
7341 (init_registers_mips64_dsp_linux): Likewise.
7342 (init_registers_mips_linux): New macro.
7343 (init_registers_mips_dsp_linux): Likewise.
7344 (mips_dsp_num_regs): Likewise.
7345 (DSP_BASE, DSP_CONTROL): New fallback macros.
7346 (mips_base_regs): New macro.
7347 (mips_regmap): Use it. Fix the size.
7348 (mips_dsp_regmap): New variable.
7349 (mips_dsp_regset_bitmap): Likewise.
7350 (mips_arch_setup): New function.
7351 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7352 than mips_regmap.
7353 (mips_cannot_store_register): Likewise.
7354 (the_low_target): Update .arch_setup, .num_regs and .regmap
7355 initializers. Add .regset_bitmap initializer.
7356 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7357 initializer.
7358 * linux-bfin-low.c (the_low_target): Likewise.
7359 * linux-cris-low.c (the_low_target): Likewise.
7360 * linux-crisv32-low.c (the_low_target): Likewise.
7361 * linux-ia64-low.c (the_low_target): Likewise.
7362 * linux-m32r-low.c (the_low_target): Likewise.
7363 * linux-m68k-low.c (the_low_target): Likewise.
7364 * linux-ppc-low.c (the_low_target): Likewise.
7365 * linux-s390-low.c (the_low_target): Likewise.
7366 * linux-sh-low.c (the_low_target): Likewise.
7367 * linux-sparc-low.c (the_low_target): Likewise.
7368 * linux-tic6x-low.c (the_low_target): Likewise.
7369 * linux-x86-low.c (the_low_target): Likewise.
7370 * linux-xtensa-low.c (the_low_target): Likewise.
7371 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7372 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7373 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7374 srv_xmlfiles.
7375 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7376 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7377
7378 2012-02-29 Yao Qi <yao@codesourcery.com>
7379 Pedro Alves <palves@redhat.com>
7380
7381 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7382 `step_over_finished' is true.
7383
7384 2012-02-27 Pedro Alves <palves@redhat.com>
7385
7386 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7387 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7388
7389 2012-02-27 Pedro Alves <palves@redhat.com>
7390
7391 PR server/9684
7392 * linux-low.c (pid_is_stopped): New.
7393 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7394
7395 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
7396
7397 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7398 of conditions.
7399
7400 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7401
7402 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7403
7404 2012-02-24 Luis Machado <lgustavo@codesourcery>
7405
7406 * server.c (handle_query): Advertise support for target-side
7407 breakpoint condition evaluation.
7408 (process_point_options): New function.
7409 (process_serial_event): When inserting a breakpoint, check for
7410 a target-side condition that should be evaluated.
7411
7412 * mem-break.c: Include regcache.h and ax.h.
7413 (point_cond_list_t): New data structure.
7414 (breakpoint) <cond_list>: New field.
7415 (find_gdb_breakpoint_at): Make non-static.
7416 (delete_gdb_breakpoint_at): Clear any target-side
7417 conditions.
7418 (clear_gdb_breakpoint_conditions): New function.
7419 (add_condition_to_breakpoint): Likewise.
7420 (add_breakpoint_condition): Likewise.
7421 (gdb_condition_true_at_breakpoint): Likewise.
7422 (gdb_breakpoint_here): Return result directly instead
7423 of going through a local variable.
7424
7425 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7426 (clear_gdb_breakpoint_conditions): Likewise.
7427 (add_breakpoint_condition): Likewise.
7428 (gdb_condition_true_at_breakpoint): Likewise.
7429
7430 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7431 (need_step_over_p): Take target-side breakpoint condition into
7432 consideration.
7433
7434 2012-02-24 Luis Machado <lgustavo@codesourcery>
7435
7436 * server.h: Include tracepoint.h.
7437 (agent_mem_read, agent_get_trace_state_variable_value,
7438 agent_set_trace_state_variable_value,
7439 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7440 get_set_tsv_func_addr): New prototypes.
7441
7442 * ax.h: New include file.
7443 * ax.c: New source file.
7444
7445 * tracepoint.c: Include ax.h.
7446 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7447 agent_expr, eval_result_type): Move to ax.h.
7448 (parse_agent_expr): Rename to ...
7449 (gdb_parse_agent_expr): ... this, make it non-static and move
7450 to ax.h.
7451 (unparse_agent_expr) Rename to ...
7452 (gdb_unparse_agent_expr): ... this, make it non-static and move
7453 to ax.h.
7454 (eval_agent_expr): Rename to ...
7455 (eval_tracepoint_agent_expr): ... this.
7456 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7457 forward declarations.
7458 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7459 (agent_get_trace_state_variable_value): New function.
7460 (agent_set_trace_state_variable_value): New function.
7461 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7462 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7463 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7464 (condition_true_at_tracepoint): Likewise.
7465 (parse_agent_expr): Rename to ...
7466 (gdb_parse_agent_expr): ... this and move to ax.c.
7467 (unparse_agent_expr): Rename to ...
7468 (gdb_unparse_agent_expr): ... this and move to ax.c.
7469 (gdb_agent_op_name): Move to ax.c.
7470 (eval_agent_expr): Rename to ...
7471 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7472 and move to ax.c.
7473 (eval_tracepoint_agent_expr): New function.
7474 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7475 non-static.
7476 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7477 ax.c.
7478 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7479 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7480 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7481 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7482 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7483 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7484 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7485 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7486 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7487 (compile_bytecodes): Remove forward declaration.
7488 (is_goto_target): Move to ax.c.
7489 (compile_bytecodes): Move to ax.c and call
7490 agent_get_trace_state_variable_value (...) and
7491 agent_set_trace_state_variable_value (...).
7492
7493 * Makefile.in: Update ax.c and IPA dependencies.
7494
7495 2012-02-24 Pedro Alves <palves@redhat.com>
7496
7497 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7498 (cmd_bigqtbuffer_circular): ... this. Only handle
7499 'QTBuffer:circular:'.
7500 (handle_tracepoint_general_set): Adjust.
7501
7502 2012-02-16 Yao Qi <yao@codesourcery.com>
7503
7504 * inferiors.c: Move code to ...
7505 * dll.c: .... here. New.
7506 * server.h: Declare clear_dlls.
7507 * Makefile.in (SFILES): Add dll.c.
7508 (OBS): Add dll.o
7509 (dll.o): New rule.
7510
7511 2012-02-11 Yao Qi <yao@codesourcery.com>
7512
7513 * server.c: (handle_monitor_command): Add a new parameter
7514 `own_buf'.
7515 (handle_query): Update caller.
7516
7517 2012-02-09 Joel Brobecker <brobecker@adacore.com>
7518
7519 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7520 * configure, config.in: Regenerate.
7521 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7522 is not defined.
7523
7524 2012-02-02 Pedro Alves <palves@redhat.com>
7525
7526 Try SIGKILL first, then PTRACE_KILL.
7527 * linux-low.c (linux_kill_one_lwp): New.
7528 (linux_kill_one_lwp): Rename to ...
7529 (kill_one_lwp_callback): ... this. Use the new
7530 linux_kill_one_lwp.
7531
7532 2012-02-02 Pedro Alves <palves@redhat.com>
7533
7534 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7535 inferior.
7536
7537 2012-01-27 Pedro Alves <palves@redhat.com>
7538
7539 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7540 (elf_64_file_p): Make static.
7541 (linux_pid_exe_is_elf_64_file): New.
7542 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7543 Delete declarations.
7544 (linux_pid_exe_is_elf_64_file): Declare.
7545 * linux-x86-low.c (x86_arch_setup): Use
7546 linux_pid_exe_is_elf_64_file.
7547
7548 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7549
7550 * linux-low.c (linux_wait_for_event_1): Rename to ...
7551 (linux_wait_for_event): ... here and merge it with former
7552 linux_wait_for_event - new variable wait_ptid, use it.
7553 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7554
7555 2012-01-23 Pedro Alves <palves@redhat.com>
7556
7557 * server.c (main): Avoid yet another case of infinite loop while
7558 detaching/killing after a longjmp.
7559
7560 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7561
7562 Code cleanup.
7563 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7564
7565 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7566
7567 * hostio.c (handle_readlink): New function.
7568 (handle_vFile): Call it to handle "vFile:readlink" packets.
7569
7570 2012-01-20 Pedro Alves <palves@redhat.com>
7571 Ulrich Weigand <ulrich.weigand@linaro.org>
7572
7573 * server.c (handle_v_requests): Only support vAttach and vRun to
7574 start multiple processes when in extended protocol mode.
7575
7576 2012-01-17 Pedro Alves <palves@redhat.com>
7577
7578 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7579 memalign plus mprotect to allocate the scratch buffer.
7580
7581 2012-01-13 Pedro Alves <palves@redhat.com>
7582
7583 * server.c (attach_inferior): Clear `cont_thread'.
7584
7585 2012-01-13 Pedro Alves <palves@redhat.com>
7586
7587 * server.c (main): Avoid infinite loop while detaching/killing
7588 after a longjmp.
7589
7590 2012-01-09 Doug Evans <dje@google.com>
7591
7592 * server.c (start_inferior): Set last_ptid in --wrapper case.
7593
7594 2012-01-06 Yao Qi <yao@codesourcery.com>
7595
7596 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7597 defined.
7598 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7599
7600 2012-01-04 Yao Qi <yao@codesourcery.com>
7601
7602 * tracepoint.c (cmd_qtdp): Print debug message
7603 for static tracepoint.
7604
7605 2012-01-04 Yao Qi <yao@codesourcery.com>
7606
7607 * tracepoint.c (trace_vdebug): Differentiate debug message
7608 between gdbserver and IPA.
7609
7610 2012-01-03 Yao Qi <yao@codesourcery.com>
7611
7612 * tracepoint.c (tracepoint_was_hit): Don't collect for
7613 static tracepoint.
7614
7615 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7616
7617 * terminal.h: Reformat copyright header.
7618
7619 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7620
7621 * server.c (gdbserver_version): Update copyright year.
7622 * gdbreplay.c (gdbreplay_version): Likewise.
7623
7624 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7625
7626 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7627
7628 Revert:
7629 2011-12-18 Hui Zhu <teawater@gmail.com>
7630 * linux-low.c (linux_create_inferior): Save return value to ret.
7631
7632 2011-12-18 Hui Zhu <teawater@gmail.com>
7633
7634 * linux-low.c (linux_create_inferior): Save return value to ret.
7635
7636 2011-12-16 Doug Evans <dje@google.com>
7637
7638 * linux-low.c (linux_create_inferior): If stdio connection,
7639 redirect stdin from /dev/null, stdout to stderr.
7640 * remote-utils.c (remote_is_stdio): New static global.
7641 (remote_connection_is_stdio): New function.
7642 (remote_prepare): Handle stdio connection.
7643 (remote_open): Ditto.
7644 (remote_close): Don't close stdin for stdio connections.
7645 (read_prim,write_prim): New functions. Replace all calls to
7646 read/write to these.
7647 * server.c (main): Watch for "-" argument. Move call to
7648 remote_prepare before start_inferior.
7649 * server.h (STDIO_CONNECTION_NAME): New macro.
7650 (remote_connection_is_stdio): Declare.
7651
7652 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7653 in debugging output.
7654
7655 2011-12-15 Yao Qi <yao@codesourcery.com>
7656
7657 * tracepoint.c: Include sys/syscall.h.
7658 (gdb_ust_thread): Remove preprocessor conditional.
7659
7660 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7661
7662 * linux-low.c (linux_detach_one_lwp): Call
7663 the_low_target.prepare_to_resume before detaching.
7664
7665 2011-12-14 Yao Qi <yao@codesourcery.com>
7666
7667 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7668 of write.
7669
7670 2011-12-14 Yao Qi <yao@codesourcery.com>
7671
7672 * i386-low.c (i386_low_stopped_data_address): Initialize local
7673 variable `control'.
7674
7675 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7676
7677 PR remote/13492
7678
7679 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7680 DR_CONTROL unless necessary. Extend comments.
7681 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7682 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7683
7684 2011-12-13 Yao Qi <yao@codesourcery.com>
7685
7686 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7687 macros.
7688 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7689
7690 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7691
7692 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7693 Print new debug message for such case.
7694
7695 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7696
7697 Fix overlapping memcpy.
7698 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7699 the read_inferior_memory transfer.
7700 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7701 write_inferior_memory transfer.
7702 (set_fast_tracepoint_jump): New variable buf. Use it for the
7703 read_inferior_memory and write_inferior_memory transfers.
7704 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7705 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7706 Use it for the write_inferior_memory transfer.
7707 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7708 buffers.
7709
7710 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7711
7712 * linux-low.c (fetch_register, store_register): Make code
7713 consistent, fix formatting.
7714
7715 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7716
7717 * linux-low.c (usr_store_inferior_registers): Factor out code
7718 to handle individual registers into...
7719 (store_register): ... this new function.
7720
7721 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7722
7723 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7724 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7725 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7726 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7727 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7728 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7729 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7730 (srv_xmlfiles): Add new XML files.
7731
7732 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7733 and <sys/uio.h>.
7734 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7735 (init_registers_s390_linux32v1): Add prototype.
7736 (init_registers_s390_linux32v2): Likewise.
7737 (init_registers_s390_linux64v1): Likewise.
7738 (init_registers_s390_linux64v2): Likewise.
7739 (init_registers_s390x_linux64v1): Likewise.
7740 (init_registers_s390x_linux64v2): Likewise.
7741 (s390_num_regs): Increment to 52.
7742 (s390_regmap): Add orig_r2 register.
7743 (s390_num_regs_3264): Increment to 68.
7744 (s390_regmap_3264): Add orig_r2 register.
7745 (s390_collect_ptrace_register): Handle orig_r2 register.
7746 (s390_supply_ptrace_register): Likewise.
7747 (s390_fill_last_break): New function.
7748 (s390_store_last_break): Likewise.
7749 (s390_fill_system_call): New function.
7750 (s390_store_system_call): Likewise.
7751 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7752 register sets.
7753 (s390_check_regset): New function.
7754 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7755 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7756 Update target_regsets for available register sets.
7757
7758 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7759 Jan Kratochvil <jan.kratochvil@redhat.com>
7760
7761 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7762 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7763 New.
7764 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7765 * linux-low.h (struct process_info_private): New member r_debug.
7766 * server.c (handle_qxfer_libraries): Call
7767 the_target->qxfer_libraries_svr4.
7768 (handle_qxfer_libraries_svr4): New function.
7769 (qxfer_packets): New entry "libraries-svr4".
7770 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7771 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7772 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7773 PACKET_qXfer_libraries_svr4.
7774
7775 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7776
7777 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7778 PSW address/mask between 8-byte and 16-byte formats.
7779 (s390_supply_ptrace_register): Likewise.
7780 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7781 basic addressing mode bit.
7782
7783 2011-11-24 Stan Shebs <stan@codesourcery.com>
7784
7785 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7786
7787 2011-11-17 Stan Shebs <stan@codesourcery.com>
7788
7789 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7790 (tracing_start_time): New global.
7791 (tracing_stop_time): New global.
7792 (tracing_user_name): New global.
7793 (tracing_notes): New global.
7794 (tracing_stop_note): New global.
7795 (cmd_qtstart): Set traceframe_usage, start_time.
7796 (stop_tracing): Set stop_time.
7797 (cmd_qtstatus): Report additional status.
7798 (cmd_qtp): New function.
7799 (handle_tracepoint_query): Call it.
7800 (cmd_qtnotes): New function.
7801 (handle_tracepoint_general_set): Call it.
7802 (get_timestamp): Rename from tsv_get_timestamp.
7803
7804 2011-11-14 Stan Shebs <stan@codesourcery.com>
7805 Kwok Cheung Yeung <kcy@codesourcery.com>
7806
7807 * linux-x86-low.c (small_jump_insn): New.
7808 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7809 trampoline and error message, build a trampoline and issue a small
7810 jump instruction to it.
7811 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7812 trampoline and error message.
7813 (x86_get_min_fast_tracepoint_insn_len): New.
7814 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7815 * linux-low.h (struct linux_target_ops): Add arguments to
7816 install_fast_tracepoint_jump_pad operation, add new operation.
7817 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7818 arguments.
7819 (linux_get_min_fast_tracepoint_insn_len): New function.
7820 (linux_target_op): Add new operation.
7821 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7822 (gdb_trampoline_buffer_end): Ditto.
7823 (gdb_trampoline_buffer_error): Ditto.
7824 (struct ipa_sym_addresses): Add fields for new IPA variables.
7825 (symbol_list): Add entries for new IPA variables.
7826 (struct tracepoint): Add fields to hold the address range of the
7827 trampoline used by the tracepoint.
7828 (trampoline_buffer_head): New static variable.
7829 (trampoline_buffer_tail): Ditto.
7830 (claim_trampoline_space): New function.
7831 (have_fast_tracepoint_trampoline_buffer): New function.
7832 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7833 structure.
7834 (install_fast_tracepoint): Ditto, also add error buffer argument.
7835 (cmd_qtminftpilen): New function.
7836 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7837 (fast_tracepoint_from_trampoline_address): New function.
7838 (fast_tracepoint_collecting): Handle trampoline as part of jump
7839 pad space.
7840 (set_trampoline_buffer_space): New function.
7841 (initialize_tracepoint): Initialize new IPA variables.
7842 * target.h (struct target_ops): Add arguments to
7843 install_fast_tracepoint_jump_pad operation, add new
7844 get_min_fast_tracepoint_insn_len operation.
7845 (target_get_min_fast_tracepoint_insn_len): New.
7846 (install_fast_tracepoint_jump_pad): Add arguments.
7847 * server.h (IPA_BUFSIZ): Define.
7848 * linux-i386-ipa.c: Include extra header files.
7849 (initialize_fast_tracepoint_trampoline_buffer): New function.
7850 (initialize_low_tracepoint): Call it.
7851 * server.h (set_trampoline_buffer_space): Declare.
7852 (claim_trampoline_space): Ditto.
7853 (have_fast_tracepoint_trampoline_buffer): Ditto.
7854
7855 2011-11-14 Yao Qi <yao@codesourcery.com>
7856
7857 * server.c (handle_query): Handle InstallInTrace for qSupported.
7858 * tracepoint.c (add_tracepoint): Sort list.
7859 (install_tracepoint, download_tracepoint): New.
7860 (cmd_qtdp): Call them to install and download tracepoints.
7861 (sort_tracepoints): Removed.
7862 (cmd_qtstart): Update.
7863
7864 2011-11-14 Yao Qi <yao@codesourcery.com>
7865
7866 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7867 * mem-break.h: Declare.
7868 * tracepoint.c (cmd_qtstart): Move some code to ...
7869 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7870 New.
7871 (download_tracepoints): Move some code to ...
7872 (download_tracepoint_1): ... here. New.
7873
7874 2011-11-08 Yao Qi <yao@codesourcery.com>
7875
7876 * remote-utils.c (relocate_instruction): A comment fix.
7877
7878 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7879
7880 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7881 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7882 dr_status_mirror and dr_control_mirror from debug_reg_state.
7883 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7884 (i386_initial_stuff): Remove use of deleted globals.
7885 (i386_get_thread_context, i386_set_thread_context,
7886 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7887 from debug_reg_state.
7888
7889 2011-11-05 Yao Qi <yao@codesourcery.com>
7890
7891 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7892 address as TPOINT's.
7893
7894 2011-11-02 Stan Shebs <stan@codesourcery.com>
7895
7896 * tracepoint.c (agent_mem_read_string): New function.
7897 (eval_agent_expr): Call it for tracenz.
7898 * server.c (handle_query): Report support for tracenz.
7899
7900 2011-11-02 Yao Qi <yao@codesourcery.com>
7901
7902 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7903
7904 2011-11-02 Yao Qi <yao@codesourcery.com>
7905
7906 * target.h: Fix a typo in comment.
7907
7908 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7909
7910 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7911 clobber the breakpoints' shadows with fast tracepoint jumps.
7912 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7913 * target.c (write_inferior_memory): Also pass MYADDR down to
7914 check_mem_write.
7915
7916 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7917
7918 * configure.ac: Check support for personality routine.
7919 * configure: Regenerate.
7920 * config.in: Likewise.
7921 * linux-low.c: Include <sys/personality.h>.
7922 Define ADDR_NO_RANDOMIZE if necessary.
7923 (linux_create_inferior): Disable address space randomization when
7924 forking inferior, if requested.
7925 (linux_supports_disable_randomization): New function.
7926 (linux_target_ops): Install it.
7927 * server.h (disable_randomization): Declare.
7928 * server.c (disable_randomization): New global variable.
7929 (handle_general_set): Handle QDisableRandomization.
7930 (handle_query): Likewise for qSupported.
7931 (main): Support --disable-randomization and --no-disable-randomization
7932 command line arguments.
7933 * target.h (struct target_ops): Add supports_disable_randomization.
7934 (target_supports_disable_randomization): New macro.
7935
7936 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7937
7938 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7939 ifdef check.
7940 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7941 [!PT_GETDSBT] (target_loadmap): New definition.
7942 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7943 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7944 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7945 and PT_GETDSBT to LINUX_LOADMAP.
7946 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7947 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7948
7949 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7950
7951 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7952 (arm_linux_hwbp_cap): New static variable.
7953 (arm_linux_get_hwbp_cap): Replace by ...
7954 (arm_linux_init_hwbp_cap): ... this new function.
7955 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7956 (arm_linux_get_hw_watchpoint_count): Likewise.
7957 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7958 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7959 (arm_prepare_to_resume): Use perror_with_name instead of error.
7960
7961 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7962
7963 * linux-arm-low.c: Include <signal.h>.
7964 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7965 (struct arm_linux_hwbp_cap): New data type.
7966 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7967 (struct arm_linux_hw_breakpoint): New data type.
7968 (MAX_BPTS, MAX_WPTS): Define.
7969 (struct arch_process_info, struct arch_lwp_info): New data types.
7970 (arm_linux_get_hwbp_cap): New function.
7971 (arm_linux_get_hw_breakpoint_count): Likewise.
7972 (arm_linux_get_hw_watchpoint_count): Likewise.
7973 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7974 (arm_hwbp_control_initialize): Likewise.
7975 (arm_hwbp_control_is_enabled): Likewise.
7976 (arm_hwbp_control_is_initialized): Likewise.
7977 (arm_hwbp_control_disable): Likewise.
7978 (arm_linux_hw_breakpoint_equal): Likewise.
7979 (arm_linux_hw_point_initialize): Likewise.
7980 (struct update_registers_data): New data structure.
7981 (update_registers_callback: New function.
7982 (arm_insert_point): Likewise.
7983 (arm_remove_point): Likewise.
7984 (arm_stopped_by_watchpoint): Likewise.
7985 (arm_stopped_data_address): Likewise.
7986 (arm_new_process): Likewise.
7987 (arm_new_thread): Likewise.
7988 (arm_prepare_to_resume): Likewise.
7989 (the_low_target): Register arm_insert_point, arm_remove_point,
7990 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7991 arm_new_thread, and arm_prepare_to_resume.
7992
7993 2011-09-15 Stan Shebs <stan@codesourcery.com>
7994
7995 * server.h (struct emit_ops): Add compare-goto fields.
7996 * tracepoint.c (gdb_agent_op_sizes): New table.
7997 (emit_eq_goto): New function.
7998 (emit_ne_goto): New function.
7999 (emit_lt_goto): New function.
8000 (emit_le_goto): New function.
8001 (emit_gt_goto): New function.
8002 (emit_ge_goto): New function.
8003 (is_goto_target): New function.
8004 (compile_bytecodes): Recognize special cases of compare-goto
8005 combinations and call specialized emitters for them.
8006 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8007 (amd64_emit_ne_goto): New function.
8008 (amd64_emit_lt_goto): New function.
8009 (amd64_emit_le_goto): New function.
8010 (amd64_emit_gt_goto): New function.
8011 (amd64_emit_ge_goto): New function.
8012 (amd64_emit_ops): Add the new functions.
8013 (i386_emit_eq_goto): New function.
8014 (i386_emit_ne_goto): New function.
8015 (i386_emit_lt_goto): New function.
8016 (i386_emit_le_goto): New function.
8017 (i386_emit_gt_goto): New function.
8018 (i386_emit_ge_goto): New function.
8019 (i386_emit_ops): Add the new functions.
8020
8021 2011-09-08 Stan Shebs <stan@codesourcery.com>
8022
8023 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8024 (i386_emit_epilogue): Restore %ebx.
8025
8026 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8027
8028 * server.c (step_thread): Remove definition.
8029 (process_serial_event): Don't handle Hs.
8030 * server.h (step_thread): Remove declaration.
8031 * target.c (set_desired_inferior): Remove use of step_thread.
8032
8033 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8034
8035 * linux-low.c: Include linux-procfs.h.
8036 (linux_attach_lwp_1): Update comments.
8037 (linux_attach): Scan for existing threads when attaching to a
8038 process that is the tgid.
8039 * Makefile.in: Update dependencies.
8040
8041 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8042
8043 * configure.srv: Add linux-procfs.o dependencies.
8044
8045 2011-08-14 Yao Qi <yao@codesourcery.com>
8046
8047 * target.h (struct target_ops): Fix indent.
8048 * win32-low.c (win32_target_ops): Fix comment.
8049
8050 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8051 Yao Qi <yao@codesourcery.com>
8052
8053 * Makefile.in (clean): Remove tic6x-*.c files.
8054 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8055 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8056 (tic6x-c64xp-linux.c): Likewise.
8057 * configure.srv: Add support for tic6x-*-uclinux.
8058 * linux-tic6x-low.c: New.
8059 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8060
8061 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8062 Yao Qi <yao@codesourcery.com>
8063
8064 * target.h (struct target_ops): Add read_loadmap.
8065 * linux-low.c (struct target_loadseg): New type.
8066 (struct target_loadmap): New type.
8067 (linux_read_loadmap): New function.
8068 (linux_target_ops): Add linux_read_loadmap.
8069 * server.c (handle_query): Support qXfer:fdpic:read packet.
8070 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8071 to NULL.
8072
8073 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8074
8075 * win32-low.c: Include <stdint.h>.
8076
8077 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8078
8079 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8080 to the inferior here.
8081 (i386_remove_aligned_watchpoint): Ditto.
8082 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8083 fit part of the watchpoint in the debug registers.
8084 (i386_update_inferior_debug_regs): New.
8085 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8086 registers, and only update the inferior on success.
8087 (i386_low_remove_watchpoint): Ditto.
8088
8089 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8090
8091 * linux-low.c (compare_ints, unique, list_threads, show_process,
8092 linux_core_of_thread): Delete.
8093 (linux_target_ops): Change linux_core_of_thread to
8094 linux_common_core_of_thread.
8095 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8096 * utils.c (malloc_failure): Change type of argument.
8097 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8098 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8099 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8100 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8101 (IPA_OBJS): Add common-utils-ipa.o.
8102 (ptid_h, linux_osdata_h): New macros.
8103 (server_h): Add common/common-utils.h, common/xml-utils.h,
8104 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8105 common/ptid.h.
8106 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8107 ptid.o, buffer.o): New rules.
8108 (linux-low.o): Add common/linux-osdata.h as a dependency.
8109 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8110 * configure.ac: Add AC_HEADER_DIRENT check.
8111 * config.in: Regenerate.
8112 * configure: Regenerate.
8113 * remote-utils.c (xml_escape_text): Delete.
8114 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8115 buffer_xml_printf): Move to common/buffer.c.
8116 * server.c (main): Remove call to initialize_inferiors.
8117 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8118 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8119 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8120 internal_error, gdb_assert, gdb_assert_fail): Delete.
8121 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8122 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8123 common/buffer.h.
8124 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8125 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8126 initialize_inferiors): Delete.
8127
8128 2011-07-20 Pedro Alves <pedro@codesourcery.com>
8129
8130 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8131 symbol error.
8132
8133 2011-05-31 Pedro Alves <pedro@codesourcery.com>
8134
8135 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8136 assertion.
8137 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8138
8139 2011-05-26 Yao Qi <yao@codesourcery.com>
8140
8141 * Makefile.in (thread-db.o): Track dependence to
8142 common/gdb_thread_db.h.
8143 * thread-db.c: include gdb_thread_db.h from right place.
8144
8145 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8146
8147 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8148 __FILE__ and __LINE__ to internal_error.
8149
8150 2011-05-13 Doug Evans <dje@google.com>
8151
8152 * thread-db.c (try_thread_db_load_from_sdir): New function.
8153 (try_thread_db_load_from_dir): New function.
8154 (thread_db_load_search): Handle $sdir, ignore $pdir.
8155 Remove trying of system directories if search of
8156 libthread-db-search-path fails, that is now done via $sdir.
8157
8158 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8159
8160 * server.c (handle_query): Add EnableDisableTracepoints to the list
8161 of supported features.
8162 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8163 tracepoints.
8164 (cmd_qtenable_disable): New.
8165 (cmd_qtstart): Install tracepoints even if disabled.
8166 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8167 receiving a QTEnable or QTDisable packet.
8168 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8169 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8170 tracepoints.
8171 (gdb_probe): Skip data collection if static tracepoint is disabled.
8172
8173 2011-05-10 Doug Evans <dje@google.com>
8174
8175 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8176
8177 2011-05-04 Doug Evans <dje@google.com>
8178
8179 * linux-low.c (linux_join): Skip process lookup.
8180 * spu-low.c (spu_join): Ditto.
8181 * server.c (join_inferiors_callback): Delete.
8182 (process_serial_event): For 'D' packet (detach) call join_inferior
8183 directly.
8184
8185 2011-05-04 Joseph Myers <joseph@codesourcery.com>
8186
8187 * README: Don't mention xscale*-*-linux*.
8188 * configure.srv (xscale*-*-linux*): Don't handle target.
8189
8190 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8191
8192 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8193 casting pointers.
8194 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8195 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8196 (i386_emit_void_call_2): Likewise.
8197
8198 2011-04-26 Yao Qi <yao@codesourcery.com>
8199
8200 * linux-low.c: Move common macros to linux-ptrace.h.
8201 Include linux-ptrace.h.
8202 * Makefile.in (linux_ptrace_h): New.
8203 (linux-low.o): Depends on linux-ptrace.h.
8204
8205 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8206
8207 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8208 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8209 (remote_prepare): New function with most of the TCP code from ...
8210 (remote_open): ... here. Detect PORT here unconditionally. Move also
8211 setting transport_is_reliable.
8212 * server.c (run_once): New variable.
8213 (gdbserver_usage): Document it.
8214 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8215 the first run if RUN_ONCE.
8216 * server.h (run_once, remote_prepare): New declarations.
8217
8218 2011-04-19 Tom Tromey <tromey@redhat.com>
8219
8220 * win32-low.c (handle_load_dll): Remove duplicate "the".
8221
8222 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8223
8224 Remove support for old Cygwin 1.5 versions.
8225 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8226 function to avoid warning.
8227 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8228 warning.
8229
8230 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8231
8232 * gdbserver/server.h (Macro _): Define it if not available.
8233
8234 2011-03-14 Michael Snyder <msnyder@vmware.com>
8235
8236 * hostio.c (handle_close): Remove unnecessary null test.
8237
8238 2011-03-10 Joel Brobecker <brobecker@adacore.com>
8239
8240 * Makefile.in (maintainer-clean realclean distclean): Remove
8241 "make ... subdir_do" command.
8242
8243 2011-03-10 Michael Snyder <msnyder@vmware.com>
8244
8245 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8246
8247 * server.c (handle_v_run): Free alloced buffer on early return.
8248
8249 2011-03-09 Yao Qi <yao@codesourcery.com>
8250
8251 Revert:
8252 2011-03-04 Yao Qi <yao@codesourcery.com>
8253
8254 * Makefile.in: Remove GNU make feature --directory.
8255
8256 2011-03-05 Yao Qi <yao@codesourcery.com>
8257
8258 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8259 (subdir_do): New make target. Copied from gdb/Makefile.
8260 (maintainer-clean, realclean, distclean, clean): Call corresponding
8261 make targets in common/Makefile.
8262
8263 2011-02-11 Yao Qi <yao@codesourcery.com>
8264
8265 * configure.ac: Call AC_PROG_RANLIB.
8266 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8267 * configure: Regenerate.
8268
8269 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8270
8271 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8272
8273 2011-03-06 Yao Qi <yao@codesourcery.com>
8274
8275 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8276
8277 2011-03-05 Yao Qi <yao@codesourcery.com>
8278
8279 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8280 (subdir_do): New make target. Copied from gdb/Makefile.
8281 (maintainer-clean, realclean, distclean, clean): Call corresponding
8282 make targets in common/Makefile.
8283
8284 2011-03-04 Yao Qi <yao@codesourcery.com>
8285
8286 * Makefile.in: Remove GNU make feature --directory.
8287
8288 2011-03-04 Michael Snyder <msnyder@vmware.com>
8289
8290 * server.c (queue_stop_reply): Call xmalloc not malloc.
8291
8292 2011-03-02 Michael Snyder <msnyder@vmware.com>
8293
8294 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8295
8296 2011-02-28 Michael Snyder <msnyder@vmware.com>
8297
8298 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8299 (cmd_qtframe): Ditto.
8300 (cmd_qtbuffer): Ditto.
8301 (cmd_bigqtbuffer): Ditto.
8302
8303 * utils.c (decimal2str): Initialize 'width' to nine, then
8304 don't mess with it.
8305
8306 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8307
8308 * hostio.c (require_data): Free *data, not data.
8309
8310 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8311
8312 * hostio.c (require_data): Use free, not xfree.
8313
8314 2011-02-27 Michael Snyder <msnyder@vmware.com>
8315
8316 * server.c (handle_query): Discard unused value.
8317
8318 * hostio.c (require_data): Free malloc memory before returning
8319 error.
8320
8321 2011-02-26 Michael Snyder <msnyder@vmware.com>
8322
8323 * linux-low.c (list_threads): Call closedir for dirent.
8324
8325 2011-02-27 Michael Snyder <msnyder@vmware.com>
8326
8327 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8328 a case statement falls through.
8329
8330 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8331
8332 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8333 in comparison.
8334
8335 2011-02-26 Michael Snyder <msnyder@vmware.com>
8336
8337 * utils.c (decimal2str): Eliminate dead code and dead param.
8338 (pulongest): Drop dead param from call to decimal2str.
8339 (plongest): Ditto.
8340
8341 2011-02-24 Joel Brobecker <brobecker@adacore.com>
8342
8343 Revert the following patch (not approved yet):
8344 2011-02-21 Hui Zhu <teawater@gmail.com>
8345 * tracepoint.c (tp_printf): New function.
8346 (eval_agent_expr): Handle gdb_agent_op_printf.
8347
8348 2011-02-21 Hui Zhu <teawater@gmail.com>
8349
8350 * tracepoint.c (tp_printf): New function.
8351 (eval_agent_expr): Handle gdb_agent_op_printf.
8352
8353 2011-02-18 Tom Tromey <tromey@redhat.com>
8354
8355 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8356 (tracepoint.o): Likewise.
8357 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8358 (gdb_agent_op_names): Likewise.
8359
8360 2011-02-18 Tom Tromey <tromey@redhat.com>
8361
8362 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8363 gdb_agent_op_rot>: New constants.
8364 (gdb_agent_op_names): Add pick and roll.
8365 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8366 cases.
8367
8368 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8369
8370 * aclocal.m4: Regenerated with aclocal-1.11.1.
8371
8372 2011-02-14 Pedro Alves <pedro@codesourcery.com>
8373
8374 * server.c (handle_qxfer_traceframe_info): New.
8375 (qxfer_packets): Register "traceframe-info".
8376 (handle_query): Report support for qXfer:traceframe-info:read+.
8377 * tracepoint.c (match_blocktype): New.
8378 (traceframe_find_block_type): Rename to ...
8379 (traceframe_walk_blocks): ... this. Add callback filter argument,
8380 and use it.
8381 (traceframe_find_block_type): New, reimplemented on top of
8382 traceframe_walk_blocks.
8383 (build_traceframe_info_xml): New.
8384 (traceframe_read_info): New.
8385 * server.h (traceframe_read_info): Declare.
8386
8387 2011-02-11 Yao Qi <yao@codesourcery.com>
8388
8389 * configure.ac: Call AC_PROG_RANLIB.
8390 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8391 * configure: Regenerate.
8392
8393 2011-02-07 Pedro Alves <pedro@codesourcery.com>
8394
8395 * server.c (gdb_read_memory): Change return semantics to allow
8396 partial transfers.
8397 (handle_search_memory_1): Adjust.
8398 (process_serial_event) <'m' packet>: Handle partial transfers.
8399 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8400
8401 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8402
8403 * regcache.c (init_register_cache): Initialize
8404 regcache->register_status.
8405 (free_register_cache): Release regcache->register_status.
8406 (regcache_cpy): Copy register_status.
8407 (registers_to_string): Print 'x's for unavailable registers.
8408 (supply_register): Mark the register's status valid or
8409 unavailable, depending on whether a buffer was passed in or not.
8410 (supply_register_zeroed): New.
8411 (supply_regblock): Mark the registers' status valid or
8412 unavailable, depending on whether a buffer was passed in or not.
8413 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8414 (struct regcache): New `register_status' field.
8415 (supply_register_zeroed): Declare.
8416 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8417 supply_register_zeroed, rather than passing a NULL buffer to
8418 supply_register.
8419 * tracepoint.c (fetch_traceframe_registers): Update comment.
8420
8421 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8422
8423 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8424 buffer explicit.
8425
8426 2011-01-25 Pedro Alves <pedro@codesourcery.com>
8427
8428 * server.h (decode_xfer_write): Change prototype.
8429 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8430 and don't extract the annex here.
8431 * server.c (decode_xfer_read): Remove `annex' parameter,
8432 and don't extract the annex here.
8433 (decode_xfer): New.
8434 (struct qxfer): New.
8435 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8436 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8437 (handle_qxfer_statictrace): New functions, abstracted out from
8438 handle_query, and made to use the struct qxfer interface.
8439 (handle_threads_qxfer_proper): Rename to ...
8440 (handle_qxfer_threads_proper): ... this.
8441 (handle_threads_qxfer): Rename to ...
8442 (handle_qxfer_threads): ... this. Adjust.
8443 (qxfer_packets): New array.
8444 (handle_qxfer): New function.
8445 (handle_query): Use handle_qxfer.
8446
8447 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8448
8449 * gdbreplay.c: Shorten lines of >= 80 columns.
8450 * linux-low.c: Ditto.
8451 * linux-ppc-low.c: Ditto.
8452 * linux-s390-low.c: Ditto.
8453 * linux-sparc-low.c: Ditto.
8454 * linux-x86-low.c: Ditto.
8455 * linux-xtensa-low.c: Ditto.
8456 * mem-break.c: Ditto.
8457 * nto-low.c: Ditto.
8458 * regcache.h: Ditto.
8459 * remote-utils.c: Ditto.
8460 * server.c: Ditto.
8461 * server.h: Ditto.
8462 * thread-db.c: Ditto.
8463 * tracepoint.c: Ditto.
8464 * utils.c: Ditto.
8465 * win32-low.h: Ditto.
8466
8467 2011-01-05 Joel Brobecker <brobecker@adacore.com>
8468
8469 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8470 update.
8471
8472 2011-01-01 Joel Brobecker <brobecker@adacore.com>
8473
8474 * server.c (gdbserver_version): Update copyright year in version
8475 output.
8476 * gdbreplay.c (gdbreplay_version): Ditto.
8477
8478 2010-12-29 Jie Zhang <jie.zhang@analog.com>
8479
8480 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8481 * linux-bfin-low.c: New file.
8482 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8483 PT_DATA_ADDR for BFIN targets.
8484 * Makefile.in (SFILES): Add linux-bfin-low.c.
8485 (clean): Remove reg-bfin.c.
8486 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8487 * README: Mention supported Blackfin targets.
8488
8489 2010-12-23 Mike Frysinger <vapier@gentoo.org>
8490
8491 * .gitignore: New file.
8492
8493 2010-11-16 Mike Frysinger <vapier@gentoo.org>
8494
8495 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8496
8497 2010-10-22 Jie Zhang <jie@codesourcery.com>
8498
8499 * Makefile.in: Add FLAGS_TO_PASS variable.
8500 (install): Remove dependency of install-only and recursively
8501 invoke make for install-only.
8502
8503 2010-10-04 Doug Evans <dje@google.com>
8504
8505 * Makefile.in (uninstall): Use $(DESTDIR).
8506
8507 2010-09-24 Pedro Alves <pedro@codesourcery.com>
8508
8509 PR gdb/11842
8510
8511 * linux-x86-low.c (compat_siginfo_from_siginfo)
8512 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8513 si_code is < 0. Check for si_code == SI_TIMER before checking for
8514 si_code < 0.
8515
8516 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8517
8518 * lynx-i386-low.c: New file.
8519 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8520
8521 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8522
8523 * lynx-low.c (ptrace_request_to_str): Remove handling for
8524 request values that have been removed in LynxOS 5.x.
8525
8526 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8527
8528 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8529 <ptrace.h>
8530
8531 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8532
8533 * configure.ac: Add --enable-inprocess-agent option.
8534 * configure: Rebuilt.
8535
8536 2010-09-06 Yao Qi <yao@codesourcery.com>
8537
8538 * linux-low.c (linux_kill): Remove unused variable.
8539 (linux_stabilize_threads): Likewise.
8540 * server.c (start_inferior): Likewise.
8541 (queue_stop_reply_callback): Likewise.
8542 * tracepoint.c (do_action_at_tracepoint): Likewise.
8543
8544 2010-09-06 Yao Qi <yao@codesourcery.com>
8545
8546 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8547 on return.
8548
8549 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8550
8551 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8552
8553 2010-09-06 Pedro Alves <pedro@codesourcery.com>
8554
8555 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8556 "$(IPA_DEPFILES)".
8557
8558 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8559
8560 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8561 gdbserver/lynx-ppc-low.c: New files.
8562 * Makefile.in (lynx_low_h): New variable.
8563 (lynx-low.o, lynx-ppc-low.o): New rules.
8564 * configure.ac: On LynxOS, link with -lnetinet.
8565 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8566 * configure: regenerate.
8567
8568 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8569
8570 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8571 * configure.ac: Add check for vasprintf and vsnprintf.
8572 * configure, config.in: Regenerate.
8573 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8574
8575 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8576
8577 * gdbreplay.c: Move include of alloca.h up, next to include of
8578 malloc.h.
8579 * server.h: Add include of malloc.h.
8580 * mem-break.c: Remove include of malloc.h.
8581 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8582
8583 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8584
8585 * Makefile.in (memmem.o): Build with -Wno-error.
8586
8587 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8588
8589 * utils.c (xsnprintf): Make non-static.
8590 * server.h: Add xsnprintf declaration.
8591 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8592 replace calls to snprintf by calls to xsnprintf throughout.
8593
8594 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8595
8596 * configure.ac: Add configure check for alloca.
8597 * configure, config.in: Regenerate.
8598 * server.h: Include alloca.h if it exists.
8599 * gdbreplay.c: Include alloca.h if it exists.
8600
8601 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8602
8603 * linux-low.c (__SIGRTMIN): Define if not already defined.
8604 (linux_create_inferior): Check for __ANDROID__ rather than
8605 __SIGRTMIN.
8606 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8607 are already deferred.
8608 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8609 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8610 stopped and already has a pending signal to report.
8611 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8612 a pending signal to report or is moving out of a jump pad.
8613 (linux_init_signals): Check for __ANDROID__ rather than
8614 __SIGRTMIN.
8615
8616 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8617
8618 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8619 debug_threads check. Avoid a linear search when not doing debug
8620 output.
8621
8622 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8623
8624 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8625 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8626 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8627 (process_event): Change local fd's type to gdb_fildes_t.
8628 (create_file_handler): Adjust prototype.
8629 (delete_file_handler): Adjust prototype.
8630 (handle_file_event): Adjust prototype. Use pfildes.
8631 (create_file_event): Adjsut prototype.
8632 * remote-utils.c (remote_desc, listen_desc): Change type to
8633 gdb_fildes_t.
8634 * server.h: New gdb_fildes_t typedef.
8635 [USE_WIN32API]: Include winsock2.h.
8636 (delete_file_handler, add_file_handler): Adjust prototypes.
8637 (pfildes): Declare.
8638 * utils.c (pfildes): New.
8639
8640 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8641
8642 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8643 * configure: Regenerate.
8644
8645 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8646
8647 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8648 (linux_done_accessing_memory): ... this.
8649 (linux_target_ops): Adjust.
8650 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8651 * nto-low.c (nto_target_ops): Adjust comment.
8652 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8653 * spu-low.c (spu_target_ops): Adjust comment.
8654 * target.h (target_ops): Rename unprepare_to_access_memory field
8655 to done_accessing_memory.
8656 (unprepare_to_access_memory): Rename to ...
8657 (done_accessing_memory): ... this.
8658
8659 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8660
8661 * linux-low.c (linux_prepare_to_access_memory): New.
8662 (linux_unprepare_to_access_memory): New.
8663 (linux_target_ops): Install them.
8664 * server.c (read_memory): Rename to ...
8665 (gdb_read_memory): ... this. Use
8666 prepare_to_access_memory/prepare_to_access_memory.
8667 (write_memory): Rename to ...
8668 (gdb_write_memory): ... this. Use
8669 prepare_to_access_memory/prepare_to_access_memory.
8670 (handle_search_memory_1): Adjust.
8671 (process_serial_event): Adjust.
8672 * target.h (struct target_ops): New fields
8673 prepare_to_access_memory and unprepare_to_access_memory.
8674 (prepare_to_access_memory, unprepare_to_access_memory): New.
8675 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8676 prepare_to_access_memory/prepare_to_access_memory.
8677 * nto-low.c (nto_target_ops): Adjust.
8678 * spu-low.c (spu_target_ops): Adjust.
8679 * win32-low.c (win32_target_ops): Adjust.
8680
8681 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8682
8683 * Makefile.in (WARN_CFLAGS): Get it from configure.
8684 (WERROR_CFLAGS): New.
8685 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8686 * configure.ac: Introduce --enable-werror, which adds -Werror to
8687 the compiler command line. Enabled by default. Disable with
8688 --disable-werror. Add -Wdeclaration-after-statement
8689 Wpointer-arith and -Wformat-nonliteral to warning flags.
8690 * configure: Regenerate.
8691
8692 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8693
8694 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8695
8696 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8697
8698 * gdbreplay.c (remote_error): New.
8699 (gdbchar): New.
8700 (expect): Use gdbchar. Check for error reading from GDB.
8701 Clarify sync error output.
8702 (play): Check for errors writing to GDB.
8703 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8704 * remote-utils.c (getpkt): Check for errors writing to the remote
8705 descriptor.
8706
8707 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8708
8709 * linux-low.c (linux_wait_1): Move non-debugging code out of
8710 `debug_threads' control.
8711
8712 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8713
8714 * linux-low.c (linux_wait_1): Don't set last_status here.
8715 * server.c (push_event, queue_stop_reply_callback): Assert we're
8716 not pushing a TARGET_WAITKIND_IGNORE event.
8717 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8718 (myresume, handle_target_event): Set the thread's last_resume_kind
8719 and last_status from the target returned status.
8720
8721 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8722
8723 PR threads/10729
8724
8725 * linux-x86-low.c (update_debug_registers_callback): New.
8726 (i386_dr_low_set_addr): Use it.
8727 (i386_dr_low_get_addr): New.
8728 (i386_dr_low_set_control): Use update_debug_registers_callback.
8729 (i386_dr_low_get_control): New.
8730 (i386_dr_low_get_status): Adjust.
8731 * linux-low.c (linux_stop_lwp): New.
8732 * linux-low.h (linux_stop_lwp): Declare.
8733
8734 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8735 argument instead of a i386_debug_reg_state.
8736 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8737 a i386_debug_reg_state.
8738 (i386_insert_aligned_watchpoint): Adjust.
8739 (i386_remove_aligned_watchpoint): Adjust.
8740 (i386_low_stopped_data_address): Read the debug registers from the
8741 inferior instead of from the mirrors.
8742 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8743 (i386_dr_low_get_addr): Declare.
8744 (i386_dr_low_get_control): Declare.
8745 (i386_dr_low_get_status): Change prototype.
8746
8747 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8748 (i386_dr_low_get_addr): New.
8749 (i386_dr_low_get_control): New.
8750 (i386_dr_low_get_status): Adjust prototype. Return
8751 dr_status_mirror.
8752 (i386_initial_stuff): Clear dr_status_mirror and
8753 dr_control_mirror.
8754 (i386_get_thread_context): Adjust.
8755 (i386_set_thread_context): Adjust.
8756 (i386_thread_added): Adjust.
8757
8758 2010-08-24 Pedro Alves <pedro@codesourcery.com>
8759
8760 * linux-low.h (linux_thread_area): Delete declaration.
8761
8762 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8763
8764 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8765 after its termination.
8766
8767 2010-08-09 Pedro Alves <pedro@codesourcery.com>
8768
8769 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8770 (gdb_wants_all_stopped): Delete.
8771 (linux_wait_1): Don't call them.
8772 * server.c (handle_v_cont): Tag all threads as want-stopped.
8773 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8774 stopped as "client-wants-stopped".
8775
8776 2010-07-31 Pedro Alves <pedro@codesourcery.com>
8777
8778 * Makefile.in (signals_h): New.
8779 (server_h): Depend on it.
8780 (server.o): Don't depend on $(signals_def).
8781 (signals.o): Depend on $(signals_def).
8782
8783 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8784
8785 * Makefile.in (signals_def): New.
8786 (server_h): Append include/gdb/signals.h and signals_def.
8787 (server.o): Append signals_def.
8788
8789 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8790
8791 * server.c (handle_target_event): Use target_signal_to_host for
8792 resume_info.sig initialization.
8793 * target.h (struct thread_resume) <sig>: New comment.
8794
8795 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8796
8797 * server.c (handle_query): strcpy() the returned string from paddress()
8798 instead of sprintf().
8799 * utils.c (paddress): Return phex_nz().
8800
8801 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8802
8803 * server.c (handle_v_cont): Call mourn_inferior if process
8804 just exited.
8805 (myresume): Likewise.
8806
8807 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8808
8809 Static tracepoints, and integration with UST.
8810
8811 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8812 * mem-break.c (uninsert_all_breakpoints)
8813 (reinsert_all_breakpoints): New.
8814 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8815 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8816 (gdb_agent_ust_loaded, helper_thread_id)
8817 (gdb_agent_helper_thread_id): New macros.
8818 (struct ipa_sym_addresses): Add addr_ust_loaded,
8819 addr_helper_thread_id, addr_cmd_buf.
8820 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8821 (in_process_agent_loaded_ust): New.
8822 (write_e_ust_not_loaded): New.
8823 (maybe_write_ipa_ust_not_loaded): New.
8824 (struct collect_static_trace_data_action): New.
8825 (enum tracepoint_type) <static_tracepoint>: New.
8826 (struct tracepoint) <handle>: Mention static tracepoints.
8827 (struct static_tracepoint_ctx): New.
8828 (CMD_BUF_SIZE): New.
8829 (add_tracepoint_action): Handle static tracepoint actions.
8830 (unprobe_marker_at): New.
8831 (clear_installed_tracepoints): Handle static tracepoints.
8832 (cmd_qtdp): Handle static tracepoints.
8833 (probe_marker_at): New.
8834 (cmd_qtstart): Handle static tracepoints.
8835 (response_tracepoint): Handle static tracepoints.
8836 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8837 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8838 (get_context_regcache): Handle static tracepoints.
8839 (do_action_at_tracepoint): Handle static tracepoint actions.
8840 (traceframe_find_block_type): Handle static trace data blocks.
8841 (traceframe_read_sdata): New.
8842 (download_tracepoints): Download static tracepoint actions.
8843 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8844 (GDB_PROBE_NAME): New.
8845 (ust_ops): New.
8846 (GET_UST_SYM): New.
8847 (USTF): New.
8848 (dlsym_ust): New.
8849 (ust_marker_to_static_tracepoint): New.
8850 (gdb_probe): New.
8851 (collect_ust_data_at_tracepoint): New.
8852 (gdb_ust_probe): New.
8853 (UNIX_PATH_MAX, SOCK_DIR): New.
8854 (gdb_ust_connect_sync_socket): New.
8855 (resume_thread, stop_thread): New.
8856 (run_inferior_command): New.
8857 (init_named_socket): New.
8858 (gdb_ust_socket_init): New.
8859 (cstr_to_hexstr): New.
8860 (next_st): New.
8861 (first_marker, next_marker): New.
8862 (response_ust_marker): New.
8863 (cmd_qtfstm, cmd_qtsstm): New.
8864 (unprobe_marker_at, probe_marker_at): New.
8865 (cmd_qtstmat, gdb_ust_thread): New.
8866 (gdb_ust_init): New.
8867 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8868 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8869 (ST_REGENTRY): New.
8870 (x86_64_st_collect_regmap): New.
8871 (X86_64_NUM_ST_COLLECT_GREGS): New.
8872 (AMD64_RIP_REGNUM): New.
8873 (supply_static_tracepoint_registers): New.
8874 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8875 (ST_REGENTRY): New.
8876 (i386_st_collect_regmap): New.
8877 (i386_NUM_ST_COLLECT_GREGS): New.
8878 (supply_static_tracepoint_registers): New.
8879 * server.c (handle_query): Handle qXfer:statictrace:read.
8880 <qSupported>: Report support for StaticTracepoints, and
8881 qXfer:statictrace:read features.
8882 * server.h (traceframe_read_sdata)
8883 (supply_static_tracepoint_registers): Declare.
8884 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8885 (unpack_varlen_hex): Include in IPA build.
8886 * Makefile.in (ustlibs, ustinc): New.
8887 (IPA_OBJS): Add remote-utils-ipa.o.
8888 ($(IPA_LIB)): Link -ldl and -lpthread.
8889 (UST_CFLAGS): New.
8890 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8891 * config.in, configure: Regenerate.
8892
8893 2010-06-20 Ian Lance Taylor <iant@google.com>
8894 Pedro Alves <pedro@codesourcery.com>
8895
8896 * linux-x86-low.c (always_true): Delete.
8897 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8898 trying to fool the compiler with always_true.
8899
8900 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8901
8902 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8903 conditions in gdbserver.
8904
8905 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8906
8907 * spu-low.c (spu_read_memory): Wrap around local store limit.
8908 (spu_write_memory): Likewise.
8909
8910 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8911
8912 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8913 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8914 LONGEST uses.
8915 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8916 uses.
8917 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8918 uses with LONGEST uses.
8919
8920 2010-06-14 Stan Shebs <stan@codesourcery.com>
8921 Pedro Alves <pedro@codesourcery.com>
8922
8923 Bytecode compiler.
8924
8925 * linux-x86-low.c: Include limits.h.
8926 (add_insns): New.
8927 (always_true): New.
8928 (EMIT_ASM): New.
8929 (EMIT_ASM32): New.
8930 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8931 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8932 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8933 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8934 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8935 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8936 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8937 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8938 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8939 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8940 (amd64_emit_void_call_2): New.
8941 (amd64_emit_ops): New.
8942 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8943 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8944 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8945 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8946 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8947 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8948 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8949 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8950 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8951 (i386_emit_stack_adjust, i386_emit_int_call_1)
8952 (i386_emit_void_call_2): New.
8953 (i386_emit_ops): New.
8954 (x86_emit_ops): New.
8955 (the_low_target): Install x86_emit_ops.
8956 * server.h (struct emit_ops): New.
8957 (get_raw_reg_func_addr): Declare.
8958 (current_insn_ptr, emit_error): Declare.
8959 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8960 (set_trace_state_variable_value): New defines.
8961 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8962 addr_get_trace_state_variable_value and
8963 addr_set_trace_state_variable_value.
8964 (symbol_list): New fields for get_raw_reg,
8965 get_trace_state_variable_value and set_trace_state_variable_value.
8966 (condfn): New typedef.
8967 (struct tracepoint): New field `compiled_cond'.
8968 (do_action_at_tracepoint): Clear compiled_cond.
8969 (get_trace_state_variable_value, set_trace_state_variable_value):
8970 Export in the IPA.
8971 (condition_true_at_tracepoint): If there's a compiled condition,
8972 run that.
8973 (current_insn_ptr, emit_error): New globals.
8974 (struct bytecode_address): New.
8975 (get_raw_reg_func_addr): New.
8976 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8977 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8978 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8979 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8980 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8981 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8982 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8983 (compile_tracepoint_condition, compile_bytecodes): New.
8984 * target.h (emit_ops): Forward declare.
8985 (struct target_ops): New field emit_ops.
8986 (target_emit_ops): New.
8987 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8988 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8989 * linux-low.c (linux_emit_ops): New.
8990 (linux_target_ops): Install it.
8991 * linux-low.h (struct linux_target_ops): New field emit_ops.
8992
8993 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8994
8995 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8996 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8997
8998 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8999 Stan Shebs <stan@codesourcery.com>
9000
9001 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9002 (all): Depend on $(extra_libraries).
9003 (install-only): Install the IPA.
9004 (IPA_OBJS, IPA_LIB): New.
9005 (clean): Remove the IPA lib.
9006 (IPAGENT_CFLAGS): New.
9007 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9008 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9009 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9010 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9011 * configure.ac: Check for atomic builtins support in the compiler.
9012 (IPA_DEPFILES, extra_libraries): Define.
9013 * configure.srv (ipa_obj): Add description.
9014 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9015 (i[34567]86-*-linux*): Set ipa_obj.
9016 (x86_64-*-linux*): Set ipa_obj.
9017 * linux-low.c (stabilizing_threads): New.
9018 (supports_fast_tracepoints): New.
9019 (linux_detach): Stabilize threads before detaching.
9020 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9021 the lwp is either not stabilizing, or is moving out of a jump pad.
9022 (linux_fast_tracepoint_collecting): New.
9023 (maybe_move_out_of_jump_pad): New.
9024 (enqueue_one_deferred_signal): New.
9025 (dequeue_one_deferred_signal): New.
9026 (linux_wait_for_event_1): If moving out of a jump pad, defer
9027 pending signals to later.
9028 (linux_stabilize_threads): New.
9029 (linux_wait_1): Check if threads need moving out of jump pads, and
9030 do it if so.
9031 (stuck_in_jump_pad_callback): New.
9032 (move_out_of_jump_pad_callback): New.
9033 (lwp_running): New.
9034 (linux_resume_one_lwp): Handle moving out of jump pads.
9035 (linux_set_resume_request): Dequeue deferred signals.
9036 (need_step_over_p): Also step over fast tracepoint jumps.
9037 (start_step_over): Also uninsert fast tracepoint jumps.
9038 (finish_step_over): Also reinsert fast tracepoint jumps.
9039 (linux_install_fast_tracepoint_jump): New.
9040 (linux_target_ops): Install linux_stabilize_threads and
9041 linux_install_fast_tracepoint_jump_pad.
9042 * linux-low.h (linux_target_ops) <get_thread_area,
9043 install_fast_tracepoint_jump_pad>: New fields.
9044 (struct lwp_info) <collecting_fast_tracepoint,
9045 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9046 (linux_get_thread_area): Declare.
9047 * linux-x86-low.c (jump_insn): New.
9048 (x86_get_thread_area): New.
9049 (append_insns): New.
9050 (push_opcode): New.
9051 (amd64_install_fast_tracepoint_jump_pad): New.
9052 (i386_install_fast_tracepoint_jump_pad): New.
9053 (x86_install_fast_tracepoint_jump_pad): New.
9054 (the_low_target): Install x86_get_thread_area and
9055 x86_install_fast_tracepoint_jump_pad.
9056 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9057 (struct fast_tracepoint_jump): New.
9058 (fast_tracepoint_jump_insn): New.
9059 (fast_tracepoint_jump_shadow): New.
9060 (find_fast_tracepoint_jump_at): New.
9061 (fast_tracepoint_jump_here): New.
9062 (delete_fast_tracepoint_jump): New.
9063 (set_fast_tracepoint_jump): New.
9064 (uninsert_fast_tracepoint_jumps_at): New.
9065 (reinsert_fast_tracepoint_jumps_at): New.
9066 (set_breakpoint_at): Use write_inferior_memory.
9067 (uninsert_raw_breakpoint): Use write_inferior_memory.
9068 (check_mem_read): Mask out fast tracepoint jumps.
9069 (check_mem_write): Mask out fast tracepoint jumps.
9070 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9071 (set_fast_tracepoint_jump): Declare.
9072 (delete_fast_tracepoint_jump)
9073 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9074 (reinsert_fast_tracepoint_jumps_at): Declare.
9075 * regcache.c: Don't compile many functions when building the
9076 in-process agent library.
9077 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9078 the register buffer in the heap.
9079 (free_register_cache): If the register buffer isn't owned by the
9080 regcache, don't free it.
9081 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9082 pre-existing register caches.
9083 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9084 type.
9085 (convert_ascii_to_int): : Constify `from' parameter type.
9086 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9087 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9088 the needed buffer in-place.
9089 (relocate_instruction): New.
9090 * server.c (handle_query) <qSymbols>: If the target supports
9091 tracepoints, give it a chance of looking up symbols. Report
9092 support for fast tracepoints.
9093 (handle_status): Stabilize threads.
9094 (process_serial_event): Adjust.
9095 * server.h (struct fast_tracepoint_jump): Forward declare.
9096 (struct process_info) <fast_tracepoint_jumps>: New field.
9097 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9098 (decode_X_packet, decode_M_packet): Adjust.
9099 (relocate_instruction): Declare.
9100 (in_process_agent_loaded): Declare.
9101 (tracepoint_look_up_symbols): Declare.
9102 (struct fast_tpoint_collect_status): Declare.
9103 (fast_tracepoint_collecting): Declare.
9104 (force_unlock_trace_buffer): Declare.
9105 (handle_tracepoint_bkpts): Declare.
9106 (initialize_low_tracepoint)
9107 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9108 * target.h (struct target_ops) <stabilize_threads,
9109 install_fast_tracepoint_jump_pad>: New fields.
9110 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9111 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9112 [HAVE_STDINT_H]: Include stdint.h.
9113 (trace_debug_1): Rename to ...
9114 (trace_vdebug): ... this.
9115 (trace_debug): Rename to ...
9116 (trace_debug_1): ... this. Add `level' parameter.
9117 (trace_debug): New.
9118 (ATTR_USED, ATTR_NOINLINE): New.
9119 (IP_AGENT_EXPORT): New.
9120 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9121 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9122 (about_to_request_buffer_space, trace_buffer_is_full)
9123 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9124 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9125 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9126 (traceframe_write_count, traceframes_created)
9127 (trace_state_variables)
9128 New renaming defines.
9129 (struct ipa_sym_addresses): New.
9130 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9131 (symbol_list): New.
9132 (ipa_sym_addrs): New.
9133 (all_tracepoint_symbols_looked_up): New.
9134 (in_process_agent_loaded): New.
9135 (write_e_ipa_not_loaded): New.
9136 (maybe_write_ipa_not_loaded): New.
9137 (tracepoint_look_up_symbols): New.
9138 (debug_threads) [IN_PROCESS_AGENT]: New.
9139 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9140 (UNKNOWN_SIDE_EFFECTS): New.
9141 (stop_tracing): New.
9142 (flush_trace_buffer): New.
9143 (stop_tracing_bkpt): New.
9144 (flush_trace_buffer_bkpt): New.
9145 (read_inferior_integer): New.
9146 (read_inferior_uinteger): New.
9147 (read_inferior_data_pointer): New.
9148 (write_inferior_data_pointer): New.
9149 (write_inferior_integer): New.
9150 (write_inferior_uinteger): New.
9151 (struct collect_static_trace_data_action): Delete.
9152 (enum tracepoint_type): New.
9153 (struct tracepoint) <type>: New field `type'.
9154 <actions_str, step_actions, step_actions_str>: Only include in
9155 GDBserver.
9156 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9157 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9158 (tracepoints): Use IP_AGENT_EXPORT.
9159 (last_tracepoint): Don't include in the IPA.
9160 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9161 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9162 (alloced_trace_state_variables): New.
9163 (trace_state_variables): Use IP_AGENT_EXPORT.
9164 (traceframe_t): Delete unused variable.
9165 (circular_trace_buffer): Don't include in the IPA.
9166 (trace_buffer_start): Delete.
9167 (struct trace_buffer_control): New.
9168 (trace_buffer_free): Delete.
9169 (struct ipa_trace_buffer_control): New.
9170 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9171 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9172 New.
9173 (trace_buffer_ctrl): New.
9174 (TRACE_BUFFER_CTRL_CURR): New.
9175 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9176 Reimplement as macros.
9177 (trace_buffer_wrap): Delete.
9178 (traceframe_write_count, traceframe_read_count)
9179 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9180 (struct tracepoint_hit_ctx) <type>: New field.
9181 (struct fast_tracepoint_ctx): New.
9182 (memory_barrier): New.
9183 (cmpxchg): New.
9184 (record_tracepoint_error): Update atomically in the IPA.
9185 (clear_inferior_trace_buffer): New.
9186 (about_to_request_buffer_space): New.
9187 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9188 updating the same buffer.
9189 (add_tracepoint): Default the tracepoint's type to trap
9190 tracepoint, and orig_size to -1.
9191 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9192 internal variables.
9193 (create_trace_state_variable): New parameter `gdb'. Handle it.
9194 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9195 (cmd_qtdp): Handle fast tracepoints.
9196 (cmd_qtdv): Adjust.
9197 (max_jump_pad_size): New.
9198 (gdb_jump_pad_head): New.
9199 (get_jump_space_head): New.
9200 (claim_jump_space): New.
9201 (sort_tracepoints): New.
9202 (MAX_JUMP_SIZE): New.
9203 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9204 IPA.
9205 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9206 support. Upload fast traceframes, and delete internal IPA
9207 breakpoints.
9208 (stop_tracing_handler): New.
9209 (flush_trace_buffer_handler): New.
9210 (cmd_qtstop): Upload fast tracepoints.
9211 (response_tracepoint): Handle fast tracepoints.
9212 (tracepoint_finished_step): Upload fast traceframes. Set the
9213 tracepoint hit context's tracepoint type.
9214 (handle_tracepoint_bkpts): New.
9215 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9216 type. Add comment about fast tracepoints.
9217 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9218 non-existing action_str field.
9219 (get_context_regcache): Handle fast tracepoints.
9220 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9221 to the regcache.
9222 (fast_tracepoint_from_jump_pad_address): New.
9223 (fast_tracepoint_from_ipa_tpoint_address): New.
9224 (collecting_t): New.
9225 (force_unlock_trace_buffer): New.
9226 (fast_tracepoint_collecting): New.
9227 (collecting): New.
9228 (gdb_collect): New.
9229 (write_inferior_data_ptr): New.
9230 (target_tp_heap): New.
9231 (target_malloc): New.
9232 (download_agent_expr): New.
9233 (UALIGN): New.
9234 (download_tracepoints): New.
9235 (download_trace_state_variables): New.
9236 (upload_fast_traceframes): New.
9237 (IPA_FIRST_TRACEFRAME): New.
9238 (IPA_NEXT_TRACEFRAME_1): New.
9239 (IPA_NEXT_TRACEFRAME): New.
9240 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9241 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9242 (gdb_jump_pad_buffer_end): New.
9243 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9244 (initialize_tracepoint): Adjust.
9245 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9246 buffer. Initialize the low module.
9247 * utils.c (PREFIX, TOOLNAME): New.
9248 (malloc_failure): Use PREFIX.
9249 (error): In the IPA, an error causes an exit.
9250 (fatal, warning): Use PREFIX.
9251 (internal_error): Use TOOLNAME.
9252 (NUMCELLS): Increase to 10.
9253 * configure, config.in: Regenerate.
9254
9255 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9256
9257 * server.c (handle_query) <qSupported>: Do two passes over the
9258 qSupported string to avoid nesting strtok.
9259
9260 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9261
9262 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9263 (CDEPS): New.
9264 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9265 -Wl,--dynamic-list.
9266 * configure: Regenerate.
9267 * proc-service.list: New.
9268
9269 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9270
9271 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9272 New comment.
9273
9274 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9275
9276 * gdbreplay.c (remote_open): Check error return from socket() call by
9277 its equality to -1 not by it being negative.
9278 * remote-utils.c (remote_open): Likewise.
9279
9280 2010-05-23 Pedro Alves <pedro@codesourcery.com>
9281
9282 * config.h: Regenerate.
9283
9284 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9285
9286 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9287 doesn't provide PTRACE_GET_THREAD_AREA.
9288
9289 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9290
9291 * linux-m68k-low.c: Include <asm/ptrace.h>
9292 (ps_get_thread_area): Implement.
9293
9294 2010-05-03 Doug Evans <dje@google.com>
9295
9296 * event-loop.c (struct callback_event): New struct.
9297 (callback_list): New global.
9298 (append_callback_event, delete_callback_event): New functions.
9299 (process_callback): New function.
9300 (start_event_loop): Call it.
9301 * remote-utils.c (NOT_SCHEDULED): Define.
9302 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9303 moved out of readchar.
9304 (readchar): Rewrite. Call reschedule before returning.
9305 (reset_readchar): New function.
9306 (remote_close): Call it.
9307 (process_remaining, reschedule): New functions.
9308 * server.h (callback_handler_func): New typedef.
9309 (append_callback_event, delete_callback_event): Declare.
9310
9311 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9312
9313 * proc-service.c (ps_pglobal_lookup): Use
9314 thread_db_look_up_one_symbol.
9315 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9316 parameter. Use it instead of all_symbols_looked_up.
9317 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9318 field.
9319 (all_symbols_looked_up): Don't declare.
9320 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9321 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9322 field.
9323 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9324 Set all_symbols_looked_up here.
9325 (thread_db_look_up_one_symbol): New.
9326 (thread_db_get_tls_address): Adjust.
9327 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9328 thread_db object on the heap, and tentatively set it in the
9329 process structure.
9330 (thread_db_init): Don't set all_symbols_looked_up here.
9331 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9332
9333 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9334
9335 * linux-low.c (linux_kill, linux_detach): Adjust.
9336 (status_pending_p_callback): Remove redundant statement. Check
9337 for !TARGET_WAITIKIND_IGNORE, instead of
9338 TARGET_WAITKIND_STOPPED.
9339 (handle_tracepoints): Make sure LWP is locked. Adjust.
9340 (linux_wait_for_event_1): Adjust.
9341 (linux_cancel_breakpoints): New.
9342 (unsuspend_one_lwp): New.
9343 (unsuspend_all_lwps): New.
9344 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9345 (send_sigstop_callback): Change return type to int, add new
9346 `except' parameter and handle it.
9347 (suspend_and_send_sigstop_callback): New.
9348 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9349 pass them down. If SUSPEND, also increment the lwp's suspend
9350 count.
9351 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9352 (need_step_over_p): Don't consider suspended LWPs.
9353 (start_step_over): Adjust.
9354 (proceed_one_lwp): Change return type to int, add new `except'
9355 parameter and handle it.
9356 (unsuspend_and_proceed_one_lwp): New.
9357 (proceed_all_lwps): Use find_inferior instead of
9358 for_each_inferior.
9359 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9360 also decrement the suspend count of LWPs. Pass `except' down,
9361 instead of hacking its suspend count.
9362 (linux_pause_all): Add `freeze' parameter. Adjust.
9363 (linux_unpause_all): New.
9364 (linux_target_ops): Install linux_unpause_all.
9365 * server.c (handle_status): Adjust.
9366 * target.h (struct target_ops): New fields `unpause_all' and
9367 `cancel_breakpoints'. Add new parameter to `pause_all'.
9368 (pause_all): Add new `freeze' parameter.
9369 (unpause_all): New.
9370 (cancel_breakpoints): New.
9371 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9372 cancel breakpoints.
9373 (cmd_qtstart): Pause threads.
9374 (stop_tracing): Pause threads, and cancel breakpoints.
9375 * win32-low.c (win32_target_ops): Adjust.
9376
9377 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9378
9379 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9380 the inferior right away from here...
9381 (linux_wait_1): ... to here, and adjust to check the thread's
9382 last_resume_kind instead of the lwp's step or stop_expected flags.
9383
9384 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9385
9386 * README: Use consistent `GDB' and `GDBserver' spellings.
9387
9388 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9389
9390 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9391 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9392 (linux_detach_one_lwp): Assume the lwp is stopped.
9393 (any_thread_of): Delete.
9394 (linux_detach): Stop all lwps here. Don't blindly delete all
9395 breakpoints.
9396 (delete_lwp_callback): New.
9397 (linux_mourn): Delete all lwps of the process that is gone.
9398 (linux_wait_1): Don't delete the last lwp of the process here.
9399 * mem-break.h (mark_breakpoints_out): Declare.
9400 * mem-break.c (mark_breakpoints_out): New.
9401 (free_all_breakpoints): Use it.
9402 * server.c (handle_target_event): If the process is gone, mark
9403 breakpoints out.
9404 * thread-db.c (struct thread_db) <create_bp>: New field.
9405 (thread_db_enable_reporting): Fix prototype. Store a thread event
9406 breakpoint reference in the thread_db struct.
9407 (thread_db_load_search): Clear the thread_db object.
9408 (try_thread_db_load_1): Ditto.
9409 (switch_to_process): New.
9410 (disable_thread_event_reporting): Use it.
9411 (remove_thread_event_breakpoints): New.
9412 (thread_db_detach, thread_db_mourn): Use it.
9413
9414 2010-05-01 Pedro Alves <pedro@codesourcery.com>
9415
9416 * linux-low.c (linux_enable_event_reporting): New.
9417 (linux_wait_for_event_1, handle_extended_wait): Use it.
9418
9419 2010-04-30 Pedro Alves <pedro@codesourcery.com>
9420
9421 * linux-low.c (linux_kill_one_lwp, linux_kill)
9422 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9423 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9424 SIGSTOP even if the LWP is stopped.
9425 (send_sigstop_callback): New.
9426 (stop_all_lwps): Use send_sigstop_callback instead.
9427 (linux_resume_one_thread): Adjust.
9428 (proceed_one_lwp): Still proceed an LWP that the client has
9429 requested to stop, if we haven't reported it as stopped yet. Make
9430 sure that LWPs the client want stopped, have a pending SIGSTOP.
9431
9432 2010-04-26 Doug Evans <dje@google.com>
9433
9434 * server.c (handle_general_set): Make static.
9435
9436 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9437 Print received char after testing for error/eof instead of before.
9438 (input_interrupt): Tweak comment.
9439
9440 2010-04-23 Doug Evans <dje@google.com>
9441
9442 * server.c (start_inferior): Print inferior argv if --debug.
9443
9444 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9445
9446 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9447 * nto-x86-low.c: Include server.h
9448
9449 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9450
9451 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9452 be consistent with other sources of this directory.
9453 (init_registers_amd64): Correct name of source file of this function
9454 in the comment.
9455
9456 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9457
9458 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9459 64-bit executables.
9460
9461 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9462
9463 * win32-i386-low.c: Add 64-bit support.
9464 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9465 (init_registers_amd64): Declare.
9466 (mappings): Add 64-bit version of array.
9467 (init_windows_x86): New function.
9468 (the_low_target): Change init_arch field to init_windows_x86.
9469
9470 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9471
9472 * win32-low.c: Adapt to support also 64-bit architecture.
9473 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9474 (get_image_name): Use SIZE_T type for local variable `done'.
9475 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9476 (toolhelp_get_dll_name): Idem.
9477 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9478 Use uintptr_t typecast to avoid warning.
9479 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9480 (handle_exception): Use phex_nz to avoid warning.
9481 (win32_wait): Remove unused local variable `process'.
9482
9483 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9484
9485 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9486 `amd64-avx.o'.
9487
9488 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9489
9490 * configure.ac: Use `ws2_32' library for srv_mingw.
9491 * configure: Regenerate.
9492 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9493 * remote-utils.c: Likewise.
9494
9495 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9496
9497 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9498 if __x86_64__ is defined.
9499
9500 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9501
9502 * configure: Regenerate.
9503
9504 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9505
9506 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9507 * target.h (target_ops): New get_tib_address field.
9508 * win32-low.h (win32_thread_info): Add thread_local_base field.
9509 * win32-low.c (child_add_thread): Add tlb argument.
9510 Set thread_local_base field to TLB.
9511 (get_child_debug_event): Adapt to child_add_thread change.
9512 (win32_get_tib_address): New function.
9513 (win32_target_ops): Set get_tib_address field to
9514 win32_get_tib_address.
9515 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9516
9517 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9518
9519 * linux-low.c (linux_mourn): Also remove the process.
9520 * server.c (handle_target_event): Don't remove the process here.
9521 * nto-low.c (nto_mourn): New.
9522 (nto_target_ops): Install it.
9523 * spu-low.c (spu_mourn): New.
9524 (spu_target_ops): Install it.
9525 * win32-low.c (win32_mourn): New.
9526 (win32_target_ops): Install it.
9527
9528 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9529
9530 * server.h (buffer_xml_printf): Remove redundant `;'.
9531
9532 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9533
9534 * regcache.c (set_register_cache): Invalidate regcaches before
9535 changing the register cache layout.
9536 (regcache_invalidate_one): Allow a NULL regcache.
9537 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9538 regcaches before changing the register cache layout or the target
9539 regsets.
9540
9541 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9542
9543 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9544 variable warning on Linux/x86-64.
9545
9546 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9547
9548 GDBserver disconnected tracing support.
9549
9550 * linux-low.c (linux_remove_process): Delete.
9551 (add_lwp): Don't set last_resume_kind here.
9552 (linux_kill): Use `mourn'.
9553 (linux_detach): Use `thread_db_detach', and `mourn'.
9554 (linux_mourn): New.
9555 (linux_attach_lwp_1): Adjust comment.
9556 (linux_attach): last_resume_kind moved the thread_info; adjust.
9557 (status_pending_p_callback): Adjust.
9558 (linux_wait_for_event_1): Adjust.
9559 (count_events_callback, select_singlestep_lwp_callback)
9560 (select_event_lwp_callback, cancel_breakpoints_callback)
9561 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9562 (proceed_one_lwp): Adjust.
9563 (linux_async): Add debug output.
9564 (linux_thread_stopped): New.
9565 (linux_pause_all): New.
9566 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9567 linux_pause_all.
9568 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9569 (thread_db_free): Delete declaration.
9570 (thread_db_detach, thread_db_mourn): Declare.
9571 * thread-db.c (thread_db_init): Use thread_db_mourn.
9572 (thread_db_free): Delete, split in two.
9573 (disable_thread_event_reporting): New.
9574 (thread_db_detach): New.
9575 (thread_db_mourn): New.
9576
9577 * server.h (struct thread_info) <last_resume_kind>: New field.
9578 <attached>: Add comment.
9579 <gdb_detached>: New field.
9580 (handler_func): Change return type to int.
9581 (handle_serial_event, handle_target_event): Ditto.
9582 (gdb_connected): Declare.
9583 (tracing): Delete.
9584 (disconnected_tracing): Declare.
9585 (stop_tracing): Declare.
9586
9587 * server.c (handle_query) <qSupported>: Report support for
9588 disconnected tracing.
9589 (queue_stop_reply_callback): Account for running threads.
9590 (gdb_wants_thread_stopped): New.
9591 (gdb_wants_all_threads_stopped): New.
9592 (gdb_reattached_process): New.
9593 (handle_status): Clear the `gdb_detached' flag of all processes.
9594 In all-stop, stop all threads.
9595 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9596 (process_serial_event): If the remote connection breaks, or if an
9597 exit was forced with "monitor exit", force an event loop exit.
9598 Handle disconnected tracing on detach.
9599 (handle_serial_event): Adjust.
9600 (handle_target_event): If GDB isn't connected, forward events back
9601 to the inferior, unless the last process exited, in which case,
9602 exit gdbserver. Adjust interface.
9603
9604 * remote-utils.c (remote_open): Don't block in accept. Instead
9605 register an event loop source on the listen socket file
9606 descriptor. Refactor bits into ...
9607 (listen_desc): ... this new global.
9608 (gdb_connected): ... this new function.
9609 (enable_async_notification): ... this new function.
9610 (handle_accept_event): ... this new function.
9611 (remote_close): Clear remote_desc.
9612
9613 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9614
9615 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9616 New fields.
9617 (mourn_inferior): Define.
9618 (target_process_qsupported): Avoid the dangling else problem.
9619 (thread_stopped): Define.
9620 (pause_all): Define.
9621 (target_waitstatus_to_string): Declare.
9622 * target.c (target_waitstatus_to_string): New.
9623
9624 * tracepoint.c (tracing): Make extern.
9625 (disconnected_tracing): New.
9626 (stop_tracing): Make extern. Handle tracing stops due to GDB
9627 disconnecting.
9628 (cmd_qtdisconnected): New.
9629 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9630 (handle_tracepoint_general_set): Handle QTDisconnected.
9631
9632 * event-loop.c (event_handler_func): Change return type to int.
9633 (process_event): Bail out if the event handler wants the event
9634 loop to stop.
9635 (handle_file_event): Ditto.
9636 (start_event_loop): Bail out if the event handler wants the event
9637 loop to stop.
9638
9639 * nto-low.c (nto_target_ops): Adjust.
9640 * spu-low.c (spu_wait): Don't remove the process here.
9641 (spu_target_ops): Adjust.
9642 * win32-low.c (win32_wait): Don't remove the process here.
9643 (win32_target_ops): Adjust.
9644
9645 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9646
9647 * regcache.c (realloc_register_cache): Invalidate inferior's
9648 regcache before recreating it.
9649
9650 2010-04-09 Pedro Alves <pedro@codesourcery.com>
9651
9652 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9653
9654 2010-04-09 Stan Shebs <stan@codesourcery.com>
9655 Pedro Alves <pedro@codesourcery.com>
9656
9657 * server.h (LONGEST): New.
9658 (struct thread_info) <while_stepping>: New field.
9659 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9660 Declare.
9661 (initialize_tracepoint, handle_tracepoint_general_set)
9662 (handle_tracepoint_query, tracepoint_finished_step)
9663 (tracepoint_was_hit, release_while_stepping_state_list):
9664 (current_traceframe): Declare.
9665 * server.c (handle_general_set): Handle tracepoint packets.
9666 (read_memory): New.
9667 (write_memory): New.
9668 (handle_search_memory_1): Use read_memory.
9669 (handle_query): Report support for conditional tracepoints, trace
9670 state variables, and tracepoint sources. Handle tracepoint
9671 queries.
9672 (main): Initialize the tracepoints module.
9673 (process_serial_event): Handle traceframe reads/writes.
9674
9675 * linux-low.c (handle_tracepoints): New.
9676 (linux_wait_1): Call it.
9677 (linux_resume_one_lwp): Handle while-stepping.
9678 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9679 (linux_target_ops): Install them.
9680 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9681 New field.
9682 * linux-x86-low.c (x86_supports_tracepoints): New.
9683 (the_low_target). Install it.
9684
9685 * mem-break.h (delete_breakpoint): Declare.
9686 * mem-break.c (delete_breakpoint): Make external.
9687
9688 * target.h (struct target_ops): Add `supports_tracepoints',
9689 `read_pc', and `write_pc' fields.
9690 (target_supports_tracepoints): Define.
9691 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9692 (phex_nz): New.
9693
9694 * regcache.h (struct regcache) <registers_owned>: New field.
9695 (init_register_cache, regcache_cpy): Declare.
9696 (regcache_read_pc, regcache_write_pc): Declare.
9697 (register_cache_size): Declare.
9698 (supply_regblock): Declare.
9699 * regcache.c (init_register_cache): New.
9700 (new_register_cache): Use it.
9701 (regcache_cpy): New.
9702 (register_cache_size): New.
9703 (supply_regblock): New.
9704 (regcache_read_pc, regcache_write_pc): New.
9705
9706 * tracepoint.c: New.
9707
9708 * Makefile.in (OBS): Add tracepoint.o.
9709 (tracepoint.o): New rule.
9710
9711 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9712
9713 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9714 (i386-mmx.o): New.
9715 (i386-mmx.c): Likewise.
9716 (i386-mmx-linux.o): Likewise.
9717 (i386-mmx-linux.c): Likewise.
9718
9719 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9720 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9721 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9722 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9723
9724 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9725 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9726 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9727
9728 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9729
9730 * Makefile.in (clean): Updated.
9731 (i386-avx.o): New.
9732 (i386-avx.c): Likewise.
9733 (i386-avx-linux.o): Likewise.
9734 (i386-avx-linux.c): Likewise.
9735 (amd64-avx.o): Likewise.
9736 (amd64-avx.c): Likewise.
9737 (amd64-avx-linux.o): Likewise.
9738 (amd64-avx-linux.c): Likewise.
9739
9740 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9741 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9742 (srv_amd64_regobj): Add amd64-avx.o.
9743 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9744 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9745 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9746 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9747 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9748 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9749 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9750
9751 * i387-fp.c: Include "i386-xstate.h".
9752 (i387_xsave): New.
9753 (i387_cache_to_xsave): Likewise.
9754 (i387_xsave_to_cache): Likewise.
9755 (x86_xcr0): Likewise.
9756
9757 * i387-fp.h (i387_cache_to_xsave): Likewise.
9758 (i387_xsave_to_cache): Likewise.
9759 (x86_xcr0): Likewise.
9760
9761 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9762 * linux-crisv32-low.c (target_regsets): Likewise.
9763 * linux-m68k-low.c (target_regsets): Likewise.
9764 * linux-mips-low.c (target_regsets): Likewise.
9765 * linux-ppc-low.c (target_regsets): Likewise.
9766 * linux-s390-low.c (target_regsets): Likewise.
9767 * linux-sh-low.c (target_regsets): Likewise.
9768 * linux-sparc-low.c (target_regsets): Likewise.
9769 * linux-xtensa-low.c (target_regsets): Likewise.
9770
9771 * linux-low.c: Include <sys/uio.h>.
9772 (regsets_fetch_inferior_registers): Support nt_type.
9773 (regsets_store_inferior_registers): Likewise.
9774 (linux_process_qsupported): New.
9775 (linux_target_ops): Add linux_process_qsupported.
9776
9777 * linux-low.h (regset_info): Add nt_type.
9778 (linux_target_ops): Add process_qsupported.
9779
9780 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9781 and <sys/uio.h>.
9782 (init_registers_i386_avx_linux): New.
9783 (init_registers_amd64_avx_linux): Likewise.
9784 (xmltarget_i386_linux_no_xml): Likewise.
9785 (xmltarget_amd64_linux_no_xml): Likewise.
9786 (PTRACE_GETREGSET): Likewise.
9787 (PTRACE_SETREGSET): Likewise.
9788 (x86_fill_xstateregset): Likewise.
9789 (x86_store_xstateregset): Likewise.
9790 (use_xml): Likewise.
9791 (x86_linux_update_xmltarget): Likewise.
9792 (x86_linux_process_qsupported): Likewise.
9793 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9794 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9795 init_registers_i386_linux here. Call
9796 x86_linux_update_xmltarget.
9797 (the_low_target): Add x86_linux_process_qsupported.
9798
9799 * server.c (handle_query): Call target_process_qsupported.
9800
9801 * target.h (target_ops): Add process_qsupported.
9802 (target_process_qsupported): New.
9803
9804 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9805
9806 * inferiors.c (add_thread): Set last_status kind to
9807 TARGET_WAITKIND_IGNORE.
9808 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9809 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9810 (linux_wait_1): Move `thread' local definition to block that uses
9811 it. Don't NULL initialize `event_child'.
9812 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9813 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9814 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9815
9816 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9817
9818 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9819 an extended waitstatus, or by a watchpoint.
9820 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9821 thread was stepping or has been stopped by a watchpoint.
9822
9823 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9824
9825 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9826 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9827 of another, then delete the previous, and validate all
9828 breakpoints.
9829 (validate_inserted_breakpoint): New.
9830 (delete_disabled_breakpoints): New.
9831 (validate_breakpoints): New.
9832 (check_mem_read): Validate breakpoints before trusting their
9833 shadow. Delete disabled breakpoints.
9834 (check_mem_write): Validate breakpoints before trusting they
9835 should be inserted. Delete disabled breakpoints.
9836 * mem-break.h (validate_breakpoints):
9837 * server.c (handle_query): Validate breakpoints when we see a
9838 qSymbol query.
9839
9840 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9841
9842 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9843 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9844 if we could tell there's a GDB breakpoint at stop_pc.
9845 (need_step_over_p): Don't do a step over if we find a GDB
9846 breakpoint at the resume PC.
9847
9848 * mem-break.c (struct raw_breakpoint): New.
9849 (enum bkpt_type): New type `gdb_breakpoint'.
9850 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9851 fields. New field `raw'.
9852 (find_raw_breakpoint_at): New.
9853 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9854 breakpoint instead.
9855 (set_breakpoint_at): Adjust.
9856 (delete_raw_breakpoint): New.
9857 (release_breakpoint): New.
9858 (delete_breakpoint): Rename to...
9859 (delete_breakpoint_1): ... this. Add proc parameter. Use
9860 release_breakpoint. Return ENOENT.
9861 (delete_breakpoint): Reimplement.
9862 (find_breakpoint_at): Delete.
9863 (find_gdb_breakpoint_at): New.
9864 (delete_breakpoint_at): Delete.
9865 (set_gdb_breakpoint_at): New.
9866 (delete_gdb_breakpoint_at): New.
9867 (gdb_breakpoint_here): New.
9868 (set_reinsert_breakpoint): Use release_breakpoint.
9869 (uninsert_breakpoint): Rename to ...
9870 (uninsert_raw_breakpoint): ... this.
9871 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9872 (reinsert_raw_breakpoint): Change parameter type to
9873 raw_breakpoint.
9874 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9875 instead.
9876 (check_breakpoints): Adjust. Use release_breakpoint.
9877 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9878 (breakpoint_inserted_here): Ditto.
9879 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9880 Don't trust the breakpoint's shadow if it is not inserted.
9881 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9882 (delete_all_breakpoints): Adjust.
9883 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9884 use delete_breakpoint_1.
9885
9886 * mem-break.h (breakpoints_supported): Delete declaration.
9887 (set_gdb_breakpoint_at): Declare.
9888 (gdb_breakpoint_here): Declare.
9889 (delete_breakpoint_at): Delete.
9890 (delete_gdb_breakpoint_at): Declare.
9891
9892 * server.h (struct raw_breakpoint): Forward declare.
9893 (struct process_info): New field `raw_breakpoints'.
9894
9895 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9896 breakpoints.
9897
9898 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9899
9900 * linux-low.c (status_pending_p_callback): Fix comment.
9901 (linux_wait_for_event_1): Move most of the internal breakpoint
9902 handling from here...
9903 (linux_wait_1): ... to here.
9904 (count_events_callback): New.
9905 (select_singlestep_lwp_callback): New.
9906 (select_event_lwp_callback): New.
9907 (cancel_breakpoints_callback): New.
9908 (select_event_lwp): New.
9909 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9910 priority to all LWPs that have had events that should be reported
9911 to the client. Cancel breakpoints when about to reporting the
9912 event to the client, not while stopping lwps. No longer cancel
9913 finished single-steps here.
9914 (cancel_finished_single_step): Delete.
9915 (cancel_finished_single_steps): Delete.
9916
9917 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9918
9919 * mem-break.c (enum bkpt_type): New.
9920 (struct breakpoint): New field `type'.
9921 (set_breakpoint_at): Change return type to struct breakpoint
9922 pointer. Set type to `other_breakpoint' by default.
9923 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9924 in the breakpoint list.
9925 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9926 (reinsert_breakpoint): Rename to ...
9927 (reinsert_raw_breakpoint): ... this.
9928 (reinsert_breakpoints_at): Adjust.
9929 * mem-break.h (struct breakpoint): Declare.
9930 (set_breakpoint_at): Change return type to struct breakpoint
9931 pointer.
9932
9933 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9934
9935 * server.c (handle_query): Assign, not compare.
9936
9937 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9938
9939 Teach linux gdbserver to step-over-breakpoints.
9940
9941 * linux-low.c (can_hardware_single_step): New.
9942 (supports_breakpoints): New.
9943 (handle_extended_wait): If stopping threads, read the stop pc of
9944 the new cloned LWP.
9945 (get_pc): New.
9946 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9947 low target doesn't support retrieving the PC.
9948 (add_lwp): Set last_resume_kind to resume_continue.
9949 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9950 (linux_attach): Don't clear stop_expected. Set the lwp's
9951 last_resume_kind to resume_stop.
9952 (linux_detach_one_lwp): Don't check for removed breakpoints.
9953 (check_removed_breakpoint): Delete.
9954 (status_pending_p): Rename to ...
9955 (status_pending_p_callback): ... this. Don't check for removed
9956 breakpoints. Don't consider threads that are stopped from GDB's
9957 perspective.
9958 (linux_wait_for_lwp): Always read the stop_pc here.
9959 (cancel_breakpoint): New.
9960 (step_over_bkpt): New global.
9961 (linux_wait_for_event_1): Implement stepping over breakpoints.
9962 (gdb_wants_lwp_stopped): New.
9963 (gdb_wants_all_stopped): New.
9964 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9965 single-step traps here. Store the thread's last reported target
9966 wait status.
9967 (send_sigstop): Don't clear stop_expected. Always set it,
9968 instead.
9969 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9970 (cancel_finished_single_step): New.
9971 (cancel_finished_single_steps): New.
9972 (wait_for_sigstop): Don't cancel finished single-step traps here.
9973 (linux_resume_one_lwp): Don't check for removed breakpoints.
9974 Don't set `step' on non-hardware step archs.
9975 (linux_set_resume_request): Ignore resume_stop requests if already
9976 stopping or stopped. Set the lwp's last_resume_kind.
9977 (resume_status_pending_p): Don't check for removed breakpoints.
9978 (need_step_over_p): New.
9979 (start_step_over): New.
9980 (finish_step_over): New.
9981 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9982 requests. Clear the thread's last reported target waitstatus.
9983 Don't use the `suspended' flag. Don't consider pending breakpoints.
9984 (linux_resume): Start a step-over if necessary.
9985 (proceed_one_lwp): New.
9986 (proceed_all_lwps): New.
9987 (unstop_all_lwps): New.
9988 * linux-low.h (struct lwp_info): Rewrite comment for the
9989 `suspended' flag. Add the `stop_pc' field. Delete the
9990 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9991 Add `'last_resume_kind' and `need_step_over' fields.
9992 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9993 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9994 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9995 (set_raw_breakpoint_at): New.
9996 (set_breakpoint_at): Rewrite to use it.
9997 (reinsert_breakpoint_handler): Delete.
9998 (set_reinsert_breakpoint): New.
9999 (reinsert_breakpoint_by_bp): Delete.
10000 (delete_reinsert_breakpoints): New.
10001 (uninsert_breakpoint): Rewrite.
10002 (uninsert_breakpoints_at): New.
10003 (reinsert_breakpoint): Rewrite.
10004 (reinsert_breakpoints_at): New.
10005 (check_breakpoints): Rewrite.
10006 (breakpoint_here): New.
10007 (breakpoint_inserted_here): New.
10008 (check_mem_read): Adjust.
10009 * mem-break.h (breakpoints_supported, breakpoint_here)
10010 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10011 (reinsert_breakpoint_by_bp): Delete declaration.
10012 (delete_reinsert_breakpoints): Declare.
10013 (reinsert_breakpoint): Delete declaration.
10014 (reinsert_breakpoints_at): Declare.
10015 (uninsert_breakpoint): Delete declaration.
10016 (uninsert_breakpoints_at): Declare.
10017 (check_breakpoints): Adjust prototype.
10018 * server.h: Adjust include order.
10019 (struct thread_info): Declare here. Add a `last_status' field.
10020
10021 2010-03-23 Michael Snyder <msnyder@vmware.com>
10022
10023 * server.c (crc32): New function.
10024 (handle_query): Add handling for 'qCRC:' request.
10025
10026 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10027
10028 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10029 lwp had been stopped by a watchpoint.
10030
10031 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10032
10033 * server.h (internal_error): Declare.
10034 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10035 * utils.c (internal_error): New function.
10036
10037 2010-03-15 Andreas Schwab <schwab@redhat.com>
10038
10039 * configure.srv: Fix typo setting srv_regobj.
10040
10041 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10042
10043 * linux-low.c (fetch_register): Avoid passing a non string literal
10044 format to `error'.
10045 (usr_store_inferior_registers): Ditto.
10046
10047 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10048
10049 * linux-low.c (linux_write_memory): Bail out early if peeking
10050 memory failed.
10051
10052 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10053
10054 * linux-low.h (struct lwp_info): New fields
10055 `stopped_by_watchpoint' and `stopped_data_address'.
10056 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10057 here, and cache them in the lwp object.
10058 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10059 directly.
10060 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10061 field.
10062 (linux_stopped_by_watchpoint): Rewrite.
10063 (linux_stopped_data_address): Rewrite.
10064
10065 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10066
10067 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10068 switching the current inferior, not before.
10069
10070 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10071
10072 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10073 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10074 i386-linux.c and amd64-linux.c.
10075 (reg-i386.o): Removed.
10076 (reg-i386.c): Likewise.
10077 (reg-i386-linux.o): Likewise.
10078 (reg-i386-linux.c): Likewise.
10079 (reg-x86-64.o): Likewise.
10080 (reg-x86-64.c): Likewise.
10081 (reg-x86-64-linux.o): Likewise.
10082 (reg-x86-64-linux.c): Likewise.
10083 (i386.o): New.
10084 (i386.c): Likewise.
10085 (i386-linux.o): Likewise.
10086 (i386-linux.c): Likewise.
10087 (amd64.o): Likewise.
10088 (amd64.c): Likewise.
10089 (amd64-linux.o): Likewise.
10090 (amd64-linux.c): Likewise.
10091
10092 * configure.srv (srv_i386_regobj): New.
10093 (srv_i386_linux_regobj): Likewise.
10094 (srv_amd64_regobj): Likewise.
10095 (srv_amd64_linux_regobj): Likewise.
10096 (srv_i386_32bit_xmlfiles): Likewise.
10097 (srv_i386_64bit_xmlfiles): Likewise.
10098 (srv_i386_xmlfiles): Likewise.
10099 (srv_amd64_xmlfiles): Likewise.
10100 (srv_i386_linux_xmlfiles): Likewise.
10101 (srv_amd64_linux_xmlfiles): Likewise.
10102 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10103 srv_xmlfiles to $srv_i386_xmlfiles.
10104 (i[34567]86-*-mingw32ce*): Likewise.
10105 (i[34567]86-*-mingw*): Likewise.
10106 (i[34567]86-*-nto*): Likewise.
10107 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10108 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10109 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10110 (x86_64-*-linux*): Likewise.
10111
10112 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10113 (init_registers_amd64_linux): New.
10114 (x86_arch_setup): Replace init_registers_x86_64_linux with
10115 init_registers_amd64_linux.
10116
10117 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10118
10119 * configure.ac: Check for libdl. If it is not available link against
10120 static libthread_db.
10121 * configure: Regenerate.
10122
10123 2010-02-22 Pedro Alves <pedro@codesourcery.com>
10124
10125 PR9605
10126
10127 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10128 handing a read watchpoint.
10129 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10130
10131 2010-02-12 Doug Evans <dje@google.com>
10132
10133 * linux-low.c (linux_supports_tracefork_flag): Document.
10134 (linux_look_up_symbols): Add comment.
10135
10136 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10137
10138 * regcache.c (supply_register): Clear regcache if buf is NULL.
10139
10140 2010-02-02 Nicolas Roche <roche@sourceware.org>
10141 Joel Brobecker <brobecker@adacore.com>
10142
10143 * inferiors.c (find_inferior): Add function documentation.
10144 (unloaded_dll): Handle the case where the unloaded dll has not
10145 been previously registered in the dll list.
10146
10147 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10148
10149 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10150 (thumb2_breakpoint): New.
10151 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10152
10153 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10154
10155 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10156 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10157 breakpoints.
10158
10159 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10160
10161 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10162
10163 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10164
10165 * linux-s390-low.c (s390_collect_ptrace_register)
10166 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10167
10168 2010-01-21 Doug Evans <dje@google.com>
10169
10170 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10171 (PTRACE_ARG4_TYPE): New macro.
10172 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10173 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10174 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10175 (usr_store_inferior_registers): Ditto.
10176 (linux_read_memory, linux_write_memory): Ditto.
10177 (linux_test_for_tracefork): Ditto.
10178
10179 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10180 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10181
10182 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10183
10184 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10185 target.
10186
10187 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10188
10189 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10190 prototype to take a regcache. Adjust.
10191
10192 2010-01-20 Pedro Alves <pedro@codesourcery.com>
10193
10194 * regcache.h (struct thread_info): Forward declare.
10195 (struct regcache): New.
10196 (new_register_cache): Adjust prototype.
10197 (get_thread_regcache): Declare.
10198 (free_register_cache): Adjust prototype.
10199 (registers_to_string, registers_from_string): Ditto.
10200 (supply_register, supply_register_by_name, collect_register)
10201 (collect_register_as_string, collect_register_by_name): Ditto.
10202 * regcache.c (struct inferior_regcache_data): Delete.
10203 (get_regcache): Rename to ...
10204 (get_thread_regcache): ... this. Adjust. Switch inferior before
10205 fetching registers.
10206 (regcache_invalidate_one): Adjust.
10207 (regcache_invalidate): Fix prototype.
10208 (new_register_cache): Return the new register cache.
10209 (free_register_cache): Change prototype.
10210 (realloc_register_cache): Adjust.
10211 (registers_to_string): Change prototype to take a regcache. Adjust.
10212 (registers_from_string): Ditto.
10213 (register_data): Ditto.
10214 (supply_register): Ditto.
10215 (supply_register_by_name): Ditto.
10216 (collect_register): Ditto.
10217 (collect_register_as_string): Ditto.
10218 (collect_register_by_name): Ditto.
10219 * server.c (process_serial_event): Adjust.
10220 * linux-low.h (regset_fill_func, regset_store_func): Change
10221 prototype.
10222 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10223 Change prototype.
10224 * linux-low.c (get_stop_pc): Adjust.
10225 (check_removed_breakpoint): Adjust.
10226 (linux_wait_for_event): Adjust.
10227 (linux_resume_one_lwp): Adjust.
10228 (fetch_register): Add regcache parameter. Adjust.
10229 (usr_store_inferior_registers): Ditto.
10230 (regsets_fetch_inferior_registers): Ditto.
10231 (regsets_store_inferior_registers): Ditto.
10232 (linux_fetch_registers, linux_store_registers): Ditto.
10233 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10234 regcache. Adjust.
10235 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10236 Ditto.
10237 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10238 prototype to take a regcache.
10239 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10240 * remote-utils.c (convert_ascii_to_int, outreg)
10241 (prepare_resume_reply): Change prototype to take a regcache.
10242 Adjust.
10243 * target.h (struct target_ops) <fetch_registers, store_registers>:
10244 Change prototype to take a regcache.
10245 (fetch_inferior_registers, store_inferior_registers): Change
10246 prototype to take a regcache. Adjust.
10247 * proc-service.c (ps_lgetregs): Adjust.
10248 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10249 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10250 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10251 take a regcache. Adjust.
10252 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10253 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10254 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10255 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10256 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10257 (cris_cannot_fetch_register):
10258 (cris_breakpoint_at): Change prototype to take a regcache.
10259 Adjust.
10260 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10261 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10262 to take a regcache. Adjust.
10263 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10264 Adjust.
10265 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10266 take a regcache. Adjust.
10267 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10268 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10269 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10270 * linux-mips-low.c (mips_get_pc):
10271 (mips_set_pc): Change prototype to take a regcache. Adjust.
10272 (mips_reinsert_addr): Adjust.
10273 (mips_collect_register): Change prototype to take a regcache.
10274 Adjust.
10275 (mips_supply_register):
10276 (mips_collect_register_32bit, mips_supply_register_32bit)
10277 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10278 (mips_store_fpregset): Ditto.
10279 * linux-ppc-low.c (ppc_supply_ptrace_register)
10280 (ppc_supply_ptrace_register): Ditto.
10281 (parse_spufs_run): Adjust.
10282 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10283 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10284 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10285 take a regcache. Adjust.
10286 * linux-s390-low.c (s390_collect_ptrace_register)
10287 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10288 (s390_set_pc): Change prototype to take a regcache. Adjust.
10289 (s390_arch_setup): Adjust.
10290 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10291 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10292 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10293 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10294 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10295 regcache. Adjust.
10296 (sparc_breakpoint_at): Adjust.
10297 * linux-xtensa-low.c (xtensa_fill_gregset):
10298 (xtensa_store_gregset):
10299 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10300 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10301 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10302 prototype to take a regcache. Adjust.
10303 * win32-arm-low.c (arm_fetch_inferior_register)
10304 (arm_store_inferior_register): Change prototype to take a
10305 regcache. Adjust.
10306 * win32-i386-low.c (i386_fetch_inferior_register)
10307 (i386_store_inferior_register): Change prototype to take a
10308 regcache. Adjust.
10309 * win32-low.c (child_fetch_inferior_registers)
10310 (child_store_inferior_registers): Change prototype to take a
10311 regcache. Adjust.
10312 (win32_wait): Adjust.
10313 (win32_fetch_inferior_registers): Change prototype to take a
10314 regcache. Adjust.
10315 (win32_store_inferior_registers): Adjust.
10316 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10317 store_inferior_register>: Change prototype to take a regcache.
10318
10319 2010-01-20 Doug Evans <dje@google.com>
10320
10321 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10322 #ifdef.
10323 (linux_wait_for_event1, linux_init_signals): Ditto.
10324 (W_STOPCODE): Provide definition if missing.
10325
10326 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10327
10328 * linux-low.c (linux_core_of_thread): New.
10329 (compare_ints, show_process, list_threads): New.
10330 (linux_qxfer_osdata): Report threads and cores.
10331 (linux_target_op): Register linux_core_of_thread.
10332 * remote-utils.c (prepare_resume_reply): Report the core.
10333 (buffer_xml_printf): Support %d specifier.
10334 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10335 New.
10336 (handle_query): Handle qXfer:threads. Announce availability
10337 thereof.
10338 * target.h (struct target_ops): New field core_of_thread.
10339
10340 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10341
10342 * Makefile.in (clean): Remove new generated files.
10343 (reg-s390.o, reg-s390.c): Remove rules.
10344 (reg-s390x.o, reg-s390x.c): Likewise.
10345 (s390-linux32.o, s390-linux32.c): Add rules.
10346 (s390-linux64.o, s390-linux64.c): Likewise.
10347 (s390x-linux64.o, s390x-linux64.c): Likewise.
10348 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10349 * linux-s390-low.c: Include <elf.h>.
10350 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10351 (init_registers_s390): Remove prototype.
10352 (init_registers_s390x): Likewise.
10353 (init_registers_s390_linux32): Add prototype.
10354 (init_registers_s390_linux64): Likewise.
10355 (init_registers_s390x_linux64): Likewise.
10356 (s390_num_regs_3264): New define.
10357 (s390_regmap_3264): New global variable.
10358 (s390_cannot_fetch_register): Remove obsolete check.
10359 (s390_cannot_store_register): Likewise.
10360 (s390_collect_ptrace_register): Handle upper/lower register halves.
10361 (s390_supply_ptrace_register): Likewise.
10362 (s390_fill_gregset): Update to register number changes.
10363 (s390_get_hwcap): New routine.
10364 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10365 Install appropriate regmap and register set.
10366
10367 2010-01-01 Joel Brobecker <brobecker@adacore.com>
10368
10369 * server.c (gdbserver_version): Update copyright year to 2010.
10370 * gdbreplay.c (gdbreplay_version): Likewise.
10371
10372 2009-12-28 Doug Evans <dje@google.com>
10373
10374 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10375 elf/external.h. Include <elf.h> instead but only if necessary.
10376
10377 2009-12-28 Pedro Alves <pedro@codesourcery.com>
10378
10379 * linux-low.c (linux_remove_process): Remove `detaching'
10380 parameter. Don't release/detach from thread_db here.
10381 (linux_kill): Release/detach from thread_db here, ...
10382 (linux_detach): ... and here, before actually detaching.
10383 (linux_wait_1): ... and here, when a process exits.
10384 * thread-db.c (any_thread_of): New.
10385 (thread_db_free): Switch the current inferior to a thread of the
10386 passed in process.
10387
10388 2009-12-21 Doug Evans <dje@google.com>
10389
10390 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10391
10392 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10393 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10394 warning ifndef __NR_tkill. Move setting of errno there too.
10395 Delete unnecessary resetting of errno after syscall.
10396 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10397
10398 * configure.ac: Check for dladdr.
10399 * config.in: Regenerate.
10400 * configure: Regenerate.
10401 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10402 (try_thread_db_load): Update.
10403
10404 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10405
10406 2009-12-18 Doug Evans <dje@google.com>
10407
10408 * event-loop.c: Include unistd.h if it exists.
10409
10410 * linux-low.c (my_waitpid): Move definition away from being in
10411 between linux_tracefork_child/linux_test_for_tracefork.
10412
10413 * gdb_proc_service.h (psaddr_t): Fix type.
10414 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10415 signature to match glibc.
10416
10417 2009-12-16 Doug Evans <dje@google.com>
10418
10419 * linux-low.c (linux_read_memory): Fix argument to read.
10420
10421 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10422
10423 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10424 events, don't leave current_inferior pointing at null.
10425
10426 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10427
10428 * win32-low.c (LOG): Delete.
10429 (OUTMSG): Output to stderr.
10430 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10431 on compile time LOG macro.
10432 (win32_wait): Fix debug output.
10433
10434 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10435
10436 * win32-low.c (win32_add_one_solib): If the dll name is
10437 "ntdll.dll", prepend the system directory to the dll path.
10438
10439 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10440
10441 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10442
10443 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
10444 Vladimir Prus <vladimir@codesourcery.com>
10445
10446 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10447 * configure.ac: Check for __mcoldfire__ and set
10448 gdb_cv_m68k_is_coldfire.
10449 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10450 reg-cf.o and reg-m68k.o.
10451 * configure: Regenerated.
10452
10453 2009-11-16 Pedro Alves <pedro@codesourcery.com>
10454
10455 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10456 Pass it to thread_db_free.
10457 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10458 proper `detaching' argument to linux_remove_process.
10459 * linux-low.h (thread_db_free): Add `detaching' parameter.
10460 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10461 to thread_db_free.
10462 (thread_db_free): Add `detaching' parameter. Only
10463 call td_ta_clear_event if detaching from process.
10464
10465 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10466
10467 * thread-db.c (thread_db_free): Fix typo.
10468
10469 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10470
10471 PR gdb/10838
10472 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10473
10474 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10475
10476 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10477 with an i686 compiler.
10478 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10479 needed.
10480 * configure: Rebuilt.
10481
10482 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10483
10484 PR gdb/10783
10485
10486 * server.c (handle_search_memory_1): Correct read_addr initialization
10487 in loop for searching subsequent chunks.
10488
10489 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10490
10491 * configure.ac: New --with-libthread-db option.
10492 * thread-db.c: Allow direct dependence on libthread_db.
10493 (thread_db_free): Adjust.
10494 * config.in: Regenerate.
10495 * configure: Likewise.
10496
10497 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10498
10499 PR gdb/10757
10500 * thread-db.c (attach_thread): New function.
10501 (maybe_attach_thread): Return success/failure.
10502 (find_new_threads_callback): Adjust.
10503 (thread_db_find_new_threads): Loop until no new threads.
10504
10505 2009-10-13 Pedro Alves <pedro@codesourcery.com>
10506
10507 * proc-service.c (ps_lgetregs): Formatting.
10508
10509 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10510
10511 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10512 * configure.ac: Adjust.
10513 * linux-low.h (struct process_info_private): Move members to struct
10514 thread_db.
10515 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10516 * linux-low.c (linux_remove_process): Adjust.
10517 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10518 * server.c (handle_query): Move code ...
10519 (handle_monitor_command): ... here. New function.
10520 * target.h (struct target_ops): New member.
10521 * thread-db.c (struct thread_db): New.
10522 (libthread_db_search_path): New variable.
10523 (thread_db_create_event, thread_db_enable_reporting)
10524 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10525 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10526 (try_thread_db_load_1, dladdr_to_soname): New functions.
10527 (try_thread_db_load, thread_db_load_search): New functions.
10528 (thread_db_init): Search for libthread_db.
10529 (thread_db_free): New function.
10530 (thread_db_handle_monitor_command): Likewise.
10531 * config.in: Regenerate.
10532 * configure: Regenerate.
10533
10534 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10535
10536 * spu-low.c (spu_kill): Wait for inferior to terminate.
10537 Call clear_inferiors.
10538 (spu_detach): Call clear_inferiors.
10539
10540 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10541
10542 * aclocal.m4: Regenerate.
10543 * config.in: Likewise.
10544 * configure: Likewise.
10545
10546 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10547
10548 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10549 (parse_spufs_run): New function.
10550 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10551 (ppc_breakpoint_at): Handle SPU breakpoints.
10552
10553 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10554
10555 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10556 (SPUFS_MAGIC): Define.
10557 (spu_enumerate_spu_ids): New function.
10558 (linux_qxfer_spu): New function.
10559 (linux_target_ops): Install linux_qxfer_spu.
10560
10561 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10562
10563 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10564 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10565 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10566 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10567 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10568 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10569 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10570 (init_registers_powerpc_cell32l): Add prototype.
10571 (init_registers_powerpc_cell64l): Likewise.
10572 (ppc_arch_setup): Detect Cell/B.E. architecture.
10573
10574 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10575
10576 * Makefile.in (datarootdir): New variable.
10577
10578 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10579
10580 * linux-low.c (linux_write_memory): Update debugging output.
10581 * Makefile.in (clean): Add new descriptions.
10582 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10583 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10584 * configure.srv: Add new files for arm*-*-linux*.
10585 * linux-arm-low.c: Add new declarations.
10586 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10587 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10588 (HWCAP_VFPv3D16): New.
10589 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10590 instead of __IWMMXT__.
10591 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10592 (arm_arch_setup): New.
10593 (target_regsets): Remove #ifdef. Add VFP regset.
10594 (the_low_target): Use arm_arch_setup.
10595
10596 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10597
10598 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10599 the main thread again.
10600
10601 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10602
10603 Adding Neutrino gdbserver.
10604 * configure: Regenerated.
10605 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10606 * configure.srv (i[34567]86-*-nto*): New target.
10607 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10608 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10609 (nto_comctrl) [__QNX__]: New function.
10610 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10611
10612 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
10613
10614 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10615 srv_tgtobj.
10616
10617 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10618 Pedro Alves <pedro@codesourcery.com>
10619
10620 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10621 don't support CONTEXT_EXTENDED_REGISTERS.
10622 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10623 (the_low_target): Install them.
10624 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10625 failing with ERROR_PIPE_NOT_CONNECTED.
10626
10627 2009-06-30 Doug Evans <dje@google.com>
10628 Pierre Muller <muller@ics.u-strasbg.fr>
10629
10630 Add h/w watchpoint support to x86-linux, win32-i386.
10631 * Makefile.in (SFILES): Add i386-low.c
10632 (i386_low_h): Define.
10633 (i386-low.o): Add dependencies.
10634 (linux-x86-low.o): Add i386-low.h dependency.
10635 (win32-i386-low.o): Ditto.
10636 * i386-low.c: New file.
10637 * i386-low.h: New file.
10638 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10639 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10640 * linux-low.c (linux_add_process): Initialize arch_private.
10641 (linux_remove_process): Free arch_private.
10642 (add_lwp): Initialize arch_private.
10643 (delete_lwp): Free arch_private.
10644 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10645 provided.
10646 * linux-low.h (process_info_private): New member arch_private.
10647 (lwp_info): New member arch_private.
10648 (linux_target_ops): New members new_process, new_thread,
10649 prepare_to_resume.
10650 (ptid_of): New macro.
10651 * linux-x86-low.c: Include stddef.h, i386-low.h.
10652 (arch_process_info): New struct.
10653 (arch_lwp_info): New struct.
10654 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10655 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10656 (i386_dr_low_get_status): New function.
10657 (x86_insert_point, x86_remove_point): New functions.
10658 (x86_stopped_by_watchpoint): New function.
10659 (x86_stopped_data_address): New function.
10660 (x86_linux_new_process, x86_linux_new_thread): New functions.
10661 (x86_linux_prepare_to_resume): New function.
10662 (the_low_target): Add entries for insert_point, remove_point,
10663 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10664 prepare_to_resume.
10665 * server.c (debug_hw_points): New global.
10666 (monitor_show_help): Document set debug-hw-points.
10667 (handle_query): Process "set debug-hw-points".
10668 * server.h (debug_hw_points): Declare.
10669 (paddress): Declare.
10670 * utils.c (NUMCELLS, CELLSIZE): New macros.
10671 (get_sell, xsnprintf, paddress): New functions.
10672 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10673 remove_point, stopped_by_watchpoint, stopped_data_address.
10674 * win32-i386-low.c: Include i386-low.h.
10675 (debug_reg_state): Replaces dr.
10676 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10677 (i386_dr_low_get_status): New function.
10678 (i386_insert_point, i386_remove_point): New functions.
10679 (i386_stopped_by_watchpoint): New function.
10680 (i386_stopped_data_address): New function.
10681 (i386_initial_stuff): Update.
10682 (get_thread_context,set_thread_context,i386_thread_added): Update.
10683 (the_low_target): Add entries for insert_point,
10684 remove_point, stopped_by_watchpoint, stopped_data_address.
10685 * win32-low.c (win32_insert_watchpoint): New function.
10686 (win32_remove_watchpoint): New function.
10687 (win32_stopped_by_watchpoint): New function.
10688 (win32_stopped_data_address): New function.
10689 (win32_target_ops): Add entries for insert_watchpoint,
10690 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10691 * win32-low.h (win32_target_ops): New members insert_point,
10692 remove_point, stopped_by_watchpoint, stopped_data_address.
10693
10694 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10695
10696 * server.c (process_serial_event): Re-return unsupported, not
10697 error, if the type isn't recognized. Re-allow supporting only
10698 insert or remove packets. Also call require_running for
10699 breakpoints. Add missing break statement to default case. Tidy.
10700 * target.h (struct target_ops): Rename insert_watchpoint to
10701 insert_point, and remove_watchpoint to remove_point.
10702
10703 * linux-low.h (struct linux_target_ops): Likewise.
10704 * linux-low.c (linux_insert_watchpoint): Rename to ...
10705 (linux_insert_point): ... this. Adjust.
10706 (linux_remove_watchpoint): Rename to ...
10707 (linux_remove_point): ... this. Adjust.
10708 (linux_target_ops): Adjust.
10709 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10710 (cris_insert_point): ... this.
10711 (cris_remove_watchpoint): Rename to ...
10712 (cris_remove_point): ... this.
10713 (the_low_target): Adjust.
10714
10715 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10716
10717 * server.c (handle_v_kill): Pass signal_pid to
10718 kill_inferior if multi_process is zero.
10719
10720 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10721
10722 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10723 * target.h (target_ops): Comment for *_watchpoint to make it clear
10724 the functions can get types '0' and '1'.
10725
10726 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10727
10728 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10729 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10730 * regcache.c (get_regcache): Likewise.
10731 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10732 * win32-low.c (child_fetch_inferior_registers): Remove check for
10733 regno 0.
10734
10735 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10736 Pedro Alves <pedro@codesourcery.com>
10737
10738 * target.h (struct target_ops) <supports_multi_process>: New
10739 callback.
10740 (target_supports_multi_process): New.
10741 * server.c (handle_query): Even if GDB reports support, only
10742 enable multi-process if the target also supports it. Report
10743 multi-process support only if the target backend supports it.
10744 * linux-low.c (linux_supports_multi_process): New function.
10745 (linux_target_ops): Install it as target_supports_multi_process
10746 callback.
10747
10748 2009-05-24 Doug Evans <dje@google.com>
10749
10750 Global renaming of find_thread_pid to find_thread_ptid.
10751 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10752 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10753 All callers updated.
10754
10755 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10756 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10757 directly.
10758
10759 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10760 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10761 (linux_resume_one_lwp): Ditto.
10762
10763 2009-05-23 Doug Evans <dje@google.com>
10764
10765 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10766 from struct inferior_list_entry * to struct lwp_info *.
10767 All callers updated.
10768
10769 2009-05-13 Doug Evans <dje@google.com>
10770
10771 * linux-x86-low.c: Don't include assert.h.
10772 (x86_siginfo_fixup): Use fatal, not assert.
10773 (x86_arch_setup): Fix comment.
10774
10775 2009-05-12 Doug Evans <dje@google.com>
10776
10777 Biarch support for i386/amd64 gdbserver.
10778 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10779 Add linux-x86-low.c.
10780 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10781 (linux-x86-low.o): Add.
10782 * linux-x86-64-low.c: Delete.
10783 * linux-i386-low.c: Delete.
10784 * linux-x86-low.c: New file.
10785 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10786 linux-x86-low.o.
10787 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10788 linux-x86-low.o.
10789 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10790 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10791 (linux_child_pid_to_exec_file): New function.
10792 (elf_64_header_p, elf_64_file_p): New functions.
10793 (siginfo_fixup): New function.
10794 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10795 give target a chance to convert layout.
10796 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10797 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10798
10799 2009-05-07 Doug Evans <dje@google.com>
10800
10801 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10802 (regsets_store_inferior_registers): Ditto.
10803
10804 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10805
10806 PR server/10048
10807
10808 * linux-low.c (must_set_ptrace_flags): Delete.
10809 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10810 of the global.
10811 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10812 `lwp->must_set_ptrace_flags' instead.
10813 (linux_wait_for_event_1): Set ptrace options here.
10814 (linux_wait_1): ... not here.
10815
10816 2009-04-30 Doug Evans <dje@google.com>
10817
10818 * inferiors.c (started_inferior_callback): New function.
10819 (attached_inferior_callback): New function.
10820 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10821 * server.c (print_started_pid, print_attached_pid): New functions.
10822 (detach_or_kill_for_exit): New function.
10823 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10824 * server.h (have_started_inferiors_p): Declare.
10825 (have_attached_inferiors_p): Declare.
10826
10827 * inferiors.c (remove_process): Fix memory leak, free process.
10828 * linux-low.c (linux_remove_process): New function.
10829 (linux_kill): Call it instead of remove_process.
10830 (linux_detach, linux_wait_1): Ditto.
10831
10832 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10833
10834 * configure.srv: Add x86 Windows CE target.
10835
10836 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10837
10838 * inferiors.c (get_thread_process): Make global.
10839 * server.h (get_thread_process): Add prototype.
10840 * thread-db.c (find_one_thread): Use get_thread_process
10841 instead of current_process.
10842 (thread_db_get_tls_address): Do not crash if called when
10843 thread layer is not yet initialized.
10844
10845 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10846
10847 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10848 * spu-low.c (current_tid): Rename to ...
10849 (current_ptid): ... this.
10850 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10851 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10852 ptid_get_lwp (current_ptid) instead of current_tid.
10853 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10854 instead of current_tid. Use find_process_pid to verify pid
10855 argument is valid. Pass proper argument to remove_process.
10856 (spu_thread_alive): Compare current_ptid instead of current_tid.
10857 (spu_resume): Likewise.
10858
10859 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10860
10861 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10862 variable.
10863
10864 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10865
10866 Implement the multiprocess extensions, and add linux multiprocess
10867 support.
10868
10869 * server.h (ULONGEST): Declare.
10870 (struct ptid, ptid_t): New.
10871 (minus_one_ptid, null_ptid): Declare.
10872 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10873 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10874 (struct inferior_list_entry): Change `id' type from unsigned from
10875 to ptid_t.
10876 (struct sym_cache, struct breakpoint, struct
10877 process_info_private): Forward declare.
10878 (struct process_info): Declare.
10879 (current_process): Declare.
10880 (all_processes): Declare.
10881 (initialize_inferiors): Declare.
10882 (add_thread): Adjust to use ptid_t.
10883 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10884 (add_process, remove_process, find_thread_pid): Declare.
10885 (find_inferior_id): Adjust to use ptid_t.
10886 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10887 (multi_process): Declare.
10888 (push_event): Adjust to use ptid_t.
10889 (read_ptid, write_ptid): Declare.
10890 (prepare_resume_reply): Adjust to use ptid_t.
10891 (clear_symbol_cache): Declare.
10892 * inferiors.c (all_processes): New.
10893 (null_ptid, minus_one_ptid): New.
10894 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10895 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10896 (add_thread): Change unsigned long to ptid. Remove gdb_id
10897 parameter. Adjust.
10898 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10899 (gdb_id_to_thread): Rename to ...
10900 (find_thread_pid): ... this. Change unsigned long to ptid.
10901 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10902 (loaded_dll, pull_pid_from_list): Adjust.
10903 (add_process, remove_process, find_process_pid)
10904 (get_thread_process, current_process, initialize_inferiors): New.
10905 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10906 (struct target_waitstatus) <related_pid>: Ditto.
10907 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10908 return type to int.
10909 (struct target_ops) <join>: Add `pid' argument.
10910 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10911 (struct target_ops) <wait>: Add `ptid' field. Change return type
10912 to ptid.
10913 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10914 (mywait): Add `ptid' argument. Change return type to ptid_t.
10915 (target_pid_to_str): Declare.
10916 * target.c (set_desired_inferior): Adjust to use ptids.
10917 (mywait): Add new `ptid' argument. Adjust.
10918 (target_pid_to_str): New.
10919 * mem-break.h (free_all_breakpoints): Declare.
10920 * mem-break.c (breakpoints): Delelete.
10921 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10922 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10923 to use per-process breakpoint list.
10924 (free_all_breakpoints): New.
10925 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10926 (symbol_cache, all_symbols_looked_up): Delete.
10927 (hexchars): New.
10928 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10929 read_ptid): New.
10930 (prepare_resume_reply): Change ptid argument's type from unsigned
10931 long to ptid_t. Adjust. Implement W;process and X;process.
10932 (free_sym_cache, clear_symbol_cache): New.
10933 (look_up_one_symbol): Adjust to per-process symbol cache. *
10934 * server.c (cont_thread, general_thread, step_thread): Change type
10935 to ptid_t.
10936 (attached): Delete.
10937 (multi_process): New.
10938 (last_ptid): Change type to ptid_t.
10939 (struct vstop_notif) <ptid>: Change type to ptid_t.
10940 (queue_stop_reply, push_event): Change `ptid' argument's type to
10941 ptid_t.
10942 (discard_queued_stop_replies): Add `pid' argument.
10943 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10944 changes. Don't reference the `attached' global.
10945 (attach_inferior): Adjust to mywait interface changes.
10946 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10947 features. Handle and report "multiprocess+". Handle
10948 "qAttached:PID".
10949 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10950 changes.
10951 (handle_v_kill): New.
10952 (handle_v_stopped): Adjust to use target_pid_to_str.
10953 (handle_v_requests): Allow multiple attaches and runs when
10954 multiprocess extensions are in effect. Handle "vKill".
10955 (myresume): Adjust to use ptids.
10956 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10957 (handle_status): Adjust to discard_queued_stop_replies interface
10958 change.
10959 (first_thread_of, kill_inferior_callback)
10960 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10961 (main): Call initialize_inferiors. Adjust to use ptids, killing
10962 and detaching from all inferiors. Handle multiprocess packet
10963 variants.
10964 * linux-low.h: Include gdb_proc_service.h.
10965 (struct process_info_private): New.
10966 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10967 <lwpid_of>: Use ptid_get_lwp.
10968 (get_lwp_thread): Adjust.
10969 (struct lwp_info): Add `dead' member.
10970 (find_lwp_pid): Declare.
10971 * linux-low.c (thread_db_active): Delete.
10972 (new_inferior): Adjust comment.
10973 (inferior_pid): Delete.
10974 (linux_add_process): New.
10975 (handle_extended_wait): Adjust.
10976 (add_lwp): Change unsigned long to ptid.
10977 (linux_create_inferior): Add process to processes table. Adjust
10978 to use ptids. Don't set new_inferior here.
10979 (linux_attach_lwp): Rename to ...
10980 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10981 it. Adjust to use ptids.
10982 (linux_attach_lwp): New.
10983 (linux_attach): Add process to processes table. Don't set
10984 new_inferior here.
10985 (struct counter): New.
10986 (second_thread_of_pid_p, last_thread_of_process_p): New.
10987 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10988 multiple processes.
10989 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10990 processes. Remove process from process table.
10991 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10992 to multiple processes.
10993 (any_thread_of): New.
10994 (linux_detach): Add `pid' argument, and handle it. Remove process
10995 from processes table.
10996 (linux_join): Add `pid' argument. Handle it.
10997 (linux_thread_alive): Change unsighed long argument to ptid_t.
10998 Consider dead lwps as not being alive.
10999 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11000 threads we're not interested in.
11001 (same_lwp, find_lwp_pid): New.
11002 (linux_wait_for_lwp): Change `pid' argument's type from int to
11003 ptid_t. Adjust.
11004 (linux_wait_for_event): Rename to ...
11005 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11006 from int to ptid_t. Adjust.
11007 (linux_wait_for_event): New.
11008 (linux_wait_1): Add `ptid' argument. Change return type to
11009 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11010 that exit from the process table.
11011 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11012 Adjust.
11013 (mark_lwp_dead): New.
11014 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11015 stopping all threads, mark its main lwp as dead.
11016 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11017 ptids.
11018 (fetch_register, usr_store_inferior_registers)
11019 (regsets_fetch_inferior_registers)
11020 (regsets_store_inferior_registers, linux_read_memory)
11021 (linux_write_memory): Inline `inferior_pid'.
11022 (linux_look_up_symbols): Adjust to use per-process
11023 `thread_db_active'.
11024 (linux_request_interrupt): Adjust to use ptids.
11025 (linux_read_auxv): Inline `inferior_pid'.
11026 (initialize_low): Don't reference thread_db_active.
11027 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11028 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11029 (ps_getpid): Return the pid of the current inferior.
11030 * thread-db.c (proc_handle, thread_agent): Delete.
11031 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11032 per-process data.
11033 (find_one_thread): Change argument type to ptid_t. Adjust to
11034 per-process data.
11035 (maybe_attach_thread): Adjust to per-process data and ptids.
11036 (thread_db_find_new_threads): Ditto.
11037 (thread_db_init): Ditto.
11038 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11039 processes table. Adjust to use ptids.
11040 (spu_kill, spu_detach): Adjust interface. Remove process from
11041 processes table.
11042 (spu_join, spu_thread_alive): Adjust interface.
11043 (spu_wait): Adjust interface. Remove process from processes
11044 table. Adjust to use ptids.
11045 * win32-low.c (current_inferior_tid): Delete.
11046 (current_inferior_ptid): New.
11047 (debug_event_ptid): New.
11048 (thread_rec): Take a ptid. Adjust.
11049 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11050 (child_delete_thread): Ditto.
11051 (do_initial_child_stuff): Add `attached' argument. Add process to
11052 processes table.
11053 (child_fetch_inferior_registers, child_store_inferior_registers):
11054 Adjust.
11055 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11056 (win32_attach): Pass 1 to do_initial_child_stuff.
11057 (win32_kill): Adjust interface. Remove process from processes
11058 table.
11059 (win32_detach): Ditto.
11060 (win32_join): Adjust interface.
11061 (win32_thread_alive): Take a ptid.
11062 (win32_resume): Adjust to use ptids.
11063 (get_child_debug_event): Ditto.
11064 (win32_wait): Adjust interface. Remove exiting process from
11065 processes table.
11066
11067 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11068
11069 Non-stop mode support.
11070
11071 * server.h (non_stop): Declare.
11072 (gdb_client_data, handler_func): Declare.
11073 (delete_file_handler, add_file_handler, start_event_loop):
11074 Declare.
11075 (handle_serial_event, handle_target_event, push_event)
11076 (putpkt_notif): Declare.
11077 * target.h (enum resume_kind): New.
11078 (struct thread_resume): Replace `step' field by `kind' field.
11079 (TARGET_WNOHANG): Define.
11080 (struct target_ops) <wait>: Add `options' argument.
11081 <supports_non_stop, async, start_non_stop>: New fields.
11082 (target_supports_non_stop, target_async): New.
11083 (start_non_stop): Declare.
11084 (mywait): Add `options' argument.
11085 * target.c (mywait): Add `options' argument. Print child exit
11086 notifications here.
11087 (start_non_stop): New.
11088 * server.c (non_stop, own_buf, mem_buf): New globals.
11089 (struct vstop_notif): New.
11090 (notif_queue): New global.
11091 (queue_stop_reply, push_event, discard_queued_stop_replies)
11092 (send_next_stop_reply): New.
11093 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11094 interface changes.
11095 (attach_inferior): In non-stop mode, don't wait for the target
11096 here.
11097 (handle_general_set): Handle QNonStop.
11098 (handle_query): When handling qC, return the current general
11099 thread, instead of the first thread of the list.
11100 (handle_query): If the backend supports non-stop mode, include
11101 QNonStop+ in the qSupported query response.
11102 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11103 and non-stop mode.
11104 (handle_v_attach, handle_v_run): Handle non-stop mode.
11105 (handle_v_stopped): New.
11106 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11107 (myresume): Adjust to use resume_kind. Handle non-stop.
11108 (queue_stop_reply_callback): New.
11109 (handle_status): Handle non-stop mode.
11110 (main): Clear non_stop flag on reconnection. Use the event-loop.
11111 Refactor serial protocol handling from here ...
11112 (process_serial_event): ... to this new function. When GDB
11113 selects any thread, select one here. In non-stop mode, wait until
11114 GDB acks all pending events before exiting.
11115 (handle_serial_event, handle_target_event): New.
11116 * remote-utils.c (remote_open): Install remote_desc in the event
11117 loop.
11118 (remote_close): Remove remote_desc from the event loop.
11119 (putpkt_binary): Rename to...
11120 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11121 (putpkt_binary): New as wrapper around putpkt_binary_1.
11122 (putpkt_notif): New.
11123 (prepare_resume_reply): In non-stop mode, don't change the
11124 general_thread.
11125 * event-loop.c: New.
11126 * Makefile.in (OBJ): Add event-loop.o.
11127 (event-loop.o): New rule.
11128
11129 * linux-low.h (pid_of): Moved here.
11130 (lwpid_of): New.
11131 (get_lwp_thread): Use lwpid_of.
11132 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11133 * linux-low.c (pid_of): Delete.
11134 (inferior_pid): Use lwpid_of.
11135 (linux_event_pipe): New.
11136 (target_is_async_p): New.
11137 (delete_lwp): New.
11138 (handle_extended_wait): Use lwpid_of.
11139 (add_lwp): Don't set lwpid field.
11140 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11141 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11142 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11143 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11144 first. Adjust to linux_wait_for_event interface changes. Use
11145 lwpid_of.
11146 (linux_detach): Don't delete the main lwp here.
11147 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11148 (status_pending_p): Don't consider explicitly suspended lwps.
11149 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11150 pointer. Add OPTIONS argument. Change return type to int. Use
11151 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11152 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11153 pointer. Add status pointer argument. Return a pid instead of a
11154 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11155 changes. In non-stop mode, don't switch to a random thread.
11156 (linux_wait): Rename to...
11157 (linux_wait_1): ... this. Add target_options argument, and handle
11158 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11159 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11160 clean exit and signal exit code. Don't stop all threads in
11161 non-stop mode. In all-stop mode, only stop all threads when
11162 reporting a stop to GDB. Handle explicit thread stop requests.
11163 (async_file_flush, async_file_mark): New.
11164 (linux_wait): New.
11165 (send_sigstop): Use lwpid_of.
11166 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11167 interface changes. In non-stop mode, don't switch to a random
11168 thread.
11169 (linux_resume_one_lwp): Use lwpid_of.
11170 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11171 (linux_resume_one_thread): ... this. Handle resume_stop. In
11172 non-stop mode, don't look for pending flag in all threads.
11173 (resume_status_pending_p): Don't consider explicitly suspended
11174 threads.
11175 (my_waitpid): Reimplement. Emulate __WALL.
11176 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11177 Use lwpid_of.
11178 (sigchld_handler, linux_supports_non_stop, linux_async)
11179 (linux_start_non_stop): New.
11180 (linux_target_ops): Register linux_supports_non_stop, linux_async
11181 and linux_start_non_stop.
11182 (initialize_low): Install SIGCHLD handler.
11183 * thread-db.c (thread_db_create_event, find_one_thread)
11184 (thread_db_get_tls_address): Use lwpid_of.
11185 * win32-low.c (win32_detach): Adjust to use resume_kind.
11186 (win32_wait): Add `options' argument.
11187 * spu-low.c (spu_resume): Adjust to use resume_kind.
11188 (spu_wait): Add `options' argument.
11189
11190 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11191
11192 Decouple target code from remote protocol.
11193
11194 * target.h (enum target_waitkind): New.
11195 (struct target_waitstatus): New.
11196 (struct target_ops) <wait>: Return an unsigned long. Take a
11197 target_waitstatus pointer instead of a char pointer.
11198 (mywait): Likewise.
11199 * target.c (mywait): Change prototype to return an unsigned long.
11200 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11201 * server.h (thread_from_wait, old_thread_from_wait): Delete
11202 declarations.
11203 (prepare_resume_reply): Change prototype to take a
11204 target_waitstatus.
11205 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11206 (last_status, last_ptid): New.
11207 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11208 pid instead of a signal.
11209 (attach_inferior): Remove "status" and "signal" parameters.
11210 Adjust.
11211 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11212 not as an address.
11213 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11214 (handle_v_requests, myresume): Remove "status" and "signal"
11215 parameters. Adjust.
11216 (handle_status): New.
11217 (main): Delete local `status'. Adjust.
11218 * remote-utils.c: Include target.h.
11219 (prepare_resume_reply): Change prototype to take a
11220 target_waitstatus. Adjust.
11221
11222 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11223 interface.
11224 * spu-low.c (spu_wait): Adjust.
11225 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11226 Delete.
11227 (win32_wait): Adjust.
11228
11229 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11230
11231 * target.h (struct thread_resume): Delete leave_stopped member.
11232 (struct target_ops): Add a `n' argument to the `resume' callback.
11233 * server.c (start_inferior): Adjust.
11234 (handle_v_cont, myresume): Adjust.
11235 * linux-low.c (check_removed_breakpoint): Adjust to resume
11236 interface change, and to removed leave_stopped field.
11237 (resume_ptr): Delete.
11238 (struct thread_resume_array): New.
11239 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11240 resume interface change.
11241 (linux_continue_one_thread, linux_queue_one_thread)
11242 (resume_status_pending_p): Check if the resume field is NULL
11243 instead of checking the leave_stopped member.
11244 (linux_resume): Adjust to the target resume interface change.
11245 * spu-low.c (spu_resume): Adjust to the target resume interface
11246 change.
11247 * win32-low.c (win32_detach, win32_resume): Ditto.
11248
11249 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11250
11251 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11252 flag.
11253 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11254 pending.
11255 (linux_continue_one_thread): Only preserve the stepping flag if
11256 there's a pending breakpoint.
11257
11258 2009-03-31 Pedro Alves <pedro@codesourcery.com>
11259
11260 * server.c (main): After the inferior having exited, call
11261 remote_close before exiting gdbserver.
11262
11263 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11264
11265 Fix size of FPSCR in Power 7 processors.
11266 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11267 (PPC_FEATURE_HAS_DFP): New #define.
11268 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11269 size of the FPSCR.
11270
11271 2009-03-23 Pedro Alves <pedro@codesourcery.com>
11272
11273 * server.c (handle_query) Whitespace and formatting.
11274
11275 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11276
11277 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11278 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11279 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11280 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11281 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11282 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11283 Makefile.in, configure.ac: Fix whitespace throughout.
11284 * configure: Regenerate.
11285
11286 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11287
11288 * inferiors.c (find_inferior): Make it safe for the callback
11289 function to delete the currently iterated inferior.
11290
11291 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11292
11293 * Makefile.in (linuw_low_h): Move higher.
11294 (thread-db.o): Depend on $(linux_low_h).
11295
11296 2009-03-17 Pedro Alves <pedro@codesourcery.com>
11297
11298 Rename "process" to "lwp" throughout.
11299
11300 * linux-low.c (all_processes): Rename to...
11301 (all_lwps): ... this.
11302 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11303 (add_process): Rename to ...
11304 (add_lwp): ... this. Adjust.
11305 (linux_create_inferior): Adjust.
11306 (linux_attach_lwp): Adjust.
11307 (linux_attach): Adjust.
11308 (linux_kill_one_process): Rename to ...
11309 (linux_kill_one_lwp): ... this. Adjust.
11310 (linux_kill): Adjust.
11311 (linux_detach_one_process): Rename to ...
11312 (linux_detach_one_lwp): ... this. Adjust.
11313 (linux_detach): Adjust.
11314 (check_removed_breakpoint): Adjust.
11315 (status_pending_p): Adjust.
11316 (linux_wait_for_process): Rename to ...
11317 (linux_wait_for_lwp): ... this. Adjust.
11318 (linux_wait_for_event): Adjust.
11319 (send_sigstop): Adjust.
11320 (wait_for_sigstop): Adjust.
11321 (stop_all_processes): Rename to ...
11322 (stop_all_lwps): ... this.
11323 (linux_resume_one_process): Rename to ...
11324 (linux_resume_one_lwp): ... this. Adjust.
11325 (linux_set_resume_request, linux_continue_one_thread)
11326 (linux_queue_one_thread, resume_status_pending_p)
11327 (usr_store_inferior_registers, regsets_store_inferior_registers)
11328 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11329 Adjust.
11330 * linux-low.h (get_process): Rename to ...
11331 (get_lwp): ... this. Adjust.
11332 (get_thread_process): Rename to ...
11333 (get_thread_lwp): ... this. Adjust.
11334 (get_process_thread): Rename to ...
11335 (get_lwp_thread): ... this. Adjust.
11336 (struct process_info): Rename to ...
11337 (struct lwp_info): ... this.
11338 (all_processes): Rename to ...
11339 (all_lwps): ... this.
11340 * proc-service.c (ps_lgetregs): Adjust.
11341 * thread-db.c (thread_db_create_event, find_one_thread)
11342 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11343
11344 2009-03-14 Pedro Alves <pedro@codesourcery.com>
11345
11346 * server.c (handle_query): Handle "qAttached".
11347
11348 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11349
11350 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11351 GPLv3, update license URL.
11352
11353 2009-03-01 Doug Evans <dje@google.com>
11354
11355 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11356 (server_h): Add gdb_signals.h.
11357 (signals.o): Update.
11358 * server.h (target_signal_from_host,target_signal_to_host_p)
11359 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11360
11361 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11362
11363 * remote-utils.c (getpkt): Also generate remote-debug
11364 information if noack_mode is set.
11365
11366 2009-02-06 Pedro Alves <pedro@codesourcery.com>
11367
11368 * server.c (handle_query): Report qXfer:siginfo:read and
11369 qXfer:siginfo:write as supported and handle them.
11370 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11371 * linux-low.c (linux_xfer_siginfo): New.
11372 (linux_target_ops): Set it.
11373
11374 2009-01-26 Pedro Alves <pedro@codesourcery.com>
11375
11376 * server.c (gdbserver_usage): Mention --remote-debug.
11377 (main): Accept '--remote-debug' switch.
11378
11379 2009-01-18 Doug Evans <dje@google.com>
11380
11381 * regcache.c (new_register_cache): No need to check result of xcalloc.
11382 * server.c (handle_search_memory): Back out calls to xmalloc,
11383 result is checked and error is returned to user upon failure.
11384 (handle_query): Ditto. Add more checks for result of malloc.
11385 (handle_v_cont): Check result of malloc, report error back to
11386 user upon failure.
11387 (handle_v_run): Ditto. Call freeargv.
11388 * server.h (freeargv): Declare.
11389 * utils.c (freeargv): New fn.
11390
11391 2009-01-15 Doug Evans <dje@google.com>
11392
11393 * gdbreplay.c (perror_with_name): Make arg const char *.
11394 * server.h (target_signal_to_name): Make return type const char *.
11395 * thread-db.c (thread_db_err_str): Make return type const char *.
11396 * utils.c (perror_with_name): Make arg const char *.
11397
11398 2009-01-14 Pedro Alves <pedro@codesourcery.com>
11399
11400 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11401 when handling a EXIT_PROCESS_DEBUG_EVENT.
11402
11403 2009-01-06 Joel Brobecker <brobecker@adacore.com>
11404
11405 * gdbreplay.c (gdbreplay_version): Update copyright year.
11406 * server.c (gdbserver_version): Likewise.
11407
11408 2009-01-05 Doug Evans <dje@google.com>
11409
11410 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11411 (handle_extended_wait): Improve comment.
11412
11413 2008-12-13 Doug Evans <dje@google.com>
11414
11415 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11416 * server.h (ATTR_MALLOC): New macro.
11417 (xmalloc,xcalloc,xstrdup): Declare.
11418 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11419 * inferiors.c: Ditto.
11420 * linux-low.c: Ditto.
11421 * mem-break.c: Ditto.
11422 * regcache.c: Ditto.
11423 * remote-utils.c: Ditto.
11424 * server.c: Ditto.
11425 * target.c: Ditto.
11426 * win32-low.c: Ditto.
11427
11428 2008-12-12 Doug Evans <dje@google.com>
11429
11430 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11431 in debugging printf.
11432
11433 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11434
11435 2008-12-09 Doug Evans <dje@google.com>
11436
11437 * linux-low.h (struct process_info): Delete member tid, unused.
11438 * thread-db.c (find_one_thread): Update.
11439 (maybe_attach_thread): Update.
11440
11441 2008-12-02 Pedro Alves <pedro@codesourcery.com>
11442
11443 * target.h (struct target_ops): Add qxfer_osdata member.
11444 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11445 and dirent.h.
11446 (linux_qxfer_osdata): New functions.
11447 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11448 callback.
11449 * server.c (handle_query): Handle "qXfer:osdata:read:".
11450 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11451 (buffer_xml_printf): New functions.
11452 * server.h (struct buffer): New.
11453 (buffer_grow_str, buffer_grow_str0): New macros.
11454 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11455 (buffer_xml_printf): Declare.
11456
11457 2008-11-24 Doug Evans <dje@google.com>
11458
11459 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11460
11461 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11462
11463 * server.c (handle_v_run): Always use the supplied argument list.
11464
11465 2008-11-19 Bob Wilson <bob.wilson@acm.org>
11466
11467 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11468 (xtensa_regmap_table): Add entry for scompare1.
11469
11470 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11471
11472 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11473 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11474 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11475 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11476 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11477 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11478 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11479 XML target descriptions.
11480 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11481 when inferior is running on an ISA 2.05 or later processor. Add
11482 special case to return offset for full 64-bit slot of FPSCR when
11483 in 32-bits.
11484
11485 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11486
11487 * Makefile.in (SFILES, clean): Added sparc64 files.
11488 (reg-sparc64.o, reg-sparc64.c): New.
11489 * configure.srv (sparc*-*-linux*): New configuration.
11490 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11491 syscall arguments for SPARC.
11492 (regsets_store_inferior_registers): Likewise.
11493 * linux-sparc-low.c: New file.
11494
11495 2008-10-21 Doug Evans <dje@google.com>
11496
11497 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11498 (READLINE_DIR,READLINE_DEP): Delete.
11499 (INTERNAL_CFLAGS): Update.
11500 (LINTFLAGS): Update.
11501
11502 2008-10-10 Pedro Alves <pedro@codesourcery.com>
11503
11504 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11505 whole argv from the last run, not just argv[0].
11506
11507 2008-09-08 Pedro Alves <pedro@codesourcery.com>
11508
11509 * regcache.c (new_register_cache): Return NULL if the register
11510 cache size isn't known yet.
11511 (free_register_cache): Avoid dereferencing a NULL regcache.
11512
11513 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11514
11515 * configure.srv: Merge MIPS and MIPS64.
11516
11517 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11518
11519 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11520
11521 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
11522
11523 * Makefile.in: Add required vsx dependencies.
11524
11525 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11526 Declare init_registers_powerpc_vsx32l.
11527 Declare init_registers_powerpc_vsx64l.
11528 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11529 (ppc_arch_setup): Check for VSX in hwcap.
11530 (ppc_fill_vsxregset): New function.
11531 (ppc_store_vsxregset): New function.
11532 Add new VSX entry in regset_info target_regsets.
11533
11534 * configure.srv: Add new VSX dependencies.
11535
11536 2008-08-12 Pedro Alves <pedro@codesourcery.com>
11537
11538 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11539 (remote_open): Set or clear transport_is_reliable.
11540 (putpkt_binary): Don't expect acks in noack mode.
11541 (getpkt): Don't send ack/nac in noack mode.
11542 * server.c (handle_general_set): Handle QStartNoAckMode.
11543 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11544 qSupported.
11545 (main): Reset noack_mode on every connection.
11546 * server.h (noack_mode): Declare.
11547
11548 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11549
11550 * Makefile.in (GDBREPLAY_OBS): New variable.
11551 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11552
11553 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11554 Daniel Jacobowitz <dan@codesourcery.com>
11555
11556 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11557 (usr_store_inferior_registers): Likewise.
11558 (regsets_store_inferior_registers): Likewise.
11559
11560 2008-07-31 Rolf Jansen <rj@surtec.com>
11561 Pedro Alves <pedro@codesourcery.com>
11562
11563 * configure.ac: Check for memmem declaration.
11564 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11565 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11566 (disable_packet_qfThreadInfo): Unconditionally compile.
11567 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11568 * configure, config.in: Regenerate.
11569
11570 2008-07-28 Doug Kwan <dougkwan@google.com>
11571
11572 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11573 (linux_write_memory): Remove declaration of errno.
11574
11575 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11576
11577 * linux-low.c (handle_extended_wait): Do not use "status"
11578 variable uninitialized.
11579
11580 2008-07-07 Pedro Alves <pedro@codesourcery.com>
11581
11582 * server.c (handle_v_attach): Inhibit reporting dll changes.
11583
11584 2008-06-27 Pedro Alves <pedro@codesourcery.com>
11585
11586 * remote-utils.c (prepare_resume_reply): If requested, don't
11587 output "thread:TID" in the T stop reply.
11588
11589 * server.c (disable_packet_vCont, disable_packet_Tthread)
11590 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11591 (handle_query): If requested, disable support for qC, qfThreadInfo
11592 and qsThreadInfo.
11593 (handle_v_requests): If requested, disable support for vCont.
11594 (gdbserver_show_disableable): New.
11595 (main): Handle --disable-packet and --disable-packet=LIST.
11596
11597 * server.h (disable_packet_vCont, disable_packet_Tthread)
11598 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11599
11600 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11601
11602 * server.c (gdbserver_usage): Mention --version.
11603
11604 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11605
11606 * Makefile.in (gdbreplay.o): New rule.
11607
11608 2008-06-06 Joseph Myers <joseph@codesourcery.com>
11609
11610 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11611 message, not gdbserver.
11612
11613 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
11614 Nathan Sidwell <nathan@codesourcery.com>
11615 Joseph Myers <joseph@codesourcery.com>
11616
11617 * acinclude.m4: Include ../../config/acx.m4.
11618 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11619 * configure, config.in: Regenerate.
11620 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11621 * server.c (gdbserver_version): Print PKGVERSION.
11622 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11623 (main): Adjust gdbserver_usage calls.
11624 * gdbreplay.c (version, host_name): Add declarations.
11625 (gdbreplay_version, gdbreplay_usage): New.
11626 (main): Accept --version and --help options.
11627
11628 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11629
11630 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11631 (arm_breakpoint_at): Handle Thumb.
11632 (the_low_target): Add comment.
11633
11634 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11635
11636 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11637
11638 2008-05-09 Doug Evans <dje@google.com>
11639
11640 * server.h (decode_search_memory_packet): Declare.
11641 * remote-utils.c (decode_search_memory_packet): New fn.
11642 * server.c (handle_search_memory_1): New fn.
11643 (handle_search_memory): New fn.
11644 (handle_query): Process qSearch:memory packets.
11645
11646 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11647
11648 * regcache.c (registers_length): Remove.
11649 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11650 full register packet.
11651 * regcache.h (registers_length): Remove prototype.
11652 * server.h (PBUFSIZ): Define to 16384.
11653
11654 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11655
11656 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11657 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11658 powerpc-64l.o, and powerpc-altivec64l.o.
11659 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11660 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11661 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11662 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11663 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11664 to srv_xmlfiles.
11665
11666 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11667 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11668 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11669 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11670 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11671 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11672 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11673 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11674 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11675 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11676 (clean): Update.
11677
11678 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11679 (init_registers_powerpc_32l): ... this new prototype.
11680 (init_registers_powerpc_32): Remove, replace by ...
11681 (init_registers_powerpc_altivec32l): ... this new prototype.
11682 (init_registers_powerpc_e500): Remove, replace by ...
11683 (init_registers_powerpc_e500l): ... this new prototype.
11684 (init_registers_ppc64): Remove, replace by ...
11685 (init_registers_powerpc_64l): ... this new prototype.
11686 (init_registers_powerpc_64): Remove, replace by ...
11687 (init_registers_powerpc_altivec64l): ... this new prototype.
11688 (ppc_num_regs): Set to 73.
11689 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11690 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11691 (ppc_cannot_store_register): Handle orig_r3 and trap.
11692 (ppc_arch_setup): Update init_registers_... calls.
11693 (ppc_fill_gregset): Handle orig_r3 and trap.
11694
11695 * inferiors.c (clear_inferiors): Reset current_inferior.
11696
11697 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
11698
11699 * acinclude.m4: Add override.m4.
11700 * configure: Regenerate.
11701
11702 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11703
11704 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11705 initial call to init_register_ppc64.
11706
11707 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11708
11709 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11710 single powerpc*-*-linux* case.
11711 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11712
11713 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11714
11715 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11716 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11717 from reg_xmlfiles.
11718 * linux-ppc-low.c: Include <elf.h>.
11719 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11720 (ppc_hwcap): New global variable.
11721 (ppc_regmap): Remove __SPE__ #ifdef sections.
11722 (ppc_regmap_e500): New global variable.
11723 (ppc_cannot_store_register): Update __SPE__ special case.
11724 (ppc_get_hwcap): New function.
11725 (ppc_arch_setup): Use it to determine whether inferior supports
11726 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11727 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11728 Do not access registers if target does not support AltiVec.
11729 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11730 Do not access registers if target does not support SPE.
11731 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11732
11733 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11734
11735 * linux-low.c (disabled_regsets, num_regsets): New.
11736 (use_regsets_p): Delete.
11737 (linux_wait_for_process): Clear disabled_regsets.
11738 (regsets_fetch_inferior_registers): Check and set it.
11739 (regsets_store_inferior_registers): Likewise.
11740 (linux_fetch_registers, linux_store_registers): Do not use
11741 use_regsets_p.
11742 (initialize_low): Allocate disabled_regsets.
11743
11744 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11745
11746 * Makefile.in (LIBOBJS): New.
11747 (OBS): Use LIBOBJS.
11748 (memmem.o): New rule.
11749 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11750 * configure: Regenerated.
11751
11752 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11753
11754 * server.c (handle_query): Never return "unsupported" for
11755 qXfer:features:read queries.
11756
11757 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11758
11759 * server.c (get_features_xml): Fix inverted condition.
11760 (handle_query): Always support qXfer:feature:read.
11761
11762 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11763
11764 * server.c (wrapper_argv): New.
11765 (start_inferior): Handle wrapper_argv. If set, expect an extra
11766 trap.
11767 (gdbserver_usage): Document --wrapper.
11768 (main): Parse --wrapper.
11769
11770 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11771
11772 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11773 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11774 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11775 (ppc_set_pc): Likewise.
11776 (ppc_arch_setup): New function.
11777 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11778 of collect_register.
11779 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11780
11781 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11782
11783 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11784 instead of linux-ppc64-low.o.
11785 * linux-ppc64-low.c: Remove file.
11786 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11787 (linux-ppc64-low.o): Remove rule.
11788
11789 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11790 (init_registers_powerpc_64): Likewise.
11791 (ppc_regmap): Conditionally define depending on __powerpc64__.
11792 (ppc_cannot_store_register): Do not special-case "fpscr" when
11793 compiled on __powerpc64__.
11794 (ppc_collect_ptrace_register): New function.
11795 (ppc_supply_ptrace_register): New function.
11796 (ppc_breakpoint): Change type to "unsigned int".
11797 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11798 (the_low_target): Conditionally provide initializers for the
11799 arch_setup member depending on __powerpc64__. Install
11800 collect_ptrace_register and supply_ptrace_register members.
11801
11802 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11803
11804 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11805 * server.c (gdbserver_xmltarget): Define.
11806 (get_features_xml): Use it to replace "target.xml" and arch_string.
11807
11808 * configure.srv: Remove srv_xmltarget. Add XML files that were
11809 mentioned there to srv_xmlfiles instead. Remove conditional tests
11810 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11811 srv_xmlfiles and srv_regobj to include all possible choices.
11812 * configure.ac (srv_xmltarget): Remove.
11813 (srv_xmlfiles): Do not add "target.xml".
11814 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11815 checks for supplementary target information.
11816 * configure: Regenerate.
11817 * Makefile.in (XML_TARGET): Remove.
11818 (target.xml): Remove rule.
11819 (clean): Do not clean up target.xml.
11820 (.PRECIOUS): Do not mention target.xml.
11821
11822 * target.h (struct target_ops): Remove arch_string member.
11823 * linux-low.c (linux_arch_string): Remove.
11824 (linux_target_ops): Remove arch_string initializer.
11825 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11826 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11827 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11828 * spu-low.c (spu_arch_string): Remove.
11829 (spu_target_ops): Remove arch_string initializer.
11830 * win32-low.c (win32_arch_string): Remove.
11831 (win32_target_ops): Remove arch_string initializer.
11832 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11833 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11834 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11835
11836 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11837
11838 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11839 by collect_ptrace_register and supply_ptrace_register hooks.
11840 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11841 instead of checking for the_low_target.left_pad_xfer.
11842 (usr_store_inferior_registers): Use collect_ptrace_register callback
11843 instead of checking for the_low_target.left_pad_xfer.
11844
11845 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11846 (s390_supply_ptrace_register): Likewise.
11847 (s390_fill_gregset): Call s390_collect_ptrace_register.
11848 (the_low_target): Update.
11849
11850 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11851 (ppc_supply_ptrace_register): Likewise.
11852 (the_low_target): Update.
11853
11854 * linux-i386-low.c (the_low_target): Update.
11855 * linux-x86-64-low.c (the_low_target): Update.
11856
11857 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11858
11859 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11860 reg-s390.o and reg-s390x.o.
11861
11862 * linux-low.c (new_inferior): New global variable.
11863 (linux_create_inferior, linux_attach): Set it.
11864 (linux_wait_for_process): Call the_low_target.arch_setup after the
11865 target has stopped for the first time.
11866 (initialize_low): Do not call the_low_target.arch_setup.
11867
11868 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11869 (s390_set_pc): Likewise.
11870 (s390_arch_setup): New function.
11871 (the_low_target): Use s390_arch_setup as arch_setup routine.
11872
11873 * regcache.c (realloc_register_cache): New function.
11874 (set_register_cache): Call it for each existing regcache.
11875
11876 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11877
11878 * server.h (init_registers): Remove prototype.
11879
11880 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11881 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11882 instead of init_registers ().
11883 * linux-arm-low.c (init_registers_arm): Add prototype.
11884 (init_registers_arm_with_iwmmxt): Likewise.
11885 (the_low_target): Add initializer for arch_setup field.
11886 * linux-cris-low.c (init_registers_cris): Add prototype.
11887 (the_low_target): Add initializer for arch_setup field.
11888 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11889 (the_low_target): Add initializer for arch_setup field.
11890 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11891 (the_low_target): Add initializer for arch_setup field.
11892 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11893 (the_low_target): Add initializer for arch_setup field.
11894 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11895 (the_low_target): Add initializer for arch_setup field.
11896 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11897 (the_low_target): Add initializer for arch_setup field.
11898 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11899 (init_registers_mips64_linux): Likewise.
11900 (the_low_target): Add initializer for arch_setup field.
11901 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11902 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11903 (the_low_target): Add initializer for arch_setup field.
11904 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11905 (init_registers_powerpc_64): Likewise.
11906 (the_low_target): Add initializer for arch_setup field.
11907 * linux-s390-low.c (init_registers_s390): Add prototype.
11908 (init_registers_s390x): Likewise.
11909 (the_low_target): Add initializer for arch_setup field.
11910 * linux-sh-low.c (init_registers_sh): Add prototype.
11911 (the_low_target): Add initializer for arch_setup field.
11912 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11913 (the_low_target): Add initializer for arch_setup field.
11914 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11915 (the_low_target): Add initializer for arch_setup field.
11916
11917 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11918 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11919 instead of init_registers ().
11920 * win32-arm-low.c (init_registers_arm): Add prototype.
11921 (the_low_target): Add initializer for arch_setup field.
11922 * win32-i386-low.c (init_registers_i386): Add prototype.
11923 (the_low_target): Add initializer for arch_setup field.
11924
11925 * spu-low.c (init_registers_spu): Add prototype.
11926 (initialize_low): Call initialie_registers_spu () instead of
11927 initialize_registers ().
11928
11929 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11930
11931 * server.c (handle_v_requests): When handling the vRun and vAttach
11932 packets, if already debugging a process, don't kill it. Return an
11933 error instead.
11934
11935 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11936
11937 * server.c (handle_query): Correct length check.
11938
11939 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11940
11941 * win32-low.c (do_initial_child_stuff): Add process handle
11942 parameter. Set current_process_handle and current_process_id from the
11943 parameters. Clear globals.
11944 (win32_create_inferior): Don't set current_process_handle and
11945 current_process_id here. Instead pass them on the call to
11946 do_initial_child_stuff.
11947 (win32_attach): Likewise.
11948 (win32_clear_inferiors): New.
11949 (win32_kill): Don't close the current process handle or the
11950 current thread handle here. Instead call win32_clear_inferiors.
11951 (win32_detach): Don't open a new handle to the process. Call
11952 win32_clear_inferiors.
11953 (win32_join): Don't rely on current_process_handle; open a new
11954 handle using the process id.
11955 (win32_wait): Call win32_clear_inferiors when the inferior process
11956 has exited.
11957
11958 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11959
11960 * server.c (monitor_show_help): Add "exit".
11961
11962 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11963
11964 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11965 (clean): Add reg-xtensa.c.
11966 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11967 * configure.srv (xtensa*-*-linux*) New target.
11968 * linux-xtensa-low.c: New.
11969 * xtensa-xtregs.c: New.
11970
11971 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11972
11973 * hostio.c: Don't include errno.h.
11974 (errno_to_fileio_errno): Move to hostio-errno.
11975 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11976 error number outputting to the target->hostio_last_error callback.
11977 (hostio_packet_error): Use FILEIO_EINVAL directly.
11978 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11979 calls to hostio_error.
11980 * hostio-errno.c: New.
11981 * server.h (hostio_last_error_from_errno): Declare.
11982 * target.h (target_ops): Add hostio_last_error member.
11983 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11984 as hostio_last_error handler.
11985 * spu-low.c (spu_target_ops): Likewise.
11986 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11987 (wince_hostio_last_error): New functions.
11988 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11989 as hostio_last_error handler.
11990 (win32_target_ops) [!_WIN32_WCE]: Register
11991 hostio_last_error_from_errno as hostio_last_error handler.
11992 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11993 (hostio-errno.o): New rule.
11994 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11995 * configure.srv (srv_hostio_err_objs): New variable. Default to
11996 hostio-errno.o.
11997 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11998 * configure: Regenerate.
11999
12000 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12001
12002 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12003 (linux_kill, linux_detach): Clean up the process list.
12004 * remote-utils.c (remote_open): Improve port number parsing.
12005 (putpkt_binary, input_interrupt): Only send interrupts if the target
12006 is running.
12007 * server.c (extended_protocol): Make static.
12008 (attached): Define earlier.
12009 (exit_requested, response_needed, program_argv): New variables.
12010 (target_running): New.
12011 (start_inferior): Clear attached here.
12012 (attach_inferior): Set attached here.
12013 (require_running): Define.
12014 (handle_query): Use require_running and target_running. Implement
12015 "monitor exit".
12016 (handle_v_attach, handle_v_run): New.
12017 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12018 (gdbserver_usage): Update.
12019 (main): Redo argument parsing. Handle --debug and --multi. Handle
12020 --attach along with other options or after the port. Save
12021 program_argv. Support no initial program. Resynchronize
12022 communication with GDB after an error. Handle "monitor exit".
12023 Use require_running and target_running. Always allow the extended
12024 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12025 restart in extended mode.
12026 * README: Refer to the GDB manual. Update --attach usage.
12027
12028 2007-12-20 Andreas Schwab <schwab@suse.de>
12029
12030 * linux-low.c (STACK_SIZE): Define.
12031 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12032 (linux_test_for_tracefork): Likewise.
12033
12034 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12035
12036 * linux-low.c (linux_wait_for_event): Update messages. Do not
12037 reinsert auto-delete breakpoints.
12038 * mem-break.c (struct breakpoint): Change return type of handler to
12039 int.
12040 (set_breakpoint_at): Update handler type.
12041 (reinsert_breakpoint_handler): Return 1 instead of calling
12042 delete_breakpoint.
12043 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12044 setting a new one.
12045 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12046 * mem-break.h (set_breakpoint_at): Update handler type.
12047 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12048 * win32-low.c (auto_delete_breakpoint): New.
12049 (get_child_debug_event): Use it.
12050
12051 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12052
12053 * configure.ac: Check for pread and pwrite.
12054 * hostio.c (handle_pread): Fall back to lseek and read.
12055 (handle_pwrite): Fall back to lseek and write.
12056 * config.in, configure: Regenerated.
12057
12058 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12059
12060 * server.c (myresume): Add own_buf argument.
12061 (main): Update calls.
12062
12063 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12064
12065 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12066 * remote-utils.c (remote_open): Do not call disable_async_io.
12067 (block_async_io): Delete.
12068 (unblock_async_io): Make static.
12069 (initialize_async_io): New.
12070 * server.c (handle_v_cont): Handle async I/O here.
12071 (myresume): Likewise. Move other common resume tasks here...
12072 (main): ... from here. Call initialize_async_io. Disable async
12073 I/O before the main loop.
12074 * server.h (initialize_async_io): Declare.
12075 (block_async_io, unblock_async_io): Delete prototypes.
12076 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12077
12078 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12079
12080 * remote-utils.c (readchar): Allow binary data in received messages.
12081
12082 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12083
12084 * win32-low.c (attaching): New global.
12085 (win32_create_inferior): Clear the `attaching' global.
12086 (win32_attach): Set the `attaching' global.
12087 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12088 attaching. Only set a breakpoint at the entry point if not
12089 attaching.
12090
12091 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12092
12093 * server.c (main): Don't report dll events on the initial
12094 connection on attaches.
12095
12096 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12097
12098 * server.c (main): Relax numerical bases supported for the pid of
12099 the --attach command line argument.
12100
12101 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12102
12103 * win32-low.c (win32_attach): Call OpenProcess before
12104 DebugActiveProcess, not after. Add last error output to error
12105 call.
12106
12107 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12108
12109 * win32-low.c (win32_get_thread_context)
12110 (win32_set_thread_context): New functions.
12111 (thread_rec): Use win32_get_thread_context.
12112 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12113 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12114 field.
12115
12116 2007-12-03 Leo Zayas
12117 Pedro Alves <pedro_alves@portugalmail.pt>
12118
12119 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12120 global variables.
12121 (child_add_thread): Minor cleanup.
12122 (child_continue): Resume artificially suspended threads before
12123 calling ContinueDebugEvent.
12124 (suspend_one_thread): New.
12125 (fake_breakpoint_event): New.
12126 (get_child_debug_event): Change return type to int. Check here if
12127 gdb sent an interrupt request. If a soft interrupt was requested,
12128 fake a breakpoint event. Return 0 if there is no event to handle,
12129 and 1 otherwise.
12130 (win32_wait): Don't check here if gdb sent an interrupt request.
12131 Ensure there is a valid event to handle.
12132 (win32_request_interrupt): Add soft interruption method as last
12133 resort.
12134
12135 2007-12-03 Leo Zayas
12136 Pedro Alves <pedro_alves@portugalmail.pt>
12137
12138 * win32-low.h (win32_thread_info): Add descriptions to the
12139 structure members. Replace `suspend_count' counter by a
12140 `suspended' flag.
12141 * win32-low.c (thread_rec): Update condition of when to get the
12142 context from the inferior. Rely on ContextFlags being set if it
12143 has already been retrieved. Only suspend the inferior thread if
12144 we haven't already. Warn if that fails.
12145 (continue_one_thread): s/suspend_count/suspended/. Only call
12146 ResumeThread once. Warn if that fails.
12147
12148 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12149
12150 * win32-low.c (win32_wait): Don't read from the inferior when it
12151 has already exited.
12152
12153 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12154
12155 * Makefile.in (win32_low_h): New variable.
12156 (win32-low.o): Add dependency on $(win32_low_h).
12157 (win32-arm-low.o, win32-i386-low.o): New rules.
12158
12159 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12160
12161 * hostio.c: Correct copyright year.
12162
12163 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12164
12165 * Makefile.in (OBS): Add hostio.o.
12166 (hostio.o): New rule.
12167 * server.h (handle_vFile): Declare.
12168 * hostio.c: New file.
12169 * server.c (handle_v_requests): Take packet_len and new_packet_len
12170 for binary packets. Call handle_vFile.
12171 (main): Update call to handle_v_requests.
12172
12173 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12174
12175 * linux-low.c: Include <sched.h>.
12176
12177 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12178
12179 * linux-low.c (linux_tracefork_grandchild): New.
12180 (linux_tracefork_child): Use clone.
12181 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12182
12183 2007-10-31 Joel Brobecker <brobecker@adacore.com>
12184
12185 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12186
12187 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12188
12189 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12190
12191 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12192
12193 * inferiors.c (change_inferior_id): Delete.
12194 (add_pid_to_list, pull_pid_from_list): New.
12195 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12196 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12197 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12198 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12199 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12200 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12201 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12202 (using_threads): Always set to 1.
12203 (handle_extended_wait): New.
12204 (add_process): Do not set TID.
12205 (linux_create_inferior): Set must_set_ptrace_flags.
12206 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12207 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12208 (linux_thread_alive): Rename TID argument to LWPID.
12209 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12210 (linux_wait_for_event): Do not use TID or check using_threads. Update
12211 call to dead_thread_notify. Call handle_extended_wait.
12212 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12213 (send_sigstop): Delete sigstop_sent.
12214 (wait_for_sigstop): Avoid TID.
12215 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12216 (linux_test_for_tracefork): New.
12217 (linux_lookup_signals): Use thread_db_active and
12218 linux_supports_tracefork_flag.
12219 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12220 * linux-low.h (get_process_thread): Avoid TID.
12221 (struct process_ifo): Move thread_known and tid to the end. Remove
12222 sigstop_sent.
12223 (linux_attach_lwp, thread_db_init): Update prototypes.
12224 * server.h (change_inferior_id): Delete prototype.
12225 (add_pid_to_list, pull_pid_from_list): New prototypes.
12226 * thread-db.c (thread_db_use_events): New.
12227 (find_first_thread): Rename to...
12228 (find_one_thread): ...this. Update callers and messages. Do not
12229 call fatal. Check thread_db_use_events. Do not call
12230 change_inferior_id or new_thread_notify.
12231 (maybe_attach_thread): Update. Do not call new_thread_notify.
12232 (thread_db_init): Set thread_db_use_events. Check use_events.
12233 * utils.c (fatal, warning): Correct message prefix.
12234
12235 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12236
12237 * Makefile.in (clean): Remove new files.
12238 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12239 (powerpc-64.o, powerpc-64.c): New rules.
12240 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12241 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12242 with SPE.
12243 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12244 SPE targets.
12245 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12246 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12247 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12248 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12249 (target_regsets): Add AltiVec and SPE register sets.
12250 * configure.ac: Check for AltiVec and SPE.
12251 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12252 (ppc_fill_vrregset, ppc_store_vrregset): New.
12253 (target_regsets): Add AltiVec register set.
12254 * configure: Regenerated.
12255
12256 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12257
12258 * linux-low.c (O_LARGEFILE): Define.
12259 (linux_read_memory): Use /proc/PID/mem.
12260 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12261 * configure, config.in: Regenerated.
12262
12263 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12264
12265 * linux-low.c (linux_wait_for_event): Do not pass signals while
12266 single-stepping.
12267
12268 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12269
12270 * win32-low.c (create_process): New.
12271 (win32_create_inferior): Use create_process instead of
12272 CreateProcess. If create_process failed retry appending an ".exe"
12273 suffix. Store the GetLastError result immediatelly after
12274 create_process calls and use it on the call to error.
12275
12276 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12277
12278 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12279
12280 2007-08-23 Joel Brobecker <brobecker@adacore.com>
12281
12282 * configure.ac: Switch license to GPLv3.
12283
12284 2007-08-01 Michael Snyder <msnyder@access-company.com>
12285
12286 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12287
12288 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12289
12290 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12291 typedef.
12292 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12293 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12294 CloseToolhelp32Snapshot.
12295 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12296 CloseToolhelp32Snapshot.
12297
12298 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
12299
12300 * server.c (main): Check for inferior exit before main loop.
12301
12302 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12303
12304 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12305 instead of on tmp_desc.
12306
12307 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12308 Daniel Jacobowitz <dan@codesourcery.com>
12309
12310 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12311 (add_thread): Minor cleanups.
12312 (clear_inferiors): Move lower in the file. Clear the DLL
12313 list.
12314 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12315 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12316 (xml_escape_text): New.
12317 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12318 for qSupported.
12319 (handle_v_cont): Report errors.
12320 (gdbserver_version): Update.
12321 (main): Correct size of own_buf. Do not report initial DLL events.
12322 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12323 (unloaded_dll, xml_escape_text): New.
12324 * win32-low.c (enum target_waitkind): Update comments.
12325 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12326 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12327 (win32_EnumProcessModules, win32_GetModuleInformation)
12328 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12329 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12330 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12331 (win32_Module32First, win32_Module32Next, load_toolhelp)
12332 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12333 (get_child_debug_event): Handle DLL events.
12334 (win32_wait): Likewise.
12335
12336 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12337
12338 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12339 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12340
12341 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12342
12343 * win32-low.c (handle_output_debug_string): Ignore event if not
12344 waiting.
12345
12346 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12347
12348 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12349
12350 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12351
12352 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12353
12354 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12355
12356 * inferiors.c (change_inferior_id): Add comment.
12357 * linux-low.c (check_removed_breakpoint): Add an early
12358 prototype. Improve debug output.
12359 (linux_attach): Doc update.
12360 (linux_detach_one_process, linux_detach): Clean up before releasing
12361 each process.
12362 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12363 * linux-low.h (struct process_info): Doc improvement.
12364 * mem-break.c (delete_all_breakpoints): New.
12365 * mem-break.h (delete_all_breakpoints): New prototype.
12366 * thread-db.c (find_first_thread): New.
12367 (thread_db_create_event): Call it instead of
12368 thread_db_find_new_threads. Clean up unused variables.
12369 (maybe_attach_thread): Remove first thread handling.
12370 (thread_db_find_new_threads): Use find_first_thread.
12371 (thread_db_get_tls_address): Likewise.
12372
12373 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12374
12375 * thread-db.c (thread_db_find_new_threads): Add prototype.
12376 (thread_db_create_event): Check for the main thread before adding
12377 a new thread.
12378 (maybe_attach_thread): Only enable event reporting if TID == 0.
12379 (thread_db_get_tls_address): Check for new threads.
12380
12381 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12382
12383 * linux-low.c (linux_create_inferior): Try execv before execvp.
12384 * spu-low.c (spu_create_inferior): Likewise.
12385
12386 2007-06-13 Mike Frysinger <vapier@gentoo.org>
12387
12388 * linux-low.c (linux_create_inferior): Change execv to execvp.
12389 * spu-low.c (spu_create_inferior): Likewies.
12390
12391 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12392
12393 * Makefile.in (clean): Clean new files instead of deleted ones.
12394 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12395 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12396 rules.
12397 * configure.srv: Specify XML files and new regformats for MIPS and
12398 MIPS64 GNU/Linux.
12399 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12400 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12401 an entry for the restart register.
12402 (mips_cannot_fetch_register, mips_cannot_store_register)
12403 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12404 register names to match the XML descriptions.
12405 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12406 restart register instead of $0.
12407
12408 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12409 Markus Deuling <deuling@de.ibm.com>
12410
12411 * remote-utils.c (decode_xfer_write): New function.
12412 * server.h (decode_xfer_write): Add prototype.
12413 * server.c (handle_query): Add PACKET_LEN argument. Support
12414 qXfer:spu:read and qXfer:spu:write packets.
12415 (main): Pass packet_len to handle_query.
12416 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12417 * target.h (target_ops): Add qxfer_spu.
12418
12419 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12420
12421 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12422 accessing non-seekable spufs files.
12423
12424 2007-05-16 Markus Deuling <deuling@de.ibm.com>
12425
12426 * server.c (handle_query): Add reply for qC packet.
12427
12428 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12429 Leo Zayas <lerele@champenstudios@com>
12430
12431 * server.h (check_remote_input_interrupt_request): New function.
12432 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12433 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12434 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12435 (check_remote_input_interrupt_request): New function.
12436 * server.h (check_remote_input_interrupt_request): Declare.
12437 * win32-low.c (winapi_DebugBreakProcess,
12438 winapi_GenerateConsoleCtrlEvent): New typedefs.
12439 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12440 to 250 ms.
12441 (win32_wait): Check for remote interrupt request
12442 with check_remote_input_interrupt_request.
12443 (win32_request_interrupt): New function.
12444 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12445
12446 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12447
12448 * win32-low.c (debug_registers_changed,
12449 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12450 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12451 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12452 (thread_rec): Get context using the low target.
12453 (child_add_thread): Call thread_added on the low target,
12454 which does the same thing.
12455 (regptr): Delete.
12456 (do_initial_child_stuff): Remove debug registers references.
12457 Set context using the low target. Resume threads after
12458 setting the contexts.
12459 (child_continue): Remove dead variable. Remove debug
12460 registers references.
12461 (child_fetch_inferior_registers): Go through the low target.
12462 (do_child_store_inferior_registers): Remove.
12463 (child_store_inferior_registers): Go through the low target.
12464 (win32_resume): Remove debug registers references.
12465 Set context using the low target.
12466 (handle_exception): Change return type to void. Don't record
12467 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12468 first chance exception.
12469 (get_child_debug_event): Change return type to void. Remove
12470 goto loop. Always return after waiting for debug event.
12471 (win32_wait): Convert to switch statement. Handle spurious
12472 events.
12473
12474 * win32-i386-low.c (debug_registers_changed,
12475 debug_registers_used): New.
12476 (initial_stuff): Rename to ...
12477 (i386_initial_stuff): ... this. Clear debug registers
12478 state variables.
12479 (store_debug_registers): Delete.
12480 (i386_get_thread_context): New.
12481 (load_debug_registers): Delete.
12482 (i386_set_thread_context): New.
12483 (i386_thread_added): New.
12484 (single_step): Rename to ...
12485 (i386_single_step): ... this.
12486 (do_fetch_inferior_registers): Rename to ...
12487 (i386_fetch_inferior_register): ... this.
12488 (i386_store_inferior_register): New.
12489 (the_low_target): Adapt to new interface.
12490
12491 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12492 (arm_get_thread_context): New.
12493 (arm_set_thread_context): New.
12494 (regptr): New.
12495 (do_fetch_inferior_registers): Rename to ...
12496 (arm_fetch_inferior_register): ... this.
12497 (arm_store_inferior_register): New.
12498 (arm_wince_breakpoint): Reimplement as unsigned long.
12499 (arm_wince_breakpoint_len): Define.
12500 (the_low_target): Adapt to new interface.
12501
12502 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12503 load_debug_registers. Add get_thread_context, set_thread_context,
12504 thread_added and store_inferior_register. Rename
12505 fetch_inferior_registers to fetch_inferior_register.
12506 (regptr): Remove declaration.
12507
12508 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12509
12510 * linux-low.c (linux_detach): Change return type to int. Return 0.
12511 * spu-low.c (spu_detach): Likewise.
12512
12513 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12514
12515 * target.h (target_ops): Change return type of detach to int.
12516 Add join.
12517 (join_inferior): New.
12518 * server.c (main): Don't skip detach support on mingw32.
12519 If the inferior doesn't support detaching return error.
12520 Call join_inferior instead of using waitpid.
12521 * linux-low.c (linux_join): New.
12522 (linux_target_op): Add linux_join.
12523 * spu-low.c (spu_join): New.
12524 (spu_target_ops): Add spu_join.
12525 * win32-low.c (win32_detach): Adapt to new interface.
12526 Reopen current_process_handle before detaching. Issue a child
12527 resume before detaching.
12528 (win32_join): New.
12529 (win32_target_op): Add win32_join.
12530
12531 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12532
12533 * win32-low.c (win32-attach): Fix return value.
12534 * target.h (target_ops): Describe ATTACH return values.
12535
12536 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12537
12538 * win32-low.c (GETPROCADDRESS): Define.
12539 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12540 (winapi_DebugSetProcessKillOnExit): Likewise.
12541 (win32_create_inferior): Force usage of ansi CreateProcessA.
12542 (win32_attach): Use GETPROCADDRESS.
12543 (win32_detach): Likewise.
12544
12545 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12546
12547 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12548
12549 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12550
12551 * win32-low.c: Commit leftover changes from 2007-03-29.
12552
12553 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12554
12555 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12556 fields short instead of int. Add explicit padding.
12557 (i387_cache_to_fsave): Remove unnecessary casts.
12558 (i387_fsave_to_cache): Doc fix.
12559 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12560
12561 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12562
12563 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12564 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12565
12566 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12567
12568 * configure.srv (arm*-*-mingw32ce*): Move near the other
12569 arm targets.
12570
12571 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12572
12573 * configure.ac: Add errno checking.
12574 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12575 sys/file.h and malloc.h.
12576 (AC_CHECK_DECLS): Add perror.
12577 (srv_mingwce): Handle.
12578 * configure.srv (i[34567]86-*-cygwin*): Add
12579 win32-i386-low.o to srv_tgtobj.
12580 (i[34567]86-*-mingw*): Likewise.
12581 (arm*-*-mingw32ce*): Add case.
12582 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12583 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12584 [__MINGW32CE__] (strerror): New function.
12585 [__MINGW32CE__] (errno): Define to GetLastError.
12586 [__MINGW32CE__] (COUNTOF): New macro.
12587 (remote_open): Remove extra close call.
12588 * mem-break.c (delete_breakpoint_at): New function.
12589 * mem-break.h (delete_breakpoint_at): Declare.
12590 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12591 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12592 [USE_WIN32API] (read, write): Add char* casts.
12593 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12594 * server.h: Include wincecompat.h on Windows CE.
12595 [HAVE_ERRNO_H]: Check.
12596 (perror): Declare if not declared.
12597 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12598 (perror_with_name): Remove errno declaration.
12599 * wincecompat.h: New.
12600 * wincecompat.c: New.
12601 * win32-low.h: New.
12602 * win32-arm-low.c: New.
12603 * win32-i386-low.c: New.
12604 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12605 (OUTMSG2): Make it safe.
12606 (_T): New macro.
12607 (COUNTOF): New macro.
12608 (NUM_REGS): Get it from the low target.
12609 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12610 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12611 (thread_rec): Let low target handle debug registers.
12612 (child_add_thread): Likewise.
12613 (child_init_thread_list): Likewise.
12614 (continue_one_thread): Likewise.
12615 (regptr): New.
12616 (do_child_fetch_inferior_registers): Move to ...
12617 * win32-i386-low.c: ... here, and rename to ...
12618 (do_fetch_inferior_registers): ... this.
12619 * win32-low.c (child_fetch_inferior_registers):
12620 Go through the low target.
12621 (do_child_store_inferior_registers): Use regptr.
12622 (strwinerror): New function.
12623 (win32_create_inferior): Handle Windows CE.
12624 Use strwinerror instead of strerror on Windows error
12625 codes. Add program to the error output.
12626 Don't close the main thread handle on Windows CE.
12627 (win32_attach): Use coredll.dll on Windows CE.
12628 (win32_kill): Close current process and current
12629 thread handles.
12630 (win32_detach): Use coredll.dll on Windows CE.
12631 (win32_resume): Let low target handle debug registers, and
12632 step request.
12633 (handle_exception): Add/Remove initial breakpoint. Avoid
12634 non-existant WSTOPSIG on Windows CE.
12635 (win32_read_inferior_memory): Cast to remove warning.
12636 (win32_arch_string): Go through the low target.
12637 (initialize_low): Call set_breakpoint_data with the low
12638 target's breakpoint.
12639 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12640 FOP_REGNUM, mappings): Move to ...
12641 * win32-i386-low.c: ... here.
12642 * win32-low.c (win32_thread_info): Move to ...
12643 * win32-low.h: ... here.
12644 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12645 win32-arm-low.c and wincecompat.c.
12646 (all:): Add $EXEEXT.
12647 (install-only:): Likewise.
12648 (gdbserver:): Likewise.
12649 (gdbreplay:): Likewise.
12650 * config.in: Regenerate.
12651 * configure: Regenerate.
12652
12653 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12654
12655 * win32-low.c: Rename typedef thread_info to
12656 win32_thread_info throughout.
12657
12658 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12659
12660 * win32-i386-low.c: Rename to ...
12661 * win32-low.c: ... this.
12662 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12663 * Makefile.in: Likewise.
12664
12665 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12666
12667 * remote-utils.c (monitor_output): Constify msg parameter.
12668 * server.h (monitor_output): Likewise.
12669 * win32-i386-low.c (handle_output_debug_string): New.
12670 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12671 handle_output_debug_string.
12672 (get_child_debug_event): Likewise.
12673
12674 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12675
12676 * server.c (main): Correct strtoul check.
12677
12678 2007-03-27 Jon Ringle <jon@ringle.org>
12679
12680 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12681
12682 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12683
12684 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12685
12686 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12687
12688 * terminal.h: Check HAVE_SGTTY_H.
12689
12690 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12691
12692 * remote-utils.c (remote_open): Print out the assigned port number.
12693
12694 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12695
12696 * remote-utils.c (monitor_output): New function.
12697 * server.c (debug_threads): Define here.
12698 (monitor_show_help): New function.
12699 (handle_query): Handle qRcmd.
12700 (main): Do not handle 'd' packet.
12701 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12702 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12703 of debug_threads.
12704
12705 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12706
12707 * Makefile.in (EXEEXT): New.
12708 (clean): Use $(EXEEXT).
12709
12710 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12711
12712 * target.h (target_ops): Rename send_signal to request_interrupt,
12713 and remove enum target_signal parameter.
12714 * linux-low.c (linux_request_interrupt): Rename from
12715 linux_send_signal, and always send SIGINT.
12716 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12717 and always send SIGINT.
12718 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12719 of send_signal.
12720 (input_interrupt): Likewise.
12721
12722 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12723
12724 * server.c (get_features_xml): Check if target implemented
12725 arch_string.
12726 * win32-i386-low.c (win32_arch_string): New.
12727 (win32_target_ops): Add win32_arch_string as arch_string member.
12728
12729 2007-02-22 Markus Deuling <deuling@de.ibm.com>
12730
12731 * spu-low.c (spu_arch_string): New.
12732 (spu_target_ops): Add spu_arch_string.
12733
12734 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12735
12736 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12737 * configure.ac: Do not check for terminal.h.
12738 * configure, config.in: Regenerated.
12739
12740 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12741
12742 * Makefile.in (OBS): Add $(XML_BUILTIN).
12743 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12744 (clean): Update.
12745 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12746 (arm-with-iwmmxt.c): New.
12747 * config.in, configure: Regenerate.
12748 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12749 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12750 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12751 (arm*-*-linux*): Add iWMMXt and regset support.
12752 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12753 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12754 (arm_store_wmmxregset, target_regsets): New.
12755 * server.c (get_features_xml): Take annex argument. Check builtin
12756 XML documents.
12757 (handle_query): Handle multiple annexes.
12758
12759 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12760
12761 * remote-utils.c [USE_WIN32API] (read, write): Define.
12762 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12763 write.
12764
12765 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12766
12767 * linux-i386-low.c (the_low_target): Set arch_string.
12768 * linux-x86-64-low.c (the_low_target): Likewise.
12769 * linux-low.c (linux_arch_string): New.
12770 (linux_target_ops): Add it.
12771 * linux-low.h (struct linux_target_ops): Add arch_string.
12772 * server.c (write_qxfer_response): Use const void * for DATA.
12773 (get_features_xml): New.
12774 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12775 * target.h (struct target_ops): Add arch_string method.
12776
12777 2007-01-03 Denis Pilat <denis.pilat@st.com>
12778 Daniel Jacobowitz <dan@codesourcery.com>
12779
12780 * linux-low.c (linux_kill): Handle being called with no threads.
12781 * win32-i386-low.c (win32_kill): Likewise.
12782 (get_child_debug_event): Clear current_process_handle.
12783
12784 2006-12-30 Denis PILAT <denis.pilat@st.com>
12785 Daniel Jacobowitz <dan@codesourcery.com>
12786
12787 * remote-utils.c (remote_open): Check the type of specified
12788 serial port devices before opening them.
12789 * server.c (main): Kill the inferior if an error occurs during
12790 the first remote_open.
12791
12792 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12793
12794 * README: Update supported targets.
12795
12796 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12797
12798 * Makefile.in (clean): Remove reg-mips64.c.
12799 (reg-mips64.c, reg-mips64.o): New rules.
12800 * configure.srv: Handle mips64. Include regset support for mips.
12801 * linux-mips-low.c (union mips_register): New.
12802 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12803 (mips_breakpoint, mips_breakpoint_at): Use int.
12804 (mips_collect_register, mips_supply_register)
12805 (mips_collect_register_32bit, mips_supply_register_32bit)
12806 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12807 (mips_store_fpregset, target_regsets): New.
12808 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12809
12810 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12811
12812 * configure.srv: Add target "spu*-*-*".
12813 * Makefile.in (clean): Remove reg-spu.c.
12814 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12815 * spu-low.c: New file.
12816
12817 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12818
12819 * configure.ac: Correct td_thr_tls_get_addr test.
12820 * configure: Regenerated.
12821
12822 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12823
12824 * linux-low.c (linux_wait_for_event): Reformat. Use the
12825 pass_signals array.
12826 * remote-utils.c (decode_address_to_semicolon): New.
12827 * server.c (pass_signals, handle_general_set): New.
12828 (handle_query): Mention QPassSignals for qSupported.
12829 (main): Call handle_general_set.
12830 * server.h (pass_signals, decode_address_to_semicolon): New.
12831
12832 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12833
12834 * server.c (handle_query): Correct error handling for read_auxv.
12835
12836 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12837
12838 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12839 and srv_linux_thread_db to yes.
12840 * linux-s390-low.c (s390_fill_gregset): New function.
12841 (target_regsets): Define data structure.
12842
12843 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12844
12845 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12846 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12847 * config.in, configure: Regenerated.
12848 * inferiors.c (gdb_id_to_thread): New function.
12849 (gdb_id_to_thread_id): Use it.
12850 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12851 * linux-low.h (struct process_info): Add th member.
12852 (thread_db_get_tls_address): New prototype.
12853 * remote-utils.c (decode_address): Make non-static.
12854 * server.c (handle_query): Handle qGetTLSAddr.
12855 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12856 * target.h (struct target_ops): Add get_tls_address.
12857 * thread-db.c (maybe_attach_thread): Save the thread handle.
12858 (thread_db_get_tls_address): New.
12859
12860 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12861
12862 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12863 (linux_resume_one_process): Take a siginfo_t *. Update all
12864 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12865 (struct pending_signals): Add a siginfo_t.
12866 (linux_wait_for_process): Always set last_status.
12867 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12868 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12869 * linux-low.h (struct process_info): Add last_status.
12870
12871 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12872
12873 * remote-utils.c (try_rle): New function.
12874 (putpkt_binary): Use it.
12875
12876 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12877
12878 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12879 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12880 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12881 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12882 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12883 point registers.
12884
12885 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12886
12887 * server.c (terminal_fd): New variable.
12888 (old_foreground_pgrp): Likewise.
12889 (restore_old_foreground_pgrp): New function.
12890 (start_inferior): Record the terminal file descriptor in terminal_fd
12891 and its original foreground group in old_foreground_pgrp. Register
12892 restore_old_foreground_pgrp with atexit().
12893
12894 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12895
12896 * server.c (handle_query): Correct qPart to qXfer.
12897
12898 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12899
12900 * configure.ac: Check for more headers which are missing on
12901 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12902 * configure.srv: Add Cygwin and mingw32.
12903 * remote-utils.c: Don't include headers unconditionally which
12904 are missing on mingw32. Include <winsock.h> for mingw32.
12905 (remote_open): Adjust for mingw32 support. Flush
12906 standard error after writing to it.
12907 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12908 (unblock_async_io, enable_async_io, disable_async_io)
12909 (readchar, getpkt): Update for Winsock support.
12910 (prepare_resume_reply): Expect a protocol signal number.
12911 * server.c: Disable <sys/wait.h> on mingw32.
12912 (start_inferior): Adjust for mingw32 support. Flush
12913 standard error after writing to it.
12914 (attach_inferior): Likewise. Use protocol signal
12915 numbers.
12916 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12917 and names.
12918 * win32-i386-low.c: New file.
12919 * Makefile.in (XM_CLIBS): Set.
12920 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12921 (win32-i386-low.o): New dependency rule.
12922 * linux-low.c (linux_wait): Use target signal numbers.
12923 * target.h (struct target_ops): Doc fix.
12924 * server.h (target_signal_to_name): New prototype.
12925 * gdbreplay.c: Don't include headers unconditionally which
12926 are missing on mingw32. Include <winsock.h> for mingw32.
12927 (remote_close, remote_open): Adjust for Winsock support.
12928 * configure, config.in: Regenerated.
12929
12930 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12931
12932 * server.c (decode_xfer_read, write_qxfer_response): New.
12933 (handle_query): Take a packet length argument. Handle
12934 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12935 the qSupported response.
12936 (main): Update call to handle_query.
12937
12938 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12939
12940 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12941 (putpkt_binary): Renamed from putpkt and adjusted for binary
12942 data.
12943 (putpkt): New wrapper for putpkt_binary.
12944 (readchar): Don't mask off the high bit.
12945 (decode_X_packet): New function.
12946 * server.c (main): Call putpkt_binary if a handler sets the packet
12947 length. Save the length of the incoming packet. Handle 'X'.
12948 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12949
12950 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12951
12952 * server.c (handle_query): Handle qSupported.
12953
12954 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12955
12956 * remote-utils.c (all_symbols_looked_up): New variable.
12957 (look_up_one_symbol): Check it.
12958 * server.h (look_up_one_symbol): New declaration.
12959 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12960
12961 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12962
12963 * Makefile.in (linux-arm-low.o): Update dependencies.
12964 * linux-arm-low.c: Include "gdb_proc_service.h".
12965 (PTRACE_GET_THREAD_AREA): Define.
12966 (ps_get_thread_area): New function.
12967
12968 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12969
12970 * configure.srv (m68k*-*-uclinux*): New target.
12971 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12972 (linux_resume_one_process): Remove extraneous cast.
12973 (linux_read_offsets): New.
12974 (linux_target_op): Add linux_read_offsets on mmuless systems.
12975 * server.c (handle_query): Add qOffsets logic.
12976 * target.h (struct target_ops): Add read_offsets.
12977
12978 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12979
12980 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12981 (PTRACE_GET_THREAD_AREA): Define.
12982 (ps_get_thread_area): New function.
12983 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12984 (linux-x86-64-low.o): Update.
12985
12986 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12987
12988 * configure.ac: Remove checks for prfpregset_t.
12989 * gdb_proc_service.h: New file.
12990 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12991 new "gdb_proc_service.h".
12992 * proc-service.c: Likewise.
12993 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12994 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12995 * Makefile.in (gdb_proc_service_h): Updated.
12996 * configure, config.in: Regenerated.
12997
12998 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12999
13000 * remote-utils.c (prepare_resume_reply): Move declaration
13001 of gdb_id_from_wait to the top of the block.
13002
13003 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13004
13005 * linux-low.c (regsets_store_inferior_registers): Read the regset
13006 from the target before filling it.
13007
13008 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13009
13010 * server.c (attach_inferior): Return SIGTRAP for a successful
13011 attach.
13012
13013 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13014
13015 * Makefile.in (OBS): Add version.o.
13016 (STAGESTUFF): Delete.
13017 (version.o): Add dependencies.
13018 (version.c): Replace rule.
13019 (clean): Remove version.c.
13020 * server.c (gdbserver_version): New.
13021 (gdbserver_usage): Use printf.
13022 (main): Handle --version and --help.
13023 * server.h (version, host_name): Add declarations.
13024
13025 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13026
13027 * linux-arm-low.c:
13028 * linux-arm-low.c:
13029 * inferiors.c:
13030 * i387-fp.h:
13031 * i387-fp.c:
13032 * gdbreplay.c:
13033 * regcache.c:
13034 * proc-service.c:
13035 * mem-break.h:
13036 * mem-break.c:
13037 * linux-x86-64-low.c:
13038 * linux-sh-low.c:
13039 * linux-s390-low.c:
13040 * linux-ppc64-low.c:
13041 * linux-ppc-low.c:
13042 * linux-mips-low.c:
13043 * linux-m68k-low.c:
13044 * linux-m32r-low.c:
13045 * linux-low.h:
13046 * linux-low.c:
13047 * linux-ia64-low.c:
13048 * linux-i386-low.c:
13049 * linux-crisv32-low.c:
13050 * thread-db.c:
13051 * terminal.h:
13052 * target.h:
13053 * target.c:
13054 * server.h:
13055 * server.c:
13056 * remote-utils.c:
13057 * regcache.h:
13058 * utils.c:
13059 * Makefile.in:
13060 * configure.ac:
13061 * gdbserver.1: Add (C) after Copyright. Update the FSF
13062 address.
13063
13064 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13065
13066 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13067 (arm_breakpoint_at): Recognize both breakpoints.
13068 (the_low_target): Use the correct breakpoint instruction.
13069
13070 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13071
13072 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13073 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13074 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13075 (the_low_target): Update.
13076
13077 2005-10-25 Andreas Schwab <schwab@suse.de>
13078
13079 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13080
13081 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13082 (ia64_num_regs): Reduce to 462.
13083
13084 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13085
13086 * acinclude.m4: Correct quoting.
13087 * aclocal.m4: Regenerated.
13088
13089 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13090 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13091 (thread_db_init): Call thread_db_err_str.
13092 * configure.ac: Check for TD_VERSION.
13093 * config.in, configure: Regenerated.
13094
13095 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13096
13097 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13098
13099 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13100
13101 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13102 is not available. Define HAVE_PTRACE_GETREGS if it is.
13103 * config.in, configure: Regenerated.
13104 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13105 * linux-i386-low.c, linux-m68k-low.c: Update to use
13106 HAVE_PTRACE_GETREGS.
13107 * linux-low.c (regsets_fetch_inferior_registers)
13108 (regsets_store_inferior_registers): Only return 0 if we processed
13109 GENERAL_REGS.
13110 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13111 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13112
13113 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13114
13115 * inferiors.c (struct thread_info): Add gdb_id.
13116 (add_thread): Add gdb_id argument.
13117 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13118 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13119 calls to add_thread.
13120 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13121 * server.c (handle_query): Use thread_to_gdb_id.
13122 (handle_v_cont, main): Use gdb_id_to_thread_id.
13123 * server.h (add_thread): Update prototype.
13124 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13125 prototypes.
13126
13127 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13128
13129 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13130 left-padded registers.
13131 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13132 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13133
13134 2005-07-01 Steve Ellcey <sje@cup.hp.com>
13135
13136 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13137 * configure: Regenerate.
13138 * config.in: Regenerate.
13139 * server.h (NEED_DECLARATION_STRERROR):
13140 Replace with !HAVE_DECL_STRERROR.
13141
13142 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13143
13144 * linux-low.c (linux_wait, linux_send_signal): Don't test
13145 an unsigned long variable for > 0 if it could be MAX_ULONG.
13146 * server.c (myresume): Likewise.
13147 * target.c (set_desired_inferior): Likewise.
13148
13149 2005-06-13 Mark Kettenis <kettenis@gnu.org>
13150
13151 * configure.ac: Simplify and improve check for socklen_t.
13152 * configure, config.in: Regenerate.
13153
13154 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13155
13156 * acconfig.h: Remove.
13157 * configure.ac: Add a test for socklen_t. Use three-argument
13158 AC_DEFINE throughout.
13159 * config.in: Regenerated using autoheader 2.59.
13160 * configure: Regenerated.
13161
13162 * gdbreplay.c (socklen_t): Provide a default.
13163 (remote_open): Use socklen_t.
13164 * remote-utils.c (socklen_t): Provide a default.
13165 (remote_open): Use socklen_t.
13166 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13167 unsigned char.
13168
13169 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13170 char for buffers.
13171 * linux-low.c (linux_read_memory, linux_write_memory)
13172 (linux_read_auxv): Likewise.
13173 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13174 (check_mem_write): Likewise.
13175 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13176 Likewise.
13177 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13178 (registers_from_string, register_data): Likewise.
13179 * server.c (handle_query, main): Likewise.
13180 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13181 (decode_M_packet): Likewise.
13182 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13183 * target.h (struct target_ops): Update read_memory, write_memory,
13184 and read_auxv.
13185 (read_inferior_memory, write_inferior_memory): Update.
13186 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13187 to unsigned char *.
13188 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13189 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13190 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13191 linux-s390-low.c, linux-sh-low.c: Update for changes in
13192 read_inferior_memory and the_low_target->breakpoint.
13193
13194 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13195
13196 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13197 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13198 * configure.srv: Add powerpc64-*-linux*.
13199 * linux-ppc64-low.c: New file.
13200
13201 2005-05-23 Orjan Friberg <orjanf@axis.com>
13202
13203 * linux-cris-low.c: New file with support for CRIS.
13204 * linux-crisv32-low.c: Ditto for CRISv32.
13205 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13206 (clean): Add reg-cris.c and reg-crisv32.c.
13207 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13208 reg-crisv32.o, and reg-crisv32.c to make rules.
13209 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13210 recognized targets.
13211
13212 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13213
13214 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13215 of sizeof (PTRACE_XFER_TYPE).
13216 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13217
13218 2005-05-12 Orjan Friberg <orjanf@axis.com>
13219
13220 * target.h (struct target_ops): Add insert_watchpoint,
13221 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13222 pointers for hardware watchpoint support.
13223 * linux-low.h (struct linux_target_ops): Ditto.
13224 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13225 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13226 to linux_target_ops.
13227 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13228 reply packet.
13229 * server.c (main): Recognize 'Z' and 'z' packets.
13230
13231 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13232
13233 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13234 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13235 (the_low_target): Add new members.
13236
13237 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13238
13239 * proc-service.c (ps_lgetregs): Search all_processes instead of
13240 all_threads.
13241
13242 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13243
13244 * server.c (start_inferior): Change return type to int.
13245 (attach_inferior): Change sigptr to int *.
13246 (handle_v_cont, handle_v_requests): Change signal to int *.
13247 (main): Change signal to int.
13248
13249 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
13250
13251 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13252 * configure.srv: Add m32r*-*-linux*.
13253 * linux-m32r-low.c: New file.
13254
13255 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13256
13257 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13258
13259 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13260
13261 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13262 Take unsigned long arguments for PIDs.
13263 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13264 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13265 (wait_for_sigstop, linux_resume_one_process)
13266 (regsets_fetch_inferior_registers, linux_send_signal)
13267 (linux_read_auxv): Likewise. Update the types of variables holding
13268 PIDs. Update format string specifiers.
13269 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13270 * remote-utils.c (prepare_resume_reply): Likewise.
13271 * server.c (cont_thread, general_thread, step_thread)
13272 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13273 unsigned long.
13274 (handle_query): Update format specifiers.
13275 (handle_v_cont, main): Use strtoul for thread IDs.
13276 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13277 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13278 (general_thread, step_thread, thread_from_wait)
13279 (old_thread_from_wait): Update.
13280 * target.h (struct thread_resume): Use unsigned long for THREAD.
13281 (struct target_ops): Use unsigned long for arguments to attach and
13282 thread_alive.
13283
13284 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13285
13286 * acinclude.m4: Include bfd/bfd.m4 directly.
13287 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13288 <agriffis@toolchain.org>.
13289 * aclocal.m4, configure: Regenerated.
13290
13291 2005-01-07 Andrew Cagney <cagney@gnu.org>
13292
13293 * configure.ac: Rename configure.in, require autoconf 2.59.
13294 * configure: Re-generate.
13295
13296 2004-12-08 Daniel Jacobowitz <dan@debian.org>
13297
13298 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13299 LIBS when finished.
13300 * aclocal.m4: Regenerated.
13301 * configure: Regenerated.
13302
13303 2004-11-21 Andreas Schwab <schwab@suse.de>
13304
13305 * linux-m68k-low.c (m68k_num_gregs): Define.
13306 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13307 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13308 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13309 (m68k_breakpoint_at): New. Add to the_low_target.
13310
13311 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13312 srv_linux_thread_db to yes.
13313
13314 2004-10-20 Joel Brobecker <brobecker@gnat.com>
13315
13316 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13317 (ARCH_SET_FS): Likewise.
13318 (ARCH_GET_FS): Likewise.
13319 (ARCH_GET_GS): Likewise.
13320
13321 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13322
13323 * linux-i386-low.c (ps_get_thread_area): New.
13324 * linux-x86-64-low.c (ps_get_thread_area): New.
13325 * linux-low.c: Include <sys/syscall.h>.
13326 (linux_kill_one_process): Don't kill the first thread here.
13327 (linux_kill): Kill the first thread here.
13328 (kill_lwp): New function.
13329 (send_sigstop, linux_send_signal): Use it.
13330 * proc-service.c: Clean up #ifdefs.
13331 (fpregset_info): Delete.
13332 (ps_lgetregs): Update and enable implementation.
13333 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13334 implementations.
13335 * remote-utils.c (struct sym_cache, symbol_cache): New.
13336 (input_interrupt): Print a clearer message.
13337 (async_io_enabled): New variable.
13338 (enable_async_io, disable_async_io): Use it. Update comments.
13339 (look_up_one_symbol): Use the symbol cache.
13340 * thread-db.c (thread_db_look_up_symbols): New function.
13341 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13342
13343 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13344
13345 * configure.in: Test for -rdynamic.
13346 * configure: Regenerated.
13347 * Makefile (INTERNAL_LDFLAGS): New.
13348 (gdbserver, gdbreplay): Use it.
13349
13350 2004-09-02 Andrew Cagney <cagney@gnu.org>
13351
13352 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13353
13354 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
13355
13356 * linux-low.c (linux_wait): Clear all_processes list also.
13357
13358 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13359
13360 * linux-low.c: Include <errno.h>. Remove extern declaration of
13361 errno.
13362
13363 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13364
13365 * gdbreplay.c, server.h, utils.c: Update copyright years.
13366
13367 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13368
13369 * server.c (main): Print child status or termination signal from
13370 variable 'signal', not 'sig'.
13371
13372 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13373
13374 * linux-low.c (linux_read_memory): Change return type to
13375 int. Check for and return error from ptrace().
13376 * target.c (read_inferior_memory): Change return type to int. Pass
13377 back return status from the_target->read_memory().
13378 * target.h (struct target_ops): Adapt *read_memory() prototype.
13379 Update comment.
13380 (read_inferior_memory): Adapt prototype.
13381 * server.c (main): Return an error packet if
13382 read_inferior_memory() returns an error.
13383
13384 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
13385
13386 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13387 Unify with other clean targets.
13388
13389 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13390
13391 * server.c (handle_v_cont): Call set_desired_inferior.
13392
13393 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13394
13395 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13396
13397 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13398
13399 * linux-low.c (linux_wait): Unblock async I/O.
13400 (linux_resume): Block and enable async I/O.
13401 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13402 * server.h (block_async_io, unblock_async_io): Add prototypes.
13403
13404 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13405
13406 * remote-utils.c (remote_open): Print a status notice after
13407 opening a TCP port.
13408 * server.c (attach_inferior): Print a status notice after
13409 attaching.
13410
13411 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13412
13413 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13414
13415 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
13416
13417 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13418 error packet.
13419 * server.c, target.h: Update copyright years.
13420
13421 2004-02-25 Roland McGrath <roland@redhat.com>
13422
13423 * target.h (struct target_ops): New member `read_auxv'.
13424 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13425 * linux-low.c (linux_read_auxv): New function.
13426 (linux_target_ops): Initialize `read_auxv' member to that.
13427
13428 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13429
13430 Committed by Jim Blandy <jimb@redhat.com>.
13431
13432 * linux-s390-low.c (s390_num_regs): Update.
13433 (s390_regmap): Remove control registers. Use __s390x__ predefine
13434 instead of GPR_SIZE to distiguish s390 and s390x targets.
13435
13436 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
13437
13438 * linux-low.c: Update copyright year.
13439 (check_removed_breakpoint): Clear pending_is_breakpoint.
13440 (linux_set_resume_request, linux_queue_one_thread)
13441 (resume_status_pending_p): New functions.
13442 (linux_continue_one_thread): Use process->resume.
13443 (linux_resume): Only resume threads if there are no pending events.
13444 * linux-low.h (struct process_info): Add resume request
13445 pointer.
13446
13447 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
13448
13449 * regcache.c (new_register_cache): Clear the allocated register
13450 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13451
13452 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
13453
13454 * linux-low.c (linux_resume): Take a struct thread_resume *
13455 argument.
13456 (linux_wait): Update call.
13457 (resume_ptr): New static variable.
13458 (linux_continue_one_thread): Renamed from
13459 linux_continue_one_process. Use resume_ptr.
13460 (linux_resume): Use linux_continue_one_thread.
13461 * server.c (handle_v_cont, handle_v_requests): New functions.
13462 (myresume): New function.
13463 (main): Handle 'v' case.
13464 * target.h (struct thread_resume): New type.
13465 (struct target_ops): Change argument of "resume" to struct
13466 thread_resume *.
13467 (myresume): Delete macro.
13468
13469 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13470
13471 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13472 (uninstall): Support DESTDIR.
13473
13474 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13475
13476 * configure.srv: Add xscale*linux copy of arm*linux entry.
13477
13478 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
13479
13480 * linux-arm-low.c (arm_reinsert_addr): New function.
13481 (the_low_target): Add arm_reinsert_addr.
13482
13483 2003-07-08 Mark Kettenis <kettenis@gnu.org>
13484
13485 * mem-break.c: Remove whitespace at end of file.
13486
13487 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13488
13489 * configure.in: Check whether we need to prototype strerror.
13490 * server.h: Optionally prototype strerror.
13491 * gdbreplay.c (perror_with_name): Use strerror.
13492 * linux-low.c (linux_attach_lwp): Use strerror.
13493 * utils.c (perror_with_name): Use strerror.
13494 * config.in, configure: Regenerated.
13495
13496 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13497
13498 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13499 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13500
13501 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
13502
13503 * Makefile.in (SFILES): Update.
13504 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13505 low-sun3.c: Remove files.
13506
13507 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
13508
13509 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13510 (linux_detach_one_process, linux_detach): New functions.
13511 (linux_target_ops): Add linux_detach.
13512 * server.c (main): Handle 'D' packet.
13513 * target.h (struct target_ops): Add "detach" member.
13514 (detach_inferior): Define.
13515
13516 2003-06-13 Mark Kettenis <kettenis@gnu.org>
13517
13518 From Kelley Cook <kelleycook@wideopenwest.com>:
13519 * configure.srv: Accept i[34567]86 variants.
13520
13521 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
13522
13523 * linux-low.c (linux_wait_for_event): Correct comment typos.
13524 (linux_resume_one_process): Call check_removed_breakpoint.
13525 (linux_send_signal): New function.
13526 (linux_target_ops): Add linux_send_signal.
13527 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13528 of kill.
13529 * target.h (struct target_ops): Add send_signal.
13530
13531 2003-05-29 Jim Blandy <jimb@redhat.com>
13532
13533 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13534 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13535 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13536 away part of the register's value.
13537
13538 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
13539
13540 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13541 (linux_wait_for_event, linux_init_signals): Likewise.
13542
13543 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
13544
13545 * configure.in: Check for stdlib.h.
13546 * configure: Regenerated.
13547 * config.in: Regenerated.
13548
13549 2003-01-04 Andreas Schwab <schwab@suse.de>
13550
13551 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13552
13553 2003-01-02 Andrew Cagney <ac131313@redhat.com>
13554
13555 * Makefile.in: Remove obsolete code.
13556
13557 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
13558
13559 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13560 defined(PT_FPR0_HI).
13561
13562 2002-11-17 Stuart Hughes <seh@zee2.com>
13563
13564 * linux-arm-low.c (arm_num_regs): Increase.
13565 (arm_regmap): Include status register.
13566
13567 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
13568
13569 * linux-low.c (register_addr): Remove incorrect -1 check.
13570
13571 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
13572
13573 * linux-low.c (linux_create_inferior): Call setpgid. Return
13574 the new PID.
13575 (unstopped_p, linux_signal_pid): Remove.
13576 (linux_target_ops): Remove linux_signal_pid.
13577 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13578 global instead of target method.
13579 * target.h (struct target_ops): Remove signal_pid. Update comment
13580 for create_inferior.
13581 * server.c (signal_pid): New variable.
13582 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
13583 gdbserver. Set the child to be the foreground process group.
13584 (attach_inferior): Set signal_pid.
13585
13586 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
13587
13588 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13589
13590 2002-08-20 Jim Blandy <jimb@redhat.com>
13591
13592 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13593 default for this.
13594
13595 2002-08-01 Andrew Cagney <cagney@redhat.com>
13596
13597 * Makefile.in: Make chill references obsolete.
13598
13599 2002-07-24 Kevin Buettner <kevinb@redhat.com>
13600
13601 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13602 * configure: Regenerate.
13603 * config.in: Regenerate.
13604
13605 2002-07-09 David O'Brien <obrien@FreeBSD.org>
13606
13607 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13608 (perror_with_name, remote_close, remote_open, expect, play): Static.
13609
13610 2002-07-04 Michal Ludvig <mludvig@suse.cz>
13611
13612 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13613 byte offsets instead of an array of indexes.
13614 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13615
13616 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
13617
13618 * regcache.c: Add comment.
13619
13620 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
13621
13622 * thread-db.c: New file.
13623 * proc-service.c: New file.
13624 * acinclude.m4: New file.
13625 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13626 proc-service.o, and thread-db.o.
13627 (linux-low.o): Add USE_THREAD_DB.
13628 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13629 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13630 * aclocal.m4: Regenerated.
13631 * config.in: Regenerated.
13632 * configure: Regenerated.
13633 * configure.in: Check for proc_service.h, sys/procfs.h,
13634 thread_db.h, and linux/elf.h headrs.
13635 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13636 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13637 Check for -lthread_db and thread support.
13638 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13639 PowerPC, and SuperH.
13640 * i387-fp.c: Constify arguments.
13641 * i387-fp.h: Likewise.
13642 * inferiors.c: (struct thread_info): Renamed from
13643 `struct inferior_info'. Remove PID member. Use generic inferior
13644 list header. All uses updated.
13645 (inferiors, signal_pid): Removed.
13646 (all_threads): New variable.
13647 (get_thread): Define.
13648 (add_inferior_to_list): New function.
13649 (for_each_inferior): New function.
13650 (change_inferior_id): New function.
13651 (add_inferior): Removed.
13652 (remove_inferior): New function.
13653 (add_thread): New function.
13654 (free_one_thread): New function.
13655 (remove_thread): New function.
13656 (clear_inferiors): Use for_each_inferior and free_one_thread.
13657 (find_inferior): New function.
13658 (find_inferior_id): New function.
13659 (inferior_target_data): Update argument type.
13660 (set_inferior_target_data): Likewise.
13661 (inferior_regcache_data): Likewise.
13662 (set_inferior_regcache_data): Likewise.
13663 * linux-low.c (linux_bp_reinsert): Remove.
13664 (all_processes, stopping_threads, using_thrads)
13665 (struct pending_signals, debug_threads, pid_of): New.
13666 (inferior_pid): Replace with macro.
13667 (struct inferior_linux_data): Remove.
13668 (get_stop_pc, add_process): New functions.
13669 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13670 Use add_process and add_thread.
13671 (linux_attach_lwp): New function, based on old linux_attach. Use
13672 add_process and add_thread. Set stop_expected for new threads.
13673 (linux_attach): New function.
13674 (linux_kill_one_process): New function.
13675 (linux_kill): Kill all LWPs.
13676 (linux_thread_alive): Use find_inferior_id.
13677 (check_removed_breakpoints, status_pending_p): New functions.
13678 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13679 Update. Use WNOHANG. Wait for cloned processes also. Update process
13680 struct for the found process.
13681 (linux_wait_for_event): New function.
13682 (linux_wait): Use it. Support LWPs.
13683 (send_sigstop, wait_for_sigstop, stop_all_processes)
13684 (linux_resume_one_process, linux_continue_one_process): New functions.
13685 (linux_resume): Support LWPs.
13686 (REGISTER_RAW_SIZE): Remove.
13687 (fetch_register): Use register_size instead. Call supply_register.
13688 (usr_store_inferior_registers): Likewise. Call collect_register.
13689 Fix recursive case.
13690 (regsets_fetch_inferior_registers): Improve error message.
13691 (regsets_store_inferior_registers): Add debugging.
13692 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13693 (unstopped_p, linux_signal_pid): New functions.
13694 (linux_target_ops): Add linux_signal_pid.
13695 (linux_init_signals): New function.
13696 (initialize_low): Call it. Initialize using_threads.
13697 * regcache.c (inferior_regcache_data): Add valid
13698 flag.
13699 (get_regcache): Fetch registers lazily. Add fetch argument
13700 and update all callers.
13701 (regcache_invalidate_one, regcache_invalidate): New
13702 functions.
13703 (new_register_cache): Renamed from create_register_cache.
13704 Return the new regcache.
13705 (free_register_cache): Change argument to a void *.
13706 (registers_to_string, registers_from_string): Call get_regcache
13707 with fetch flag set.
13708 (register_data): Make static. Pass fetch flag to get_regcache.
13709 (supply_register): Call get_regcache with fetch flag clear.
13710 (collect_register): Call get_regcache with fetch flag set.
13711 (collect_register_as_string): New function.
13712 * regcache.h: Update.
13713 * remote-utils.c (putpkt): Flush after debug output and use
13714 stderr.
13715 Handle input interrupts while waiting for an ACK.
13716 (input_interrupt): Use signal_pid method.
13717 (getpkt): Flush after debug output and use stderr.
13718 (outreg): Use collect_register_as_string.
13719 (new_thread_notify, dead_thread_notify): New functions.
13720 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13721 and general_thread.
13722 (look_up_one_symbol): Flush after debug output.
13723 * server.c (step_thread, server_waiting): New variables.
13724 (start_inferior): Don't use signal_pid. Update call to mywait.
13725 (attach_inferior): Update call to mywait.
13726 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13727 (main): Don't fetch/store registers explicitly. Use
13728 set_desired_inferior. Support proposed ``Hs'' packet. Update
13729 calls to mywait.
13730 * server.h: Update.
13731 (struct inferior_list, struct_inferior_list_entry): New.
13732 * target.c (set_desired_inferior): New.
13733 (write_inferior_memory): Constify.
13734 (mywait): New function.
13735 * target.h: Update.
13736 (struct target_ops): New signal_pid method.
13737 (mywait): Removed macro, added prototype.
13738
13739 * linux-low.h (regset_func): Removed.
13740 (regset_fill_func, regset_store_func): New.
13741 (enum regset_type): New.
13742 (struct regset_info): Add type field. Use new operation types.
13743 (struct linux_target_ops): stop_pc renamed to get_pc.
13744 Add decr_pc_after_break and breakpoint_at.
13745 (get_process, get_thread_proess, get_process_thread)
13746 (strut process_info, all_processes, linux_attach_lwp)
13747 (thread_db_init): New.
13748
13749 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13750 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13751 (the_low_target): Add new members.
13752 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13753 (i386_store_fpxregset): Constify.
13754 (target_regsets): Add new kind identifier.
13755 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13756 (i386_set_pc): Add debugging.
13757 (i386_breakpoint_at): New function.
13758 (the_low_target): Add new members.
13759 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13760 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13761 (mips_breakpoint_at): New.
13762 (the_low_target): Add new members.
13763 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13764 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13765 (the_low_target): Add new members.
13766 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13767 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13768 (the_low_target): Add new members.
13769 * linux-x86-64-low.c (target_regsets): Add new kind
13770 identifier.
13771
13772 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
13773
13774 From Martin Pool <mbp@samba.org>:
13775 * server.c (gdbserver_usage): New function.
13776 (main): Call it.
13777
13778 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
13779
13780 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13781 stop_at -> stop_pc.
13782
13783 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13784
13785 * Makefile.in: Remove obsolete code.
13786
13787 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13788
13789 * linux-low.c (regsets_fetch_inferior_registers),
13790 (regsets_store_inferior_registers): Removed cast to int from
13791 ptrace() calls.
13792 * regcache.h: Added declaration of struct inferior_info.
13793
13794 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13795
13796 * inferiors.c (struct inferior_info): Add regcache_data.
13797 (add_inferior): Call create_register_cache.
13798 (clear_inferiors): Call free_register_cache.
13799 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13800 * regcache.c (struct inferior_regcache_data): New.
13801 (registers): Remove.
13802 (get_regcache): New function.
13803 (create_register_cache, free_register_cache): New functions.
13804 (set_register_cache): Don't initialize the register cache here.
13805 (registers_to_string, registers_from_string, register_data): Call
13806 get_regcache.
13807 * regcache.h: Add prototypes.
13808 * server.h: Likewise.
13809
13810 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13811
13812 * mem-break.c: New file.
13813 * mem-break.h: New file.
13814 * Makefile.in: Add mem-break.o rule; update server.h
13815 dependencies.
13816 * inferiors.c (struct inferior_info): Add target_data
13817 member.
13818 (clear_inferiors): Free target_data member if set.
13819 (inferior_target_data, set_inferior_target_data): New functions.
13820 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13821 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13822 * linux-low.c (linux_bp_reinsert): New variable.
13823 (struct inferior_linux_data): New.
13824 (linux_create_inferior): Use set_inferior_target_data.
13825 (linux_attach): Likewise. Call add_inferior.
13826 (linux_wait_for_one_inferior): New function.
13827 (linux_wait): Call it.
13828 (linux_write_memory): Add const.
13829 (initialize_low): Call set_breakpoint_data.
13830 * linux-low.h (struct linux_target_ops): Add breakpoint
13831 handling members.
13832 * server.c (attach_inferior): Remove extra add_inferior
13833 call.
13834 * server.h: Include mem-break.h. Update inferior.c
13835 prototypes.
13836 * target.c (read_inferior_memory)
13837 (write_inferior_memory): New functions.
13838 * target.h (read_inferior_memory)
13839 (write_inferior_memory): Change macros to prototypes.
13840 (struct target_ops): Update comments. Add const to write_memory
13841 definition.
13842
13843 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13844
13845 * linux-low.c (usr_store_inferior_registers): Support
13846 registers which are allowed to fail to store.
13847 * linux-low.h (linux_target_ops): Likewise.
13848 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13849 (ppc_cannot_store_register): FPSCR may not be storable.
13850
13851 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13852
13853 * server.h: Include <string.h> if HAVE_STRING_H.
13854 * ChangeLog: Correct paths in last ChangeLog entry.
13855
13856 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13857
13858 * linux-low.h: Remove obsolete prototypes.
13859 (struct linux_target_ops): New.
13860 (extern the_low_target): New.
13861 * linux-low.c (num_regs, regmap): Remove declarations.
13862 (register_addr): Use the_low_target explicitly.
13863 (fetch_register): Likewise.
13864 (usr_fetch_inferior_registers): Likewise.
13865 (usr_store_inferior_registers): Likewise.
13866 * linux-arm-low.c (num_regs): Remove.
13867 (arm_num_regs): Define.
13868 (arm_regmap): Renamed from regmap, made static.
13869 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13870 made static.
13871 (arm_cannot_store_register): Renamed from cannot_store_register,
13872 made static.
13873 (the_low_target): New.
13874 * linux-i386-low.c (num_regs): Remove.
13875 (i386_num_regs): Define.
13876 (i386_regmap): Renamed from regmap, made static.
13877 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13878 made static.
13879 (i386_cannot_store_register): Renamed from cannot_store_register,
13880 made static.
13881 (the_low_target): New.
13882 * linux-ia64-low.c (num_regs): Remove.
13883 (ia64_num_regs): Define.
13884 (ia64_regmap): Renamed from regmap, made static.
13885 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13886 made static.
13887 (ia64_cannot_store_register): Renamed from cannot_store_register,
13888 made static.
13889 (the_low_target): New.
13890 * linux-m68k-low.c (num_regs): Remove.
13891 (m68k_num_regs): Define.
13892 (m68k_regmap): Renamed from regmap, made static.
13893 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13894 made static.
13895 (m68k_cannot_store_register): Renamed from cannot_store_register,
13896 made static.
13897 (the_low_target): New.
13898 * linux-mips-low.c (num_regs): Remove.
13899 (mips_num_regs): Define.
13900 (mips_regmap): Renamed from regmap, made static.
13901 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13902 made static.
13903 (mips_cannot_store_register): Renamed from cannot_store_register,
13904 made static.
13905 (the_low_target): New.
13906 * linux-ppc-low.c (num_regs): Remove.
13907 (ppc_num_regs): Define.
13908 (ppc_regmap): Renamed from regmap, made static.
13909 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13910 made static.
13911 (ppc_cannot_store_register): Renamed from cannot_store_register,
13912 made static.
13913 (the_low_target): New.
13914 * linux-s390-low.c (num_regs): Remove.
13915 (s390_num_regs): Define.
13916 (s390_regmap): Renamed from regmap, made static.
13917 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13918 made static.
13919 (s390_cannot_store_register): Renamed from cannot_store_register,
13920 made static.
13921 (the_low_target): New.
13922 * linux-sh-low.c (num_regs): Remove.
13923 (sh_num_regs): Define.
13924 (sh_regmap): Renamed from regmap, made static.
13925 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13926 made static.
13927 (sh_cannot_store_register): Renamed from cannot_store_register,
13928 made static.
13929 (the_low_target): New.
13930 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13931 (the_low_target): New.
13932
13933 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13934
13935 * Makefile.in: Add stamp-h target.
13936 * configure.in: Create stamp-h.
13937 * configure: Regenerated.
13938
13939 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13940
13941 * inferiors.c: New file.
13942 * target.c: New file.
13943 * target.h: New file.
13944 * Makefile.in: Add target.o and inferiors.o. Update
13945 dependencies.
13946 * linux-low.c (inferior_pid): New static variable,
13947 moved from server.c.
13948 (linux_create_inferior): Renamed from create_inferior.
13949 Call add_inferior. Return 0 on success instead of a PID.
13950 (linux_attach): Renamed from myattach.
13951 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13952 (linux_thread_alive): Renamed from mythread_alive.
13953 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13954 child dies.
13955 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13956 (regsets_store_inferior_registers): Correct error message.
13957 Add missing ``return 0''.
13958 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13959 (linux_store_registers): Renamed from store_inferior_registers.
13960 (linux_read_memory): Renamed from read_inferior_memory.
13961 (linux_write_memory): Renamed from write_inferior_memory.
13962 (linux_target_ops): New structure.
13963 (initialize_low): Call set_target_ops ().
13964 * remote-utils.c (unhexify): New function.
13965 (hexify): New function.
13966 (input_interrupt): Send signals to ``signal_pid''.
13967 * server.c (inferior_pid): Remove.
13968 (start_inferior): Update create_inferior call.
13969 (attach_inferior): Call add_inferior.
13970 (handle_query): New function.
13971 (main): Call handle_query for `q' packets.
13972 * server.h: Include "target.h". Remove obsolete prototypes.
13973 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13974
13975 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13976
13977 * Makefile.in: Add WARN_CFLAGS. Update configury
13978 dependencies.
13979 * configure.in: Check for <string.h>
13980 * configure: Regenerate.
13981 * config.in: Regenerate.
13982 * gdbreplay.c: Include needed system headers.
13983 (remote_open): Remove strchr prototype.
13984 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13985 * regcache.c (supply_register): Change buf argument to const void *.
13986 (supply_register_by_name): Likewise.
13987 (collect_register): Change buf argument to void *.
13988 (collect_register_by_name): Likewise.
13989 * regcache.h: Add missing prototypes.
13990 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13991 * server.c (handle_query): New function.
13992 (attached): New static variable, moved out of main.
13993 (main): Quiet longjmp clobber warnings.
13994 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13995 * utils.c (error): Remove NORETURN.
13996 (fatal): Likewise.
This page took 0.447306 seconds and 4 git commands to generate.