Add target descriptions for AVX + MPX
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2
3 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
6 (amd64-avx-mpx-linux.c): New rules.
7 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
9 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
10 (srv_amd64_regobj): Add amd64-avx-mpx.o.
11 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
12 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
13 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
14 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
15 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
16 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
17 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
18 * linux-x86-low.c (x86_linux_read_description): Add case for
19 X86_XSTATE_AVX_MPX_MASK.
20 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
21 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
22 init_registers_i386_avx_mpx_linux.
23 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
24 (initialize_low_tracepoint): Call
25 init_registers_i386_avx_mpx_linux.
26 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
27 (initialize_low_tracepoint): Call
28 init_registers_amd64_avx_mpx_linux.
29 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
30 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
31 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
32 declarations.
33
34 2016-04-18 Pedro Alves <palves@redhat.com>
35
36 * configure: Regenerate.
37
38 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
39
40 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
41 (aarch64_emit_sub): Likewise.
42
43 2016-04-12 Pedro Alves <palves@redhat.com>
44
45 * utils.c (prepare_to_throw_exception): Delete.
46
47 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
48
49 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
50
51 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
52
53 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
54
55 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
56
57 * linux-aarch64-ipa.c: Add <elf.h> include.
58 * linux-ppc-ipa.c: Add <elf.h> include.
59 * linux-s390-ipa.c: Add <elf.h> include.
60
61 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
62
63 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
64 (get_raw_reg_ptr): Likewise.
65 (get_trace_state_variable_value_ptr): Likewise.
66 (set_trace_state_variable_value_ptr): Likewise.
67 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
68 char *.
69
70 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
71 Marcin Kościelnicki <koriakin@0x04.net>
72
73 PR/17221
74 * linux-ppc-low.c (emit_insns): New function.
75 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
76 (ppc_emit_prologue): New function.
77 (ppc_emit_epilogue): New function.
78 (ppc_emit_add): New function.
79 (ppc_emit_sub): New function.
80 (ppc_emit_mul): New function.
81 (ppc_emit_lsh): New function.
82 (ppc_emit_rsh_signed): New function.
83 (ppc_emit_rsh_unsigned): New function.
84 (ppc_emit_ext): New function.
85 (ppc_emit_zero_ext): New function.
86 (ppc_emit_log_not): New function.
87 (ppc_emit_bit_and): New function.
88 (ppc_emit_bit_or): New function.
89 (ppc_emit_bit_xor): New function.
90 (ppc_emit_bit_not): New function.
91 (ppc_emit_equal): New function.
92 (ppc_emit_less_signed): New function.
93 (ppc_emit_less_unsigned): New function.
94 (ppc_emit_ref): New function.
95 (ppc_emit_const): New function.
96 (ppc_emit_reg): New function.
97 (ppc_emit_pop): New function.
98 (ppc_emit_stack_flush): New function.
99 (ppc_emit_swap): New function.
100 (ppc_emit_stack_adjust): New function.
101 (ppc_emit_call): New function.
102 (ppc_emit_int_call_1): New function.
103 (ppc_emit_void_call_2): New function.
104 (ppc_emit_if_goto): New function.
105 (ppc_emit_goto): New function.
106 (ppc_emit_eq_goto): New function.
107 (ppc_emit_ne_goto): New function.
108 (ppc_emit_lt_goto): New function.
109 (ppc_emit_le_goto): New function.
110 (ppc_emit_gt_goto): New function.
111 (ppc_emit_ge_goto): New function.
112 (ppc_write_goto_address): New function.
113 (ppc_emit_ops_impl): New static variable.
114 (ppc64v1_emit_prologue): New function.
115 (ppc64v2_emit_prologue): New function.
116 (ppc64_emit_epilogue): New function.
117 (ppc64_emit_add): New function.
118 (ppc64_emit_sub): New function.
119 (ppc64_emit_mul): New function.
120 (ppc64_emit_lsh): New function.
121 (ppc64_emit_rsh_signed): New function.
122 (ppc64_emit_rsh_unsigned): New function.
123 (ppc64_emit_ext): New function.
124 (ppc64_emit_zero_ext): New function.
125 (ppc64_emit_log_not): New function.
126 (ppc64_emit_bit_and): New function.
127 (ppc64_emit_bit_or): New function.
128 (ppc64_emit_bit_xor): New function.
129 (ppc64_emit_bit_not): New function.
130 (ppc64_emit_equal): New function.
131 (ppc64_emit_less_signed): New function.
132 (ppc64_emit_less_unsigned): New function.
133 (ppc64_emit_ref): New function.
134 (ppc64_emit_const): New function.
135 (ppc64v1_emit_reg): New function.
136 (ppc64v2_emit_reg): New function.
137 (ppc64_emit_pop): New function.
138 (ppc64_emit_stack_flush): New function.
139 (ppc64_emit_swap): New function.
140 (ppc64v1_emit_call): New function.
141 (ppc64v2_emit_call): New function.
142 (ppc64v1_emit_int_call_1): New function.
143 (ppc64v2_emit_int_call_1): New function.
144 (ppc64v1_emit_void_call_2): New function.
145 (ppc64v2_emit_void_call_2): New function.
146 (ppc64_emit_if_goto): New function.
147 (ppc64_emit_eq_goto): New function.
148 (ppc64_emit_ne_goto): New function.
149 (ppc64_emit_lt_goto): New function.
150 (ppc64_emit_le_goto): New function.
151 (ppc64_emit_gt_goto): New function.
152 (ppc64_emit_ge_goto): New function.
153 (ppc64v1_emit_ops_impl): New static variable.
154 (ppc64v2_emit_ops_impl): New static variable.
155 (ppc_emit_ops): New function.
156 (linux_low_target): Wire in ppc_emit_ops.
157
158 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
159 Marcin Kościelnicki <koriakin@0x04.net>
160
161 PR/17221
162 * Makefile.in: Add powerpc-*-ipa.o
163 * configure.srv: Add ipa_obj for powerpc*-linux.
164 * linux-ppc-ipa.c: New file.
165 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
166 includes.
167 (PPC_FIELD): New macro.
168 (PPC_SEXT): New macro.
169 (PPC_OP6): New macro.
170 (PPC_BO): New macro.
171 (PPC_LI): New macro.
172 (PPC_BD): New macro.
173 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
174 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
175 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
176 (ppc_get_thread_area): New function.
177 (is_elfv2_inferior): New function.
178 (gen_ds_form): New function.
179 (GEN_STD): New macro.
180 (GEN_STDU): New macro.
181 (GEN_LD): New macro.
182 (GEN_LDU): New macro.
183 (gen_d_form): New function.
184 (GEN_ADDI): New macro.
185 (GEN_ADDIS): New macro.
186 (GEN_LI): New macro.
187 (GEN_LIS): New macro.
188 (GEN_ORI): New macro.
189 (GEN_ORIS): New macro.
190 (GEN_LWZ): New macro.
191 (GEN_STW): New macro.
192 (GEN_STWU): New macro.
193 (gen_xfx_form): New function.
194 (GEN_MFSPR): New macro.
195 (GEN_MTSPR): New macro.
196 (GEN_MFCR): New macro.
197 (GEN_MTCR): New macro.
198 (GEN_SYNC): New macro.
199 (GEN_LWSYNC): New macro.
200 (gen_x_form): New function.
201 (GEN_OR): New macro.
202 (GEN_MR): New macro.
203 (GEN_LWARX): New macro.
204 (GEN_STWCX): New macro.
205 (GEN_CMPW): New macro.
206 (gen_md_form): New function.
207 (GEN_RLDICL): New macro.
208 (GEN_RLDICR): New macro.
209 (gen_i_form): New function.
210 (GEN_B): New macro.
211 (GEN_BL): New macro.
212 (gen_b_form): New function.
213 (GEN_BNE): New macro.
214 (GEN_LOAD): New macro.
215 (GEN_STORE): New macro.
216 (gen_limm): New function.
217 (gen_atomic_xchg): New function.
218 (gen_call): New function.
219 (ppc_relocate_instruction): New function.
220 (ppc_install_fast_tracepoint_jump_pad): New function.
221 (ppc_get_min_fast_tracepoint_insn_len): New function.
222 (ppc_get_ipa_tdesc_idx): New function.
223 (the_low_target): Wire in the new functions.
224 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
225 tdescs.
226 * linux-ppc-tdesc.h: New file.
227
228 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
229
230 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
231 (alloc_jump_pad_buffer): New function.
232 * linux-amd64-ipa.c: Add <sys/mman.h> include.
233 (alloc_jump_pad_buffer): New function.
234 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
235 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
236 (alloc_jump_pad_buffer): New function.
237 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
238 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
239 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
240 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
241
242 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
243
244 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
245 * linux-amd64-ipa.c: Likewise.
246 * linux-i386-ipa.c: Likewise.
247 * linux-s390-ipa.c: Likewise.
248 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
249 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
250 set_trace_state_variable_value_ptr.
251 (struct ipa_sym_addresses): Likewise.
252 (symbol_list): Likewise.
253 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
254 accessing gdb_collect directly.
255 (gdb_collect_ptr_type): New typedef.
256 (get_raw_reg_ptr_type): New typedef.
257 (get_trace_state_variable_value_ptr_type): New typedef.
258 (set_trace_state_variable_value_ptr_type): New typedef.
259 (gdb_collect_ptr): New global.
260 (get_raw_reg_ptr): New global.
261 (get_trace_state_variable_value_ptr): New global.
262 (set_trace_state_variable_value_ptr): New global.
263 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
264 accessing get_raw_reg directly.
265 (get_get_tsv_func_addr): Likewise for
266 get_trace_state_variable_value_ptr.
267 (get_set_tsv_func_addr): Likewise for
268 set_trace_state_variable_value_ptr.
269 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
270
271 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
272
273 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
274
275 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
276
277 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
278 packets.
279 (relocate_instruction): Remove own_buf.
280 * server.c (own_buf): Make global.
281 (handle_v_requests): Make global.
282 * server.h (own_buf): New declaration.
283 (handle_v_requests): New prototype.
284
285 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
286
287 PR 18377
288 * linux-s390-low.c (add_insns): New function.
289 (s390_emit_prologue): New function.
290 (s390_emit_epilogue): New function.
291 (s390_emit_add): New function.
292 (s390_emit_sub): New function.
293 (s390_emit_mul): New function.
294 (s390_emit_lsh): New function.
295 (s390_emit_rsh_signed): New function.
296 (s390_emit_rsh_unsigned): New function.
297 (s390_emit_ext): New function.
298 (s390_emit_log_not): New function.
299 (s390_emit_bit_and): New function.
300 (s390_emit_bit_or): New function.
301 (s390_emit_bit_xor): New function.
302 (s390_emit_bit_not): New function.
303 (s390_emit_equal): New function.
304 (s390_emit_less_signed): New function.
305 (s390_emit_less_unsigned): New function.
306 (s390_emit_ref): New function.
307 (s390_emit_if_goto): New function.
308 (s390_emit_goto): New function.
309 (s390_write_goto_address): New function.
310 (s390_emit_litpool): New function.
311 (s390_emit_const): New function.
312 (s390_emit_call): New function.
313 (s390_emit_reg): New function.
314 (s390_emit_pop): New function.
315 (s390_emit_stack_flush): New function.
316 (s390_emit_zero_ext): New function.
317 (s390_emit_swap): New function.
318 (s390_emit_stack_adjust): New function.
319 (s390_emit_set_r2): New function.
320 (s390_emit_int_call_1): New function.
321 (s390_emit_void_call_2): New function.
322 (s390_emit_eq_goto): New function.
323 (s390_emit_ne_goto): New function.
324 (s390_emit_lt_goto): New function.
325 (s390_emit_le_goto): New function.
326 (s390_emit_gt_goto): New function.
327 (s390_emit_ge_goto): New function.
328 (s390x_emit_prologue): New function.
329 (s390x_emit_epilogue): New function.
330 (s390x_emit_add): New function.
331 (s390x_emit_sub): New function.
332 (s390x_emit_mul): New function.
333 (s390x_emit_lsh): New function.
334 (s390x_emit_rsh_signed): New function.
335 (s390x_emit_rsh_unsigned): New function.
336 (s390x_emit_ext): New function.
337 (s390x_emit_log_not): New function.
338 (s390x_emit_bit_and): New function.
339 (s390x_emit_bit_or): New function.
340 (s390x_emit_bit_xor): New function.
341 (s390x_emit_bit_not): New function.
342 (s390x_emit_equal): New function.
343 (s390x_emit_less_signed): New function.
344 (s390x_emit_less_unsigned): New function.
345 (s390x_emit_ref): New function.
346 (s390x_emit_if_goto): New function.
347 (s390x_emit_const): New function.
348 (s390x_emit_call): New function.
349 (s390x_emit_reg): New function.
350 (s390x_emit_pop): New function.
351 (s390x_emit_stack_flush): New function.
352 (s390x_emit_zero_ext): New function.
353 (s390x_emit_swap): New function.
354 (s390x_emit_stack_adjust): New function.
355 (s390x_emit_int_call_1): New function.
356 (s390x_emit_void_call_2): New function.
357 (s390x_emit_eq_goto): New function.
358 (s390x_emit_ne_goto): New function.
359 (s390x_emit_lt_goto): New function.
360 (s390x_emit_le_goto): New function.
361 (s390x_emit_gt_goto): New function.
362 (s390x_emit_ge_goto): New function.
363 (s390_emit_ops): New function.
364 (struct linux_target_ops): Fill in emit_ops hook.
365
366 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
367
368 PR 18377
369 * Makefile.in: Add s390 IPA files.
370 * configure.srv: Build IPA for s390.
371 * linux-s390-ipa.c: New file.
372 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
373 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
374 (tdesc_s390_linux32): Likewise.
375 (init_registers_s390_linux32v1): Likewise.
376 (tdesc_s390_linux32v1): Likewise.
377 (init_registers_s390_linux32v2): Likewise.
378 (tdesc_s390_linux32v2): Likewise.
379 (init_registers_s390_linux64): Likewise.
380 (tdesc_s390_linux64): Likewise.
381 (init_registers_s390_linux64v1): Likewise.
382 (tdesc_s390_linux64v1): Likewise.
383 (init_registers_s390_linux64v2): Likewise.
384 (tdesc_s390_linux64v2): Likewise.
385 (init_registers_s390_te_linux64): Likewise.
386 (tdesc_s390_te_linux64): Likewise.
387 (init_registers_s390_vx_linux64): Likewise.
388 (tdesc_s390_vx_linux64): Likewise.
389 (init_registers_s390_tevx_linux64): Likewise.
390 (tdesc_s390_tevx_linux64): Likewise.
391 (init_registers_s390x_linux64): Likewise.
392 (tdesc_s390x_linux64): Likewise.
393 (init_registers_s390x_linux64v1): Likewise.
394 (tdesc_s390x_linux64v1): Likewise.
395 (init_registers_s390x_linux64v2): Likewise.
396 (tdesc_s390x_linux64v2): Likewise.
397 (init_registers_s390x_te_linux64): Likewise.
398 (tdesc_s390x_te_linux64): Likewise.
399 (init_registers_s390x_vx_linux64): Likewise.
400 (tdesc_s390x_vx_linux64): Likewise.
401 (init_registers_s390x_tevx_linux64): Likewise.
402 (tdesc_s390x_tevx_linux64): Likewise.
403 (have_hwcap_s390_vx): New static variable.
404 (s390_arch_setup): Fill have_hwcap_s390_vx.
405 (s390_get_thread_area): New function.
406 (s390_ft_entry_gpr_esa): New const.
407 (s390_ft_entry_gpr_zarch): New const.
408 (s390_ft_entry_misc): New const.
409 (s390_ft_entry_fr): New const.
410 (s390_ft_entry_vr): New const.
411 (s390_ft_main_31): New const.
412 (s390_ft_main_64): New const.
413 (s390_ft_exit_fr): New const.
414 (s390_ft_exit_vr): New const.
415 (s390_ft_exit_misc): New const.
416 (s390_ft_exit_gpr_esa): New const.
417 (s390_ft_exit_gpr_zarch): New const.
418 (append_insns): New function.
419 (s390_relocate_instruction): New function.
420 (s390_install_fast_tracepoint_jump_pad): New function.
421 (s390_get_min_fast_tracepoint_insn_len): New function.
422 (s390_get_ipa_tdesc_idx): New function.
423 (struct linux_target_ops): Wire in the above functions.
424 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
425 * linux-s390-tdesc.h: New file.
426
427 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
428
429 * linux-s390-low.c (s390_supports_tracepoints): New function.
430 (struct linux_target_ops): Fill supports_tracepoints hook.
431
432 2016-03-18 Yao Qi <yao.qi@linaro.org>
433
434 * linux-low.c (lwp_signal_can_be_delivered): New function.
435 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
436
437 2016-03-18 Yao Qi <yao.qi@linaro.org>
438
439 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
440 0 if signal is enqueued. Remove 'signal' from one debugging
441 message. Move one debugging message to some lines below.
442 Remove code setting 'signal' to 0.
443
444 2016-03-18 Yao Qi <yao.qi@linaro.org>
445
446 * linux-low.c (linux_low_filter_event): Remove redundant
447 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
448
449 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
450
451 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
452 (struct linux_target_ops): Wire in the above.
453
454 2016-03-03 Yao Qi <yao.qi@linaro.org>
455
456 * linux-low.c: Update comments to start_step_over.
457
458 2016-03-03 Yao Qi <yao.qi@linaro.org>
459
460 PR server/19736
461 * linux-low.c (handle_extended_wait): Set child suspended
462 if event_lwp->bp_reinsert isn't zero.
463
464 2016-03-02 Yao Qi <yao.qi@linaro.org>
465
466 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
467 enqueue_pending_signal.
468
469 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
470
471 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
472 is actually loaded.
473
474 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
475
476 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
477 (s390_regmap_3264) [!__s390x__]: New global.
478 (s390_collect_ptrace_register): Skip map entries containing -1.
479 (s390_supply_ptrace_register): Ditto.
480 (s390_fill_gprs_high): New function.
481 (s390_store_gprs_high): New function.
482 (s390_regsets): Add NT_S390_HIGH_GPRS.
483 (s390_get_hwcap): Enable on 31-bit.
484 (have_hwcap_s390_high_gprs): Enable on 31-bit.
485 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
486 Detect NT_S390_HIGH_GPRS.
487 (s390_usrregs_info_3264): Enable on 31-bit.
488 (s390_regs_info): Enable regs_info_3264 on 31-bit.
489 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
490
491 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
492
493 PR gdb/13808
494 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
495 * configure.srv: Ditto.
496 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
497 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
498 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
499 (init_registers_amd64_linux): Remove prototype.
500 (tdesc_amd64_linux): Remove declaration.
501 (get_ipa_tdesc): New function.
502 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
503 initialize remaining tdescs.
504 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
505 (init_registers_i386_linux): Remove prototype.
506 (tdesc_i386_linux): Remove declaration.
507 (get_ipa_tdesc): New function.
508 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
509 initialize remaining tdescs.
510 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
511 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
512 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
513 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
514 (x86_get_ipa_tdesc_idx): New function.
515 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
516 * linux-x86-tdesc.h: New file.
517 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
518 (target_get_ipa_tdesc_idx): New macro.
519 * tracepoint.c (ipa_tdesc_idx): New macro.
520 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
521 (symbol_list): Add ipa_tdesc_idx.
522 (cmd_qtstart): Write ipa_tdesc_idx in the target.
523 (ipa_tdesc): Remove.
524 (ipa_tdesc_idx): New variable.
525 (get_context_regcache): Use get_ipa_tdesc.
526 (gdb_collect): Ditto.
527 (gdb_probe): Ditto.
528 * tracepoint.h (get_ipa_tdesc): New prototype.
529 (ipa_tdesc): Remove.
530
531 2016-02-24 Pedro Alves <palves@redhat.com>
532
533 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
534 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
535 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
536 Factor out common code between the USE_SIGTRAP_SIGINFO and
537 !USE_SIGTRAP_SIGINFO blocks.
538 (linux_low_filter_event): Call save_stop_reason instead of
539 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
540 Update comments.
541 (linux_wait_1): Update comments.
542
543 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
544
545 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
546 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
547 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
548 ppc_insert_point, ppc_remove_point.
549
550 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
551
552 * linux-s390-low.c (s390_supports_z_point_type): New function.
553 (struct linux_target_ops): Wire s390_supports_z_point_type in.
554
555 2016-02-16 Yao Qi <yao.qi@linaro.org>
556
557 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
558 PC. Get pc from regcache_read_pc.
559
560 2016-02-12 Yao Qi <yao.qi@linaro.org>
561
562 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
563 or linux_get_pc_32bit.
564 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
565
566 2016-02-12 Yao Qi <yao.qi@linaro.org>
567
568 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
569 arm_linux_get_next_pcs_fixup.
570
571 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
572
573 * tracepoint.c (x_tracepoint_action_download): Change
574 write_inferior_data_ptr to write_inferior_data_pointer.
575 (cmd_qtstart): Likewise.
576 (write_inferior_data_ptr): Remove.
577 (download_agent_expr): Change write_inferior_data_ptr to
578 write_inferior_data_pointer.
579 (download_tracepoint_1): Likewise.
580 (download_tracepoint): Likewise.
581 (download_trace_state_variables): Likewise.
582
583 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
584 Marcin Kościelnicki <koriakin@0x04.net>
585
586 * tracepoint.c (struct tracepoint_action_ops): Remove.
587 (struct tracepoint_action): Remove ops.
588 (m_tracepoint_action_download, r_tracepoint_action_download)
589 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
590 size and offset accordingly.
591 (m_tracepoint_action_ops, r_tracepoint_action_ops)
592 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
593 (tracepoint_action_send, tracepoint_action_download): New functions.
594 Helpers for trace action handlers.
595 (add_tracepoint_action): Remove setup actions ops.
596 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
597
598 2016-02-10 Yao Qi <yao.qi@linaro.org>
599
600 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
601
602 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
603
604 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
605 to AC_OUTPUT.
606 * configure: Regenerate.
607
608 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
609
610 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
611 void * to gdb_byte *.
612 * linux-low.c (siginfo_fixup): Likewise.
613 (linux_xfer_siginfo): Likewise.
614 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
615 Likewise.
616 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
617
618 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
619
620 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
621 to srv_tgtobj.
622 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
623 to srv_tgtobj.
624 * linux-x86-low.c [__x86_64__]: Include
625 "nat/amd64-linux-siginfo.h".
626 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
627 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
628 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
629 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
630 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
631 (cpt_si_fd, si_timerid, si_overrun): Move from
632 nat/amd64-linux-siginfo.c.
633 * Makefile.in (amd64-linux-siginfo.o:): New rule.
634
635 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
636
637 * server.c (skip_to_semicolon): Remove.
638 (process_point_options): Use strchrnul instead of
639 skip_to_semicolon.
640
641 2016-01-26 Yao Qi <yao.qi@linaro.org>
642
643 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
644 * linux-low.c (install_software_single_step_breakpoints): Don't
645 call regcache_read_pc.
646 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
647 argument pc.
648
649 2016-01-26 Yao Qi <yao.qi@linaro.org>
650
651 * linux-low.c (install_software_single_step_breakpoints): Call
652 regcache_read_pc instead of get_pc.
653
654 2016-01-26 Yao Qi <yao.qi@linaro.org>
655
656 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
657 (unblock_async_io): Rename to ...
658 (block_unblock_async_io): ... it. New function.
659 (enable_async_io): Don't install SIGIO handler. Unblock it
660 instead.
661 (disable_async_io): Don't ignore SIGIO. Block it instead.
662 (initialize_async_io): Install SIGIO handler. Don't call
663 unblock_async_io.
664
665 2016-01-26 Yao Qi <yao.qi@linaro.org>
666
667 * remote-utils.c (getpkt): If the buffer isn't empty, and the
668 first character is '\003', call *the_target->request_interrupt.
669
670 2016-01-25 Yao Qi <yao.qi@linaro.org>
671
672 * remote-utils.c (new_thread_notify): Remove.
673 (dead_thread_notify): Likewise.
674 * remote-utils.h (new_thread_notify): Remove declaration.
675 (dead_thread_notify): Likewise.
676
677 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
678
679 * gdb.trace/pending.exp: Fix expected message on continue.
680
681 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
682
683 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
684 it works properly on big-endian machines where sizeof (CORE_ADDR)
685 != sizeof (void *).
686
687 2016-01-21 Pedro Alves <palves@redhat.com>
688
689 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
690 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
691 * configure: Regenerate.
692
693 2016-01-21 Yao Qi <yao.qi@linaro.org>
694
695 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
696 is_thumb and set it according to CPSR saved on the stack.
697 (get_next_pcs_syscall_next_pc): Pass is_thumb to
698 arm_sigreturn_next_pc.
699
700 2016-01-18 Yao Qi <yao.qi@linaro.org>
701
702 * linux-low.c (linux_set_pc_64bit): New function.
703 (linux_get_pc_64bit): New function.
704 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
705 Declare.
706 * linux-sparc-low.c (debug_threads): Remove declaration.
707 (sparc_get_pc): Remove.
708 (the_low_target): Use linux_get_pc_64bit instead of
709 sparc_get_pc.
710 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
711 (the_low_target): Use linux_get_pc_64bit and
712 linux_set_pc_64bit.
713
714 2016-01-18 Yao Qi <yao.qi@linaro.org>
715
716 * linux-arm-low.c (debug_threads): Remove declaration.
717 (arm_get_pc, arm_set_pc): Remove.
718 (the_low_target): Use linux_get_pc_32bit and
719 linux_set_pc_32bit.
720 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
721 (the_low_target): Use linux_get_pc_32bit and
722 linux_set_pc_32bit.
723 * linux-cris-low.c (debug_threads): Remove declaration.
724 (cris_get_pc, cris_set_pc,): Remove.
725 (the_low_target): Use linux_get_pc_32bit and
726 linux_set_pc_32bit.
727 * linux-crisv32-low.c (debug_threads): Remove declaration.
728 (cris_get_pc, cris_set_pc): Remove.
729 (the_low_target): Use linux_get_pc_32bit and
730 linux_set_pc_32bit.
731 * linux-low.c: Include inttypes.h.
732 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
733 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
734 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
735 (the_low_target): Use linux_get_pc_32bit and
736 linux_set_pc_32bit.
737 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
738 (the_low_target): Use linux_get_pc_32bit and
739 linux_set_pc_32bit.
740 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
741 (the_low_target): Use linux_get_pc_32bit and
742 linux_set_pc_32bit.
743 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
744 (the_low_target): Use linux_get_pc_32bit and
745 linux_set_pc_32bit.
746 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
747 (the_low_target): Use linux_get_pc_32bit and
748 linux_set_pc_32bit.
749
750 2016-01-18 Gary Benson <gbenson@redhat.com>
751
752 * configure.ac (AC_FUNC_FORK): New check.
753 * config.in: Regenerate.
754 * configure: Likewise.
755
756 2016-01-14 Yao Qi <yao.qi@linaro.org>
757
758 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
759 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
760 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
761 arm_get_next_pcs_ctor.
762
763 2016-01-12 Josh Stone <jistone@redhat.com>
764 Philippe Waroquiers <philippe.waroquiers@skynet.be>
765
766 * inferiors.h: Include "gdb_vecs.h".
767 (struct process_info): Add syscalls_to_catch.
768 * inferiors.c (remove_process): Free syscalls_to_catch.
769 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
770 syscall_return stops.
771 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
772 * server.c (handle_general_set): Handle QCatchSyscalls.
773 (handle_query): Report support for QCatchSyscalls.
774 * target.h (struct target_ops): Add supports_catch_syscall.
775 (target_supports_catch_syscall): New macro.
776 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
777 (struct lwp_info): Add syscall_state.
778 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
779 Maintain syscall_state and syscalls_to_catch across exec.
780 (get_syscall_trapinfo): New function, proxy to the_low_target.
781 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
782 (linux_low_filter_event): Toggle syscall_state entry/return for
783 syscall traps, and set it ignored for all others.
784 (gdb_catching_syscalls_p): New function.
785 (gdb_catch_this_syscall_p): New function.
786 (linux_wait_1): Handle SYSCALL_SIGTRAP.
787 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
788 (linux_supports_catch_syscall): New function.
789 (linux_target_ops): Install it.
790 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
791 (the_low_target): Install it.
792
793 2016-01-12 Mike Frysinger <vapier@gentoo.org>
794
795 * acinclude.m4: Include new ../warning.m4 file.
796 * configure: Regenerated.
797 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
798
799 2016-01-12 Mike Frysinger <vapier@gentoo.org>
800
801 * ax.c (is_goto_target): Mark static.
802 * linux-low.c (register_addr): Likewise.
803 (linux_fetch_registers, linux_store_registers): Likewise.
804 * mem-break.c (any_persistent_commands): Fix old prototype.
805 (add_commands_to_breakpoint): Mark static.
806 * regcache.c (find_register_by_name): Delete unused func.
807 * remote-utils.c (hex_or_minus_one): Mark static.
808 * server.c (monitor_show_help): Mark static.
809 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
810 handle_v_requests): Likewise.
811
812 2016-01-12 Pedro Alves <palves@redhat.com>
813
814 Remove use of the registered trademark symbol throughout.
815
816 2016-01-08 Yao Qi <yao.qi@linaro.org>
817
818 * remote-utils.c (getpkt): If c is '\003', call target hook
819 request_interrupt.
820
821 2016-01-06 Yao Qi <yao.qi@linaro.org>
822
823 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
824 linux-aarch32-low.c.
825 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
826 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
827 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
828 (thumb2_breakpoint): Declare.
829 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
830 linux-aarch32-low.h.
831 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
832 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
833 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
834
835 2016-01-01 Joel Brobecker <brobecker@adacore.com>
836
837 * gdbreplay.c (gdbreplay_version): Change copyright year in
838 version message.
839 * server.c (gdbserver_version): Likewise.
840
841 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
842
843 * server.c (crc32_table): Delete.
844 (crc32): Use libiberty's xcrc32 function.
845
846 2015-12-22 Joel Brobecker <brobecker@adacore.com>
847
848 * lynx-low.c (lynx_delete_thread_callback): New function.
849 (lynx_mourn): Properly delete our process and all of its
850 threads. Remove call to clear_inferiors.
851
852 2015-12-22 Joel Brobecker <brobecker@adacore.com>
853
854 * target.c (thread_search_callback): Add check that
855 the thread_stopped target callback is not NULL before
856 calling it.
857
858 2015-12-21 Yao Qi <yao.qi@linaro.org>
859
860 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
861 arm breakpoint.
862
863 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
864
865 * server.c (handle_query): Call target_supports_software_single_step.
866
867 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
868
869 * linux-low.c (single_step): New function.
870 (linux_resume_one_lwp_throw): Call single_step.
871 (start_step_over): Likewise.
872
873 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
874
875 * Makefile.in (SFILES): Append arch/arm-linux.c,
876 arch/arm-get-next-pcs.c.
877 (arm-linux.o): New rule.
878 (arm-get-next-pcs.o): New rule.
879 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
880 arm-linux.o.
881 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
882 to linux-aarch32-low.c.
883 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
884 (arm_breakpoint_len, thumb_breakpoint): Likewise.
885 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
886 (thumb2_breakpoint_len): Likewise.
887 (arm_is_thumb_mode): Make non-static.
888 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
889 from linux-aarch32-low.c.
890 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
891 (arm_breakpoint_len, thumb_breakpoint): Likewise.
892 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
893 (thumb2_breakpoint_len): Likewise.
894 (arm_is_thumb_mode): New declaration.
895 * linux-arm-low.c: Include arch/arm-linux.h
896 aarch/arm-get-next-pcs.h, sys/syscall.h.
897 (get_next_pcs_ops): New struct.
898 (get_next_pcs_addr_bits_remove): New function.
899 (get_next_pcs_is_thumb): New function.
900 (get_next_pcs_read_memory_unsigned_integer): Likewise.
901 (arm_sigreturn_next_pc): Likewise.
902 (get_next_pcs_syscall_next_pc): Likewise.
903 (arm_gdbserver_get_next_pcs): Likewise.
904 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
905 Initialize.
906 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
907 * server.h: Include gdb_vecs.h.
908
909 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
910
911 * Makefile.in (SFILES): Append common/common-regcache.c.
912 (OBS): Append common-regcache.o.
913 (common-regcache.o): New rule.
914 * regcache.c (init_register_cache): Initialize cache to
915 REG_UNAVAILABLE.
916 (regcache_raw_read_unsigned): New function.
917 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
918 register_status enum.
919
920 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
921
922 * linux-aarch64-low.c (the_low_targets): Rename
923 breakpoint_reinsert_addr to get_next_pcs.
924 * linux-arm-low.c (the_low_targets): Likewise.
925 * linux-bfin-low.c (the_low_targets): Likewise.
926 * linux-cris-low.c (the_low_targets): Likewise.
927 * linux-crisv32-low.c (the_low_targets): Likewise.
928 * linux-low.c (can_software_single_step): Likewise.
929 (install_software_single_step_breakpoints): New function.
930 (start_step_over): Use install_software_single_step_breakpoints.
931 * linux-low.h: New CORE_ADDR vector.
932 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
933 get_next_pcs.
934 * linux-mips-low.c (the_low_targets): Likewise.
935 * linux-nios2-low.c (the_low_targets): Likewise.
936 * linux-sparc-low.c (the_low_targets): Likewise.
937
938 2015-12-17 Pedro Alves <palves@redhat.com>
939
940 * linux-low.c (linux_kill_one_lwp): Remove references to
941 LinuxThreads.
942 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
943 to 'kill'.
944 (linux_init_signals): Delete.
945 (initialize_low): Adjust.
946 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
947
948 2015-12-16 Pedro Alves <palves@redhat.com>
949
950 * configure.ac (compiler warning flags): When testing a
951 -Wno-foo option, check whether -Wfoo works instead.
952 * configure: Regenerate.
953
954 2015-12-11 Don Breazeal <donb@codesourcery.com>
955
956 * server.c (process_serial_event): Don't exit from gdbserver
957 in remote mode if there are still active inferiors.
958
959 2015-12-11 Yao Qi <yao.qi@linaro.org>
960
961 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
962 arm_breakpoint_at if the process is 32-bit.
963
964 2015-12-11 Yao Qi <yao.qi@linaro.org>
965
966 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
967 arm breakpoint.
968
969 2015-12-07 Yao Qi <yao.qi@linaro.org>
970
971 * configure.srv: Append arm.o to srv_tgtobj for
972 aarch64*-*-linux* target.
973 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
974 from linux-arm-low.c.
975 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
976 (arm_breakpoint_len, thumb_breakpoint): Likewise.
977 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
978 (thumb2_breakpoint_len): Likewise.
979 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
980 (arm_breakpoint_kinds): Likewise.
981 (arm_breakpoint_kind_from_pc): Likewise.
982 (arm_sw_breakpoint_from_kind): Likewise.
983 (arm_breakpoint_kind_from_current_state): Likewise.
984 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
985 (arm_sw_breakpoint_from_kind): Declare.
986 (arm_breakpoint_kind_from_current_state): Declare.
987 (arm_breakpoint_at): Declare.
988 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
989 arm_sw_breakpoint_from_kind if process is 32-bit.
990 (aarch64_breakpoint_kind_from_pc): New function.
991 (aarch64_breakpoint_kind_from_current_state): New function.
992 (the_low_target): Initialize fields breakpoint_kind_from_pc
993 and breakpoint_kind_from_current_state.
994 * linux-arm-low.c (arm_breakpoint_kinds): Move to
995 linux-aarch32-low.c.
996 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
997 (arm_breakpoint, arm_breakpoint_len): Likewise.
998 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
999 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1000 (arm_is_thumb_mode): Likewise.
1001 (arm_breakpoint_at): Likewise.
1002 (arm_breakpoint_kind_from_pc): Likewise.
1003 (arm_sw_breakpoint_from_kind): Likewise.
1004 (arm_breakpoint_kind_from_current_state): Likewise.
1005
1006 Revert:
1007 2015-08-04 Yao Qi <yao.qi@linaro.org>
1008
1009 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1010 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1011 * server.c (extended_protocol): Remove "static".
1012 * server.h (extended_protocol): Declare it.
1013
1014 2015-12-04 Josh Stone <jistone@redhat.com>
1015
1016 * target.h (struct target_ops) <arch_setup>: Rename to ...
1017 (struct target_ops) <post_create_inferior>: ... this.
1018 (target_arch_setup): Rename to ...
1019 (target_post_create_inferior): ... this, calling post_create_inferior.
1020 * server.c (start_inferior): Update target_arch_setup calls to
1021 target_post_create_inferior.
1022 * linux-low.c (linux_low_ptrace_options): Forward declare.
1023 (linux_arch_setup): Update its comment for general use.
1024 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1025 (struct linux_target_ops): Use linux_post_create_inferior.
1026 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1027 to post_create_inferior.
1028 * nto-low.c (struct nto_target_ops): Likewise.
1029 * spu-low.c (struct spu_target_ops): Likewise.
1030 * win32-low.c (struct win32_target_ops): Likewise.
1031
1032 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1033
1034 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1035
1036 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1037
1038 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1039 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1040 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1041 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1042 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1043 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1044 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1045 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1046 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1047 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1048 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1049 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1050
1051 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1052
1053 * linux-low.c (linux_look_up_symbols): Don't call
1054 linux_supports_traceclone.
1055 * linux-low.h (thread_db_init): Remove use_events argument.
1056 * thread-db.c (thread_db_use_event): Remove global variable.
1057 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1058 (struct thread_db) <td_create_bp>: Remove field.
1059 (thread_db_create_event): Remove function.
1060 (thread_db_enable_reporting): Likewise.
1061 (find_one_thread): Don't check for thread_db_use_events.
1062 (attach_thread): Likewise.
1063 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1064 (try_thread_db_load_1): Don't check for thread_db_use_events.
1065 (thread_db_init): Remove use_events argument and thread events
1066 handling.
1067 (remove_thread_event_breakpoints): Remove function.
1068 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1069
1070 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1071
1072 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1073 New function.
1074 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1075 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1076 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1077 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1078 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1079 Initialize.
1080 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1081 New function.
1082 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1083 * linux-low.c (can_hardware_single_step): Use
1084 supports_hardware_single_step.
1085 (can_software_single_step): New function.
1086 (start_step_over): Call can_software_single_step.
1087 (linux_supports_hardware_single_step): New function.
1088 (struct target_ops) <supports_software_single_step>: Initialize.
1089 * linux-low.h (struct linux_target_ops)
1090 <supports_hardware_single_step>: Initialize.
1091 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1092 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1093 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1094 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1095 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1096 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1097 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1098 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1099 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1100 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1101 Initialize.
1102 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1103 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1104 Initialize.
1105 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1106 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1107 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1108 New function.
1109 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1110 * target.h (struct target_ops): <supports_software_single_step>:
1111 New field.
1112 (target_supports_software_single_step): New macro.
1113
1114 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1115
1116 * linux-low.c (linux_wait_1): Fix pc advance condition.
1117 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1118 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1119
1120 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1121
1122 * linux-arm-low.c (arm_is_thumb_mode): New function.
1123 (arm_breakpoint_at): Use arm_is_thumb_mode.
1124 (arm_breakpoint_kind_from_current_state): New function.
1125 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1126 Initialize.
1127 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1128 (linux_breakpoint_kind_from_current_state): New function.
1129 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1130 * linux-low.h (struct linux_target_ops)
1131 <breakpoint_kind_from_current_state>: New field.
1132 * target.h (struct target_ops): Likewise.
1133 (target_breakpoint_kind_from_current_state): New macro.
1134
1135 2015-11-30 Pedro Alves <palves@redhat.com>
1136
1137 * linux-low.c (linux_resume): Wake up the event loop before
1138 returning.
1139
1140 2015-11-30 Pedro Alves <palves@redhat.com>
1141
1142 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1143 check.
1144 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1145 to -1.
1146 * target.c (struct thread_search): New structure.
1147 (thread_search_callback): New function.
1148 (prev_general_thread): New global.
1149 (prepare_to_access_memory, done_accessing_memory): New functions.
1150 * target.h (prepare_to_access_memory, done_accessing_memory):
1151 Replace macros with function declarations.
1152
1153 2015-11-30 Pedro Alves <palves@redhat.com>
1154
1155 PR 14618
1156 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1157 report TARGET_WAITKIND_NO_RESUMED.
1158 * remote-utils.c (prepare_resume_reply): Handle
1159 TARGET_WAITKIND_NO_RESUMED.
1160 * server.c (report_no_resumed): New global.
1161 (handle_query) <qSupported>: Handle "no-resumed+". Report
1162 "no-resumed+" support.
1163 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1164 return error if the client doesn't support no-resumed events.
1165 (push_stop_notification): New function.
1166 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1167 events if the client supports them.
1168
1169 2015-11-30 Pedro Alves <palves@redhat.com>
1170
1171 * linux-low.c (thread_still_has_status_pending_p): Don't check
1172 vCont;t here.
1173 (lwp_resumed): New function.
1174 (status_pending_p_callback): Return early if the LWP is not
1175 supposed to be resumed.
1176
1177 2015-11-30 Pedro Alves <palves@redhat.com>
1178
1179 * linux-low.c (handle_extended_wait): Assert that the LWP's
1180 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1181 thread create events, leave the new child's status pending.
1182 (linux_low_filter_event): If GDB wants to hear about thread exit
1183 events, leave the LWP marked dead and don't delete it.
1184 (linux_wait_for_event_filtered): Don't check for thread exit.
1185 (filter_exit_event): New function.
1186 (linux_wait_1): Use it, when returning an exit event.
1187 (linux_resume_one_lwp_throw): Assert that the LWP's
1188 waitstatus is TARGET_WAITKIND_IGNORE.
1189 * remote-utils.c (prepare_resume_reply): Handle
1190 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1191 * server.c (report_thread_events): New global.
1192 (handle_general_set): Handle QThreadEvents.
1193 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1194 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1195 TARGET_WAITKIND_THREAD_EXITED.
1196 * server.h (report_thread_events): Declare.
1197
1198 2015-11-30 Pedro Alves <palves@redhat.com>
1199
1200 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1201 the thread's last_resume_kind was resume_stop.
1202
1203 2015-11-30 Pedro Alves <palves@redhat.com>
1204
1205 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1206 before returning.
1207
1208 2015-11-30 Pedro Alves <palves@redhat.com>
1209
1210 * server.c (handle_v_requests): Handle vCtrlC.
1211
1212 2015-11-30 Pedro Alves <palves@redhat.com>
1213
1214 * gdbthread.h (find_any_thread_of_pid): Declare.
1215 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1216 functions.
1217 * server.c (handle_query): If current_thread is NULL, look for
1218 another thread of the selected process.
1219
1220 2015-11-26 Daniel Colascione <dancol@dancol.org>
1221 Simon Marchi <simon.marchi@ericsson.com>
1222
1223 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1224 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1225 name in reply.
1226 * target.h (struct target_ops) <thread_name>: New field.
1227 (target_thread_name): New macro.
1228
1229 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1230
1231 * regcache.h (regcache_invalidate_pid): Add declaration.
1232 * regcache.c (regcache_invalidate_pid): New function, extracted
1233 from regcache_invalidate.
1234 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1235 Add trivial documentation comment.
1236 * lynx-low.c: Use regcache_invalidate_pid instead of
1237 regcache_invalidate.
1238
1239 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1240
1241 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1242 and Elf64_auxv_t if the target is Android.
1243
1244 2015-11-22 Doug Evans <xdje42@gmail.com>
1245
1246 * target.h: #include <sys/types.h>.
1247
1248 2015-11-19 Pedro Alves <palves@redhat.com>
1249
1250 * linux-low.c (linux_process_qsupported): Change prototype.
1251 Adjust.
1252 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1253 Change prototype.
1254 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1255 and adjust to loop over all features.
1256 * server.c (handle_query) <qSupported>: Adjust to call
1257 target_process_qsupported once, passing it a vector of unprocessed
1258 features.
1259 * target.h (struct target_ops) <process_qsupported>: Change
1260 prototype.
1261 (target_process_qsupported): Adjust.
1262
1263 2015-11-19 Pedro Alves <palves@redhat.com>
1264
1265 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1266 mode.
1267 * configure: Regenerate.
1268
1269 2015-11-19 Pedro Alves <palves@redhat.com>
1270
1271 * configure: Regenerate.
1272
1273 2015-11-19 Yao Qi <yao.qi@linaro.org>
1274
1275 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1276 type to uint32_t.
1277
1278 2015-11-19 Yao Qi <yao.qi@linaro.org>
1279
1280 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1281 (struct aarch64_operand): Move enum out.
1282
1283 2015-11-19 Yao Qi <yao.qi@linaro.org>
1284
1285 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1286 struct user_fpsimd_state *.
1287 (aarch64_store_fpregset): Likewise.
1288
1289 2015-11-19 Yao Qi <yao.qi@linaro.org>
1290
1291 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1292 struct user_pt_regs *.
1293 (aarch64_store_gregset): Likewise.
1294
1295 2015-11-18 Pedro Alves <palves@redhat.com>
1296
1297 * Makefile.in (all_object_files): Add $IPA_OBJS.
1298
1299 2015-11-17 Pedro Alves <palves@redhat.com>
1300
1301 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1302 GDB_SIGNAL_0 and gdb_signal_to_string.
1303
1304 2015-11-17 Pedro Alves <palves@redhat.com>
1305
1306 * win32-low.c (handle_output_debug_string): Remove parameter.
1307 (win32_kill): Remove our_status local and adjust call to
1308 handle_output_debug_string.
1309 (get_child_debug_event): Adjust call to
1310 handle_output_debug_string.
1311
1312 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1313
1314 * linux-mips-low.c (mips_fill_gregset): Add cast.
1315 (mips_store_gregset): Likewise.
1316 (mips_fill_fpregset): Likewise.
1317 (mips_store_fpregset): Likewise.
1318
1319 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1320
1321 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1322 priv.
1323
1324 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1325
1326 * linux-mips-low.c (mips_linux_new_thread): Change type of
1327 watch_type to enum target_hw_bp_type.
1328
1329 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1330
1331 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1332 Change return type to arm_hwbp_type.
1333
1334 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1335
1336 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1337 (arm_store_gregset): Likewise.
1338 * linux-arm-low.c (arm_get_hwcap): Likewise.
1339 (arm_read_description): Likewise.
1340
1341 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1342
1343 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1344
1345 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1346
1347 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1348 (ppc_fill_vsxregset): Likewise.
1349 (ppc_store_vsxregset): Likewise.
1350 (ppc_fill_vrregset): Likewise.
1351 (ppc_store_vrregset): Likewise.
1352 (ppc_fill_evrregset): Likewise.
1353 (ppc_store_evrregset): Likewise.
1354
1355 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1356
1357 * linux-ppc-low.c (ppc_usrregs_info): Remove
1358 forward-declaration.
1359 (ppc_arch_setup): Move lower in file.
1360
1361 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1362
1363 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1364 (ps_pdwrite): Likewise.
1365
1366 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1367
1368 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1369 to after assert checks.
1370
1371 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1372
1373 * proc-service.c (ps_pdread): Add/adjust casts.
1374 (ps_pdwrite): Add/adjust casts.
1375
1376 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1377
1378 * server.c (handle_search_memory_1): Cast return value of
1379 memmem.
1380
1381 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1382
1383 * server.c (write_qxfer_response): Change type of data to
1384 gdb_byte *.
1385
1386 2015-10-29 Pedro Alves <palves@redhat.com>
1387
1388 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1389
1390 2015-10-29 Pedro Alves <palves@redhat.com>
1391
1392 * tracepoint.c (clear_installed_tracepoints): Add casts.
1393
1394 2015-10-29 Pedro Alves <palves@redhat.com>
1395
1396 * server.c (handle_v_cont, process_serial_event): Add enum
1397 gdb_signal casts to signal parsing code.
1398
1399 2015-10-29 Pedro Alves <palves@redhat.com>
1400
1401 * linux-low.h (NULL_REGSET): Define.
1402 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1403 * linux-arm-low.c (arm_regsets): Likewise.
1404 * linux-crisv32-low.c (cris_regsets): Likewise.
1405 * linux-m68k-low.c (m68k_regsets): Likewise.
1406 * linux-mips-low.c (mips_regsets): Likewise.
1407 * linux-nios2-low.c (nios2_regsets): Likewise.
1408 * linux-ppc-low.c (ppc_regsets): Likewise.
1409 * linux-s390-low.c (s390_regsets): Likewise.
1410 * linux-sh-low.c (sh_regsets): Likewise.
1411 * linux-sparc-low.c (sparc_regsets): Likewise.
1412 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1413 * linux-tile-low.c (tile_regsets): Likewise.
1414 * linux-x86-low.c (x86_regsets): Likewise.
1415 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1416
1417 2015-10-29 Pedro Alves <palves@redhat.com>
1418
1419 * linux-low.h (NULL_REGSET): Define.
1420 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1421 * linux-arm-low.c (arm_regsets): Likewise.
1422 * linux-crisv32-low.c (cris_regsets): Likewise.
1423 * linux-m68k-low.c (m68k_regsets): Likewise.
1424 * linux-mips-low.c (mips_regsets): Likewise.
1425 * linux-nios2-low.c (nios2_regsets): Likewise.
1426 * linux-ppc-low.c (ppc_regsets): Likewise.
1427 * linux-s390-low.c (s390_regsets): Likewise.
1428 * linux-sh-low.c (sh_regsets): Likewise.
1429 * linux-sparc-low.c (sparc_regsets): Likewise.
1430 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1431 * linux-tile-low.c (tile_regsets): Likewise.
1432 * linux-x86-low.c (x86_regsets): Likewise.
1433 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1434
1435 2015-10-26 Doug Evans <dje@google.com>
1436
1437 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1438
1439 2015-10-26 Doug Evans <dje@google.com>
1440
1441 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1442
1443 2015-10-26 Doug Evans <dje@google.com>
1444
1445 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1446 for debug_printf.
1447 (attach_thread, find_new_threads_callback): Ditto.
1448
1449 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1450
1451 * mem-break.h (set_breakpoint_data): Remove.
1452
1453 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1454
1455 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1456 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1457 (initialize_low): Remove set_breakpoint_data call.
1458 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1459 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1460 (initialize_low): Remove set_breakpoint_data call.
1461 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1462 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1463 (initialize_low): Remove set_breakpoint_data call.
1464
1465 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1466
1467 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1468 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1469 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1470 * target.h (target_breakpoint_kind_from_pc): New macro.
1471
1472 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1473
1474 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1475 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1476 the default breakpoint kind.
1477
1478 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1479
1480 * linux-arm-low.c (arm_supports_z_point_type): Add software
1481 breakpoint support.
1482
1483 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1484
1485 * linux-arm-low.c: Refactor breakpoint definitions.
1486 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1487 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1488
1489 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1490
1491 * Makefile.in: Add arm.c/o.
1492 * configure.srv: Likewise.
1493 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1494 (arm_breakpoint_kind_from_pc): New function.
1495 (arm_sw_breakpoint_from_kind): Return proper kind.
1496 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1497
1498 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1499
1500 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1501 removal.
1502 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1503 (struct raw_breakpoint) <size>: Remove.
1504 (struct raw_breakpoint) <kind>: Add.
1505 (bp_size): New function.
1506 (bp_opcode): Likewise.
1507 (find_raw_breakpoint_at): Adjust for kind.
1508 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1509 (remove_memory_breakpoint): Adjust for kind call bp_size.
1510 (set_raw_breakpoint_at): Adjust for kind.
1511 (set_breakpoint): Likewise.
1512 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1513 (delete_raw_breakpoint): Adjust for kind.
1514 (delete_breakpoint): Likewise.
1515 (find_gdb_breakpoint): Likewise.
1516 (set_gdb_breakpoint_1): Likewise.
1517 (set_gdb_breakpoint): Likewise.
1518 (delete_gdb_breakpoint_1): Likewise.
1519 (delete_gdb_breakpoint): Likewise.
1520 (uninsert_raw_breakpoint): Likewise.
1521 (reinsert_raw_breakpoint): Likewise.
1522 (set_breakpoint_data): Remove.
1523 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1524 (check_mem_read): Adjust for kind call bp_size.
1525 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1526 (clone_one_breakpoint): Adjust for kind.
1527 * mem-break.h (set_gdb_breakpoint): Likewise.
1528 (delete_gdb_breakpoint): Likewise.
1529 * server.c (process_serial_event): Likewise.
1530
1531 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1532
1533 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1534 (struct linux_target_ops) <breakpoint>: Remove.
1535 (struct linux_target_ops) <breakpoint_len>: Remove.
1536 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1537 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1538 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1539 (arm_sw_breakpoint_from_kind): New function.
1540 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1541 (struct linux_target_ops) <breakpoint>: Remove.
1542 (struct linux_target_ops) <breakpoint_len>: Remove.
1543 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1544 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1545 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1546 (struct linux_target_ops) <breakpoint>: Remove.
1547 (struct linux_target_ops) <breakpoint_len>: Remove.
1548 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1549 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1550 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1551 (struct linux_target_ops) <breakpoint>: Remove.
1552 (struct linux_target_ops) <breakpoint_len>: Remove.
1553 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1554 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1555 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1556 and sw_breakpoint_from_kind to increment the pc.
1557 (linux_breakpoint_kind_from_pc): New function.
1558 (linux_sw_breakpoint_from_kind): New function.
1559 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1560 (initialize_low): Call breakpoint_kind_from_pc and
1561 sw_breakpoint_from_kind to replace breakpoint_data/len.
1562 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1563 New field.
1564 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1565 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1566 (struct linux_target_ops) <breakpoint>: Remove.
1567 (struct linux_target_ops) <breakpoint_len>: Remove.
1568 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1569 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1570 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1571 (struct linux_target_ops) <breakpoint>: Remove.
1572 (struct linux_target_ops) <breakpoint_len>: Remove.
1573 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1574 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1575 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1576 (struct linux_target_ops) <breakpoint>: Remove.
1577 (struct linux_target_ops) <breakpoint_len>: Remove.
1578 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1579 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1580 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1581 (struct linux_target_ops) <breakpoint>: Remove.
1582 (struct linux_target_ops) <breakpoint_len>: Remove.
1583 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1584 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1585 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1586 (struct linux_target_ops) <breakpoint>: Remove.
1587 (struct linux_target_ops) <breakpoint_len>: Remove.
1588 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1589 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1590 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1591 (struct linux_target_ops) <breakpoint>: Remove.
1592 (struct linux_target_ops) <breakpoint_len>: Remove.
1593 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1594 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1595 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1596 (struct linux_target_ops) <breakpoint>: Remove.
1597 (struct linux_target_ops) <breakpoint_len>: Remove.
1598 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1599 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1600 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1601 (struct linux_target_ops) <breakpoint>: Remove.
1602 (struct linux_target_ops) <breakpoint_len>: Remove.
1603 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1604 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1605 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1606 (struct linux_target_ops) <breakpoint>: Remove.
1607 (struct linux_target_ops) <breakpoint_len>: Remove.
1608 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1609 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1610 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1611 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1612 (struct linux_target_ops) <breakpoint>: Remove.
1613 (struct linux_target_ops) <breakpoint_len>: Remove.
1614 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1615 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1616 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1617 (struct linux_target_ops) <breakpoint>: Remove.
1618 (struct linux_target_ops) <breakpoint_len>: Remove.
1619 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1620 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1621
1622 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1623
1624 * linux-cris-low.c (cris_get_pc): Remove void arg.
1625
1626 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1627
1628 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1629 variable name.
1630
1631 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1632
1633 * inferiors.c (thread_pid_matches_callback): New function.
1634 (find_thread_process): New function.
1635 (remove_thread): Reset current_thread.
1636 (remove_process): Assert threads have been removed first.
1637
1638 2015-10-15 Yao Qi <yao.qi@linaro.org>
1639
1640 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1641 if it is 3.
1642 (aarch64_remove_point): Likewise.
1643 * regcache.c (regcache_register_size): New function.
1644
1645 2015-10-12 Yao Qi <yao.qi@linaro.org>
1646
1647 * linux-aarch64-low.c: Update all callers as emit_load_store
1648 is renamed to aarch64_emit_load_store.
1649
1650 2015-10-12 Yao Qi <yao.qi@linaro.org>
1651
1652 * linux-aarch64-low.c: Update all callers of function renaming
1653 from emit_insn to aarch64_emit_insn.
1654
1655 2015-10-12 Yao Qi <yao.qi@linaro.org>
1656
1657 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1658 arch/aarch64-insn.h.
1659 (struct aarch64_memory_operand): Likewise.
1660 (ENCODE): Likewise.
1661 (emit_insn): Move to arch/aarch64-insn.c.
1662 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1663 (emit_load_store): Move to arch/aarch64-insn.c.
1664 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1665 (can_encode_int32): Remove.
1666
1667 2015-10-12 Yao Qi <yao.qi@linaro.org>
1668
1669 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1670 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1671 (aarch64_relocate_instruction): Likewise.
1672 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1673 (struct aarch64_insn_visitor): Likewise.
1674
1675 2015-10-12 Yao Qi <yao.qi@linaro.org>
1676
1677 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1678 (struct aarch64_insn_visitor): New.
1679 (struct aarch64_insn_relocation_data): New.
1680 (aarch64_ftrace_insn_reloc_b): New function.
1681 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1682 (aarch64_ftrace_insn_reloc_cb): Likewise.
1683 (aarch64_ftrace_insn_reloc_tb): Likewise.
1684 (aarch64_ftrace_insn_reloc_adr): Likewise.
1685 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1686 (aarch64_ftrace_insn_reloc_others): Likewise.
1687 (visitor): New.
1688 (aarch64_relocate_instruction): Use visitor.
1689
1690 2015-10-12 Yao Qi <yao.qi@linaro.org>
1691
1692 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1693 int. Add argument buf.
1694 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1695 aarch64_relocate_instruction.
1696
1697 2015-10-12 Yao Qi <yao.qi@linaro.org>
1698
1699 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1700 argument insn. Remove local variable insn. Don't call
1701 target_read_uint32.
1702 (aarch64_install_fast_tracepoint_jump_pad): Call
1703 target_read_uint32.
1704
1705 2015-09-30 Yao Qi <yao.qi@linaro.org>
1706
1707 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1708 (emit_load_store_pair): Likewise.
1709
1710 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1711
1712 * dll.c (match_dll): Add cast(s).
1713 (unloaded_dll): Likewise.
1714 * linux-low.c (second_thread_of_pid_p): Likewise.
1715 (delete_lwp_callback): Likewise.
1716 (count_events_callback): Likewise.
1717 (select_event_lwp_callback): Likewise.
1718 (linux_set_resume_request): Likewise.
1719 * server.c (accumulate_file_name_length): Likewise.
1720 (emit_dll_description): Likewise.
1721 (handle_qxfer_threads_worker): Likewise.
1722 (visit_actioned_threads): Likewise.
1723 * thread-db.c (any_thread_of): Likewise.
1724 * tracepoint.c (same_process_p): Likewise.
1725 (match_blocktype): Likewise.
1726 (build_traceframe_info_xml): Likewise.
1727
1728 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1729
1730 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1731 assignment.
1732 (gdb_unparse_agent_expr): Likewise.
1733 * hostio.c (require_data): Likewise.
1734 (handle_pread): Likewise.
1735 * linux-low.c (disable_regset): Likewise.
1736 (fetch_register): Likewise.
1737 (store_register): Likewise.
1738 (get_dynamic): Likewise.
1739 (linux_qxfer_libraries_svr4): Likewise.
1740 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1741 (set_fast_tracepoint_jump): Likewise.
1742 (uninsert_fast_tracepoint_jumps_at): Likewise.
1743 (reinsert_fast_tracepoint_jumps_at): Likewise.
1744 (validate_inserted_breakpoint): Likewise.
1745 (clone_agent_expr): Likewise.
1746 * regcache.c (init_register_cache): Likewise.
1747 * remote-utils.c (putpkt_binary_1): Likewise.
1748 (decode_M_packet): Likewise.
1749 (decode_X_packet): Likewise.
1750 (look_up_one_symbol): Likewise.
1751 (relocate_instruction): Likewise.
1752 (monitor_output): Likewise.
1753 * server.c (handle_search_memory): Likewise.
1754 (handle_qxfer_exec_file): Likewise.
1755 (handle_qxfer_libraries): Likewise.
1756 (handle_qxfer): Likewise.
1757 (handle_query): Likewise.
1758 (handle_v_cont): Likewise.
1759 (handle_v_run): Likewise.
1760 (captured_main): Likewise.
1761 * target.c (write_inferior_memory): Likewise.
1762 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1763 * tracepoint.c (init_trace_buffer): Likewise.
1764 (add_tracepoint_action): Likewise.
1765 (add_traceframe): Likewise.
1766 (add_traceframe_block): Likewise.
1767 (cmd_qtdpsrc): Likewise.
1768 (cmd_qtdv): Likewise.
1769 (cmd_qtstatus): Likewise.
1770 (response_source): Likewise.
1771 (response_tsv): Likewise.
1772 (cmd_qtnotes): Likewise.
1773 (gdb_collect): Likewise.
1774 (initialize_tracepoint): Likewise.
1775
1776 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1777
1778 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1779 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1780 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1781 <NOP>: New.
1782 (enum aarch64_condition_codes): New enum.
1783 (w0): New static global.
1784 (fp): Likewise.
1785 (lr): Likewise.
1786 (struct aarch64_memory_operand) <type>: New
1787 MEMORY_OPERAND_POSTINDEX type.
1788 (postindex_memory_operand): New helper function.
1789 (emit_ret): New function.
1790 (emit_load_store_pair): New function, factored out of emit_stp
1791 with support for MEMORY_OPERAND_POSTINDEX.
1792 (emit_stp): Rewrite using emit_load_store_pair.
1793 (emit_ldp): New function.
1794 (emit_load_store): Likewise.
1795 (emit_ldr): Mention post-index instruction in comment.
1796 (emit_ldrh): New function.
1797 (emit_ldrb): New function.
1798 (emit_ldrsw): Mention post-index instruction in comment.
1799 (emit_str): Likewise.
1800 (emit_subs): New function.
1801 (emit_cmp): Likewise.
1802 (emit_and): Likewise.
1803 (emit_orr): Likewise.
1804 (emit_orn): Likewise.
1805 (emit_eor): Likewise.
1806 (emit_mvn): Likewise.
1807 (emit_lslv): Likewise.
1808 (emit_lsrv): Likewise.
1809 (emit_asrv): Likewise.
1810 (emit_mul): Likewise.
1811 (emit_sbfm): Likewise.
1812 (emit_sbfx): Likewise.
1813 (emit_ubfm): Likewise.
1814 (emit_ubfx): Likewise.
1815 (emit_csinc): Likewise.
1816 (emit_cset): Likewise.
1817 (emit_nop): Likewise.
1818 (emit_ops_insns): New helper function.
1819 (emit_pop): Likewise.
1820 (emit_push): Likewise.
1821 (aarch64_emit_prologue): New function.
1822 (aarch64_emit_epilogue): Likewise.
1823 (aarch64_emit_add): Likewise.
1824 (aarch64_emit_sub): Likewise.
1825 (aarch64_emit_mul): Likewise.
1826 (aarch64_emit_lsh): Likewise.
1827 (aarch64_emit_rsh_signed): Likewise.
1828 (aarch64_emit_rsh_unsigned): Likewise.
1829 (aarch64_emit_ext): Likewise.
1830 (aarch64_emit_log_not): Likewise.
1831 (aarch64_emit_bit_and): Likewise.
1832 (aarch64_emit_bit_or): Likewise.
1833 (aarch64_emit_bit_xor): Likewise.
1834 (aarch64_emit_bit_not): Likewise.
1835 (aarch64_emit_equal): Likewise.
1836 (aarch64_emit_less_signed): Likewise.
1837 (aarch64_emit_less_unsigned): Likewise.
1838 (aarch64_emit_ref): Likewise.
1839 (aarch64_emit_if_goto): Likewise.
1840 (aarch64_emit_goto): Likewise.
1841 (aarch64_write_goto_address): Likewise.
1842 (aarch64_emit_const): Likewise.
1843 (aarch64_emit_call): Likewise.
1844 (aarch64_emit_reg): Likewise.
1845 (aarch64_emit_pop): Likewise.
1846 (aarch64_emit_stack_flush): Likewise.
1847 (aarch64_emit_zero_ext): Likewise.
1848 (aarch64_emit_swap): Likewise.
1849 (aarch64_emit_stack_adjust): Likewise.
1850 (aarch64_emit_int_call_1): Likewise.
1851 (aarch64_emit_void_call_2): Likewise.
1852 (aarch64_emit_eq_goto): Likewise.
1853 (aarch64_emit_ne_goto): Likewise.
1854 (aarch64_emit_lt_goto): Likewise.
1855 (aarch64_emit_le_goto): Likewise.
1856 (aarch64_emit_gt_goto): Likewise.
1857 (aarch64_emit_ge_got): Likewise.
1858 (aarch64_emit_ops_impl): New static global variable.
1859 (aarch64_emit_ops): New target function, return
1860 &aarch64_emit_ops_impl.
1861 (struct linux_target_ops): Install it.
1862
1863 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1864
1865 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1866 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1867 aarch64-ipa.o.
1868 * linux-aarch64-ipa.c: New file.
1869 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1870 and endian.h.
1871 (aarch64_get_thread_area): New target method.
1872 (extract_signed_bitfield): New helper function.
1873 (aarch64_decode_ldr_literal): New function.
1874 (enum aarch64_opcodes): New enum.
1875 (struct aarch64_register): New struct.
1876 (struct aarch64_operand): New struct.
1877 (x0): New static global.
1878 (x1): Likewise.
1879 (x2): Likewise.
1880 (x3): Likewise.
1881 (x4): Likewise.
1882 (w2): Likewise.
1883 (ip0): Likewise.
1884 (sp): Likewise.
1885 (xzr): Likewise.
1886 (aarch64_register): New helper function.
1887 (register_operand): Likewise.
1888 (immediate_operand): Likewise.
1889 (struct aarch64_memory_operand): New struct.
1890 (offset_memory_operand): New helper function.
1891 (preindex_memory_operand): Likewise.
1892 (enum aarch64_system_control_registers): New enum.
1893 (ENCODE): New macro.
1894 (emit_insn): New helper function.
1895 (emit_b): New function.
1896 (emit_bcond): Likewise.
1897 (emit_cb): Likewise.
1898 (emit_tb): Likewise.
1899 (emit_blr): Likewise.
1900 (emit_stp): Likewise.
1901 (emit_ldp_q_offset): Likewise.
1902 (emit_stp_q_offset): Likewise.
1903 (emit_load_store): Likewise.
1904 (emit_ldr): Likewise.
1905 (emit_ldrsw): Likewise.
1906 (emit_str): Likewise.
1907 (emit_ldaxr): Likewise.
1908 (emit_stxr): Likewise.
1909 (emit_stlr): Likewise.
1910 (emit_data_processing_reg): Likewise.
1911 (emit_data_processing): Likewise.
1912 (emit_add): Likewise.
1913 (emit_sub): Likewise.
1914 (emit_mov): Likewise.
1915 (emit_movk): Likewise.
1916 (emit_mov_addr): Likewise.
1917 (emit_mrs): Likewise.
1918 (emit_msr): Likewise.
1919 (emit_sevl): Likewise.
1920 (emit_wfe): Likewise.
1921 (append_insns): Likewise.
1922 (can_encode_int32_in): New helper function.
1923 (aarch64_relocate_instruction): New function.
1924 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1925 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1926 (struct linux_target_ops): Install aarch64_get_thread_area,
1927 aarch64_install_fast_tracepoint_jump_pad and
1928 aarch64_get_min_fast_tracepoint_insn_len.
1929
1930 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1931
1932 * Makefile.in (aarch64-insn.o): New rule.
1933 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1934
1935 2015-09-21 Yao Qi <yao.qi@linaro.org>
1936
1937 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1938
1939 2015-09-21 Yao Qi <yao.qi@linaro.org>
1940
1941 * tracepoint.c (max_jump_pad_size): Remove.
1942
1943 2015-09-18 Yao Qi <yao.qi@linaro.org>
1944
1945 * linux-aarch64-low.c: Don't include sys/uio.h.
1946 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1947
1948 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1949
1950 * tracepoint.c (eval_result_type): Change prototype.
1951 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1952
1953 2015-09-15 Pedro Alves <palves@redhat.com>
1954
1955 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1956 Check whether to report exec events instead of checking whether
1957 multiprocess is enabled.
1958
1959 2015-09-15 Pedro Alves <palves@redhat.com>
1960
1961 PR remote/18965
1962 * remote-utils.c (prepare_resume_reply): Merge
1963 TARGET_WAITKIND_VFORK_DONE switch case with the
1964 TARGET_WAITKIND_FORKED case.
1965
1966 2015-09-15 Yao Qi <yao.qi@linaro.org>
1967
1968 * server.c (handle_query): Check string comparison using
1969 "else if" instead of "if".
1970
1971 2015-09-15 Yao Qi <yao.qi@linaro.org>
1972
1973 * server.c (vCont_supported): New global variable.
1974 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1975 matches. Append ";vContSupported+" to own_buf.
1976 (handle_v_requests): Append ";s;S" to own_buf if target supports
1977 hardware single step or vCont_supported is false.
1978 (capture_main): Set vCont_supported to zero.
1979
1980 2015-09-15 Yao Qi <yao.qi@linaro.org>
1981
1982 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1983 it to ...
1984 (linux_supports_hardware_single_step): ... New function.
1985 (linux_target_ops): Update.
1986 * lynx-low.c (lynx_target_ops): Set field
1987 supports_hardware_single_step to target_can_do_hardware_single_step.
1988 * nto-low.c (nto_target_ops): Likewise.
1989 * spu-low.c (spu_target_ops): Likewise.
1990 * win32-low.c (win32_target_ops): Likewise.
1991 * target.c (target_can_do_hardware_single_step): New function.
1992 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1993 Remove. <supports_hardware_single_step>: New field.
1994 (target_supports_conditional_breakpoints): Remove.
1995 (target_supports_hardware_single_step): New macro.
1996 (target_can_do_hardware_single_step): Declare.
1997 * server.c (handle_query): Use target_supports_hardware_single_step
1998 instead of target_supports_conditional_breakpoints.
1999
2000 2015-09-15 Yao Qi <yao.qi@linaro.org>
2001
2002 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2003 function.
2004 (struct linux_target_ops the_low_target): Install
2005 aarch64_linux_siginfo_fixup.
2006
2007 2015-09-11 Don Breazeal <donb@codesourcery.com>
2008 Luis Machado <lgustavo@codesourcery.com>
2009
2010 * linux-low.c (linux_mourn): Static declaration.
2011 (linux_arch_setup): Move in front of
2012 handle_extended_wait.
2013 (linux_arch_setup_thread): New function.
2014 (handle_extended_wait): Handle exec events. Call
2015 linux_arch_setup_thread. Make event_lwp argument a
2016 pointer-to-a-pointer.
2017 (check_zombie_leaders): Do not check stopped threads.
2018 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2019 (linux_low_filter_event): Add lwp and thread for exec'ing
2020 non-leader thread if leader thread has been deleted.
2021 Refactor code into linux_arch_setup_thread and call it.
2022 Pass child lwp pointer by reference to handle_extended_wait.
2023 (linux_wait_for_event_filtered): Update comment.
2024 (linux_wait_1): Prevent clobbering exec event status.
2025 (linux_supports_exec_events): New function.
2026 (linux_target_ops) <supports_exec_events>: Initialize new member.
2027 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2028 new member.
2029 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2030 * server.c (report_exec_events): New global variable.
2031 (handle_query): Handle qSupported query for exec-events feature.
2032 (captured_main): Initialize report_exec_events.
2033 * server.h (report_exec_events): Declare new global variable.
2034 * target.h (struct target_ops) <supports_exec_events>: New
2035 member.
2036 (target_supports_exec_events): New macro.
2037 * win32-low.c (win32_target_ops) <supports_exec_events>:
2038 Initialize new member.
2039
2040 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2041
2042 * linux-low.c (linux_low_enable_btrace): Remove.
2043 (linux_target_ops): Replace linux_low_enable_btrace with
2044 linux_enable_btrace.
2045
2046 2015-09-03 Yao Qi <yao.qi@linaro.org>
2047
2048 * linux-aarch64-low.c (aarch64_insert_point): Call
2049 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2050 returns true.
2051
2052 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2053
2054 * linux-low.c (check_stopped_by_breakpoint): Use
2055 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2056
2057 2015-08-27 Pedro Alves <palves@redhat.com>
2058
2059 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2060
2061 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2062
2063 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2064 the XNEW-family equivalent.
2065 (compile_bytecodes): Likewise.
2066 * dll.c (loaded_dll): Likewise.
2067 * event-loop.c (append_callback_event): Likewise.
2068 (create_file_handler): Likewise.
2069 (create_file_event): Likewise.
2070 * hostio.c (handle_open): Likewise.
2071 * inferiors.c (add_thread): Likewise.
2072 (add_process): Likewise.
2073 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2074 * linux-arm-low.c (arm_new_process): Likewise.
2075 (arm_new_thread): Likewise.
2076 * linux-low.c (add_to_pid_list): Likewise.
2077 (linux_add_process): Likewise.
2078 (handle_extended_wait): Likewise.
2079 (add_lwp): Likewise.
2080 (enqueue_one_deferred_signal): Likewise.
2081 (enqueue_pending_signal): Likewise.
2082 (linux_resume_one_lwp_throw): Likewise.
2083 (linux_resume_one_thread): Likewise.
2084 (linux_read_memory): Likewise.
2085 (linux_write_memory): Likewise.
2086 * linux-mips-low.c (mips_linux_new_process): Likewise.
2087 (mips_linux_new_thread): Likewise.
2088 (mips_add_watchpoint): Likewise.
2089 * linux-x86-low.c (initialize_low_arch): Likewise.
2090 * lynx-low.c (lynx_add_process): Likewise.
2091 * mem-break.c (set_raw_breakpoint_at): Likewise.
2092 (set_breakpoint): Likewise.
2093 (add_condition_to_breakpoint): Likewise.
2094 (add_commands_to_breakpoint): Likewise.
2095 (clone_agent_expr): Likewise.
2096 (clone_one_breakpoint): Likewise.
2097 * regcache.c (new_register_cache): Likewise.
2098 * remote-utils.c (look_up_one_symbol): Likewise.
2099 * server.c (queue_stop_reply): Likewise.
2100 (start_inferior): Likewise.
2101 (queue_stop_reply_callback): Likewise.
2102 (handle_target_event): Likewise.
2103 * spu-low.c (fetch_ppc_memory): Likewise.
2104 (store_ppc_memory): Likewise.
2105 * target.c (set_target_ops): Likewise.
2106 * thread-db.c (thread_db_load_search): Likewise.
2107 (try_thread_db_load_1): Likewise.
2108 * tracepoint.c (add_tracepoint): Likewise.
2109 (add_tracepoint_action): Likewise.
2110 (create_trace_state_variable): Likewise.
2111 (cmd_qtdpsrc): Likewise.
2112 (cmd_qtro): Likewise.
2113 (add_while_stepping_state): Likewise.
2114 * win32-low.c (child_add_thread): Likewise.
2115 (get_image_name): Likewise.
2116
2117 2015-08-25 Yao Qi <yao.qi@linaro.org>
2118
2119 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2120
2121 2015-08-25 Yao Qi <yao.qi@linaro.org>
2122
2123 * Makefile.in (aarch64-linux.o): New rule.
2124 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2125 srv_tgtobj.
2126 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2127 (aarch64_init_debug_reg_state): Make it extern.
2128 (aarch64_linux_prepare_to_resume): Remove.
2129
2130 2015-08-25 Yao Qi <yao.qi@linaro.org>
2131
2132 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2133 lwp_arch_private_info and ptid_of_lwp.
2134
2135 2015-08-25 Yao Qi <yao.qi@linaro.org>
2136
2137 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2138 Find proc_info by find_process_pid. All callers updated.
2139
2140 2015-08-25 Yao Qi <yao.qi@linaro.org>
2141
2142 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2143 Remove.
2144 (debug_reg_change_callback): Remove.
2145 (aarch64_notify_debug_reg_change): Remove.
2146
2147 2015-08-25 Yao Qi <yao.qi@linaro.org>
2148
2149 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2150 Call current_lwp_ptid.
2151
2152 2015-08-25 Yao Qi <yao.qi@linaro.org>
2153
2154 * linux-aarch64-low.c (debug_reg_change_callback): Use
2155 debug_printf.
2156
2157 2015-08-25 Yao Qi <yao.qi@linaro.org>
2158
2159 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2160
2161 2015-08-25 Yao Qi <yao.qi@linaro.org>
2162
2163 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2164
2165 2015-08-25 Yao Qi <yao.qi@linaro.org>
2166
2167 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2168 the code.
2169
2170 2015-08-25 Yao Qi <yao.qi@linaro.org>
2171
2172 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2173 Remove.
2174 (debug_reg_change_callback): Remove argument entry and add argument
2175 lwp. Remove local variable thread. Don't print thread id in the
2176 debugging output. Don't check whether pid of thread equals to pid.
2177 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2178 iterate_over_lwps instead find_inferior.
2179
2180 2015-08-24 Pedro Alves <palves@redhat.com>
2181
2182 * inferiors.c (get_first_process): New function.
2183 * inferiors.h (get_first_process): New declaration.
2184 * remote-utils.c (read_ptid): Default to the first process in the
2185 list, instead of to the current thread's process.
2186
2187 2015-08-24 Pedro Alves <palves@redhat.com>
2188
2189 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2190 * event-loop.c: Likewise.
2191 * remote-utils.c: Likewise.
2192 * tracepoint.c: Likewise.
2193
2194 2015-08-24 Pedro Alves <palves@redhat.com>
2195
2196 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2197 ptid_get_lwp.
2198
2199 2015-08-21 Pedro Alves <palves@redhat.com>
2200
2201 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2202 instead of literal 1.
2203
2204 2015-08-21 Pedro Alves <palves@redhat.com>
2205
2206 * tdesc.c (default_description): Explicitly zero-initialize.
2207
2208 2015-08-21 Pedro Alves <palves@redhat.com>
2209
2210 PR gdb/18749
2211 * inferiors.c (remove_thread): Discard any pending stop reply for
2212 this thread.
2213 * server.c (remove_all_on_match_pid): Rename to ...
2214 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2215 instead of a pid.
2216 (discard_queued_stop_replies): Change parameter to a ptid. Now
2217 extern.
2218 (handle_v_kill, kill_inferior_callback, captured_main)
2219 (process_serial_event): Adjust.
2220 * server.h (discard_queued_stop_replies): Declare.
2221
2222 2015-08-21 Pedro Alves <palves@redhat.com>
2223
2224 * linux-low.c (wait_for_sigstop): Always switch to no thread
2225 selected if the previously current thread dies.
2226 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2227 process instead of the current thread's.
2228 * remote-utils.c (input_interrupt): Don't check if there's no
2229 current thread.
2230 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2231 current thread to the general thread fails, error out.
2232 (handle_qxfer_auxv, handle_qxfer_libraries)
2233 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2234 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2235 (handle_query): Check if there's a thread selected instead of
2236 checking whether there's any thread in the thread list.
2237 (handle_qxfer_threads, handle_qxfer_btrace)
2238 (handle_qxfer_btrace_conf): Don't error out early if there's no
2239 thread in the thread list.
2240 (handle_v_cont, myresume): Don't set the current thread to the
2241 continue thread.
2242 (process_serial_event) <Hg handling>: Also set thread_id if the
2243 previous general thread is still alive.
2244 (process_serial_event) <g/G handling>: If setting the current
2245 thread to the general thread fails, error out.
2246 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2247 thread's lwp instead of the current thread's.
2248 * target.c (set_desired_thread): If the desired thread was not
2249 found, leave the current thread pointing to NULL. Return an int
2250 (boolean) indicating success.
2251 * target.h (set_desired_thread): Change return type to int.
2252
2253 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2254
2255 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2256 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2257 #includes.
2258 (ps_get_thread_area): New function.
2259
2260 2015-08-19 Gary Benson <gbenson@redhat.com>
2261
2262 * hostio.c (handle_pread): Do not attempt to read more data
2263 than hostio_reply_with_data can fit in a packet.
2264
2265 2015-08-18 Joel Brobecker <brobecker@adacore.com>
2266
2267 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2268
2269 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2270
2271 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2272
2273 2015-08-06 Pedro Alves <palves@redhat.com>
2274
2275 * tracepoint.c (expr_eval_result): Now an int.
2276
2277 2015-08-06 Pedro Alves <palves@redhat.com>
2278
2279 * gdbthread.h (struct regcache): Forward declare.
2280 (struct thread_info) <regcache_data>: Now a struct regcache
2281 pointer.
2282 * inferiors.c (inferior_regcache_data)
2283 (set_inferior_regcache_data): Now work with struct regcache
2284 pointers.
2285 * inferiors.h (struct regcache): Forward declare.
2286 (inferior_regcache_data, set_inferior_regcache_data): Now work
2287 with struct regcache pointers.
2288 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2289 (free_register_cache_thread): Remove struct regcache pointer
2290 casts.
2291
2292 2015-08-06 Pedro Alves <palves@redhat.com>
2293
2294 * server.c (captured_main): On error, print the exception message
2295 to stderr, and if run_once is set, throw a quit.
2296
2297 2015-08-06 Pedro Alves <palves@redhat.com>
2298
2299 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2300 the current thread.
2301
2302 2015-08-06 Pedro Alves <palves@redhat.com>
2303
2304 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2305 reading beyond the passed in buffer length.
2306
2307 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2308
2309 * tracepoint.c (symbol_list) <required>: Remove.
2310
2311 2015-08-06 Pedro Alves <palves@redhat.com>
2312
2313 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2314 count if stopping and suspending threads.
2315 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2316 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2317 (linux_detach): Complete an ongoing step-over.
2318 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2319 throughout.
2320 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2321 (linux_wait_1): If passing a signal to the inferior after
2322 finishing a step-over, unsuspend and re-resume all lwps. If we
2323 see a single-step event but the thread should be continuing, don't
2324 pass the trap to gdb.
2325 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2326 internal_error instead of gdb_assert.
2327 (enqueue_pending_signal): New function.
2328 (check_ptrace_stopped_lwp_gone): Add debug output.
2329 (start_step_over): Use internal_error instead of gdb_assert.
2330 (complete_ongoing_step_over): New function.
2331 (linux_resume_one_thread): Don't resume a suspended thread.
2332 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2333 it stepping.
2334
2335 2015-08-06 Pedro Alves <palves@redhat.com>
2336
2337 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2338 (linux_thread_alive): Use lwp_is_marked_dead.
2339 (extended_event_reported): Delete.
2340 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2341 instead of extended_event_reported.
2342 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2343 as well.
2344 (lwp_is_marked_dead): New function.
2345 (lwp_running): Use lwp_is_marked_dead.
2346 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2347 comment.
2348
2349 2015-08-06 Pedro Alves <palves@redhat.com>
2350
2351 * linux-low.c (linux_wait_1): Move fork event output out of the
2352 !report_to_gdb check. Pass event_child->waitstatus to
2353 target_waitstatus_to_string instead of ourstatus.
2354
2355 2015-08-04 Yao Qi <yao.qi@linaro.org>
2356
2357 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2358 if current_thread is 32 bit.
2359
2360 2015-08-04 Yao Qi <yao.qi@linaro.org>
2361
2362 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2363 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2364 * server.c (extended_protocol): Remove "static".
2365 * server.h (extended_protocol): Declare it.
2366
2367 2015-08-04 Yao Qi <yao.qi@linaro.org>
2368
2369 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2370 both aarch64 and aarch32.
2371 (aarch64_set_pc): Likewise.
2372
2373 2015-08-04 Yao Qi <yao.qi@linaro.org>
2374
2375 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2376 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2377 arm-with-neon.xml to srv_xmlfiles.
2378 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2379 (is_64bit_tdesc): New function.
2380 (aarch64_linux_read_description): New function.
2381 (aarch64_arch_setup): Call aarch64_linux_read_description.
2382 (regs_info): Rename to regs_info_aarch64.
2383 (aarch64_regs_info): Return right regs_info.
2384 (initialize_low_arch): Call initialize_low_arch_aarch32.
2385
2386 2015-08-04 Yao Qi <yao.qi@linaro.org>
2387
2388 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2389 * linux-aarch32-low.c: New file.
2390 * linux-aarch32-low.h: New file.
2391 * linux-arm-low.c (arm_fill_gregset): Move it to
2392 linux-aarch32-low.c.
2393 (arm_store_gregset): Likewise.
2394 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2395 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2396 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2397 (regs_info): Rename to regs_info_arm.
2398 (arm_regs_info): Return regs_info_aarch32 if
2399 have_ptrace_getregset is 1 and target description is
2400 arm_with_neon or arm_with_vfpv3.
2401 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2402 Call initialize_low_arch_aarch32 instead.
2403
2404 2015-08-04 Yao Qi <yao.qi@linaro.org>
2405
2406 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2407 * linux-low.c: ... here.
2408 * linux-low.h (have_ptrace_getregset): Declare it.
2409
2410 2015-08-04 Pedro Alves <palves@redhat.com>
2411
2412 * thread-db.c (struct thread_db): Use new typedefs.
2413 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2414 CHK calls.
2415 (disable_thread_event_reporting): Cast result of dlsym to
2416 destination function pointer type.
2417 (thread_db_mourn): Use td_ta_delete_ftype.
2418
2419 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2420
2421 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2422 arch variant.
2423 (CDX_BREAKPOINT): Define for R2.
2424 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2425 (the_low_target): Add comments.
2426
2427 2015-07-30 Yao Qi <yao.qi@linaro.org>
2428
2429 * linux-arm-low.c (arm_hwcap): Remove it.
2430 (arm_read_description): New local variable arm_hwcap. Don't
2431 set arm_hwcap to zero.
2432
2433 2015-07-30 Yao Qi <yao.qi@linaro.org>
2434
2435 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2436 Use regcache->tdesc instead.
2437 (arm_store_wmmxregset): Likewise.
2438 (arm_fill_vfpregset): Likewise.
2439 (arm_store_vfpregset): Likewise.
2440
2441 2015-07-30 Yao Qi <yao.qi@linaro.org>
2442
2443 * linux-arm-low.c: Include arch/arm.h.
2444 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2445 (arm_store_gregset): Likewise.
2446
2447 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2448
2449 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2450 ptrace's 4th parameter.
2451
2452 2015-07-27 Yao Qi <yao.qi@linaro.org>
2453
2454 * configure.srv (case aarch64*-*-linux*): Don't set
2455 srv_linux_usrregs.
2456
2457 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2458
2459 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2460 sys/ptrace.h.
2461 * linux-arm-low.c: Likewise.
2462 * linux-cris-low.c: Likewise.
2463 * linux-crisv32-low.c: Likewise.
2464 * linux-low.c: Likewise.
2465 * linux-m68k-low.c: Likewise.
2466 * linux-mips-low.c: Likewise.
2467 * linux-nios2-low.c: Likewise.
2468 * linux-s390-low.c: Likewise.
2469 * linux-sparc-low.c: Likewise.
2470 * linux-tic6x-low.c: Likewise.
2471 * linux-tile-low.c: Likewise.
2472 * linux-x86-low.c: Likewise.
2473
2474 2015-07-24 Pedro Alves <palves@redhat.com>
2475
2476 * config.in: Regenerate.
2477 * configure: Regenerate.
2478
2479 2015-07-24 Pedro Alves <palves@redhat.com>
2480
2481 * acinclude.m4: Include ../ptrace.m4.
2482 * configure.ac: Call GDB_AC_PTRACE.
2483 * config.in, configure: Regenerate.
2484
2485 2015-07-24 Yao Qi <yao.qi@linaro.org>
2486
2487 * linux-low.c (linux_create_inferior): Remove setting to
2488 proc->priv->new_inferior.
2489 (linux_attach): Likewise.
2490 (linux_low_filter_event): Likewise.
2491 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2492
2493 2015-07-24 Yao Qi <yao.qi@linaro.org>
2494
2495 * linux-low.c (linux_arch_setup): New function.
2496 (linux_low_filter_event): If proc->tdesc is NULL and
2497 proc->attached is true, call the_low_target.arch_setup.
2498 Otherwise, keep status pending, and return.
2499 (linux_resume_one_lwp_throw): Don't call get_pc if
2500 thread->while_stepping isn't NULL. Don't call
2501 get_thread_regcache if proc->tdesc is NULL.
2502 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2503 (linux_target_ops): Install arch_setup.
2504 * server.c (start_inferior): Call the_target->arch_setup.
2505 * target.h (struct target_ops) <arch_setup>: New field.
2506 (target_arch_setup): New marco.
2507 * lynx-low.c (lynx_target_ops): Update.
2508 * nto-low.c (nto_target_ops): Update.
2509 * spu-low.c (spu_target_ops): Update.
2510 * win32-low.c (win32_target_ops): Update.
2511
2512 2015-07-24 Yao Qi <yao.qi@linaro.org>
2513
2514 * linux-low.c (linux_add_process): Don't set
2515 proc->priv->new_inferior.
2516 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2517 (linux_attach): Likewise.
2518
2519 2015-07-24 Yao Qi <yao.qi@linaro.org>
2520
2521 * server.c (start_inferior): Code refactor.
2522
2523 2015-07-24 Yao Qi <yao.qi@linaro.org>
2524
2525 * server.c (process_serial_event): Set general_thread.
2526
2527 2015-07-21 Yao Qi <yao.qi@linaro.org>
2528
2529 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2530 aarch64_linux_get_debug_reg_capacity.
2531
2532 2015-07-17 Yao Qi <yao.qi@linaro.org>
2533
2534 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2535 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2536 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2537 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2538 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2539 (AARCH64_HWP_ALIGNMENT): Likewise.
2540 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2541 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2542 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2543 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2544 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2545 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2546 (struct aarch64_debug_reg_state): Likewise.
2547 (struct arch_lwp_info): Likewise.
2548 (aarch64_align_watchpoint): Likewise.
2549 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2550 (aarch64_watchpoint_length): Likewise.
2551 (aarch64_point_encode_ctrl_reg): Likewise
2552 (aarch64_point_is_aligned): Likewise.
2553 (aarch64_align_watchpoint): Likewise.
2554 (aarch64_linux_set_debug_regs):
2555 (aarch64_dr_state_insert_one_point): Likewise.
2556 (aarch64_dr_state_remove_one_point): Likewise.
2557 (aarch64_handle_breakpoint): Likewise.
2558 (aarch64_handle_aligned_watchpoint): Likewise.
2559 (aarch64_handle_unaligned_watchpoint): Likewise.
2560 (aarch64_handle_watchpoint): Likewise.
2561
2562 2015-07-17 Yao Qi <yao.qi@linaro.org>
2563
2564 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2565 and don't aarch64_get_debug_reg_state. All callers update.
2566 (aarch64_handle_aligned_watchpoint): Likewise.
2567 (aarch64_handle_unaligned_watchpoint): Likewise.
2568 (aarch64_handle_watchpoint): Likewise.
2569 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2570 (aarch64_remove_point): Likewise.
2571
2572 2015-07-17 Yao Qi <yao.qi@linaro.org>
2573
2574 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2575 debug_printf.
2576 (aarch64_handle_unaligned_watchpoint): Likewise.
2577
2578 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2579
2580 Revert the previous 3 commits:
2581 Move gdb_regex* to common/
2582 Move linux_find_memory_regions_full & co.
2583 gdbserver build-id attribute generator
2584
2585 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2586 Jan Kratochvil <jan.kratochvil@redhat.com>
2587
2588 gdbserver build-id attribute generator.
2589 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2590 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2591 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2592 (find_phdr): New.
2593 (get_dynamic): Use find_pdhr to traverse program headers.
2594 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2595 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2596 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2597 (get_hex_build_id): New.
2598 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2599 to reply XML document.
2600
2601 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2602 Jan Kratochvil <jan.kratochvil@redhat.com>
2603
2604 * target.c: Include target/target-utils.h and fcntl.h.
2605 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2606 (target_fileio_read_stralloc): New functions.
2607
2608 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2609
2610 * Makefile.in (OBS): Add gdb_regex.o.
2611 (gdb_regex.o): New.
2612 * config.in: Rebuilt.
2613 * configure: Rebuilt.
2614
2615 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2616 Jan Kratochvil <jan.kratochvil@redhat.com>
2617
2618 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2619 * Makefile.in (OBS): Add target-utils.o.
2620 (linux-maps.o, target-utils.o): New.
2621 * configure.srv (srv_linux_obj): Add linux-maps.o.
2622
2623 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2624
2625 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2626 function, return 1.
2627 (the_low_target): Install it.
2628
2629 2015-07-14 Pedro Alves <palves@redhat.com>
2630
2631 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2632 Instead, ignore ECHILD, and throw an error for other errnos.
2633
2634 2015-07-10 Pedro Alves <palves@redhat.com>
2635
2636 * event-loop.c (struct callback_event) <data>: Change type to
2637 gdb_client_data instance instead of gdb_client_data pointer.
2638 (append_callback_event): Adjust.
2639
2640 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2641
2642 * linux-aarch64-low.c: Add comments for each linux_target_ops
2643 method. Remove comments already covered in target_ops and
2644 linux_target_ops definitions.
2645 (the_low_target): Add comments for each unimplemented method.
2646
2647 2015-07-09 Yao Qi <yao.qi@linaro.org>
2648
2649 * linux-aarch64-low.c (aarch64_regmap): Remove.
2650 (aarch64_usrregs_info): Remove.
2651 (regs_info): Set field usrregs to NULL.
2652
2653 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2654
2655 * linux-low.c: Include "rsp-low.h"
2656 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2657 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2658 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2659 (handle_btrace_enable_pt): New.
2660 (handle_btrace_general_set): Support "pt".
2661 (handle_btrace_conf_general_set): Support "pt:size".
2662
2663 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2664
2665 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2666 Z_PACKET_SW_BP.
2667
2668 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2669
2670 * linux-aarch64-low.c: Remove comment about endianness.
2671 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2672 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2673 memcmp.
2674
2675 2015-06-24 Gary Benson <gbenson@redhat.com>
2676
2677 * linux-i386-ipa.c (stdint.h): Do not include.
2678 * lynx-i386-low.c (stdint.h): Likewise.
2679 * lynx-ppc-low.c (stdint.h): Likewise.
2680 * mem-break.c (stdint.h): Likewise.
2681 * thread-db.c (stdint.h): Likewise.
2682 * tracepoint.c (stdint.h): Likewise.
2683 * win32-low.c (stdint.h): Likewise.
2684
2685 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2686
2687 * server.c (write_qxfer_response): Update call to
2688 remote_escape_output.
2689
2690 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2691 Jan Kratochvil <jan.kratochvil@redhat.com>
2692
2693 Merge multiple hex conversions.
2694 * gdbreplay.c (tohex): Rename to 'fromhex'.
2695 (logchar): Use fromhex.
2696
2697 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2698
2699 * server.c (handle_qxfer_libraries): Set `version' attribute for
2700 <library-list>.
2701
2702 2015-06-10 Gary Benson <gbenson@redhat.com>
2703
2704 * target.h (struct target_ops) <multifs_open>: New field.
2705 <multifs_unlink>: Likewise.
2706 <multifs_readlink>: Likewise.
2707 * linux-low.c (nat/linux-namespaces.h): New include.
2708 (linux_target_ops): Initialize the_target->multifs_open,
2709 the_target->multifs_unlink and the_target->multifs_readlink.
2710 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2711 * hostio.c (hostio_fs_pid): New static variable.
2712 (hostio_handle_new_gdb_connection): New function.
2713 (handle_setfs): Likewise.
2714 (handle_open): Use the_target->multifs_open as appropriate.
2715 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2716 (handle_readlink): Use the_target->multifs_readlink as
2717 appropriate.
2718 (handle_vFile): Handle vFile:setfs packets.
2719 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2720 after target_handle_new_gdb_connection.
2721
2722 2015-06-10 Gary Benson <gbenson@redhat.com>
2723
2724 * configure.ac (AC_CHECK_FUNCS): Add setns.
2725 * config.in: Regenerate.
2726 * configure: Likewise.
2727 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2728 (linux-namespaces.o): New rule.
2729 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2730
2731 2015-06-09 Gary Benson <gbenson@redhat.com>
2732
2733 * hostio.c (handle_open): Process mode argument with
2734 fileio_to_host_mode.
2735
2736 2015-06-01 Yao Qi <yao.qi@linaro.org>
2737
2738 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2739 * linux-x86-low.c: Likewise.
2740
2741 2015-05-28 Don Breazeal <donb@codesourcery.com>
2742
2743 * linux-low.c (handle_extended_wait): Initialize
2744 thread_info.last_resume_kind for new fork children.
2745
2746 2015-05-15 Pedro Alves <palves@redhat.com>
2747
2748 * target.h (target_handle_new_gdb_connection): Rewrite using if
2749 wrapped in do/while.
2750
2751 2015-05-14 Joel Brobecker <brobecker@adacore.com>
2752
2753 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2754 * configure, config.in: Regenerate.
2755 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2756 Declare typedef.
2757
2758 2015-05-12 Don Breazeal <donb@codesourcery.com>
2759
2760 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2761 PTRACE_EVENT_VFORK_DONE.
2762 (linux_low_ptrace_options, extended_event_reported): Add vfork
2763 events.
2764 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2765 and "vforkdone" for RSP 'T' Stop Reply Packet.
2766 * server.h (report_vfork_events): Declare
2767 global variable.
2768
2769 2015-05-12 Don Breazeal <donb@codesourcery.com>
2770
2771 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2772 (the_low_target) <new_fork>: Initialize new member.
2773 * linux-arm-low.c (arm_new_fork): New function.
2774 (the_low_target) <new_fork>: Initialize new member.
2775 * linux-low.c (handle_extended_wait): Call new target function
2776 new_fork.
2777 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2778 * linux-mips-low.c (mips_add_watchpoint): New function
2779 extracted from mips_insert_point.
2780 (the_low_target) <new_fork>: Initialize new member.
2781 (mips_linux_new_fork): New function.
2782 (mips_insert_point): Call mips_add_watchpoint.
2783 * linux-x86-low.c (x86_linux_new_fork): New function.
2784 (the_low_target) <new_fork>: Initialize new member.
2785
2786 2015-05-12 Don Breazeal <donb@codesourcery.com>
2787
2788 * linux-low.c (handle_extended_wait): Implement return value,
2789 rename argument 'event_child' to 'event_lwp', handle
2790 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2791 (linux_low_ptrace_options): New function.
2792 (linux_low_filter_event): Call linux_low_ptrace_options,
2793 use different argument fo linux_enable_event_reporting,
2794 use return value from handle_extended_wait.
2795 (extended_event_reported): New function.
2796 (linux_wait_1): Call extended_event_reported and set
2797 status to report fork events.
2798 (linux_write_memory): Add pid to debug message.
2799 (reset_lwp_ptrace_options_callback): New function.
2800 (linux_handle_new_gdb_connection): New function.
2801 (linux_target_ops): Initialize new structure member.
2802 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2803 * lynx-low.c: Initialize new structure member.
2804 * remote-utils.c (prepare_resume_reply): Implement stop reason
2805 "fork" for "T" stop message.
2806 * server.c (handle_query): Call handle_new_gdb_connection.
2807 * server.h (report_fork_events): Declare global flag.
2808 * target.h (struct target_ops) <handle_new_gdb_connection>:
2809 New member.
2810 (target_handle_new_gdb_connection): New macro.
2811 * win32-low.c: Initialize new structure member.
2812
2813 2015-05-12 Don Breazeal <donb@codesourcery.com>
2814
2815 * mem-break.c (APPEND_TO_LIST): Define macro.
2816 (clone_agent_expr): New function.
2817 (clone_one_breakpoint): New function.
2818 (clone_all_breakpoints): New function.
2819 * mem-break.h: Declare new functions.
2820
2821 2015-05-12 Don Breazeal <donb@codesourcery.com>
2822
2823 * linux-low.c (linux_supports_fork_events): New function.
2824 (linux_supports_vfork_events): New function.
2825 (linux_target_ops): Initialize new structure members.
2826 (initialize_low): Call linux_check_ptrace_features.
2827 * lynx-low.c (lynx_target_ops): Initialize new structure
2828 members.
2829 * server.c (report_fork_events, report_vfork_events):
2830 New global flags.
2831 (handle_query): Add new features to qSupported packet and
2832 response.
2833 (captured_main): Initialize new global variables.
2834 * target.h (struct target_ops) <supports_fork_events>:
2835 New member.
2836 <supports_vfork_events>: New member.
2837 (target_supports_fork_events): New macro.
2838 (target_supports_vfork_events): New macro.
2839 * win32-low.c (win32_target_ops): Initialize new structure
2840 members.
2841
2842 2015-05-12 Gary Benson <gbenson@redhat.com>
2843
2844 * server.c (handle_qxfer_exec_file): Use current process
2845 if annex is empty.
2846
2847 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2848
2849 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2850 Remove HAVE_PTRACE_GETREGS conditionals.
2851 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2852 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2853
2854 2015-05-08 Yao Qi <yao.qi@linaro.org>
2855
2856 * linux-low.c (linux_supports_conditional_breakpoints): New
2857 function.
2858 (linux_target_ops): Install new target method.
2859 * lynx-low.c (lynx_target_ops): Install NULL hook for
2860 supports_conditional_breakpoints.
2861 * nto-low.c (nto_target_ops): Likewise.
2862 * spu-low.c (spu_target_ops): Likewise.
2863 * win32-low.c (win32_target_ops): Likewise.
2864 * server.c (handle_query): Check
2865 target_supports_conditional_breakpoints.
2866 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2867 New field.
2868 (target_supports_conditional_breakpoints): New macro.
2869
2870 2015-05-06 Pedro Alves <palves@redhat.com>
2871
2872 PR server/18081
2873 * server.c (start_inferior): If the process exits, mourn it.
2874
2875 2015-04-21 Gary Benson <gbenson@redhat.com>
2876
2877 * hostio.c (fileio_open_flags_to_host): Factored out to
2878 fileio_to_host_openflags in common/fileio.c. Single use
2879 updated.
2880
2881 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2882
2883 * linux-xtensa-low.c (xtensa_fill_gregset)
2884 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2885 XCHAL_HAVE_LOOP.
2886
2887 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2888
2889 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2890 (regs_info): Replace usrregs pointer with NULL.
2891
2892 2015-04-17 Gary Benson <gbenson@redhat.com>
2893
2894 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2895 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2896 * server.c (handle_qxfer_exec_file): New function.
2897 (qxfer_packets): Add exec-file entry.
2898 (handle_query): Report qXfer:exec-file:read as supported packet.
2899
2900 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2901
2902 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2903
2904 2015-04-09 Gary Benson <gbenson@redhat.com>
2905
2906 * hostio-errno.c (errno_to_fileio_error): Remove function.
2907 Update caller to use remote_fileio_to_fio_error.
2908
2909 2015-04-09 Yao Qi <yao.qi@linaro.org>
2910
2911 * linux-low.c (linux_insert_point): Call
2912 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2913 (linux_remove_point): Call remove_memory_breakpoint if type is
2914 raw_bkpt_type_sw.
2915 * linux-x86-low.c (x86_insert_point): Don't call
2916 insert_memory_breakpoint.
2917 (x86_remove_point): Don't call remove_memory_breakpoint.
2918
2919 2015-04-01 Pedro Alves <palves@redhat.com>
2920 Cleber Rosa <crosa@redhat.com>
2921
2922 * server.c (gdbserver_usage): Reorganize and extend the usage
2923 message.
2924
2925 2015-03-24 Pedro Alves <palves@redhat.com>
2926
2927 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2928 output. Also dump TRAP_TRACE.
2929 (linux_low_filter_event): In debug output, distinguish a
2930 resume_stop SIGSTOP from a delayed SIGSTOP.
2931
2932 2015-03-24 Gary Benson <gbenson@redhat.com>
2933
2934 * linux-x86-low.c (x86_linux_new_thread): Moved to
2935 nat/x86-linux.c.
2936 (x86_linux_prepare_to_resume): Likewise.
2937
2938 2015-03-24 Gary Benson <gbenson@redhat.com>
2939
2940 * Makefile.in (x86-linux-dregs.o): New rule.
2941 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2942 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2943 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2944 (x86_linux_dr_get): Likewise.
2945 (x86_linux_dr_set): Likewise.
2946 (update_debug_registers_callback): Likewise.
2947 (x86_linux_dr_set_addr): Likewise.
2948 (x86_linux_dr_get_addr): Likewise.
2949 (x86_linux_dr_set_control): Likewise.
2950 (x86_linux_dr_get_control): Likewise.
2951 (x86_linux_dr_get_status): Likewise.
2952 (x86_linux_update_debug_registers): Likewise.
2953
2954 2015-03-24 Gary Benson <gbenson@redhat.com>
2955
2956 * linux-x86-low.c (x86_linux_update_debug_registers):
2957 New function, factored out from...
2958 (x86_linux_prepare_to_resume): ...this.
2959
2960 2015-03-24 Gary Benson <gbenson@redhat.com>
2961
2962 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2963 (x86_linux_dr_set): Likewise.
2964 (update_debug_registers_callback): Likewise.
2965 (x86_linux_dr_set_addr): Likewise.
2966 (x86_linux_dr_get_addr): Likewise.
2967 (x86_linux_dr_set_control): Likewise.
2968 (x86_linux_dr_get_control): Likewise.
2969 (x86_linux_dr_get_status): Likewise.
2970 (x86_linux_prepare_to_resume): Likewise.
2971
2972 2015-03-24 Gary Benson <gbenson@redhat.com>
2973
2974 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2975 Use perror_with_name. Pass string through gettext.
2976 (x86_linux_dr_set): Likewise.
2977
2978 2015-03-24 Gary Benson <gbenson@redhat.com>
2979
2980 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2981 (x86_linux_dr_set_addr): ...this.
2982 (x86_dr_low_get_addr): Rename to...
2983 (x86_linux_dr_get_addr): ...this.
2984 (x86_dr_low_set_control): Rename to...
2985 (x86_linux_dr_set_control): ...this.
2986 (x86_dr_low_get_control): Rename to...
2987 (x86_linux_dr_get_control): ...this.
2988 (x86_dr_low_get_status): Rename to...
2989 (x86_linux_dr_get_status): ...this.
2990 (x86_dr_low): Update with new function names.
2991
2992 2015-03-24 Gary Benson <gbenson@redhat.com>
2993
2994 * Makefile.in (x86-linux.o): New rule.
2995 * configure.srv: Add x86-linux.o to relevant targets.
2996 * linux-low.c (lwp_set_arch_private_info): New function.
2997 (lwp_arch_private_info): Likewise.
2998 * linux-x86-low.c: Include nat/x86-linux.h.
2999 (arch_lwp_info): Removed structure.
3000 (update_debug_registers_callback):
3001 Use lwp_set_debug_registers_changed.
3002 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3003 and lwp_set_debug_registers_changed.
3004 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3005
3006 2015-03-24 Gary Benson <gbenson@redhat.com>
3007
3008 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3009 * linux-arm-low.c (arm_new_thread): Likewise.
3010 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3011 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3012 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3013 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3014
3015 2015-03-24 Gary Benson <gbenson@redhat.com>
3016
3017 * linux-low.c (ptid_of_lwp): New function.
3018 (lwp_is_stopped): Likewise.
3019 (lwp_stop_reason): Likewise.
3020 * linux-x86-low.c (update_debug_registers_callback):
3021 Use lwp_is_stopped.
3022 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3023 lwp_stop_reason.
3024
3025 2015-03-24 Gary Benson <gbenson@redhat.com>
3026
3027 * linux-low.h (linux_stop_lwp): Remove declaration.
3028
3029 2015-03-24 Gary Benson <gbenson@redhat.com>
3030
3031 * linux-low.h: Include nat/linux-nat.h.
3032 * linux-low.c (iterate_over_lwps_args): New structure.
3033 (iterate_over_lwps_filter): New function.
3034 (iterate_over_lwps): Likewise.
3035 * linux-x86-low.c (update_debug_registers_callback):
3036 Update signature to what iterate_over_lwps expects.
3037 Remove PID check that iterate_over_lwps now performs.
3038 (x86_dr_low_set_addr): Use iterate_over_lwps.
3039 (x86_dr_low_set_control): Likewise.
3040
3041 2015-03-24 Gary Benson <gbenson@redhat.com>
3042
3043 * linux-x86-low.c (x86_debug_reg_state): New function.
3044 (x86_linux_prepare_to_resume): Use the above.
3045
3046 2015-03-24 Gary Benson <gbenson@redhat.com>
3047
3048 * linux-low.c (current_lwp_ptid): New function.
3049 * linux-x86-low.c: Include nat/linux-nat.h.
3050 (x86_dr_low_get_addr): Use current_lwp_ptid.
3051 (x86_dr_low_get_control): Likewise.
3052 (x86_dr_low_get_status): Likewise.
3053
3054 2015-03-20 Pedro Alves <palves@redhat.com>
3055
3056 * tracepoint.c (cmd_qtstatus): Make "str" const.
3057
3058 2015-03-20 Pedro Alves <palves@redhat.com>
3059
3060 * server.c (handle_general_set): Make "req_str" const.
3061
3062 2015-03-19 Pedro Alves <palves@redhat.com>
3063
3064 * linux-low.c (linux_resume_one_lwp): Rename to ...
3065 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3066 instead call perror_with_name.
3067 (check_ptrace_stopped_lwp_gone): New function.
3068 (linux_resume_one_lwp): Reimplement as wrapper around
3069 linux_resume_one_lwp_throw that swallows errors if the LWP is
3070 gone.
3071
3072 2015-03-19 Pedro Alves <palves@redhat.com>
3073
3074 * linux-low.c (count_events_callback, select_event_lwp_callback):
3075 No longer check whether the thread has resume_stop as last resume
3076 kind.
3077
3078 2015-03-19 Pedro Alves <palves@redhat.com>
3079
3080 * linux-low.c (count_events_callback, select_event_lwp_callback):
3081 Use the lwp's status_pending_p field, not the thread's.
3082
3083 2015-03-19 Pedro Alves <palves@redhat.com>
3084
3085 * linux-low.c (select_event_lwp_callback): Update comments to
3086 no longer mention SIGTRAP.
3087
3088 2015-03-18 Gary Benson <gbenson@redhat.com>
3089
3090 * server.c (handle_query): Do not report vFile:fstat as supported.
3091
3092 2015-03-11 Gary Benson <gbenson@redhat.com>
3093
3094 * hostio.c (sys/types.h): New include.
3095 (sys/stat.h): Likewise.
3096 (common-remote-fileio.h): Likewise.
3097 (handle_fstat): New function.
3098 (handle_vFile): Handle vFile:fstat packets.
3099
3100 2015-03-11 Gary Benson <gbenson@redhat.com>
3101
3102 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3103 struct stat.st_blocks and struct stat.st_blksize.
3104 * configure: Regenerate.
3105 * config.in: Likewise.
3106 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3107 (OBS): Add common-remote-fileio.o.
3108 (common-remote-fileio.o): New rule.
3109
3110 2015-03-09 Pedro Alves <palves@redhat.com>
3111
3112 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3113 'struct sockaddr' pointer in 'accept' call.
3114
3115 2015-03-09 Pedro Alves <palves@redhat.com>
3116
3117 Revert:
3118 2015-03-07 Pedro Alves <palves@redhat.com>
3119 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3120 or <winsock2.h> here. Instead include "gdb_socket.h".
3121 (remote_open): Use union gdb_sockaddr_u.
3122 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3123 or <winsock2.h> here. Instead include "gdb_socket.h".
3124 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3125 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3126 or <sys/un.h>.
3127 (init_named_socket, gdb_agent_helper_thread): Use union
3128 gdb_sockaddr_u.
3129
3130 2015-03-07 Pedro Alves <palves@redhat.com>
3131
3132 * configure.ac (build_warnings): Move
3133 -Wdeclaration-after-statement to the C-specific set.
3134 * configure: Regenerate.
3135
3136 2015-03-07 Pedro Alves <palves@redhat.com>
3137
3138 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3139 or <winsock2.h> here. Instead include "gdb_socket.h".
3140 (remote_open): Use union gdb_sockaddr_u.
3141 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3142 or <winsock2.h> here. Instead include "gdb_socket.h".
3143 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3144 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3145 or <sys/un.h>.
3146 (init_named_socket, gdb_agent_helper_thread): Use union
3147 gdb_sockaddr_u.
3148
3149 2015-03-07 Pedro Alves <palves@redhat.com>
3150
3151 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3152 instead.
3153
3154 2015-03-06 Yao Qi <yao.qi@linaro.org>
3155
3156 * linux-aarch64-low.c (aarch64_insert_point): Use
3157 show_debug_regs as a boolean.
3158 (aarch64_remove_point): Likewise.
3159
3160 2015-03-05 Pedro Alves <palves@redhat.com>
3161
3162 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3163 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3164 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3165 * nto-low.c (nto_target_ops): Likewise.
3166 * spu-low.c (spu_target_ops): Likewise.
3167 * win32-low.c (win32_target_ops): Likewise.
3168
3169 2015-03-04 Pedro Alves <palves@redhat.com>
3170
3171 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3172 Decide whether a breakpoint triggered based on the SIGTRAP's
3173 siginfo.si_code.
3174 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3175 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3176 (linux_low_filter_event): Check for breakpoints before checking
3177 watchpoints.
3178 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3179 siginfo.si_code.
3180 (linux_stopped_by_sw_breakpoint)
3181 (linux_supports_stopped_by_sw_breakpoint)
3182 (linux_stopped_by_hw_breakpoint)
3183 (linux_supports_stopped_by_hw_breakpoint): New functions.
3184 (linux_target_ops): Install new target methods.
3185
3186 2015-03-04 Pedro Alves <palves@redhat.com>
3187
3188 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3189 * server.c (swbreak_feature, hwbreak_feature): New globals.
3190 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3191 (captured_main): Clear swbreak_feature and hwbreak_feature.
3192 * server.h (swbreak_feature, hwbreak_feature): Declare.
3193 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3194 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3195 supports_stopped_by_hw_breakpoint>: New fields.
3196 (target_supports_stopped_by_sw_breakpoint)
3197 (target_stopped_by_sw_breakpoint)
3198 (target_supports_stopped_by_hw_breakpoint)
3199 (target_stopped_by_hw_breakpoint): Declare.
3200
3201 2015-03-04 Pedro Alves <palves@redhat.com>
3202
3203 enum lwp_stop_reason -> enum target_stop_reason
3204 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3205 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3206 (linux_wait_1, stuck_in_jump_pad_callback)
3207 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3208 (linux_stopped_by_watchpoint):
3209 * linux-low.h (enum lwp_stop_reason): Delete.
3210 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3211 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3212
3213 2015-03-04 Yao Qi <yao.qi@linaro.org>
3214
3215 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3216
3217 2015-03-03 Gary Benson <gbenson@redhat.com>
3218
3219 * hostio.c (handle_vFile): Fix prefix lengths.
3220
3221 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3222
3223 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3224 ptr_bits.
3225
3226 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3227
3228 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3229 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3230 (clean): Add "rm -f" for above C files.
3231 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3232 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3233 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3234 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3235 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3236 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3237 (init_registers_s390x_vx_linux64)
3238 (init_registers_s390x_tevx_linux64)
3239 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3240 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3241 declarations.
3242 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3243 (s390_store_vxrs_high): New functions.
3244 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3245 NT_S390_VXRS_HIGH.
3246 (s390_arch_setup): Add logic for selecting one of the new target
3247 descriptions. Activate the new vector regsets if applicable.
3248 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3249 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3250 and init_registers_s390x_tevx_linux64.
3251
3252 2015-03-01 Pedro Alves <palves@redhat.com>
3253
3254 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3255 parameter.
3256
3257 2015-02-27 Pedro Alves <palves@redhat.com>
3258
3259 * linux-x86-low.c (u_debugreg_offset): New function.
3260 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3261
3262 2015-02-27 Pedro Alves <palves@redhat.com>
3263
3264 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3265 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3266 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3267 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3268 (ps_lsetfpregs, ps_getpid)
3269 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3270 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3271 (ps_lsetxregs, ps_plog): Declare.
3272
3273 2015-02-27 Pedro Alves <palves@redhat.com>
3274
3275 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3276 IP_AGENT_EXPORT_FUNC.
3277 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3278 IP_AGENT_EXPORT_FUNC.
3279 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3280 (IP_AGENT_EXPORT): Delete.
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, collecting, gdb_collect)
3284 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3285 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3286 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3287 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3288 (traceframe_read_count, traceframe_write_count)
3289 (traceframes_created, trace_state_variables, get_raw_reg)
3290 (get_trace_state_variable_value, set_trace_state_variable_value)
3291 (ust_loaded, helper_thread_id, cmd_buf): Use
3292 IPA_SYM_EXPORTED_NAME.
3293 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3294 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3295 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3296 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3297 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3298 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3299 EXTERN_C_PUSH/EXTERN_C_POP.
3300 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3301 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3302 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3303 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3304 (traceframe_write_count, traceframe_read_count)
3305 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3306 (about_to_request_buffer_space, get_trace_state_variable_value)
3307 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3308 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3309 EXTERN_C_PUSH/EXTERN_C_POP.
3310 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3311 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3312 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3313 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3314 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3315 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3316 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3317 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3318 Define.
3319 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3320 (IP_AGENT_EXPORT_VAR_DECL): Define.
3321 (tracing): Declare.
3322 (gdb_agent_get_raw_reg): Declare.
3323
3324 2015-02-27 Tom Tromey <tromey@redhat.com>
3325 Pedro Alves <palves@redhat.com>
3326
3327 Rename symbols whose names are reserved C++ keywords throughout.
3328
3329 2015-02-27 Pedro Alves <palves@redhat.com>
3330
3331 * Makefile.in (COMPILER): New, get it from autoconf.
3332 (CXX): Get from autoconf instead.
3333 (COMPILE.pre): Use COMPILER.
3334 (CC-LD): Rename to ...
3335 (CC_LD): ... this. Use COMPILER.
3336 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3337 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3338 * acinclude.m4: Include build-with-cxx.m4.
3339 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3340 Disable -Werror by default if building in C++ mode.
3341 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3342 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3343 the C++ compiler. Save/restore CXXFLAGS too.
3344 * configure: Regenerate.
3345
3346 2015-02-27 Pedro Alves <palves@redhat.com>
3347
3348 * acinclude.m4: Include libiberty.m4.
3349 * configure.ac: Call libiberty_INIT.
3350 * config.in, configure: Regenerate.
3351
3352 2015-02-26 Pedro Alves <palves@redhat.com>
3353
3354 * linux-low.c (linux_wait_1): When incrementing the PC past a
3355 program breakpoint always use the_low_target.breakpoint_len as
3356 increment, rather than the maximum between that and
3357 the_low_target.decr_pc_after_break.
3358
3359 2015-02-23 Pedro Alves <palves@redhat.com>
3360
3361 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3362 thread was doing a step-over; always adjust the PC if
3363 we stepped over a permanent breakpoint.
3364 (linux_wait_1): If we stepped over breakpoint that was on top of a
3365 permanent breakpoint, manually advance the PC past it.
3366
3367 2015-02-23 Pedro Alves <palves@redhat.com>
3368
3369 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3370 modes.
3371 (x86_fill_gregset, x86_store_gregset): Use it when handling
3372 $orig_eax.
3373
3374 2015-02-20 Pedro Alves <palves@redhat.com>
3375
3376 * thread-db.c: Include "nat/linux-procfs.h".
3377 (thread_db_init): Skip listing new threads if the kernel supports
3378 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3379
3380 2015-02-20 Pedro Alves <palves@redhat.com>
3381
3382 * linux-low.c (status_pending_p_callback): Use ptid_match.
3383
3384 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3385
3386 PR breakpoints/16812
3387 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3388 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3389 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3390
3391 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3392
3393 PR breakpoints/15956
3394 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3395
3396 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3397
3398 * linux-low.c (linux_low_btrace_conf): Print size.
3399 * server.c (handle_btrace_conf_general_set): New.
3400 (hanle_general_set): Call handle_btrace_conf_general_set.
3401 (handle_query): Report Qbtrace-conf:bts:size as supported.
3402
3403 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3404
3405 * linux-low.c (linux_low_enable_btrace): Update parameters.
3406 (linux_low_btrace_conf): New.
3407 (linux_target_ops)<to_btrace_conf>: Initialize.
3408 * server.c (current_btrace_conf): New.
3409 (handle_btrace_enable): Rename to ...
3410 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3411 to target_enable_btrace. Update comment. Update users.
3412 (handle_qxfer_btrace_conf): New.
3413 (qxfer_packets): Add btrace-conf entry.
3414 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3415 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3416 (target_ops)<read_btrace_conf>: New.
3417 (target_enable_btrace): Update parameters.
3418 (target_read_btrace_conf): New.
3419
3420 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3421
3422 * server.c (handle_btrace_general_set): Remove call to
3423 target_supports_btrace.
3424 (supported_btrace_packets): New.
3425 (handle_query): Call supported_btrace_packets.
3426 * target.h: include btrace-common.h.
3427 (btrace_target_info): Removed.
3428 (supports_btrace, target_supports_btrace): Update parameters.
3429
3430 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3431
3432 * Makefile.in (SFILES): Add common/btrace-common.c.
3433 (OBS): Add common/btrace-common.o.
3434 (btrace-common.o): Add build rules.
3435 * linux-low: Include btrace-common.h.
3436 (linux_low_read_btrace): Use struct btrace_data. Call
3437 btrace_data_init and btrace_data_fini.
3438
3439 2015-02-06 Pedro Alves <palves@redhat.com>
3440
3441 * thread-db.c (find_new_threads_callback): Add debug output.
3442
3443 2015-02-04 Pedro Alves <palves@redhat.com>
3444
3445 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3446 (resume_stopped_resumed_lwps): New function.
3447 (linux_wait_for_event_filtered): Use it.
3448
3449 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3450
3451 * Makefile.in (SFILES): Add linux-personality.c.
3452 (linux-personality.o): New rule.
3453 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3454 list of objects to be built.
3455 * linux-low.c: Include nat/linux-personality.h.
3456 (linux_create_inferior): Remove code to disable address space
3457 randomization (moved to ../nat/linux-personality.c). Create
3458 cleanup to disable address space randomization.
3459
3460 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3461
3462 * Makefile.in (posix-strerror.o): New rule.
3463 (mingw-strerror.o): Likewise.
3464 * configure: Regenerated.
3465 * configure.ac: Source file ../common/common.host. Initialize new
3466 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3467
3468 2015-01-14 Yao Qi <yao@codesourcery.com>
3469
3470 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3471 (ppc-linux.o): New rule.
3472 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3473 * configure.ac: AC_CHECK_FUNCS(getauxval).
3474 * config.in: Re-generated.
3475 * configure: Re-generated.
3476 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3477 ppc64_64bit_inferior_p
3478
3479 2015-01-14 Yao Qi <yao@codesourcery.com>
3480
3481 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3482 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3483 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3484 (PT_ORIG_R3, PT_TRAP): Likewise.
3485 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3486 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3487 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3488
3489 2015-01-10 Joel Brobecker <brobecker@adacore.com>
3490
3491 * i387-fp.c (i387_cache_to_xsave): In look over
3492 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3493 zmmh_low_space field by use of zmmh_high_space.
3494
3495 2015-01-09 Pedro Alves <palves@redhat.com>
3496
3497 * linux-low.c (step_over_bkpt): Move higher up in the file.
3498 (handle_extended_wait): Don't store the stop_pc here.
3499 (get_stop_pc): Adjust comments and rename to ...
3500 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3501 stopped for a software breakpoint or hardware breakpoint.
3502 (thread_still_has_status_pending_p): New function.
3503 (status_pending_p_callback): Use
3504 thread_still_has_status_pending_p. If the event is no longer
3505 interesting, resume the LWP.
3506 (handle_tracepoints): Add assert.
3507 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3508 (wstatus_maybe_breakpoint): New function.
3509 (cancel_breakpoint): Delete function.
3510 (check_stopped_by_watchpoint): New function, factored out from
3511 linux_low_filter_event.
3512 (lp_status_maybe_breakpoint): Delete function.
3513 (linux_low_filter_event): Remove filter_ptid argument.
3514 Leave thread group exits pending here. Store the LWP's stop PC.
3515 Always leave events pending.
3516 (linux_wait_for_event_filtered): Pull all events out of the
3517 kernel, and leave them all pending.
3518 (count_events_callback, select_event_lwp_callback): Consider all
3519 events.
3520 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3521 (select_event_lwp): Only give preference to the stepping LWP in
3522 all-stop mode. Adjust comments.
3523 (ignore_event): New function.
3524 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3525 references to cancel_breakpoints. Adjust to renames. Also give
3526 equal priority to all LWPs that have had events in non-stop mode.
3527 If reporting a software breakpoint event, unadjust the LWP's PC.
3528 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3529 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3530 Adjust.
3531 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3532 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3533 (linux_stopped_by_watchpoint): Adjust.
3534 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3535 * linux-low.h (enum lwp_stop_reason): New.
3536 (struct lwp_info) <stop_pc>: Adjust comment.
3537 <stopped_by_watchpoint>: Delete field.
3538 <stop_reason>: New field.
3539 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3540 * mem-break.c (software_breakpoint_inserted_here)
3541 (hardware_breakpoint_inserted_here): New function.
3542 * mem-break.h (software_breakpoint_inserted_here)
3543 (hardware_breakpoint_inserted_here): Declare.
3544 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3545 (cancel_breakpoints): Delete.
3546 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3547 (upload_fast_traceframes): Remove references to
3548 cancel_breakpoints.
3549
3550 2015-01-09 Pedro Alves <palves@redhat.com>
3551
3552 * thread-db.c (find_new_threads_callback): Ignore thread if the
3553 kernel thread ID is -1.
3554
3555 2015-01-09 Pedro Alves <palves@redhat.com>
3556
3557 * linux-low.c (linux_attach_fail_reason_string): Move to
3558 nat/linux-ptrace.c, and rename.
3559 (linux_attach_lwp): Update comment.
3560 (attach_proc_task_lwp_callback): New function.
3561 (linux_attach): Adjust to rename and use
3562 linux_proc_attach_tgid_threads.
3563 (linux_attach_fail_reason_string): Delete declaration.
3564
3565 2015-01-01 Joel Brobecker <brobecker@adacore.com>
3566
3567 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3568 * server.c (gdbserver_version): Likewise.
3569
3570 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3571
3572 * remote-utils.c: Include ctype.h.
3573 (input_interrupt): Explicitly handle the case when the char
3574 received is the NUL byte. Improve the printing of non-ASCII
3575 characters.
3576
3577 2014-12-16 Joel Brobecker <brobecker@adacore.com>
3578
3579 * linux-low.c (linux_low_filter_event): Update call to
3580 linux_enable_event_reporting following the addition of
3581 a new parameter to that function.
3582
3583 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
3584
3585 PR server/17457
3586 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3587 (AARCH64_FPCR_REGNO): Likewise.
3588 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3589 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3590 (aarch64_store_fpregset): Likewise.
3591
3592 2014-12-15 Joel Brobecker <brobecker@adacore.com>
3593
3594 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3595 Remove FIXME comment about assumption about N.
3596
3597 2014-12-13 Joel Brobecker <brobecker@adacore.com>
3598
3599 * configure.ac: If large-file support is disabled in GDBserver,
3600 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3601 * configure: Regenerate.
3602
3603 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3604
3605 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3606 warning upon ENODATA from ptrace.
3607 * linux-s390-low.c (s390_store_tdb): New.
3608 (s390_regsets): Add regset for NT_S390_TDB.
3609
3610 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3611
3612 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3613 without a fill_function.
3614 * linux-s390-low.c (s390_fill_last_break): Remove.
3615 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3616 (s390_arch_setup): Use regset's size instead of fill_function for
3617 loop end condition.
3618
3619 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3620
3621 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3622 the regset's store function when ptrace returned an error.
3623 * regcache.c (get_thread_regcache): Invalidate register cache
3624 before fetching inferior's registers.
3625
3626 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3627
3628 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3629 while-loop as for-loop.
3630 (regsets_store_inferior_registers): Likewise.
3631
3632 2014-11-28 Yao Qi <yao@codesourcery.com>
3633
3634 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3635 * config.in, configure: Re-generate.
3636 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3637 is defined.
3638
3639 2014-11-21 Yao Qi <yao@codesourcery.com>
3640
3641 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3642 (AC_CHECK_HEADERS): Remove malloc.h.
3643 * configure: Re-generated.
3644 * config.in: Re-generated.
3645 * server.h: Don't include alloca.h and malloc.h.
3646 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3647 Don't include malloc.h.
3648
3649 2014-11-17 Joel Brobecker <brobecker@adacore.com>
3650
3651 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3652 corresponding ERRNO check in same block.
3653
3654 2014-11-12 Pedro Alves <palves@redhat.com>
3655
3656 * server.c (cont_thread): Update comment.
3657 (start_inferior, attach_inferior): No longer clear cont_thread.
3658 (handle_v_cont): No longer set cont_thread.
3659 (captured_main): Clear cont_thread each time a GDB connects.
3660
3661 2014-11-12 Pedro Alves <palves@redhat.com>
3662
3663 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3664 thread, and don't resume all threads if the Hc thread has exited.
3665
3666 2014-11-12 Pedro Alves <palves@redhat.com>
3667
3668 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3669 the process group instead of to a specific LWP.
3670
3671 2014-10-15 Pedro Alves <palves@redhat.com>
3672
3673 PR server/17487
3674 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3675 parameter.
3676 (arm_set_thread_context): Delete.
3677 (the_low_target): Adjust.
3678 * win32-i386-low.c (debug_registers_changed)
3679 (debug_registers_used): Delete.
3680 (update_debug_registers_callback): New function.
3681 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3682 needing to update their debug registers.
3683 (win32_get_current_dr): New function.
3684 (x86_dr_low_get_addr, x86_dr_low_get_control)
3685 (x86_dr_low_get_status): Fetch the debug register from the thread
3686 record's context.
3687 (i386_initial_stuff): Adjust.
3688 (i386_get_thread_context): Remove current_event parameter. Don't
3689 clear debug_registers_changed nor copy DR values to
3690 debug_reg_state.
3691 (i386_set_thread_context): Delete.
3692 (i386_prepare_to_resume): New function.
3693 (i386_thread_added): Mark the thread as needing to update irs
3694 debug registers.
3695 (the_low_target): Remove i386_set_thread_context and install
3696 i386_prepare_to_resume.
3697 * win32-low.c (win32_get_thread_context): Adjust.
3698 (win32_set_thread_context): Use SetThreadContext
3699 directly.
3700 (win32_prepare_to_resume): New function.
3701 (win32_require_context): New function, factored out from ...
3702 (thread_rec): ... this.
3703 (continue_one_thread): Call win32_prepare_to_resume on each thread
3704 we're about to continue.
3705 (win32_resume): Call win32_prepare_to_resume on the event thread.
3706 * win32-low.h (struct win32_thread_info)
3707 <debug_registers_changed>: New field.
3708 (struct win32_target_ops): Change prototype of set_thread_context,
3709 delete set_thread_context and add prepare_to_resume.
3710 (win32_require_context): New declaration.
3711
3712 2014-10-08 Gary Benson <gbenson@redhat.com>
3713
3714 * server.h: Do not include common-exceptions.h.
3715
3716 2014-10-08 Gary Benson <gbenson@redhat.com>
3717
3718 * server.h: Do not include cleanups.h.
3719
3720 2014-09-30 James Hogan <james.hogan@imgtec.com>
3721
3722 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3723 mips64-dsp-linux.c.
3724
3725 2014-09-23 Yao Qi <yao@codesourcery.com>
3726
3727 * linux-low.c (lp_status_maybe_breakpoint): New function.
3728 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3729 (count_events_callback): Likewise.
3730 (select_event_lwp_callback): Likewise.
3731 (cancel_breakpoints_callback): Likewise.
3732
3733 2014-09-19 Don Breazeal <donb@codesourcery.com>
3734
3735 * linux-low.c (handle_extended_wait): Call
3736 linux_ptrace_get_extended_event.
3737 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3738 linux_is_extended_waitstatus.
3739
3740 2014-09-16 Joel Brobecker <brobecker@adacore.com>
3741
3742 * Makefile.in (CPPFLAGS): Define.
3743 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3744 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3745
3746 2014-09-16 Gary Benson <gbenson@redhat.com>
3747
3748 * inferiors.h (current_inferior): Renamed as...
3749 (current_thread): New variable. All uses updated.
3750 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3751 (maybe_move_out_of_jump_pad): Likewise.
3752 (cancel_breakpoint): Likewise.
3753 (linux_low_filter_event): Likewise.
3754 (wait_for_sigstop): Likewise.
3755 (linux_resume_one_lwp): Likewise.
3756 (need_step_over_p): Likewise.
3757 (start_step_over): Likewise.
3758 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3759 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3760 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3761 and save_inferior as saved_thread.
3762 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3763 saved_thread.
3764 (regcache_invalidate_thread): Likewise.
3765 * remote-utils.c (prepare_resume_reply): Likewise.
3766 * thread-db.c (thread_db_get_tls_address): Likewise.
3767 (disable_thread_event_reporting): Likewise.
3768 (remove_thread_event_breakpoints): Likewise.
3769 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3770 as saved_thread.
3771 * target.h (set_desired_inferior): Renamed as...
3772 (set_desired_thread): New declaration. All uses updated.
3773 * server.c (myresume): Updated comment to reference thread instead
3774 of inferior.
3775 (handle_serial_event): Likewise.
3776 (handle_target_event): Likewise.
3777
3778 2014-09-12 Tom Tromey <tromey@redhat.com>
3779 Gary Benson <gbenson@redhat.com>
3780
3781 * regcache.h: Include common-regcache.h.
3782 (regcache_read_pc): Don't declare.
3783 * regcache.c (get_thread_regcache_for_ptid): New function.
3784
3785 2014-09-11 Tom Tromey <tromey@redhat.com>
3786 Gary Benson <gbenson@redhat.com>
3787
3788 * symbol.c: New file.
3789 * Makefile.in (SFILES): Add symbol.c.
3790 (OBS): Add symbol.o.
3791
3792 2014-09-11 Gary Benson <gbenson@redhat.com>
3793
3794 * target.c (target_stop_ptid, target_continue_ptid): New
3795 functions.
3796
3797 2014-09-11 Tom Tromey <tromey@redhat.com>
3798 Gary Benson <gbenson@redhat.com>
3799
3800 * target.h: Include target/target.h.
3801 * target.c (target_read_memory, target_read_uint32)
3802 (target_write_memory): New functions.
3803
3804 2014-09-11 Gary Benson <gbenson@redhat.com>
3805
3806 * server.h (debug_hw_points): Don't declare.
3807 * server.c (debug_hw_points): Don't define. Replace all uses
3808 with show_debug_regs.
3809 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3810 all uses with show_debug_regs.
3811
3812 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3813
3814 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3815 endianness into account.
3816 (ppc_supply_ptrace_register): Likewise.
3817
3818 2014-09-03 James Hogan <james.hogan@imgtec.com>
3819
3820 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3821 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3822
3823 2014-09-03 Gary Benson <gbenson@redhat.com>
3824
3825 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3826 ALL_DEBUG_ADDRESS_REGISTERS.
3827
3828 2014-09-02 Gary Benson <gbenson@redhat.com>
3829
3830 * i386-low.h: Renamed as...
3831 * x86-low.h: New file. All type, function and variable name
3832 prefixes changed from "i386_" to "x86_". All references updated.
3833 * i386-low.c: Renamed as...
3834 * x86-low.c: New file. All type, function and variable name
3835 prefixes changed from "i386_" to "x86_". All references updated.
3836
3837 2014-09-02 Gary Benson <gbenson@redhat.com>
3838
3839 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3840 (x86_linux_new_thread): Likewise.
3841
3842 2014-08-29 Gary Benson <gbenson@redhat.com>
3843
3844 * server.h (setjmp.h): Do not include.
3845 (toplevel): Do not declare.
3846 (common-exceptions.h): Include.
3847 (cleanups.h): Likewise.
3848 * server.c (toplevel): Do not define.
3849 (exit_code): New static global.
3850 (detach_or_kill_for_exit_cleanup): New function.
3851 (main): New function. Original main renamed to...
3852 (captured_main): New function.
3853 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3854
3855 2014-08-29 Gary Benson <gbenson@redhat.com>
3856
3857 * Makefile.in (SFILES): Add common/common-exceptions.c.
3858 (OBS): Add common-exceptions.o.
3859 (common-exceptions.o): New rule.
3860 * utils.c (prepare_to_throw_exception): New function.
3861
3862 2014-08-29 Gary Benson <gbenson@redhat.com>
3863
3864 * config.in: Regenerate.
3865 * configure: Likewise.
3866
3867 2014-08-29 Gary Benson <gbenson@redhat.com>
3868
3869 * Makefile.in (SFILES): Add common/cleanups.c.
3870 (OBS): cleanups.o.
3871 (cleanups.o): New rule.
3872
3873 2014-08-29 Gary Benson <gbenson@redhat.com>
3874
3875 * utils.c (internal_vwarning): New function.
3876
3877 2014-08-28 Gary Benson <gbenson@redhat.com>
3878
3879 * utils.h (fatal): Remove declaration.
3880 * utils.c (fatal): Remove function.
3881
3882 2014-08-28 Gary Benson <gbenson@redhat.com>
3883
3884 * tracepoint.c (gdb_agent_init): Replace fatal with
3885 perror_with_name.
3886 (initialize_tracepoint): Likewise.
3887
3888 2014-08-28 Gary Benson <gbenson@redhat.com>
3889
3890 * remote-utils.c (remote_prepare): Replace fatal with error.
3891
3892 2014-08-28 Gary Benson <gbenson@redhat.com>
3893
3894 * linux-low.c (linux_async): Replace fatal with warning.
3895 Tidy up and return.
3896 (linux_start_non_stop): Return -1 if linux_async failed.
3897
3898 2014-08-28 Gary Benson <gbenson@redhat.com>
3899
3900 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3901 gdb_assert.
3902 (i386_dr_low_get_addr): Remove vague comment.
3903 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3904 gdb_assert.
3905
3906 2014-08-28 Gary Benson <gbenson@redhat.com>
3907
3908 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3909 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3910 internal_error.
3911 (linux_resume_one_lwp): Likewise.
3912 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3913 gdb_assert.
3914 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3915 with internal_error.
3916 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3917 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3918 (find_register_by_name): Replace fatal with internal_error.
3919 (find_regno): Likewise.
3920 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3921 * thread-db.c (thread_db_create_event): Likewise.
3922 (thread_db_load_search): Likewise.
3923 (try_thread_db_load_1): Likewise.
3924 * tracepoint.c (get_jump_space_head): Replace fatal with
3925 internal_error.
3926 (claim_trampoline_space): Likewise.
3927 (have_fast_tracepoint_trampoline_buffer): Likewise.
3928 (cmd_qtstart): Likewise.
3929 (stop_tracing): Likewise.
3930 (fast_tracepoint_collecting): Likewise.
3931 (target_malloc): Likewise.
3932 (download_tracepoint): Likewise.
3933 (download_trace_state_variables): Replace check with gdb_assert.
3934 (upload_fast_traceframes): Replace fatal with internal_error.
3935
3936 2014-08-19 Tom Tromey <tromey@redhat.com>
3937 Gary Benson <gbenson@redhat.com>
3938
3939 * Makefile.in (SFILES): Add common/common-debug.c.
3940 (OBS): Add common-debug.o.
3941 (common-debug.o): New rule.
3942 * debug.h (debug_printf): Don't declare.
3943 * debug.c (debug_printf): Renamed and rewritten as...
3944 (debug_vprintf): New function.
3945
3946 2014-08-19 Gary Benson <gbenson@redhat.com>
3947
3948 * utils.h: Do not include print-utils.h.
3949
3950 2014-08-19 Tom Tromey <tromey@redhat.com>
3951 Gary Benson <gbenson@redhat.com>
3952
3953 * server.h: Add static assertion.
3954 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3955
3956 2014-08-19 Tom Tromey <tromey@redhat.com>
3957 Gary Benson <gbenson@redhat.com>
3958
3959 * Makefile.in (SFILES): Add common/errors.c.
3960 (OBS): Add errors.o.
3961 (IPA_OBS): Add errors-ipa.o.
3962 (errors.o): New rule.
3963 (errors-ipa.o): Likewise.
3964 * utils.h (perror_with_name, error, warning): Don't declare.
3965 * utils.c (warning): Renamed and rewritten as...
3966 (vwarning): New function.
3967 (error): Renamed and rewritten as...
3968 (verror): New function.
3969 (internal_error): Renamed and rewritten as...
3970 (internal_verror): New function.
3971
3972 2014-08-07 Gary Benson <gbenson@redhat.com>
3973
3974 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3975 * configure: Regenerate.
3976 * config.in: Likewise.
3977 * server.h: Do not include errno.h.
3978 * event-loop.c: Likewise.
3979 * hostio-errno.c: Likewise.
3980 * linux-low.c: Likewise.
3981 * remote-utils.c: Likewise.
3982 * spu-low.c: Likewise.
3983 * utils.c: Likewise.
3984 * gdbreplay.c: Unconditionally include errno.h.
3985
3986 2014-08-07 Gary Benson <gbenson@redhat.com>
3987
3988 * server.h: Do not include string.h.
3989 * event-loop.c: Likewise.
3990 * linux-low.c: Likewise.
3991 * regcache.c: Likewise.
3992 * remote-utils.c: Likewise.
3993 * spu-low.c: Likewise.
3994 * utils.c: Likewise.
3995
3996 2014-08-07 Gary Benson <gbenson@redhat.com>
3997
3998 * server.h: Do not include gdb_assert.h.
3999
4000 2014-08-07 Gary Benson <gbenson@redhat.com>
4001
4002 * server.h: Do not include common-utils.h.
4003
4004 2014-08-07 Gary Benson <gbenson@redhat.com>
4005
4006 * server.h: Do not include ptid.h.
4007 * notif.h: Likewise.
4008
4009 2014-08-07 Gary Benson <gbenson@redhat.com>
4010
4011 * server.h: Do not include gdb_locale.h.
4012
4013 2014-08-07 Gary Benson <gbenson@redhat.com>
4014
4015 * server.h: Do not include gdb/signals.h.
4016 * win32-low.c: Likewise.
4017
4018 2014-08-07 Gary Benson <gbenson@redhat.com>
4019
4020 * server.h: Do not include pathmax.h.
4021
4022 2014-08-07 Gary Benson <gbenson@redhat.com>
4023
4024 * server.h: Do not include libiberty.h.
4025 * linux-bfin-low.c: Likewise.
4026
4027 2014-08-07 Gary Benson <gbenson@redhat.com>
4028
4029 * server.h: Do not include ansidecl.h.
4030
4031 2014-08-07 Gary Benson <gbenson@redhat.com>
4032
4033 * linux-x86-low.c: Do not include stddef.h.
4034 * lynx-ppc-low.c: Likewise.
4035 * tracepoint.c: Likewise.
4036
4037 2014-08-07 Gary Benson <gbenson@redhat.com>
4038
4039 * server.h: Do not include stdarg.h.
4040 * nto-low.c: Likewise.
4041
4042 2014-08-07 Gary Benson <gbenson@redhat.com>
4043
4044 * server.h: Do not include stdlib.h.
4045 * inferiors.c: Likewise.
4046 * linux-low.c: Likewise.
4047 * regcache.c: Likewise.
4048 * spu-low.c: Likewise.
4049 * tracepoint.c: Likewise.
4050 * utils.c: Likewise.
4051
4052 2014-08-07 Gary Benson <gbenson@redhat.com>
4053
4054 * server.h: Do not include stdio.h.
4055 * linux-low.c: Likewise.
4056 * remote-utils.c: Likewise.
4057 * spu-low.c: Likewise.
4058 * utils.c: Likewise.
4059 * wincecompat.c: Likewise.
4060
4061 2014-08-06 Gary Benson <gbenson@redhat.com>
4062
4063 * regcache.c (init_register_cache): Move conditionals inside if.
4064
4065 2014-08-06 Gary Benson <gbenson@redhat.com>
4066
4067 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4068
4069 2014-07-31 Gary Benson <gbenson@redhat.com>
4070
4071 * ax.h: Do not include server.h.
4072 * gdbthread.h: Likewise.
4073 * lynx-low.h: Likewise.
4074 * notif.h: Likewise.
4075
4076 2014-07-30 Gary Benson <gbenson@redhat.com>
4077
4078 * server.h: Include common-defs.h.
4079 Do not include config.h or build-gnulib-gdbserver/config.h.
4080
4081 2014-07-30 Gary Benson <gbenson@redhat.com>
4082
4083 * hostio-errno.c: Move server.h to top of includes list.
4084 * inferiors.c: Likewise.
4085 * linux-x86-low.c: Likewise.
4086 * notif.c: Include server.h.
4087
4088 2014-07-24 Tom Tromey <tromey@redhat.com>
4089 Gary Benson <gbenson@redhat.com>
4090
4091 * server.h (CORE_ADDR): Now unsigned.
4092
4093 2014-07-16 Pedro Alves <palves@redhat.com>
4094
4095 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4096
4097 2014-07-15 Pedro Alves <palves@redhat.com>
4098
4099 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4100 copy.
4101
4102 2014-07-11 Pedro Alves <palves@redhat.com>
4103
4104 * linux-low.c (kill_wait_lwp): New function, based on
4105 kill_one_lwp_callback, but use my_waitpid directly.
4106 (kill_one_lwp_callback, linux_kill): Use it.
4107
4108 2014-06-23 Pedro Alves <palves@redhat.com>
4109
4110 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4111 before setting DR0..DR3.
4112
4113 2014-06-20 Gary Benson <gbenson@redhat.com>
4114
4115 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4116 * configure: Regenerated.
4117 * config.in: Likewise.
4118
4119 2014-06-20 Gary Benson <gbenson@redhat.com>
4120
4121 * Makefile.in (SFILES): Update locations for files moved
4122 from common to nat.
4123 (object file files): Reordered.
4124
4125 2014-06-20 Gary Benson <gbenson@redhat.com>
4126
4127 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4128 (i386_dr_low_set_addr): Likewise.
4129 (i386_dr_low_get_addr): Likewise.
4130 (i386_dr_low_can_set_control): Likewise.
4131 (i386_dr_low_set_control): Likewise.
4132 (i386_dr_low_get_control): Likewise.
4133 (i386_dr_low_get_status): Likewise.
4134 (i386_get_debug_register_length): Likewise.
4135 * linux-x86-low.c (i386_dr_low_set_addr):
4136 Changed signature. Made static.
4137 (i386_dr_low_get_addr): Likewise.
4138 (i386_dr_low_set_control): Likewise.
4139 (i386_dr_low_get_control): Likewise.
4140 (i386_dr_low_get_status): Likewise.
4141 (i386_dr_low): New global variable.
4142 * win32-i386-low.c (i386_dr_low_set_addr):
4143 Changed signature. Made static.
4144 (i386_dr_low_get_addr): Likewise.
4145 (i386_dr_low_set_control): Likewise.
4146 (i386_dr_low_get_control): Likewise.
4147 (i386_dr_low_get_status): Likewise.
4148 (i386_dr_low): New global variable.
4149
4150 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4151
4152 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4153 * Makefile.in (AR, AR_FLAGS): Define.
4154 * configure: Regenerate.
4155
4156 2014-06-19 Gary Benson <gbenson@redhat.com>
4157
4158 * Makefile.in (i386-dregs.o): New rule.
4159 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4160 * i386-low.c (target.h): Remove include.
4161 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4162 (DR_CONTROL_SHIFT): Likewise.
4163 (DR_CONTROL_SIZE): Likewise.
4164 (DR_RW_EXECUTE): Likewise.
4165 (DR_RW_WRITE): Likewise.
4166 (DR_RW_READ): Likewise.
4167 (DR_RW_IORW): Likewise.
4168 (DR_LEN_1): Likewise.
4169 (DR_LEN_2): Likewise.
4170 (DR_LEN_4): Likewise.
4171 (DR_LEN_8): Likewise.
4172 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4173 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4174 (DR_ENABLE_SIZE): Likewise.
4175 (DR_LOCAL_SLOWDOWN): Likewise.
4176 (DR_GLOBAL_SLOWDOWN): Likewise.
4177 (DR_CONTROL_RESERVED): Likewise.
4178 (I386_DR_CONTROL_MASK): Likewise.
4179 (I386_DR_VACANT): Likewise.
4180 (I386_DR_LOCAL_ENABLE): Likewise.
4181 (I386_DR_GLOBAL_ENABLE): Likewise.
4182 (I386_DR_DISABLE): Likewise.
4183 (I386_DR_SET_RW_LEN): Likewise.
4184 (I386_DR_GET_RW_LEN): Likewise.
4185 (I386_DR_WATCH_HIT): Likewise.
4186 (i386_wp_op_t): Likewise.
4187 (i386_show_dr): Likewise.
4188 (i386_length_and_rw_bits): Likewise.
4189 (i386_insert_aligned_watchpoint): Likewise.
4190 (i386_remove_aligned_watchpoint): Likewise.
4191 (i386_handle_nonaligned_watchpoint): Likewise.
4192 i386_update_inferior_debug_regs(): Likewise.
4193 (i386_dr_insert_watchpoint): Likewise.
4194 (i386_dr_remove_watchpoint): Likewise.
4195 (i386_dr_region_ok_for_watchpoint): Likewise.
4196 (i386_dr_stopped_data_address): Likewise.
4197 (i386_dr_stopped_by_watchpoint): Likewise.
4198
4199 2014-06-19 Gary Benson <gbenson@redhat.com>
4200
4201 * i386-low.c (i386_dr_show): Renamed to
4202 i386_show_dr and made static. All uses updated.
4203 (i386_dr_length_and_rw_bits): Renamed to
4204 i386_length_and_rw_bits and made static.
4205 All uses updated.
4206 (i386_dr_insert_aligned_watchpoint): Renamed to
4207 i386_insert_aligned_watchpoint and made static.
4208 All uses updated.
4209 (i386_dr_remove_aligned_watchpoint): Renamed to
4210 i386_remove_aligned_watchpoint and made static.
4211 All uses updated.
4212 (i386_dr_update_inferior_debug_regs): Renamed to
4213 i386_update_inferior_debug_regs and made static.
4214 All uses updated.
4215
4216 2014-06-18 Gary Benson <gbenson@redhat.com>
4217
4218 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4219 (i386_dr_low_can_set_control): Likewise.
4220 (i386_get_debug_register_length): Likewise.
4221 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4222 (i386_dr_low_can_set_control): Likewise.
4223 (i386_get_debug_register_length): Likewise.
4224
4225 2014-06-17 Gary Benson <gbenson@redhat.com>
4226
4227 * i386-low.h (i386-dregs.h): New include.
4228 (DR_FIRSTADDR): Now in i386-dregs.h.
4229 (DR_LASTADDR): Likewise.
4230 (DR_NADDR): Likewise.
4231 (DR_STATUS): Likewise.
4232 (DR_CONTROL): Likewise.
4233 (i386_debug_reg_state): Likewise.
4234 (i386_dr_insert_watchpoint): Likewise.
4235 (i386_dr_remove_watchpoint): Likewise.
4236 (i386_dr_region_ok_for_watchpoint): Likewise.
4237 (i386_dr_stopped_data_address): Likewise.
4238 (i386_dr_stopped_by_watchpoint): Likewise.
4239 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4240
4241 2014-06-18 Gary Benson <gbenson@redhat.com>
4242
4243 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4244 i386_dr_insert_watchpoint.
4245 (i386_low_remove_watchpoint): Renamed to
4246 i386_dr_remove_watchpoint.
4247 (i386_low_region_ok_for_watchpoint): Renamed to
4248 i386_dr_region_ok_for_watchpoint.
4249 (i386_low_stopped_data_address): Renamed to
4250 i386_dr_stopped_data_address.
4251 (i386_low_stopped_by_watchpoint): Renamed to
4252 i386_dr_stopped_by_watchpoint.
4253 * i386-low.c (i386_show_dr): Renamed to
4254 i386_dr_show and made nonstatic. All uses updated.
4255 (i386_length_and_rw_bits): Renamed to
4256 i386_dr_length_and_rw_bits and made nonstatic.
4257 All uses updated.
4258 (i386_insert_aligned_watchpoint): Renamed to
4259 i386_dr_insert_aligned_watchpoint and made nonstatic.
4260 All uses updated.
4261 (i386_remove_aligned_watchpoint): Renamed to
4262 i386_dr_remove_aligned_watchpoint and made nonstatic.
4263 All uses updated.
4264 (i386_update_inferior_debug_regs): Renamed to
4265 i386_dr_update_inferior_debug_regs and made nonstatic.
4266 All uses updated.
4267 (i386_low_insert_watchpoint): Renamed to
4268 i386_dr_insert_watchpoint. All uses updated.
4269 (i386_low_remove_watchpoint): Renamed to
4270 i386_dr_remove_watchpoint. All uses updated.
4271 (i386_low_region_ok_for_watchpoint): Renamed to
4272 i386_dr_region_ok_for_watchpoint. All uses updated.
4273 (i386_low_stopped_data_address): Renamed to
4274 i386_dr_stopped_data_address. All uses updated.
4275 (i386_low_stopped_by_watchpoint): Renamed to
4276 i386_dr_stopped_by_watchpoint. All uses updated.
4277
4278 2014-06-18 Gary Benson <gbenson@redhat.com>
4279
4280 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4281 (i386_dr_low_can_set_control): Likewise.
4282 (i386_insert_aligned_watchpoint): New check.
4283
4284 2014-06-18 Gary Benson <gbenson@redhat.com>
4285
4286 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4287 Renamed to state.
4288
4289 2014-06-18 Gary Benson <gbenson@redhat.com>
4290
4291 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4292 instead of fatal and error.
4293 (i386_handle_nonaligned_watchpoint): Likewise.
4294
4295 2014-06-18 Gary Benson <gbenson@redhat.com>
4296
4297 * i386-low.c (i386_get_debug_register_length): New macro.
4298 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4299 (i386_show_dr): Use debug_printf instead of fprintf. Use
4300 phex to format values.
4301
4302 2014-06-18 Gary Benson <gbenson@redhat.com>
4303
4304 * i386-low.h: Comment changes.
4305 * i386-low.c: Likewise.
4306
4307 2014-06-18 Gary Benson <gbenson@redhat.com>
4308
4309 * i386-low.c: Whitespace changes.
4310
4311 2014-06-12 Tom Tromey <tromey@redhat.com>
4312
4313 * utils.c (freeargv): Remove.
4314
4315 2014-06-12 Tom Tromey <tromey@redhat.com>
4316
4317 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4318 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4319 (parse_debug_format_options): Likewise.
4320 (gdbserver_usage): Likewise.
4321 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4322 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4323 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4324 against libiberty.
4325 ($(LIBGNU)): Depend on libiberty.
4326 (all-lib): Recurse into all subdirs.
4327 (install-only): Invoke "install" target in subdirs.
4328 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4329 targets.
4330 * configure: Rebuild.
4331 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4332 for vasprintf, vsnprintf, or gettimeofday.
4333 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4334 srv_tgtobj.
4335
4336 2014-06-05 Joel Brobecker <brobecker@adacore.com>
4337
4338 * development.sh: Delete.
4339 * Makefile.in (config.status): Adjust dependency on development.sh.
4340 * configure.ac: Adjust development.sh source call.
4341 * configure: Regenerate.
4342
4343 2014-06-02 Pedro Alves <palves@redhat.com>
4344
4345 * ax.c (gdb_free_agent_expr): New function.
4346 * ax.h (gdb_free_agent_expr): New declaration.
4347 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4348 list.
4349 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4350 static.
4351 (clear_breakpoint_conditions_and_commands): New function.
4352 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4353 (clear_breakpoint_conditions_and_commands): New declaration.
4354
4355 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4356
4357 * linux-aarch64-low.c (asm/ptrace.h): Include.
4358
4359 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4360
4361 Fix TLS access for -static -pthread.
4362 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4363 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4364 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4365
4366 2014-05-20 Pedro Alves <palves@redhat.com>
4367
4368 * linux-aarch64-low.c (aarch64_insert_point)
4369 (aarch64_remove_point): No longer check whether the type is
4370 supported here. Adjust to new interface.
4371 (the_low_target): Install aarch64_supports_z_point_type as
4372 supports_z_point_type method.
4373 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4374 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4375 instead of a Z packet char. Adjust.
4376 (arm_supports_z_point_type): New function.
4377 (arm_insert_point, arm_remove_point): Adjust to new interface.
4378 (the_low_target): Install arm_supports_z_point_type.
4379 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4380 (cris_insert_point, cris_remove_point): Adjust to new interface.
4381 Don't check whether the type is supported here.
4382 (the_low_target): Install cris_supports_z_point_type.
4383 * linux-low.c (linux_supports_z_point_type): New function.
4384 (linux_insert_point, linux_remove_point): Adjust to new interface.
4385 * linux-low.h (struct linux_target_ops) <insert_point,
4386 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4387 raw_breakpoint pointer parameter.
4388 <supports_z_point_type>: New method.
4389 * linux-mips-low.c (mips_supports_z_point_type): New function.
4390 (mips_insert_point, mips_remove_point): Adjust to new interface.
4391 Use mips_supports_z_point_type.
4392 (the_low_target): Install mips_supports_z_point_type.
4393 * linux-ppc-low.c (the_low_target): Install NULL as
4394 supports_z_point_type method.
4395 * linux-s390-low.c (the_low_target): Install NULL as
4396 supports_z_point_type method.
4397 * linux-sparc-low.c (the_low_target): Install NULL as
4398 supports_z_point_type method.
4399 * linux-x86-low.c (x86_supports_z_point_type): New function.
4400 (x86_insert_point): Adjust to new insert_point interface. Use
4401 insert_memory_breakpoint. Adjust to new
4402 i386_low_insert_watchpoint interface.
4403 (x86_remove_point): Adjust to remove_point interface. Use
4404 remove_memory_breakpoint. Adjust to new
4405 i386_low_remove_watchpoint interface.
4406 (the_low_target): Install x86_supports_z_point_type.
4407 * lynx-low.c (lynx_target_ops): Install NULL as
4408 supports_z_point_type callback.
4409 * nto-low.c (nto_supports_z_point_type): New.
4410 (nto_insert_point, nto_remove_point): Adjust to new interface.
4411 (nto_target_ops): Install nto_supports_z_point_type.
4412 * mem-break.c: Adjust intro comment.
4413 (struct raw_breakpoint) <raw_type, size>: New fields.
4414 <inserted>: Update comment.
4415 <shlib_disabled>: Delete field.
4416 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4417 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4418 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4419 (raw_bkpt_type_to_target_hw_bp_type): New function.
4420 (find_enabled_raw_code_breakpoint_at): New function.
4421 (find_raw_breakpoint_at): New type and size parameters. Use them.
4422 (insert_memory_breakpoint): New function, based off
4423 set_raw_breakpoint_at.
4424 (remove_memory_breakpoint): New function.
4425 (set_raw_breakpoint_at): Reimplement.
4426 (set_breakpoint): New, based on set_breakpoint_at.
4427 (set_breakpoint_at): Reimplement.
4428 (delete_raw_breakpoint): Go through the_target->remove_point
4429 instead of assuming memory breakpoints.
4430 (find_gdb_breakpoint_at): Delete.
4431 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4432 (find_gdb_breakpoint): New function.
4433 (set_gdb_breakpoint_at): Delete.
4434 (z_type_supported): New function.
4435 (set_gdb_breakpoint_1): New function, loosely based off
4436 set_gdb_breakpoint_at.
4437 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4438 (delete_gdb_breakpoint_at): Delete.
4439 (delete_gdb_breakpoint_1): New function, loosely based off
4440 delete_gdb_breakpoint_at.
4441 (delete_gdb_breakpoint): New function.
4442 (clear_gdb_breakpoint_conditions): Rename to ...
4443 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4444 breakpoint.
4445 (add_condition_to_breakpoint): Make static.
4446 (add_breakpoint_condition): Take a struct breakpoint pointer
4447 instead of an address. Adjust.
4448 (gdb_condition_true_at_breakpoint): Rename to ...
4449 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4450 z_type parameter.
4451 (gdb_condition_true_at_breakpoint): Reimplement.
4452 (add_breakpoint_commands): Take a struct breakpoint pointer
4453 instead of an address. Adjust.
4454 (gdb_no_commands_at_breakpoint): Rename to ...
4455 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4456 parameter. Return true if no breakpoint was found. Change debug
4457 output.
4458 (gdb_no_commands_at_breakpoint): Reimplement.
4459 (run_breakpoint_commands): Rename to ...
4460 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4461 and change return type to boolean.
4462 (run_breakpoint_commands): New function.
4463 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4464 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4465 breakpoint. Go through the_target->remove_point instead of
4466 assuming memory breakpoint.
4467 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4468 software and hardware breakpoints.
4469 (reinsert_raw_breakpoint): Go through the_target->insert_point
4470 instead of assuming memory breakpoint.
4471 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4472 software and hardware breakpoints.
4473 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4474 Check both software and hardware breakpoints.
4475 (validate_inserted_breakpoint): Assert the breakpoint is a
4476 software breakpoint. Set the inserted flag to -1 instead of
4477 setting shlib_disabled.
4478 (delete_disabled_breakpoints): Adjust.
4479 (validate_breakpoints): Only validate software breakpoints.
4480 Adjust to inserted flag change.
4481 (check_mem_read, check_mem_write): Skip breakpoint types other
4482 than software breakpoints. Adjust to inserted flag change.
4483 * mem-break.h (enum raw_bkpt_type): New enum.
4484 (raw_breakpoint, struct process_info): Forward declare.
4485 (Z_packet_to_target_hw_bp_type): Delete declaration.
4486 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4487 (set_gdb_breakpoint, delete_gdb_breakpoint)
4488 (clear_breakpoint_conditions): New declarations.
4489 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4490 (breakpoint_inserted_here): Update comment.
4491 (add_breakpoint_condition, add_breakpoint_commands): Replace
4492 address parameter with a breakpoint pointer parameter.
4493 (gdb_breakpoint_here): Update comment.
4494 (delete_gdb_breakpoint_at): Delete.
4495 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4496 * server.c (process_point_options): Take a struct breakpoint
4497 pointer instead of an address. Adjust.
4498 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4499 delete_gdb_breakpoint.
4500 * spu-low.c (spu_target_ops): Install NULL as
4501 supports_z_point_type method.
4502 * target.h: Include mem-break.h.
4503 (struct target_ops) <prepare_to_access_memory>: Update comment.
4504 <supports_z_point_type>: New field.
4505 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4506 instead of a char. Also take a raw breakpoint pointer.
4507 * win32-arm-low.c (the_low_target): Install NULL as
4508 supports_z_point_type.
4509 * win32-i386-low.c (i386_supports_z_point_type): New function.
4510 (i386_insert_point, i386_remove_point): Adjust to new interface.
4511 (the_low_target): Install i386_supports_z_point_type.
4512 * win32-low.c (win32_supports_z_point_type): New function.
4513 (win32_insert_point, win32_remove_point): Adjust to new interface.
4514 (win32_target_ops): Install win32_supports_z_point_type.
4515 * win32-low.h (struct win32_target_ops):
4516 <supports_z_point_type>: New method.
4517 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4518 instead of a char. Also take a raw breakpoint pointer.
4519
4520 2014-05-20 Pedro Alves <palves@redhat.com>
4521
4522 * mem-break.h: Include break-common.h.
4523 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4524 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4525 (Z_packet_to_target_hw_bp_type): New declaration.
4526 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4527 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4528 (Z_PACKET_ACCESS_WP): Delete macros.
4529 (Z_packet_to_hw_type): Delete function.
4530 * i386-low.h: Don't include break-common.h here.
4531 (Z_packet_to_hw_type): Delete declaration.
4532 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4533 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4534 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4535 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4536 * linux-aarch64-low.c: Don't include break-common.h here.
4537 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4538 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4539 (Z_packet_to_target_hw_bp_type): Delete function.
4540 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4541 function.
4542 (mips_insert_point, mips_remove_point): Use
4543 Z_packet_to_target_hw_bp_type.
4544
4545 2014-05-20 Pedro Alves <palves@redhat.com>
4546
4547 * linux-aarch64-low.c: Include break-common.h.
4548 (enum target_point_type): Delete.
4549 (Z_packet_to_point_type): Rename to ...
4550 (Z_packet_to_target_hw_bp_type): ... this, and return a
4551 target_hw_bp_type instead.
4552 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4553 instead of an enum target_point_type.
4554 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4555 breakpoint type.
4556 (aarch64_dr_state_insert_one_point)
4557 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4558 (aarch64_handle_aligned_watchpoint)
4559 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4560 Take an enum target_hw_bp_type instead of an enum
4561 target_point_type.
4562 (aarch64_supports_z_point_type): New function.
4563 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4564 use Z_packet_to_target_hw_bp_type.
4565
4566 2014-05-20 Joel Brobecker <brobecker@adacore.com>
4567
4568 * configure.ac: Only use -Werror by default when DEVELOPMENT
4569 is true.
4570 * configure: Regenerate.
4571
4572 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4573
4574 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4575 * linux-x86-low.c (X86_64_USER_REGS): New.
4576 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4577
4578 2014-04-28 Yao Qi <yao@codesourcery.com>
4579
4580 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4581 name.
4582
4583 2014-04-25 Pedro Alves <palves@redhat.com>
4584
4585 PR server/16255
4586 * linux-low.c (linux_attach_fail_reason_string): New function.
4587 (linux_attach_lwp): Delete.
4588 (linux_attach_lwp_1): Rename to ...
4589 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4590 argument. Remove "initial" parameter. Return int instead of
4591 void. Don't error or warn here.
4592 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4593 failure to attach to the tgid. Call warning when failing to
4594 attach to an lwp.
4595 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4596 argument. Remove "initial" parameter. Return int instead of
4597 void. Don't error or warn here.
4598 (linux_attach_fail_reason_string): New declaration.
4599 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4600 interface change. Use linux_attach_fail_reason_string.
4601
4602 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
4603 Walfred Tedeschi <walfred.tedeschi@intel.com>
4604
4605 * Makefile.in: Added rules to handle new files
4606 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4607 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4608 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4609 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4610 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4611 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4612 x32-avx512-linux.o.
4613 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4614 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4615 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4616 i386/x32-avx512.xml.
4617 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4618 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4619 i386/x32-avx512-linux.xml.
4620 * i387-fp.c (num_avx512_k_registers): New constant for number
4621 of K registers.
4622 (num_avx512_zmmh_low_registers): New constant for number of
4623 lower ZMM registers (0-15).
4624 (num_avx512_zmmh_high_registers): New constant for number of
4625 higher ZMM registers (16-31).
4626 (num_avx512_ymmh_registers): New contant for number of higher
4627 YMM registers (ymm16-31 added by avx521 on x86_64).
4628 (num_avx512_xmm_registers): New constant for number of higher
4629 XMM registers (xmm16-31 added by AVX512 on x86_64).
4630 (struct i387_xsave): Add space for AVX512 registers.
4631 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4632 Add code to handle AVX512 registers.
4633 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4634 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4635 prototypei from generated file.
4636 (tdesc_amd64_avx512_linux): Likewise.
4637 (init_registers_x32_avx512_linux): Likewise.
4638 (tdesc_x32_avx512_linux): Likewise.
4639 (init_registers_i386_avx512_linux): Likewise.
4640 (tdesc_i386_avx512_linux): Likewise.
4641 (x86_64_regmap): Add AVX512 registers.
4642 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4643 mask.
4644 (initialize_low_arch): Add code to initialize AVX512 registers.
4645
4646 2014-04-23 Pedro Alves <palves@redhat.com>
4647
4648 * mem-break.c (find_gdb_breakpoint_at): Make static.
4649 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4650
4651 2014-04-23 Pedro Alves <palves@redhat.com>
4652
4653 * i386-low.c: Don't include break-common.h here.
4654 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4655 prototype to take target_hw_bp_type as argument instead of a Z
4656 packet char.
4657 * i386-low.h: Include break-common.h here.
4658 (Z_packet_to_hw_type): Declare.
4659 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4660 prototypes.
4661 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4662 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4663 (x86_remove_point): Convert the packet number to a
4664 target_hw_bp_type before calling i386_low_remove_watchpoint.
4665 * win32-i386-low.c (i386_insert_point): Convert the packet number
4666 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4667 (i386_remove_point): Convert the packet number to a
4668 target_hw_bp_type before calling i386_low_remove_watchpoint.
4669
4670 2014-04-23 Pedro Alves <palves@redhat.com>
4671
4672 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4673
4674 2014-04-10 Pedro Alves <palves@redhat.com>
4675
4676 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4677 Check if the condition or command is NULL before checking if the
4678 breakpoint is known. On success, return true.
4679 * mem-break.h (add_breakpoint_condition): Document return.
4680 (add_breakpoint_commands): Add describing comment.
4681 * server.c (skip_to_semicolon): New function.
4682 (process_point_options): Use it.
4683
4684 2014-04-09 Pedro Alves <palves@redhat.com>
4685
4686 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4687 to lwpid_of.
4688
4689 2014-02-27 Pedro Alves <palves@redhat.com>
4690
4691 PR 12702
4692 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4693 macros.
4694 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4695 output.
4696 (last_thread_of_process_p): Take a PID argument instead of a
4697 thread pointer.
4698 (linux_wait_for_lwp): Delete.
4699 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4700 functions.
4701 (linux_low_filter_event): New function, party factored out from
4702 linux_wait_for_event.
4703 (linux_wait_for_event): Rename to ...
4704 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4705 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4706 sigsuspend. Check for zombie leaders.
4707 (linux_wait_for_event): Reimplement as wrapper around
4708 linux_wait_for_event_filtered.
4709 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4710 a normal or signal exit is seen, it's the whole process exiting.
4711 (wait_for_sigstop): No longer a for_each_inferior callback.
4712 Rewrite on top of linux_wait_for_event_filtered.
4713 (stop_all_lwps): Call wait_for_sigstop directly.
4714 * server.c (resume, handle_target_event): Handle
4715 TARGET_WAITKIND_NO_RESUMED.
4716
4717 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4718
4719 * win32-low.c (psapi_get_dll_name,
4720 * win32_CreateToolhelp32Snapshot): Delete.
4721 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4722 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4723 Delete.
4724 (handle_load_dll): Add function description.
4725 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4726
4727 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4728
4729 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4730 Add comment.
4731 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4732 base address when calling win32_add_one_solib.
4733 (handle_load_dll): Delete local variable load_addr.
4734 Remove 0x1000 offset applied to DLL base address when calling
4735 win32_add_one_solib.
4736 (handle_unload_dll): Add comment.
4737
4738 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4739
4740 * win32-low.c (win32_add_all_dlls): Renames
4741 win32_ensure_ntdll_loaded. Rewrite function documentation.
4742 Adjust implementation to always load all DLLs.
4743 Add 0x1000 offset to DLL base address when calling
4744 win32_add_one_solib.
4745 (child_initialization_done): New static global.
4746 (do_initial_child_stuff): Set child_initialization_done to
4747 zero during child initialization, and 1 after. Replace call
4748 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4749 Add comment.
4750 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4751 (handle_unload_dll): Add function documentation.
4752 (get_child_debug_event): Ignore load and unload DLL events
4753 during child initialization.
4754
4755 2014-02-20 Doug Evans <dje@google.com>
4756
4757 Remove global all_lwps.
4758 * inferiors.h (ptid_of): Move here from linux-low.h.
4759 (pid_of, lwpid_of): Ditto.
4760 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4761 parameter is a struct thread_info * now.
4762 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4763 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4764 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4765 directly.
4766 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4767 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4768 * linux-arm-low.c (update_registers_callback): Update, "entry"
4769 parameter is a struct thread_info * now.
4770 Fetch lwpid from current_inferior directly.
4771 (arm_insert_point): Pass &all_threads to find_inferior instead of
4772 &all_lwps.
4773 (arm_remove_point): Ditto.
4774 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4775 (arm_prepare_to_resume): Fetch pid from thread.
4776 (arm_read_description): Fetch lwpid from current_inferior directly.
4777 * linux-low.c (all_lwps): Delete.
4778 (delete_lwp): Delete call to remove_inferior.
4779 (handle_extended_wait): Fetch lwpid from thread.
4780 (add_lwp): Don't set lwp->entry.id. Remove call to
4781 add_inferior_to_list.
4782 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4783 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4784 (kill_one_lwp_callback): Ditto.
4785 (linux_kill): Don't dereference NULL pointer.
4786 Fetch ptid,lwpid from thread.
4787 (get_detach_signal): Fetch ptid from thread.
4788 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4789 Simplify call to regcache_invalidate_thread.
4790 (delete_lwp_callback): Update, "entry" parameter is a
4791 struct thread_info * now. Fetch pid from thread.
4792 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4793 (status_pending_p_callback): Update, "entry" parameter is a
4794 struct thread_info * now. Fetch ptid from thread.
4795 (find_lwp_pid): Update, "entry" parameter is a
4796 struct thread_info * now.
4797 (linux_wait_for_lwp): Fetch pid from thread.
4798 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4799 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4800 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4801 (dequeue_one_deferred_signal): Ditto.
4802 (cancel_breakpoint): Fetch ptid from current_inferior.
4803 (linux_wait_for_event): Pass &all_threads to find_inferior,
4804 not &all_lwps. Fetch ptid, lwpid from thread.
4805 (count_events_callback): Update, "entry" parameter is a
4806 struct thread_info * now.
4807 (select_singlestep_lwp_callback): Ditto.
4808 (select_event_lwp_callback): Ditto.
4809 (cancel_breakpoints_callback): Ditto.
4810 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4811 not &all_lwps.
4812 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4813 (unsuspend_one_lwp): Update, "entry" parameter is a
4814 struct thread_info * now.
4815 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4816 not &all_lwps.
4817 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4818 Fetch lwpid from thread, not lwp.
4819 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4820 Pass &all_threads to find_inferior, not &all_lwps.
4821 (send_sigstop): Fetch lwpid from thread, not lwp.
4822 (send_sigstop_callback): Update, "entry" parameter is a
4823 struct thread_info * now.
4824 (suspend_and_send_sigstop_callback): Ditto.
4825 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4826 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4827 struct thread_info * now.
4828 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4829 from thread, lwp.
4830 (lwp_running): Update, "entry" parameter is a
4831 struct thread_info * now.
4832 (stop_all_lwps): Fetch ptid from thread.
4833 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4834 (linux_resume_one_lwp): Fetch lwpid from thread.
4835 (linux_set_resume_request): Update, "entry" parameter is a
4836 struct thread_info * now. Fetch pid, lwpid from thread.
4837 (resume_status_pending_p): Update, "entry" parameter is a
4838 struct thread_info * now.
4839 (need_step_over_p): Ditto. Fetch lwpid from thread.
4840 (start_step_over): Fetch lwpid from thread.
4841 (linux_resume_one_thread): Update, "entry" parameter is a
4842 struct thread_info * now. Fetch lwpid from thread.
4843 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4844 (proceed_one_lwp): Update, "entry" parameter is a
4845 struct thread_info * now. Fetch lwpid from thread.
4846 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4847 struct thread_info * now.
4848 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4849 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4850 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4851 directly.
4852 (regsets_store_inferior_registers): Ditto.
4853 (fetch_register, store_register): Ditto.
4854 (linux_read_memory, linux_write_memory): Ditto.
4855 (linux_request_interrupt): Ditto.
4856 (linux_read_auxv): Ditto.
4857 (linux_xfer_siginfo): Ditto.
4858 (linux_qxfer_spu): Ditto.
4859 (linux_qxfer_libraries_svr4): Ditto.
4860 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4861 moved to inferiors.h.
4862 (get_lwp): Delete.
4863 (get_thread_lwp): Update.
4864 (struct lwp_info): Delete member "entry". Simplify comment for
4865 member "thread".
4866 (all_lwps): Delete.
4867 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4868 current_inferior directly.
4869 (update_watch_registers_callback): Update, "entry" parameter is a
4870 struct thread_info * now. Fetch pid from thread.
4871 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4872 (mips_insert_point): Fetch lwpid from current_inferior.
4873 Pass &all_threads to find_inferior, not &all_lwps.
4874 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4875 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4876 directly.
4877 (mips_stopped_data_address): Ditto.
4878 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4879 directly.
4880 * linux-tile-low.c (tile_arch_setup): Ditto.
4881 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4882 (update_debug_registers_callback): Update, "entry" parameter is a
4883 struct thread_info * now. Fetch pid from thread.
4884 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4885 Pass &all_threads to find_inferior, not &all_lwps.
4886 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4887 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4888 Pass &all_threads to find_inferior, not &all_lwps.
4889 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4890 (i386_dr_low_get_status): Ditto.
4891 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4892 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4893 (x86_linux_read_description): Ditto.
4894 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4895
4896 2014-02-20 Doug Evans <dje@google.com>
4897
4898 * inferiors.c (get_first_inferior): Fix buglet.
4899
4900 2014-02-19 Doug Evans <dje@google.com>
4901
4902 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4903 * inferiors.c (add_thread): Change result type to struct thread_info *.
4904 All callers updated.
4905 (add_lwp): Call add_thread here instead of in callers.
4906 All callers updated.
4907 * linux-low.h (get_lwp_thread): Rewrite.
4908 (struct lwp_info): New member "thread".
4909
4910 2014-02-19 Doug Evans <dje@google.com>
4911
4912 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4913 All callers updated.
4914
4915 2014-02-19 Doug Evans <dje@google.com>
4916
4917 * inferiors.c (add_thread): Fix whitespace.
4918
4919 2014-02-19 Doug Evans <dje@google.com>
4920
4921 * dll.c (clear_dlls): Replace accessing list implemention details
4922 with API function.
4923 * gdbthread.h (get_first_thread): Declare.
4924 * inferiors.c (for_each_inferior_with_data): New function.
4925 (get_first_thread): New function.
4926 (find_thread_ptid): Simplify.
4927 (get_first_inferior): New function.
4928 (clear_list): Delete.
4929 (one_inferior_p): New function.
4930 (clear_inferior_list): New function.
4931 (clear_inferiors): Update.
4932 * inferiors.h (for_each_inferior_with_data): Declare.
4933 (clear_inferior_list): Declare.
4934 (one_inferior_p): Declare.
4935 (get_first_inferior): Declare.
4936 * linux-low.c (linux_wait_for_event): Replace accessing list
4937 implemention details with API function.
4938 * server.c (target_running): Ditto.
4939 (accumulate_file_name_length): New function.
4940 (emit_dll_description): New function.
4941 (handle_qxfer_libraries): Replace accessing list implemention
4942 details with API function.
4943 (handle_qxfer_threads_worker): New function.
4944 (handle_qxfer_threads_proper): Replace accessing list implemention
4945 details with API function.
4946 (handle_query): Ditto.
4947 (visit_actioned_threads_callback_ftype): New typedef.
4948 (visit_actioned_threads_data): New struct.
4949 (visit_actioned_threads): Rewrite to be find_inferior callback.
4950 (resume): Call find_inferior.
4951 (handle_status): Replace accessing list implemention
4952 details with API function.
4953 (process_serial_event): Replace accessing list implemention details
4954 with API function.
4955 * target.c (set_desired_inferior): Replace accessing list implemention
4956 details with API function.
4957 * tracepoint.c (same_process_p): New function.
4958 (gdb_agent_about_to_close): Replace accessing list implemention
4959 details with API function.
4960 * win32-low.c (child_delete_thread): Replace accessing list
4961 implemention details with API function.
4962 (match_dll_by_basename): New function.
4963 (dll_is_loaded_by_basename): New function.
4964 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4965 details call to dll_is_loaded_by_basename.
4966
4967 2014-02-19 Doug Evans <dje@google.com>
4968
4969 * dll.h (struct dll_info): Add comment.
4970 * gdbthread.h (struct thread_info): Add comment.
4971 (current_ptid): Simplify.
4972 * inferiors.c (add_process): Update.
4973 (remove_process): Update.
4974 * inferiors.h (struct process_info): Rename member "head" to "entry".
4975 * linux-low.c (delete_lwp): Update.
4976 (add_lwp): Update.
4977 (last_thread_of_process_p): Update.
4978 (kill_one_lwp_callback, linux_kill): Update.
4979 (status_pending_p_callback): Update.
4980 (wait_for_sigstop): Update. Simplify read of ptid.
4981 (start_step_over): Update.
4982 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4983 (get_lwp_thread): Update.
4984 (struct lwp_info): Rename member "head" to "entry".
4985 * regcache.h (inferior_list_entry): Delete.
4986 * server.c (kill_inferior_callback): Update.
4987 (detach_or_kill_inferior_callback): Update.
4988 (print_started_pid): Update.
4989 (print_attached_pid): Update.
4990 (process_serial_event): Simplify read of ptid.
4991 * thread-db.c (thread_db_create_event): Update.
4992 (thread_db_get_tls_address): Update.
4993 * win32-low.c (current_inferior_ptid): Simplify.
4994
4995 2014-02-19 Tom Tromey <tromey@redhat.com>
4996
4997 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4998 argument.
4999 (target_supports_btrace): Update.
5000
5001 2014-02-14 Yao Qi <yao@codesourcery.com>
5002
5003 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5004 (rsp-low-ipa.o): New target.
5005
5006 2014-02-12 Tom Tromey <tromey@redhat.com>
5007
5008 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5009 convert_ascii_to_int.
5010 * regcache.c (registers_to_string): Likewise.
5011 * remote-utils.c (decode_M_packet): Likewise.
5012 * server.c (process_serial_event): Likewise.
5013
5014 2014-02-12 Tom Tromey <tromey@redhat.com>
5015
5016 * server.c (handle_query, handle_v_run): Use hex2bin, not
5017 unhexify.
5018 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5019
5020 2014-02-12 Tom Tromey <tromey@redhat.com>
5021
5022 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5023 convert_int_to_ascii.
5024 * regcache.c (registers_to_string, collect_register_as_string):
5025 Likewise.
5026 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5027 Likewise.
5028 * server.c (process_serial_event): Likewise.
5029 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5030 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5031
5032 2014-02-12 Tom Tromey <tromey@redhat.com>
5033
5034 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5035 bin2hex, not hexify.
5036 * tracepoint.c (cmd_qtstatus): Likewise.
5037
5038 2014-02-12 Tom Tromey <tromey@redhat.com>
5039
5040 * remote-utils.c (monitor_output): Pass explicit length to
5041 hexify.
5042
5043 2014-02-12 Tom Tromey <tromey@redhat.com>
5044
5045 * tracepoint.c: Include rsp-low.h.
5046 * server.c: Include rsp-low.h.
5047 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5048 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5049 declare.
5050 * remote-utils.c: Include rsp-low.h.
5051 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5052 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5053 (convert_int_to_ascii, convert_ascii_to_int): Move to
5054 common/rsp-low.c.
5055 * regcache.c: Include rsp-low.h.
5056 * ax.c: Include rsp-low.h.
5057 * Makefile.in (SFILES): Add common/rsp-low.c.
5058 (OBS): Add rsp-low.o.
5059 (rsp-low.o): New target.
5060
5061 2014-02-12 Tom Tromey <tromey@redhat.com>
5062
5063 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5064 Include print-utils.h.
5065 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5066 (plongest, thirty_two, phex_nz): Remove.
5067 * Makefile.in (SFILES): Add common/print-utils.c.
5068 (OBS): Add print-utils.o.
5069 (print-utils-ipa.o): New target.
5070 (print-utils.o): New target.
5071 (IPA_OBJS): Add print-utils-ipa.o.
5072
5073 2014-02-06 Tom Tromey <tromey@redhat.com>
5074
5075 * Makefile.in (SFILES): Fix indentation.
5076
5077 2014-02-05 Doug Evans <dje@google.com>
5078
5079 * linux-low.c (linux_wait_for_event): Improve comment.
5080 (linux_wait_1): Keep current_inferior in sync with event_child.
5081
5082 2014-01-22 Doug Evans <dje@google.com>
5083
5084 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5085
5086 2014-01-22 Doug Evans <dje@google.com>
5087
5088 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5089 * configure: Regenerate.
5090 * config.in: Regenerate.
5091 * Makefile.in (SFILES): Add debug.c.
5092 (OBS): Add debug.o.
5093 * debug.c: New file.
5094 * debug.h: New file.
5095 * linux-aarch64-low.c (*): Update all debugging printfs to use
5096 debug_printf instead of fprintf.
5097 * linux-arm-low.c (*): Ditto.
5098 * linux-cris-low.c (*): Ditto.
5099 * linux-crisv32-low.c (*): Ditto.
5100 * linux-m32r-low.c (*): Ditto.
5101 * linux-sparc-low.c (*): Ditto.
5102 * linux-x86.c (*): Ditto.
5103 * linux-low.c (*): Ditto.
5104 (linux_wait_1): Add calls to debug_enter, debug_exit.
5105 (linux_wait): Remove redundant debugging printf.
5106 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5107 (linux_resume, unstop_all_lwps): Ditto.
5108 * mem-break.c (*): Update all debugging printfs to use
5109 debug_printf instead of fprintf.
5110 * remote-utils.c (*): Ditto.
5111 * thread-db.c (*): Ditto.
5112 * server.c #include <ctype.h>, "gdb_vecs.h".
5113 (debug_threads): Moved to debug.c.
5114 (*): Update all debugging printfs to use debug_printf instead of
5115 fprintf.
5116 (start_inferior): Replace call to fflush with call to debug_flush.
5117 (monitor_show_help): Mention set debug-format.
5118 (parse_debug_format_options): New function.
5119 (handle_monitor_command): Handle "monitor set debug-format".
5120 (gdbserver_usage): Mention --debug-format.
5121 (main): Parse --debug-format.
5122 * server.h (debug_threads): Declaration moved to debug.h.
5123 #include "debug.h".
5124 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5125 trace_debug_1 that uses debug_printf.
5126 (tracepoint_look_up_symbols): Update all debugging printfs to use
5127 debug_printf instead of fprintf.
5128
5129 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5130
5131 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5132 sys/ptrace.h.
5133
5134 2014-01-17 Pedro Alves <palves@redhat.com>
5135
5136 PR build/16445
5137 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5138 defined after including gdb_proc_service.h.
5139
5140 2014-01-16 Doug Evans <dje@google.com>
5141
5142 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5143 (match_dll): Use it.
5144
5145 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5146
5147 * target.h (target_ops) <read_btrace>: Change parameters and
5148 return type to allow error reporting.
5149 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5150 trace reading errors on.
5151 * linux-low.c (linux_low_read_btrace): Pass trace reading
5152 errors on.
5153 (linux_low_disable_btrace): New.
5154
5155 2014-01-15 Doug Evans <dje@google.com>
5156
5157 * inferiors.c (thread_id_to_gdb_id): Delete.
5158 * inferiors.h (thread_id_to_gdb_id): Delete.
5159
5160 2014-01-13 Eli Zaretskii <eliz@gnu.org>
5161
5162 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5163 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5164 versions.
5165
5166 2014-01-08 Pedro Alves <palves@redhat.com>
5167
5168 * server.c (handle_status): Don't discard previous queued stop
5169 replies or thread's pending status here.
5170 (main) <disconnection>: Do it here instead.
5171
5172 2014-01-08 Pedro Alves <palves@redhat.com>
5173
5174 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5175 * server.c (visit_actioned_threads, handle_pending_status): New
5176 function.
5177 (handle_v_cont): Factor out parts to ...
5178 (resume): ... this new function. If in all-stop, and a thread
5179 being resumed has a pending status, report it without actually
5180 resuming.
5181 (myresume): Adjust to use the new 'resume' function.
5182 (clear_pending_status_callback, set_pending_status_callback)
5183 (find_status_pending_thread_callback): New functions.
5184 (handle_status): Handle the case of multiple threads having
5185 interesting statuses to report. Report threads' real last signal
5186 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5187 with an interesting thread to report the status for, instead of
5188 always reporting the status of the first thread.
5189
5190 2014-01-01 Joel Brobecker <brobecker@adacore.com>
5191
5192 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5193 * gdbreplay.c (gdbreplay_version): Likewise.
5194
5195 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5196
5197 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5198 iov.iov_len with the real length in use.
5199
5200 2013-12-13 Joel Brobecker <brobecker@adacore.com>
5201
5202 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5203 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5204 for all targets that use win32-low.c.
5205 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5206 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5207
5208 2013-12-13 Pedro Alves <palves@redhat.com>
5209
5210 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5211 if equal to TARGET_WAITKIND_LOADED.
5212 * win32-low.c (cached_status): New static global.
5213 (win32_wait): Add declaration.
5214 (do_initial_child_stuff): Flush all initial pending debug events
5215 up to the initial breakpoint.
5216 (win32_wait): If CACHED_STATUS was set, return that instead
5217 of doing a real wait. Remove the code resuming the execution
5218 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5219 during the initial phase. Also remove the code changing
5220 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5221 TARGET_WAITKIND_STOPPED.
5222
5223 2013-12-11 Yao Qi <yao@codesourcery.com>
5224
5225 * notif.c (handle_notif_ack): Return 0 if no notification
5226 matches.
5227
5228 2013-11-20 Doug Evans <dje@google.com>
5229
5230 * linux-low.c (linux_set_resume_request): Fix comment.
5231
5232 2013-11-20 Doug Evans <dje@google.com>
5233
5234 * linux-low.c (resume_status_pending_p): Tweak comment.
5235
5236 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5237
5238 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5239 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5240 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5241 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5242 (srv_amd64_regobj): Add amd64-mpx.o.
5243 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5244 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5245 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5246 * i387-fp.c (num_pl_bnd_register) Added constant.
5247 (num_pl_bnd_cfg_registers) Added constant.
5248 (struct i387_xsave) Added reserved area and MPX fields.
5249 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5250 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5251 function.
5252 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5253 (init_registers_amd64_mpx_linux): Declare new function.
5254 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5255 (x86_64_regmap): Add MPX registers.
5256 (x86_linux_read_description): Add MPX case.
5257 (initialize_low_arch): Initialize MPX targets.
5258
5259 2013-11-18 Tom Tromey <tromey@redhat.com>
5260
5261 * configure: Rebuild.
5262 * configure.ac: Don't check for stdlib.h.
5263 * gdbreplay.c: Unconditionally include stdlib.h.
5264
5265 2013-11-18 Tom Tromey <tromey@redhat.com>
5266
5267 * config.in: Rebuild.
5268 * configure: Rebuild.
5269 * configure.ac: Don't use AC_HEADER_DIRENT.
5270
5271 2013-11-18 Tom Tromey <tromey@redhat.com>
5272
5273 * server.h: Don't check HAVE_STRING_H.
5274 * gdbreplay.c: Don't check HAVE_STRING_H.
5275 * configure: Rebuild.
5276
5277 2013-11-18 Tom Tromey <tromey@redhat.com>
5278
5279 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5280 LIBGNU.
5281
5282 2013-11-08 Tom Tromey <tromey@redhat.com>
5283
5284 * configure, config.in: Rebuild.
5285 * configure.ac: Remove unused configury.
5286
5287 2013-11-08 Tom Tromey <tromey@redhat.com>
5288
5289 * acinclude.m4: Include common.m4, codeset.m4.
5290 * configure, config.in: Rebuild.
5291 * configure.ac: Use GDB_AC_COMMON.
5292
5293 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5294
5295 * linux-s390-low.c (HWCAP_S390_TE): New define.
5296 (s390_arch_setup): Consider the TE field in the HWCAP for
5297 determining 'have_regset_tdb'.
5298
5299 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5300
5301 PR gdb/16014
5302 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5303 call to sizeof.
5304
5305 2013-10-02 Pedro Alves <palves@redhat.com>
5306
5307 * server.c (process_serial_event): Don't output "GDBserver
5308 exiting" if GDB is connected through stdio.
5309 * target.c (mywait): Likewise, be silent if GDB is connected
5310 through stdio.
5311
5312 2013-10-01 Joel Brobecker <brobecker@adacore.com>
5313
5314 * lynx-low.c (lynx_add_threads_after_attach): New function.
5315 (lynx_attach): Remove call to add_thread. Add call to
5316 lynx_add_threads_after_attach instead.
5317
5318 2013-09-28 Mike Frysinger <vapier@gentoo.org>
5319
5320 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5321 * config.in, configure: Regenerated.
5322
5323 2013-09-18 Yao Qi <yao@codesourcery.com>
5324
5325 PR server/15959
5326 * server.c (start_inferior): Clear 'resume_info'.
5327
5328 2013-09-16 Jiong Wang <jiwang@tilera.com>
5329
5330 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5331 for each register.
5332
5333 2013-09-16 Jiong Wang <jiwang@tilera.com>
5334
5335 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5336 linux-tile-low.o to srv_tgtobj.
5337
5338 2013-09-16 Will Newton <will.newton@linaro.org>
5339
5340 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5341 out regs.
5342
5343 2013-09-06 Pedro Alves <palves@redhat.com>
5344
5345 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5346 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5347 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5348 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5349 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5350 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5351
5352 2013-09-06 Pedro Alves <palves@redhat.com>
5353
5354 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5355 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5356
5357 2013-09-06 Pedro Alves <palves@redhat.com>
5358
5359 * linux-amd64-ipa.c: Include tracepoint.h.
5360 * linux-i386-ipa.c: Include tracepoint.h.
5361
5362 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5363
5364 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5365 (ps_get_thread_area): New function.
5366
5367 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5368
5369 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5370 (initialize_low_arch): Call init_registers_crisv32 rather than
5371 init_register_crisv32.
5372
5373 2013-09-05 Pedro Alves <palves@redhat.com>
5374
5375 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5376 to ...
5377 * hostio.h: ... this new file.
5378 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5379 win32-low.c: Include hostio.h.
5380
5381 2013-09-05 Pedro Alves <palves@redhat.com>
5382
5383 * server.h (gdb_client_data, handler_func, callback_handler_func)
5384 (delete_file_handler, add_file_handler, append_callback_event)
5385 (delete_callback_event, start_event_loop, initialize_event_loop):
5386 Move to event-loop.h and include it.
5387 * event-loop.h: New file.
5388
5389 2013-09-05 Pedro Alves <palves@redhat.com>
5390
5391 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5392 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5393 (loaded_dll, unloaded_dll): Move to ...
5394 * dll.h: ... this new file.
5395 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5396
5397 2013-09-05 Pedro Alves <palves@redhat.com>
5398
5399 * server.h (current_process, get_thread_process, all_processes)
5400 (add_inferior_to_list, for_each_inferior, current_inferior)
5401 (remove_inferior, add_process, remove_process, find_process_pid)
5402 (have_started_inferiors_p, have_attached_inferiors_p)
5403 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5404 (clear_inferiors, find_inferior, find_inferior_id)
5405 (inferior_target_data, set_inferior_target_data)
5406 (inferior_regcache_data, set_inferior_regcache_data): Move to
5407 inferiors.h, and include it.
5408 * inferiors.h: New file.
5409
5410 2013-09-05 Pedro Alves <palves@redhat.com>
5411
5412 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5413 Move ...
5414 * ax.h: ... here.
5415
5416 2013-09-05 Pedro Alves <palves@redhat.com>
5417
5418 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5419 tracepoint.h.
5420 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5421 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5422 (handle_tracepoint_general_set, handle_tracepoint_query)
5423 (tracepoint_finished_step, tracepoint_was_hit)
5424 (release_while_stepping_state_list, current_traceframe)
5425 (in_readonly_region, traceframe_read_mem)
5426 (fetch_traceframe_registers, traceframe_read_sdata)
5427 (traceframe_read_info, struct fast_tpoint_collect_status)
5428 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5429 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5430 (supply_fast_tracepoint_registers)
5431 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5432 (ipa_tdesc, claim_trampoline_space)
5433 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5434 (agent_mem_read, agent_get_trace_state_variable_value)
5435 (agent_set_trace_state_variable_value, agent_tsv_read)
5436 (agent_mem_read_string, get_raw_reg_func_addr)
5437 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5438 * tracepoint.h: ... this new file.
5439
5440 2013-09-05 Pedro Alves <palves@redhat.com>
5441
5442 * server.h (perror_with_name, error, fatal, warning, paddress)
5443 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5444 include it.
5445 * utils.h: New file.
5446
5447 2013-09-05 Pedro Alves <palves@redhat.com>
5448
5449 * server.h (remote_debug, noack_mode, transport_is_reliable)
5450 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5451 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5452 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5453 (write_enn, initialize_async_io, enable_async_io)
5454 (disable_async_io, check_remote_input_interrupt_request)
5455 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5456 (dead_thread_notify, prepare_resume_reply)
5457 (decode_address_to_semicolon, decode_address, decode_m_packet)
5458 (decode_M_packet, decode_X_packet, decode_xfer_write)
5459 (decode_search_memory_packet, unhexify, hexify)
5460 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5461 (look_up_one_symbol, relocate_instruction)
5462 (monitor_output): Move to remote-utils.h, and include it.
5463 * remote-utils.h: New file.
5464
5465 2013-09-05 Pedro Alves <palves@redhat.com>
5466
5467 * server.h (_): Delete.
5468
5469 2013-09-02 Pedro Alves <palves@redhat.com>
5470
5471 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5472 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5473 allocated.
5474 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5475
5476 2013-09-02 Pierre Muller <muller@sourceware.org>
5477
5478 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5479 or WriteProcessMemory complete successfully and handle
5480 ERROR_PARTIAL_COPY error.
5481
5482 2013-09-02 Pedro Alves <palves@redhat.com>
5483
5484 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5485 error instead of EIO.
5486
5487 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5488
5489 PR server/15604
5490 * linux-low.c: Include filestuff.h.
5491 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5492 * lynx-low.c: Include filestuff.h.
5493 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5494 * server.c: Include filestuff.h.
5495 (main): Call notice_open_fds.
5496 * spu-low.c: Include filestuff.h.
5497 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5498
5499 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
5500
5501 * Makefile.in: Explain why ../target and ../nat are not
5502 listed as include file search paths.
5503 (linux-waitpid.o): New object file rule.
5504 * configure.srv (srv_native_linux_obj): New variable.
5505 Replace all occurrences of linux native object files with
5506 $srv_native_linux_obj.
5507 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5508 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5509 (linux_enable_event_reporting): Remove declaration.
5510 (my_waitpid): Moved to common/linux-waitpid.c.
5511 (linux_wait_for_event): Pass ptid when calling
5512 linux_enable_event_reporting.
5513 (linux_supports_tracefork_flag): Remove.
5514 (linux_enable_event_reporting): Likewise.
5515 (linux_tracefork_grandchild): Remove.
5516 (STACK_SIZE): Moved to common/linux-ptrace.c.
5517 (linux_tracefork_child): Remove.
5518 (linux_test_for_tracefork): Remove.
5519 (linux_look_up_symbols): Call linux_supports_traceclone.
5520 (initialize_low): Remove call to linux_test_for_tracefork.
5521 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5522 common/linux-ptrace.h.
5523 (PTRACE_TYPE_ARG4): Likewise.
5524 Include linux-ptrace.h.
5525
5526 2013-08-21 Pedro Alves <palves@redhat.com>
5527
5528 * config.in: Renegerate.
5529
5530 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
5531
5532 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5533 (SFILES): Remove $(srcdir)/common/target-common.c and
5534 add $(srcdir)/target/waitstatus.c.
5535 (OBS): Remove target-common.o and add waitstatus.o.
5536 (server_h): Remove $(srcdir)/../common/target-common.h and
5537 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5538 and $(srcdir)/../target/waitstatus.h.
5539 (target-common.o): Remove.
5540 (waitstatus.o): New target object file.
5541 * target.h: Do not include target-common.h and
5542 include target/resume.h, target/wait.h and
5543 target/waitstatus.h.
5544
5545 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
5546
5547 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5548 to PTRACE_TYPE_ARG3.
5549 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5550 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5551 PTRACE_TYPE_ARG4.
5552 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5553 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5554
5555 2013-07-27 Jie Zhang <jie@codesourcery.com>
5556 Daniel Jacobowitz <dan@codesourcery.com>
5557 Yao Qi <yao@codesourcery.com>
5558
5559 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5560 (mips-linux-watch.o): New rule.
5561 (mips_linux_watch_h): New variable.
5562 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5563 srv_tgtobj.
5564 * linux-mips-low.c: Include mips-linux-watch.h.
5565 (struct arch_process_info, struct arch_lwp_info): New.
5566 (update_watch_registers_callback): New function.
5567 (mips_linux_new_process, mips_linux_new_thread) New functions.
5568 (mips_linux_prepare_to_resume, mips_insert_point): New
5569 functions.
5570 (mips_remove_point, mips_stopped_by_watchpoint): New
5571 functions.
5572 (rsp_bp_type_to_target_hw_bp_type): New function.
5573 (mips_stopped_data_address): New function.
5574 (the_low_target): Add watchpoint support functions.
5575
5576 2013-07-27 Yao Qi <yao@codesourcery.com>
5577
5578 * i386-low.c: Include break-common.h.
5579 (enum target_hw_bp_type): Remove.
5580
5581 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
5582
5583 * Makefile.in (SFILES): /common/target-common.c.
5584 (OBS): Add target-common.o.
5585 (server_h): Add $(srcdir)/../common/target-common.h.
5586 (target-common.o): New target.
5587 * server.c (queue_stop_reply_callback): Free
5588 status string after use.
5589 * target.c (target_waitstatus_to_string): Remove.
5590 * target.h: Include target-common.h.
5591 (resume_kind): Likewise.
5592 (target_waitkind): Likewise.
5593 (target_waitstatus): Likewise.
5594 (TARGET_WNOHANG): Likewise.
5595
5596 2013-07-04 Yao Qi <yao@codesourcery.com>
5597
5598 * Makefile.in (host_alias): Use @host_noncanonical@.
5599 (target_alias): Use @target_noncanonical@.
5600 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5601 ACX_NONCANONICAL_HOST.
5602 * configure: Regenerated.
5603
5604 Revert:
5605 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5606
5607 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5608 * configure: Rebuild.
5609 * Makefile.in (version_host, version_target): Get from configure.
5610 (version.c): Use $(version_host) and $(version_target).
5611
5612 2013-07-03 Pedro Alves <palves@redhat.com>
5613
5614 * Makefile.in (config.status): Depend on development.sh.
5615 * acinclude.m4: Include libmcheck.m4.
5616 * configure: Regenerate.
5617
5618 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5619
5620 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5621 attribute inside the parentheses.
5622 (winapi_DebugSetProcessKillOnExit): Ditto.
5623 (winapi_DebugBreakProcess): Ditto.
5624 (winapi_GenerateConsoleCtrlEvent): Ditto.
5625
5626 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5627
5628 * notif.h (notif_event): Add a dummy member to avoid compiler
5629 errors.
5630
5631 2013-07-01 Pedro Alves <palves@redhat.com>
5632
5633 * hostio.c (HOSTIO_PATH_MAX): Define.
5634 (require_filename, handle_open, handle_unlink, handle_readlink):
5635 Use it.
5636
5637 2013-07-01 Pedro Alves <palves@redhat.com>
5638
5639 * server.h: Include "pathmax.h".
5640 * linux-low.c: Don't include sys/param.h.
5641 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5642 MAXPATHLEN.
5643 * win32-low.c: Don't include sys/param.h.
5644 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5645
5646 2013-07-01 Pedro Alves <palves@redhat.com>
5647
5648 * event-loop.c: Don't check HAVE_UNISTD_H before including
5649 <unistd.h>.
5650 * gdbreplay.c: Likewise.
5651 * remote-utils.c: Likewise.
5652 * server.c: Likewise.
5653 * configure.ac: Don't check for unistd.h.
5654 * configure: Regenerate.
5655
5656 2013-06-28 Tom Tromey <tromey@redhat.com>
5657
5658 * Makefile.in (version.c): Use version.in, not
5659 common/version.in.
5660
5661 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5662
5663 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5664 * configure: Rebuild.
5665 * Makefile.in (version_host, version_target): Get from configure.
5666 (version.c): Use $(version_host) and $(version_target).
5667
5668 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5669
5670 Fix trace-status to output user name without trailing colon.
5671 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5672
5673 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5674
5675 Fix trace-status to output proper start-time and stop-time.
5676 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5677 output start time and stop time in hex as gdb expects.
5678
5679 2013-06-26 Pedro Alves <pedro@codesourcery.com>
5680
5681 * tracepoint.c (build_traceframe_info_xml): Output trace state
5682 variables present in the trace buffer.
5683
5684 2013-06-24 Tom Tromey <tromey@redhat.com>
5685
5686 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5687 create-version.sh.
5688 (version.o): Remove.
5689 * gdbreplay.c: Include version.h.
5690 (version, host_name): Don't declare.
5691 * server.h: Include version.h.
5692 (version, host_name): Don't declare.
5693
5694 2013-06-12 Pedro Alves <palves@redhat.com>
5695
5696 * linux-x86-low.c (linux_is_elf64): Delete global.
5697 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5698 with local linux_pid_exe_is_elf_64_file use.
5699
5700 2013-06-11 Pedro Alves <palves@redhat.com>
5701
5702 * linux-low.c (regset_disabled, disable_regset): New functions.
5703 (regsets_fetch_inferior_registers)
5704 (regsets_store_inferior_registers): Use them.
5705 (initialize_regsets_info); Don't allocate the disabled_regsets
5706 array here.
5707 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5708 comment.
5709
5710 2013-06-11 Pedro Alves <palves@redhat.com>
5711
5712 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5713 xmalloc.
5714
5715 2013-06-11 Pedro Alves <palves@redhat.com>
5716
5717 * linux-x86-low.c (initialize_low_arch): Call
5718 init_registers_x32_avx_linux.
5719
5720 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5721
5722 Fix compatibility with Android Bionic.
5723 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5724 it is not empty.
5725
5726 2013-06-07 Pedro Alves <palves@redhat.com>
5727
5728 PR server/14823
5729 * Makefile.in (OBS): Add tdesc.o.
5730 (IPA_OBJS): Add tdesc-ipa.o.
5731 (tdesc-ipa.o): New rule.
5732 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5733 interface.
5734 * linux-low.c (new_inferior): Delete.
5735 (disabled_regsets, num_regsets): Delete.
5736 (linux_add_process): Adjust to set the new per-process
5737 new_inferior flag.
5738 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5739 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5740 was a stop. When calling arch_setup, switch the current inferior
5741 to the thread that got an event.
5742 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5743 (regsets_fetch_inferior_registers)
5744 (regsets_store_inferior_registers): New regsets_info parameter.
5745 Adjust to use it.
5746 (linux_register_in_regsets): New regs_info parameter. Adjust to
5747 use it.
5748 (register_addr, fetch_register, store_register): New usrregs_info
5749 parameter. Adjust to use it.
5750 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5751 parameter regs_info. Adjust to use it.
5752 (linux_fetch_registers): Get the current inferior's regs_info, and
5753 adjust to use it.
5754 (linux_store_registers): Ditto.
5755 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5756 (initialize_low): Don't initialize the target_regsets here. Call
5757 initialize_low_arch.
5758 * linux-low.h (target_regsets): Delete declaration.
5759 (struct regsets_info): New.
5760 (struct usrregs_info): New.
5761 (struct regs_info): New.
5762 (struct process_info_private) <new_inferior>: New field.
5763 (struct linux_target_ops): Delete the num_regs, regmap, and
5764 regset_bitmap fields. New field regs_info.
5765 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5766 * i387-fp.c (num_xmm_registers): Delete.
5767 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5768 calls to new interface.
5769 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5770 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5771 Infer the number of xmm registers from the regcache's target
5772 description.
5773 * i387-fp.h (num_xmm_registers): Delete.
5774 * inferiors.c (add_thread): Don't install the thread's regcache
5775 here.
5776 * proc-service.c (gregset_info): Fetch the current inferior's
5777 regs_info. Adjust to use it.
5778 * regcache.c: Include tdesc.h.
5779 (register_bytes, reg_defs, num_registers)
5780 (gdbserver_expedite_regs): Delete.
5781 (get_thread_regcache): If the thread doesn't have a regcache yet,
5782 create one, instead of aborting gdbserver.
5783 (regcache_invalidate_one): Rename to ...
5784 (regcache_invalidate_thread): ... this.
5785 (regcache_invalidate_one): New.
5786 (regcache_invalidate): Only invalidate registers of the current
5787 process.
5788 (init_register_cache): Add target_desc parameter, and use it.
5789 (new_register_cache): Ditto. Assert the target description has a
5790 non zero registers_size.
5791 (regcache_cpy): Add assertions. Adjust.
5792 (realloc_register_cache, set_register_cache): Delete.
5793 (registers_to_string, registers_from_string): Adjust.
5794 (find_register_by_name, find_regno, find_register_by_number)
5795 (register_cache_size): Add target_desc parameter, and use it.
5796 (free_register_cache_thread, free_register_cache_thread_one)
5797 (regcache_release, register_cache_size): New.
5798 (register_size): Add target_desc parameter, and use it.
5799 (register_data, supply_register, supply_register_zeroed)
5800 (supply_regblock, supply_register_by_name, collect_register)
5801 (collect_register_as_string, collect_register_by_name): Adjust.
5802 * regcache.h (struct target_desc): Forward declare.
5803 (struct regcache) <tdesc>: New field.
5804 (init_register_cache, new_register_cache): Add target_desc
5805 parameter.
5806 (regcache_invalidate_thread): Declare.
5807 (regcache_invalidate_one): Delete declaration.
5808 (regcache_release): Declare.
5809 (find_register_by_number, register_cache_size, register_size)
5810 (find_regno): Add target_desc parameter.
5811 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5812 declarations.
5813 * remote-utils.c: Include tdesc.h.
5814 (outreg, prepare_resume_reply): Adjust.
5815 * server.c: Include tdesc.h.
5816 (gdbserver_xmltarget): Delete declaration.
5817 (get_features_xml, process_serial_event): Adjust.
5818 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5819 declare.
5820 (struct process_info) <tdesc>: New field.
5821 (ipa_tdesc): Declare.
5822 * tdesc.c: New file.
5823 * tdesc.h: New file.
5824 * tracepoint.c: Include tdesc.h.
5825 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5826 (get_context_regcache): Adjust to pass ipa_tdesc down.
5827 (do_action_at_tracepoint): Adjust to get the register cache size
5828 from the context regcache's description.
5829 (traceframe_walk_blocks): Adjust to get the register cache size
5830 from the current trace frame's description.
5831 (traceframe_get_pc): Adjust to get current trace frame's
5832 description and pass it down.
5833 (gdb_collect): Adjust to get the register cache size from the
5834 IPA's description.
5835 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5836 (gdbserver_xmltarget): Delete.
5837 (initialize_low_tracepoint): Set the ipa's target description.
5838 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5839 (initialize_low_tracepoint): Set the ipa's target description.
5840 * linux-x86-low.c: Include tdesc.h.
5841 [__x86_64__] (is_64bit_tdesc): New.
5842 (ps_get_thread_area, x86_get_thread_area): Use it.
5843 (i386_cannot_store_register): Rename to ...
5844 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5845 (i386_cannot_fetch_register): Rename to ...
5846 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5847 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5848 to new interface.
5849 (target_regsets): Rename to ...
5850 (x86_regsets): ... this.
5851 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5852 interface.
5853 (x86_siginfo_fixup): Use is_64bit_tdesc.
5854 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5855 (tdesc_x32_avx_linux, tdesc_x32_linux)
5856 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5857 Declare.
5858 (x86_linux_update_xmltarget): Delete.
5859 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5860 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5861 (AMD64_LINUX_USER64_CS): New.
5862 (x86_linux_read_description): New, based on
5863 x86_linux_update_xmltarget.
5864 (same_process_callback): New.
5865 (x86_arch_setup_process_callback): New.
5866 (x86_linux_update_xmltarget): New.
5867 (x86_regsets_info): New.
5868 (amd64_linux_regs_info): New.
5869 (i386_linux_usrregs_info): New.
5870 (i386_linux_regs_info): New.
5871 (x86_linux_regs_info): New.
5872 (x86_arch_setup): Reimplement.
5873 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5874 (x86_emit_ops): Ditto.
5875 (the_low_target): Adjust. Install x86_linux_regs_info,
5876 x86_cannot_fetch_register, and x86_cannot_store_register.
5877 (initialize_low_arch): New.
5878 * linux-ia64-low.c (tdesc_ia64): Declare.
5879 (ia64_fetch_register): Adjust.
5880 (ia64_usrregs_info, regs_info): New globals.
5881 (ia64_regs_info): New function.
5882 (the_low_target): Adjust.
5883 (initialize_low_arch): New function.
5884 * linux-sparc-low.c (tdesc_sparc64): Declare.
5885 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5886 Adjust.
5887 (sparc_arch_setup): New function.
5888 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5889 (the_low_target): Adjust.
5890 (initialize_low_arch): New function.
5891 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5892 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5893 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5894 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5895 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5896 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5897 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5898 (tdesc_powerpc_isa205_vsx64l): Declare.
5899 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5900 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5901 (ppc_set_pc, ppc_get_hwcap): Adjust.
5902 (ppc_usrregs_info): Forward declare.
5903 (!__powerpc64__) ppc_regmap_adjusted: New global.
5904 (ppc_arch_setup): Adjust to the current process'es target
5905 description.
5906 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5907 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5908 (ppc_store_evrregset): Adjust.
5909 (target_regsets): Rename to ...
5910 (ppc_regsets): ... this, and make static.
5911 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5912 (ppc_regs_info): New function.
5913 (the_low_target): Adjust.
5914 (initialize_low_arch): New function.
5915 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5916 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5917 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5918 (tdesc_s390x_linux64v2): Declare.
5919 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5920 (s390_fill_gregset, s390_store_last_break): Adjust.
5921 (target_regsets): Rename to ...
5922 (s390_regsets): ... this, and make static.
5923 (s390_get_pc, s390_set_pc): Adjust.
5924 (s390_get_hwcap): New target_desc parameter, and use it.
5925 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5926 (s390_arch_setup): Adjust to set the current process'es target
5927 description. Don't adjust the regmap.
5928 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5929 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5930 (regs_info_3264): New globals.
5931 (s390_regs_info): New function.
5932 (the_low_target): Adjust.
5933 (initialize_low_arch): New function.
5934 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5935 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5936 [__mips64] (init_registers_mips_linux)
5937 (init_registers_mips_dsp_linux): Delete defines.
5938 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5939 (have_dsp): New global.
5940 (mips_read_description): New, based on mips_arch_setup.
5941 (mips_arch_setup): Reimplement.
5942 (get_usrregs_info): New function.
5943 (mips_cannot_fetch_register, mips_cannot_store_register)
5944 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5945 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5946 (target_regsets): Rename to ...
5947 (mips_regsets): ... this, and make static.
5948 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5949 (dsp_regs_info, regs_info): New globals.
5950 (mips_regs_info): New function.
5951 (the_low_target): Adjust.
5952 (initialize_low_arch): New function.
5953 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5954 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5955 Declare.
5956 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5957 (arm_read_description): New, with bits factored from
5958 arm_arch_setup.
5959 (arm_arch_setup): Reimplement.
5960 (target_regsets): Rename to ...
5961 (arm_regsets): ... this, and make static.
5962 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5963 (arm_regs_info): New function.
5964 (the_low_target): Adjust.
5965 (initialize_low_arch): New function.
5966 * linux-m68k-low.c (tdesc_m68k): Declare.
5967 (target_regsets): Rename to ...
5968 (m68k_regsets): ... this, and make static.
5969 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5970 (m68k_regs_info): New function.
5971 (m68k_arch_setup): New function.
5972 (the_low_target): Adjust.
5973 (initialize_low_arch): New function.
5974 * linux-sh-low.c (tdesc_sharch): Declare.
5975 (target_regsets): Rename to ...
5976 (sh_regsets): ... this, and make static.
5977 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5978 (sh_regs_info, sh_arch_setup): New functions.
5979 (the_low_target): Adjust.
5980 (initialize_low_arch): New function.
5981 * linux-bfin-low.c (tdesc_bfin): Declare.
5982 (bfin_arch_setup): New function.
5983 (bfin_usrregs_info, regs_info): New globals.
5984 (bfin_regs_info): New function.
5985 (the_low_target): Adjust.
5986 (initialize_low_arch): New function.
5987 * linux-cris-low.c (tdesc_cris): Declare.
5988 (cris_arch_setup): New function.
5989 (cris_usrregs_info, regs_info): New globals.
5990 (cris_regs_info): New function.
5991 (the_low_target): Adjust.
5992 (initialize_low_arch): New function.
5993 * linux-cris-low.c (tdesc_crisv32): Declare.
5994 (cris_arch_setup): New function.
5995 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5996 (cris_regs_info): New function.
5997 (the_low_target): Adjust.
5998 (initialize_low_arch): New function.
5999 * linux-m32r-low.c (tdesc_m32r): Declare.
6000 (m32r_arch_setup): New function.
6001 (m32r_usrregs_info, regs_info): New globals.
6002 (m32r_regs_info): Adjust.
6003 (initialize_low_arch): New function.
6004 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6005 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6006 (tic6x_usrregs_info): Forward declare.
6007 (tic6x_read_description): New function, based on ...
6008 (tic6x_arch_setup): ... this. Reimplement.
6009 (target_regsets): Rename to ...
6010 (tic6x_regsets): ... this, and make static.
6011 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6012 (tic6x_regs_info): New function.
6013 (the_low_target): Adjust.
6014 (initialize_low_arch): New function.
6015 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6016 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6017 (target_regsets): Rename to ...
6018 (xtensa_regsets): ... this, and make static.
6019 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6020 globals.
6021 (xtensa_arch_setup, xtensa_regs_info): New functions.
6022 (the_low_target): Adjust.
6023 (initialize_low_arch): New function.
6024 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6025 (nios2_arch_setup): Set the current process'es tdesc.
6026 (target_regsets): Rename to ...
6027 (nios2_regsets): ... this.
6028 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6029 (nios2_regs_info): New function.
6030 (the_low_target): Adjust.
6031 (initialize_low_arch): New function.
6032 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6033 (aarch64_arch_setup): Set the current process'es tdesc.
6034 (target_regsets): Rename to ...
6035 (aarch64_regsets): ... this.
6036 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6037 (aarch64_regs_info): New function.
6038 (the_low_target): Adjust.
6039 (initialize_low_arch): New function.
6040 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6041 globals.
6042 (target_regsets): Rename to ...
6043 (tile_regsets): ... this.
6044 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6045 (tile_regs_info): New function.
6046 (tile_arch_setup): Set the current process'es tdesc.
6047 (the_low_target): Adjust.
6048 (initialize_low_arch): New function.
6049 * spu-low.c (tdesc_spu): Declare.
6050 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6051 * win32-arm-low.c (tdesc_arm): Declare.
6052 (arm_arch_setup): New function.
6053 (the_low_target): Install arm_arch_setup instead of
6054 init_registers_arm.
6055 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6056 (init_windows_x86): Rename to ...
6057 (i386_arch_setup): ... this. Set `win32_tdesc'.
6058 (the_low_target): Adjust.
6059 * win32-low.c (win32_tdesc): New global.
6060 (child_add_thread): Don't create the thread cache here.
6061 (do_initial_child_stuff): Set the new process'es tdesc.
6062 * win32-low.h (struct target_desc): Forward declare.
6063 (win32_tdesc): Declare.
6064 * lynx-i386-low.c (tdesc_i386): Declare global.
6065 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6066 * lynx-low.c (lynx_tdesc): New global.
6067 (lynx_add_process): Set the new process'es tdesc.
6068 * lynx-low.h (struct target_desc): Forward declare.
6069 (lynx_tdesc): Declare global.
6070 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6071 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6072 * nto-low.c (nto_tdesc): New global.
6073 (do_attach): Set the new process'es tdesc.
6074 * nto-low.h (struct target_desc): Forward declare.
6075 (nto_tdesc): Declare.
6076 * nto-x86-low.c (tdesc_i386): Declare.
6077 (nto_x86_arch_setup): Set `nto_tdesc'.
6078
6079 2013-06-04 Gary Benson <gbenson@redhat.com>
6080
6081 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6082 to qSupported response when appropriate.
6083 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6084 with nonzero-length annex.
6085 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6086 arguments supplied in annex.
6087
6088 2013-05-31 Doug Evans <dje@google.com>
6089
6090 PR server/15594
6091 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6092 64 bits in 64-cross-32 environment.
6093
6094 2013-05-28 Pedro Alves <palves@redhat.com>
6095
6096 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6097 (aarch64-without-fpu.c): Delete rule.
6098 * configure.srv (aarch64*-*-linux*): Remove references to
6099 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6100 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6101 declaration.
6102
6103 2013-05-24 Pedro Alves <palves@redhat.com>
6104
6105 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6106 instead of strchr/decode_address. Error if the range isn't split
6107 with a ','. Don't assume there's be a ':' in the action.
6108
6109 2013-05-23 Yao Qi <yao@codesourcery.com>
6110 Pedro Alves <palves@redhat.com>
6111
6112 * linux-low.c (lwp_in_step_range): New function.
6113 (linux_wait_1): If the thread was range stepping and stopped
6114 outside the stepping range, report the stop to GDB. Otherwise,
6115 continue stepping. Add range stepping debug output.
6116 (linux_set_resume_request): Copy the step range from the resume
6117 request to the lwp.
6118 (linux_supports_range_stepping): New.
6119 (linux_target_ops) <supports_range_stepping>: Set to
6120 linux_supports_range_stepping.
6121 * linux-low.h (struct linux_target_ops)
6122 <supports_range_stepping>: New field.
6123 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6124 * linux-x86-low.c (x86_supports_range_stepping): New.
6125 (the_low_target) <supports_range_stepping>: Set to
6126 x86_supports_range_stepping.
6127 * server.c (handle_v_cont): Handle 'r' action.
6128 (handle_v_requests): Append ";r" if the target supports range
6129 stepping.
6130 * target.h (struct thread_resume) <step_range_start,
6131 step_range_end>: New fields.
6132 (struct target_ops) <supports_range_stepping>:
6133 New field.
6134 (target_supports_range_stepping): New macro.
6135
6136 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6137
6138 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6139 confusion in comment.
6140
6141 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6142
6143 * lynx-low.c (struct process_info_private): New type.
6144 (lynx_add_process): New function.
6145 (lynx_create_inferior, lynx_attach): Replace calls to
6146 add_process by calls to lynx_add_process.
6147 (lynx_resume): If PTID is null, then try using
6148 current_process()->private->last_wait_event_ptid.
6149 Add comments.
6150 (lynx_clear_inferiors): Delete. The contents of that function
6151 has been inlined in lynx_mourn;
6152 (lynx_wait_1): Save the ptid in the process's private data.
6153 (lynx_mourn): Free the process' private data. Replace call
6154 to lynx_clear_inferiors by call to clear_inferiors.
6155
6156 2013-05-17 Yao Qi <yao@codesourcery.com>
6157
6158 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6159 the right place.
6160
6161 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
6162
6163 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6164 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6165 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6166 PT_TEXT_END_ADDR guards. Update comments.
6167 (linux_target_op) <read_offsets>: Conditionally define to
6168 linux_read_offsets if the target is UCLIBC and if it defines
6169 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6170
6171 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6172 Andrew Jenner <andrew@codesourcery.com>
6173
6174 * Makefile.in (SFILES): Add linux-nios2-low.c.
6175 (clean): Add action to delete nios2-linux.c.
6176 (nios2-linux.c): New rule.
6177 * configure.srv: Add nios2*-*-linux*.
6178 * linux-nios2-low.c: New.
6179
6180 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6181
6182 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6183
6184 2013-04-25 Hui Zhu <hui@codesourcery.com>
6185
6186 PR gdb/15186
6187 * ax.c (ax_printf): Add fflush.
6188
6189 2013-04-22 Tom Tromey <tromey@redhat.com>
6190
6191 * Makefile.in (SFILES): Add filestuff.c.
6192 (OBS): Add filestuff.o.
6193 (filestuff.o): New target.
6194 * config.in, configure: Rebuild.
6195 * configure.ac: Check for fdwalk, pipe2.
6196
6197 2013-04-17 Pedro Alves <palves@redhat.com>
6198
6199 * configure.ac (USE_THREAD_DB): Delete variable.
6200 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6201 Don't AC_SUBST USE_THREAD_DB.
6202 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6203 * config.in, configure: Regenerate.
6204
6205 2013-04-16 Pedro Alves <palves@redhat.com>
6206
6207 * linux-low.h (struct lwp_info) <thread_known>: Move under
6208 the USE_THREAD_DB #ifdef.
6209
6210 2013-04-16 Pedro Alves <palves@redhat.com>
6211
6212 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6213 (linux-low.o): Delete rule.
6214 * linux-low.h: Always include "gdb_thread_db.h" instead of
6215 conditionally including thread_db.h.
6216 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6217 HAVE_THREAD_DB_H.
6218
6219 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6220
6221 * Makefile.in (install-only): Fix make install regression.
6222
6223 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6224
6225 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6226 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6227 installation.
6228 * gdbserver.1: Remove.
6229
6230 2013-03-22 Pedro Alves <palves@redhat.com>
6231
6232 * linux-low.c (handle_extended_wait): Don't call
6233 linux_enable_event_reporting.
6234
6235 2013-03-15 Tony Theodore <tonyt@logyst.com>
6236
6237 PR build/9098:
6238 * Makefile.in (SHELL): Use @SHELL@.
6239
6240 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6241
6242 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6243 compiler warning.
6244
6245 2013-03-13 Joel Brobecker <brobecker@adacore.com>
6246
6247 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6248 Remove extraneous NULL element.
6249
6250 2013-03-13 Yao Qi <yao@codesourcery.com>
6251
6252 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6253 'V' block in trace frame.
6254
6255 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6256
6257 * target.h (struct target_ops): Add btrace ops.
6258 (target_supports_btrace): New macro.
6259 (target_enable_btrace): New macro.
6260 (target_disable_btrace): New macro.
6261 (target_read_btrace): New macro.
6262 * gdbthread.h (struct thread_info): Add btrace field.
6263 * server.c: Include btrace-common.h.
6264 (handle_btrace_general_set): New function.
6265 (handle_btrace_enable): New function.
6266 (handle_btrace_disable): New function.
6267 (handle_general_set): Call handle_btrace_general_set.
6268 (handle_qxfer_btrace): New function.
6269 (struct qxfer qxfer_packets[]): Add btrace entry.
6270 * inferiors.c (remove_thread): Disable btrace.
6271 * linux-low: Include linux-btrace.h.
6272 (linux_low_enable_btrace): New function.
6273 (linux_low_read_btrace): New function.
6274 (linux_target_ops): Add btrace ops.
6275 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6276 Add srv_linux_btrace=yes.
6277 (x86_64-*-linux*): Add linux-btrace.o.
6278 Add srv_linux_btrace=yes.
6279 * configure.ac: Define HAVE_LINUX_BTRACE.
6280 * config.in: Regenerated.
6281 * configure: Regenerated.
6282
6283 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6284
6285 * server.c (handle_qxfer): Preserve error message if -3 is
6286 returned.
6287 (qxfer): Document the -3 return value.
6288
6289 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6290
6291 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6292 (linux_btrace_h): New variable.
6293 (linux-btrace.o): New rule.
6294
6295 2013-03-08 Stan Shebs <stan@codesourcery.com>
6296 Hafiz Abid Qadeer <abidh@codesourcery.com>
6297
6298 * tracepoint.c (trace_buffer_size): New global.
6299 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6300 (init_trace_buffer): Change to one-argument function. Allocate
6301 trace buffer memory.
6302 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6303 handle QTBuffer:size packet.
6304 (cmd_bigqtbuffer_size): New function.
6305 (initialize_tracepoint): Call init_trace_buffer with
6306 DEFAULT_TRACE_BUFFER_SIZE.
6307 * server.c (handle_query): Add QTBuffer:size in the
6308 supported packets.
6309
6310 2013-03-07 Yao Qi <yao@codesourcery.com>
6311
6312 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6313 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6314 of -1.
6315 (cmd_qtsp): Adjust condition. Do post increment.
6316 Set cur_action and cur_step_action back to 0.
6317
6318 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6319
6320 PR server/15236
6321 * linux-low.c (linux_write_memory): Return early success if LEN is
6322 zero.
6323
6324 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
6325
6326 * configure.srv: Add x86_64-*-cygwin* as target.
6327
6328 2013-02-28 Tom Tromey <tromey@redhat.com>
6329
6330 * configure.ac: Invoke AC_SYS_LARGEFILE.
6331 * configure, config.in: Rebuild.
6332
6333 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
6334
6335 * win32-low.c: Throughout, fix format strings and casts of
6336 printf-like functions to avoid type related warnings on all
6337 platforms.
6338 (get_child_debug_event): Print dwDebugEventCode as hex since
6339 that's how it's usually documented.
6340
6341 2013-02-28 Yao Qi <yao@codesourcery.com>
6342
6343 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6344 pulongest.
6345
6346 2013-02-27 Jiong Wang <jiwang@tilera.com>
6347
6348 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6349 (reg-tilegx32.c): New rule.
6350 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6351 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6352 different register info initializer according to elf class.
6353 (init_registers_tilgx32): New function. The tilegx32 register info
6354 initializer.
6355 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6356 (tile_store_gregset): Likewise.
6357
6358 2013-02-27 Yao Qi <yao@codesourcery.com>
6359
6360 * server.c (process_point_options): Print debug message when
6361 debug_threads is true.
6362
6363 2013-02-26 Yao Qi <yao@codesourcery.com>
6364
6365 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6366
6367 2013-02-19 Pedro Alves <palves@redhat.com>
6368 Kai Tietz <ktietz@redhat.com>
6369
6370 PR gdb/15161
6371
6372 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6373 instead of strtoul to extract address from packet.
6374 (process_serial_event) <'z'>: Likewise.
6375
6376 2013-02-18 Yao Qi <yao@codesourcery.com>
6377
6378 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6379
6380 2013-02-14 Pedro Alves <palves@redhat.com>
6381
6382 Plug memory leak.
6383
6384 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6385 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6386
6387 2013-02-14 Pedro Alves <palves@redhat.com>
6388
6389 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6390
6391 2013-02-14 Pedro Alves <palves@redhat.com>
6392
6393 * tracepoint.c (save_string): Delete.
6394 (add_tracepoint_action): Use savestring instead of save_string.
6395
6396 2013-02-12 Pedro Alves <palves@redhat.com>
6397
6398 * linux-xtensa-low.c: Ditto.
6399 * xtensa-xtregs.c: Ditto.
6400
6401 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6402
6403 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6404 thread_db.
6405
6406 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6407
6408 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6409 aarch64_num_wp_regs and aarch64_num_bp_regs to
6410 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6411
6412 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6413
6414 * linux-aarch64-low.c (ps_get_thread_area): Replace
6415 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6416
6417 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6418 Marcus Shawcroft <marcus.shawcroft@arm.com>
6419 Nigel Stephens <nigel.stephens@arm.com>
6420 Yufeng Zhang <yufeng.zhang@arm.com>
6421
6422 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6423 (aarch64.c, aarch64-without-fpu.c): New targets.
6424 * configure.srv (aarch64*-*-linux*): New.
6425 * linux-aarch64-low.c: New file.
6426
6427 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6428
6429 * linux-low.c (handle_extended_wait, linux_create_inferior)
6430 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6431 (dequeue_one_deferred_signal, linux_resume_one_thread)
6432 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6433 (linux_tracefork_grandchild, linux_test_for_tracefork)
6434 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6435 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6436 where the argument is 0.
6437
6438 2013-01-25 Yao Qi <yao@codesourcery.com>
6439
6440 * event-loop.c: Include "queue.h".
6441 (gdb_event_p): New typedef.
6442 (struct gdb_event) <next_event>: Remove.
6443 (event_queue): Change to QUEUE(gdb_event_p).
6444 (async_queue_event): Remove.
6445 (gdb_event_xfree): New.
6446 (initialize_event_loop): New.
6447 (process_event): Use API from QUEUE.
6448 (wait_for_event): Likewise.
6449 * server.c (main): Call initialize_event_loop.
6450 * server.h (initialize_event_loop): Declare.
6451
6452 2013-01-18 Yao Qi <yao@codesourcery.com>
6453
6454 * ax.h (struct eval_agent_expr_context): New.
6455 (gdb_eval_agent_expr): Update declaration.
6456 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6457 TFRAME. Add new argument CTX.
6458 * server.h (struct eval_agent_expr_context): Declare.
6459 (agent_mem_read, agent_tsv_read): Update declaration.
6460 (agent_mem_read_string): Likewise.
6461 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6462 (add_traceframe_block): Add new argument TPOINT.
6463 Increase TPOINT->traceframe_usage.
6464 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6465 eval_tracepoint_agent_expr.
6466 (condition_true_at_tracepoint): Likewise.
6467 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6468 (agent_mem_read_string, agent_tsv_read): Likewise.
6469
6470 2013-01-16 Yao Qi <yao@codesourcery.com>
6471
6472 * linux-low.c (linux_resume_one_lwp): Don't check
6473 'lwp->bp_reinsert != 0'.
6474
6475 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6476 Pedro Alves <palves@redhat.com>
6477
6478 * lynx-low.c (ptrace_request_to_str): Define a temporary
6479 macro and use it to simplify this function's implementation.
6480
6481 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6482
6483 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6484 sets errno.
6485
6486 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6487
6488 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6489
6490 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6491
6492 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6493
6494 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6495
6496 * lynx-low.c (lynx_resume): Use the resume_info parameter
6497 to determine the ptid for the lynx_ptrace call, unless
6498 it is equal to minus_one_ptid, in which case we use the
6499 ptid of the current_inferior.
6500 (lynx_wait_1): After having received a thread create/exit
6501 event, resume the inferior's execution using the signaling
6502 thread's ptid, rather than the old ptid.
6503
6504 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6505
6506 * lynx-low.c (lynx_resume): Delete variable ret.
6507
6508 2013-01-01 Joel Brobecker <brobecker@adacore.com>
6509
6510 * gdbreplay.c (gdbreplay_version): Update copyright year.
6511 * server.c (gdbserver_version): Likewise.
6512
6513 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6514
6515 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6516 new thread.
6517
6518 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6519
6520 * lynx-low.c (ptrace_request_to_str): Add handling for
6521 PTRACE_GETTRACESIG.
6522
6523 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6524
6525 * lynx-low.c (lynx_attach): Delete variable new_process.
6526
6527 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6528
6529 * lynx-low.c (lynx_create_inferior): Delete variable
6530 new_process.
6531
6532 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6533
6534 * lynx-low.c (ptrace_request_to_str): Do not handle
6535 PTRACE_GETTHREADLIST if this macro does not exist.
6536
6537 2012-12-15 Yao Qi <yao@codesourcery.com>
6538
6539 * Makefile.in (OBS): Add notif.o.
6540 * notif.c, notif.h: New.
6541 * server.c: Include "notif.h".
6542 (struct vstop_notif) <next>: Remove.
6543 <base>: New field.
6544 (queue_stop_reply): Update.
6545 (push_event, send_next_stop_reply): Remove.
6546 (discard_queued_stop_replies): Update.
6547 (notif_stop): New variable.
6548 (handle_v_stopped): Remove.
6549 (handle_v_requests): Don't call handle_v_stopped. Call
6550 handle_ack_notif instead.
6551 (queue_stop_reply_callback): Call notif_event_enque instead
6552 of queue_stop_reply.
6553 (handle_status): Don't call send_next_stop_reply, call
6554 notif_write_event instead.
6555 (kill_inferior_callback): Likewise.
6556 (detach_or_kill_inferior_callback): Likewise.
6557 (main): Call initialize_notif.
6558 (process_serial_event): Call QUEUE_is_empty.
6559 (handle_target_event): Call notif_push instead of push event.
6560 * server.h (push_event): Remove declaration.
6561
6562 2012-12-10 Tom Tromey <tromey@redhat.com>
6563
6564 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6565 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6566 macros.
6567 (.c.o): Rewrite.
6568 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6569 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6570 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6571 (amd64-linux-ipa.o, ax.o): Rewrite.
6572 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6573 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6574 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6575 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6576 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6577 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6578 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6579 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6580 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6581 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6582 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6583 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6584 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6585 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6586 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6587 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6588 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6589 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6590 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6591 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6592 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6593 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6594 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6595 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6596 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6597 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6598 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6599 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6600 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6601 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6602 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6603 (reg-tilegx.o): Remove.
6604 (all_object_files): New macro.
6605 Include .deps files.
6606 * aclocal.m4, configure: Rebuild.
6607 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6608 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6609 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6610
6611 2012-12-05 Tom Tromey <tromey@redhat.com>
6612
6613 PR gdb/14917:
6614 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6615
6616 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
6617
6618 * configure.ac: Check for linux/perf_event.h.
6619 * config.in: Regenerated.
6620 * configure: Regenerated.
6621
6622 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6623
6624 * hostio.c (handle_readlink): Decrease buffer size
6625 parameter passed to readlink by one byte.
6626
6627 2012-11-26 Yao Qi <yao@codesourcery.com>
6628
6629 * configure.ac (build_warnings): Append '-Wempty-body'.
6630 * configure: Regenerated.
6631 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6632 body.
6633
6634 2012-11-15 Pierre Muller <muller@sourceware.org>
6635
6636 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6637 * config.in: Regenerate.
6638 * configure: Regenerate.
6639 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6640 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6641 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6642 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6643 header.
6644 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6645 instead of <sys/wait.h> header.
6646 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6647
6648 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6649
6650 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6651 (various make rules): Remove -DGDBSERVER
6652
6653 2012-11-09 Yao Qi <yao@codesourcery.com>
6654
6655 * spu-low.c (current_ptid): Move it to ..
6656 * gdbthread.h: ... here. New.
6657 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6658 * server.c (myresume, process_serial_event): Likewise.
6659 * thread-db.c (thread_db_find_new_threads): Likewise.
6660 * tracepoint.c (run_inferior_command): Likewise.
6661
6662 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
6663
6664 * server.c (handle_search_memory_1): Include access length in
6665 warning message.
6666
6667 2012-09-05 Michael Brandt <michael.brandt@axis.com>
6668
6669 * linux-crisv32-low.c: Fix compile errors.
6670
6671 2012-09-04 Yao Qi <yao@codesourcery.com>
6672
6673 * tracepoint.c (cmd_qtsv): Adjust debug message.
6674 Don't check CUR_TPOINT.
6675
6676 2012-08-28 Yao Qi <yao@codesourcery.com>
6677
6678 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6679 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6680 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6681 Remove declarations of xmalloc, xreallloc, xstrdup and
6682 freeargv.
6683 * Makefile.in (libiberty_h): New.
6684 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6685 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6686
6687 2012-08-23 Yao Qi <yao@codesourcery.com>
6688
6689 * server.h: Remove declaration of 'xsnprintf'.
6690
6691 2012-08-22 Keith Seitz <keiths@redhat.com>
6692
6693 * server.h: Include build-gnulib-gbserver/config.h.
6694 * gdbreplay.c: Likewise.
6695
6696 2012-08-08 Doug Evans <dje@google.com>
6697
6698 * Makefile.in (SFILES): Add gdb_vecs.c.
6699 (OBS): Add gdb_vecs.o.
6700 (gdb_vecs_h, host_defs_h): New variables.
6701 (thread-db.o): Add $(gdb_vecs_h) dependency.
6702 (gdb_vecs.o): New rule.
6703 * thread-db.c: #include "gdb_vecs.h".
6704 (thread_db_load_search): Use a vector to iterate over path elements.
6705 Handle text appearing after "$pdir".
6706
6707 * configure.ac: Add check for strstr.
6708 * config.in: Regenerate.
6709 * configure: Regenerate.
6710
6711 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6712
6713 * hostio.c (handle_pread): If pread fails, fall back to attempting
6714 lseek/read.
6715 (handle_pwrite): Likewise for pwrite.
6716
6717 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6718
6719 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6720 between unsupported TYPE and unimplementable ADDR/LEN combination.
6721 (arm_insert_point): Act on new return value.
6722
6723 2012-07-31 Pedro Alves <palves@redhat.com>
6724
6725 * server.c (process_point_options): Only skip tokens if we find
6726 one that is unrecognized. Don't treat 'X' specially while
6727 skipping unrecognized tokens.
6728
6729 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6730
6731 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6732 to 4-byte-align HW breakpoint addresses for Thumb.
6733
6734 2012-07-27 Yao Qi <yao@codesourcery.com>
6735
6736 PR remote/14161.
6737
6738 * server.h: Declare gdb_agent_about_to_close.
6739 * target.c (kill_inferior): Include "agent.h".
6740 New. Send command 'kill'.
6741 * target.h (kill_inferior): Removed macro.
6742 * tracepoint.c (gdb_agent_about_to_close): New.
6743 (gdb_agent_helper_thread): Handle command 'close'.
6744 Wait endlessly until the inferior stops.
6745 Install gdb_agent_remove_socket to atexit hook.
6746 (agent_socket_name): New static variable.
6747 (gdb_agent_socket_init): Replace local variable 'name' with
6748 'agent_socket_name'.
6749 (gdb_agent_remove_socket): New.
6750
6751 2012-07-27 Yao Qi <yao@codesourcery.com>
6752
6753 * server.c (process_point_options): Stop at 'X' when parsing.
6754
6755 2012-07-19 Michael Eager <eager@eagercon.com>
6756
6757 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6758 to hw_execute.
6759 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6760 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6761 hardware breakpoint.
6762
6763 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6764
6765 * gdbserver/linux-low.c (initialize_low): Call
6766 linux_ptrace_init_warnings.
6767
6768 2012-07-02 Doug Evans <dje@google.com>
6769
6770 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6771 pointer to int.
6772
6773 2012-07-02 Stan Shebs <stan@codesourcery.com>
6774
6775 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6776 (ax.o): Add it to build rule.
6777 (ax-ipa.o): Ditto.
6778 (OBS): Add format.o.
6779 (IPA_OBS): Add format.o.
6780 * server.c (handle_query): Claim support for breakpoint commands.
6781 (process_point_options): Add command case.
6782 (process_serial_event): Leave running if there are printfs in
6783 effect.
6784 * mem-break.h (any_persistent_commands): Declare.
6785 (add_breakpoint_commands): Declare.
6786 (gdb_no_commands_at_breakpoint): Declare.
6787 (run_breakpoint_commands): Declare.
6788 * mem-break.c (struct point_command_list): New struct.
6789 (struct breakpoint): New field command_list.
6790 (any_persistent_commands): New function.
6791 (add_commands_to_breakpoint): New function.
6792 (add_breakpoint_commands): New function.
6793 (gdb_no_commands_at_breakpoint): New function.
6794 (run_breakpoint_commands): New function.
6795 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6796 locally.
6797 * ax.c: Include format.h.
6798 (ax_printf): New function.
6799 (gdb_eval_agent_expr): Add printf opcode.
6800
6801 2012-06-13 Yao Qi <yao@codesourcery.com>
6802
6803 * server.c (start_inferior): Remove duplicated writes to fields
6804 'last_resume_kind' and 'last_status' of 'current_inferior'.
6805
6806 2012-06-12 Yao Qi <yao@codesourcery.com>
6807 Pedro Alves <palves@redhat.com>
6808
6809 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6810 comment.
6811 * server.c (handle_v_cont): Extend comment.
6812
6813 2012-06-11 Yao Qi <yao@codesourcery.com>
6814
6815 * linux-low.c (linux_attach): Add 'static'.
6816
6817 2012-06-06 Yao Qi <yao@codesourcery.com>
6818
6819 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6820
6821 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6822
6823 Fix gcc -flto compilation warning.
6824 * server.c (main): Make variable multi_mode and attach volatile.
6825
6826 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6827
6828 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6829 if the platform doesn't know about it.
6830
6831 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6832
6833 * Makefile.in (SFILES): Add linux-tile-low.c.
6834 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6835 * configure.srv: Handle tilegx-*-linux*.
6836 * linux-tile-low.c: New file.
6837
6838 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6839
6840 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6841
6842 2012-05-24 Pedro Alves <palves@redhat.com>
6843
6844 PR gdb/7205
6845
6846 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6847
6848 2012-05-24 Pedro Alves <palves@redhat.com>
6849
6850 PR gdb/7205
6851
6852 Replace target_signal with gdb_signal throughout.
6853
6854 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6855
6856 * linux-low.c (linux_store_registers): Avoid the copying sequence
6857 when no data has been retrieved by ptrace.
6858
6859 2012-05-22 Will Deacon <will.deacon@arm.com>
6860
6861 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6862 Include asm/ptrace.h.
6863 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6864 already defined.
6865
6866 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6867
6868 * linux-low.c (linux_store_registers): Don't re-retrieve data
6869 with ptrace that has already been obtained from /proc. Always
6870 copy any data retrieved with ptrace to the buffer supplied.
6871
6872 2012-05-11 Yao Qi <yao@codesourcery.com>
6873 Pedro Alves <palves@redhat.com>
6874
6875 * linux-low.c (enum stopping_threads_kind): New.
6876 (stopping_threads): Change type to `enum stopping_threads_kind'.
6877 (handle_extended_wait): If stopping and suspending threads, leave
6878 the new_lwp suspended too.
6879 (linux_wait_for_event): Adjust.
6880 (stop_all_lwps): Set `stopping_threads' to
6881 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6882 whether we're suspending threads or just stopping them. Assert no
6883 recursion happens.
6884
6885 2012-04-29 Yao Qi <yao@codesourcery.com>
6886
6887 * server.h: Move some code to ...
6888 * gdbthread.h: ... here. New.
6889 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6890 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6891 (nto-low.o, win32-low.o): Likewise.
6892 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6893 * regcache.c, remote-utils.c, server.c: Likewise.
6894 * target.c, tracepoint.c, win32-low.c: Likewise.
6895
6896 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6897
6898 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6899 (PTRACE_ARG4_TYPE): Likewise.
6900 (PTRACE_XFER_TYPE): Likewise.
6901 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6902 ptrace to PTRACE_ARG3_TYPE.
6903 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6904 (PTRACE_ARG4_TYPE): Likewise.
6905 (PTRACE_XFER_TYPE): Likewise.
6906 (linux_detach_one_lwp): Cast fourth argument of
6907 ptrace to long then PTRACE_ARG4_TYPE.
6908 (regsets_fetch_inferior_registers): Cast third argument of
6909 ptrace to long then PTRACE_ARG3_TYPE.
6910 (regsets_store_inferior_registers): Likewise.
6911
6912 2012-04-20 Pedro Alves <palves@redhat.com>
6913
6914 * configure: Regenerate.
6915
6916 2012-04-19 Pedro Alves <palves@redhat.com>
6917
6918 * Makefile.in (GNULIB_BUILDDIR): New.
6919 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6920 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6921 (all, install-only, uninstall, clean-info, all-lib, clean): No
6922 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6923 (maintainer-clean realclean distclean): Use subdir_do.
6924 (subdir_do): New.
6925 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6926 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6927 * acinclude.m4: Include acx_configure_dir.m4.
6928 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6929 calls. Call AC_PROG_RANLIB. Configure gnulib using
6930 ACX_CONFIGURE_DIR.
6931 (GNULIB): New.
6932 (GNULIB_STDINT_H): Adjust.
6933 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6934 * gdbreplay.c: Include build-gnulib/config.h.
6935 * server.h: Likewise.
6936 * aclocal.m4: Regenerate.
6937 * config.in: Regenerate.
6938 * configure: Regenerate.
6939
6940 2012-04-19 Pedro Alves <palves@redhat.com>
6941
6942 * Makefile.in (LIBGNU, INCGNU): Adjust.
6943 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6944 (all, install-only, uninstall, clean-info, all-lib, clean)
6945 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6946 * configure.ac: Adjust AC_OUTPUT output.
6947 * aclocal.m4: Regenerate.
6948 * configure: Regenerate.
6949
6950 2012-04-19 Pedro Alves <palves@redhat.com>
6951
6952 * Makefile.in (generated_files): New.
6953 (server_h): Remove the explicit dependency on config.h, and depend
6954 on $generated_files.
6955
6956 2012-04-19 Pedro Alves <palves@redhat.com>
6957
6958 * Makefile.in (INCGNU): Add -Ignulib.
6959
6960 2012-04-19 Pedro Alves <palves@redhat.com>
6961
6962 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6963 (INCGNU): ... this, and spell out -I here.
6964 (GNULIB_LIB): Rename to ...
6965 (LIBGNU): ... this.
6966 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6967
6968 2012-04-19 Pedro Alves <palves@redhat.com>
6969
6970 * config.in: Regenerate.
6971
6972 2012-04-19 Pedro Alves <palves@redhat.com>
6973
6974 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6975 * server.h (memmem): Remove declaration.
6976 * config.in: Regenerate.
6977 * configure: Regenerate.
6978
6979 2012-04-19 Yao Qi <yao@codesourcery.com>
6980
6981 * Makefile.in (SFILES): Add common/vec.c.
6982 (OBS): Add vec.o.
6983 (vec.o): New rule.
6984
6985 2012-04-19 Yao Qi <yao@codesourcery.com>
6986
6987 * remote-utils.c (prepare_resume_reply): Replace with macro
6988 target_core_of_thread.
6989 * server.c (handle_qxfer_threads_proper): Likewise.
6990 * target.h (traget_core_of_thread): New macro.
6991
6992 2012-04-18 Pedro Alves <palves@redhat.com>
6993
6994 * aclocal.m4: Regenerate.
6995 * configure: Regenerate.
6996
6997 2012-04-16 Yao Qi <yao@codesourcery.com>
6998
6999 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7000 duplicated on address.
7001
7002 2012-04-16 Yao Qi <yao@codesourcery.com>
7003
7004 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7005 (struct tracepoint_action_ops) <send>: New field.
7006 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7007 (agent_expr_send, x_tracepoint_action_send): New.
7008 (l_tracepoint_action_send): New.
7009 (cmd_qtdp): Download and install tracepoint
7010 according to `use_agent'.
7011 (run_inferior_command): Add one more parameter `len'.
7012 Update callers.
7013 (tracepoint_send_agent): New.
7014 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7015
7016 2012-04-16 Yao Qi <yao@codesourcery.com>
7017
7018 * tracepoint.c (download_tracepoints): Moved to ...
7019 (cmd_qtstart): ... here.
7020
7021 2012-04-14 Yao Qi <yao@codesourcery.com>
7022
7023 * tracepoint.c: Include inttypes.h.
7024 (struct collect_memory_action): Use sized types.
7025 (struct tracepoint): Likewise.
7026 (cmd_qtdp, stop_tracing): Update print specifiers.
7027 (cmd_qtp, response_tracepoint): Likewise.
7028 (collect_data_at_tracepoint): Likewise.
7029 (collect_data_at_step): Likewise.
7030
7031 2012-04-14 Yao Qi <yao@codesourcery.com>
7032
7033 Import gnulib module inttypes.
7034 * aclocal.m4, config.in, configure: Regenerated.
7035
7036 2012-04-14 Yao Qi <yao@codesourcery.com>
7037
7038 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7039 Makefile and config.status at last.
7040
7041 2012-04-13 Yao Qi <yao@codesourcery.com>
7042
7043 * tracepoint.c: Include stdint.h unconditionally.
7044
7045 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7046
7047 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7048 on BFD_HAVE_SYS_PROCFS_TYPE.
7049 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7050 * configure: Regenerate.
7051 * config.in: Likewise.
7052
7053 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7054
7055 * Makefile.in (clean): Also remove x32.c x32-linux.c
7056 x32-avx.c x32-avx-linux.c.
7057 (x32.o): New target.
7058 (x32.c): Likewise.
7059 (x32-linux.o): Likewise.
7060 (x32-linux.c): Likewise.
7061 (x32-avx.o): Likewise.
7062 (x32-avx.c): Likewise.
7063 (x32-avx-linux.o): Likewise.
7064 (x32-avx-linux.c): Likewise.
7065
7066 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7067 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7068 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7069 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7070 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7071 i386/x32-avx-linux.xml.
7072
7073 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7074 (init_registers_x32_avx_linux): Likwise.
7075 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7076 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7077
7078 2012-04-13 Pedro Alves <palves@redhat.com>
7079
7080 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7081 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7082 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7083 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7084 the sub-make.
7085
7086 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7087
7088 * linux-x86-low.c (compat_x32_clock_t): New.
7089 (compat_x32_siginfo_t): Likewise.
7090 (compat_x32_siginfo_from_siginfo): Likewise.
7091 (siginfo_from_compat_x32_siginfo): Likewise.
7092 (linux_is_elf64): Likewise.
7093 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7094 and siginfo_from_compat_x32_siginfo for x32.
7095 (x86_arch_setup): Set linux_is_elf64.
7096
7097 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7098
7099 PR gdb/13969
7100 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7101 e_machine field.
7102 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7103 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7104 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7105 compatible with process.
7106
7107 2012-04-12 Yao Qi <yao@codesourcery.com>
7108
7109 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7110 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7111 (install-only, install-info, clean): Handle sub dir gnulib.
7112 (all-lib, am--refresh): New targets.
7113 (memmem.o): Remove target.
7114 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7115 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7116 (AC_REPLACE_FUNCS): Remove memmem.
7117 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7118 (AC_OUTPUT): Generate Makefile in gnulib/.
7119 * aclocal.m4, config.in, configure: Regenerated.
7120
7121 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7122
7123 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7124
7125 2012-04-05 Pedro Alves <palves@redhat.com>
7126
7127 -Werror=strict-aliasing
7128
7129 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7130 pointer.
7131
7132 2012-04-04 Pedro Alves <palves@redhat.com>
7133
7134 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7135 (sparc_store_gregset_from_stack, sparc_store_gregset)
7136 (sparc_breakpoint_at): Fix formatting.
7137
7138 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7139
7140 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7141 are available.
7142 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7143 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7144 * config.in: Regenerate.
7145 * configure: Likewise.
7146
7147 2012-03-29 Pedro Alves <palves@redhat.com>
7148
7149 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7150 Correct ptrace arguments.
7151
7152 2012-03-28 Pedro Alves <palves@redhat.com>
7153
7154 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7155 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7156 (IA64_FR1_REGNUM): New defines.
7157 (ia64_fetch_register): New.
7158 (the_low_target): Install it.
7159 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7160 field.
7161 * linux-low.c (linux_fetch_registers): Try the
7162 the_low_target.fetch_register hook first.
7163
7164 * linux-arm-low.c (the_low_target): Adjust.
7165 * linux-bfin-low.c (the_low_target): Adjust.
7166 * linux-cris-low.c (the_low_target): Adjust.
7167 * linux-crisv32-low.c (the_low_target): Adjust.
7168 * linux-m32r-low.c (the_low_target): Adjust.
7169 * linux-m68k-low.c (the_low_target): Adjust.
7170 * linux-mips-low.c (the_low_target): Adjust.
7171 * linux-ppc-low.c (the_low_target): Adjust.
7172 * linux-s390-low.c (the_low_target): Adjust.
7173 * linux-sh-low.c (the_low_target): Adjust.
7174 * linux-sparc-low.c (the_low_target): Adjust.
7175 * linux-tic6x-low.c (the_low_target): Adjust.
7176 * linux-x86-low.c (the_low_target): Adjust.
7177 * linux-xtensa-low.c (the_low_target): Adjust.
7178
7179 2012-03-26 Pedro Alves <palves@redhat.com>
7180
7181 * server.c (handle_qxfer_libraries): Don't bail early if
7182 the_target->qxfer_libraries_svr4 is not NULL.
7183
7184 2012-03-26 Pedro Alves <palves@redhat.com>
7185
7186 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7187
7188 2012-03-23 Pedro Alves <palves@redhat.com>
7189
7190 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7191 "library-list-svr4" element's start tag when the the DSO list is
7192 empty.
7193
7194 2012-03-23 Pedro Alves <palves@redhat.com>
7195
7196 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7197 a variable whose type size is the same as the inferior's pointer
7198 size.
7199
7200 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7201
7202 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7203 struct siginfo.
7204 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7205 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7206 * linux-low.h: Include <signal.h>.
7207 (struct siginfo): Remove forward declaration.
7208 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7209 struct siginfo.
7210
7211 2012-03-21 Mike Frysinger <vapier@gentoo.org>
7212
7213 * .gitignore: Ignore more files.
7214
7215 2012-03-19 Pedro Alves <palves@redhat.com>
7216 Jan Kratochvil <jan.kratochvil@redhat.com>
7217
7218 * server.c (cont_thread, general_thread): Add describing comments.
7219 (start_inferior): Clear `cont_thread'.
7220 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7221 of a process.
7222
7223 2012-03-15 Yao Qi <yao@codesourcery.com>
7224
7225 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7226 handling to ...
7227 (cmd_qtdp): ... here.
7228
7229 2012-03-15 Yao Qi <yao@codesourcery.com>
7230
7231 * tracepoint.c (struct tracepoint_action_ops): New.
7232 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7233 (m_tracepoint_action_download): New.
7234 (r_tracepoint_action_download): New.
7235 (x_tracepoint_action_download): New.
7236 (l_tracepoint_action_download): New.
7237 (add_tracepoint_action): Install `action->ops' according type.
7238 (download_tracepoint_1): Move code `download' function pointer
7239 of various tracepoint_action_ops.
7240
7241 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7242
7243 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7244 linux_ptrace_attach_warnings.
7245
7246 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7247
7248 * Makefile.in (linux-ptrace.o): New.
7249 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7250 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7251 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7252 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7253 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7254 of these targets.
7255 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7256
7257 2012-03-08 Yao Qi <yao@codesourcery.com>
7258 Pedro Alves <palves@redhat.com>
7259
7260 Fix PR server/13392.
7261 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7262 offset of JMP insn.
7263 * tracepoint.c (remove_tracepoint): New.
7264 (cmd_qtdp): Call remove_tracepoint when failed to install.
7265
7266 2012-03-07 Pedro Alves <palves@redhat.com>
7267
7268 * linux-low.c (get_detach_signal): New.
7269 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7270 Pass on pending signals to PTRACE_DETACH. Check the result of the
7271 ptrace call.
7272 * server.c (program_signals, program_signals_p): New.
7273 (handle_general_set): Handle QProgramSignals.
7274 * server.h (program_signals, program_signals_p): Declare.
7275
7276 2012-03-05 Pedro Alves <palves@redhat.com>
7277 Jan Kratochvil <jan.kratochvil@redhat.com>
7278
7279 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7280 New comment why.
7281
7282 2012-03-03 Yao Qi <yao@codesourcery.com>
7283
7284 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7285 agent_look_up_symbols.
7286
7287 2012-03-03 Yao Qi <yao@codesourcery.com>
7288
7289 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7290 (linux-x86-low.o): Likewise.
7291 * server.h: Remove in_process_agent_loaded.
7292 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7293 common/agent.c.
7294 Update callers.
7295
7296 2012-03-03 Yao Qi <yao@codesourcery.com>
7297
7298 * tracepoint.c (gdb_agent_capability): New global.
7299 (in_process_agent_loaded_ust): Renamed to
7300 `in_process_agent_supports_ust'.
7301 Update callers.
7302 (in_process_agent_supports_ust): Call agent_capability_check.
7303 (clear_installed_tracepoints): Assert that agent supports
7304 agent.
7305
7306 2012-03-03 Yao Qi <yao@codesourcery.com>
7307
7308 * linux-low.c (linux_supports_agent): New.
7309 (linux_target_ops): Initialize field `supports_agent' with
7310 linux_supports_agent.
7311 * target.h (struct target_ops) <supports_agent>: New.
7312 (target_supports_agent): New macro.
7313 * server.c (handle_general_set): Handle packet 'QAgent'.
7314 (handle_query): Send `QAgent+'.
7315 * Makefile.in (server.o): Depends on agent.h.
7316
7317 2012-03-03 Yao Qi <yao@codesourcery.com>
7318
7319 * Makefile.in (OBS): Add agent.o.
7320 Add new rule for agent.o.
7321 Track dependence of tracepoint.c on agent.h.
7322 * tracepoint.c (run_inferior_command_1):
7323 (run_inferior_command): Call agent_run_command.
7324 (gdb_ust_connect_sync_socket): Deleted. Move it to
7325 common/agent.c.
7326 (resume_thread, stop_thread): Likewise.
7327 (gdb_ust_socket_init): Renamed to ...
7328 (gdb_agent_socket_init): ... New.
7329 (gdb_ust_thread): Renamed to ...
7330 (gdb_agent_helper_thread): ... New.
7331 (gdb_ust_init): Move some code to ...
7332 (gdb_agent_init): ... here. New.
7333 [HAVE_UST]: Call gdb_ust_init.
7334 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7335 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7336 * config.in, configure: Regenerated.
7337
7338 2012-03-02 Pedro Alves <palves@redhat.com>
7339
7340 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7341 * linux-low.c (struct simple_pid_list): New.
7342 (stopped_pids): New a struct simple_pid_list pointer.
7343 (add_to_pid_list, pull_pid_from_list): New.
7344 (handle_extended_wait): Don't assume the first signal new children
7345 report is SIGSTOP. Adjust call to pull_pid_from_list.
7346 (linux_wait_for_lwp): Adjust.
7347
7348 2012-03-02 Yao Qi <yao@codesourcery.com>
7349
7350 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7351 debug log.
7352
7353 2012-03-02 Yao Qi <yao@codesourcery.com>
7354
7355 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7356 `stop_pc' and `tpoint'. Update caller.
7357
7358 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7359
7360 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7361 * linux-low.c (use_linux_regsets): New macro.
7362 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7363 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7364 (linux_register_in_regsets): New function.
7365 (usr_fetch_inferior_registers): Skip registers covered by
7366 regsets.
7367 (usr_store_inferior_registers): Likewise.
7368 (usr_fetch_inferior_registers): New macro.
7369 (usr_store_inferior_registers): Likewise.
7370 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7371 (linux_store_registers): Likewise.
7372 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7373 prototype.
7374 (init_registers_mips64_dsp_linux): Likewise.
7375 (init_registers_mips_linux): New macro.
7376 (init_registers_mips_dsp_linux): Likewise.
7377 (mips_dsp_num_regs): Likewise.
7378 (DSP_BASE, DSP_CONTROL): New fallback macros.
7379 (mips_base_regs): New macro.
7380 (mips_regmap): Use it. Fix the size.
7381 (mips_dsp_regmap): New variable.
7382 (mips_dsp_regset_bitmap): Likewise.
7383 (mips_arch_setup): New function.
7384 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7385 than mips_regmap.
7386 (mips_cannot_store_register): Likewise.
7387 (the_low_target): Update .arch_setup, .num_regs and .regmap
7388 initializers. Add .regset_bitmap initializer.
7389 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7390 initializer.
7391 * linux-bfin-low.c (the_low_target): Likewise.
7392 * linux-cris-low.c (the_low_target): Likewise.
7393 * linux-crisv32-low.c (the_low_target): Likewise.
7394 * linux-ia64-low.c (the_low_target): Likewise.
7395 * linux-m32r-low.c (the_low_target): Likewise.
7396 * linux-m68k-low.c (the_low_target): Likewise.
7397 * linux-ppc-low.c (the_low_target): Likewise.
7398 * linux-s390-low.c (the_low_target): Likewise.
7399 * linux-sh-low.c (the_low_target): Likewise.
7400 * linux-sparc-low.c (the_low_target): Likewise.
7401 * linux-tic6x-low.c (the_low_target): Likewise.
7402 * linux-x86-low.c (the_low_target): Likewise.
7403 * linux-xtensa-low.c (the_low_target): Likewise.
7404 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7405 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7406 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7407 srv_xmlfiles.
7408 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7409 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7410
7411 2012-02-29 Yao Qi <yao@codesourcery.com>
7412 Pedro Alves <palves@redhat.com>
7413
7414 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7415 `step_over_finished' is true.
7416
7417 2012-02-27 Pedro Alves <palves@redhat.com>
7418
7419 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7420 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7421
7422 2012-02-27 Pedro Alves <palves@redhat.com>
7423
7424 PR server/9684
7425 * linux-low.c (pid_is_stopped): New.
7426 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7427
7428 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
7429
7430 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7431 of conditions.
7432
7433 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7434
7435 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7436
7437 2012-02-24 Luis Machado <lgustavo@codesourcery>
7438
7439 * server.c (handle_query): Advertise support for target-side
7440 breakpoint condition evaluation.
7441 (process_point_options): New function.
7442 (process_serial_event): When inserting a breakpoint, check for
7443 a target-side condition that should be evaluated.
7444
7445 * mem-break.c: Include regcache.h and ax.h.
7446 (point_cond_list_t): New data structure.
7447 (breakpoint) <cond_list>: New field.
7448 (find_gdb_breakpoint_at): Make non-static.
7449 (delete_gdb_breakpoint_at): Clear any target-side
7450 conditions.
7451 (clear_gdb_breakpoint_conditions): New function.
7452 (add_condition_to_breakpoint): Likewise.
7453 (add_breakpoint_condition): Likewise.
7454 (gdb_condition_true_at_breakpoint): Likewise.
7455 (gdb_breakpoint_here): Return result directly instead
7456 of going through a local variable.
7457
7458 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7459 (clear_gdb_breakpoint_conditions): Likewise.
7460 (add_breakpoint_condition): Likewise.
7461 (gdb_condition_true_at_breakpoint): Likewise.
7462
7463 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7464 (need_step_over_p): Take target-side breakpoint condition into
7465 consideration.
7466
7467 2012-02-24 Luis Machado <lgustavo@codesourcery>
7468
7469 * server.h: Include tracepoint.h.
7470 (agent_mem_read, agent_get_trace_state_variable_value,
7471 agent_set_trace_state_variable_value,
7472 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7473 get_set_tsv_func_addr): New prototypes.
7474
7475 * ax.h: New include file.
7476 * ax.c: New source file.
7477
7478 * tracepoint.c: Include ax.h.
7479 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7480 agent_expr, eval_result_type): Move to ax.h.
7481 (parse_agent_expr): Rename to ...
7482 (gdb_parse_agent_expr): ... this, make it non-static and move
7483 to ax.h.
7484 (unparse_agent_expr) Rename to ...
7485 (gdb_unparse_agent_expr): ... this, make it non-static and move
7486 to ax.h.
7487 (eval_agent_expr): Rename to ...
7488 (eval_tracepoint_agent_expr): ... this.
7489 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7490 forward declarations.
7491 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7492 (agent_get_trace_state_variable_value): New function.
7493 (agent_set_trace_state_variable_value): New function.
7494 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7495 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7496 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7497 (condition_true_at_tracepoint): Likewise.
7498 (parse_agent_expr): Rename to ...
7499 (gdb_parse_agent_expr): ... this and move to ax.c.
7500 (unparse_agent_expr): Rename to ...
7501 (gdb_unparse_agent_expr): ... this and move to ax.c.
7502 (gdb_agent_op_name): Move to ax.c.
7503 (eval_agent_expr): Rename to ...
7504 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7505 and move to ax.c.
7506 (eval_tracepoint_agent_expr): New function.
7507 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7508 non-static.
7509 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7510 ax.c.
7511 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7512 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7513 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7514 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7515 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7516 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7517 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7518 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7519 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7520 (compile_bytecodes): Remove forward declaration.
7521 (is_goto_target): Move to ax.c.
7522 (compile_bytecodes): Move to ax.c and call
7523 agent_get_trace_state_variable_value (...) and
7524 agent_set_trace_state_variable_value (...).
7525
7526 * Makefile.in: Update ax.c and IPA dependencies.
7527
7528 2012-02-24 Pedro Alves <palves@redhat.com>
7529
7530 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7531 (cmd_bigqtbuffer_circular): ... this. Only handle
7532 'QTBuffer:circular:'.
7533 (handle_tracepoint_general_set): Adjust.
7534
7535 2012-02-16 Yao Qi <yao@codesourcery.com>
7536
7537 * inferiors.c: Move code to ...
7538 * dll.c: .... here. New.
7539 * server.h: Declare clear_dlls.
7540 * Makefile.in (SFILES): Add dll.c.
7541 (OBS): Add dll.o
7542 (dll.o): New rule.
7543
7544 2012-02-11 Yao Qi <yao@codesourcery.com>
7545
7546 * server.c: (handle_monitor_command): Add a new parameter
7547 `own_buf'.
7548 (handle_query): Update caller.
7549
7550 2012-02-09 Joel Brobecker <brobecker@adacore.com>
7551
7552 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7553 * configure, config.in: Regenerate.
7554 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7555 is not defined.
7556
7557 2012-02-02 Pedro Alves <palves@redhat.com>
7558
7559 Try SIGKILL first, then PTRACE_KILL.
7560 * linux-low.c (linux_kill_one_lwp): New.
7561 (linux_kill_one_lwp): Rename to ...
7562 (kill_one_lwp_callback): ... this. Use the new
7563 linux_kill_one_lwp.
7564
7565 2012-02-02 Pedro Alves <palves@redhat.com>
7566
7567 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7568 inferior.
7569
7570 2012-01-27 Pedro Alves <palves@redhat.com>
7571
7572 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7573 (elf_64_file_p): Make static.
7574 (linux_pid_exe_is_elf_64_file): New.
7575 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7576 Delete declarations.
7577 (linux_pid_exe_is_elf_64_file): Declare.
7578 * linux-x86-low.c (x86_arch_setup): Use
7579 linux_pid_exe_is_elf_64_file.
7580
7581 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7582
7583 * linux-low.c (linux_wait_for_event_1): Rename to ...
7584 (linux_wait_for_event): ... here and merge it with former
7585 linux_wait_for_event - new variable wait_ptid, use it.
7586 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7587
7588 2012-01-23 Pedro Alves <palves@redhat.com>
7589
7590 * server.c (main): Avoid yet another case of infinite loop while
7591 detaching/killing after a longjmp.
7592
7593 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7594
7595 Code cleanup.
7596 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7597
7598 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7599
7600 * hostio.c (handle_readlink): New function.
7601 (handle_vFile): Call it to handle "vFile:readlink" packets.
7602
7603 2012-01-20 Pedro Alves <palves@redhat.com>
7604 Ulrich Weigand <ulrich.weigand@linaro.org>
7605
7606 * server.c (handle_v_requests): Only support vAttach and vRun to
7607 start multiple processes when in extended protocol mode.
7608
7609 2012-01-17 Pedro Alves <palves@redhat.com>
7610
7611 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7612 memalign plus mprotect to allocate the scratch buffer.
7613
7614 2012-01-13 Pedro Alves <palves@redhat.com>
7615
7616 * server.c (attach_inferior): Clear `cont_thread'.
7617
7618 2012-01-13 Pedro Alves <palves@redhat.com>
7619
7620 * server.c (main): Avoid infinite loop while detaching/killing
7621 after a longjmp.
7622
7623 2012-01-09 Doug Evans <dje@google.com>
7624
7625 * server.c (start_inferior): Set last_ptid in --wrapper case.
7626
7627 2012-01-06 Yao Qi <yao@codesourcery.com>
7628
7629 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7630 defined.
7631 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7632
7633 2012-01-04 Yao Qi <yao@codesourcery.com>
7634
7635 * tracepoint.c (cmd_qtdp): Print debug message
7636 for static tracepoint.
7637
7638 2012-01-04 Yao Qi <yao@codesourcery.com>
7639
7640 * tracepoint.c (trace_vdebug): Differentiate debug message
7641 between gdbserver and IPA.
7642
7643 2012-01-03 Yao Qi <yao@codesourcery.com>
7644
7645 * tracepoint.c (tracepoint_was_hit): Don't collect for
7646 static tracepoint.
7647
7648 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7649
7650 * terminal.h: Reformat copyright header.
7651
7652 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7653
7654 * server.c (gdbserver_version): Update copyright year.
7655 * gdbreplay.c (gdbreplay_version): Likewise.
7656
7657 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7658
7659 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7660
7661 Revert:
7662 2011-12-18 Hui Zhu <teawater@gmail.com>
7663 * linux-low.c (linux_create_inferior): Save return value to ret.
7664
7665 2011-12-18 Hui Zhu <teawater@gmail.com>
7666
7667 * linux-low.c (linux_create_inferior): Save return value to ret.
7668
7669 2011-12-16 Doug Evans <dje@google.com>
7670
7671 * linux-low.c (linux_create_inferior): If stdio connection,
7672 redirect stdin from /dev/null, stdout to stderr.
7673 * remote-utils.c (remote_is_stdio): New static global.
7674 (remote_connection_is_stdio): New function.
7675 (remote_prepare): Handle stdio connection.
7676 (remote_open): Ditto.
7677 (remote_close): Don't close stdin for stdio connections.
7678 (read_prim,write_prim): New functions. Replace all calls to
7679 read/write to these.
7680 * server.c (main): Watch for "-" argument. Move call to
7681 remote_prepare before start_inferior.
7682 * server.h (STDIO_CONNECTION_NAME): New macro.
7683 (remote_connection_is_stdio): Declare.
7684
7685 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7686 in debugging output.
7687
7688 2011-12-15 Yao Qi <yao@codesourcery.com>
7689
7690 * tracepoint.c: Include sys/syscall.h.
7691 (gdb_ust_thread): Remove preprocessor conditional.
7692
7693 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7694
7695 * linux-low.c (linux_detach_one_lwp): Call
7696 the_low_target.prepare_to_resume before detaching.
7697
7698 2011-12-14 Yao Qi <yao@codesourcery.com>
7699
7700 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7701 of write.
7702
7703 2011-12-14 Yao Qi <yao@codesourcery.com>
7704
7705 * i386-low.c (i386_low_stopped_data_address): Initialize local
7706 variable `control'.
7707
7708 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7709
7710 PR remote/13492
7711
7712 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7713 DR_CONTROL unless necessary. Extend comments.
7714 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7715 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7716
7717 2011-12-13 Yao Qi <yao@codesourcery.com>
7718
7719 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7720 macros.
7721 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7722
7723 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7724
7725 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7726 Print new debug message for such case.
7727
7728 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7729
7730 Fix overlapping memcpy.
7731 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7732 the read_inferior_memory transfer.
7733 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7734 write_inferior_memory transfer.
7735 (set_fast_tracepoint_jump): New variable buf. Use it for the
7736 read_inferior_memory and write_inferior_memory transfers.
7737 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7738 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7739 Use it for the write_inferior_memory transfer.
7740 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7741 buffers.
7742
7743 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7744
7745 * linux-low.c (fetch_register, store_register): Make code
7746 consistent, fix formatting.
7747
7748 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7749
7750 * linux-low.c (usr_store_inferior_registers): Factor out code
7751 to handle individual registers into...
7752 (store_register): ... this new function.
7753
7754 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7755
7756 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7757 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7758 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7759 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7760 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7761 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7762 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7763 (srv_xmlfiles): Add new XML files.
7764
7765 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7766 and <sys/uio.h>.
7767 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7768 (init_registers_s390_linux32v1): Add prototype.
7769 (init_registers_s390_linux32v2): Likewise.
7770 (init_registers_s390_linux64v1): Likewise.
7771 (init_registers_s390_linux64v2): Likewise.
7772 (init_registers_s390x_linux64v1): Likewise.
7773 (init_registers_s390x_linux64v2): Likewise.
7774 (s390_num_regs): Increment to 52.
7775 (s390_regmap): Add orig_r2 register.
7776 (s390_num_regs_3264): Increment to 68.
7777 (s390_regmap_3264): Add orig_r2 register.
7778 (s390_collect_ptrace_register): Handle orig_r2 register.
7779 (s390_supply_ptrace_register): Likewise.
7780 (s390_fill_last_break): New function.
7781 (s390_store_last_break): Likewise.
7782 (s390_fill_system_call): New function.
7783 (s390_store_system_call): Likewise.
7784 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7785 register sets.
7786 (s390_check_regset): New function.
7787 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7788 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7789 Update target_regsets for available register sets.
7790
7791 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7792 Jan Kratochvil <jan.kratochvil@redhat.com>
7793
7794 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7795 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7796 New.
7797 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7798 * linux-low.h (struct process_info_private): New member r_debug.
7799 * server.c (handle_qxfer_libraries): Call
7800 the_target->qxfer_libraries_svr4.
7801 (handle_qxfer_libraries_svr4): New function.
7802 (qxfer_packets): New entry "libraries-svr4".
7803 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7804 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7805 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7806 PACKET_qXfer_libraries_svr4.
7807
7808 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7809
7810 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7811 PSW address/mask between 8-byte and 16-byte formats.
7812 (s390_supply_ptrace_register): Likewise.
7813 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7814 basic addressing mode bit.
7815
7816 2011-11-24 Stan Shebs <stan@codesourcery.com>
7817
7818 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7819
7820 2011-11-17 Stan Shebs <stan@codesourcery.com>
7821
7822 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7823 (tracing_start_time): New global.
7824 (tracing_stop_time): New global.
7825 (tracing_user_name): New global.
7826 (tracing_notes): New global.
7827 (tracing_stop_note): New global.
7828 (cmd_qtstart): Set traceframe_usage, start_time.
7829 (stop_tracing): Set stop_time.
7830 (cmd_qtstatus): Report additional status.
7831 (cmd_qtp): New function.
7832 (handle_tracepoint_query): Call it.
7833 (cmd_qtnotes): New function.
7834 (handle_tracepoint_general_set): Call it.
7835 (get_timestamp): Rename from tsv_get_timestamp.
7836
7837 2011-11-14 Stan Shebs <stan@codesourcery.com>
7838 Kwok Cheung Yeung <kcy@codesourcery.com>
7839
7840 * linux-x86-low.c (small_jump_insn): New.
7841 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7842 trampoline and error message, build a trampoline and issue a small
7843 jump instruction to it.
7844 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7845 trampoline and error message.
7846 (x86_get_min_fast_tracepoint_insn_len): New.
7847 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7848 * linux-low.h (struct linux_target_ops): Add arguments to
7849 install_fast_tracepoint_jump_pad operation, add new operation.
7850 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7851 arguments.
7852 (linux_get_min_fast_tracepoint_insn_len): New function.
7853 (linux_target_op): Add new operation.
7854 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7855 (gdb_trampoline_buffer_end): Ditto.
7856 (gdb_trampoline_buffer_error): Ditto.
7857 (struct ipa_sym_addresses): Add fields for new IPA variables.
7858 (symbol_list): Add entries for new IPA variables.
7859 (struct tracepoint): Add fields to hold the address range of the
7860 trampoline used by the tracepoint.
7861 (trampoline_buffer_head): New static variable.
7862 (trampoline_buffer_tail): Ditto.
7863 (claim_trampoline_space): New function.
7864 (have_fast_tracepoint_trampoline_buffer): New function.
7865 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7866 structure.
7867 (install_fast_tracepoint): Ditto, also add error buffer argument.
7868 (cmd_qtminftpilen): New function.
7869 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7870 (fast_tracepoint_from_trampoline_address): New function.
7871 (fast_tracepoint_collecting): Handle trampoline as part of jump
7872 pad space.
7873 (set_trampoline_buffer_space): New function.
7874 (initialize_tracepoint): Initialize new IPA variables.
7875 * target.h (struct target_ops): Add arguments to
7876 install_fast_tracepoint_jump_pad operation, add new
7877 get_min_fast_tracepoint_insn_len operation.
7878 (target_get_min_fast_tracepoint_insn_len): New.
7879 (install_fast_tracepoint_jump_pad): Add arguments.
7880 * server.h (IPA_BUFSIZ): Define.
7881 * linux-i386-ipa.c: Include extra header files.
7882 (initialize_fast_tracepoint_trampoline_buffer): New function.
7883 (initialize_low_tracepoint): Call it.
7884 * server.h (set_trampoline_buffer_space): Declare.
7885 (claim_trampoline_space): Ditto.
7886 (have_fast_tracepoint_trampoline_buffer): Ditto.
7887
7888 2011-11-14 Yao Qi <yao@codesourcery.com>
7889
7890 * server.c (handle_query): Handle InstallInTrace for qSupported.
7891 * tracepoint.c (add_tracepoint): Sort list.
7892 (install_tracepoint, download_tracepoint): New.
7893 (cmd_qtdp): Call them to install and download tracepoints.
7894 (sort_tracepoints): Removed.
7895 (cmd_qtstart): Update.
7896
7897 2011-11-14 Yao Qi <yao@codesourcery.com>
7898
7899 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7900 * mem-break.h: Declare.
7901 * tracepoint.c (cmd_qtstart): Move some code to ...
7902 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7903 New.
7904 (download_tracepoints): Move some code to ...
7905 (download_tracepoint_1): ... here. New.
7906
7907 2011-11-08 Yao Qi <yao@codesourcery.com>
7908
7909 * remote-utils.c (relocate_instruction): A comment fix.
7910
7911 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7912
7913 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7914 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7915 dr_status_mirror and dr_control_mirror from debug_reg_state.
7916 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7917 (i386_initial_stuff): Remove use of deleted globals.
7918 (i386_get_thread_context, i386_set_thread_context,
7919 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7920 from debug_reg_state.
7921
7922 2011-11-05 Yao Qi <yao@codesourcery.com>
7923
7924 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7925 address as TPOINT's.
7926
7927 2011-11-02 Stan Shebs <stan@codesourcery.com>
7928
7929 * tracepoint.c (agent_mem_read_string): New function.
7930 (eval_agent_expr): Call it for tracenz.
7931 * server.c (handle_query): Report support for tracenz.
7932
7933 2011-11-02 Yao Qi <yao@codesourcery.com>
7934
7935 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7936
7937 2011-11-02 Yao Qi <yao@codesourcery.com>
7938
7939 * target.h: Fix a typo in comment.
7940
7941 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7942
7943 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7944 clobber the breakpoints' shadows with fast tracepoint jumps.
7945 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7946 * target.c (write_inferior_memory): Also pass MYADDR down to
7947 check_mem_write.
7948
7949 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7950
7951 * configure.ac: Check support for personality routine.
7952 * configure: Regenerate.
7953 * config.in: Likewise.
7954 * linux-low.c: Include <sys/personality.h>.
7955 Define ADDR_NO_RANDOMIZE if necessary.
7956 (linux_create_inferior): Disable address space randomization when
7957 forking inferior, if requested.
7958 (linux_supports_disable_randomization): New function.
7959 (linux_target_ops): Install it.
7960 * server.h (disable_randomization): Declare.
7961 * server.c (disable_randomization): New global variable.
7962 (handle_general_set): Handle QDisableRandomization.
7963 (handle_query): Likewise for qSupported.
7964 (main): Support --disable-randomization and --no-disable-randomization
7965 command line arguments.
7966 * target.h (struct target_ops): Add supports_disable_randomization.
7967 (target_supports_disable_randomization): New macro.
7968
7969 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7970
7971 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7972 ifdef check.
7973 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7974 [!PT_GETDSBT] (target_loadmap): New definition.
7975 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7976 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7977 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7978 and PT_GETDSBT to LINUX_LOADMAP.
7979 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7980 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7981
7982 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7983
7984 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7985 (arm_linux_hwbp_cap): New static variable.
7986 (arm_linux_get_hwbp_cap): Replace by ...
7987 (arm_linux_init_hwbp_cap): ... this new function.
7988 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7989 (arm_linux_get_hw_watchpoint_count): Likewise.
7990 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7991 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7992 (arm_prepare_to_resume): Use perror_with_name instead of error.
7993
7994 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7995
7996 * linux-arm-low.c: Include <signal.h>.
7997 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7998 (struct arm_linux_hwbp_cap): New data type.
7999 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8000 (struct arm_linux_hw_breakpoint): New data type.
8001 (MAX_BPTS, MAX_WPTS): Define.
8002 (struct arch_process_info, struct arch_lwp_info): New data types.
8003 (arm_linux_get_hwbp_cap): New function.
8004 (arm_linux_get_hw_breakpoint_count): Likewise.
8005 (arm_linux_get_hw_watchpoint_count): Likewise.
8006 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8007 (arm_hwbp_control_initialize): Likewise.
8008 (arm_hwbp_control_is_enabled): Likewise.
8009 (arm_hwbp_control_is_initialized): Likewise.
8010 (arm_hwbp_control_disable): Likewise.
8011 (arm_linux_hw_breakpoint_equal): Likewise.
8012 (arm_linux_hw_point_initialize): Likewise.
8013 (struct update_registers_data): New data structure.
8014 (update_registers_callback: New function.
8015 (arm_insert_point): Likewise.
8016 (arm_remove_point): Likewise.
8017 (arm_stopped_by_watchpoint): Likewise.
8018 (arm_stopped_data_address): Likewise.
8019 (arm_new_process): Likewise.
8020 (arm_new_thread): Likewise.
8021 (arm_prepare_to_resume): Likewise.
8022 (the_low_target): Register arm_insert_point, arm_remove_point,
8023 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8024 arm_new_thread, and arm_prepare_to_resume.
8025
8026 2011-09-15 Stan Shebs <stan@codesourcery.com>
8027
8028 * server.h (struct emit_ops): Add compare-goto fields.
8029 * tracepoint.c (gdb_agent_op_sizes): New table.
8030 (emit_eq_goto): New function.
8031 (emit_ne_goto): New function.
8032 (emit_lt_goto): New function.
8033 (emit_le_goto): New function.
8034 (emit_gt_goto): New function.
8035 (emit_ge_goto): New function.
8036 (is_goto_target): New function.
8037 (compile_bytecodes): Recognize special cases of compare-goto
8038 combinations and call specialized emitters for them.
8039 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8040 (amd64_emit_ne_goto): New function.
8041 (amd64_emit_lt_goto): New function.
8042 (amd64_emit_le_goto): New function.
8043 (amd64_emit_gt_goto): New function.
8044 (amd64_emit_ge_goto): New function.
8045 (amd64_emit_ops): Add the new functions.
8046 (i386_emit_eq_goto): New function.
8047 (i386_emit_ne_goto): New function.
8048 (i386_emit_lt_goto): New function.
8049 (i386_emit_le_goto): New function.
8050 (i386_emit_gt_goto): New function.
8051 (i386_emit_ge_goto): New function.
8052 (i386_emit_ops): Add the new functions.
8053
8054 2011-09-08 Stan Shebs <stan@codesourcery.com>
8055
8056 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8057 (i386_emit_epilogue): Restore %ebx.
8058
8059 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8060
8061 * server.c (step_thread): Remove definition.
8062 (process_serial_event): Don't handle Hs.
8063 * server.h (step_thread): Remove declaration.
8064 * target.c (set_desired_inferior): Remove use of step_thread.
8065
8066 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8067
8068 * linux-low.c: Include linux-procfs.h.
8069 (linux_attach_lwp_1): Update comments.
8070 (linux_attach): Scan for existing threads when attaching to a
8071 process that is the tgid.
8072 * Makefile.in: Update dependencies.
8073
8074 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8075
8076 * configure.srv: Add linux-procfs.o dependencies.
8077
8078 2011-08-14 Yao Qi <yao@codesourcery.com>
8079
8080 * target.h (struct target_ops): Fix indent.
8081 * win32-low.c (win32_target_ops): Fix comment.
8082
8083 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8084 Yao Qi <yao@codesourcery.com>
8085
8086 * Makefile.in (clean): Remove tic6x-*.c files.
8087 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8088 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8089 (tic6x-c64xp-linux.c): Likewise.
8090 * configure.srv: Add support for tic6x-*-uclinux.
8091 * linux-tic6x-low.c: New.
8092 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8093
8094 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8095 Yao Qi <yao@codesourcery.com>
8096
8097 * target.h (struct target_ops): Add read_loadmap.
8098 * linux-low.c (struct target_loadseg): New type.
8099 (struct target_loadmap): New type.
8100 (linux_read_loadmap): New function.
8101 (linux_target_ops): Add linux_read_loadmap.
8102 * server.c (handle_query): Support qXfer:fdpic:read packet.
8103 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8104 to NULL.
8105
8106 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8107
8108 * win32-low.c: Include <stdint.h>.
8109
8110 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8111
8112 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8113 to the inferior here.
8114 (i386_remove_aligned_watchpoint): Ditto.
8115 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8116 fit part of the watchpoint in the debug registers.
8117 (i386_update_inferior_debug_regs): New.
8118 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8119 registers, and only update the inferior on success.
8120 (i386_low_remove_watchpoint): Ditto.
8121
8122 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8123
8124 * linux-low.c (compare_ints, unique, list_threads, show_process,
8125 linux_core_of_thread): Delete.
8126 (linux_target_ops): Change linux_core_of_thread to
8127 linux_common_core_of_thread.
8128 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8129 * utils.c (malloc_failure): Change type of argument.
8130 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8131 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8132 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8133 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8134 (IPA_OBJS): Add common-utils-ipa.o.
8135 (ptid_h, linux_osdata_h): New macros.
8136 (server_h): Add common/common-utils.h, common/xml-utils.h,
8137 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8138 common/ptid.h.
8139 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8140 ptid.o, buffer.o): New rules.
8141 (linux-low.o): Add common/linux-osdata.h as a dependency.
8142 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8143 * configure.ac: Add AC_HEADER_DIRENT check.
8144 * config.in: Regenerate.
8145 * configure: Regenerate.
8146 * remote-utils.c (xml_escape_text): Delete.
8147 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8148 buffer_xml_printf): Move to common/buffer.c.
8149 * server.c (main): Remove call to initialize_inferiors.
8150 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8151 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8152 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8153 internal_error, gdb_assert, gdb_assert_fail): Delete.
8154 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8155 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8156 common/buffer.h.
8157 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8158 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8159 initialize_inferiors): Delete.
8160
8161 2011-07-20 Pedro Alves <pedro@codesourcery.com>
8162
8163 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8164 symbol error.
8165
8166 2011-05-31 Pedro Alves <pedro@codesourcery.com>
8167
8168 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8169 assertion.
8170 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8171
8172 2011-05-26 Yao Qi <yao@codesourcery.com>
8173
8174 * Makefile.in (thread-db.o): Track dependence to
8175 common/gdb_thread_db.h.
8176 * thread-db.c: include gdb_thread_db.h from right place.
8177
8178 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8179
8180 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8181 __FILE__ and __LINE__ to internal_error.
8182
8183 2011-05-13 Doug Evans <dje@google.com>
8184
8185 * thread-db.c (try_thread_db_load_from_sdir): New function.
8186 (try_thread_db_load_from_dir): New function.
8187 (thread_db_load_search): Handle $sdir, ignore $pdir.
8188 Remove trying of system directories if search of
8189 libthread-db-search-path fails, that is now done via $sdir.
8190
8191 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8192
8193 * server.c (handle_query): Add EnableDisableTracepoints to the list
8194 of supported features.
8195 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8196 tracepoints.
8197 (cmd_qtenable_disable): New.
8198 (cmd_qtstart): Install tracepoints even if disabled.
8199 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8200 receiving a QTEnable or QTDisable packet.
8201 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8202 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8203 tracepoints.
8204 (gdb_probe): Skip data collection if static tracepoint is disabled.
8205
8206 2011-05-10 Doug Evans <dje@google.com>
8207
8208 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8209
8210 2011-05-04 Doug Evans <dje@google.com>
8211
8212 * linux-low.c (linux_join): Skip process lookup.
8213 * spu-low.c (spu_join): Ditto.
8214 * server.c (join_inferiors_callback): Delete.
8215 (process_serial_event): For 'D' packet (detach) call join_inferior
8216 directly.
8217
8218 2011-05-04 Joseph Myers <joseph@codesourcery.com>
8219
8220 * README: Don't mention xscale*-*-linux*.
8221 * configure.srv (xscale*-*-linux*): Don't handle target.
8222
8223 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8224
8225 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8226 casting pointers.
8227 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8228 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8229 (i386_emit_void_call_2): Likewise.
8230
8231 2011-04-26 Yao Qi <yao@codesourcery.com>
8232
8233 * linux-low.c: Move common macros to linux-ptrace.h.
8234 Include linux-ptrace.h.
8235 * Makefile.in (linux_ptrace_h): New.
8236 (linux-low.o): Depends on linux-ptrace.h.
8237
8238 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8239
8240 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8241 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8242 (remote_prepare): New function with most of the TCP code from ...
8243 (remote_open): ... here. Detect PORT here unconditionally. Move also
8244 setting transport_is_reliable.
8245 * server.c (run_once): New variable.
8246 (gdbserver_usage): Document it.
8247 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8248 the first run if RUN_ONCE.
8249 * server.h (run_once, remote_prepare): New declarations.
8250
8251 2011-04-19 Tom Tromey <tromey@redhat.com>
8252
8253 * win32-low.c (handle_load_dll): Remove duplicate "the".
8254
8255 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8256
8257 Remove support for old Cygwin 1.5 versions.
8258 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8259 function to avoid warning.
8260 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8261 warning.
8262
8263 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8264
8265 * gdbserver/server.h (Macro _): Define it if not available.
8266
8267 2011-03-14 Michael Snyder <msnyder@vmware.com>
8268
8269 * hostio.c (handle_close): Remove unnecessary null test.
8270
8271 2011-03-10 Joel Brobecker <brobecker@adacore.com>
8272
8273 * Makefile.in (maintainer-clean realclean distclean): Remove
8274 "make ... subdir_do" command.
8275
8276 2011-03-10 Michael Snyder <msnyder@vmware.com>
8277
8278 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8279
8280 * server.c (handle_v_run): Free alloced buffer on early return.
8281
8282 2011-03-09 Yao Qi <yao@codesourcery.com>
8283
8284 Revert:
8285 2011-03-04 Yao Qi <yao@codesourcery.com>
8286
8287 * Makefile.in: Remove GNU make feature --directory.
8288
8289 2011-03-05 Yao Qi <yao@codesourcery.com>
8290
8291 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8292 (subdir_do): New make target. Copied from gdb/Makefile.
8293 (maintainer-clean, realclean, distclean, clean): Call corresponding
8294 make targets in common/Makefile.
8295
8296 2011-02-11 Yao Qi <yao@codesourcery.com>
8297
8298 * configure.ac: Call AC_PROG_RANLIB.
8299 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8300 * configure: Regenerate.
8301
8302 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8303
8304 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8305
8306 2011-03-06 Yao Qi <yao@codesourcery.com>
8307
8308 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8309
8310 2011-03-05 Yao Qi <yao@codesourcery.com>
8311
8312 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8313 (subdir_do): New make target. Copied from gdb/Makefile.
8314 (maintainer-clean, realclean, distclean, clean): Call corresponding
8315 make targets in common/Makefile.
8316
8317 2011-03-04 Yao Qi <yao@codesourcery.com>
8318
8319 * Makefile.in: Remove GNU make feature --directory.
8320
8321 2011-03-04 Michael Snyder <msnyder@vmware.com>
8322
8323 * server.c (queue_stop_reply): Call xmalloc not malloc.
8324
8325 2011-03-02 Michael Snyder <msnyder@vmware.com>
8326
8327 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8328
8329 2011-02-28 Michael Snyder <msnyder@vmware.com>
8330
8331 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8332 (cmd_qtframe): Ditto.
8333 (cmd_qtbuffer): Ditto.
8334 (cmd_bigqtbuffer): Ditto.
8335
8336 * utils.c (decimal2str): Initialize 'width' to nine, then
8337 don't mess with it.
8338
8339 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8340
8341 * hostio.c (require_data): Free *data, not data.
8342
8343 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8344
8345 * hostio.c (require_data): Use free, not xfree.
8346
8347 2011-02-27 Michael Snyder <msnyder@vmware.com>
8348
8349 * server.c (handle_query): Discard unused value.
8350
8351 * hostio.c (require_data): Free malloc memory before returning
8352 error.
8353
8354 2011-02-26 Michael Snyder <msnyder@vmware.com>
8355
8356 * linux-low.c (list_threads): Call closedir for dirent.
8357
8358 2011-02-27 Michael Snyder <msnyder@vmware.com>
8359
8360 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8361 a case statement falls through.
8362
8363 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8364
8365 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8366 in comparison.
8367
8368 2011-02-26 Michael Snyder <msnyder@vmware.com>
8369
8370 * utils.c (decimal2str): Eliminate dead code and dead param.
8371 (pulongest): Drop dead param from call to decimal2str.
8372 (plongest): Ditto.
8373
8374 2011-02-24 Joel Brobecker <brobecker@adacore.com>
8375
8376 Revert the following patch (not approved yet):
8377 2011-02-21 Hui Zhu <teawater@gmail.com>
8378 * tracepoint.c (tp_printf): New function.
8379 (eval_agent_expr): Handle gdb_agent_op_printf.
8380
8381 2011-02-21 Hui Zhu <teawater@gmail.com>
8382
8383 * tracepoint.c (tp_printf): New function.
8384 (eval_agent_expr): Handle gdb_agent_op_printf.
8385
8386 2011-02-18 Tom Tromey <tromey@redhat.com>
8387
8388 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8389 (tracepoint.o): Likewise.
8390 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8391 (gdb_agent_op_names): Likewise.
8392
8393 2011-02-18 Tom Tromey <tromey@redhat.com>
8394
8395 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8396 gdb_agent_op_rot>: New constants.
8397 (gdb_agent_op_names): Add pick and roll.
8398 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8399 cases.
8400
8401 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8402
8403 * aclocal.m4: Regenerated with aclocal-1.11.1.
8404
8405 2011-02-14 Pedro Alves <pedro@codesourcery.com>
8406
8407 * server.c (handle_qxfer_traceframe_info): New.
8408 (qxfer_packets): Register "traceframe-info".
8409 (handle_query): Report support for qXfer:traceframe-info:read+.
8410 * tracepoint.c (match_blocktype): New.
8411 (traceframe_find_block_type): Rename to ...
8412 (traceframe_walk_blocks): ... this. Add callback filter argument,
8413 and use it.
8414 (traceframe_find_block_type): New, reimplemented on top of
8415 traceframe_walk_blocks.
8416 (build_traceframe_info_xml): New.
8417 (traceframe_read_info): New.
8418 * server.h (traceframe_read_info): Declare.
8419
8420 2011-02-11 Yao Qi <yao@codesourcery.com>
8421
8422 * configure.ac: Call AC_PROG_RANLIB.
8423 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8424 * configure: Regenerate.
8425
8426 2011-02-07 Pedro Alves <pedro@codesourcery.com>
8427
8428 * server.c (gdb_read_memory): Change return semantics to allow
8429 partial transfers.
8430 (handle_search_memory_1): Adjust.
8431 (process_serial_event) <'m' packet>: Handle partial transfers.
8432 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8433
8434 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8435
8436 * regcache.c (init_register_cache): Initialize
8437 regcache->register_status.
8438 (free_register_cache): Release regcache->register_status.
8439 (regcache_cpy): Copy register_status.
8440 (registers_to_string): Print 'x's for unavailable registers.
8441 (supply_register): Mark the register's status valid or
8442 unavailable, depending on whether a buffer was passed in or not.
8443 (supply_register_zeroed): New.
8444 (supply_regblock): Mark the registers' status valid or
8445 unavailable, depending on whether a buffer was passed in or not.
8446 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8447 (struct regcache): New `register_status' field.
8448 (supply_register_zeroed): Declare.
8449 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8450 supply_register_zeroed, rather than passing a NULL buffer to
8451 supply_register.
8452 * tracepoint.c (fetch_traceframe_registers): Update comment.
8453
8454 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8455
8456 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8457 buffer explicit.
8458
8459 2011-01-25 Pedro Alves <pedro@codesourcery.com>
8460
8461 * server.h (decode_xfer_write): Change prototype.
8462 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8463 and don't extract the annex here.
8464 * server.c (decode_xfer_read): Remove `annex' parameter,
8465 and don't extract the annex here.
8466 (decode_xfer): New.
8467 (struct qxfer): New.
8468 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8469 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8470 (handle_qxfer_statictrace): New functions, abstracted out from
8471 handle_query, and made to use the struct qxfer interface.
8472 (handle_threads_qxfer_proper): Rename to ...
8473 (handle_qxfer_threads_proper): ... this.
8474 (handle_threads_qxfer): Rename to ...
8475 (handle_qxfer_threads): ... this. Adjust.
8476 (qxfer_packets): New array.
8477 (handle_qxfer): New function.
8478 (handle_query): Use handle_qxfer.
8479
8480 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8481
8482 * gdbreplay.c: Shorten lines of >= 80 columns.
8483 * linux-low.c: Ditto.
8484 * linux-ppc-low.c: Ditto.
8485 * linux-s390-low.c: Ditto.
8486 * linux-sparc-low.c: Ditto.
8487 * linux-x86-low.c: Ditto.
8488 * linux-xtensa-low.c: Ditto.
8489 * mem-break.c: Ditto.
8490 * nto-low.c: Ditto.
8491 * regcache.h: Ditto.
8492 * remote-utils.c: Ditto.
8493 * server.c: Ditto.
8494 * server.h: Ditto.
8495 * thread-db.c: Ditto.
8496 * tracepoint.c: Ditto.
8497 * utils.c: Ditto.
8498 * win32-low.h: Ditto.
8499
8500 2011-01-05 Joel Brobecker <brobecker@adacore.com>
8501
8502 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8503 update.
8504
8505 2011-01-01 Joel Brobecker <brobecker@adacore.com>
8506
8507 * server.c (gdbserver_version): Update copyright year in version
8508 output.
8509 * gdbreplay.c (gdbreplay_version): Ditto.
8510
8511 2010-12-29 Jie Zhang <jie.zhang@analog.com>
8512
8513 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8514 * linux-bfin-low.c: New file.
8515 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8516 PT_DATA_ADDR for BFIN targets.
8517 * Makefile.in (SFILES): Add linux-bfin-low.c.
8518 (clean): Remove reg-bfin.c.
8519 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8520 * README: Mention supported Blackfin targets.
8521
8522 2010-12-23 Mike Frysinger <vapier@gentoo.org>
8523
8524 * .gitignore: New file.
8525
8526 2010-11-16 Mike Frysinger <vapier@gentoo.org>
8527
8528 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8529
8530 2010-10-22 Jie Zhang <jie@codesourcery.com>
8531
8532 * Makefile.in: Add FLAGS_TO_PASS variable.
8533 (install): Remove dependency of install-only and recursively
8534 invoke make for install-only.
8535
8536 2010-10-04 Doug Evans <dje@google.com>
8537
8538 * Makefile.in (uninstall): Use $(DESTDIR).
8539
8540 2010-09-24 Pedro Alves <pedro@codesourcery.com>
8541
8542 PR gdb/11842
8543
8544 * linux-x86-low.c (compat_siginfo_from_siginfo)
8545 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8546 si_code is < 0. Check for si_code == SI_TIMER before checking for
8547 si_code < 0.
8548
8549 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8550
8551 * lynx-i386-low.c: New file.
8552 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8553
8554 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8555
8556 * lynx-low.c (ptrace_request_to_str): Remove handling for
8557 request values that have been removed in LynxOS 5.x.
8558
8559 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8560
8561 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8562 <ptrace.h>
8563
8564 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8565
8566 * configure.ac: Add --enable-inprocess-agent option.
8567 * configure: Rebuilt.
8568
8569 2010-09-06 Yao Qi <yao@codesourcery.com>
8570
8571 * linux-low.c (linux_kill): Remove unused variable.
8572 (linux_stabilize_threads): Likewise.
8573 * server.c (start_inferior): Likewise.
8574 (queue_stop_reply_callback): Likewise.
8575 * tracepoint.c (do_action_at_tracepoint): Likewise.
8576
8577 2010-09-06 Yao Qi <yao@codesourcery.com>
8578
8579 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8580 on return.
8581
8582 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8583
8584 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8585
8586 2010-09-06 Pedro Alves <pedro@codesourcery.com>
8587
8588 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8589 "$(IPA_DEPFILES)".
8590
8591 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8592
8593 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8594 gdbserver/lynx-ppc-low.c: New files.
8595 * Makefile.in (lynx_low_h): New variable.
8596 (lynx-low.o, lynx-ppc-low.o): New rules.
8597 * configure.ac: On LynxOS, link with -lnetinet.
8598 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8599 * configure: regenerate.
8600
8601 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8602
8603 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8604 * configure.ac: Add check for vasprintf and vsnprintf.
8605 * configure, config.in: Regenerate.
8606 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8607
8608 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8609
8610 * gdbreplay.c: Move include of alloca.h up, next to include of
8611 malloc.h.
8612 * server.h: Add include of malloc.h.
8613 * mem-break.c: Remove include of malloc.h.
8614 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8615
8616 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8617
8618 * Makefile.in (memmem.o): Build with -Wno-error.
8619
8620 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8621
8622 * utils.c (xsnprintf): Make non-static.
8623 * server.h: Add xsnprintf declaration.
8624 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8625 replace calls to snprintf by calls to xsnprintf throughout.
8626
8627 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8628
8629 * configure.ac: Add configure check for alloca.
8630 * configure, config.in: Regenerate.
8631 * server.h: Include alloca.h if it exists.
8632 * gdbreplay.c: Include alloca.h if it exists.
8633
8634 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8635
8636 * linux-low.c (__SIGRTMIN): Define if not already defined.
8637 (linux_create_inferior): Check for __ANDROID__ rather than
8638 __SIGRTMIN.
8639 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8640 are already deferred.
8641 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8642 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8643 stopped and already has a pending signal to report.
8644 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8645 a pending signal to report or is moving out of a jump pad.
8646 (linux_init_signals): Check for __ANDROID__ rather than
8647 __SIGRTMIN.
8648
8649 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8650
8651 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8652 debug_threads check. Avoid a linear search when not doing debug
8653 output.
8654
8655 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8656
8657 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8658 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8659 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8660 (process_event): Change local fd's type to gdb_fildes_t.
8661 (create_file_handler): Adjust prototype.
8662 (delete_file_handler): Adjust prototype.
8663 (handle_file_event): Adjust prototype. Use pfildes.
8664 (create_file_event): Adjsut prototype.
8665 * remote-utils.c (remote_desc, listen_desc): Change type to
8666 gdb_fildes_t.
8667 * server.h: New gdb_fildes_t typedef.
8668 [USE_WIN32API]: Include winsock2.h.
8669 (delete_file_handler, add_file_handler): Adjust prototypes.
8670 (pfildes): Declare.
8671 * utils.c (pfildes): New.
8672
8673 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8674
8675 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8676 * configure: Regenerate.
8677
8678 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8679
8680 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8681 (linux_done_accessing_memory): ... this.
8682 (linux_target_ops): Adjust.
8683 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8684 * nto-low.c (nto_target_ops): Adjust comment.
8685 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8686 * spu-low.c (spu_target_ops): Adjust comment.
8687 * target.h (target_ops): Rename unprepare_to_access_memory field
8688 to done_accessing_memory.
8689 (unprepare_to_access_memory): Rename to ...
8690 (done_accessing_memory): ... this.
8691
8692 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8693
8694 * linux-low.c (linux_prepare_to_access_memory): New.
8695 (linux_unprepare_to_access_memory): New.
8696 (linux_target_ops): Install them.
8697 * server.c (read_memory): Rename to ...
8698 (gdb_read_memory): ... this. Use
8699 prepare_to_access_memory/prepare_to_access_memory.
8700 (write_memory): Rename to ...
8701 (gdb_write_memory): ... this. Use
8702 prepare_to_access_memory/prepare_to_access_memory.
8703 (handle_search_memory_1): Adjust.
8704 (process_serial_event): Adjust.
8705 * target.h (struct target_ops): New fields
8706 prepare_to_access_memory and unprepare_to_access_memory.
8707 (prepare_to_access_memory, unprepare_to_access_memory): New.
8708 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8709 prepare_to_access_memory/prepare_to_access_memory.
8710 * nto-low.c (nto_target_ops): Adjust.
8711 * spu-low.c (spu_target_ops): Adjust.
8712 * win32-low.c (win32_target_ops): Adjust.
8713
8714 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8715
8716 * Makefile.in (WARN_CFLAGS): Get it from configure.
8717 (WERROR_CFLAGS): New.
8718 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8719 * configure.ac: Introduce --enable-werror, which adds -Werror to
8720 the compiler command line. Enabled by default. Disable with
8721 --disable-werror. Add -Wdeclaration-after-statement
8722 Wpointer-arith and -Wformat-nonliteral to warning flags.
8723 * configure: Regenerate.
8724
8725 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8726
8727 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8728
8729 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8730
8731 * gdbreplay.c (remote_error): New.
8732 (gdbchar): New.
8733 (expect): Use gdbchar. Check for error reading from GDB.
8734 Clarify sync error output.
8735 (play): Check for errors writing to GDB.
8736 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8737 * remote-utils.c (getpkt): Check for errors writing to the remote
8738 descriptor.
8739
8740 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8741
8742 * linux-low.c (linux_wait_1): Move non-debugging code out of
8743 `debug_threads' control.
8744
8745 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8746
8747 * linux-low.c (linux_wait_1): Don't set last_status here.
8748 * server.c (push_event, queue_stop_reply_callback): Assert we're
8749 not pushing a TARGET_WAITKIND_IGNORE event.
8750 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8751 (myresume, handle_target_event): Set the thread's last_resume_kind
8752 and last_status from the target returned status.
8753
8754 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8755
8756 PR threads/10729
8757
8758 * linux-x86-low.c (update_debug_registers_callback): New.
8759 (i386_dr_low_set_addr): Use it.
8760 (i386_dr_low_get_addr): New.
8761 (i386_dr_low_set_control): Use update_debug_registers_callback.
8762 (i386_dr_low_get_control): New.
8763 (i386_dr_low_get_status): Adjust.
8764 * linux-low.c (linux_stop_lwp): New.
8765 * linux-low.h (linux_stop_lwp): Declare.
8766
8767 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8768 argument instead of a i386_debug_reg_state.
8769 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8770 a i386_debug_reg_state.
8771 (i386_insert_aligned_watchpoint): Adjust.
8772 (i386_remove_aligned_watchpoint): Adjust.
8773 (i386_low_stopped_data_address): Read the debug registers from the
8774 inferior instead of from the mirrors.
8775 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8776 (i386_dr_low_get_addr): Declare.
8777 (i386_dr_low_get_control): Declare.
8778 (i386_dr_low_get_status): Change prototype.
8779
8780 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8781 (i386_dr_low_get_addr): New.
8782 (i386_dr_low_get_control): New.
8783 (i386_dr_low_get_status): Adjust prototype. Return
8784 dr_status_mirror.
8785 (i386_initial_stuff): Clear dr_status_mirror and
8786 dr_control_mirror.
8787 (i386_get_thread_context): Adjust.
8788 (i386_set_thread_context): Adjust.
8789 (i386_thread_added): Adjust.
8790
8791 2010-08-24 Pedro Alves <pedro@codesourcery.com>
8792
8793 * linux-low.h (linux_thread_area): Delete declaration.
8794
8795 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8796
8797 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8798 after its termination.
8799
8800 2010-08-09 Pedro Alves <pedro@codesourcery.com>
8801
8802 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8803 (gdb_wants_all_stopped): Delete.
8804 (linux_wait_1): Don't call them.
8805 * server.c (handle_v_cont): Tag all threads as want-stopped.
8806 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8807 stopped as "client-wants-stopped".
8808
8809 2010-07-31 Pedro Alves <pedro@codesourcery.com>
8810
8811 * Makefile.in (signals_h): New.
8812 (server_h): Depend on it.
8813 (server.o): Don't depend on $(signals_def).
8814 (signals.o): Depend on $(signals_def).
8815
8816 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8817
8818 * Makefile.in (signals_def): New.
8819 (server_h): Append include/gdb/signals.h and signals_def.
8820 (server.o): Append signals_def.
8821
8822 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8823
8824 * server.c (handle_target_event): Use target_signal_to_host for
8825 resume_info.sig initialization.
8826 * target.h (struct thread_resume) <sig>: New comment.
8827
8828 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8829
8830 * server.c (handle_query): strcpy() the returned string from paddress()
8831 instead of sprintf().
8832 * utils.c (paddress): Return phex_nz().
8833
8834 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8835
8836 * server.c (handle_v_cont): Call mourn_inferior if process
8837 just exited.
8838 (myresume): Likewise.
8839
8840 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8841
8842 Static tracepoints, and integration with UST.
8843
8844 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8845 * mem-break.c (uninsert_all_breakpoints)
8846 (reinsert_all_breakpoints): New.
8847 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8848 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8849 (gdb_agent_ust_loaded, helper_thread_id)
8850 (gdb_agent_helper_thread_id): New macros.
8851 (struct ipa_sym_addresses): Add addr_ust_loaded,
8852 addr_helper_thread_id, addr_cmd_buf.
8853 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8854 (in_process_agent_loaded_ust): New.
8855 (write_e_ust_not_loaded): New.
8856 (maybe_write_ipa_ust_not_loaded): New.
8857 (struct collect_static_trace_data_action): New.
8858 (enum tracepoint_type) <static_tracepoint>: New.
8859 (struct tracepoint) <handle>: Mention static tracepoints.
8860 (struct static_tracepoint_ctx): New.
8861 (CMD_BUF_SIZE): New.
8862 (add_tracepoint_action): Handle static tracepoint actions.
8863 (unprobe_marker_at): New.
8864 (clear_installed_tracepoints): Handle static tracepoints.
8865 (cmd_qtdp): Handle static tracepoints.
8866 (probe_marker_at): New.
8867 (cmd_qtstart): Handle static tracepoints.
8868 (response_tracepoint): Handle static tracepoints.
8869 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8870 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8871 (get_context_regcache): Handle static tracepoints.
8872 (do_action_at_tracepoint): Handle static tracepoint actions.
8873 (traceframe_find_block_type): Handle static trace data blocks.
8874 (traceframe_read_sdata): New.
8875 (download_tracepoints): Download static tracepoint actions.
8876 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8877 (GDB_PROBE_NAME): New.
8878 (ust_ops): New.
8879 (GET_UST_SYM): New.
8880 (USTF): New.
8881 (dlsym_ust): New.
8882 (ust_marker_to_static_tracepoint): New.
8883 (gdb_probe): New.
8884 (collect_ust_data_at_tracepoint): New.
8885 (gdb_ust_probe): New.
8886 (UNIX_PATH_MAX, SOCK_DIR): New.
8887 (gdb_ust_connect_sync_socket): New.
8888 (resume_thread, stop_thread): New.
8889 (run_inferior_command): New.
8890 (init_named_socket): New.
8891 (gdb_ust_socket_init): New.
8892 (cstr_to_hexstr): New.
8893 (next_st): New.
8894 (first_marker, next_marker): New.
8895 (response_ust_marker): New.
8896 (cmd_qtfstm, cmd_qtsstm): New.
8897 (unprobe_marker_at, probe_marker_at): New.
8898 (cmd_qtstmat, gdb_ust_thread): New.
8899 (gdb_ust_init): New.
8900 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8901 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8902 (ST_REGENTRY): New.
8903 (x86_64_st_collect_regmap): New.
8904 (X86_64_NUM_ST_COLLECT_GREGS): New.
8905 (AMD64_RIP_REGNUM): New.
8906 (supply_static_tracepoint_registers): New.
8907 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8908 (ST_REGENTRY): New.
8909 (i386_st_collect_regmap): New.
8910 (i386_NUM_ST_COLLECT_GREGS): New.
8911 (supply_static_tracepoint_registers): New.
8912 * server.c (handle_query): Handle qXfer:statictrace:read.
8913 <qSupported>: Report support for StaticTracepoints, and
8914 qXfer:statictrace:read features.
8915 * server.h (traceframe_read_sdata)
8916 (supply_static_tracepoint_registers): Declare.
8917 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8918 (unpack_varlen_hex): Include in IPA build.
8919 * Makefile.in (ustlibs, ustinc): New.
8920 (IPA_OBJS): Add remote-utils-ipa.o.
8921 ($(IPA_LIB)): Link -ldl and -lpthread.
8922 (UST_CFLAGS): New.
8923 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8924 * config.in, configure: Regenerate.
8925
8926 2010-06-20 Ian Lance Taylor <iant@google.com>
8927 Pedro Alves <pedro@codesourcery.com>
8928
8929 * linux-x86-low.c (always_true): Delete.
8930 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8931 trying to fool the compiler with always_true.
8932
8933 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8934
8935 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8936 conditions in gdbserver.
8937
8938 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8939
8940 * spu-low.c (spu_read_memory): Wrap around local store limit.
8941 (spu_write_memory): Likewise.
8942
8943 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8944
8945 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8946 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8947 LONGEST uses.
8948 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8949 uses.
8950 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8951 uses with LONGEST uses.
8952
8953 2010-06-14 Stan Shebs <stan@codesourcery.com>
8954 Pedro Alves <pedro@codesourcery.com>
8955
8956 Bytecode compiler.
8957
8958 * linux-x86-low.c: Include limits.h.
8959 (add_insns): New.
8960 (always_true): New.
8961 (EMIT_ASM): New.
8962 (EMIT_ASM32): New.
8963 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8964 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8965 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8966 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8967 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8968 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8969 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8970 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8971 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8972 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8973 (amd64_emit_void_call_2): New.
8974 (amd64_emit_ops): New.
8975 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8976 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8977 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8978 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8979 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8980 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8981 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8982 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8983 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8984 (i386_emit_stack_adjust, i386_emit_int_call_1)
8985 (i386_emit_void_call_2): New.
8986 (i386_emit_ops): New.
8987 (x86_emit_ops): New.
8988 (the_low_target): Install x86_emit_ops.
8989 * server.h (struct emit_ops): New.
8990 (get_raw_reg_func_addr): Declare.
8991 (current_insn_ptr, emit_error): Declare.
8992 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8993 (set_trace_state_variable_value): New defines.
8994 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8995 addr_get_trace_state_variable_value and
8996 addr_set_trace_state_variable_value.
8997 (symbol_list): New fields for get_raw_reg,
8998 get_trace_state_variable_value and set_trace_state_variable_value.
8999 (condfn): New typedef.
9000 (struct tracepoint): New field `compiled_cond'.
9001 (do_action_at_tracepoint): Clear compiled_cond.
9002 (get_trace_state_variable_value, set_trace_state_variable_value):
9003 Export in the IPA.
9004 (condition_true_at_tracepoint): If there's a compiled condition,
9005 run that.
9006 (current_insn_ptr, emit_error): New globals.
9007 (struct bytecode_address): New.
9008 (get_raw_reg_func_addr): New.
9009 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9010 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9011 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9012 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9013 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9014 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9015 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9016 (compile_tracepoint_condition, compile_bytecodes): New.
9017 * target.h (emit_ops): Forward declare.
9018 (struct target_ops): New field emit_ops.
9019 (target_emit_ops): New.
9020 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9021 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9022 * linux-low.c (linux_emit_ops): New.
9023 (linux_target_ops): Install it.
9024 * linux-low.h (struct linux_target_ops): New field emit_ops.
9025
9026 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9027
9028 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9029 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9030
9031 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9032 Stan Shebs <stan@codesourcery.com>
9033
9034 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9035 (all): Depend on $(extra_libraries).
9036 (install-only): Install the IPA.
9037 (IPA_OBJS, IPA_LIB): New.
9038 (clean): Remove the IPA lib.
9039 (IPAGENT_CFLAGS): New.
9040 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9041 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9042 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9043 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9044 * configure.ac: Check for atomic builtins support in the compiler.
9045 (IPA_DEPFILES, extra_libraries): Define.
9046 * configure.srv (ipa_obj): Add description.
9047 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9048 (i[34567]86-*-linux*): Set ipa_obj.
9049 (x86_64-*-linux*): Set ipa_obj.
9050 * linux-low.c (stabilizing_threads): New.
9051 (supports_fast_tracepoints): New.
9052 (linux_detach): Stabilize threads before detaching.
9053 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9054 the lwp is either not stabilizing, or is moving out of a jump pad.
9055 (linux_fast_tracepoint_collecting): New.
9056 (maybe_move_out_of_jump_pad): New.
9057 (enqueue_one_deferred_signal): New.
9058 (dequeue_one_deferred_signal): New.
9059 (linux_wait_for_event_1): If moving out of a jump pad, defer
9060 pending signals to later.
9061 (linux_stabilize_threads): New.
9062 (linux_wait_1): Check if threads need moving out of jump pads, and
9063 do it if so.
9064 (stuck_in_jump_pad_callback): New.
9065 (move_out_of_jump_pad_callback): New.
9066 (lwp_running): New.
9067 (linux_resume_one_lwp): Handle moving out of jump pads.
9068 (linux_set_resume_request): Dequeue deferred signals.
9069 (need_step_over_p): Also step over fast tracepoint jumps.
9070 (start_step_over): Also uninsert fast tracepoint jumps.
9071 (finish_step_over): Also reinsert fast tracepoint jumps.
9072 (linux_install_fast_tracepoint_jump): New.
9073 (linux_target_ops): Install linux_stabilize_threads and
9074 linux_install_fast_tracepoint_jump_pad.
9075 * linux-low.h (linux_target_ops) <get_thread_area,
9076 install_fast_tracepoint_jump_pad>: New fields.
9077 (struct lwp_info) <collecting_fast_tracepoint,
9078 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9079 (linux_get_thread_area): Declare.
9080 * linux-x86-low.c (jump_insn): New.
9081 (x86_get_thread_area): New.
9082 (append_insns): New.
9083 (push_opcode): New.
9084 (amd64_install_fast_tracepoint_jump_pad): New.
9085 (i386_install_fast_tracepoint_jump_pad): New.
9086 (x86_install_fast_tracepoint_jump_pad): New.
9087 (the_low_target): Install x86_get_thread_area and
9088 x86_install_fast_tracepoint_jump_pad.
9089 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9090 (struct fast_tracepoint_jump): New.
9091 (fast_tracepoint_jump_insn): New.
9092 (fast_tracepoint_jump_shadow): New.
9093 (find_fast_tracepoint_jump_at): New.
9094 (fast_tracepoint_jump_here): New.
9095 (delete_fast_tracepoint_jump): New.
9096 (set_fast_tracepoint_jump): New.
9097 (uninsert_fast_tracepoint_jumps_at): New.
9098 (reinsert_fast_tracepoint_jumps_at): New.
9099 (set_breakpoint_at): Use write_inferior_memory.
9100 (uninsert_raw_breakpoint): Use write_inferior_memory.
9101 (check_mem_read): Mask out fast tracepoint jumps.
9102 (check_mem_write): Mask out fast tracepoint jumps.
9103 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9104 (set_fast_tracepoint_jump): Declare.
9105 (delete_fast_tracepoint_jump)
9106 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9107 (reinsert_fast_tracepoint_jumps_at): Declare.
9108 * regcache.c: Don't compile many functions when building the
9109 in-process agent library.
9110 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9111 the register buffer in the heap.
9112 (free_register_cache): If the register buffer isn't owned by the
9113 regcache, don't free it.
9114 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9115 pre-existing register caches.
9116 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9117 type.
9118 (convert_ascii_to_int): : Constify `from' parameter type.
9119 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9120 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9121 the needed buffer in-place.
9122 (relocate_instruction): New.
9123 * server.c (handle_query) <qSymbols>: If the target supports
9124 tracepoints, give it a chance of looking up symbols. Report
9125 support for fast tracepoints.
9126 (handle_status): Stabilize threads.
9127 (process_serial_event): Adjust.
9128 * server.h (struct fast_tracepoint_jump): Forward declare.
9129 (struct process_info) <fast_tracepoint_jumps>: New field.
9130 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9131 (decode_X_packet, decode_M_packet): Adjust.
9132 (relocate_instruction): Declare.
9133 (in_process_agent_loaded): Declare.
9134 (tracepoint_look_up_symbols): Declare.
9135 (struct fast_tpoint_collect_status): Declare.
9136 (fast_tracepoint_collecting): Declare.
9137 (force_unlock_trace_buffer): Declare.
9138 (handle_tracepoint_bkpts): Declare.
9139 (initialize_low_tracepoint)
9140 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9141 * target.h (struct target_ops) <stabilize_threads,
9142 install_fast_tracepoint_jump_pad>: New fields.
9143 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9144 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9145 [HAVE_STDINT_H]: Include stdint.h.
9146 (trace_debug_1): Rename to ...
9147 (trace_vdebug): ... this.
9148 (trace_debug): Rename to ...
9149 (trace_debug_1): ... this. Add `level' parameter.
9150 (trace_debug): New.
9151 (ATTR_USED, ATTR_NOINLINE): New.
9152 (IP_AGENT_EXPORT): New.
9153 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9154 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9155 (about_to_request_buffer_space, trace_buffer_is_full)
9156 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9157 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9158 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9159 (traceframe_write_count, traceframes_created)
9160 (trace_state_variables)
9161 New renaming defines.
9162 (struct ipa_sym_addresses): New.
9163 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9164 (symbol_list): New.
9165 (ipa_sym_addrs): New.
9166 (all_tracepoint_symbols_looked_up): New.
9167 (in_process_agent_loaded): New.
9168 (write_e_ipa_not_loaded): New.
9169 (maybe_write_ipa_not_loaded): New.
9170 (tracepoint_look_up_symbols): New.
9171 (debug_threads) [IN_PROCESS_AGENT]: New.
9172 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9173 (UNKNOWN_SIDE_EFFECTS): New.
9174 (stop_tracing): New.
9175 (flush_trace_buffer): New.
9176 (stop_tracing_bkpt): New.
9177 (flush_trace_buffer_bkpt): New.
9178 (read_inferior_integer): New.
9179 (read_inferior_uinteger): New.
9180 (read_inferior_data_pointer): New.
9181 (write_inferior_data_pointer): New.
9182 (write_inferior_integer): New.
9183 (write_inferior_uinteger): New.
9184 (struct collect_static_trace_data_action): Delete.
9185 (enum tracepoint_type): New.
9186 (struct tracepoint) <type>: New field `type'.
9187 <actions_str, step_actions, step_actions_str>: Only include in
9188 GDBserver.
9189 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9190 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9191 (tracepoints): Use IP_AGENT_EXPORT.
9192 (last_tracepoint): Don't include in the IPA.
9193 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9194 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9195 (alloced_trace_state_variables): New.
9196 (trace_state_variables): Use IP_AGENT_EXPORT.
9197 (traceframe_t): Delete unused variable.
9198 (circular_trace_buffer): Don't include in the IPA.
9199 (trace_buffer_start): Delete.
9200 (struct trace_buffer_control): New.
9201 (trace_buffer_free): Delete.
9202 (struct ipa_trace_buffer_control): New.
9203 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9204 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9205 New.
9206 (trace_buffer_ctrl): New.
9207 (TRACE_BUFFER_CTRL_CURR): New.
9208 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9209 Reimplement as macros.
9210 (trace_buffer_wrap): Delete.
9211 (traceframe_write_count, traceframe_read_count)
9212 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9213 (struct tracepoint_hit_ctx) <type>: New field.
9214 (struct fast_tracepoint_ctx): New.
9215 (memory_barrier): New.
9216 (cmpxchg): New.
9217 (record_tracepoint_error): Update atomically in the IPA.
9218 (clear_inferior_trace_buffer): New.
9219 (about_to_request_buffer_space): New.
9220 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9221 updating the same buffer.
9222 (add_tracepoint): Default the tracepoint's type to trap
9223 tracepoint, and orig_size to -1.
9224 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9225 internal variables.
9226 (create_trace_state_variable): New parameter `gdb'. Handle it.
9227 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9228 (cmd_qtdp): Handle fast tracepoints.
9229 (cmd_qtdv): Adjust.
9230 (max_jump_pad_size): New.
9231 (gdb_jump_pad_head): New.
9232 (get_jump_space_head): New.
9233 (claim_jump_space): New.
9234 (sort_tracepoints): New.
9235 (MAX_JUMP_SIZE): New.
9236 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9237 IPA.
9238 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9239 support. Upload fast traceframes, and delete internal IPA
9240 breakpoints.
9241 (stop_tracing_handler): New.
9242 (flush_trace_buffer_handler): New.
9243 (cmd_qtstop): Upload fast tracepoints.
9244 (response_tracepoint): Handle fast tracepoints.
9245 (tracepoint_finished_step): Upload fast traceframes. Set the
9246 tracepoint hit context's tracepoint type.
9247 (handle_tracepoint_bkpts): New.
9248 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9249 type. Add comment about fast tracepoints.
9250 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9251 non-existing action_str field.
9252 (get_context_regcache): Handle fast tracepoints.
9253 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9254 to the regcache.
9255 (fast_tracepoint_from_jump_pad_address): New.
9256 (fast_tracepoint_from_ipa_tpoint_address): New.
9257 (collecting_t): New.
9258 (force_unlock_trace_buffer): New.
9259 (fast_tracepoint_collecting): New.
9260 (collecting): New.
9261 (gdb_collect): New.
9262 (write_inferior_data_ptr): New.
9263 (target_tp_heap): New.
9264 (target_malloc): New.
9265 (download_agent_expr): New.
9266 (UALIGN): New.
9267 (download_tracepoints): New.
9268 (download_trace_state_variables): New.
9269 (upload_fast_traceframes): New.
9270 (IPA_FIRST_TRACEFRAME): New.
9271 (IPA_NEXT_TRACEFRAME_1): New.
9272 (IPA_NEXT_TRACEFRAME): New.
9273 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9274 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9275 (gdb_jump_pad_buffer_end): New.
9276 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9277 (initialize_tracepoint): Adjust.
9278 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9279 buffer. Initialize the low module.
9280 * utils.c (PREFIX, TOOLNAME): New.
9281 (malloc_failure): Use PREFIX.
9282 (error): In the IPA, an error causes an exit.
9283 (fatal, warning): Use PREFIX.
9284 (internal_error): Use TOOLNAME.
9285 (NUMCELLS): Increase to 10.
9286 * configure, config.in: Regenerate.
9287
9288 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9289
9290 * server.c (handle_query) <qSupported>: Do two passes over the
9291 qSupported string to avoid nesting strtok.
9292
9293 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9294
9295 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9296 (CDEPS): New.
9297 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9298 -Wl,--dynamic-list.
9299 * configure: Regenerate.
9300 * proc-service.list: New.
9301
9302 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9303
9304 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9305 New comment.
9306
9307 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9308
9309 * gdbreplay.c (remote_open): Check error return from socket() call by
9310 its equality to -1 not by it being negative.
9311 * remote-utils.c (remote_open): Likewise.
9312
9313 2010-05-23 Pedro Alves <pedro@codesourcery.com>
9314
9315 * config.h: Regenerate.
9316
9317 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9318
9319 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9320 doesn't provide PTRACE_GET_THREAD_AREA.
9321
9322 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9323
9324 * linux-m68k-low.c: Include <asm/ptrace.h>
9325 (ps_get_thread_area): Implement.
9326
9327 2010-05-03 Doug Evans <dje@google.com>
9328
9329 * event-loop.c (struct callback_event): New struct.
9330 (callback_list): New global.
9331 (append_callback_event, delete_callback_event): New functions.
9332 (process_callback): New function.
9333 (start_event_loop): Call it.
9334 * remote-utils.c (NOT_SCHEDULED): Define.
9335 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9336 moved out of readchar.
9337 (readchar): Rewrite. Call reschedule before returning.
9338 (reset_readchar): New function.
9339 (remote_close): Call it.
9340 (process_remaining, reschedule): New functions.
9341 * server.h (callback_handler_func): New typedef.
9342 (append_callback_event, delete_callback_event): Declare.
9343
9344 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9345
9346 * proc-service.c (ps_pglobal_lookup): Use
9347 thread_db_look_up_one_symbol.
9348 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9349 parameter. Use it instead of all_symbols_looked_up.
9350 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9351 field.
9352 (all_symbols_looked_up): Don't declare.
9353 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9354 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9355 field.
9356 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9357 Set all_symbols_looked_up here.
9358 (thread_db_look_up_one_symbol): New.
9359 (thread_db_get_tls_address): Adjust.
9360 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9361 thread_db object on the heap, and tentatively set it in the
9362 process structure.
9363 (thread_db_init): Don't set all_symbols_looked_up here.
9364 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9365
9366 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9367
9368 * linux-low.c (linux_kill, linux_detach): Adjust.
9369 (status_pending_p_callback): Remove redundant statement. Check
9370 for !TARGET_WAITIKIND_IGNORE, instead of
9371 TARGET_WAITKIND_STOPPED.
9372 (handle_tracepoints): Make sure LWP is locked. Adjust.
9373 (linux_wait_for_event_1): Adjust.
9374 (linux_cancel_breakpoints): New.
9375 (unsuspend_one_lwp): New.
9376 (unsuspend_all_lwps): New.
9377 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9378 (send_sigstop_callback): Change return type to int, add new
9379 `except' parameter and handle it.
9380 (suspend_and_send_sigstop_callback): New.
9381 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9382 pass them down. If SUSPEND, also increment the lwp's suspend
9383 count.
9384 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9385 (need_step_over_p): Don't consider suspended LWPs.
9386 (start_step_over): Adjust.
9387 (proceed_one_lwp): Change return type to int, add new `except'
9388 parameter and handle it.
9389 (unsuspend_and_proceed_one_lwp): New.
9390 (proceed_all_lwps): Use find_inferior instead of
9391 for_each_inferior.
9392 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9393 also decrement the suspend count of LWPs. Pass `except' down,
9394 instead of hacking its suspend count.
9395 (linux_pause_all): Add `freeze' parameter. Adjust.
9396 (linux_unpause_all): New.
9397 (linux_target_ops): Install linux_unpause_all.
9398 * server.c (handle_status): Adjust.
9399 * target.h (struct target_ops): New fields `unpause_all' and
9400 `cancel_breakpoints'. Add new parameter to `pause_all'.
9401 (pause_all): Add new `freeze' parameter.
9402 (unpause_all): New.
9403 (cancel_breakpoints): New.
9404 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9405 cancel breakpoints.
9406 (cmd_qtstart): Pause threads.
9407 (stop_tracing): Pause threads, and cancel breakpoints.
9408 * win32-low.c (win32_target_ops): Adjust.
9409
9410 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9411
9412 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9413 the inferior right away from here...
9414 (linux_wait_1): ... to here, and adjust to check the thread's
9415 last_resume_kind instead of the lwp's step or stop_expected flags.
9416
9417 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9418
9419 * README: Use consistent `GDB' and `GDBserver' spellings.
9420
9421 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9422
9423 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9424 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9425 (linux_detach_one_lwp): Assume the lwp is stopped.
9426 (any_thread_of): Delete.
9427 (linux_detach): Stop all lwps here. Don't blindly delete all
9428 breakpoints.
9429 (delete_lwp_callback): New.
9430 (linux_mourn): Delete all lwps of the process that is gone.
9431 (linux_wait_1): Don't delete the last lwp of the process here.
9432 * mem-break.h (mark_breakpoints_out): Declare.
9433 * mem-break.c (mark_breakpoints_out): New.
9434 (free_all_breakpoints): Use it.
9435 * server.c (handle_target_event): If the process is gone, mark
9436 breakpoints out.
9437 * thread-db.c (struct thread_db) <create_bp>: New field.
9438 (thread_db_enable_reporting): Fix prototype. Store a thread event
9439 breakpoint reference in the thread_db struct.
9440 (thread_db_load_search): Clear the thread_db object.
9441 (try_thread_db_load_1): Ditto.
9442 (switch_to_process): New.
9443 (disable_thread_event_reporting): Use it.
9444 (remove_thread_event_breakpoints): New.
9445 (thread_db_detach, thread_db_mourn): Use it.
9446
9447 2010-05-01 Pedro Alves <pedro@codesourcery.com>
9448
9449 * linux-low.c (linux_enable_event_reporting): New.
9450 (linux_wait_for_event_1, handle_extended_wait): Use it.
9451
9452 2010-04-30 Pedro Alves <pedro@codesourcery.com>
9453
9454 * linux-low.c (linux_kill_one_lwp, linux_kill)
9455 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9456 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9457 SIGSTOP even if the LWP is stopped.
9458 (send_sigstop_callback): New.
9459 (stop_all_lwps): Use send_sigstop_callback instead.
9460 (linux_resume_one_thread): Adjust.
9461 (proceed_one_lwp): Still proceed an LWP that the client has
9462 requested to stop, if we haven't reported it as stopped yet. Make
9463 sure that LWPs the client want stopped, have a pending SIGSTOP.
9464
9465 2010-04-26 Doug Evans <dje@google.com>
9466
9467 * server.c (handle_general_set): Make static.
9468
9469 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9470 Print received char after testing for error/eof instead of before.
9471 (input_interrupt): Tweak comment.
9472
9473 2010-04-23 Doug Evans <dje@google.com>
9474
9475 * server.c (start_inferior): Print inferior argv if --debug.
9476
9477 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9478
9479 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9480 * nto-x86-low.c: Include server.h
9481
9482 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9483
9484 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9485 be consistent with other sources of this directory.
9486 (init_registers_amd64): Correct name of source file of this function
9487 in the comment.
9488
9489 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9490
9491 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9492 64-bit executables.
9493
9494 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9495
9496 * win32-i386-low.c: Add 64-bit support.
9497 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9498 (init_registers_amd64): Declare.
9499 (mappings): Add 64-bit version of array.
9500 (init_windows_x86): New function.
9501 (the_low_target): Change init_arch field to init_windows_x86.
9502
9503 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9504
9505 * win32-low.c: Adapt to support also 64-bit architecture.
9506 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9507 (get_image_name): Use SIZE_T type for local variable `done'.
9508 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9509 (toolhelp_get_dll_name): Idem.
9510 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9511 Use uintptr_t typecast to avoid warning.
9512 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9513 (handle_exception): Use phex_nz to avoid warning.
9514 (win32_wait): Remove unused local variable `process'.
9515
9516 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9517
9518 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9519 `amd64-avx.o'.
9520
9521 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9522
9523 * configure.ac: Use `ws2_32' library for srv_mingw.
9524 * configure: Regenerate.
9525 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9526 * remote-utils.c: Likewise.
9527
9528 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9529
9530 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9531 if __x86_64__ is defined.
9532
9533 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9534
9535 * configure: Regenerate.
9536
9537 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9538
9539 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9540 * target.h (target_ops): New get_tib_address field.
9541 * win32-low.h (win32_thread_info): Add thread_local_base field.
9542 * win32-low.c (child_add_thread): Add tlb argument.
9543 Set thread_local_base field to TLB.
9544 (get_child_debug_event): Adapt to child_add_thread change.
9545 (win32_get_tib_address): New function.
9546 (win32_target_ops): Set get_tib_address field to
9547 win32_get_tib_address.
9548 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9549
9550 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9551
9552 * linux-low.c (linux_mourn): Also remove the process.
9553 * server.c (handle_target_event): Don't remove the process here.
9554 * nto-low.c (nto_mourn): New.
9555 (nto_target_ops): Install it.
9556 * spu-low.c (spu_mourn): New.
9557 (spu_target_ops): Install it.
9558 * win32-low.c (win32_mourn): New.
9559 (win32_target_ops): Install it.
9560
9561 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9562
9563 * server.h (buffer_xml_printf): Remove redundant `;'.
9564
9565 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9566
9567 * regcache.c (set_register_cache): Invalidate regcaches before
9568 changing the register cache layout.
9569 (regcache_invalidate_one): Allow a NULL regcache.
9570 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9571 regcaches before changing the register cache layout or the target
9572 regsets.
9573
9574 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9575
9576 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9577 variable warning on Linux/x86-64.
9578
9579 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9580
9581 GDBserver disconnected tracing support.
9582
9583 * linux-low.c (linux_remove_process): Delete.
9584 (add_lwp): Don't set last_resume_kind here.
9585 (linux_kill): Use `mourn'.
9586 (linux_detach): Use `thread_db_detach', and `mourn'.
9587 (linux_mourn): New.
9588 (linux_attach_lwp_1): Adjust comment.
9589 (linux_attach): last_resume_kind moved the thread_info; adjust.
9590 (status_pending_p_callback): Adjust.
9591 (linux_wait_for_event_1): Adjust.
9592 (count_events_callback, select_singlestep_lwp_callback)
9593 (select_event_lwp_callback, cancel_breakpoints_callback)
9594 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9595 (proceed_one_lwp): Adjust.
9596 (linux_async): Add debug output.
9597 (linux_thread_stopped): New.
9598 (linux_pause_all): New.
9599 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9600 linux_pause_all.
9601 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9602 (thread_db_free): Delete declaration.
9603 (thread_db_detach, thread_db_mourn): Declare.
9604 * thread-db.c (thread_db_init): Use thread_db_mourn.
9605 (thread_db_free): Delete, split in two.
9606 (disable_thread_event_reporting): New.
9607 (thread_db_detach): New.
9608 (thread_db_mourn): New.
9609
9610 * server.h (struct thread_info) <last_resume_kind>: New field.
9611 <attached>: Add comment.
9612 <gdb_detached>: New field.
9613 (handler_func): Change return type to int.
9614 (handle_serial_event, handle_target_event): Ditto.
9615 (gdb_connected): Declare.
9616 (tracing): Delete.
9617 (disconnected_tracing): Declare.
9618 (stop_tracing): Declare.
9619
9620 * server.c (handle_query) <qSupported>: Report support for
9621 disconnected tracing.
9622 (queue_stop_reply_callback): Account for running threads.
9623 (gdb_wants_thread_stopped): New.
9624 (gdb_wants_all_threads_stopped): New.
9625 (gdb_reattached_process): New.
9626 (handle_status): Clear the `gdb_detached' flag of all processes.
9627 In all-stop, stop all threads.
9628 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9629 (process_serial_event): If the remote connection breaks, or if an
9630 exit was forced with "monitor exit", force an event loop exit.
9631 Handle disconnected tracing on detach.
9632 (handle_serial_event): Adjust.
9633 (handle_target_event): If GDB isn't connected, forward events back
9634 to the inferior, unless the last process exited, in which case,
9635 exit gdbserver. Adjust interface.
9636
9637 * remote-utils.c (remote_open): Don't block in accept. Instead
9638 register an event loop source on the listen socket file
9639 descriptor. Refactor bits into ...
9640 (listen_desc): ... this new global.
9641 (gdb_connected): ... this new function.
9642 (enable_async_notification): ... this new function.
9643 (handle_accept_event): ... this new function.
9644 (remote_close): Clear remote_desc.
9645
9646 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9647
9648 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9649 New fields.
9650 (mourn_inferior): Define.
9651 (target_process_qsupported): Avoid the dangling else problem.
9652 (thread_stopped): Define.
9653 (pause_all): Define.
9654 (target_waitstatus_to_string): Declare.
9655 * target.c (target_waitstatus_to_string): New.
9656
9657 * tracepoint.c (tracing): Make extern.
9658 (disconnected_tracing): New.
9659 (stop_tracing): Make extern. Handle tracing stops due to GDB
9660 disconnecting.
9661 (cmd_qtdisconnected): New.
9662 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9663 (handle_tracepoint_general_set): Handle QTDisconnected.
9664
9665 * event-loop.c (event_handler_func): Change return type to int.
9666 (process_event): Bail out if the event handler wants the event
9667 loop to stop.
9668 (handle_file_event): Ditto.
9669 (start_event_loop): Bail out if the event handler wants the event
9670 loop to stop.
9671
9672 * nto-low.c (nto_target_ops): Adjust.
9673 * spu-low.c (spu_wait): Don't remove the process here.
9674 (spu_target_ops): Adjust.
9675 * win32-low.c (win32_wait): Don't remove the process here.
9676 (win32_target_ops): Adjust.
9677
9678 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9679
9680 * regcache.c (realloc_register_cache): Invalidate inferior's
9681 regcache before recreating it.
9682
9683 2010-04-09 Pedro Alves <pedro@codesourcery.com>
9684
9685 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9686
9687 2010-04-09 Stan Shebs <stan@codesourcery.com>
9688 Pedro Alves <pedro@codesourcery.com>
9689
9690 * server.h (LONGEST): New.
9691 (struct thread_info) <while_stepping>: New field.
9692 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9693 Declare.
9694 (initialize_tracepoint, handle_tracepoint_general_set)
9695 (handle_tracepoint_query, tracepoint_finished_step)
9696 (tracepoint_was_hit, release_while_stepping_state_list):
9697 (current_traceframe): Declare.
9698 * server.c (handle_general_set): Handle tracepoint packets.
9699 (read_memory): New.
9700 (write_memory): New.
9701 (handle_search_memory_1): Use read_memory.
9702 (handle_query): Report support for conditional tracepoints, trace
9703 state variables, and tracepoint sources. Handle tracepoint
9704 queries.
9705 (main): Initialize the tracepoints module.
9706 (process_serial_event): Handle traceframe reads/writes.
9707
9708 * linux-low.c (handle_tracepoints): New.
9709 (linux_wait_1): Call it.
9710 (linux_resume_one_lwp): Handle while-stepping.
9711 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9712 (linux_target_ops): Install them.
9713 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9714 New field.
9715 * linux-x86-low.c (x86_supports_tracepoints): New.
9716 (the_low_target). Install it.
9717
9718 * mem-break.h (delete_breakpoint): Declare.
9719 * mem-break.c (delete_breakpoint): Make external.
9720
9721 * target.h (struct target_ops): Add `supports_tracepoints',
9722 `read_pc', and `write_pc' fields.
9723 (target_supports_tracepoints): Define.
9724 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9725 (phex_nz): New.
9726
9727 * regcache.h (struct regcache) <registers_owned>: New field.
9728 (init_register_cache, regcache_cpy): Declare.
9729 (regcache_read_pc, regcache_write_pc): Declare.
9730 (register_cache_size): Declare.
9731 (supply_regblock): Declare.
9732 * regcache.c (init_register_cache): New.
9733 (new_register_cache): Use it.
9734 (regcache_cpy): New.
9735 (register_cache_size): New.
9736 (supply_regblock): New.
9737 (regcache_read_pc, regcache_write_pc): New.
9738
9739 * tracepoint.c: New.
9740
9741 * Makefile.in (OBS): Add tracepoint.o.
9742 (tracepoint.o): New rule.
9743
9744 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9745
9746 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9747 (i386-mmx.o): New.
9748 (i386-mmx.c): Likewise.
9749 (i386-mmx-linux.o): Likewise.
9750 (i386-mmx-linux.c): Likewise.
9751
9752 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9753 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9754 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9755 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9756
9757 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9758 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9759 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9760
9761 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9762
9763 * Makefile.in (clean): Updated.
9764 (i386-avx.o): New.
9765 (i386-avx.c): Likewise.
9766 (i386-avx-linux.o): Likewise.
9767 (i386-avx-linux.c): Likewise.
9768 (amd64-avx.o): Likewise.
9769 (amd64-avx.c): Likewise.
9770 (amd64-avx-linux.o): Likewise.
9771 (amd64-avx-linux.c): Likewise.
9772
9773 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9774 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9775 (srv_amd64_regobj): Add amd64-avx.o.
9776 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9777 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9778 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9779 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9780 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9781 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9782 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9783
9784 * i387-fp.c: Include "i386-xstate.h".
9785 (i387_xsave): New.
9786 (i387_cache_to_xsave): Likewise.
9787 (i387_xsave_to_cache): Likewise.
9788 (x86_xcr0): Likewise.
9789
9790 * i387-fp.h (i387_cache_to_xsave): Likewise.
9791 (i387_xsave_to_cache): Likewise.
9792 (x86_xcr0): Likewise.
9793
9794 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9795 * linux-crisv32-low.c (target_regsets): Likewise.
9796 * linux-m68k-low.c (target_regsets): Likewise.
9797 * linux-mips-low.c (target_regsets): Likewise.
9798 * linux-ppc-low.c (target_regsets): Likewise.
9799 * linux-s390-low.c (target_regsets): Likewise.
9800 * linux-sh-low.c (target_regsets): Likewise.
9801 * linux-sparc-low.c (target_regsets): Likewise.
9802 * linux-xtensa-low.c (target_regsets): Likewise.
9803
9804 * linux-low.c: Include <sys/uio.h>.
9805 (regsets_fetch_inferior_registers): Support nt_type.
9806 (regsets_store_inferior_registers): Likewise.
9807 (linux_process_qsupported): New.
9808 (linux_target_ops): Add linux_process_qsupported.
9809
9810 * linux-low.h (regset_info): Add nt_type.
9811 (linux_target_ops): Add process_qsupported.
9812
9813 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9814 and <sys/uio.h>.
9815 (init_registers_i386_avx_linux): New.
9816 (init_registers_amd64_avx_linux): Likewise.
9817 (xmltarget_i386_linux_no_xml): Likewise.
9818 (xmltarget_amd64_linux_no_xml): Likewise.
9819 (PTRACE_GETREGSET): Likewise.
9820 (PTRACE_SETREGSET): Likewise.
9821 (x86_fill_xstateregset): Likewise.
9822 (x86_store_xstateregset): Likewise.
9823 (use_xml): Likewise.
9824 (x86_linux_update_xmltarget): Likewise.
9825 (x86_linux_process_qsupported): Likewise.
9826 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9827 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9828 init_registers_i386_linux here. Call
9829 x86_linux_update_xmltarget.
9830 (the_low_target): Add x86_linux_process_qsupported.
9831
9832 * server.c (handle_query): Call target_process_qsupported.
9833
9834 * target.h (target_ops): Add process_qsupported.
9835 (target_process_qsupported): New.
9836
9837 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9838
9839 * inferiors.c (add_thread): Set last_status kind to
9840 TARGET_WAITKIND_IGNORE.
9841 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9842 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9843 (linux_wait_1): Move `thread' local definition to block that uses
9844 it. Don't NULL initialize `event_child'.
9845 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9846 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9847 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9848
9849 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9850
9851 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9852 an extended waitstatus, or by a watchpoint.
9853 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9854 thread was stepping or has been stopped by a watchpoint.
9855
9856 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9857
9858 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9859 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9860 of another, then delete the previous, and validate all
9861 breakpoints.
9862 (validate_inserted_breakpoint): New.
9863 (delete_disabled_breakpoints): New.
9864 (validate_breakpoints): New.
9865 (check_mem_read): Validate breakpoints before trusting their
9866 shadow. Delete disabled breakpoints.
9867 (check_mem_write): Validate breakpoints before trusting they
9868 should be inserted. Delete disabled breakpoints.
9869 * mem-break.h (validate_breakpoints):
9870 * server.c (handle_query): Validate breakpoints when we see a
9871 qSymbol query.
9872
9873 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9874
9875 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9876 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9877 if we could tell there's a GDB breakpoint at stop_pc.
9878 (need_step_over_p): Don't do a step over if we find a GDB
9879 breakpoint at the resume PC.
9880
9881 * mem-break.c (struct raw_breakpoint): New.
9882 (enum bkpt_type): New type `gdb_breakpoint'.
9883 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9884 fields. New field `raw'.
9885 (find_raw_breakpoint_at): New.
9886 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9887 breakpoint instead.
9888 (set_breakpoint_at): Adjust.
9889 (delete_raw_breakpoint): New.
9890 (release_breakpoint): New.
9891 (delete_breakpoint): Rename to...
9892 (delete_breakpoint_1): ... this. Add proc parameter. Use
9893 release_breakpoint. Return ENOENT.
9894 (delete_breakpoint): Reimplement.
9895 (find_breakpoint_at): Delete.
9896 (find_gdb_breakpoint_at): New.
9897 (delete_breakpoint_at): Delete.
9898 (set_gdb_breakpoint_at): New.
9899 (delete_gdb_breakpoint_at): New.
9900 (gdb_breakpoint_here): New.
9901 (set_reinsert_breakpoint): Use release_breakpoint.
9902 (uninsert_breakpoint): Rename to ...
9903 (uninsert_raw_breakpoint): ... this.
9904 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9905 (reinsert_raw_breakpoint): Change parameter type to
9906 raw_breakpoint.
9907 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9908 instead.
9909 (check_breakpoints): Adjust. Use release_breakpoint.
9910 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9911 (breakpoint_inserted_here): Ditto.
9912 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9913 Don't trust the breakpoint's shadow if it is not inserted.
9914 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9915 (delete_all_breakpoints): Adjust.
9916 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9917 use delete_breakpoint_1.
9918
9919 * mem-break.h (breakpoints_supported): Delete declaration.
9920 (set_gdb_breakpoint_at): Declare.
9921 (gdb_breakpoint_here): Declare.
9922 (delete_breakpoint_at): Delete.
9923 (delete_gdb_breakpoint_at): Declare.
9924
9925 * server.h (struct raw_breakpoint): Forward declare.
9926 (struct process_info): New field `raw_breakpoints'.
9927
9928 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9929 breakpoints.
9930
9931 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9932
9933 * linux-low.c (status_pending_p_callback): Fix comment.
9934 (linux_wait_for_event_1): Move most of the internal breakpoint
9935 handling from here...
9936 (linux_wait_1): ... to here.
9937 (count_events_callback): New.
9938 (select_singlestep_lwp_callback): New.
9939 (select_event_lwp_callback): New.
9940 (cancel_breakpoints_callback): New.
9941 (select_event_lwp): New.
9942 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9943 priority to all LWPs that have had events that should be reported
9944 to the client. Cancel breakpoints when about to reporting the
9945 event to the client, not while stopping lwps. No longer cancel
9946 finished single-steps here.
9947 (cancel_finished_single_step): Delete.
9948 (cancel_finished_single_steps): Delete.
9949
9950 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9951
9952 * mem-break.c (enum bkpt_type): New.
9953 (struct breakpoint): New field `type'.
9954 (set_breakpoint_at): Change return type to struct breakpoint
9955 pointer. Set type to `other_breakpoint' by default.
9956 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9957 in the breakpoint list.
9958 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9959 (reinsert_breakpoint): Rename to ...
9960 (reinsert_raw_breakpoint): ... this.
9961 (reinsert_breakpoints_at): Adjust.
9962 * mem-break.h (struct breakpoint): Declare.
9963 (set_breakpoint_at): Change return type to struct breakpoint
9964 pointer.
9965
9966 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9967
9968 * server.c (handle_query): Assign, not compare.
9969
9970 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9971
9972 Teach linux gdbserver to step-over-breakpoints.
9973
9974 * linux-low.c (can_hardware_single_step): New.
9975 (supports_breakpoints): New.
9976 (handle_extended_wait): If stopping threads, read the stop pc of
9977 the new cloned LWP.
9978 (get_pc): New.
9979 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9980 low target doesn't support retrieving the PC.
9981 (add_lwp): Set last_resume_kind to resume_continue.
9982 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9983 (linux_attach): Don't clear stop_expected. Set the lwp's
9984 last_resume_kind to resume_stop.
9985 (linux_detach_one_lwp): Don't check for removed breakpoints.
9986 (check_removed_breakpoint): Delete.
9987 (status_pending_p): Rename to ...
9988 (status_pending_p_callback): ... this. Don't check for removed
9989 breakpoints. Don't consider threads that are stopped from GDB's
9990 perspective.
9991 (linux_wait_for_lwp): Always read the stop_pc here.
9992 (cancel_breakpoint): New.
9993 (step_over_bkpt): New global.
9994 (linux_wait_for_event_1): Implement stepping over breakpoints.
9995 (gdb_wants_lwp_stopped): New.
9996 (gdb_wants_all_stopped): New.
9997 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9998 single-step traps here. Store the thread's last reported target
9999 wait status.
10000 (send_sigstop): Don't clear stop_expected. Always set it,
10001 instead.
10002 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10003 (cancel_finished_single_step): New.
10004 (cancel_finished_single_steps): New.
10005 (wait_for_sigstop): Don't cancel finished single-step traps here.
10006 (linux_resume_one_lwp): Don't check for removed breakpoints.
10007 Don't set `step' on non-hardware step archs.
10008 (linux_set_resume_request): Ignore resume_stop requests if already
10009 stopping or stopped. Set the lwp's last_resume_kind.
10010 (resume_status_pending_p): Don't check for removed breakpoints.
10011 (need_step_over_p): New.
10012 (start_step_over): New.
10013 (finish_step_over): New.
10014 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10015 requests. Clear the thread's last reported target waitstatus.
10016 Don't use the `suspended' flag. Don't consider pending breakpoints.
10017 (linux_resume): Start a step-over if necessary.
10018 (proceed_one_lwp): New.
10019 (proceed_all_lwps): New.
10020 (unstop_all_lwps): New.
10021 * linux-low.h (struct lwp_info): Rewrite comment for the
10022 `suspended' flag. Add the `stop_pc' field. Delete the
10023 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10024 Add `'last_resume_kind' and `need_step_over' fields.
10025 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10026 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10027 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10028 (set_raw_breakpoint_at): New.
10029 (set_breakpoint_at): Rewrite to use it.
10030 (reinsert_breakpoint_handler): Delete.
10031 (set_reinsert_breakpoint): New.
10032 (reinsert_breakpoint_by_bp): Delete.
10033 (delete_reinsert_breakpoints): New.
10034 (uninsert_breakpoint): Rewrite.
10035 (uninsert_breakpoints_at): New.
10036 (reinsert_breakpoint): Rewrite.
10037 (reinsert_breakpoints_at): New.
10038 (check_breakpoints): Rewrite.
10039 (breakpoint_here): New.
10040 (breakpoint_inserted_here): New.
10041 (check_mem_read): Adjust.
10042 * mem-break.h (breakpoints_supported, breakpoint_here)
10043 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10044 (reinsert_breakpoint_by_bp): Delete declaration.
10045 (delete_reinsert_breakpoints): Declare.
10046 (reinsert_breakpoint): Delete declaration.
10047 (reinsert_breakpoints_at): Declare.
10048 (uninsert_breakpoint): Delete declaration.
10049 (uninsert_breakpoints_at): Declare.
10050 (check_breakpoints): Adjust prototype.
10051 * server.h: Adjust include order.
10052 (struct thread_info): Declare here. Add a `last_status' field.
10053
10054 2010-03-23 Michael Snyder <msnyder@vmware.com>
10055
10056 * server.c (crc32): New function.
10057 (handle_query): Add handling for 'qCRC:' request.
10058
10059 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10060
10061 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10062 lwp had been stopped by a watchpoint.
10063
10064 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10065
10066 * server.h (internal_error): Declare.
10067 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10068 * utils.c (internal_error): New function.
10069
10070 2010-03-15 Andreas Schwab <schwab@redhat.com>
10071
10072 * configure.srv: Fix typo setting srv_regobj.
10073
10074 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10075
10076 * linux-low.c (fetch_register): Avoid passing a non string literal
10077 format to `error'.
10078 (usr_store_inferior_registers): Ditto.
10079
10080 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10081
10082 * linux-low.c (linux_write_memory): Bail out early if peeking
10083 memory failed.
10084
10085 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10086
10087 * linux-low.h (struct lwp_info): New fields
10088 `stopped_by_watchpoint' and `stopped_data_address'.
10089 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10090 here, and cache them in the lwp object.
10091 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10092 directly.
10093 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10094 field.
10095 (linux_stopped_by_watchpoint): Rewrite.
10096 (linux_stopped_data_address): Rewrite.
10097
10098 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10099
10100 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10101 switching the current inferior, not before.
10102
10103 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10104
10105 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10106 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10107 i386-linux.c and amd64-linux.c.
10108 (reg-i386.o): Removed.
10109 (reg-i386.c): Likewise.
10110 (reg-i386-linux.o): Likewise.
10111 (reg-i386-linux.c): Likewise.
10112 (reg-x86-64.o): Likewise.
10113 (reg-x86-64.c): Likewise.
10114 (reg-x86-64-linux.o): Likewise.
10115 (reg-x86-64-linux.c): Likewise.
10116 (i386.o): New.
10117 (i386.c): Likewise.
10118 (i386-linux.o): Likewise.
10119 (i386-linux.c): Likewise.
10120 (amd64.o): Likewise.
10121 (amd64.c): Likewise.
10122 (amd64-linux.o): Likewise.
10123 (amd64-linux.c): Likewise.
10124
10125 * configure.srv (srv_i386_regobj): New.
10126 (srv_i386_linux_regobj): Likewise.
10127 (srv_amd64_regobj): Likewise.
10128 (srv_amd64_linux_regobj): Likewise.
10129 (srv_i386_32bit_xmlfiles): Likewise.
10130 (srv_i386_64bit_xmlfiles): Likewise.
10131 (srv_i386_xmlfiles): Likewise.
10132 (srv_amd64_xmlfiles): Likewise.
10133 (srv_i386_linux_xmlfiles): Likewise.
10134 (srv_amd64_linux_xmlfiles): Likewise.
10135 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10136 srv_xmlfiles to $srv_i386_xmlfiles.
10137 (i[34567]86-*-mingw32ce*): Likewise.
10138 (i[34567]86-*-mingw*): Likewise.
10139 (i[34567]86-*-nto*): Likewise.
10140 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10141 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10142 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10143 (x86_64-*-linux*): Likewise.
10144
10145 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10146 (init_registers_amd64_linux): New.
10147 (x86_arch_setup): Replace init_registers_x86_64_linux with
10148 init_registers_amd64_linux.
10149
10150 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10151
10152 * configure.ac: Check for libdl. If it is not available link against
10153 static libthread_db.
10154 * configure: Regenerate.
10155
10156 2010-02-22 Pedro Alves <pedro@codesourcery.com>
10157
10158 PR9605
10159
10160 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10161 handing a read watchpoint.
10162 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10163
10164 2010-02-12 Doug Evans <dje@google.com>
10165
10166 * linux-low.c (linux_supports_tracefork_flag): Document.
10167 (linux_look_up_symbols): Add comment.
10168
10169 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10170
10171 * regcache.c (supply_register): Clear regcache if buf is NULL.
10172
10173 2010-02-02 Nicolas Roche <roche@sourceware.org>
10174 Joel Brobecker <brobecker@adacore.com>
10175
10176 * inferiors.c (find_inferior): Add function documentation.
10177 (unloaded_dll): Handle the case where the unloaded dll has not
10178 been previously registered in the dll list.
10179
10180 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10181
10182 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10183 (thumb2_breakpoint): New.
10184 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10185
10186 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10187
10188 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10189 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10190 breakpoints.
10191
10192 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10193
10194 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10195
10196 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10197
10198 * linux-s390-low.c (s390_collect_ptrace_register)
10199 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10200
10201 2010-01-21 Doug Evans <dje@google.com>
10202
10203 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10204 (PTRACE_ARG4_TYPE): New macro.
10205 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10206 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10207 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10208 (usr_store_inferior_registers): Ditto.
10209 (linux_read_memory, linux_write_memory): Ditto.
10210 (linux_test_for_tracefork): Ditto.
10211
10212 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10213 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10214
10215 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10216
10217 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10218 target.
10219
10220 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10221
10222 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10223 prototype to take a regcache. Adjust.
10224
10225 2010-01-20 Pedro Alves <pedro@codesourcery.com>
10226
10227 * regcache.h (struct thread_info): Forward declare.
10228 (struct regcache): New.
10229 (new_register_cache): Adjust prototype.
10230 (get_thread_regcache): Declare.
10231 (free_register_cache): Adjust prototype.
10232 (registers_to_string, registers_from_string): Ditto.
10233 (supply_register, supply_register_by_name, collect_register)
10234 (collect_register_as_string, collect_register_by_name): Ditto.
10235 * regcache.c (struct inferior_regcache_data): Delete.
10236 (get_regcache): Rename to ...
10237 (get_thread_regcache): ... this. Adjust. Switch inferior before
10238 fetching registers.
10239 (regcache_invalidate_one): Adjust.
10240 (regcache_invalidate): Fix prototype.
10241 (new_register_cache): Return the new register cache.
10242 (free_register_cache): Change prototype.
10243 (realloc_register_cache): Adjust.
10244 (registers_to_string): Change prototype to take a regcache. Adjust.
10245 (registers_from_string): Ditto.
10246 (register_data): Ditto.
10247 (supply_register): Ditto.
10248 (supply_register_by_name): Ditto.
10249 (collect_register): Ditto.
10250 (collect_register_as_string): Ditto.
10251 (collect_register_by_name): Ditto.
10252 * server.c (process_serial_event): Adjust.
10253 * linux-low.h (regset_fill_func, regset_store_func): Change
10254 prototype.
10255 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10256 Change prototype.
10257 * linux-low.c (get_stop_pc): Adjust.
10258 (check_removed_breakpoint): Adjust.
10259 (linux_wait_for_event): Adjust.
10260 (linux_resume_one_lwp): Adjust.
10261 (fetch_register): Add regcache parameter. Adjust.
10262 (usr_store_inferior_registers): Ditto.
10263 (regsets_fetch_inferior_registers): Ditto.
10264 (regsets_store_inferior_registers): Ditto.
10265 (linux_fetch_registers, linux_store_registers): Ditto.
10266 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10267 regcache. Adjust.
10268 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10269 Ditto.
10270 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10271 prototype to take a regcache.
10272 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10273 * remote-utils.c (convert_ascii_to_int, outreg)
10274 (prepare_resume_reply): Change prototype to take a regcache.
10275 Adjust.
10276 * target.h (struct target_ops) <fetch_registers, store_registers>:
10277 Change prototype to take a regcache.
10278 (fetch_inferior_registers, store_inferior_registers): Change
10279 prototype to take a regcache. Adjust.
10280 * proc-service.c (ps_lgetregs): Adjust.
10281 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10282 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10283 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10284 take a regcache. Adjust.
10285 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10286 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10287 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10288 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10289 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10290 (cris_cannot_fetch_register):
10291 (cris_breakpoint_at): Change prototype to take a regcache.
10292 Adjust.
10293 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10294 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10295 to take a regcache. Adjust.
10296 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10297 Adjust.
10298 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10299 take a regcache. Adjust.
10300 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10301 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10302 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10303 * linux-mips-low.c (mips_get_pc):
10304 (mips_set_pc): Change prototype to take a regcache. Adjust.
10305 (mips_reinsert_addr): Adjust.
10306 (mips_collect_register): Change prototype to take a regcache.
10307 Adjust.
10308 (mips_supply_register):
10309 (mips_collect_register_32bit, mips_supply_register_32bit)
10310 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10311 (mips_store_fpregset): Ditto.
10312 * linux-ppc-low.c (ppc_supply_ptrace_register)
10313 (ppc_supply_ptrace_register): Ditto.
10314 (parse_spufs_run): Adjust.
10315 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10316 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10317 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10318 take a regcache. Adjust.
10319 * linux-s390-low.c (s390_collect_ptrace_register)
10320 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10321 (s390_set_pc): Change prototype to take a regcache. Adjust.
10322 (s390_arch_setup): Adjust.
10323 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10324 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10325 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10326 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10327 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10328 regcache. Adjust.
10329 (sparc_breakpoint_at): Adjust.
10330 * linux-xtensa-low.c (xtensa_fill_gregset):
10331 (xtensa_store_gregset):
10332 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10333 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10334 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10335 prototype to take a regcache. Adjust.
10336 * win32-arm-low.c (arm_fetch_inferior_register)
10337 (arm_store_inferior_register): Change prototype to take a
10338 regcache. Adjust.
10339 * win32-i386-low.c (i386_fetch_inferior_register)
10340 (i386_store_inferior_register): Change prototype to take a
10341 regcache. Adjust.
10342 * win32-low.c (child_fetch_inferior_registers)
10343 (child_store_inferior_registers): Change prototype to take a
10344 regcache. Adjust.
10345 (win32_wait): Adjust.
10346 (win32_fetch_inferior_registers): Change prototype to take a
10347 regcache. Adjust.
10348 (win32_store_inferior_registers): Adjust.
10349 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10350 store_inferior_register>: Change prototype to take a regcache.
10351
10352 2010-01-20 Doug Evans <dje@google.com>
10353
10354 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10355 #ifdef.
10356 (linux_wait_for_event1, linux_init_signals): Ditto.
10357 (W_STOPCODE): Provide definition if missing.
10358
10359 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10360
10361 * linux-low.c (linux_core_of_thread): New.
10362 (compare_ints, show_process, list_threads): New.
10363 (linux_qxfer_osdata): Report threads and cores.
10364 (linux_target_op): Register linux_core_of_thread.
10365 * remote-utils.c (prepare_resume_reply): Report the core.
10366 (buffer_xml_printf): Support %d specifier.
10367 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10368 New.
10369 (handle_query): Handle qXfer:threads. Announce availability
10370 thereof.
10371 * target.h (struct target_ops): New field core_of_thread.
10372
10373 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10374
10375 * Makefile.in (clean): Remove new generated files.
10376 (reg-s390.o, reg-s390.c): Remove rules.
10377 (reg-s390x.o, reg-s390x.c): Likewise.
10378 (s390-linux32.o, s390-linux32.c): Add rules.
10379 (s390-linux64.o, s390-linux64.c): Likewise.
10380 (s390x-linux64.o, s390x-linux64.c): Likewise.
10381 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10382 * linux-s390-low.c: Include <elf.h>.
10383 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10384 (init_registers_s390): Remove prototype.
10385 (init_registers_s390x): Likewise.
10386 (init_registers_s390_linux32): Add prototype.
10387 (init_registers_s390_linux64): Likewise.
10388 (init_registers_s390x_linux64): Likewise.
10389 (s390_num_regs_3264): New define.
10390 (s390_regmap_3264): New global variable.
10391 (s390_cannot_fetch_register): Remove obsolete check.
10392 (s390_cannot_store_register): Likewise.
10393 (s390_collect_ptrace_register): Handle upper/lower register halves.
10394 (s390_supply_ptrace_register): Likewise.
10395 (s390_fill_gregset): Update to register number changes.
10396 (s390_get_hwcap): New routine.
10397 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10398 Install appropriate regmap and register set.
10399
10400 2010-01-01 Joel Brobecker <brobecker@adacore.com>
10401
10402 * server.c (gdbserver_version): Update copyright year to 2010.
10403 * gdbreplay.c (gdbreplay_version): Likewise.
10404
10405 2009-12-28 Doug Evans <dje@google.com>
10406
10407 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10408 elf/external.h. Include <elf.h> instead but only if necessary.
10409
10410 2009-12-28 Pedro Alves <pedro@codesourcery.com>
10411
10412 * linux-low.c (linux_remove_process): Remove `detaching'
10413 parameter. Don't release/detach from thread_db here.
10414 (linux_kill): Release/detach from thread_db here, ...
10415 (linux_detach): ... and here, before actually detaching.
10416 (linux_wait_1): ... and here, when a process exits.
10417 * thread-db.c (any_thread_of): New.
10418 (thread_db_free): Switch the current inferior to a thread of the
10419 passed in process.
10420
10421 2009-12-21 Doug Evans <dje@google.com>
10422
10423 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10424
10425 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10426 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10427 warning ifndef __NR_tkill. Move setting of errno there too.
10428 Delete unnecessary resetting of errno after syscall.
10429 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10430
10431 * configure.ac: Check for dladdr.
10432 * config.in: Regenerate.
10433 * configure: Regenerate.
10434 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10435 (try_thread_db_load): Update.
10436
10437 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10438
10439 2009-12-18 Doug Evans <dje@google.com>
10440
10441 * event-loop.c: Include unistd.h if it exists.
10442
10443 * linux-low.c (my_waitpid): Move definition away from being in
10444 between linux_tracefork_child/linux_test_for_tracefork.
10445
10446 * gdb_proc_service.h (psaddr_t): Fix type.
10447 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10448 signature to match glibc.
10449
10450 2009-12-16 Doug Evans <dje@google.com>
10451
10452 * linux-low.c (linux_read_memory): Fix argument to read.
10453
10454 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10455
10456 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10457 events, don't leave current_inferior pointing at null.
10458
10459 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10460
10461 * win32-low.c (LOG): Delete.
10462 (OUTMSG): Output to stderr.
10463 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10464 on compile time LOG macro.
10465 (win32_wait): Fix debug output.
10466
10467 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10468
10469 * win32-low.c (win32_add_one_solib): If the dll name is
10470 "ntdll.dll", prepend the system directory to the dll path.
10471
10472 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10473
10474 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10475
10476 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
10477 Vladimir Prus <vladimir@codesourcery.com>
10478
10479 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10480 * configure.ac: Check for __mcoldfire__ and set
10481 gdb_cv_m68k_is_coldfire.
10482 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10483 reg-cf.o and reg-m68k.o.
10484 * configure: Regenerated.
10485
10486 2009-11-16 Pedro Alves <pedro@codesourcery.com>
10487
10488 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10489 Pass it to thread_db_free.
10490 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10491 proper `detaching' argument to linux_remove_process.
10492 * linux-low.h (thread_db_free): Add `detaching' parameter.
10493 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10494 to thread_db_free.
10495 (thread_db_free): Add `detaching' parameter. Only
10496 call td_ta_clear_event if detaching from process.
10497
10498 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10499
10500 * thread-db.c (thread_db_free): Fix typo.
10501
10502 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10503
10504 PR gdb/10838
10505 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10506
10507 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10508
10509 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10510 with an i686 compiler.
10511 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10512 needed.
10513 * configure: Rebuilt.
10514
10515 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10516
10517 PR gdb/10783
10518
10519 * server.c (handle_search_memory_1): Correct read_addr initialization
10520 in loop for searching subsequent chunks.
10521
10522 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10523
10524 * configure.ac: New --with-libthread-db option.
10525 * thread-db.c: Allow direct dependence on libthread_db.
10526 (thread_db_free): Adjust.
10527 * config.in: Regenerate.
10528 * configure: Likewise.
10529
10530 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10531
10532 PR gdb/10757
10533 * thread-db.c (attach_thread): New function.
10534 (maybe_attach_thread): Return success/failure.
10535 (find_new_threads_callback): Adjust.
10536 (thread_db_find_new_threads): Loop until no new threads.
10537
10538 2009-10-13 Pedro Alves <pedro@codesourcery.com>
10539
10540 * proc-service.c (ps_lgetregs): Formatting.
10541
10542 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10543
10544 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10545 * configure.ac: Adjust.
10546 * linux-low.h (struct process_info_private): Move members to struct
10547 thread_db.
10548 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10549 * linux-low.c (linux_remove_process): Adjust.
10550 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10551 * server.c (handle_query): Move code ...
10552 (handle_monitor_command): ... here. New function.
10553 * target.h (struct target_ops): New member.
10554 * thread-db.c (struct thread_db): New.
10555 (libthread_db_search_path): New variable.
10556 (thread_db_create_event, thread_db_enable_reporting)
10557 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10558 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10559 (try_thread_db_load_1, dladdr_to_soname): New functions.
10560 (try_thread_db_load, thread_db_load_search): New functions.
10561 (thread_db_init): Search for libthread_db.
10562 (thread_db_free): New function.
10563 (thread_db_handle_monitor_command): Likewise.
10564 * config.in: Regenerate.
10565 * configure: Regenerate.
10566
10567 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10568
10569 * spu-low.c (spu_kill): Wait for inferior to terminate.
10570 Call clear_inferiors.
10571 (spu_detach): Call clear_inferiors.
10572
10573 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10574
10575 * aclocal.m4: Regenerate.
10576 * config.in: Likewise.
10577 * configure: Likewise.
10578
10579 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10580
10581 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10582 (parse_spufs_run): New function.
10583 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10584 (ppc_breakpoint_at): Handle SPU breakpoints.
10585
10586 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10587
10588 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10589 (SPUFS_MAGIC): Define.
10590 (spu_enumerate_spu_ids): New function.
10591 (linux_qxfer_spu): New function.
10592 (linux_target_ops): Install linux_qxfer_spu.
10593
10594 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10595
10596 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10597 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10598 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10599 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10600 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10601 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10602 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10603 (init_registers_powerpc_cell32l): Add prototype.
10604 (init_registers_powerpc_cell64l): Likewise.
10605 (ppc_arch_setup): Detect Cell/B.E. architecture.
10606
10607 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10608
10609 * Makefile.in (datarootdir): New variable.
10610
10611 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10612
10613 * linux-low.c (linux_write_memory): Update debugging output.
10614 * Makefile.in (clean): Add new descriptions.
10615 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10616 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10617 * configure.srv: Add new files for arm*-*-linux*.
10618 * linux-arm-low.c: Add new declarations.
10619 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10620 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10621 (HWCAP_VFPv3D16): New.
10622 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10623 instead of __IWMMXT__.
10624 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10625 (arm_arch_setup): New.
10626 (target_regsets): Remove #ifdef. Add VFP regset.
10627 (the_low_target): Use arm_arch_setup.
10628
10629 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10630
10631 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10632 the main thread again.
10633
10634 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10635
10636 Adding Neutrino gdbserver.
10637 * configure: Regenerated.
10638 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10639 * configure.srv (i[34567]86-*-nto*): New target.
10640 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10641 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10642 (nto_comctrl) [__QNX__]: New function.
10643 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10644
10645 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
10646
10647 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10648 srv_tgtobj.
10649
10650 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10651 Pedro Alves <pedro@codesourcery.com>
10652
10653 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10654 don't support CONTEXT_EXTENDED_REGISTERS.
10655 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10656 (the_low_target): Install them.
10657 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10658 failing with ERROR_PIPE_NOT_CONNECTED.
10659
10660 2009-06-30 Doug Evans <dje@google.com>
10661 Pierre Muller <muller@ics.u-strasbg.fr>
10662
10663 Add h/w watchpoint support to x86-linux, win32-i386.
10664 * Makefile.in (SFILES): Add i386-low.c
10665 (i386_low_h): Define.
10666 (i386-low.o): Add dependencies.
10667 (linux-x86-low.o): Add i386-low.h dependency.
10668 (win32-i386-low.o): Ditto.
10669 * i386-low.c: New file.
10670 * i386-low.h: New file.
10671 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10672 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10673 * linux-low.c (linux_add_process): Initialize arch_private.
10674 (linux_remove_process): Free arch_private.
10675 (add_lwp): Initialize arch_private.
10676 (delete_lwp): Free arch_private.
10677 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10678 provided.
10679 * linux-low.h (process_info_private): New member arch_private.
10680 (lwp_info): New member arch_private.
10681 (linux_target_ops): New members new_process, new_thread,
10682 prepare_to_resume.
10683 (ptid_of): New macro.
10684 * linux-x86-low.c: Include stddef.h, i386-low.h.
10685 (arch_process_info): New struct.
10686 (arch_lwp_info): New struct.
10687 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10688 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10689 (i386_dr_low_get_status): New function.
10690 (x86_insert_point, x86_remove_point): New functions.
10691 (x86_stopped_by_watchpoint): New function.
10692 (x86_stopped_data_address): New function.
10693 (x86_linux_new_process, x86_linux_new_thread): New functions.
10694 (x86_linux_prepare_to_resume): New function.
10695 (the_low_target): Add entries for insert_point, remove_point,
10696 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10697 prepare_to_resume.
10698 * server.c (debug_hw_points): New global.
10699 (monitor_show_help): Document set debug-hw-points.
10700 (handle_query): Process "set debug-hw-points".
10701 * server.h (debug_hw_points): Declare.
10702 (paddress): Declare.
10703 * utils.c (NUMCELLS, CELLSIZE): New macros.
10704 (get_sell, xsnprintf, paddress): New functions.
10705 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10706 remove_point, stopped_by_watchpoint, stopped_data_address.
10707 * win32-i386-low.c: Include i386-low.h.
10708 (debug_reg_state): Replaces dr.
10709 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10710 (i386_dr_low_get_status): New function.
10711 (i386_insert_point, i386_remove_point): New functions.
10712 (i386_stopped_by_watchpoint): New function.
10713 (i386_stopped_data_address): New function.
10714 (i386_initial_stuff): Update.
10715 (get_thread_context,set_thread_context,i386_thread_added): Update.
10716 (the_low_target): Add entries for insert_point,
10717 remove_point, stopped_by_watchpoint, stopped_data_address.
10718 * win32-low.c (win32_insert_watchpoint): New function.
10719 (win32_remove_watchpoint): New function.
10720 (win32_stopped_by_watchpoint): New function.
10721 (win32_stopped_data_address): New function.
10722 (win32_target_ops): Add entries for insert_watchpoint,
10723 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10724 * win32-low.h (win32_target_ops): New members insert_point,
10725 remove_point, stopped_by_watchpoint, stopped_data_address.
10726
10727 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10728
10729 * server.c (process_serial_event): Re-return unsupported, not
10730 error, if the type isn't recognized. Re-allow supporting only
10731 insert or remove packets. Also call require_running for
10732 breakpoints. Add missing break statement to default case. Tidy.
10733 * target.h (struct target_ops): Rename insert_watchpoint to
10734 insert_point, and remove_watchpoint to remove_point.
10735
10736 * linux-low.h (struct linux_target_ops): Likewise.
10737 * linux-low.c (linux_insert_watchpoint): Rename to ...
10738 (linux_insert_point): ... this. Adjust.
10739 (linux_remove_watchpoint): Rename to ...
10740 (linux_remove_point): ... this. Adjust.
10741 (linux_target_ops): Adjust.
10742 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10743 (cris_insert_point): ... this.
10744 (cris_remove_watchpoint): Rename to ...
10745 (cris_remove_point): ... this.
10746 (the_low_target): Adjust.
10747
10748 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10749
10750 * server.c (handle_v_kill): Pass signal_pid to
10751 kill_inferior if multi_process is zero.
10752
10753 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10754
10755 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10756 * target.h (target_ops): Comment for *_watchpoint to make it clear
10757 the functions can get types '0' and '1'.
10758
10759 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10760
10761 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10762 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10763 * regcache.c (get_regcache): Likewise.
10764 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10765 * win32-low.c (child_fetch_inferior_registers): Remove check for
10766 regno 0.
10767
10768 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10769 Pedro Alves <pedro@codesourcery.com>
10770
10771 * target.h (struct target_ops) <supports_multi_process>: New
10772 callback.
10773 (target_supports_multi_process): New.
10774 * server.c (handle_query): Even if GDB reports support, only
10775 enable multi-process if the target also supports it. Report
10776 multi-process support only if the target backend supports it.
10777 * linux-low.c (linux_supports_multi_process): New function.
10778 (linux_target_ops): Install it as target_supports_multi_process
10779 callback.
10780
10781 2009-05-24 Doug Evans <dje@google.com>
10782
10783 Global renaming of find_thread_pid to find_thread_ptid.
10784 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10785 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10786 All callers updated.
10787
10788 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10789 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10790 directly.
10791
10792 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10793 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10794 (linux_resume_one_lwp): Ditto.
10795
10796 2009-05-23 Doug Evans <dje@google.com>
10797
10798 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10799 from struct inferior_list_entry * to struct lwp_info *.
10800 All callers updated.
10801
10802 2009-05-13 Doug Evans <dje@google.com>
10803
10804 * linux-x86-low.c: Don't include assert.h.
10805 (x86_siginfo_fixup): Use fatal, not assert.
10806 (x86_arch_setup): Fix comment.
10807
10808 2009-05-12 Doug Evans <dje@google.com>
10809
10810 Biarch support for i386/amd64 gdbserver.
10811 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10812 Add linux-x86-low.c.
10813 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10814 (linux-x86-low.o): Add.
10815 * linux-x86-64-low.c: Delete.
10816 * linux-i386-low.c: Delete.
10817 * linux-x86-low.c: New file.
10818 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10819 linux-x86-low.o.
10820 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10821 linux-x86-low.o.
10822 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10823 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10824 (linux_child_pid_to_exec_file): New function.
10825 (elf_64_header_p, elf_64_file_p): New functions.
10826 (siginfo_fixup): New function.
10827 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10828 give target a chance to convert layout.
10829 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10830 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10831
10832 2009-05-07 Doug Evans <dje@google.com>
10833
10834 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10835 (regsets_store_inferior_registers): Ditto.
10836
10837 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10838
10839 PR server/10048
10840
10841 * linux-low.c (must_set_ptrace_flags): Delete.
10842 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10843 of the global.
10844 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10845 `lwp->must_set_ptrace_flags' instead.
10846 (linux_wait_for_event_1): Set ptrace options here.
10847 (linux_wait_1): ... not here.
10848
10849 2009-04-30 Doug Evans <dje@google.com>
10850
10851 * inferiors.c (started_inferior_callback): New function.
10852 (attached_inferior_callback): New function.
10853 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10854 * server.c (print_started_pid, print_attached_pid): New functions.
10855 (detach_or_kill_for_exit): New function.
10856 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10857 * server.h (have_started_inferiors_p): Declare.
10858 (have_attached_inferiors_p): Declare.
10859
10860 * inferiors.c (remove_process): Fix memory leak, free process.
10861 * linux-low.c (linux_remove_process): New function.
10862 (linux_kill): Call it instead of remove_process.
10863 (linux_detach, linux_wait_1): Ditto.
10864
10865 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10866
10867 * configure.srv: Add x86 Windows CE target.
10868
10869 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10870
10871 * inferiors.c (get_thread_process): Make global.
10872 * server.h (get_thread_process): Add prototype.
10873 * thread-db.c (find_one_thread): Use get_thread_process
10874 instead of current_process.
10875 (thread_db_get_tls_address): Do not crash if called when
10876 thread layer is not yet initialized.
10877
10878 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10879
10880 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10881 * spu-low.c (current_tid): Rename to ...
10882 (current_ptid): ... this.
10883 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10884 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10885 ptid_get_lwp (current_ptid) instead of current_tid.
10886 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10887 instead of current_tid. Use find_process_pid to verify pid
10888 argument is valid. Pass proper argument to remove_process.
10889 (spu_thread_alive): Compare current_ptid instead of current_tid.
10890 (spu_resume): Likewise.
10891
10892 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10893
10894 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10895 variable.
10896
10897 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10898
10899 Implement the multiprocess extensions, and add linux multiprocess
10900 support.
10901
10902 * server.h (ULONGEST): Declare.
10903 (struct ptid, ptid_t): New.
10904 (minus_one_ptid, null_ptid): Declare.
10905 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10906 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10907 (struct inferior_list_entry): Change `id' type from unsigned from
10908 to ptid_t.
10909 (struct sym_cache, struct breakpoint, struct
10910 process_info_private): Forward declare.
10911 (struct process_info): Declare.
10912 (current_process): Declare.
10913 (all_processes): Declare.
10914 (initialize_inferiors): Declare.
10915 (add_thread): Adjust to use ptid_t.
10916 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10917 (add_process, remove_process, find_thread_pid): Declare.
10918 (find_inferior_id): Adjust to use ptid_t.
10919 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10920 (multi_process): Declare.
10921 (push_event): Adjust to use ptid_t.
10922 (read_ptid, write_ptid): Declare.
10923 (prepare_resume_reply): Adjust to use ptid_t.
10924 (clear_symbol_cache): Declare.
10925 * inferiors.c (all_processes): New.
10926 (null_ptid, minus_one_ptid): New.
10927 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10928 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10929 (add_thread): Change unsigned long to ptid. Remove gdb_id
10930 parameter. Adjust.
10931 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10932 (gdb_id_to_thread): Rename to ...
10933 (find_thread_pid): ... this. Change unsigned long to ptid.
10934 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10935 (loaded_dll, pull_pid_from_list): Adjust.
10936 (add_process, remove_process, find_process_pid)
10937 (get_thread_process, current_process, initialize_inferiors): New.
10938 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10939 (struct target_waitstatus) <related_pid>: Ditto.
10940 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10941 return type to int.
10942 (struct target_ops) <join>: Add `pid' argument.
10943 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10944 (struct target_ops) <wait>: Add `ptid' field. Change return type
10945 to ptid.
10946 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10947 (mywait): Add `ptid' argument. Change return type to ptid_t.
10948 (target_pid_to_str): Declare.
10949 * target.c (set_desired_inferior): Adjust to use ptids.
10950 (mywait): Add new `ptid' argument. Adjust.
10951 (target_pid_to_str): New.
10952 * mem-break.h (free_all_breakpoints): Declare.
10953 * mem-break.c (breakpoints): Delelete.
10954 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10955 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10956 to use per-process breakpoint list.
10957 (free_all_breakpoints): New.
10958 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10959 (symbol_cache, all_symbols_looked_up): Delete.
10960 (hexchars): New.
10961 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10962 read_ptid): New.
10963 (prepare_resume_reply): Change ptid argument's type from unsigned
10964 long to ptid_t. Adjust. Implement W;process and X;process.
10965 (free_sym_cache, clear_symbol_cache): New.
10966 (look_up_one_symbol): Adjust to per-process symbol cache. *
10967 * server.c (cont_thread, general_thread, step_thread): Change type
10968 to ptid_t.
10969 (attached): Delete.
10970 (multi_process): New.
10971 (last_ptid): Change type to ptid_t.
10972 (struct vstop_notif) <ptid>: Change type to ptid_t.
10973 (queue_stop_reply, push_event): Change `ptid' argument's type to
10974 ptid_t.
10975 (discard_queued_stop_replies): Add `pid' argument.
10976 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10977 changes. Don't reference the `attached' global.
10978 (attach_inferior): Adjust to mywait interface changes.
10979 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10980 features. Handle and report "multiprocess+". Handle
10981 "qAttached:PID".
10982 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10983 changes.
10984 (handle_v_kill): New.
10985 (handle_v_stopped): Adjust to use target_pid_to_str.
10986 (handle_v_requests): Allow multiple attaches and runs when
10987 multiprocess extensions are in effect. Handle "vKill".
10988 (myresume): Adjust to use ptids.
10989 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10990 (handle_status): Adjust to discard_queued_stop_replies interface
10991 change.
10992 (first_thread_of, kill_inferior_callback)
10993 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10994 (main): Call initialize_inferiors. Adjust to use ptids, killing
10995 and detaching from all inferiors. Handle multiprocess packet
10996 variants.
10997 * linux-low.h: Include gdb_proc_service.h.
10998 (struct process_info_private): New.
10999 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11000 <lwpid_of>: Use ptid_get_lwp.
11001 (get_lwp_thread): Adjust.
11002 (struct lwp_info): Add `dead' member.
11003 (find_lwp_pid): Declare.
11004 * linux-low.c (thread_db_active): Delete.
11005 (new_inferior): Adjust comment.
11006 (inferior_pid): Delete.
11007 (linux_add_process): New.
11008 (handle_extended_wait): Adjust.
11009 (add_lwp): Change unsigned long to ptid.
11010 (linux_create_inferior): Add process to processes table. Adjust
11011 to use ptids. Don't set new_inferior here.
11012 (linux_attach_lwp): Rename to ...
11013 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11014 it. Adjust to use ptids.
11015 (linux_attach_lwp): New.
11016 (linux_attach): Add process to processes table. Don't set
11017 new_inferior here.
11018 (struct counter): New.
11019 (second_thread_of_pid_p, last_thread_of_process_p): New.
11020 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11021 multiple processes.
11022 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11023 processes. Remove process from process table.
11024 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11025 to multiple processes.
11026 (any_thread_of): New.
11027 (linux_detach): Add `pid' argument, and handle it. Remove process
11028 from processes table.
11029 (linux_join): Add `pid' argument. Handle it.
11030 (linux_thread_alive): Change unsighed long argument to ptid_t.
11031 Consider dead lwps as not being alive.
11032 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11033 threads we're not interested in.
11034 (same_lwp, find_lwp_pid): New.
11035 (linux_wait_for_lwp): Change `pid' argument's type from int to
11036 ptid_t. Adjust.
11037 (linux_wait_for_event): Rename to ...
11038 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11039 from int to ptid_t. Adjust.
11040 (linux_wait_for_event): New.
11041 (linux_wait_1): Add `ptid' argument. Change return type to
11042 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11043 that exit from the process table.
11044 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11045 Adjust.
11046 (mark_lwp_dead): New.
11047 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11048 stopping all threads, mark its main lwp as dead.
11049 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11050 ptids.
11051 (fetch_register, usr_store_inferior_registers)
11052 (regsets_fetch_inferior_registers)
11053 (regsets_store_inferior_registers, linux_read_memory)
11054 (linux_write_memory): Inline `inferior_pid'.
11055 (linux_look_up_symbols): Adjust to use per-process
11056 `thread_db_active'.
11057 (linux_request_interrupt): Adjust to use ptids.
11058 (linux_read_auxv): Inline `inferior_pid'.
11059 (initialize_low): Don't reference thread_db_active.
11060 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11061 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11062 (ps_getpid): Return the pid of the current inferior.
11063 * thread-db.c (proc_handle, thread_agent): Delete.
11064 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11065 per-process data.
11066 (find_one_thread): Change argument type to ptid_t. Adjust to
11067 per-process data.
11068 (maybe_attach_thread): Adjust to per-process data and ptids.
11069 (thread_db_find_new_threads): Ditto.
11070 (thread_db_init): Ditto.
11071 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11072 processes table. Adjust to use ptids.
11073 (spu_kill, spu_detach): Adjust interface. Remove process from
11074 processes table.
11075 (spu_join, spu_thread_alive): Adjust interface.
11076 (spu_wait): Adjust interface. Remove process from processes
11077 table. Adjust to use ptids.
11078 * win32-low.c (current_inferior_tid): Delete.
11079 (current_inferior_ptid): New.
11080 (debug_event_ptid): New.
11081 (thread_rec): Take a ptid. Adjust.
11082 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11083 (child_delete_thread): Ditto.
11084 (do_initial_child_stuff): Add `attached' argument. Add process to
11085 processes table.
11086 (child_fetch_inferior_registers, child_store_inferior_registers):
11087 Adjust.
11088 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11089 (win32_attach): Pass 1 to do_initial_child_stuff.
11090 (win32_kill): Adjust interface. Remove process from processes
11091 table.
11092 (win32_detach): Ditto.
11093 (win32_join): Adjust interface.
11094 (win32_thread_alive): Take a ptid.
11095 (win32_resume): Adjust to use ptids.
11096 (get_child_debug_event): Ditto.
11097 (win32_wait): Adjust interface. Remove exiting process from
11098 processes table.
11099
11100 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11101
11102 Non-stop mode support.
11103
11104 * server.h (non_stop): Declare.
11105 (gdb_client_data, handler_func): Declare.
11106 (delete_file_handler, add_file_handler, start_event_loop):
11107 Declare.
11108 (handle_serial_event, handle_target_event, push_event)
11109 (putpkt_notif): Declare.
11110 * target.h (enum resume_kind): New.
11111 (struct thread_resume): Replace `step' field by `kind' field.
11112 (TARGET_WNOHANG): Define.
11113 (struct target_ops) <wait>: Add `options' argument.
11114 <supports_non_stop, async, start_non_stop>: New fields.
11115 (target_supports_non_stop, target_async): New.
11116 (start_non_stop): Declare.
11117 (mywait): Add `options' argument.
11118 * target.c (mywait): Add `options' argument. Print child exit
11119 notifications here.
11120 (start_non_stop): New.
11121 * server.c (non_stop, own_buf, mem_buf): New globals.
11122 (struct vstop_notif): New.
11123 (notif_queue): New global.
11124 (queue_stop_reply, push_event, discard_queued_stop_replies)
11125 (send_next_stop_reply): New.
11126 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11127 interface changes.
11128 (attach_inferior): In non-stop mode, don't wait for the target
11129 here.
11130 (handle_general_set): Handle QNonStop.
11131 (handle_query): When handling qC, return the current general
11132 thread, instead of the first thread of the list.
11133 (handle_query): If the backend supports non-stop mode, include
11134 QNonStop+ in the qSupported query response.
11135 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11136 and non-stop mode.
11137 (handle_v_attach, handle_v_run): Handle non-stop mode.
11138 (handle_v_stopped): New.
11139 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11140 (myresume): Adjust to use resume_kind. Handle non-stop.
11141 (queue_stop_reply_callback): New.
11142 (handle_status): Handle non-stop mode.
11143 (main): Clear non_stop flag on reconnection. Use the event-loop.
11144 Refactor serial protocol handling from here ...
11145 (process_serial_event): ... to this new function. When GDB
11146 selects any thread, select one here. In non-stop mode, wait until
11147 GDB acks all pending events before exiting.
11148 (handle_serial_event, handle_target_event): New.
11149 * remote-utils.c (remote_open): Install remote_desc in the event
11150 loop.
11151 (remote_close): Remove remote_desc from the event loop.
11152 (putpkt_binary): Rename to...
11153 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11154 (putpkt_binary): New as wrapper around putpkt_binary_1.
11155 (putpkt_notif): New.
11156 (prepare_resume_reply): In non-stop mode, don't change the
11157 general_thread.
11158 * event-loop.c: New.
11159 * Makefile.in (OBJ): Add event-loop.o.
11160 (event-loop.o): New rule.
11161
11162 * linux-low.h (pid_of): Moved here.
11163 (lwpid_of): New.
11164 (get_lwp_thread): Use lwpid_of.
11165 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11166 * linux-low.c (pid_of): Delete.
11167 (inferior_pid): Use lwpid_of.
11168 (linux_event_pipe): New.
11169 (target_is_async_p): New.
11170 (delete_lwp): New.
11171 (handle_extended_wait): Use lwpid_of.
11172 (add_lwp): Don't set lwpid field.
11173 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11174 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11175 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11176 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11177 first. Adjust to linux_wait_for_event interface changes. Use
11178 lwpid_of.
11179 (linux_detach): Don't delete the main lwp here.
11180 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11181 (status_pending_p): Don't consider explicitly suspended lwps.
11182 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11183 pointer. Add OPTIONS argument. Change return type to int. Use
11184 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11185 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11186 pointer. Add status pointer argument. Return a pid instead of a
11187 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11188 changes. In non-stop mode, don't switch to a random thread.
11189 (linux_wait): Rename to...
11190 (linux_wait_1): ... this. Add target_options argument, and handle
11191 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11192 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11193 clean exit and signal exit code. Don't stop all threads in
11194 non-stop mode. In all-stop mode, only stop all threads when
11195 reporting a stop to GDB. Handle explicit thread stop requests.
11196 (async_file_flush, async_file_mark): New.
11197 (linux_wait): New.
11198 (send_sigstop): Use lwpid_of.
11199 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11200 interface changes. In non-stop mode, don't switch to a random
11201 thread.
11202 (linux_resume_one_lwp): Use lwpid_of.
11203 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11204 (linux_resume_one_thread): ... this. Handle resume_stop. In
11205 non-stop mode, don't look for pending flag in all threads.
11206 (resume_status_pending_p): Don't consider explicitly suspended
11207 threads.
11208 (my_waitpid): Reimplement. Emulate __WALL.
11209 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11210 Use lwpid_of.
11211 (sigchld_handler, linux_supports_non_stop, linux_async)
11212 (linux_start_non_stop): New.
11213 (linux_target_ops): Register linux_supports_non_stop, linux_async
11214 and linux_start_non_stop.
11215 (initialize_low): Install SIGCHLD handler.
11216 * thread-db.c (thread_db_create_event, find_one_thread)
11217 (thread_db_get_tls_address): Use lwpid_of.
11218 * win32-low.c (win32_detach): Adjust to use resume_kind.
11219 (win32_wait): Add `options' argument.
11220 * spu-low.c (spu_resume): Adjust to use resume_kind.
11221 (spu_wait): Add `options' argument.
11222
11223 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11224
11225 Decouple target code from remote protocol.
11226
11227 * target.h (enum target_waitkind): New.
11228 (struct target_waitstatus): New.
11229 (struct target_ops) <wait>: Return an unsigned long. Take a
11230 target_waitstatus pointer instead of a char pointer.
11231 (mywait): Likewise.
11232 * target.c (mywait): Change prototype to return an unsigned long.
11233 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11234 * server.h (thread_from_wait, old_thread_from_wait): Delete
11235 declarations.
11236 (prepare_resume_reply): Change prototype to take a
11237 target_waitstatus.
11238 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11239 (last_status, last_ptid): New.
11240 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11241 pid instead of a signal.
11242 (attach_inferior): Remove "status" and "signal" parameters.
11243 Adjust.
11244 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11245 not as an address.
11246 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11247 (handle_v_requests, myresume): Remove "status" and "signal"
11248 parameters. Adjust.
11249 (handle_status): New.
11250 (main): Delete local `status'. Adjust.
11251 * remote-utils.c: Include target.h.
11252 (prepare_resume_reply): Change prototype to take a
11253 target_waitstatus. Adjust.
11254
11255 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11256 interface.
11257 * spu-low.c (spu_wait): Adjust.
11258 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11259 Delete.
11260 (win32_wait): Adjust.
11261
11262 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11263
11264 * target.h (struct thread_resume): Delete leave_stopped member.
11265 (struct target_ops): Add a `n' argument to the `resume' callback.
11266 * server.c (start_inferior): Adjust.
11267 (handle_v_cont, myresume): Adjust.
11268 * linux-low.c (check_removed_breakpoint): Adjust to resume
11269 interface change, and to removed leave_stopped field.
11270 (resume_ptr): Delete.
11271 (struct thread_resume_array): New.
11272 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11273 resume interface change.
11274 (linux_continue_one_thread, linux_queue_one_thread)
11275 (resume_status_pending_p): Check if the resume field is NULL
11276 instead of checking the leave_stopped member.
11277 (linux_resume): Adjust to the target resume interface change.
11278 * spu-low.c (spu_resume): Adjust to the target resume interface
11279 change.
11280 * win32-low.c (win32_detach, win32_resume): Ditto.
11281
11282 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11283
11284 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11285 flag.
11286 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11287 pending.
11288 (linux_continue_one_thread): Only preserve the stepping flag if
11289 there's a pending breakpoint.
11290
11291 2009-03-31 Pedro Alves <pedro@codesourcery.com>
11292
11293 * server.c (main): After the inferior having exited, call
11294 remote_close before exiting gdbserver.
11295
11296 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11297
11298 Fix size of FPSCR in Power 7 processors.
11299 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11300 (PPC_FEATURE_HAS_DFP): New #define.
11301 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11302 size of the FPSCR.
11303
11304 2009-03-23 Pedro Alves <pedro@codesourcery.com>
11305
11306 * server.c (handle_query) Whitespace and formatting.
11307
11308 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11309
11310 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11311 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11312 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11313 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11314 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11315 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11316 Makefile.in, configure.ac: Fix whitespace throughout.
11317 * configure: Regenerate.
11318
11319 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11320
11321 * inferiors.c (find_inferior): Make it safe for the callback
11322 function to delete the currently iterated inferior.
11323
11324 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11325
11326 * Makefile.in (linuw_low_h): Move higher.
11327 (thread-db.o): Depend on $(linux_low_h).
11328
11329 2009-03-17 Pedro Alves <pedro@codesourcery.com>
11330
11331 Rename "process" to "lwp" throughout.
11332
11333 * linux-low.c (all_processes): Rename to...
11334 (all_lwps): ... this.
11335 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11336 (add_process): Rename to ...
11337 (add_lwp): ... this. Adjust.
11338 (linux_create_inferior): Adjust.
11339 (linux_attach_lwp): Adjust.
11340 (linux_attach): Adjust.
11341 (linux_kill_one_process): Rename to ...
11342 (linux_kill_one_lwp): ... this. Adjust.
11343 (linux_kill): Adjust.
11344 (linux_detach_one_process): Rename to ...
11345 (linux_detach_one_lwp): ... this. Adjust.
11346 (linux_detach): Adjust.
11347 (check_removed_breakpoint): Adjust.
11348 (status_pending_p): Adjust.
11349 (linux_wait_for_process): Rename to ...
11350 (linux_wait_for_lwp): ... this. Adjust.
11351 (linux_wait_for_event): Adjust.
11352 (send_sigstop): Adjust.
11353 (wait_for_sigstop): Adjust.
11354 (stop_all_processes): Rename to ...
11355 (stop_all_lwps): ... this.
11356 (linux_resume_one_process): Rename to ...
11357 (linux_resume_one_lwp): ... this. Adjust.
11358 (linux_set_resume_request, linux_continue_one_thread)
11359 (linux_queue_one_thread, resume_status_pending_p)
11360 (usr_store_inferior_registers, regsets_store_inferior_registers)
11361 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11362 Adjust.
11363 * linux-low.h (get_process): Rename to ...
11364 (get_lwp): ... this. Adjust.
11365 (get_thread_process): Rename to ...
11366 (get_thread_lwp): ... this. Adjust.
11367 (get_process_thread): Rename to ...
11368 (get_lwp_thread): ... this. Adjust.
11369 (struct process_info): Rename to ...
11370 (struct lwp_info): ... this.
11371 (all_processes): Rename to ...
11372 (all_lwps): ... this.
11373 * proc-service.c (ps_lgetregs): Adjust.
11374 * thread-db.c (thread_db_create_event, find_one_thread)
11375 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11376
11377 2009-03-14 Pedro Alves <pedro@codesourcery.com>
11378
11379 * server.c (handle_query): Handle "qAttached".
11380
11381 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11382
11383 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11384 GPLv3, update license URL.
11385
11386 2009-03-01 Doug Evans <dje@google.com>
11387
11388 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11389 (server_h): Add gdb_signals.h.
11390 (signals.o): Update.
11391 * server.h (target_signal_from_host,target_signal_to_host_p)
11392 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11393
11394 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11395
11396 * remote-utils.c (getpkt): Also generate remote-debug
11397 information if noack_mode is set.
11398
11399 2009-02-06 Pedro Alves <pedro@codesourcery.com>
11400
11401 * server.c (handle_query): Report qXfer:siginfo:read and
11402 qXfer:siginfo:write as supported and handle them.
11403 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11404 * linux-low.c (linux_xfer_siginfo): New.
11405 (linux_target_ops): Set it.
11406
11407 2009-01-26 Pedro Alves <pedro@codesourcery.com>
11408
11409 * server.c (gdbserver_usage): Mention --remote-debug.
11410 (main): Accept '--remote-debug' switch.
11411
11412 2009-01-18 Doug Evans <dje@google.com>
11413
11414 * regcache.c (new_register_cache): No need to check result of xcalloc.
11415 * server.c (handle_search_memory): Back out calls to xmalloc,
11416 result is checked and error is returned to user upon failure.
11417 (handle_query): Ditto. Add more checks for result of malloc.
11418 (handle_v_cont): Check result of malloc, report error back to
11419 user upon failure.
11420 (handle_v_run): Ditto. Call freeargv.
11421 * server.h (freeargv): Declare.
11422 * utils.c (freeargv): New fn.
11423
11424 2009-01-15 Doug Evans <dje@google.com>
11425
11426 * gdbreplay.c (perror_with_name): Make arg const char *.
11427 * server.h (target_signal_to_name): Make return type const char *.
11428 * thread-db.c (thread_db_err_str): Make return type const char *.
11429 * utils.c (perror_with_name): Make arg const char *.
11430
11431 2009-01-14 Pedro Alves <pedro@codesourcery.com>
11432
11433 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11434 when handling a EXIT_PROCESS_DEBUG_EVENT.
11435
11436 2009-01-06 Joel Brobecker <brobecker@adacore.com>
11437
11438 * gdbreplay.c (gdbreplay_version): Update copyright year.
11439 * server.c (gdbserver_version): Likewise.
11440
11441 2009-01-05 Doug Evans <dje@google.com>
11442
11443 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11444 (handle_extended_wait): Improve comment.
11445
11446 2008-12-13 Doug Evans <dje@google.com>
11447
11448 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11449 * server.h (ATTR_MALLOC): New macro.
11450 (xmalloc,xcalloc,xstrdup): Declare.
11451 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11452 * inferiors.c: Ditto.
11453 * linux-low.c: Ditto.
11454 * mem-break.c: Ditto.
11455 * regcache.c: Ditto.
11456 * remote-utils.c: Ditto.
11457 * server.c: Ditto.
11458 * target.c: Ditto.
11459 * win32-low.c: Ditto.
11460
11461 2008-12-12 Doug Evans <dje@google.com>
11462
11463 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11464 in debugging printf.
11465
11466 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11467
11468 2008-12-09 Doug Evans <dje@google.com>
11469
11470 * linux-low.h (struct process_info): Delete member tid, unused.
11471 * thread-db.c (find_one_thread): Update.
11472 (maybe_attach_thread): Update.
11473
11474 2008-12-02 Pedro Alves <pedro@codesourcery.com>
11475
11476 * target.h (struct target_ops): Add qxfer_osdata member.
11477 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11478 and dirent.h.
11479 (linux_qxfer_osdata): New functions.
11480 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11481 callback.
11482 * server.c (handle_query): Handle "qXfer:osdata:read:".
11483 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11484 (buffer_xml_printf): New functions.
11485 * server.h (struct buffer): New.
11486 (buffer_grow_str, buffer_grow_str0): New macros.
11487 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11488 (buffer_xml_printf): Declare.
11489
11490 2008-11-24 Doug Evans <dje@google.com>
11491
11492 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11493
11494 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11495
11496 * server.c (handle_v_run): Always use the supplied argument list.
11497
11498 2008-11-19 Bob Wilson <bob.wilson@acm.org>
11499
11500 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11501 (xtensa_regmap_table): Add entry for scompare1.
11502
11503 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11504
11505 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11506 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11507 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11508 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11509 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11510 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11511 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11512 XML target descriptions.
11513 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11514 when inferior is running on an ISA 2.05 or later processor. Add
11515 special case to return offset for full 64-bit slot of FPSCR when
11516 in 32-bits.
11517
11518 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11519
11520 * Makefile.in (SFILES, clean): Added sparc64 files.
11521 (reg-sparc64.o, reg-sparc64.c): New.
11522 * configure.srv (sparc*-*-linux*): New configuration.
11523 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11524 syscall arguments for SPARC.
11525 (regsets_store_inferior_registers): Likewise.
11526 * linux-sparc-low.c: New file.
11527
11528 2008-10-21 Doug Evans <dje@google.com>
11529
11530 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11531 (READLINE_DIR,READLINE_DEP): Delete.
11532 (INTERNAL_CFLAGS): Update.
11533 (LINTFLAGS): Update.
11534
11535 2008-10-10 Pedro Alves <pedro@codesourcery.com>
11536
11537 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11538 whole argv from the last run, not just argv[0].
11539
11540 2008-09-08 Pedro Alves <pedro@codesourcery.com>
11541
11542 * regcache.c (new_register_cache): Return NULL if the register
11543 cache size isn't known yet.
11544 (free_register_cache): Avoid dereferencing a NULL regcache.
11545
11546 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11547
11548 * configure.srv: Merge MIPS and MIPS64.
11549
11550 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11551
11552 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11553
11554 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
11555
11556 * Makefile.in: Add required vsx dependencies.
11557
11558 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11559 Declare init_registers_powerpc_vsx32l.
11560 Declare init_registers_powerpc_vsx64l.
11561 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11562 (ppc_arch_setup): Check for VSX in hwcap.
11563 (ppc_fill_vsxregset): New function.
11564 (ppc_store_vsxregset): New function.
11565 Add new VSX entry in regset_info target_regsets.
11566
11567 * configure.srv: Add new VSX dependencies.
11568
11569 2008-08-12 Pedro Alves <pedro@codesourcery.com>
11570
11571 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11572 (remote_open): Set or clear transport_is_reliable.
11573 (putpkt_binary): Don't expect acks in noack mode.
11574 (getpkt): Don't send ack/nac in noack mode.
11575 * server.c (handle_general_set): Handle QStartNoAckMode.
11576 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11577 qSupported.
11578 (main): Reset noack_mode on every connection.
11579 * server.h (noack_mode): Declare.
11580
11581 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11582
11583 * Makefile.in (GDBREPLAY_OBS): New variable.
11584 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11585
11586 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11587 Daniel Jacobowitz <dan@codesourcery.com>
11588
11589 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11590 (usr_store_inferior_registers): Likewise.
11591 (regsets_store_inferior_registers): Likewise.
11592
11593 2008-07-31 Rolf Jansen <rj@surtec.com>
11594 Pedro Alves <pedro@codesourcery.com>
11595
11596 * configure.ac: Check for memmem declaration.
11597 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11598 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11599 (disable_packet_qfThreadInfo): Unconditionally compile.
11600 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11601 * configure, config.in: Regenerate.
11602
11603 2008-07-28 Doug Kwan <dougkwan@google.com>
11604
11605 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11606 (linux_write_memory): Remove declaration of errno.
11607
11608 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11609
11610 * linux-low.c (handle_extended_wait): Do not use "status"
11611 variable uninitialized.
11612
11613 2008-07-07 Pedro Alves <pedro@codesourcery.com>
11614
11615 * server.c (handle_v_attach): Inhibit reporting dll changes.
11616
11617 2008-06-27 Pedro Alves <pedro@codesourcery.com>
11618
11619 * remote-utils.c (prepare_resume_reply): If requested, don't
11620 output "thread:TID" in the T stop reply.
11621
11622 * server.c (disable_packet_vCont, disable_packet_Tthread)
11623 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11624 (handle_query): If requested, disable support for qC, qfThreadInfo
11625 and qsThreadInfo.
11626 (handle_v_requests): If requested, disable support for vCont.
11627 (gdbserver_show_disableable): New.
11628 (main): Handle --disable-packet and --disable-packet=LIST.
11629
11630 * server.h (disable_packet_vCont, disable_packet_Tthread)
11631 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11632
11633 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11634
11635 * server.c (gdbserver_usage): Mention --version.
11636
11637 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11638
11639 * Makefile.in (gdbreplay.o): New rule.
11640
11641 2008-06-06 Joseph Myers <joseph@codesourcery.com>
11642
11643 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11644 message, not gdbserver.
11645
11646 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
11647 Nathan Sidwell <nathan@codesourcery.com>
11648 Joseph Myers <joseph@codesourcery.com>
11649
11650 * acinclude.m4: Include ../../config/acx.m4.
11651 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11652 * configure, config.in: Regenerate.
11653 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11654 * server.c (gdbserver_version): Print PKGVERSION.
11655 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11656 (main): Adjust gdbserver_usage calls.
11657 * gdbreplay.c (version, host_name): Add declarations.
11658 (gdbreplay_version, gdbreplay_usage): New.
11659 (main): Accept --version and --help options.
11660
11661 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11662
11663 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11664 (arm_breakpoint_at): Handle Thumb.
11665 (the_low_target): Add comment.
11666
11667 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11668
11669 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11670
11671 2008-05-09 Doug Evans <dje@google.com>
11672
11673 * server.h (decode_search_memory_packet): Declare.
11674 * remote-utils.c (decode_search_memory_packet): New fn.
11675 * server.c (handle_search_memory_1): New fn.
11676 (handle_search_memory): New fn.
11677 (handle_query): Process qSearch:memory packets.
11678
11679 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11680
11681 * regcache.c (registers_length): Remove.
11682 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11683 full register packet.
11684 * regcache.h (registers_length): Remove prototype.
11685 * server.h (PBUFSIZ): Define to 16384.
11686
11687 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11688
11689 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11690 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11691 powerpc-64l.o, and powerpc-altivec64l.o.
11692 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11693 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11694 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11695 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11696 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11697 to srv_xmlfiles.
11698
11699 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11700 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11701 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11702 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11703 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11704 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11705 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11706 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11707 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11708 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11709 (clean): Update.
11710
11711 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11712 (init_registers_powerpc_32l): ... this new prototype.
11713 (init_registers_powerpc_32): Remove, replace by ...
11714 (init_registers_powerpc_altivec32l): ... this new prototype.
11715 (init_registers_powerpc_e500): Remove, replace by ...
11716 (init_registers_powerpc_e500l): ... this new prototype.
11717 (init_registers_ppc64): Remove, replace by ...
11718 (init_registers_powerpc_64l): ... this new prototype.
11719 (init_registers_powerpc_64): Remove, replace by ...
11720 (init_registers_powerpc_altivec64l): ... this new prototype.
11721 (ppc_num_regs): Set to 73.
11722 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11723 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11724 (ppc_cannot_store_register): Handle orig_r3 and trap.
11725 (ppc_arch_setup): Update init_registers_... calls.
11726 (ppc_fill_gregset): Handle orig_r3 and trap.
11727
11728 * inferiors.c (clear_inferiors): Reset current_inferior.
11729
11730 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
11731
11732 * acinclude.m4: Add override.m4.
11733 * configure: Regenerate.
11734
11735 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11736
11737 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11738 initial call to init_register_ppc64.
11739
11740 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11741
11742 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11743 single powerpc*-*-linux* case.
11744 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11745
11746 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11747
11748 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11749 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11750 from reg_xmlfiles.
11751 * linux-ppc-low.c: Include <elf.h>.
11752 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11753 (ppc_hwcap): New global variable.
11754 (ppc_regmap): Remove __SPE__ #ifdef sections.
11755 (ppc_regmap_e500): New global variable.
11756 (ppc_cannot_store_register): Update __SPE__ special case.
11757 (ppc_get_hwcap): New function.
11758 (ppc_arch_setup): Use it to determine whether inferior supports
11759 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11760 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11761 Do not access registers if target does not support AltiVec.
11762 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11763 Do not access registers if target does not support SPE.
11764 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11765
11766 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11767
11768 * linux-low.c (disabled_regsets, num_regsets): New.
11769 (use_regsets_p): Delete.
11770 (linux_wait_for_process): Clear disabled_regsets.
11771 (regsets_fetch_inferior_registers): Check and set it.
11772 (regsets_store_inferior_registers): Likewise.
11773 (linux_fetch_registers, linux_store_registers): Do not use
11774 use_regsets_p.
11775 (initialize_low): Allocate disabled_regsets.
11776
11777 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11778
11779 * Makefile.in (LIBOBJS): New.
11780 (OBS): Use LIBOBJS.
11781 (memmem.o): New rule.
11782 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11783 * configure: Regenerated.
11784
11785 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11786
11787 * server.c (handle_query): Never return "unsupported" for
11788 qXfer:features:read queries.
11789
11790 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11791
11792 * server.c (get_features_xml): Fix inverted condition.
11793 (handle_query): Always support qXfer:feature:read.
11794
11795 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11796
11797 * server.c (wrapper_argv): New.
11798 (start_inferior): Handle wrapper_argv. If set, expect an extra
11799 trap.
11800 (gdbserver_usage): Document --wrapper.
11801 (main): Parse --wrapper.
11802
11803 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11804
11805 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11806 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11807 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11808 (ppc_set_pc): Likewise.
11809 (ppc_arch_setup): New function.
11810 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11811 of collect_register.
11812 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11813
11814 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11815
11816 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11817 instead of linux-ppc64-low.o.
11818 * linux-ppc64-low.c: Remove file.
11819 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11820 (linux-ppc64-low.o): Remove rule.
11821
11822 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11823 (init_registers_powerpc_64): Likewise.
11824 (ppc_regmap): Conditionally define depending on __powerpc64__.
11825 (ppc_cannot_store_register): Do not special-case "fpscr" when
11826 compiled on __powerpc64__.
11827 (ppc_collect_ptrace_register): New function.
11828 (ppc_supply_ptrace_register): New function.
11829 (ppc_breakpoint): Change type to "unsigned int".
11830 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11831 (the_low_target): Conditionally provide initializers for the
11832 arch_setup member depending on __powerpc64__. Install
11833 collect_ptrace_register and supply_ptrace_register members.
11834
11835 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11836
11837 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11838 * server.c (gdbserver_xmltarget): Define.
11839 (get_features_xml): Use it to replace "target.xml" and arch_string.
11840
11841 * configure.srv: Remove srv_xmltarget. Add XML files that were
11842 mentioned there to srv_xmlfiles instead. Remove conditional tests
11843 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11844 srv_xmlfiles and srv_regobj to include all possible choices.
11845 * configure.ac (srv_xmltarget): Remove.
11846 (srv_xmlfiles): Do not add "target.xml".
11847 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11848 checks for supplementary target information.
11849 * configure: Regenerate.
11850 * Makefile.in (XML_TARGET): Remove.
11851 (target.xml): Remove rule.
11852 (clean): Do not clean up target.xml.
11853 (.PRECIOUS): Do not mention target.xml.
11854
11855 * target.h (struct target_ops): Remove arch_string member.
11856 * linux-low.c (linux_arch_string): Remove.
11857 (linux_target_ops): Remove arch_string initializer.
11858 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11859 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11860 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11861 * spu-low.c (spu_arch_string): Remove.
11862 (spu_target_ops): Remove arch_string initializer.
11863 * win32-low.c (win32_arch_string): Remove.
11864 (win32_target_ops): Remove arch_string initializer.
11865 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11866 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11867 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11868
11869 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11870
11871 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11872 by collect_ptrace_register and supply_ptrace_register hooks.
11873 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11874 instead of checking for the_low_target.left_pad_xfer.
11875 (usr_store_inferior_registers): Use collect_ptrace_register callback
11876 instead of checking for the_low_target.left_pad_xfer.
11877
11878 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11879 (s390_supply_ptrace_register): Likewise.
11880 (s390_fill_gregset): Call s390_collect_ptrace_register.
11881 (the_low_target): Update.
11882
11883 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11884 (ppc_supply_ptrace_register): Likewise.
11885 (the_low_target): Update.
11886
11887 * linux-i386-low.c (the_low_target): Update.
11888 * linux-x86-64-low.c (the_low_target): Update.
11889
11890 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11891
11892 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11893 reg-s390.o and reg-s390x.o.
11894
11895 * linux-low.c (new_inferior): New global variable.
11896 (linux_create_inferior, linux_attach): Set it.
11897 (linux_wait_for_process): Call the_low_target.arch_setup after the
11898 target has stopped for the first time.
11899 (initialize_low): Do not call the_low_target.arch_setup.
11900
11901 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11902 (s390_set_pc): Likewise.
11903 (s390_arch_setup): New function.
11904 (the_low_target): Use s390_arch_setup as arch_setup routine.
11905
11906 * regcache.c (realloc_register_cache): New function.
11907 (set_register_cache): Call it for each existing regcache.
11908
11909 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11910
11911 * server.h (init_registers): Remove prototype.
11912
11913 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11914 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11915 instead of init_registers ().
11916 * linux-arm-low.c (init_registers_arm): Add prototype.
11917 (init_registers_arm_with_iwmmxt): Likewise.
11918 (the_low_target): Add initializer for arch_setup field.
11919 * linux-cris-low.c (init_registers_cris): Add prototype.
11920 (the_low_target): Add initializer for arch_setup field.
11921 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11922 (the_low_target): Add initializer for arch_setup field.
11923 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11924 (the_low_target): Add initializer for arch_setup field.
11925 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11926 (the_low_target): Add initializer for arch_setup field.
11927 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11928 (the_low_target): Add initializer for arch_setup field.
11929 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11930 (the_low_target): Add initializer for arch_setup field.
11931 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11932 (init_registers_mips64_linux): Likewise.
11933 (the_low_target): Add initializer for arch_setup field.
11934 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11935 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11936 (the_low_target): Add initializer for arch_setup field.
11937 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11938 (init_registers_powerpc_64): Likewise.
11939 (the_low_target): Add initializer for arch_setup field.
11940 * linux-s390-low.c (init_registers_s390): Add prototype.
11941 (init_registers_s390x): Likewise.
11942 (the_low_target): Add initializer for arch_setup field.
11943 * linux-sh-low.c (init_registers_sh): Add prototype.
11944 (the_low_target): Add initializer for arch_setup field.
11945 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11946 (the_low_target): Add initializer for arch_setup field.
11947 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11948 (the_low_target): Add initializer for arch_setup field.
11949
11950 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11951 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11952 instead of init_registers ().
11953 * win32-arm-low.c (init_registers_arm): Add prototype.
11954 (the_low_target): Add initializer for arch_setup field.
11955 * win32-i386-low.c (init_registers_i386): Add prototype.
11956 (the_low_target): Add initializer for arch_setup field.
11957
11958 * spu-low.c (init_registers_spu): Add prototype.
11959 (initialize_low): Call initialie_registers_spu () instead of
11960 initialize_registers ().
11961
11962 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11963
11964 * server.c (handle_v_requests): When handling the vRun and vAttach
11965 packets, if already debugging a process, don't kill it. Return an
11966 error instead.
11967
11968 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11969
11970 * server.c (handle_query): Correct length check.
11971
11972 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11973
11974 * win32-low.c (do_initial_child_stuff): Add process handle
11975 parameter. Set current_process_handle and current_process_id from the
11976 parameters. Clear globals.
11977 (win32_create_inferior): Don't set current_process_handle and
11978 current_process_id here. Instead pass them on the call to
11979 do_initial_child_stuff.
11980 (win32_attach): Likewise.
11981 (win32_clear_inferiors): New.
11982 (win32_kill): Don't close the current process handle or the
11983 current thread handle here. Instead call win32_clear_inferiors.
11984 (win32_detach): Don't open a new handle to the process. Call
11985 win32_clear_inferiors.
11986 (win32_join): Don't rely on current_process_handle; open a new
11987 handle using the process id.
11988 (win32_wait): Call win32_clear_inferiors when the inferior process
11989 has exited.
11990
11991 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11992
11993 * server.c (monitor_show_help): Add "exit".
11994
11995 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11996
11997 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11998 (clean): Add reg-xtensa.c.
11999 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12000 * configure.srv (xtensa*-*-linux*) New target.
12001 * linux-xtensa-low.c: New.
12002 * xtensa-xtregs.c: New.
12003
12004 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12005
12006 * hostio.c: Don't include errno.h.
12007 (errno_to_fileio_errno): Move to hostio-errno.
12008 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12009 error number outputting to the target->hostio_last_error callback.
12010 (hostio_packet_error): Use FILEIO_EINVAL directly.
12011 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12012 calls to hostio_error.
12013 * hostio-errno.c: New.
12014 * server.h (hostio_last_error_from_errno): Declare.
12015 * target.h (target_ops): Add hostio_last_error member.
12016 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12017 as hostio_last_error handler.
12018 * spu-low.c (spu_target_ops): Likewise.
12019 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12020 (wince_hostio_last_error): New functions.
12021 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12022 as hostio_last_error handler.
12023 (win32_target_ops) [!_WIN32_WCE]: Register
12024 hostio_last_error_from_errno as hostio_last_error handler.
12025 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12026 (hostio-errno.o): New rule.
12027 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12028 * configure.srv (srv_hostio_err_objs): New variable. Default to
12029 hostio-errno.o.
12030 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12031 * configure: Regenerate.
12032
12033 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12034
12035 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12036 (linux_kill, linux_detach): Clean up the process list.
12037 * remote-utils.c (remote_open): Improve port number parsing.
12038 (putpkt_binary, input_interrupt): Only send interrupts if the target
12039 is running.
12040 * server.c (extended_protocol): Make static.
12041 (attached): Define earlier.
12042 (exit_requested, response_needed, program_argv): New variables.
12043 (target_running): New.
12044 (start_inferior): Clear attached here.
12045 (attach_inferior): Set attached here.
12046 (require_running): Define.
12047 (handle_query): Use require_running and target_running. Implement
12048 "monitor exit".
12049 (handle_v_attach, handle_v_run): New.
12050 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12051 (gdbserver_usage): Update.
12052 (main): Redo argument parsing. Handle --debug and --multi. Handle
12053 --attach along with other options or after the port. Save
12054 program_argv. Support no initial program. Resynchronize
12055 communication with GDB after an error. Handle "monitor exit".
12056 Use require_running and target_running. Always allow the extended
12057 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12058 restart in extended mode.
12059 * README: Refer to the GDB manual. Update --attach usage.
12060
12061 2007-12-20 Andreas Schwab <schwab@suse.de>
12062
12063 * linux-low.c (STACK_SIZE): Define.
12064 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12065 (linux_test_for_tracefork): Likewise.
12066
12067 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12068
12069 * linux-low.c (linux_wait_for_event): Update messages. Do not
12070 reinsert auto-delete breakpoints.
12071 * mem-break.c (struct breakpoint): Change return type of handler to
12072 int.
12073 (set_breakpoint_at): Update handler type.
12074 (reinsert_breakpoint_handler): Return 1 instead of calling
12075 delete_breakpoint.
12076 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12077 setting a new one.
12078 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12079 * mem-break.h (set_breakpoint_at): Update handler type.
12080 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12081 * win32-low.c (auto_delete_breakpoint): New.
12082 (get_child_debug_event): Use it.
12083
12084 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12085
12086 * configure.ac: Check for pread and pwrite.
12087 * hostio.c (handle_pread): Fall back to lseek and read.
12088 (handle_pwrite): Fall back to lseek and write.
12089 * config.in, configure: Regenerated.
12090
12091 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12092
12093 * server.c (myresume): Add own_buf argument.
12094 (main): Update calls.
12095
12096 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12097
12098 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12099 * remote-utils.c (remote_open): Do not call disable_async_io.
12100 (block_async_io): Delete.
12101 (unblock_async_io): Make static.
12102 (initialize_async_io): New.
12103 * server.c (handle_v_cont): Handle async I/O here.
12104 (myresume): Likewise. Move other common resume tasks here...
12105 (main): ... from here. Call initialize_async_io. Disable async
12106 I/O before the main loop.
12107 * server.h (initialize_async_io): Declare.
12108 (block_async_io, unblock_async_io): Delete prototypes.
12109 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12110
12111 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12112
12113 * remote-utils.c (readchar): Allow binary data in received messages.
12114
12115 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12116
12117 * win32-low.c (attaching): New global.
12118 (win32_create_inferior): Clear the `attaching' global.
12119 (win32_attach): Set the `attaching' global.
12120 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12121 attaching. Only set a breakpoint at the entry point if not
12122 attaching.
12123
12124 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12125
12126 * server.c (main): Don't report dll events on the initial
12127 connection on attaches.
12128
12129 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12130
12131 * server.c (main): Relax numerical bases supported for the pid of
12132 the --attach command line argument.
12133
12134 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12135
12136 * win32-low.c (win32_attach): Call OpenProcess before
12137 DebugActiveProcess, not after. Add last error output to error
12138 call.
12139
12140 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12141
12142 * win32-low.c (win32_get_thread_context)
12143 (win32_set_thread_context): New functions.
12144 (thread_rec): Use win32_get_thread_context.
12145 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12146 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12147 field.
12148
12149 2007-12-03 Leo Zayas
12150 Pedro Alves <pedro_alves@portugalmail.pt>
12151
12152 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12153 global variables.
12154 (child_add_thread): Minor cleanup.
12155 (child_continue): Resume artificially suspended threads before
12156 calling ContinueDebugEvent.
12157 (suspend_one_thread): New.
12158 (fake_breakpoint_event): New.
12159 (get_child_debug_event): Change return type to int. Check here if
12160 gdb sent an interrupt request. If a soft interrupt was requested,
12161 fake a breakpoint event. Return 0 if there is no event to handle,
12162 and 1 otherwise.
12163 (win32_wait): Don't check here if gdb sent an interrupt request.
12164 Ensure there is a valid event to handle.
12165 (win32_request_interrupt): Add soft interruption method as last
12166 resort.
12167
12168 2007-12-03 Leo Zayas
12169 Pedro Alves <pedro_alves@portugalmail.pt>
12170
12171 * win32-low.h (win32_thread_info): Add descriptions to the
12172 structure members. Replace `suspend_count' counter by a
12173 `suspended' flag.
12174 * win32-low.c (thread_rec): Update condition of when to get the
12175 context from the inferior. Rely on ContextFlags being set if it
12176 has already been retrieved. Only suspend the inferior thread if
12177 we haven't already. Warn if that fails.
12178 (continue_one_thread): s/suspend_count/suspended/. Only call
12179 ResumeThread once. Warn if that fails.
12180
12181 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12182
12183 * win32-low.c (win32_wait): Don't read from the inferior when it
12184 has already exited.
12185
12186 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12187
12188 * Makefile.in (win32_low_h): New variable.
12189 (win32-low.o): Add dependency on $(win32_low_h).
12190 (win32-arm-low.o, win32-i386-low.o): New rules.
12191
12192 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12193
12194 * hostio.c: Correct copyright year.
12195
12196 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12197
12198 * Makefile.in (OBS): Add hostio.o.
12199 (hostio.o): New rule.
12200 * server.h (handle_vFile): Declare.
12201 * hostio.c: New file.
12202 * server.c (handle_v_requests): Take packet_len and new_packet_len
12203 for binary packets. Call handle_vFile.
12204 (main): Update call to handle_v_requests.
12205
12206 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12207
12208 * linux-low.c: Include <sched.h>.
12209
12210 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12211
12212 * linux-low.c (linux_tracefork_grandchild): New.
12213 (linux_tracefork_child): Use clone.
12214 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12215
12216 2007-10-31 Joel Brobecker <brobecker@adacore.com>
12217
12218 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12219
12220 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12221
12222 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12223
12224 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12225
12226 * inferiors.c (change_inferior_id): Delete.
12227 (add_pid_to_list, pull_pid_from_list): New.
12228 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12229 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12230 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12231 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12232 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12233 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12234 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12235 (using_threads): Always set to 1.
12236 (handle_extended_wait): New.
12237 (add_process): Do not set TID.
12238 (linux_create_inferior): Set must_set_ptrace_flags.
12239 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12240 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12241 (linux_thread_alive): Rename TID argument to LWPID.
12242 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12243 (linux_wait_for_event): Do not use TID or check using_threads. Update
12244 call to dead_thread_notify. Call handle_extended_wait.
12245 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12246 (send_sigstop): Delete sigstop_sent.
12247 (wait_for_sigstop): Avoid TID.
12248 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12249 (linux_test_for_tracefork): New.
12250 (linux_lookup_signals): Use thread_db_active and
12251 linux_supports_tracefork_flag.
12252 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12253 * linux-low.h (get_process_thread): Avoid TID.
12254 (struct process_ifo): Move thread_known and tid to the end. Remove
12255 sigstop_sent.
12256 (linux_attach_lwp, thread_db_init): Update prototypes.
12257 * server.h (change_inferior_id): Delete prototype.
12258 (add_pid_to_list, pull_pid_from_list): New prototypes.
12259 * thread-db.c (thread_db_use_events): New.
12260 (find_first_thread): Rename to...
12261 (find_one_thread): ...this. Update callers and messages. Do not
12262 call fatal. Check thread_db_use_events. Do not call
12263 change_inferior_id or new_thread_notify.
12264 (maybe_attach_thread): Update. Do not call new_thread_notify.
12265 (thread_db_init): Set thread_db_use_events. Check use_events.
12266 * utils.c (fatal, warning): Correct message prefix.
12267
12268 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12269
12270 * Makefile.in (clean): Remove new files.
12271 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12272 (powerpc-64.o, powerpc-64.c): New rules.
12273 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12274 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12275 with SPE.
12276 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12277 SPE targets.
12278 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12279 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12280 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12281 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12282 (target_regsets): Add AltiVec and SPE register sets.
12283 * configure.ac: Check for AltiVec and SPE.
12284 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12285 (ppc_fill_vrregset, ppc_store_vrregset): New.
12286 (target_regsets): Add AltiVec register set.
12287 * configure: Regenerated.
12288
12289 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12290
12291 * linux-low.c (O_LARGEFILE): Define.
12292 (linux_read_memory): Use /proc/PID/mem.
12293 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12294 * configure, config.in: Regenerated.
12295
12296 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12297
12298 * linux-low.c (linux_wait_for_event): Do not pass signals while
12299 single-stepping.
12300
12301 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12302
12303 * win32-low.c (create_process): New.
12304 (win32_create_inferior): Use create_process instead of
12305 CreateProcess. If create_process failed retry appending an ".exe"
12306 suffix. Store the GetLastError result immediatelly after
12307 create_process calls and use it on the call to error.
12308
12309 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12310
12311 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12312
12313 2007-08-23 Joel Brobecker <brobecker@adacore.com>
12314
12315 * configure.ac: Switch license to GPLv3.
12316
12317 2007-08-01 Michael Snyder <msnyder@access-company.com>
12318
12319 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12320
12321 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12322
12323 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12324 typedef.
12325 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12326 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12327 CloseToolhelp32Snapshot.
12328 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12329 CloseToolhelp32Snapshot.
12330
12331 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
12332
12333 * server.c (main): Check for inferior exit before main loop.
12334
12335 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12336
12337 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12338 instead of on tmp_desc.
12339
12340 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12341 Daniel Jacobowitz <dan@codesourcery.com>
12342
12343 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12344 (add_thread): Minor cleanups.
12345 (clear_inferiors): Move lower in the file. Clear the DLL
12346 list.
12347 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12348 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12349 (xml_escape_text): New.
12350 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12351 for qSupported.
12352 (handle_v_cont): Report errors.
12353 (gdbserver_version): Update.
12354 (main): Correct size of own_buf. Do not report initial DLL events.
12355 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12356 (unloaded_dll, xml_escape_text): New.
12357 * win32-low.c (enum target_waitkind): Update comments.
12358 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12359 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12360 (win32_EnumProcessModules, win32_GetModuleInformation)
12361 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12362 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12363 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12364 (win32_Module32First, win32_Module32Next, load_toolhelp)
12365 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12366 (get_child_debug_event): Handle DLL events.
12367 (win32_wait): Likewise.
12368
12369 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12370
12371 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12372 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12373
12374 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12375
12376 * win32-low.c (handle_output_debug_string): Ignore event if not
12377 waiting.
12378
12379 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12380
12381 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12382
12383 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12384
12385 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12386
12387 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12388
12389 * inferiors.c (change_inferior_id): Add comment.
12390 * linux-low.c (check_removed_breakpoint): Add an early
12391 prototype. Improve debug output.
12392 (linux_attach): Doc update.
12393 (linux_detach_one_process, linux_detach): Clean up before releasing
12394 each process.
12395 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12396 * linux-low.h (struct process_info): Doc improvement.
12397 * mem-break.c (delete_all_breakpoints): New.
12398 * mem-break.h (delete_all_breakpoints): New prototype.
12399 * thread-db.c (find_first_thread): New.
12400 (thread_db_create_event): Call it instead of
12401 thread_db_find_new_threads. Clean up unused variables.
12402 (maybe_attach_thread): Remove first thread handling.
12403 (thread_db_find_new_threads): Use find_first_thread.
12404 (thread_db_get_tls_address): Likewise.
12405
12406 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12407
12408 * thread-db.c (thread_db_find_new_threads): Add prototype.
12409 (thread_db_create_event): Check for the main thread before adding
12410 a new thread.
12411 (maybe_attach_thread): Only enable event reporting if TID == 0.
12412 (thread_db_get_tls_address): Check for new threads.
12413
12414 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12415
12416 * linux-low.c (linux_create_inferior): Try execv before execvp.
12417 * spu-low.c (spu_create_inferior): Likewise.
12418
12419 2007-06-13 Mike Frysinger <vapier@gentoo.org>
12420
12421 * linux-low.c (linux_create_inferior): Change execv to execvp.
12422 * spu-low.c (spu_create_inferior): Likewies.
12423
12424 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12425
12426 * Makefile.in (clean): Clean new files instead of deleted ones.
12427 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12428 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12429 rules.
12430 * configure.srv: Specify XML files and new regformats for MIPS and
12431 MIPS64 GNU/Linux.
12432 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12433 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12434 an entry for the restart register.
12435 (mips_cannot_fetch_register, mips_cannot_store_register)
12436 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12437 register names to match the XML descriptions.
12438 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12439 restart register instead of $0.
12440
12441 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12442 Markus Deuling <deuling@de.ibm.com>
12443
12444 * remote-utils.c (decode_xfer_write): New function.
12445 * server.h (decode_xfer_write): Add prototype.
12446 * server.c (handle_query): Add PACKET_LEN argument. Support
12447 qXfer:spu:read and qXfer:spu:write packets.
12448 (main): Pass packet_len to handle_query.
12449 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12450 * target.h (target_ops): Add qxfer_spu.
12451
12452 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12453
12454 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12455 accessing non-seekable spufs files.
12456
12457 2007-05-16 Markus Deuling <deuling@de.ibm.com>
12458
12459 * server.c (handle_query): Add reply for qC packet.
12460
12461 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12462 Leo Zayas <lerele@champenstudios@com>
12463
12464 * server.h (check_remote_input_interrupt_request): New function.
12465 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12466 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12467 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12468 (check_remote_input_interrupt_request): New function.
12469 * server.h (check_remote_input_interrupt_request): Declare.
12470 * win32-low.c (winapi_DebugBreakProcess,
12471 winapi_GenerateConsoleCtrlEvent): New typedefs.
12472 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12473 to 250 ms.
12474 (win32_wait): Check for remote interrupt request
12475 with check_remote_input_interrupt_request.
12476 (win32_request_interrupt): New function.
12477 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12478
12479 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12480
12481 * win32-low.c (debug_registers_changed,
12482 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12483 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12484 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12485 (thread_rec): Get context using the low target.
12486 (child_add_thread): Call thread_added on the low target,
12487 which does the same thing.
12488 (regptr): Delete.
12489 (do_initial_child_stuff): Remove debug registers references.
12490 Set context using the low target. Resume threads after
12491 setting the contexts.
12492 (child_continue): Remove dead variable. Remove debug
12493 registers references.
12494 (child_fetch_inferior_registers): Go through the low target.
12495 (do_child_store_inferior_registers): Remove.
12496 (child_store_inferior_registers): Go through the low target.
12497 (win32_resume): Remove debug registers references.
12498 Set context using the low target.
12499 (handle_exception): Change return type to void. Don't record
12500 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12501 first chance exception.
12502 (get_child_debug_event): Change return type to void. Remove
12503 goto loop. Always return after waiting for debug event.
12504 (win32_wait): Convert to switch statement. Handle spurious
12505 events.
12506
12507 * win32-i386-low.c (debug_registers_changed,
12508 debug_registers_used): New.
12509 (initial_stuff): Rename to ...
12510 (i386_initial_stuff): ... this. Clear debug registers
12511 state variables.
12512 (store_debug_registers): Delete.
12513 (i386_get_thread_context): New.
12514 (load_debug_registers): Delete.
12515 (i386_set_thread_context): New.
12516 (i386_thread_added): New.
12517 (single_step): Rename to ...
12518 (i386_single_step): ... this.
12519 (do_fetch_inferior_registers): Rename to ...
12520 (i386_fetch_inferior_register): ... this.
12521 (i386_store_inferior_register): New.
12522 (the_low_target): Adapt to new interface.
12523
12524 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12525 (arm_get_thread_context): New.
12526 (arm_set_thread_context): New.
12527 (regptr): New.
12528 (do_fetch_inferior_registers): Rename to ...
12529 (arm_fetch_inferior_register): ... this.
12530 (arm_store_inferior_register): New.
12531 (arm_wince_breakpoint): Reimplement as unsigned long.
12532 (arm_wince_breakpoint_len): Define.
12533 (the_low_target): Adapt to new interface.
12534
12535 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12536 load_debug_registers. Add get_thread_context, set_thread_context,
12537 thread_added and store_inferior_register. Rename
12538 fetch_inferior_registers to fetch_inferior_register.
12539 (regptr): Remove declaration.
12540
12541 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12542
12543 * linux-low.c (linux_detach): Change return type to int. Return 0.
12544 * spu-low.c (spu_detach): Likewise.
12545
12546 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12547
12548 * target.h (target_ops): Change return type of detach to int.
12549 Add join.
12550 (join_inferior): New.
12551 * server.c (main): Don't skip detach support on mingw32.
12552 If the inferior doesn't support detaching return error.
12553 Call join_inferior instead of using waitpid.
12554 * linux-low.c (linux_join): New.
12555 (linux_target_op): Add linux_join.
12556 * spu-low.c (spu_join): New.
12557 (spu_target_ops): Add spu_join.
12558 * win32-low.c (win32_detach): Adapt to new interface.
12559 Reopen current_process_handle before detaching. Issue a child
12560 resume before detaching.
12561 (win32_join): New.
12562 (win32_target_op): Add win32_join.
12563
12564 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12565
12566 * win32-low.c (win32-attach): Fix return value.
12567 * target.h (target_ops): Describe ATTACH return values.
12568
12569 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12570
12571 * win32-low.c (GETPROCADDRESS): Define.
12572 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12573 (winapi_DebugSetProcessKillOnExit): Likewise.
12574 (win32_create_inferior): Force usage of ansi CreateProcessA.
12575 (win32_attach): Use GETPROCADDRESS.
12576 (win32_detach): Likewise.
12577
12578 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12579
12580 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12581
12582 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12583
12584 * win32-low.c: Commit leftover changes from 2007-03-29.
12585
12586 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12587
12588 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12589 fields short instead of int. Add explicit padding.
12590 (i387_cache_to_fsave): Remove unnecessary casts.
12591 (i387_fsave_to_cache): Doc fix.
12592 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12593
12594 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12595
12596 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12597 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12598
12599 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12600
12601 * configure.srv (arm*-*-mingw32ce*): Move near the other
12602 arm targets.
12603
12604 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12605
12606 * configure.ac: Add errno checking.
12607 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12608 sys/file.h and malloc.h.
12609 (AC_CHECK_DECLS): Add perror.
12610 (srv_mingwce): Handle.
12611 * configure.srv (i[34567]86-*-cygwin*): Add
12612 win32-i386-low.o to srv_tgtobj.
12613 (i[34567]86-*-mingw*): Likewise.
12614 (arm*-*-mingw32ce*): Add case.
12615 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12616 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12617 [__MINGW32CE__] (strerror): New function.
12618 [__MINGW32CE__] (errno): Define to GetLastError.
12619 [__MINGW32CE__] (COUNTOF): New macro.
12620 (remote_open): Remove extra close call.
12621 * mem-break.c (delete_breakpoint_at): New function.
12622 * mem-break.h (delete_breakpoint_at): Declare.
12623 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12624 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12625 [USE_WIN32API] (read, write): Add char* casts.
12626 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12627 * server.h: Include wincecompat.h on Windows CE.
12628 [HAVE_ERRNO_H]: Check.
12629 (perror): Declare if not declared.
12630 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12631 (perror_with_name): Remove errno declaration.
12632 * wincecompat.h: New.
12633 * wincecompat.c: New.
12634 * win32-low.h: New.
12635 * win32-arm-low.c: New.
12636 * win32-i386-low.c: New.
12637 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12638 (OUTMSG2): Make it safe.
12639 (_T): New macro.
12640 (COUNTOF): New macro.
12641 (NUM_REGS): Get it from the low target.
12642 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12643 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12644 (thread_rec): Let low target handle debug registers.
12645 (child_add_thread): Likewise.
12646 (child_init_thread_list): Likewise.
12647 (continue_one_thread): Likewise.
12648 (regptr): New.
12649 (do_child_fetch_inferior_registers): Move to ...
12650 * win32-i386-low.c: ... here, and rename to ...
12651 (do_fetch_inferior_registers): ... this.
12652 * win32-low.c (child_fetch_inferior_registers):
12653 Go through the low target.
12654 (do_child_store_inferior_registers): Use regptr.
12655 (strwinerror): New function.
12656 (win32_create_inferior): Handle Windows CE.
12657 Use strwinerror instead of strerror on Windows error
12658 codes. Add program to the error output.
12659 Don't close the main thread handle on Windows CE.
12660 (win32_attach): Use coredll.dll on Windows CE.
12661 (win32_kill): Close current process and current
12662 thread handles.
12663 (win32_detach): Use coredll.dll on Windows CE.
12664 (win32_resume): Let low target handle debug registers, and
12665 step request.
12666 (handle_exception): Add/Remove initial breakpoint. Avoid
12667 non-existant WSTOPSIG on Windows CE.
12668 (win32_read_inferior_memory): Cast to remove warning.
12669 (win32_arch_string): Go through the low target.
12670 (initialize_low): Call set_breakpoint_data with the low
12671 target's breakpoint.
12672 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12673 FOP_REGNUM, mappings): Move to ...
12674 * win32-i386-low.c: ... here.
12675 * win32-low.c (win32_thread_info): Move to ...
12676 * win32-low.h: ... here.
12677 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12678 win32-arm-low.c and wincecompat.c.
12679 (all:): Add $EXEEXT.
12680 (install-only:): Likewise.
12681 (gdbserver:): Likewise.
12682 (gdbreplay:): Likewise.
12683 * config.in: Regenerate.
12684 * configure: Regenerate.
12685
12686 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12687
12688 * win32-low.c: Rename typedef thread_info to
12689 win32_thread_info throughout.
12690
12691 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12692
12693 * win32-i386-low.c: Rename to ...
12694 * win32-low.c: ... this.
12695 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12696 * Makefile.in: Likewise.
12697
12698 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12699
12700 * remote-utils.c (monitor_output): Constify msg parameter.
12701 * server.h (monitor_output): Likewise.
12702 * win32-i386-low.c (handle_output_debug_string): New.
12703 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12704 handle_output_debug_string.
12705 (get_child_debug_event): Likewise.
12706
12707 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12708
12709 * server.c (main): Correct strtoul check.
12710
12711 2007-03-27 Jon Ringle <jon@ringle.org>
12712
12713 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12714
12715 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12716
12717 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12718
12719 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12720
12721 * terminal.h: Check HAVE_SGTTY_H.
12722
12723 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12724
12725 * remote-utils.c (remote_open): Print out the assigned port number.
12726
12727 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12728
12729 * remote-utils.c (monitor_output): New function.
12730 * server.c (debug_threads): Define here.
12731 (monitor_show_help): New function.
12732 (handle_query): Handle qRcmd.
12733 (main): Do not handle 'd' packet.
12734 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12735 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12736 of debug_threads.
12737
12738 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12739
12740 * Makefile.in (EXEEXT): New.
12741 (clean): Use $(EXEEXT).
12742
12743 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12744
12745 * target.h (target_ops): Rename send_signal to request_interrupt,
12746 and remove enum target_signal parameter.
12747 * linux-low.c (linux_request_interrupt): Rename from
12748 linux_send_signal, and always send SIGINT.
12749 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12750 and always send SIGINT.
12751 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12752 of send_signal.
12753 (input_interrupt): Likewise.
12754
12755 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12756
12757 * server.c (get_features_xml): Check if target implemented
12758 arch_string.
12759 * win32-i386-low.c (win32_arch_string): New.
12760 (win32_target_ops): Add win32_arch_string as arch_string member.
12761
12762 2007-02-22 Markus Deuling <deuling@de.ibm.com>
12763
12764 * spu-low.c (spu_arch_string): New.
12765 (spu_target_ops): Add spu_arch_string.
12766
12767 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12768
12769 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12770 * configure.ac: Do not check for terminal.h.
12771 * configure, config.in: Regenerated.
12772
12773 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12774
12775 * Makefile.in (OBS): Add $(XML_BUILTIN).
12776 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12777 (clean): Update.
12778 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12779 (arm-with-iwmmxt.c): New.
12780 * config.in, configure: Regenerate.
12781 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12782 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12783 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12784 (arm*-*-linux*): Add iWMMXt and regset support.
12785 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12786 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12787 (arm_store_wmmxregset, target_regsets): New.
12788 * server.c (get_features_xml): Take annex argument. Check builtin
12789 XML documents.
12790 (handle_query): Handle multiple annexes.
12791
12792 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12793
12794 * remote-utils.c [USE_WIN32API] (read, write): Define.
12795 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12796 write.
12797
12798 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12799
12800 * linux-i386-low.c (the_low_target): Set arch_string.
12801 * linux-x86-64-low.c (the_low_target): Likewise.
12802 * linux-low.c (linux_arch_string): New.
12803 (linux_target_ops): Add it.
12804 * linux-low.h (struct linux_target_ops): Add arch_string.
12805 * server.c (write_qxfer_response): Use const void * for DATA.
12806 (get_features_xml): New.
12807 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12808 * target.h (struct target_ops): Add arch_string method.
12809
12810 2007-01-03 Denis Pilat <denis.pilat@st.com>
12811 Daniel Jacobowitz <dan@codesourcery.com>
12812
12813 * linux-low.c (linux_kill): Handle being called with no threads.
12814 * win32-i386-low.c (win32_kill): Likewise.
12815 (get_child_debug_event): Clear current_process_handle.
12816
12817 2006-12-30 Denis PILAT <denis.pilat@st.com>
12818 Daniel Jacobowitz <dan@codesourcery.com>
12819
12820 * remote-utils.c (remote_open): Check the type of specified
12821 serial port devices before opening them.
12822 * server.c (main): Kill the inferior if an error occurs during
12823 the first remote_open.
12824
12825 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12826
12827 * README: Update supported targets.
12828
12829 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12830
12831 * Makefile.in (clean): Remove reg-mips64.c.
12832 (reg-mips64.c, reg-mips64.o): New rules.
12833 * configure.srv: Handle mips64. Include regset support for mips.
12834 * linux-mips-low.c (union mips_register): New.
12835 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12836 (mips_breakpoint, mips_breakpoint_at): Use int.
12837 (mips_collect_register, mips_supply_register)
12838 (mips_collect_register_32bit, mips_supply_register_32bit)
12839 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12840 (mips_store_fpregset, target_regsets): New.
12841 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12842
12843 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12844
12845 * configure.srv: Add target "spu*-*-*".
12846 * Makefile.in (clean): Remove reg-spu.c.
12847 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12848 * spu-low.c: New file.
12849
12850 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12851
12852 * configure.ac: Correct td_thr_tls_get_addr test.
12853 * configure: Regenerated.
12854
12855 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12856
12857 * linux-low.c (linux_wait_for_event): Reformat. Use the
12858 pass_signals array.
12859 * remote-utils.c (decode_address_to_semicolon): New.
12860 * server.c (pass_signals, handle_general_set): New.
12861 (handle_query): Mention QPassSignals for qSupported.
12862 (main): Call handle_general_set.
12863 * server.h (pass_signals, decode_address_to_semicolon): New.
12864
12865 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12866
12867 * server.c (handle_query): Correct error handling for read_auxv.
12868
12869 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12870
12871 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12872 and srv_linux_thread_db to yes.
12873 * linux-s390-low.c (s390_fill_gregset): New function.
12874 (target_regsets): Define data structure.
12875
12876 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12877
12878 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12879 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12880 * config.in, configure: Regenerated.
12881 * inferiors.c (gdb_id_to_thread): New function.
12882 (gdb_id_to_thread_id): Use it.
12883 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12884 * linux-low.h (struct process_info): Add th member.
12885 (thread_db_get_tls_address): New prototype.
12886 * remote-utils.c (decode_address): Make non-static.
12887 * server.c (handle_query): Handle qGetTLSAddr.
12888 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12889 * target.h (struct target_ops): Add get_tls_address.
12890 * thread-db.c (maybe_attach_thread): Save the thread handle.
12891 (thread_db_get_tls_address): New.
12892
12893 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12894
12895 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12896 (linux_resume_one_process): Take a siginfo_t *. Update all
12897 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12898 (struct pending_signals): Add a siginfo_t.
12899 (linux_wait_for_process): Always set last_status.
12900 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12901 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12902 * linux-low.h (struct process_info): Add last_status.
12903
12904 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12905
12906 * remote-utils.c (try_rle): New function.
12907 (putpkt_binary): Use it.
12908
12909 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12910
12911 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12912 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12913 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12914 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12915 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12916 point registers.
12917
12918 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12919
12920 * server.c (terminal_fd): New variable.
12921 (old_foreground_pgrp): Likewise.
12922 (restore_old_foreground_pgrp): New function.
12923 (start_inferior): Record the terminal file descriptor in terminal_fd
12924 and its original foreground group in old_foreground_pgrp. Register
12925 restore_old_foreground_pgrp with atexit().
12926
12927 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12928
12929 * server.c (handle_query): Correct qPart to qXfer.
12930
12931 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12932
12933 * configure.ac: Check for more headers which are missing on
12934 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12935 * configure.srv: Add Cygwin and mingw32.
12936 * remote-utils.c: Don't include headers unconditionally which
12937 are missing on mingw32. Include <winsock.h> for mingw32.
12938 (remote_open): Adjust for mingw32 support. Flush
12939 standard error after writing to it.
12940 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12941 (unblock_async_io, enable_async_io, disable_async_io)
12942 (readchar, getpkt): Update for Winsock support.
12943 (prepare_resume_reply): Expect a protocol signal number.
12944 * server.c: Disable <sys/wait.h> on mingw32.
12945 (start_inferior): Adjust for mingw32 support. Flush
12946 standard error after writing to it.
12947 (attach_inferior): Likewise. Use protocol signal
12948 numbers.
12949 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12950 and names.
12951 * win32-i386-low.c: New file.
12952 * Makefile.in (XM_CLIBS): Set.
12953 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12954 (win32-i386-low.o): New dependency rule.
12955 * linux-low.c (linux_wait): Use target signal numbers.
12956 * target.h (struct target_ops): Doc fix.
12957 * server.h (target_signal_to_name): New prototype.
12958 * gdbreplay.c: Don't include headers unconditionally which
12959 are missing on mingw32. Include <winsock.h> for mingw32.
12960 (remote_close, remote_open): Adjust for Winsock support.
12961 * configure, config.in: Regenerated.
12962
12963 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12964
12965 * server.c (decode_xfer_read, write_qxfer_response): New.
12966 (handle_query): Take a packet length argument. Handle
12967 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12968 the qSupported response.
12969 (main): Update call to handle_query.
12970
12971 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12972
12973 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12974 (putpkt_binary): Renamed from putpkt and adjusted for binary
12975 data.
12976 (putpkt): New wrapper for putpkt_binary.
12977 (readchar): Don't mask off the high bit.
12978 (decode_X_packet): New function.
12979 * server.c (main): Call putpkt_binary if a handler sets the packet
12980 length. Save the length of the incoming packet. Handle 'X'.
12981 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12982
12983 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12984
12985 * server.c (handle_query): Handle qSupported.
12986
12987 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12988
12989 * remote-utils.c (all_symbols_looked_up): New variable.
12990 (look_up_one_symbol): Check it.
12991 * server.h (look_up_one_symbol): New declaration.
12992 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12993
12994 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12995
12996 * Makefile.in (linux-arm-low.o): Update dependencies.
12997 * linux-arm-low.c: Include "gdb_proc_service.h".
12998 (PTRACE_GET_THREAD_AREA): Define.
12999 (ps_get_thread_area): New function.
13000
13001 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13002
13003 * configure.srv (m68k*-*-uclinux*): New target.
13004 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13005 (linux_resume_one_process): Remove extraneous cast.
13006 (linux_read_offsets): New.
13007 (linux_target_op): Add linux_read_offsets on mmuless systems.
13008 * server.c (handle_query): Add qOffsets logic.
13009 * target.h (struct target_ops): Add read_offsets.
13010
13011 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13012
13013 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13014 (PTRACE_GET_THREAD_AREA): Define.
13015 (ps_get_thread_area): New function.
13016 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13017 (linux-x86-64-low.o): Update.
13018
13019 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13020
13021 * configure.ac: Remove checks for prfpregset_t.
13022 * gdb_proc_service.h: New file.
13023 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13024 new "gdb_proc_service.h".
13025 * proc-service.c: Likewise.
13026 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13027 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13028 * Makefile.in (gdb_proc_service_h): Updated.
13029 * configure, config.in: Regenerated.
13030
13031 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13032
13033 * remote-utils.c (prepare_resume_reply): Move declaration
13034 of gdb_id_from_wait to the top of the block.
13035
13036 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13037
13038 * linux-low.c (regsets_store_inferior_registers): Read the regset
13039 from the target before filling it.
13040
13041 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13042
13043 * server.c (attach_inferior): Return SIGTRAP for a successful
13044 attach.
13045
13046 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13047
13048 * Makefile.in (OBS): Add version.o.
13049 (STAGESTUFF): Delete.
13050 (version.o): Add dependencies.
13051 (version.c): Replace rule.
13052 (clean): Remove version.c.
13053 * server.c (gdbserver_version): New.
13054 (gdbserver_usage): Use printf.
13055 (main): Handle --version and --help.
13056 * server.h (version, host_name): Add declarations.
13057
13058 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13059
13060 * linux-arm-low.c:
13061 * linux-arm-low.c:
13062 * inferiors.c:
13063 * i387-fp.h:
13064 * i387-fp.c:
13065 * gdbreplay.c:
13066 * regcache.c:
13067 * proc-service.c:
13068 * mem-break.h:
13069 * mem-break.c:
13070 * linux-x86-64-low.c:
13071 * linux-sh-low.c:
13072 * linux-s390-low.c:
13073 * linux-ppc64-low.c:
13074 * linux-ppc-low.c:
13075 * linux-mips-low.c:
13076 * linux-m68k-low.c:
13077 * linux-m32r-low.c:
13078 * linux-low.h:
13079 * linux-low.c:
13080 * linux-ia64-low.c:
13081 * linux-i386-low.c:
13082 * linux-crisv32-low.c:
13083 * thread-db.c:
13084 * terminal.h:
13085 * target.h:
13086 * target.c:
13087 * server.h:
13088 * server.c:
13089 * remote-utils.c:
13090 * regcache.h:
13091 * utils.c:
13092 * Makefile.in:
13093 * configure.ac:
13094 * gdbserver.1: Add (C) after Copyright. Update the FSF
13095 address.
13096
13097 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13098
13099 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13100 (arm_breakpoint_at): Recognize both breakpoints.
13101 (the_low_target): Use the correct breakpoint instruction.
13102
13103 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13104
13105 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13106 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13107 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13108 (the_low_target): Update.
13109
13110 2005-10-25 Andreas Schwab <schwab@suse.de>
13111
13112 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13113
13114 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13115 (ia64_num_regs): Reduce to 462.
13116
13117 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13118
13119 * acinclude.m4: Correct quoting.
13120 * aclocal.m4: Regenerated.
13121
13122 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13123 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13124 (thread_db_init): Call thread_db_err_str.
13125 * configure.ac: Check for TD_VERSION.
13126 * config.in, configure: Regenerated.
13127
13128 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13129
13130 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13131
13132 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13133
13134 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13135 is not available. Define HAVE_PTRACE_GETREGS if it is.
13136 * config.in, configure: Regenerated.
13137 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13138 * linux-i386-low.c, linux-m68k-low.c: Update to use
13139 HAVE_PTRACE_GETREGS.
13140 * linux-low.c (regsets_fetch_inferior_registers)
13141 (regsets_store_inferior_registers): Only return 0 if we processed
13142 GENERAL_REGS.
13143 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13144 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13145
13146 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13147
13148 * inferiors.c (struct thread_info): Add gdb_id.
13149 (add_thread): Add gdb_id argument.
13150 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13151 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13152 calls to add_thread.
13153 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13154 * server.c (handle_query): Use thread_to_gdb_id.
13155 (handle_v_cont, main): Use gdb_id_to_thread_id.
13156 * server.h (add_thread): Update prototype.
13157 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13158 prototypes.
13159
13160 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13161
13162 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13163 left-padded registers.
13164 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13165 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13166
13167 2005-07-01 Steve Ellcey <sje@cup.hp.com>
13168
13169 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13170 * configure: Regenerate.
13171 * config.in: Regenerate.
13172 * server.h (NEED_DECLARATION_STRERROR):
13173 Replace with !HAVE_DECL_STRERROR.
13174
13175 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13176
13177 * linux-low.c (linux_wait, linux_send_signal): Don't test
13178 an unsigned long variable for > 0 if it could be MAX_ULONG.
13179 * server.c (myresume): Likewise.
13180 * target.c (set_desired_inferior): Likewise.
13181
13182 2005-06-13 Mark Kettenis <kettenis@gnu.org>
13183
13184 * configure.ac: Simplify and improve check for socklen_t.
13185 * configure, config.in: Regenerate.
13186
13187 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13188
13189 * acconfig.h: Remove.
13190 * configure.ac: Add a test for socklen_t. Use three-argument
13191 AC_DEFINE throughout.
13192 * config.in: Regenerated using autoheader 2.59.
13193 * configure: Regenerated.
13194
13195 * gdbreplay.c (socklen_t): Provide a default.
13196 (remote_open): Use socklen_t.
13197 * remote-utils.c (socklen_t): Provide a default.
13198 (remote_open): Use socklen_t.
13199 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13200 unsigned char.
13201
13202 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13203 char for buffers.
13204 * linux-low.c (linux_read_memory, linux_write_memory)
13205 (linux_read_auxv): Likewise.
13206 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13207 (check_mem_write): Likewise.
13208 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13209 Likewise.
13210 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13211 (registers_from_string, register_data): Likewise.
13212 * server.c (handle_query, main): Likewise.
13213 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13214 (decode_M_packet): Likewise.
13215 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13216 * target.h (struct target_ops): Update read_memory, write_memory,
13217 and read_auxv.
13218 (read_inferior_memory, write_inferior_memory): Update.
13219 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13220 to unsigned char *.
13221 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13222 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13223 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13224 linux-s390-low.c, linux-sh-low.c: Update for changes in
13225 read_inferior_memory and the_low_target->breakpoint.
13226
13227 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13228
13229 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13230 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13231 * configure.srv: Add powerpc64-*-linux*.
13232 * linux-ppc64-low.c: New file.
13233
13234 2005-05-23 Orjan Friberg <orjanf@axis.com>
13235
13236 * linux-cris-low.c: New file with support for CRIS.
13237 * linux-crisv32-low.c: Ditto for CRISv32.
13238 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13239 (clean): Add reg-cris.c and reg-crisv32.c.
13240 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13241 reg-crisv32.o, and reg-crisv32.c to make rules.
13242 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13243 recognized targets.
13244
13245 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13246
13247 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13248 of sizeof (PTRACE_XFER_TYPE).
13249 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13250
13251 2005-05-12 Orjan Friberg <orjanf@axis.com>
13252
13253 * target.h (struct target_ops): Add insert_watchpoint,
13254 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13255 pointers for hardware watchpoint support.
13256 * linux-low.h (struct linux_target_ops): Ditto.
13257 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13258 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13259 to linux_target_ops.
13260 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13261 reply packet.
13262 * server.c (main): Recognize 'Z' and 'z' packets.
13263
13264 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13265
13266 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13267 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13268 (the_low_target): Add new members.
13269
13270 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13271
13272 * proc-service.c (ps_lgetregs): Search all_processes instead of
13273 all_threads.
13274
13275 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13276
13277 * server.c (start_inferior): Change return type to int.
13278 (attach_inferior): Change sigptr to int *.
13279 (handle_v_cont, handle_v_requests): Change signal to int *.
13280 (main): Change signal to int.
13281
13282 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
13283
13284 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13285 * configure.srv: Add m32r*-*-linux*.
13286 * linux-m32r-low.c: New file.
13287
13288 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13289
13290 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13291
13292 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13293
13294 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13295 Take unsigned long arguments for PIDs.
13296 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13297 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13298 (wait_for_sigstop, linux_resume_one_process)
13299 (regsets_fetch_inferior_registers, linux_send_signal)
13300 (linux_read_auxv): Likewise. Update the types of variables holding
13301 PIDs. Update format string specifiers.
13302 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13303 * remote-utils.c (prepare_resume_reply): Likewise.
13304 * server.c (cont_thread, general_thread, step_thread)
13305 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13306 unsigned long.
13307 (handle_query): Update format specifiers.
13308 (handle_v_cont, main): Use strtoul for thread IDs.
13309 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13310 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13311 (general_thread, step_thread, thread_from_wait)
13312 (old_thread_from_wait): Update.
13313 * target.h (struct thread_resume): Use unsigned long for THREAD.
13314 (struct target_ops): Use unsigned long for arguments to attach and
13315 thread_alive.
13316
13317 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13318
13319 * acinclude.m4: Include bfd/bfd.m4 directly.
13320 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13321 <agriffis@toolchain.org>.
13322 * aclocal.m4, configure: Regenerated.
13323
13324 2005-01-07 Andrew Cagney <cagney@gnu.org>
13325
13326 * configure.ac: Rename configure.in, require autoconf 2.59.
13327 * configure: Re-generate.
13328
13329 2004-12-08 Daniel Jacobowitz <dan@debian.org>
13330
13331 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13332 LIBS when finished.
13333 * aclocal.m4: Regenerated.
13334 * configure: Regenerated.
13335
13336 2004-11-21 Andreas Schwab <schwab@suse.de>
13337
13338 * linux-m68k-low.c (m68k_num_gregs): Define.
13339 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13340 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13341 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13342 (m68k_breakpoint_at): New. Add to the_low_target.
13343
13344 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13345 srv_linux_thread_db to yes.
13346
13347 2004-10-20 Joel Brobecker <brobecker@gnat.com>
13348
13349 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13350 (ARCH_SET_FS): Likewise.
13351 (ARCH_GET_FS): Likewise.
13352 (ARCH_GET_GS): Likewise.
13353
13354 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13355
13356 * linux-i386-low.c (ps_get_thread_area): New.
13357 * linux-x86-64-low.c (ps_get_thread_area): New.
13358 * linux-low.c: Include <sys/syscall.h>.
13359 (linux_kill_one_process): Don't kill the first thread here.
13360 (linux_kill): Kill the first thread here.
13361 (kill_lwp): New function.
13362 (send_sigstop, linux_send_signal): Use it.
13363 * proc-service.c: Clean up #ifdefs.
13364 (fpregset_info): Delete.
13365 (ps_lgetregs): Update and enable implementation.
13366 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13367 implementations.
13368 * remote-utils.c (struct sym_cache, symbol_cache): New.
13369 (input_interrupt): Print a clearer message.
13370 (async_io_enabled): New variable.
13371 (enable_async_io, disable_async_io): Use it. Update comments.
13372 (look_up_one_symbol): Use the symbol cache.
13373 * thread-db.c (thread_db_look_up_symbols): New function.
13374 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13375
13376 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13377
13378 * configure.in: Test for -rdynamic.
13379 * configure: Regenerated.
13380 * Makefile (INTERNAL_LDFLAGS): New.
13381 (gdbserver, gdbreplay): Use it.
13382
13383 2004-09-02 Andrew Cagney <cagney@gnu.org>
13384
13385 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13386
13387 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
13388
13389 * linux-low.c (linux_wait): Clear all_processes list also.
13390
13391 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13392
13393 * linux-low.c: Include <errno.h>. Remove extern declaration of
13394 errno.
13395
13396 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13397
13398 * gdbreplay.c, server.h, utils.c: Update copyright years.
13399
13400 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13401
13402 * server.c (main): Print child status or termination signal from
13403 variable 'signal', not 'sig'.
13404
13405 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13406
13407 * linux-low.c (linux_read_memory): Change return type to
13408 int. Check for and return error from ptrace().
13409 * target.c (read_inferior_memory): Change return type to int. Pass
13410 back return status from the_target->read_memory().
13411 * target.h (struct target_ops): Adapt *read_memory() prototype.
13412 Update comment.
13413 (read_inferior_memory): Adapt prototype.
13414 * server.c (main): Return an error packet if
13415 read_inferior_memory() returns an error.
13416
13417 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
13418
13419 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13420 Unify with other clean targets.
13421
13422 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13423
13424 * server.c (handle_v_cont): Call set_desired_inferior.
13425
13426 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13427
13428 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13429
13430 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13431
13432 * linux-low.c (linux_wait): Unblock async I/O.
13433 (linux_resume): Block and enable async I/O.
13434 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13435 * server.h (block_async_io, unblock_async_io): Add prototypes.
13436
13437 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13438
13439 * remote-utils.c (remote_open): Print a status notice after
13440 opening a TCP port.
13441 * server.c (attach_inferior): Print a status notice after
13442 attaching.
13443
13444 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13445
13446 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13447
13448 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
13449
13450 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13451 error packet.
13452 * server.c, target.h: Update copyright years.
13453
13454 2004-02-25 Roland McGrath <roland@redhat.com>
13455
13456 * target.h (struct target_ops): New member `read_auxv'.
13457 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13458 * linux-low.c (linux_read_auxv): New function.
13459 (linux_target_ops): Initialize `read_auxv' member to that.
13460
13461 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13462
13463 Committed by Jim Blandy <jimb@redhat.com>.
13464
13465 * linux-s390-low.c (s390_num_regs): Update.
13466 (s390_regmap): Remove control registers. Use __s390x__ predefine
13467 instead of GPR_SIZE to distiguish s390 and s390x targets.
13468
13469 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
13470
13471 * linux-low.c: Update copyright year.
13472 (check_removed_breakpoint): Clear pending_is_breakpoint.
13473 (linux_set_resume_request, linux_queue_one_thread)
13474 (resume_status_pending_p): New functions.
13475 (linux_continue_one_thread): Use process->resume.
13476 (linux_resume): Only resume threads if there are no pending events.
13477 * linux-low.h (struct process_info): Add resume request
13478 pointer.
13479
13480 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
13481
13482 * regcache.c (new_register_cache): Clear the allocated register
13483 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13484
13485 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
13486
13487 * linux-low.c (linux_resume): Take a struct thread_resume *
13488 argument.
13489 (linux_wait): Update call.
13490 (resume_ptr): New static variable.
13491 (linux_continue_one_thread): Renamed from
13492 linux_continue_one_process. Use resume_ptr.
13493 (linux_resume): Use linux_continue_one_thread.
13494 * server.c (handle_v_cont, handle_v_requests): New functions.
13495 (myresume): New function.
13496 (main): Handle 'v' case.
13497 * target.h (struct thread_resume): New type.
13498 (struct target_ops): Change argument of "resume" to struct
13499 thread_resume *.
13500 (myresume): Delete macro.
13501
13502 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13503
13504 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13505 (uninstall): Support DESTDIR.
13506
13507 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13508
13509 * configure.srv: Add xscale*linux copy of arm*linux entry.
13510
13511 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
13512
13513 * linux-arm-low.c (arm_reinsert_addr): New function.
13514 (the_low_target): Add arm_reinsert_addr.
13515
13516 2003-07-08 Mark Kettenis <kettenis@gnu.org>
13517
13518 * mem-break.c: Remove whitespace at end of file.
13519
13520 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13521
13522 * configure.in: Check whether we need to prototype strerror.
13523 * server.h: Optionally prototype strerror.
13524 * gdbreplay.c (perror_with_name): Use strerror.
13525 * linux-low.c (linux_attach_lwp): Use strerror.
13526 * utils.c (perror_with_name): Use strerror.
13527 * config.in, configure: Regenerated.
13528
13529 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13530
13531 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13532 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13533
13534 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
13535
13536 * Makefile.in (SFILES): Update.
13537 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13538 low-sun3.c: Remove files.
13539
13540 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
13541
13542 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13543 (linux_detach_one_process, linux_detach): New functions.
13544 (linux_target_ops): Add linux_detach.
13545 * server.c (main): Handle 'D' packet.
13546 * target.h (struct target_ops): Add "detach" member.
13547 (detach_inferior): Define.
13548
13549 2003-06-13 Mark Kettenis <kettenis@gnu.org>
13550
13551 From Kelley Cook <kelleycook@wideopenwest.com>:
13552 * configure.srv: Accept i[34567]86 variants.
13553
13554 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
13555
13556 * linux-low.c (linux_wait_for_event): Correct comment typos.
13557 (linux_resume_one_process): Call check_removed_breakpoint.
13558 (linux_send_signal): New function.
13559 (linux_target_ops): Add linux_send_signal.
13560 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13561 of kill.
13562 * target.h (struct target_ops): Add send_signal.
13563
13564 2003-05-29 Jim Blandy <jimb@redhat.com>
13565
13566 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13567 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13568 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13569 away part of the register's value.
13570
13571 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
13572
13573 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13574 (linux_wait_for_event, linux_init_signals): Likewise.
13575
13576 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
13577
13578 * configure.in: Check for stdlib.h.
13579 * configure: Regenerated.
13580 * config.in: Regenerated.
13581
13582 2003-01-04 Andreas Schwab <schwab@suse.de>
13583
13584 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13585
13586 2003-01-02 Andrew Cagney <ac131313@redhat.com>
13587
13588 * Makefile.in: Remove obsolete code.
13589
13590 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
13591
13592 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13593 defined(PT_FPR0_HI).
13594
13595 2002-11-17 Stuart Hughes <seh@zee2.com>
13596
13597 * linux-arm-low.c (arm_num_regs): Increase.
13598 (arm_regmap): Include status register.
13599
13600 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
13601
13602 * linux-low.c (register_addr): Remove incorrect -1 check.
13603
13604 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
13605
13606 * linux-low.c (linux_create_inferior): Call setpgid. Return
13607 the new PID.
13608 (unstopped_p, linux_signal_pid): Remove.
13609 (linux_target_ops): Remove linux_signal_pid.
13610 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13611 global instead of target method.
13612 * target.h (struct target_ops): Remove signal_pid. Update comment
13613 for create_inferior.
13614 * server.c (signal_pid): New variable.
13615 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
13616 gdbserver. Set the child to be the foreground process group.
13617 (attach_inferior): Set signal_pid.
13618
13619 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
13620
13621 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13622
13623 2002-08-20 Jim Blandy <jimb@redhat.com>
13624
13625 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13626 default for this.
13627
13628 2002-08-01 Andrew Cagney <cagney@redhat.com>
13629
13630 * Makefile.in: Make chill references obsolete.
13631
13632 2002-07-24 Kevin Buettner <kevinb@redhat.com>
13633
13634 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13635 * configure: Regenerate.
13636 * config.in: Regenerate.
13637
13638 2002-07-09 David O'Brien <obrien@FreeBSD.org>
13639
13640 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13641 (perror_with_name, remote_close, remote_open, expect, play): Static.
13642
13643 2002-07-04 Michal Ludvig <mludvig@suse.cz>
13644
13645 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13646 byte offsets instead of an array of indexes.
13647 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13648
13649 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
13650
13651 * regcache.c: Add comment.
13652
13653 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
13654
13655 * thread-db.c: New file.
13656 * proc-service.c: New file.
13657 * acinclude.m4: New file.
13658 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13659 proc-service.o, and thread-db.o.
13660 (linux-low.o): Add USE_THREAD_DB.
13661 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13662 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13663 * aclocal.m4: Regenerated.
13664 * config.in: Regenerated.
13665 * configure: Regenerated.
13666 * configure.in: Check for proc_service.h, sys/procfs.h,
13667 thread_db.h, and linux/elf.h headrs.
13668 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13669 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13670 Check for -lthread_db and thread support.
13671 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13672 PowerPC, and SuperH.
13673 * i387-fp.c: Constify arguments.
13674 * i387-fp.h: Likewise.
13675 * inferiors.c: (struct thread_info): Renamed from
13676 `struct inferior_info'. Remove PID member. Use generic inferior
13677 list header. All uses updated.
13678 (inferiors, signal_pid): Removed.
13679 (all_threads): New variable.
13680 (get_thread): Define.
13681 (add_inferior_to_list): New function.
13682 (for_each_inferior): New function.
13683 (change_inferior_id): New function.
13684 (add_inferior): Removed.
13685 (remove_inferior): New function.
13686 (add_thread): New function.
13687 (free_one_thread): New function.
13688 (remove_thread): New function.
13689 (clear_inferiors): Use for_each_inferior and free_one_thread.
13690 (find_inferior): New function.
13691 (find_inferior_id): New function.
13692 (inferior_target_data): Update argument type.
13693 (set_inferior_target_data): Likewise.
13694 (inferior_regcache_data): Likewise.
13695 (set_inferior_regcache_data): Likewise.
13696 * linux-low.c (linux_bp_reinsert): Remove.
13697 (all_processes, stopping_threads, using_thrads)
13698 (struct pending_signals, debug_threads, pid_of): New.
13699 (inferior_pid): Replace with macro.
13700 (struct inferior_linux_data): Remove.
13701 (get_stop_pc, add_process): New functions.
13702 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13703 Use add_process and add_thread.
13704 (linux_attach_lwp): New function, based on old linux_attach. Use
13705 add_process and add_thread. Set stop_expected for new threads.
13706 (linux_attach): New function.
13707 (linux_kill_one_process): New function.
13708 (linux_kill): Kill all LWPs.
13709 (linux_thread_alive): Use find_inferior_id.
13710 (check_removed_breakpoints, status_pending_p): New functions.
13711 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13712 Update. Use WNOHANG. Wait for cloned processes also. Update process
13713 struct for the found process.
13714 (linux_wait_for_event): New function.
13715 (linux_wait): Use it. Support LWPs.
13716 (send_sigstop, wait_for_sigstop, stop_all_processes)
13717 (linux_resume_one_process, linux_continue_one_process): New functions.
13718 (linux_resume): Support LWPs.
13719 (REGISTER_RAW_SIZE): Remove.
13720 (fetch_register): Use register_size instead. Call supply_register.
13721 (usr_store_inferior_registers): Likewise. Call collect_register.
13722 Fix recursive case.
13723 (regsets_fetch_inferior_registers): Improve error message.
13724 (regsets_store_inferior_registers): Add debugging.
13725 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13726 (unstopped_p, linux_signal_pid): New functions.
13727 (linux_target_ops): Add linux_signal_pid.
13728 (linux_init_signals): New function.
13729 (initialize_low): Call it. Initialize using_threads.
13730 * regcache.c (inferior_regcache_data): Add valid
13731 flag.
13732 (get_regcache): Fetch registers lazily. Add fetch argument
13733 and update all callers.
13734 (regcache_invalidate_one, regcache_invalidate): New
13735 functions.
13736 (new_register_cache): Renamed from create_register_cache.
13737 Return the new regcache.
13738 (free_register_cache): Change argument to a void *.
13739 (registers_to_string, registers_from_string): Call get_regcache
13740 with fetch flag set.
13741 (register_data): Make static. Pass fetch flag to get_regcache.
13742 (supply_register): Call get_regcache with fetch flag clear.
13743 (collect_register): Call get_regcache with fetch flag set.
13744 (collect_register_as_string): New function.
13745 * regcache.h: Update.
13746 * remote-utils.c (putpkt): Flush after debug output and use
13747 stderr.
13748 Handle input interrupts while waiting for an ACK.
13749 (input_interrupt): Use signal_pid method.
13750 (getpkt): Flush after debug output and use stderr.
13751 (outreg): Use collect_register_as_string.
13752 (new_thread_notify, dead_thread_notify): New functions.
13753 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13754 and general_thread.
13755 (look_up_one_symbol): Flush after debug output.
13756 * server.c (step_thread, server_waiting): New variables.
13757 (start_inferior): Don't use signal_pid. Update call to mywait.
13758 (attach_inferior): Update call to mywait.
13759 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13760 (main): Don't fetch/store registers explicitly. Use
13761 set_desired_inferior. Support proposed ``Hs'' packet. Update
13762 calls to mywait.
13763 * server.h: Update.
13764 (struct inferior_list, struct_inferior_list_entry): New.
13765 * target.c (set_desired_inferior): New.
13766 (write_inferior_memory): Constify.
13767 (mywait): New function.
13768 * target.h: Update.
13769 (struct target_ops): New signal_pid method.
13770 (mywait): Removed macro, added prototype.
13771
13772 * linux-low.h (regset_func): Removed.
13773 (regset_fill_func, regset_store_func): New.
13774 (enum regset_type): New.
13775 (struct regset_info): Add type field. Use new operation types.
13776 (struct linux_target_ops): stop_pc renamed to get_pc.
13777 Add decr_pc_after_break and breakpoint_at.
13778 (get_process, get_thread_proess, get_process_thread)
13779 (strut process_info, all_processes, linux_attach_lwp)
13780 (thread_db_init): New.
13781
13782 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13783 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13784 (the_low_target): Add new members.
13785 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13786 (i386_store_fpxregset): Constify.
13787 (target_regsets): Add new kind identifier.
13788 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13789 (i386_set_pc): Add debugging.
13790 (i386_breakpoint_at): New function.
13791 (the_low_target): Add new members.
13792 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13793 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13794 (mips_breakpoint_at): New.
13795 (the_low_target): Add new members.
13796 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13797 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13798 (the_low_target): Add new members.
13799 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13800 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13801 (the_low_target): Add new members.
13802 * linux-x86-64-low.c (target_regsets): Add new kind
13803 identifier.
13804
13805 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
13806
13807 From Martin Pool <mbp@samba.org>:
13808 * server.c (gdbserver_usage): New function.
13809 (main): Call it.
13810
13811 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
13812
13813 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13814 stop_at -> stop_pc.
13815
13816 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13817
13818 * Makefile.in: Remove obsolete code.
13819
13820 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13821
13822 * linux-low.c (regsets_fetch_inferior_registers),
13823 (regsets_store_inferior_registers): Removed cast to int from
13824 ptrace() calls.
13825 * regcache.h: Added declaration of struct inferior_info.
13826
13827 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13828
13829 * inferiors.c (struct inferior_info): Add regcache_data.
13830 (add_inferior): Call create_register_cache.
13831 (clear_inferiors): Call free_register_cache.
13832 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13833 * regcache.c (struct inferior_regcache_data): New.
13834 (registers): Remove.
13835 (get_regcache): New function.
13836 (create_register_cache, free_register_cache): New functions.
13837 (set_register_cache): Don't initialize the register cache here.
13838 (registers_to_string, registers_from_string, register_data): Call
13839 get_regcache.
13840 * regcache.h: Add prototypes.
13841 * server.h: Likewise.
13842
13843 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13844
13845 * mem-break.c: New file.
13846 * mem-break.h: New file.
13847 * Makefile.in: Add mem-break.o rule; update server.h
13848 dependencies.
13849 * inferiors.c (struct inferior_info): Add target_data
13850 member.
13851 (clear_inferiors): Free target_data member if set.
13852 (inferior_target_data, set_inferior_target_data): New functions.
13853 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13854 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13855 * linux-low.c (linux_bp_reinsert): New variable.
13856 (struct inferior_linux_data): New.
13857 (linux_create_inferior): Use set_inferior_target_data.
13858 (linux_attach): Likewise. Call add_inferior.
13859 (linux_wait_for_one_inferior): New function.
13860 (linux_wait): Call it.
13861 (linux_write_memory): Add const.
13862 (initialize_low): Call set_breakpoint_data.
13863 * linux-low.h (struct linux_target_ops): Add breakpoint
13864 handling members.
13865 * server.c (attach_inferior): Remove extra add_inferior
13866 call.
13867 * server.h: Include mem-break.h. Update inferior.c
13868 prototypes.
13869 * target.c (read_inferior_memory)
13870 (write_inferior_memory): New functions.
13871 * target.h (read_inferior_memory)
13872 (write_inferior_memory): Change macros to prototypes.
13873 (struct target_ops): Update comments. Add const to write_memory
13874 definition.
13875
13876 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13877
13878 * linux-low.c (usr_store_inferior_registers): Support
13879 registers which are allowed to fail to store.
13880 * linux-low.h (linux_target_ops): Likewise.
13881 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13882 (ppc_cannot_store_register): FPSCR may not be storable.
13883
13884 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13885
13886 * server.h: Include <string.h> if HAVE_STRING_H.
13887 * ChangeLog: Correct paths in last ChangeLog entry.
13888
13889 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13890
13891 * linux-low.h: Remove obsolete prototypes.
13892 (struct linux_target_ops): New.
13893 (extern the_low_target): New.
13894 * linux-low.c (num_regs, regmap): Remove declarations.
13895 (register_addr): Use the_low_target explicitly.
13896 (fetch_register): Likewise.
13897 (usr_fetch_inferior_registers): Likewise.
13898 (usr_store_inferior_registers): Likewise.
13899 * linux-arm-low.c (num_regs): Remove.
13900 (arm_num_regs): Define.
13901 (arm_regmap): Renamed from regmap, made static.
13902 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13903 made static.
13904 (arm_cannot_store_register): Renamed from cannot_store_register,
13905 made static.
13906 (the_low_target): New.
13907 * linux-i386-low.c (num_regs): Remove.
13908 (i386_num_regs): Define.
13909 (i386_regmap): Renamed from regmap, made static.
13910 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13911 made static.
13912 (i386_cannot_store_register): Renamed from cannot_store_register,
13913 made static.
13914 (the_low_target): New.
13915 * linux-ia64-low.c (num_regs): Remove.
13916 (ia64_num_regs): Define.
13917 (ia64_regmap): Renamed from regmap, made static.
13918 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13919 made static.
13920 (ia64_cannot_store_register): Renamed from cannot_store_register,
13921 made static.
13922 (the_low_target): New.
13923 * linux-m68k-low.c (num_regs): Remove.
13924 (m68k_num_regs): Define.
13925 (m68k_regmap): Renamed from regmap, made static.
13926 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13927 made static.
13928 (m68k_cannot_store_register): Renamed from cannot_store_register,
13929 made static.
13930 (the_low_target): New.
13931 * linux-mips-low.c (num_regs): Remove.
13932 (mips_num_regs): Define.
13933 (mips_regmap): Renamed from regmap, made static.
13934 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13935 made static.
13936 (mips_cannot_store_register): Renamed from cannot_store_register,
13937 made static.
13938 (the_low_target): New.
13939 * linux-ppc-low.c (num_regs): Remove.
13940 (ppc_num_regs): Define.
13941 (ppc_regmap): Renamed from regmap, made static.
13942 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13943 made static.
13944 (ppc_cannot_store_register): Renamed from cannot_store_register,
13945 made static.
13946 (the_low_target): New.
13947 * linux-s390-low.c (num_regs): Remove.
13948 (s390_num_regs): Define.
13949 (s390_regmap): Renamed from regmap, made static.
13950 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13951 made static.
13952 (s390_cannot_store_register): Renamed from cannot_store_register,
13953 made static.
13954 (the_low_target): New.
13955 * linux-sh-low.c (num_regs): Remove.
13956 (sh_num_regs): Define.
13957 (sh_regmap): Renamed from regmap, made static.
13958 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13959 made static.
13960 (sh_cannot_store_register): Renamed from cannot_store_register,
13961 made static.
13962 (the_low_target): New.
13963 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13964 (the_low_target): New.
13965
13966 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13967
13968 * Makefile.in: Add stamp-h target.
13969 * configure.in: Create stamp-h.
13970 * configure: Regenerated.
13971
13972 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13973
13974 * inferiors.c: New file.
13975 * target.c: New file.
13976 * target.h: New file.
13977 * Makefile.in: Add target.o and inferiors.o. Update
13978 dependencies.
13979 * linux-low.c (inferior_pid): New static variable,
13980 moved from server.c.
13981 (linux_create_inferior): Renamed from create_inferior.
13982 Call add_inferior. Return 0 on success instead of a PID.
13983 (linux_attach): Renamed from myattach.
13984 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13985 (linux_thread_alive): Renamed from mythread_alive.
13986 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13987 child dies.
13988 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13989 (regsets_store_inferior_registers): Correct error message.
13990 Add missing ``return 0''.
13991 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13992 (linux_store_registers): Renamed from store_inferior_registers.
13993 (linux_read_memory): Renamed from read_inferior_memory.
13994 (linux_write_memory): Renamed from write_inferior_memory.
13995 (linux_target_ops): New structure.
13996 (initialize_low): Call set_target_ops ().
13997 * remote-utils.c (unhexify): New function.
13998 (hexify): New function.
13999 (input_interrupt): Send signals to ``signal_pid''.
14000 * server.c (inferior_pid): Remove.
14001 (start_inferior): Update create_inferior call.
14002 (attach_inferior): Call add_inferior.
14003 (handle_query): New function.
14004 (main): Call handle_query for `q' packets.
14005 * server.h: Include "target.h". Remove obsolete prototypes.
14006 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14007
14008 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14009
14010 * Makefile.in: Add WARN_CFLAGS. Update configury
14011 dependencies.
14012 * configure.in: Check for <string.h>
14013 * configure: Regenerate.
14014 * config.in: Regenerate.
14015 * gdbreplay.c: Include needed system headers.
14016 (remote_open): Remove strchr prototype.
14017 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14018 * regcache.c (supply_register): Change buf argument to const void *.
14019 (supply_register_by_name): Likewise.
14020 (collect_register): Change buf argument to void *.
14021 (collect_register_by_name): Likewise.
14022 * regcache.h: Add missing prototypes.
14023 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14024 * server.c (handle_query): New function.
14025 (attached): New static variable, moved out of main.
14026 (main): Quiet longjmp clobber warnings.
14027 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14028 * utils.c (error): Remove NORETURN.
14029 (fatal): Likewise.
This page took 0.299311 seconds and 5 git commands to generate.